commit 5546f26619359bbfe1aa23885e93d7bea6d0ece6 Author: Paul Schaub Date: Thu Dec 12 15:20:41 2019 +0100 Initial dirty commit of old code into git diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..37a21f7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +.metadata/ +*/.metadata/ + +*/.project +*/.classpath +*/.setting/ + +*/bin/ diff --git a/Game/.settings/org.eclipse.jdt.core.prefs b/Game/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..7341ab1 --- /dev/null +++ b/Game/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.7 diff --git a/Game/src/Ammunition.java b/Game/src/Ammunition.java new file mode 100644 index 0000000..33d9e8c --- /dev/null +++ b/Game/src/Ammunition.java @@ -0,0 +1,90 @@ +/** + * Projectile with ballistic attributes and physics + * @author vanitas,lil + * + */ +public class Ammunition extends MovingObject +{ + private float durability, //Lifetime in seconds + lifetime; //"Age" of the projectile in seconds + + + /** + * Constructor + * @param direction + * @param x location + * @param y + * @param pearcing can this penetrate other Objects? + */ + public Ammunition(float rotation, float x, float y, boolean pearcing) + { + //this.direction = (float) Math.toRadians(direction+90); //Set the direction of the projectile + this.setRotation(rotation); + this.x = x; this.y = y; this.durability = 0; //Set variables + this.setShape(new Shape(Shape.S_BULLET)); + this.getShape().setSize(1f); + this.durability = 2; //Lifetime in seconds + } + /** + * moves the object one frame + */ + @Override + public void move(float delta, boolean keepOnScreen) + { + float xNeu = (float) (x+Math.cos((float) Math.toRadians(90-this.getRotation()))*0.35f*delta); + float yNeu = (float) (y+Math.sin((float) Math.toRadians(90-this.getRotation()))*0.35f*delta); + this.lifetime += (delta/1000); //Let the projectile "age" + if(this.lifetime>this.durability) //If "too old" do something + { + SpaceSpiel.getMunition().remove(this); + } + x = xNeu; + y = yNeu; + + if(keepOnScreen) keepOnScreen(); + + } + /** + * modifies the speedvector (In this case it doesnt, cause a bullet in space doesn't + * change direction and speed + */ + @Override + public void accelerate() + { + //Keep this empty, Munition doesn't accelerate (Except for rockets maybe) + } + + //Getters and setters + public float getDurability() + { + return durability; + } + public void setDurability(float durability) + { + this.durability = durability; + } + public float getX() + { + return x; + } + public void setX(float x) + { + this.x = x; + } + public float getY() + { + return y; + } + public void setY(float y) + { + this.y = y; + } + public float getLifetime() + { + return lifetime; + } + public void setLifetime(float lifetime) + { + this.lifetime = lifetime; + } +} diff --git a/Game/src/Button.java b/Game/src/Button.java new file mode 100644 index 0000000..e80556e --- /dev/null +++ b/Game/src/Button.java @@ -0,0 +1,50 @@ +import org.lwjgl.util.Rectangle; +import java.awt.Font; +import org.newdawn.slick.Color; +import org.newdawn.slick.TrueTypeFont; + + +public class Button{ + + private boolean isClicked; + private String name; + Rectangle bounds = new Rectangle(); + private TrueTypeFont font; + + public Button(float loc, String name) { + super(); + this.name = name; + this.isClicked = false; + bounds.setX(50); + bounds.setY((int) ((loc * 50) - 15)); + bounds.setHeight(30); + bounds.setWidth(100); + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public boolean isClicked() { + return isClicked; + } + public void setClicked(boolean isClicked) { + this.isClicked = isClicked; + } + public Rectangle getBounds() { + return bounds; + } + public void setBounds(Rectangle bounds) { + this.bounds = bounds; + } + public TrueTypeFont getFont() { + return font; + } + public void setFont(TrueTypeFont font) { + this.font = font; + } + public void init(String name) { + + } +} diff --git a/Game/src/ControlledShip.java b/Game/src/ControlledShip.java new file mode 100644 index 0000000..26ede56 --- /dev/null +++ b/Game/src/ControlledShip.java @@ -0,0 +1,19 @@ +/** + * Implementation of a ship controlled by a human + * @author vanitas + * + */ +public class ControlledShip extends Ship +{ + public ControlledShip() + { + super(); + this.setX(SpaceSpiel.frameSizeX/2); //Place the ship in the middle of the screen + this.setY(SpaceSpiel.frameSizeY/2); + this.setRotation(0f); //Initialize rotation + this.setThrust(0.1f); //Set thrust and maxSpeed + this.setMaxSpeed(6f); + } + + +} diff --git a/Game/src/Game.java b/Game/src/Game.java new file mode 100644 index 0000000..31dd96e --- /dev/null +++ b/Game/src/Game.java @@ -0,0 +1,279 @@ + +import java.util.ArrayList; + +import org.lwjgl.LWJGLException; +import org.lwjgl.Sys; +import org.lwjgl.input.Keyboard; +import org.lwjgl.opengl.Display; +import org.lwjgl.opengl.DisplayMode; +import org.lwjgl.opengl.GL11; +import org.lwjgl.input.Mouse; + + +/** + * This is the main class of the game. This renders the game, handles input and output etc. + * Important methods: update, renderGL + * @author vanitas + * + */ +public class Game{ + long lastFrame, lastFPS; //Values to calibrate the framerate etc. + int fps; + public static final int frameSizeX = 800, frameSizeY = 600; //Resolution of the Window + @SuppressWarnings("rawtypes") + private ArrayList objects; //A ArrayList containing th following Lists + private ArrayList metroids; //A List Containing all the metroids + private ArrayList ships; //A List Containing all the ships etc + private static ArrayList munition; //A List Containing all the active fired projectiles + + private ControlledShip playerShip; //The players ship + + private Menu menu; //The Menu-Display + private boolean menuIsActive; //if menu is active this variable is true + private boolean closeRequested = false; + /** + * Constructor + */ + @SuppressWarnings("rawtypes") + public Game() + { + // + //Initialize ship and Objects (Add Objects here and dont forget to add them to the ArrayLists as well;) + playerShip = new ControlledShip(); + Turret geschuetz = new Turret(playerShip.getX(),playerShip.getY()); + geschuetz.setParent(playerShip); + + //Initialize ArrayLists + objects = new ArrayList(); + metroids = new ArrayList(); + ships = new ArrayList(); + munition = new ArrayList(); + + //Add Objects to Lists + ships.add(playerShip); + ships.add(geschuetz); + + //Pack Lists together + objects.add(metroids); + objects.add(ships); + objects.add(munition); + } + /** + * This method updates all the objects (moves them, captures keyboard and mouse input etc) + * @param delta + */ + public void update(int delta) + { + //Handle Keyboard KeyPresses + //Gas geben ;) + if (Keyboard.isKeyDown(Keyboard.KEY_UP)) //Arrow up + { + playerShip.setVelocity(1f); //Set the velocity to 1 (Power on) + } + //rotation (Arrow right) + if (Keyboard.isKeyDown(Keyboard.KEY_RIGHT)) + { + playerShip.turnRight(delta); + } + //Arrow left + if (Keyboard.isKeyDown(Keyboard.KEY_LEFT)) + { + playerShip.turnLeft(delta); + } + //When Arrow up is released, turn down the power. + if(!Keyboard.isKeyDown(Keyboard.KEY_UP)) + { + playerShip.setVelocity(0f); + } + //If Spacebar is pressed and shotburnout is over, fire a projectile + if(Keyboard.isKeyDown(Keyboard.KEY_SPACE)) + { + playerShip.fire(delta); + } + if(Keyboard.isKeyDown(Keyboard.KEY_ESCAPE)) + { + menuIsActive = true; + } + //Call an update (movements etc.) for every Object in the game + updateObjects(delta); + updateFPS(); // update FPS Counter + } + /** + * Update (accelerate and move) all the Objects in the ArrayLists + * @param delta + */ + public void updateObjects(float delta) + { + for(int i = 0; i l = objects.get(i); + for(int j = 0; j l = objects.get(i); + for(int j = 0; j 1000) + { + Display.setTitle("The best game in the world. FPS: " + fps); + fps = 0; + lastFPS += 1000; + } + fps++; + } + public ArrayList getObjects() + { + return objects; + } + public void setObjects(ArrayList objects) + { + this.objects = objects; + } + public ArrayList getMetroids() + { + return metroids; + } + public void setMetroids(ArrayList metroids) + { + this.metroids = metroids; + } + public ArrayList getShips() + { + return ships; + } + public void setShips(ArrayList ships) + { + this.ships = ships; + } + public static ArrayList getMunition() + { + return munition; + } + public void setMunition(ArrayList munition) + { + this.munition = munition; + } +} diff --git a/Game/src/Item.java b/Game/src/Item.java new file mode 100644 index 0000000..929b25b --- /dev/null +++ b/Game/src/Item.java @@ -0,0 +1,28 @@ +/** + * TODO: Item wird gedropt und fliegt kurz weiter, verlangsamt aber. + * Wenn der Spieler sich nähert gleitet das Item mit wachsender + * Geschwindigkeit auf den Spieler zu, wird quasi "angezogen" + * @author vanitas, + * + */ +public class Item extends MovingObject +{ + private float friction = 0.95f; + + public Item() + { + this.setShape(new Shape(Shape.S_ITEM)); + } + + /** + * This doesn't accelerate the Item, but it slows it down till it stops. + */ + @Override + public void accelerate() //This Method is overwritten to let the Item + { //glide with decreasing speed, untill it stops + if(this.getSpeedX()>0.001) this.speedX = this.getSpeedX()*friction; + else this.setSpeedX(0f); + if(this.getSpeedY()>0.001) this.speedY = this.getSpeedY()*friction; + else this.setSpeedY(0f); + } +} diff --git a/Game/src/MathShit.java b/Game/src/MathShit.java new file mode 100644 index 0000000..f2ca01f --- /dev/null +++ b/Game/src/MathShit.java @@ -0,0 +1,29 @@ + +public class MathShit +{ + /** + * Calculates the x-component of a vector, rotated around 0|0 by angle + * @param angle angle to rotate, in radians + * @param x old x-component of the vector or point + * @param y old y-component of the vector or point + * @return the new x component + */ + public static float rotateX(double angle, float x, float y) + { + double beta = (2*Math.PI)-angle; + return (float) (Math.cos(beta)*x-Math.sin(beta)*y); + } + + /** + * Calculates the y-component of a vector, rotated around 0|0 by angle + * @param angle angle to rotate, in radians + * @param x old x-component of the vector or point + * @param y old y-component of the vector or point + * @return the new y-component + */ + public static float rotateY(double angle, float x, float y) + { + double beta = (2*Math.PI)-angle; + return (float) (Math.sin(beta)*x+Math.cos(beta)*y); + } +} diff --git a/Game/src/Menu.java b/Game/src/Menu.java new file mode 100644 index 0000000..65913ba --- /dev/null +++ b/Game/src/Menu.java @@ -0,0 +1,7 @@ + +public class Menu{ + public Menu(){ + + } + +} diff --git a/Game/src/Metroid.java b/Game/src/Metroid.java new file mode 100644 index 0000000..4340ee6 --- /dev/null +++ b/Game/src/Metroid.java @@ -0,0 +1,108 @@ +import java.util.ArrayList; + +/** + * A floating, gliding metroid TODO: Maybe add lifepoints, so that multiple hits are needed to destroy this + * @author vanitas + * + */ +public class Metroid extends MovingObject +{ + private int level, //Size of the Metroid (default 3-1) + countBabies; //How many new Metroids spawn, when THIS gets killed? + private float spin; + public Metroid(int level) + { + this.level = level; + this.spin = (float) Math.random(); + this.shape = new Shape(Shape.S_METROID); + this.getShape().setSize(level); + this.x = 400f; + this.y = 150f; + this.speedX = (float) (Math.random()*2f); + this.speedY = (float) (Math.random()*2f); + } + /** + * Creates a Metroid with + * @param level + * @param x + * @param y + * @param speedX + * @param speedY + */ + public Metroid(int level, float x, float y, float speedX, float speedY, float spin) + { + this.level = level; + this.spin = (float) Math.random(); + this.shape = new Shape(Shape.S_METROID); + this.getShape().setSize(level*1.5f); + this.x = x; + this.y = y; + this.speedX = speedX; + this.speedY = speedY; + } + + /** + * This method moves the Metroid according to its speedVector + * @param delta + * @param keepOnScreen if true the method calls keepOnScreen() + */ + @Override + public void move(float delta, boolean keepOnScreen) + { + + this.x += delta*0.1f*this.speedX; + this.y += delta*0.1f*this.speedY; + this.rotation += delta*this.spin*0.2f; + if(keepOnScreen) this.keepOnScreen(); + } + + /** + * this method handles the case that THIS Metroid gets hit by an Object (Normally Ammunition) + * @param o The object that hit the Metroid + */ + @SuppressWarnings("unchecked") + @Override + public void processCollision(MovingObject o) + { + ArrayList m = SpaceSpiel.getMetroids(); + if(this.level>1) + { + for(int i = 0; i<4; i++) + { + m.add(new Metroid(this.level-1, this.getX(),this.getY(),(float) (Math.random()*2f),(float) (Math.random()*2f),(float) Math.random())); + } + } + else + { + //TODO: By chance of 5% or so add some random Items or PowerUps to the game. + // + } + m.remove(this); + } + /** + * An empty method (A Metroid shouldn't accelerate) + * Only here to overwrite the parents method + */ + @Override + public void accelerate() + { + //Has to be empty + } + //Getters and setters + public int getLevel() + { + return this.level; + } + public void setLevel(int level) + { + this.level = level; + } + public float getSpin() + { + return this.spin; + } + public void setSpin(float spin) + { + this.spin = spin; + } +} diff --git a/Game/src/MovingObject.java b/Game/src/MovingObject.java new file mode 100644 index 0000000..4fbd6b8 --- /dev/null +++ b/Game/src/MovingObject.java @@ -0,0 +1,251 @@ +/** + * An Object that moves following physical rules + * @author vanitas + * + */ +public class MovingObject +{ + //Attributes + protected float velocity, //whats the velocity of the object? 0 or 1 + x, //x position of the object + y, //y position of the object + speedX, //x component of the speedvector + speedY, //y component (eg. x=2,y=2 => object is flying to the right corner with a speed of 2.7 + maxSpeed, //Maximal speed of the object + rotation, //totation of the object (0° <=> object points towards the top of the screen) + thrust; //Power of acceleration + protected int team; //Which team is the object in? 0 = nature + protected Shape shape; //Contains the vertices for the shape + + //Constructors (Lol there are none) + + /** + * moves the Object one frame + * @param delta + * @param keepOnScreen + */ + public void move(float delta, boolean keepOnScreen) + { + //Set new x and y locations calculated from old location and + //Speedvector + this.setX(this.getX()+this.getSpeedX()*delta*0.2f); + this.setY(this.getY()+this.getSpeedY()*delta*0.2f); + //Eventually keep the object on the screen if it leaves at the borders + if(keepOnScreen) this.keepOnScreen(); + } + /** + * Rotates the Object to the right + * @param delta + */ + public void turnRight(int delta) + { + this.setRotation(this.getRotation() + 0.35f * delta); + } + /** + * Rotates the Object to the left + * @param delta + */ + public void turnLeft(int delta) + { + this.setRotation(this.getRotation() - 0.35f * delta); + } + /** + * Let this Object follow another Object + * @param x + */ + public void follow(MovingObject x) //TODO Test this + { + float xOther = x.getX(); + float yOther = x.getY(); + float hypot = (float) Math.hypot(Math.abs(this.x-xOther), Math.abs(this.y-yOther)); + //Set Rotation + float rot; + if(this.xthis.getMaxSpeed()) + { + double fac = actualSpeed/this.getMaxSpeed(); + this.speedX = (float) (this.speedX/fac); + this.speedY = (float) (this.speedY/fac); + } + } + /** + * Keep the Object on the screen if it leaves to the borders + */ + public void keepOnScreen() + { + this.x = this.x%SpaceSpiel.frameSizeX; + this.y = this.y%SpaceSpiel.frameSizeY; + if(this.x<0) this.x = SpaceSpiel.frameSizeX+this.x; + if(this.y<0) this.y = SpaceSpiel.frameSizeY+this.y; + } + /** + * This Method fires (In this class its only there, to be overwritten) + * @param delta + */ + public void fire(float delta) + { + //Let me empty + } + + /** + * Checks, if this Object collides with another TODO: This is not accurate, maybe there's a fix for this + * @param otherObject The Object, this Object should check for collision with + * @return the Object if collided, else null + * @author lil, Oooh, vanitas + */ + public MovingObject intersect(MovingObject otherObject) + { + //Extract the shapes of the objects + Shape one = this.getShape(); + Shape other = otherObject.getShape(); + //Go through all the edges of the shape of THIS object + for(int i = 0; icurrent edge of THIS shape, 3-4 => current edge of otherObject's shape) + double x1 = this.getX()+MathShit.rotateX(Math.toRadians(this.getRotation()), one.getX(i), one.getY(i))*one.getSize(); + double x2 = this.getX()+MathShit.rotateX(Math.toRadians(this.getRotation()), one.getX(iinc), one.getY(iinc))*one.getSize(); + double x3 = otherObject.getX()+MathShit.rotateX(Math.toRadians(otherObject.getRotation()), other.getX(j), other.getY(j))*other.getSize(); + double x4 = otherObject.getX()+MathShit.rotateX(Math.toRadians(otherObject.getRotation()), other.getX(jinc), other.getY(jinc))*other.getSize(); + double y1 = this.getY()+MathShit.rotateY(Math.toRadians(this.getRotation()), one.getX(i), one.getY(i))*one.getSize(); + double y2 = this.getY()+MathShit.rotateY(Math.toRadians(this.getRotation()), one.getX(iinc), one.getY(iinc))*one.getSize(); + double y3 = otherObject.getY()+MathShit.rotateY(Math.toRadians(otherObject.getRotation()), other.getX(j), other.getY(j))*other.getSize(); + double y4 = otherObject.getY()+MathShit.rotateY(Math.toRadians(otherObject.getRotation()), other.getX(jinc), other.getY(jinc))*other.getSize(); + // Zaehler + double zx = (x1 * y2 - y1 * x2)*(x3-x4) - (x1 - x2) * (x3 * y4 - y3 * x4); + double zy = (x1 * y2 - y1 * x2)*(y3-y4) - (y1 - y2) * (x3 * y4 - y3 * x4); + + // Nenner + double n = (x1 - x2) * (y3 - y4) - (y1 - y2) * (x3 - x4); + + // Koordinaten des Schnittpunktes + double x = zx/n; + double y = zy/n; + + // Vielleicht ist bei der Division durch n etwas schief gelaufen + if (Double.isNaN(x)& Double.isNaN(y)) + { + System.out.println("NaN"); + } + // Test ob der Schnittpunkt auf den angebenen Strecken liegt oder außerhalb. + if (Math.abs((x - x1) / (x2 - x1)) > 1 || Math.abs((x - x3) / (x4 - x3)) > 1 || Math.abs((y - y1) / (y2 - y1)) > 1 || Math.abs((y - y3) / (y4 - y3)) > 1 ) + { + //System.out.println("Alles ok"); + } + else return otherObject; + } + } + return null; + } + + /** + * Placeholder for children. Children should overwrite this method to handle the case of a collision + * @param o The Object THIS collided with + */ + public void processCollision(MovingObject o) + { + + } + + //Getters and setters + public float getVelocity() + { + return this.velocity; + } + public void setVelocity(float v) + { + this.velocity = v; + } + public float getX() + { + return this.x; + } + public void setX(float x) + { + this.x = x; + } + public float getY() + { + return y; + } + public void setY(float y) + { + this.y = y; + } + public float getSpeedX() + { + return speedX; + } + public void setSpeedX(float speedX) + { + this.speedX = speedX; + } + public float getSpeedY() + { + return speedY; + } + public void setSpeedY(float speedY) + { + this.speedY = speedY; + } + public float getMaxSpeed() + { + return maxSpeed; + } + public void setMaxSpeed(float maxSpeed) + { + this.maxSpeed = maxSpeed; + } + public float getRotation() + { + return rotation; + } + public void setRotation(float rotation) + { + this.rotation = rotation%360; + } + public float getThrust() + { + return thrust; + } + public void setThrust(float thrust) + { + this.thrust = thrust; + } + public int getTeam() + { + return team; + } + public void setTeam(int team) + { + this.team = team; + } + public Shape getShape() + { + return shape; + } + public void setShape(Shape shape) + { + this.shape = shape; + } +} diff --git a/Game/src/Shape.java b/Game/src/Shape.java new file mode 100644 index 0000000..d842ef3 --- /dev/null +++ b/Game/src/Shape.java @@ -0,0 +1,202 @@ +import java.util.ArrayList; + +/** + * This defines the renderable shape of objects such as triangles, squares, etc. + * The Shape is defined via a list of vertices (x,y coordinates -> x,y) + * SpaceSpiel can read these vertices in the renderObject method and render the object. + * @author vanitas + * + */ +public class Shape +{ + //Lists containing the vertices' x and y coordinates + private ArrayList x; + private ArrayList y; + private float size; + //the color of the shape + private float[] color; + + //Template IDs + public static final int S_SHIP = 0001; + public static final int S_TURRET = 0002; + public static final int S_ITEM = 0003; + public static final int S_METROID = 0004; + public static final int S_BULLET = 0005; + public static final int S_BUTTON = 0006; + public static final int S_MENU = 0007; + + + /** + * Constructor + */ + public Shape() + { + //Initialize + x = new ArrayList(); + y = new ArrayList(); + color = new float[]{1.0f,0.2f,0.2f}; + } + /** + * Second constructor (Creates an Object from a template) + * @param blueprint id of the template to create + */ + public Shape(int blueprint) + { + //Initialize + x = new ArrayList(); + y = new ArrayList(); + //Fill with data + this.createFromBlueprint(blueprint); + } + /** + * Create a shape from a template + * @param b id of the template + */ + public void createFromBlueprint(int b) + { + switch(b) + { + case S_SHIP: + { //Create the shape of a ship + x.add(0f); y.add(20f); //Spitze + x.add(10f); y.add(-10f); //rechts hinten + x.add(-10f); y.add(-10f); //links hinten + this.setColor(1f, 0.2f, 0.2f); + break; + } + case S_TURRET: + { //Create the shape of a Turret + x.add(-1f); y.add(10f); //Spitze + x.add(1f); y.add(10f); + x.add(5f); y.add(-5f); //rechts hinten + x.add(-5f); y.add(-5f); //links hinten + this.setColor(0.2f, 0.2f, 0.2f); + break; + } + case S_BULLET: + { + //Create a bullet + this.add(2.5f, 7.5f); + this.add(-2.5f, 7.5f); + this.add(-2.5f, -7.5f); + this.add(2.5f, -7.5f); + this.setColor(1f, 1f, 0f); + break; + } + case S_MENU: + { + this.add(SpaceSpiel.frameSizeX/2, SpaceSpiel.frameSizeY/2); + this.add(-SpaceSpiel.frameSizeX/2, SpaceSpiel.frameSizeY/2); + this.add(-SpaceSpiel.frameSizeX/2, -SpaceSpiel.frameSizeY/2); + this.add(SpaceSpiel.frameSizeX/2, -SpaceSpiel.frameSizeY/2); + this.setColor(0f, 0f, 0f); + break; + } + case S_BUTTON: //TODO: Mit dem Uhrzeigersinn + { + //create a Button + this.add(100f, 15f); + this.add(-0f, 15f); + this.add(-0f, -15f); + this.add(100f, -15f); + this.setColor(1f, 1f, 1f); + break; + } + case S_METROID: + { + this.add(4f, 7f); + this.add(8f,0f); + this.add(4f,-7f); + this.add(-4f,-7f); + this.add(-8f,0f); + this.add(-4f,7f); + this.setColor(0.15f, 0.15f, 0.15f); + break; + } + default: + this.setColor(0.2f, 0.2f, 0.2f); + //TODO: Add shape of multiple ammunition types and items + } + } + + /** + * Add a new vertex to the shape + * @param nx + * @param ny + */ + public void add(float nx, float ny) + { + this.x.add(nx); + this.y.add(ny); + } + /** + * Modify the vertex on position pos + * @param pos position of the vertex + * @param nx new x value + * @param ny new y value + */ + public void modify(int pos, float nx, float ny) + { + this.x.set(pos, nx); + this.y.set(pos, ny); + } + + /** + * return the x component of a specific vertex + * @param pos position of the vertex in the list + * @return x component + */ + public float getX(int pos) + { + return x.get(pos); + } + /** + * return the y component of a specific vertex + * @param pos position of the vertex in the list + * @return y component + */ + public float getY(int pos) + { + return y.get(pos); + } + /** + * returns the Length of the x list representative for how many vertices are in the list. + * x.size() and y.size() should be equal all the time. + * @return size of the arrays + */ + public int getLength() + { + return x.size(); + } + /** + * set the color of the shape + * @param r red + * @param g green + * @param b blue + */ + public void setColor(float r, float g, float b) + { + color = new float[3]; + color[0]=r; + color[1]=g; + color[2]=b; + } + + /** + * returns the color of the shape + * @return color + */ + public float[] getColor() + { + //System.out.println(""+color[0]+""+color[1]+""+color[2]); + return color; + } + public void setSize(float s) + { + this.size = s; + } + public float getSize() + { + return this.size; + } +} diff --git a/Game/src/Ship.java b/Game/src/Ship.java new file mode 100644 index 0000000..bf64a47 --- /dev/null +++ b/Game/src/Ship.java @@ -0,0 +1,47 @@ +/** + * A Spaceship that can fly and shoot + * @author vanitas + * + */ +public class Ship extends MovingObject +{ + + float firerate; + float burnout = 1000; + public Ship() + { + super(); + this.setShape(new Shape(Shape.S_SHIP)); + this.getShape().setSize(1f); + this.setMaxSpeed(1); + this.setFirerate(10); + } + public void fire(float delta) + { + while(burnout >= firerate){ + float xOfBullet = (float) (this.getX()+Math.sin(Math.toRadians(this.getRotation()))*(this.getShape().getY(0)+7.5f)); + float yOfBullet = (float) (this.getY()+Math.cos(Math.toRadians(this.getRotation()))*(this.getShape().getY(0)+7.5f)); + Ammunition shot = new Ammunition(this.getRotation(), xOfBullet, yOfBullet, false); //TODO: Place bullet in front of the ship when fired + SpaceSpiel.getMunition().add(shot); + burnout = 0; + } + } + + public void setFirerate(float firerateSec){ + this.firerate = 60/firerateSec; + } + @Override + public void accelerate() + { + super.accelerate(); + burnout++; + } + + @Override + public void processCollision(MovingObject o) + { + System.out.println("Verloren du Lappen"); + } + + +} diff --git a/Game/src/SpaceSpiel.java b/Game/src/SpaceSpiel.java new file mode 100644 index 0000000..a389b2b --- /dev/null +++ b/Game/src/SpaceSpiel.java @@ -0,0 +1,380 @@ + +import java.util.ArrayList; + +import org.lwjgl.LWJGLException; +import org.lwjgl.Sys; +import org.lwjgl.input.Keyboard; +import org.lwjgl.opengl.Display; +import org.lwjgl.opengl.DisplayMode; +import org.lwjgl.opengl.GL11; +import org.lwjgl.input.Mouse; + + +/** + * This is the main class of the game. This renders the game, handles input and output etc. + * Important methods: update, renderGL + * @author vanitas + * + */ +public class SpaceSpiel +{ + long lastFrame, lastFPS; //Values to calibrate the framerate etc. + int fps; + public static final int frameSizeX = 800, frameSizeY = 600; //Resolution of the Window + @SuppressWarnings("rawtypes") + private ArrayList objects; //A ArrayList containing th following Lists + private static ArrayList metroids; //A List Containing all the metroids + private ArrayList ships; //A List Containing all the ships etc + private static ArrayList munition; //A List Containing all the active fired projectiles + + private ControlledShip playerShip; //The players ship + + //private Menu menu; //The Menu-Display + //private boolean menuIsActive; //if menu is active this variable is true + private boolean closeRequested = false; + //private Button startbutton; + //private Button exitbutton; + /** + * Constructor + */ + @SuppressWarnings("rawtypes") + public SpaceSpiel() + { + //Initialize the menu and the for this needed variables + //menu = new Menu(); + //menuIsActive = false; + //startbutton = new Button(1 , "START"); + //exitbutton = new Button(2, "EXIT"); + + //Initialize ship and Objects (Add Objects here and dont forget to add them to the ArrayLists as well;) + playerShip = new ControlledShip(); + Turret geschuetz = new Turret(playerShip.getX(),playerShip.getY()); + Metroid m1 = new Metroid(3); + Metroid m2 = new Metroid(3); + Metroid m3 = new Metroid(3); + geschuetz.setParent(playerShip); + + //Initialize ArrayLists + objects = new ArrayList(); + metroids = new ArrayList(); + ships = new ArrayList(); + munition = new ArrayList(); + + //Add Objects to Lists + ships.add(playerShip); + ships.add(geschuetz); + metroids.add(m1); + metroids.add(m2); + metroids.add(m3); + + //Pack Lists together + objects.add(metroids); + objects.add(ships); + objects.add(munition); + } + /** + * This method updates all the objects (moves them, captures keyboard and mouse input etc) + * @param delta + */ + public void update(int delta) + { + //Handle Keyboard KeyPresses + //Gas geben ;) + if (Keyboard.isKeyDown(Keyboard.KEY_UP)) //Arrow up + { + playerShip.setVelocity(1f); //Set the velocity to 1 (Power on) + } + //rotation (Arrow right) + if (Keyboard.isKeyDown(Keyboard.KEY_RIGHT)) + { + playerShip.turnRight(delta); + } + //Arrow left + if (Keyboard.isKeyDown(Keyboard.KEY_LEFT)) + { + playerShip.turnLeft(delta); + } + //When Arrow up is released, turn down the power. + if(!Keyboard.isKeyDown(Keyboard.KEY_UP)) + { + playerShip.setVelocity(0f); + } + if(Keyboard.isKeyDown(Keyboard.KEY_DOWN)) + { + playerShip.setSpeedX(0); + playerShip.setSpeedY(0); + } + if(Keyboard.isKeyDown(Keyboard.KEY_W)) + { + playerShip.setY(playerShip.getY()+1); + } + if(Keyboard.isKeyDown(Keyboard.KEY_A)) + { + playerShip.setX(playerShip.getX()-1); + } + if(Keyboard.isKeyDown(Keyboard.KEY_D)) + { + playerShip.setX(playerShip.getX()+1); + } + if(Keyboard.isKeyDown(Keyboard.KEY_S)) + { + playerShip.setY(playerShip.getY()-1); + } + //If Spacebar is pressed and shotburnout is over, fire a projectile + if(Keyboard.isKeyDown(Keyboard.KEY_SPACE)) + { + playerShip.fire(delta); + } + //if(Keyboard.isKeyDown(Keyboard.KEY_ESCAPE)) + //{ + // menuIsActive = true; + //} + //if(exitbutton.isClicked() == true) + //{ + // closeRequested = true; + //} + //if(startbutton.isClicked() == true) + //{ + // menuIsActive = false; + // startbutton.setClicked(false); + //} + //Call an update (movements etc.) for every Object in the game + updateObjects(delta); + updateFPS(); // update FPS Counter + } + + /** + * Update (accelerate and move) all the Objects in the ArrayLists + * @param delta + */ + public void updateObjects(float delta) + { + for(int i = 0; i l = objects.get(i); + for(int j = 0; j l = objects.get(i); + for(int j = 0; j 1000) + { + Display.setTitle("The best game in the world. FPS: " + fps); + fps = 0; + lastFPS += 1000; + } + fps++; + } + @SuppressWarnings("rawtypes") + public ArrayList getObjects() + { + return objects; + } + @SuppressWarnings("rawtypes") + public void setObjects(ArrayList objects) + { + this.objects = objects; + } + public static ArrayList getMetroids() + { + return metroids; + } + public void setMetroids(ArrayList metroids) + { + this.metroids = metroids; + } + public ArrayList getShips() + { + return ships; + } + public void setShips(ArrayList ships) + { + this.ships = ships; + } + public static ArrayList getMunition() + { + return munition; + } + @SuppressWarnings("static-access") + public void setMunition(ArrayList munition) + { + this.munition = munition; + } +} diff --git a/Game/src/Turret.java b/Game/src/Turret.java new file mode 100644 index 0000000..9ce0596 --- /dev/null +++ b/Game/src/Turret.java @@ -0,0 +1,31 @@ + +public class Turret extends MovingObject +{ + private MovingObject parent; + private Shape shape; + public Turret(float x, float y) + { + super(); + this.x = x; + this.y = y; + this.setShape(new Shape(Shape.S_TURRET)); // stand vorher S_Geschütz + this.getShape().setSize(1f); + } + public void setParent(MovingObject p) + { + this.parent = p; + } + public MovingObject getParent() + { + return this.parent; + } + @Override + public void move(float delta, boolean keepOnScreen) + { + if(this.parent!=null) + { + this.x = parent.getX(); + this.y = parent.getY(); + } + } +} diff --git a/download all.sh b/download all.sh new file mode 100644 index 0000000..a233bbb --- /dev/null +++ b/download all.sh @@ -0,0 +1,2 @@ +cp /home/vanitas/Dropbox/Informatik/Projekte/Game/src /home/vanitas/Projekt/Game/src + diff --git a/etc/lwjgl-2.9.1/build.xml b/etc/lwjgl-2.9.1/build.xml new file mode 100644 index 0000000..5b0af7c --- /dev/null +++ b/etc/lwjgl-2.9.1/build.xml @@ -0,0 +1,670 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Build aborted by user. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + lwjgl.java.windows.version = ${lwjgl.java.windows.version} + lwjgl.native.windows.version = ${lwjgl.native.windows.version} + lwjgl.java.linux.version = ${lwjgl.java.linux.version} + lwjgl.native.linux.version = ${lwjgl.native.linux.version} + lwjgl.java.freebsd.version = ${lwjgl.java.linux.version} + lwjgl.native.freebsd.version = ${lwjgl.native.linux.version} + lwjgl.java.macosx.version = ${lwjgl.java.macosx.version} + lwjgl.native.macosx.version = ${lwjgl.native.macosx.version} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Lightweight Java Game Toolkit]]> + Copyright © 2002-2009 lwjgl.org. All Rights Reserved.]]> + + + + + + + + + + + + + + + diff --git a/etc/lwjgl-2.9.1/doc/3rdparty/jinput_license.txt b/etc/lwjgl-2.9.1/doc/3rdparty/jinput_license.txt new file mode 100644 index 0000000..cee4669 --- /dev/null +++ b/etc/lwjgl-2.9.1/doc/3rdparty/jinput_license.txt @@ -0,0 +1,32 @@ +/***************************************************************************** + * Copyright (c) 2003 Sun Microsystems, Inc. All Rights Reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * - Redistribution of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * - Redistribution in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materails provided with the distribution. + * + * Neither the name Sun Microsystems, Inc. or the names of the contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * This software is provided "AS IS," without a warranty of any kind. + * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING + * ANY IMPLIED WARRANT OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR + * NON-INFRINGEMEN, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND + * ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS + * A RESULT OF USING, MODIFYING OR DESTRIBUTING THIS SOFTWARE OR ITS + * DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST + * REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, + * INCIDENTAL OR PUNITIVE DAMAGES. HOWEVER CAUSED AND REGARDLESS OF THE THEORY + * OF LIABILITY, ARISING OUT OF THE USE OF OUR INABILITY TO USE THIS SOFTWARE, + * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + * + * You acknowledge that this software is not designed or intended for us in + * the design, construction, operation or maintenance of any nuclear facility + * + *****************************************************************************/ \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/doc/3rdparty/jogl_license.txt b/etc/lwjgl-2.9.1/doc/3rdparty/jogl_license.txt new file mode 100644 index 0000000..db9b933 --- /dev/null +++ b/etc/lwjgl-2.9.1/doc/3rdparty/jogl_license.txt @@ -0,0 +1,152 @@ +JOGL is released under the BSD license. The full license terms follow: + + Copyright (c) 2003-2009 Sun Microsystems, Inc. All Rights Reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + - Redistribution of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistribution in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + Neither the name of Sun Microsystems, Inc. or the names of + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + This software is provided "AS IS," without a warranty of any kind. ALL + EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, + INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A + PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN + MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR + ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR + DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR + ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR + DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE + DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, + ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF + SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + + You acknowledge that this software is not designed or intended for use + in the design, construction, operation or maintenance of any nuclear + facility. + +The JOGL source tree contains code ported from the OpenGL sample +implementation by Silicon Graphics, Inc. This code is licensed under +the SGI Free Software License B (Sun is redistributing the modified code +under a slightly modified, alternative license, which is described two +paragraphs below after "NOTE:"): + + License Applicability. Except to the extent portions of this file are + made subject to an alternative license as permitted in the SGI Free + Software License B, Version 1.1 (the "License"), the contents of this + file are subject only to the provisions of the License. You may not use + this file except in compliance with the License. You may obtain a copy + of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 + Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: + + http://oss.sgi.com/projects/FreeB + + Note that, as provided in the License, the Software is distributed on an + "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS + DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND + CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A + PARTICULAR PURPOSE, AND NON-INFRINGEMENT. + + NOTE: The Original Code (as defined below) has been licensed to Sun + Microsystems, Inc. ("Sun") under the SGI Free Software License B + (Version 1.1), shown above ("SGI License"). Pursuant to Section + 3.2(3) of the SGI License, Sun is distributing the Covered Code to + you under an alternative license ("Alternative License"). This + Alternative License includes all of the provisions of the SGI License + except that Section 2.2 and 11 are omitted. Any differences between + the Alternative License and the SGI License are offered solely by Sun + and not by SGI. + + Original Code. The Original Code is: OpenGL Sample Implementation, + Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, + Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. + Copyright in any portions created by third parties is as indicated + elsewhere herein. All Rights Reserved. + + Additional Notice Provisions: The application programming interfaces + established by SGI in conjunction with the Original Code are The + OpenGL(R) Graphics System: A Specification (Version 1.2.1), released + April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version + 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X + Window System(R) (Version 1.3), released October 19, 1998. This software + was created using the OpenGL(R) version 1.2.1 Sample Implementation + published by SGI, but has not been independently verified as being + compliant with the OpenGL(R) version 1.2.1 Specification. + + +The JOGL source tree contains code from the LWJGL project which is +similarly covered by the BSD license: + + Copyright (c) 2002-2004 LWJGL Project + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of 'LWJGL' nor the names of + its contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +The JOGL source tree also contains a Java port of Brian Paul's Tile +Rendering library, used with permission of the author under the BSD +license instead of the original LGPL: + + Copyright (c) 1997-2005 Brian Paul. All Rights Reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + - Redistribution of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistribution in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + Neither the name of Brian Paul or the names of contributors may be + used to endorse or promote products derived from this software + without specific prior written permission. + + This software is provided "AS IS," without a warranty of any + kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND + WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY + EXCLUDED. THE COPYRIGHT HOLDERS AND CONTRIBUTORS SHALL NOT BE + LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, + MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO + EVENT WILL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY + LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, + CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND + REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR + INABILITY TO USE THIS SOFTWARE, EVEN IF THE COPYRIGHT HOLDERS OR + CONTRIBUTORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. diff --git a/etc/lwjgl-2.9.1/doc/3rdparty/lzma_license.txt b/etc/lwjgl-2.9.1/doc/3rdparty/lzma_license.txt new file mode 100644 index 0000000..d825219 --- /dev/null +++ b/etc/lwjgl-2.9.1/doc/3rdparty/lzma_license.txt @@ -0,0 +1,15 @@ +LZMA# SDK is licensed under two licenses: + +1) GNU Lesser General Public License (GNU LGPL) +2) Common Public License (CPL) + +It means that you can select one of these two licenses and +follow rules of that license. + +SPECIAL EXCEPTION +Igor Pavlov, as the author of this code, expressly permits you +to statically or dynamically link your code (or bind by name) +to the files from LZMA# SDK without subjecting your linked +code to the terms of the CPL or GNU LGPL. +Any modifications or additions to files from LZMA# SDK, however, +are subject to the GNU LGPL or CPL terms. \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/doc/3rdparty/openal_license.txt b/etc/lwjgl-2.9.1/doc/3rdparty/openal_license.txt new file mode 100644 index 0000000..339560d --- /dev/null +++ b/etc/lwjgl-2.9.1/doc/3rdparty/openal_license.txt @@ -0,0 +1,437 @@ + GNU LIBRARY GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if +you distribute copies of the library, or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link a program with the library, you must provide +complete object files to the recipients so that they can relink them +with the library, after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + Our method of protecting your rights has two steps: (1) copyright +the library, and (2) offer you this license which gives you legal +permission to copy, distribute and/or modify the library. + + Also, for each distributor's protection, we want to make certain +that everyone understands that there is no warranty for this free +library. If the library is modified by someone else and passed on, we +want its recipients to know that what they have is not the original +version, so that any problems introduced by others will not reflect on +the original authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that companies distributing free +software will individually obtain patent licenses, thus in effect +transforming the program into proprietary software. To prevent this, +we have made it clear that any patent must be licensed for everyone's +free use or not licensed at all. + + Most GNU software, including some libraries, is covered by the ordinary +GNU General Public License, which was designed for utility programs. This +license, the GNU Library General Public License, applies to certain +designated libraries. This license is quite different from the ordinary +one; be sure to read it in full, and don't assume that anything in it is +the same as in the ordinary license. + + The reason we have a separate public license for some libraries is that +they blur the distinction we usually make between modifying or adding to a +program and simply using it. Linking a program with a library, without +changing the library, is in some sense simply using the library, and is +analogous to running a utility program or application program. However, in +a textual and legal sense, the linked executable is a combined work, a +derivative of the original library, and the ordinary General Public License +treats it as such. + + Because of this blurred distinction, using the ordinary General +Public License for libraries did not effectively promote software +sharing, because most developers did not use the libraries. We +concluded that weaker conditions might promote sharing better. + + However, unrestricted linking of non-free programs would deprive the +users of those programs of all benefit from the free status of the +libraries themselves. This Library General Public License is intended to +permit developers of non-free programs to use free libraries, while +preserving your freedom as a user of such programs to change the free +libraries that are incorporated in them. (We have not seen how to achieve +this as regards changes in header files, but we have achieved it as regards +changes in the actual functions of the Library.) The hope is that this +will lead to faster development of free libraries. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, while the latter only +works together with the library. + + Note that it is possible for a library to be covered by the ordinary +General Public License rather than by this special one. + + GNU LIBRARY GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library which +contains a notice placed by the copyright holder or other authorized +party saying it may be distributed under the terms of this Library +General Public License (also called "this License"). Each licensee is +addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also compile or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + d) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the source code distributed need not include anything that is normally +distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Library General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS diff --git a/etc/lwjgl-2.9.1/doc/CREDITS b/etc/lwjgl-2.9.1/doc/CREDITS new file mode 100644 index 0000000..d03bbf5 --- /dev/null +++ b/etc/lwjgl-2.9.1/doc/CREDITS @@ -0,0 +1,38 @@ +The following people have helped to make this project what it is today: + - Caspian Rychlik-Prince + - Brian Matzon + - Elias Naur + - Ioannis Tsakpinis + - Niels J�rgensen + - Tristan Campbell + - Gregory Pierce + - Luke Holden + - Mark Bernard + - Erik Duijs + - Jos Hirth + - Kevin Glass + - Atsuya Takagi + - kappaOne + - Simon Felix + - Ryan McNally + - Ciardhubh + - Jens von Pilgrim + - Ruben Garat + - Pelle Johnsen + - Jae Kwon + +additional credits goes to: + - Joseph I. Valenzuela [OpenAL stuff] + - Lev Povalahev [OpenGL Extensions] + - Endolf [Nightly builds and JInput] + +The LWJGL project includes files from or depends on the following projects: + - OpenGL, SGI - http://opengl.org/ + - OpenAL, Creative Labs - http://openal.org/ + - jinput, Sun - https://jinput.dev.java.net/ + - lzma, p7zip - http://p7zip.sourceforge.net/ + - JOGL, Sun - http://kenai.com/projects/jogl/pages/Home + +Please see the /doc/3rdparty/ directory for licenses. + +All trademarks and registered trademarks are the property of their respective owners. diff --git a/etc/lwjgl-2.9.1/doc/LICENSE b/etc/lwjgl-2.9.1/doc/LICENSE new file mode 100644 index 0000000..d277220 --- /dev/null +++ b/etc/lwjgl-2.9.1/doc/LICENSE @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2002-2008 Lightweight Java Game Library Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'Light Weight Java Game Library' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/doc/README b/etc/lwjgl-2.9.1/doc/README new file mode 100644 index 0000000..977ae02 --- /dev/null +++ b/etc/lwjgl-2.9.1/doc/README @@ -0,0 +1,50 @@ +This is the official readme file for lwjgl. + +Unless otherwise stated, all files distributed or in SVN are covered by +the license as stated in the LICENSE file. If you have not received this +file, please download it from the cvs server. + +To run some of the included tests: + Extract the archive, and cd into directory + (please substitute ; and \ according to platform) + + java -cp .;res;jar\lwjgl.jar;jar\lwjgl_test.jar;jar\lwjgl_util.jar;jar\jinput.jar; -Djava.library.path=native\ TEST + (this specifies that the jvm should locate the lwjgl native libs in 'native' directory) + + where TEST is some of the following: + + org.lwjgl.test.WindowCreationTest + org.lwjgl.test.SysTest + org.lwjgl.test.DisplayTest + + org.lwjgl.test.input.MouseCreationTest + org.lwjgl.test.input.MouseTest + org.lwjgl.test.input.HWCursorTest + org.lwjgl.test.input.KeyboardTest + org.lwjgl.test.input.TestControllers + + org.lwjgl.test.openal.ALCTest + org.lwjgl.test.openal.OpenALCreationTest + org.lwjgl.test.openal.MovingSoundTest + org.lwjgl.test.openal.PlayTest + org.lwjgl.test.openal.PlayTestMemory + org.lwjgl.test.openal.SourceLimitTest + org.lwjgl.test.openal.PositionTest + org.lwjgl.test.openal.StressTest + org.lwjgl.test.openal.SourceLimitTest + + org.lwjgl.test.opengl.FullScreenWindowedTest + org.lwjgl.test.opengl.PbufferTest + org.lwjgl.test.opengl.VBOIndexTest + org.lwjgl.test.opengl.VBOTest + + org.lwjgl.test.opengl.pbuffers.PbufferTest + + org.lwjgl.test.opengl.shaders.ShadersTest + +You may also run the Space invaders demo by executing: + java -cp .;res;jar\lwjgl.jar;jar\lwjgl_test.jar;jar\lwjgl_util.jar; -Djava.library.path=native\ org.lwjgl.examples.spaceinvaders.Game + +Project Webpage: www.lwjgl.org +Project Forum: forum.lwjgl.org +Project SVN: https://java-game-lib.svn.sourceforge.net/svnroot/java-game-lib diff --git a/etc/lwjgl-2.9.1/doc/lwjgl_hidden_switches.text b/etc/lwjgl-2.9.1/doc/lwjgl_hidden_switches.text new file mode 100644 index 0000000..976a76d --- /dev/null +++ b/etc/lwjgl-2.9.1/doc/lwjgl_hidden_switches.text @@ -0,0 +1,28 @@ +LWJGL "Hidden" switches: + +org.lwjgl.opengl.Display.noinput +Do not initialize any controls when creating the display + +org.lwjgl.opengl.Display.nomouse +Do not create the mouse when creating the display + +org.lwjgl.opengl.Display.nokeyboard +Do not create the keyboard when creating the display + +org.lwjgl.util.Debug +Whether to output debug info + +org.lwjgl.util.NoChecks +Whether to disable runtime function/buffer checks and state tracking. + +org.lwjgl.opengl.Display.allowSoftwareOpenGL +Whether to allow creation of a software only opengl context + +org.lwjgl.opengl.Window.undecorated +Whether to create an undecorated window (no title bar) + +org.lwjgl.input.Mouse.allowNegativeMouseCoords +Usually mouse is clamped to 0,0 - setting this to true will cause you to get negative values if dragging outside and below or left of window + +org.lwjgl.opengl.Display.enableHighDPI +Enable high DPI mode where available \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/jar/AppleJavaExtensions.jar b/etc/lwjgl-2.9.1/jar/AppleJavaExtensions.jar new file mode 100644 index 0000000..160d62b Binary files /dev/null and b/etc/lwjgl-2.9.1/jar/AppleJavaExtensions.jar differ diff --git a/etc/lwjgl-2.9.1/jar/asm-debug-all.jar b/etc/lwjgl-2.9.1/jar/asm-debug-all.jar new file mode 100644 index 0000000..d5aa15e Binary files /dev/null and b/etc/lwjgl-2.9.1/jar/asm-debug-all.jar differ diff --git a/etc/lwjgl-2.9.1/jar/jinput.jar b/etc/lwjgl-2.9.1/jar/jinput.jar new file mode 100644 index 0000000..7c2b6b0 Binary files /dev/null and b/etc/lwjgl-2.9.1/jar/jinput.jar differ diff --git a/etc/lwjgl-2.9.1/jar/lwjgl-debug.jar b/etc/lwjgl-2.9.1/jar/lwjgl-debug.jar new file mode 100644 index 0000000..c2dfecb Binary files /dev/null and b/etc/lwjgl-2.9.1/jar/lwjgl-debug.jar differ diff --git a/etc/lwjgl-2.9.1/jar/lwjgl.jar b/etc/lwjgl-2.9.1/jar/lwjgl.jar new file mode 100644 index 0000000..77171f7 Binary files /dev/null and b/etc/lwjgl-2.9.1/jar/lwjgl.jar differ diff --git a/etc/lwjgl-2.9.1/jar/lwjgl_test.jar b/etc/lwjgl-2.9.1/jar/lwjgl_test.jar new file mode 100644 index 0000000..09a58e3 Binary files /dev/null and b/etc/lwjgl-2.9.1/jar/lwjgl_test.jar differ diff --git a/etc/lwjgl-2.9.1/jar/lwjgl_util.jar b/etc/lwjgl-2.9.1/jar/lwjgl_util.jar new file mode 100644 index 0000000..6af44ef Binary files /dev/null and b/etc/lwjgl-2.9.1/jar/lwjgl_util.jar differ diff --git a/etc/lwjgl-2.9.1/jar/lwjgl_util_applet.jar b/etc/lwjgl-2.9.1/jar/lwjgl_util_applet.jar new file mode 100644 index 0000000..f8de204 Binary files /dev/null and b/etc/lwjgl-2.9.1/jar/lwjgl_util_applet.jar differ diff --git a/etc/lwjgl-2.9.1/jar/lzma.jar b/etc/lwjgl-2.9.1/jar/lzma.jar new file mode 100644 index 0000000..d383dc0 Binary files /dev/null and b/etc/lwjgl-2.9.1/jar/lzma.jar differ diff --git a/etc/lwjgl-2.9.1/native/linux/libjinput-linux.so b/etc/lwjgl-2.9.1/native/linux/libjinput-linux.so new file mode 100644 index 0000000..3cdc439 Binary files /dev/null and b/etc/lwjgl-2.9.1/native/linux/libjinput-linux.so differ diff --git a/etc/lwjgl-2.9.1/native/linux/libjinput-linux64.so b/etc/lwjgl-2.9.1/native/linux/libjinput-linux64.so new file mode 100644 index 0000000..de1ee5f Binary files /dev/null and b/etc/lwjgl-2.9.1/native/linux/libjinput-linux64.so differ diff --git a/etc/lwjgl-2.9.1/native/linux/liblwjgl.so b/etc/lwjgl-2.9.1/native/linux/liblwjgl.so new file mode 100644 index 0000000..182c591 Binary files /dev/null and b/etc/lwjgl-2.9.1/native/linux/liblwjgl.so differ diff --git a/etc/lwjgl-2.9.1/native/linux/liblwjgl64.so b/etc/lwjgl-2.9.1/native/linux/liblwjgl64.so new file mode 100644 index 0000000..16b5b50 Binary files /dev/null and b/etc/lwjgl-2.9.1/native/linux/liblwjgl64.so differ diff --git a/etc/lwjgl-2.9.1/native/linux/libopenal.so b/etc/lwjgl-2.9.1/native/linux/libopenal.so new file mode 100644 index 0000000..0a3a619 Binary files /dev/null and b/etc/lwjgl-2.9.1/native/linux/libopenal.so differ diff --git a/etc/lwjgl-2.9.1/native/linux/libopenal64.so b/etc/lwjgl-2.9.1/native/linux/libopenal64.so new file mode 100644 index 0000000..e0693c0 Binary files /dev/null and b/etc/lwjgl-2.9.1/native/linux/libopenal64.so differ diff --git a/etc/lwjgl-2.9.1/native/macosx/libjinput-osx.jnilib b/etc/lwjgl-2.9.1/native/macosx/libjinput-osx.jnilib new file mode 100644 index 0000000..59a3eab Binary files /dev/null and b/etc/lwjgl-2.9.1/native/macosx/libjinput-osx.jnilib differ diff --git a/etc/lwjgl-2.9.1/native/macosx/liblwjgl.jnilib b/etc/lwjgl-2.9.1/native/macosx/liblwjgl.jnilib new file mode 100644 index 0000000..3bf68eb Binary files /dev/null and b/etc/lwjgl-2.9.1/native/macosx/liblwjgl.jnilib differ diff --git a/etc/lwjgl-2.9.1/native/macosx/openal.dylib b/etc/lwjgl-2.9.1/native/macosx/openal.dylib new file mode 100644 index 0000000..3c6d0f7 Binary files /dev/null and b/etc/lwjgl-2.9.1/native/macosx/openal.dylib differ diff --git a/etc/lwjgl-2.9.1/native/solaris/liblwjgl.so b/etc/lwjgl-2.9.1/native/solaris/liblwjgl.so new file mode 100644 index 0000000..102e97f Binary files /dev/null and b/etc/lwjgl-2.9.1/native/solaris/liblwjgl.so differ diff --git a/etc/lwjgl-2.9.1/native/solaris/liblwjgl64.so b/etc/lwjgl-2.9.1/native/solaris/liblwjgl64.so new file mode 100644 index 0000000..0645f99 Binary files /dev/null and b/etc/lwjgl-2.9.1/native/solaris/liblwjgl64.so differ diff --git a/etc/lwjgl-2.9.1/native/solaris/libopenal.so b/etc/lwjgl-2.9.1/native/solaris/libopenal.so new file mode 100644 index 0000000..be5dbce Binary files /dev/null and b/etc/lwjgl-2.9.1/native/solaris/libopenal.so differ diff --git a/etc/lwjgl-2.9.1/native/solaris/libopenal64.so b/etc/lwjgl-2.9.1/native/solaris/libopenal64.so new file mode 100644 index 0000000..3ef75b5 Binary files /dev/null and b/etc/lwjgl-2.9.1/native/solaris/libopenal64.so differ diff --git a/etc/lwjgl-2.9.1/native/windows/OpenAL32.dll b/etc/lwjgl-2.9.1/native/windows/OpenAL32.dll new file mode 100644 index 0000000..1f69e94 Binary files /dev/null and b/etc/lwjgl-2.9.1/native/windows/OpenAL32.dll differ diff --git a/etc/lwjgl-2.9.1/native/windows/OpenAL64.dll b/etc/lwjgl-2.9.1/native/windows/OpenAL64.dll new file mode 100644 index 0000000..6f2a2fe Binary files /dev/null and b/etc/lwjgl-2.9.1/native/windows/OpenAL64.dll differ diff --git a/etc/lwjgl-2.9.1/native/windows/jinput-dx8.dll b/etc/lwjgl-2.9.1/native/windows/jinput-dx8.dll new file mode 100644 index 0000000..6d27ad5 Binary files /dev/null and b/etc/lwjgl-2.9.1/native/windows/jinput-dx8.dll differ diff --git a/etc/lwjgl-2.9.1/native/windows/jinput-dx8_64.dll b/etc/lwjgl-2.9.1/native/windows/jinput-dx8_64.dll new file mode 100644 index 0000000..6730589 Binary files /dev/null and b/etc/lwjgl-2.9.1/native/windows/jinput-dx8_64.dll differ diff --git a/etc/lwjgl-2.9.1/native/windows/jinput-raw.dll b/etc/lwjgl-2.9.1/native/windows/jinput-raw.dll new file mode 100644 index 0000000..ce1d162 Binary files /dev/null and b/etc/lwjgl-2.9.1/native/windows/jinput-raw.dll differ diff --git a/etc/lwjgl-2.9.1/native/windows/jinput-raw_64.dll b/etc/lwjgl-2.9.1/native/windows/jinput-raw_64.dll new file mode 100644 index 0000000..3d2b3ad Binary files /dev/null and b/etc/lwjgl-2.9.1/native/windows/jinput-raw_64.dll differ diff --git a/etc/lwjgl-2.9.1/native/windows/lwjgl.dll b/etc/lwjgl-2.9.1/native/windows/lwjgl.dll new file mode 100644 index 0000000..bba9b3d Binary files /dev/null and b/etc/lwjgl-2.9.1/native/windows/lwjgl.dll differ diff --git a/etc/lwjgl-2.9.1/native/windows/lwjgl64.dll b/etc/lwjgl-2.9.1/native/windows/lwjgl64.dll new file mode 100644 index 0000000..1267747 Binary files /dev/null and b/etc/lwjgl-2.9.1/native/windows/lwjgl64.dll differ diff --git a/etc/lwjgl-2.9.1/platform_build/JLzma.jar b/etc/lwjgl-2.9.1/platform_build/JLzma.jar new file mode 100644 index 0000000..c12c85b Binary files /dev/null and b/etc/lwjgl-2.9.1/platform_build/JLzma.jar differ diff --git a/etc/lwjgl-2.9.1/platform_build/Pack200Task.jar b/etc/lwjgl-2.9.1/platform_build/Pack200Task.jar new file mode 100644 index 0000000..80422e4 Binary files /dev/null and b/etc/lwjgl-2.9.1/platform_build/Pack200Task.jar differ diff --git a/etc/lwjgl-2.9.1/platform_build/bsd_ant/build.xml b/etc/lwjgl-2.9.1/platform_build/bsd_ant/build.xml new file mode 100644 index 0000000..eb53f8e --- /dev/null +++ b/etc/lwjgl-2.9.1/platform_build/bsd_ant/build.xml @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/etc/lwjgl-2.9.1/platform_build/build-applet.xml b/etc/lwjgl-2.9.1/platform_build/build-applet.xml new file mode 100644 index 0000000..a4cef1e --- /dev/null +++ b/etc/lwjgl-2.9.1/platform_build/build-applet.xml @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/platform_build/build-definitions.xml b/etc/lwjgl-2.9.1/platform_build/build-definitions.xml new file mode 100644 index 0000000..718aa96 --- /dev/null +++ b/etc/lwjgl-2.9.1/platform_build/build-definitions.xml @@ -0,0 +1,203 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/etc/lwjgl-2.9.1/platform_build/build-generator.xml b/etc/lwjgl-2.9.1/platform_build/build-generator.xml new file mode 100644 index 0000000..e288ad3 --- /dev/null +++ b/etc/lwjgl-2.9.1/platform_build/build-generator.xml @@ -0,0 +1,340 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/etc/lwjgl-2.9.1/platform_build/build-maven.xml b/etc/lwjgl-2.9.1/platform_build/build-maven.xml new file mode 100644 index 0000000..c3f869b --- /dev/null +++ b/etc/lwjgl-2.9.1/platform_build/build-maven.xml @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Lightweight Java Game Toolkit]]> + Copyright © 2002-2010 lwjgl.org. All Rights Reserved.]]> + + + + + + + + Lightweight Java Game Toolkit]]> + Copyright © 2002-2010 lwjgl.org. All Rights Reserved.]]> + + + + + + + + Lightweight Java Game Toolkit]]> + Copyright © 2002-2010 lwjgl.org. All Rights Reserved.]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/platform_build/build-webstart.xml b/etc/lwjgl-2.9.1/platform_build/build-webstart.xml new file mode 100644 index 0000000..cbc1f50 --- /dev/null +++ b/etc/lwjgl-2.9.1/platform_build/build-webstart.xml @@ -0,0 +1,181 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/platform_build/linux_ant/build.xml b/etc/lwjgl-2.9.1/platform_build/linux_ant/build.xml new file mode 100644 index 0000000..da13433 --- /dev/null +++ b/etc/lwjgl-2.9.1/platform_build/linux_ant/build.xml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/etc/lwjgl-2.9.1/platform_build/linux_ant/build_es.xml b/etc/lwjgl-2.9.1/platform_build/linux_ant/build_es.xml new file mode 100644 index 0000000..a62cb13 --- /dev/null +++ b/etc/lwjgl-2.9.1/platform_build/linux_ant/build_es.xml @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/etc/lwjgl-2.9.1/platform_build/macosx_ant/build-symbol-list b/etc/lwjgl-2.9.1/platform_build/macosx_ant/build-symbol-list new file mode 100644 index 0000000..410c262 --- /dev/null +++ b/etc/lwjgl-2.9.1/platform_build/macosx_ant/build-symbol-list @@ -0,0 +1,4 @@ +#!/bin/sh + +nm -g "$1"/*.o | grep "Java_" | cut -d ' ' -f3 | cut -c 1- +nm -g "$1"/*.o | grep "JNI_" | cut -d ' ' -f3 | cut -c 1- diff --git a/etc/lwjgl-2.9.1/platform_build/macosx_ant/build.xml b/etc/lwjgl-2.9.1/platform_build/macosx_ant/build.xml new file mode 100644 index 0000000..d5b5deb --- /dev/null +++ b/etc/lwjgl-2.9.1/platform_build/macosx_ant/build.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/platform_build/mingw_ant/build.xml b/etc/lwjgl-2.9.1/platform_build/mingw_ant/build.xml new file mode 100644 index 0000000..ed8db17 --- /dev/null +++ b/etc/lwjgl-2.9.1/platform_build/mingw_ant/build.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + EXPORTS + JAWT_GetAWT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/etc/lwjgl-2.9.1/platform_build/windows_ant/build.xml b/etc/lwjgl-2.9.1/platform_build/windows_ant/build.xml new file mode 100644 index 0000000..907ed19 --- /dev/null +++ b/etc/lwjgl-2.9.1/platform_build/windows_ant/build.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/etc/lwjgl-2.9.1/platform_build/windows_ant/build_es.xml b/etc/lwjgl-2.9.1/platform_build/windows_ant/build_es.xml new file mode 100644 index 0000000..67c2b98 --- /dev/null +++ b/etc/lwjgl-2.9.1/platform_build/windows_ant/build_es.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/etc/lwjgl-2.9.1/res/Footsteps.wav b/etc/lwjgl-2.9.1/res/Footsteps.wav new file mode 100644 index 0000000..074c936 Binary files /dev/null and b/etc/lwjgl-2.9.1/res/Footsteps.wav differ diff --git a/etc/lwjgl-2.9.1/res/appletlogo.gif b/etc/lwjgl-2.9.1/res/appletlogo.gif new file mode 100644 index 0000000..283e15e Binary files /dev/null and b/etc/lwjgl-2.9.1/res/appletlogo.gif differ diff --git a/etc/lwjgl-2.9.1/res/appletprogress.gif b/etc/lwjgl-2.9.1/res/appletprogress.gif new file mode 100644 index 0000000..3ed42c6 Binary files /dev/null and b/etc/lwjgl-2.9.1/res/appletprogress.gif differ diff --git a/etc/lwjgl-2.9.1/res/ball.png b/etc/lwjgl-2.9.1/res/ball.png new file mode 100644 index 0000000..53aa857 Binary files /dev/null and b/etc/lwjgl-2.9.1/res/ball.png differ diff --git a/etc/lwjgl-2.9.1/res/ball_sm.png b/etc/lwjgl-2.9.1/res/ball_sm.png new file mode 100644 index 0000000..0c9db45 Binary files /dev/null and b/etc/lwjgl-2.9.1/res/ball_sm.png differ diff --git a/etc/lwjgl-2.9.1/res/center.wav b/etc/lwjgl-2.9.1/res/center.wav new file mode 100644 index 0000000..29e6dde Binary files /dev/null and b/etc/lwjgl-2.9.1/res/center.wav differ diff --git a/etc/lwjgl-2.9.1/res/ding.wav b/etc/lwjgl-2.9.1/res/ding.wav new file mode 100644 index 0000000..fdb625a Binary files /dev/null and b/etc/lwjgl-2.9.1/res/ding.wav differ diff --git a/etc/lwjgl-2.9.1/res/left.wav b/etc/lwjgl-2.9.1/res/left.wav new file mode 100644 index 0000000..87635a5 Binary files /dev/null and b/etc/lwjgl-2.9.1/res/left.wav differ diff --git a/etc/lwjgl-2.9.1/res/logo/lwjgl_logo-with_jacket.ai b/etc/lwjgl-2.9.1/res/logo/lwjgl_logo-with_jacket.ai new file mode 100644 index 0000000..b41ed08 --- /dev/null +++ b/etc/lwjgl-2.9.1/res/logo/lwjgl_logo-with_jacket.ai @@ -0,0 +1,1086 @@ +%PDF-1.4 % +1 0 obj<> endobj 2 0 obj<> endobj 5 0 obj<>/ArtBox[40.3667 286.146 522.334 477.897]/MediaBox[0.0 0.0 612.0 792.0]/Thumb 231 0 R/TrimBox[0.0 0.0 612.0 792.0]/Resources<>/ProcSet[/PDF/Text]/Properties<>/MC1<>/MC2<>/MC3<>>>/ExtGState<>>>/Type/Page/LastModified(D:20050904082821-06'00')>> endobj 214 0 obj<> endobj 215 0 obj<> endobj 216 0 obj<>stream +%!PS-Adobe-3.0 +%%Creator: Adobe Illustrator(R) 12.0 +%%AI8_CreatorVersion: 12.0.0 +%%For: (Glen Moyes) (Glen Moyes Studios) +%%Title: (lwjgl_logo.ai) +%%CreationDate: 9/4/2005 8:28 AM +%%BoundingBox: 31 281 575 478 +%%HiResBoundingBox: 31.6665 281.667 574.9473 477.897 +%%DocumentProcessColors: Cyan Magenta Yellow Black +%AI5_FileFormat 8.0 +%AI12_BuildNumber: 198 +%AI3_ColorUsage: Color +%AI7_ImageSettings: 0 +%%CMYKCustomColor: 1 1 1 1 ([Registration]) +%AI3_TemplateBox: 306.5 395.5 306.5 395.5 +%AI3_TileBox: 1.00781 0.000061 611.9998 792 +%AI3_DocumentPreview: None +%AI5_ArtSize: 612 792 +%AI5_RulerUnits: 2 +%AI9_ColorModel: 2 +%AI5_ArtFlags: 0 0 0 1 0 0 1 0 0 +%AI5_TargetResolution: 800 +%AI5_NumLayers: 4 +%AI9_OpenToView: -176 819 1 988 914 18 1 1 8 81 0 0 1 1 1 0 1 +%AI5_OpenViewLayers: 7777 +%%PageOrigin:1 0 +%AI7_GridSettings: 72 8 72 8 1 0 0.8 0.8 0.8 0.9 0.9 0.9 +%AI9_Flatten: 1 +%AI12_CMSettings: 00.MS +%%EndComments + +endstream endobj 217 0 obj<>stream +%%BoundingBox: 31 281 575 478 +%%HiResBoundingBox: 31.6665 281.667 574.9473 477.897 +%AI7_Thumbnail: 128 48 8 +%%BeginData: 7644 Hex Bytes +%0000330000660000990000CC0033000033330033660033990033CC0033FF +%0066000066330066660066990066CC0066FF009900009933009966009999 +%0099CC0099FF00CC0000CC3300CC6600CC9900CCCC00CCFF00FF3300FF66 +%00FF9900FFCC3300003300333300663300993300CC3300FF333300333333 +%3333663333993333CC3333FF3366003366333366663366993366CC3366FF +%3399003399333399663399993399CC3399FF33CC0033CC3333CC6633CC99 +%33CCCC33CCFF33FF0033FF3333FF6633FF9933FFCC33FFFF660000660033 +%6600666600996600CC6600FF6633006633336633666633996633CC6633FF +%6666006666336666666666996666CC6666FF669900669933669966669999 +%6699CC6699FF66CC0066CC3366CC6666CC9966CCCC66CCFF66FF0066FF33 +%66FF6666FF9966FFCC66FFFF9900009900339900669900999900CC9900FF +%9933009933339933669933999933CC9933FF996600996633996666996699 +%9966CC9966FF9999009999339999669999999999CC9999FF99CC0099CC33 +%99CC6699CC9999CCCC99CCFF99FF0099FF3399FF6699FF9999FFCC99FFFF +%CC0000CC0033CC0066CC0099CC00CCCC00FFCC3300CC3333CC3366CC3399 +%CC33CCCC33FFCC6600CC6633CC6666CC6699CC66CCCC66FFCC9900CC9933 +%CC9966CC9999CC99CCCC99FFCCCC00CCCC33CCCC66CCCC99CCCCCCCCCCFF +%CCFF00CCFF33CCFF66CCFF99CCFFCCCCFFFFFF0033FF0066FF0099FF00CC +%FF3300FF3333FF3366FF3399FF33CCFF33FFFF6600FF6633FF6666FF6699 +%FF66CCFF66FFFF9900FF9933FF9966FF9999FF99CCFF99FFFFCC00FFCC33 +%FFCC66FFCC99FFCCCCFFCCFFFFFF33FFFF66FFFF99FFFFCC110000001100 +%000011111111220000002200000022222222440000004400000044444444 +%550000005500000055555555770000007700000077777777880000008800 +%000088888888AA000000AA000000AAAAAAAABB000000BB000000BBBBBBBB +%DD000000DD000000DDDDDDDDEE000000EE000000EEEEEEEE0000000000FF +%00FF0000FFFFFF0000FF00FFFFFF00FFFFFF +%524C45FD97FFA97E85365A5A8584FD76FF846114140E3614140E3636A9FD +%73FF7E360E140E140E140E140E140E84FD71FFA8AFA9FFA9AFA8AF858514 +%3614361485FD6EFFA8272727522752527D52A8FF840E3614140E85FD6DFF +%5227F8272727F8FD0427FFFF5A0E36143614FD6CFFA852F827F827F827F8 +%27F852A8FFA8140E360E145AFD10FFAF7DA87DA8FFFF7DA87DA8FD0CFF7D +%A87DA8A8FD06FFA87DA87DA8A8FD05FFA87D527D7DA8FD06FF7DA87DA8FD +%1DFF7EFF2727202727272027272752FFFFFF843614361436A9FD0FFF5227 +%20277DFFFF52272727FD0BFF7DFD0427FD07FF5227212752FD04FFA85227 +%F8272127F87DFD04FF5227F82752FD1CFF5A847D27F827F827F827F827F8 +%7DFD04FF143614360E85FD0EFFA827F82727FFFFFF2727F852FD0BFF52F8 +%27F87DFD06FFA827F827F87DFFFFFF7DF827F8272727F827F87DFFFFA827 +%F827F8A8FD1BFFA814A97DF8272727F8272727F827A8FD04FF5A14361414 +%36FD0EFFA8F827277DFFFFFF27F82752FD0AFFA82727F827A9FD06FFA820 +%27F827A8FFFFA82027F8277DFF52FD0427FFFFA8F8272027A8FD1BFF5A0E +%FF2727F827F827F827F82727FD05FF36140E360E14A8FD0DFF5227F8277D +%FFFFFF2727F852FD0AFF5227F82752FD07FF5227F82727FFFFA8F827F827 +%7DFFFF7DF827F828A8FF5227F82752FD1BFFA90E61A92720272727202727 +%27207DFD04FFA9361436143614A9FD0DFF27202727FFFFFFA827202753FD +%09FFA827272720FD08FF522127F87DFFFF5227272752FFFFFF5227272752 +%FFFF52F827217DFD1BFF36145AA8F827F827F827F827F8277DFD04FF850E +%360E3614145AFD0CFFA8F827F852FFFFFFA8F827F87DFD09FF7DF827F852 +%FD07FFA8F827F827A8FFA827F827F8A8FFFFFF27F827F87DFFA8F827F827 +%A8FD1AFF841414A952272727F8272727F82727A9FD04FF5A361436143614 +%85FD0CFF522727277DFFFFFFA82727277DFD09FF2727F8277EFD07FF7D27 +%F82752FFFF7D2027F852FFFFFFA82027F827A8FF59FD0427FD16FF7D7DA8 +%FFFFA95A5AA97DF827F827F827F827F852FD04FFA9360E360E140E145AFD +%0BFFA827F82727FD04FFA8F827F87DFD08FF7D27F82727FD08FF52F827F8 +%7DFFFFF827F8277DFFFFFF5927272752FFFF52F827F87DFD15FF7E272027 +%527D7EFFFFFFA87D522720272727202752FD04FFAF1436143614361461FD +%0BFFA820272752FD04FF7D2727277DFD08FF52272720A8FD08FF2127F827 +%A8FF7DFD0427FD0AFFA8F8272727A8FD15FF7DF827F827F827277DFD04FF +%A8A852522727F8A8FD04FF7E140E3614360E145AFD0BFF5227F8277DFD04 +%FF7DF827F87DFD07FFA8F827F827A8FD07FF5927F82727FFFF52F827F852 +%FD0AFF7D27F82727FD16FFFD0427F8272727F8FFFFFF7DA8FD04FFA8A8FD +%05FF611436143614361461FD0BFF522727F8FD05FF7D27F827A8FFFD04A8 +%FFFF5227F82753FD08FF52F827207DFFFF2727F8277DFD0AFF522027F87D +%FD15FFA827F827F827F827F827A8FF2727F827527DA8FD06FFAF0D140E14 +%0E360E145AFD0AFFA8F827F852FD05FF7DF827F8A8FF28F827F8A8A827F8 +%27F8A8FD08FFF827F8277DFF7D27F827F8FFFFFFFD05A8FFFFA8F827F827 +%7DFD15FFA8202727272027272752FFA827202727272027277D7DFFFFFFA9 +%A98585363614140E85FD0AFF7D2727277DFD05FF7D272027AF7D20272727 +%A8A827272053FD08FF7D27202727FFFF7D2127F852FFFF52272127F827A8 +%FF7DFD0427FD16FF5227F827F827F827F87DFFA8F827F827F827F827F827 +%52FD07FFA8A95A367EFD0AFF52F827F8A8FD05FF7DF82727A82727F827F8 +%A82727F8277DFF7D7D7D7EA8FFFF52F827F87DFFFF2727F82752FFA827F8 +%27F82727FFFF52F827F852FD16FF522727F8272727F827A8FF52272727F8 +%272727F8272752FFFFFF7D527DA8FD0FFF2727F852FD06FF52FD0727F827 +%5227F82727FFA8272027F8FFFFFF272721277DFFFF27F82720A8FFFFA853 +%F827207DFFFF2727F8277DFD15FFA9F827F827F827F827F8FFFF52F827F8 +%27F827F827F82752FFFF7DF827F82727527DA8FD0AFF5327F82752FD06FF +%52F827F827F827F827F827F827F87DFF7DF827F852FFFF7D27F82727FFFF +%A8F827F827A8FFFFFF2727F8277DFF7D27F827F8A8FD15FFA82727272027 +%27272052FFFFFD0427202727272027277DFFFF5227202727272027275252 +%A8FD07FF52272720A8FD06FF5227272720272727202727272027FFFF5227 +%27277DFFFF7DF827217DFFFFA827F82727FFFFFFA827F82727FFFF7D2127 +%F852FD17FF5227F827F827F82752FF7D27F827F827F827F827F827A8FFA8 +%27F827F827F827F827F827F8A8FD05FFA8F827F827FD07FF52F827F827F8 +%7D5227F827F82752FFA827F827F8A8FFFF2727F8277DFFFFA8F827F827FF +%FFFF7DF827F87DFFFF2727F82752FD18FFA87D2727F82727A8FF7D2727F8 +%272727F8FD0427FFFFA8F8272727F8272727F827272752FD05FF7D27F827 +%7DFD07FF2727F8272752FF7D2727F82727A8FFA82027F827FFFF7DFD0427 +%FFFFFF7E27202727FFFFA8202721277DFF7D27F82720A8FD1BFF5227F827 +%A8FF2727F827F827F827F827F852FFFF5327F827F827F827F827F827F87D +%FD05FF52F827F8FD047DA87DA8A827F827F827A8FF5227F827F852FFFFA8 +%27F827F87D7D27F827F87DFFFFFFA8F827F827527D2727F82727FFFF59F8 +%27F8277D7E7D7E7D7D7DA8FD15FFA87D7DFFA82727272027272720272727 +%7DFFFF52202727272027272720272727A8FD05FF27272027272720272727 +%7DFF2727202753FFFF7D27272027A8FFFFFF5227F8272127F8272152FD05 +%FF7D21272127212721272153FFFF272720272727F8272127F8277DFD1AFF +%2727F827F827F827F827F8A8FFFF2727F827F827F827F827F82727FD05FF +%7D27F827F827F827F827F8FFA827F82727FFFFFF5227F82727FD05FF5227 +%F827F827277DFD06FFA852F827F827F827F8277DFF7D27F827F827F827F8 +%27F827F8FD1BFFA8FD0427F8272727F827FFFF7E272727F8272727F82727 +%27F87DFD06FFFD09A8A9FFFFA8A8A8FD05FFA8A8A8FD07FFA8A87DA8A8FD +%0AFFA87DA8A8A9A8A8A8FFFFFF84FD0BA8FD1DFF7D52F827F827F82727FF +%FF7DF827F827F827F827F827F8277DFD61FF6184FD06FFA852272727207D +%FFFF52272727202727272027272720A8FD06FFA8FD0FFFA8FFFFFFA8FD21 +%FFAFFD24FF5A145AAFFD06FFA87D2127A8FFA827F827F827F827F827F827 +%F827A8FFFFFFA87DFFA87DFFFFFF52FFA9FD08FF7DFFFFA852FFFFA8FFFF +%7DA9FD09FF7D7D7DFD0BFF7DFF7E7D52FD23FFAF14141485FD08FFA8FFFF +%FF2727F8272727F8272727F82752FD04FFA852FF7DFF7D847D527D5252A8 +%7DA87D7D7EFF7D847DA827A87D4BFFFF52A87DA87DA87DA87DFFA8527DA8 +%A8FD057DA8AF7DFF8452FFA87D527D7D7DA97DA87D7D7DA884FD19FF5A0E +%140D367EFD09FFA827F827F827F827F827F827F87DFD04FF527DA8525252 +%277D522727A8FD0427F87D5227FD0752FF7DFD055227525252FF527D7D52 +%7D27272752287D2727A87D7DFF52525227277DFD04527D5227A8FD19FF85 +%141436141436A9FD08FFA85220272727202727272027A8FD04FF52527D7D +%7D277D7D7E527DA852527D7D52A87D5252597D7D7D53A8A8537D5252FF27 +%A87D527DFF7E5252845252527E7D7D84527DFF527D527D7D7D527EA85252 +%7D7DFF2784FD1BFF5A140E3614140E5AA8FD08FFA82827F827F827F82727 +%FD05FFA8A8A8FF5252A8FFFFFFA8FD05FFA8FFA87D27A8AFFFFFFFA8FFA8 +%FFA8FD05FFA8FFFFFFA8FFFFFFA8FFA8FFA8FFA8FFFFFFA8FFFFFFA8FFFF +%FFA8FFA8FF7D7DFD1DFF3614143614360E365AFD09FF84592727F8272752 +%FD18FFA8FD2EFFA8FD1FFF36140E360E360E141484A8FD08FFA85227F827 +%7DFD68FF5A361436143614360E3784FD09FFA87D7DFD6AFF845A14140E14 +%14365AA9FD79FFA9AFA8AFFDFCFFFDFCFFFDF0FFFF +%%EndData + +endstream endobj 218 0 obj<>stream +%AI12_CompressedDataxks% #?~;v.<  m9lywbCAuSRвopH{lO$|7__~/vwo~u@ϯ>{_N˻wooo~E㿞W7/wĖ_}u mËq@'A}_iJW[~y|qiNq.wVms /3451:Nn_yۻחnn` [_^]޼Gwo/>׿_7^?7Wgo. +as:o>\} j!xw0NϯM~ZݯwoA_J_^^ ha:5wm +cfpfX2 ;wXk-sҸo/\d+}[%*O׷o.F_?ڿˋo/^}xO^&K$(/˛/oAqT\!or6'= ?oo~dhWxM[Cu}XW%V%ݯş{|͛5m5XA Eǫ˃_}{w%p Swy{7_3 ߽׿zswo.?{w7o^ͫoo޿}#߽WRS@߿ysW._Won{߼;x׀_pwwyG_}}w˛/`[\^iWoQ{ۛ7ٿ}}qusw?~ͫ;ڛ7/^H&?ݾH{{{ww?W{֟z{}Ͼxpq_!w#xԭfxutj'CxuJ_uJ_^N>V+>|nmN7B //|c¾w~|Ż+?_C?طww@-o޽_|.o_/ B׊K%~پ ]]rmq/: ľo_oΏŗ ?};_9y}Z?^ZZ}Kx}݇/#9G6 i}&LFƣ +[ =|۫7ܾ| ~{;]\0x_|/jax_|._ o_>tw ûJs_Kǿwp>; Aۋ|1>zO72ރ +~-Ϻ7 wkKӛ.nlpIsw? +9?^}{uIwp#vFCV܊`ۄ|猟}v?towx޼4~ +W!?8~C߿|qvvvzvr;;>;:gl>g,3Φӳӓi=-i>M4Sw:NON r'I>I'$w2vnw;]ͻK ;sxw|||t\|q<Fqtvtztr;:>::Gh>G(#䎦zVOIzYkN嬜+娀EK. +ed\MAg7O,擼(\zz9d]1tN.TS=?b +'xOIxk,q9c>8pN.P1!bI?'~g|{ܩ;q;w\u. ;`, 2O = 6AC}u|G1?Gt Vm?`㓶{呖7mhg#~\\\\\\ +Z Z\\\\\/`qpyppxppp`hppppx`ip,dEeą%EeŅť%EeLԸظܸHHH&eUŶ m~,7 m/l,r,l:3hhD[I7Di[jxCXbNɤaؑ=iZ>F?szVO]>cY=ɫ'|GdǯQ<{`*#O̞SyNsL=Uv0L4TthӎsTh;ggsdOY?cbN%Ҳ~{w-[޹wal{Xg)gEh<6Gڹe'<:PmClC DHZrHq!ψU8I1ݹx >i؄@ 4SzaQN΀8%x د +ӟfbvz|jXÜa`w@3 4jL`_E a 'G4zLxF#ahE%peg`EȕKȽ!C# + N䦸Ր"#M 8y㜉~QdInJxlE__$, +e4PB8& 7$s ? kˑ $0 +Q:D).4J UQċŗI#MQFEYncuM D.0 DŽG"4`(fۑapK ?c `E0!D%t4wO4f3yўhrDQG3pC U`gpL; K IH:d3 R&$2}k%Ɨ^bǵ`Z X&^x^bÆ_@n]+|$7|.r%k1]r%n\RFފƣZzS|Ʉuɣĩ<{Gg- +]?[4G,)|^MڤJ0VU>B19!;)Ct4M0VNfcl{k#<ѐ,sXdϣ~{X[jUa +[Vض kfia[ [[f=.݅-/l{a-0l "p:ĈoȰMF2GbaL%)VXm4AXX2щv&SٰՆ6laM]HֽL]i"MQ+i!fI`=xaQ@nUZv,7jc`+ĆgC=҉x*ZY͚>hhHqqeQ[Nvvlzh,&O,2A䥕 S->{[]2|9 ѹ==6yʞSy{z4ckMg$}~3DSu0"ʜ hdv? `T"5zl7,g *p )Յ|0? q1mG8SB?|v_oؠ)`Td|?~{wooGWp{O*' ' zJ'zqO%Jd!`3kHcv {[z|vCg`ZXe{{c}ճ9qs(̦8 >$Bq{={rSÏW=ZlZ@}*`W=Zv{8k/P1z~"c7i'}pF4 | {=bOώ,Lu|e15{Ƕ?xzw=>cXvx/GA_^}t/>E^/_|5ҽ^k{|)HzSXzRH_E\Ke~q-^ĵT>Je }Lzh:k*8x,ˑaoг7?\={~:l¢{?)"h^>]}=ޫgĞ=k'(Ӟimv?,mP~,*Dp{"Kb =%\e1 +i{Kb =%\{¼쓛f*AP +9@.Swwo;9Y۔{IOS%w\" DZt_3ɧDM"M⢧qOrlEUsЪ{V=#j!q_Oy|$B<~~)4?NjWjș &v87O܌0!8A87Ii8'VJg{4+#ѓx표ԩG:i\X#{L.0iS< .iBSt&7qhؑ=Ub2Ƥ;lS5*xnOY'yrZ?Gn|G^?y32j#{g><6pC8 |l2)ϤtP` E`\dy׺RFZo%$ʮ=4??:/_XE9k&z~G_f/sғd-~du4k4)NFg]vJnƒ<<cv,# ̠> +a-0)-!t-t +, > K_ܦJvɟIϹKl\}u ˄OI tORli$OI[vTO[nIF+s cuZ9? ͇{avQ i*!4Zvĺjޮ"u_# I|sВ=_?_?_zDG8>ǟ%'dv>/||>_BGD?yg9\'X>?e?}!Os@O |ytvCE'|ΰxΰh2s>aOlIy-%" ϩ3ϩ3ϩ3ϩ393dr{d̲$݃4˶i8Sq95˶kֱnP迏x>;ώox6|L? }N眞9W=)c~%gyO(:*sՊbqOŢtza + cdsvj1'p +;?J]A].Mggl|hE glfז}ҿQWuZ%VQxF tNUU r@B@DMnx(:ijuF+ZŬ< Qx0<6Sa>x,?x:ǢHN8ֵ3 aPP,MU=%wf}AAPqY:tY>wv5+j+lE `z%[RSP|>?|>?_Lx T#R#ᶚTf +$jQ`jTj]vj}kcxGXtcؖBeZ~ 囇7.[8/Rνnt^Gy" *||#DuU}R] #CryvhQg&{+ +ʭJM +/]q-FJp h4AhI~%5ZjԤ(QՆ#A+50Y +##*3/̻11=.vdru d +nYÚhBd^-2e?5!Y˜)[/#A731>Pǻ tu^1]*adaTzxm4|AESDQE't15"f6r!_{HF n$} <'}ߣ3ޟgx_0zr 2,oc7tw.a >YޞձVQq fv:tv?kMJOMK"4>&B4wGw]Hd=^Jr6ٙWy ,}F7庱՟AȧC_z>PJix(xeM8B"̏ +sŃ.Q3ECm1 ur~QaY8lز Ցyjɬ,,,r!N+iQᴊnU<FE +ڐ џ O'ɓ) 1I]>N5?&WOHU^ɝ^l-yMOe2ХQƁE0˅U#yǘnb~m+5KnJ/_+o?"19v;!'F-$ ~jN-5d [jJ$9߫9-[ kA?Kب6*ӜA +MgAofwq8m=1Y# >xWNS=:~s[=ǫHQg>Jn_$C8~rI5zFEZ=b?WBz}lGWzrKO_)z)ős?(OcƜJyQ1ޒCxղ'u]P9+LF,RcO)DcJ?"PL (AA!&J?SvLIGgJǤ||G X`QdkM&I;>#y*=dZ|Ljq'ʣrG%{Qy@NcC8jz@?iV_?У<ÍY|A==z<9zߞzS~=oQ "Y˅{uGhϓxhrh($4Fr_(yJX(Y<ťPr"E(!qD2PDZHKiaV.$Z$? =L<&dzrl2df{-g( gMC9NEhjR5 lG"QQ3SVh^d3>5Y\*Yrn0sH6I,+קsBT;ʧ:ΩCb`$y vP;34{ZQe(yL9}"OPF;yB~t}|=Jj6`[ y^=ycYyVϚh'rFz|>Y>Z3Q(ɨ~U5VYk8̹[:ɜXAVAGݩ3CXg }E"|[_ q7یCoK ؟Wx@={c?]lZYzSTqcҌ]bd@8!VXe-n̴`khMJ=`k-6+T?9rS W'.VKs籼ԣzf|zLp6&ma +%x,{=GqF-EFM-Cc,KwuǏtwo_㫋DsyΐqXsILc}rwijc}r]: ؐcono~{ۛo?'//_{[˻w{ؘO*PGONo^"~o}]G?ZGjr.}N֟5p8vL>?q|L1$v_5O@7.WoN_ESH (#ƼFL}t#!`GZFLi9ⶊ:~).CHn4Ұ"cv:|$kL[LCʹA|k5 j$CF~q5FQmތZ_Y- k +  [mA7 +rЍۗum2;B(q7Z6$QidsAYr iDo#jWnDBum6ͨuDdTWhXj\  n{NH|V4 #Fӷ5o1qS9^Hu|.o?|su-vH@ouG5YIگs_H w=Egm$H Utj<ck,|8U v\r**t0 s1V= 2^~9O @R>>2;2b/6CwSR]Oe &S/ vYf䧴bCy& [ݔ% + &_~b Ja0N1@f96 V+:.~vBfm>&@deX=tjZJ@ ;:1fa|J0Y7@sNʸ`1ϋPK)l?Tb:)o?w 0]Lmg' +|jL 3 &4Ӷux,-d@d)m>TaueGTBEw=ԫdDsR&"d|{f 6qyL(肷787 +|rP /Fn?4d@"4j4cX &`Ů0lz +4f/uy](@VY|T*Gj~ѻeRas·*У& ng(S@`9Mx?TK+$"qh iB7{ 8fCC_+0T|ؖO +̘A3x?=eG +  w9KtCπ9f<!d&X8s9Ue|?no.|}{5 +E9xiv +D[&.>yNŤIwpH{HkQ/=f.~ãT=y+Ho@ُzӕl@2ŷAYp^i5O0|]/ A-P62۠&=Gȃ P%Z- }:~PkhŻ%+pA҆}$~'lh9P-}6yHN_U Z;օ|d#w5gd~R3Q}-}*4Ֆ!go].U-&w`[A +7Cҳh{a͠6fPfP[Ϣ$no*6GͷW8/)o9D;ru 9i#sw:edzӽPх9p+zJpcrЎCC#Vz_#7o׻ˋ/^1G`D`+GGA"_j-o_zk-`Am46DFn/#CSaX)g6w0J넖B @߭+Ma{/^)Cۀ8Qh8$dDa3=TK+ Ԉ@GFwic\ai?2HS:E plvovІYf2qeV@|d< !{Q7uvEI`za aרM_ He ˸zzlHŪG}3B} : ~=l1cM=lH՜~Y~2mj}7?]\}C'>.&'Rgl 1;;Ӂ|s/AǤ~q\`H!f?:h* .Ϸ@E-hY:WhȠ]c&l$a>3暛ׯ?\6^ +=ӄ!N`0ĚuHcht +7 L32TFU$0%8lxߟт/H v'಼lPd# Xw1J Wj`N&F^_` 18Lq SZ+?(0 biK0W+Twum]}eâ:H Kمp0g, +KG Ur:xc2` I3*FXs)y:|ӯ]:.+`$:) sB0h\$<,N;H! bրtB)h![cXidR"&GV=\)}S^UEλdZJM2rf`<,PBW% zT8mNqƈ=48[k3{ucPfIgrYR,2*)C2^ {jSV`D_9sj^݂J"](A1*6L&(y 5l,dFz OP ΘfϨ)Nj_̳m!z*Vp% +ph{ &[!o~I#oesS8E!.HfMzQUɫ{' +icFoKb9^%`L8EkˤB\g6?NJ `Ӥ:mf +lci$@W\9+przU3$>!LhDs}]lG ͂_ϕ"a`[L[ s;l{(A5Mok$碔D*͍oT5s:J0pfʝhlj/z֭[酞,ǧCEe3oe;sP/fU45k0+j*Y'!P8:} '+)=* *hi ;8OI(Qf咔 ŶE{ g?edQx͸"&ꥻ=#{r "DQвj#ת +1τf%VK?ӯp4i9l[a: zp9I;QP:~֘)kՁ"A `mDgZN<9؉Pk0Kidk @4z-hlƑ7n'5K[(P<<Oe[h^Jn؝ $haI{MփPHfIEHAaQ/]!IN瀶Qhf9[UXD,ʣ6 Yz-j" +(hU{pܩp +-Ȝ6t=Uş rLà6Jֹ ɡ\zeÌYζZ8T$jZCj$hQQZsgYaz1qݙ3{ ibV6Hسz%bzoTI7n-6:$CxW0&7x6 k5Ngeu#RD3N.1m`Y:Yނ.&ե1P-١:WQI(#ploA@8Yfn2*Wqm9YNpզ>ZRSu E23@[<]ѷpm"I:WR4I8)sXSQm)~RheRcN̴E@4"rdǔ9*}9flZ@8)b'@:] +F \Y9j8XD[WjF*Ev&?!pʲZ7IFn3ILXs5gנD©"6xFseAzջ̜{hup PÍ)K-&`9Pk_Dxğ~ x'9s\[*j'ofIdN4D Ja)U8%tHa/ V$g=T3fiܦ&m$m[N]<]X\$9JF1N0JMςZ Ϙs@"'3< |Q**+J(&Èyޝ8*{V

r332Zntj.+iQys4JNO\: {0 &5Jc*]Fr5,Lt\~^lJԤo3T8p5QxLYՋ'`\u$[Fx?<)Cd+1Ye ;yr~\yT77f# 7H|$Cڪ@l,2CY@hHj롭Cf5bGbeG~V6gP%O xWYAa (bA<*noI*91 2@ t,}lynoRBrL"˹2e&;rg"U\sө퉫,[oЉ\+'1l-DG !Z`")/F0]gd*G!FUc9nJs%^BHzrD4DžW\mIx>f'A>fp.H޲c#8DS='^+|<]B<7e͕iȦ^:aێ|쩅ҹy苔^P(Y5u)&۶0E7eңSS-JQj:* t)mqiU.`kR8 +쇉XDvtAP0sHU4j$HEߤJr?~}GTvwH+TPX hޜo^P)x;XfD.b(ȸԃp Fi,V-| iE(%/QbKfLm7MҴ(8`hn }PAUR3#qaͲ"aC$R=Cg&"$YdhV# Fi뾡n=8V)nFit+Q%O A]Lh )WynbJkrcΰ0`wMmX8&&"SqXb |T\%RVoqLޱx5M(,f")WmMbh$:dɸajX$1 2|=#RbCdԸ%ӓb+H%zh\XI0)%ߥ9,ތ2gRO`-Wj0Pc%6n+,[g! 5jn^b}C\EB^AXd֗ 'sύ\=[L*'I}7'cJ9BeԒ[$wFY l +2w}>h[ +DK5 !6u쬠D4"Gx\ԨNʘӨHerUA<,*5#p1+>Y!JxKlܢ +D)RE1tEE6Kclm}'eKhcLiXOhc(@MNjX!=[DUW3&ek-A%XliRb ok,Cs(uxvaAskjH2&̤#/qVb oZ YxjcTwYr{`_roQXi#`spG+Kh +'4c{ +lD=3օѢ<;k`r"D)( +2VJ[N]3l !(%{KQ@X`Z] ZIϵ6̍3mCW]);%ni3Ul,zh\;MAxE&-PUVrB;S҃KW^r0iOw=X"f;v$5$#&@3L@,\8gq5[hA:(| +2,keyeMA19N,j"kαXUdNDz O5BcL\L" zJ* +N(ڋ%5j%"IMXJ%augVW*ssD!ZԫX˩l̥|h%r$YH{GgňE&> UM -.S)[<1;2;2xd$(H&6d1в2\FdV)]$b l*5"K9 2w/Vf|@@ktVڑ$e-YS;0T +G.@o󉉆M}hU}V()d3Wy!n\lX$EȵH-ܭ/UŸ?foChFd6QUG? fQ\^c"/YgGI<ٚzeWSw +Ffd`"'հI0 id6S(E/>Lf7F{@qEOvf8DN[H z:oE(L +.UxkgU7unxŇ +JIUeĶj K5FBԃ6$@4 O|kJ!~6 &6b74@o*2%:%ɱQewɫ$$%dI;4l&GgrChSmkZw; R3z5'RadqI{ض@I v߅"rO/M߭>C㢭8euo5m^$׽}Hv BCh-6"ƨmZ @n\jny؇ tj|yٓj 57#fN2n26̃}\i&06*ztV&%Uֻi6Q Xz!/.$ݗ,R[̺H"wxRkAmon͑2k==4mw$E}Z^>7*˭e,t}voY8΍Zc=0[hMbpmX1Gp 7=G |s/q!2ِG?*#rA^pҒȵ򾰑e ח]T*v+مFe] ڳɜ RW|sCd}#`t;N{^+DHٱ~f`mxQ8}ךJtMLh\M?n0 Aod SE#-=kł[N/#lu$0 Qw8}">|m"1O6>Wsf#ԋmvܧqw*Eط8=ZZRo0bf[5/[[,'35QwQ ++usΦ[si j=73Yu#h!G+]Ml"jp6 M6yǍ±܅naU^PTD5otIWL< bx;x<~ r=\eȁj?nѶͪ.N:>G7OZ$N;PF8}X9.jz'5Gkҷ2ŌiⴷXNN>pW,ӹhBrvDZĿs2ЙJRwTGB;Աn"^^JhWd ' \.N*-|i Cdb4^g;"~̏6uT?XGe=[G b,sj=x.*&ƣ'+˲d -i7(q& ~-1$=vm)",=9Z5H8 AݶFt@I95ϐUr+O<"= ,>r,o.r to&SUgņ|3(NKvRԝ@,H=qCr k\.p߼:aԧi+2XOx@Y#NE 5^LM{528Ǜam{l1RYŦB Qw7ͤ四c|sˆqyw +uxh&=F/B%njaBfߵjݏ9YZU= +4nF;r;}!V.fQz&#\+6!sɮB@Tk^5ne=кV\V¾NŠ)ހ!*Yi 9 ېlsVXuʶp)>fQo +p+yi=ivV7UR$Wdu?7hCيRqvp%4m9V|K~EkngTo /"j-"`(s*b2߾ڹGkw"gR‰qC q9Y5_$N&bG2a%hDeZ1d!)%z"30thlW[2g,Ѫwnж}T-һ.ˮq.znԭQVk] Y5VhkɆ">|`/F'Zѩ[!M g8DNb ܕf*"jШZrQalwƜ˭ϫĕ$|i FigSeAYP6I8x/[ pAȡB'*(X$^Qk&A!%[58]6$y"%0K 8[eğB +<`q&-|,A cA^t`VIkq]ězΊmq @~!GňGgCηMynX$-]62V7ܬ|ܿÝ> +C25C޷ƻf6kV9:a*^Ynk:jVHV AxJQʿ<`eT9i]1aW½֊8w'g+̽E 6!P13UoՊ (d9 k|WI=$ӬKc{:\^!|Rm0_ <ڕ]b?<]']ư' +#+\); s)S1aSCX"AuZVEYCF%&[U[n, [2BU2LZ|.vra +BT VEcnv(h <9y|y[ a`Whk }v1$Y, +u6!+= hM +61~Gm3 P'Q;?݉QS%yl\߸inxgIr'Z%(UU&JZjAʥIլ_:Ws6Uf;<{oӋE ^9f&dZo ǐ6cgX +,=aVP>UB EY$L[^F)| |k{5Gw(Tql={=^2xxlyVi[S7cg=[ծFٮ{qB D (PEdԂNd51]*c<V}M/FW7ಞ[ SȇaM=#>~!k˱J.V[0G{z07>_uc3I]-D?^qc1녂FCznϘ/J<,k˨ɸ-LA$y +T$W~0S}"Qxa Yz%c]j݀M 8l{xoa+ʙnNUZ.V],^wVIv303e{۩\6އ%2 +Ґ~FBFڍmi(š]b2LZcfѥNN(]eˏr?QI ý^ڶ )YݓTFkck0=C {E.ثmToNh7t,&YM|豆#6 ?ոOZ- q qaDs8Y;FDhb&Bʆ{LL\ +s">CλMoy:rd.O0ltjkBnrM+z3B zHQvm I1/H+w;vF$? N㌜/a.ud5|x\Hx%)D~Cvk:"o}CT>aqCfs ŀ졢zOrDԕf=FjN=9c8}L +ņ/#%S@/im[+v]k  @ZޮV_Xs=u}Qw5YZ%DlgYDZB@u -wJ^k&;;}~%1 31E-p?exy''a, $6݊[5 ;Eg.&6ZF +fՇԧ%./mf} ٔzn~=ɸ[YC fԑM8.˳!|zX(QpXЄMS|4MLzPN"I @q Z'}DJL-<YQ0SEKχFpf t +rvboTxs&rYx X6)9Xܒ9Ϩ\צvQm;Z#_ɼ.xnulQR\3Ss&PUH_ѓ220  3rJxvj2Vl*6F tLbL}hQ`*^Fd'whX}F] f1^R%&È"QEͼ-Cg$2Čk,4I|tm2 'с +9j`?Oj9]Lڤ5+> ВWBƑǰO?xJ [>g\A"1 $S?96))VR8B69~#(\$Ӕ Ńx[DK6HEj%P,d}/Ylܓ_k>PrWaŢ#{a !RvD 5?@yguRV ZH/"9,Gz-ashh?Hvx'BP~Gb;~Mى^aPv;O0QGܤ5@&$EϣE9h^&Px̌g,ʊI$oH H&mBT>[%7w{|ٽR_ZVZ-pssq}hxdІ65pj%<AJ"tܴ`ްx8Ұ} Nѩ-,3A4¤:RN_Jcu QT$`ALvsgd5BJ +id*&&uB4ƘF,>2l^cT`e`\FzN#q5'V$[buFLh +6;GBc,D0ɏX;ģ fi-}L|[jشhNoنht^_߱:딩>PZ{-8Lvr;|JEΒ~~_B|Cϼ#1I.\%#RcsX'}B|ERլ;ӌL!7q|N_ +ց+[Ң T*rn}kg$6O8](S7~\scBw>9MT`rhq*Nu,~YGr:dis9 AmN>َҹh6{g ޸;G#U^޺L)TAq :^;.#ޞHTkwdr{t 8qL Z9 ъg)6<5Ci +QzS!~D|Œv,)h S0q);qp@ÏD܉9ą/=41d{ ꐳG%c+өޘ`SUV;D<򜗣Q>.`pJ#qATWsc-{F ~\D%'̏ߖa= +ح'4')px VqX f +q{يӛ+0 +/K1wgL19ԜxEuCkkMMl A@W$RNÂBubK\an ]5c ]VlEĺNt\ U&GaretMq ix,EFGwq$4.`&qj{ ΨPPӑ~2OsqbO*p-rFuܩQ5Ey eOCFlP/Euj`=A+h:[3MT +\hLikph+@U:wٴ(WS֑sUD2u X*f H +Hs[=h4Ҫ 'KODO[:].s?bbu@_!wtb}/밗(n#ztJN\\ +cZL`% qXFCfKe%Sۯ٨A f@9h{[ E5 sԡ'g %B~5%cZt.IJjŨǰ"cOЫ?F/8Nu#s):3n 5O~}$12t#B4<-Β5' Z;gӓM +6]Ue3t+կd|[mj8;N#] iA&,~ts9M|qq0DRJ/3z??wǕ%킮e/8Y= tlv=! + 6#II;,12/D1I:k`W xq^.'Ƞk󽰦2[XGx~I|? ,.R<ʉ޾Z}[tꄹkU{qh蜵!+*GkMWyI'T^%[28˒NSdNb1 ģX+5ȕ@pΘӶ[NB8|kl)tҍ#O A'嚭bX5WPqMLg?\G}bl,Э_؎A7NOṫ;I+T$>1u}Cx3W>]ۧ=QTj`Yݽl4*ۈH Zڔ{P\oĭR ẓI2bCLy:Z)wbC4/'Z2lRYf(Tn$04bNzjJ6 zh?Wm{lV)Ϡg?\S-L}IX_tME`tzFaD]}#A^uA⡶Tpieisn hV x?B5S2Y&+>nU1o{b:T{k{oF$mN5E2X3N"!ޢֳ-xP*(zݒ3[$#?YÍCR~kyW Y‹w\2Bz:vSkrVt#TRNpUMoKՀc{ߚ Mё/8=@9tF;$.^38 =莟nsn[ Aq24Uv#p"&h Xψe/I<-6F2VKu<}xXWJX"f,6F1zuiB2`'~AWX|XLF=@I9V"Sp߮+Xv츱ʡ=,ϽGjVUVddHyU-d()n ;e]?jb:y4 rT,:/|;wÖFQ7 d!ͭP&GB/%RÑxչ}['=0!9BhHKfc!;RCHgoN(uk4!c?LaOκl*e,By +|_~ ]O(uͪő6 eDL;nEņXs;qrYM6xZ~n#+i _4({xtg~|*8#ò.Sb F54!Ghˢ"zs)Fbt&Xc]h=BOF̈SgtZu~qL3E,aq;$P jaED-~[@Д# inoNm^Qkŵ6y'rNPh?WB`ѾC6Dpq&;zot]8hvj 8@< !oυ{x%\np!/b5#tK3K+aGB)~ om[˄l OBD9`O@yC('A\g};Ip sVknGc^W&atypDKP*oݲ+NcFCfq9=e;# $n +26B]؆s2kb-#tDszJآitXlYO_kI8rwzfnRoA\j}Ӌݶ.D>0c N3P~.BZCk#JljiH^6ub%~CFՁeAydp'Ɯ9Rv$c̙i^Ƿ\ qMv)HY$3H5׬Y(m?G -@l'."ji=L(2cugBȥv{gQ؊y( +ӎ0La48}{8,]Rkjyw>M`]A0"_3# 3W@J<83$ fXdTr/8񱌯!7yN5&a[ЛMq*/OszfFm6rޖp_bS;ޙ$6!EOm{/"V8qlQZIzjDAfđZl_e +yC4iA5g#P[*pZ&M X )/rda:5z|Rֽ6<1-\\Kk.uVU[CM, DGi}]ix%̕v*(oĉdX[hX]#Dy4Dsݛ4:xL!Zy_8 agӳjx>z(ƈmhq oKx Dql[&zUJ m]0޿Tr4+5PQ Nj ^,~pǏ;$Rh+g.)ҫLE."laYP,b 8"} W5 ^ۤK/zZk*MBΟTP!ē9NӇ0\d ,wL#Y윁]H}%z-b&4\xζO~,ŧ,_BÒ :2]Apj/kPP,J=V $z9'11 QyE~&#q;V#u+0Y& T/=,Vw#h44+G8FaUL.^5"Xn^?KQbtF* ̃GUefQq:ohZy{ ߐِSNn=`!oÍz@AdgI yKr%ʬSɴ{E$5ܡ@FҙV8nNvQ|ϋ7߂?y."a[ʀ [ X c >CCÍ}1Ͱh<%%95l W{*',͛O)ob.}<`He=?:w--b+lf' +K@ux[/2}SM88sSS zúh(SL?\,Ӗy ӏ誯ȧVftł.L?A_<ۈU)LrHm.Vر %~(rzutU3,15_&ʞ1,oREaZMQv٢ˈ%5ƺTeL2nwѮ5+݌ ++g$ZlDs(MaT;F/{l+,C36եc1^N"rkJDm1ef5宜(KD#7)zCm5r-x""F\xsÓu9M&QK 3}ذhu$|IyMf"6I4II$53ۉ9Hj #̻U>P'-[٩,5%%+Q#eTg4쏠Z^(Ye-2iɋ'Z8C/7+[8ъF1>8Yf4Y;Vrh_$2[7ᒔ"#ܼ+OܘtJtu  7oށ +[ȰP1t>'tELLWP|>b"8Ikᣫh8}E)\d:C{RKĊo72} ~6wI"MOEax Y,R=2$"S{?uYʡ8F8 +oN'mnǞG͠/i;4 &0āȔLMζ +GXMr}v᫲4pfQE7ZyFK'>YUt޷a+[ќf&v]/\_6`UCpzsƌ^:쟨 +Z/~D5:k㦺/B#I-v+lQAuʍJXu/:Ge\j [Ac)EhȈ]JGe} _׽=@$Uz?LB m|TzTrJ+houXDke<޿Cr9he܈ct0_v$ 7|e \?J7$.t;Q;ȉΰ"I+xu9ކpPtNHr{O&p-tmFd8FipBAiQ3Z38:6Ѵ.ʳ%-2HC)&^1v͌vo& +W[:_˹,~ecB];j %1vĽ~bx=8~7?Ãa̽ d /D/'Hdr"!8Bk؝G9'G|޾TʅfHw +ly_SbFg9FO(G(|qט1 (5'#YF<ƿ{z}6~,~3c(rX1jr[ikKuP9*Sjؖ̆I4v"]BL +c3!=6rȓ@ʔ*PAcv۷1%bLq.{V|X/=a\3zao ܀M* <H?#4 Ͻ'Gto AhxNxLZooq#^?^qBl'ԝ=yf@7dڧi҇ +s̑g$c$"_fOb~xH5ۢ +<~ޘ]o8NSK\*\xTY0ֱƯ{{ou"eIKld8 ]\%yOxDie۩fieoKK[|lΗVkntp`I/bZoےKL8WV 0f7b9oQq?3xn߿ KsDi INU&C_F7=\0[C['ߝ4^o+@oatcKst2G@5 d@.'6ƍ@㰷vvO٧#x~Om紽˳@<,|ń(/ǚsYdկdG 8:⚵0Xu?$H@Dd h&[t1Xi886cZ[ù{<ٷX޷+oӲ<.vL!ȈNL +{. 6;>7x]޻}&-d}\1-닲v ,r^׏=3]TB/}\ale/rlm/pbpȣlq7a7uPgѿVmVݯt@G +~M a +闏Y6GmgQ4ߦN{ ibm H%pd׏gu*P.miB}\LJڞ}[Иcb{պ/gvcɄvR\ryci?q wZRXr%yXǝm{xnr174AwOd%A+C[}L͇Q0'eI%;UqA msccd^rmpǽtPO}[;B WuˢuBJiKsND O:UV5Onx8 t^c G zə+}8y<Og?=ܷE ;O{i#M>fT5[?2֗$ ȧb.*ֵ42@qLc;󕭥ٹuIBl׎lZFxaiܷf=,>.X\g8 wgV xZ,UxY^6{=^)boq~\Qʶļ^P:`o545h<wչo 'Ê<ݧ

8BgϜr-j?Ì>MqWm bl5kB@V/ˊ=(eC3*E-K}@I_hvfwfδ/&YeJYoU^IFxwnYaܷ2q_ x_ۊ=Rkzۀ\YJ+ֲ ?}ZQV4ezrgy'aWvF\H`'+59w^\Slmp!{Wa붸_Zc=/p:mA/erɒU゘1JpqmHo?1V?>ئֈi䁨MK1+PJ +hǞ$[S]f ΣAD8qBpiOC,<l{s_e©t[e5ZD~#m$.tKbH. oڱV< ;ѳ O~}krƃc@Ď +bn8/ˁh]睈 X;ܪ*5Qu$:-KU=:o筯K[x.OiڷhVq>qC֠3ɱG(~*w>0D;Txif[pI7H+ɳndu}o(!RݠOU1E"P+ՉF.)X8_{1lAl®Oo"qexs9@T׿E㤞Wq>,.pl֛_}{⩚h*XVf$@VAپ +Wր\m hcN4h \'l]tpDQhY Aiku iYxr_ka_A۾/`,R8{ru `l"ZHxE+>#mj*XeU:[sz8c)ɤ9z,1X-;cߕ_FS{#{E6nMs%Yx:5G]aXeHEzFv% Asʼnħm{j_ӱ!$ ?U'xk a&brV46S{e _mW "ӷ,:j8nk z]<"۲=yokk$u X#)LNzԧ}s`7 r.;u?B}\O m6ʷo;|OÑz8|U~+e|Z|5F`u:ށ7i"QEB-)8IHsGpFY؅a*蛣^l ڶ8jNj q]`ɥo:yD@`=M8?&U|^OPRbNI+߶^ +g4 +L L2U@h>>k>cR"kx44ܾFE%pH17T7!`3$'8=3vixtq?0eTj)e\æNyNqxԩz"s8E%x&*4IJ6@8?tv2+aoC 8]}Y$iu:,0QiU/ȀXc"'.F?7yED$, x0Yr8WQ/NakGGZw`Izб {)RJpl Ekaap_Xܛ:>-۲=5D5 +L80/!hztF-GG#2T@d겹FScਛa~?;giz['m 0\)(眧d]>D-@fMhRJRζNdP!)qC Aoa5"w3GL]b`qFvҼY#&Sa蛉?Zm=>L^l#pw^S&ZMȆ ݴ=T&Dk_?nB{^&v_U:2*%-5_<J~)=C#dh_f4,j @XB+8rcιN\vP ai}uAؙH@8L*dZnOOq1>2?o=onqKA[ *vj F05==Ãm8j8FQ*}W0driT:?bA,gr/)a,w㢣t(:<ꬷߌV1|ʧy?.r~ZǍzҧy\|ZW&G4Q6YX/(êYسdo/0՛FK2#FnJ'ӵ MǴP5+S)┯vm$Jm 3u_f߿Fu/s瀋ѽ]pRmJϮ}DAo-Ф;6w$d/N,c,9Nk,߰@4 tGkX?@ "@E%Y]#Rm;z YGPIT&ma6ȷ P>S;&֪_b[PPomF=zl` l42]]X C:'pGfz8ZyEOz-#;+?&q\e-Xgִ5=G3 ,?HёnQ,çiUx sj;;[B Yrhd޾7/NzڈD?A;`p/P3k@I禢z&%Xn`#t c[Itw8:$_r P;ї oğj`bx"&N`~*ɍ+[n;џ#ZwY"QU4NZDBunl]%tv;"`RyK+WBEGvK6@D,Ĺ\;;UI.ĪN+C";t!'oW1۱%~J j|<0^+B"[KH8*XfL ]~0䤧8 =k۟ *sQ=Y*ÝXr3e +G̐AN\DgN0=EhfNTC[V' !6>>NQN +T @w@,s#p;v b9jHL\C-I x7[puu>[0]goTmC6/M p61+w^=#9 @ߒG/VuU=-QvfnRXzTznNľҒzֵzA0XJ^&to `+UV2]`+"-8%!4R3qcZ[x!zjhH01s1T>[RLiM Ͻ—Fv24`w^V!(R#x8,xܵ2/y[G˲*3+l1(ʽX9=)t'$1f3:t]ⳟ; &7`>SܙlYNCRUmW  u0SDц$ysZKƐo{OrJ -= 2q&QI$:8&R/j5a *KP☴:!D6*z-;QSئ'ݝbN7/uei$fNz8}DZeֶj+&2W-_s Åt,.!530'CHp]w1!/Tԟ+xFf sU{^~;)sg8'*iwCLK"ܵc/_[mRǮ\1uY1 ?3'E̝R,2)3pt!yR%LSY 8@T] ;P_ۺs @\Udc/qiz?GxtHs'Jkt mh,dIg:;/|ry.:<+y:8Y$$&R2> YL nFo<]F9ևяpuBҞ +-Q?ЗtY \ܶ꓾V黽zuHI\4b:x\P'}ýV'B}9 8I0Vej\ :ހ҉}b_:ˡ^9) X7;ÍfyϚ:K +h"W62YpKXc +T:sѩCt>G$VEDwضZ"d \ejS.8X~l*zRXzHD*?B_]o0+r~%e[ztkx_kN.U Lq|X@,onTWR7ۄR:%@7;!˓hF$pyEGl_L Z*P3;‹D^D/]D'y-PO'Ǣ?^ dhuVؼ&vWy߼wI2 <\ +QsS+퍔@*BUk1ts7k!߆f *9nHYހb/\Qo=́XN2IgZ#6}0􎸂sQ3W#dGqdWyfTYG:+#ʼnѱ~3B1s5PF"}{t]Y4efK +=Z_@1bG'ZcϗLӪ<U:|q$ؼ vN$RI8ji[QIxg3hYk$ o$qg26#'4C>Xus8w%Kc `Y v׎>YHbĦL7{ʀk +9zDm4;r| RVh5ץW>u1Z5!LGQhP" ',v=eFD |cB;!zRl2 8|g 5Ttq0yU"T¯qűn /w :=` tYªV%ĨkK%ȫHL>b}lJ Oƶ:eм칫~Es3`ZM*6<ne҉q/w2&ɢXzs~`AܰKXz83fu:6'(2:h]f~''܉+ٝ m hи!@պb1Mhjؕ!tڒqb@2:APu cVe ut}sc+:mc'\$4>7ndxMՈ=(3ߴH>:ыXQ&V1c/Υ7E_?יZzYrWԲ:ԳܥEm.+RESnyuʟ9dMmQ1.ttAg;㓦J ^)0~j+ťg؅]E&.Eץs R}0\s _k("uv hnZQ^8 i m]u+:s9-kPP;Lfhuy1w +ơe$N,Uq2md fKIƷM|}MAe;tj!eeI/9b]@o6DrDh2kL*t%jά>MWB@p^WXF}&h==8a\z.@B%}~bf΢[F1fDFlno{#Ujg)[-]CW2ۢEGx`%Qt +z8ULsm؁XWzThm 4K oFuF~Pmꌘ`hq&eh0~g{1!߳jdU[v7{Ӟ*l4xlmXQ߻Zt3GkEFۭ}H}jKcElL1e,@<:@F75CM0r#k(r f̈㵋Gi0KSTs(}^TQ) V ^#OlI$LdS0I&}NS4r5|Q[b6L`0ZMB_OMASQfg+(kgBsoZ6 ͰVu/P۰_Uv6@4y*h,X /i;_bp'RڬL86!啣k]%as{GrP+flzkPleIu R% ݵmG9@t+d:xwpF~E@ 2&!tp_Z<8+ +RJ~aƃa-P1)Яq|JW.mլjXG8a\j6 :4 .׷,Pve:!ڰt#mĶ /dnMX wI F[l.7l) Yx#zxk p/gtK} dpg/mצ ~fmΙby9dt^5Tpu1*O u:#ZAg=mqy2;Y焸EUnccP[i7KzoH4{G@13_J4q*{ju漩0*iL% lvaHW"ji)o)(7wz=oe24`o%_mj,pl Vs`?/&[C70yf8X#Bd3< }␊.}{aIn X;%Y tƼ .ر}OLtIr-Pi/ɶ&T ;ieKnECT^ΰ&[.l7fA0ו'\[!h.Zw-ic'dxDdWW+U.<<a%|CS-bg$,;Ǹp _%akgȦ~7+bFWtG]tK.5>Pp?s(ƛYKiEi.r4OM4-8;z3*&A;yHcూD@fM~|+<5Ђ{ Ij}R6T5JQp4ܺwݥ=hrvJ?vZ5}w6Cn ԋl*8+aeEVia/c+^]R<R=ds@XeK¨w0 yȮptX! +ցh_+3ډ/f5) +2h%aݙ`v3=kJs2_8lqT K82%(ͽ(RL"0.Ѐ㺡TLk=&QL8eHI>LmtDSvܰCg%IDB;&]ЮپVZg%i3EjxsΜ=pI\J=Q+|9OYj)F'^yܸ +;9Kɇ:59{dž6g!?#b߶ _")¦ڏpi£/W *؂&T-c/GX]I$w(>^$# P̥9bRd [ԝu K>5SIkǤd 0hR۠gSFX&5)]i0gm+Cܗx1:gul. *0ղ{=hT|?{JQ%K"0X &$귢L]6CRAyYté萹=QDb&SW)lkU`>usv eq~Y P]Nax=,̑6m~PNɢ6ݶCxib́es4-'mr/;v봻 v{%`h*Spgp%hdyq]3J [ +$3\CzfǞ!y&= khYt&,Z`J6⑘ B>.cو(?BJ@;b)X?6 ^` +C؉s(kGVć'89|ZQx,Pȉ{#]jdWxvU%`iex:]"3BSi s o +[XFQ ~K'VPmZX,g0s 33m. hjdVnt}I2*n{-y6kdl]~:e)K(;w|漋ugÓyWu%Qa1[#_M&s4324#eHlr{ֈ*罍 +b,F؇&]S.a;\<ȶu'.U3:o[}rF$gژm7LA֮Cit$ n@ƕB!YjbdzHr$bU%wpdj}f|+L +c5  +rCMS8pyY/yg3pKRCl =IN9N}DxI2'tֿ-ץXxQJQ d\GY#mA\&ݴƊ6@D>SxTYT(u/ԡKΐ¨q1hY +)tR2<Ö/HtEu~;WGhoBQyw"ћ.Mrj nD=p/jx9ӴGͬvmwT{y-DtWT&qh l4OIAkٵ~YLU R2n."^-Փ!/ q·)t[MO5۩%0Ř-y_z5o #~;m4WpqVJDr1T1ﭬzFZwtKڃ#cC[AѶ88WVWxQ"^ +N5~wZ&z5>49PS`.-qH![̹ri8Mt~$@ }QʧhʏH7#7>E/7!]l4"|z-OHS!öY|&zb5<Cr4K=DX~2xsJÕFq i p(kN.UT}jLAE̊YWc]3wZCʿZ <1풘st$x|v^OCLcm/=5rm.$׽T1]\`V%GDWiBD&¤PI[x;֮ V}̰tx8#|7s^=vާ1@fTtc; FYuxO[yX.]k%/HbJSt5HJU@"Meڽqq2!fF8GqأRbq-oMO*Ar;2Dv1\:h7O8 kTh\ыA)ӑIc]֗@Z9θD"a8%k]I;~ +1At#LYY떆yCXA/.mFQ^`MH)r5/O ug,GJ{~a5OQ5q\SΝ᭩%g*!-nC7EkPttRƻ-Ze~wl)eM?kG3>Wqd&s20?S`!_BY^>?TiWƔZHAlЂ(1D~c#K0|-ʜ= ?0{!1tFK3:ҟgH{=ttf eYb\4g`6לZ(5h5=0yڌS/Q1ޢvifqS,}d_ [xxQdfdnZ3}uxȳ^VYL`DtNh. ~}FÑhI㋛vnT[Zf jΫrU cl#{)ڬ6^^I;&~/r4Lj"BӾ1T%Yo\ʷNW aT-|H11WHB** $f4.:7Cu;#˅D +МNtFG)@Cr)s/]W-UƟsD f|͇ fe5ɎK)pؔ;AzD4vkלi@G4bvG02v%ۖ8◑u4ȉ0FXy.c؏)0ƣ-zC;y6c(vhļ018uNw)x!R(\捴ş+Bmv'`jqh:ѝG#څy }*7p v GNDv9-W"&8TsW(,N@LdgFQlj搊@W Nk8tӊ CT`s xX.Ž90J׳QqAt9V91/2f'Wqb_D]dZ Ȟ:[&4:i5O9 d/v%c䘤 V1˷ޤM=+X\.[ !9wp4 n7FFrX@~pDm2)|1 Zö.fV Tl2?\ND OV<,1 U#웃Np0koD }:}֓JUedy i؀~|k}v͐lb#Á\X,؉p/u1,Jp]d^ lOI 0pq;"LQ9 KL8#fP 1nYn !+P=lޝV|n =?>XD?^tW^RފcsL4^vW6nxO"cW5*=1 X# Mo@Ej =HEȈjD zaK1 AGjLNE5&>Ŗ<\<_mUtzmSv &"x!2J)> +k0o\aVnfqvn7W;sӽ>#ݿ FZFߗ3H/0ߺwÌw}WǏ'>{`RGaܥV~N& -imH^إW,'rv 47כfPNuIP#8XI5`V}S mY_Z:^*rv-}oO:׏|Fr̢ #19ƶ#Nw}jIJz;A=<1mD}-l]>GC2zc|ӷhDhq^'dz3a/^ocg?zzf-/qms:N^CbǨxß=K(+N~f. 92^5.>?w/wh(8W/u iՉ|ß22gD_c^}{;OtOlruFyxFj͸D}ePP%cSqXɓ~DmWOWN-:F``Jt~rq%H/'Ѫ;uzuϛ==Ȁ9%~H0AdPPFto 5f8A,]>Zi[֠'Nj\7+ f !/'bvbS~m<;.8qǂSX.lpeCXluǓosK1x-7 _*TndBEt'#N8DO|&_:{GI}~kG`DU:I$C2#K~$S1;{G}VL 1emVu%3qݯ'3X 4 4%$ؕ-}e(p5- x)Dk28}%tls>.cHfN# O_L٦4ծ#3.cwth)'zsK"2uٓjz cÚ{|T^ /ix$ȅ>Nq+Oy]VH7#nr&1:jq{;fˆO^/DZΘW$T. @g}Ū[y2<:Z<.R^ෳVҦ5{@:[g2f89]ᐺ-y^z -[CkH|͵6T?Qv Eo徳[k8eW$vgkEn+ik8A<쵌^ֈbډ_ADf71JwWڔ$&lI,M>~P]D֬(6_Fhkq pRưV:B3;"ml&TM_M`LE+`i4^.= ڵ<cm 3L%y񾔣QUn0oqNq%H->##F낛[=60>`m +>D#|lH>󮾏:5%o=N(="6]\@FbϔӔh^Q exE:{8` 5v136:[o YQ@,0[@g[⩼=9(Ub}J y~k<t p;۱^4|Y{o)ʮpqDy HAx9!EjX{RjVF:ыCA\eH.,80{~Uo$}[jk9?^. 5b't 9&Ǘ\c)ݿCvyT^X7}Zn˒ZmKo$OaR"ReBAU*󃞌xVWo.qWQF[s~Q{"OW}FH^-Qk_c CܤZ‰s^uԈ֔vbխAt<ǡX: HioVD;Yʯ.E}ێd#]: + w59 o#Y*5S],;5/YeAu9[|w 6)}!nszg~ -zxwv/G,>X5_oԛ51qKlyĽB\r9# u2"oc`HhLXqQ.: ˗upgARCĚ; '83_g48'漗gl8Kl]0z$:,Cu5pLҋ%M +N0waj÷6ؗ}NtXkkesj\ejǕѻ*O«w&o:+1 E|⽍)tI9͸Frbuw>zه/ɯ*xߢgD7>z\:̪c\.+0vbεk? +m']Lk3lH}w/PG\5' 6=qlj +E1 %oXڛ@ivI& +rN Ƅ4B +8(%P=V_Oz  M "c`\H[;Z£3-H%)x̔Ix  5:Fqur6%y1#bk^ NHlCЀ`'5PòZϾnMyeaU+5#)RadضeS&Hfiz m9L Nd ;ОX]r̡2kMP63X)̚xvr"] ELl0N=92[;lVjr۽K-ncK޵WR"(%DYm3,>߿ y*+pzdVMd϶2KcI4c?^B$/7Tq~M|r:?~/n׿YCҙxY 8+])TXh"؟ Xk(|{X{WDeNLK iyL&2$&o|5^]Ē=b|^1 +$}DWͅL܀ɴqЃk7)ꇵfk r3,x. Bk0 ߹r_RE:$HX:4)88'=R\rFmcuD-jA:s?/h +ď;Q4JN D߫Sp*J CPڀdI6ѡ a R+Mѩ$ w5 ]:Ktu@X`46h|)D[ pDՅc^Je`)(! +xGj\-"~|ڀ\k0A3Nئ&0lIb-,E3r1t:?V)=)/Eͣr Tm +hPGκ`u,,L34A4LM)3 +{7Bn '5 /JXߤ-]V;&Է5F:LKg30-Tg\m.&^awK`Wfi=Tw\.]P-&)"9 t.H-minU +35r$pǫHST|>tŒ/c&n"GV@i*rī%B^i,x'y)cs}W&cfi~`DWn%XtKF$h"kx.Ԛg0>c-m- g܅Fk=\mVsE$|8.$pnQp21SRw2V'oܤxMۏ x*kpQFLdЀ$Җ̀t6}"Nһܻ[kSHFq3t? -АVZ[GDgrFSf>鑷NfJ8f$+0[`?ăYHU>Gm,Q&3^E ~s,D5 }SWx5dcnm N ;o-LWU2z^6SeZ3W-;LK@tlè |Q۟Z Q[ +0 c5DŘ4ĭ<#wQx:2 $-*hiB8ٮH5JW2A@4I |4RNe,J@T ߑL:y _I֐5 !L6:; +( +E\g`٠fL"<~~S 1$sf[Icy= "Hn(@ Og-JP}<X8BttN;, OM[tpf}Շv.IhIxPAęܝj!'} +6,wƶcA[F VZA8>d2KlZR[ϋ@1(^8g-ᴓ =DQIYK-5D j:2ϑ^4ҕU"-̨i 絵RaE,E!'”DJ$*Ո=Ex5U}ԋWkCI | n$% dcR>.59*u{%$0UWʦ]+&Y\ƾ@OjWs[$JΪh\iܡHՄ8Lbd$Zs8E|R& ?6B*c #obO N@2j%g5 -S4Fu/0Xxhic5 +q]X,lkEaxjXuQ+D +.fF %C|#d~3Xc|^n1Ix=Z (ְ$%śPME)Z˔FbqI'4i5DBcbN(p 99x9@ q,؇=(B{ c,h96ݲ{O9aP_Un ~n8m Eۖh8C !иf@^NAvV;TE[\>X$\@ +h":?T0P *zگ8AuCb ?]e[dzɈ2bK.öT ;dgUV]5<[L2[,C̶_l1Ds4cQi^Nh˫a{}Zz'71AB>c+`7`eNq0;x:yM!CƂ03<bl!5`'GyNpF)u1WJ"DajU$Y䒄#@VڴҩVYA {{x#Ǯ2Xrc$:b! +uR*RBsny 8>,@602ِ + T`!%{6Ӷw=?Xspz}/O^\^??L oXo-hlVm4Y|)<lN@>D7ٳ0]DA;ACbdѐ4AmQ$"5pp# UUǽD!ڞ+ |!F#~ޅN!(TML!$>PyQggLBBwbnNh = wS, ?m}Jd#[9LN|$7Q2εѯ{Š+yTHJ pOA;pE bH,9GpQ*a#qC_Aa:CRĵ N̅` 0_w&KQq.\@=<:uIÊJdWj@LbWNWאkH>*.Qeac论n8@_Ȫx@{|`g_P\EH 6$NiM8{II^hp(3k 3,T +Mcrq*m\5-5 u I:C".JDz*-HI(&`{vXHxhJVAb>vəD[DYDYUNFn}&b>BB +S,WJj }^! %l_qM%)( ,,\⅄fxFCD +\]Cxe`+y9֞Wu+=coY}72zYF[k2X! 5uWZ=n%.\xtzxҧZlh2͗ Gzp.@2c |>@.u'=@bWuA Sv~' SBlb x_d\0TQ>HS!زHe j.P^~o4*R(%b5c +Lm4 +Oj($V'n~!VFl{} +$?ŚɃ^St> gr:骡7U}qy JT0zF}%T4xB/$6ZjB9p_/W8^'O䤙pghu*2QòH*KdOG)oɐ>LT KY3n=EMJ IYRetPɉ-BWKe+eq< <4:ϋTGiSx^mʲa =Y7 +<_q r5zK@Oy|(*3 d b9ꘀ Kbg$J\>?[0GPͼ` fFm ~{ЋJlضumNji9|$ +U@p`d0f..<2?b= cap3Qveg[[c~:Ip 3`#x8>#h.OӁN3B ;p'{o_}'Pt!S n}Ț5 SXn;Y=*pӎ[[t{EۺϓZ_u>뾆)Re68?N:|XN;nm ("B/NC:y yNäJ畼C;ʇ9;pVg]ͶA|юv{"]1E9q⯽jbM#b +3   >&FAAnt*p dgyy$^{sY`rFpɟ4JMx| =s 7(SGF;CD^M}Ո1.ROCbz;ѼBPYm3;1* +e''p#r%l1=**ۗ8D% G& G KiPi!/C 2 +'f(]*B3y l8A$B@HE]IR4VSG_4@GI&g#~[MC9#/S^\.^qeXq~{b`3.#4)qBrVC.x(t&p!S)/"͆ q( 8jh@`q&A&cG{%1([87鋆F(!A>7]6WƐ/p~A $[X.D32@C$CDP%7 +59D R!]zxcQA7"݃%BMZ D5"' ,b``HU|C~.5j3 s\K뜬@m9`|9 +b5X?j-|uqvI/ϭce@[Ѿn@8S܋\6' qnO)b4!fQ +y=$'a-z^F ̞P +o/*PjLwLb +'Q&$"Spbl;^zű=;DixA)sj[#\8JQ*4:d<v]r wC؀ “0KuwG4WJK) 0쿒'!*K\+ WBYCD ?tХH=n},"1З3f<*؃u0KSDy wEZMj:`=aITX,$0PYM3j8B%ʿ~,94zB)zx(a46'MBѦrpA]Cg8 y{. +O% r@>~+9auݎ-0ƒKkŤyo<8P>)^Wo(@<4}Z0sϚR\eRE56"NELQ(}$E +!R[Yhb~.=@E a= 'Ŧ +VUqSJJ +H]Hb&*ViH 5 풞^˵kފsOaPuފERRZ#ɫmZQ-Ү>ǝHF5kISי96 ÃC츮1?)jY/p~F@Ӏ<&v$Ӥڂ  TY/s ?&˫e1}%%2X b +6WF +endstream endobj 219 0 obj<>stream +!T`U KLoq?`+]ah" I/v,.N/2TW)t +n#-4 J;?ŝ2>9o'Tvl\P%tG2!Q2k &tD*뵘e%+Ȓ Wuy+pmt`}Rc! +Vh#܊Z3:&ԠŚe.%ɪPJ֋:9#<穲A8P?Xz4ѪIfXzo*$RYl8jPA1‰=UlBCwu +\9sCx4[Lz-a Y}>65 ]Ylqfu"B.Н#hxEᢧ;NCA=Y 4#$@Uρ,j@Z*~*d"V.,PpT"xCo3eN8_8kP= ]N X1 $Z5,d.7$ٖ& Pb5FQ%ã 1rv,7 +!(ݞ>%"xW`$PSf֞ +,pT#=*ɷh78mf}@D.]ݗqJŹQ و'ꎓg5>F@Q1i5%>\0 *81(V:G7ԁݔ{+;O9;O ;Wtmpk(u>72 0椰1p-g]BMЪ8 ">F- TyBDxjy +\!ƱcnTu +P_-LA3`RIR?I먜Fs^˛T^46@y*OǘXH`l$N̶<T)`g''H6T?TIYr4\I5@S Xg*r(ƒw&ی=ZG\^т[)L.96;Jf,#Y\ou淔ʹͦ;A1`d_-2 +& +:?Sȴ:rN2_MJI +;'h= +2\pܴ[TmVw %pwKǍp*PA7w:ϸh313y8%0P˳<;"HG⩟mVv(>b<+n,04~ yxH,a+ʽ X;w_ª~/@[.5ueIpa9H2 4:):yKw$X9X7;@p`o kC¿T8(QI[.%#d<;].B̨R ǑHx,+Mf:m/c'82%iP5^+'hI>z掇}s$|=M%)WJ?2ϒorC% dZNkz8X[_ ^H! $hgHL ȡa*L|tR2sHZ*tV.9v!AcD +fr>KT9ҧb$t +'H|`)Ɲ #2 IRoSpjפv,o0F[OW>P&-Yن5@UB"z0^]HO)@Ǣ +~N@(#{EhctH^mzYi֦Ar ('a{i3 f6B9:7a;حfzС(l&`|P9ks;؈~D1MF:6 M-- +Qo e T-K`0@t [8,Hog+= lv䪒q|P:Gi.qtON!t`a) V"Д1'7*߷g +M8{Xm|$J6K#d{),Z v-׼v?Rb +\ާTi,Q!HRO(0n" +JI#Õ%v /Xab++VKllLS2װ +"ЛG!%{'8>#YYYQ K7 {P**xU\xbځ"^k@_Òx8( +JRvsRo'C'btbI":. +k`?2RW7bRIab`qL-!3Ƣ0˖'@8QE Ey(%`KP)E&YEk]&cK_%%.*)بPj㭛 +Dž*8t2@7P5b7P&>T)qk`N";!XUجju"s9C kzntái8ۏE03Oh6[xXtnH +YgRUp8C2:dz> |УwWN?=cō* `oŶA@tkXG:>1 TuΖ$࣪WJ+Diu7.a n[H:ADk)&\!LXri*UBp!׀gr^e7&R4RakY.finr[l&DYm4m/a0,T*3z˴,3ǵ&^:Js&P$iӶ>+mҀAeZeY{C.PL[4b18T7:w*\ aCw1#V8Nh +' SiUNY?5Cs=&^n!I^sWh%YPW<+M+SyuSt`2ѓ2\N:!>dؼ]IA&z }Lc_]-ma6GIUP2+*G$?F!Cʎ&:}U]MAZ h +zLn36]+JiJ&+qzY+YOF* 9::'l#:xaJܰCvp_ hnYۻ8b!ƦH[vH>< +)rભj_;4ҭtA:9m鴣 TTJ6sZreDr+iToT-VVU`C,$I/"jse@#uxVf?[1ͳp%=~Q=I8(4MtżË-8,=걂JgCLIG/11=5Z|.l AzdOPN' +L8"BhvB͕ +  O>S%aW0+|S,AO>nUU.K!q?,)*mtW{8 y9I@Oj>b8SOK0,G~/P#RY>/SSi~K׉ _Je K%|lguj +f] +: u"PH=} +!)Ypc9s`\ı7vӎK*@IbVv c׏j&`c*elc('kx/5?]_CN;o/Tww?O@&U!Ș'oO.pu;Iݗ77'?/|77߿8:=EqAn@1Y&M}~{NRݣ.u7gq`Iv'Ͼ9orsg湦=V?՛?ޞ_cgnM=ӗ;aSW5mn^邭iO}qv|}Y;_ϯt&}so]gʷonN5j~1\>J2] ۯ\=oiM8ld~;տ]f6ې-o}֬k#f^wme/;˓6 5_Uʽ9iş_?AenUdx\XӶ%u.^r6guUI.'o^>?/o}}L +t~:}?y v~ٝ+^&]r ru{o_8yKǯP.b߯o&&&sW Ͽޅ[aC^yqrznUAMW~Oua~my;P)7_I{yս'?:]-mWoOvWB+;>IfuZNNno_^ݮE`Npq~ +/w-mVMz{&uv%hz{Zkyxv/0n4{~>{ȉQ<KoWum=+{:{{v˓?36Yfy;Ǡ??8YEO6}Һ|uI_Sx) +XܧWEy@]i`j\>>_~uqrzvyvuǓW+~v!7d(]M,\U&QN Y ?<:t[ؗkr\{?9ǐǓ6NwbEήo窔釼bt.Wu\ʘ9,j']ӆes~\_nw8tvUhq¥}w1_eo], +ͥq{q`=4wG~~q~uvپ+?۞_fprz;|jUm\b[ϟߞ{S7ghMZվtۓ.~gptUu{Uƽ4}4['2'|kl8!# dߟv:slٳ=ܿ]aK___|}}wSȧӁ}ǢS^r^BNkV=_=_{/ִUen}lm lmUbdڞگM{a푹ڪs^ExɯvƣnU8_5^&Y5Z>kD^ݜ]^o-W;365ho~~p]!(E׭YcmI~ִՓ몃/( J,(5;Wg'_ί8:_CrX^5{UZYG}3ϕ̽B/_]v@l%vm?6;sϪ+O ܜ߾<]<*7XUCRCWV(l*mA[&`=lk݃ݰmA5+Mn.pXH?'l7ݜ9/'?.P~.UT{+`gX}wn|>߽w]lg|p>VVkgI/޼>{i6z^/|vqq?ܜ]}Hp닳/nΞq}sr +l|Oڶhm֯{m}}.E}g'-;{u~f"eU;eMjRܼhl۝zTtTϟ}=̻U&0n7gU:! +kgwn8W״[in6h!llFl@Bf}mF{fmFOffw-F۾ֲ5پ3~fUpe){O&XO̷e]X nBZY.4"5yM{I?BOtGO4O_Nη;Xq15:;?"rg޳ĺ~E&ֵUk|0Vtua_i{W`zw=Xha_}c#kW_zVErӭR~q/^>[sΎups|uG[x]-a=lֺc̽'r2kUGP=}yUVkhV}mz VNlk7ʚpO m]{kh{ m5vuho״ o6r??%%3UmW=˳]?~]e?Ȏ*7oۛ\]m-Mtj_O^}ss4Jϋ˻+VKkz}xOjҾhI[6M* Gu߁7''>_WncvR(kbl]s;;DϮǸ^ߞߞGioo`zNWw>s@Mjwu&2V?.܏u'YdPx`ʒ_a-޵XW0OTYXU^WiOQWr&QF`{)u/_˺-?Ŭk# yYnuks6}?O~.v1|vJğ]VsUلú[:] ~U6R]^77/NNϾ==A[b+¾{3 +e*u僐|}/ǵ绻`)]t܏/WVa~{qŹ5Q^Ks4fO\WWg b2o)-W&ƄxJwi_?eNprs~leY'6Dh!6M.M\0 +]a[Zob]{?#x׸?ݷq]{۸~opqkݞY#Kɬ~꾄χ>(d+{},>6l{4.oxݙvV~]xm-;X>[N6ɒ :0MSȚv+;{o6/G(Vq~jdyfZڡԿ{֘8\W'4|bup6p:bT1\[s(Lu}qz JWsX+vsrůU7W]Ezv{^3\w3иU &KoZ"=Ȏ9XՖLf_l}df?jfQ ߜ̟߬7}<A'tu ZԨ}裳 |QXRvov{ zܫ 6q>Hq]y`a}nN%ʾG~ksmt}%,r~8oJ~?;9ߘo g C'U3k sM~\j9r>9ťKT=K=rl,G&tdcu42Nix|4s#K?tBE=d3}$J2m\i ܶ\zK@=Na`ڶg1ΐjLxTc08壐 쮺]E`U[x`tF'G@%!0eZ}dkQqvp-frm53&Svs}EXr Ha߫kl+PM`;yZ}GP@M6ňԾ.Z^&?WwBδG"D}WBfj]fad ΓnrcB!`cE7"Y&Wʓ_/w&@D!-(D(3#%z0˯~xpc26T^)Kd,zs<s cJjaKO`:٢ӈ.Z2, ci|! +9ZF^k{,pPK,@}mSb1 $@|{^>p/-IdD %$[}CqÜH]lbrP'`EL&[T KN m;%L -gmrԈ@0C"r>>y 0^&$݀Uh,8]>O,A릃4^,x oDZ@$5YISngU<\M;ʬP52Z1)=@uQPQi( +B,4@Tz,<BziJ<HS;@x,l86&nμG +lòmI!Ȝ$MeP# +N#fXԎƃ*'ОHuQ gk7E䮬-G kĘ ,=ivB c15I/eajL5(VME䰗ʴbt&35MrD &GHQn "޴>A(jRI?G Ȥ~vKO}7cQxwìg5{gX ˛۩}~nm7l/OO\g;0|k(&g8X(5~/C~_I2>b_+qҶĽ^l/ihs*p%d9>9ߩӮ:D9R0Okpp[Fr2   ʃHS DBv|`M$O b}r DSZxĜ|*k9ِX+rb} ;o}"GLpv[9Z hw6܌wǿo2ϧ{lGDm z=$Wmw?$y;j8 j + Sm'Yn `៧`zqh2.  hdʑP q}#}ɎSИ˓Wg_]]=?|ʹn7 k|l?@^\ߜMOtznz"Vz F640Ja:"/1e:GI"'81՛&P,{>lOG/u_=0" @ #9+|Mojr1 /[ O$?DB!s@CzMhȓ`ևɴP֠fb".qR@`TS}[}% +XB!T(ԗ\(QY3,-?`̃xuTڧ3ϷܿbA{-5ǞQ"~9vSYRn+"9w-P&GEB&@Ybmfi+-'KXG`ta2ksE eN%A8 sQgN0 @ IY}0zP]É2-8+@נD\8omvW'H &.Xx`;Jx.}AY&G=zpGF*N`"8DJxL +(IŎi(P ۽:`bG%$x9 H@Ƣƒ軯biA(p5ƷDFLp7Y;qྵa%S, I!W 6Zl,[wŵ7X_ `OہA5KHcYd5(PH  .XNUF7A;0HV0ka~Nbl=2kH!s&L`^fiP-ec0H=jVKpw(ϠpuWߧCpq +HֆixP$0{TǺc-wqs@VZT +@\/9 XtM1 XtkP,2@=M%Iv.xܷ6Lă`V3{T<> K€s9CV7`9oC< ftHKPEc̙^:+9q .(Lity0(883FyQ2[POPdT_l2^Ei AEW&$Ҵנ@E"-xܷ6Lăb1s,b:E#u9;(D$/Il`<ZΓ)~P)Z %I!& P`G`}WôK(/r+ȣs#]$N0`$$Wׁ (a0kL;y *3 Ez +YSu +T$҂}kôK<fvCW\k C]Kq0Uv)A,"`H5N@YbQDnN9YנE!ÖK<(c1RJyCdA1SIl`*EMC> }Nہs +G ҤP- EVA\8xnv_3k~*S"_`L^ap En WLm_D}0:dvAt~meZ@>N֠@!-xrXif8}8{Ozu)hIL7CLj 1Xoƅpj:t$0ƘfLL}[#!2t?Ņ/fN>$ E,eK!01բVXt֓&&^i C* 6t z:idޗ"_P*:BBi+F(.K0D րsծE@ ױ^|S +GŔw9KXY_Co ~؄):MYީv"~s^U*H)ML !6ZEM^TN0=-g ~]ه})yV +. _ eLȮڜU)dPPV,{ITpWMSUgtL ^try{ [\$I V;+|*~Zt n:ڜ#sZU%az^zBsk6?p9ުaԊXFՠ =DEgNrĮX]w0(FṢ׹cSpR48"jGE"Cۈ-qo\Lu ӧ-EYJAV#JEqN +ggX8 ++XVgkg;&aΟC!v*b@FuFNϵh)8]8=IGx<؈-{U-P5FodOf-&6BV7#jE( aFooag)i#6h@gکV'fbQQ)+Fi_XnDv'̥u.1,GX44 ZIčީ 5BR1tCk@ GGوUaXmO`b:%?PK!O5A^BH{TJ5Z YSYmrQq̨tM>sBZ y%_;+%CQbjbUi-2_WXx }Akwo/+FQ cyP3 &R۪ IӀ3$bB&(d ju$Q(A&u"r%N dYd{ek OTrr̐@W`ukbONy\zft,%+: 9~ȤX̖h[Q)Q.r֙)ZgAѠ\G0%yR`5qz)"E 6*YO(264C'ϵe,UP%+QL zlFH+띖(tNdcpnX\.\̔^!JE$T/n,8Lh IhQ`1 +,5B r/1 +@HCmމ6/Žq=r=I$fM6|$-HO ihQB5_R@HLjXHM5${ RTq-QGKh]Yg+KW3Z轔pgdmɋ,r$5'Daxӗm 0, F&'@c=5v+s/ iǚ%V>V#!͌LjV TC*ݭ%AJnx)$T*ەnߪr*JhuX @N,(} ѣ*)d(&jji"z4dEf3y)iQܦ?EADGj%ŮY3IjLA5X TiV+{_cM"h`E5YL4H1= HHh\D{IkHa uZNĢ,InjLP[ +iʩ1\@);SY]T^>d|]6xkчbgz܉-U pQyxYOO Tڳ#w+ {>kUB(&g0W|AWAATQEF7STSkl f&ck^I*Qi Bb$NĝJ>kt6lv\]Ɍ^ʳB}&J^ PyfbbѬM@ yi 2LZ)MdHʫ!+RC9)7Tmd|NАTfM0ru!ORvrnaZ +=ApHjA<΢%‰*V1Z+5;uB"1/`a#SanR esXK~א5<#N7dB",6h+WNrhdǧ'd^&2fQ?a+p90j,s0?X`3@f1KtK9j筘"]x*,uYTĿy)V!,a28TOIBpapLA @QBGV, @#"P/eJ}e;g4QW[7:['=RB|]M3\7dT2 Q G]j{YުA )3Pc[c#FYPzFR6 0za7/ 3`B >e$渪O:x R$ )!QgNX`feV(jI.zɥ}߄D9 +E5+ `^f@@ i{OhVKXUkYp+^(gb/˜+Ci)=cHnbIiHhM+\'IlHuz:yhmG `Pb MTh'( |8q"خ2m4~^+g$ dlWI6F=΂U +oM޵gCH&^~0ˇZ@2FJI]:/r Pc-/Q;A %瞈 +eoD~yt9zz`kM\֪lsՍ?n&t-^QB@~8lA x~9v$ IH(Z^H ^XFXRkӴJ;'储<ɞ/')am!W'v[Oߕc%JF3Pk +LMM8/"m(&s4Sb*&iaxAUaݤdK-ȗ&xg%(IQ|i.Ix)KM.rɨڛlc%»$]Cqqa=A^)Q`Z~άƘT ޵Ƕn@| hzV뤝H -G4*wWUsG"y"T\=z֬Ǩ1OBˇթt&S^;qQi1O7qMqyBRsw)=Lc]Zya ~atW\I *CBNE_ݙ# Z0&./;o5EؿeM4$+qz$VKPJpo>煗A3B_!12yy $-&ph {6jA00}܇E\w[Nn#Q3rwɯQ8B&?Ơ s*c,>j2ʤ~0'b6_.͑FJdE+X3'Q̱kf~թ bؒÑ-(a8Ld,lq(NG&}+n@ +-QJHPٶ$p;ev_vaCBlEСގ)6% Z(P,_j6n +)iL vs;.$pfݺj{(jpm4:ױ&ht`L-Gr))=90Ɋ)0ڋ1tf9ukO;MHRulF̓l4y=tˆefDATp NtTBLd#o~sD5hf "E`\T%.5WS$!R nE{-`A" E㚽+X}B[;4G5v&v浀`j6(?oc] .gwuD?U8_D8W0J>ƴ:/j>H \*QP=Nx<PiulvP%&2%pѤD㜪0^D3sYugэEe!_2zsKJӕUTF SQR!) +S FqLK!1&kk8 `R<_a!J H1~HtzD3\Q0&`CĪ G1/~Din~pWzqh? +Mo9r&Z|t{r,>]pE |,{m%\Y${^m,+ʂ"*K ;9p Z5@LRUL ^8I&O >)ON ᬛ e٩F0)*e`& ⃽]LW:ϐEo=|P [1Rܾτ f8a'[f}uDEft\MHlpXWP=Q.&cxy6@aJͯ!z=Xd "'UZf@.Ȳ9#XWV>uLv{UX9tyIWls@^!02̊TQFFjT[<׬΁ZOő m߁„bлU"Kntj \%=0YkmI]>Ռo֌WTOt17|ţ~@Pbr=mb7L WW9%ܐQyᇦ̗4/(N-~b^ۖ% |S%+.1b@ 9o+X +fX|r=jΌ|N}Z5f2!ꐳ]]I T1 |2l\N; b ΋&<VC`tDKICd b"„`WA+VIWk]:0yF J=hSMx$ b-Z^ѲEϫvB<\T߈HDj\5J0mLQˊn,awbzݸ}e_9CCUlvoÞxf\Rr"kձ;Ab01Vh@4lƽ]˻Z`*e&,ۺT!z5('8շ=s޼WRjϷB^sӁ VȚ(n,zWLҔO5Ivƒyd:=T"ݬNv8𠢀$8,Aَ3νJWxY+806v.]X?QdbQ5\,+5H&.M<[e7[j,t[F3|1[ {Qz~.$3DH6(v=a(+cE`D8H? + D'oD!=|c4"wwr*q 0ȁ6*Te:aǞ# BUIg1scF=MſfElc`Zzō,PozEm7j=9B3lb +|}!]A'DY=fv:PyCۏ1ly>`xǒ -uG :0DBShq"16,3#X_B JG|<gE\/;A#%XZѢY>1nԌ`^EBFةi|Rv0(aۻUvО ]O!0]NF]d9]s?=8M*~mnII0͢AA"љ ^ @6y$F.m +ڃH$9ݨXr[;0 %z {JmZnntG}Yb@9a5>Z$FR!mRT٧֍sEs]8㫇4ѷ2dz;<*A5u2цIzha +oVwiw(l$;t +:N#61#I0HaV7G``v^2BCސsDoь9H p˚Q0tqۙ<+[%L4],=b2r8l.(>a+(o6/ȚFǬӍ|'3x}xϫɃ?X; 鄸<({I".* +Vb:u/%%I88D^Q~i2ўOGL)Lط$S ZUL8+ J T*AWMZyT}έGƑ&ᩒD?v\BxN +|tZ;+<:N9Pt<_I##ea+Z`7&t8 ){aT({97Aa%;N/ ~-Xo4y9 9|*3au:3"R`Q +OrE#ZREg9%nʘ8.LKJbXDx=4p! BՈQ,CP^3$ʦ&{9(*+X+6^U5Tx(f1_5S}Tu)"R Jɛ1IJ.2OIǫq* ɞ^>1A,vΦ_CgoH=9TABҁ D9zp.5DN{Q`+ +Q/LGr BE|PsE"-bpp}pYf$-z'cnA%ba83H^Ab9@B.Ɵ(~O62h$. Ҕ`VN0$e-w&euh[#/Jރ.~qԤj4 o$V;٢f|un?)Qʘ3?L(F'<2 1TxEB­F =d@9YԐ .5g`Ӻ;#OAszr%$[جm! +[м:ېCYHo/9P탦D5.$L7{ +3/.DI'' p&3|$l!9nBAR΁b,=S>3_e+GMM+al(B? +=fRЯΉa:ped=h3c=>$C"~lgD%% +Lr4)w-g#ҎF.Mbz!h~y`[l 7Y?K$7%%b0)Kv 5"ţ{sr`7N? +ɇމGg+BwڗAY8e7CCjP~6}1URiV->Lq߲ @ D q+(%Kx}d%½$8>w:2RFBbK \,ԧ{-,hw߮4DKS}sW}xҩ%VAχY% ANkPT$0,-OXm&6;ey}[H.ƥ# +0dNF@K6 eԸt{-;_9] ):TU@*ngVlO,N 7IҔ.l|Pȋ1C%]NԪ>`;a&:ZDg:d3급Z< Z_A1#т+t:W?6r!pR_'MɽJȯI"]8$.\^6Qa&pE}; Emm$`}f N'ŷ.5;48%lnĞ MNOq:iF$+r~g;d7W2XaKrlYBnAʧ}:!(:` .OcaN8@ɍ +ѨJMo?T*dsx>ҽn} ,I4ov +A \)`%Y^rP{[W-=y}kcowhI^}iifMƱV̎g=N >("N@,0il.U<8c[|1~)k3P^ހ 2N5sWmA˓]VYs"[YjvVv`o7gb*A-%53`DDQ&#quhr=#C#:pfuv;᠇>YMpF|uЃ~\곊^\HI$3[m#$uJ%cJLϘ}J8 ؚbBN@UMg&IiX(юgDAZ?GaPY`x?\yxϼTLO*]Yql,be}Pqݱ9TӇrziaOv_ +i$nkN'F+${i"MU$u?}I4/݄o@Du'Zw'81. LgCp+{LF)SQH~r\-EPAD[ q aB6B[Mⓒ>64]l?(THZ|SG};G=ٮ#=Řhj#&oS ӭHDC;zFtà:2T7c^3nlL0Ltd/=lA>ixTW\5-NzAH p"T2_m/bY3W@R j@T酨fw CPJ$F* n4ht7\q2$P.) ֌ehoB>3Qb;ɤ?!;R&" +O +kS$G|:D<淁.Ӊ,IpiM.V@bVtG٣_FĘ͏ aBzÕP˜B{N-eݜ}DuI/pi ˟KE%y/ ;p)isfUvIFpsDef;%g3BL+Nǐ.|$]I @򵝅M!({A +:jLD76hS1>6lACx8j L{W2hn%8%P9yXEXnж)T@=Q ֶeC*ySx{馋 TF724:Ď}qHt`; +% -1JK4$ }KNrt +h7e\;xOɗބ̨M!N̆w|8H\v - , +efݹ,$lA'e3ZMI P 艵`s$WSNJ2q +!,>ko=x* ʰ *?|He x&%rGK"j&xW*4,"ՏI0{KE˗sK~K ݩ,<_{c92zCj֒(]9֙BOR ps~SM)Shb:}d82'dɯ^niBя!Iaz:H;;V|,Uh|dnQ0!+,w=pTflךh>{rms.B93-+2;ȋQ3`Qٙ>' AdsHm0E{12=:vD}YܐǪ#8ޖ);jMT+DЮpz MH*L\g|ҪZ($'@|dž޶DcikzGzvvsl.xYyCO?*7DFmi8iQcͫ]J~'K)>G,')փc #A[0O}ۆɞANt!lk!"s:;_;Jrؠ1v *5?|o0:эАlGj!Nyq_١7י!^+L|N =d،P)nW jrlƒܜM|Q\^Qo;DE:۴YȃRI^E + +#Sf$*]\jMtpJ+2jHַA*kL8lí6VK$9A-6jF`F&*`#*Pu2߷^n/8),]5|^@܏gOUZf<(鎒4n5V Rv gY? + HT,}BA\dJDݨ2Iǐnp;%l| *F< N&|0J*mH +o>|+sd5I4{ ^̌LĬ*Cb^hE`~Y1#:ϽzFt ĉ?3:!]2_Z4'3AU#`` +t KXv6}u\? ]L#bI~mBbg++Hց7\^u١A:6\yG!xI$F i!i#xM6Ex+\s^Xo9Fee x7Q"p%,O,1!߼"yr1R'Yd%CʛnӶE?6gRBվ9\%M;0RlN%m%w(HvUYhenkbAŵŦ V HJb-ّKYCePB7ߛO=QvРly{s1hӡ-頛ԟƒ7l +dپ}y)0%k'tQ=Lp_mI2oZE&KGH /2!J|mprXQ4~6]qp1"/NysQPo_&7qyݤ sF`΄i˞SzfΉv`{ ˙4ߕv!}g$2R@n\ֳ1#0-v vi5I D+v 6*)#^7dsst9U1g$vT6gdKtc.tQr(y(]\T> EO Ȃ'_̼^lTg`j[3AˋRp.l'K)#޶#es6̙zWcvs~: N*+-*qyog\!BM4 | K55k61yQ>]t),|(`,ٿކ9X7tcoHQTn`մuC*s3/0Dp’$ǣ`s@Bj+sOX09/-$!wbD>lŸɞr8_JQ]E՘y57+)= ,Ssb ~.Ƕl`N`&ֆщgc 44&'5v.ۢp|o?3@-^t1WIF&Ԃ391v %7%d+^.H7& ~#]@;0`D!24(EB2ŸvP+N&o5"*~ ^6W5@WkcoX[_4@# =ݖDW(H\O֢rtauЗlP漀ɺ"jgtc"eAgȤ쀑tJ2ҲkAEDR^m;h9ۆyihˊwk^^Z\5#u |JI_*t19l +SD*f +a 5m W1AQ#u$# Y?*6:o8ee=ɲ)S(l)S'tJ {S6B#--.VD}9d>s30 Cfg4kG;["TNԌ7]ъn;NYw+Q؝h\΁k-g|WP[, +@ÈъzeՁfk-GaE?>2Ee껸dX01؄н."#:+w D6.dɍvƘ [RfòI1WS lxӵV~F]ڰwJv +NAGW_;CDi$j>%&VUq.ǃ '*P v /՜BK+>ǜ l ;t5H((+~QAӱr5Ξ\({'EbOVUCQ{/P6UF#3%GU0Sa%iRtKS :#t<gakvhOPrx{f@UaO@!MNBτ`k/Wf:@l~tzBMR>TXy~7x*hm{?_I0F\SaRULq11ܱ|uKrLte D!xC. z9?$YE~jq"@@(dGT7N;*[ʮ*U$!3w/dmߊ +XgU(dSqNjRӃQAb̾ }("'L s=egeqnֹ#wb@ahe_+pjgmEM>MSHt)l]=6º~3)'kΉ\^X}L +J0Vb0A+'\^ Myg͞:w)Zo2@`8ǩq\e*1"a +9HDo66;dt9 ̖&!7I,C,oف}:Y + jXqaTzCVZlFk@ i'1.n\D[g+ Q2Br"Zۈ9RH{m2mNΆ$vX`8>hBSao%ޞ64Nu _vRX)j dyo'x +PZ5ӴB^h>%iz.t^һS*u'w#zG%oSF6J Evp uLl}XGVB(U #*kO~0t NN ~ +.tcXvtq<Mny.BdGDԡsTMe"˺Qw9wS iKQGXɮ 8Pm?W:+{`ζ{3EW_![˅dϬVV/ͧU#9D~aIfy!){ iy]A+6SQD*I /{r +[dlu9obG`оGif')-)O`Z=Pn5KD*(E},efg7sޞ&v48RǀҪ;>p6SrDž؃Lk!c^\^SÍG6_!R]BQ&w6R~V;dЕd;CֶShG}/[@/S\]/NfCXՌ3M ={~Tb@6Hfm"vV!.NyHHfl[{JFf,/6Ev P RۖY{4= _ȻT"dW_Kt*6>c +[yV6l*`4T[Hl  + x/m+I%8 nR0 kfJԂ `@YDzFv@M1ܦw2emG2ң DYٰ ҧD^90aBhK(zHIҼ<ԄLk ]5ҰB \k-*|:'nOCdOc®%?1. zfp O$ueN']Z_R(OXКԬ=yHIqb8ovH9x\+9~lxa܅Guz;Zݧ"ܤo*fmCZ[gnͤW2MIYA"eͿ`t=ǯ=k̏.mg!zӝ(to7ԛM'I/rmܢ?To{fNYCf&21}e +' U$*1|dlQY?^Y ; bx{gw-U6$}{~W46uݪf౰gi; `J. Ǭ +L,ZgZVVf W6y}ҝUe~Uytnz]Jl"Zr9 2[ठKva@CDo9̎BPjFu+3|ceP^fmi:P\( 29>|)|?cXβqr MEEgfZ@JV­+STpv:|(G٬3GӚh*PBҌM_"b(ABЇw&||hܿOU;vGӻI4w5EgaV<~b<Dž%p?om?xF ӮescY͏mߺl0z +0:R'9ވxa8V >Nrw>8pBw3` +`?skr8c>*z6^Aawk^Ѻ Z]zn_T?>8vWbyձBܞ>{s_̊/y Ĕ!0H} v.k]W˽"lh`tve" {oD05tooK+_$[9%2nUei7n0ό:ŕja\z򋪌q~}5<²ϛ%FKTv}:>CW>ptI{9ދSf?9} 9\bB1g7_\EaQb2edwr6>mגB|F_C]Bsח!旦k|xxǟ[;l#-T,sYp^Cơ?dLfĤI45/*h7UYgay~=2 Zr6~qbXMx o +pBRF4Åq܀ts:yUۏͅx~h&/ڰtb~g}CGI#}~h)2 ВׅȼY=Z.<WtUG:*֠\8-Fo)窯S|w7i}gwv;U͵(Jopo{0ZcI++JV{( 3&m2U.{8e$6zo!:y*>[LaXNytՠl5b)sp{ark b[$ivSJE ܗ7ި\h{OpK]2cΤ3pFgJ!BvL]h&' +ry#JpNQ(#OKB3sesMP $uS m<̾BW]RaA w0LhfhQuvF(ط#]#kM-R%%^R'u$0ͣWalvᲁieQCD}$*-^Po~ᏪA#9zs(GKn C+,k!e9b9(xא`.!)5EV0CeRSnl ҎsPWhXWd/ qT1]dv?z؜t%$4ebFM(evh=?Ŕ;<UH=.ʈP9JbuH &eWH(IIGN23S Wp) +''J }]k23Bs Zg>ڮ`?5K c9ҽֻ-zaʡf3<\Y $Ң$l/Nݝ:#9!;pXo4I5ņEU|.` c_=0x6oB3+)3 +83Ş֥5y!qV6jb ǕZ58،{›5DA+㮄pԢ«64RXXaDTv jZ,Cη,wsw@#ըdC)9g3y"FӫσwHXw1qpރRϪ'Vw 2IU,;t4Z?ZId+hZ} wtn]=aLZI'l@vR9mpX̎1WMWS(nϸC"AnC3(-fuH,3u> ܢ1 %48y3"3 yRI2^GcڧR!A"i3j߷$Vɗ=(qC"lÞ$U %q{-FV·KozwvGdiq굞2VɃ6-ѺO6,CD/# $Wo~*7!ݩ>O7#5$sWEL&kE|2MnNЁ-e$wUc) +ik ۚYR[ͩD@$Ru8+U4NFOw+iퟑL>T|LiMD^>Ί J0ACS:4*ttᑦy$&މrz$?K9N:|H/$ˉ 4@+UQEa*Ε—d(x%`v*d/ Qs[ `^1 O109. +cva6$e~4&K(&!ϔmd^1)GMz* tuas4MƼ<౮+eK#SGu,;l]lWwdp;`ͱBE.鯆'Fޜ^C@]3l 0Xr*di;Ig֛m͎LD}JN[\:5W«O"0ˀXAU#_iꆟOX&JŮh8$ h]uCfFϑ{.T5vATYQ) 2tD+N>:HpHBjlq=eYqRJ8+tNr'_+bE ׶b=(mz;@Y+͕լ͊ +SYamr>/` +_jG5U;&pcj + BT[N?BK׆IWHzҖ9Y\-0 ++$5;Yx5^.Hδ ' +$vO->+H  --ƼY&>A0_9^F*@&2b99QǪ33}L)XvpmV/Y=NuN|B&(Dhi#&~iT`~+r`V='ԖS7.yD8ZRiU{}D_뜯s-;2Ꮚ i ,{ۿYn`*D>yL2Ⱥ00VN&cƦd٧-'oLuvygwfV$$]^Hy ԫs_ԭiq_ξ¦~m0 *25Űy_ja,cwpwZWM1Kr>l;9i[2W.d$Yvr/∕: K8:k 8$0k?k#ztb;yuz' +AXF=ȨGYeBaR-@=2C#cAhRS*<j'B:*O}X225*%O9qB%IVOrJU;XהbJHô4HrPy%IF$= 4J.GT1=.9yl_dQ#@%5&qr# X_.Bnũ"9\=lQFՅ1CPhaZ6Oc3DtăSys]5gu$y5;qWILSKJ7l71z(qMB,uu/n@ʷ U"Xڮ#8,NJφJǘ$2vDdo,0) +*:zUc94 +Vn{Q5~m,JxaM8d`2بf #l"Hd/ +ϡbfǪmrYuPLkXұ04jPܸV5Q /;(aMffX}_+/Z \nɑ`*hǛ5.ԡ1= aq5lj!((n\. !-j@a69zi1uOT 'K'7{h'NZSPW3 9T75.ѩP3;PsO8Wh NKdv^c*ҩ]I*FIHP sgD4 +)MY%5g j^|z-(`z0XJ7=:8BU8#;1y[a +C:YBZ @)xαH`k2}pm+"K| 3>E=#Q&1E.6T}6yie`/a,Icbib G&I2;0 ۇilx[+LgPr'0f†QLkO\TtJvaW9=I-͚l=̫eqܲ=7KMM֣6ըJD^9Hmx%6H;f1h-L_#y%42@)e$xVfwأL&oV[8>V]T;_+wJPrSL&JkV]OwJuxߑp0Dv3_=#Z>\Rf=hIӷ{-XХ=t]F'ƐKՁҹrɘHx;.:kRΧC줏+GG˪+I3jȕe0`xSK0MheLxrcJBj)91m<6VP(ޙUuI }C G +Ea"RR+:I* 6JDnB$eYV&OkvufD۲G8XBXU[pkȫLճ³7վe$KGz꼋ŠQ =Ů~tMx7N]`ڪer+O3cbIRQ$w(bGWV\T +HEqI"z%xlT)[ dD.i.bgxOBF]/$N.VT6}g >>ټz%<9hŒuewGLx-6Ƶu@V +fԼfU/g#=t +Ub }Bq2!xB9ʅ_ZӘF/j !O9y,u`9 wi+'$Fo-6{c4\ +D i؎=]Ƨx—OZ=A)]:R52{uXxE]f7<s^I&ޫ_9aTlKf  Kk X-Gmeq2oXh("% L8JH4sV@~'F6Zbqe}{Tiq*fgģqXJQkiW`3Zaw^)\p*Zao՞EMr$o/(@=sjwGp9H6>eş\M`#_ +d;#42+ ^nmdt; W ~`!7XL\C\ "`ԚLxͅjfX j㋶qWY=LBO:@H4>M$4$Ymk*kpNgWhLB+&;PSڮW< аrdUcD%9zZwde0XT1mlyUru@++ļ +сR,^\i6 +ss=gu%YrsO+]:~YVq%keXD^Q揊2ҁ!YӴ+ pID"Xqf nfKtRD6"".wzx$C("eNvpR* (L`'bu1)ED*+ pBX5Hxqm#q͙t%eKu4fa3K-yhS~I #TJ oό˵XYYOj =Fy>>(g po WnSg#Oo)]j!вK$;ws=r{sRK[uOoO +?/wWnOo\3+\/PxRfG& +Hl'{^: )bltԹ;{N:-- +'Ĵp +l UZ,n{-l,ir͉pftzo<oDsG>^>w7_׷~f(^=3GrߕC \M}MzoDݻׯ׿ͯOي޽W_>|:1&"e}g)ё EK3Mۄ[pϳ8<-K;+_Y5t4m0y=tjW3vo]o۶vw^Z6<|nkoۿػ?wk/o6^{bEmfL_b>φgWk +ï7)4Y%g+п{O`'-qc;A+|`m@#V΃q#8z!yGLjw֯fWiظ:Y%a?@ }ż|O'y|;LL"ݴ۴lWFΏ +- DuH-šz)á(SЅC$qכ+lN31Tɺ"n/oZZ~h+gU.W4pM~>D¥ d~)?<0tb0.k\Pd?,R1)=A}1:2q#Ρc\rpΨ{Ø9|c{_\8M~Yڐ{vo|>mu7YdKVc?K9?+GODAA/g>~09 +Y_R/(Ow.)NWmD< G.c0ze8MUBk̰Ng>@+-^Lԉ>\8|GX{djl@T3TŊcBw+綐^l7tpY-R;j5NHQ*Rc^qp*8ô\~PŜ+t7RM꺼:t5W܈.B3u +W@(r\(. ƬwFN0o +ݤfl:J}qb]^oo{F[9uu_&\jG[=e+ pArx70r X Kusbl,}e0ځW~ c= eMl,)xʇ2IY3Rn\\p`qNǁx9OL-cFF8ty='0FHoBihTc]GOex|qdN 7ᮅ d! --n8g |J amc+Bʚ ]7>]b[!Fhql2?$p>^2 +cഃUR/&eM eׅ.|8c vاqިH6@`կX̻nY4>uQ Q({y\ᴣ*uؖ dXc8`:U1EO)@oPpRWs ֧*đ;WĚ5l׏Mǚ ƟɞGeŚo]~(O>}yyo_?|ۻҏ?7q8Fg}w,p70~7Gul%{ɮ>z??wdzSzf=h87햰4$?aeC M_r4ؠG )}9XjoL}xaӍU { Ýdy +uܕ9}.N%Q%?Fiar78"F/ C~#J$}x9뫞xoOj#)%axEJaT2( ,.ˎD q4:\-oV`x9~p,{\}yF1PK|Ń.,ӧAzW?_%sPpWUx o9CĂi {dne!Yڨs /lB{fz_DIlBW\2" `l;0;Z p?ET7Ki-7M圳8gbs.9 m/\y$`TTF:zF4z"¨^)B4P fJ%-*U}ʥU@)Q섬Hn߄r0l"f]0"⯠Zd,DD6hQB*cj#36^49Luȗ]B#שߤFk۴Tg!~r#m*VfKNbT>k;w9XÖW>(RTya4}*a&UHc+ҁ8aᄇA +dٺ6:!^$[eYI% +ʁikٗ1I^q΀c#>Uct G+>Tz?{oivG"aHe$ +$}V{a +@DfB"3+n6s#ʦlA)#RE1v-0E}GX[\ Eo_}tIW+1((9 #ɰCiv (ca)lA.dЖEiQBBNEpTc4^Y\Ƥ㎓nK4t(0b@v=I5 : WiM N\N,ނ2 =thr(e;©HD@r =d ԁ E!F/09 y]B7)G 6koDAM< pap>BuR?)uT046 l1>S即i,/sN"& dEjh& 1+ǺTHe](C%8:Iu1:j\*9cv8ez;|Nz&ELƋP[:SQjtbr6 Pc1*w J-H*,?b +)(4e)YkLHtWҳ N1e:i mtfQ&9E"2ҘpM]߰ 4/lfdzps-u`-Ĺpp:|ϖ悫f\Ѱg> c!k0Z'b\Av'cLB!}?(m*6E$ͅL.]\FG*>a9 h) jnRXMsBB +A7v:[pBP V$DQꁄTFst]՚T(O(>SE8c)2*>)gKWvG]vdLZHU%%L! ~Si81@)hRPlk>$!Gxے.a]|*?HCZ4=+DsH ,.f2ν+)@LXH=)CD +]y@eҋ24@{Q%N.}JH(.÷$62V7L<.6qT TP2r -y2[!:X8RSˎyJ{\ȋ#2 E Dp!kAlfe aVƠ;U,]PfM$[F[DZAq ԖʟBhRCK/ ڐ3 컊R%kOq2 +{ 暔pYNSY,$)(|y +>J dmX/6$Dl-~b .Dz8'dAM7јhdUdq_fz3Ā=\9Qi)i  UPH(4&&MAP8J 2"lccKz`+Mx)ݲPs1 "]Ag]ۈrX_0Ybu Yg=}Y-B9?Ep/`)Ghh$dH\A +#%=m褍'9#3XgC[pCO$mu[RxDc`ozB91}e ;Mq|6iȘpe>v5qQ@gk,0Rz @Xfu?$|ɰSi emva9 e ݒkH*ذtV0:N(فk4PL'Ɲ!P ;=-0fVS}W@2F&ԵTU0 WVL.ŨՑO `lF.z{c1e7TzEI$Α +rR<BwlՆ0*ҡx-6ѹMZPݧ'K4؞?LK!df*X#~ǒ,# Mej]7@D2lB,>Xh6k.fH-q #5@$m= *t4_.b@deFBx + ̓mLжnBR!) A4钆֤ik6" yM>D WrpO1ϲӐ/㘤26#i sL7+ےmcnzH_!M<#|TiQsCB!' d r-6#$bat%[CٛH:EU ˕7"$eF>A/ϓZ@q`jkϒ +"# @bwp>5IX]{_3V[bHrLVα&!(]I[6 ^h P.v_1$% )Pѐ+0t'H3P0mB-AQg4)hljDnitg|8KoAVa1A +🣩Lr##2L[ᑯhePt"c9y'2/B3@BYQgO; +A(tOx'5q'0]7v?j['< 6fub+Yn*?(&`e+&d/ R(Pud4}T=hl .b + jEH21rl圩862!̤Pixl&ȑĻXٔM5}YEEl +8d#|ɞajjdd(}z3 ߗvXMA- hRݚknWhɗ ES#!Y-(͟m)7[t\ -;[vw T c`(8^#-F;8lʷ PZrxaruVBBte`al9 敾;2RC m+ji +B7 Q4YRZa[IsABM6 94 q&(%S(2\CrF@6gZSIeFB2&h=p[LBY H;y\ giK\,(/M\L$~jBdGaװ\jj*:ڹs*hɶT) fHQ * 'hg;p<C\ +QW8+z9i +aaq̓4h8${RG:.:D'v`,GPhsr [^aE–D f=WSKaW} :0<֑pmO:hCsH&g ' O$iM8H)Ey$c&s|BdtrCK#ҕ2p'9sQ +[[)JOFu #d^B"-[ +xrf%R_ɴg{`T.a,C0`6-M`lLMJeH_%8O$9Zh GW5 +zB|/ac% T4T|glidXGB"`:u 8ŕ\26R!z2ќ-4CaKCv^be="%Sb@JjQ^J\A'1K]!`.b%dm K&jK4aϒ =(6٥Q9>I\x4B1;hu-)4%V=PCDnkXP|R'KVvL+wpV.+mWe[2**nUn[JmVb*^iVemUT~;U^T:F`wOS?|0\f= z:zkHva Gr0HC[QckPO8@*MDđP"5\&&"4&5DL- ʡIȑYl68VBLgԡHa\ +V%\=7AfRRj$,jqMK.d|!GJ4XUpNN|! qDyykZF įi:'ML'FYB B\`&Wz"1r MƯЈ`(ž0ƜB$Гi*KOPH aYj.rrSQC\&`#QdGXY +[C+9c(O R(QʑA$Z!Q=F`?nQAyCRIAا5(`oCũu+eB~<怹QTc*eZG0Ne`B<]}["Ra/ Ȱ zi*!]p(w$ÌA(4@fQ 7;Nyf|J@s6l[ mpQ 6)Zr(Y|VBljр(2WU>;9[勇sH+3d!ʳ28PgAϔ*]"0'.R!ˆ\ +:\HL&Fh U"Ԓ<$ŋLf2bQփ&;{1Hƒ֓2T*0F(R[yz lY9LQ'fD2X}4)Wo1LAEI 2H`fՕ/q0>-medWJs- L1}[g;}*$(ňC + fHPpo & RbpK,5 73-d|xv=rt +j&F<10U Rp5[1v@xUz@@tO40a6ƍed9%*Je*d ]gh!:r]SX$^X8qW؄ڒMJrǡhP!EUٌ D!;2k>fe:Ǘ- 3X0Rb.#k!-9!-%]HƵT6+۵ +Wq$A=`Z*s0Em c3TPt,н `0KҨ&?$tfzȂI9O٬Y +XNplMRJǓ: >, H M IU #k(`dR.IR(oJׄ}*=I[Xr}}i!+' !=f;˕HbʀYnw 0p*:eb|dN 6W5 lU`!tV2턒F>Ro+Q8\QA 3JhLDIP ?lڲgM{>E 07#ME ,)NCДj $0>$CHC9ui?l\0E>_^d +H,j2 p7btQlr[gH\#2 *KPnnv OV㑔 {p9/`JzJjPuʉ.rP +LMDsM5^2"ᙩBxr%e: '-\3KtFP''}.;^L2'>wMGɬ/rxe/V"FzJ%5g&#i>ds?wl:ϷymM6s}s~9:|_|i4W8~> \{SkU}\߾~?c__\_vor/37=6}}\{۵9Lo|W=Wu'a~s}Us[ǧ}}s~ss~weyyfwe6ϫon9꟏\__ire~ޚ9#~nXܻnR|iw |o?oտ_;_o~gz/-_?pM/o˿{+hbmɿĞ?~=w?r{U X~p~FwKKˡޤ;_}⺟z'.|~ cbqcY]?w-~~/_u_p9_CGGCr|_0q޳>?m|O_sr}~7?H.֟}{7i?OUx7~_O4K_hv|owƿ? :ũW~KٷFޗW? |z糃?Us?Ku?fKM~/(y~]?A1|f_Uf>-=~#:Wͯ#7/zNaPv}1}6;_~ɦ_!v~菾>O_Ͽ~/{˿6|?r,n(?߶E,w?ïL{m|0gq'Ga]?U{N'ƩܚxBU_g޼`WE Ȼ=g߻7r?:]ww\߅B;/O>_R .SC_g_P[?ӎ*_7g~}hf7~g|:CoO7G_ޏ_2 G~x_w!fw7fz~Fif| _Y= J9Ͼ' l).JxZ `=B-` +=3"}@̱+2Y_mR;Fbr,J//7SQS'WIDVcO ӤA$*v)r(妘'c  )GeUm +g'Ke5LKrFn8M3gZWm&?#n&Aac vD +dl.b#KJ>sF}U +qyjNWi:9tCeՊ֊Gb2Uzjj"PXS: ]ϗuhZj]7nj⍉yl>S|CY\s+[-nZȜXK z(uAzy\_$]PU/%~-s^mKZXbV+dmn[r$-ʠFм~ ,iD&$z.+f`c & stLպ6zD! ]>^R{Ƣ +|!j8)6XB !Ո - !$U֫^+TZ ׂ B{E|:f&Xvyg7>ugFXHiJxz`|={-iWis2ZNj!f>Хx7=Zf ީ^W~r\'AR7AT ( 055_vŋw# Q_aRE,f(Q.zB^d_57\*P¿@:ڨ +|vEID,[/W',MXL%Q(E +:c #{yf7-4FZIX0,_ojN2|x"mZ}b9,\dXurq1Z>~aTM&3zUb;-{֩p]=txU (U+ҔB^oWbXaiC]RQw[-6{sFWyMlBv+Ka(U(zK>uE=/6r큆o|kH@m/W4@ 86G#H7"yĜBͽnu|',KVxW3[;;@>vnM= +S[XaDRV$E+zNe[r #4bCTH7@Eo>B0 44~(R +?e'nR7FP%F %>>9>/2zv9/WmA +>FȔv 墠RQdC*?ˆ\=jAV ^J;+9 nB6R}/Oa$"E$0"bG +uÉڐCRp׆otѼO@ ÉUqV̜jI o,=AGWZEhԋR`rNnݸܶYLaoֹꙢls7irXVdNkbW_Tbu_{YHzgne⇑tls۞uzotIjW?%=G2zl\/ /[(IηPiZ2;sQL){\R%4VGs@Ԝj!׉!?bBj}ktk $#Y&fI/AS( +`")+ׄi]~7Ax7^%=[R0,!6pP3ҟXob~f29 &ݒ$`>=>XA;'_Y4^G~Rm"h>?"b|VWVl7Eohs7kH69rHW@/2IZrkw,ǍSjV#dV}xZPTSM}TӰpa>N5MQUZj~TL#;M&t=Eڦ}ꢰ}P6uQ>u(|a}+T_\bm~Dž;HǬ`']͔jgUmIe=Tۡ.n +Sm9$RJ^/;WrI}4V +r^+͕$B +iz8?P7 +ߢb.)3YA?Jkfo+Rs=zc5VI[%rq^_UkʞnQM,ؓ-QCs6PoS)|> +>|z]wz]v=Y{(-.vA"S}QfO_||q7raÛ +.C ;(-s޾&Q9Ȝw_Wda,~:cAB<qHϸt61SϬmxHUI@*1H_eզgkӼZ7 EyQ,4n7 +:QE55Orhׇ_`h64gpS| ~ vI \|s٦ ]rwbn D:}u嫅_._ j}%<)n H ߠ}]@ꊢ}OͪKlV4i P=FeU5/R$1L0Dɺ4(&ji51jD)ʪdCmEpwTYreQ:c`jwyr][] + UP]#׀~u#|@r;~|f0c7Z]m:zUmlZhm ;-Wg4MV pGUgݲѪ>N\6xwe<[hͷ54=Yj*FhՑEC;|jM csTA7r<ʔcxmϝ43QT$Wkj +!kNuad4mAAV$kiO sbY3ȶk7 +б!a5sUݰ#U[.Tg:_j΋Z^t1-m'zapa7-QSQrZ}^Kf{]ZuJr:ԣŽd']99mp tkBǂawM+ \DWWr"O1$*oBËyw67߱m}fiX~P)hܨfqPqŋk(%-[>9_ rrU_ț㺕ٖgVҶ JnyD 30ywִ-\$JV-C8k*ovn>)"Wu=^WTPϜ֎m6~lяdrdr5G*XU؆ex+~IڎOo C#JFIC1x!QA{)L=/#߻eIpF]^nT<QUMި9G ̱akzEtP̣AZ,7Pk6麇#3 +Wb&I۵(:rBLPk-.f(J& Gl1kj +<vqZQRu:}UzUHYBxy|ZLU5r)fJNw)&[,T@⡜-I3aï"H|Zxɴ嗱LUXjmq*6']57,%B76{Yɿ/BSW\X΃~;W#Ub3kxZ>+MWݻ(d/:U0d,.4ΕZ7ӂŅL]ҕr6SX +ѦdSmDHe^mFDG0೉UT^r"_QՇo7\֢$ 6.m[5ykcMA-ʵ\pVr jkAE0ݩ@-ԺTU +uZ5T aֺ\ǢѻVatXʟg *7wݾP1isb5djv]݊ > +f˟  +s+f˧ +endstream endobj 220 0 obj<>stream +u0Ezj. +HD߿iE@K֣zDJVĠ8^\$#]lUozVRȣgvZ_eZIuלx⿞5sZԲΧRF/rmnXIBz?\O0J Eѻv5g袪`HjALΕC`92cՋ+^XqA-*_ŰxBs.Jkp0O4]3)( : ߘV4?$ʂEo?o\$ƉJp(7;$2R#*Qz #qwʕ\kȖ{ Єł|n'\ q'2KT:`=k!iUm=>P@'2R#ԝ޾#j>RG" j.H->L+Stb$SbNL+]I4S.ſ͝}XnD*uEʥHCSw]hh,"SMKGe"g"̇T*B!FXJ"tC=kٕς Ht އwZt*x " I˅*7T2ph1g陖uaGJQ!{Ji;d,Vc{)xGo,ە[Z.U>)nYwu<(YѴ/wsY!oMیn=(wcvknײZܮihvp^/Evf;08B0:!MH510Tl8;Otg F%^.$:j%íDi0Yh\vz4Xw ͼi.jk_znjsbMoxkox_bC[[xGKoiK[iKЌ{b%T򧻅797@ߙz~quZFl;,<$ CVÔȰD7EI n`M'8ץid 9Z$tUz暰 N Me-kyo)76<(dB韜ۙ]M<Z6n:ezekZ-=z}87=VՖ 1J_UZ6V榭V03MFCmcŀn2=0דϏX쪼R-n/FgF:i=؋?/agiq4v5\ohn2}47Y^&ܙ+}"hў/L/ @oڑdV_y17hh:%?+_$s}qx&$kaãTN\XSӱsp4xdt.1Ngw/%VM\к6q'gKxqxui#5027taaݣX);t5::5^=)ĎU央&jbܡgjBb"#Y_Njae`.8ݿm͓\< }1n`iY΁<N>MM,He2CΆ>d''϶ +/^Ma1m聓;H룻qIl-|w(.j 'XMxVcK:ޛIzl9ӦϦi&;46|zx2p6/S+tp_;/#JΉu5(?8Hܩf=0Za}ةXrB ^͍ +`3'+UC3xRf[קY/N1:;ueҩƝ]=Q}aw GMNTƟsWbi۾x@PuPIq0yv1$=x7GXz>C#k{Z:6;О)<P @U!+U"k):^|HWtcض_'N.s\IVA!u;J./mBW+23 c{製gPY3RfۘT2[մ#T/{&e579\&fM݀v=ߍÓкa iprGB/Hh;MkY84U V0`0*GȚ Lh tUST}ݥ] *4uA#Zec M7 5 BkѷBL ±k8O,UOSF$ ye ?o<$LG.=L<"IJTq`S +2YHuY*鍆X;=~mF\ui:m.KrV1K 3XO[۝iFO>.7gZƋL;<f_Hi@x9? ^\ \2Ƈ[ ?M K>t5^9?}PY~H$!UD'${y?ۘ[?9qzMjc=N(l/7Zm/=4uT0eCXsBჇCOΪa|UGSٍeDI͜L'cY חOsTrWun;T:[8=ܛCMa=: 0`Hq ~aOJeEtu+9?w\^ +< + + y=`+}?Lenun&? ;8/~`0ؚJrdb <^ P.8ڑi̬x}qz?]+л=pҡ/NM #)Xp~ܲ'_Zltt2SQYM"1627uNHz~-榝éyV2WgR'EtgYNjgWPaֵŪ2pYfkef<'NΟj^\5cŕxq}s/eM5bi<ݺaO 3?zh`f秹ţV<ܚNOO+女˅ziBlp)vi8gCKezUov58[~ NG; }ontUC] FF7 CojQ#ߦ- ;$@~5h|}.ۨ'v3p^x6 +IߐTsXcgӉKzW+ۓ6'ό+ɏLub[336𻰽xˆO-?H>McKs h  OCsgfibpir)7w2wy f3y6ku2^Δ%q^\h D:S1mv*ti$1˶>8*XcS3b{s{+_= 8$R0F +opE:>\5bQyl"s|XȺf*:8[L)! VV:=31o+(!m-۾94>۝l{Av,~uS$/CߕN}*|6сH 2vNgRfw5؂&1WCAp&3 \CRӱq}PE'ϴ&!͑;7lű@+A3r, #s86R--nɣ#HzN<´XsBJW*mSou¹=`\W]Dhq=Q;J>̾HjK(z}`J׸s:d}]3I}#Ez8LZ]4Evn( e8kIGE)>:KY-75 ̸gzd]LhjpOT|qidu#+G9\N-6U-LäW͗uSlȚ51itBFx@EVgObk϶wU`=+jըe'6L uЊ̕'+}F61?ٰjFm.=M=wdJ&f* 9U5e>ڮ6 x*1:\ U_]<_F`5cǹþ1#7P?/>$YeCG;`G]j9Zk۝/UG=nvuN|"84]Gu'ζ::7RMւQZZ >׸meTbd(<5r,UOgNcӨZzy#eTG0LӅ:Σ?\_tu~@^ E/ht& ͍&?lu~񰢉QJ+xa8v4zyT \mG]V^Qج -.G_Tƺz8mhtu|N?Q iZba[IQڮ4ve;wp&>uuw8\6ꪶ7(MkYJjtoΫ&:z0o;*?uhM~SxQ۱%sj]0ɩ(-pj.FB&p1?:=>Q'Gu//,ψ]і>/Ϥ.iG;++;,2bY]H~gLN[*ȯ>3wUgwZų9]-tR>8VLcG# …nVrN mo5e7[fk[zcn_Qm{nuW{\aO6\ݝܬ%m|ڴ ++?֭cmI%}]ݣM;|=9xإSW;z~6=ۙ2}acK}lwc~=>,}NK]gKknD0^i7mIȡgӊ(̜t?U6&כo14>Nh j_Tnp`}DQj(XtǨ~h`0*a:ld ãZ[Q˨G[F`72ΣZ]G;|e4iEޠ亍oU P7t; qQ7m>1^8}:c)GSUʍF֩ ci!^0^tCC@۟v1agX%NFKM5 a@XHdyOL' aZ-ªY~g]98d)|SGЂC3Mnj6z 5{h'.G\Gb9I NK2[w 7Zv=شx~w\z+61 +^\3Sխ,ݳ{b!:TWWu}_slHc#Sɪv|&eoHHgwR(Lp"m_SLތ'E;4$cZc׺:-8s{R&nLqruNnGq#Yl% moZbor6ʔр:C6!XfIܞ>i24u_ ݾ ZtI$`q #!7`po1vܩugu+mIm[>`Gfje{LUٶgMdAu,'z1ɒW +!5Y""6+8).C[lTٱRʩЖWYL鎈{ƙc/ē]ƗDkc{ s 2&KvOM3,=Nւ +fi:Ϗh^f-ʏh!mv̉|/~EnHr~xߕilO#^gwizX.۳'([ɜqcbmPJфaCxIpb4`"Aa[5!?lx<2{ˠG4cH?]/6izv~+qI&d=%OBck#'T/>j kӇGrihȞa' ICǘE'ǡr-g˾fՏ0o,ew0I0[{ jz;3|ܤ)w'+}s8=wgb<.HJ 2)'[zHSE18LMu0vlMPrKxTox9D,vG8ѿLߤvƶ$e( +PΞۉn,W@~=풛b֭%cΗ壞tpd,_ߌ&b +.tqD8k,w>/WCG1{%XΗ+u Kpd,_|0e8_2ωr$&@'g̼g^ J*RnIs\60TL#(^R4J)KqHo*@ki<=C?ϖIΐAau$lfR|~tbL'l2Extc !!~מ٤CFdB7dIM0 Ώ9MƮJ9>g)|aP"y3m/dɹ'$Î z༼yQlȼ{}{|k9!l̋m% +k ,?dC!̴Z]#Ɲz HIGBYRgV'a ezCod;,& o9v^!U p|1;vcjq&[Wk4LIX ^ +KSvPP1S|J Jn#~1ICcK}?2=ZKoiN%`ygqu8A +=${H+4V$ VrbCdIwu<.plz6Tx?vHُLP-Ӳⅲq)s6!$Z6 S#(/GlTqdPmre&FMnWᜋ ~4_4<2l}~Broϲ_<vOY\7`o$@-I +]i%sTmuˇVZ?ۥYfRyxVa^uյR}O /A; 쮜PBo!aćLlvW8|a*W`` nUcYaM2د]ؽ 0",V!hˇ^Cד]Fߙ峙 ^\$Efu'78czk[e9Ы8+`꽅ǫˤO#&᷵`msp-J So#&=gik>. +x^wQǎ).Eq*D d3]C׋%džq!UeɹY+%톯;) '|hN§XS4QTLU褐+vت|q>>e%Z~Q=W`_H<}qSr%$ # +$`K w mD`_54 +/b g C9싓G'/nLPyV HP +xa} Dؗ+>> ;ϼ ꣉cP}!%/K ׀sXhc`_/g${ sճSG,_R6`;e帉pR𘾀K`F} fD~\#*~)&G^U4 B2HR3T62ȴ%-3eX)c +Xr/\o1:'RM°!g_B(ɄLa)j_ 2e=& cb6\<g43 _4W/9_Cs:+Ģ𸎟@MrD}GVnOSL.4W~Kc"ep s),|lu i֞cg3%! m7QwA4_Fs_Z T+r=4az`1JP*k`AC#qTk%akC}]%F>s/4*9W15.}ܛd?+3&59YM>DQQƜ!=ɵI&[ +~R;VnFnBzMШi>V12 ( +Q2C(&GxB _lFf~i8R?/Q/33_"^fHS e^kچm_jT=~#ߐ V!%"V2}1.|n)ߥ\_ ޛ幣44r9}ϒZzCRT\uwv1!Tc'T 'H'=TȴT UwK|jzY+-Ż #' H5·=9Jsܾgϕ1R4,-ɁaLpY8w{9%ςc\<wzb0CI æiw܊aBS33Ƀpݪg٬ !Mq1}c^0u`!1q?.vhߗ'lu8cgT6bj((քSڟ@7j4ݘ&z+ U\{Pi:i{!4ꑯ Fy&ܹy6( Ah, >>q&߰l#fl}2+kON_P C'%fq`]{p-{7?o_7U}DJu7巈2]`U~L*h']6OKRM)V0%X`zsL|f-6k=|P!R(󔫙T&׆wlfJb.192%n%fޗ%&xgG4,3gLQLۥ4&Q/ ,}L=h芹vQ`E`^qw _p]pLrrۓn'tmq\4rC6] \uS=0L?rˇK NliЎ+3#Q=BBMbpZ/a`h"֒O@-P&% "(f#0ĘG d$"DGCg(4ȴ: x .H"*'pCyeHBȋGYGxxĽ` GBC\0KnbzYc7Z ׊HR2tRa\r + a9+F,VS;~tDieCӭVʆ*xC +2Ĉ]0:<.eN2,䢗Z0,/x xa[ t Sъ%9Ӡ$т ޑ &W;t3 +CRq~ZZ0a<:WC.8VOu +æzLL% +]C<= , fւ4Əi< ,_0;wqx/& p6V +1ϙW  ħ<&V;d3<^1v~f-x cjѸW3:DV0aߓ!5oŔ#F.xl1N +/xCM_؃a +&O}R +&gG<%PH>P0Yat]$Od]QJG)x=qw©&Rnf67b3)Iؤ@PȋF<Ut u;fiY/>-77W$ű&y Q]m4yU*MK7%ay:eU/O/b[Yq})o8OSMV֏'ʼn<ɒpq.W/T_L*^*K=SwUoMdj:L/[M6L[;\jUK-!B@l]RPlj!o 'hu.yQZ._/c2a}bYh?QBOϽEB Urn [@ݺĆ!}lVήA|[P Uk kutCW,9m4M|'_MŒu{}DmWUhh"_C,e.z _J + +EIۃk`DFt1yBڝ ؿT;G/ +`|~B›ظخv 7F>OϷg|hyQFm}]Gؒv+eח{͍'\rlɟrgcCvmvU]:nwasQިKƍyڐ?lnGP+ p_S?l?KTԾ>EApc +'W Dz3dG=s0W j"iCY:kݮw+[(e*gz̩\keBY`B5vqϩ TlZ[oQ@F80l^>lryг3doZ7e8?O\^V_ץܜӘЎ68oкNm7)і䊁D^'2t6O5cNOltLơ h˰=]ݭJD&7nߥz|n=!K$.";VݿB%_h<)@ (75gn@||o_l~UM62,tgZ38 )A-qxf +SMHn:hy DA7Fg ':U$3s#r-P;3߾"lsS$L4Y@i!RX1f0Ш8|6nupKJ43)];gJ>~_#]5EFGJի ߃/xmWr֘=c:;{FGNzR^f,s1B+,\ƕCդw}ڃk0FW_8r.'"0b-ď]߆'73t?J&v0H~7__`f寋+zATEMcX6OtY[[Kr=]}d2 -R&ct#pTmskjw[ha1jӎJ?NǼ٪hX0$kE^hT(~DB|VSOM%T[bjSI/+MoNfVRV jW*?r~&2ڤG ;/LW`ڪT̬J՟Y;p-GK$z_W? ʹH'bUm>eU7Ҥ23+ 4cmq%qv#@[Oڌw~e?NFU+Gم Fag*++-B)`/7rA%./ɘ@~NN +؎jpbb6=}1'frv(X wͥqssu{7p-xODJ`ګ@D*o!"FP.rE&].VɇRSj݈D6i)SOO4k y%uLI(S=Ukr1ra}**9l|gXXd2& 79f}m6Rj#aTƔӷ9ҡ@_+`=T*h͟9`MJީ |!9+9yX}؄y]%ϘWh#j dx=pقS8<3ge*< hK]vjun"ݎ;LD'egI\w6:z#ieb~7 Y~nKp?Ԛo^&/j/N 8=.w#Olu-QuUrFwY39]Qb%THw7nUݧ:J yz}^_VDFy#Ov]Jv0b-WY6ǂ_ļMjVfyN<T!#Yqɸ\21>uwŸ~(d:Rz!S22r3r׆D7@~O?Vn!O˅$8[ +ϋ>ZP@\17"\4N;k_VPllYfIEjyܳ]X0MhjQl{ǧb\ʆ$?|{}7?zbchmcԚ^dFgj_ۯL';++wznI:5?)C(d!{b~.6akz c'y,R3S Dz0"|tIxQ\iZ]ݵ1r̿<̡hΖ_ࣜ_tҝa'gQXǸ7nyى *'-vQP9F0|hmJH^VA37Ȟw_CԦ[ַ+ɷjLzWMlՄl5}=?ekI|Nʮ]eN}®DXLJ8~qXEl gH _i8 ~iց iWv}z-W*!9\}/M<Ad}Y ʡ>d\{hD_ 8r3f1e[](<|m..˜mmtGg []jg5"$G?)S0U xS^}[g;>oTYmqT"vŊ9mЉ[fd D{۟"^%F, '-B`m:'/w8U$H<;w0a)IlWalJH-Bj9Y]M:Ձxw'vwN=0(3v}JguyyPݛ[R>aVv}Cn݌y訑$#ƫ0ԫ iN{-u1w ^*h峙[ nAPajC6rw<\kBQr Z ӷv'ZYds֏3܃q?WY,`y#L0 i|;^pn"wu_ߴ^k,[:ēU{tm^G}yI "hqlsict칈DBgMG "b *a"x< z?{|z߾_6TRQ+ʚV4,?evQߡnc|~x8Kll4Evޞ+aLb^*$Bőv W@oԡJPёʙF*sT?hEQPuـDI3/(t&|z)wb߁`hКYhJR]DA`J5lhJQ5dAW (ЂX?b?ЂUY4/ +UTK0L >  5]LQ+"T{~oj,fQSTX>4CdU. 4^x" XkUdE`Gbyuu_fh,$K0LT UE% PRIdhfQUA4,x%r **BDW hh*@Ei lDVVeKb!uuA7৒*,fH +e-V Q֋yL[egfJ0)]I 誨Sj:(\j'@?IRMjj$)h*J'\¼En!Ӛ@(2O 6%e _!Y-ZTMX!UE +MJVI0eyBl"4.Eγv%Yd 54BLXvRm#xKLސ4l-M!$HC `5!.W}‹Ԁ(*nmSLY!2E t!(dGMG!~H)EƟ:n^7u Kh A5qt6J>уDAHC$ -"ȴ}ܸ{%A + 0l 6ʄط|Jd>UU05&K› a( %؝"04&p-87(a +P@N*Ʃ0׈LMN l`$ ;VSa,deIde ab lGox(K(aBµoEo?^dORu"D 9[QMralA@mJQQt H T@] ,+0*Z.@:ev/ZE-!z&y$(at D(—C&#xQQVcSTyVTDUe ͠[$G1a)ɚq2i-B$}"ʤq$ aÄoTwZ.ȃ"nr$Qs2e%E&A"*t Pt +`z2LC"t(J".96N@K+&J)0i$4CL\= %h0EaaKIF kD*<_pb |YSQ/ A |ŀ!jTFh \с,;. U𭮁10U 5ja +2,!ZtA@Ihhq nE:hnSA$UЇj(5Bx0>jt׈ChŀL +ݛ UePDqduOD d!`M,݀^QoM CDQ Ln5\Gu[҉T)U6H"@ʠTXR~p +nqhWU4ר8Q-ȆLqz%dph$F K+ZaPI`І4*FET/#F@BlMX"D3[*.Z:uJ.TU\m,L|U,Wgϒ=?X Hבu4ˉ&>'|>:-:uXM#Z;3؎lۭfrfUngHI^ ,LXddJ$@fGytrh}QCF*nChb*p-! +KaWMh#) +\Ehh%$N+}ޞh7ASYjMLTNPCmӇDCF(|H[ PNC7 $42,ad&ڝ1`sPj(1(GG VDo52%KЈ6qb: bu U~B6Hv SewGt4t''$ b^ÎT0iY)E ~ *,%"iAa9| -sEh`,ve҉$+L_[ - (A)L4jt_MMVP8bDF&Pw-ǐ[dt^HBT*&Y9hW#n pb$#2!ZA  VB2\>h:O0Fb x{M6 !p=,LgiXP2ejNAh7U@UQx̏!2;0$]M3<4"TC0$-}fUbL@‧b$^Hڲ$$.eopI jzO^B&: +"@|KhHK6='HXCG]Y߇Ѵ%{OȞ },`Xr +:`ɤ@@&N7r+_ RAhj@a> +Ƽ~YXz + +n AvO%x훎i.;j=6Ld +f'Ix +-gC?ozY,y2Ad!r +L>OHzw{U@ dkL+X +endstream endobj 221 0 obj<> endobj 224 0 obj<> endobj 225 0 obj<> endobj 226 0 obj<>stream +HOo] S£!6n piEBQ ʧJϊ]%ͼyxxwqm޿};~\_v˱Kǻ=7?ݽOwo_,K-T()6%k{Z ǽR{^+[O^JgO}ԽtLrGKm.R|OSnX(=lnr9Y5(<nSυ8[}FV;q4e:d$8[✩ζI؝8Fxt:놇ĢXWo +Z=F4 ֜U "2Zj*g',X,O-Y;ā:HJ!qEK#O dJ"I2@h a~-%t<Ȃ-x0ˠ 94X7'8'g !+Ҫ . !L|̤qBE% et.Jʛ +S'TLzlCkA*_#@Ʈ)K3$Nz$M4N/S0 M:Kzՠ ~+(5p.¤., dL[x%3p"VFEMR/yUEEc-I0:2  (#zDK)lM@f*Cd5؍+:2A(U%W ;. +S?!GdHe*[0XKu@-+x\ Vz + *dEXt@`=HJ)Qc`q5JWrۊLIk.2,_ Iº 犷3W-ZB=N$nי +T%RxS0aRAgZE5om.+#"2UX* ,;i. vh1Pk"-nvOpPL(n%mD aP!>hsS;~H +Eb-HH%W +jF: Ȫ3!G.jJ:уv?}Q5P b9H{c*l?NI +Tuj9KчjP-a=+.,e}0 ޤAn*ok鎣ɂNcLZxV%=4镞=tWq)V{FIeV)RIe0qЮlbWBx$l9w;PlR*ŹxȻiss[BeÐҦ +R~m[5wT]%v4ΡV %( +yDM8ԚQN*m*8|2þfk蛤QՆSu/;*C3ƨ3kFAinj,Tz<TL?o7)A x9!54Qa/xW/2ArJ}u6+Kwm-PrcfGy}Y&]NlGXc,ԘLR3O$GcPRgDLFh߫"p\iOWnonwǫuy<=]pv|>,q +endstream endobj 227 0 obj<> endobj 228 0 obj<>stream +H|}Pgw5jF]Z" E BEFBbIRƐ^/TXXRzvƎe:gtsung~}gVb+Mɢy>uYkZYtbMlj7f))$"U*bIߊmʚHHIR"XN V5DXOċ.BF ;G\!Ƚo2WC>Vir 0RaѮ$᳗5R6<=8jln^1 7/p}:~17Nm[V'8<<} pi&*ja Mܰ>` +stqN >u25Lxyk]%]q-¯Pqa;!.wDP!J=?vbq^7A8HW~=5m, S8fxſ4GM{an&;z*P?jz/'p¡NC<<9,_7 rQSO`$xgnMeZ/5h^}}Yvlâ,X,;C~zS+_ڡ/eum]nG}8yn9 e^ o&0g;k8ѿA& jg^6x:}ߋ̶,'ㅍܼ oN }|Dҡ\C4s \W_[m?:nj1B""S`C4*z^Im9qԝ% +7K&` tĘw>qXk|vtyS?QӵMñ‚ {-*CYƀB9awn'saH< f}"xP8$lA;Fe{? +O(o>DKyPKWQ^Ƙ^=U/3eJ/scMgS\ukm (X vUb*\{th}nFv6`W۸R)fW!yuRs T_-|☻5Po[);KT)EJ=-Q'}߲C{mձGڥ:^HAO C1Th=<3D[5"zX%X +BR؀sp_A釅X,%?g۰L88䚢Z+h2/!vJC/ƛ5_7C5Lf ^Â=k~9^|HD5c!iGYM;|]s +nY{<_HH'@%aCu4J=>׸ ?[y: gc~E\y6ise&<T  kS*4G` +endstream endobj 229 0 obj[/Indexed/DeviceRGB 255 230 0 R] endobj 230 0 obj<>stream +8;X]O>EqN@%''O_@%e@?J;%+8(9e>X=MR6S?i^YgA3=].HDXF.R$lIL@"pJ+EP(%0 +b]6ajmNZn*!='OQZeQ^Y*,=]?C.B+\Ulg9dhD*"iC[;*=3`oP1[!S^)?1)IZ4dup` +E1r!/,*0[*9.aFIR2&b-C#soRZ7Dl%MLY\.?d>Mn +6%Q2oYfNRF$$+ON<+]RUJmC0InDZ4OTs0S!saG>GGKUlQ*Q?45:CI&4J'_2j$XKrcYp0n+Xl_nU*O( +l[$6Nn+Z_Nq0]s7hs]`XX1nZ8&94a\~> +endstream endobj 231 0 obj<>stream +8;Z\tb7VW7$q)Oq',C:3#8E>M>c$-\+B]mjG!(U/PJ]SFJ&!W$7@4>\z!:X'SQu3O/ +I,#j06Orc)mgoje=#m#DSX#9=4%liGI-C-sY1lr[V8XV>V>=BJQ\]3jdq9jGA#Cgl +8UV=J9P2mhFuLBGT1D,Ien`"R41C@EoeCU+mCn5OkY/D(U:,!S1bHnnod-U0"@c`s +6J[s(jJTCYTW#%;TmOur?@8e(SMIc0s\d-bHc*om>*1g!a1p)M@AE]3+l=g^^7OmSB?_m^#:4fYE +o$amMGk,4Q9X4U"z!!(qI49kl+'uB;~> +endstream endobj 232 0 obj<>stream + + + + + application/pdf + + + Adobe Illustrator CS2 + 2005-09-04T08:26:13-06:00 + 2005-09-04T08:28:22-06:00 + 2005-09-04T08:28:22-06:00 + + + + 256 + 92 + JPEG + /9j/4AAQSkZJRgABAgEASABIAAD/7QAsUGhvdG9zaG9wIDMuMAA4QklNA+0AAAAAABAASAAAAAEA AQBIAAAAAQAB/+4ADkFkb2JlAGTAAAAAAf/bAIQABgQEBAUEBgUFBgkGBQYJCwgGBggLDAoKCwoK DBAMDAwMDAwQDA4PEA8ODBMTFBQTExwbGxscHx8fHx8fHx8fHwEHBwcNDA0YEBAYGhURFRofHx8f Hx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8f/8AAEQgAXAEAAwER AAIRAQMRAf/EAaIAAAAHAQEBAQEAAAAAAAAAAAQFAwIGAQAHCAkKCwEAAgIDAQEBAQEAAAAAAAAA AQACAwQFBgcICQoLEAACAQMDAgQCBgcDBAIGAnMBAgMRBAAFIRIxQVEGE2EicYEUMpGhBxWxQiPB UtHhMxZi8CRygvElQzRTkqKyY3PCNUQnk6OzNhdUZHTD0uIIJoMJChgZhJRFRqS0VtNVKBry4/PE 1OT0ZXWFlaW1xdXl9WZ2hpamtsbW5vY3R1dnd4eXp7fH1+f3OEhYaHiImKi4yNjo+Ck5SVlpeYmZ qbnJ2en5KjpKWmp6ipqqusra6voRAAICAQIDBQUEBQYECAMDbQEAAhEDBCESMUEFURNhIgZxgZEy obHwFMHR4SNCFVJicvEzJDRDghaSUyWiY7LCB3PSNeJEgxdUkwgJChgZJjZFGidkdFU38qOzwygp 0+PzhJSktMTU5PRldYWVpbXF1eX1RlZmdoaWprbG1ub2R1dnd4eXp7fH1+f3OEhYaHiImKi4yNjo +DlJWWl5iZmpucnZ6fkqOkpaanqKmqq6ytrq+v/aAAwDAQACEQMRAD8A9U4q7FXYq7FWmZVUsxCq BUk7ADFXnnmv84bDS3kt9Ls5L6ZDxa4kDR24b2JHJ/wHvm103Zcp7yNfe6bWdsRxbRiZHv5Bgdz+ c/neZy0csFuv8kcKkf8AJTmfxzZx7KwjvPxdLLt3UHlwj4I7Sfzx8x28qjUraC9g/aKAwyfQRVf+ FyrL2PjI9JIPzbsPb+QH1gEfJ6z5X83aL5kszc6bLV0p69s9FljJ6clqevYjbNJqNNPEak9HpdZj zxuB+HUJzmO5TsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVW TzwwQvNM4jijBZ3bYADqcIBJoIJAFl81f85F/nL5u0bzkvlzy5qLadDYwRyXrwhfUeeZfUCsxDUV Y2WgHjv2wMgHmtv/AM5EfnFA1V8ws4qCVktrRwadviiJH0YppPND/wCckPzHudYsre/jsNSiuLiO OaGS0QNIrsF4hk40PgadckJkciwMAeb2T83vy/ht0PmHSYFjhFBqFvGtFWuwmVRsB2b7/HN52ZrS f3cz7v1PNdtdnADxYD+sP0/rec+Xtf1DQdVh1KxfjLEfjSp4yIftI9OoObbPhjliYydDpdTLDMTj /a+m9E1e01jSbXU7Q1gukDqD1B6Mp91YEHOPy4jjkYnmHv8ABmjkgJx5FG5W2uxV2KpFrnnzyZoF 4tlrWtWenXboJVguJkjcxsSoajHoSpxVG6H5h0LXrNr3Rb6HULRXMTT27iRA6gEryXuAwxVJP+Vr /lr63of4m071uXD0/rEfLlWnGletcVZXirsVakkSNGkkYIiAs7saAAbkknFWJf8AK3vyv/6mnTP+ kmP+uKstRldQymqsAQfY4qpXl5a2VpNeXkyW9pbI0txPIQqJGg5MzMdgABU4qxhfzc/LFmCr5o01 mY0VRcRkknsN8VZbiqS+YfOvlHy4F/TmsWmnO4qkU8qrIw8VjrzI+QxVI7H86/ypvZxBB5msxIxC j1WaFST/AJUqov44qzWORJEWSNg8bgMjqagg7ggjFUj13z35M0C7Sz1vWrPTrt0EqQXEyRuYySob iTWhKkYqiNA81eW/MMU0uh6lb6lFAwWZ7aRZAjMKgEr3piqa4q7FXYq7FXYq7FXnnmfX31jz1pXl GzatrBOlzqrKdnMI9YRGnYcd/c+2bXT4PDwyynmRQ+O1um1Op8TURwR5A3L4b0+O/wAw/MH+IfPO uayG5xXl5M8DDf8AchisO/8AxjVc1Tuwx3FXoP5C+Xf07+auhQMvKCzlN/PXcAWo9RK/OQKPpxQX 3Hdx20trNHdANbPGyzq32ShBDA+1MlEkEVzYSAIIPJ8mSBBIwQ1QE8SepFds7cPm0qvbk9k/IjWX lsdQ0eRq/V3W4gB/lk+FwPYMoP05oO2cVSE+/Z6r2fz3CUD/AA7/ADeqZpXoXYq7FXwV+cfmr/E/ 5ka3qaPztVnNrZmtR6Fv+6Qr7PxL/TiyD7B/KLywnlP8tdH06ZRFOtv9avyRQiaf97IG/wBTlx+j Fi+IfL4e/wDNumiReb3d/AHUbVMky1A8OuLJ+iWLF2KvKf8AnJLzwfLX5eTWVtJw1LXibKChoVhI rcOP9geHzYYqHzn+Qfkb/Fv5iWUc8fPTNLpf39RVSsTD04z/AK8nEEeFcUl9xYoeRf8AOT/mo6N+ WsmnxMVutcmSzWnUQr+9mPyIQIf9bFQ+c/yI8q/4k/M/R7aROdpZP+kLvw9O2o6g+zS8FPzxSX0X /wA5A/nHJ5I0uPSNFkX/ABLqKF45CA31WCvH1ipBBZiCqA+BPahUB89/lb+WHmD80vMN3Pd3ksdl CRJqmrzcppGdztGpY/HIwqdzsOvYFSo/nV+W2nfl/wCabfSLC/e+huLRLr98FEkZZ3Ti3Gimvp1G Kh7h/wA4j65ql75S1bTbqVpbTTLmP6lzJPBZkJeNSf2Qy8qe+Kl4N+dXmg+ZPzM1u/ST1LWGc2dm R9n0bb90CvsxUv8ATiofUP8Azjf5X/QX5W6fLIgS61hn1GY9ystFh38PRRT9OKC9QxV2KuxV2KsT 86/mn5I8lXNnbeYr82s16C0SJFJMQimhdhGrELXb37YqiNN8/wDlbXrGZ/LWrWeqXojZre0SdBIX 4/AGjYq6gnxGSgBYvkxmSAa5vNNG8q+ddLtPN+s3VhK2trpl19QFVdpbmdWbkhQtyYFeg8ad83Ha OqxyxxjjO36nQ9k6LLDLKeUUf183yPJHJFI0cilJENGRgQQR2IOaV6Jbir6M/wCcPvL/AD1DX/MD rtDFFYQN7yt6stPl6affigvefzH1X9GeTNTnVuMssX1eLx5TH09vkGJzL0OPjzRHx+TgdpZvDwSP lXz2fNOde8C9A/JG5aLzk8QJ4z2kqEdvhZXH/Ec1fa8bw33F3fYEqzkd8T+h71nMvYuxViH5t+av 8L/l3rero/C5W3MFme/rz/uoyP8AVZ+X0Yq+Nvyh8q/4o/MXRNKdOdqZxcXg7ehb/vZAf9YLx+nF kX3R5hn+r6Bqc9QPRtJ5Kt0HGNjv7YsXwX+Wlsbr8xfK8HEsH1Wy5gdeIuELH6FriyL9BMWLsVfE f/OQvnj/ABV+Yt2lvJz0zRq6fZ0Pws0bH1pB2+KWoB7qBikPf/8AnGbyN/h7yCmq3MfHUfMBW7cn 7QtgCLdendSX/wBligvXcVfIX/OVnmr9KefoNEiflbaFbhHANR9YuaSyf8J6Y+jFIZl/zifoFvpn lzX/ADnf0iikJt4pn2C29qvqzvX+UsRX/UxUvAfPnmy782+btT1+5Lf6ZMzQRsa+nAvwxRj/AFUA GKX2p+TnkpPJ/wCX+maW8YS+lQXWpHubmcBmB/1BRP8AY4sXzr+b35ffmt5s/MPWNXh8u3klkZfQ sGotDbwD00Zfi6Px5/ThSC9M8oWF3+U//OP+qajqERs9enWa4eJjR0uZyLe2X/YgIxA9/nih8u+W dDudf8x6bo1vUz6jcxW4bw9RwCx/1RucDJ+h9lZ29lZwWdsgjt7aNIYYx0VI1CqPoAxYq2KuxV2K uxV8T/8AOSXmE6x+a+pRq3KDSo4tPh/55rzk+6WRxikPL1ZlYMpIYGoI2IIxS+pf+cTtc8zX2m+Y X1bUZ7rSLNrdbX61I0npuVkaXgzklV4haitPxxQWN63/AM5L+Vda1a4h1ryRaaro3MpbzTFGuvTB or/vI2AJ60BFPHFaUY4P+cVvNeyvfeUr2QfZZnWMN82+tQgfSv0Yru97/Kry35J8u+V107yjfR6l YtIZ571Jo52llcAFnaL4RsgAFOgxQkv52DVbyy0/TNPtJ7oF3urj0I3kCiNeKcuIP87fdm47J4Yy MpEDo6Ht0TlCMIgnezQ7nicsUsTmOVGjdeqMCCPoOdCCDyeTlExNEUzr8lY2fzsrDpHbTM3y+Ff1 tmt7WP7n4h3HYI/f/wCaf0Pfs5h7J2Kvm3/nL7zVSPRPKsL7sW1K8UHsKxQV/wCSn4YpCj/ziD5V 5Ta15qmTaMLp1mxH7TUlnofED0x9JxUvdvzGuTbfl95nuBx5RaVeuvLoWFu/EHp1OKHxf+SVv6/5 r+WEoTS9WSg6/u1L/wDGuKS9/wDP3/OUul+WfNF5oenaL+mUsT6Vxei7EC+uP7yNVEM1eB2Jr1rt itI/Vvz2juPySuvOcNt+jNSvHl07TrT1fWK3JJRXV+EXLglZPs9qYofMv5YeTJvOfnnTNDoxt5pP Vv5BX4baL45TUdCVHEH+YjFkX35DDFDCkMShIo1CRouwVVFAAPYYsVK/vrawsbm+un9O2tInnnf+ WONSzH6AMVfnh5h1i71/zDqGrz1e51K5kuGXqayuWCgDwrQDFk+n/wAzAPy6/wCcdLTy5ERHfXsU OnS07y3FZ7w/IgSL9OLF4F+TXlgeZPzL0LTZE52y3AubodvStgZmDezcOP04pL7D81/m9+XXlPVB pXmDVxZ35jWb0BBczURyQpLQxyKK8TsTXFCE0T89Pys1zVrXSdK1o3OoXjiO2gFpeLyY705PCqjp 1Jpiry//AJy981enY6L5WhejXDtqN4o/kjrFCD7Fi5/2OKQwv/nFTyx+k/zCl1iVA1vods0ik7/v 7isUf/CeofoxUvsDFDsVdirsVWTyrDDJKwJWNS5A6kKK7Yq/OXWdTn1XV77VLj/ei/uJbqbevxzO Xbf5tiyQeKvqDyb/AM6X/wA4t6nqx/dXmsR3EqH9rneOLOEj5IFcYofL+KXYq9l/5xTh1GT8zy9s 7Jaw2M73ygni6EqiK3b+8dSPligvSfz3/PvzD5O8z2/l/wAux2/qwwpcX89whkq0hJSJVDLQcAGJ 677U7qgMb0z/AJyt0+/RIPOPlSC7SlHntSrgePGC4Df8ncnDJKP0khhkwxmKkAfez3yP+af5BnUH vtLvE0S/nj9GSK9EluvBmDfactAN1HR8ty6rJkjwyNhx8OixYpGUI0S9etrq2urdLi1lSe3lHKOa Jg6MPFWWoIzHcpUxV8FfnH5q/wAT/mRrepo/O1Wc2tma1HoW/wC6Qr7PxL/TiyD7A/Jnyr/hj8tt E0104XUkAu7wd/Wuf3rA+6Bgn0YsV35zTGH8q/NDgA1sJU3/AMscP+NsVfDvlvzBf+XtYh1fT24X tukot5B1R5YniDj3TnyGLJL2S4dDcMrsjPxaYgkFzvQt498VTO88y6hdeW9N8vM1LDTZp7iNAftS 3HHkSP8AJCUHzPjir6A/5x60WDyb+XHmD8ytSQCWa3lFiGHW3tqmg6f384C/7EYoLzDRPzZ/OHWt csdKtfMt59Y1G4jt4gOJAaZwo2p0FcK0+h/+ckfMx8v/AJVzafHMzXmsNHpyOx+No6c53NOtUTif 9bAgPnD8iPKv+JPzP0e2kTnaWT/pC78PTtqOoPs0vBT88Ul6h/zmLqcpuvLOlgkRKlzcuOzMxjRP +BCt9+KhLv8AnEDR0n8067q7LU2NnHboT2N1Jyr86W5xUrv+crvLnlnS9Ts9ThaaXzHrkrzXTyS8 lS3t41iRVjAAUEkU/wBU4qEB/wA4m+VjqHne81+VKwaLbFYmI/4+Lqsa0PtEJPvxUsJ/PDzQPMn5 na3exvztbeX6laEfZ9O2Hp1X2ZwzfTiofRX/ADiz5X/RP5cfpSVKXOuXD3Fe/oRfuYgfpV2H+tig vY8VdirsVdirsVeSeff+cavIfmZ5rzTlbQdVlLO01sOUDu3d7ckL1/kK4rbwDzH/AM45/mjo+pR2 kGm/pWCd+EN7ZHnHuaAyBuLRe5YU98U29M/5yduIvLv5deVPJlq1EqgIXvFp8KxCv+s8ob6MVD5k xS7FX1D/AM4f+X/T0jXvMDrvczx2MDH+WBfUkp8zKv3YoLwn81df/T/5i+YdVDco5rySOButYYP3 MR/5FxrikMUxV2KvsT/nFK2v4vyveW5ctBcahcSWSHcLEFjRqexlR9sUFm35t+av8L/l3rero/C5 W3MFme/rz/uoyP8AVZ+X0YofC/lyfSLfX9OuNZSWXSobiKS+igVXkeFGDOih2RasBTc4sn1R/wBD dflt/wBW3Wf+RFr/ANlOKKb/ADB/MzSfOv5B+adb0myvLezjeCzBvUjjLs1zAGZPTkmqq+p9+2Kv k7S9Mv8AVdRttN0+Fri9vJFht4U6s7mgGKXuv56fl3Y+SPyn8q6XbBHuIr2RtQugKNNczQVdt9+P 7sKPYDFAeK+VfLt75k8x6doViK3OoTpCp7KCfjc+yLVj8sUvsD87fKs0H5HXuiaBGRb6ZDbUt0Hx NbWsiF+nUgLzbxpixfKv5WeatL8qeftI1/VLd7mxsXkaaKIAyDnE8auoYqCUZw3XtiyKe/nd+bX/ ACsPXraWzhktdF05GjsYJqeozSEGSVwpZQW4qKAmgGKAHtv/ADi1+XN5oWg3fmbVITBe60FSyicU dLRDy5EGhHqvvTwVT3xUsc/5zB0O9M/l/XUQtZqk1lNIB9iTkJIwx/yxyp8sVDA/yG/N/SPy7n1v 9K2dxdW+qRwGM2oQustsZOIYSPGOLCY1O5FOmKlin5l/mDqfnvzTPrl6noR8RDZWgPJYYEJKpXap JJZj3JxS+g/y2A/Ln/nHW+8yyD09R1GKW+iJ6+pcUgsx8vsP9JxYvlJmZmLMSWJqSdyScWT6q0D/ AJyi/K3RdD0/SLXTNYFvp9vFbR0gtRURIFr/AL09TSpxRSfaD/zlB5E13W7HRrDS9Xa81CeO2g5Q 2wUNIwUFiLk0UVqTTpitPYMUOxV2KuxV2KpZq/mXR9HuLWHU5xareFlgnfaLklKqz9F+1tXbLsWC eQExF00ZtTDGQJmrSH8yfyw8tfmHpFvaao8kUlsWlsL+2ZecZkA5U5BlZHotR7bEZS3gvmfzv/zj H5/0AyXGkKvmDT1qQ1qONyF3+1bkkk/8Yy2KbeR3FvcW07wXETwzxnjJFIpR1I7MpoQcUvsXyaP8 B/8AOOC6gQY7tdMm1AE7Ez3lXgB8P7xFxYvjbFk7FXYq/QT8tfLw8u+QdB0fjxktbOP1xSn76Qep N/yUdsWKv508o+VPM+j/AFPzRALjS7Z/rbK88tuitGrDm7xPFsqsftGnfFWIQf8AOPH5I3EEdxb6 Es0EyiSKWO+vWR0YVVlYT0II3BGKbU7H8gPyK1C1S7sNGiu7WQsEuIL+8kjYoxRgHS4IPFlIPvit spb8svIzeTx5OOlgeXFbn9RWWdasJPVqZQ4lJ577v+GKEr0b8pvyn8lXo8xWOmw6XPaqVF/cXU7J GJPgJrcSvGpPLjXrvTFU48/eVvI/mDRVj85RRPpNlKLn1Z53tY43oYwzSo8VB+8pQtTFUB5W/Jz8 t/KurLq+g6OLTUURo0nM9zMQrijUWaWRdxtWlcVZmQCKHcHqMVedaz/zj5+U2rX0l7PoggnlJaT6 rLNAhJNa+nGwQf7EDFUT5f8AyL/KvQrhLqy0GGS5Q8kmumkuSCOhCzM6AjxC4qzzFUHq+j6VrGnz adqtrFe2M44y28yh0Ydtj3HY4qwCL/nHD8no7v6z+gy+/IQvc3JjBrX7Pqbj2O2Krm/5xy/JlmLH y6Kk1NLu9A38AJ6DFbT3XNC/LnzJpNr5T1J7a6sYpvQtdMju2ib1rKPeICGRJGaGM1ZOw3IxVIf+ hcPyY/6l7/p8vv8Aqvim3f8AQuH5Mf8AUvf9Pl9/1XxW0z8ufkp+WPlvWLfWdG0UW2pWvL0JzcXU vHmpRiFlldPssR0xQzfFXYq7FXYq7FWMfmP5abzB5XuLaFeV5bkXFoB1MiA1X/ZKSPnmZoNR4WQE 8jsXA7S0vjYTEfUNx73iHljz75l8tSCO1mMloG/eWM9Wj96Dqh/1c6PUaLHm3I373ktJ2jmwGgbj 3H8bPYvKv5reW9c4QTv+jtQbb0J2HBj/AJEuyn5Gh9s0Gp7NyY9x6ovUaPtbFm2Ppl3H9BTjX/Iv k7zDNFPrejWmoTwkGOWeJWcU7cqVK/5J2zXu0SX84/J+peavy41TQdI4reyLE9tCSEVzBKsnp1JA FQlBXauKvh7XvLmveX75rHWrCfT7ta/up0KVA7qTsw912xZJbirJ/wAsfL3+IfzA0HSCOUdzeRmc UrWGI+rL/wAk0bFS/QLFi8Os9U80XFp5uay0TVIPMvmfV47aK4vNNl+rQ6fzW1hZ/rEZidEtld25 Ar8W/uVS8fmL+Y9/q+r2ukxzrDpljfkaBa2cbKoDfVNM9OVEaWRnc+qzIQnFdhQE4qs8p+X/AM0b DX9C8qyXmpW3lXRbqThcW9msKO1laRSMrv6fF4J7iWURl2IanduPFVvTfNn/ADkdPZhpNOuFkTTI 76stnEjvJBLKskLKYkAnuGVB6Y3WL4gA5wKran5o/OOP8vobq/sH1DUL2/Ny9rc2ACwWNpEJWhuF lt4VBmnCrFVOfZWLb4VQP6T/ADC886JJZzXN3qOjXOrxn62thGvpQaTB9aul9OJP923XCOFZGJJW m5rirJfLd1+Zk+v6HqXmmXVUt9J0D9IX1va2YEd3e3ErBoHiSOhmSExjgByBrxC/FUKk2t6r+all f65r2kaPqNrdeYRPPaTR2Iu7mO3sEWCwtXiKyJCZGeSZ+YJpsPiwqnOqa3+eFnqms2ttFPe2ukWt nepcraxAXUiWSia0tiIqSetdlnk4/EirxXiSMCpp5T1L817zy15wvLtriXUYkMXlmC9s47FjMtqH aRY+CkxtNJROZP2aE1rirCdDTzbpD3GsaR5Uunv4rO0tpdb1OyvJdWN9dyql5LxeRhPFCquwEcYG 670rUqraVr//ADkHfyzAS39pGL+G1szeaVCpZLi7YGScCFQsUFrAS7qaVcDlWmBUdqHmj89/0Po9 tZWtyLrVLm8d9VlsQJbeFbgpaR3EKW8qxgxjmxaMEig5KanFWRa1qmoQfmtZ3WoaRql9aaFpDpY3 FlY3EtvJf3fxXDrIqsgpDGEG9asR1xVgGpQ/m2moabq9rp13D5jttLa9heHTY2t2utRuTPeJMVjC I8dtGkTDj6zsO5NcKp5qvmH89tO8s2TP9dutV1Kwm1B5LPS45XtZwB6FiUCMqt8fKRpFr8PFRy6h UTr/AJh/NfTNB8xa7d6s9hb6O9lY6daPZW6yXtwnoLdzRtLGOSzO0gjCrQ/s9MVeoeTB5lbQo7rz JIDql673LWgVFW0jlPKO1BVVLeklAzNUlq70piqeYq7FXYq7FXYq7FXlX5k/lTLe3Eus6BGDcSVe 8sQQObdS8dduR7r37b5utB2kIjgny6F57tTsgzJyY/q6jv8Ac8eubW5tZmguYngnQ0eKRSrA+4ND m/jIEWNw8tOEompCiyzyp+aHmTQCkDSfX9PWg+qzkkqo7RvuV/Ee2YOp7Ox5d/pl3h2ej7Xy4dj6 o9x/QXuHlXzVZ+Y9OF7bQT246Mk8bKK/5D04OPkfnTOc1OmOKVEgvXaXVRzQ4gCPeEVrnl7Q9esX sNZsINQtH6wzoHAPitd1PuN8x3JeF+ef+cS9Ju+d15Ovzp8xqRp14WkgJ8EmFZEH+sHxTa38gPyM 82eVfN1x5g8zQRWotYZILCFJUmaR5aBpQYywVQnIb779MVJfQ2KHEAih3BxVA6VoOh6PHJFpOnWu nRytzlS0hjgVm/mYRhanfFUdirsVQ+o6bp2p2cllqNrDe2c1BLbXEayxPQ1HJHDKaEV3GKrrOztL K2jtbOCO2tYhxighRY41HgqqAB9GKq2KuxV2KuxV2KuxV2KuxV2KuxVB32j6Vf3Nnc3tpFcz6fIZ rKSVQxikI480r0anfFUZirsVdirsVdirsVdirsVQt9pWl36hb6zgu1HRZ40kA/4MHJwySj9JIYTx RmKkAfehoPK/lm3kEkGkWUMg6PHbxK33hcnLUZDzlL5lrhpcUTYjEfAJn0ylvdirsVdirsVdirsV dirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVd irsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdirsVdir/9k= + + + + + + uuid:FF8F96D84F1DDA11BBE0D49BBEFDCBAA + uuid:112b4e8a-7599-4f4a-849d-4002d9dd1bb8 + + + + + + + + + + + + + + + + + + + + + + + + + + +endstream endobj xref +0 233 +0000000003 00000 f +0000000016 00000 n +0000000077 00000 n +0000000004 00001 f +0000000006 00000 f +0000000127 00000 n +0000000007 00001 f +0000000008 00000 f +0000000009 00000 f +0000000010 00000 f +0000000011 00000 f +0000000012 00000 f +0000000013 00000 f +0000000014 00001 f +0000000015 00001 f +0000000016 00000 f +0000000017 00000 f +0000000018 00001 f +0000000019 00001 f +0000000020 00001 f +0000000021 00000 f +0000000022 00001 f +0000000023 00000 f +0000000024 00000 f +0000000025 00001 f +0000000026 00001 f +0000000027 00001 f +0000000028 00000 f +0000000029 00001 f +0000000030 00000 f +0000000031 00000 f +0000000032 00001 f +0000000033 00001 f +0000000034 00001 f +0000000035 00000 f +0000000036 00000 f +0000000037 00000 f +0000000038 00000 f +0000000039 00000 f +0000000040 00000 f +0000000041 00000 f +0000000042 00000 f +0000000043 00000 f +0000000044 00000 f +0000000045 00000 f +0000000046 00000 f +0000000047 00000 f +0000000048 00000 f +0000000049 00000 f +0000000050 00000 f +0000000051 00000 f +0000000052 00000 f +0000000053 00000 f +0000000054 00000 f +0000000055 00000 f +0000000056 00000 f +0000000057 00000 f +0000000058 00000 f +0000000059 00000 f +0000000060 00000 f +0000000061 00000 f +0000000062 00000 f +0000000063 00000 f +0000000064 00000 f +0000000065 00000 f +0000000066 00000 f +0000000067 00000 f +0000000068 00000 f +0000000069 00000 f +0000000070 00000 f +0000000071 00000 f +0000000072 00000 f +0000000073 00000 f +0000000074 00000 f +0000000075 00000 f +0000000076 00000 f +0000000077 00000 f +0000000078 00000 f +0000000079 00000 f +0000000080 00000 f +0000000081 00000 f +0000000082 00000 f +0000000083 00000 f +0000000084 00000 f +0000000085 00000 f +0000000086 00000 f +0000000087 00000 f +0000000088 00000 f +0000000089 00000 f +0000000090 00000 f +0000000091 00000 f +0000000092 00000 f +0000000093 00000 f +0000000094 00000 f +0000000095 00000 f +0000000096 00000 f +0000000097 00000 f +0000000098 00000 f +0000000099 00000 f +0000000100 00000 f +0000000101 00000 f +0000000102 00000 f +0000000103 00000 f +0000000104 00000 f +0000000105 00000 f +0000000106 00000 f +0000000107 00000 f +0000000108 00000 f +0000000109 00000 f +0000000110 00000 f +0000000111 00000 f +0000000112 00000 f +0000000113 00000 f +0000000114 00000 f +0000000115 00000 f +0000000116 00000 f +0000000117 00000 f +0000000118 00000 f +0000000119 00000 f +0000000120 00000 f +0000000121 00000 f +0000000122 00000 f +0000000123 00000 f +0000000124 00000 f +0000000125 00000 f +0000000126 00000 f +0000000127 00000 f +0000000128 00000 f +0000000129 00000 f +0000000130 00000 f +0000000131 00000 f +0000000132 00000 f +0000000133 00000 f +0000000134 00000 f +0000000135 00000 f +0000000136 00000 f +0000000137 00000 f +0000000138 00000 f +0000000139 00000 f +0000000140 00000 f +0000000141 00000 f +0000000142 00000 f +0000000143 00000 f +0000000144 00000 f +0000000145 00000 f +0000000146 00000 f +0000000147 00000 f +0000000148 00000 f +0000000149 00000 f +0000000150 00000 f +0000000151 00000 f +0000000152 00000 f +0000000153 00000 f +0000000154 00000 f +0000000155 00000 f +0000000156 00000 f +0000000157 00000 f +0000000158 00000 f +0000000159 00000 f +0000000160 00000 f +0000000161 00000 f +0000000162 00000 f +0000000163 00000 f +0000000164 00000 f +0000000165 00000 f +0000000166 00000 f +0000000167 00000 f +0000000168 00000 f +0000000169 00000 f +0000000170 00000 f +0000000171 00000 f +0000000172 00001 f +0000000173 00001 f +0000000174 00001 f +0000000175 00000 f +0000000176 00001 f +0000000177 00001 f +0000000178 00000 f +0000000179 00000 f +0000000180 00000 f +0000000181 00001 f +0000000182 00001 f +0000000183 00000 f +0000000184 00000 f +0000000185 00000 f +0000000186 00000 f +0000000187 00000 f +0000000188 00000 f +0000000189 00000 f +0000000190 00001 f +0000000191 00000 f +0000000192 00000 f +0000000193 00000 f +0000000194 00000 f +0000000195 00000 f +0000000196 00001 f +0000000197 00000 f +0000000198 00000 f +0000000199 00000 f +0000000200 00000 f +0000000201 00000 f +0000000202 00000 f +0000000203 00000 f +0000000204 00001 f +0000000205 00001 f +0000000206 00000 f +0000000207 00000 f +0000000208 00000 f +0000000209 00001 f +0000000210 00000 f +0000000211 00000 f +0000000212 00000 f +0000000213 00000 f +0000000222 00000 f +0000000962 00000 n +0000001037 00000 n +0000001259 00000 n +0000002254 00000 n +0000010101 00000 n +0000075690 00000 n +0000141279 00000 n +0000163833 00000 n +0000000223 00001 f +0000000000 00001 f +0000163946 00000 n +0000164319 00000 n +0000164578 00000 n +0000166617 00000 n +0000166740 00000 n +0000168460 00000 n +0000168509 00000 n +0000169023 00000 n +0000169529 00000 n +trailer +<<6900ADF75DFA7C479ED6082881A1314D>]>> +startxref +184360 +%%EOF diff --git a/etc/lwjgl-2.9.1/res/logo/lwjgl_logo-with_jacket.svg b/etc/lwjgl-2.9.1/res/logo/lwjgl_logo-with_jacket.svg new file mode 100644 index 0000000..e97e236 --- /dev/null +++ b/etc/lwjgl-2.9.1/res/logo/lwjgl_logo-with_jacket.svg @@ -0,0 +1,198 @@ + + + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/etc/lwjgl-2.9.1/res/lwjgl_16x16.xpm b/etc/lwjgl-2.9.1/res/lwjgl_16x16.xpm new file mode 100644 index 0000000..a893eb2 --- /dev/null +++ b/etc/lwjgl-2.9.1/res/lwjgl_16x16.xpm @@ -0,0 +1,141 @@ +/* XPM */ +static char * lwjgl_logo_2a_xpm[] = { +"16 16 122 2", +" c #000000", +". c #010101", +"+ c #020202", +"@ c #030303", +"# c #0A0A0A", +"$ c #0C0C0C", +"% c #0E0E0E", +"& c #171717", +"* c #1B1B1B", +"= c #1D1D1D", +"- c #1F1F1F", +"; c #222222", +"> c #232323", +", c #2B2B2B", +"' c #2D2D2D", +") c #333333", +"! c #3D3D3D", +"~ c #404040", +"{ c #434343", +"] c #4A4A4A", +"^ c #4F4F4F", +"/ c #525252", +"( c #565656", +"_ c #585858", +": c #595959", +"< c #5C5C5C", +"[ c #5E5E5E", +"} c #5F5F5F", +"| c #666666", +"1 c #686868", +"2 c #6C6C6C", +"3 c #6D6D6D", +"4 c #397CB5", +"5 c #3A7DB5", +"6 c #3D7FB6", +"7 c #3E80B6", +"8 c #747474", +"9 c #787878", +"0 c #4886BA", +"a c #4C89BC", +"b c #4D89BC", +"c c #508BBD", +"d c #508CBD", +"e c #76828D", +"f c #548EBF", +"g c #5690C0", +"h c #848484", +"i c #5B92C1", +"j c #7D8D9B", +"k c #6096C3", +"l c #8C8C8C", +"m c #8D8F91", +"n c #669AC5", +"o c #919191", +"p c #6D9EC8", +"q c #8499AA", +"r c #959595", +"s c #71A1CA", +"t c #74A4CB", +"u c #9B9B9B", +"v c #77A5CC", +"w c #9C9EA0", +"x c #7CA8CE", +"y c #7EA9CE", +"z c #A1A1A1", +"A c #81ABCE", +"B c #82ACD0", +"C c #84ADD0", +"D c #A5A5A5", +"E c #A6A6A7", +"F c #86AFD2", +"G c #87B0D2", +"H c #A8A8A8", +"I c #8CB3D4", +"J c #8DB4D4", +"K c #91B6D5", +"L c #94B7D5", +"M c #97BAD8", +"N c #9EBFDA", +"O c #A2C1DC", +"P c #BCBCBC", +"Q c #BDBDBD", +"R c #BFBFBF", +"S c #C0C0C0", +"T c #B0C5D6", +"U c #C6C6C6", +"V c #CCCCCC", +"W c #CFCFCF", +"X c #D0D0D0", +"Y c #C2D7E8", +"Z c #D3D3D3", +"` c #C4D8E9", +" . c #D4D4D4", +".. c #C6D9E9", +"+. c #D6D6D6", +"@. c #D0E0ED", +"#. c #DADEE1", +"$. c #D2E1EE", +"%. c #DFDFDF", +"&. c #E4E4E4", +"*. c #DAE7F1", +"=. c #E5E5E5", +"-. c #E6E6E6", +";. c #E0EAF3", +">. c #E2ECF4", +",. c #E4EDF5", +"'. c #E7EFF6", +"). c #EEEEEE", +"!. c #E8F0F6", +"~. c #EFEFEF", +"{. c #EBF2F8", +"]. c #EDF3F8", +"^. c #F2F2F2", +"/. c #F5F5F5", +"(. c #F6F6F6", +"_. c #F4F8FB", +":. c #FBFBFB", +"<. c #FAFCFD", +"[. c #FCFDFE", +"}. c #FEFEFE", +"|. c #FEFFFF", +"1. c #FFFFFF", +"1.1.1.1.1.1.|.Y t c f F '.1.1.1.", +"1.1.1.1.1./.m e j q L 5 0 *.1.1.", +"1.1.1.1._.w &.C 5 i [.1.", +"1.1.1.1.K } ; 1.!.4 5 ` 1.", +"1.1.1...A = | 1.@.5 5 J 1.", +"^.D %.O T # H 1.M 5 5 s 1.", +"z . > V X D h < ~.1.k 5 5 p 1.", +"[ W - @ , 2 U <.N v a x 1.", +"* & +.. / =.! 1 E #.1.", +"8 % : r o u + { ", +"1.).l R ( Z _ ) ", +"1.1.[.1.S ~ + * :.& 9 ", +"1.1.$.y ;.1. .3 h Z Q ", +"1.1.}.n 6 B ,.1.1.=.' $ (.", +"1.1.1.>.b 5 7 G '.1.}.P ^ @ ] 1.", +"1.1.1.1.{.I g d v ].1.1.1.%.-.1."}; diff --git a/etc/lwjgl-2.9.1/res/lwjgl_32x32.xpm b/etc/lwjgl-2.9.1/res/lwjgl_32x32.xpm new file mode 100644 index 0000000..1b835e8 --- /dev/null +++ b/etc/lwjgl-2.9.1/res/lwjgl_32x32.xpm @@ -0,0 +1,275 @@ +/* XPM */ +static char * lwjgl_32x32_xpm[] = { +"32 32 240 2", +" c #FFFFFF", +". c #FAFCFD", +"+ c #CBDDEC", +"@ c #93B7D6", +"# c #6FA0C9", +"$ c #5C93C2", +"% c #6096C3", +"& c #7AA7CD", +"* c #ACC8E0", +"= c #EDF3F8", +"- c #FCFDFE", +"; c #B5CEE3", +"> c #5A92C1", +", c #3A7DB5", +"' c #4585B9", +") c #A1C1DC", +"! c #FCFCFC", +"~ c #E2EAF1", +"{ c #B8CFE3", +"] c #AEC9E0", +"^ c #A3C2DC", +"/ c #98BAD8", +"( c #8CB3D3", +"_ c #81ACCF", +": c #6E9FC8", +"< c #3D7FB6", +"[ c #72A2CA", +"} c #F5F8FB", +"| c #D8D8D8", +"1 c #313131", +"2 c #242424", +"3 c #404040", +"4 c #525252", +"5 c #656565", +"6 c #747474", +"7 c #8F8F8F", +"8 c #F7F8F8", +"9 c #ACC8DF", +"0 c #3B7DB5", +"a c #79A7CD", +"b c #FEFEFE", +"c c #686868", +"d c #000000", +"e c #B6B6B6", +"f c #86AED1", +"g c #AECAE1", +"h c #D3E2EE", +"i c #E1EAF2", +"j c #282828", +"k c #020202", +"l c #DEDEDE", +"m c #5B92C1", +"n c #4886BA", +"o c #F4F8FB", +"p c #ECF3F8", +"q c #6499C5", +"r c #D7D9DB", +"s c #050505", +"t c #C0D5E7", +"u c #397CB5", +"v c #ABC8E0", +"w c #FEFFFF", +"x c #78A6CC", +"y c #7BA7CD", +"z c #9E9E9E", +"A c #E2ECF4", +"B c #377BB4", +"C c #669AC5", +"D c #C3D7E8", +"E c #397DB5", +"F c #B2CCE1", +"G c #585858", +"H c #A9A9A9", +"I c #BCD2E5", +"J c #4081B7", +"K c #EEF4F9", +"L c #DDE5ED", +"M c #1C1C1C", +"N c #070707", +"O c #E7E7E7", +"P c #85AED1", +"Q c #CCDEEC", +"R c #BAD2E5", +"S c #5790BF", +"T c #D0D1D1", +"U c #030303", +"V c #333333", +"W c #FDFDFD", +"X c #FBFCFD", +"Y c #508BBD", +"Z c #B1CCE2", +"` c #CACACA", +" . c #373737", +".. c #616161", +"+. c #A2A2A2", +"@. c #DDDDDD", +"#. c #E4ECF3", +"$. c #B1CBE1", +"%. c #B4CDE2", +"&. c #E6E6E6", +"*. c #232323", +"=. c #727272", +"-. c #D8E5F0", +";. c #A0C0DB", +">. c #666666", +",. c #060606", +"'. c #272727", +"). c #D4D4D4", +"!. c #F6F6F6", +"~. c #D0D0D0", +"{. c #979797", +"]. c #5E5E5E", +"^. c #040404", +"/. c #C0C0C0", +"(. c #A2C1DB", +"_. c #9EBFDA", +":. c #FBFBFB", +"<. c #252525", +"[. c #5C5C5C", +"}. c #EAEAEA", +"|. c #B5B5B5", +"1. c #E9E9E9", +"2. c #B2B2B2", +"3. c #BDBDBD", +"4. c #6B9DC7", +"5. c #DBDBDB", +"6. c #838383", +"7. c #5F5F5F", +"8. c #0B0B0B", +"9. c #767676", +"0. c #B7B7B7", +"a. c #F0F0F0", +"b. c #F0F5F9", +"c. c #4B88BB", +"d. c #B2CCE2", +"e. c #9A9A9A", +"f. c #C5C5C5", +"g. c #F7F7F7", +"h. c #1D1D1D", +"i. c #3C3C3C", +"j. c #DFDFDF", +"k. c #F3F7FA", +"l. c #CCDDEB", +"m. c #9EBEDA", +"n. c #72A1C9", +"o. c #4C89BB", +"p. c #C9DCEB", +"q. c #565656", +"r. c #0F0F0F", +"s. c #F9F9F9", +"t. c #D1D1D1", +"u. c #8E8E8E", +"v. c #848484", +"w. c #707070", +"x. c #B0B0B0", +"y. c #F9FBFC", +"z. c #DCE8F2", +"A. c #F6F9FC", +"B. c #151515", +"C. c #4E4E4E", +"D. c #919191", +"E. c #BBBBBB", +"F. c #2F2F2F", +"G. c #393939", +"H. c #909090", +"I. c #4D4D4D", +"J. c #101010", +"K. c #5A5A5A", +"L. c #090909", +"M. c #323232", +"N. c #B1B1B1", +"O. c #A1A1A1", +"P. c #353535", +"Q. c #F5F5F5", +"R. c #131313", +"S. c #454545", +"T. c #F8F8F8", +"U. c #2B2B2B", +"V. c #BEBEBE", +"W. c #505050", +"X. c #C2C2C2", +"Y. c #868686", +"Z. c #D2D2D2", +"`. c #010101", +" + c #434343", +".+ c #DCDCDC", +"++ c #E0E0E0", +"@+ c #959595", +"#+ c #C8C8C8", +"$+ c #888888", +"%+ c #292929", +"&+ c #181818", +"*+ c #4A4A4A", +"=+ c #CFCFCF", +"-+ c #F1F6FA", +";+ c #4B4B4B", +">+ c #86AFD1", +",+ c #90B5D5", +"'+ c #EAF1F7", +")+ c #787878", +"!+ c #1B1B1B", +"~+ c #969696", +"{+ c #C6C6C6", +"]+ c #C3D8E9", +"^+ c #4383B8", +"/+ c #94B8D6", +"(+ c #F4F4F4", +"_+ c #A7A7A7", +":+ c #858585", +"<+ c #9D9D9D", +"[+ c #FAFBFD", +"}+ c #5D94C2", +"|+ c #4685B9", +"1+ c #98BBD8", +"2+ c #EFF4F9", +"3+ c #9B9B9B", +"4+ c #C5D9E9", +"5+ c #3B7EB6", +"6+ c #F2F6FA", +"7+ c #2C2C2C", +"8+ c #8FB5D5", +"9+ c #4A87BB", +"0+ c #FAFAFA", +"a+ c #6E6E6E", +"b+ c #85AFD1", +"c+ c #4D89BC", +"d+ c #A8C5DE", +"e+ c #0E0E0E", +"f+ c #B8B8B8", +"g+ c #FEFEFF", +"h+ c #B1CBE2", +"i+ c #4C89BC", +"j+ c #BFD4E7", +"k+ c #ECECEC", +"l+ c #939393", +"m+ c #81ACD0", +"n+ c #6599C5", +"o+ c #6197C4", +"p+ c #6C9EC8", +"q+ c #F7FAFC", +" . + @ # $ % & * = ", +" - ; > , , , , , , , ' ) - ", +" ! ~ { ] ^ / ( _ : < , , , [ } ", +" | 1 2 1 3 4 5 6 7 8 9 0 , , , a - ", +" b c d d d d d d d d e b f , , , , g ", +" h i j d d d d d d d k l } m , , , n o ", +" p q r s d d d d d d d 2 b t u , , , v ", +" w x y z d d d d d d d d 5 A B , , , C ", +" D E F G d d d d d d d d H I , , , , J K ", +" . > < L M d d d d d d d N O P , , , , E Q ", +" b R , S T U d d d d d d d V W X Y , , , , E Z ", +" ` ...+.@.#.$.%.&.*.d d d d d d d =. -., , , , , , ;. ", +" >.d d d ,.'.>.). !.~.{.].'.^.d U /. (., , , , , , _. ", +":.<.d d d d d d [. }.7 |.1.W O 2.3.b 4., , , , , , ) ", +"5.U d d d d d d 6. 7.d d 8. .9.0.a. b.c.< u , , , , d. ", +"e.d d d d d d d f.g.h.d d d d d d N i.j. X - k.l.m.n.o., p. ", +"q.d d d d d d r.s.t.U d d d d d d d d u. s.v.w.x.}. y.z.A. ", +"B.d d d d d d C. D.d d d d d d d d d E. z d d d ^.F.w.x.&.b ", +"G.d d d d d d H. I.d d d d d d d d J.a. K.d d d d d d d L.M.N.", +"!.O.P.k d d k t.Q.R.d d d d d d d d S.b T.h.d d d d d d d d d U.", +" ! V.W.s <.s.X.d d d d d d d d d Y. Z.`.d d d d d d d d d +", +" b .+++ @+d d d d d d d d `.#+ u.d d d d d d d d d d $+", +" j.%+d d d d d d d &+Q. *+d d d d d d d d d d =+", +" -+ s.|.;+,.d d d d 4 T.J.d d d d d d d d d M T.", +" >+,+'+ 5.)+!+d d ~+ {+d d d d d d d d d d K. ", +" ]+, ^+/+= (+_+:+(+ Y.d d d d d d d d d d <+ ", +" [+}+, , |+1+2+ 3+d d d d d d d d d s @. ", +" 4+5+, , , n m.6+ :.u.<.`.d d d d d d 7+! ", +" 8+, , , , , 9+^ k. 0+x.S.^.d d d d a+ ", +" - b+, , , , , , c+d+A. b Z.c e+d `.f+ ", +" g+h+i+E , , , , , c+j+ k+l+3+W ", +" k.; m+n+o+p+8+4+q+ "}; diff --git a/etc/lwjgl-2.9.1/res/resources.txt b/etc/lwjgl-2.9.1/res/resources.txt new file mode 100644 index 0000000..5f359ca --- /dev/null +++ b/etc/lwjgl-2.9.1/res/resources.txt @@ -0,0 +1,11 @@ +The following files are included in the resource archive: +Footsteps.wav - from openal.org cvs +ding.wav - from openal.org cvs +left.wav - sampled by matzon +right.wav - sampled by matzon +center.wav - sampled by matzon + +optional: +Missing_you.mod - Missing You, by Doh (Nicolas Desessart, http://doh.av7.net) +phero.mp3 - snipped from unreleased Phero track +phero2.ogg - snipped from unreleased Phero track \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/res/right.wav b/etc/lwjgl-2.9.1/res/right.wav new file mode 100644 index 0000000..f23dbed Binary files /dev/null and b/etc/lwjgl-2.9.1/res/right.wav differ diff --git a/etc/lwjgl-2.9.1/res/spaceinvaders/alien.gif b/etc/lwjgl-2.9.1/res/spaceinvaders/alien.gif new file mode 100644 index 0000000..19bf8fc Binary files /dev/null and b/etc/lwjgl-2.9.1/res/spaceinvaders/alien.gif differ diff --git a/etc/lwjgl-2.9.1/res/spaceinvaders/alien2.gif b/etc/lwjgl-2.9.1/res/spaceinvaders/alien2.gif new file mode 100644 index 0000000..199b211 Binary files /dev/null and b/etc/lwjgl-2.9.1/res/spaceinvaders/alien2.gif differ diff --git a/etc/lwjgl-2.9.1/res/spaceinvaders/alien3.gif b/etc/lwjgl-2.9.1/res/spaceinvaders/alien3.gif new file mode 100644 index 0000000..3035868 Binary files /dev/null and b/etc/lwjgl-2.9.1/res/spaceinvaders/alien3.gif differ diff --git a/etc/lwjgl-2.9.1/res/spaceinvaders/gotyou.gif b/etc/lwjgl-2.9.1/res/spaceinvaders/gotyou.gif new file mode 100644 index 0000000..1c373e2 Binary files /dev/null and b/etc/lwjgl-2.9.1/res/spaceinvaders/gotyou.gif differ diff --git a/etc/lwjgl-2.9.1/res/spaceinvaders/hit.wav b/etc/lwjgl-2.9.1/res/spaceinvaders/hit.wav new file mode 100644 index 0000000..33dc4bd Binary files /dev/null and b/etc/lwjgl-2.9.1/res/spaceinvaders/hit.wav differ diff --git a/etc/lwjgl-2.9.1/res/spaceinvaders/loose.wav b/etc/lwjgl-2.9.1/res/spaceinvaders/loose.wav new file mode 100644 index 0000000..e11886a Binary files /dev/null and b/etc/lwjgl-2.9.1/res/spaceinvaders/loose.wav differ diff --git a/etc/lwjgl-2.9.1/res/spaceinvaders/pressanykey.gif b/etc/lwjgl-2.9.1/res/spaceinvaders/pressanykey.gif new file mode 100644 index 0000000..7212521 Binary files /dev/null and b/etc/lwjgl-2.9.1/res/spaceinvaders/pressanykey.gif differ diff --git a/etc/lwjgl-2.9.1/res/spaceinvaders/ship.gif b/etc/lwjgl-2.9.1/res/spaceinvaders/ship.gif new file mode 100644 index 0000000..cb1db98 Binary files /dev/null and b/etc/lwjgl-2.9.1/res/spaceinvaders/ship.gif differ diff --git a/etc/lwjgl-2.9.1/res/spaceinvaders/shot.gif b/etc/lwjgl-2.9.1/res/spaceinvaders/shot.gif new file mode 100644 index 0000000..7a76f2e Binary files /dev/null and b/etc/lwjgl-2.9.1/res/spaceinvaders/shot.gif differ diff --git a/etc/lwjgl-2.9.1/res/spaceinvaders/shot.wav b/etc/lwjgl-2.9.1/res/spaceinvaders/shot.wav new file mode 100644 index 0000000..dda47d2 Binary files /dev/null and b/etc/lwjgl-2.9.1/res/spaceinvaders/shot.wav differ diff --git a/etc/lwjgl-2.9.1/res/spaceinvaders/start.wav b/etc/lwjgl-2.9.1/res/spaceinvaders/start.wav new file mode 100644 index 0000000..3cb25b9 Binary files /dev/null and b/etc/lwjgl-2.9.1/res/spaceinvaders/start.wav differ diff --git a/etc/lwjgl-2.9.1/res/spaceinvaders/win.wav b/etc/lwjgl-2.9.1/res/spaceinvaders/win.wav new file mode 100644 index 0000000..76250e4 Binary files /dev/null and b/etc/lwjgl-2.9.1/res/spaceinvaders/win.wav differ diff --git a/etc/lwjgl-2.9.1/res/spaceinvaders/youwin.gif b/etc/lwjgl-2.9.1/res/spaceinvaders/youwin.gif new file mode 100644 index 0000000..697318b Binary files /dev/null and b/etc/lwjgl-2.9.1/res/spaceinvaders/youwin.gif differ diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/openal/AL10.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/openal/AL10.java new file mode 100644 index 0000000..9c939ba --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/openal/AL10.java @@ -0,0 +1,1420 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.openal; + +import org.lwjgl.*; +import java.nio.*; + +/** + *
+ * This is the core OpenAL class. This class implements + * AL.h version 1.0 + *

+ * @author Brian Matzon + * @version $Revision$ + * $Id$ + */ +public final class AL10 { + + /** + * Bad value + */ + public static final int AL_INVALID = 0xFFFFFFFF; + + /** + * Disable value + */ + public static final int AL_NONE = 0x0; + + /** + * Boolean False + */ + public static final int AL_FALSE = 0x0; + + /** + * Boolean True + */ + public static final int AL_TRUE = 0x1; + + /** + * Indicate the type of SOURCE. + * Sources can be spatialized + */ + public static final int AL_SOURCE_TYPE = 0x1027; + + /** + * Indicate source has absolute coordinates + */ + public static final int AL_SOURCE_ABSOLUTE = 0x201; + + /** + * Indicate Source has listener relative coordinates + */ + public static final int AL_SOURCE_RELATIVE = 0x202; + + /** + * Directional source, inner cone angle, in degrees + * Range: [0-360] + * Default: 360 + */ + public static final int AL_CONE_INNER_ANGLE = 0x1001; + + /** + * Directional source, outer cone angle, in degrees. + * Range: [0-360] + * Default: 360 + */ + public static final int AL_CONE_OUTER_ANGLE = 0x1002; + + /** + * Specify the pitch to be applied, either at source, + * or on mixer results, at listener. + * Range: [0.5-2.0] + * Default: 1.0 + */ + public static final int AL_PITCH = 0x1003; + + /** + * Specify the current location in three dimensional space. + * OpenAL, like OpenGL, uses a right handed coordinate system, + * where in a frontal default view X (thumb) points right, + * Y points up (index finger), and Z points towards the + * viewer/camera (middle finger). + * To switch from a left handed coordinate system, flip the + * sign on the Z coordinate. + * Listener position is always in the world coordinate system. + */ + public static final int AL_POSITION = 0x1004; + + /** + * Specify the current direction as forward vector. + */ + public static final int AL_DIRECTION = 0x1005; + + /** + * Specify the current velocity in three dimensional space. + */ + public static final int AL_VELOCITY = 0x1006; + + /** + * Indicate whether source has to loop infinite. + * Type: ALboolean + * Range: [TRUE, FALSE] + * Default: FALSE + */ + public static final int AL_LOOPING = 0x1007; + + /** + * Indicate the buffer to provide sound samples. + * Type: ALuint. + * Range: any valid Buffer id. + */ + public static final int AL_BUFFER = 0x1009; + + /** + * Indicate the gain (volume amplification) applied. + * Type: ALfloat. + * Range: ]0.0- ] + * A value of 1.0 means un-attenuated/unchanged. + * Each division by 2 equals an attenuation of -6dB. + * Each multiplicaton with 2 equals an amplification of +6dB. + * A value of 0.0 is meaningless with respect to a logarithmic + * scale; it is interpreted as zero volume - the channel + * is effectively disabled. + */ + public static final int AL_GAIN = 0x100A; + + /** + * Indicate minimum source attenuation. + * Type: ALfloat + * Range: [0.0 - 1.0] + */ + public static final int AL_MIN_GAIN = 0x100D; + + /** + * Indicate maximum source attenuation. + * Type: ALfloat + * Range: [0.0 - 1.0] + */ + public static final int AL_MAX_GAIN = 0x100E; + + /** + * Specify the current orientation. + * Type: ALfv6 (at/up) + * Range: N/A + */ + public static final int AL_ORIENTATION = 0x100F, + AL_REFERENCE_DISTANCE = 0x1020; + + /** + * Indicate the rolloff factor for the source. + * Type: ALfloat + * Range: [0.0 - ] + * Default: 1.0 + */ + public static final int AL_ROLLOFF_FACTOR = 0x1021; + + /** + * Indicate the gain (volume amplification) applied. + * Type: ALfloat. + * Range: ]0.0- ] + * A value of 1.0 means un-attenuated/unchanged. + * Each division by 2 equals an attenuation of -6dB. + * Each multiplicaton with 2 equals an amplification of +6dB. + * A value of 0.0 is meaningless with respect to a logarithmic + * scale; it is interpreted as zero volume - the channel + * is effectively disabled. + */ + public static final int AL_CONE_OUTER_GAIN = 0x1022; + + /** + * Specify the maximum distance. + * Type: ALfloat + * Range: [0.0 - ] + */ + public static final int AL_MAX_DISTANCE = 0x1023; + + /** + * Specify the channel mask. (Creative) + * Type: ALuint + * Range: [0 - 255] + */ + public static final int AL_CHANNEL_MASK = 0x3000; + + /** + * Source state information + */ + public static final int AL_SOURCE_STATE = 0x1010, + AL_INITIAL = 0x1011, + AL_PLAYING = 0x1012, + AL_PAUSED = 0x1013, + AL_STOPPED = 0x1014; + + /** + * Buffer Queue params + */ + public static final int AL_BUFFERS_QUEUED = 0x1015, + AL_BUFFERS_PROCESSED = 0x1016; + + /** + * Sound buffers: format specifier. + */ + public static final int AL_FORMAT_MONO8 = 0x1100, + AL_FORMAT_MONO16 = 0x1101, + AL_FORMAT_STEREO8 = 0x1102, + AL_FORMAT_STEREO16 = 0x1103; + + /** + * Ogg Vorbis format specifier. + */ + public static final int AL_FORMAT_VORBIS_EXT = 0x10003; + + /** + * Sound buffers: frequency, in units of Hertz [Hz]. + * This is the number of samples per second. Half of the + * sample frequency marks the maximum significant + * frequency component. + */ + public static final int AL_FREQUENCY = 0x2001; + + /** + * Sound buffers: The number of bits per sample for the + * data contained in the buffer. + */ + public static final int AL_BITS = 0x2002; + + /** + * Sound buffers: The number of channels for the data + * contained in the buffer. + */ + public static final int AL_CHANNELS = 0x2003; + + /** + * Sound buffers: Size in bytes of the buffer data. + */ + public static final int AL_SIZE = 0x2004; + + /** + * @deprecated This token is a relict of the early OpenAL days and is + * no longer supported. Neither the OpenAL spec nor OpenAL Soft define + * it. + */ + public static final int AL_DATA = 0x2005; + + /** + * Buffer state. + *

+ * Not supported for public use (yet). + */ + public static final int AL_UNUSED = 0x2010, + AL_PENDING = 0x2011, + AL_PROCESSED = 0x2012; + + /** + * Errors: No Error. + */ + public static final int AL_NO_ERROR = 0x0; + + /** + * Illegal name passed as an argument to an AL call. + */ + public static final int AL_INVALID_NAME = 0xA001; + + /** + * Illegal enum passed as an argument to an AL call. + */ + public static final int AL_INVALID_ENUM = 0xA002; + + /** + * Illegal value passed as an argument to an AL call. + * Applies to parameter values, but not to enumerations. + */ + public static final int AL_INVALID_VALUE = 0xA003; + + /** + * A function was called at inappropriate time, + * or in an inappropriate way, causing an illegal state. + * This can be an incompatible ALenum, object ID, + * and/or function. + */ + public static final int AL_INVALID_OPERATION = 0xA004; + + /** + * A function could not be completed, + * because there is not enough memory available. + */ + public static final int AL_OUT_OF_MEMORY = 0xA005; + + /** + * Context strings: Vendor + */ + public static final int AL_VENDOR = 0xB001; + + /** + * Context strings: Version + */ + public static final int AL_VERSION = 0xB002; + + /** + * Context strings: Renderer + */ + public static final int AL_RENDERER = 0xB003; + + /** + * Context strings: Extensions + */ + public static final int AL_EXTENSIONS = 0xB004; + + /** + * Doppler scale. Default 1.0 + */ + public static final int AL_DOPPLER_FACTOR = 0xC000; + + /** + * Doppler velocity. Default 1.0 + */ + public static final int AL_DOPPLER_VELOCITY = 0xC001; + + /** + * Distance model. Default INVERSE_DISTANCE_CLAMPED + */ + public static final int AL_DISTANCE_MODEL = 0xD000; + + /** + * Distance model + */ + public static final int AL_INVERSE_DISTANCE = 0xD001, + AL_INVERSE_DISTANCE_CLAMPED = 0xD002; + + private AL10() {} + + static native void initNativeStubs() throws LWJGLException; + + /** + * The application can temporarily disable certain AL capabilities on a per Context + * basis. This allows the driver implementation to optimize for certain subsets of + * operations. Enabling and disabling capabilities is handled using a function pair. + *

+ * @param capability name of a capability to enable + */ + public static void alEnable(int capability) { + nalEnable(capability); + } + static native void nalEnable(int capability); + + /** + * The application can temporarily disable certain AL capabilities on a per Context + * basis. This allows the driver implementation to optimize for certain subsets of + * operations. Enabling and disabling capabilities is handled using a function pair. + *

+ * @param capability name of a capability to disable + */ + public static void alDisable(int capability) { + nalDisable(capability); + } + static native void nalDisable(int capability); + + /** + * The application can also query whether a given capability is currently enabled or + * not. + *

+ * If the token used to specify target is not legal, an AL_INVALID_ENUM error will be + * generated. + *

+ *

+ * At this time, this mechanism is not used. There are no valid targets. + *

+ *

+ * @param capability name of a capability to check + * @return true if named feature is enabled + */ + public static boolean alIsEnabled(int capability) { + boolean __result = nalIsEnabled(capability); + return __result; + } + static native boolean nalIsEnabled(int capability); + + /** + * Like OpenGL, AL uses a simplified interface for querying global state. + *

+ * Legal values are e.g. AL_DOPPLER_FACTOR, AL_DOPPLER_VELOCITY, + * AL_DISTANCE_MODEL. + *

+ * null destinations are quietly ignored. AL_INVALID_ENUM is the response to errors + * in specifying pName. The amount of memory required in the destination + * depends on the actual state requested. + *

+ *

+ * @return boolean state described by pname will be returned. + */ + public static boolean alGetBoolean(int pname) { + boolean __result = nalGetBoolean(pname); + return __result; + } + static native boolean nalGetBoolean(int pname); + + /** + * Like OpenGL, AL uses a simplified interface for querying global state. + *

+ * Legal values are e.g. AL_DOPPLER_FACTOR, AL_DOPPLER_VELOCITY, + * AL_DISTANCE_MODEL. + *

+ * null destinations are quietly ignored. AL_INVALID_ENUM is the response to errors + * in specifying pName. The amount of memory required in the destination + * depends on the actual state requested. + *

+ *

+ * @return int state described by pname will be returned. + */ + public static int alGetInteger(int pname) { + int __result = nalGetInteger(pname); + return __result; + } + static native int nalGetInteger(int pname); + + /** + * Like OpenGL, AL uses a simplified interface for querying global state. + *

+ * Legal values are e.g. AL_DOPPLER_FACTOR, AL_DOPPLER_VELOCITY, + * AL_DISTANCE_MODEL. + *

+ * null destinations are quietly ignored. AL_INVALID_ENUM is the response to errors + * in specifying pName. The amount of memory required in the destination + * depends on the actual state requested. + *

+ *

+ * @return float state described by pname will be returned. + */ + public static float alGetFloat(int pname) { + float __result = nalGetFloat(pname); + return __result; + } + static native float nalGetFloat(int pname); + + /** + * Like OpenGL, AL uses a simplified interface for querying global state. + *

+ * Legal values are e.g. AL_DOPPLER_FACTOR, AL_DOPPLER_VELOCITY, + * AL_DISTANCE_MODEL. + *

+ * null destinations are quietly ignored. AL_INVALID_ENUM is the response to errors + * in specifying pName. The amount of memory required in the destination + * depends on the actual state requested. + *

+ *

+ * @return double state described by pname will be returned. + */ + public static double alGetDouble(int pname) { + double __result = nalGetDouble(pname); + return __result; + } + static native double nalGetDouble(int pname); + + /** + * Like OpenGL, AL uses a simplified interface for querying global state. + *

+ * Legal values are e.g. AL_DOPPLER_FACTOR, AL_DOPPLER_VELOCITY, + * AL_DISTANCE_MODEL. + *

+ * null destinations are quietly ignored. AL_INVALID_ENUM is the response to errors + * in specifying pName. The amount of memory required in the destination + * depends on the actual state requested. + *

+ *

+ * @param pname state to be queried + * @param data Buffer to place the integers in + */ + public static void alGetInteger(int pname, IntBuffer data) { + BufferChecks.checkBuffer(data, 1); + nalGetIntegerv(pname, MemoryUtil.getAddress(data)); + } + static native void nalGetIntegerv(int pname, long data); + + /** + * Like OpenGL, AL uses a simplified interface for querying global state. + *

+ * Legal values are e.g. AL_DOPPLER_FACTOR, AL_DOPPLER_VELOCITY, + * AL_DISTANCE_MODEL. + *

+ * null destinations are quietly ignored. AL_INVALID_ENUM is the response to errors + * in specifying pName. The amount of memory required in the destination + * depends on the actual state requested. + *

+ *

+ * @param pname state to be queried + * @param data Buffer to place the floats in + */ + public static void alGetFloat(int pname, FloatBuffer data) { + BufferChecks.checkBuffer(data, 1); + nalGetFloatv(pname, MemoryUtil.getAddress(data)); + } + static native void nalGetFloatv(int pname, long data); + + /** + * Like OpenGL, AL uses a simplified interface for querying global state. + *

+ * Legal values are e.g. AL_DOPPLER_FACTOR, AL_DOPPLER_VELOCITY, + * AL_DISTANCE_MODEL. + *

+ * null destinations are quietly ignored. AL_INVALID_ENUM is the response to errors + * in specifying pName. The amount of memory required in the destination + * depends on the actual state requested. + *

+ *

+ * @param pname state to be queried + * @param data Buffer to place the doubles in + */ + public static void alGetDouble(int pname, DoubleBuffer data) { + BufferChecks.checkBuffer(data, 1); + nalGetDoublev(pname, MemoryUtil.getAddress(data)); + } + static native void nalGetDoublev(int pname, long data); + + /** + * The application can retrieve state information global to the current AL Context. + * GetString will return a pointer to a constant string. Valid values for param are + * VERSION, RENDERER, VENDOR, and EXTENSIONS, as well as the error codes + * defined by AL. The application can use GetString to retrieve a string for an error + * code. + *

+ * @param pname The property to be returned + * @return OpenAL String property + */ + public static String alGetString(int pname) { + String __result = nalGetString(pname); + return __result; + } + static native String nalGetString(int pname); + + /** + * The AL detects only a subset of those conditions that could be considered errors. + * This is because in many cases error checking would adversely impact the + * performance of an error-free program. + *

+ * Each detectable error is assigned a numeric + * code. When an error is detected by AL, a flag is set and the error code is recorded. + * Further errors, if they occur, do not affect this recorded code. When GetError is + * called, the code is returned and the flag is cleared, so that a further error will again + * record its code. If a call to GetError returns AL_NO_ERROR then there has been no + * detectable error since the last call to GetError (or since the AL was initialized). + *

+ *

+ * Error codes can be mapped to strings. The GetString function returns a pointer to a + * constant (literal) string that is identical to the identifier used for the enumeration + * value, as defined in the specification. + *

+ *

+ * AL_NO_ERROR - "No Error" token.
+ * AL_INVALID_NAME - Invalid Name parameter.
+ * AL_INVALID_ENUM - Invalid parameter.
+ * AL_INVALID_VALUE - Invalid enum parameter value.
+ * AL_INVALID_OPERATION - Illegal call.
+ * AL_OUT_OF_MEMORY - Unable to allocate memory.
+ *

+ *

+ * The table summarizes the AL errors. Currently, when an error flag is set, results of + * AL operations are undefined only if AL_OUT_OF_MEMORY has occured. In other + * cases, the command generating the error is ignored so that it has no effect on AL + * state or output buffer contents. If the error generating command returns a value, it + * returns zero. If the generating command modifies values through a pointer + * argument, no change is made to these values. These error semantics apply only to + * AL errors, not to system errors such as memory access errors. + *

+ *

+ * Several error generation conditions are implicit in the description of the various AL + * commands. First, if a command that requires an enumerated value is passed a value + * that is not one of those specified as allowable for that command, the error + * AL_INVALID_ENUM results. This is the case even if the argument is a pointer to a + * symbolic constant if that value is not allowable for the given command. This will + * occur whether the value is allowable for other functions, or an invalid integer value. + *

+ *

+ * Integer parameters that are used as names for AL objects such as Buffers and + * Sources are checked for validity. If an invalid name parameter is specified in an AL + * command, an AL_INVALID_NAME error will be generated, and the command is + * ignored. + *

+ *

+ * If a negative integer is provided where an argument of type sizei is specified, the + * error AL_INVALID_VALUE results. The same error will result from attempts to set + * integral and floating point values for attributes exceeding the legal range for these. + * The specification does not guarantee that the implementation emits + * AL_INVALID_VALUE if a NaN or Infinity value is passed in for a float or double + * argument (as the specification does not enforce possibly expensive testing of + * floating point values). + *

+ *

+ * Commands can be invalid. For example, certain commands might not be applicable + * to a given object. There are also illegal combinations of tokens and values as + * arguments to a command. AL responds to any such illegal command with an + * AL_INVALID_OPERATION error. + *

+ *

+ * If memory is exhausted as a side effect of the execution of an AL command, either + * on system level or by exhausting the allocated resources at AL's internal disposal, + * the error AL_OUT_OF_MEMORY may be generated. This can also happen independent + * of recent commands if AL has to request memory for an internal task and fails to + * allocate the required memory from the operating system. + *

+ *

+ * Otherwise errors are generated only for conditions that are explicitely described in + * this specification. + *

+ *

+ * @return current error state + */ + public static int alGetError() { + int __result = nalGetError(); + return __result; + } + static native int nalGetError(); + + /** + * To verify that a given extension is available for the current context and the device it + * is associated with, use this method. + *

+ * A null name argument returns AL_FALSE, as do invalid and unsupported string + * tokens. A null deviceHandle will result in an INVALID_DEVICE error. + *

+ *

+ * @param fname String describing the desired extension + * @return true if extension is available, false if not + */ + public static boolean alIsExtensionPresent(String fname) { + BufferChecks.checkNotNull(fname); + boolean __result = nalIsExtensionPresent(fname); + return __result; + } + static native boolean nalIsExtensionPresent(String fname); + + /** + *

+ * To obtain enumeration values for extensions, the application has to use + * GetEnumValue of an extension token. Enumeration values are defined within the + * AL namespace and allocated according to specification of the core API and the + * extensions, thus they are context-independent. + *

+ *

+ * Returns 0 if the enumeration can not be found. The presence of an enum value does + * not guarantee the applicability of an extension to the current context. A non-zero + * return indicates merely that the implementation is aware of the existence of this + * extension. Implementations should not attempt to return 0 to indicate that the + * extensions is not supported for the current context. + *

+ *

+ * @param ename String describing an OpenAL enum + * @return Actual int for the described enumeration name + */ + public static int alGetEnumValue(String ename) { + BufferChecks.checkNotNull(ename); + int __result = nalGetEnumValue(ename); + return __result; + } + static native int nalGetEnumValue(String ename); + + /** + * Listener attributes are changed using the Listener group of commands. + *

+ * @param pname name of the attribute to be set + * @param value value to set the attribute to + */ + public static void alListeneri(int pname, int value) { + nalListeneri(pname, value); + } + static native void nalListeneri(int pname, int value); + + /** + * Listener attributes are changed using the Listener group of commands. + *

+ * @param pname name of the attribute to be set + * @param value floating point value to set the attribute to + */ + public static void alListenerf(int pname, float value) { + nalListenerf(pname, value); + } + static native void nalListenerf(int pname, float value); + + /** + * Listener attributes are changed using the Listener group of commands. + *

+ * @param pname name of the attribute to be set + * @param value FloatBuffer containing value to set the attribute to + */ + public static void alListener(int pname, FloatBuffer value) { + BufferChecks.checkBuffer(value, 1); + nalListenerfv(pname, MemoryUtil.getAddress(value)); + } + static native void nalListenerfv(int pname, long value); + + /** + * Listener attributes are changed using the Listener group of commands. + *

+ * @param pname name of the attribute to be set + * @param v1 value value 1 + * @param v2 value value 2 + * @param v3 float value 3 + */ + public static void alListener3f(int pname, float v1, float v2, float v3) { + nalListener3f(pname, v1, v2, v3); + } + static native void nalListener3f(int pname, float v1, float v2, float v3); + + /** + * Listener state is maintained inside the AL implementation and can be queried in + * full. + *

+ * @param pname name of the attribute to be retrieved + * @return int + */ + public static int alGetListeneri(int pname) { + int __result = nalGetListeneri(pname); + return __result; + } + static native int nalGetListeneri(int pname); + + /** + * Listener state is maintained inside the AL implementation and can be queried in + * full. + *

+ * @param pname name of the attribute to be retrieved + * @return float + */ + public static float alGetListenerf(int pname) { + float __result = nalGetListenerf(pname); + return __result; + } + static native float nalGetListenerf(int pname); + + /** + * Listener state is maintained inside the AL implementation and can be queried in + * full. + *

+ * @param pname name of the attribute to be retrieved + * @param floatdata Buffer to write floats to + */ + public static void alGetListener(int pname, FloatBuffer floatdata) { + BufferChecks.checkBuffer(floatdata, 1); + nalGetListenerfv(pname, MemoryUtil.getAddress(floatdata)); + } + static native void nalGetListenerfv(int pname, long floatdata); + + /** + * The application requests a number of Sources using GenSources. + *

+ * @param sources array holding sources + */ + public static void alGenSources(IntBuffer sources) { + BufferChecks.checkDirect(sources); + nalGenSources(sources.remaining(), MemoryUtil.getAddress(sources)); + } + static native void nalGenSources(int sources_n, long sources); + + /** Overloads alGenSources. */ + public static int alGenSources() { + int __result = nalGenSources2(1); + return __result; + } + static native int nalGenSources2(int n); + + /** + * The application requests deletion of a number of Sources by DeleteSources. + *

+ * @param sources Source array to delete from + */ + public static void alDeleteSources(IntBuffer sources) { + BufferChecks.checkDirect(sources); + nalDeleteSources(sources.remaining(), MemoryUtil.getAddress(sources)); + } + static native void nalDeleteSources(int sources_n, long sources); + + /** Overloads alDeleteSources. */ + public static void alDeleteSources(int source) { + nalDeleteSources2(1, source); + } + static native void nalDeleteSources2(int n, int source); + + /** + * The application can verify whether a source name is valid using the IsSource query. + *

+ * @param id id of source to be testes for validity + * @return true if id is valid, false if not + */ + public static boolean alIsSource(int id) { + boolean __result = nalIsSource(id); + return __result; + } + static native boolean nalIsSource(int id); + + /** + * Specifies the position and other properties as taken into account during + * sound processing. + *

+ * @param source Source to det property on + * @param pname property to set + * @param value value of property + */ + public static void alSourcei(int source, int pname, int value) { + nalSourcei(source, pname, value); + } + static native void nalSourcei(int source, int pname, int value); + + /** + * Specifies the position and other properties as taken into account during + * sound processing. + *

+ * @param source Source to det property on + * @param pname property to set + * @param value value of property + */ + public static void alSourcef(int source, int pname, float value) { + nalSourcef(source, pname, value); + } + static native void nalSourcef(int source, int pname, float value); + + /** + * Specifies the position and other properties as taken into account during + * sound processing. + *

+ * @param source Source to set property on + * @param pname property to set + * @param value FloatBuffer containing value of property + */ + public static void alSource(int source, int pname, FloatBuffer value) { + BufferChecks.checkBuffer(value, 1); + nalSourcefv(source, pname, MemoryUtil.getAddress(value)); + } + static native void nalSourcefv(int source, int pname, long value); + + /** + * Specifies the position and other properties as taken into account during + * sound processing. + *

+ * @param source Source to set property on + * @param pname property to set + * @param v1 value 1 of property + * @param v2 value 2 of property + * @param v3 value 3 of property + */ + public static void alSource3f(int source, int pname, float v1, float v2, float v3) { + nalSource3f(source, pname, v1, v2, v3); + } + static native void nalSource3f(int source, int pname, float v1, float v2, float v3); + + /** + * Source state is maintained inside the AL implementation, and the current attributes + * can be queried. The performance of such queries is implementation dependent, no + * performance guarantees are made. + *

+ * @param source source to get property from + * @param pname name of property + * @return int + */ + public static int alGetSourcei(int source, int pname) { + int __result = nalGetSourcei(source, pname); + return __result; + } + static native int nalGetSourcei(int source, int pname); + + /** + * Source state is maintained inside the AL implementation, and the current attributes + * can be queried. The performance of such queries is implementation dependent, no + * performance guarantees are made. + *

+ * @param source source to get property from + * @param pname name of property + * @return float + */ + public static float alGetSourcef(int source, int pname) { + float __result = nalGetSourcef(source, pname); + return __result; + } + static native float nalGetSourcef(int source, int pname); + + /** + * Source state is maintained inside the AL implementation, and the current attributes + * can be queried. The performance of such queries is implementation dependent, no + * performance guarantees are made. + *

+ * @param source Source to get property from + * @param pname property to get + * @param floatdata Buffer to write floats to + */ + public static void alGetSource(int source, int pname, FloatBuffer floatdata) { + BufferChecks.checkBuffer(floatdata, 1); + nalGetSourcefv(source, pname, MemoryUtil.getAddress(floatdata)); + } + static native void nalGetSourcefv(int source, int pname, long floatdata); + + /** + * Play() applied to an AL_INITIAL Source will promote the Source to AL_PLAYING, thus + * the data found in the Buffer will be fed into the processing, starting at the + * beginning. Play() applied to a AL_PLAYING Source will restart the Source from the + * beginning. It will not affect the configuration, and will leave the Source in + * AL_PLAYING state, but reset the sampling offset to the beginning. Play() applied to a + * AL_PAUSED Source will resume processing using the Source state as preserved at the + * Pause() operation. Play() applied to a AL_STOPPED Source will propagate it to + * AL_INITIAL then to AL_PLAYING immediately. + *

+ * @param sources array of sources to play + */ + public static void alSourcePlay(IntBuffer sources) { + BufferChecks.checkDirect(sources); + nalSourcePlayv(sources.remaining(), MemoryUtil.getAddress(sources)); + } + static native void nalSourcePlayv(int sources_n, long sources); + + /** + * Pause() applied to an AL_INITIAL Source is a legal NOP. Pause() applied to a + * AL_PLAYING Source will change its state to AL_PAUSED. The Source is exempt from + * processing, its current state is preserved. Pause() applied to a AL_PAUSED Source is a + * legal NOP. Pause() applied to a AL_STOPPED Source is a legal NOP. + *

+ * @param sources array of sources to pause + */ + public static void alSourcePause(IntBuffer sources) { + BufferChecks.checkDirect(sources); + nalSourcePausev(sources.remaining(), MemoryUtil.getAddress(sources)); + } + static native void nalSourcePausev(int sources_n, long sources); + + /** + * Stop() applied to an AL_INITIAL Source is a legal NOP. Stop() applied to a AL_PLAYING + * Source will change its state to AL_STOPPED. The Source is exempt from processing, + * its current state is preserved. Stop() applied to a AL_PAUSED Source will change its + * state to AL_STOPPED, with the same consequences as on a AL_PLAYING Source. Stop() + * applied to a AL_STOPPED Source is a legal NOP. + *

+ * @param sources array of sources to stop + */ + public static void alSourceStop(IntBuffer sources) { + BufferChecks.checkDirect(sources); + nalSourceStopv(sources.remaining(), MemoryUtil.getAddress(sources)); + } + static native void nalSourceStopv(int sources_n, long sources); + + /** + * Rewind() applied to an AL_INITIAL Source is a legal NOP. Rewind() applied to a + * AL_PLAYING Source will change its state to AL_STOPPED then AL_INITIAL. The Source is + * exempt from processing, its current state is preserved, with the exception of the + * sampling offset which is reset to the beginning. Rewind() applied to a AL_PAUSED + * Source will change its state to AL_INITIAL, with the same consequences as on a + * AL_PLAYING Source. Rewind() applied to a AL_STOPPED Source promotes the Source to + * AL_INITIAL, resetting the sampling offset to the beginning. + *

+ * @param sources array of sources to rewind + */ + public static void alSourceRewind(IntBuffer sources) { + BufferChecks.checkDirect(sources); + nalSourceRewindv(sources.remaining(), MemoryUtil.getAddress(sources)); + } + static native void nalSourceRewindv(int sources_n, long sources); + + /** + * Play() applied to an AL_INITIAL Source will promote the Source to AL_PLAYING, thus + * the data found in the Buffer will be fed into the processing, starting at the + * beginning. Play() applied to a AL_PLAYING Source will restart the Source from the + * beginning. It will not affect the configuration, and will leave the Source in + * AL_PLAYING state, but reset the sampling offset to the beginning. Play() applied to a + * AL_PAUSED Source will resume processing using the Source state as preserved at the + * Pause() operation. Play() applied to a AL_STOPPED Source will propagate it to + * AL_INITIAL then to AL_PLAYING immediately. + *

+ * @param source Source to play + */ + public static void alSourcePlay(int source) { + nalSourcePlay(source); + } + static native void nalSourcePlay(int source); + + /** + * Pause() applied to an AL_INITIAL Source is a legal NOP. Pause() applied to a + * AL_PLAYING Source will change its state to AL_PAUSED. The Source is exempt from + * processing, its current state is preserved. Pause() applied to a AL_PAUSED Source is a + * legal NOP. Pause() applied to a AL_STOPPED Source is a legal NOP. + *

+ * @param source Source to pause + */ + public static void alSourcePause(int source) { + nalSourcePause(source); + } + static native void nalSourcePause(int source); + + /** + * Stop() applied to an AL_INITIAL Source is a legal NOP. Stop() applied to a AL_PLAYING + * Source will change its state to AL_STOPPED. The Source is exempt from processing, + * its current state is preserved. Stop() applied to a AL_PAUSED Source will change its + * state to AL_STOPPED, with the same consequences as on a AL_PLAYING Source. Stop() + * applied to a AL_STOPPED Source is a legal NOP. + *

+ * @param source Source to stop + */ + public static void alSourceStop(int source) { + nalSourceStop(source); + } + static native void nalSourceStop(int source); + + /** + * Rewind() applied to an AL_INITIAL Source is a legal NOP. Rewind() applied to a + * AL_PLAYING Source will change its state to AL_STOPPED then AL_INITIAL. The Source is + * exempt from processing, its current state is preserved, with the exception of the + * sampling offset which is reset to the beginning. Rewind() applied to a AL_PAUSED + * Source will change its state to AL_INITIAL, with the same consequences as on a + * AL_PLAYING Source. Rewind() applied to a AL_STOPPED Source promotes the Source to + * AL_INITIAL, resetting the sampling offset to the beginning. + *

+ * @param source Source to rewind + */ + public static void alSourceRewind(int source) { + nalSourceRewind(source); + } + static native void nalSourceRewind(int source); + + /** + * The application requests a number of Buffers using GenBuffers. + *

+ * @param buffers holding buffers + */ + public static void alGenBuffers(IntBuffer buffers) { + BufferChecks.checkDirect(buffers); + nalGenBuffers(buffers.remaining(), MemoryUtil.getAddress(buffers)); + } + static native void nalGenBuffers(int buffers_n, long buffers); + + /** Overloads alGenBuffers. */ + public static int alGenBuffers() { + int __result = nalGenBuffers2(1); + return __result; + } + static native int nalGenBuffers2(int n); + + /** + *

+ * The application requests deletion of a number of Buffers by calling DeleteBuffers. + *

+ *

+ * Once deleted, Names are no longer valid for use with AL function calls. Any such + * use will cause an AL_INVALID_NAME error. The implementation is free to defer actual + * release of resources. + *

+ *

+ * IsBuffer(bname) can be used to verify deletion of a buffer. Deleting bufferName 0 is + * a legal NOP in both scalar and vector forms of the command. The same is true for + * unused buffer names, e.g. such as not allocated yet, or as released already. + *

+ * @param buffers Buffer to delete from + */ + public static void alDeleteBuffers(IntBuffer buffers) { + BufferChecks.checkDirect(buffers); + nalDeleteBuffers(buffers.remaining(), MemoryUtil.getAddress(buffers)); + } + static native void nalDeleteBuffers(int buffers_n, long buffers); + + /** Overloads alDeleteBuffers. */ + public static void alDeleteBuffers(int buffer) { + nalDeleteBuffers2(1, buffer); + } + static native void nalDeleteBuffers2(int n, int buffer); + + /** + * The application can verify whether a buffer Name is valid using the IsBuffer query. + *

+ * @param buffer buffer to be tested for validity + * @return true if supplied buffer is valid, false if not + */ + public static boolean alIsBuffer(int buffer) { + boolean __result = nalIsBuffer(buffer); + return __result; + } + static native boolean nalIsBuffer(int buffer); + + /** + *

+ * A special case of Buffer state is the actual sound sample data stored in asociation + * with the Buffer. Applications can specify sample data using BufferData. + *

+ *

+ * The data specified is copied to an internal software, or if possible, hardware buffer. + * The implementation is free to apply decompression, conversion, resampling, and + * filtering as needed. The internal format of the Buffer is not exposed to the + * application, and not accessible. Valid formats are AL_FORMAT_MONO8, + * AL_FORMAT_MONO16, AL_FORMAT_STEREO8, and AL_FORMAT_STEREO16. An + * implementation may expose other formats, see the chapter on Extensions for + * information on determining if additional formats are supported. + *

+ *

+ * Applications should always check for an error condition after attempting to specify + * buffer data in case an implementation has to generate an AL_OUT_OF_MEMORY or + * conversion related AL_INVALID_VALUE error. The application is free to reuse the + * memory specified by the data pointer once the call to BufferData returns. The + * implementation has to dereference, e.g. copy, the data during BufferData execution. + *

+ *

+ * @param buffer Buffer to fill + * @param format format sound data is in + * @param data location of data + * @param freq frequency of data + */ + public static void alBufferData(int buffer, int format, ByteBuffer data, int freq) { + BufferChecks.checkDirect(data); + nalBufferData(buffer, format, MemoryUtil.getAddress(data), data.remaining(), freq); + } + /** + *

+ * A special case of Buffer state is the actual sound sample data stored in asociation + * with the Buffer. Applications can specify sample data using BufferData. + *

+ *

+ * The data specified is copied to an internal software, or if possible, hardware buffer. + * The implementation is free to apply decompression, conversion, resampling, and + * filtering as needed. The internal format of the Buffer is not exposed to the + * application, and not accessible. Valid formats are AL_FORMAT_MONO8, + * AL_FORMAT_MONO16, AL_FORMAT_STEREO8, and AL_FORMAT_STEREO16. An + * implementation may expose other formats, see the chapter on Extensions for + * information on determining if additional formats are supported. + *

+ *

+ * Applications should always check for an error condition after attempting to specify + * buffer data in case an implementation has to generate an AL_OUT_OF_MEMORY or + * conversion related AL_INVALID_VALUE error. The application is free to reuse the + * memory specified by the data pointer once the call to BufferData returns. The + * implementation has to dereference, e.g. copy, the data during BufferData execution. + *

+ *

+ * @param buffer Buffer to fill + * @param format format sound data is in + * @param data location of data + * @param freq frequency of data + */ + public static void alBufferData(int buffer, int format, IntBuffer data, int freq) { + BufferChecks.checkDirect(data); + nalBufferData(buffer, format, MemoryUtil.getAddress(data), (data.remaining() << 2), freq); + } + /** + *

+ * A special case of Buffer state is the actual sound sample data stored in asociation + * with the Buffer. Applications can specify sample data using BufferData. + *

+ *

+ * The data specified is copied to an internal software, or if possible, hardware buffer. + * The implementation is free to apply decompression, conversion, resampling, and + * filtering as needed. The internal format of the Buffer is not exposed to the + * application, and not accessible. Valid formats are AL_FORMAT_MONO8, + * AL_FORMAT_MONO16, AL_FORMAT_STEREO8, and AL_FORMAT_STEREO16. An + * implementation may expose other formats, see the chapter on Extensions for + * information on determining if additional formats are supported. + *

+ *

+ * Applications should always check for an error condition after attempting to specify + * buffer data in case an implementation has to generate an AL_OUT_OF_MEMORY or + * conversion related AL_INVALID_VALUE error. The application is free to reuse the + * memory specified by the data pointer once the call to BufferData returns. The + * implementation has to dereference, e.g. copy, the data during BufferData execution. + *

+ *

+ * @param buffer Buffer to fill + * @param format format sound data is in + * @param data location of data + * @param freq frequency of data + */ + public static void alBufferData(int buffer, int format, ShortBuffer data, int freq) { + BufferChecks.checkDirect(data); + nalBufferData(buffer, format, MemoryUtil.getAddress(data), (data.remaining() << 1), freq); + } + static native void nalBufferData(int buffer, int format, long data, int data_size, int freq); + + /** + * Buffer state is maintained inside the AL implementation and can be queried in full.
+ * ALC_FREQUENCY - specified in samples per second, i.e. units of Hertz [Hz].
+ * ALC_SIZE - Size in bytes of the buffer data.
+ *

+ * @param buffer buffer to get property from + * @param pname name of property to retrieve + */ + public static int alGetBufferi(int buffer, int pname) { + int __result = nalGetBufferi(buffer, pname); + return __result; + } + static native int nalGetBufferi(int buffer, int pname); + + /** + * Buffer state is maintained inside the AL implementation and can be queried in full.
+ * ALC_FREQUENCY - specified in samples per second, i.e. units of Hertz [Hz].
+ * ALC_SIZE - Size in bytes of the buffer data.
+ *

+ * @param buffer buffer to get property from + * @param pname name of property to retrieve + * @return float + */ + public static float alGetBufferf(int buffer, int pname) { + float __result = nalGetBufferf(buffer, pname); + return __result; + } + static native float nalGetBufferf(int buffer, int pname); + + /** + *

+ * The application can queue up one or multiple buffer names using + * SourceQueueBuffers. The buffers will be queued in the sequence in which they + * appear in the array. + *

+ *

+ * This command is legal on a Source in any state (to allow for streaming, queueing + * has to be possible on a AL_PLAYING Source). Queues are read-only with exception of + * the unqueue operation. The Buffer Name AL_NONE (i.e. 0) can be queued. + *

+ *

+ * @param source source to queue buffers onto + * @param buffers buffers to be queued + */ + public static void alSourceQueueBuffers(int source, IntBuffer buffers) { + BufferChecks.checkDirect(buffers); + nalSourceQueueBuffers(source, buffers.remaining(), MemoryUtil.getAddress(buffers)); + } + static native void nalSourceQueueBuffers(int source, int buffers_n, long buffers); + + /** Overloads alSourceQueueBuffers. */ + public static void alSourceQueueBuffers(int source, int buffer) { + nalSourceQueueBuffers2(source, 1, buffer); + } + static native void nalSourceQueueBuffers2(int source, int n, int buffer); + + /** + *

+ * Once a queue entry for a buffer has been appended to a queue and is pending + * processing, it should not be changed. Removal of a given queue entry is not possible + * unless either the Source is AL_STOPPED (in which case then entire queue is considered + * processed), or if the queue entry has already been processed (AL_PLAYING or AL_PAUSED + * Source). + *

+ *

+ * The Unqueue command removes a number of buffers entries that have finished + * processing, in the order of appearance, from the queue. The operation will fail if + * more buffers are requested than available, leaving the destination arguments + * unchanged. An AL_INVALID_VALUE error will be thrown. If no error, the destination + * argument will have been updated accordingly. + *

+ *

+ * @param source source to unqueue buffers from + * @param buffers IntBuffer containing list of names that were unqueued + */ + public static void alSourceUnqueueBuffers(int source, IntBuffer buffers) { + BufferChecks.checkDirect(buffers); + nalSourceUnqueueBuffers(source, buffers.remaining(), MemoryUtil.getAddress(buffers)); + } + static native void nalSourceUnqueueBuffers(int source, int buffers_n, long buffers); + + /** Overloads alSourceUnqueueBuffers. */ + public static int alSourceUnqueueBuffers(int source) { + int __result = nalSourceUnqueueBuffers2(source, 1); + return __result; + } + static native int nalSourceUnqueueBuffers2(int source, int n); + + /** + *

+ * Samples usually use the entire dynamic range of the chosen format/encoding, + * independent of their real world intensity. In other words, a jet engine and a + * clockwork both will have samples with full amplitude. The application will then + * have to adjust Source AL_GAIN accordingly to account for relative differences. + *

+ *

+ * Source AL_GAIN is then attenuated by distance. The effective attenuation of a Source + * depends on many factors, among which distance attenuation and source and + * Listener AL_GAIN are only some of the contributing factors. Even if the source and + * Listener AL_GAIN exceed 1.0 (amplification beyond the guaranteed dynamic range), + * distance and other attenuation might ultimately limit the overall AL_GAIN to a value + * below 1.0. + *

+ *

+ * AL currently supports three modes of operation with respect to distance + * attenuation. It supports two distance-dependent attenuation models, one which is + * similar to the IASIG I3DL2 (and DS3D) model. The application choses one of these + * two models (or can chose to disable distance-dependent attenuation effects model) + * on a per-context basis. + *

+ *

+ * Legal arguments are AL_NONE, AL_INVERSE_DISTANCE, and + * AL_INVERSE_DISTANCE_CLAMPED. + *
+ *
+ * AL_NONE bypasses all distance attenuation + * calculation for all Sources. The implementation is expected to optimize this + * situation. + *
+ *
+ * AL_INVERSE_DISTANCE_CLAMPED is the DS3D model, with + * AL_REFERENCE_DISTANCE indicating both the reference distance and the distance + * below which gain will be clamped. + *
+ *
+ * AL_INVERSE_DISTANCE is equivalent to the DS3D + * model with the exception that AL_REFERENCE_DISTANCE does not imply any + * clamping. + *
+ *
+ * The AL implementation is still free to apply any range clamping as + * necessary. The current distance model chosen can be queried using GetIntegerv and + * AL_DISTANCE_MODEL. + *

+ *

+ * @param value distance model to be set + */ + public static void alDistanceModel(int value) { + nalDistanceModel(value); + } + static native void nalDistanceModel(int value); + + /** + * The Doppler Effect depends on the velocities of Source and Listener relative to the + * medium, and the propagation speed of sound in that medium. The application + * might want to emphasize or de-emphasize the Doppler Effect as physically accurate + * calculation might not give the desired results. The amount of frequency shift (pitch + * change) is proportional to the speed of listener and source along their line of sight. + * The application can increase or decrease that frequency shift by specifying the + * scaling factor AL should apply to the result of the calculation. + *
+ *
+ * The Doppler Effect as implemented by AL is described by the formula below. Effects + * of the medium (air, water) moving with respect to listener and source are ignored. + * AL_DOPPLER_VELOCITY is the propagation speed relative to which the Source + * velocities are interpreted. + *

+ *

+ *

+	 * 	 VD: AL_DOPPLER_VELOCITY
+	 * 	 DF: AL_DOPPLER_FACTOR
+	 * 	 vl: Listener velocity (scalar, projected on source-listener vector)
+	 * 	 vs: Source verlocity (scalar, projected on source-listener vector)
+	 * 	 f: Frequency in sample
+	 * 	 f': effective Doppler shifted frequency
+	 * 

+ * f' = DF * f * (VD-vl)/(VD+vs) + *

+ * vl<0, vs>0 : source and listener approaching each other + * vl>0, vs<0 : source and listener moving away from each other + *

+ *

+ *

+ * The implementation has to clamp the projected Listener velocity vl, if abs(vl) is + * greater or equal VD. It similarly has to clamp the projected Source velocity vs if + * abs(vs) is greater or equal VD. + *

+ *

+ * There are two API calls global to the current context that provide control of the two + * related parameters. + *

+ *

+ * AL_DOPPLER_FACTOR is a simple scaling to exaggerate or + * deemphasize the Doppler (pitch) shift resulting from the calculation. + *

+ *

+ * A negative value will result in an AL_INVALID_VALUE error, the command is then + * ignored. The default value is 1. The current setting can be queried using GetFloatv + * and AL_DOPPLER_FACTOR. The implementation is free to optimize the case of + * AL_DOPPLER_FACTOR being set to zero, as this effectively disables the effect. + *

+ *

+ * @param value Doppler scale value to set + */ + public static void alDopplerFactor(float value) { + nalDopplerFactor(value); + } + static native void nalDopplerFactor(float value); + + /** + * The Doppler Effect depends on the velocities of Source and Listener relative to the + * medium, and the propagation speed of sound in that medium. The application + * might want to emphasize or de-emphasize the Doppler Effect as physically accurate + * calculation might not give the desired results. The amount of frequency shift (pitch + * change) is proportional to the speed of listener and source along their line of sight. + * The application can increase or decrease that frequency shift by specifying the + * scaling factor AL should apply to the result of the calculation. + *
+ *
+ * The Doppler Effect as implemented by AL is described by the formula below. Effects + * of the medium (air, water) moving with respect to listener and source are ignored. + * AL_DOPPLER_VELOCITY is the propagation speed relative to which the Source + * velocities are interpreted. + *

+ *

+ *

+	 * 	 VD: AL_DOPPLER_VELOCITY
+	 * 	 DF: AL_DOPPLER_FACTOR
+	 * 	 vl: Listener velocity (scalar, projected on source-listener vector)
+	 * 	 vs: Source verlocity (scalar, projected on source-listener vector)
+	 * 	 f: Frequency in sample
+	 * 	 f': effective Doppler shifted frequency
+	 * 

+ * f' = DF * f * (VD-vl)/(VD+vs) + *

+ * vl<0, vs>0 : source and listener approaching each other + * vl>0, vs<0 : source and listener moving away from each other + *

+ *

+ *

+ * The implementation has to clamp the projected Listener velocity vl, if abs(vl) is + * greater or equal VD. It similarly has to clamp the projected Source velocity vs if + * abs(vs) is greater or equal VD. + *

+ *

+ * There are two API calls global to the current context that provide control of the two + * related parameters. + *

+ *

+ * AL_DOPPLER_VELOCITY allows the application to change the reference (propagation) + * velocity used in the Doppler Effect calculation. This permits the application to use a + * velocity scale appropriate to its purposes. + *

+ *

+ * A negative or zero value will result in an AL_INVALID_VALUE error, the command is + * then ignored. The default value is 1. The current setting can be queried using + * GetFloatv and AL_DOPPLER_VELOCITY. + *

+ *

+ * @param value Doppler velocity value to set + */ + public static void alDopplerVelocity(float value) { + nalDopplerVelocity(value); + } + static native void nalDopplerVelocity(float value); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/openal/AL11.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/openal/AL11.java new file mode 100644 index 0000000..caa5cd3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/openal/AL11.java @@ -0,0 +1,289 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.openal; + +import org.lwjgl.*; +import java.nio.*; + +/** + *
+ * This is the core OpenAL class. This class implements + * AL.h version 1.1 + *

+ * @author Brian Matzon + * @version $Revision: 2286 $ + * $Id: AL10.java 2286 2006-03-23 19:32:21Z matzon $ + */ +public final class AL11 { + + /** + * Source buffer position information in seconds + */ + public static final int AL_SEC_OFFSET = 0x1024; + + /** + * Source buffer position information in samples + */ + public static final int AL_SAMPLE_OFFSET = 0x1025; + + /** + * Source buffer position information in bytes + */ + public static final int AL_BYTE_OFFSET = 0x1026; + + /** + * Type of source: Buffer has been attached using AL_BUFFER + */ + public static final int AL_STATIC = 0x1028; + + /** + * Type of source: if one or more Buffers have been attached using alSourceQueueBuffers + */ + public static final int AL_STREAMING = 0x1029; + + /** + * Type of source: when it has the NULL buffer attached + */ + public static final int AL_UNDETERMINED = 0x1030; + + /** + * @see AL10#AL_INVALID_OPERATION + */ + public static final int AL_ILLEGAL_COMMAND = 0xA004; + + /** + * Speed of Sound in units per second + */ + public static final int AL_SPEED_OF_SOUND = 0xC003, + AL_LINEAR_DISTANCE = 0xD003, + AL_LINEAR_DISTANCE_CLAMPED = 0xD004, + AL_EXPONENT_DISTANCE = 0xD005, + AL_EXPONENT_DISTANCE_CLAMPED = 0xD006; + + private AL11() {} + + static native void initNativeStubs() throws LWJGLException; + + /** + * Listener attributes are changed using the Listener group of commands. + *

+ * @param pname name of the attribute to be set + * @param v1 value value 1 + * @param v2 value value 2 + * @param v3 value value 3 + */ + public static void alListener3i(int pname, int v1, int v2, int v3) { + nalListener3i(pname, v1, v2, v3); + } + static native void nalListener3i(int pname, int v1, int v2, int v3); + + /** + * Listener state is maintained inside the AL implementation and can be queried in + * full. + *

+ * @param pname name of the attribute to be retrieved + * @param intdata Buffer to write ints to + */ + public static void alGetListeneri(int pname, FloatBuffer intdata) { + BufferChecks.checkBuffer(intdata, 1); + nalGetListeneriv(pname, MemoryUtil.getAddress(intdata)); + } + static native void nalGetListeneriv(int pname, long intdata); + + /** + * Specifies the position and other properties as taken into account during + * sound processing. + *

+ * @param source Source to set property on + * @param pname property to set + * @param v1 value 1 of property + * @param v2 value 2 of property + * @param v3 value 3 of property + */ + public static void alSource3i(int source, int pname, int v1, int v2, int v3) { + nalSource3i(source, pname, v1, v2, v3); + } + static native void nalSource3i(int source, int pname, int v1, int v2, int v3); + + /** + * Specifies the position and other properties as taken into account during + * sound processing. + *

+ * @param source Source to set property on + * @param pname property to set + * @param value IntBuffer containing value of property + */ + public static void alSource(int source, int pname, IntBuffer value) { + BufferChecks.checkBuffer(value, 1); + nalSourceiv(source, pname, MemoryUtil.getAddress(value)); + } + static native void nalSourceiv(int source, int pname, long value); + + /** + * This function sets a floating point property of a buffer. + * note: There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by + * this call, but this function may be used by OpenAL extensions. + *

+ * @param buffer Buffer to set property on + * @param pname property to set + * @param value value of property + */ + public static void alBufferf(int buffer, int pname, float value) { + nalBufferf(buffer, pname, value); + } + static native void nalBufferf(int buffer, int pname, float value); + + /** + * This function sets a floating point property of a buffer. + * note: There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by + * this call, but this function may be used by OpenAL extensions. + *

+ * @param buffer Buffer to set property on + * @param pname property to set + * @param v1 value of property + * @param v2 value of property + * @param v3 value of property + */ + public static void alBuffer3f(int buffer, int pname, float v1, float v2, float v3) { + nalBuffer3f(buffer, pname, v1, v2, v3); + } + static native void nalBuffer3f(int buffer, int pname, float v1, float v2, float v3); + + /** + * This function sets a floating point property of a buffer. + * note: There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by + * this call, but this function may be used by OpenAL extensions. + *

+ * @param buffer Buffer to set property on + * @param pname property to set + * @param value FloatBuffer containing value of property + */ + public static void alBuffer(int buffer, int pname, FloatBuffer value) { + BufferChecks.checkBuffer(value, 1); + nalBufferfv(buffer, pname, MemoryUtil.getAddress(value)); + } + static native void nalBufferfv(int buffer, int pname, long value); + + /** + * This function sets an integer property of a buffer. + * note: There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by + * this call, but this function may be used by OpenAL extensions. + *

+ * @param buffer Buffer to set property on + * @param pname property to set + * @param value value of property + */ + public static void alBufferi(int buffer, int pname, int value) { + nalBufferi(buffer, pname, value); + } + static native void nalBufferi(int buffer, int pname, int value); + + /** + * This function sets an integer property of a buffer. + * note: There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by + * this call, but this function may be used by OpenAL extensions. + *

+ * @param buffer Buffer to set property on + * @param pname property to set + * @param v1 value of property + * @param v2 value of property + * @param v3 value of property + */ + public static void alBuffer3i(int buffer, int pname, int v1, int v2, int v3) { + nalBuffer3i(buffer, pname, v1, v2, v3); + } + static native void nalBuffer3i(int buffer, int pname, int v1, int v2, int v3); + + /** + * This function sets an integer property of a buffer. + * note: There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by + * this call, but this function may be used by OpenAL extensions. + *

+ * @param buffer Buffer to set property on + * @param pname property to set + * @param value IntBuffer containing value of property + */ + public static void alBuffer(int buffer, int pname, IntBuffer value) { + BufferChecks.checkBuffer(value, 1); + nalBufferiv(buffer, pname, MemoryUtil.getAddress(value)); + } + static native void nalBufferiv(int buffer, int pname, long value); + + /** + * This function retrieves an integer property of a buffer. + * note: There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by + * this call, but this function may be used by OpenAL extensions. + *

+ * @param buffer Buffer to get property from + * @param pname name of property + * @return int + */ + public static int alGetBufferi(int buffer, int pname) { + int __result = nalGetBufferi(buffer, pname); + return __result; + } + static native int nalGetBufferi(int buffer, int pname); + + /** + * This function retrieves an integer property of a buffer. + *

+ * @param buffer Buffer to get property from + * @param pname name of property + */ + public static void alGetBuffer(int buffer, int pname, IntBuffer values) { + BufferChecks.checkBuffer(values, 1); + nalGetBufferiv(buffer, pname, MemoryUtil.getAddress(values)); + } + static native void nalGetBufferiv(int buffer, int pname, long values); + + /** + * This function retrieves a floating point property of a buffer. + * note: There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by + * this call, but this function may be used by OpenAL extensions. + *

+ * @param buffer Buffer to get property from + * @param pname name of property + * @return floating point property + */ + public static float alGetBufferf(int buffer, int pname) { + float __result = nalGetBufferf(buffer, pname); + return __result; + } + static native float nalGetBufferf(int buffer, int pname); + + /** + * This function retrieves a floating point property of a buffer. + * note: There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by + * this call, but this function may be used by OpenAL extensions. + *

+ * @param buffer Buffer to get property from + * @param pname name of property + */ + public static void alGetBuffer(int buffer, int pname, FloatBuffer values) { + BufferChecks.checkBuffer(values, 1); + nalGetBufferfv(buffer, pname, MemoryUtil.getAddress(values)); + } + static native void nalGetBufferfv(int buffer, int pname, long values); + + /** + *

+ * AL_SPEED_OF_SOUND allows the application to change the reference (propagation) + * speed used in the Doppler calculation. The source and listener velocities should be + * expressed in the same units as the speed of sound. + *

+ *

+ * A negative or zero value will result in an AL_INVALID_VALUE error, and the + * command is ignored. The default value is 343.3 (appropriate for velocity units of meters + * and air as the propagation medium). The current setting can be queried using + * alGetFloat{v} and AL_SPEED_OF_SOUND. + * Distance and velocity units are completely independent of one another (so you could use + * different units for each if desired). + *

+ *

+ * @param value distance model to be set + */ + public static void alSpeedOfSound(float value) { + nalSpeedOfSound(value); + } + static native void nalSpeedOfSound(float value); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/openal/EFX10.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/openal/EFX10.java new file mode 100644 index 0000000..84a657e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/openal/EFX10.java @@ -0,0 +1,757 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.openal; + +import org.lwjgl.*; +import java.nio.*; + +/** + * Implementation of the OpenAL extension ALC_EXT_EFX (version 1.0). Contains necessary fields, + * methods and a range of supplementary fields containing minimum, maximum and default values of + * the former fields. + *

+ * On top of regular functions defined in the ALC_EXT_EFX, there are also several convenience + * functions. Namely alGen... and alDelete... which do not take a Java buffer parameter and + * automatically create or delete a single object, without the overhead of using a buffer. + *

+ * For comments and specification of functions and fields, refer to the "Effects Extension Guide" + * which is part of the OpenAL SDK and can be downloaded from: + * http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx + *

+ * @author Ciardhubh + * @version $Revision$ + * $Id$ + */ +public final class EFX10 { + + public static final java.lang.String ALC_EXT_EFX_NAME = "ALC_EXT_EFX"; + + public static final int ALC_EFX_MAJOR_VERSION = 0x20001, + ALC_EFX_MINOR_VERSION = 0x20002, + ALC_MAX_AUXILIARY_SENDS = 0x20003, + AL_METERS_PER_UNIT = 0x20004, + AL_DIRECT_FILTER = 0x20005, + AL_AUXILIARY_SEND_FILTER = 0x20006, + AL_AIR_ABSORPTION_FACTOR = 0x20007, + AL_ROOM_ROLLOFF_FACTOR = 0x20008, + AL_CONE_OUTER_GAINHF = 0x20009, + AL_DIRECT_FILTER_GAINHF_AUTO = 0x2000A, + AL_AUXILIARY_SEND_FILTER_GAIN_AUTO = 0x2000B, + AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO = 0x2000C, + AL_EFFECTSLOT_EFFECT = 0x1, + AL_EFFECTSLOT_GAIN = 0x2, + AL_EFFECTSLOT_AUXILIARY_SEND_AUTO = 0x3, + AL_EFFECTSLOT_NULL = 0x0, + AL_REVERB_DENSITY = 0x1, + AL_REVERB_DIFFUSION = 0x2, + AL_REVERB_GAIN = 0x3, + AL_REVERB_GAINHF = 0x4, + AL_REVERB_DECAY_TIME = 0x5, + AL_REVERB_DECAY_HFRATIO = 0x6, + AL_REVERB_REFLECTIONS_GAIN = 0x7, + AL_REVERB_REFLECTIONS_DELAY = 0x8, + AL_REVERB_LATE_REVERB_GAIN = 0x9, + AL_REVERB_LATE_REVERB_DELAY = 0xA, + AL_REVERB_AIR_ABSORPTION_GAINHF = 0xB, + AL_REVERB_ROOM_ROLLOFF_FACTOR = 0xC, + AL_REVERB_DECAY_HFLIMIT = 0xD, + AL_EAXREVERB_DENSITY = 0x1, + AL_EAXREVERB_DIFFUSION = 0x2, + AL_EAXREVERB_GAIN = 0x3, + AL_EAXREVERB_GAINHF = 0x4, + AL_EAXREVERB_GAINLF = 0x5, + AL_EAXREVERB_DECAY_TIME = 0x6, + AL_EAXREVERB_DECAY_HFRATIO = 0x7, + AL_EAXREVERB_DECAY_LFRATIO = 0x8, + AL_EAXREVERB_REFLECTIONS_GAIN = 0x9, + AL_EAXREVERB_REFLECTIONS_DELAY = 0xA, + AL_EAXREVERB_REFLECTIONS_PAN = 0xB, + AL_EAXREVERB_LATE_REVERB_GAIN = 0xC, + AL_EAXREVERB_LATE_REVERB_DELAY = 0xD, + AL_EAXREVERB_LATE_REVERB_PAN = 0xE, + AL_EAXREVERB_ECHO_TIME = 0xF, + AL_EAXREVERB_ECHO_DEPTH = 0x10, + AL_EAXREVERB_MODULATION_TIME = 0x11, + AL_EAXREVERB_MODULATION_DEPTH = 0x12, + AL_EAXREVERB_AIR_ABSORPTION_GAINHF = 0x13, + AL_EAXREVERB_HFREFERENCE = 0x14, + AL_EAXREVERB_LFREFERENCE = 0x15, + AL_EAXREVERB_ROOM_ROLLOFF_FACTOR = 0x16, + AL_EAXREVERB_DECAY_HFLIMIT = 0x17, + AL_CHORUS_WAVEFORM = 0x1, + AL_CHORUS_PHASE = 0x2, + AL_CHORUS_RATE = 0x3, + AL_CHORUS_DEPTH = 0x4, + AL_CHORUS_FEEDBACK = 0x5, + AL_CHORUS_DELAY = 0x6, + AL_DISTORTION_EDGE = 0x1, + AL_DISTORTION_GAIN = 0x2, + AL_DISTORTION_LOWPASS_CUTOFF = 0x3, + AL_DISTORTION_EQCENTER = 0x4, + AL_DISTORTION_EQBANDWIDTH = 0x5, + AL_ECHO_DELAY = 0x1, + AL_ECHO_LRDELAY = 0x2, + AL_ECHO_DAMPING = 0x3, + AL_ECHO_FEEDBACK = 0x4, + AL_ECHO_SPREAD = 0x5, + AL_FLANGER_WAVEFORM = 0x1, + AL_FLANGER_PHASE = 0x2, + AL_FLANGER_RATE = 0x3, + AL_FLANGER_DEPTH = 0x4, + AL_FLANGER_FEEDBACK = 0x5, + AL_FLANGER_DELAY = 0x6, + AL_FREQUENCY_SHIFTER_FREQUENCY = 0x1, + AL_FREQUENCY_SHIFTER_LEFT_DIRECTION = 0x2, + AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION = 0x3, + AL_VOCAL_MORPHER_PHONEMEA = 0x1, + AL_VOCAL_MORPHER_PHONEMEA_COARSE_TUNING = 0x2, + AL_VOCAL_MORPHER_PHONEMEB = 0x3, + AL_VOCAL_MORPHER_PHONEMEB_COARSE_TUNING = 0x4, + AL_VOCAL_MORPHER_WAVEFORM = 0x5, + AL_VOCAL_MORPHER_RATE = 0x6, + AL_PITCH_SHIFTER_COARSE_TUNE = 0x1, + AL_PITCH_SHIFTER_FINE_TUNE = 0x2, + AL_RING_MODULATOR_FREQUENCY = 0x1, + AL_RING_MODULATOR_HIGHPASS_CUTOFF = 0x2, + AL_RING_MODULATOR_WAVEFORM = 0x3, + AL_AUTOWAH_ATTACK_TIME = 0x1, + AL_AUTOWAH_RELEASE_TIME = 0x2, + AL_AUTOWAH_RESONANCE = 0x3, + AL_AUTOWAH_PEAK_GAIN = 0x4, + AL_COMPRESSOR_ONOFF = 0x1, + AL_EQUALIZER_LOW_GAIN = 0x1, + AL_EQUALIZER_LOW_CUTOFF = 0x2, + AL_EQUALIZER_MID1_GAIN = 0x3, + AL_EQUALIZER_MID1_CENTER = 0x4, + AL_EQUALIZER_MID1_WIDTH = 0x5, + AL_EQUALIZER_MID2_GAIN = 0x6, + AL_EQUALIZER_MID2_CENTER = 0x7, + AL_EQUALIZER_MID2_WIDTH = 0x8, + AL_EQUALIZER_HIGH_GAIN = 0x9, + AL_EQUALIZER_HIGH_CUTOFF = 0xA, + AL_EFFECT_FIRST_PARAMETER = 0x0, + AL_EFFECT_LAST_PARAMETER = 0x8000, + AL_EFFECT_TYPE = 0x8001, + AL_EFFECT_NULL = 0x0, + AL_EFFECT_REVERB = 0x1, + AL_EFFECT_CHORUS = 0x2, + AL_EFFECT_DISTORTION = 0x3, + AL_EFFECT_ECHO = 0x4, + AL_EFFECT_FLANGER = 0x5, + AL_EFFECT_FREQUENCY_SHIFTER = 0x6, + AL_EFFECT_VOCAL_MORPHER = 0x7, + AL_EFFECT_PITCH_SHIFTER = 0x8, + AL_EFFECT_RING_MODULATOR = 0x9, + AL_EFFECT_AUTOWAH = 0xA, + AL_EFFECT_COMPRESSOR = 0xB, + AL_EFFECT_EQUALIZER = 0xC, + AL_EFFECT_EAXREVERB = 0x8000, + AL_LOWPASS_GAIN = 0x1, + AL_LOWPASS_GAINHF = 0x2, + AL_HIGHPASS_GAIN = 0x1, + AL_HIGHPASS_GAINLF = 0x2, + AL_BANDPASS_GAIN = 0x1, + AL_BANDPASS_GAINLF = 0x2, + AL_BANDPASS_GAINHF = 0x3, + AL_FILTER_FIRST_PARAMETER = 0x0, + AL_FILTER_LAST_PARAMETER = 0x8000, + AL_FILTER_TYPE = 0x8001, + AL_FILTER_NULL = 0x0, + AL_FILTER_LOWPASS = 0x1, + AL_FILTER_HIGHPASS = 0x2, + AL_FILTER_BANDPASS = 0x3; + + public static final float AL_MIN_AIR_ABSORPTION_FACTOR = 0.0f, + AL_MAX_AIR_ABSORPTION_FACTOR = 10.0f, + AL_DEFAULT_AIR_ABSORPTION_FACTOR = 0.0f, + AL_MIN_ROOM_ROLLOFF_FACTOR = 0.0f, + AL_MAX_ROOM_ROLLOFF_FACTOR = 10.0f, + AL_DEFAULT_ROOM_ROLLOFF_FACTOR = 0.0f, + AL_MIN_CONE_OUTER_GAINHF = 0.0f, + AL_MAX_CONE_OUTER_GAINHF = 1.0f, + AL_DEFAULT_CONE_OUTER_GAINHF = 1.0f; + + public static final int AL_MIN_DIRECT_FILTER_GAINHF_AUTO = 0x0, + AL_MAX_DIRECT_FILTER_GAINHF_AUTO = 0x1, + AL_DEFAULT_DIRECT_FILTER_GAINHF_AUTO = 0x1, + AL_MIN_AUXILIARY_SEND_FILTER_GAIN_AUTO = 0x0, + AL_MAX_AUXILIARY_SEND_FILTER_GAIN_AUTO = 0x1, + AL_DEFAULT_AUXILIARY_SEND_FILTER_GAIN_AUTO = 0x1, + AL_MIN_AUXILIARY_SEND_FILTER_GAINHF_AUTO = 0x0, + AL_MAX_AUXILIARY_SEND_FILTER_GAINHF_AUTO = 0x1, + AL_DEFAULT_AUXILIARY_SEND_FILTER_GAINHF_AUTO = 0x1; + + public static final float AL_MIN_METERS_PER_UNIT = 1.4E-45f, + AL_MAX_METERS_PER_UNIT = 3.4028235E38f, + AL_DEFAULT_METERS_PER_UNIT = 1.0f, + AL_REVERB_MIN_DENSITY = 0.0f, + AL_REVERB_MAX_DENSITY = 1.0f, + AL_REVERB_DEFAULT_DENSITY = 1.0f, + AL_REVERB_MIN_DIFFUSION = 0.0f, + AL_REVERB_MAX_DIFFUSION = 1.0f, + AL_REVERB_DEFAULT_DIFFUSION = 1.0f, + AL_REVERB_MIN_GAIN = 0.0f, + AL_REVERB_MAX_GAIN = 1.0f, + AL_REVERB_DEFAULT_GAIN = 0.32f, + AL_REVERB_MIN_GAINHF = 0.0f, + AL_REVERB_MAX_GAINHF = 1.0f, + AL_REVERB_DEFAULT_GAINHF = 0.89f, + AL_REVERB_MIN_DECAY_TIME = 0.1f, + AL_REVERB_MAX_DECAY_TIME = 20.0f, + AL_REVERB_DEFAULT_DECAY_TIME = 1.49f, + AL_REVERB_MIN_DECAY_HFRATIO = 0.1f, + AL_REVERB_MAX_DECAY_HFRATIO = 2.0f, + AL_REVERB_DEFAULT_DECAY_HFRATIO = 0.83f, + AL_REVERB_MIN_REFLECTIONS_GAIN = 0.0f, + AL_REVERB_MAX_REFLECTIONS_GAIN = 3.16f, + AL_REVERB_DEFAULT_REFLECTIONS_GAIN = 0.05f, + AL_REVERB_MIN_REFLECTIONS_DELAY = 0.0f, + AL_REVERB_MAX_REFLECTIONS_DELAY = 0.3f, + AL_REVERB_DEFAULT_REFLECTIONS_DELAY = 0.007f, + AL_REVERB_MIN_LATE_REVERB_GAIN = 0.0f, + AL_REVERB_MAX_LATE_REVERB_GAIN = 10.0f, + AL_REVERB_DEFAULT_LATE_REVERB_GAIN = 1.26f, + AL_REVERB_MIN_LATE_REVERB_DELAY = 0.0f, + AL_REVERB_MAX_LATE_REVERB_DELAY = 0.1f, + AL_REVERB_DEFAULT_LATE_REVERB_DELAY = 0.011f, + AL_REVERB_MIN_AIR_ABSORPTION_GAINHF = 0.892f, + AL_REVERB_MAX_AIR_ABSORPTION_GAINHF = 1.0f, + AL_REVERB_DEFAULT_AIR_ABSORPTION_GAINHF = 0.994f, + AL_REVERB_MIN_ROOM_ROLLOFF_FACTOR = 0.0f, + AL_REVERB_MAX_ROOM_ROLLOFF_FACTOR = 10.0f, + AL_REVERB_DEFAULT_ROOM_ROLLOFF_FACTOR = 0.0f; + + public static final int AL_REVERB_MIN_DECAY_HFLIMIT = 0x0, + AL_REVERB_MAX_DECAY_HFLIMIT = 0x1, + AL_REVERB_DEFAULT_DECAY_HFLIMIT = 0x1; + + public static final float AL_EAXREVERB_MIN_DENSITY = 0.0f, + AL_EAXREVERB_MAX_DENSITY = 1.0f, + AL_EAXREVERB_DEFAULT_DENSITY = 1.0f, + AL_EAXREVERB_MIN_DIFFUSION = 0.0f, + AL_EAXREVERB_MAX_DIFFUSION = 1.0f, + AL_EAXREVERB_DEFAULT_DIFFUSION = 1.0f, + AL_EAXREVERB_MIN_GAIN = 0.0f, + AL_EAXREVERB_MAX_GAIN = 1.0f, + AL_EAXREVERB_DEFAULT_GAIN = 0.32f, + AL_EAXREVERB_MIN_GAINHF = 0.0f, + AL_EAXREVERB_MAX_GAINHF = 1.0f, + AL_EAXREVERB_DEFAULT_GAINHF = 0.89f, + AL_EAXREVERB_MIN_GAINLF = 0.0f, + AL_EAXREVERB_MAX_GAINLF = 1.0f, + AL_EAXREVERB_DEFAULT_GAINLF = 1.0f, + AL_EAXREVERB_MIN_DECAY_TIME = 0.1f, + AL_EAXREVERB_MAX_DECAY_TIME = 20.0f, + AL_EAXREVERB_DEFAULT_DECAY_TIME = 1.49f, + AL_EAXREVERB_MIN_DECAY_HFRATIO = 0.1f, + AL_EAXREVERB_MAX_DECAY_HFRATIO = 2.0f, + AL_EAXREVERB_DEFAULT_DECAY_HFRATIO = 0.83f, + AL_EAXREVERB_MIN_DECAY_LFRATIO = 0.1f, + AL_EAXREVERB_MAX_DECAY_LFRATIO = 2.0f, + AL_EAXREVERB_DEFAULT_DECAY_LFRATIO = 1.0f, + AL_EAXREVERB_MIN_REFLECTIONS_GAIN = 0.0f, + AL_EAXREVERB_MAX_REFLECTIONS_GAIN = 3.16f, + AL_EAXREVERB_DEFAULT_REFLECTIONS_GAIN = 0.05f, + AL_EAXREVERB_MIN_REFLECTIONS_DELAY = 0.0f, + AL_EAXREVERB_MAX_REFLECTIONS_DELAY = 0.3f, + AL_EAXREVERB_DEFAULT_REFLECTIONS_DELAY = 0.007f, + AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ = 0.0f, + AL_EAXREVERB_MIN_LATE_REVERB_GAIN = 0.0f, + AL_EAXREVERB_MAX_LATE_REVERB_GAIN = 10.0f, + AL_EAXREVERB_DEFAULT_LATE_REVERB_GAIN = 1.26f, + AL_EAXREVERB_MIN_LATE_REVERB_DELAY = 0.0f, + AL_EAXREVERB_MAX_LATE_REVERB_DELAY = 0.1f, + AL_EAXREVERB_DEFAULT_LATE_REVERB_DELAY = 0.011f, + AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ = 0.0f, + AL_EAXREVERB_MIN_ECHO_TIME = 0.075f, + AL_EAXREVERB_MAX_ECHO_TIME = 0.25f, + AL_EAXREVERB_DEFAULT_ECHO_TIME = 0.25f, + AL_EAXREVERB_MIN_ECHO_DEPTH = 0.0f, + AL_EAXREVERB_MAX_ECHO_DEPTH = 1.0f, + AL_EAXREVERB_DEFAULT_ECHO_DEPTH = 0.0f, + AL_EAXREVERB_MIN_MODULATION_TIME = 0.04f, + AL_EAXREVERB_MAX_MODULATION_TIME = 4.0f, + AL_EAXREVERB_DEFAULT_MODULATION_TIME = 0.25f, + AL_EAXREVERB_MIN_MODULATION_DEPTH = 0.0f, + AL_EAXREVERB_MAX_MODULATION_DEPTH = 1.0f, + AL_EAXREVERB_DEFAULT_MODULATION_DEPTH = 0.0f, + AL_EAXREVERB_MIN_AIR_ABSORPTION_GAINHF = 0.892f, + AL_EAXREVERB_MAX_AIR_ABSORPTION_GAINHF = 1.0f, + AL_EAXREVERB_DEFAULT_AIR_ABSORPTION_GAINHF = 0.994f, + AL_EAXREVERB_MIN_HFREFERENCE = 1000.0f, + AL_EAXREVERB_MAX_HFREFERENCE = 20000.0f, + AL_EAXREVERB_DEFAULT_HFREFERENCE = 5000.0f, + AL_EAXREVERB_MIN_LFREFERENCE = 20.0f, + AL_EAXREVERB_MAX_LFREFERENCE = 1000.0f, + AL_EAXREVERB_DEFAULT_LFREFERENCE = 250.0f, + AL_EAXREVERB_MIN_ROOM_ROLLOFF_FACTOR = 0.0f, + AL_EAXREVERB_MAX_ROOM_ROLLOFF_FACTOR = 10.0f, + AL_EAXREVERB_DEFAULT_ROOM_ROLLOFF_FACTOR = 0.0f; + + public static final int AL_EAXREVERB_MIN_DECAY_HFLIMIT = 0x0, + AL_EAXREVERB_MAX_DECAY_HFLIMIT = 0x1, + AL_EAXREVERB_DEFAULT_DECAY_HFLIMIT = 0x1, + AL_CHORUS_WAVEFORM_SINUSOID = 0x0, + AL_CHORUS_WAVEFORM_TRIANGLE = 0x1, + AL_CHORUS_MIN_WAVEFORM = 0x0, + AL_CHORUS_MAX_WAVEFORM = 0x1, + AL_CHORUS_DEFAULT_WAVEFORM = 0x1, + AL_CHORUS_MIN_PHASE = 0xFFFFFF4C, + AL_CHORUS_MAX_PHASE = 0xB4, + AL_CHORUS_DEFAULT_PHASE = 0x5A; + + public static final float AL_CHORUS_MIN_RATE = 0.0f, + AL_CHORUS_MAX_RATE = 10.0f, + AL_CHORUS_DEFAULT_RATE = 1.1f, + AL_CHORUS_MIN_DEPTH = 0.0f, + AL_CHORUS_MAX_DEPTH = 1.0f, + AL_CHORUS_DEFAULT_DEPTH = 0.1f, + AL_CHORUS_MIN_FEEDBACK = -1.0f, + AL_CHORUS_MAX_FEEDBACK = 1.0f, + AL_CHORUS_DEFAULT_FEEDBACK = 0.25f, + AL_CHORUS_MIN_DELAY = 0.0f, + AL_CHORUS_MAX_DELAY = 0.016f, + AL_CHORUS_DEFAULT_DELAY = 0.016f, + AL_DISTORTION_MIN_EDGE = 0.0f, + AL_DISTORTION_MAX_EDGE = 1.0f, + AL_DISTORTION_DEFAULT_EDGE = 0.2f, + AL_DISTORTION_MIN_GAIN = 0.01f, + AL_DISTORTION_MAX_GAIN = 1.0f, + AL_DISTORTION_DEFAULT_GAIN = 0.05f, + AL_DISTORTION_MIN_LOWPASS_CUTOFF = 80.0f, + AL_DISTORTION_MAX_LOWPASS_CUTOFF = 24000.0f, + AL_DISTORTION_DEFAULT_LOWPASS_CUTOFF = 8000.0f, + AL_DISTORTION_MIN_EQCENTER = 80.0f, + AL_DISTORTION_MAX_EQCENTER = 24000.0f, + AL_DISTORTION_DEFAULT_EQCENTER = 3600.0f, + AL_DISTORTION_MIN_EQBANDWIDTH = 80.0f, + AL_DISTORTION_MAX_EQBANDWIDTH = 24000.0f, + AL_DISTORTION_DEFAULT_EQBANDWIDTH = 3600.0f, + AL_ECHO_MIN_DELAY = 0.0f, + AL_ECHO_MAX_DELAY = 0.207f, + AL_ECHO_DEFAULT_DELAY = 0.1f, + AL_ECHO_MIN_LRDELAY = 0.0f, + AL_ECHO_MAX_LRDELAY = 0.404f, + AL_ECHO_DEFAULT_LRDELAY = 0.1f, + AL_ECHO_MIN_DAMPING = 0.0f, + AL_ECHO_MAX_DAMPING = 0.99f, + AL_ECHO_DEFAULT_DAMPING = 0.5f, + AL_ECHO_MIN_FEEDBACK = 0.0f, + AL_ECHO_MAX_FEEDBACK = 1.0f, + AL_ECHO_DEFAULT_FEEDBACK = 0.5f, + AL_ECHO_MIN_SPREAD = -1.0f, + AL_ECHO_MAX_SPREAD = 1.0f, + AL_ECHO_DEFAULT_SPREAD = -1.0f; + + public static final int AL_FLANGER_WAVEFORM_SINUSOID = 0x0, + AL_FLANGER_WAVEFORM_TRIANGLE = 0x1, + AL_FLANGER_MIN_WAVEFORM = 0x0, + AL_FLANGER_MAX_WAVEFORM = 0x1, + AL_FLANGER_DEFAULT_WAVEFORM = 0x1, + AL_FLANGER_MIN_PHASE = 0xFFFFFF4C, + AL_FLANGER_MAX_PHASE = 0xB4, + AL_FLANGER_DEFAULT_PHASE = 0x0; + + public static final float AL_FLANGER_MIN_RATE = 0.0f, + AL_FLANGER_MAX_RATE = 10.0f, + AL_FLANGER_DEFAULT_RATE = 0.27f, + AL_FLANGER_MIN_DEPTH = 0.0f, + AL_FLANGER_MAX_DEPTH = 1.0f, + AL_FLANGER_DEFAULT_DEPTH = 1.0f, + AL_FLANGER_MIN_FEEDBACK = -1.0f, + AL_FLANGER_MAX_FEEDBACK = 1.0f, + AL_FLANGER_DEFAULT_FEEDBACK = -0.5f, + AL_FLANGER_MIN_DELAY = 0.0f, + AL_FLANGER_MAX_DELAY = 0.004f, + AL_FLANGER_DEFAULT_DELAY = 0.002f, + AL_FREQUENCY_SHIFTER_MIN_FREQUENCY = 0.0f, + AL_FREQUENCY_SHIFTER_MAX_FREQUENCY = 24000.0f, + AL_FREQUENCY_SHIFTER_DEFAULT_FREQUENCY = 0.0f; + + public static final int AL_FREQUENCY_SHIFTER_MIN_LEFT_DIRECTION = 0x0, + AL_FREQUENCY_SHIFTER_MAX_LEFT_DIRECTION = 0x2, + AL_FREQUENCY_SHIFTER_DEFAULT_LEFT_DIRECTION = 0x0, + AL_FREQUENCY_SHIFTER_DIRECTION_DOWN = 0x0, + AL_FREQUENCY_SHIFTER_DIRECTION_UP = 0x1, + AL_FREQUENCY_SHIFTER_DIRECTION_OFF = 0x2, + AL_FREQUENCY_SHIFTER_MIN_RIGHT_DIRECTION = 0x0, + AL_FREQUENCY_SHIFTER_MAX_RIGHT_DIRECTION = 0x2, + AL_FREQUENCY_SHIFTER_DEFAULT_RIGHT_DIRECTION = 0x0, + AL_VOCAL_MORPHER_MIN_PHONEMEA = 0x0, + AL_VOCAL_MORPHER_MAX_PHONEMEA = 0x1D, + AL_VOCAL_MORPHER_DEFAULT_PHONEMEA = 0x0, + AL_VOCAL_MORPHER_MIN_PHONEMEA_COARSE_TUNING = 0xFFFFFFE8, + AL_VOCAL_MORPHER_MAX_PHONEMEA_COARSE_TUNING = 0x18, + AL_VOCAL_MORPHER_DEFAULT_PHONEMEA_COARSE_TUNING = 0x0, + AL_VOCAL_MORPHER_MIN_PHONEMEB = 0x0, + AL_VOCAL_MORPHER_MAX_PHONEMEB = 0x1D, + AL_VOCAL_MORPHER_DEFAULT_PHONEMEB = 0xA, + AL_VOCAL_MORPHER_MIN_PHONEMEB_COARSE_TUNING = 0xFFFFFFE8, + AL_VOCAL_MORPHER_MAX_PHONEMEB_COARSE_TUNING = 0x18, + AL_VOCAL_MORPHER_DEFAULT_PHONEMEB_COARSE_TUNING = 0x0, + AL_VOCAL_MORPHER_PHONEME_A = 0x0, + AL_VOCAL_MORPHER_PHONEME_E = 0x1, + AL_VOCAL_MORPHER_PHONEME_I = 0x2, + AL_VOCAL_MORPHER_PHONEME_O = 0x3, + AL_VOCAL_MORPHER_PHONEME_U = 0x4, + AL_VOCAL_MORPHER_PHONEME_AA = 0x5, + AL_VOCAL_MORPHER_PHONEME_AE = 0x6, + AL_VOCAL_MORPHER_PHONEME_AH = 0x7, + AL_VOCAL_MORPHER_PHONEME_AO = 0x8, + AL_VOCAL_MORPHER_PHONEME_EH = 0x9, + AL_VOCAL_MORPHER_PHONEME_ER = 0xA, + AL_VOCAL_MORPHER_PHONEME_IH = 0xB, + AL_VOCAL_MORPHER_PHONEME_IY = 0xC, + AL_VOCAL_MORPHER_PHONEME_UH = 0xD, + AL_VOCAL_MORPHER_PHONEME_UW = 0xE, + AL_VOCAL_MORPHER_PHONEME_B = 0xF, + AL_VOCAL_MORPHER_PHONEME_D = 0x10, + AL_VOCAL_MORPHER_PHONEME_F = 0x11, + AL_VOCAL_MORPHER_PHONEME_G = 0x12, + AL_VOCAL_MORPHER_PHONEME_J = 0x13, + AL_VOCAL_MORPHER_PHONEME_K = 0x14, + AL_VOCAL_MORPHER_PHONEME_L = 0x15, + AL_VOCAL_MORPHER_PHONEME_M = 0x16, + AL_VOCAL_MORPHER_PHONEME_N = 0x17, + AL_VOCAL_MORPHER_PHONEME_P = 0x18, + AL_VOCAL_MORPHER_PHONEME_R = 0x19, + AL_VOCAL_MORPHER_PHONEME_S = 0x1A, + AL_VOCAL_MORPHER_PHONEME_T = 0x1B, + AL_VOCAL_MORPHER_PHONEME_V = 0x1C, + AL_VOCAL_MORPHER_PHONEME_Z = 0x1D, + AL_VOCAL_MORPHER_WAVEFORM_SINUSOID = 0x0, + AL_VOCAL_MORPHER_WAVEFORM_TRIANGLE = 0x1, + AL_VOCAL_MORPHER_WAVEFORM_SAWTOOTH = 0x2, + AL_VOCAL_MORPHER_MIN_WAVEFORM = 0x0, + AL_VOCAL_MORPHER_MAX_WAVEFORM = 0x2, + AL_VOCAL_MORPHER_DEFAULT_WAVEFORM = 0x0; + + public static final float AL_VOCAL_MORPHER_MIN_RATE = 0.0f, + AL_VOCAL_MORPHER_MAX_RATE = 10.0f, + AL_VOCAL_MORPHER_DEFAULT_RATE = 1.41f; + + public static final int AL_PITCH_SHIFTER_MIN_COARSE_TUNE = 0xFFFFFFF4, + AL_PITCH_SHIFTER_MAX_COARSE_TUNE = 0xC, + AL_PITCH_SHIFTER_DEFAULT_COARSE_TUNE = 0xC, + AL_PITCH_SHIFTER_MIN_FINE_TUNE = 0xFFFFFFCE, + AL_PITCH_SHIFTER_MAX_FINE_TUNE = 0x32, + AL_PITCH_SHIFTER_DEFAULT_FINE_TUNE = 0x0; + + public static final float AL_RING_MODULATOR_MIN_FREQUENCY = 0.0f, + AL_RING_MODULATOR_MAX_FREQUENCY = 8000.0f, + AL_RING_MODULATOR_DEFAULT_FREQUENCY = 440.0f, + AL_RING_MODULATOR_MIN_HIGHPASS_CUTOFF = 0.0f, + AL_RING_MODULATOR_MAX_HIGHPASS_CUTOFF = 24000.0f, + AL_RING_MODULATOR_DEFAULT_HIGHPASS_CUTOFF = 800.0f; + + public static final int AL_RING_MODULATOR_SINUSOID = 0x0, + AL_RING_MODULATOR_SAWTOOTH = 0x1, + AL_RING_MODULATOR_SQUARE = 0x2, + AL_RING_MODULATOR_MIN_WAVEFORM = 0x0, + AL_RING_MODULATOR_MAX_WAVEFORM = 0x2, + AL_RING_MODULATOR_DEFAULT_WAVEFORM = 0x0; + + public static final float AL_AUTOWAH_MIN_ATTACK_TIME = 1.0E-4f, + AL_AUTOWAH_MAX_ATTACK_TIME = 1.0f, + AL_AUTOWAH_DEFAULT_ATTACK_TIME = 0.06f, + AL_AUTOWAH_MIN_RELEASE_TIME = 1.0E-4f, + AL_AUTOWAH_MAX_RELEASE_TIME = 1.0f, + AL_AUTOWAH_DEFAULT_RELEASE_TIME = 0.06f, + AL_AUTOWAH_MIN_RESONANCE = 2.0f, + AL_AUTOWAH_MAX_RESONANCE = 1000.0f, + AL_AUTOWAH_DEFAULT_RESONANCE = 1000.0f, + AL_AUTOWAH_MIN_PEAK_GAIN = 3.0E-5f, + AL_AUTOWAH_MAX_PEAK_GAIN = 31621.0f, + AL_AUTOWAH_DEFAULT_PEAK_GAIN = 11.22f; + + public static final int AL_COMPRESSOR_MIN_ONOFF = 0x0, + AL_COMPRESSOR_MAX_ONOFF = 0x1, + AL_COMPRESSOR_DEFAULT_ONOFF = 0x1; + + public static final float AL_EQUALIZER_MIN_LOW_GAIN = 0.126f, + AL_EQUALIZER_MAX_LOW_GAIN = 7.943f, + AL_EQUALIZER_DEFAULT_LOW_GAIN = 1.0f, + AL_EQUALIZER_MIN_LOW_CUTOFF = 50.0f, + AL_EQUALIZER_MAX_LOW_CUTOFF = 800.0f, + AL_EQUALIZER_DEFAULT_LOW_CUTOFF = 200.0f, + AL_EQUALIZER_MIN_MID1_GAIN = 0.126f, + AL_EQUALIZER_MAX_MID1_GAIN = 7.943f, + AL_EQUALIZER_DEFAULT_MID1_GAIN = 1.0f, + AL_EQUALIZER_MIN_MID1_CENTER = 200.0f, + AL_EQUALIZER_MAX_MID1_CENTER = 3000.0f, + AL_EQUALIZER_DEFAULT_MID1_CENTER = 500.0f, + AL_EQUALIZER_MIN_MID1_WIDTH = 0.01f, + AL_EQUALIZER_MAX_MID1_WIDTH = 1.0f, + AL_EQUALIZER_DEFAULT_MID1_WIDTH = 1.0f, + AL_EQUALIZER_MIN_MID2_GAIN = 0.126f, + AL_EQUALIZER_MAX_MID2_GAIN = 7.943f, + AL_EQUALIZER_DEFAULT_MID2_GAIN = 1.0f, + AL_EQUALIZER_MIN_MID2_CENTER = 1000.0f, + AL_EQUALIZER_MAX_MID2_CENTER = 8000.0f, + AL_EQUALIZER_DEFAULT_MID2_CENTER = 3000.0f, + AL_EQUALIZER_MIN_MID2_WIDTH = 0.01f, + AL_EQUALIZER_MAX_MID2_WIDTH = 1.0f, + AL_EQUALIZER_DEFAULT_MID2_WIDTH = 1.0f, + AL_EQUALIZER_MIN_HIGH_GAIN = 0.126f, + AL_EQUALIZER_MAX_HIGH_GAIN = 7.943f, + AL_EQUALIZER_DEFAULT_HIGH_GAIN = 1.0f, + AL_EQUALIZER_MIN_HIGH_CUTOFF = 4000.0f, + AL_EQUALIZER_MAX_HIGH_CUTOFF = 16000.0f, + AL_EQUALIZER_DEFAULT_HIGH_CUTOFF = 6000.0f, + LOWPASS_MIN_GAIN = 0.0f, + LOWPASS_MAX_GAIN = 1.0f, + LOWPASS_DEFAULT_GAIN = 1.0f, + LOWPASS_MIN_GAINHF = 0.0f, + LOWPASS_MAX_GAINHF = 1.0f, + LOWPASS_DEFAULT_GAINHF = 1.0f, + HIGHPASS_MIN_GAIN = 0.0f, + HIGHPASS_MAX_GAIN = 1.0f, + HIGHPASS_DEFAULT_GAIN = 1.0f, + HIGHPASS_MIN_GAINLF = 0.0f, + HIGHPASS_MAX_GAINLF = 1.0f, + HIGHPASS_DEFAULT_GAINLF = 1.0f, + BANDPASS_MIN_GAIN = 0.0f, + BANDPASS_MAX_GAIN = 1.0f, + BANDPASS_DEFAULT_GAIN = 1.0f, + BANDPASS_MIN_GAINHF = 0.0f, + BANDPASS_MAX_GAINHF = 1.0f, + BANDPASS_DEFAULT_GAINHF = 1.0f, + BANDPASS_MIN_GAINLF = 0.0f, + BANDPASS_MAX_GAINLF = 1.0f, + BANDPASS_DEFAULT_GAINLF = 1.0f; + + private EFX10() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void alGenAuxiliaryEffectSlots(IntBuffer auxiliaryeffectslots) { + BufferChecks.checkDirect(auxiliaryeffectslots); + nalGenAuxiliaryEffectSlots(auxiliaryeffectslots.remaining(), MemoryUtil.getAddress(auxiliaryeffectslots)); + } + static native void nalGenAuxiliaryEffectSlots(int auxiliaryeffectslots_n, long auxiliaryeffectslots); + + /** Overloads alGenAuxiliaryEffectSlots. */ + public static int alGenAuxiliaryEffectSlots() { + int __result = nalGenAuxiliaryEffectSlots2(1); + return __result; + } + static native int nalGenAuxiliaryEffectSlots2(int n); + + public static void alDeleteAuxiliaryEffectSlots(IntBuffer auxiliaryeffectslots) { + BufferChecks.checkDirect(auxiliaryeffectslots); + nalDeleteAuxiliaryEffectSlots(auxiliaryeffectslots.remaining(), MemoryUtil.getAddress(auxiliaryeffectslots)); + } + static native void nalDeleteAuxiliaryEffectSlots(int auxiliaryeffectslots_n, long auxiliaryeffectslots); + + /** Overloads alDeleteAuxiliaryEffectSlots. */ + public static void alDeleteAuxiliaryEffectSlots(int auxiliaryeffectslot) { + nalDeleteAuxiliaryEffectSlots2(1, auxiliaryeffectslot); + } + static native void nalDeleteAuxiliaryEffectSlots2(int n, int auxiliaryeffectslot); + + public static boolean alIsAuxiliaryEffectSlot(int auxiliaryeffectslot) { + boolean __result = nalIsAuxiliaryEffectSlot(auxiliaryeffectslot); + return __result; + } + static native boolean nalIsAuxiliaryEffectSlot(int auxiliaryeffectslot); + + public static void alAuxiliaryEffectSloti(int auxiliaryeffectslot, int param, int value) { + nalAuxiliaryEffectSloti(auxiliaryeffectslot, param, value); + } + static native void nalAuxiliaryEffectSloti(int auxiliaryeffectslot, int param, int value); + + public static void alAuxiliaryEffectSlot(int auxiliaryeffectslot, int param, IntBuffer values) { + BufferChecks.checkBuffer(values, 1); + nalAuxiliaryEffectSlotiv(auxiliaryeffectslot, param, MemoryUtil.getAddress(values)); + } + static native void nalAuxiliaryEffectSlotiv(int auxiliaryeffectslot, int param, long values); + + public static void alAuxiliaryEffectSlotf(int auxiliaryeffectslot, int param, float value) { + nalAuxiliaryEffectSlotf(auxiliaryeffectslot, param, value); + } + static native void nalAuxiliaryEffectSlotf(int auxiliaryeffectslot, int param, float value); + + public static void alAuxiliaryEffectSlot(int auxiliaryeffectslot, int param, FloatBuffer values) { + BufferChecks.checkBuffer(values, 1); + nalAuxiliaryEffectSlotfv(auxiliaryeffectslot, param, MemoryUtil.getAddress(values)); + } + static native void nalAuxiliaryEffectSlotfv(int auxiliaryeffectslot, int param, long values); + + public static int alGetAuxiliaryEffectSloti(int auxiliaryeffectslot, int param) { + int __result = nalGetAuxiliaryEffectSloti(auxiliaryeffectslot, param); + return __result; + } + static native int nalGetAuxiliaryEffectSloti(int auxiliaryeffectslot, int param); + + public static void alGetAuxiliaryEffectSlot(int auxiliaryeffectslot, int param, IntBuffer intdata) { + BufferChecks.checkBuffer(intdata, 1); + nalGetAuxiliaryEffectSlotiv(auxiliaryeffectslot, param, MemoryUtil.getAddress(intdata)); + } + static native void nalGetAuxiliaryEffectSlotiv(int auxiliaryeffectslot, int param, long intdata); + + public static float alGetAuxiliaryEffectSlotf(int auxiliaryeffectslot, int param) { + float __result = nalGetAuxiliaryEffectSlotf(auxiliaryeffectslot, param); + return __result; + } + static native float nalGetAuxiliaryEffectSlotf(int auxiliaryeffectslot, int param); + + public static void alGetAuxiliaryEffectSlot(int auxiliaryeffectslot, int param, FloatBuffer floatdata) { + BufferChecks.checkBuffer(floatdata, 1); + nalGetAuxiliaryEffectSlotfv(auxiliaryeffectslot, param, MemoryUtil.getAddress(floatdata)); + } + static native void nalGetAuxiliaryEffectSlotfv(int auxiliaryeffectslot, int param, long floatdata); + + public static void alGenEffects(IntBuffer effects) { + BufferChecks.checkDirect(effects); + nalGenEffects(effects.remaining(), MemoryUtil.getAddress(effects)); + } + static native void nalGenEffects(int effects_n, long effects); + + /** Overloads alGenEffects. */ + public static int alGenEffects() { + int __result = nalGenEffects2(1); + return __result; + } + static native int nalGenEffects2(int n); + + public static void alDeleteEffects(IntBuffer effects) { + BufferChecks.checkDirect(effects); + nalDeleteEffects(effects.remaining(), MemoryUtil.getAddress(effects)); + } + static native void nalDeleteEffects(int effects_n, long effects); + + /** Overloads alDeleteEffects. */ + public static void alDeleteEffects(int effect) { + nalDeleteEffects2(1, effect); + } + static native void nalDeleteEffects2(int n, int effect); + + public static boolean alIsEffect(int effect) { + boolean __result = nalIsEffect(effect); + return __result; + } + static native boolean nalIsEffect(int effect); + + public static void alEffecti(int effect, int param, int value) { + nalEffecti(effect, param, value); + } + static native void nalEffecti(int effect, int param, int value); + + public static void alEffect(int effect, int param, IntBuffer values) { + BufferChecks.checkBuffer(values, 1); + nalEffectiv(effect, param, MemoryUtil.getAddress(values)); + } + static native void nalEffectiv(int effect, int param, long values); + + public static void alEffectf(int effect, int param, float value) { + nalEffectf(effect, param, value); + } + static native void nalEffectf(int effect, int param, float value); + + public static void alEffect(int effect, int param, FloatBuffer values) { + BufferChecks.checkBuffer(values, 1); + nalEffectfv(effect, param, MemoryUtil.getAddress(values)); + } + static native void nalEffectfv(int effect, int param, long values); + + public static int alGetEffecti(int effect, int param) { + int __result = nalGetEffecti(effect, param); + return __result; + } + static native int nalGetEffecti(int effect, int param); + + public static void alGetEffect(int effect, int param, IntBuffer intdata) { + BufferChecks.checkBuffer(intdata, 1); + nalGetEffectiv(effect, param, MemoryUtil.getAddress(intdata)); + } + static native void nalGetEffectiv(int effect, int param, long intdata); + + public static float alGetEffectf(int effect, int param) { + float __result = nalGetEffectf(effect, param); + return __result; + } + static native float nalGetEffectf(int effect, int param); + + public static void alGetEffect(int effect, int param, FloatBuffer floatdata) { + BufferChecks.checkBuffer(floatdata, 1); + nalGetEffectfv(effect, param, MemoryUtil.getAddress(floatdata)); + } + static native void nalGetEffectfv(int effect, int param, long floatdata); + + public static void alGenFilters(IntBuffer filters) { + BufferChecks.checkDirect(filters); + nalGenFilters(filters.remaining(), MemoryUtil.getAddress(filters)); + } + static native void nalGenFilters(int filters_n, long filters); + + /** Overloads alGenFilters. */ + public static int alGenFilters() { + int __result = nalGenFilters2(1); + return __result; + } + static native int nalGenFilters2(int n); + + public static void alDeleteFilters(IntBuffer filters) { + BufferChecks.checkDirect(filters); + nalDeleteFilters(filters.remaining(), MemoryUtil.getAddress(filters)); + } + static native void nalDeleteFilters(int filters_n, long filters); + + /** Overloads alDeleteFilters. */ + public static void alDeleteFilters(int filter) { + nalDeleteFilters2(1, filter); + } + static native void nalDeleteFilters2(int n, int filter); + + public static boolean alIsFilter(int filter) { + boolean __result = nalIsFilter(filter); + return __result; + } + static native boolean nalIsFilter(int filter); + + public static void alFilteri(int filter, int param, int value) { + nalFilteri(filter, param, value); + } + static native void nalFilteri(int filter, int param, int value); + + public static void alFilter(int filter, int param, IntBuffer values) { + BufferChecks.checkBuffer(values, 1); + nalFilteriv(filter, param, MemoryUtil.getAddress(values)); + } + static native void nalFilteriv(int filter, int param, long values); + + public static void alFilterf(int filter, int param, float value) { + nalFilterf(filter, param, value); + } + static native void nalFilterf(int filter, int param, float value); + + public static void alFilter(int filter, int param, FloatBuffer values) { + BufferChecks.checkBuffer(values, 1); + nalFilterfv(filter, param, MemoryUtil.getAddress(values)); + } + static native void nalFilterfv(int filter, int param, long values); + + public static int alGetFilteri(int filter, int param) { + int __result = nalGetFilteri(filter, param); + return __result; + } + static native int nalGetFilteri(int filter, int param); + + public static void alGetFilter(int filter, int param, IntBuffer intdata) { + BufferChecks.checkBuffer(intdata, 1); + nalGetFilteriv(filter, param, MemoryUtil.getAddress(intdata)); + } + static native void nalGetFilteriv(int filter, int param, long intdata); + + public static float alGetFilterf(int filter, int param) { + float __result = nalGetFilterf(filter, param); + return __result; + } + static native float nalGetFilterf(int filter, int param); + + public static void alGetFilter(int filter, int param, FloatBuffer floatdata) { + BufferChecks.checkBuffer(floatdata, 1); + nalGetFilterfv(filter, param, MemoryUtil.getAddress(floatdata)); + } + static native void nalGetFilterfv(int filter, int param, long floatdata); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/AMDDeviceAttributeQuery.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/AMDDeviceAttributeQuery.java new file mode 100644 index 0000000..898be30 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/AMDDeviceAttributeQuery.java @@ -0,0 +1,17 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; + +public final class AMDDeviceAttributeQuery { + + /** + * Accepted as the <param_name> parameter of clGetDeviceInfo. Return the + * offset in nano-seconds between an event timestamp and Epoch. + */ + public static final int CL_DEVICE_PROFILING_TIMER_OFFSET_AMD = 0x4036; + + private AMDDeviceAttributeQuery() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/AMDDeviceMemoryFlags.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/AMDDeviceMemoryFlags.java new file mode 100644 index 0000000..6bcb0c0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/AMDDeviceMemoryFlags.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; + +public final class AMDDeviceMemoryFlags { + + /** + * Alloc from GPU's CPU visible heap. + */ + public static final int CL_MEM_USE_PERSISTENT_MEM_AMD = 0x40; + + private AMDDeviceMemoryFlags() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/AMDOfflineDevices.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/AMDOfflineDevices.java new file mode 100644 index 0000000..f194720 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/AMDOfflineDevices.java @@ -0,0 +1,13 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; + +public final class AMDOfflineDevices { + + public static final int CL_CONTEXT_OFFLINE_DEVICES_AMD = 0x403F; + + private AMDOfflineDevices() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/APPLEContextLoggingFunctions.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/APPLEContextLoggingFunctions.java new file mode 100644 index 0000000..5bf847d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/APPLEContextLoggingFunctions.java @@ -0,0 +1,41 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; + +final class APPLEContextLoggingFunctions { + + private APPLEContextLoggingFunctions() {} + + static void clLogMessagesToSystemLogAPPLE(ByteBuffer errstr, ByteBuffer private_info, ByteBuffer user_data) { + long function_pointer = CLCapabilities.clLogMessagesToSystemLogAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(errstr); + BufferChecks.checkDirect(private_info); + BufferChecks.checkDirect(user_data); + nclLogMessagesToSystemLogAPPLE(MemoryUtil.getAddress(errstr), MemoryUtil.getAddress(private_info), private_info.remaining(), MemoryUtil.getAddress(user_data), function_pointer); + } + static native void nclLogMessagesToSystemLogAPPLE(long errstr, long private_info, long private_info_cb, long user_data, long function_pointer); + + static void clLogMessagesToStdoutAPPLE(ByteBuffer errstr, ByteBuffer private_info, ByteBuffer user_data) { + long function_pointer = CLCapabilities.clLogMessagesToStdoutAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(errstr); + BufferChecks.checkDirect(private_info); + BufferChecks.checkDirect(user_data); + nclLogMessagesToStdoutAPPLE(MemoryUtil.getAddress(errstr), MemoryUtil.getAddress(private_info), private_info.remaining(), MemoryUtil.getAddress(user_data), function_pointer); + } + static native void nclLogMessagesToStdoutAPPLE(long errstr, long private_info, long private_info_cb, long user_data, long function_pointer); + + static void clLogMessagesToStderrAPPLE(ByteBuffer errstr, ByteBuffer private_info, ByteBuffer user_data) { + long function_pointer = CLCapabilities.clLogMessagesToStderrAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(errstr); + BufferChecks.checkDirect(private_info); + BufferChecks.checkDirect(user_data); + nclLogMessagesToStderrAPPLE(MemoryUtil.getAddress(errstr), MemoryUtil.getAddress(private_info), private_info.remaining(), MemoryUtil.getAddress(user_data), function_pointer); + } + static native void nclLogMessagesToStderrAPPLE(long errstr, long private_info, long private_info_cb, long user_data, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/APPLEGLSharing.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/APPLEGLSharing.java new file mode 100644 index 0000000..f2cc640 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/APPLEGLSharing.java @@ -0,0 +1,51 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; + +public final class APPLEGLSharing { + + /** + * This enumerated value can be specified as part of the <properties> argument passed to clCreateContext + * to allow OpenCL compliant devices in an existing CGL share group to be used as the devices in + * the newly created CL context. GL objects that were allocated in the given CGL share group can + * now be shared between CL and GL. + */ + public static final int CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE = 0x10000000; + + /** + * Returns a cl_device_id for the CL device associated with the virtual screen for + * the given CGL context. Return type: cl_device_id + */ + public static final int CL_CGL_DEVICE_FOR_CURRENT_VIRTUAL_SCREEN_APPLE = 0x10000002; + + /** + * Returns an array of cl_device_ids for the CL device(s) corresponding to + * the virtual screen(s) for the given CGL context. Return type: cl_device_id[] + */ + public static final int CL_CGL_DEVICES_FOR_SUPPORTED_VIRTUAL_SCREENS_APPLE = 0x10000003; + + /** + * Error code returned by clGetGLContextInfoAPPLE if an invalid platform_gl_ctx is provided + */ + public static final int CL_INVALID_GL_CONTEXT_APPLE = 0xFFFFFC18; + + private APPLEGLSharing() {} + + public static int clGetGLContextInfoAPPLE(CLContext context, PointerBuffer platform_gl_ctx, int param_name, ByteBuffer param_value, PointerBuffer param_value_size_ret) { + long function_pointer = CLCapabilities.clGetGLContextInfoAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(platform_gl_ctx, 1); + if (param_value != null) + BufferChecks.checkDirect(param_value); + if (param_value_size_ret != null) + BufferChecks.checkBuffer(param_value_size_ret, 1); + if ( param_value_size_ret == null && APIUtil.isDevicesParam(param_name) ) param_value_size_ret = APIUtil.getBufferPointer(); + int __result = nclGetGLContextInfoAPPLE(context.getPointer(), MemoryUtil.getAddress(platform_gl_ctx), param_name, (param_value == null ? 0 : param_value.remaining()), MemoryUtil.getAddressSafe(param_value), MemoryUtil.getAddressSafe(param_value_size_ret), function_pointer); + if ( __result == CL10.CL_SUCCESS && param_value != null && APIUtil.isDevicesParam(param_name) ) context.getParent().registerCLDevices(param_value, param_value_size_ret); + return __result; + } + static native int nclGetGLContextInfoAPPLE(long context, long platform_gl_ctx, int param_name, long param_value_param_value_size, long param_value, long param_value_size_ret, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/APPLESetMemObjectDestructor.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/APPLESetMemObjectDestructor.java new file mode 100644 index 0000000..e5fab40 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/APPLESetMemObjectDestructor.java @@ -0,0 +1,25 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; + +public final class APPLESetMemObjectDestructor { + + private APPLESetMemObjectDestructor() {} + + public static int clSetMemObjectDestructorAPPLE(CLMem memobj, CLMemObjectDestructorCallback pfn_notify) { + long function_pointer = CLCapabilities.clSetMemObjectDestructorAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + long user_data = CallbackUtil.createGlobalRef(pfn_notify); + int __result = 0; + try { + __result = nclSetMemObjectDestructorAPPLE(memobj.getPointer(), pfn_notify.getPointer(), user_data, function_pointer); + return __result; + } finally { + CallbackUtil.checkCallback(__result, user_data); + } + } + static native int nclSetMemObjectDestructorAPPLE(long memobj, long pfn_notify, long user_data, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/CL10.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/CL10.java new file mode 100644 index 0000000..0da8bd3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/CL10.java @@ -0,0 +1,1800 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; + +/** + * The core OpenCL 1.0 API + */ +public final class CL10 { + + /** + * Error Codes + */ + public static final int CL_SUCCESS = 0x0, + CL_DEVICE_NOT_FOUND = 0xFFFFFFFF, + CL_DEVICE_NOT_AVAILABLE = 0xFFFFFFFE, + CL_COMPILER_NOT_AVAILABLE = 0xFFFFFFFD, + CL_MEM_OBJECT_ALLOCATION_FAILURE = 0xFFFFFFFC, + CL_OUT_OF_RESOURCES = 0xFFFFFFFB, + CL_OUT_OF_HOST_MEMORY = 0xFFFFFFFA, + CL_PROFILING_INFO_NOT_AVAILABLE = 0xFFFFFFF9, + CL_MEM_COPY_OVERLAP = 0xFFFFFFF8, + CL_IMAGE_FORMAT_MISMATCH = 0xFFFFFFF7, + CL_IMAGE_FORMAT_NOT_SUPPORTED = 0xFFFFFFF6, + CL_BUILD_PROGRAM_FAILURE = 0xFFFFFFF5, + CL_MAP_FAILURE = 0xFFFFFFF4, + CL_INVALID_VALUE = 0xFFFFFFE2, + CL_INVALID_DEVICE_TYPE = 0xFFFFFFE1, + CL_INVALID_PLATFORM = 0xFFFFFFE0, + CL_INVALID_DEVICE = 0xFFFFFFDF, + CL_INVALID_CONTEXT = 0xFFFFFFDE, + CL_INVALID_QUEUE_PROPERTIES = 0xFFFFFFDD, + CL_INVALID_COMMAND_QUEUE = 0xFFFFFFDC, + CL_INVALID_HOST_PTR = 0xFFFFFFDB, + CL_INVALID_MEM_OBJECT = 0xFFFFFFDA, + CL_INVALID_IMAGE_FORMAT_DESCRIPTOR = 0xFFFFFFD9, + CL_INVALID_IMAGE_SIZE = 0xFFFFFFD8, + CL_INVALID_SAMPLER = 0xFFFFFFD7, + CL_INVALID_BINARY = 0xFFFFFFD6, + CL_INVALID_BUILD_OPTIONS = 0xFFFFFFD5, + CL_INVALID_PROGRAM = 0xFFFFFFD4, + CL_INVALID_PROGRAM_EXECUTABLE = 0xFFFFFFD3, + CL_INVALID_KERNEL_NAME = 0xFFFFFFD2, + CL_INVALID_KERNEL_DEFINITION = 0xFFFFFFD1, + CL_INVALID_KERNEL = 0xFFFFFFD0, + CL_INVALID_ARG_INDEX = 0xFFFFFFCF, + CL_INVALID_ARG_VALUE = 0xFFFFFFCE, + CL_INVALID_ARG_SIZE = 0xFFFFFFCD, + CL_INVALID_KERNEL_ARGS = 0xFFFFFFCC, + CL_INVALID_WORK_DIMENSION = 0xFFFFFFCB, + CL_INVALID_WORK_GROUP_SIZE = 0xFFFFFFCA, + CL_INVALID_WORK_ITEM_SIZE = 0xFFFFFFC9, + CL_INVALID_GLOBAL_OFFSET = 0xFFFFFFC8, + CL_INVALID_EVENT_WAIT_LIST = 0xFFFFFFC7, + CL_INVALID_EVENT = 0xFFFFFFC6, + CL_INVALID_OPERATION = 0xFFFFFFC5, + CL_INVALID_GL_OBJECT = 0xFFFFFFC4, + CL_INVALID_BUFFER_SIZE = 0xFFFFFFC3, + CL_INVALID_MIP_LEVEL = 0xFFFFFFC2, + CL_INVALID_GLOBAL_WORK_SIZE = 0xFFFFFFC1; + + /** + * OpenCL Version + */ + public static final int CL_VERSION_1_0 = 0x1; + + /** + * cl_bool + */ + public static final int CL_FALSE = 0x0, + CL_TRUE = 0x1; + + /** + * cl_platform_info + */ + public static final int CL_PLATFORM_PROFILE = 0x900, + CL_PLATFORM_VERSION = 0x901, + CL_PLATFORM_NAME = 0x902, + CL_PLATFORM_VENDOR = 0x903, + CL_PLATFORM_EXTENSIONS = 0x904; + + /** + * cl_device_type - bitfield + */ + public static final int CL_DEVICE_TYPE_DEFAULT = 0x1, + CL_DEVICE_TYPE_CPU = 0x2, + CL_DEVICE_TYPE_GPU = 0x4, + CL_DEVICE_TYPE_ACCELERATOR = 0x8, + CL_DEVICE_TYPE_ALL = 0xFFFFFFFF; + + /** + * cl_device_info + */ + public static final int CL_DEVICE_TYPE = 0x1000, + CL_DEVICE_VENDOR_ID = 0x1001, + CL_DEVICE_MAX_COMPUTE_UNITS = 0x1002, + CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS = 0x1003, + CL_DEVICE_MAX_WORK_GROUP_SIZE = 0x1004, + CL_DEVICE_MAX_WORK_ITEM_SIZES = 0x1005, + CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR = 0x1006, + CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT = 0x1007, + CL_DEVICE_PREFERRED_VECTOR_WIDTH_ = 0x1008, + CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG = 0x1009, + CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT = 0x100A, + CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE = 0x100B, + CL_DEVICE_MAX_CLOCK_FREQUENCY = 0x100C, + CL_DEVICE_ADDRESS_BITS = 0x100D, + CL_DEVICE_MAX_READ_IMAGE_ARGS = 0x100E, + CL_DEVICE_MAX_WRITE_IMAGE_ARGS = 0x100F, + CL_DEVICE_MAX_MEM_ALLOC_SIZE = 0x1010, + CL_DEVICE_IMAGE2D_MAX_WIDTH = 0x1011, + CL_DEVICE_IMAGE2D_MAX_HEIGHT = 0x1012, + CL_DEVICE_IMAGE3D_MAX_WIDTH = 0x1013, + CL_DEVICE_IMAGE3D_MAX_HEIGHT = 0x1014, + CL_DEVICE_IMAGE3D_MAX_DEPTH = 0x1015, + CL_DEVICE_IMAGE_SUPPORT = 0x1016, + CL_DEVICE_MAX_PARAMETER_SIZE = 0x1017, + CL_DEVICE_MAX_SAMPLERS = 0x1018, + CL_DEVICE_MEM_BASE_ADDR_ALIGN = 0x1019, + CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE = 0x101A, + CL_DEVICE_SINGLE_FP_CONFIG = 0x101B, + CL_DEVICE_GLOBAL_MEM_CACHE_TYPE = 0x101C, + CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE = 0x101D, + CL_DEVICE_GLOBAL_MEM_CACHE_SIZE = 0x101E, + CL_DEVICE_GLOBAL_MEM_SIZE = 0x101F, + CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE = 0x1020, + CL_DEVICE_MAX_CONSTANT_ARGS = 0x1021, + CL_DEVICE_LOCAL_MEM_TYPE = 0x1022, + CL_DEVICE_LOCAL_MEM_SIZE = 0x1023, + CL_DEVICE_ERROR_CORRECTION_SUPPORT = 0x1024, + CL_DEVICE_PROFILING_TIMER_RESOLUTION = 0x1025, + CL_DEVICE_ENDIAN_LITTLE = 0x1026, + CL_DEVICE_AVAILABLE = 0x1027, + CL_DEVICE_COMPILER_AVAILABLE = 0x1028, + CL_DEVICE_EXECUTION_CAPABILITIES = 0x1029, + CL_DEVICE_QUEUE_PROPERTIES = 0x102A, + CL_DEVICE_NAME = 0x102B, + CL_DEVICE_VENDOR = 0x102C, + CL_DRIVER_VERSION = 0x102D, + CL_DEVICE_PROFILE = 0x102E, + CL_DEVICE_VERSION = 0x102F, + CL_DEVICE_EXTENSIONS = 0x1030, + CL_DEVICE_PLATFORM = 0x1031; + + /** + * cl_device_fp_config - bitfield + */ + public static final int CL_FP_DENORM = 0x1, + CL_FP_INF_NAN = 0x2, + CL_FP_ROUND_TO_NEAREST = 0x4, + CL_FP_ROUND_TO_ZERO = 0x8, + CL_FP_ROUND_TO_INF = 0x10, + CL_FP_FMA = 0x20; + + /** + * cl_device_mem_cache_type + */ + public static final int CL_NONE = 0x0, + CL_READ_ONLY_CACHE = 0x1, + CL_READ_WRITE_CACHE = 0x2; + + /** + * cl_device_local_mem_type + */ + public static final int CL_LOCAL = 0x1, + CL_GLOBAL = 0x2; + + /** + * cl_device_exec_capabilities - bitfield + */ + public static final int CL_EXEC_KERNEL = 0x1, + CL_EXEC_NATIVE_KERNEL = 0x2; + + /** + * cl_command_queue_properties - bitfield + */ + public static final int CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE = 0x1, + CL_QUEUE_PROFILING_ENABLE = 0x2; + + /** + * cl_context_info + */ + public static final int CL_CONTEXT_REFERENCE_COUNT = 0x1080, + CL_CONTEXT_DEVICES = 0x1081, + CL_CONTEXT_PROPERTIES = 0x1082; + + /** + * cl_context_info + cl_context_properties + */ + public static final int CL_CONTEXT_PLATFORM = 0x1084; + + /** + * cl_command_queue_info + */ + public static final int CL_QUEUE_CONTEXT = 0x1090, + CL_QUEUE_DEVICE = 0x1091, + CL_QUEUE_REFERENCE_COUNT = 0x1092, + CL_QUEUE_PROPERTIES = 0x1093; + + /** + * cl_mem_flags - bitfield + */ + public static final int CL_MEM_READ_WRITE = 0x1, + CL_MEM_WRITE_ONLY = 0x2, + CL_MEM_READ_ONLY = 0x4, + CL_MEM_USE_HOST_PTR = 0x8, + CL_MEM_ALLOC_HOST_PTR = 0x10, + CL_MEM_COPY_HOST_PTR = 0x20; + + /** + * cl_channel_order + */ + public static final int CL_R = 0x10B0, + CL_A = 0x10B1, + CL_RG = 0x10B2, + CL_RA = 0x10B3, + CL_RGB = 0x10B4, + CL_RGBA = 0x10B5, + CL_BGRA = 0x10B6, + CL_ARGB = 0x10B7, + CL_INTENSITY = 0x10B8, + CL_LUMINANCE = 0x10B9; + + /** + * cl_channel_type + */ + public static final int CL_SNORM_INT8 = 0x10D0, + CL_SNORM_INT16 = 0x10D1, + CL_UNORM_INT8 = 0x10D2, + CL_UNORM_INT16 = 0x10D3, + CL_UNORM_SHORT_565 = 0x10D4, + CL_UNORM_SHORT_555 = 0x10D5, + CL_UNORM_INT_101010 = 0x10D6, + CL_SIGNED_INT8 = 0x10D7, + CL_SIGNED_INT16 = 0x10D8, + CL_SIGNED_INT32 = 0x10D9, + CL_UNSIGNED_INT8 = 0x10DA, + CL_UNSIGNED_INT16 = 0x10DB, + CL_UNSIGNED_INT32 = 0x10DC, + CL_HALF_FLOAT = 0x10DD, + CL_FLOAT = 0x10DE; + + /** + * cl_mem_object_type + */ + public static final int CL_MEM_OBJECT_BUFFER = 0x10F0, + CL_MEM_OBJECT_IMAGE2D = 0x10F1, + CL_MEM_OBJECT_IMAGE3D = 0x10F2; + + /** + * cl_mem_info + */ + public static final int CL_MEM_TYPE = 0x1100, + CL_MEM_FLAGS = 0x1101, + CL_MEM_SIZE = 0x1102, + CL_MEM_HOST_PTR = 0x1103, + CL_MEM_MAP_COUNT = 0x1104, + CL_MEM_REFERENCE_COUNT = 0x1105, + CL_MEM_CONTEXT = 0x1106; + + /** + * cl_image_info + */ + public static final int CL_IMAGE_FORMAT = 0x1110, + CL_IMAGE_ELEMENT_SIZE = 0x1111, + CL_IMAGE_ROW_PITCH = 0x1112, + CL_IMAGE_SLICE_PITCH = 0x1113, + CL_IMAGE_WIDTH = 0x1114, + CL_IMAGE_HEIGHT = 0x1115, + CL_IMAGE_DEPTH = 0x1116; + + /** + * cl_addressing_mode + */ + public static final int CL_ADDRESS_NONE = 0x1130, + CL_ADDRESS_CLAMP_TO_EDGE = 0x1131, + CL_ADDRESS_CLAMP = 0x1132, + CL_ADDRESS_REPEAT = 0x1133; + + /** + * cl_filter_mode + */ + public static final int CL_FILTER_NEAREST = 0x1140, + CL_FILTER_LINEAR = 0x1141; + + /** + * cl_sampler_info + */ + public static final int CL_SAMPLER_REFERENCE_COUNT = 0x1150, + CL_SAMPLER_CONTEXT = 0x1151, + CL_SAMPLER_NORMALIZED_COORDS = 0x1152, + CL_SAMPLER_ADDRESSING_MODE = 0x1153, + CL_SAMPLER_FILTER_MODE = 0x1154; + + /** + * cl_map_flags - bitfield + */ + public static final int CL_MAP_READ = 0x1, + CL_MAP_WRITE = 0x2; + + /** + * cl_program_info + */ + public static final int CL_PROGRAM_REFERENCE_COUNT = 0x1160, + CL_PROGRAM_CONTEXT = 0x1161, + CL_PROGRAM_NUM_DEVICES = 0x1162, + CL_PROGRAM_DEVICES = 0x1163, + CL_PROGRAM_SOURCE = 0x1164, + CL_PROGRAM_BINARY_SIZES = 0x1165, + CL_PROGRAM_BINARIES = 0x1166; + + /** + * cl_program_build_info + */ + public static final int CL_PROGRAM_BUILD_STATUS = 0x1181, + CL_PROGRAM_BUILD_OPTIONS = 0x1182, + CL_PROGRAM_BUILD_LOG = 0x1183; + + /** + * cl_build_status + */ + public static final int CL_BUILD_SUCCESS = 0x0, + CL_BUILD_NONE = 0xFFFFFFFF, + CL_BUILD_ERROR = 0xFFFFFFFE, + CL_BUILD_IN_PROGRESS = 0xFFFFFFFD; + + /** + * cl_kernel_info + */ + public static final int CL_KERNEL_FUNCTION_NAME = 0x1190, + CL_KERNEL_NUM_ARGS = 0x1191, + CL_KERNEL_REFERENCE_COUNT = 0x1192, + CL_KERNEL_CONTEXT = 0x1193, + CL_KERNEL_PROGRAM = 0x1194; + + /** + * cl_kernel_work_group_info + */ + public static final int CL_KERNEL_WORK_GROUP_SIZE = 0x11B0, + CL_KERNEL_COMPILE_WORK_GROUP_SIZE = 0x11B1, + CL_KERNEL_LOCAL_MEM_SIZE = 0x11B2; + + /** + * cl_event_info + */ + public static final int CL_EVENT_COMMAND_QUEUE = 0x11D0, + CL_EVENT_COMMAND_TYPE = 0x11D1, + CL_EVENT_REFERENCE_COUNT = 0x11D2, + CL_EVENT_COMMAND_EXECUTION_STATUS = 0x11D3; + + /** + * cl_command_type + */ + public static final int CL_COMMAND_NDRANGE_KERNEL = 0x11F0, + CL_COMMAND_TASK = 0x11F1, + CL_COMMAND_NATIVE_KERNEL = 0x11F2, + CL_COMMAND_READ_BUFFER = 0x11F3, + CL_COMMAND_WRITE_BUFFER = 0x11F4, + CL_COMMAND_COPY_BUFFER = 0x11F5, + CL_COMMAND_READ_IMAGE = 0x11F6, + CL_COMMAND_WRITE_IMAGE = 0x11F7, + CL_COMMAND_COPY_IMAGE = 0x11F8, + CL_COMMAND_COPY_IMAGE_TO_BUFFER = 0x11F9, + CL_COMMAND_COPY_BUFFER_TO_IMAGE = 0x11FA, + CL_COMMAND_MAP_BUFFER = 0x11FB, + CL_COMMAND_MAP_IMAGE = 0x11FC, + CL_COMMAND_UNMAP_MEM_OBJECT = 0x11FD, + CL_COMMAND_MARKER = 0x11FE, + CL_COMMAND_ACQUIRE_GL_OBJECTS = 0x11FF, + CL_COMMAND_RELEASE_GL_OBJECTS = 0x1200; + + /** + * command execution status + */ + public static final int CL_COMPLETE = 0x0, + CL_RUNNING = 0x1, + CL_SUBMITTED = 0x2, + CL_QUEUED = 0x3; + + /** + * cl_profiling_info + */ + public static final int CL_PROFILING_COMMAND_QUEUED = 0x1280, + CL_PROFILING_COMMAND_SUBMIT = 0x1281, + CL_PROFILING_COMMAND_START = 0x1282, + CL_PROFILING_COMMAND_END = 0x1283; + + private CL10() {} + + public static int clGetPlatformIDs(PointerBuffer platforms, IntBuffer num_platforms) { + long function_pointer = CLCapabilities.clGetPlatformIDs; + BufferChecks.checkFunctionAddress(function_pointer); + if (platforms != null) + BufferChecks.checkDirect(platforms); + if (num_platforms != null) + BufferChecks.checkBuffer(num_platforms, 1); + if ( num_platforms == null ) num_platforms = APIUtil.getBufferInt(); + int __result = nclGetPlatformIDs((platforms == null ? 0 : platforms.remaining()), MemoryUtil.getAddressSafe(platforms), MemoryUtil.getAddressSafe(num_platforms), function_pointer); + if ( __result == CL_SUCCESS && platforms != null ) CLPlatform.registerCLPlatforms(platforms, num_platforms); + return __result; + } + static native int nclGetPlatformIDs(int platforms_num_entries, long platforms, long num_platforms, long function_pointer); + + public static int clGetPlatformInfo(CLPlatform platform, int param_name, ByteBuffer param_value, PointerBuffer param_value_size_ret) { + long function_pointer = CLCapabilities.clGetPlatformInfo; + BufferChecks.checkFunctionAddress(function_pointer); + if (param_value != null) + BufferChecks.checkDirect(param_value); + if (param_value_size_ret != null) + BufferChecks.checkBuffer(param_value_size_ret, 1); + int __result = nclGetPlatformInfo(platform == null ? 0 : platform.getPointer(), param_name, (param_value == null ? 0 : param_value.remaining()), MemoryUtil.getAddressSafe(param_value), MemoryUtil.getAddressSafe(param_value_size_ret), function_pointer); + return __result; + } + static native int nclGetPlatformInfo(long platform, int param_name, long param_value_param_value_size, long param_value, long param_value_size_ret, long function_pointer); + + public static int clGetDeviceIDs(CLPlatform platform, long device_type, PointerBuffer devices, IntBuffer num_devices) { + long function_pointer = CLCapabilities.clGetDeviceIDs; + BufferChecks.checkFunctionAddress(function_pointer); + if (devices != null) + BufferChecks.checkDirect(devices); + if (num_devices != null) + BufferChecks.checkBuffer(num_devices, 1); + else + num_devices = APIUtil.getBufferInt(); + int __result = nclGetDeviceIDs(platform.getPointer(), device_type, (devices == null ? 0 : devices.remaining()), MemoryUtil.getAddressSafe(devices), MemoryUtil.getAddressSafe(num_devices), function_pointer); + if ( __result == CL_SUCCESS && devices != null ) platform.registerCLDevices(devices, num_devices); + return __result; + } + static native int nclGetDeviceIDs(long platform, long device_type, int devices_num_entries, long devices, long num_devices, long function_pointer); + + public static int clGetDeviceInfo(CLDevice device, int param_name, ByteBuffer param_value, PointerBuffer param_value_size_ret) { + long function_pointer = CLCapabilities.clGetDeviceInfo; + BufferChecks.checkFunctionAddress(function_pointer); + if (param_value != null) + BufferChecks.checkDirect(param_value); + if (param_value_size_ret != null) + BufferChecks.checkBuffer(param_value_size_ret, 1); + int __result = nclGetDeviceInfo(device.getPointer(), param_name, (param_value == null ? 0 : param_value.remaining()), MemoryUtil.getAddressSafe(param_value), MemoryUtil.getAddressSafe(param_value_size_ret), function_pointer); + return __result; + } + static native int nclGetDeviceInfo(long device, int param_name, long param_value_param_value_size, long param_value, long param_value_size_ret, long function_pointer); + + /** + * LWJGL requires CL_CONTEXT_PLATFORM to be present in the cl_context_properties buffer. + */ + public static CLContext clCreateContext(PointerBuffer properties, PointerBuffer devices, CLContextCallback pfn_notify, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateContext; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(properties, 3); + BufferChecks.checkNullTerminated(properties); + BufferChecks.checkBuffer(devices, 1); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + long user_data = pfn_notify == null || pfn_notify.isCustom() ? 0 : CallbackUtil.createGlobalRef(pfn_notify); + CLContext __result = null; + try { + __result = new CLContext(nclCreateContext(MemoryUtil.getAddress(properties), devices.remaining(), MemoryUtil.getAddress(devices), pfn_notify == null ? 0 : pfn_notify.getPointer(), user_data, MemoryUtil.getAddressSafe(errcode_ret), function_pointer), APIUtil.getCLPlatform(properties)); + return __result; + } finally { + if ( __result != null ) __result.setContextCallback(user_data); + } + } + static native long nclCreateContext(long properties, int devices_num_devices, long devices, long pfn_notify, long user_data, long errcode_ret, long function_pointer); + + /** + * Overloads clCreateContext. + *

+ * LWJGL requires CL_CONTEXT_PLATFORM to be present in the cl_context_properties buffer. + */ + public static CLContext clCreateContext(PointerBuffer properties, CLDevice device, CLContextCallback pfn_notify, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateContext; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(properties, 3); + BufferChecks.checkNullTerminated(properties); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + long user_data = pfn_notify == null || pfn_notify.isCustom() ? 0 : CallbackUtil.createGlobalRef(pfn_notify); + CLContext __result = null; + try { + __result = new CLContext(nclCreateContext(MemoryUtil.getAddress(properties), 1, APIUtil.getPointer(device), pfn_notify == null ? 0 : pfn_notify.getPointer(), user_data, MemoryUtil.getAddressSafe(errcode_ret), function_pointer), APIUtil.getCLPlatform(properties)); + return __result; + } finally { + if ( __result != null ) __result.setContextCallback(user_data); + } + } + + /** + * LWJGL requires CL_CONTEXT_PLATFORM to be present in the cl_context_properties buffer. + */ + public static CLContext clCreateContextFromType(PointerBuffer properties, long device_type, CLContextCallback pfn_notify, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateContextFromType; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(properties, 3); + BufferChecks.checkNullTerminated(properties); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + long user_data = pfn_notify == null || pfn_notify.isCustom() ? 0 : CallbackUtil.createGlobalRef(pfn_notify); + CLContext __result = null; + try { + __result = new CLContext(nclCreateContextFromType(MemoryUtil.getAddress(properties), device_type, pfn_notify == null ? 0 : pfn_notify.getPointer(), user_data, MemoryUtil.getAddressSafe(errcode_ret), function_pointer), APIUtil.getCLPlatform(properties)); + return __result; + } finally { + if ( __result != null ) __result.setContextCallback(user_data); + } + } + static native long nclCreateContextFromType(long properties, long device_type, long pfn_notify, long user_data, long errcode_ret, long function_pointer); + + public static int clRetainContext(CLContext context) { + long function_pointer = CLCapabilities.clRetainContext; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nclRetainContext(context.getPointer(), function_pointer); + if ( __result == CL_SUCCESS ) context.retain(); + return __result; + } + static native int nclRetainContext(long context, long function_pointer); + + public static int clReleaseContext(CLContext context) { + long function_pointer = CLCapabilities.clReleaseContext; + BufferChecks.checkFunctionAddress(function_pointer); + APIUtil.releaseObjects(context); + int __result = nclReleaseContext(context.getPointer(), function_pointer); + if ( __result == CL_SUCCESS ) context.releaseImpl(); + return __result; + } + static native int nclReleaseContext(long context, long function_pointer); + + public static int clGetContextInfo(CLContext context, int param_name, ByteBuffer param_value, PointerBuffer param_value_size_ret) { + long function_pointer = CLCapabilities.clGetContextInfo; + BufferChecks.checkFunctionAddress(function_pointer); + if (param_value != null) + BufferChecks.checkDirect(param_value); + if (param_value_size_ret != null) + BufferChecks.checkBuffer(param_value_size_ret, 1); + if ( param_value_size_ret == null && APIUtil.isDevicesParam(param_name) ) param_value_size_ret = APIUtil.getBufferPointer(); + int __result = nclGetContextInfo(context.getPointer(), param_name, (param_value == null ? 0 : param_value.remaining()), MemoryUtil.getAddressSafe(param_value), MemoryUtil.getAddressSafe(param_value_size_ret), function_pointer); + if ( __result == CL_SUCCESS && param_value != null && APIUtil.isDevicesParam(param_name) ) context.getParent().registerCLDevices(param_value, param_value_size_ret); + return __result; + } + static native int nclGetContextInfo(long context, int param_name, long param_value_param_value_size, long param_value, long param_value_size_ret, long function_pointer); + + public static CLCommandQueue clCreateCommandQueue(CLContext context, CLDevice device, long properties, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateCommandQueue; + BufferChecks.checkFunctionAddress(function_pointer); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLCommandQueue __result = new CLCommandQueue(nclCreateCommandQueue(context.getPointer(), device.getPointer(), properties, MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context, device); + return __result; + } + static native long nclCreateCommandQueue(long context, long device, long properties, long errcode_ret, long function_pointer); + + public static int clRetainCommandQueue(CLCommandQueue command_queue) { + long function_pointer = CLCapabilities.clRetainCommandQueue; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nclRetainCommandQueue(command_queue.getPointer(), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.retain(); + return __result; + } + static native int nclRetainCommandQueue(long command_queue, long function_pointer); + + public static int clReleaseCommandQueue(CLCommandQueue command_queue) { + long function_pointer = CLCapabilities.clReleaseCommandQueue; + BufferChecks.checkFunctionAddress(function_pointer); + APIUtil.releaseObjects(command_queue); + int __result = nclReleaseCommandQueue(command_queue.getPointer(), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.release(); + return __result; + } + static native int nclReleaseCommandQueue(long command_queue, long function_pointer); + + public static int clGetCommandQueueInfo(CLCommandQueue command_queue, int param_name, ByteBuffer param_value, PointerBuffer param_value_size_ret) { + long function_pointer = CLCapabilities.clGetCommandQueueInfo; + BufferChecks.checkFunctionAddress(function_pointer); + if (param_value != null) + BufferChecks.checkDirect(param_value); + if (param_value_size_ret != null) + BufferChecks.checkBuffer(param_value_size_ret, 1); + int __result = nclGetCommandQueueInfo(command_queue.getPointer(), param_name, (param_value == null ? 0 : param_value.remaining()), MemoryUtil.getAddressSafe(param_value), MemoryUtil.getAddressSafe(param_value_size_ret), function_pointer); + return __result; + } + static native int nclGetCommandQueueInfo(long command_queue, int param_name, long param_value_param_value_size, long param_value, long param_value_size_ret, long function_pointer); + + public static CLMem clCreateBuffer(CLContext context, long flags, long host_ptr_size, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLMem __result = new CLMem(nclCreateBuffer(context.getPointer(), flags, host_ptr_size, 0L, MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + public static CLMem clCreateBuffer(CLContext context, long flags, ByteBuffer host_ptr, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(host_ptr); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLMem __result = new CLMem(nclCreateBuffer(context.getPointer(), flags, host_ptr.remaining(), MemoryUtil.getAddress(host_ptr), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + public static CLMem clCreateBuffer(CLContext context, long flags, DoubleBuffer host_ptr, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(host_ptr); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLMem __result = new CLMem(nclCreateBuffer(context.getPointer(), flags, (host_ptr.remaining() << 3), MemoryUtil.getAddress(host_ptr), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + public static CLMem clCreateBuffer(CLContext context, long flags, FloatBuffer host_ptr, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(host_ptr); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLMem __result = new CLMem(nclCreateBuffer(context.getPointer(), flags, (host_ptr.remaining() << 2), MemoryUtil.getAddress(host_ptr), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + public static CLMem clCreateBuffer(CLContext context, long flags, IntBuffer host_ptr, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(host_ptr); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLMem __result = new CLMem(nclCreateBuffer(context.getPointer(), flags, (host_ptr.remaining() << 2), MemoryUtil.getAddress(host_ptr), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + public static CLMem clCreateBuffer(CLContext context, long flags, LongBuffer host_ptr, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(host_ptr); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLMem __result = new CLMem(nclCreateBuffer(context.getPointer(), flags, (host_ptr.remaining() << 3), MemoryUtil.getAddress(host_ptr), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + public static CLMem clCreateBuffer(CLContext context, long flags, ShortBuffer host_ptr, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(host_ptr); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLMem __result = new CLMem(nclCreateBuffer(context.getPointer(), flags, (host_ptr.remaining() << 1), MemoryUtil.getAddress(host_ptr), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + static native long nclCreateBuffer(long context, long flags, long host_ptr_size, long host_ptr, long errcode_ret, long function_pointer); + + public static int clEnqueueReadBuffer(CLCommandQueue command_queue, CLMem buffer, int blocking_read, long offset, ByteBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueReadBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(ptr); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueReadBuffer(command_queue.getPointer(), buffer.getPointer(), blocking_read, offset, ptr.remaining(), MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + public static int clEnqueueReadBuffer(CLCommandQueue command_queue, CLMem buffer, int blocking_read, long offset, DoubleBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueReadBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(ptr); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueReadBuffer(command_queue.getPointer(), buffer.getPointer(), blocking_read, offset, (ptr.remaining() << 3), MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + public static int clEnqueueReadBuffer(CLCommandQueue command_queue, CLMem buffer, int blocking_read, long offset, FloatBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueReadBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(ptr); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueReadBuffer(command_queue.getPointer(), buffer.getPointer(), blocking_read, offset, (ptr.remaining() << 2), MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + public static int clEnqueueReadBuffer(CLCommandQueue command_queue, CLMem buffer, int blocking_read, long offset, IntBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueReadBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(ptr); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueReadBuffer(command_queue.getPointer(), buffer.getPointer(), blocking_read, offset, (ptr.remaining() << 2), MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + public static int clEnqueueReadBuffer(CLCommandQueue command_queue, CLMem buffer, int blocking_read, long offset, LongBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueReadBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(ptr); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueReadBuffer(command_queue.getPointer(), buffer.getPointer(), blocking_read, offset, (ptr.remaining() << 3), MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + public static int clEnqueueReadBuffer(CLCommandQueue command_queue, CLMem buffer, int blocking_read, long offset, ShortBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueReadBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(ptr); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueReadBuffer(command_queue.getPointer(), buffer.getPointer(), blocking_read, offset, (ptr.remaining() << 1), MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + static native int nclEnqueueReadBuffer(long command_queue, long buffer, int blocking_read, long offset, long ptr_size, long ptr, int event_wait_list_num_events_in_wait_list, long event_wait_list, long event, long function_pointer); + + public static int clEnqueueWriteBuffer(CLCommandQueue command_queue, CLMem buffer, int blocking_write, long offset, ByteBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueWriteBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(ptr); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueWriteBuffer(command_queue.getPointer(), buffer.getPointer(), blocking_write, offset, ptr.remaining(), MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + public static int clEnqueueWriteBuffer(CLCommandQueue command_queue, CLMem buffer, int blocking_write, long offset, DoubleBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueWriteBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(ptr); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueWriteBuffer(command_queue.getPointer(), buffer.getPointer(), blocking_write, offset, (ptr.remaining() << 3), MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + public static int clEnqueueWriteBuffer(CLCommandQueue command_queue, CLMem buffer, int blocking_write, long offset, FloatBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueWriteBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(ptr); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueWriteBuffer(command_queue.getPointer(), buffer.getPointer(), blocking_write, offset, (ptr.remaining() << 2), MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + public static int clEnqueueWriteBuffer(CLCommandQueue command_queue, CLMem buffer, int blocking_write, long offset, IntBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueWriteBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(ptr); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueWriteBuffer(command_queue.getPointer(), buffer.getPointer(), blocking_write, offset, (ptr.remaining() << 2), MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + public static int clEnqueueWriteBuffer(CLCommandQueue command_queue, CLMem buffer, int blocking_write, long offset, LongBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueWriteBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(ptr); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueWriteBuffer(command_queue.getPointer(), buffer.getPointer(), blocking_write, offset, (ptr.remaining() << 3), MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + public static int clEnqueueWriteBuffer(CLCommandQueue command_queue, CLMem buffer, int blocking_write, long offset, ShortBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueWriteBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(ptr); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueWriteBuffer(command_queue.getPointer(), buffer.getPointer(), blocking_write, offset, (ptr.remaining() << 1), MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + static native int nclEnqueueWriteBuffer(long command_queue, long buffer, int blocking_write, long offset, long ptr_size, long ptr, int event_wait_list_num_events_in_wait_list, long event_wait_list, long event, long function_pointer); + + public static int clEnqueueCopyBuffer(CLCommandQueue command_queue, CLMem src_buffer, CLMem dst_buffer, long src_offset, long dst_offset, long size, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueCopyBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueCopyBuffer(command_queue.getPointer(), src_buffer.getPointer(), dst_buffer.getPointer(), src_offset, dst_offset, size, (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + static native int nclEnqueueCopyBuffer(long command_queue, long src_buffer, long dst_buffer, long src_offset, long dst_offset, long size, int event_wait_list_num_events_in_wait_list, long event_wait_list, long event, long function_pointer); + + public static ByteBuffer clEnqueueMapBuffer(CLCommandQueue command_queue, CLMem buffer, int blocking_map, long map_flags, long offset, long size, PointerBuffer event_wait_list, PointerBuffer event, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clEnqueueMapBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + ByteBuffer __result = nclEnqueueMapBuffer(command_queue.getPointer(), buffer.getPointer(), blocking_map, map_flags, offset, size, (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), MemoryUtil.getAddressSafe(errcode_ret), size, function_pointer); + if ( __result != null ) command_queue.registerCLEvent(event); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + static native ByteBuffer nclEnqueueMapBuffer(long command_queue, long buffer, int blocking_map, long map_flags, long offset, long size, int event_wait_list_num_events_in_wait_list, long event_wait_list, long event, long errcode_ret, long result_size, long function_pointer); + + public static CLMem clCreateImage2D(CLContext context, long flags, ByteBuffer image_format, long image_width, long image_height, long image_row_pitch, ByteBuffer host_ptr, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateImage2D; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(image_format, 2 * 4); + if (host_ptr != null) + BufferChecks.checkBuffer(host_ptr, CLChecks.calculateImage2DSize(image_format, image_width, image_height, image_row_pitch)); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLMem __result = new CLMem(nclCreateImage2D(context.getPointer(), flags, MemoryUtil.getAddress(image_format), image_width, image_height, image_row_pitch, MemoryUtil.getAddressSafe(host_ptr), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + public static CLMem clCreateImage2D(CLContext context, long flags, ByteBuffer image_format, long image_width, long image_height, long image_row_pitch, FloatBuffer host_ptr, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateImage2D; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(image_format, 2 * 4); + if (host_ptr != null) + BufferChecks.checkBuffer(host_ptr, CLChecks.calculateImage2DSize(image_format, image_width, image_height, image_row_pitch)); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLMem __result = new CLMem(nclCreateImage2D(context.getPointer(), flags, MemoryUtil.getAddress(image_format), image_width, image_height, image_row_pitch, MemoryUtil.getAddressSafe(host_ptr), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + public static CLMem clCreateImage2D(CLContext context, long flags, ByteBuffer image_format, long image_width, long image_height, long image_row_pitch, IntBuffer host_ptr, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateImage2D; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(image_format, 2 * 4); + if (host_ptr != null) + BufferChecks.checkBuffer(host_ptr, CLChecks.calculateImage2DSize(image_format, image_width, image_height, image_row_pitch)); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLMem __result = new CLMem(nclCreateImage2D(context.getPointer(), flags, MemoryUtil.getAddress(image_format), image_width, image_height, image_row_pitch, MemoryUtil.getAddressSafe(host_ptr), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + public static CLMem clCreateImage2D(CLContext context, long flags, ByteBuffer image_format, long image_width, long image_height, long image_row_pitch, ShortBuffer host_ptr, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateImage2D; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(image_format, 2 * 4); + if (host_ptr != null) + BufferChecks.checkBuffer(host_ptr, CLChecks.calculateImage2DSize(image_format, image_width, image_height, image_row_pitch)); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLMem __result = new CLMem(nclCreateImage2D(context.getPointer(), flags, MemoryUtil.getAddress(image_format), image_width, image_height, image_row_pitch, MemoryUtil.getAddressSafe(host_ptr), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + static native long nclCreateImage2D(long context, long flags, long image_format, long image_width, long image_height, long image_row_pitch, long host_ptr, long errcode_ret, long function_pointer); + + public static CLMem clCreateImage3D(CLContext context, long flags, ByteBuffer image_format, long image_width, long image_height, long image_depth, long image_row_pitch, long image_slice_pitch, ByteBuffer host_ptr, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateImage3D; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(image_format, 2 * 4); + if (host_ptr != null) + BufferChecks.checkBuffer(host_ptr, CLChecks.calculateImage3DSize(image_format, image_width, image_height, image_height, image_row_pitch, image_slice_pitch)); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLMem __result = new CLMem(nclCreateImage3D(context.getPointer(), flags, MemoryUtil.getAddress(image_format), image_width, image_height, image_depth, image_row_pitch, image_slice_pitch, MemoryUtil.getAddressSafe(host_ptr), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + public static CLMem clCreateImage3D(CLContext context, long flags, ByteBuffer image_format, long image_width, long image_height, long image_depth, long image_row_pitch, long image_slice_pitch, FloatBuffer host_ptr, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateImage3D; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(image_format, 2 * 4); + if (host_ptr != null) + BufferChecks.checkBuffer(host_ptr, CLChecks.calculateImage3DSize(image_format, image_width, image_height, image_height, image_row_pitch, image_slice_pitch)); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLMem __result = new CLMem(nclCreateImage3D(context.getPointer(), flags, MemoryUtil.getAddress(image_format), image_width, image_height, image_depth, image_row_pitch, image_slice_pitch, MemoryUtil.getAddressSafe(host_ptr), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + public static CLMem clCreateImage3D(CLContext context, long flags, ByteBuffer image_format, long image_width, long image_height, long image_depth, long image_row_pitch, long image_slice_pitch, IntBuffer host_ptr, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateImage3D; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(image_format, 2 * 4); + if (host_ptr != null) + BufferChecks.checkBuffer(host_ptr, CLChecks.calculateImage3DSize(image_format, image_width, image_height, image_height, image_row_pitch, image_slice_pitch)); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLMem __result = new CLMem(nclCreateImage3D(context.getPointer(), flags, MemoryUtil.getAddress(image_format), image_width, image_height, image_depth, image_row_pitch, image_slice_pitch, MemoryUtil.getAddressSafe(host_ptr), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + public static CLMem clCreateImage3D(CLContext context, long flags, ByteBuffer image_format, long image_width, long image_height, long image_depth, long image_row_pitch, long image_slice_pitch, ShortBuffer host_ptr, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateImage3D; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(image_format, 2 * 4); + if (host_ptr != null) + BufferChecks.checkBuffer(host_ptr, CLChecks.calculateImage3DSize(image_format, image_width, image_height, image_height, image_row_pitch, image_slice_pitch)); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLMem __result = new CLMem(nclCreateImage3D(context.getPointer(), flags, MemoryUtil.getAddress(image_format), image_width, image_height, image_depth, image_row_pitch, image_slice_pitch, MemoryUtil.getAddressSafe(host_ptr), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + static native long nclCreateImage3D(long context, long flags, long image_format, long image_width, long image_height, long image_depth, long image_row_pitch, long image_slice_pitch, long host_ptr, long errcode_ret, long function_pointer); + + public static int clGetSupportedImageFormats(CLContext context, long flags, int image_type, ByteBuffer image_formats, IntBuffer num_image_formats) { + long function_pointer = CLCapabilities.clGetSupportedImageFormats; + BufferChecks.checkFunctionAddress(function_pointer); + if (image_formats != null) + BufferChecks.checkDirect(image_formats); + if (num_image_formats != null) + BufferChecks.checkBuffer(num_image_formats, 1); + int __result = nclGetSupportedImageFormats(context.getPointer(), flags, image_type, (image_formats == null ? 0 : image_formats.remaining()) / (2 * 4), MemoryUtil.getAddressSafe(image_formats), MemoryUtil.getAddressSafe(num_image_formats), function_pointer); + return __result; + } + static native int nclGetSupportedImageFormats(long context, long flags, int image_type, int image_formats_num_entries, long image_formats, long num_image_formats, long function_pointer); + + public static int clEnqueueReadImage(CLCommandQueue command_queue, CLMem image, int blocking_read, PointerBuffer origin, PointerBuffer region, long row_pitch, long slice_pitch, ByteBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueReadImage; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(origin, 3); + BufferChecks.checkBuffer(region, 3); + BufferChecks.checkBuffer(ptr, CLChecks.calculateImageSize(region, row_pitch, slice_pitch)); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueReadImage(command_queue.getPointer(), image.getPointer(), blocking_read, MemoryUtil.getAddress(origin), MemoryUtil.getAddress(region), row_pitch, slice_pitch, MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + public static int clEnqueueReadImage(CLCommandQueue command_queue, CLMem image, int blocking_read, PointerBuffer origin, PointerBuffer region, long row_pitch, long slice_pitch, FloatBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueReadImage; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(origin, 3); + BufferChecks.checkBuffer(region, 3); + BufferChecks.checkBuffer(ptr, CLChecks.calculateImageSize(region, row_pitch, slice_pitch)); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueReadImage(command_queue.getPointer(), image.getPointer(), blocking_read, MemoryUtil.getAddress(origin), MemoryUtil.getAddress(region), row_pitch, slice_pitch, MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + public static int clEnqueueReadImage(CLCommandQueue command_queue, CLMem image, int blocking_read, PointerBuffer origin, PointerBuffer region, long row_pitch, long slice_pitch, IntBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueReadImage; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(origin, 3); + BufferChecks.checkBuffer(region, 3); + BufferChecks.checkBuffer(ptr, CLChecks.calculateImageSize(region, row_pitch, slice_pitch)); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueReadImage(command_queue.getPointer(), image.getPointer(), blocking_read, MemoryUtil.getAddress(origin), MemoryUtil.getAddress(region), row_pitch, slice_pitch, MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + public static int clEnqueueReadImage(CLCommandQueue command_queue, CLMem image, int blocking_read, PointerBuffer origin, PointerBuffer region, long row_pitch, long slice_pitch, ShortBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueReadImage; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(origin, 3); + BufferChecks.checkBuffer(region, 3); + BufferChecks.checkBuffer(ptr, CLChecks.calculateImageSize(region, row_pitch, slice_pitch)); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueReadImage(command_queue.getPointer(), image.getPointer(), blocking_read, MemoryUtil.getAddress(origin), MemoryUtil.getAddress(region), row_pitch, slice_pitch, MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + static native int nclEnqueueReadImage(long command_queue, long image, int blocking_read, long origin, long region, long row_pitch, long slice_pitch, long ptr, int event_wait_list_num_events_in_wait_list, long event_wait_list, long event, long function_pointer); + + public static int clEnqueueWriteImage(CLCommandQueue command_queue, CLMem image, int blocking_write, PointerBuffer origin, PointerBuffer region, long input_row_pitch, long input_slice_pitch, ByteBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueWriteImage; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(origin, 3); + BufferChecks.checkBuffer(region, 3); + BufferChecks.checkBuffer(ptr, CLChecks.calculateImageSize(region, input_row_pitch, input_slice_pitch)); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueWriteImage(command_queue.getPointer(), image.getPointer(), blocking_write, MemoryUtil.getAddress(origin), MemoryUtil.getAddress(region), input_row_pitch, input_slice_pitch, MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + public static int clEnqueueWriteImage(CLCommandQueue command_queue, CLMem image, int blocking_write, PointerBuffer origin, PointerBuffer region, long input_row_pitch, long input_slice_pitch, FloatBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueWriteImage; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(origin, 3); + BufferChecks.checkBuffer(region, 3); + BufferChecks.checkBuffer(ptr, CLChecks.calculateImageSize(region, input_row_pitch, input_slice_pitch)); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueWriteImage(command_queue.getPointer(), image.getPointer(), blocking_write, MemoryUtil.getAddress(origin), MemoryUtil.getAddress(region), input_row_pitch, input_slice_pitch, MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + public static int clEnqueueWriteImage(CLCommandQueue command_queue, CLMem image, int blocking_write, PointerBuffer origin, PointerBuffer region, long input_row_pitch, long input_slice_pitch, IntBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueWriteImage; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(origin, 3); + BufferChecks.checkBuffer(region, 3); + BufferChecks.checkBuffer(ptr, CLChecks.calculateImageSize(region, input_row_pitch, input_slice_pitch)); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueWriteImage(command_queue.getPointer(), image.getPointer(), blocking_write, MemoryUtil.getAddress(origin), MemoryUtil.getAddress(region), input_row_pitch, input_slice_pitch, MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + public static int clEnqueueWriteImage(CLCommandQueue command_queue, CLMem image, int blocking_write, PointerBuffer origin, PointerBuffer region, long input_row_pitch, long input_slice_pitch, ShortBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueWriteImage; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(origin, 3); + BufferChecks.checkBuffer(region, 3); + BufferChecks.checkBuffer(ptr, CLChecks.calculateImageSize(region, input_row_pitch, input_slice_pitch)); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueWriteImage(command_queue.getPointer(), image.getPointer(), blocking_write, MemoryUtil.getAddress(origin), MemoryUtil.getAddress(region), input_row_pitch, input_slice_pitch, MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + static native int nclEnqueueWriteImage(long command_queue, long image, int blocking_write, long origin, long region, long input_row_pitch, long input_slice_pitch, long ptr, int event_wait_list_num_events_in_wait_list, long event_wait_list, long event, long function_pointer); + + public static int clEnqueueCopyImage(CLCommandQueue command_queue, CLMem src_image, CLMem dst_image, PointerBuffer src_origin, PointerBuffer dst_origin, PointerBuffer region, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueCopyImage; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(src_origin, 3); + BufferChecks.checkBuffer(dst_origin, 3); + BufferChecks.checkBuffer(region, 3); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueCopyImage(command_queue.getPointer(), src_image.getPointer(), dst_image.getPointer(), MemoryUtil.getAddress(src_origin), MemoryUtil.getAddress(dst_origin), MemoryUtil.getAddress(region), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + static native int nclEnqueueCopyImage(long command_queue, long src_image, long dst_image, long src_origin, long dst_origin, long region, int event_wait_list_num_events_in_wait_list, long event_wait_list, long event, long function_pointer); + + public static int clEnqueueCopyImageToBuffer(CLCommandQueue command_queue, CLMem src_image, CLMem dst_buffer, PointerBuffer src_origin, PointerBuffer region, long dst_offset, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueCopyImageToBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(src_origin, 3); + BufferChecks.checkBuffer(region, 3); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueCopyImageToBuffer(command_queue.getPointer(), src_image.getPointer(), dst_buffer.getPointer(), MemoryUtil.getAddress(src_origin), MemoryUtil.getAddress(region), dst_offset, (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + static native int nclEnqueueCopyImageToBuffer(long command_queue, long src_image, long dst_buffer, long src_origin, long region, long dst_offset, int event_wait_list_num_events_in_wait_list, long event_wait_list, long event, long function_pointer); + + public static int clEnqueueCopyBufferToImage(CLCommandQueue command_queue, CLMem src_buffer, CLMem dst_image, long src_offset, PointerBuffer dst_origin, PointerBuffer region, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueCopyBufferToImage; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(dst_origin, 3); + BufferChecks.checkBuffer(region, 3); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueCopyBufferToImage(command_queue.getPointer(), src_buffer.getPointer(), dst_image.getPointer(), src_offset, MemoryUtil.getAddress(dst_origin), MemoryUtil.getAddress(region), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + static native int nclEnqueueCopyBufferToImage(long command_queue, long src_buffer, long dst_image, long src_offset, long dst_origin, long region, int event_wait_list_num_events_in_wait_list, long event_wait_list, long event, long function_pointer); + + public static ByteBuffer clEnqueueMapImage(CLCommandQueue command_queue, CLMem image, int blocking_map, long map_flags, PointerBuffer origin, PointerBuffer region, PointerBuffer image_row_pitch, PointerBuffer image_slice_pitch, PointerBuffer event_wait_list, PointerBuffer event, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clEnqueueMapImage; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(origin, 3); + BufferChecks.checkBuffer(region, 3); + BufferChecks.checkBuffer(image_row_pitch, 1); + if (image_slice_pitch != null) + BufferChecks.checkBuffer(image_slice_pitch, 1); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + ByteBuffer __result = nclEnqueueMapImage(command_queue.getPointer(), image.getPointer(), blocking_map, map_flags, MemoryUtil.getAddress(origin), MemoryUtil.getAddress(region), MemoryUtil.getAddress(image_row_pitch), MemoryUtil.getAddressSafe(image_slice_pitch), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), MemoryUtil.getAddressSafe(errcode_ret), function_pointer); + if ( __result != null ) command_queue.registerCLEvent(event); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + static native ByteBuffer nclEnqueueMapImage(long command_queue, long image, int blocking_map, long map_flags, long origin, long region, long image_row_pitch, long image_slice_pitch, int event_wait_list_num_events_in_wait_list, long event_wait_list, long event, long errcode_ret, long function_pointer); + + public static int clGetImageInfo(CLMem image, int param_name, ByteBuffer param_value, PointerBuffer param_value_size_ret) { + long function_pointer = CLCapabilities.clGetImageInfo; + BufferChecks.checkFunctionAddress(function_pointer); + if (param_value != null) + BufferChecks.checkDirect(param_value); + if (param_value_size_ret != null) + BufferChecks.checkBuffer(param_value_size_ret, 1); + int __result = nclGetImageInfo(image.getPointer(), param_name, (param_value == null ? 0 : param_value.remaining()), MemoryUtil.getAddressSafe(param_value), MemoryUtil.getAddressSafe(param_value_size_ret), function_pointer); + return __result; + } + static native int nclGetImageInfo(long image, int param_name, long param_value_param_value_size, long param_value, long param_value_size_ret, long function_pointer); + + public static int clRetainMemObject(CLMem memobj) { + long function_pointer = CLCapabilities.clRetainMemObject; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nclRetainMemObject(memobj.getPointer(), function_pointer); + if ( __result == CL_SUCCESS ) memobj.retain(); + return __result; + } + static native int nclRetainMemObject(long memobj, long function_pointer); + + public static int clReleaseMemObject(CLMem memobj) { + long function_pointer = CLCapabilities.clReleaseMemObject; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nclReleaseMemObject(memobj.getPointer(), function_pointer); + if ( __result == CL_SUCCESS ) memobj.release(); + return __result; + } + static native int nclReleaseMemObject(long memobj, long function_pointer); + + public static int clEnqueueUnmapMemObject(CLCommandQueue command_queue, CLMem memobj, ByteBuffer mapped_ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueUnmapMemObject; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(mapped_ptr); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueUnmapMemObject(command_queue.getPointer(), memobj.getPointer(), MemoryUtil.getAddress(mapped_ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + static native int nclEnqueueUnmapMemObject(long command_queue, long memobj, long mapped_ptr, int event_wait_list_num_events_in_wait_list, long event_wait_list, long event, long function_pointer); + + public static int clGetMemObjectInfo(CLMem memobj, int param_name, ByteBuffer param_value, PointerBuffer param_value_size_ret) { + long function_pointer = CLCapabilities.clGetMemObjectInfo; + BufferChecks.checkFunctionAddress(function_pointer); + if (param_value != null) + BufferChecks.checkDirect(param_value); + if (param_value_size_ret != null) + BufferChecks.checkBuffer(param_value_size_ret, 1); + int __result = nclGetMemObjectInfo(memobj.getPointer(), param_name, (param_value == null ? 0 : param_value.remaining()), MemoryUtil.getAddressSafe(param_value), MemoryUtil.getAddressSafe(param_value_size_ret), function_pointer); + return __result; + } + static native int nclGetMemObjectInfo(long memobj, int param_name, long param_value_param_value_size, long param_value, long param_value_size_ret, long function_pointer); + + public static CLSampler clCreateSampler(CLContext context, int normalized_coords, int addressing_mode, int filter_mode, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateSampler; + BufferChecks.checkFunctionAddress(function_pointer); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLSampler __result = new CLSampler(nclCreateSampler(context.getPointer(), normalized_coords, addressing_mode, filter_mode, MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + static native long nclCreateSampler(long context, int normalized_coords, int addressing_mode, int filter_mode, long errcode_ret, long function_pointer); + + public static int clRetainSampler(CLSampler sampler) { + long function_pointer = CLCapabilities.clRetainSampler; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nclRetainSampler(sampler.getPointer(), function_pointer); + if ( __result == CL_SUCCESS ) sampler.retain(); + return __result; + } + static native int nclRetainSampler(long sampler, long function_pointer); + + public static int clReleaseSampler(CLSampler sampler) { + long function_pointer = CLCapabilities.clReleaseSampler; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nclReleaseSampler(sampler.getPointer(), function_pointer); + if ( __result == CL_SUCCESS ) sampler.release(); + return __result; + } + static native int nclReleaseSampler(long sampler, long function_pointer); + + public static int clGetSamplerInfo(CLSampler sampler, int param_name, ByteBuffer param_value, PointerBuffer param_value_size_ret) { + long function_pointer = CLCapabilities.clGetSamplerInfo; + BufferChecks.checkFunctionAddress(function_pointer); + if (param_value != null) + BufferChecks.checkDirect(param_value); + if (param_value_size_ret != null) + BufferChecks.checkBuffer(param_value_size_ret, 1); + int __result = nclGetSamplerInfo(sampler.getPointer(), param_name, (param_value == null ? 0 : param_value.remaining()), MemoryUtil.getAddressSafe(param_value), MemoryUtil.getAddressSafe(param_value_size_ret), function_pointer); + return __result; + } + static native int nclGetSamplerInfo(long sampler, int param_name, long param_value_param_value_size, long param_value, long param_value_size_ret, long function_pointer); + + public static CLProgram clCreateProgramWithSource(CLContext context, ByteBuffer string, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateProgramWithSource; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(string); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLProgram __result = new CLProgram(nclCreateProgramWithSource(context.getPointer(), 1, MemoryUtil.getAddress(string), string.remaining(), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + static native long nclCreateProgramWithSource(long context, int count, long string, long string_lengths, long errcode_ret, long function_pointer); + + /** Overloads clCreateProgramWithSource. */ + public static CLProgram clCreateProgramWithSource(CLContext context, ByteBuffer strings, PointerBuffer lengths, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateProgramWithSource; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(strings, APIUtil.getSize(lengths)); + BufferChecks.checkBuffer(lengths, 1); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLProgram __result = new CLProgram(nclCreateProgramWithSource2(context.getPointer(), lengths.remaining(), MemoryUtil.getAddress(strings), MemoryUtil.getAddress(lengths), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + static native long nclCreateProgramWithSource2(long context, int lengths_count, long strings, long lengths, long errcode_ret, long function_pointer); + + /** Overloads clCreateProgramWithSource. */ + public static CLProgram clCreateProgramWithSource(CLContext context, ByteBuffer[] strings, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateProgramWithSource; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkArray(strings, 1); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLProgram __result = new CLProgram(nclCreateProgramWithSource3(context.getPointer(), strings.length, strings, APIUtil.getLengths(strings), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + static native long nclCreateProgramWithSource3(long context, int count, ByteBuffer[] strings, long lengths, long errcode_ret, long function_pointer); + + /** Overloads clCreateProgramWithSource. */ + public static CLProgram clCreateProgramWithSource(CLContext context, CharSequence string, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateProgramWithSource; + BufferChecks.checkFunctionAddress(function_pointer); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLProgram __result = new CLProgram(nclCreateProgramWithSource(context.getPointer(), 1, APIUtil.getBuffer(string), string.length(), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + + /** Overloads clCreateProgramWithSource. */ + public static CLProgram clCreateProgramWithSource(CLContext context, CharSequence[] strings, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateProgramWithSource; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkArray(strings); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLProgram __result = new CLProgram(nclCreateProgramWithSource4(context.getPointer(), strings.length, APIUtil.getBuffer(strings), APIUtil.getLengths(strings), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + static native long nclCreateProgramWithSource4(long context, int count, long strings, long lengths, long errcode_ret, long function_pointer); + + public static CLProgram clCreateProgramWithBinary(CLContext context, CLDevice device, ByteBuffer binary, IntBuffer binary_status, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateProgramWithBinary; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(binary); + BufferChecks.checkBuffer(binary_status, 1); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLProgram __result = new CLProgram(nclCreateProgramWithBinary(context.getPointer(), 1, device.getPointer(), binary.remaining(), MemoryUtil.getAddress(binary), MemoryUtil.getAddress(binary_status), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + static native long nclCreateProgramWithBinary(long context, int num_devices, long device, long binary_lengths, long binary, long binary_status, long errcode_ret, long function_pointer); + + /** Overloads clCreateProgramWithBinary. */ + public static CLProgram clCreateProgramWithBinary(CLContext context, PointerBuffer device_list, PointerBuffer lengths, ByteBuffer binaries, IntBuffer binary_status, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateProgramWithBinary; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(device_list, 1); + BufferChecks.checkBuffer(lengths, device_list.remaining()); + BufferChecks.checkBuffer(binaries, APIUtil.getSize(lengths)); + BufferChecks.checkBuffer(binary_status, device_list.remaining()); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLProgram __result = new CLProgram(nclCreateProgramWithBinary2(context.getPointer(), device_list.remaining(), MemoryUtil.getAddress(device_list), MemoryUtil.getAddress(lengths), MemoryUtil.getAddress(binaries), MemoryUtil.getAddress(binary_status), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + static native long nclCreateProgramWithBinary2(long context, int device_list_num_devices, long device_list, long lengths, long binaries, long binary_status, long errcode_ret, long function_pointer); + + /** Overloads clCreateProgramWithBinary. */ + public static CLProgram clCreateProgramWithBinary(CLContext context, PointerBuffer device_list, ByteBuffer[] binaries, IntBuffer binary_status, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateProgramWithBinary; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(device_list, binaries.length); + BufferChecks.checkArray(binaries, 1); + BufferChecks.checkBuffer(binary_status, binaries.length); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLProgram __result = new CLProgram(nclCreateProgramWithBinary3(context.getPointer(), binaries.length, MemoryUtil.getAddress(device_list), APIUtil.getLengths(binaries), binaries, MemoryUtil.getAddress(binary_status), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + static native long nclCreateProgramWithBinary3(long context, int num_devices, long device_list, long lengths, ByteBuffer[] binaries, long binary_status, long errcode_ret, long function_pointer); + + public static int clRetainProgram(CLProgram program) { + long function_pointer = CLCapabilities.clRetainProgram; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nclRetainProgram(program.getPointer(), function_pointer); + if ( __result == CL_SUCCESS ) program.retain(); + return __result; + } + static native int nclRetainProgram(long program, long function_pointer); + + public static int clReleaseProgram(CLProgram program) { + long function_pointer = CLCapabilities.clReleaseProgram; + BufferChecks.checkFunctionAddress(function_pointer); + APIUtil.releaseObjects(program); + int __result = nclReleaseProgram(program.getPointer(), function_pointer); + if ( __result == CL_SUCCESS ) program.release(); + return __result; + } + static native int nclReleaseProgram(long program, long function_pointer); + + public static int clBuildProgram(CLProgram program, PointerBuffer device_list, ByteBuffer options, CLBuildProgramCallback pfn_notify) { + long function_pointer = CLCapabilities.clBuildProgram; + BufferChecks.checkFunctionAddress(function_pointer); + if (device_list != null) + BufferChecks.checkDirect(device_list); + BufferChecks.checkDirect(options); + BufferChecks.checkNullTerminated(options); + long user_data = CallbackUtil.createGlobalRef(pfn_notify); + if ( pfn_notify != null ) pfn_notify.setContext(program.getParent()); + int __result = 0; + try { + __result = nclBuildProgram(program.getPointer(), (device_list == null ? 0 : device_list.remaining()), MemoryUtil.getAddressSafe(device_list), MemoryUtil.getAddress(options), pfn_notify == null ? 0 : pfn_notify.getPointer(), user_data, function_pointer); + return __result; + } finally { + CallbackUtil.checkCallback(__result, user_data); + } + } + static native int nclBuildProgram(long program, int device_list_num_devices, long device_list, long options, long pfn_notify, long user_data, long function_pointer); + + /** Overloads clBuildProgram. */ + public static int clBuildProgram(CLProgram program, PointerBuffer device_list, CharSequence options, CLBuildProgramCallback pfn_notify) { + long function_pointer = CLCapabilities.clBuildProgram; + BufferChecks.checkFunctionAddress(function_pointer); + if (device_list != null) + BufferChecks.checkDirect(device_list); + long user_data = CallbackUtil.createGlobalRef(pfn_notify); + if ( pfn_notify != null ) pfn_notify.setContext(program.getParent()); + int __result = 0; + try { + __result = nclBuildProgram(program.getPointer(), (device_list == null ? 0 : device_list.remaining()), MemoryUtil.getAddressSafe(device_list), APIUtil.getBufferNT(options), pfn_notify == null ? 0 : pfn_notify.getPointer(), user_data, function_pointer); + return __result; + } finally { + CallbackUtil.checkCallback(__result, user_data); + } + } + + /** Overloads clBuildProgram. */ + public static int clBuildProgram(CLProgram program, CLDevice device, CharSequence options, CLBuildProgramCallback pfn_notify) { + long function_pointer = CLCapabilities.clBuildProgram; + BufferChecks.checkFunctionAddress(function_pointer); + long user_data = CallbackUtil.createGlobalRef(pfn_notify); + if ( pfn_notify != null ) pfn_notify.setContext(program.getParent()); + int __result = 0; + try { + __result = nclBuildProgram(program.getPointer(), 1, APIUtil.getPointer(device), APIUtil.getBufferNT(options), pfn_notify == null ? 0 : pfn_notify.getPointer(), user_data, function_pointer); + return __result; + } finally { + CallbackUtil.checkCallback(__result, user_data); + } + } + + public static int clUnloadCompiler() { + long function_pointer = CLCapabilities.clUnloadCompiler; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nclUnloadCompiler(function_pointer); + return __result; + } + static native int nclUnloadCompiler(long function_pointer); + + public static int clGetProgramInfo(CLProgram program, int param_name, ByteBuffer param_value, PointerBuffer param_value_size_ret) { + long function_pointer = CLCapabilities.clGetProgramInfo; + BufferChecks.checkFunctionAddress(function_pointer); + if (param_value != null) + BufferChecks.checkDirect(param_value); + if (param_value_size_ret != null) + BufferChecks.checkBuffer(param_value_size_ret, 1); + int __result = nclGetProgramInfo(program.getPointer(), param_name, (param_value == null ? 0 : param_value.remaining()), MemoryUtil.getAddressSafe(param_value), MemoryUtil.getAddressSafe(param_value_size_ret), function_pointer); + return __result; + } + static native int nclGetProgramInfo(long program, int param_name, long param_value_param_value_size, long param_value, long param_value_size_ret, long function_pointer); + + /** + * Overloads clGetProgramInfo. + *

+ * This method can be used to get program binaries. The binary for each device (in the + * order returned by CL_PROGRAM_DEVICES) will be written sequentially to + * the param_value buffer. The buffer size must be big enough to hold + * all the binaries, as returned by CL_PROGRAM_BINARY_SIZES. + *

+ * @param program the program + * @param param_value the buffers where the binaries will be written to. + * @param param_value_size_ret optional size result + *

+ * @return the error code + */ + public static int clGetProgramInfo(CLProgram program, PointerBuffer sizes, ByteBuffer param_value, PointerBuffer param_value_size_ret) { + long function_pointer = CLCapabilities.clGetProgramInfo; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(sizes, 1); + BufferChecks.checkBuffer(param_value, APIUtil.getSize(sizes)); + if (param_value_size_ret != null) + BufferChecks.checkBuffer(param_value_size_ret, 1); + int __result = nclGetProgramInfo2(program.getPointer(), CL_PROGRAM_BINARIES, sizes.remaining(), MemoryUtil.getAddress(sizes), MemoryUtil.getAddress(param_value), MemoryUtil.getAddressSafe(param_value_size_ret), function_pointer); + return __result; + } + static native int nclGetProgramInfo2(long program, int param_name, long sizes_len, long sizes, long param_value, long param_value_size_ret, long function_pointer); + + /** + * Overloads clGetProgramInfo. + *

+ * This method can be used to get program binaries. The binary for each device (in the + * order returned by CL_PROGRAM_DEVICES) will be written to the corresponding + * slot of the param_value array. The size of each buffer must be big enough to + * hold the corresponding binary, as returned by CL_PROGRAM_BINARY_SIZES. + *

+ * @param program the program + * @param param_value the buffers where the binaries will be written to. + * @param param_value_size_ret optional size result + *

+ * @return the error code + */ + public static int clGetProgramInfo(CLProgram program, ByteBuffer[] param_value, PointerBuffer param_value_size_ret) { + long function_pointer = CLCapabilities.clGetProgramInfo; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkArray(param_value); + if (param_value_size_ret != null) + BufferChecks.checkBuffer(param_value_size_ret, 1); + int __result = nclGetProgramInfo3(program.getPointer(), CL_PROGRAM_BINARIES, param_value.length, param_value, MemoryUtil.getAddressSafe(param_value_size_ret), function_pointer); + return __result; + } + static native int nclGetProgramInfo3(long program, int param_name, long param_value_len, ByteBuffer[] param_value, long param_value_size_ret, long function_pointer); + + public static int clGetProgramBuildInfo(CLProgram program, CLDevice device, int param_name, ByteBuffer param_value, PointerBuffer param_value_size_ret) { + long function_pointer = CLCapabilities.clGetProgramBuildInfo; + BufferChecks.checkFunctionAddress(function_pointer); + if (param_value != null) + BufferChecks.checkDirect(param_value); + if (param_value_size_ret != null) + BufferChecks.checkBuffer(param_value_size_ret, 1); + int __result = nclGetProgramBuildInfo(program.getPointer(), device.getPointer(), param_name, (param_value == null ? 0 : param_value.remaining()), MemoryUtil.getAddressSafe(param_value), MemoryUtil.getAddressSafe(param_value_size_ret), function_pointer); + return __result; + } + static native int nclGetProgramBuildInfo(long program, long device, int param_name, long param_value_param_value_size, long param_value, long param_value_size_ret, long function_pointer); + + public static CLKernel clCreateKernel(CLProgram program, ByteBuffer kernel_name, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateKernel; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(kernel_name); + BufferChecks.checkNullTerminated(kernel_name); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLKernel __result = new CLKernel(nclCreateKernel(program.getPointer(), MemoryUtil.getAddress(kernel_name), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), program); + return __result; + } + static native long nclCreateKernel(long program, long kernel_name, long errcode_ret, long function_pointer); + + /** Overloads clCreateKernel. */ + public static CLKernel clCreateKernel(CLProgram program, CharSequence kernel_name, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateKernel; + BufferChecks.checkFunctionAddress(function_pointer); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLKernel __result = new CLKernel(nclCreateKernel(program.getPointer(), APIUtil.getBufferNT(kernel_name), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), program); + return __result; + } + + public static int clCreateKernelsInProgram(CLProgram program, PointerBuffer kernels, IntBuffer num_kernels_ret) { + long function_pointer = CLCapabilities.clCreateKernelsInProgram; + BufferChecks.checkFunctionAddress(function_pointer); + if (kernels != null) + BufferChecks.checkDirect(kernels); + if (num_kernels_ret != null) + BufferChecks.checkBuffer(num_kernels_ret, 1); + int __result = nclCreateKernelsInProgram(program.getPointer(), (kernels == null ? 0 : kernels.remaining()), MemoryUtil.getAddressSafe(kernels), MemoryUtil.getAddressSafe(num_kernels_ret), function_pointer); + if ( __result == CL_SUCCESS && kernels != null ) program.registerCLKernels(kernels); + return __result; + } + static native int nclCreateKernelsInProgram(long program, int kernels_num_kernels, long kernels, long num_kernels_ret, long function_pointer); + + public static int clRetainKernel(CLKernel kernel) { + long function_pointer = CLCapabilities.clRetainKernel; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nclRetainKernel(kernel.getPointer(), function_pointer); + if ( __result == CL_SUCCESS ) kernel.retain(); + return __result; + } + static native int nclRetainKernel(long kernel, long function_pointer); + + public static int clReleaseKernel(CLKernel kernel) { + long function_pointer = CLCapabilities.clReleaseKernel; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nclReleaseKernel(kernel.getPointer(), function_pointer); + if ( __result == CL_SUCCESS ) kernel.release(); + return __result; + } + static native int nclReleaseKernel(long kernel, long function_pointer); + + public static int clSetKernelArg(CLKernel kernel, int arg_index, long arg_value_arg_size) { + long function_pointer = CLCapabilities.clSetKernelArg; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nclSetKernelArg(kernel.getPointer(), arg_index, arg_value_arg_size, 0L, function_pointer); + return __result; + } + public static int clSetKernelArg(CLKernel kernel, int arg_index, ByteBuffer arg_value) { + long function_pointer = CLCapabilities.clSetKernelArg; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(arg_value); + int __result = nclSetKernelArg(kernel.getPointer(), arg_index, arg_value.remaining(), MemoryUtil.getAddress(arg_value), function_pointer); + return __result; + } + public static int clSetKernelArg(CLKernel kernel, int arg_index, DoubleBuffer arg_value) { + long function_pointer = CLCapabilities.clSetKernelArg; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(arg_value); + int __result = nclSetKernelArg(kernel.getPointer(), arg_index, (arg_value.remaining() << 3), MemoryUtil.getAddress(arg_value), function_pointer); + return __result; + } + public static int clSetKernelArg(CLKernel kernel, int arg_index, FloatBuffer arg_value) { + long function_pointer = CLCapabilities.clSetKernelArg; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(arg_value); + int __result = nclSetKernelArg(kernel.getPointer(), arg_index, (arg_value.remaining() << 2), MemoryUtil.getAddress(arg_value), function_pointer); + return __result; + } + public static int clSetKernelArg(CLKernel kernel, int arg_index, IntBuffer arg_value) { + long function_pointer = CLCapabilities.clSetKernelArg; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(arg_value); + int __result = nclSetKernelArg(kernel.getPointer(), arg_index, (arg_value.remaining() << 2), MemoryUtil.getAddress(arg_value), function_pointer); + return __result; + } + public static int clSetKernelArg(CLKernel kernel, int arg_index, LongBuffer arg_value) { + long function_pointer = CLCapabilities.clSetKernelArg; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(arg_value); + int __result = nclSetKernelArg(kernel.getPointer(), arg_index, (arg_value.remaining() << 3), MemoryUtil.getAddress(arg_value), function_pointer); + return __result; + } + public static int clSetKernelArg(CLKernel kernel, int arg_index, ShortBuffer arg_value) { + long function_pointer = CLCapabilities.clSetKernelArg; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(arg_value); + int __result = nclSetKernelArg(kernel.getPointer(), arg_index, (arg_value.remaining() << 1), MemoryUtil.getAddress(arg_value), function_pointer); + return __result; + } + static native int nclSetKernelArg(long kernel, int arg_index, long arg_value_arg_size, long arg_value, long function_pointer); + + /** Overloads clSetKernelArg. */ + public static int clSetKernelArg(CLKernel kernel, int arg_index, CLObject arg_value) { + long function_pointer = CLCapabilities.clSetKernelArg; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nclSetKernelArg(kernel.getPointer(), arg_index, PointerBuffer.getPointerSize(), APIUtil.getPointerSafe(arg_value), function_pointer); + return __result; + } + + /** Overloads clSetKernelArg. */ + static int clSetKernelArg(CLKernel kernel, int arg_index, long arg_size, Buffer arg_value) { + long function_pointer = CLCapabilities.clSetKernelArg; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nclSetKernelArg(kernel.getPointer(), arg_index, arg_size, MemoryUtil.getAddress0(arg_value), function_pointer); + return __result; + } + + public static int clGetKernelInfo(CLKernel kernel, int param_name, ByteBuffer param_value, PointerBuffer param_value_size_ret) { + long function_pointer = CLCapabilities.clGetKernelInfo; + BufferChecks.checkFunctionAddress(function_pointer); + if (param_value != null) + BufferChecks.checkDirect(param_value); + if (param_value_size_ret != null) + BufferChecks.checkBuffer(param_value_size_ret, 1); + int __result = nclGetKernelInfo(kernel.getPointer(), param_name, (param_value == null ? 0 : param_value.remaining()), MemoryUtil.getAddressSafe(param_value), MemoryUtil.getAddressSafe(param_value_size_ret), function_pointer); + return __result; + } + static native int nclGetKernelInfo(long kernel, int param_name, long param_value_param_value_size, long param_value, long param_value_size_ret, long function_pointer); + + public static int clGetKernelWorkGroupInfo(CLKernel kernel, CLDevice device, int param_name, ByteBuffer param_value, PointerBuffer param_value_size_ret) { + long function_pointer = CLCapabilities.clGetKernelWorkGroupInfo; + BufferChecks.checkFunctionAddress(function_pointer); + if (param_value != null) + BufferChecks.checkDirect(param_value); + if (param_value_size_ret != null) + BufferChecks.checkBuffer(param_value_size_ret, 1); + int __result = nclGetKernelWorkGroupInfo(kernel.getPointer(), device == null ? 0 : device.getPointer(), param_name, (param_value == null ? 0 : param_value.remaining()), MemoryUtil.getAddressSafe(param_value), MemoryUtil.getAddressSafe(param_value_size_ret), function_pointer); + return __result; + } + static native int nclGetKernelWorkGroupInfo(long kernel, long device, int param_name, long param_value_param_value_size, long param_value, long param_value_size_ret, long function_pointer); + + public static int clEnqueueNDRangeKernel(CLCommandQueue command_queue, CLKernel kernel, int work_dim, PointerBuffer global_work_offset, PointerBuffer global_work_size, PointerBuffer local_work_size, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueNDRangeKernel; + BufferChecks.checkFunctionAddress(function_pointer); + if (global_work_offset != null) + BufferChecks.checkBuffer(global_work_offset, work_dim); + if (global_work_size != null) + BufferChecks.checkBuffer(global_work_size, work_dim); + if (local_work_size != null) + BufferChecks.checkBuffer(local_work_size, work_dim); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueNDRangeKernel(command_queue.getPointer(), kernel.getPointer(), work_dim, MemoryUtil.getAddressSafe(global_work_offset), MemoryUtil.getAddressSafe(global_work_size), MemoryUtil.getAddressSafe(local_work_size), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + static native int nclEnqueueNDRangeKernel(long command_queue, long kernel, int work_dim, long global_work_offset, long global_work_size, long local_work_size, int event_wait_list_num_events_in_wait_list, long event_wait_list, long event, long function_pointer); + + public static int clEnqueueTask(CLCommandQueue command_queue, CLKernel kernel, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueTask; + BufferChecks.checkFunctionAddress(function_pointer); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueTask(command_queue.getPointer(), kernel.getPointer(), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + static native int nclEnqueueTask(long command_queue, long kernel, int event_wait_list_num_events_in_wait_list, long event_wait_list, long event, long function_pointer); + + /** + * Enqueues a native kernel to the specified command queue. The mem_list parameter + * can be used to pass a list of CLMem objects that will be mapped to global memory space and + * exposed as a ByteBuffer array in the CLNativeKernel#execute method. The + * sizes parameter will be used to allocate direct ByteBuffers with the correct + * capacities. The user is responsible for passing appropriate values to avoid crashes. + *

+ * @param command_queue the command queue + * @param user_func the native kernel + * @param mem_list the CLMem objects + * @param sizes the CLMem object sizes + * @param event_wait_list the event wait list + * @param event the queue event + *

+ * @return the error code + */ + public static int clEnqueueNativeKernel(CLCommandQueue command_queue, CLNativeKernel user_func, CLMem[] mem_list, long[] sizes, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueNativeKernel; + BufferChecks.checkFunctionAddress(function_pointer); + if (mem_list != null) + BufferChecks.checkArray(mem_list, 1); + if (sizes != null) + BufferChecks.checkArray(sizes, mem_list.length); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + long user_func_ref = CallbackUtil.createGlobalRef(user_func); + ByteBuffer args = APIUtil.getNativeKernelArgs(user_func_ref, mem_list, sizes); + int __result = 0; + try { + __result = nclEnqueueNativeKernel(command_queue.getPointer(), user_func.getPointer(), MemoryUtil.getAddress0(args), args.remaining(), mem_list == null ? 0 : mem_list.length, mem_list, (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } finally { + CallbackUtil.checkCallback(__result, user_func_ref); + } + } + static native int nclEnqueueNativeKernel(long command_queue, long user_func, long args, long args_cb_args, int num_mem_objects, CLMem[] mem_list, int event_wait_list_num_events_in_wait_list, long event_wait_list, long event, long function_pointer); + + public static int clWaitForEvents(PointerBuffer event_list) { + long function_pointer = CLCapabilities.clWaitForEvents; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(event_list, 1); + int __result = nclWaitForEvents(event_list.remaining(), MemoryUtil.getAddress(event_list), function_pointer); + return __result; + } + static native int nclWaitForEvents(int event_list_num_events, long event_list, long function_pointer); + + /** Overloads clWaitForEvents. */ + public static int clWaitForEvents(CLEvent event) { + long function_pointer = CLCapabilities.clWaitForEvents; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nclWaitForEvents(1, APIUtil.getPointer(event), function_pointer); + return __result; + } + + public static int clGetEventInfo(CLEvent event, int param_name, ByteBuffer param_value, PointerBuffer param_value_size_ret) { + long function_pointer = CLCapabilities.clGetEventInfo; + BufferChecks.checkFunctionAddress(function_pointer); + if (param_value != null) + BufferChecks.checkDirect(param_value); + if (param_value_size_ret != null) + BufferChecks.checkBuffer(param_value_size_ret, 1); + int __result = nclGetEventInfo(event.getPointer(), param_name, (param_value == null ? 0 : param_value.remaining()), MemoryUtil.getAddressSafe(param_value), MemoryUtil.getAddressSafe(param_value_size_ret), function_pointer); + return __result; + } + static native int nclGetEventInfo(long event, int param_name, long param_value_param_value_size, long param_value, long param_value_size_ret, long function_pointer); + + public static int clRetainEvent(CLEvent event) { + long function_pointer = CLCapabilities.clRetainEvent; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nclRetainEvent(event.getPointer(), function_pointer); + if ( __result == CL_SUCCESS ) event.retain(); + return __result; + } + static native int nclRetainEvent(long event, long function_pointer); + + public static int clReleaseEvent(CLEvent event) { + long function_pointer = CLCapabilities.clReleaseEvent; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nclReleaseEvent(event.getPointer(), function_pointer); + if ( __result == CL_SUCCESS ) event.release(); + return __result; + } + static native int nclReleaseEvent(long event, long function_pointer); + + public static int clEnqueueMarker(CLCommandQueue command_queue, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueMarker; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueMarker(command_queue.getPointer(), MemoryUtil.getAddress(event), function_pointer); + if ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + static native int nclEnqueueMarker(long command_queue, long event, long function_pointer); + + public static int clEnqueueBarrier(CLCommandQueue command_queue) { + long function_pointer = CLCapabilities.clEnqueueBarrier; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nclEnqueueBarrier(command_queue.getPointer(), function_pointer); + return __result; + } + static native int nclEnqueueBarrier(long command_queue, long function_pointer); + + public static int clEnqueueWaitForEvents(CLCommandQueue command_queue, PointerBuffer event_list) { + long function_pointer = CLCapabilities.clEnqueueWaitForEvents; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(event_list, 1); + int __result = nclEnqueueWaitForEvents(command_queue.getPointer(), event_list.remaining(), MemoryUtil.getAddress(event_list), function_pointer); + return __result; + } + static native int nclEnqueueWaitForEvents(long command_queue, int event_list_num_events, long event_list, long function_pointer); + + /** Overloads clEnqueueWaitForEvents. */ + public static int clEnqueueWaitForEvents(CLCommandQueue command_queue, CLEvent event) { + long function_pointer = CLCapabilities.clEnqueueWaitForEvents; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nclEnqueueWaitForEvents(command_queue.getPointer(), 1, APIUtil.getPointer(event), function_pointer); + return __result; + } + + public static int clGetEventProfilingInfo(CLEvent event, int param_name, ByteBuffer param_value, PointerBuffer param_value_size_ret) { + long function_pointer = CLCapabilities.clGetEventProfilingInfo; + BufferChecks.checkFunctionAddress(function_pointer); + if (param_value != null) + BufferChecks.checkDirect(param_value); + if (param_value_size_ret != null) + BufferChecks.checkBuffer(param_value_size_ret, 1); + int __result = nclGetEventProfilingInfo(event.getPointer(), param_name, (param_value == null ? 0 : param_value.remaining()), MemoryUtil.getAddressSafe(param_value), MemoryUtil.getAddressSafe(param_value_size_ret), function_pointer); + return __result; + } + static native int nclGetEventProfilingInfo(long event, int param_name, long param_value_param_value_size, long param_value, long param_value_size_ret, long function_pointer); + + public static int clFlush(CLCommandQueue command_queue) { + long function_pointer = CLCapabilities.clFlush; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nclFlush(command_queue.getPointer(), function_pointer); + return __result; + } + static native int nclFlush(long command_queue, long function_pointer); + + public static int clFinish(CLCommandQueue command_queue) { + long function_pointer = CLCapabilities.clFinish; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nclFinish(command_queue.getPointer(), function_pointer); + return __result; + } + static native int nclFinish(long command_queue, long function_pointer); + + static CLFunctionAddress clGetExtensionFunctionAddress(ByteBuffer func_name) { + long function_pointer = CLCapabilities.clGetExtensionFunctionAddress; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(func_name); + BufferChecks.checkNullTerminated(func_name); + CLFunctionAddress __result = new CLFunctionAddress(nclGetExtensionFunctionAddress(MemoryUtil.getAddress(func_name), function_pointer)); + return __result; + } + static native long nclGetExtensionFunctionAddress(long func_name, long function_pointer); + + /** Overloads clGetExtensionFunctionAddress. */ + static CLFunctionAddress clGetExtensionFunctionAddress(CharSequence func_name) { + long function_pointer = CLCapabilities.clGetExtensionFunctionAddress; + BufferChecks.checkFunctionAddress(function_pointer); + CLFunctionAddress __result = new CLFunctionAddress(nclGetExtensionFunctionAddress(APIUtil.getBufferNT(func_name), function_pointer)); + return __result; + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/CL10GL.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/CL10GL.java new file mode 100644 index 0000000..e76652c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/CL10GL.java @@ -0,0 +1,146 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; + +/** + * The core OpenCL 1.0 OpenGL interrop functionality. + */ +public final class CL10GL { + + /** + * cl_gl_object_type + */ + public static final int CL_GL_OBJECT_BUFFER = 0x2000, + CL_GL_OBJECT_TEXTURE2D = 0x2001, + CL_GL_OBJECT_TEXTURE3D = 0x2002, + CL_GL_OBJECT_RENDERBUFFER = 0x2003; + + /** + * cl_gl_texture_info + */ + public static final int CL_GL_TEXTURE_TARGET = 0x2004, + CL_GL_MIPMAP_LEVEL = 0x2005; + + private CL10GL() {} + + public static CLMem clCreateFromGLBuffer(CLContext context, long flags, int bufobj, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateFromGLBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLMem __result = new CLMem(nclCreateFromGLBuffer(context.getPointer(), flags, bufobj, MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + static native long nclCreateFromGLBuffer(long context, long flags, int bufobj, long errcode_ret, long function_pointer); + + public static CLMem clCreateFromGLTexture2D(CLContext context, long flags, int target, int miplevel, int texture, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateFromGLTexture2D; + BufferChecks.checkFunctionAddress(function_pointer); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLMem __result = new CLMem(nclCreateFromGLTexture2D(context.getPointer(), flags, target, miplevel, texture, MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + static native long nclCreateFromGLTexture2D(long context, long flags, int target, int miplevel, int texture, long errcode_ret, long function_pointer); + + public static CLMem clCreateFromGLTexture3D(CLContext context, long flags, int target, int miplevel, int texture, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateFromGLTexture3D; + BufferChecks.checkFunctionAddress(function_pointer); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLMem __result = new CLMem(nclCreateFromGLTexture3D(context.getPointer(), flags, target, miplevel, texture, MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + static native long nclCreateFromGLTexture3D(long context, long flags, int target, int miplevel, int texture, long errcode_ret, long function_pointer); + + public static CLMem clCreateFromGLRenderbuffer(CLContext context, long flags, int renderbuffer, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateFromGLRenderbuffer; + BufferChecks.checkFunctionAddress(function_pointer); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLMem __result = new CLMem(nclCreateFromGLRenderbuffer(context.getPointer(), flags, renderbuffer, MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + static native long nclCreateFromGLRenderbuffer(long context, long flags, int renderbuffer, long errcode_ret, long function_pointer); + + public static int clGetGLObjectInfo(CLMem memobj, IntBuffer gl_object_type, IntBuffer gl_object_name) { + long function_pointer = CLCapabilities.clGetGLObjectInfo; + BufferChecks.checkFunctionAddress(function_pointer); + if (gl_object_type != null) + BufferChecks.checkBuffer(gl_object_type, 1); + if (gl_object_name != null) + BufferChecks.checkBuffer(gl_object_name, 1); + int __result = nclGetGLObjectInfo(memobj.getPointer(), MemoryUtil.getAddressSafe(gl_object_type), MemoryUtil.getAddressSafe(gl_object_name), function_pointer); + return __result; + } + static native int nclGetGLObjectInfo(long memobj, long gl_object_type, long gl_object_name, long function_pointer); + + public static int clGetGLTextureInfo(CLMem memobj, int param_name, ByteBuffer param_value, PointerBuffer param_value_size_ret) { + long function_pointer = CLCapabilities.clGetGLTextureInfo; + BufferChecks.checkFunctionAddress(function_pointer); + if (param_value != null) + BufferChecks.checkDirect(param_value); + if (param_value_size_ret != null) + BufferChecks.checkBuffer(param_value_size_ret, 1); + int __result = nclGetGLTextureInfo(memobj.getPointer(), param_name, (param_value == null ? 0 : param_value.remaining()), MemoryUtil.getAddressSafe(param_value), MemoryUtil.getAddressSafe(param_value_size_ret), function_pointer); + return __result; + } + static native int nclGetGLTextureInfo(long memobj, int param_name, long param_value_param_value_size, long param_value, long param_value_size_ret, long function_pointer); + + public static int clEnqueueAcquireGLObjects(CLCommandQueue command_queue, PointerBuffer mem_objects, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueAcquireGLObjects; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(mem_objects, 1); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueAcquireGLObjects(command_queue.getPointer(), mem_objects.remaining(), MemoryUtil.getAddress(mem_objects), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL10.CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + static native int nclEnqueueAcquireGLObjects(long command_queue, int mem_objects_num_objects, long mem_objects, int event_wait_list_num_events_in_wait_list, long event_wait_list, long event, long function_pointer); + + /** Overloads clEnqueueAcquireGLObjects. */ + public static int clEnqueueAcquireGLObjects(CLCommandQueue command_queue, CLMem mem_object, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueAcquireGLObjects; + BufferChecks.checkFunctionAddress(function_pointer); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueAcquireGLObjects(command_queue.getPointer(), 1, APIUtil.getPointer(mem_object), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL10.CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + + public static int clEnqueueReleaseGLObjects(CLCommandQueue command_queue, PointerBuffer mem_objects, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueReleaseGLObjects; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(mem_objects, 1); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueReleaseGLObjects(command_queue.getPointer(), mem_objects.remaining(), MemoryUtil.getAddress(mem_objects), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL10.CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + static native int nclEnqueueReleaseGLObjects(long command_queue, int mem_objects_num_objects, long mem_objects, int event_wait_list_num_events_in_wait_list, long event_wait_list, long event, long function_pointer); + + /** Overloads clEnqueueReleaseGLObjects. */ + public static int clEnqueueReleaseGLObjects(CLCommandQueue command_queue, CLMem mem_object, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueReleaseGLObjects; + BufferChecks.checkFunctionAddress(function_pointer); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueReleaseGLObjects(command_queue.getPointer(), 1, APIUtil.getPointer(mem_object), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL10.CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/CL11.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/CL11.java new file mode 100644 index 0000000..c7c17d8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/CL11.java @@ -0,0 +1,350 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; + +/** + * The core OpenCL 1.1 API + */ +public final class CL11 { + + /** + * Error Codes + */ + public static final int CL_MISALIGNED_SUB_BUFFER_OFFSET = 0xFFFFFFF3, + CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST = 0xFFFFFFF2, + CL_INVALID_PROPERTY = 0xFFFFFFC0; + + /** + * OpenCL Version + */ + public static final int CL_VERSION_1_1 = 0x1; + + /** + * cl_device_info + */ + public static final int CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF = 0x1034, + CL_DEVICE_HOST_UNIFIED_MEMORY = 0x1035, + CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR = 0x1036, + CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT = 0x1037, + CL_DEVICE_NATIVE_VECTOR_WIDTH_INT = 0x1038, + CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG = 0x1039, + CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT = 0x103A, + CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE = 0x103B, + CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF = 0x103C, + CL_DEVICE_OPENCL_C_VERSION = 0x103D; + + /** + * cl_device_fp_config - bitfield + */ + public static final int CL_FP_SOFT_FLOAT = 0x40; + + /** + * cl_context_info + */ + public static final int CL_CONTEXT_NUM_DEVICES = 0x1083; + + /** + * cl_channel_order + */ + public static final int CL_Rx = 0x10BA, + CL_RGx = 0x10BB, + CL_RGBx = 0x10BC; + + /** + * cl_mem_info + */ + public static final int CL_MEM_ASSOCIATED_MEMOBJECT = 0x1107, + CL_MEM_OFFSET = 0x1108; + + /** + * cl_addressing_mode + */ + public static final int CL_ADDRESS_MIRRORED_REPEAT = 0x1134; + + /** + * cl_kernel_work_group_info + */ + public static final int CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE = 0x11B3, + CL_KERNEL_PRIVATE_MEM_SIZE = 0x11B4; + + /** + * cl_event_info + */ + public static final int CL_EVENT_CONTEXT = 0x11D4; + + /** + * cl_command_type + */ + public static final int CL_COMMAND_READ_BUFFER_RECT = 0x1201, + CL_COMMAND_WRITE_BUFFER_RECT = 0x1202, + CL_COMMAND_COPY_BUFFER_RECT = 0x1203, + CL_COMMAND_USER = 0x1204; + + /** + * cl_buffer_create_type + */ + public static final int CL_BUFFER_CREATE_TYPE_REGION = 0x1220; + + private CL11() {} + + public static CLMem clCreateSubBuffer(CLMem buffer, long flags, int buffer_create_type, ByteBuffer buffer_create_info, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateSubBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(buffer_create_info, 2 * PointerBuffer.getPointerSize()); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLMem __result = CLMem.create(nclCreateSubBuffer(buffer.getPointer(), flags, buffer_create_type, MemoryUtil.getAddress(buffer_create_info), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), buffer.getParent()); + return __result; + } + static native long nclCreateSubBuffer(long buffer, long flags, int buffer_create_type, long buffer_create_info, long errcode_ret, long function_pointer); + + public static int clSetMemObjectDestructorCallback(CLMem memobj, CLMemObjectDestructorCallback pfn_notify) { + long function_pointer = CLCapabilities.clSetMemObjectDestructorCallback; + BufferChecks.checkFunctionAddress(function_pointer); + long user_data = CallbackUtil.createGlobalRef(pfn_notify); + int __result = 0; + try { + __result = nclSetMemObjectDestructorCallback(memobj.getPointer(), pfn_notify.getPointer(), user_data, function_pointer); + return __result; + } finally { + CallbackUtil.checkCallback(__result, user_data); + } + } + static native int nclSetMemObjectDestructorCallback(long memobj, long pfn_notify, long user_data, long function_pointer); + + public static int clEnqueueReadBufferRect(CLCommandQueue command_queue, CLMem buffer, int blocking_read, PointerBuffer buffer_offset, PointerBuffer host_offset, PointerBuffer region, long buffer_row_pitch, long buffer_slice_pitch, long host_row_pitch, long host_slice_pitch, ByteBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueReadBufferRect; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(buffer_offset, 3); + BufferChecks.checkBuffer(host_offset, 3); + BufferChecks.checkBuffer(region, 3); + BufferChecks.checkBuffer(ptr, CLChecks.calculateBufferRectSize(host_offset, region, host_row_pitch, host_slice_pitch)); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueReadBufferRect(command_queue.getPointer(), buffer.getPointer(), blocking_read, MemoryUtil.getAddress(buffer_offset), MemoryUtil.getAddress(host_offset), MemoryUtil.getAddress(region), buffer_row_pitch, buffer_slice_pitch, host_row_pitch, host_slice_pitch, MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL10.CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + public static int clEnqueueReadBufferRect(CLCommandQueue command_queue, CLMem buffer, int blocking_read, PointerBuffer buffer_offset, PointerBuffer host_offset, PointerBuffer region, long buffer_row_pitch, long buffer_slice_pitch, long host_row_pitch, long host_slice_pitch, DoubleBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueReadBufferRect; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(buffer_offset, 3); + BufferChecks.checkBuffer(host_offset, 3); + BufferChecks.checkBuffer(region, 3); + BufferChecks.checkBuffer(ptr, CLChecks.calculateBufferRectSize(host_offset, region, host_row_pitch, host_slice_pitch)); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueReadBufferRect(command_queue.getPointer(), buffer.getPointer(), blocking_read, MemoryUtil.getAddress(buffer_offset), MemoryUtil.getAddress(host_offset), MemoryUtil.getAddress(region), buffer_row_pitch, buffer_slice_pitch, host_row_pitch, host_slice_pitch, MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL10.CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + public static int clEnqueueReadBufferRect(CLCommandQueue command_queue, CLMem buffer, int blocking_read, PointerBuffer buffer_offset, PointerBuffer host_offset, PointerBuffer region, long buffer_row_pitch, long buffer_slice_pitch, long host_row_pitch, long host_slice_pitch, FloatBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueReadBufferRect; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(buffer_offset, 3); + BufferChecks.checkBuffer(host_offset, 3); + BufferChecks.checkBuffer(region, 3); + BufferChecks.checkBuffer(ptr, CLChecks.calculateBufferRectSize(host_offset, region, host_row_pitch, host_slice_pitch)); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueReadBufferRect(command_queue.getPointer(), buffer.getPointer(), blocking_read, MemoryUtil.getAddress(buffer_offset), MemoryUtil.getAddress(host_offset), MemoryUtil.getAddress(region), buffer_row_pitch, buffer_slice_pitch, host_row_pitch, host_slice_pitch, MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL10.CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + public static int clEnqueueReadBufferRect(CLCommandQueue command_queue, CLMem buffer, int blocking_read, PointerBuffer buffer_offset, PointerBuffer host_offset, PointerBuffer region, long buffer_row_pitch, long buffer_slice_pitch, long host_row_pitch, long host_slice_pitch, IntBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueReadBufferRect; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(buffer_offset, 3); + BufferChecks.checkBuffer(host_offset, 3); + BufferChecks.checkBuffer(region, 3); + BufferChecks.checkBuffer(ptr, CLChecks.calculateBufferRectSize(host_offset, region, host_row_pitch, host_slice_pitch)); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueReadBufferRect(command_queue.getPointer(), buffer.getPointer(), blocking_read, MemoryUtil.getAddress(buffer_offset), MemoryUtil.getAddress(host_offset), MemoryUtil.getAddress(region), buffer_row_pitch, buffer_slice_pitch, host_row_pitch, host_slice_pitch, MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL10.CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + public static int clEnqueueReadBufferRect(CLCommandQueue command_queue, CLMem buffer, int blocking_read, PointerBuffer buffer_offset, PointerBuffer host_offset, PointerBuffer region, long buffer_row_pitch, long buffer_slice_pitch, long host_row_pitch, long host_slice_pitch, LongBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueReadBufferRect; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(buffer_offset, 3); + BufferChecks.checkBuffer(host_offset, 3); + BufferChecks.checkBuffer(region, 3); + BufferChecks.checkBuffer(ptr, CLChecks.calculateBufferRectSize(host_offset, region, host_row_pitch, host_slice_pitch)); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueReadBufferRect(command_queue.getPointer(), buffer.getPointer(), blocking_read, MemoryUtil.getAddress(buffer_offset), MemoryUtil.getAddress(host_offset), MemoryUtil.getAddress(region), buffer_row_pitch, buffer_slice_pitch, host_row_pitch, host_slice_pitch, MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL10.CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + public static int clEnqueueReadBufferRect(CLCommandQueue command_queue, CLMem buffer, int blocking_read, PointerBuffer buffer_offset, PointerBuffer host_offset, PointerBuffer region, long buffer_row_pitch, long buffer_slice_pitch, long host_row_pitch, long host_slice_pitch, ShortBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueReadBufferRect; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(buffer_offset, 3); + BufferChecks.checkBuffer(host_offset, 3); + BufferChecks.checkBuffer(region, 3); + BufferChecks.checkBuffer(ptr, CLChecks.calculateBufferRectSize(host_offset, region, host_row_pitch, host_slice_pitch)); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueReadBufferRect(command_queue.getPointer(), buffer.getPointer(), blocking_read, MemoryUtil.getAddress(buffer_offset), MemoryUtil.getAddress(host_offset), MemoryUtil.getAddress(region), buffer_row_pitch, buffer_slice_pitch, host_row_pitch, host_slice_pitch, MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL10.CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + static native int nclEnqueueReadBufferRect(long command_queue, long buffer, int blocking_read, long buffer_offset, long host_offset, long region, long buffer_row_pitch, long buffer_slice_pitch, long host_row_pitch, long host_slice_pitch, long ptr, int event_wait_list_num_events_in_wait_list, long event_wait_list, long event, long function_pointer); + + public static int clEnqueueWriteBufferRect(CLCommandQueue command_queue, CLMem buffer, int blocking_write, PointerBuffer buffer_offset, PointerBuffer host_offset, PointerBuffer region, long buffer_row_pitch, long buffer_slice_pitch, long host_row_pitch, long host_slice_pitch, ByteBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueWriteBufferRect; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(buffer_offset, 3); + BufferChecks.checkBuffer(host_offset, 3); + BufferChecks.checkBuffer(region, 3); + BufferChecks.checkBuffer(ptr, CLChecks.calculateBufferRectSize(host_offset, region, host_row_pitch, host_slice_pitch)); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueWriteBufferRect(command_queue.getPointer(), buffer.getPointer(), blocking_write, MemoryUtil.getAddress(buffer_offset), MemoryUtil.getAddress(host_offset), MemoryUtil.getAddress(region), buffer_row_pitch, buffer_slice_pitch, host_row_pitch, host_slice_pitch, MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL10.CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + public static int clEnqueueWriteBufferRect(CLCommandQueue command_queue, CLMem buffer, int blocking_write, PointerBuffer buffer_offset, PointerBuffer host_offset, PointerBuffer region, long buffer_row_pitch, long buffer_slice_pitch, long host_row_pitch, long host_slice_pitch, DoubleBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueWriteBufferRect; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(buffer_offset, 3); + BufferChecks.checkBuffer(host_offset, 3); + BufferChecks.checkBuffer(region, 3); + BufferChecks.checkBuffer(ptr, CLChecks.calculateBufferRectSize(host_offset, region, host_row_pitch, host_slice_pitch)); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueWriteBufferRect(command_queue.getPointer(), buffer.getPointer(), blocking_write, MemoryUtil.getAddress(buffer_offset), MemoryUtil.getAddress(host_offset), MemoryUtil.getAddress(region), buffer_row_pitch, buffer_slice_pitch, host_row_pitch, host_slice_pitch, MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL10.CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + public static int clEnqueueWriteBufferRect(CLCommandQueue command_queue, CLMem buffer, int blocking_write, PointerBuffer buffer_offset, PointerBuffer host_offset, PointerBuffer region, long buffer_row_pitch, long buffer_slice_pitch, long host_row_pitch, long host_slice_pitch, FloatBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueWriteBufferRect; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(buffer_offset, 3); + BufferChecks.checkBuffer(host_offset, 3); + BufferChecks.checkBuffer(region, 3); + BufferChecks.checkBuffer(ptr, CLChecks.calculateBufferRectSize(host_offset, region, host_row_pitch, host_slice_pitch)); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueWriteBufferRect(command_queue.getPointer(), buffer.getPointer(), blocking_write, MemoryUtil.getAddress(buffer_offset), MemoryUtil.getAddress(host_offset), MemoryUtil.getAddress(region), buffer_row_pitch, buffer_slice_pitch, host_row_pitch, host_slice_pitch, MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL10.CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + public static int clEnqueueWriteBufferRect(CLCommandQueue command_queue, CLMem buffer, int blocking_write, PointerBuffer buffer_offset, PointerBuffer host_offset, PointerBuffer region, long buffer_row_pitch, long buffer_slice_pitch, long host_row_pitch, long host_slice_pitch, IntBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueWriteBufferRect; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(buffer_offset, 3); + BufferChecks.checkBuffer(host_offset, 3); + BufferChecks.checkBuffer(region, 3); + BufferChecks.checkBuffer(ptr, CLChecks.calculateBufferRectSize(host_offset, region, host_row_pitch, host_slice_pitch)); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueWriteBufferRect(command_queue.getPointer(), buffer.getPointer(), blocking_write, MemoryUtil.getAddress(buffer_offset), MemoryUtil.getAddress(host_offset), MemoryUtil.getAddress(region), buffer_row_pitch, buffer_slice_pitch, host_row_pitch, host_slice_pitch, MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL10.CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + public static int clEnqueueWriteBufferRect(CLCommandQueue command_queue, CLMem buffer, int blocking_write, PointerBuffer buffer_offset, PointerBuffer host_offset, PointerBuffer region, long buffer_row_pitch, long buffer_slice_pitch, long host_row_pitch, long host_slice_pitch, LongBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueWriteBufferRect; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(buffer_offset, 3); + BufferChecks.checkBuffer(host_offset, 3); + BufferChecks.checkBuffer(region, 3); + BufferChecks.checkBuffer(ptr, CLChecks.calculateBufferRectSize(host_offset, region, host_row_pitch, host_slice_pitch)); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueWriteBufferRect(command_queue.getPointer(), buffer.getPointer(), blocking_write, MemoryUtil.getAddress(buffer_offset), MemoryUtil.getAddress(host_offset), MemoryUtil.getAddress(region), buffer_row_pitch, buffer_slice_pitch, host_row_pitch, host_slice_pitch, MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL10.CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + public static int clEnqueueWriteBufferRect(CLCommandQueue command_queue, CLMem buffer, int blocking_write, PointerBuffer buffer_offset, PointerBuffer host_offset, PointerBuffer region, long buffer_row_pitch, long buffer_slice_pitch, long host_row_pitch, long host_slice_pitch, ShortBuffer ptr, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueWriteBufferRect; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(buffer_offset, 3); + BufferChecks.checkBuffer(host_offset, 3); + BufferChecks.checkBuffer(region, 3); + BufferChecks.checkBuffer(ptr, CLChecks.calculateBufferRectSize(host_offset, region, host_row_pitch, host_slice_pitch)); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueWriteBufferRect(command_queue.getPointer(), buffer.getPointer(), blocking_write, MemoryUtil.getAddress(buffer_offset), MemoryUtil.getAddress(host_offset), MemoryUtil.getAddress(region), buffer_row_pitch, buffer_slice_pitch, host_row_pitch, host_slice_pitch, MemoryUtil.getAddress(ptr), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL10.CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + static native int nclEnqueueWriteBufferRect(long command_queue, long buffer, int blocking_write, long buffer_offset, long host_offset, long region, long buffer_row_pitch, long buffer_slice_pitch, long host_row_pitch, long host_slice_pitch, long ptr, int event_wait_list_num_events_in_wait_list, long event_wait_list, long event, long function_pointer); + + public static int clEnqueueCopyBufferRect(CLCommandQueue command_queue, CLMem src_buffer, CLMem dst_buffer, PointerBuffer src_origin, PointerBuffer dst_origin, PointerBuffer region, long src_row_pitch, long src_slice_pitch, long dst_row_pitch, long dst_slice_pitch, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueCopyBufferRect; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(src_origin, 3); + BufferChecks.checkBuffer(dst_origin, 3); + BufferChecks.checkBuffer(region, 3); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueCopyBufferRect(command_queue.getPointer(), src_buffer.getPointer(), dst_buffer.getPointer(), MemoryUtil.getAddress(src_origin), MemoryUtil.getAddress(dst_origin), MemoryUtil.getAddress(region), src_row_pitch, src_slice_pitch, dst_row_pitch, dst_slice_pitch, (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL10.CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + static native int nclEnqueueCopyBufferRect(long command_queue, long src_buffer, long dst_buffer, long src_origin, long dst_origin, long region, long src_row_pitch, long src_slice_pitch, long dst_row_pitch, long dst_slice_pitch, int event_wait_list_num_events_in_wait_list, long event_wait_list, long event, long function_pointer); + + public static CLEvent clCreateUserEvent(CLContext context, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateUserEvent; + BufferChecks.checkFunctionAddress(function_pointer); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLEvent __result = new CLEvent(nclCreateUserEvent(context.getPointer(), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + static native long nclCreateUserEvent(long context, long errcode_ret, long function_pointer); + + public static int clSetUserEventStatus(CLEvent event, int execution_status) { + long function_pointer = CLCapabilities.clSetUserEventStatus; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nclSetUserEventStatus(event.getPointer(), execution_status, function_pointer); + return __result; + } + static native int nclSetUserEventStatus(long event, int execution_status, long function_pointer); + + public static int clSetEventCallback(CLEvent event, int command_exec_callback_type, CLEventCallback pfn_notify) { + long function_pointer = CLCapabilities.clSetEventCallback; + BufferChecks.checkFunctionAddress(function_pointer); + long user_data = CallbackUtil.createGlobalRef(pfn_notify); + pfn_notify.setRegistry(event.getParentRegistry()); + int __result = 0; + try { + __result = nclSetEventCallback(event.getPointer(), command_exec_callback_type, pfn_notify.getPointer(), user_data, function_pointer); + return __result; + } finally { + CallbackUtil.checkCallback(__result, user_data); + } + } + static native int nclSetEventCallback(long event, int command_exec_callback_type, long pfn_notify, long user_data, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/CL12.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/CL12.java new file mode 100644 index 0000000..a93eecb --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/CL12.java @@ -0,0 +1,495 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; + +/** + * The core OpenCL 1.1 API + */ +public final class CL12 { + + /** + * Error Codes + */ + public static final int CL_COMPILE_PROGRAM_FAILURE = 0xFFFFFFF1, + CL_LINKER_NOT_AVAILABLE = 0xFFFFFFF0, + CL_LINK_PROGRAM_FAILURE = 0xFFFFFFEF, + CL_DEVICE_PARTITION_FAILED = 0xFFFFFFEE, + CL_KERNEL_ARG_INFO_NOT_AVAILABLE = 0xFFFFFFED, + CL_INVALID_IMAGE_DESCRIPTOR = 0xFFFFFFBF, + CL_INVALID_COMPILER_OPTIONS = 0xFFFFFFBE, + CL_INVALID_LINKER_OPTIONS = 0xFFFFFFBD, + CL_INVALID_DEVICE_PARTITION_COUNT = 0xFFFFFFBC; + + /** + * OpenCL Version + */ + public static final int CL_VERSION_1_2 = 0x1; + + /** + * cl_bool + */ + public static final int CL_BLOCKING = 0x1, + CL_NON_BLOCKING = 0x0; + + /** + * cl_device_type - bitfield + */ + public static final int CL_DEVICE_TYPE_CUSTOM = 0x10, + CL_DEVICE_DOUBLE_FP_CONFIG = 0x1032, + CL_DEVICE_LINKER_AVAILABLE = 0x103E, + CL_DEVICE_BUILT_IN_KERNELS = 0x103F, + CL_DEVICE_IMAGE_MAX_BUFFER_SIZE = 0x1040, + CL_DEVICE_IMAGE_MAX_ARRAY_SIZE = 0x1041, + CL_DEVICE_PARENT_DEVICE = 0x1042, + CL_DEVICE_PARTITION_MAX_SUB_DEVICES = 0x1043, + CL_DEVICE_PARTITION_PROPERTIES = 0x1044, + CL_DEVICE_PARTITION_AFFINITY_DOMAIN = 0x1045, + CL_DEVICE_PARTITION_TYPE = 0x1046, + CL_DEVICE_REFERENCE_COUNT = 0x1047, + CL_DEVICE_PREFERRED_INTEROP_USER_SYNC = 0x1048, + CL_DEVICE_PRINTF_BUFFER_SIZE = 0x1049, + CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT = 0x80, + CL_CONTEXT_INTEROP_USER_SYNC = 0x1085, + CL_DEVICE_PARTITION_EQUALLY = 0x1086, + CL_DEVICE_PARTITION_BY_COUNTS = 0x1087, + CL_DEVICE_PARTITION_BY_COUNTS_LIST_END = 0x0, + CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN = 0x1088, + CL_DEVICE_AFFINITY_DOMAIN_NUMA = 0x1, + CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE = 0x2, + CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE = 0x4, + CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE = 0x8, + CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE = 0x10, + CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE = 0x20, + CL_MEM_HOST_WRITE_ONLY = 0x80, + CL_MEM_HOST_READ_ONLY = 0x100, + CL_MEM_HOST_NO_ACCESS = 0x200, + CL_MIGRATE_MEM_OBJECT_HOST = 0x1, + CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED = 0x2, + CL_MEM_OBJECT_IMAGE2D_ARRAY = 0x10F3, + CL_MEM_OBJECT_IMAGE1D = 0x10F4, + CL_MEM_OBJECT_IMAGE1D_ARRAY = 0x10F5, + CL_MEM_OBJECT_IMAGE1D_BUFFER = 0x10F6, + CL_IMAGE_ARRAY_SIZE = 0x1117, + CL_IMAGE_BUFFER = 0x1118, + CL_IMAGE_NUM_MIP_LEVELS = 0x1119, + CL_IMAGE_NUM_SAMPLES = 0x111A, + CL_MAP_WRITE_INVALIDATE_REGION = 0x4, + CL_PROGRAM_NUM_KERNELS = 0x1167, + CL_PROGRAM_KERNEL_NAMES = 0x1168, + CL_PROGRAM_BINARY_TYPE = 0x1184, + CL_PROGRAM_BINARY_TYPE_NONE = 0x0, + CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT = 0x1, + CL_PROGRAM_BINARY_TYPE_LIBRARY = 0x2, + CL_PROGRAM_BINARY_TYPE_EXECUTABLE = 0x4, + CL_KERNEL_ATTRIBUTES = 0x1195, + CL_KERNEL_ARG_ADDRESS_QUALIFIER = 0x1196, + CL_KERNEL_ARG_ACCESS_QUALIFIER = 0x1197, + CL_KERNEL_ARG_TYPE_NAME = 0x1198, + CL_KERNEL_ARG_TYPE_QUALIFIER = 0x1199, + CL_KERNEL_ARG_NAME = 0x119A, + CL_KERNEL_ARG_ADDRESS_GLOBAL = 0x119A, + CL_KERNEL_ARG_ADDRESS_LOCAL = 0x119B, + CL_KERNEL_ARG_ADDRESS_CONSTANT = 0x119C, + CL_KERNEL_ARG_ADDRESS_PRIVATE = 0x119D, + CL_KERNEL_ARG_ACCESS_READ_ONLY = 0x11A0, + CL_KERNEL_ARG_ACCESS_WRITE_ONLY = 0x11A1, + CL_KERNEL_ARG_ACCESS_READ_WRITE = 0x11A2, + CL_KERNEL_ARG_ACCESS_NONE = 0x11A3, + CL_KERNEL_ARG_TYPE_NONE = 0x0, + CL_KERNEL_ARG_TYPE_CONST = 0x1, + CL_KERNEL_ARG_TYPE_RESTRICT = 0x2, + CL_KERNEL_ARG_TYPE_VOLATILE = 0x4, + CL_KERNEL_GLOBAL_WORK_SIZE = 0x11B5, + CL_COMMAND_BARRIER = 0x1205, + CL_COMMAND_MIGRATE_MEM_OBJECTS = 0x1206, + CL_COMMAND_FILL_BUFFER = 0x1207, + CL_COMMAND_FILL_IMAGE = 0x1208; + + private CL12() {} + + public static int clRetainDevice(CLDevice device) { + long function_pointer = CLCapabilities.clRetainDevice; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nclRetainDevice(device.getPointer(), function_pointer); + if ( __result == CL10.CL_SUCCESS ) device.retain(); + return __result; + } + static native int nclRetainDevice(long device, long function_pointer); + + /** + * Warning: LWJGL will not automatically release any objects associated with sub-devices. + * The user is responsible for tracking and releasing everything prior to calling this method. + *

+ * @param device the parent CLDevice + *

+ * @return the error code + */ + public static int clReleaseDevice(CLDevice device) { + long function_pointer = CLCapabilities.clReleaseDevice; + BufferChecks.checkFunctionAddress(function_pointer); + APIUtil.releaseObjects(device); + int __result = nclReleaseDevice(device.getPointer(), function_pointer); + if ( __result == CL10.CL_SUCCESS ) device.release(); + return __result; + } + static native int nclReleaseDevice(long device, long function_pointer); + + public static int clCreateSubDevices(CLDevice in_device, LongBuffer properties, PointerBuffer out_devices, IntBuffer num_devices_ret) { + long function_pointer = CLCapabilities.clCreateSubDevices; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(properties); + BufferChecks.checkNullTerminated(properties); + if (out_devices != null) + BufferChecks.checkDirect(out_devices); + if (num_devices_ret != null) + BufferChecks.checkBuffer(num_devices_ret, 1); + int __result = nclCreateSubDevices(in_device.getPointer(), MemoryUtil.getAddress(properties), (out_devices == null ? 0 : out_devices.remaining()), MemoryUtil.getAddressSafe(out_devices), MemoryUtil.getAddressSafe(num_devices_ret), function_pointer); + if ( __result == CL10.CL_SUCCESS && out_devices != null ) in_device.registerSubCLDevices(out_devices); + return __result; + } + static native int nclCreateSubDevices(long in_device, long properties, int out_devices_num_devices, long out_devices, long num_devices_ret, long function_pointer); + + public static CLMem clCreateImage(CLContext context, long flags, ByteBuffer image_format, ByteBuffer image_desc, ByteBuffer host_ptr, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateImage; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(image_format, 2 * 4); + BufferChecks.checkBuffer(image_desc, 7 * PointerBuffer.getPointerSize() + 2 * 4 + PointerBuffer.getPointerSize()); + if (host_ptr != null) + BufferChecks.checkDirect(host_ptr); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLMem __result = new CLMem(nclCreateImage(context.getPointer(), flags, MemoryUtil.getAddress(image_format), MemoryUtil.getAddress(image_desc), MemoryUtil.getAddressSafe(host_ptr), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + public static CLMem clCreateImage(CLContext context, long flags, ByteBuffer image_format, ByteBuffer image_desc, FloatBuffer host_ptr, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateImage; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(image_format, 2 * 4); + BufferChecks.checkBuffer(image_desc, 7 * PointerBuffer.getPointerSize() + 2 * 4 + PointerBuffer.getPointerSize()); + if (host_ptr != null) + BufferChecks.checkDirect(host_ptr); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLMem __result = new CLMem(nclCreateImage(context.getPointer(), flags, MemoryUtil.getAddress(image_format), MemoryUtil.getAddress(image_desc), MemoryUtil.getAddressSafe(host_ptr), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + public static CLMem clCreateImage(CLContext context, long flags, ByteBuffer image_format, ByteBuffer image_desc, IntBuffer host_ptr, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateImage; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(image_format, 2 * 4); + BufferChecks.checkBuffer(image_desc, 7 * PointerBuffer.getPointerSize() + 2 * 4 + PointerBuffer.getPointerSize()); + if (host_ptr != null) + BufferChecks.checkDirect(host_ptr); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLMem __result = new CLMem(nclCreateImage(context.getPointer(), flags, MemoryUtil.getAddress(image_format), MemoryUtil.getAddress(image_desc), MemoryUtil.getAddressSafe(host_ptr), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + public static CLMem clCreateImage(CLContext context, long flags, ByteBuffer image_format, ByteBuffer image_desc, ShortBuffer host_ptr, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateImage; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(image_format, 2 * 4); + BufferChecks.checkBuffer(image_desc, 7 * PointerBuffer.getPointerSize() + 2 * 4 + PointerBuffer.getPointerSize()); + if (host_ptr != null) + BufferChecks.checkDirect(host_ptr); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLMem __result = new CLMem(nclCreateImage(context.getPointer(), flags, MemoryUtil.getAddress(image_format), MemoryUtil.getAddress(image_desc), MemoryUtil.getAddressSafe(host_ptr), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + static native long nclCreateImage(long context, long flags, long image_format, long image_desc, long host_ptr, long errcode_ret, long function_pointer); + + public static CLProgram clCreateProgramWithBuiltInKernels(CLContext context, PointerBuffer device_list, ByteBuffer kernel_names, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateProgramWithBuiltInKernels; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(device_list, 1); + BufferChecks.checkDirect(kernel_names); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLProgram __result = new CLProgram(nclCreateProgramWithBuiltInKernels(context.getPointer(), device_list.remaining(), MemoryUtil.getAddress(device_list), MemoryUtil.getAddress(kernel_names), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + static native long nclCreateProgramWithBuiltInKernels(long context, int device_list_num_devices, long device_list, long kernel_names, long errcode_ret, long function_pointer); + + /** Overloads clCreateProgramWithBuiltInKernels. */ + public static CLProgram clCreateProgramWithBuiltInKernels(CLContext context, PointerBuffer device_list, CharSequence kernel_names, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateProgramWithBuiltInKernels; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(device_list, 1); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLProgram __result = new CLProgram(nclCreateProgramWithBuiltInKernels(context.getPointer(), device_list.remaining(), MemoryUtil.getAddress(device_list), APIUtil.getBuffer(kernel_names), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + + /** + * Single null-terminated header include name. + */ + public static int clCompileProgram(CLProgram program, PointerBuffer device_list, ByteBuffer options, PointerBuffer input_header, ByteBuffer header_include_name, CLCompileProgramCallback pfn_notify) { + long function_pointer = CLCapabilities.clCompileProgram; + BufferChecks.checkFunctionAddress(function_pointer); + if (device_list != null) + BufferChecks.checkDirect(device_list); + BufferChecks.checkDirect(options); + BufferChecks.checkNullTerminated(options); + BufferChecks.checkBuffer(input_header, 1); + BufferChecks.checkDirect(header_include_name); + BufferChecks.checkNullTerminated(header_include_name); + long user_data = CallbackUtil.createGlobalRef(pfn_notify); + if ( pfn_notify != null ) pfn_notify.setContext(program.getParent()); + int __result = 0; + try { + __result = nclCompileProgram(program.getPointer(), (device_list == null ? 0 : device_list.remaining()), MemoryUtil.getAddressSafe(device_list), MemoryUtil.getAddress(options), 1, MemoryUtil.getAddress(input_header), MemoryUtil.getAddress(header_include_name), pfn_notify == null ? 0 : pfn_notify.getPointer(), user_data, function_pointer); + return __result; + } finally { + CallbackUtil.checkCallback(__result, user_data); + } + } + static native int nclCompileProgram(long program, int device_list_num_devices, long device_list, long options, int num_input_headers, long input_header, long header_include_name, long pfn_notify, long user_data, long function_pointer); + + /** + * Overloads clCompileProgram. + *

+ * Multiple null-terminated header include names, one after the other. + */ + public static int clCompileProgramMulti(CLProgram program, PointerBuffer device_list, ByteBuffer options, PointerBuffer input_headers, ByteBuffer header_include_names, CLCompileProgramCallback pfn_notify) { + long function_pointer = CLCapabilities.clCompileProgram; + BufferChecks.checkFunctionAddress(function_pointer); + if (device_list != null) + BufferChecks.checkDirect(device_list); + BufferChecks.checkDirect(options); + BufferChecks.checkNullTerminated(options); + BufferChecks.checkBuffer(input_headers, 1); + BufferChecks.checkDirect(header_include_names); + BufferChecks.checkNullTerminated(header_include_names, input_headers.remaining()); + long user_data = CallbackUtil.createGlobalRef(pfn_notify); + if ( pfn_notify != null ) pfn_notify.setContext(program.getParent()); + int __result = 0; + try { + __result = nclCompileProgramMulti(program.getPointer(), (device_list == null ? 0 : device_list.remaining()), MemoryUtil.getAddressSafe(device_list), MemoryUtil.getAddress(options), input_headers.remaining(), MemoryUtil.getAddress(input_headers), MemoryUtil.getAddress(header_include_names), pfn_notify == null ? 0 : pfn_notify.getPointer(), user_data, function_pointer); + return __result; + } finally { + CallbackUtil.checkCallback(__result, user_data); + } + } + static native int nclCompileProgramMulti(long program, int device_list_num_devices, long device_list, long options, int input_headers_num_input_headers, long input_headers, long header_include_names, long pfn_notify, long user_data, long function_pointer); + + /** Overloads clCompileProgram. */ + public static int clCompileProgram(CLProgram program, PointerBuffer device_list, ByteBuffer options, PointerBuffer input_headers, ByteBuffer[] header_include_names, CLCompileProgramCallback pfn_notify) { + long function_pointer = CLCapabilities.clCompileProgram; + BufferChecks.checkFunctionAddress(function_pointer); + if (device_list != null) + BufferChecks.checkDirect(device_list); + BufferChecks.checkDirect(options); + BufferChecks.checkNullTerminated(options); + BufferChecks.checkBuffer(input_headers, header_include_names.length); + BufferChecks.checkArray(header_include_names, 1); + long user_data = CallbackUtil.createGlobalRef(pfn_notify); + if ( pfn_notify != null ) pfn_notify.setContext(program.getParent()); + int __result = 0; + try { + __result = nclCompileProgram3(program.getPointer(), (device_list == null ? 0 : device_list.remaining()), MemoryUtil.getAddressSafe(device_list), MemoryUtil.getAddress(options), header_include_names.length, MemoryUtil.getAddress(input_headers), header_include_names, pfn_notify == null ? 0 : pfn_notify.getPointer(), user_data, function_pointer); + return __result; + } finally { + CallbackUtil.checkCallback(__result, user_data); + } + } + static native int nclCompileProgram3(long program, int device_list_num_devices, long device_list, long options, int num_input_headers, long input_headers, ByteBuffer[] header_include_names, long pfn_notify, long user_data, long function_pointer); + + /** Overloads clCompileProgram. */ + public static int clCompileProgram(CLProgram program, PointerBuffer device_list, CharSequence options, PointerBuffer input_header, CharSequence header_include_name, CLCompileProgramCallback pfn_notify) { + long function_pointer = CLCapabilities.clCompileProgram; + BufferChecks.checkFunctionAddress(function_pointer); + if (device_list != null) + BufferChecks.checkDirect(device_list); + BufferChecks.checkBuffer(input_header, 1); + long user_data = CallbackUtil.createGlobalRef(pfn_notify); + if ( pfn_notify != null ) pfn_notify.setContext(program.getParent()); + int __result = 0; + try { + __result = nclCompileProgram(program.getPointer(), (device_list == null ? 0 : device_list.remaining()), MemoryUtil.getAddressSafe(device_list), APIUtil.getBufferNT(options), 1, MemoryUtil.getAddress(input_header), APIUtil.getBufferNT(header_include_name), pfn_notify == null ? 0 : pfn_notify.getPointer(), user_data, function_pointer); + return __result; + } finally { + CallbackUtil.checkCallback(__result, user_data); + } + } + + /** Overloads clCompileProgram. */ + public static int clCompileProgram(CLProgram program, PointerBuffer device_list, CharSequence options, PointerBuffer input_header, CharSequence[] header_include_name, CLCompileProgramCallback pfn_notify) { + long function_pointer = CLCapabilities.clCompileProgram; + BufferChecks.checkFunctionAddress(function_pointer); + if (device_list != null) + BufferChecks.checkDirect(device_list); + BufferChecks.checkBuffer(input_header, 1); + BufferChecks.checkArray(header_include_name); + long user_data = CallbackUtil.createGlobalRef(pfn_notify); + if ( pfn_notify != null ) pfn_notify.setContext(program.getParent()); + int __result = 0; + try { + __result = nclCompileProgramMulti(program.getPointer(), (device_list == null ? 0 : device_list.remaining()), MemoryUtil.getAddressSafe(device_list), APIUtil.getBufferNT(options), input_header.remaining(), MemoryUtil.getAddress(input_header), APIUtil.getBufferNT(header_include_name), pfn_notify == null ? 0 : pfn_notify.getPointer(), user_data, function_pointer); + return __result; + } finally { + CallbackUtil.checkCallback(__result, user_data); + } + } + + public static CLProgram clLinkProgram(CLContext context, PointerBuffer device_list, ByteBuffer options, PointerBuffer input_programs, CLLinkProgramCallback pfn_notify, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clLinkProgram; + BufferChecks.checkFunctionAddress(function_pointer); + if (device_list != null) + BufferChecks.checkDirect(device_list); + BufferChecks.checkDirect(options); + BufferChecks.checkNullTerminated(options); + BufferChecks.checkDirect(input_programs); + BufferChecks.checkBuffer(errcode_ret, 1); + long user_data = CallbackUtil.createGlobalRef(pfn_notify); + if ( pfn_notify != null ) pfn_notify.setContext(context); + CLProgram __result = null; + try { + __result = new CLProgram(nclLinkProgram(context.getPointer(), (device_list == null ? 0 : device_list.remaining()), MemoryUtil.getAddressSafe(device_list), MemoryUtil.getAddress(options), input_programs.remaining(), MemoryUtil.getAddress(input_programs), pfn_notify == null ? 0 : pfn_notify.getPointer(), user_data, MemoryUtil.getAddress(errcode_ret), function_pointer), context); + return __result; + } finally { + CallbackUtil.checkCallback(errcode_ret.get(errcode_ret.position()), user_data); + } + } + static native long nclLinkProgram(long context, int device_list_num_devices, long device_list, long options, int input_programs_num_input_programs, long input_programs, long pfn_notify, long user_data, long errcode_ret, long function_pointer); + + /** Overloads clLinkProgram. */ + public static CLProgram clLinkProgram(CLContext context, PointerBuffer device_list, CharSequence options, PointerBuffer input_programs, CLLinkProgramCallback pfn_notify, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clLinkProgram; + BufferChecks.checkFunctionAddress(function_pointer); + if (device_list != null) + BufferChecks.checkDirect(device_list); + BufferChecks.checkDirect(input_programs); + BufferChecks.checkBuffer(errcode_ret, 1); + long user_data = CallbackUtil.createGlobalRef(pfn_notify); + if ( pfn_notify != null ) pfn_notify.setContext(context); + CLProgram __result = null; + try { + __result = new CLProgram(nclLinkProgram(context.getPointer(), (device_list == null ? 0 : device_list.remaining()), MemoryUtil.getAddressSafe(device_list), APIUtil.getBufferNT(options), input_programs.remaining(), MemoryUtil.getAddress(input_programs), pfn_notify == null ? 0 : pfn_notify.getPointer(), user_data, MemoryUtil.getAddress(errcode_ret), function_pointer), context); + return __result; + } finally { + CallbackUtil.checkCallback(errcode_ret.get(errcode_ret.position()), user_data); + } + } + + public static int clUnloadPlatformCompiler(CLPlatform platform) { + long function_pointer = CLCapabilities.clUnloadPlatformCompiler; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nclUnloadPlatformCompiler(platform.getPointer(), function_pointer); + return __result; + } + static native int nclUnloadPlatformCompiler(long platform, long function_pointer); + + public static int clGetKernelArgInfo(CLKernel kernel, int arg_indx, int param_name, ByteBuffer param_value, PointerBuffer param_value_size_ret) { + long function_pointer = CLCapabilities.clGetKernelArgInfo; + BufferChecks.checkFunctionAddress(function_pointer); + if (param_value != null) + BufferChecks.checkDirect(param_value); + if (param_value_size_ret != null) + BufferChecks.checkBuffer(param_value_size_ret, 1); + int __result = nclGetKernelArgInfo(kernel.getPointer(), arg_indx, param_name, (param_value == null ? 0 : param_value.remaining()), MemoryUtil.getAddressSafe(param_value), MemoryUtil.getAddressSafe(param_value_size_ret), function_pointer); + return __result; + } + static native int nclGetKernelArgInfo(long kernel, int arg_indx, int param_name, long param_value_param_value_size, long param_value, long param_value_size_ret, long function_pointer); + + public static int clEnqueueFillBuffer(CLCommandQueue command_queue, CLMem buffer, ByteBuffer pattern, long offset, long size, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueFillBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pattern); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueFillBuffer(command_queue.getPointer(), buffer.getPointer(), MemoryUtil.getAddress(pattern), pattern.remaining(), offset, size, (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + return __result; + } + static native int nclEnqueueFillBuffer(long command_queue, long buffer, long pattern, long pattern_pattern_size, long offset, long size, int event_wait_list_num_events_in_wait_list, long event_wait_list, long event, long function_pointer); + + public static int clEnqueueFillImage(CLCommandQueue command_queue, CLMem image, ByteBuffer fill_color, PointerBuffer origin, PointerBuffer region, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueFillImage; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(fill_color, 4 * 4); + BufferChecks.checkBuffer(origin, 3); + BufferChecks.checkBuffer(region, 3); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueFillImage(command_queue.getPointer(), image.getPointer(), MemoryUtil.getAddress(fill_color), MemoryUtil.getAddress(origin), MemoryUtil.getAddress(region), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + return __result; + } + static native int nclEnqueueFillImage(long command_queue, long image, long fill_color, long origin, long region, int event_wait_list_num_events_in_wait_list, long event_wait_list, long event, long function_pointer); + + public static int clEnqueueMigrateMemObjects(CLCommandQueue command_queue, PointerBuffer mem_objects, long flags, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueMigrateMemObjects; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(mem_objects); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueMigrateMemObjects(command_queue.getPointer(), mem_objects.remaining(), MemoryUtil.getAddress(mem_objects), flags, (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + return __result; + } + static native int nclEnqueueMigrateMemObjects(long command_queue, int mem_objects_num_mem_objects, long mem_objects, long flags, int event_wait_list_num_events_in_wait_list, long event_wait_list, long event, long function_pointer); + + public static int clEnqueueMarkerWithWaitList(CLCommandQueue command_queue, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueMarkerWithWaitList; + BufferChecks.checkFunctionAddress(function_pointer); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueMarkerWithWaitList(command_queue.getPointer(), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + return __result; + } + static native int nclEnqueueMarkerWithWaitList(long command_queue, int event_wait_list_num_events_in_wait_list, long event_wait_list, long event, long function_pointer); + + public static int clEnqueueBarrierWithWaitList(CLCommandQueue command_queue, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueBarrierWithWaitList; + BufferChecks.checkFunctionAddress(function_pointer); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueBarrierWithWaitList(command_queue.getPointer(), (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + return __result; + } + static native int nclEnqueueBarrierWithWaitList(long command_queue, int event_wait_list_num_events_in_wait_list, long event_wait_list, long event, long function_pointer); + + public static int clSetPrintfCallback(CLContext context, CLPrintfCallback pfn_notify) { + long function_pointer = CLCapabilities.clSetPrintfCallback; + BufferChecks.checkFunctionAddress(function_pointer); + long user_data = CallbackUtil.createGlobalRef(pfn_notify); + int __result = 0; + try { + __result = nclSetPrintfCallback(context.getPointer(), pfn_notify.getPointer(), user_data, function_pointer); + return __result; + } finally { + context.setPrintfCallback(user_data, __result); + } + } + static native int nclSetPrintfCallback(long context, long pfn_notify, long user_data, long function_pointer); + + static CLFunctionAddress clGetExtensionFunctionAddressForPlatform(CLPlatform platform, ByteBuffer func_name) { + long function_pointer = CLCapabilities.clGetExtensionFunctionAddressForPlatform; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(func_name); + BufferChecks.checkNullTerminated(func_name); + CLFunctionAddress __result = new CLFunctionAddress(nclGetExtensionFunctionAddressForPlatform(platform.getPointer(), MemoryUtil.getAddress(func_name), function_pointer)); + return __result; + } + static native long nclGetExtensionFunctionAddressForPlatform(long platform, long func_name, long function_pointer); + + /** Overloads clGetExtensionFunctionAddressForPlatform. */ + static CLFunctionAddress clGetExtensionFunctionAddressForPlatform(CLPlatform platform, CharSequence func_name) { + long function_pointer = CLCapabilities.clGetExtensionFunctionAddressForPlatform; + BufferChecks.checkFunctionAddress(function_pointer); + CLFunctionAddress __result = new CLFunctionAddress(nclGetExtensionFunctionAddressForPlatform(platform.getPointer(), APIUtil.getBufferNT(func_name), function_pointer)); + return __result; + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/CL12GL.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/CL12GL.java new file mode 100644 index 0000000..d3d5849 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/CL12GL.java @@ -0,0 +1,29 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; + +/** + * The core OpenCL 1.2 OpenGL interrop functionality. + */ +public final class CL12GL { + + public static final int CL_GL_OBJECT_TEXTURE2D_ARRAY = 0x200E, + CL_GL_OBJECT_TEXTURE1D = 0x200F, + CL_GL_OBJECT_TEXTURE1D_ARRAY = 0x2010, + CL_GL_OBJECT_TEXTURE_BUFFER = 0x2011; + + private CL12GL() {} + + public static CLMem clCreateFromGLTexture(CLContext context, long flags, int target, int miplevel, int texture, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateFromGLTexture; + BufferChecks.checkFunctionAddress(function_pointer); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLMem __result = new CLMem(nclCreateFromGLTexture(context.getPointer(), flags, target, miplevel, texture, MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + static native long nclCreateFromGLTexture(long context, long flags, int target, int miplevel, int texture, long errcode_ret, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/CLCapabilities.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/CLCapabilities.java new file mode 100644 index 0000000..74ef390 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/CLCapabilities.java @@ -0,0 +1,362 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +public final class CLCapabilities { + + static final boolean CL_APPLE_ContextLoggingFunctions; + static final long clLogMessagesToSystemLogAPPLE = CL.getFunctionAddress("clLogMessagesToSystemLogAPPLE"); + static final long clLogMessagesToStdoutAPPLE = CL.getFunctionAddress("clLogMessagesToStdoutAPPLE"); + static final long clLogMessagesToStderrAPPLE = CL.getFunctionAddress("clLogMessagesToStderrAPPLE"); + + static final boolean CL_APPLE_SetMemObjectDestructor; + static final long clSetMemObjectDestructorAPPLE = CL.getFunctionAddress("clSetMemObjectDestructorAPPLE"); + + static final boolean CL_APPLE_gl_sharing; + static final long clGetGLContextInfoAPPLE = CL.getFunctionAddress("clGetGLContextInfoAPPLE"); + + static final boolean OpenCL10; + static final long clGetPlatformIDs = CL.getFunctionAddress("clGetPlatformIDs"); + static final long clGetPlatformInfo = CL.getFunctionAddress("clGetPlatformInfo"); + static final long clGetDeviceIDs = CL.getFunctionAddress("clGetDeviceIDs"); + static final long clGetDeviceInfo = CL.getFunctionAddress("clGetDeviceInfo"); + static final long clCreateContext = CL.getFunctionAddress("clCreateContext"); + static final long clCreateContextFromType = CL.getFunctionAddress("clCreateContextFromType"); + static final long clRetainContext = CL.getFunctionAddress("clRetainContext"); + static final long clReleaseContext = CL.getFunctionAddress("clReleaseContext"); + static final long clGetContextInfo = CL.getFunctionAddress("clGetContextInfo"); + static final long clCreateCommandQueue = CL.getFunctionAddress("clCreateCommandQueue"); + static final long clRetainCommandQueue = CL.getFunctionAddress("clRetainCommandQueue"); + static final long clReleaseCommandQueue = CL.getFunctionAddress("clReleaseCommandQueue"); + static final long clGetCommandQueueInfo = CL.getFunctionAddress("clGetCommandQueueInfo"); + static final long clCreateBuffer = CL.getFunctionAddress("clCreateBuffer"); + static final long clEnqueueReadBuffer = CL.getFunctionAddress("clEnqueueReadBuffer"); + static final long clEnqueueWriteBuffer = CL.getFunctionAddress("clEnqueueWriteBuffer"); + static final long clEnqueueCopyBuffer = CL.getFunctionAddress("clEnqueueCopyBuffer"); + static final long clEnqueueMapBuffer = CL.getFunctionAddress("clEnqueueMapBuffer"); + static final long clCreateImage2D = CL.getFunctionAddress("clCreateImage2D"); + static final long clCreateImage3D = CL.getFunctionAddress("clCreateImage3D"); + static final long clGetSupportedImageFormats = CL.getFunctionAddress("clGetSupportedImageFormats"); + static final long clEnqueueReadImage = CL.getFunctionAddress("clEnqueueReadImage"); + static final long clEnqueueWriteImage = CL.getFunctionAddress("clEnqueueWriteImage"); + static final long clEnqueueCopyImage = CL.getFunctionAddress("clEnqueueCopyImage"); + static final long clEnqueueCopyImageToBuffer = CL.getFunctionAddress("clEnqueueCopyImageToBuffer"); + static final long clEnqueueCopyBufferToImage = CL.getFunctionAddress("clEnqueueCopyBufferToImage"); + static final long clEnqueueMapImage = CL.getFunctionAddress("clEnqueueMapImage"); + static final long clGetImageInfo = CL.getFunctionAddress("clGetImageInfo"); + static final long clRetainMemObject = CL.getFunctionAddress("clRetainMemObject"); + static final long clReleaseMemObject = CL.getFunctionAddress("clReleaseMemObject"); + static final long clEnqueueUnmapMemObject = CL.getFunctionAddress("clEnqueueUnmapMemObject"); + static final long clGetMemObjectInfo = CL.getFunctionAddress("clGetMemObjectInfo"); + static final long clCreateSampler = CL.getFunctionAddress("clCreateSampler"); + static final long clRetainSampler = CL.getFunctionAddress("clRetainSampler"); + static final long clReleaseSampler = CL.getFunctionAddress("clReleaseSampler"); + static final long clGetSamplerInfo = CL.getFunctionAddress("clGetSamplerInfo"); + static final long clCreateProgramWithSource = CL.getFunctionAddress("clCreateProgramWithSource"); + static final long clCreateProgramWithBinary = CL.getFunctionAddress("clCreateProgramWithBinary"); + static final long clRetainProgram = CL.getFunctionAddress("clRetainProgram"); + static final long clReleaseProgram = CL.getFunctionAddress("clReleaseProgram"); + static final long clBuildProgram = CL.getFunctionAddress("clBuildProgram"); + static final long clUnloadCompiler = CL.getFunctionAddress("clUnloadCompiler"); + static final long clGetProgramInfo = CL.getFunctionAddress("clGetProgramInfo"); + static final long clGetProgramBuildInfo = CL.getFunctionAddress("clGetProgramBuildInfo"); + static final long clCreateKernel = CL.getFunctionAddress("clCreateKernel"); + static final long clCreateKernelsInProgram = CL.getFunctionAddress("clCreateKernelsInProgram"); + static final long clRetainKernel = CL.getFunctionAddress("clRetainKernel"); + static final long clReleaseKernel = CL.getFunctionAddress("clReleaseKernel"); + static final long clSetKernelArg = CL.getFunctionAddress("clSetKernelArg"); + static final long clGetKernelInfo = CL.getFunctionAddress("clGetKernelInfo"); + static final long clGetKernelWorkGroupInfo = CL.getFunctionAddress("clGetKernelWorkGroupInfo"); + static final long clEnqueueNDRangeKernel = CL.getFunctionAddress("clEnqueueNDRangeKernel"); + static final long clEnqueueTask = CL.getFunctionAddress("clEnqueueTask"); + static final long clEnqueueNativeKernel = CL.getFunctionAddress("clEnqueueNativeKernel"); + static final long clWaitForEvents = CL.getFunctionAddress("clWaitForEvents"); + static final long clGetEventInfo = CL.getFunctionAddress("clGetEventInfo"); + static final long clRetainEvent = CL.getFunctionAddress("clRetainEvent"); + static final long clReleaseEvent = CL.getFunctionAddress("clReleaseEvent"); + static final long clEnqueueMarker = CL.getFunctionAddress("clEnqueueMarker"); + static final long clEnqueueBarrier = CL.getFunctionAddress("clEnqueueBarrier"); + static final long clEnqueueWaitForEvents = CL.getFunctionAddress("clEnqueueWaitForEvents"); + static final long clGetEventProfilingInfo = CL.getFunctionAddress("clGetEventProfilingInfo"); + static final long clFlush = CL.getFunctionAddress("clFlush"); + static final long clFinish = CL.getFunctionAddress("clFinish"); + static final long clGetExtensionFunctionAddress = CL.getFunctionAddress("clGetExtensionFunctionAddress"); + + static final boolean OpenCL10GL; + static final long clCreateFromGLBuffer = CL.getFunctionAddress("clCreateFromGLBuffer"); + static final long clCreateFromGLTexture2D = CL.getFunctionAddress("clCreateFromGLTexture2D"); + static final long clCreateFromGLTexture3D = CL.getFunctionAddress("clCreateFromGLTexture3D"); + static final long clCreateFromGLRenderbuffer = CL.getFunctionAddress("clCreateFromGLRenderbuffer"); + static final long clGetGLObjectInfo = CL.getFunctionAddress("clGetGLObjectInfo"); + static final long clGetGLTextureInfo = CL.getFunctionAddress("clGetGLTextureInfo"); + static final long clEnqueueAcquireGLObjects = CL.getFunctionAddress("clEnqueueAcquireGLObjects"); + static final long clEnqueueReleaseGLObjects = CL.getFunctionAddress("clEnqueueReleaseGLObjects"); + + static final boolean OpenCL11; + static final long clCreateSubBuffer = CL.getFunctionAddress("clCreateSubBuffer"); + static final long clSetMemObjectDestructorCallback = CL.getFunctionAddress("clSetMemObjectDestructorCallback"); + static final long clEnqueueReadBufferRect = CL.getFunctionAddress("clEnqueueReadBufferRect"); + static final long clEnqueueWriteBufferRect = CL.getFunctionAddress("clEnqueueWriteBufferRect"); + static final long clEnqueueCopyBufferRect = CL.getFunctionAddress("clEnqueueCopyBufferRect"); + static final long clCreateUserEvent = CL.getFunctionAddress("clCreateUserEvent"); + static final long clSetUserEventStatus = CL.getFunctionAddress("clSetUserEventStatus"); + static final long clSetEventCallback = CL.getFunctionAddress("clSetEventCallback"); + + static final boolean OpenCL12; + static final long clRetainDevice = CL.getFunctionAddress("clRetainDevice"); + static final long clReleaseDevice = CL.getFunctionAddress("clReleaseDevice"); + static final long clCreateSubDevices = CL.getFunctionAddress("clCreateSubDevices"); + static final long clCreateImage = CL.getFunctionAddress("clCreateImage"); + static final long clCreateProgramWithBuiltInKernels = CL.getFunctionAddress("clCreateProgramWithBuiltInKernels"); + static final long clCompileProgram = CL.getFunctionAddress("clCompileProgram"); + static final long clLinkProgram = CL.getFunctionAddress("clLinkProgram"); + static final long clUnloadPlatformCompiler = CL.getFunctionAddress("clUnloadPlatformCompiler"); + static final long clGetKernelArgInfo = CL.getFunctionAddress("clGetKernelArgInfo"); + static final long clEnqueueFillBuffer = CL.getFunctionAddress("clEnqueueFillBuffer"); + static final long clEnqueueFillImage = CL.getFunctionAddress("clEnqueueFillImage"); + static final long clEnqueueMigrateMemObjects = CL.getFunctionAddress("clEnqueueMigrateMemObjects"); + static final long clEnqueueMarkerWithWaitList = CL.getFunctionAddress("clEnqueueMarkerWithWaitList"); + static final long clEnqueueBarrierWithWaitList = CL.getFunctionAddress("clEnqueueBarrierWithWaitList"); + static final long clSetPrintfCallback = CL.getFunctionAddress("clSetPrintfCallback"); + static final long clGetExtensionFunctionAddressForPlatform = CL.getFunctionAddress("clGetExtensionFunctionAddressForPlatform"); + + static final boolean OpenCL12GL; + static final long clCreateFromGLTexture = CL.getFunctionAddress("clCreateFromGLTexture"); + + static final boolean CL_EXT_device_fission; + static final long clRetainDeviceEXT = CL.getFunctionAddress("clRetainDeviceEXT"); + static final long clReleaseDeviceEXT = CL.getFunctionAddress("clReleaseDeviceEXT"); + static final long clCreateSubDevicesEXT = CL.getFunctionAddress("clCreateSubDevicesEXT"); + + static final boolean CL_EXT_migrate_memobject; + static final long clEnqueueMigrateMemObjectEXT = CL.getFunctionAddress("clEnqueueMigrateMemObjectEXT"); + + static final boolean CL_KHR_gl_event; + static final long clCreateEventFromGLsyncKHR = CL.getFunctionAddress("clCreateEventFromGLsyncKHR"); + + static final boolean CL_KHR_gl_sharing; + static final long clGetGLContextInfoKHR = CL.getFunctionAddress("clGetGLContextInfoKHR"); + + static final boolean CL_KHR_icd; + static final long clIcdGetPlatformIDsKHR = CL.getFunctionAddress("clIcdGetPlatformIDsKHR"); + + static final boolean CL_KHR_subgroups; + static final long clGetKernelSubGroupInfoKHR = CL.getFunctionAddress("clGetKernelSubGroupInfoKHR"); + + static final boolean CL_KHR_terminate_context; + static final long clTerminateContextKHR = CL.getFunctionAddress("clTerminateContextKHR"); + + + private CLCapabilities() {} + + static { + CL_APPLE_ContextLoggingFunctions = isAPPLE_ContextLoggingFunctionsSupported(); + CL_APPLE_SetMemObjectDestructor = isAPPLE_SetMemObjectDestructorSupported(); + CL_APPLE_gl_sharing = isAPPLE_gl_sharingSupported(); + OpenCL10 = isCL10Supported(); + OpenCL10GL = isCL10GLSupported(); + OpenCL11 = isCL11Supported(); + OpenCL12 = isCL12Supported(); + OpenCL12GL = isCL12GLSupported(); + CL_EXT_device_fission = isEXT_device_fissionSupported(); + CL_EXT_migrate_memobject = isEXT_migrate_memobjectSupported(); + CL_KHR_gl_event = isKHR_gl_eventSupported(); + CL_KHR_gl_sharing = isKHR_gl_sharingSupported(); + CL_KHR_icd = isKHR_icdSupported(); + CL_KHR_subgroups = isKHR_subgroupsSupported(); + CL_KHR_terminate_context = isKHR_terminate_contextSupported(); + } + + public static CLPlatformCapabilities getPlatformCapabilities(final CLPlatform platform) { + platform.checkValid(); + + CLPlatformCapabilities caps = (CLPlatformCapabilities)platform.getCapabilities(); + if ( caps == null ) + platform.setCapabilities(caps = new CLPlatformCapabilities(platform)); + + return caps; + } + + public static CLDeviceCapabilities getDeviceCapabilities(final CLDevice device) { + device.checkValid(); + + CLDeviceCapabilities caps = (CLDeviceCapabilities)device.getCapabilities(); + if ( caps == null ) + device.setCapabilities(caps = new CLDeviceCapabilities(device)); + + return caps; + } + + private static boolean isAPPLE_ContextLoggingFunctionsSupported() { + return + clLogMessagesToSystemLogAPPLE != 0 & + clLogMessagesToStdoutAPPLE != 0 & + clLogMessagesToStderrAPPLE != 0; + } + + private static boolean isAPPLE_SetMemObjectDestructorSupported() { + return + clSetMemObjectDestructorAPPLE != 0; + } + + private static boolean isAPPLE_gl_sharingSupported() { + return + clGetGLContextInfoAPPLE != 0; + } + + private static boolean isCL10Supported() { + return + clGetPlatformIDs != 0 & + clGetPlatformInfo != 0 & + clGetDeviceIDs != 0 & + clGetDeviceInfo != 0 & + clCreateContext != 0 & + clCreateContextFromType != 0 & + clRetainContext != 0 & + clReleaseContext != 0 & + clGetContextInfo != 0 & + clCreateCommandQueue != 0 & + clRetainCommandQueue != 0 & + clReleaseCommandQueue != 0 & + clGetCommandQueueInfo != 0 & + clCreateBuffer != 0 & + clEnqueueReadBuffer != 0 & + clEnqueueWriteBuffer != 0 & + clEnqueueCopyBuffer != 0 & + clEnqueueMapBuffer != 0 & + clCreateImage2D != 0 & + clCreateImage3D != 0 & + clGetSupportedImageFormats != 0 & + clEnqueueReadImage != 0 & + clEnqueueWriteImage != 0 & + clEnqueueCopyImage != 0 & + clEnqueueCopyImageToBuffer != 0 & + clEnqueueCopyBufferToImage != 0 & + clEnqueueMapImage != 0 & + clGetImageInfo != 0 & + clRetainMemObject != 0 & + clReleaseMemObject != 0 & + clEnqueueUnmapMemObject != 0 & + clGetMemObjectInfo != 0 & + clCreateSampler != 0 & + clRetainSampler != 0 & + clReleaseSampler != 0 & + clGetSamplerInfo != 0 & + clCreateProgramWithSource != 0 & + clCreateProgramWithBinary != 0 & + clRetainProgram != 0 & + clReleaseProgram != 0 & + clBuildProgram != 0 & + clUnloadCompiler != 0 & + clGetProgramInfo != 0 & + clGetProgramBuildInfo != 0 & + clCreateKernel != 0 & + clCreateKernelsInProgram != 0 & + clRetainKernel != 0 & + clReleaseKernel != 0 & + clSetKernelArg != 0 & + clGetKernelInfo != 0 & + clGetKernelWorkGroupInfo != 0 & + clEnqueueNDRangeKernel != 0 & + clEnqueueTask != 0 & + clEnqueueNativeKernel != 0 & + clWaitForEvents != 0 & + clGetEventInfo != 0 & + clRetainEvent != 0 & + clReleaseEvent != 0 & + clEnqueueMarker != 0 & + clEnqueueBarrier != 0 & + clEnqueueWaitForEvents != 0 & + clGetEventProfilingInfo != 0 & + clFlush != 0 & + clFinish != 0 & + clGetExtensionFunctionAddress != 0; + } + + private static boolean isCL10GLSupported() { + return + clCreateFromGLBuffer != 0 & + clCreateFromGLTexture2D != 0 & + clCreateFromGLTexture3D != 0 & + clCreateFromGLRenderbuffer != 0 & + clGetGLObjectInfo != 0 & + clGetGLTextureInfo != 0 & + clEnqueueAcquireGLObjects != 0 & + clEnqueueReleaseGLObjects != 0; + } + + private static boolean isCL11Supported() { + return + clCreateSubBuffer != 0 & + clSetMemObjectDestructorCallback != 0 & + clEnqueueReadBufferRect != 0 & + clEnqueueWriteBufferRect != 0 & + clEnqueueCopyBufferRect != 0 & + clCreateUserEvent != 0 & + clSetUserEventStatus != 0 & + clSetEventCallback != 0; + } + + private static boolean isCL12Supported() { + return + clRetainDevice != 0 & + clReleaseDevice != 0 & + clCreateSubDevices != 0 & + clCreateImage != 0 & + clCreateProgramWithBuiltInKernels != 0 & + clCompileProgram != 0 & + clLinkProgram != 0 & + clUnloadPlatformCompiler != 0 & + clGetKernelArgInfo != 0 & + clEnqueueFillBuffer != 0 & + clEnqueueFillImage != 0 & + clEnqueueMigrateMemObjects != 0 & + clEnqueueMarkerWithWaitList != 0 & + clEnqueueBarrierWithWaitList != 0 & + (clSetPrintfCallback != 0 || true) & + clGetExtensionFunctionAddressForPlatform != 0; + } + + private static boolean isCL12GLSupported() { + return + clCreateFromGLTexture != 0; + } + + private static boolean isEXT_device_fissionSupported() { + return + clRetainDeviceEXT != 0 & + clReleaseDeviceEXT != 0 & + clCreateSubDevicesEXT != 0; + } + + private static boolean isEXT_migrate_memobjectSupported() { + return + clEnqueueMigrateMemObjectEXT != 0; + } + + private static boolean isKHR_gl_eventSupported() { + return + clCreateEventFromGLsyncKHR != 0; + } + + private static boolean isKHR_gl_sharingSupported() { + return + clGetGLContextInfoKHR != 0; + } + + private static boolean isKHR_icdSupported() { + return + (clIcdGetPlatformIDsKHR != 0 || true); + } + + private static boolean isKHR_subgroupsSupported() { + return + clGetKernelSubGroupInfoKHR != 0; + } + + private static boolean isKHR_terminate_contextSupported() { + return + clTerminateContextKHR != 0; + } + +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/CLDeviceCapabilities.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/CLDeviceCapabilities.java new file mode 100644 index 0000000..173c0f9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/CLDeviceCapabilities.java @@ -0,0 +1,193 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import java.util.*; + +public class CLDeviceCapabilities { + + public final int majorVersion; + public final int minorVersion; + + public final boolean OpenCL11; + public final boolean OpenCL12; + + public final boolean CL_AMD_device_attribute_query; + public final boolean CL_AMD_device_memory_flags; + public final boolean CL_AMD_fp64; + public final boolean CL_AMD_media_ops; + public final boolean CL_AMD_media_ops2; + public final boolean CL_AMD_offline_devices; + public final boolean CL_AMD_popcnt; + public final boolean CL_AMD_printf; + public final boolean CL_AMD_vec3; + final boolean CL_APPLE_ContextLoggingFunctions; + public final boolean CL_APPLE_SetMemObjectDestructor; + public final boolean CL_APPLE_gl_sharing; + public final boolean CL_EXT_atomic_counters_32; + public final boolean CL_EXT_atomic_counters_64; + public final boolean CL_EXT_device_fission; + public final boolean CL_EXT_migrate_memobject; + public final boolean CL_INTEL_immediate_execution; + public final boolean CL_INTEL_printf; + public final boolean CL_INTEL_thread_local_exec; + public final boolean CL_KHR_3d_image_writes; + public final boolean CL_KHR_byte_addressable_store; + public final boolean CL_KHR_depth_images; + public final boolean CL_KHR_fp16; + public final boolean CL_KHR_fp64; + public final boolean CL_KHR_gl_depth_images; + public final boolean CL_KHR_gl_event; + public final boolean CL_KHR_gl_msaa_sharing; + public final boolean CL_KHR_gl_sharing; + public final boolean CL_KHR_global_int32_base_atomics; + public final boolean CL_KHR_global_int32_extended_atomics; + public final boolean CL_KHR_image2d_from_buffer; + public final boolean CL_KHR_initialize_memory; + public final boolean CL_KHR_int64_base_atomics; + public final boolean CL_KHR_int64_extended_atomics; + public final boolean CL_KHR_local_int32_base_atomics; + public final boolean CL_KHR_local_int32_extended_atomics; + public final boolean CL_KHR_mipmap_image; + public final boolean CL_KHR_mipmap_image_writes; + public final boolean CL_KHR_select_fprounding_mode; + public final boolean CL_KHR_spir; + public final boolean CL_KHR_srgb_image_writes; + public final boolean CL_KHR_subgroups; + public final boolean CL_KHR_terminate_context; + public final boolean CL_NV_compiler_options; + public final boolean CL_NV_device_attribute_query; + public final boolean CL_NV_pragma_unroll; + + public CLDeviceCapabilities(final CLDevice device) { + final String extensionList = device.getInfoString(CL10.CL_DEVICE_EXTENSIONS); + final String version = device.getInfoString(CL10.CL_DEVICE_VERSION); + if ( !version.startsWith("OpenCL ") ) + throw new RuntimeException("Invalid OpenCL version string: " + version); + + try { + final StringTokenizer tokenizer = new StringTokenizer(version.substring(7), ". "); + + majorVersion = Integer.parseInt(tokenizer.nextToken()); + minorVersion = Integer.parseInt(tokenizer.nextToken()); + + OpenCL11 = 1 < majorVersion || (1 == majorVersion && 1 <= minorVersion); + OpenCL12 = 1 < majorVersion || (1 == majorVersion && 2 <= minorVersion); + } catch (RuntimeException e) { + throw new RuntimeException("The major and/or minor OpenCL version \"" + version + "\" is malformed: " + e.getMessage()); + } + + final Set extensions = APIUtil.getExtensions(extensionList); + CL_AMD_device_attribute_query = extensions.contains("cl_amd_device_attribute_query"); + CL_AMD_device_memory_flags = extensions.contains("cl_amd_device_memory_flags"); + CL_AMD_fp64 = extensions.contains("cl_amd_fp64"); + CL_AMD_media_ops = extensions.contains("cl_amd_media_ops"); + CL_AMD_media_ops2 = extensions.contains("cl_amd_media_ops2"); + CL_AMD_offline_devices = extensions.contains("cl_amd_offline_devices"); + CL_AMD_popcnt = extensions.contains("cl_amd_popcnt"); + CL_AMD_printf = extensions.contains("cl_amd_printf"); + CL_AMD_vec3 = extensions.contains("cl_amd_vec3"); + CL_APPLE_ContextLoggingFunctions = extensions.contains("cl_apple_contextloggingfunctions") && CLCapabilities.CL_APPLE_ContextLoggingFunctions; + CL_APPLE_SetMemObjectDestructor = extensions.contains("cl_apple_setmemobjectdestructor") && CLCapabilities.CL_APPLE_SetMemObjectDestructor; + CL_APPLE_gl_sharing = extensions.contains("cl_apple_gl_sharing") && CLCapabilities.CL_APPLE_gl_sharing; + CL_EXT_atomic_counters_32 = extensions.contains("cl_ext_atomic_counters_32"); + CL_EXT_atomic_counters_64 = extensions.contains("cl_ext_atomic_counters_64"); + CL_EXT_device_fission = extensions.contains("cl_ext_device_fission") && CLCapabilities.CL_EXT_device_fission; + CL_EXT_migrate_memobject = extensions.contains("cl_ext_migrate_memobject") && CLCapabilities.CL_EXT_migrate_memobject; + CL_INTEL_immediate_execution = extensions.contains("cl_intel_immediate_execution"); + CL_INTEL_printf = extensions.contains("cl_intel_printf"); + CL_INTEL_thread_local_exec = extensions.contains("cl_intel_thread_local_exec"); + CL_KHR_3d_image_writes = extensions.contains("cl_khr_3d_image_writes"); + CL_KHR_byte_addressable_store = extensions.contains("cl_khr_byte_addressable_store"); + CL_KHR_depth_images = extensions.contains("cl_khr_depth_images"); + CL_KHR_fp16 = extensions.contains("cl_khr_fp16"); + CL_KHR_fp64 = extensions.contains("cl_khr_fp64"); + CL_KHR_gl_depth_images = extensions.contains("cl_khr_gl_depth_images"); + CL_KHR_gl_event = extensions.contains("cl_khr_gl_event") && CLCapabilities.CL_KHR_gl_event; + CL_KHR_gl_msaa_sharing = extensions.contains("cl_khr_gl_msaa_sharing"); + CL_KHR_gl_sharing = extensions.contains("cl_khr_gl_sharing") && CLCapabilities.CL_KHR_gl_sharing; + CL_KHR_global_int32_base_atomics = extensions.contains("cl_khr_global_int32_base_atomics"); + CL_KHR_global_int32_extended_atomics = extensions.contains("cl_khr_global_int32_extended_atomics"); + CL_KHR_image2d_from_buffer = extensions.contains("cl_khr_image2d_from_buffer"); + CL_KHR_initialize_memory = extensions.contains("cl_khr_initialize_memory"); + CL_KHR_int64_base_atomics = extensions.contains("cl_khr_int64_base_atomics"); + CL_KHR_int64_extended_atomics = extensions.contains("cl_khr_int64_extended_atomics"); + CL_KHR_local_int32_base_atomics = extensions.contains("cl_khr_local_int32_base_atomics"); + CL_KHR_local_int32_extended_atomics = extensions.contains("cl_khr_local_int32_extended_atomics"); + CL_KHR_mipmap_image = extensions.contains("cl_khr_mipmap_image"); + CL_KHR_mipmap_image_writes = extensions.contains("cl_khr_mipmap_image_writes"); + CL_KHR_select_fprounding_mode = extensions.contains("cl_khr_select_fprounding_mode"); + CL_KHR_spir = extensions.contains("cl_khr_spir"); + CL_KHR_srgb_image_writes = extensions.contains("cl_khr_srgb_image_writes"); + CL_KHR_subgroups = extensions.contains("cl_khr_subgroups") && CLCapabilities.CL_KHR_subgroups; + CL_KHR_terminate_context = extensions.contains("cl_khr_terminate_context") && CLCapabilities.CL_KHR_terminate_context; + CL_NV_compiler_options = extensions.contains("cl_nv_compiler_options"); + CL_NV_device_attribute_query = extensions.contains("cl_nv_device_attribute_query"); + CL_NV_pragma_unroll = extensions.contains("cl_nv_pragma_unroll"); + } + + public int getMajorVersion() { + return majorVersion; + } + + public int getMinorVersion() { + return minorVersion; + } + + public String toString() { + final StringBuilder buf = new StringBuilder(); + + buf.append("OpenCL ").append(majorVersion).append('.').append(minorVersion); + + buf.append(" - Extensions: "); + if ( CL_AMD_device_attribute_query ) buf.append("cl_amd_device_attribute_query "); + if ( CL_AMD_device_memory_flags ) buf.append("cl_amd_device_memory_flags "); + if ( CL_AMD_fp64 ) buf.append("cl_amd_fp64 "); + if ( CL_AMD_media_ops ) buf.append("cl_amd_media_ops "); + if ( CL_AMD_media_ops2 ) buf.append("cl_amd_media_ops2 "); + if ( CL_AMD_offline_devices ) buf.append("cl_amd_offline_devices "); + if ( CL_AMD_popcnt ) buf.append("cl_amd_popcnt "); + if ( CL_AMD_printf ) buf.append("cl_amd_printf "); + if ( CL_AMD_vec3 ) buf.append("cl_amd_vec3 "); + if ( CL_APPLE_ContextLoggingFunctions ) buf.append("cl_apple_contextloggingfunctions "); + if ( CL_APPLE_SetMemObjectDestructor ) buf.append("cl_apple_setmemobjectdestructor "); + if ( CL_APPLE_gl_sharing ) buf.append("cl_apple_gl_sharing "); + if ( CL_EXT_atomic_counters_32 ) buf.append("cl_ext_atomic_counters_32 "); + if ( CL_EXT_atomic_counters_64 ) buf.append("cl_ext_atomic_counters_64 "); + if ( CL_EXT_device_fission ) buf.append("cl_ext_device_fission "); + if ( CL_EXT_migrate_memobject ) buf.append("cl_ext_migrate_memobject "); + if ( CL_INTEL_immediate_execution ) buf.append("cl_intel_immediate_execution "); + if ( CL_INTEL_printf ) buf.append("cl_intel_printf "); + if ( CL_INTEL_thread_local_exec ) buf.append("cl_intel_thread_local_exec "); + if ( CL_KHR_3d_image_writes ) buf.append("cl_khr_3d_image_writes "); + if ( CL_KHR_byte_addressable_store ) buf.append("cl_khr_byte_addressable_store "); + if ( CL_KHR_depth_images ) buf.append("cl_khr_depth_images "); + if ( CL_KHR_fp16 ) buf.append("cl_khr_fp16 "); + if ( CL_KHR_fp64 ) buf.append("cl_khr_fp64 "); + if ( CL_KHR_gl_depth_images ) buf.append("cl_khr_gl_depth_images "); + if ( CL_KHR_gl_event ) buf.append("cl_khr_gl_event "); + if ( CL_KHR_gl_msaa_sharing ) buf.append("cl_khr_gl_msaa_sharing "); + if ( CL_KHR_gl_sharing ) buf.append("cl_khr_gl_sharing "); + if ( CL_KHR_global_int32_base_atomics ) buf.append("cl_khr_global_int32_base_atomics "); + if ( CL_KHR_global_int32_extended_atomics ) buf.append("cl_khr_global_int32_extended_atomics "); + if ( CL_KHR_image2d_from_buffer ) buf.append("cl_khr_image2d_from_buffer "); + if ( CL_KHR_initialize_memory ) buf.append("cl_khr_initialize_memory "); + if ( CL_KHR_int64_base_atomics ) buf.append("cl_khr_int64_base_atomics "); + if ( CL_KHR_int64_extended_atomics ) buf.append("cl_khr_int64_extended_atomics "); + if ( CL_KHR_local_int32_base_atomics ) buf.append("cl_khr_local_int32_base_atomics "); + if ( CL_KHR_local_int32_extended_atomics ) buf.append("cl_khr_local_int32_extended_atomics "); + if ( CL_KHR_mipmap_image ) buf.append("cl_khr_mipmap_image "); + if ( CL_KHR_mipmap_image_writes ) buf.append("cl_khr_mipmap_image_writes "); + if ( CL_KHR_select_fprounding_mode ) buf.append("cl_khr_select_fprounding_mode "); + if ( CL_KHR_spir ) buf.append("cl_khr_spir "); + if ( CL_KHR_srgb_image_writes ) buf.append("cl_khr_srgb_image_writes "); + if ( CL_KHR_subgroups ) buf.append("cl_khr_subgroups "); + if ( CL_KHR_terminate_context ) buf.append("cl_khr_terminate_context "); + if ( CL_NV_compiler_options ) buf.append("cl_nv_compiler_options "); + if ( CL_NV_device_attribute_query ) buf.append("cl_nv_device_attribute_query "); + if ( CL_NV_pragma_unroll ) buf.append("cl_nv_pragma_unroll "); + + return buf.toString(); + } + +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/CLPlatformCapabilities.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/CLPlatformCapabilities.java new file mode 100644 index 0000000..d6e3657 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/CLPlatformCapabilities.java @@ -0,0 +1,76 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import java.util.*; + +public class CLPlatformCapabilities { + + public final int majorVersion; + public final int minorVersion; + + public final boolean OpenCL11; + public final boolean OpenCL12; + + final boolean CL_APPLE_ContextLoggingFunctions; + public final boolean CL_APPLE_SetMemObjectDestructor; + public final boolean CL_APPLE_gl_sharing; + public final boolean CL_KHR_d3d10_sharing; + public final boolean CL_KHR_gl_event; + public final boolean CL_KHR_gl_sharing; + public final boolean CL_KHR_icd; + + public CLPlatformCapabilities(final CLPlatform platform) { + final String extensionList = platform.getInfoString(CL10.CL_PLATFORM_EXTENSIONS); + final String version = platform.getInfoString(CL10.CL_PLATFORM_VERSION); + if ( !version.startsWith("OpenCL ") ) + throw new RuntimeException("Invalid OpenCL version string: " + version); + + try { + final StringTokenizer tokenizer = new StringTokenizer(version.substring(7), ". "); + + majorVersion = Integer.parseInt(tokenizer.nextToken()); + minorVersion = Integer.parseInt(tokenizer.nextToken()); + + OpenCL11 = 1 < majorVersion || (1 == majorVersion && 1 <= minorVersion); + OpenCL12 = 1 < majorVersion || (1 == majorVersion && 2 <= minorVersion); + } catch (RuntimeException e) { + throw new RuntimeException("The major and/or minor OpenCL version \"" + version + "\" is malformed: " + e.getMessage()); + } + + final Set extensions = APIUtil.getExtensions(extensionList); + CL_APPLE_ContextLoggingFunctions = extensions.contains("cl_apple_contextloggingfunctions") && CLCapabilities.CL_APPLE_ContextLoggingFunctions; + CL_APPLE_SetMemObjectDestructor = extensions.contains("cl_apple_setmemobjectdestructor") && CLCapabilities.CL_APPLE_SetMemObjectDestructor; + CL_APPLE_gl_sharing = extensions.contains("cl_apple_gl_sharing") && CLCapabilities.CL_APPLE_gl_sharing; + CL_KHR_d3d10_sharing = extensions.contains("cl_khr_d3d10_sharing"); + CL_KHR_gl_event = extensions.contains("cl_khr_gl_event") && CLCapabilities.CL_KHR_gl_event; + CL_KHR_gl_sharing = extensions.contains("cl_khr_gl_sharing") && CLCapabilities.CL_KHR_gl_sharing; + CL_KHR_icd = extensions.contains("cl_khr_icd") && CLCapabilities.CL_KHR_icd; + } + + public int getMajorVersion() { + return majorVersion; + } + + public int getMinorVersion() { + return minorVersion; + } + + public String toString() { + final StringBuilder buf = new StringBuilder(); + + buf.append("OpenCL ").append(majorVersion).append('.').append(minorVersion); + + buf.append(" - Extensions: "); + if ( CL_APPLE_ContextLoggingFunctions ) buf.append("cl_apple_contextloggingfunctions "); + if ( CL_APPLE_SetMemObjectDestructor ) buf.append("cl_apple_setmemobjectdestructor "); + if ( CL_APPLE_gl_sharing ) buf.append("cl_apple_gl_sharing "); + if ( CL_KHR_d3d10_sharing ) buf.append("cl_khr_d3d10_sharing "); + if ( CL_KHR_gl_event ) buf.append("cl_khr_gl_event "); + if ( CL_KHR_gl_sharing ) buf.append("cl_khr_gl_sharing "); + if ( CL_KHR_icd ) buf.append("cl_khr_icd "); + + return buf.toString(); + } + +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/EXTAtomicCounters32.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/EXTAtomicCounters32.java new file mode 100644 index 0000000..ac85200 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/EXTAtomicCounters32.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTAtomicCounters32 { + + /** + * CLDevice query: Max number of atomic counters that can be used by a kernel. + */ + public static final int CL_DEVICE_MAX_ATOMIC_COUNTERS_EXT = 0x4032; + + private EXTAtomicCounters32() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/EXTAtomicCounters64.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/EXTAtomicCounters64.java new file mode 100644 index 0000000..47429e1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/EXTAtomicCounters64.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTAtomicCounters64 { + + /** + * CLDevice query: Max number of atomic counters that can be used by a kernel. + */ + public static final int CL_DEVICE_MAX_ATOMIC_COUNTERS_EXT = 0x4032; + + private EXTAtomicCounters64() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/EXTDeviceFission.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/EXTDeviceFission.java new file mode 100644 index 0000000..21914e5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/EXTDeviceFission.java @@ -0,0 +1,122 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTDeviceFission { + + /** + * Accepted as a property name in the <properties> parameter of + * clCreateSubDeviceEXT: + */ + public static final int CL_DEVICE_PARTITION_EQUALLY_EXT = 0x4050, + CL_DEVICE_PARTITION_BY_COUNTS_EXT = 0x4051, + CL_DEVICE_PARTITION_BY_NAMES_EXT = 0x4052, + CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN_EXT = 0x4053; + + /** + * Accepted as a property name, when accompanying the + * CL_DEVICE_PARITION_BY_AFFINITY_DOMAIN_EXT property, in the <properties> + * parameter of clCreateSubDeviceEXT: + */ + public static final int CL_AFFINITY_DOMAIN_L1_CACHE_EXT = 0x1, + CL_AFFINITY_DOMAIN_L2_CACHE_EXT = 0x2, + CL_AFFINITY_DOMAIN_L3_CACHE_EXT = 0x3, + CL_AFFINITY_DOMAIN_L4_CACHE_EXT = 0x4, + CL_AFFINITY_DOMAIN_NUMA_EXT = 0x10, + CL_AFFINITY_DOMAIN_NEXT_FISSIONABLE_EXT = 0x100; + + /** + * Accepted as a property being queried in the <param_name> argument of + * clGetDeviceInfo: + */ + public static final int CL_DEVICE_PARENT_DEVICE_EXT = 0x4054, + CL_DEVICE_PARITION_TYPES_EXT = 0x4055, + CL_DEVICE_AFFINITY_DOMAINS_EXT = 0x4056, + CL_DEVICE_REFERENCE_COUNT_EXT = 0x4057, + CL_DEVICE_PARTITION_STYLE_EXT = 0x4058; + + /** + * Accepted as the property list terminator in the <properties> parameter of + * clCreateSubDeviceEXT: + */ + public static final int CL_PROPERTIES_LIST_END_EXT = 0x0; + + /** + * Accepted as the partition counts list terminator in the <properties> + * parameter of clCreateSubDeviceEXT: + */ + public static final int CL_PARTITION_BY_COUNTS_LIST_END_EXT = 0x0; + + /** + * Accepted as the partition names list terminator in the <properties> + * parameter of clCreateSubDeviceEXT: + */ + public static final int CL_PARTITION_BY_NAMES_LIST_END_EXT = 0xFFFFFFFF; + + /** + * Returned by clCreateSubDevicesEXT when the indicated partition scheme is + * supported by the implementation, but the implementation can not further + * partition the device in this way. + */ + public static final int CL_DEVICE_PARTITION_FAILED_EXT = 0xFFFFFBDF; + + /** + * Returned by clCreateSubDevicesEXT when the total number of compute units + * requested exceeds CL_DEVICE_MAX_COMPUTE_UNITS, or the number of compute + * units for any one sub-device is less than 1. + */ + public static final int CL_INVALID_PARTITION_COUNT_EXT = 0xFFFFFBDE; + + /** + * Returned by clCreateSubDevicesEXT when a compute unit name appearing in a + * name list following CL_DEVICE_PARTITION_BY_NAMES_EXT is not in range. + */ + public static final int CL_INVALID_PARTITION_NAME_EXT = 0xFFFFFBDD; + + private EXTDeviceFission() {} + + public static int clRetainDeviceEXT(CLDevice device) { + long function_pointer = CLCapabilities.clRetainDeviceEXT; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nclRetainDeviceEXT(device.getPointer(), function_pointer); + if ( __result == CL10.CL_SUCCESS ) device.retain(); + return __result; + } + static native int nclRetainDeviceEXT(long device, long function_pointer); + + /** + * Warning: LWJGL will not automatically release any objects associated with sub-devices. + * The user is responsible for tracking and releasing everything prior to calling this method. + *

+ * @param device the parent CLDevice + *

+ * @return the error code + */ + public static int clReleaseDeviceEXT(CLDevice device) { + long function_pointer = CLCapabilities.clReleaseDeviceEXT; + BufferChecks.checkFunctionAddress(function_pointer); + APIUtil.releaseObjects(device); + int __result = nclReleaseDeviceEXT(device.getPointer(), function_pointer); + if ( __result == CL10.CL_SUCCESS ) device.release(); + return __result; + } + static native int nclReleaseDeviceEXT(long device, long function_pointer); + + public static int clCreateSubDevicesEXT(CLDevice in_device, LongBuffer properties, PointerBuffer out_devices, IntBuffer num_devices) { + long function_pointer = CLCapabilities.clCreateSubDevicesEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(properties); + BufferChecks.checkNullTerminated(properties); + if (out_devices != null) + BufferChecks.checkDirect(out_devices); + if (num_devices != null) + BufferChecks.checkBuffer(num_devices, 1); + int __result = nclCreateSubDevicesEXT(in_device.getPointer(), MemoryUtil.getAddress(properties), (out_devices == null ? 0 : out_devices.remaining()), MemoryUtil.getAddressSafe(out_devices), MemoryUtil.getAddressSafe(num_devices), function_pointer); + if ( __result == CL10.CL_SUCCESS && out_devices != null ) in_device.registerSubCLDevices(out_devices); + return __result; + } + static native int nclCreateSubDevicesEXT(long in_device, long properties, int out_devices_num_entries, long out_devices, long num_devices, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/EXTMigrateMemobject.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/EXTMigrateMemobject.java new file mode 100644 index 0000000..18db74c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/EXTMigrateMemobject.java @@ -0,0 +1,50 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTMigrateMemobject { + + /** + * Besides a value of zero, the following cl_mem_migration_flags_ext values are + * allowed: + */ + public static final int CL_MIGRATE_MEM_OBJECT_HOST_EXT = 0x1; + + /** + * Returned in the <param_value> parameter of the clGetEventInfo when + * <param_name> is CL_EVENT_COMMAND_TYPE: + */ + public static final int CL_COMMAND_MIGRATE_MEM_OBJECT_EXT = 0x4040; + + private EXTMigrateMemobject() {} + + public static int clEnqueueMigrateMemObjectEXT(CLCommandQueue command_queue, PointerBuffer mem_objects, long flags, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueMigrateMemObjectEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(mem_objects, 1); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueMigrateMemObjectEXT(command_queue.getPointer(), mem_objects.remaining(), MemoryUtil.getAddress(mem_objects), flags, (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL10.CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } + static native int nclEnqueueMigrateMemObjectEXT(long command_queue, int mem_objects_num_mem_objects, long mem_objects, long flags, int event_wait_list_num_events_in_wait_list, long event_wait_list, long event, long function_pointer); + + /** Overloads clEnqueueMigrateMemObjectEXT. */ + public static int clEnqueueMigrateMemObjectEXT(CLCommandQueue command_queue, CLMem mem_object, long flags, PointerBuffer event_wait_list, PointerBuffer event) { + long function_pointer = CLCapabilities.clEnqueueMigrateMemObjectEXT; + BufferChecks.checkFunctionAddress(function_pointer); + if (event_wait_list != null) + BufferChecks.checkDirect(event_wait_list); + if (event != null) + BufferChecks.checkBuffer(event, 1); + int __result = nclEnqueueMigrateMemObjectEXT(command_queue.getPointer(), 1, APIUtil.getPointer(mem_object), flags, (event_wait_list == null ? 0 : event_wait_list.remaining()), MemoryUtil.getAddressSafe(event_wait_list), MemoryUtil.getAddressSafe(event), function_pointer); + if ( __result == CL10.CL_SUCCESS ) command_queue.registerCLEvent(event); + return __result; + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/INTELImmediateExecution.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/INTELImmediateExecution.java new file mode 100644 index 0000000..cf5a769 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/INTELImmediateExecution.java @@ -0,0 +1,21 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; + +public final class INTELImmediateExecution { + + /** + * cl_command_queue_properties - bitfield + */ + public static final int CL_QUEUE_IMMEDIATE_EXECUTION_ENABLE_INTEL = 0x4; + + /** + * cl_device_exec_capabilities - bitfield + */ + public static final int CL_EXEC_IMMEDIATE_EXECUTION_INTEL = 0x4; + + private INTELImmediateExecution() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/INTELThreadLocalExec.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/INTELThreadLocalExec.java new file mode 100644 index 0000000..c663854 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/INTELThreadLocalExec.java @@ -0,0 +1,24 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; + +public final class INTELThreadLocalExec { + + /** + * Allows the user to execute OpenCL tasks and kernels with + * the user application's threads. This token that can + * be passed to clCreateCommandQueue, creating a queue with the "thread + * local exec" capability. + *

+ * All enqueue APIs (e.g., clEnqueueRead) submitted to such a queue + * never enqueue commands. An Enqueue API call is executed by the + * caller host-thread itself without involving any of the OpenCL + * runtime threads, much like function calls. + */ + public static final int CL_QUEUE_THREAD_LOCAL_EXEC_ENABLE_INTEL = 0x80000000; + + private INTELThreadLocalExec() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRDepthImages.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRDepthImages.java new file mode 100644 index 0000000..806033a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRDepthImages.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; + +public final class KHRDepthImages { + + /** + * cl_channel_order + */ + public static final int CL_DEPTH = 0x10BD; + + private KHRDepthImages() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRFp16.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRFp16.java new file mode 100644 index 0000000..3af2ef8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRFp16.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; + +public final class KHRFp16 { + + /** + * cl_device_info + */ + public static final int CL_DEVICE_HALF_FP_CONFIG = 0x1033; + + private KHRFp16() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRFp64.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRFp64.java new file mode 100644 index 0000000..a40751a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRFp64.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; + +public final class KHRFp64 { + + /** + * cl_device_info + */ + public static final int CL_DEVICE_DOUBLE_FP_CONFIG = 0x1032; + + private KHRFp64() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRGLDepthImages.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRGLDepthImages.java new file mode 100644 index 0000000..7e611c1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRGLDepthImages.java @@ -0,0 +1,21 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; + +public final class KHRGLDepthImages { + + /** + * cl_channel_order + */ + public static final int CL_DEPTH_STENCIL = 0x10BE; + + /** + * cl_channel_type + */ + public static final int CL_UNORM_INT24 = 0x10DF; + + private KHRGLDepthImages() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRGLEvent.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRGLEvent.java new file mode 100644 index 0000000..cd0873f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRGLEvent.java @@ -0,0 +1,27 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; +import org.lwjgl.opengl.GLSync; + +public final class KHRGLEvent { + + /** + * Returned by clGetEventInfo when param_name is CL_EVENT_COMMAND_TYPE: + */ + public static final int CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR = 0x200D; + + private KHRGLEvent() {} + + public static CLEvent clCreateEventFromGLsyncKHR(CLContext context, GLSync sync, IntBuffer errcode_ret) { + long function_pointer = CLCapabilities.clCreateEventFromGLsyncKHR; + BufferChecks.checkFunctionAddress(function_pointer); + if (errcode_ret != null) + BufferChecks.checkBuffer(errcode_ret, 1); + CLEvent __result = new CLEvent(nclCreateEventFromGLsyncKHR(context.getPointer(), sync.getPointer(), MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + return __result; + } + static native long nclCreateEventFromGLsyncKHR(long context, long sync, long errcode_ret, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRGLMsaaSharing.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRGLMsaaSharing.java new file mode 100644 index 0000000..b3f62c8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRGLMsaaSharing.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; + +public final class KHRGLMsaaSharing { + + /** + * cl_gl_texture_info + */ + public static final int CL_GL_NUM_SAMPLES = 0x2012; + + private KHRGLMsaaSharing() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRGLSharing.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRGLSharing.java new file mode 100644 index 0000000..46881e7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRGLSharing.java @@ -0,0 +1,50 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; + +public final class KHRGLSharing { + + /** + * Returned by clCreateContext, clCreateContextFromType, and + * clGetGLContextInfoKHR when an invalid OpenGL context or share group + * object handle is specified in <properties>: + */ + public static final int CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR = 0xFFFFFC18; + + /** + * Accepted as the <param_name> argument of clGetGLContextInfoKHR: + */ + public static final int CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR = 0x2006, + CL_DEVICES_FOR_GL_CONTEXT_KHR = 0x2007; + + /** + * Accepted as an attribute name in the 'properties' argument of + * clCreateContext and clCreateContextFromType: + */ + public static final int CL_GL_CONTEXT_KHR = 0x2008, + CL_EGL_DISPLAY_KHR = 0x2009, + CL_GLX_DISPLAY_KHR = 0x200A, + CL_WGL_HDC_KHR = 0x200B, + CL_CGL_SHAREGROUP_KHR = 0x200C; + + private KHRGLSharing() {} + + public static int clGetGLContextInfoKHR(PointerBuffer properties, int param_name, ByteBuffer param_value, PointerBuffer param_value_size_ret) { + long function_pointer = CLCapabilities.clGetGLContextInfoKHR; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(properties); + BufferChecks.checkNullTerminated(properties); + if (param_value != null) + BufferChecks.checkDirect(param_value); + if (param_value_size_ret != null) + BufferChecks.checkBuffer(param_value_size_ret, 1); + if ( param_value_size_ret == null && APIUtil.isDevicesParam(param_name) ) param_value_size_ret = APIUtil.getBufferPointer(); + int __result = nclGetGLContextInfoKHR(MemoryUtil.getAddress(properties), param_name, (param_value == null ? 0 : param_value.remaining()), MemoryUtil.getAddressSafe(param_value), MemoryUtil.getAddressSafe(param_value_size_ret), function_pointer); + if ( __result == CL10.CL_SUCCESS && param_value != null && APIUtil.isDevicesParam(param_name) ) APIUtil.getCLPlatform(properties).registerCLDevices(param_value, param_value_size_ret); + return __result; + } + static native int nclGetGLContextInfoKHR(long properties, int param_name, long param_value_param_value_size, long param_value, long param_value_size_ret, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRICD.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRICD.java new file mode 100644 index 0000000..c726a41 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRICD.java @@ -0,0 +1,33 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; + +public final class KHRICD { + + /** + * Accepted as <param_name> to the function clGetPlatformInfo + */ + public static final int CL_PLATFORM_ICD_SUFFIX_KHR = 0x920; + + /** + * Returned by clGetPlatformIDs when no platforms are found + */ + public static final int CL_PLATFORM_NOT_FOUND_KHR = 0xFFFFFC17; + + private KHRICD() {} + + public static int clIcdGetPlatformIDsKHR(PointerBuffer platforms, IntBuffer num_platforms) { + long function_pointer = CLCapabilities.clIcdGetPlatformIDsKHR; + BufferChecks.checkFunctionAddress(function_pointer); + if (platforms != null) + BufferChecks.checkDirect(platforms); + if (num_platforms != null) + BufferChecks.checkBuffer(num_platforms, 1); + int __result = nclIcdGetPlatformIDsKHR((platforms == null ? 0 : platforms.remaining()), MemoryUtil.getAddressSafe(platforms), MemoryUtil.getAddressSafe(num_platforms), function_pointer); + return __result; + } + static native int nclIcdGetPlatformIDsKHR(int platforms_num_entries, long platforms, long num_platforms, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRImage2DFromBuffer.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRImage2DFromBuffer.java new file mode 100644 index 0000000..9776b5e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRImage2DFromBuffer.java @@ -0,0 +1,17 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; + +public final class KHRImage2DFromBuffer { + + /** + * cl_device_info + */ + public static final int CL_DEVICE_IMAGE_PITCH_ALIGNMENT = 0x104A, + CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT = 0x104B; + + private KHRImage2DFromBuffer() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRInitializeMemory.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRInitializeMemory.java new file mode 100644 index 0000000..c9512fd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRInitializeMemory.java @@ -0,0 +1,21 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; + +public final class KHRInitializeMemory { + + /** + * cl_context_properties + */ + public static final int CL_CONTEXT_MEMORY_INITIALIZE_KHR = 0x200E; + + /** + */ + public static final int CL_CONTEXT_MEMORY_INITIALIZE_LOCAL_KHR = 0x1, + CL_CONTEXT_MEMORY_INITIALIZE_PRIVATE_KHR = 0x2; + + private KHRInitializeMemory() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRSubgroups.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRSubgroups.java new file mode 100644 index 0000000..9789738 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRSubgroups.java @@ -0,0 +1,25 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; + +public final class KHRSubgroups { + + private KHRSubgroups() {} + + public static int clGetKernelSubGroupInfoKHR(CLKernel kernel, CLDevice device, int param_name, ByteBuffer input_value, ByteBuffer param_value, PointerBuffer param_value_size_ret) { + long function_pointer = CLCapabilities.clGetKernelSubGroupInfoKHR; + BufferChecks.checkFunctionAddress(function_pointer); + if (input_value != null) + BufferChecks.checkDirect(input_value); + if (param_value != null) + BufferChecks.checkDirect(param_value); + if (param_value_size_ret != null) + BufferChecks.checkBuffer(param_value_size_ret, 1); + int __result = nclGetKernelSubGroupInfoKHR(kernel.getPointer(), device == null ? 0 : device.getPointer(), param_name, (input_value == null ? 0 : input_value.remaining()), MemoryUtil.getAddressSafe(input_value), (param_value == null ? 0 : param_value.remaining()), MemoryUtil.getAddressSafe(param_value), MemoryUtil.getAddressSafe(param_value_size_ret), function_pointer); + return __result; + } + static native int nclGetKernelSubGroupInfoKHR(long kernel, long device, int param_name, long input_value_input_value_size, long input_value, long param_value_param_value_size, long param_value, long param_value_size_ret, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRTerminateContext.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRTerminateContext.java new file mode 100644 index 0000000..696afec --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/KHRTerminateContext.java @@ -0,0 +1,22 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; + +public final class KHRTerminateContext { + + public static final int CL_DEVICE_TERMINATE_CAPABILITY_KHR = 0x200F, + CL_CONTEXT_TERMINATE_KHR = 0x2010; + + private KHRTerminateContext() {} + + public static int clTerminateContextKHR(CLContext context) { + long function_pointer = CLCapabilities.clTerminateContextKHR; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nclTerminateContextKHR(context.getPointer(), function_pointer); + return __result; + } + static native int nclTerminateContextKHR(long context, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/NVDeviceAttributeQuery.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/NVDeviceAttributeQuery.java new file mode 100644 index 0000000..f5f702a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opencl/NVDeviceAttributeQuery.java @@ -0,0 +1,22 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opencl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVDeviceAttributeQuery { + + /** + * Accepted as the <param_name> parameter of clGetDeviceInfo. + */ + public static final int CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV = 0x4000, + CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV = 0x4001, + CL_DEVICE_REGISTERS_PER_BLOCK_NV = 0x4002, + CL_DEVICE_WARP_SIZE_NV = 0x4003, + CL_DEVICE_GPU_OVERLAP_NV = 0x4004, + CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV = 0x4005, + CL_DEVICE_INTEGRATED_MEMORY_NV = 0x4006; + + private NVDeviceAttributeQuery() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDBlendMinmaxFactor.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDBlendMinmaxFactor.java new file mode 100644 index 0000000..399734f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDBlendMinmaxFactor.java @@ -0,0 +1,19 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class AMDBlendMinmaxFactor { + + /** + * Accepted by the <mode> parameter of BlendEquation and BlendEquationi, and by + * the <modeRGB> and <modeAlpha> parameters of BlendEquationSeparate and + * BlendEquationSeparatei: + */ + public static final int GL_FACTOR_MIN_AMD = 0x901C, + GL_FACTOR_MAX_AMD = 0x901D; + + private AMDBlendMinmaxFactor() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDDebugOutput.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDDebugOutput.java new file mode 100644 index 0000000..1f79355 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDDebugOutput.java @@ -0,0 +1,103 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class AMDDebugOutput { + + /** + * Tokens accepted by GetIntegerv: + */ + public static final int GL_MAX_DEBUG_MESSAGE_LENGTH_AMD = 0x9143, + GL_MAX_DEBUG_LOGGED_MESSAGES_AMD = 0x9144, + GL_DEBUG_LOGGED_MESSAGES_AMD = 0x9145; + + /** + * Tokens accepted by DebugMessageEnableAMD, GetDebugMessageLogAMD, + * DebugMessageInsertAMD, and DEBUGPROCAMD callback function + * for <severity>: + */ + public static final int GL_DEBUG_SEVERITY_HIGH_AMD = 0x9146, + GL_DEBUG_SEVERITY_MEDIUM_AMD = 0x9147, + GL_DEBUG_SEVERITY_LOW_AMD = 0x9148; + + /** + * Tokens accepted by DebugMessageEnableAMD, GetDebugMessageLogAMD, + * and DEBUGPROCAMD callback function for <category>: + */ + public static final int GL_DEBUG_CATEGORY_API_ERROR_AMD = 0x9149, + GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD = 0x914A, + GL_DEBUG_CATEGORY_DEPRECATION_AMD = 0x914B, + GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD = 0x914C, + GL_DEBUG_CATEGORY_PERFORMANCE_AMD = 0x914D, + GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD = 0x914E, + GL_DEBUG_CATEGORY_APPLICATION_AMD = 0x914F, + GL_DEBUG_CATEGORY_OTHER_AMD = 0x9150; + + private AMDDebugOutput() {} + + public static void glDebugMessageEnableAMD(int category, int severity, IntBuffer ids, boolean enabled) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDebugMessageEnableAMD; + BufferChecks.checkFunctionAddress(function_pointer); + if (ids != null) + BufferChecks.checkDirect(ids); + nglDebugMessageEnableAMD(category, severity, (ids == null ? 0 : ids.remaining()), MemoryUtil.getAddressSafe(ids), enabled, function_pointer); + } + static native void nglDebugMessageEnableAMD(int category, int severity, int ids_count, long ids, boolean enabled, long function_pointer); + + public static void glDebugMessageInsertAMD(int category, int severity, int id, ByteBuffer buf) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDebugMessageInsertAMD; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(buf); + nglDebugMessageInsertAMD(category, severity, id, buf.remaining(), MemoryUtil.getAddress(buf), function_pointer); + } + static native void nglDebugMessageInsertAMD(int category, int severity, int id, int buf_length, long buf, long function_pointer); + + /** Overloads glDebugMessageInsertAMD. */ + public static void glDebugMessageInsertAMD(int category, int severity, int id, CharSequence buf) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDebugMessageInsertAMD; + BufferChecks.checkFunctionAddress(function_pointer); + nglDebugMessageInsertAMD(category, severity, id, buf.length(), APIUtil.getBuffer(caps, buf), function_pointer); + } + + /** + * The {@code AMDDebugOutputCallback.Handler} implementation passed to this method will be used for + * AMD_debug_output messages. If callback is null, any previously registered handler for the current + * thread will be unregistered and stop receiving messages. + *

+ * @param callback the callback function to use + */ + public static void glDebugMessageCallbackAMD(AMDDebugOutputCallback callback) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDebugMessageCallbackAMD; + BufferChecks.checkFunctionAddress(function_pointer); + long userParam = callback == null ? 0 : CallbackUtil.createGlobalRef(callback.getHandler()); + CallbackUtil.registerContextCallbackAMD(userParam); + nglDebugMessageCallbackAMD(callback == null ? 0 : callback.getPointer(), userParam, function_pointer); + } + static native void nglDebugMessageCallbackAMD(long callback, long userParam, long function_pointer); + + public static int glGetDebugMessageLogAMD(int count, IntBuffer categories, IntBuffer severities, IntBuffer ids, IntBuffer lengths, ByteBuffer messageLog) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetDebugMessageLogAMD; + BufferChecks.checkFunctionAddress(function_pointer); + if (categories != null) + BufferChecks.checkBuffer(categories, count); + if (severities != null) + BufferChecks.checkBuffer(severities, count); + if (ids != null) + BufferChecks.checkBuffer(ids, count); + if (lengths != null) + BufferChecks.checkBuffer(lengths, count); + if (messageLog != null) + BufferChecks.checkDirect(messageLog); + int __result = nglGetDebugMessageLogAMD(count, (messageLog == null ? 0 : messageLog.remaining()), MemoryUtil.getAddressSafe(categories), MemoryUtil.getAddressSafe(severities), MemoryUtil.getAddressSafe(ids), MemoryUtil.getAddressSafe(lengths), MemoryUtil.getAddressSafe(messageLog), function_pointer); + return __result; + } + static native int nglGetDebugMessageLogAMD(int count, int messageLog_logSize, long categories, long severities, long ids, long lengths, long messageLog, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDDepthClampSeparate.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDDepthClampSeparate.java new file mode 100644 index 0000000..9517223 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDDepthClampSeparate.java @@ -0,0 +1,19 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class AMDDepthClampSeparate { + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_DEPTH_CLAMP_NEAR_AMD = 0x901E, + GL_DEPTH_CLAMP_FAR_AMD = 0x901F; + + private AMDDepthClampSeparate() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDDrawBuffersBlend.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDDrawBuffersBlend.java new file mode 100644 index 0000000..8670e51 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDDrawBuffersBlend.java @@ -0,0 +1,43 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class AMDDrawBuffersBlend { + + private AMDDrawBuffersBlend() {} + + public static void glBlendFuncIndexedAMD(int buf, int src, int dst) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBlendFuncIndexedAMD; + BufferChecks.checkFunctionAddress(function_pointer); + nglBlendFuncIndexedAMD(buf, src, dst, function_pointer); + } + static native void nglBlendFuncIndexedAMD(int buf, int src, int dst, long function_pointer); + + public static void glBlendFuncSeparateIndexedAMD(int buf, int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBlendFuncSeparateIndexedAMD; + BufferChecks.checkFunctionAddress(function_pointer); + nglBlendFuncSeparateIndexedAMD(buf, srcRGB, dstRGB, srcAlpha, dstAlpha, function_pointer); + } + static native void nglBlendFuncSeparateIndexedAMD(int buf, int srcRGB, int dstRGB, int srcAlpha, int dstAlpha, long function_pointer); + + public static void glBlendEquationIndexedAMD(int buf, int mode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBlendEquationIndexedAMD; + BufferChecks.checkFunctionAddress(function_pointer); + nglBlendEquationIndexedAMD(buf, mode, function_pointer); + } + static native void nglBlendEquationIndexedAMD(int buf, int mode, long function_pointer); + + public static void glBlendEquationSeparateIndexedAMD(int buf, int modeRGB, int modeAlpha) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBlendEquationSeparateIndexedAMD; + BufferChecks.checkFunctionAddress(function_pointer); + nglBlendEquationSeparateIndexedAMD(buf, modeRGB, modeAlpha, function_pointer); + } + static native void nglBlendEquationSeparateIndexedAMD(int buf, int modeRGB, int modeAlpha, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDInterleavedElements.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDInterleavedElements.java new file mode 100644 index 0000000..a857076 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDInterleavedElements.java @@ -0,0 +1,30 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class AMDInterleavedElements { + + /** + * Accepted by the <pname> parameter of VertexAttribParameteriAMD and + * GetVertexAttrib{iv|dv|fv|Iiv|Iuiv|Ldv}: + */ + public static final int GL_VERTEX_ELEMENT_SWIZZLE_AMD = 0x91A4; + + /** + * Selected by the <pname> parameter of ProgramParameteri and GetProgramiv: + */ + public static final int GL_VERTEX_ID_SWIZZLE_AMD = 0x91A5; + + private AMDInterleavedElements() {} + + public static void glVertexAttribParameteriAMD(int index, int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribParameteriAMD; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribParameteriAMD(index, pname, param, function_pointer); + } + static native void nglVertexAttribParameteriAMD(int index, int pname, int param, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDMultiDrawIndirect.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDMultiDrawIndirect.java new file mode 100644 index 0000000..db30bf1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDMultiDrawIndirect.java @@ -0,0 +1,67 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class AMDMultiDrawIndirect { + + private AMDMultiDrawIndirect() {} + + public static void glMultiDrawArraysIndirectAMD(int mode, ByteBuffer indirect, int primcount, int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiDrawArraysIndirectAMD; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureIndirectBOdisabled(caps); + BufferChecks.checkBuffer(indirect, (stride == 0 ? 4 * 4 : stride) * primcount); + nglMultiDrawArraysIndirectAMD(mode, MemoryUtil.getAddress(indirect), primcount, stride, function_pointer); + } + static native void nglMultiDrawArraysIndirectAMD(int mode, long indirect, int primcount, int stride, long function_pointer); + public static void glMultiDrawArraysIndirectAMD(int mode, long indirect_buffer_offset, int primcount, int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiDrawArraysIndirectAMD; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureIndirectBOenabled(caps); + nglMultiDrawArraysIndirectAMDBO(mode, indirect_buffer_offset, primcount, stride, function_pointer); + } + static native void nglMultiDrawArraysIndirectAMDBO(int mode, long indirect_buffer_offset, int primcount, int stride, long function_pointer); + + /** Overloads glMultiDrawArraysIndirectAMD. */ + public static void glMultiDrawArraysIndirectAMD(int mode, IntBuffer indirect, int primcount, int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiDrawArraysIndirectAMD; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureIndirectBOdisabled(caps); + BufferChecks.checkBuffer(indirect, (stride == 0 ? 4 : stride >> 2) * primcount); + nglMultiDrawArraysIndirectAMD(mode, MemoryUtil.getAddress(indirect), primcount, stride, function_pointer); + } + + public static void glMultiDrawElementsIndirectAMD(int mode, int type, ByteBuffer indirect, int primcount, int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiDrawElementsIndirectAMD; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureIndirectBOdisabled(caps); + BufferChecks.checkBuffer(indirect, (stride == 0 ? 5 * 4 : stride) * primcount); + nglMultiDrawElementsIndirectAMD(mode, type, MemoryUtil.getAddress(indirect), primcount, stride, function_pointer); + } + static native void nglMultiDrawElementsIndirectAMD(int mode, int type, long indirect, int primcount, int stride, long function_pointer); + public static void glMultiDrawElementsIndirectAMD(int mode, int type, long indirect_buffer_offset, int primcount, int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiDrawElementsIndirectAMD; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureIndirectBOenabled(caps); + nglMultiDrawElementsIndirectAMDBO(mode, type, indirect_buffer_offset, primcount, stride, function_pointer); + } + static native void nglMultiDrawElementsIndirectAMDBO(int mode, int type, long indirect_buffer_offset, int primcount, int stride, long function_pointer); + + /** Overloads glMultiDrawElementsIndirectAMD. */ + public static void glMultiDrawElementsIndirectAMD(int mode, int type, IntBuffer indirect, int primcount, int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiDrawElementsIndirectAMD; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureIndirectBOdisabled(caps); + BufferChecks.checkBuffer(indirect, (stride == 0 ? 5 : stride >> 2) * primcount); + nglMultiDrawElementsIndirectAMD(mode, type, MemoryUtil.getAddress(indirect), primcount, stride, function_pointer); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDNameGenDelete.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDNameGenDelete.java new file mode 100644 index 0000000..26119a0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDNameGenDelete.java @@ -0,0 +1,65 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class AMDNameGenDelete { + + /** + * Accepted as the <identifier> parameter of GenNamesAMD and DeleteNamesAMD: + */ + public static final int GL_DATA_BUFFER_AMD = 0x9151, + GL_PERFORMANCE_MONITOR_AMD = 0x9152, + GL_QUERY_OBJECT_AMD = 0x9153, + GL_VERTEX_ARRAY_OBJECT_AMD = 0x9154, + GL_SAMPLER_OBJECT_AMD = 0x9155; + + private AMDNameGenDelete() {} + + public static void glGenNamesAMD(int identifier, IntBuffer names) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenNamesAMD; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(names); + nglGenNamesAMD(identifier, names.remaining(), MemoryUtil.getAddress(names), function_pointer); + } + static native void nglGenNamesAMD(int identifier, int names_num, long names, long function_pointer); + + /** Overloads glGenNamesAMD. */ + public static int glGenNamesAMD(int identifier) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenNamesAMD; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer names = APIUtil.getBufferInt(caps); + nglGenNamesAMD(identifier, 1, MemoryUtil.getAddress(names), function_pointer); + return names.get(0); + } + + public static void glDeleteNamesAMD(int identifier, IntBuffer names) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteNamesAMD; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(names); + nglDeleteNamesAMD(identifier, names.remaining(), MemoryUtil.getAddress(names), function_pointer); + } + static native void nglDeleteNamesAMD(int identifier, int names_num, long names, long function_pointer); + + /** Overloads glDeleteNamesAMD. */ + public static void glDeleteNamesAMD(int identifier, int name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteNamesAMD; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeleteNamesAMD(identifier, 1, APIUtil.getInt(caps, name), function_pointer); + } + + public static boolean glIsNameAMD(int identifier, int name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsNameAMD; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsNameAMD(identifier, name, function_pointer); + return __result; + } + static native boolean nglIsNameAMD(int identifier, int name, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDPerformanceMonitor.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDPerformanceMonitor.java new file mode 100644 index 0000000..1263ce6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDPerformanceMonitor.java @@ -0,0 +1,201 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class AMDPerformanceMonitor { + + /** + * Accepted by the <pame> parameter of GetPerfMonitorCounterInfoAMD + */ + public static final int GL_COUNTER_TYPE_AMD = 0x8BC0, + GL_COUNTER_RANGE_AMD = 0x8BC1; + + /** + * Returned as a valid value in <data> parameter of + * GetPerfMonitorCounterInfoAMD if <pname> = COUNTER_TYPE_AMD + */ + public static final int GL_UNSIGNED_INT64_AMD = 0x8BC2, + GL_PERCENTAGE_AMD = 0x8BC3; + + /** + * Accepted by the <pname> parameter of GetPerfMonitorCounterDataAMD + */ + public static final int GL_PERFMON_RESULT_AVAILABLE_AMD = 0x8BC4, + GL_PERFMON_RESULT_SIZE_AMD = 0x8BC5, + GL_PERFMON_RESULT_AMD = 0x8BC6; + + private AMDPerformanceMonitor() {} + + public static void glGetPerfMonitorGroupsAMD(IntBuffer numGroups, IntBuffer groups) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPerfMonitorGroupsAMD; + BufferChecks.checkFunctionAddress(function_pointer); + if (numGroups != null) + BufferChecks.checkBuffer(numGroups, 1); + BufferChecks.checkDirect(groups); + nglGetPerfMonitorGroupsAMD(MemoryUtil.getAddressSafe(numGroups), groups.remaining(), MemoryUtil.getAddress(groups), function_pointer); + } + static native void nglGetPerfMonitorGroupsAMD(long numGroups, int groups_groupsSize, long groups, long function_pointer); + + public static void glGetPerfMonitorCountersAMD(int group, IntBuffer numCounters, IntBuffer maxActiveCounters, IntBuffer counters) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPerfMonitorCountersAMD; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(numCounters, 1); + BufferChecks.checkBuffer(maxActiveCounters, 1); + if (counters != null) + BufferChecks.checkDirect(counters); + nglGetPerfMonitorCountersAMD(group, MemoryUtil.getAddress(numCounters), MemoryUtil.getAddress(maxActiveCounters), (counters == null ? 0 : counters.remaining()), MemoryUtil.getAddressSafe(counters), function_pointer); + } + static native void nglGetPerfMonitorCountersAMD(int group, long numCounters, long maxActiveCounters, int counters_countersSize, long counters, long function_pointer); + + public static void glGetPerfMonitorGroupStringAMD(int group, IntBuffer length, ByteBuffer groupString) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPerfMonitorGroupStringAMD; + BufferChecks.checkFunctionAddress(function_pointer); + if (length != null) + BufferChecks.checkBuffer(length, 1); + if (groupString != null) + BufferChecks.checkDirect(groupString); + nglGetPerfMonitorGroupStringAMD(group, (groupString == null ? 0 : groupString.remaining()), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddressSafe(groupString), function_pointer); + } + static native void nglGetPerfMonitorGroupStringAMD(int group, int groupString_bufSize, long length, long groupString, long function_pointer); + + /** Overloads glGetPerfMonitorGroupStringAMD. */ + public static String glGetPerfMonitorGroupStringAMD(int group, int bufSize) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPerfMonitorGroupStringAMD; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer groupString_length = APIUtil.getLengths(caps); + ByteBuffer groupString = APIUtil.getBufferByte(caps, bufSize); + nglGetPerfMonitorGroupStringAMD(group, bufSize, MemoryUtil.getAddress0(groupString_length), MemoryUtil.getAddress(groupString), function_pointer); + groupString.limit(groupString_length.get(0)); + return APIUtil.getString(caps, groupString); + } + + public static void glGetPerfMonitorCounterStringAMD(int group, int counter, IntBuffer length, ByteBuffer counterString) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPerfMonitorCounterStringAMD; + BufferChecks.checkFunctionAddress(function_pointer); + if (length != null) + BufferChecks.checkBuffer(length, 1); + if (counterString != null) + BufferChecks.checkDirect(counterString); + nglGetPerfMonitorCounterStringAMD(group, counter, (counterString == null ? 0 : counterString.remaining()), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddressSafe(counterString), function_pointer); + } + static native void nglGetPerfMonitorCounterStringAMD(int group, int counter, int counterString_bufSize, long length, long counterString, long function_pointer); + + /** Overloads glGetPerfMonitorCounterStringAMD. */ + public static String glGetPerfMonitorCounterStringAMD(int group, int counter, int bufSize) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPerfMonitorCounterStringAMD; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer counterString_length = APIUtil.getLengths(caps); + ByteBuffer counterString = APIUtil.getBufferByte(caps, bufSize); + nglGetPerfMonitorCounterStringAMD(group, counter, bufSize, MemoryUtil.getAddress0(counterString_length), MemoryUtil.getAddress(counterString), function_pointer); + counterString.limit(counterString_length.get(0)); + return APIUtil.getString(caps, counterString); + } + + public static void glGetPerfMonitorCounterInfoAMD(int group, int counter, int pname, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPerfMonitorCounterInfoAMD; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(data, 16); + nglGetPerfMonitorCounterInfoAMD(group, counter, pname, MemoryUtil.getAddress(data), function_pointer); + } + static native void nglGetPerfMonitorCounterInfoAMD(int group, int counter, int pname, long data, long function_pointer); + + public static void glGenPerfMonitorsAMD(IntBuffer monitors) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenPerfMonitorsAMD; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(monitors); + nglGenPerfMonitorsAMD(monitors.remaining(), MemoryUtil.getAddress(monitors), function_pointer); + } + static native void nglGenPerfMonitorsAMD(int monitors_n, long monitors, long function_pointer); + + /** Overloads glGenPerfMonitorsAMD. */ + public static int glGenPerfMonitorsAMD() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenPerfMonitorsAMD; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer monitors = APIUtil.getBufferInt(caps); + nglGenPerfMonitorsAMD(1, MemoryUtil.getAddress(monitors), function_pointer); + return monitors.get(0); + } + + public static void glDeletePerfMonitorsAMD(IntBuffer monitors) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeletePerfMonitorsAMD; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(monitors); + nglDeletePerfMonitorsAMD(monitors.remaining(), MemoryUtil.getAddress(monitors), function_pointer); + } + static native void nglDeletePerfMonitorsAMD(int monitors_n, long monitors, long function_pointer); + + /** Overloads glDeletePerfMonitorsAMD. */ + public static void glDeletePerfMonitorsAMD(int monitor) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeletePerfMonitorsAMD; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeletePerfMonitorsAMD(1, APIUtil.getInt(caps, monitor), function_pointer); + } + + public static void glSelectPerfMonitorCountersAMD(int monitor, boolean enable, int group, IntBuffer counterList) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSelectPerfMonitorCountersAMD; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(counterList); + nglSelectPerfMonitorCountersAMD(monitor, enable, group, counterList.remaining(), MemoryUtil.getAddress(counterList), function_pointer); + } + static native void nglSelectPerfMonitorCountersAMD(int monitor, boolean enable, int group, int counterList_numCounters, long counterList, long function_pointer); + + /** Overloads glSelectPerfMonitorCountersAMD. */ + public static void glSelectPerfMonitorCountersAMD(int monitor, boolean enable, int group, int counter) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSelectPerfMonitorCountersAMD; + BufferChecks.checkFunctionAddress(function_pointer); + nglSelectPerfMonitorCountersAMD(monitor, enable, group, 1, APIUtil.getInt(caps, counter), function_pointer); + } + + public static void glBeginPerfMonitorAMD(int monitor) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBeginPerfMonitorAMD; + BufferChecks.checkFunctionAddress(function_pointer); + nglBeginPerfMonitorAMD(monitor, function_pointer); + } + static native void nglBeginPerfMonitorAMD(int monitor, long function_pointer); + + public static void glEndPerfMonitorAMD(int monitor) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEndPerfMonitorAMD; + BufferChecks.checkFunctionAddress(function_pointer); + nglEndPerfMonitorAMD(monitor, function_pointer); + } + static native void nglEndPerfMonitorAMD(int monitor, long function_pointer); + + public static void glGetPerfMonitorCounterDataAMD(int monitor, int pname, IntBuffer data, IntBuffer bytesWritten) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPerfMonitorCounterDataAMD; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + if (bytesWritten != null) + BufferChecks.checkBuffer(bytesWritten, 1); + nglGetPerfMonitorCounterDataAMD(monitor, pname, data.remaining(), MemoryUtil.getAddress(data), MemoryUtil.getAddressSafe(bytesWritten), function_pointer); + } + static native void nglGetPerfMonitorCounterDataAMD(int monitor, int pname, int data_dataSize, long data, long bytesWritten, long function_pointer); + + /** Overloads glGetPerfMonitorCounterDataAMD. */ + public static int glGetPerfMonitorCounterDataAMD(int monitor, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPerfMonitorCounterDataAMD; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer data = APIUtil.getBufferInt(caps); + nglGetPerfMonitorCounterDataAMD(monitor, pname, 4, MemoryUtil.getAddress(data), 0L, function_pointer); + return data.get(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDPinnedMemory.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDPinnedMemory.java new file mode 100644 index 0000000..fa6f2ca --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDPinnedMemory.java @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class AMDPinnedMemory { + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, + * GetBufferParameteriv, GetBufferPointerv, MapBufferRange: + */ + public static final int GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD = 0x9160; + + private AMDPinnedMemory() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDQueryBufferObject.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDQueryBufferObject.java new file mode 100644 index 0000000..b19df1d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDQueryBufferObject.java @@ -0,0 +1,31 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class AMDQueryBufferObject { + + /** + * Accepted by the <pname> parameter of GetQueryObjectiv, GetQueryObjectuiv, + * GetQueryObjecti64v and GetQueryObjectui64v: + */ + public static final int GL_QUERY_RESULT_NO_WAIT_AMD = 0x9194; + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, MapBufferRange, GetBufferSubData, + * GetBufferParameteriv + * and GetBufferPointerv: + */ + public static final int GL_QUERY_BUFFER_AMD = 0x9192; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_QUERY_BUFFER_BINDING_AMD = 0x9193; + + private AMDQueryBufferObject() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDSamplePositions.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDSamplePositions.java new file mode 100644 index 0000000..a4916dc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDSamplePositions.java @@ -0,0 +1,25 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class AMDSamplePositions { + + /** + * Accepted by the <pname> parameter of GetFloatv: + */ + public static final int GL_SUBSAMPLE_DISTANCE_AMD = 0x883F; + + private AMDSamplePositions() {} + + public static void glSetMultisampleAMD(int pname, int index, FloatBuffer val) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSetMultisamplefvAMD; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(val, 2); + nglSetMultisamplefvAMD(pname, index, MemoryUtil.getAddress(val), function_pointer); + } + static native void nglSetMultisamplefvAMD(int pname, int index, long val, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDSeamlessCubemapPerTexture.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDSeamlessCubemapPerTexture.java new file mode 100644 index 0000000..519e7f1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDSeamlessCubemapPerTexture.java @@ -0,0 +1,17 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class AMDSeamlessCubemapPerTexture { + + /** + * Accepted by the <pname> parameter of TexParameterf, TexParameteri, + * TexParameterfv, TexParameteriv, GetTexParameterfv, and GetTexParameteriv: + */ + public static final int GL_TEXTURE_CUBE_MAP_SEAMLESS = 0x884F; + + private AMDSeamlessCubemapPerTexture() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDSparseTexture.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDSparseTexture.java new file mode 100644 index 0000000..8d74608 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDSparseTexture.java @@ -0,0 +1,58 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class AMDSparseTexture { + + /** + * Accepted by the <flags> parameter to TexStorageSparseAMD and TextureStorageSparseAMD: + */ + public static final int GL_TEXTURE_STORAGE_SPARSE_BIT_AMD = 0x1; + + /** + * Accepted by the <pname> parameter to GetInternalformativ: + */ + public static final int GL_VIRTUAL_PAGE_SIZE_X_AMD = 0x9195, + GL_VIRTUAL_PAGE_SIZE_Y_AMD = 0x9196, + GL_VIRTUAL_PAGE_SIZE_Z_AMD = 0x9197; + + /** + * Accepted by the <pname> parameter to GetIntegerv, GetFloatv, GetDoublev, + * GetInteger64v, and GetBooleanv: + */ + public static final int GL_MAX_SPARSE_TEXTURE_SIZE_AMD = 0x9198, + GL_MAX_SPARSE_3D_TEXTURE_SIZE_AMD = 0x9199, + GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS = 0x919A; + + /** + * Accepted by the <pname> parameter of GetTexParameter{if}v: + */ + public static final int GL_MIN_SPARSE_LEVEL_AMD = 0x919B; + + /** + * Accepted by the <pname> parameter of TexParameter{if}{v} and + * GetTexParameter{if}v: + */ + public static final int GL_MIN_LOD_WARNING_AMD = 0x919C; + + private AMDSparseTexture() {} + + public static void glTexStorageSparseAMD(int target, int internalFormat, int width, int height, int depth, int layers, int flags) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexStorageSparseAMD; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexStorageSparseAMD(target, internalFormat, width, height, depth, layers, flags, function_pointer); + } + static native void nglTexStorageSparseAMD(int target, int internalFormat, int width, int height, int depth, int layers, int flags, long function_pointer); + + public static void glTextureStorageSparseAMD(int texture, int target, int internalFormat, int width, int height, int depth, int layers, int flags) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureStorageSparseAMD; + BufferChecks.checkFunctionAddress(function_pointer); + nglTextureStorageSparseAMD(texture, target, internalFormat, width, height, depth, layers, flags, function_pointer); + } + static native void nglTextureStorageSparseAMD(int texture, int target, int internalFormat, int width, int height, int depth, int layers, int flags, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDStencilOperationExtended.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDStencilOperationExtended.java new file mode 100644 index 0000000..d26709b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDStencilOperationExtended.java @@ -0,0 +1,39 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class AMDStencilOperationExtended { + + /** + * Accepted by the <sfail>, <dpfail> and <dppass> parameters of StencilOp + * and StencilOpSeparate: + */ + public static final int GL_SET_AMD = 0x874A, + GL_AND = 0x1501, + GL_XOR = 0x1506, + GL_OR = 0x1507, + GL_NOR = 0x1508, + GL_EQUIV = 0x1509, + GL_NAND = 0x150E, + GL_REPLACE_VALUE_AMD = 0x874B; + + /** + * Accepted by the <param> parameter of GetIntegerv, GetFloatv, GetBooleanv + * GetDoublev and GetInteger64v: + */ + public static final int GL_STENCIL_OP_VALUE_AMD = 0x874C, + GL_STENCIL_BACK_OP_VALUE_AMD = 0x874D; + + private AMDStencilOperationExtended() {} + + public static void glStencilOpValueAMD(int face, int value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glStencilOpValueAMD; + BufferChecks.checkFunctionAddress(function_pointer); + nglStencilOpValueAMD(face, value, function_pointer); + } + static native void nglStencilOpValueAMD(int face, int value, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDVertexShaderTessellator.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDVertexShaderTessellator.java new file mode 100644 index 0000000..4225a5f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/AMDVertexShaderTessellator.java @@ -0,0 +1,50 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class AMDVertexShaderTessellator { + + /** + * Returned by the <type> parameter of GetActiveUniform: + */ + public static final int GL_SAMPLER_BUFFER_AMD = 0x9001, + GL_INT_SAMPLER_BUFFER_AMD = 0x9002, + GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD = 0x9003; + + /** + * Accepted by TessellationModeAMD + */ + public static final int GL_DISCRETE_AMD = 0x9006, + GL_CONTINUOUS_AMD = 0x9007; + + /** + * Accepted by GetIntegerv + */ + public static final int GL_TESSELLATION_MODE_AMD = 0x9004; + + /** + * Accepted by GetFloatv + */ + public static final int GL_TESSELLATION_FACTOR_AMD = 0x9005; + + private AMDVertexShaderTessellator() {} + + public static void glTessellationFactorAMD(float factor) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTessellationFactorAMD; + BufferChecks.checkFunctionAddress(function_pointer); + nglTessellationFactorAMD(factor, function_pointer); + } + static native void nglTessellationFactorAMD(float factor, long function_pointer); + + public static void glTessellationModeAMD(int mode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTessellationModeAMD; + BufferChecks.checkFunctionAddress(function_pointer); + nglTessellationModeAMD(mode, function_pointer); + } + static native void nglTessellationModeAMD(int mode, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEAuxDepthStencil.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEAuxDepthStencil.java new file mode 100644 index 0000000..19c929b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEAuxDepthStencil.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class APPLEAuxDepthStencil { + + /** + * Accepted by the <pname> parameter of GetIntegerv. + */ + public static final int GL_AUX_DEPTH_STENCIL_APPLE = 0x8A14; + + private APPLEAuxDepthStencil() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEClientStorage.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEClientStorage.java new file mode 100644 index 0000000..8412c99 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEClientStorage.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class APPLEClientStorage { + + /** + * Accepted by the <pname> parameters of PixelStore: + */ + public static final int GL_UNPACK_CLIENT_STORAGE_APPLE = 0x85B2; + + private APPLEClientStorage() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEElementArray.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEElementArray.java new file mode 100644 index 0000000..46bb1d1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEElementArray.java @@ -0,0 +1,87 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class APPLEElementArray { + + /** + * Accepted by the <array> parameter of EnableClientState and + * DisableClientState and the <value> parameter of IsEnabled: + */ + public static final int GL_ELEMENT_ARRAY_APPLE = 0x8768; + + /** + * Accepted by the <value> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_ELEMENT_ARRAY_TYPE_APPLE = 0x8769; + + /** + * Accepted by the <pname> parameter of GetPointerv: + */ + public static final int GL_ELEMENT_ARRAY_POINTER_APPLE = 0x876A; + + private APPLEElementArray() {} + + public static void glElementPointerAPPLE(ByteBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glElementPointerAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pointer); + nglElementPointerAPPLE(GL11.GL_UNSIGNED_BYTE, MemoryUtil.getAddress(pointer), function_pointer); + } + public static void glElementPointerAPPLE(IntBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glElementPointerAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pointer); + nglElementPointerAPPLE(GL11.GL_UNSIGNED_INT, MemoryUtil.getAddress(pointer), function_pointer); + } + public static void glElementPointerAPPLE(ShortBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glElementPointerAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pointer); + nglElementPointerAPPLE(GL11.GL_UNSIGNED_SHORT, MemoryUtil.getAddress(pointer), function_pointer); + } + static native void nglElementPointerAPPLE(int type, long pointer, long function_pointer); + + public static void glDrawElementArrayAPPLE(int mode, int first, int count) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementArrayAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + nglDrawElementArrayAPPLE(mode, first, count, function_pointer); + } + static native void nglDrawElementArrayAPPLE(int mode, int first, int count, long function_pointer); + + public static void glDrawRangeElementArrayAPPLE(int mode, int start, int end, int first, int count) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawRangeElementArrayAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + nglDrawRangeElementArrayAPPLE(mode, start, end, first, count, function_pointer); + } + static native void nglDrawRangeElementArrayAPPLE(int mode, int start, int end, int first, int count, long function_pointer); + + public static void glMultiDrawElementArrayAPPLE(int mode, IntBuffer first, IntBuffer count) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiDrawElementArrayAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(first); + BufferChecks.checkBuffer(count, first.remaining()); + nglMultiDrawElementArrayAPPLE(mode, MemoryUtil.getAddress(first), MemoryUtil.getAddress(count), first.remaining(), function_pointer); + } + static native void nglMultiDrawElementArrayAPPLE(int mode, long first, long count, int first_primcount, long function_pointer); + + public static void glMultiDrawRangeElementArrayAPPLE(int mode, int start, int end, IntBuffer first, IntBuffer count) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiDrawRangeElementArrayAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(first); + BufferChecks.checkBuffer(count, first.remaining()); + nglMultiDrawRangeElementArrayAPPLE(mode, start, end, MemoryUtil.getAddress(first), MemoryUtil.getAddress(count), first.remaining(), function_pointer); + } + static native void nglMultiDrawRangeElementArrayAPPLE(int mode, int start, int end, long first, long count, int first_primcount, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEFence.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEFence.java new file mode 100644 index 0000000..feb1fc1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEFence.java @@ -0,0 +1,104 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class APPLEFence { + + /** + * Accepted by the <object> parameter of TestObjectAPPLE and FinishObjectAPPLE: + */ + public static final int GL_DRAW_PIXELS_APPLE = 0x8A0A, + GL_FENCE_APPLE = 0x8A0B; + + private APPLEFence() {} + + public static void glGenFencesAPPLE(IntBuffer fences) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenFencesAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(fences); + nglGenFencesAPPLE(fences.remaining(), MemoryUtil.getAddress(fences), function_pointer); + } + static native void nglGenFencesAPPLE(int fences_n, long fences, long function_pointer); + + /** Overloads glGenFencesAPPLE. */ + public static int glGenFencesAPPLE() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenFencesAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer fences = APIUtil.getBufferInt(caps); + nglGenFencesAPPLE(1, MemoryUtil.getAddress(fences), function_pointer); + return fences.get(0); + } + + public static void glDeleteFencesAPPLE(IntBuffer fences) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteFencesAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(fences); + nglDeleteFencesAPPLE(fences.remaining(), MemoryUtil.getAddress(fences), function_pointer); + } + static native void nglDeleteFencesAPPLE(int fences_n, long fences, long function_pointer); + + /** Overloads glDeleteFencesAPPLE. */ + public static void glDeleteFencesAPPLE(int fence) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteFencesAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeleteFencesAPPLE(1, APIUtil.getInt(caps, fence), function_pointer); + } + + public static void glSetFenceAPPLE(int fence) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSetFenceAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + nglSetFenceAPPLE(fence, function_pointer); + } + static native void nglSetFenceAPPLE(int fence, long function_pointer); + + public static boolean glIsFenceAPPLE(int fence) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsFenceAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsFenceAPPLE(fence, function_pointer); + return __result; + } + static native boolean nglIsFenceAPPLE(int fence, long function_pointer); + + public static boolean glTestFenceAPPLE(int fence) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTestFenceAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglTestFenceAPPLE(fence, function_pointer); + return __result; + } + static native boolean nglTestFenceAPPLE(int fence, long function_pointer); + + public static void glFinishFenceAPPLE(int fence) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFinishFenceAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + nglFinishFenceAPPLE(fence, function_pointer); + } + static native void nglFinishFenceAPPLE(int fence, long function_pointer); + + public static boolean glTestObjectAPPLE(int object, int name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTestObjectAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglTestObjectAPPLE(object, name, function_pointer); + return __result; + } + static native boolean nglTestObjectAPPLE(int object, int name, long function_pointer); + + public static void glFinishObjectAPPLE(int object, int name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFinishObjectAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + nglFinishObjectAPPLE(object, name, function_pointer); + } + static native void nglFinishObjectAPPLE(int object, int name, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEFloatPixels.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEFloatPixels.java new file mode 100644 index 0000000..6751ba3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEFloatPixels.java @@ -0,0 +1,40 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class APPLEFloatPixels { + + /** + * Accepted by the parameters of DrawPixels, ReadPixels, TexImage1D, + * TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, and + * GetTexImage: + */ + public static final int GL_HALF_APPLE = 0x140B; + + /** + * Accepted by the GetBooleanv: + */ + public static final int GL_COLOR_FLOAT_APPLE = 0x8A0F; + + /** + * Accepted by the parameter of TexImage1D, + * TexImage2D, and TexImage3D: + */ + public static final int GL_RGBA_FLOAT32_APPLE = 0x8814, + GL_RGB_FLOAT32_APPLE = 0x8815, + GL_ALPHA_FLOAT32_APPLE = 0x8816, + GL_INTENSITY_FLOAT32_APPLE = 0x8817, + GL_LUMINANCE_FLOAT32_APPLE = 0x8818, + GL_LUMINANCE_ALPHA_FLOAT32_APPLE = 0x8819, + GL_RGBA_FLOAT16_APPLE = 0x881A, + GL_RGB_FLOAT16_APPLE = 0x881B, + GL_ALPHA_FLOAT16_APPLE = 0x881C, + GL_INTENSITY_FLOAT16_APPLE = 0x881D, + GL_LUMINANCE_FLOAT16_APPLE = 0x881E, + GL_LUMINANCE_ALPHA_FLOAT16_APPLE = 0x881F; + + private APPLEFloatPixels() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEFlushBufferRange.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEFlushBufferRange.java new file mode 100644 index 0000000..071a168 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEFlushBufferRange.java @@ -0,0 +1,34 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class APPLEFlushBufferRange { + + /** + * Accepted by the <pname> parameter of BufferParameteriAPPLE and + * GetBufferParameteriv: + */ + public static final int GL_BUFFER_SERIALIZED_MODIFY_APPLE = 0x8A12, + GL_BUFFER_FLUSHING_UNMAP_APPLE = 0x8A13; + + private APPLEFlushBufferRange() {} + + public static void glBufferParameteriAPPLE(int target, int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferParameteriAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + nglBufferParameteriAPPLE(target, pname, param, function_pointer); + } + static native void nglBufferParameteriAPPLE(int target, int pname, int param, long function_pointer); + + public static void glFlushMappedBufferRangeAPPLE(int target, long offset, long size) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFlushMappedBufferRangeAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + nglFlushMappedBufferRangeAPPLE(target, offset, size, function_pointer); + } + static native void nglFlushMappedBufferRangeAPPLE(int target, long offset, long size, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEObjectPurgeable.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEObjectPurgeable.java new file mode 100644 index 0000000..ec75a54 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEObjectPurgeable.java @@ -0,0 +1,73 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class APPLEObjectPurgeable { + + /** + * Accepted by the <option> parameter of ObjectPurgeable, and returned + * by ObjectPurgeable: + */ + public static final int GL_RELEASED_APPLE = 0x8A19, + GL_VOLATILE_APPLE = 0x8A1A; + + /** + * Accepted by the <option> parameters of ObjectUnpurgeable, and + * returned by ObjectUnpurgeable: + */ + public static final int GL_RETAINED_APPLE = 0x8A1B, + GL_UNDEFINED_APPLE = 0x8A1C; + + /** + * Accepted by the <pname> parameters of GetObjectParameteriv: + */ + public static final int GL_PURGEABLE_APPLE = 0x8A1D; + + /** + * Accepted by the <objectType> parameters of ObjectPurgeableAPPLE, + * ObjectUnpurgeableAPPLE and GetObjectParameteriv: + */ + public static final int GL_BUFFER_OBJECT_APPLE = 0x85B3; + + private APPLEObjectPurgeable() {} + + public static int glObjectPurgeableAPPLE(int objectType, int name, int option) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glObjectPurgeableAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglObjectPurgeableAPPLE(objectType, name, option, function_pointer); + return __result; + } + static native int nglObjectPurgeableAPPLE(int objectType, int name, int option, long function_pointer); + + public static int glObjectUnpurgeableAPPLE(int objectType, int name, int option) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glObjectUnpurgeableAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglObjectUnpurgeableAPPLE(objectType, name, option, function_pointer); + return __result; + } + static native int nglObjectUnpurgeableAPPLE(int objectType, int name, int option, long function_pointer); + + public static void glGetObjectParameterAPPLE(int objectType, int name, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetObjectParameterivAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetObjectParameterivAPPLE(objectType, name, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetObjectParameterivAPPLE(int objectType, int name, int pname, long params, long function_pointer); + + /** Overloads glGetObjectParameterivAPPLE. */ + public static int glGetObjectParameteriAPPLE(int objectType, int name, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetObjectParameterivAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetObjectParameterivAPPLE(objectType, name, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEPackedPixels.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEPackedPixels.java new file mode 100644 index 0000000..a809881 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEPackedPixels.java @@ -0,0 +1,33 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class APPLEPackedPixels { + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, TexImage1D, + * TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, + * TexSubImage2D, TexSubImage3D, GetHistogram, GetMinmax, + * ConvolutionFilter1D, ConvolutionFilter2D, ConvolutionFilter3D, + * GetConvolutionFilter, SeparableFilter2D, SeparableFilter3D, + * GetSeparableFilter, ColorTable, GetColorTable, TexImage4DSGIS, + * and TexSubImage4DSGIS: + */ + public static final int GL_UNSIGNED_BYTE_3_3_2 = 0x8032, + GL_UNSIGNED_BYTE_2_3_3_REV = 0x8362, + GL_UNSIGNED_SHORT_5_6_5 = 0x8363, + GL_UNSIGNED_SHORT_5_6_5_REV = 0x8364, + GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033, + GL_UNSIGNED_SHORT_4_4_4_4_REV = 0x8365, + GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034, + GL_UNSIGNED_SHORT_1_5_5_5_REV = 0x8366, + GL_UNSIGNED_INT_8_8_8_8 = 0x8035, + GL_UNSIGNED_INT_8_8_8_8_REV = 0x8367, + GL_UNSIGNED_INT_10_10_10_2 = 0x8036, + GL_UNSIGNED_INT_2_10_10_10_REV = 0x8368; + + private APPLEPackedPixels() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLERgb422.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLERgb422.java new file mode 100644 index 0000000..4cb1783 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLERgb422.java @@ -0,0 +1,30 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class APPLERgb422 { + + /** + * Accepted by the <format> parameter of DrawPixels, ReadPixels, TexImage1D, + * TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, TexSubImage2D, + * TexSubImage3D, GetHistogram, GetMinmax, ConvolutionFilter1D, + * ConvolutionFilter2D, GetConvolutionFilter, SeparableFilter2D, + * GetSeparableFilter, ColorTable, GetColorTable: + */ + public static final int GL_RGB_422_APPLE = 0x8A1F; + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, TexImage1D, + * TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, TexSubImage2D, + * TexSubImage3D, GetHistogram, GetMinmax, ConvolutionFilter1D, + * ConvolutionFilter2D, GetConvolutionFilter, SeparableFilter2D, + * GetSeparableFilter, ColorTable, GetColorTable: + */ + public static final int GL_UNSIGNED_SHORT_8_8_APPLE = 0x85BA, + GL_UNSIGNED_SHORT_8_8_REV_APPLE = 0x85BB; + + private APPLERgb422() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLERowBytes.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLERowBytes.java new file mode 100644 index 0000000..48a5c8a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLERowBytes.java @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class APPLERowBytes { + + /** + * Accepted by the <pname> parameter of PixelStorei and the <pname> + * parameter of GetIntegerv: + */ + public static final int GL_PACK_ROW_BYTES_APPLE = 0x8A15, + GL_UNPACK_ROW_BYTES_APPLE = 0x8A16; + + private APPLERowBytes() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLETextureRange.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLETextureRange.java new file mode 100644 index 0000000..1c74631 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLETextureRange.java @@ -0,0 +1,55 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class APPLETextureRange { + + /** + * Accepted by the parameters of TexParameteri, TexParameterf, + * TexParameteriv, TexParameterfv, GetTexParameteriv, and + * GetTexParameterfv: + */ + public static final int GL_TEXTURE_STORAGE_HINT_APPLE = 0x85BC; + + /** + * Accepted by the parameters of TexParameteri, TexParameterf, + * TexParameteriv, and TexParameterfv: + */ + public static final int GL_STORAGE_PRIVATE_APPLE = 0x85BD, + GL_STORAGE_CACHED_APPLE = 0x85BE, + GL_STORAGE_SHARED_APPLE = 0x85BF; + + /** + * Accepted by the parameters of GetTexParameteriv and + * GetTexParameterfv: + */ + public static final int GL_TEXTURE_RANGE_LENGTH_APPLE = 0x85B7; + + /** + * Accepted by the parameters of GetTexParameterPointerv: + */ + public static final int GL_TEXTURE_RANGE_POINTER_APPLE = 0x85B8; + + private APPLETextureRange() {} + + public static void glTextureRangeAPPLE(int target, ByteBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureRangeAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pointer); + nglTextureRangeAPPLE(target, pointer.remaining(), MemoryUtil.getAddress(pointer), function_pointer); + } + static native void nglTextureRangeAPPLE(int target, int pointer_length, long pointer, long function_pointer); + + public static Buffer glGetTexParameterPointervAPPLE(int target, int pname, long result_size) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexParameterPointervAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + Buffer __result = nglGetTexParameterPointervAPPLE(target, pname, result_size, function_pointer); + return __result; + } + static native Buffer nglGetTexParameterPointervAPPLE(int target, int pname, long result_size, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEVertexArrayObject.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEVertexArrayObject.java new file mode 100644 index 0000000..003863a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEVertexArrayObject.java @@ -0,0 +1,70 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class APPLEVertexArrayObject { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_VERTEX_ARRAY_BINDING_APPLE = 0x85B5; + + private APPLEVertexArrayObject() {} + + public static void glBindVertexArrayAPPLE(int array) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindVertexArrayAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindVertexArrayAPPLE(array, function_pointer); + } + static native void nglBindVertexArrayAPPLE(int array, long function_pointer); + + public static void glDeleteVertexArraysAPPLE(IntBuffer arrays) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteVertexArraysAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(arrays); + nglDeleteVertexArraysAPPLE(arrays.remaining(), MemoryUtil.getAddress(arrays), function_pointer); + } + static native void nglDeleteVertexArraysAPPLE(int arrays_n, long arrays, long function_pointer); + + /** Overloads glDeleteVertexArraysAPPLE. */ + public static void glDeleteVertexArraysAPPLE(int array) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteVertexArraysAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeleteVertexArraysAPPLE(1, APIUtil.getInt(caps, array), function_pointer); + } + + public static void glGenVertexArraysAPPLE(IntBuffer arrays) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenVertexArraysAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(arrays); + nglGenVertexArraysAPPLE(arrays.remaining(), MemoryUtil.getAddress(arrays), function_pointer); + } + static native void nglGenVertexArraysAPPLE(int arrays_n, long arrays, long function_pointer); + + /** Overloads glGenVertexArraysAPPLE. */ + public static int glGenVertexArraysAPPLE() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenVertexArraysAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer arrays = APIUtil.getBufferInt(caps); + nglGenVertexArraysAPPLE(1, MemoryUtil.getAddress(arrays), function_pointer); + return arrays.get(0); + } + + public static boolean glIsVertexArrayAPPLE(int array) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsVertexArrayAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsVertexArrayAPPLE(array, function_pointer); + return __result; + } + static native boolean nglIsVertexArrayAPPLE(int array, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEVertexArrayRange.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEVertexArrayRange.java new file mode 100644 index 0000000..91de23d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEVertexArrayRange.java @@ -0,0 +1,73 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class APPLEVertexArrayRange { + + /** + * Accepted by the <cap> parameter of EnableClientState, DisableClientState, + * and IsEnabled: + */ + public static final int GL_VERTEX_ARRAY_RANGE_APPLE = 0x851D; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE = 0x851E, + GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_APPLE = 0x8520; + + /** + * Accepted by the <pname> parameter of GetPointerv: + */ + public static final int GL_VERTEX_ARRAY_RANGE_POINTER_APPLE = 0x8521; + + /** + * Accepted by the <pname> parameter of VertexArrayParameteriAPPLE, + * GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev: + */ + public static final int GL_VERTEX_ARRAY_STORAGE_HINT_APPLE = 0x851F; + + /** + * Accepted by the <param> parameter of VertexArrayParameteriAPPLE: + */ + public static final int GL_STORAGE_CACHED_APPLE = 0x85BE, + GL_STORAGE_SHARED_APPLE = 0x85BF; + + /** + * Accepted by the <object> parameter of TestObjectAPPLE and FinishObjectAPPLE: + */ + public static final int GL_DRAW_PIXELS_APPLE = 0x8A0A, + GL_FENCE_APPLE = 0x8A0B; + + private APPLEVertexArrayRange() {} + + public static void glVertexArrayRangeAPPLE(ByteBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexArrayRangeAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pointer); + nglVertexArrayRangeAPPLE(pointer.remaining(), MemoryUtil.getAddress(pointer), function_pointer); + } + static native void nglVertexArrayRangeAPPLE(int pointer_length, long pointer, long function_pointer); + + public static void glFlushVertexArrayRangeAPPLE(ByteBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFlushVertexArrayRangeAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pointer); + nglFlushVertexArrayRangeAPPLE(pointer.remaining(), MemoryUtil.getAddress(pointer), function_pointer); + } + static native void nglFlushVertexArrayRangeAPPLE(int pointer_length, long pointer, long function_pointer); + + public static void glVertexArrayParameteriAPPLE(int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexArrayParameteriAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexArrayParameteriAPPLE(pname, param, function_pointer); + } + static native void nglVertexArrayParameteriAPPLE(int pname, int param, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEVertexProgramEvaluators.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEVertexProgramEvaluators.java new file mode 100644 index 0000000..4e939e3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEVertexProgramEvaluators.java @@ -0,0 +1,92 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class APPLEVertexProgramEvaluators { + + /** + * Accepted by the <pname> parameter of EnableVertexAttribAPPLE, + * DisableVertexAttribAPPLE, and IsVertexAttribEnabledAPPLE. + */ + public static final int GL_VERTEX_ATTRIB_MAP1_APPLE = 0x8A00, + GL_VERTEX_ATTRIB_MAP2_APPLE = 0x8A01; + + /** + * Accepted by the <pname> parameter of GetVertexAttribdvARB, + * GetVertexAttribfvARB, and GetVertexAttribivARB. + */ + public static final int GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE = 0x8A02, + GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE = 0x8A03, + GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE = 0x8A04, + GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE = 0x8A05, + GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE = 0x8A06, + GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE = 0x8A07, + GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE = 0x8A08, + GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE = 0x8A09; + + private APPLEVertexProgramEvaluators() {} + + public static void glEnableVertexAttribAPPLE(int index, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEnableVertexAttribAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + nglEnableVertexAttribAPPLE(index, pname, function_pointer); + } + static native void nglEnableVertexAttribAPPLE(int index, int pname, long function_pointer); + + public static void glDisableVertexAttribAPPLE(int index, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDisableVertexAttribAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + nglDisableVertexAttribAPPLE(index, pname, function_pointer); + } + static native void nglDisableVertexAttribAPPLE(int index, int pname, long function_pointer); + + public static boolean glIsVertexAttribEnabledAPPLE(int index, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsVertexAttribEnabledAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsVertexAttribEnabledAPPLE(index, pname, function_pointer); + return __result; + } + static native boolean nglIsVertexAttribEnabledAPPLE(int index, int pname, long function_pointer); + + public static void glMapVertexAttrib1dAPPLE(int index, int size, double u1, double u2, int stride, int order, DoubleBuffer points) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMapVertexAttrib1dAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(points); + nglMapVertexAttrib1dAPPLE(index, size, u1, u2, stride, order, MemoryUtil.getAddress(points), function_pointer); + } + static native void nglMapVertexAttrib1dAPPLE(int index, int size, double u1, double u2, int stride, int order, long points, long function_pointer); + + public static void glMapVertexAttrib1fAPPLE(int index, int size, float u1, float u2, int stride, int order, FloatBuffer points) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMapVertexAttrib1fAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(points); + nglMapVertexAttrib1fAPPLE(index, size, u1, u2, stride, order, MemoryUtil.getAddress(points), function_pointer); + } + static native void nglMapVertexAttrib1fAPPLE(int index, int size, float u1, float u2, int stride, int order, long points, long function_pointer); + + public static void glMapVertexAttrib2dAPPLE(int index, int size, double u1, double u2, int ustride, int uorder, double v1, double v2, int vstride, int vorder, DoubleBuffer points) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMapVertexAttrib2dAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(points); + nglMapVertexAttrib2dAPPLE(index, size, u1, u2, ustride, uorder, v1, v2, vstride, vorder, MemoryUtil.getAddress(points), function_pointer); + } + static native void nglMapVertexAttrib2dAPPLE(int index, int size, double u1, double u2, int ustride, int uorder, double v1, double v2, int vstride, int vorder, long points, long function_pointer); + + public static void glMapVertexAttrib2fAPPLE(int index, int size, float u1, float u2, int ustride, int uorder, float v1, float v2, int vstride, int vorder, FloatBuffer points) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMapVertexAttrib2fAPPLE; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(points); + nglMapVertexAttrib2fAPPLE(index, size, u1, u2, ustride, uorder, v1, v2, vstride, vorder, MemoryUtil.getAddress(points), function_pointer); + } + static native void nglMapVertexAttrib2fAPPLE(int index, int size, float u1, float u2, int ustride, int uorder, float v1, float v2, int vstride, int vorder, long points, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEYcbcr422.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEYcbcr422.java new file mode 100644 index 0000000..11dc502 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/APPLEYcbcr422.java @@ -0,0 +1,32 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class APPLEYcbcr422 { + + /** + * Accepted by the <format> parameter of DrawPixels, ReadPixels, TexImage1D, + * TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, TexSubImage2D, + * TexSubImage3D, GetHistogram, GetMinmax, ConvolutionFilter1D, + * ConvolutionFilter2D, ConvolutionFilter3D, GetConvolutionFilter, + * SeparableFilter2D, SeparableFilter3D, GetSeparableFilter, ColorTable, + * GetColorTable: + */ + public static final int GL_YCBCR_422_APPLE = 0x85B9; + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, TexImage1D, + * TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, TexSubImage2D, + * TexSubImage3D, GetHistogram, GetMinmax, ConvolutionFilter1D, + * ConvolutionFilter2D, ConvolutionFilter3D, GetConvolutionFilter, + * SeparableFilter2D, SeparableFilter3D, GetSeparableFilter, ColorTable, + * GetColorTable: + */ + public static final int GL_UNSIGNED_SHORT_8_8_APPLE = 0x85BA, + GL_UNSIGNED_SHORT_8_8_REV_APPLE = 0x85BB; + + private APPLEYcbcr422() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBBaseInstance.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBBaseInstance.java new file mode 100644 index 0000000..f89496e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBBaseInstance.java @@ -0,0 +1,41 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBBaseInstance { + + private ARBBaseInstance() {} + + public static void glDrawArraysInstancedBaseInstance(int mode, int first, int count, int primcount, int baseinstance) { + GL42.glDrawArraysInstancedBaseInstance(mode, first, count, primcount, baseinstance); + } + + public static void glDrawElementsInstancedBaseInstance(int mode, ByteBuffer indices, int primcount, int baseinstance) { + GL42.glDrawElementsInstancedBaseInstance(mode, indices, primcount, baseinstance); + } + public static void glDrawElementsInstancedBaseInstance(int mode, IntBuffer indices, int primcount, int baseinstance) { + GL42.glDrawElementsInstancedBaseInstance(mode, indices, primcount, baseinstance); + } + public static void glDrawElementsInstancedBaseInstance(int mode, ShortBuffer indices, int primcount, int baseinstance) { + GL42.glDrawElementsInstancedBaseInstance(mode, indices, primcount, baseinstance); + } + public static void glDrawElementsInstancedBaseInstance(int mode, int indices_count, int type, long indices_buffer_offset, int primcount, int baseinstance) { + GL42.glDrawElementsInstancedBaseInstance(mode, indices_count, type, indices_buffer_offset, primcount, baseinstance); + } + + public static void glDrawElementsInstancedBaseVertexBaseInstance(int mode, ByteBuffer indices, int primcount, int basevertex, int baseinstance) { + GL42.glDrawElementsInstancedBaseVertexBaseInstance(mode, indices, primcount, basevertex, baseinstance); + } + public static void glDrawElementsInstancedBaseVertexBaseInstance(int mode, IntBuffer indices, int primcount, int basevertex, int baseinstance) { + GL42.glDrawElementsInstancedBaseVertexBaseInstance(mode, indices, primcount, basevertex, baseinstance); + } + public static void glDrawElementsInstancedBaseVertexBaseInstance(int mode, ShortBuffer indices, int primcount, int basevertex, int baseinstance) { + GL42.glDrawElementsInstancedBaseVertexBaseInstance(mode, indices, primcount, basevertex, baseinstance); + } + public static void glDrawElementsInstancedBaseVertexBaseInstance(int mode, int indices_count, int type, long indices_buffer_offset, int primcount, int basevertex, int baseinstance) { + GL42.glDrawElementsInstancedBaseVertexBaseInstance(mode, indices_count, type, indices_buffer_offset, primcount, basevertex, baseinstance); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBBindlessTexture.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBBindlessTexture.java new file mode 100644 index 0000000..92f4b4f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBBindlessTexture.java @@ -0,0 +1,153 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBBindlessTexture { + + /** + * Accepted by the <type> parameter of VertexAttribLPointer: + */ + public static final int GL_UNSIGNED_INT64_ARB = 0x140F; + + private ARBBindlessTexture() {} + + public static long glGetTextureHandleARB(int texture) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTextureHandleARB; + BufferChecks.checkFunctionAddress(function_pointer); + long __result = nglGetTextureHandleARB(texture, function_pointer); + return __result; + } + static native long nglGetTextureHandleARB(int texture, long function_pointer); + + public static long glGetTextureSamplerHandleARB(int texture, int sampler) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTextureSamplerHandleARB; + BufferChecks.checkFunctionAddress(function_pointer); + long __result = nglGetTextureSamplerHandleARB(texture, sampler, function_pointer); + return __result; + } + static native long nglGetTextureSamplerHandleARB(int texture, int sampler, long function_pointer); + + public static void glMakeTextureHandleResidentARB(long handle) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMakeTextureHandleResidentARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglMakeTextureHandleResidentARB(handle, function_pointer); + } + static native void nglMakeTextureHandleResidentARB(long handle, long function_pointer); + + public static void glMakeTextureHandleNonResidentARB(long handle) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMakeTextureHandleNonResidentARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglMakeTextureHandleNonResidentARB(handle, function_pointer); + } + static native void nglMakeTextureHandleNonResidentARB(long handle, long function_pointer); + + public static long glGetImageHandleARB(int texture, int level, boolean layered, int layer, int format) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetImageHandleARB; + BufferChecks.checkFunctionAddress(function_pointer); + long __result = nglGetImageHandleARB(texture, level, layered, layer, format, function_pointer); + return __result; + } + static native long nglGetImageHandleARB(int texture, int level, boolean layered, int layer, int format, long function_pointer); + + public static void glMakeImageHandleResidentARB(long handle, int access) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMakeImageHandleResidentARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglMakeImageHandleResidentARB(handle, access, function_pointer); + } + static native void nglMakeImageHandleResidentARB(long handle, int access, long function_pointer); + + public static void glMakeImageHandleNonResidentARB(long handle) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMakeImageHandleNonResidentARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglMakeImageHandleNonResidentARB(handle, function_pointer); + } + static native void nglMakeImageHandleNonResidentARB(long handle, long function_pointer); + + public static void glUniformHandleui64ARB(int location, long value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformHandleui64ARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniformHandleui64ARB(location, value, function_pointer); + } + static native void nglUniformHandleui64ARB(int location, long value, long function_pointer); + + public static void glUniformHandleuARB(int location, LongBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformHandleui64vARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniformHandleui64vARB(location, value.remaining(), MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniformHandleui64vARB(int location, int value_count, long value, long function_pointer); + + public static void glProgramUniformHandleui64ARB(int program, int location, long value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformHandleui64ARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniformHandleui64ARB(program, location, value, function_pointer); + } + static native void nglProgramUniformHandleui64ARB(int program, int location, long value, long function_pointer); + + public static void glProgramUniformHandleuARB(int program, int location, LongBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformHandleui64vARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(values); + nglProgramUniformHandleui64vARB(program, location, values.remaining(), MemoryUtil.getAddress(values), function_pointer); + } + static native void nglProgramUniformHandleui64vARB(int program, int location, int values_count, long values, long function_pointer); + + public static boolean glIsTextureHandleResidentARB(long handle) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsTextureHandleResidentARB; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsTextureHandleResidentARB(handle, function_pointer); + return __result; + } + static native boolean nglIsTextureHandleResidentARB(long handle, long function_pointer); + + public static boolean glIsImageHandleResidentARB(long handle) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsImageHandleResidentARB; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsImageHandleResidentARB(handle, function_pointer); + return __result; + } + static native boolean nglIsImageHandleResidentARB(long handle, long function_pointer); + + public static void glVertexAttribL1ui64ARB(int index, long x) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL1ui64ARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribL1ui64ARB(index, x, function_pointer); + } + static native void nglVertexAttribL1ui64ARB(int index, long x, long function_pointer); + + public static void glVertexAttribL1uARB(int index, LongBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL1ui64vARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 1); + nglVertexAttribL1ui64vARB(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribL1ui64vARB(int index, long v, long function_pointer); + + public static void glGetVertexAttribLuARB(int index, int pname, LongBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexAttribLui64vARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetVertexAttribLui64vARB(index, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVertexAttribLui64vARB(int index, int pname, long params, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBBlendFuncExtended.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBBlendFuncExtended.java new file mode 100644 index 0000000..2bb4c78 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBBlendFuncExtended.java @@ -0,0 +1,45 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBBlendFuncExtended { + + /** + * Accepted by the <src> and <dst> parameters of BlendFunc and + * BlendFunci, and by the <srcRGB>, <dstRGB>, <srcAlpha> and <dstAlpha> + * parameters of BlendFuncSeparate and BlendFuncSeparatei: + */ + public static final int GL_SRC1_COLOR = 0x88F9, + GL_SRC1_ALPHA = 0x8589, + GL_ONE_MINUS_SRC1_COLOR = 0x88FA, + GL_ONE_MINUS_SRC1_ALPHA = 0x88FB; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv + * and GetDoublev: + */ + public static final int GL_MAX_DUAL_SOURCE_DRAW_BUFFERS = 0x88FC; + + private ARBBlendFuncExtended() {} + + public static void glBindFragDataLocationIndexed(int program, int colorNumber, int index, ByteBuffer name) { + GL33.glBindFragDataLocationIndexed(program, colorNumber, index, name); + } + + /** Overloads glBindFragDataLocationIndexed. */ + public static void glBindFragDataLocationIndexed(int program, int colorNumber, int index, CharSequence name) { + GL33.glBindFragDataLocationIndexed(program, colorNumber, index, name); + } + + public static int glGetFragDataIndex(int program, ByteBuffer name) { + return GL33.glGetFragDataIndex(program, name); + } + + /** Overloads glGetFragDataIndex. */ + public static int glGetFragDataIndex(int program, CharSequence name) { + return GL33.glGetFragDataIndex(program, name); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBBufferObject.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBBufferObject.java new file mode 100644 index 0000000..eef8990 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBBufferObject.java @@ -0,0 +1,323 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public class ARBBufferObject { + + /** + * Accepted by the <usage> parameter of BufferDataARB: + */ + public static final int GL_STREAM_DRAW_ARB = 0x88E0, + GL_STREAM_READ_ARB = 0x88E1, + GL_STREAM_COPY_ARB = 0x88E2, + GL_STATIC_DRAW_ARB = 0x88E4, + GL_STATIC_READ_ARB = 0x88E5, + GL_STATIC_COPY_ARB = 0x88E6, + GL_DYNAMIC_DRAW_ARB = 0x88E8, + GL_DYNAMIC_READ_ARB = 0x88E9, + GL_DYNAMIC_COPY_ARB = 0x88EA; + + /** + * Accepted by the <access> parameter of MapBufferARB: + */ + public static final int GL_READ_ONLY_ARB = 0x88B8, + GL_WRITE_ONLY_ARB = 0x88B9, + GL_READ_WRITE_ARB = 0x88BA; + + /** + * Accepted by the <pname> parameter of GetBufferParameterivARB: + */ + public static final int GL_BUFFER_SIZE_ARB = 0x8764, + GL_BUFFER_USAGE_ARB = 0x8765, + GL_BUFFER_ACCESS_ARB = 0x88BB, + GL_BUFFER_MAPPED_ARB = 0x88BC, + GL_BUFFER_MAP_POINTER_ARB = 0x88BD; + + + public static void glBindBufferARB(int target, int buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindBufferARB; + BufferChecks.checkFunctionAddress(function_pointer); + StateTracker.bindBuffer(caps, target, buffer); + nglBindBufferARB(target, buffer, function_pointer); + } + static native void nglBindBufferARB(int target, int buffer, long function_pointer); + + public static void glDeleteBuffersARB(IntBuffer buffers) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteBuffersARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(buffers); + nglDeleteBuffersARB(buffers.remaining(), MemoryUtil.getAddress(buffers), function_pointer); + } + static native void nglDeleteBuffersARB(int buffers_n, long buffers, long function_pointer); + + /** Overloads glDeleteBuffersARB. */ + public static void glDeleteBuffersARB(int buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteBuffersARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeleteBuffersARB(1, APIUtil.getInt(caps, buffer), function_pointer); + } + + public static void glGenBuffersARB(IntBuffer buffers) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenBuffersARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(buffers); + nglGenBuffersARB(buffers.remaining(), MemoryUtil.getAddress(buffers), function_pointer); + } + static native void nglGenBuffersARB(int buffers_n, long buffers, long function_pointer); + + /** Overloads glGenBuffersARB. */ + public static int glGenBuffersARB() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenBuffersARB; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer buffers = APIUtil.getBufferInt(caps); + nglGenBuffersARB(1, MemoryUtil.getAddress(buffers), function_pointer); + return buffers.get(0); + } + + public static boolean glIsBufferARB(int buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsBufferARB; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsBufferARB(buffer, function_pointer); + return __result; + } + static native boolean nglIsBufferARB(int buffer, long function_pointer); + + public static void glBufferDataARB(int target, long data_size, int usage) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferDataARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglBufferDataARB(target, data_size, 0L, usage, function_pointer); + } + public static void glBufferDataARB(int target, ByteBuffer data, int usage) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferDataARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglBufferDataARB(target, data.remaining(), MemoryUtil.getAddress(data), usage, function_pointer); + } + public static void glBufferDataARB(int target, DoubleBuffer data, int usage) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferDataARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglBufferDataARB(target, (data.remaining() << 3), MemoryUtil.getAddress(data), usage, function_pointer); + } + public static void glBufferDataARB(int target, FloatBuffer data, int usage) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferDataARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglBufferDataARB(target, (data.remaining() << 2), MemoryUtil.getAddress(data), usage, function_pointer); + } + public static void glBufferDataARB(int target, IntBuffer data, int usage) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferDataARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglBufferDataARB(target, (data.remaining() << 2), MemoryUtil.getAddress(data), usage, function_pointer); + } + public static void glBufferDataARB(int target, ShortBuffer data, int usage) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferDataARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglBufferDataARB(target, (data.remaining() << 1), MemoryUtil.getAddress(data), usage, function_pointer); + } + static native void nglBufferDataARB(int target, long data_size, long data, int usage, long function_pointer); + + public static void glBufferSubDataARB(int target, long offset, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferSubDataARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglBufferSubDataARB(target, offset, data.remaining(), MemoryUtil.getAddress(data), function_pointer); + } + public static void glBufferSubDataARB(int target, long offset, DoubleBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferSubDataARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglBufferSubDataARB(target, offset, (data.remaining() << 3), MemoryUtil.getAddress(data), function_pointer); + } + public static void glBufferSubDataARB(int target, long offset, FloatBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferSubDataARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglBufferSubDataARB(target, offset, (data.remaining() << 2), MemoryUtil.getAddress(data), function_pointer); + } + public static void glBufferSubDataARB(int target, long offset, IntBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferSubDataARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglBufferSubDataARB(target, offset, (data.remaining() << 2), MemoryUtil.getAddress(data), function_pointer); + } + public static void glBufferSubDataARB(int target, long offset, ShortBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferSubDataARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglBufferSubDataARB(target, offset, (data.remaining() << 1), MemoryUtil.getAddress(data), function_pointer); + } + static native void nglBufferSubDataARB(int target, long offset, long data_size, long data, long function_pointer); + + public static void glGetBufferSubDataARB(int target, long offset, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetBufferSubDataARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglGetBufferSubDataARB(target, offset, data.remaining(), MemoryUtil.getAddress(data), function_pointer); + } + public static void glGetBufferSubDataARB(int target, long offset, DoubleBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetBufferSubDataARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglGetBufferSubDataARB(target, offset, (data.remaining() << 3), MemoryUtil.getAddress(data), function_pointer); + } + public static void glGetBufferSubDataARB(int target, long offset, FloatBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetBufferSubDataARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglGetBufferSubDataARB(target, offset, (data.remaining() << 2), MemoryUtil.getAddress(data), function_pointer); + } + public static void glGetBufferSubDataARB(int target, long offset, IntBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetBufferSubDataARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglGetBufferSubDataARB(target, offset, (data.remaining() << 2), MemoryUtil.getAddress(data), function_pointer); + } + public static void glGetBufferSubDataARB(int target, long offset, ShortBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetBufferSubDataARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglGetBufferSubDataARB(target, offset, (data.remaining() << 1), MemoryUtil.getAddress(data), function_pointer); + } + static native void nglGetBufferSubDataARB(int target, long offset, long data_size, long data, long function_pointer); + + /** + * glMapBufferARB maps a GL buffer object to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapBufferARB like this: + *

+ * ByteBuffer mapped_buffer; mapped_buffer = glMapBufferARB(..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBufferARB(..., ..., mapped_buffer); + *

+ * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + *

+ * The version of this method without an explicit length argument calls glGetBufferParameterARB internally to + * retrieve the current buffer object size, which may cause a pipeline flush and reduce application performance. + *

+ * The version of this method with an explicit length argument is a fast alternative to the one without. No GL call + * is made to retrieve the buffer object size, so the user is responsible for tracking and using the appropriate length.
+ * Security warning: The length argument should match the buffer object size. Reading from or writing to outside + * the memory region that corresponds to the mapped buffer object will cause native crashes. + *

+ * @param length the length of the mapped memory in bytes. + * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. + *

+ * @return A ByteBuffer representing the mapped buffer memory. + */ + public static ByteBuffer glMapBufferARB(int target, int access, ByteBuffer old_buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMapBufferARB; + BufferChecks.checkFunctionAddress(function_pointer); + if (old_buffer != null) + BufferChecks.checkDirect(old_buffer); + ByteBuffer __result = nglMapBufferARB(target, access, GLChecks.getBufferObjectSizeARB(caps, target), old_buffer, function_pointer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + /** + * glMapBufferARB maps a GL buffer object to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapBufferARB like this: + *

+ * ByteBuffer mapped_buffer; mapped_buffer = glMapBufferARB(..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBufferARB(..., ..., mapped_buffer); + *

+ * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + *

+ * The version of this method without an explicit length argument calls glGetBufferParameterARB internally to + * retrieve the current buffer object size, which may cause a pipeline flush and reduce application performance. + *

+ * The version of this method with an explicit length argument is a fast alternative to the one without. No GL call + * is made to retrieve the buffer object size, so the user is responsible for tracking and using the appropriate length.
+ * Security warning: The length argument should match the buffer object size. Reading from or writing to outside + * the memory region that corresponds to the mapped buffer object will cause native crashes. + *

+ * @param length the length of the mapped memory in bytes. + * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. + *

+ * @return A ByteBuffer representing the mapped buffer memory. + */ + public static ByteBuffer glMapBufferARB(int target, int access, long length, ByteBuffer old_buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMapBufferARB; + BufferChecks.checkFunctionAddress(function_pointer); + if (old_buffer != null) + BufferChecks.checkDirect(old_buffer); + ByteBuffer __result = nglMapBufferARB(target, access, length, old_buffer, function_pointer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + static native ByteBuffer nglMapBufferARB(int target, int access, long result_size, ByteBuffer old_buffer, long function_pointer); + + public static boolean glUnmapBufferARB(int target) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUnmapBufferARB; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglUnmapBufferARB(target, function_pointer); + return __result; + } + static native boolean nglUnmapBufferARB(int target, long function_pointer); + + public static void glGetBufferParameterARB(int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetBufferParameterivARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetBufferParameterivARB(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetBufferParameterivARB(int target, int pname, long params, long function_pointer); + + /** + * Overloads glGetBufferParameterivARB. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetBufferParameteriARB} instead. + */ + @Deprecated + public static int glGetBufferParameterARB(int target, int pname) { + return ARBBufferObject.glGetBufferParameteriARB(target, pname); + } + + /** Overloads glGetBufferParameterivARB. */ + public static int glGetBufferParameteriARB(int target, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetBufferParameterivARB; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetBufferParameterivARB(target, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static ByteBuffer glGetBufferPointerARB(int target, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetBufferPointervARB; + BufferChecks.checkFunctionAddress(function_pointer); + ByteBuffer __result = nglGetBufferPointervARB(target, pname, GLChecks.getBufferObjectSizeARB(caps, target), function_pointer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + static native ByteBuffer nglGetBufferPointervARB(int target, int pname, long result_size, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBBufferStorage.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBBufferStorage.java new file mode 100644 index 0000000..b7a2ade --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBBufferStorage.java @@ -0,0 +1,107 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBBufferStorage { + + /** + * Accepted in the <flags> parameter of BufferStorage and + * NamedBufferStorageEXT: + */ + public static final int GL_MAP_PERSISTENT_BIT = 0x40, + GL_MAP_COHERENT_BIT = 0x80, + GL_DYNAMIC_STORAGE_BIT = 0x100, + GL_CLIENT_STORAGE_BIT = 0x200; + + /** + * Accepted by the <pname> parameter of GetBufferParameter{i|i64}v:\ + */ + public static final int GL_BUFFER_IMMUTABLE_STORAGE = 0x821F, + GL_BUFFER_STORAGE_FLAGS = 0x8220; + + /** + * Accepted by the <barriers> parameter of MemoryBarrier: + */ + public static final int GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT = 0x4000; + + private ARBBufferStorage() {} + + public static void glBufferStorage(int target, ByteBuffer data, int flags) { + GL44.glBufferStorage(target, data, flags); + } + public static void glBufferStorage(int target, DoubleBuffer data, int flags) { + GL44.glBufferStorage(target, data, flags); + } + public static void glBufferStorage(int target, FloatBuffer data, int flags) { + GL44.glBufferStorage(target, data, flags); + } + public static void glBufferStorage(int target, IntBuffer data, int flags) { + GL44.glBufferStorage(target, data, flags); + } + public static void glBufferStorage(int target, ShortBuffer data, int flags) { + GL44.glBufferStorage(target, data, flags); + } + public static void glBufferStorage(int target, LongBuffer data, int flags) { + GL44.glBufferStorage(target, data, flags); + } + + /** Overloads glBufferStorage. */ + public static void glBufferStorage(int target, long size, int flags) { + GL44.glBufferStorage(target, size, flags); + } + + public static void glNamedBufferStorageEXT(int buffer, ByteBuffer data, int flags) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedBufferStorageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglNamedBufferStorageEXT(buffer, data.remaining(), MemoryUtil.getAddress(data), flags, function_pointer); + } + public static void glNamedBufferStorageEXT(int buffer, DoubleBuffer data, int flags) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedBufferStorageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglNamedBufferStorageEXT(buffer, (data.remaining() << 3), MemoryUtil.getAddress(data), flags, function_pointer); + } + public static void glNamedBufferStorageEXT(int buffer, FloatBuffer data, int flags) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedBufferStorageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglNamedBufferStorageEXT(buffer, (data.remaining() << 2), MemoryUtil.getAddress(data), flags, function_pointer); + } + public static void glNamedBufferStorageEXT(int buffer, IntBuffer data, int flags) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedBufferStorageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglNamedBufferStorageEXT(buffer, (data.remaining() << 2), MemoryUtil.getAddress(data), flags, function_pointer); + } + public static void glNamedBufferStorageEXT(int buffer, ShortBuffer data, int flags) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedBufferStorageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglNamedBufferStorageEXT(buffer, (data.remaining() << 1), MemoryUtil.getAddress(data), flags, function_pointer); + } + public static void glNamedBufferStorageEXT(int buffer, LongBuffer data, int flags) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedBufferStorageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglNamedBufferStorageEXT(buffer, (data.remaining() << 3), MemoryUtil.getAddress(data), flags, function_pointer); + } + static native void nglNamedBufferStorageEXT(int buffer, long data_size, long data, int flags, long function_pointer); + + /** Overloads glNamedBufferStorageEXT. */ + public static void glNamedBufferStorageEXT(int buffer, long size, int flags) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedBufferStorageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglNamedBufferStorageEXT(buffer, size, 0L, flags, function_pointer); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBCLEvent.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBCLEvent.java new file mode 100644 index 0000000..f7d3893 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBCLEvent.java @@ -0,0 +1,31 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; +import org.lwjgl.opencl.*; + +public final class ARBCLEvent { + + /** + * Returned in <values> for GetSynciv <pname> OBJECT_TYPE. + */ + public static final int GL_SYNC_CL_EVENT_ARB = 0x8240; + + /** + * Returned in <values> for GetSynciv <pname> SYNC_CONDITION. + */ + public static final int GL_SYNC_CL_EVENT_COMPLETE_ARB = 0x8241; + + private ARBCLEvent() {} + + public static GLSync glCreateSyncFromCLeventARB(CLContext context, CLEvent event, int flags) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCreateSyncFromCLeventARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLSync __result = new GLSync(nglCreateSyncFromCLeventARB(context.getPointer(), event.getPointer(), flags, function_pointer)); + return __result; + } + static native long nglCreateSyncFromCLeventARB(long context, long event, int flags, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBClearBufferObject.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBClearBufferObject.java new file mode 100644 index 0000000..82ffbd7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBClearBufferObject.java @@ -0,0 +1,37 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBClearBufferObject { + + private ARBClearBufferObject() {} + + public static void glClearBufferData(int target, int internalformat, int format, int type, ByteBuffer data) { + GL43.glClearBufferData(target, internalformat, format, type, data); + } + + public static void glClearBufferSubData(int target, int internalformat, long offset, int format, int type, ByteBuffer data) { + GL43.glClearBufferSubData(target, internalformat, offset, format, type, data); + } + + public static void glClearNamedBufferDataEXT(int buffer, int internalformat, int format, int type, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClearNamedBufferDataEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(data, 1); + nglClearNamedBufferDataEXT(buffer, internalformat, format, type, MemoryUtil.getAddress(data), function_pointer); + } + static native void nglClearNamedBufferDataEXT(int buffer, int internalformat, int format, int type, long data, long function_pointer); + + public static void glClearNamedBufferSubDataEXT(int buffer, int internalformat, long offset, int format, int type, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClearNamedBufferSubDataEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglClearNamedBufferSubDataEXT(buffer, internalformat, offset, data.remaining(), format, type, MemoryUtil.getAddress(data), function_pointer); + } + static native void nglClearNamedBufferSubDataEXT(int buffer, int internalformat, long offset, long data_size, int format, int type, long data, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBClearTexture.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBClearTexture.java new file mode 100644 index 0000000..ce82150 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBClearTexture.java @@ -0,0 +1,55 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBClearTexture { + + /** + * Accepted by the <pname> parameter for GetInternalformativ and + * GetInternalformati64v: + */ + public static final int GL_CLEAR_TEXTURE = 0x9365; + + private ARBClearTexture() {} + + public static void glClearTexImage(int texture, int level, int format, int type, ByteBuffer data) { + GL44.glClearTexImage(texture, level, format, type, data); + } + public static void glClearTexImage(int texture, int level, int format, int type, DoubleBuffer data) { + GL44.glClearTexImage(texture, level, format, type, data); + } + public static void glClearTexImage(int texture, int level, int format, int type, FloatBuffer data) { + GL44.glClearTexImage(texture, level, format, type, data); + } + public static void glClearTexImage(int texture, int level, int format, int type, IntBuffer data) { + GL44.glClearTexImage(texture, level, format, type, data); + } + public static void glClearTexImage(int texture, int level, int format, int type, ShortBuffer data) { + GL44.glClearTexImage(texture, level, format, type, data); + } + public static void glClearTexImage(int texture, int level, int format, int type, LongBuffer data) { + GL44.glClearTexImage(texture, level, format, type, data); + } + + public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, ByteBuffer data) { + GL44.glClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); + } + public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, DoubleBuffer data) { + GL44.glClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); + } + public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, FloatBuffer data) { + GL44.glClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); + } + public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, IntBuffer data) { + GL44.glClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); + } + public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, ShortBuffer data) { + GL44.glClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); + } + public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, LongBuffer data) { + GL44.glClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBColorBufferFloat.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBColorBufferFloat.java new file mode 100644 index 0000000..59009a8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBColorBufferFloat.java @@ -0,0 +1,57 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBColorBufferFloat { + + /** + * Accepted by the <pname> parameters of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_RGBA_FLOAT_MODE_ARB = 0x8820; + + /** + * Accepted by the <target> parameter of ClampColorARB and the <pname> + * parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. + */ + public static final int GL_CLAMP_VERTEX_COLOR_ARB = 0x891A, + GL_CLAMP_FRAGMENT_COLOR_ARB = 0x891B, + GL_CLAMP_READ_COLOR_ARB = 0x891C; + + /** + * Accepted by the <clamp> parameter of ClampColorARB. + */ + public static final int GL_FIXED_ONLY_ARB = 0x891D; + + /** + * Accepted as a value in the <piAttribIList> and <pfAttribFList> + * parameter arrays of wglChoosePixelFormatARB, and returned in the + * <piValues> parameter array of wglGetPixelFormatAttribivARB, and the + * <pfValues> parameter array of wglGetPixelFormatAttribfvARB: + */ + public static final int WGL_TYPE_RGBA_FLOAT_ARB = 0x21A0; + + /** + * Accepted as values of the <render_type> arguments in the + * glXCreateNewContext and glXCreateContext functions + */ + public static final int GLX_RGBA_FLOAT_TYPE = 0x20B9; + + /** + * Accepted as a bit set in the GLX_RENDER_TYPE variable + */ + public static final int GLX_RGBA_FLOAT_BIT = 0x4; + + private ARBColorBufferFloat() {} + + public static void glClampColorARB(int target, int clamp) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClampColorARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglClampColorARB(target, clamp, function_pointer); + } + static native void nglClampColorARB(int target, int clamp, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBCompressedTexturePixelStorage.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBCompressedTexturePixelStorage.java new file mode 100644 index 0000000..4301b18 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBCompressedTexturePixelStorage.java @@ -0,0 +1,24 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBCompressedTexturePixelStorage { + + /** + * Accepted by the <pname> parameter of PixelStore[fi], GetBooleanv, + * GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev: + */ + public static final int GL_UNPACK_COMPRESSED_BLOCK_WIDTH = 0x9127, + GL_UNPACK_COMPRESSED_BLOCK_HEIGHT = 0x9128, + GL_UNPACK_COMPRESSED_BLOCK_DEPTH = 0x9129, + GL_UNPACK_COMPRESSED_BLOCK_SIZE = 0x912A, + GL_PACK_COMPRESSED_BLOCK_WIDTH = 0x912B, + GL_PACK_COMPRESSED_BLOCK_HEIGHT = 0x912C, + GL_PACK_COMPRESSED_BLOCK_DEPTH = 0x912D, + GL_PACK_COMPRESSED_BLOCK_SIZE = 0x912E; + + private ARBCompressedTexturePixelStorage() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBComputeShader.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBComputeShader.java new file mode 100644 index 0000000..43bacc2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBComputeShader.java @@ -0,0 +1,79 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBComputeShader { + + /** + * Accepted by the <type> parameter of CreateShader and returned in the + * <params> parameter by GetShaderiv: + */ + public static final int GL_COMPUTE_SHADER = 0x91B9; + + /** + * Accepted by the <pname> parameter of GetIntegerv, GetBooleanv, GetFloatv, + * GetDoublev and GetInteger64v: + */ + public static final int GL_MAX_COMPUTE_UNIFORM_BLOCKS = 0x91BB, + GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS = 0x91BC, + GL_MAX_COMPUTE_IMAGE_UNIFORMS = 0x91BD, + GL_MAX_COMPUTE_SHARED_MEMORY_SIZE = 0x8262, + GL_MAX_COMPUTE_UNIFORM_COMPONENTS = 0x8263, + GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS = 0x8264, + GL_MAX_COMPUTE_ATOMIC_COUNTERS = 0x8265, + GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS = 0x8266, + GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS = 0x90EB; + + /** + * Accepted by the <pname> parameter of GetIntegeri_v, GetBooleani_v, + * GetFloati_v, GetDoublei_v and GetInteger64i_v: + */ + public static final int GL_MAX_COMPUTE_WORK_GROUP_COUNT = 0x91BE, + GL_MAX_COMPUTE_WORK_GROUP_SIZE = 0x91BF; + + /** + * Accepted by the <pname> parameter of GetProgramiv: + */ + public static final int GL_COMPUTE_WORK_GROUP_SIZE = 0x8267; + + /** + * Accepted by the <pname> parameter of GetActiveUniformBlockiv: + */ + public static final int GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER = 0x90EC; + + /** + * Accepted by the <pname> parameter of GetActiveAtomicCounterBufferiv: + */ + public static final int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER = 0x90ED; + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, and + * GetBufferPointerv: + */ + public static final int GL_DISPATCH_INDIRECT_BUFFER = 0x90EE; + + /** + * Accepted by the <value> parameter of GetIntegerv, GetBooleanv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + public static final int GL_DISPATCH_INDIRECT_BUFFER_BINDING = 0x90EF; + + /** + * Accepted by the <stages> parameter of UseProgramStages: + */ + public static final int GL_COMPUTE_SHADER_BIT = 0x20; + + private ARBComputeShader() {} + + public static void glDispatchCompute(int num_groups_x, int num_groups_y, int num_groups_z) { + GL43.glDispatchCompute(num_groups_x, num_groups_y, num_groups_z); + } + + public static void glDispatchComputeIndirect(long indirect) { + GL43.glDispatchComputeIndirect(indirect); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBComputeVariableGroupSize.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBComputeVariableGroupSize.java new file mode 100644 index 0000000..a076b52 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBComputeVariableGroupSize.java @@ -0,0 +1,33 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBComputeVariableGroupSize { + + /** + * Accepted by the <pname> parameter of GetIntegerv, GetBooleanv, GetFloatv, + * GetDoublev and GetInteger64v: + */ + public static final int GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB = 0x9344, + GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB = 0x90EB; + + /** + * Accepted by the <pname> parameter of GetIntegeri_v, GetBooleani_v, + * GetFloati_v, GetDoublei_v and GetInteger64i_v: + */ + public static final int GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB = 0x9345, + GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB = 0x91BF; + + private ARBComputeVariableGroupSize() {} + + public static void glDispatchComputeGroupSizeARB(int num_groups_x, int num_groups_y, int num_groups_z, int group_size_x, int group_size_y, int group_size_z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDispatchComputeGroupSizeARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglDispatchComputeGroupSizeARB(num_groups_x, num_groups_y, num_groups_z, group_size_x, group_size_y, group_size_z, function_pointer); + } + static native void nglDispatchComputeGroupSizeARB(int num_groups_x, int num_groups_y, int num_groups_z, int group_size_x, int group_size_y, int group_size_z, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBCopyBuffer.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBCopyBuffer.java new file mode 100644 index 0000000..9924a50 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBCopyBuffer.java @@ -0,0 +1,25 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBCopyBuffer { + + /** + * Accepted by the target parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, + * GetBufferPointerv, MapBufferRange, FlushMappedBufferRange, + * GetBufferParameteriv, BindBufferRange, BindBufferBase, + * and CopyBufferSubData: + */ + public static final int GL_COPY_READ_BUFFER = 0x8F36, + GL_COPY_WRITE_BUFFER = 0x8F37; + + private ARBCopyBuffer() {} + + public static void glCopyBufferSubData(int readTarget, int writeTarget, long readOffset, long writeOffset, long size) { + GL31.glCopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBCopyImage.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBCopyImage.java new file mode 100644 index 0000000..4547e7c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBCopyImage.java @@ -0,0 +1,15 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBCopyImage { + + private ARBCopyImage() {} + + public static void glCopyImageSubData(int srcName, int srcTarget, int srcLevel, int srcX, int srcY, int srcZ, int dstName, int dstTarget, int dstLevel, int dstX, int dstY, int dstZ, int srcWidth, int srcHeight, int srcDepth) { + GL43.glCopyImageSubData(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBDebugOutput.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBDebugOutput.java new file mode 100644 index 0000000..2d54783 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBDebugOutput.java @@ -0,0 +1,131 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBDebugOutput { + + /** + * Tokens accepted by the <target> parameters of Enable, Disable, + * and IsEnabled: + */ + public static final int GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB = 0x8242; + + /** + * Tokens accepted by the <value> parameters of GetBooleanv, + * GetIntegerv, GetFloatv, and GetDoublev: + */ + public static final int GL_MAX_DEBUG_MESSAGE_LENGTH_ARB = 0x9143, + GL_MAX_DEBUG_LOGGED_MESSAGES_ARB = 0x9144, + GL_DEBUG_LOGGED_MESSAGES_ARB = 0x9145, + GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB = 0x8243; + + /** + * Tokens accepted by the <pname> parameter of GetPointerv: + */ + public static final int GL_DEBUG_CALLBACK_FUNCTION_ARB = 0x8244, + GL_DEBUG_CALLBACK_USER_PARAM_ARB = 0x8245; + + /** + * Tokens accepted or provided by the <source> parameters of + * DebugMessageControlARB, DebugMessageInsertARB and DEBUGPROCARB, + * and the <sources> parameter of GetDebugMessageLogARB: + */ + public static final int GL_DEBUG_SOURCE_API_ARB = 0x8246, + GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB = 0x8247, + GL_DEBUG_SOURCE_SHADER_COMPILER_ARB = 0x8248, + GL_DEBUG_SOURCE_THIRD_PARTY_ARB = 0x8249, + GL_DEBUG_SOURCE_APPLICATION_ARB = 0x824A, + GL_DEBUG_SOURCE_OTHER_ARB = 0x824B; + + /** + * Tokens accepted or provided by the <type> parameters of + * DebugMessageControlARB, DebugMessageInsertARB and DEBUGPROCARB, + * and the <types> parameter of GetDebugMessageLogARB: + */ + public static final int GL_DEBUG_TYPE_ERROR_ARB = 0x824C, + GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB = 0x824D, + GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB = 0x824E, + GL_DEBUG_TYPE_PORTABILITY_ARB = 0x824F, + GL_DEBUG_TYPE_PERFORMANCE_ARB = 0x8250, + GL_DEBUG_TYPE_OTHER_ARB = 0x8251; + + /** + * Tokens accepted or provided by the <severity> parameters of + * DebugMessageControlARB, DebugMessageInsertARB and DEBUGPROCARB + * callback functions, and the <severities> parameter of + * GetDebugMessageLogARB: + */ + public static final int GL_DEBUG_SEVERITY_HIGH_ARB = 0x9146, + GL_DEBUG_SEVERITY_MEDIUM_ARB = 0x9147, + GL_DEBUG_SEVERITY_LOW_ARB = 0x9148; + + private ARBDebugOutput() {} + + public static void glDebugMessageControlARB(int source, int type, int severity, IntBuffer ids, boolean enabled) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDebugMessageControlARB; + BufferChecks.checkFunctionAddress(function_pointer); + if (ids != null) + BufferChecks.checkDirect(ids); + nglDebugMessageControlARB(source, type, severity, (ids == null ? 0 : ids.remaining()), MemoryUtil.getAddressSafe(ids), enabled, function_pointer); + } + static native void nglDebugMessageControlARB(int source, int type, int severity, int ids_count, long ids, boolean enabled, long function_pointer); + + public static void glDebugMessageInsertARB(int source, int type, int id, int severity, ByteBuffer buf) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDebugMessageInsertARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(buf); + nglDebugMessageInsertARB(source, type, id, severity, buf.remaining(), MemoryUtil.getAddress(buf), function_pointer); + } + static native void nglDebugMessageInsertARB(int source, int type, int id, int severity, int buf_length, long buf, long function_pointer); + + /** Overloads glDebugMessageInsertARB. */ + public static void glDebugMessageInsertARB(int source, int type, int id, int severity, CharSequence buf) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDebugMessageInsertARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglDebugMessageInsertARB(source, type, id, severity, buf.length(), APIUtil.getBuffer(caps, buf), function_pointer); + } + + /** + * The {@code ARBDebugOutputCallback.Handler} implementation passed to this method will be used for + * ARB_debug_output messages. If callback is null, any previously registered handler for the current + * thread will be unregistered and stop receiving messages. + *

+ * @param callback the callback function to use + */ + public static void glDebugMessageCallbackARB(ARBDebugOutputCallback callback) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDebugMessageCallbackARB; + BufferChecks.checkFunctionAddress(function_pointer); + long userParam = callback == null ? 0 : CallbackUtil.createGlobalRef(callback.getHandler()); + CallbackUtil.registerContextCallbackARB(userParam); + nglDebugMessageCallbackARB(callback == null ? 0 : callback.getPointer(), userParam, function_pointer); + } + static native void nglDebugMessageCallbackARB(long callback, long userParam, long function_pointer); + + public static int glGetDebugMessageLogARB(int count, IntBuffer sources, IntBuffer types, IntBuffer ids, IntBuffer severities, IntBuffer lengths, ByteBuffer messageLog) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetDebugMessageLogARB; + BufferChecks.checkFunctionAddress(function_pointer); + if (sources != null) + BufferChecks.checkBuffer(sources, count); + if (types != null) + BufferChecks.checkBuffer(types, count); + if (ids != null) + BufferChecks.checkBuffer(ids, count); + if (severities != null) + BufferChecks.checkBuffer(severities, count); + if (lengths != null) + BufferChecks.checkBuffer(lengths, count); + if (messageLog != null) + BufferChecks.checkDirect(messageLog); + int __result = nglGetDebugMessageLogARB(count, (messageLog == null ? 0 : messageLog.remaining()), MemoryUtil.getAddressSafe(sources), MemoryUtil.getAddressSafe(types), MemoryUtil.getAddressSafe(ids), MemoryUtil.getAddressSafe(severities), MemoryUtil.getAddressSafe(lengths), MemoryUtil.getAddressSafe(messageLog), function_pointer); + return __result; + } + static native int nglGetDebugMessageLogARB(int count, int messageLog_logSize, long sources, long types, long ids, long severities, long lengths, long messageLog, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBDepthBufferFloat.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBDepthBufferFloat.java new file mode 100644 index 0000000..fddab46 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBDepthBufferFloat.java @@ -0,0 +1,27 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBDepthBufferFloat { + + /** + * Accepted by the <internalformat> parameter of TexImage1D, TexImage2D, + * TexImage3D, CopyTexImage1D, CopyTexImage2D, and RenderbufferStorageEXT, + * and returned in the <data> parameter of GetTexLevelParameter and + * GetRenderbufferParameterivEXT: + */ + public static final int GL_DEPTH_COMPONENT32F = 0x8CAC, + GL_DEPTH32F_STENCIL8 = 0x8CAD; + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, TexImage1D, + * TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, and + * GetTexImage: + */ + public static final int GL_FLOAT_32_UNSIGNED_INT_24_8_REV = 0x8DAD; + + private ARBDepthBufferFloat() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBDepthClamp.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBDepthClamp.java new file mode 100644 index 0000000..b1e6c16 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBDepthClamp.java @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBDepthClamp { + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_DEPTH_CLAMP = 0x864F; + + private ARBDepthClamp() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBDepthTexture.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBDepthTexture.java new file mode 100644 index 0000000..a5b0b6d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBDepthTexture.java @@ -0,0 +1,31 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBDepthTexture { + + /** + * Accepted by the <internalFormat> parameter of TexImage1D, TexImage2D, + * CopyTexImage1D and CopyTexImage2D: + */ + public static final int GL_DEPTH_COMPONENT16_ARB = 0x81A5, + GL_DEPTH_COMPONENT24_ARB = 0x81A6, + GL_DEPTH_COMPONENT32_ARB = 0x81A7; + + /** + * Accepted by the <pname> parameter of GetTexLevelParameterfv and + * GetTexLevelParameteriv: + */ + public static final int GL_TEXTURE_DEPTH_SIZE_ARB = 0x884A; + + /** + * Accepted by the <pname> parameter of TexParameterf, TexParameteri, + * TexParameterfv, TexParameteriv, GetTexParameterfv, and GetTexParameteriv: + */ + public static final int GL_DEPTH_TEXTURE_MODE_ARB = 0x884B; + + private ARBDepthTexture() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBDrawBuffers.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBDrawBuffers.java new file mode 100644 index 0000000..288231a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBDrawBuffers.java @@ -0,0 +1,50 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBDrawBuffers { + + /** + * Accepted by the <pname> parameters of GetIntegerv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_MAX_DRAW_BUFFERS_ARB = 0x8824, + GL_DRAW_BUFFER0_ARB = 0x8825, + GL_DRAW_BUFFER1_ARB = 0x8826, + GL_DRAW_BUFFER2_ARB = 0x8827, + GL_DRAW_BUFFER3_ARB = 0x8828, + GL_DRAW_BUFFER4_ARB = 0x8829, + GL_DRAW_BUFFER5_ARB = 0x882A, + GL_DRAW_BUFFER6_ARB = 0x882B, + GL_DRAW_BUFFER7_ARB = 0x882C, + GL_DRAW_BUFFER8_ARB = 0x882D, + GL_DRAW_BUFFER9_ARB = 0x882E, + GL_DRAW_BUFFER10_ARB = 0x882F, + GL_DRAW_BUFFER11_ARB = 0x8830, + GL_DRAW_BUFFER12_ARB = 0x8831, + GL_DRAW_BUFFER13_ARB = 0x8832, + GL_DRAW_BUFFER14_ARB = 0x8833, + GL_DRAW_BUFFER15_ARB = 0x8834; + + private ARBDrawBuffers() {} + + public static void glDrawBuffersARB(IntBuffer buffers) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawBuffersARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(buffers); + nglDrawBuffersARB(buffers.remaining(), MemoryUtil.getAddress(buffers), function_pointer); + } + static native void nglDrawBuffersARB(int buffers_size, long buffers, long function_pointer); + + /** Overloads glDrawBuffersARB. */ + public static void glDrawBuffersARB(int buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawBuffersARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglDrawBuffersARB(1, APIUtil.getInt(caps, buffer), function_pointer); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBDrawBuffersBlend.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBDrawBuffersBlend.java new file mode 100644 index 0000000..915c8aa --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBDrawBuffersBlend.java @@ -0,0 +1,43 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBDrawBuffersBlend { + + private ARBDrawBuffersBlend() {} + + public static void glBlendEquationiARB(int buf, int mode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBlendEquationiARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglBlendEquationiARB(buf, mode, function_pointer); + } + static native void nglBlendEquationiARB(int buf, int mode, long function_pointer); + + public static void glBlendEquationSeparateiARB(int buf, int modeRGB, int modeAlpha) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBlendEquationSeparateiARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglBlendEquationSeparateiARB(buf, modeRGB, modeAlpha, function_pointer); + } + static native void nglBlendEquationSeparateiARB(int buf, int modeRGB, int modeAlpha, long function_pointer); + + public static void glBlendFunciARB(int buf, int src, int dst) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBlendFunciARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglBlendFunciARB(buf, src, dst, function_pointer); + } + static native void nglBlendFunciARB(int buf, int src, int dst, long function_pointer); + + public static void glBlendFuncSeparateiARB(int buf, int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBlendFuncSeparateiARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglBlendFuncSeparateiARB(buf, srcRGB, dstRGB, srcAlpha, dstAlpha, function_pointer); + } + static native void nglBlendFuncSeparateiARB(int buf, int srcRGB, int dstRGB, int srcAlpha, int dstAlpha, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBDrawElementsBaseVertex.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBDrawElementsBaseVertex.java new file mode 100644 index 0000000..ab5e4ae --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBDrawElementsBaseVertex.java @@ -0,0 +1,50 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBDrawElementsBaseVertex { + + private ARBDrawElementsBaseVertex() {} + + public static void glDrawElementsBaseVertex(int mode, ByteBuffer indices, int basevertex) { + GL32.glDrawElementsBaseVertex(mode, indices, basevertex); + } + public static void glDrawElementsBaseVertex(int mode, IntBuffer indices, int basevertex) { + GL32.glDrawElementsBaseVertex(mode, indices, basevertex); + } + public static void glDrawElementsBaseVertex(int mode, ShortBuffer indices, int basevertex) { + GL32.glDrawElementsBaseVertex(mode, indices, basevertex); + } + public static void glDrawElementsBaseVertex(int mode, int indices_count, int type, long indices_buffer_offset, int basevertex) { + GL32.glDrawElementsBaseVertex(mode, indices_count, type, indices_buffer_offset, basevertex); + } + + public static void glDrawRangeElementsBaseVertex(int mode, int start, int end, ByteBuffer indices, int basevertex) { + GL32.glDrawRangeElementsBaseVertex(mode, start, end, indices, basevertex); + } + public static void glDrawRangeElementsBaseVertex(int mode, int start, int end, IntBuffer indices, int basevertex) { + GL32.glDrawRangeElementsBaseVertex(mode, start, end, indices, basevertex); + } + public static void glDrawRangeElementsBaseVertex(int mode, int start, int end, ShortBuffer indices, int basevertex) { + GL32.glDrawRangeElementsBaseVertex(mode, start, end, indices, basevertex); + } + public static void glDrawRangeElementsBaseVertex(int mode, int start, int end, int indices_count, int type, long indices_buffer_offset, int basevertex) { + GL32.glDrawRangeElementsBaseVertex(mode, start, end, indices_count, type, indices_buffer_offset, basevertex); + } + + public static void glDrawElementsInstancedBaseVertex(int mode, ByteBuffer indices, int primcount, int basevertex) { + GL32.glDrawElementsInstancedBaseVertex(mode, indices, primcount, basevertex); + } + public static void glDrawElementsInstancedBaseVertex(int mode, IntBuffer indices, int primcount, int basevertex) { + GL32.glDrawElementsInstancedBaseVertex(mode, indices, primcount, basevertex); + } + public static void glDrawElementsInstancedBaseVertex(int mode, ShortBuffer indices, int primcount, int basevertex) { + GL32.glDrawElementsInstancedBaseVertex(mode, indices, primcount, basevertex); + } + public static void glDrawElementsInstancedBaseVertex(int mode, int indices_count, int type, long indices_buffer_offset, int primcount, int basevertex) { + GL32.glDrawElementsInstancedBaseVertex(mode, indices_count, type, indices_buffer_offset, primcount, basevertex); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBDrawIndirect.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBDrawIndirect.java new file mode 100644 index 0000000..6b5db88 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBDrawIndirect.java @@ -0,0 +1,50 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBDrawIndirect { + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, + * GetBufferPointerv, MapBufferRange, FlushMappedBufferRange, + * GetBufferParameteriv, BindBufferRange, BindBufferBase, and + * CopyBufferSubData: + */ + public static final int GL_DRAW_INDIRECT_BUFFER = 0x8F3F; + + /** + * Accepted by the <value> parameter of GetIntegerv, GetBooleanv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_DRAW_INDIRECT_BUFFER_BINDING = 0x8F43; + + private ARBDrawIndirect() {} + + public static void glDrawArraysIndirect(int mode, ByteBuffer indirect) { + GL40.glDrawArraysIndirect(mode, indirect); + } + public static void glDrawArraysIndirect(int mode, long indirect_buffer_offset) { + GL40.glDrawArraysIndirect(mode, indirect_buffer_offset); + } + + /** Overloads glDrawArraysIndirect. */ + public static void glDrawArraysIndirect(int mode, IntBuffer indirect) { + GL40.glDrawArraysIndirect(mode, indirect); + } + + public static void glDrawElementsIndirect(int mode, int type, ByteBuffer indirect) { + GL40.glDrawElementsIndirect(mode, type, indirect); + } + public static void glDrawElementsIndirect(int mode, int type, long indirect_buffer_offset) { + GL40.glDrawElementsIndirect(mode, type, indirect_buffer_offset); + } + + /** Overloads glDrawElementsIndirect. */ + public static void glDrawElementsIndirect(int mode, int type, IntBuffer indirect) { + GL40.glDrawElementsIndirect(mode, type, indirect); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBDrawInstanced.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBDrawInstanced.java new file mode 100644 index 0000000..e481cf0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBDrawInstanced.java @@ -0,0 +1,53 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBDrawInstanced { + + private ARBDrawInstanced() {} + + public static void glDrawArraysInstancedARB(int mode, int first, int count, int primcount) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawArraysInstancedARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglDrawArraysInstancedARB(mode, first, count, primcount, function_pointer); + } + static native void nglDrawArraysInstancedARB(int mode, int first, int count, int primcount, long function_pointer); + + public static void glDrawElementsInstancedARB(int mode, ByteBuffer indices, int primcount) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsInstancedARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawElementsInstancedARB(mode, indices.remaining(), GL11.GL_UNSIGNED_BYTE, MemoryUtil.getAddress(indices), primcount, function_pointer); + } + public static void glDrawElementsInstancedARB(int mode, IntBuffer indices, int primcount) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsInstancedARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawElementsInstancedARB(mode, indices.remaining(), GL11.GL_UNSIGNED_INT, MemoryUtil.getAddress(indices), primcount, function_pointer); + } + public static void glDrawElementsInstancedARB(int mode, ShortBuffer indices, int primcount) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsInstancedARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawElementsInstancedARB(mode, indices.remaining(), GL11.GL_UNSIGNED_SHORT, MemoryUtil.getAddress(indices), primcount, function_pointer); + } + static native void nglDrawElementsInstancedARB(int mode, int indices_count, int type, long indices, int primcount, long function_pointer); + public static void glDrawElementsInstancedARB(int mode, int indices_count, int type, long indices_buffer_offset, int primcount) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsInstancedARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOenabled(caps); + nglDrawElementsInstancedARBBO(mode, indices_count, type, indices_buffer_offset, primcount, function_pointer); + } + static native void nglDrawElementsInstancedARBBO(int mode, int indices_count, int type, long indices_buffer_offset, int primcount, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBES2Compatibility.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBES2Compatibility.java new file mode 100644 index 0000000..1af878b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBES2Compatibility.java @@ -0,0 +1,64 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBES2Compatibility { + + /** + * Accepted by the <value> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + public static final int GL_SHADER_COMPILER = 0x8DFA, + GL_NUM_SHADER_BINARY_FORMATS = 0x8DF9, + GL_MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB, + GL_MAX_VARYING_VECTORS = 0x8DFC, + GL_MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD, + GL_IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A, + GL_IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B; + + /** + * Accepted by the <type> parameter of VertexAttribPointer: + */ + public static final int GL_FIXED = 0x140C; + + /** + * Accepted by the <precisiontype> parameter of + * GetShaderPrecisionFormat: + */ + public static final int GL_LOW_FLOAT = 0x8DF0, + GL_MEDIUM_FLOAT = 0x8DF1, + GL_HIGH_FLOAT = 0x8DF2, + GL_LOW_INT = 0x8DF3, + GL_MEDIUM_INT = 0x8DF4, + GL_HIGH_INT = 0x8DF5; + + /** + * Accepted by the <format> parameter of most commands taking sized internal formats: + */ + public static final int GL_RGB565 = 0x8D62; + + private ARBES2Compatibility() {} + + public static void glReleaseShaderCompiler() { + GL41.glReleaseShaderCompiler(); + } + + public static void glShaderBinary(IntBuffer shaders, int binaryformat, ByteBuffer binary) { + GL41.glShaderBinary(shaders, binaryformat, binary); + } + + public static void glGetShaderPrecisionFormat(int shadertype, int precisiontype, IntBuffer range, IntBuffer precision) { + GL41.glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision); + } + + public static void glDepthRangef(float n, float f) { + GL41.glDepthRangef(n, f); + } + + public static void glClearDepthf(float d) { + GL41.glClearDepthf(d); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBES3Compatibility.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBES3Compatibility.java new file mode 100644 index 0000000..0c9703a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBES3Compatibility.java @@ -0,0 +1,41 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBES3Compatibility { + + /** + * Accepted by the <internalformat> parameter of CompressedTexImage2D + */ + public static final int GL_COMPRESSED_RGB8_ETC2 = 0x9274, + GL_COMPRESSED_SRGB8_ETC2 = 0x9275, + GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9276, + GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277, + GL_COMPRESSED_RGBA8_ETC2_EAC = 0x9278, + GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 0x9279, + GL_COMPRESSED_R11_EAC = 0x9270, + GL_COMPRESSED_SIGNED_R11_EAC = 0x9271, + GL_COMPRESSED_RG11_EAC = 0x9272, + GL_COMPRESSED_SIGNED_RG11_EAC = 0x9273; + + /** + * Accepted by the <target> parameter of Enable and Disable: + */ + public static final int GL_PRIMITIVE_RESTART_FIXED_INDEX = 0x8D69; + + /** + * Accepted by the <target> parameter of BeginQuery, EndQuery, + * GetQueryIndexediv and GetQueryiv: + */ + public static final int GL_ANY_SAMPLES_PASSED_CONSERVATIVE = 0x8D6A; + + /** + * Accepted by the <value> parameter of the GetInteger* functions: + */ + public static final int GL_MAX_ELEMENT_INDEX = 0x8D6B; + + private ARBES3Compatibility() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBEnhancedLayouts.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBEnhancedLayouts.java new file mode 100644 index 0000000..bc72c29 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBEnhancedLayouts.java @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBEnhancedLayouts { + + /** + * Accepted in the <props> array of GetProgramResourceiv: + */ + public static final int GL_LOCATION_COMPONENT = 0x934A, + GL_TRANSFORM_FEEDBACK_BUFFER_INDEX = 0x934B, + GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE = 0x934C; + + private ARBEnhancedLayouts() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBExplicitUniformLocation.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBExplicitUniformLocation.java new file mode 100644 index 0000000..de2ff6c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBExplicitUniformLocation.java @@ -0,0 +1,17 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBExplicitUniformLocation { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, GetDoublev, and GetInteger64v: + */ + public static final int GL_MAX_UNIFORM_LOCATIONS = 0x826E; + + private ARBExplicitUniformLocation() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBFragmentProgram.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBFragmentProgram.java new file mode 100644 index 0000000..047dcab --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBFragmentProgram.java @@ -0,0 +1,44 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBFragmentProgram extends ARBProgram { + + /** + * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, by the + * <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev, + * and by the <target> parameter of ProgramStringARB, BindProgramARB, + * ProgramEnvParameter4[df][v]ARB, ProgramLocalParameter4[df][v]ARB, + * GetProgramEnvParameter[df]vARB, GetProgramLocalParameter[df]vARB, + * GetProgramivARB and GetProgramStringARB. + */ + public static final int GL_FRAGMENT_PROGRAM_ARB = 0x8804; + + /** + * Accepted by the <pname> parameter of GetProgramivARB: + */ + public static final int GL_PROGRAM_ALU_INSTRUCTIONS_ARB = 0x8805, + GL_PROGRAM_TEX_INSTRUCTIONS_ARB = 0x8806, + GL_PROGRAM_TEX_INDIRECTIONS_ARB = 0x8807, + GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = 0x8808, + GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = 0x8809, + GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = 0x880A, + GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB = 0x880B, + GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB = 0x880C, + GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB = 0x880D, + GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = 0x880E, + GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = 0x880F, + GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = 0x8810; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_MAX_TEXTURE_COORDS_ARB = 0x8871, + GL_MAX_TEXTURE_IMAGE_UNITS_ARB = 0x8872; + + private ARBFragmentProgram() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBFragmentShader.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBFragmentShader.java new file mode 100644 index 0000000..99acefb --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBFragmentShader.java @@ -0,0 +1,31 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBFragmentShader { + + /** + * Accepted by the <shaderType> argument of CreateShaderObjectARB and + * returned by the <params> parameter of GetObjectParameter{fi}vARB: + */ + public static final int GL_FRAGMENT_SHADER_ARB = 0x8B30; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB = 0x8B49, + GL_MAX_TEXTURE_COORDS_ARB = 0x8871, + GL_MAX_TEXTURE_IMAGE_UNITS_ARB = 0x8872; + + /** + * Accepted by the <target> parameter of Hint and the <pname> parameter of + * GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev: + */ + public static final int GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB = 0x8B8B; + + private ARBFragmentShader() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBFramebufferNoAttachments.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBFramebufferNoAttachments.java new file mode 100644 index 0000000..0f82c72 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBFramebufferNoAttachments.java @@ -0,0 +1,71 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBFramebufferNoAttachments { + + /** + * Accepted by the <pname> parameter of FramebufferParameteri, + * GetFramebufferParameteriv, NamedFramebufferParameteriEXT, and + * GetNamedFramebufferParameterivEXT: + */ + public static final int GL_FRAMEBUFFER_DEFAULT_WIDTH = 0x9310, + GL_FRAMEBUFFER_DEFAULT_HEIGHT = 0x9311, + GL_FRAMEBUFFER_DEFAULT_LAYERS = 0x9312, + GL_FRAMEBUFFER_DEFAULT_SAMPLES = 0x9313, + GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS = 0x9314; + + /** + * Accepted by the <pname> parameter of GetIntegerv, GetBooleanv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + public static final int GL_MAX_FRAMEBUFFER_WIDTH = 0x9315, + GL_MAX_FRAMEBUFFER_HEIGHT = 0x9316, + GL_MAX_FRAMEBUFFER_LAYERS = 0x9317, + GL_MAX_FRAMEBUFFER_SAMPLES = 0x9318; + + private ARBFramebufferNoAttachments() {} + + public static void glFramebufferParameteri(int target, int pname, int param) { + GL43.glFramebufferParameteri(target, pname, param); + } + + public static void glGetFramebufferParameter(int target, int pname, IntBuffer params) { + GL43.glGetFramebufferParameter(target, pname, params); + } + + /** Overloads glGetFramebufferParameteriv. */ + public static int glGetFramebufferParameteri(int target, int pname) { + return GL43.glGetFramebufferParameteri(target, pname); + } + + public static void glNamedFramebufferParameteriEXT(int framebuffer, int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedFramebufferParameteriEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglNamedFramebufferParameteriEXT(framebuffer, pname, param, function_pointer); + } + static native void nglNamedFramebufferParameteriEXT(int framebuffer, int pname, int param, long function_pointer); + + public static void glGetNamedFramebufferParameterEXT(int framebuffer, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedFramebufferParameterivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetNamedFramebufferParameterivEXT(framebuffer, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetNamedFramebufferParameterivEXT(int framebuffer, int pname, long params, long function_pointer); + + /** Overloads glGetNamedFramebufferParameterivEXT. */ + public static int glGetNamedFramebufferParameterEXT(int framebuffer, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedFramebufferParameterivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetNamedFramebufferParameterivEXT(framebuffer, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBFramebufferObject.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBFramebufferObject.java new file mode 100644 index 0000000..f91f651 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBFramebufferObject.java @@ -0,0 +1,297 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBFramebufferObject { + + /** + * Accepted by the <target> parameter of BindFramebuffer, + * CheckFramebufferStatus, FramebufferTexture{1D|2D|3D}, + * FramebufferRenderbuffer, and + * GetFramebufferAttachmentParameteriv: + */ + public static final int GL_FRAMEBUFFER = 0x8D40, + GL_READ_FRAMEBUFFER = 0x8CA8, + GL_DRAW_FRAMEBUFFER = 0x8CA9; + + /** + * Accepted by the <target> parameter of BindRenderbuffer, + * RenderbufferStorage, and GetRenderbufferParameteriv, and + * returned by GetFramebufferAttachmentParameteriv: + */ + public static final int GL_RENDERBUFFER = 0x8D41; + + /** + * Accepted by the <internalformat> parameter of + * RenderbufferStorage: + */ + public static final int GL_STENCIL_INDEX1 = 0x8D46, + GL_STENCIL_INDEX4 = 0x8D47, + GL_STENCIL_INDEX8 = 0x8D48, + GL_STENCIL_INDEX16 = 0x8D49; + + /** + * Accepted by the <pname> parameter of GetRenderbufferParameteriv: + */ + public static final int GL_RENDERBUFFER_WIDTH = 0x8D42, + GL_RENDERBUFFER_HEIGHT = 0x8D43, + GL_RENDERBUFFER_INTERNAL_FORMAT = 0x8D44, + GL_RENDERBUFFER_RED_SIZE = 0x8D50, + GL_RENDERBUFFER_GREEN_SIZE = 0x8D51, + GL_RENDERBUFFER_BLUE_SIZE = 0x8D52, + GL_RENDERBUFFER_ALPHA_SIZE = 0x8D53, + GL_RENDERBUFFER_DEPTH_SIZE = 0x8D54, + GL_RENDERBUFFER_STENCIL_SIZE = 0x8D55, + GL_RENDERBUFFER_SAMPLES = 0x8CAB; + + /** + * Accepted by the <pname> parameter of + * GetFramebufferAttachmentParameteriv: + */ + public static final int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0, + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1, + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2, + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3, + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 0x8CD4, + GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 0x8210, + GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 0x8211, + GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE = 0x8212, + GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 0x8213, + GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 0x8214, + GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 0x8215, + GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 0x8216, + GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 0x8217; + + /** + * Returned in <params> by GetFramebufferAttachmentParameteriv: + */ + public static final int GL_SRGB = 0x8C40, + GL_UNSIGNED_NORMALIZED = 0x8C17, + GL_FRAMEBUFFER_DEFAULT = 0x8218, + GL_INDEX = 0x8222; + + /** + * Accepted by the <attachment> parameter of + * FramebufferTexture{1D|2D|3D}, FramebufferRenderbuffer, and + * GetFramebufferAttachmentParameteriv + */ + public static final int GL_COLOR_ATTACHMENT0 = 0x8CE0, + GL_COLOR_ATTACHMENT1 = 0x8CE1, + GL_COLOR_ATTACHMENT2 = 0x8CE2, + GL_COLOR_ATTACHMENT3 = 0x8CE3, + GL_COLOR_ATTACHMENT4 = 0x8CE4, + GL_COLOR_ATTACHMENT5 = 0x8CE5, + GL_COLOR_ATTACHMENT6 = 0x8CE6, + GL_COLOR_ATTACHMENT7 = 0x8CE7, + GL_COLOR_ATTACHMENT8 = 0x8CE8, + GL_COLOR_ATTACHMENT9 = 0x8CE9, + GL_COLOR_ATTACHMENT10 = 0x8CEA, + GL_COLOR_ATTACHMENT11 = 0x8CEB, + GL_COLOR_ATTACHMENT12 = 0x8CEC, + GL_COLOR_ATTACHMENT13 = 0x8CED, + GL_COLOR_ATTACHMENT14 = 0x8CEE, + GL_COLOR_ATTACHMENT15 = 0x8CEF, + GL_DEPTH_ATTACHMENT = 0x8D00, + GL_STENCIL_ATTACHMENT = 0x8D20, + GL_DEPTH_STENCIL_ATTACHMENT = 0x821A; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_MAX_SAMPLES = 0x8D57; + + /** + * Returned by CheckFramebufferStatus(): + */ + public static final int GL_FRAMEBUFFER_COMPLETE = 0x8CD5, + GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6, + GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7, + GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER = 0x8CDB, + GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER = 0x8CDC, + GL_FRAMEBUFFER_UNSUPPORTED = 0x8CDD, + GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 0x8D56, + GL_FRAMEBUFFER_UNDEFINED = 0x8219; + + /** + * Accepted by the <pname> parameters of GetIntegerv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_FRAMEBUFFER_BINDING = 0x8CA6, + GL_DRAW_FRAMEBUFFER_BINDING = 0x8CA6, + GL_READ_FRAMEBUFFER_BINDING = 0x8CAA, + GL_RENDERBUFFER_BINDING = 0x8CA7, + GL_MAX_COLOR_ATTACHMENTS = 0x8CDF, + GL_MAX_RENDERBUFFER_SIZE = 0x84E8; + + /** + * Returned by GetError(): + */ + public static final int GL_INVALID_FRAMEBUFFER_OPERATION = 0x506; + + /** + * Accepted by the <format> parameter of DrawPixels, ReadPixels, + * TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, + * TexSubImage3D, and GetTexImage, by the <type> parameter of + * CopyPixels, by the <internalformat> parameter of TexImage1D, + * TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and + * RenderbufferStorage, and returned in the <data> parameter of + * GetTexLevelParameter and GetRenderbufferParameteriv: + */ + public static final int GL_DEPTH_STENCIL = 0x84F9; + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, + * TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, + * TexSubImage3D, and GetTexImage: + */ + public static final int GL_UNSIGNED_INT_24_8 = 0x84FA; + + /** + * Accepted by the <internalformat> parameter of TexImage1D, + * TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and + * RenderbufferStorage, and returned in the <data> parameter of + * GetTexLevelParameter and GetRenderbufferParameteriv: + */ + public static final int GL_DEPTH24_STENCIL8 = 0x88F0; + + /** + * Accepted by the <value> parameter of GetTexLevelParameter: + */ + public static final int GL_TEXTURE_STENCIL_SIZE = 0x88F1; + + private ARBFramebufferObject() {} + + public static boolean glIsRenderbuffer(int renderbuffer) { + return GL30.glIsRenderbuffer(renderbuffer); + } + + public static void glBindRenderbuffer(int target, int renderbuffer) { + GL30.glBindRenderbuffer(target, renderbuffer); + } + + public static void glDeleteRenderbuffers(IntBuffer renderbuffers) { + GL30.glDeleteRenderbuffers(renderbuffers); + } + + /** Overloads glDeleteRenderbuffers. */ + public static void glDeleteRenderbuffers(int renderbuffer) { + GL30.glDeleteRenderbuffers(renderbuffer); + } + + public static void glGenRenderbuffers(IntBuffer renderbuffers) { + GL30.glGenRenderbuffers(renderbuffers); + } + + /** Overloads glGenRenderbuffers. */ + public static int glGenRenderbuffers() { + return GL30.glGenRenderbuffers(); + } + + public static void glRenderbufferStorage(int target, int internalformat, int width, int height) { + GL30.glRenderbufferStorage(target, internalformat, width, height); + } + + public static void glRenderbufferStorageMultisample(int target, int samples, int internalformat, int width, int height) { + GL30.glRenderbufferStorageMultisample(target, samples, internalformat, width, height); + } + + public static void glGetRenderbufferParameter(int target, int pname, IntBuffer params) { + GL30.glGetRenderbufferParameter(target, pname, params); + } + + /** + * Overloads glGetRenderbufferParameteriv. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetRenderbufferParameteri} instead. + */ + @Deprecated + public static int glGetRenderbufferParameter(int target, int pname) { + return ARBFramebufferObject.glGetRenderbufferParameteri(target, pname); + } + + /** Overloads glGetRenderbufferParameteriv. */ + public static int glGetRenderbufferParameteri(int target, int pname) { + return GL30.glGetRenderbufferParameteri(target, pname); + } + + public static boolean glIsFramebuffer(int framebuffer) { + return GL30.glIsFramebuffer(framebuffer); + } + + public static void glBindFramebuffer(int target, int framebuffer) { + GL30.glBindFramebuffer(target, framebuffer); + } + + public static void glDeleteFramebuffers(IntBuffer framebuffers) { + GL30.glDeleteFramebuffers(framebuffers); + } + + /** Overloads glDeleteFramebuffers. */ + public static void glDeleteFramebuffers(int framebuffer) { + GL30.glDeleteFramebuffers(framebuffer); + } + + public static void glGenFramebuffers(IntBuffer framebuffers) { + GL30.glGenFramebuffers(framebuffers); + } + + /** Overloads glGenFramebuffers. */ + public static int glGenFramebuffers() { + return GL30.glGenFramebuffers(); + } + + public static int glCheckFramebufferStatus(int target) { + return GL30.glCheckFramebufferStatus(target); + } + + public static void glFramebufferTexture1D(int target, int attachment, int textarget, int texture, int level) { + GL30.glFramebufferTexture1D(target, attachment, textarget, texture, level); + } + + public static void glFramebufferTexture2D(int target, int attachment, int textarget, int texture, int level) { + GL30.glFramebufferTexture2D(target, attachment, textarget, texture, level); + } + + public static void glFramebufferTexture3D(int target, int attachment, int textarget, int texture, int level, int layer) { + GL30.glFramebufferTexture3D(target, attachment, textarget, texture, level, layer); + } + + public static void glFramebufferTextureLayer(int target, int attachment, int texture, int level, int layer) { + GL30.glFramebufferTextureLayer(target, attachment, texture, level, layer); + } + + public static void glFramebufferRenderbuffer(int target, int attachment, int renderbuffertarget, int renderbuffer) { + GL30.glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); + } + + public static void glGetFramebufferAttachmentParameter(int target, int attachment, int pname, IntBuffer params) { + GL30.glGetFramebufferAttachmentParameter(target, attachment, pname, params); + } + + /** + * Overloads glGetFramebufferAttachmentParameteriv. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetFramebufferAttachmentParameteri} instead. + */ + @Deprecated + public static int glGetFramebufferAttachmentParameter(int target, int attachment, int pname) { + return GL30.glGetFramebufferAttachmentParameteri(target, attachment, pname); + } + + /** Overloads glGetFramebufferAttachmentParameteriv. */ + public static int glGetFramebufferAttachmentParameteri(int target, int attachment, int pname) { + return GL30.glGetFramebufferAttachmentParameteri(target, attachment, pname); + } + + public static void glBlitFramebuffer(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, int mask, int filter) { + GL30.glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); + } + + public static void glGenerateMipmap(int target) { + GL30.glGenerateMipmap(target); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBFramebufferSRGB.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBFramebufferSRGB.java new file mode 100644 index 0000000..1643552 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBFramebufferSRGB.java @@ -0,0 +1,37 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBFramebufferSRGB { + + /** + * Accepted by the <attribList> parameter of glXChooseVisual, and by + * the <attrib> parameter of glXGetConfig: + */ + public static final int GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB = 0x20B2; + + /** + * Accepted by the <piAttributes> parameter of + * wglGetPixelFormatAttribivEXT, wglGetPixelFormatAttribfvEXT, and + * the <piAttribIList> and <pfAttribIList> of wglChoosePixelFormatEXT: + */ + public static final int WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB = 0x20A9; + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_FRAMEBUFFER_SRGB_ARB = 0x8DB9; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_FRAMEBUFFER_SRGB_CAPABLE_ARB = 0x8DBA; + + private ARBFramebufferSRGB() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBGeometryShader4.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBGeometryShader4.java new file mode 100644 index 0000000..1e38b93 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBGeometryShader4.java @@ -0,0 +1,99 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBGeometryShader4 { + + /** + * Accepted by the <type> parameter of CreateShader and returned by the + * <params> parameter of GetShaderiv: + */ + public static final int GL_GEOMETRY_SHADER_ARB = 0x8DD9; + + /** + * Accepted by the <pname> parameter of ProgramParameteriEXT and + * GetProgramiv: + */ + public static final int GL_GEOMETRY_VERTICES_OUT_ARB = 0x8DDA, + GL_GEOMETRY_INPUT_TYPE_ARB = 0x8DDB, + GL_GEOMETRY_OUTPUT_TYPE_ARB = 0x8DDC; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB = 0x8C29, + GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB = 0x8DDD, + GL_MAX_VERTEX_VARYING_COMPONENTS_ARB = 0x8DDE, + GL_MAX_VARYING_COMPONENTS_ARB = 0x8B4B, + GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB = 0x8DDF, + GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB = 0x8DE0, + GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB = 0x8DE1; + + /** + * Accepted by the <mode> parameter of Begin, DrawArrays, + * MultiDrawArrays, DrawElements, MultiDrawElements, and + * DrawRangeElements: + */ + public static final int GL_LINES_ADJACENCY_ARB = 0xA, + GL_LINE_STRIP_ADJACENCY_ARB = 0xB, + GL_TRIANGLES_ADJACENCY_ARB = 0xC, + GL_TRIANGLE_STRIP_ADJACENCY_ARB = 0xD; + + /** + * Returned by CheckFramebufferStatusEXT: + */ + public static final int GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB = 0x8DA8, + GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB = 0x8DA9; + + /** + * Accepted by the <pname> parameter of GetFramebufferAttachment- + * ParameterivEXT: + */ + public static final int GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB = 0x8DA7, + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_ARB = 0x8CD4; + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, + * and by the <pname> parameter of GetIntegerv, GetFloatv, GetDoublev, + * and GetBooleanv: + */ + public static final int GL_PROGRAM_POINT_SIZE_ARB = 0x8642; + + private ARBGeometryShader4() {} + + public static void glProgramParameteriARB(int program, int pname, int value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramParameteriARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramParameteriARB(program, pname, value, function_pointer); + } + static native void nglProgramParameteriARB(int program, int pname, int value, long function_pointer); + + public static void glFramebufferTextureARB(int target, int attachment, int texture, int level) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFramebufferTextureARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglFramebufferTextureARB(target, attachment, texture, level, function_pointer); + } + static native void nglFramebufferTextureARB(int target, int attachment, int texture, int level, long function_pointer); + + public static void glFramebufferTextureLayerARB(int target, int attachment, int texture, int level, int layer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFramebufferTextureLayerARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglFramebufferTextureLayerARB(target, attachment, texture, level, layer, function_pointer); + } + static native void nglFramebufferTextureLayerARB(int target, int attachment, int texture, int level, int layer, long function_pointer); + + public static void glFramebufferTextureFaceARB(int target, int attachment, int texture, int level, int face) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFramebufferTextureFaceARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglFramebufferTextureFaceARB(target, attachment, texture, level, face, function_pointer); + } + static native void nglFramebufferTextureFaceARB(int target, int attachment, int texture, int level, int face, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBGetProgramBinary.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBGetProgramBinary.java new file mode 100644 index 0000000..ad563f6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBGetProgramBinary.java @@ -0,0 +1,41 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBGetProgramBinary { + + /** + * Accepted by the <pname> parameter of ProgramParameteri and + * GetProgramiv: + */ + public static final int GL_PROGRAM_BINARY_RETRIEVABLE_HINT = 0x8257; + + /** + * Accepted by the <pname> parameter of GetProgramiv: + */ + public static final int GL_PROGRAM_BINARY_LENGTH = 0x8741; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv and GetDoublev: + */ + public static final int GL_NUM_PROGRAM_BINARY_FORMATS = 0x87FE, + GL_PROGRAM_BINARY_FORMATS = 0x87FF; + + private ARBGetProgramBinary() {} + + public static void glGetProgramBinary(int program, IntBuffer length, IntBuffer binaryFormat, ByteBuffer binary) { + GL41.glGetProgramBinary(program, length, binaryFormat, binary); + } + + public static void glProgramBinary(int program, int binaryFormat, ByteBuffer binary) { + GL41.glProgramBinary(program, binaryFormat, binary); + } + + public static void glProgramParameteri(int program, int pname, int value) { + GL41.glProgramParameteri(program, pname, value); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBGpuShader5.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBGpuShader5.java new file mode 100644 index 0000000..345944d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBGpuShader5.java @@ -0,0 +1,26 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBGpuShader5 { + + /** + * Accepted by the <pname> parameter of GetProgramiv: + */ + public static final int GL_GEOMETRY_SHADER_INVOCATIONS = 0x887F; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * GetDoublev, and GetInteger64v: + */ + public static final int GL_MAX_GEOMETRY_SHADER_INVOCATIONS = 0x8E5A, + GL_MIN_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5B, + GL_MAX_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5C, + GL_FRAGMENT_INTERPOLATION_OFFSET_BITS = 0x8E5D, + GL_MAX_VERTEX_STREAMS = 0x8E71; + + private ARBGpuShader5() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBGpuShaderFp64.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBGpuShaderFp64.java new file mode 100644 index 0000000..53af909 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBGpuShaderFp64.java @@ -0,0 +1,250 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBGpuShaderFp64 { + + /** + * Returned in the <type> parameter of GetActiveUniform, and + * GetTransformFeedbackVarying: + */ + public static final int GL_DOUBLE = 0x140A, + GL_DOUBLE_VEC2 = 0x8FFC, + GL_DOUBLE_VEC3 = 0x8FFD, + GL_DOUBLE_VEC4 = 0x8FFE, + GL_DOUBLE_MAT2 = 0x8F46, + GL_DOUBLE_MAT3 = 0x8F47, + GL_DOUBLE_MAT4 = 0x8F48, + GL_DOUBLE_MAT2x3 = 0x8F49, + GL_DOUBLE_MAT2x4 = 0x8F4A, + GL_DOUBLE_MAT3x2 = 0x8F4B, + GL_DOUBLE_MAT3x4 = 0x8F4C, + GL_DOUBLE_MAT4x2 = 0x8F4D, + GL_DOUBLE_MAT4x3 = 0x8F4E; + + private ARBGpuShaderFp64() {} + + public static void glUniform1d(int location, double x) { + GL40.glUniform1d(location, x); + } + + public static void glUniform2d(int location, double x, double y) { + GL40.glUniform2d(location, x, y); + } + + public static void glUniform3d(int location, double x, double y, double z) { + GL40.glUniform3d(location, x, y, z); + } + + public static void glUniform4d(int location, double x, double y, double z, double w) { + GL40.glUniform4d(location, x, y, z, w); + } + + public static void glUniform1(int location, DoubleBuffer value) { + GL40.glUniform1(location, value); + } + + public static void glUniform2(int location, DoubleBuffer value) { + GL40.glUniform2(location, value); + } + + public static void glUniform3(int location, DoubleBuffer value) { + GL40.glUniform3(location, value); + } + + public static void glUniform4(int location, DoubleBuffer value) { + GL40.glUniform4(location, value); + } + + public static void glUniformMatrix2(int location, boolean transpose, DoubleBuffer value) { + GL40.glUniformMatrix2(location, transpose, value); + } + + public static void glUniformMatrix3(int location, boolean transpose, DoubleBuffer value) { + GL40.glUniformMatrix3(location, transpose, value); + } + + public static void glUniformMatrix4(int location, boolean transpose, DoubleBuffer value) { + GL40.glUniformMatrix4(location, transpose, value); + } + + public static void glUniformMatrix2x3(int location, boolean transpose, DoubleBuffer value) { + GL40.glUniformMatrix2x3(location, transpose, value); + } + + public static void glUniformMatrix2x4(int location, boolean transpose, DoubleBuffer value) { + GL40.glUniformMatrix2x4(location, transpose, value); + } + + public static void glUniformMatrix3x2(int location, boolean transpose, DoubleBuffer value) { + GL40.glUniformMatrix3x2(location, transpose, value); + } + + public static void glUniformMatrix3x4(int location, boolean transpose, DoubleBuffer value) { + GL40.glUniformMatrix3x4(location, transpose, value); + } + + public static void glUniformMatrix4x2(int location, boolean transpose, DoubleBuffer value) { + GL40.glUniformMatrix4x2(location, transpose, value); + } + + public static void glUniformMatrix4x3(int location, boolean transpose, DoubleBuffer value) { + GL40.glUniformMatrix4x3(location, transpose, value); + } + + public static void glGetUniform(int program, int location, DoubleBuffer params) { + GL40.glGetUniform(program, location, params); + } + + public static void glProgramUniform1dEXT(int program, int location, double x) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform1dEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform1dEXT(program, location, x, function_pointer); + } + static native void nglProgramUniform1dEXT(int program, int location, double x, long function_pointer); + + public static void glProgramUniform2dEXT(int program, int location, double x, double y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform2dEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform2dEXT(program, location, x, y, function_pointer); + } + static native void nglProgramUniform2dEXT(int program, int location, double x, double y, long function_pointer); + + public static void glProgramUniform3dEXT(int program, int location, double x, double y, double z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform3dEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform3dEXT(program, location, x, y, z, function_pointer); + } + static native void nglProgramUniform3dEXT(int program, int location, double x, double y, double z, long function_pointer); + + public static void glProgramUniform4dEXT(int program, int location, double x, double y, double z, double w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform4dEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform4dEXT(program, location, x, y, z, w, function_pointer); + } + static native void nglProgramUniform4dEXT(int program, int location, double x, double y, double z, double w, long function_pointer); + + public static void glProgramUniform1EXT(int program, int location, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform1dvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform1dvEXT(program, location, value.remaining(), MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform1dvEXT(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform2EXT(int program, int location, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform2dvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform2dvEXT(program, location, value.remaining() >> 1, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform2dvEXT(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform3EXT(int program, int location, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform3dvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform3dvEXT(program, location, value.remaining() / 3, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform3dvEXT(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform4EXT(int program, int location, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform4dvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform4dvEXT(program, location, value.remaining() >> 2, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform4dvEXT(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniformMatrix2EXT(int program, int location, boolean transpose, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix2dvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix2dvEXT(program, location, value.remaining() >> 2, transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix2dvEXT(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix3EXT(int program, int location, boolean transpose, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix3dvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix3dvEXT(program, location, value.remaining() / (3 * 3), transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix3dvEXT(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix4EXT(int program, int location, boolean transpose, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix4dvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix4dvEXT(program, location, value.remaining() >> 4, transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix4dvEXT(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix2x3EXT(int program, int location, boolean transpose, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix2x3dvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix2x3dvEXT(program, location, value.remaining() / (2 * 3), transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix2x3dvEXT(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix2x4EXT(int program, int location, boolean transpose, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix2x4dvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix2x4dvEXT(program, location, value.remaining() >> 3, transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix2x4dvEXT(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix3x2EXT(int program, int location, boolean transpose, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix3x2dvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix3x2dvEXT(program, location, value.remaining() / (3 * 2), transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix3x2dvEXT(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix3x4EXT(int program, int location, boolean transpose, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix3x4dvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix3x4dvEXT(program, location, value.remaining() / (3 * 4), transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix3x4dvEXT(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix4x2EXT(int program, int location, boolean transpose, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix4x2dvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix4x2dvEXT(program, location, value.remaining() >> 3, transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix4x2dvEXT(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix4x3EXT(int program, int location, boolean transpose, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix4x3dvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix4x3dvEXT(program, location, value.remaining() / (4 * 3), transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix4x3dvEXT(int program, int location, int value_count, boolean transpose, long value, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBHalfFloatPixel.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBHalfFloatPixel.java new file mode 100644 index 0000000..68c2912 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBHalfFloatPixel.java @@ -0,0 +1,21 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBHalfFloatPixel { + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, + * TexImage1D, TexImage2D, TexImage3D, GetTexImage, TexSubImage1D, + * TexSubImage2D, TexSubImage3D, GetHistogram, GetMinmax, + * ConvolutionFilter1D, ConvolutionFilter2D, GetConvolutionFilter, + * SeparableFilter2D, GetSeparableFilter, ColorTable, ColorSubTable, + * and GetColorTable: + */ + public static final int GL_HALF_FLOAT_ARB = 0x140B; + + private ARBHalfFloatPixel() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBHalfFloatVertex.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBHalfFloatVertex.java new file mode 100644 index 0000000..68c6b4c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBHalfFloatVertex.java @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBHalfFloatVertex { + + /** + * Accepted by the <type> argument of VertexPointer, NormalPointer, + * ColorPointer, SecondaryColorPointer, FogCoordPointer, TexCoordPointer, + * and VertexAttribPointer: + */ + public static final int GL_HALF_FLOAT = 0x140B; + + private ARBHalfFloatVertex() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBImaging.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBImaging.java new file mode 100644 index 0000000..645c97e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBImaging.java @@ -0,0 +1,1662 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +/** + *

+ * The GL12 imaging subset extension. + *

+ * @author cix_foo + * @version $Revision$ + * $Id$ + */ +public final class ARBImaging { + + public static final int GL_CONSTANT_COLOR = 0x8001, + GL_ONE_MINUS_CONSTANT_COLOR = 0x8002, + GL_CONSTANT_ALPHA = 0x8003, + GL_ONE_MINUS_CONSTANT_ALPHA = 0x8004, + GL_BLEND_COLOR = 0x8005, + GL_FUNC_ADD = 0x8006, + GL_MIN = 0x8007, + GL_MAX = 0x8008, + GL_BLEND_EQUATION = 0x8009, + GL_FUNC_SUBTRACT = 0x800A, + GL_FUNC_REVERSE_SUBTRACT = 0x800B, + GL_COLOR_MATRIX = 0x80B1, + GL_COLOR_MATRIX_STACK_DEPTH = 0x80B2, + GL_MAX_COLOR_MATRIX_STACK_DEPTH = 0x80B3, + GL_POST_COLOR_MATRIX_RED_SCALE = 0x80B4, + GL_POST_COLOR_MATRIX_GREEN_SCALE = 0x80B5, + GL_POST_COLOR_MATRIX_BLUE_SCALE = 0x80B6, + GL_POST_COLOR_MATRIX_ALPHA_SCALE = 0x80B7, + GL_POST_COLOR_MATRIX_RED_BIAS = 0x80B8, + GL_POST_COLOR_MATRIX_GREEN_BIAS = 0x80B9, + GL_POST_COLOR_MATRIX_BLUE_BIAS = 0x80BA, + GL_POST_COLOR_MATRIX_ALPHA_BIAS = 0x80BB, + GL_COLOR_TABLE = 0x80D0, + GL_POST_CONVOLUTION_COLOR_TABLE = 0x80D1, + GL_POST_COLOR_MATRIX_COLOR_TABLE = 0x80D2, + GL_PROXY_COLOR_TABLE = 0x80D3, + GL_PROXY_POST_CONVOLUTION_COLOR_TABLE = 0x80D4, + GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE = 0x80D5, + GL_COLOR_TABLE_SCALE = 0x80D6, + GL_COLOR_TABLE_BIAS = 0x80D7, + GL_COLOR_TABLE_FORMAT = 0x80D8, + GL_COLOR_TABLE_WIDTH = 0x80D9, + GL_COLOR_TABLE_RED_SIZE = 0x80DA, + GL_COLOR_TABLE_GREEN_SIZE = 0x80DB, + GL_COLOR_TABLE_BLUE_SIZE = 0x80DC, + GL_COLOR_TABLE_ALPHA_SIZE = 0x80DD, + GL_COLOR_TABLE_LUMINANCE_SIZE = 0x80DE, + GL_COLOR_TABLE_INTENSITY_SIZE = 0x80DF, + GL_CONVOLUTION_1D = 0x8010, + GL_CONVOLUTION_2D = 0x8011, + GL_SEPARABLE_2D = 0x8012, + GL_CONVOLUTION_BORDER_MODE = 0x8013, + GL_CONVOLUTION_FILTER_SCALE = 0x8014, + GL_CONVOLUTION_FILTER_BIAS = 0x8015, + GL_REDUCE = 0x8016, + GL_CONVOLUTION_FORMAT = 0x8017, + GL_CONVOLUTION_WIDTH = 0x8018, + GL_CONVOLUTION_HEIGHT = 0x8019, + GL_MAX_CONVOLUTION_WIDTH = 0x801A, + GL_MAX_CONVOLUTION_HEIGHT = 0x801B, + GL_POST_CONVOLUTION_RED_SCALE = 0x801C, + GL_POST_CONVOLUTION_GREEN_SCALE = 0x801D, + GL_POST_CONVOLUTION_BLUE_SCALE = 0x801E, + GL_POST_CONVOLUTION_ALPHA_SCALE = 0x801F, + GL_POST_CONVOLUTION_RED_BIAS = 0x8020, + GL_POST_CONVOLUTION_GREEN_BIAS = 0x8021, + GL_POST_CONVOLUTION_BLUE_BIAS = 0x8022, + GL_POST_CONVOLUTION_ALPHA_BIAS = 0x8023, + GL_IGNORE_BORDER = 0x8150, + GL_CONSTANT_BORDER = 0x8151, + GL_REPLICATE_BORDER = 0x8153, + GL_CONVOLUTION_BORDER_COLOR = 0x8154, + GL_HISTOGRAM = 0x8024, + GL_PROXY_HISTOGRAM = 0x8025, + GL_HISTOGRAM_WIDTH = 0x8026, + GL_HISTOGRAM_FORMAT = 0x8027, + GL_HISTOGRAM_RED_SIZE = 0x8028, + GL_HISTOGRAM_GREEN_SIZE = 0x8029, + GL_HISTOGRAM_BLUE_SIZE = 0x802A, + GL_HISTOGRAM_ALPHA_SIZE = 0x802B, + GL_HISTOGRAM_LUMINANCE_SIZE = 0x802C, + GL_HISTOGRAM_SINK = 0x802D, + GL_MINMAX = 0x802E, + GL_MINMAX_FORMAT = 0x802F, + GL_MINMAX_SINK = 0x8030, + GL_TABLE_TOO_LARGE = 0x8031; + + private ARBImaging() {} + + public static void glColorTable(int target, int internalFormat, int width, int format, int type, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorTable; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(data, 256); + nglColorTable(target, internalFormat, width, format, type, MemoryUtil.getAddress(data), function_pointer); + } + public static void glColorTable(int target, int internalFormat, int width, int format, int type, DoubleBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorTable; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(data, 256); + nglColorTable(target, internalFormat, width, format, type, MemoryUtil.getAddress(data), function_pointer); + } + public static void glColorTable(int target, int internalFormat, int width, int format, int type, FloatBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorTable; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(data, 256); + nglColorTable(target, internalFormat, width, format, type, MemoryUtil.getAddress(data), function_pointer); + } + static native void nglColorTable(int target, int internalFormat, int width, int format, int type, long data, long function_pointer); + public static void glColorTable(int target, int internalFormat, int width, int format, int type, long data_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorTable; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglColorTableBO(target, internalFormat, width, format, type, data_buffer_offset, function_pointer); + } + static native void nglColorTableBO(int target, int internalFormat, int width, int format, int type, long data_buffer_offset, long function_pointer); + + public static void glColorSubTable(int target, int start, int count, int format, int type, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorSubTable; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(data, 256); + nglColorSubTable(target, start, count, format, type, MemoryUtil.getAddress(data), function_pointer); + } + public static void glColorSubTable(int target, int start, int count, int format, int type, DoubleBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorSubTable; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(data, 256); + nglColorSubTable(target, start, count, format, type, MemoryUtil.getAddress(data), function_pointer); + } + public static void glColorSubTable(int target, int start, int count, int format, int type, FloatBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorSubTable; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(data, 256); + nglColorSubTable(target, start, count, format, type, MemoryUtil.getAddress(data), function_pointer); + } + static native void nglColorSubTable(int target, int start, int count, int format, int type, long data, long function_pointer); + public static void glColorSubTable(int target, int start, int count, int format, int type, long data_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorSubTable; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglColorSubTableBO(target, start, count, format, type, data_buffer_offset, function_pointer); + } + static native void nglColorSubTableBO(int target, int start, int count, int format, int type, long data_buffer_offset, long function_pointer); + + public static void glColorTableParameter(int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorTableParameteriv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglColorTableParameteriv(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglColorTableParameteriv(int target, int pname, long params, long function_pointer); + + public static void glColorTableParameter(int target, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorTableParameterfv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglColorTableParameterfv(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglColorTableParameterfv(int target, int pname, long params, long function_pointer); + + public static void glCopyColorSubTable(int target, int start, int x, int y, int width) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCopyColorSubTable; + BufferChecks.checkFunctionAddress(function_pointer); + nglCopyColorSubTable(target, start, x, y, width, function_pointer); + } + static native void nglCopyColorSubTable(int target, int start, int x, int y, int width, long function_pointer); + + public static void glCopyColorTable(int target, int internalformat, int x, int y, int width) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCopyColorTable; + BufferChecks.checkFunctionAddress(function_pointer); + nglCopyColorTable(target, internalformat, x, y, width, function_pointer); + } + static native void nglCopyColorTable(int target, int internalformat, int x, int y, int width, long function_pointer); + + public static void glGetColorTable(int target, int format, int type, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetColorTable; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(data, 256); + nglGetColorTable(target, format, type, MemoryUtil.getAddress(data), function_pointer); + } + public static void glGetColorTable(int target, int format, int type, DoubleBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetColorTable; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(data, 256); + nglGetColorTable(target, format, type, MemoryUtil.getAddress(data), function_pointer); + } + public static void glGetColorTable(int target, int format, int type, FloatBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetColorTable; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(data, 256); + nglGetColorTable(target, format, type, MemoryUtil.getAddress(data), function_pointer); + } + static native void nglGetColorTable(int target, int format, int type, long data, long function_pointer); + + public static void glGetColorTableParameter(int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetColorTableParameteriv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetColorTableParameteriv(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetColorTableParameteriv(int target, int pname, long params, long function_pointer); + + public static void glGetColorTableParameter(int target, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetColorTableParameterfv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetColorTableParameterfv(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetColorTableParameterfv(int target, int pname, long params, long function_pointer); + + public static void glBlendEquation(int mode) { + GL14.glBlendEquation(mode); + } + + public static void glBlendColor(float red, float green, float blue, float alpha) { + GL14.glBlendColor(red, green, blue, alpha); + } + + public static void glHistogram(int target, int width, int internalformat, boolean sink) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glHistogram; + BufferChecks.checkFunctionAddress(function_pointer); + nglHistogram(target, width, internalformat, sink, function_pointer); + } + static native void nglHistogram(int target, int width, int internalformat, boolean sink, long function_pointer); + + public static void glResetHistogram(int target) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glResetHistogram; + BufferChecks.checkFunctionAddress(function_pointer); + nglResetHistogram(target, function_pointer); + } + static native void nglResetHistogram(int target, long function_pointer); + + public static void glGetHistogram(int target, boolean reset, int format, int type, ByteBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetHistogram; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(values, 256); + nglGetHistogram(target, reset, format, type, MemoryUtil.getAddress(values), function_pointer); + } + public static void glGetHistogram(int target, boolean reset, int format, int type, DoubleBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetHistogram; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(values, 256); + nglGetHistogram(target, reset, format, type, MemoryUtil.getAddress(values), function_pointer); + } + public static void glGetHistogram(int target, boolean reset, int format, int type, FloatBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetHistogram; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(values, 256); + nglGetHistogram(target, reset, format, type, MemoryUtil.getAddress(values), function_pointer); + } + public static void glGetHistogram(int target, boolean reset, int format, int type, IntBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetHistogram; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(values, 256); + nglGetHistogram(target, reset, format, type, MemoryUtil.getAddress(values), function_pointer); + } + public static void glGetHistogram(int target, boolean reset, int format, int type, ShortBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetHistogram; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(values, 256); + nglGetHistogram(target, reset, format, type, MemoryUtil.getAddress(values), function_pointer); + } + static native void nglGetHistogram(int target, boolean reset, int format, int type, long values, long function_pointer); + public static void glGetHistogram(int target, boolean reset, int format, int type, long values_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetHistogram; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOenabled(caps); + nglGetHistogramBO(target, reset, format, type, values_buffer_offset, function_pointer); + } + static native void nglGetHistogramBO(int target, boolean reset, int format, int type, long values_buffer_offset, long function_pointer); + + public static void glGetHistogramParameter(int target, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetHistogramParameterfv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 256); + nglGetHistogramParameterfv(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetHistogramParameterfv(int target, int pname, long params, long function_pointer); + + public static void glGetHistogramParameter(int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetHistogramParameteriv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 256); + nglGetHistogramParameteriv(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetHistogramParameteriv(int target, int pname, long params, long function_pointer); + + public static void glMinmax(int target, int internalformat, boolean sink) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMinmax; + BufferChecks.checkFunctionAddress(function_pointer); + nglMinmax(target, internalformat, sink, function_pointer); + } + static native void nglMinmax(int target, int internalformat, boolean sink, long function_pointer); + + public static void glResetMinmax(int target) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glResetMinmax; + BufferChecks.checkFunctionAddress(function_pointer); + nglResetMinmax(target, function_pointer); + } + static native void nglResetMinmax(int target, long function_pointer); + + public static void glGetMinmax(int target, boolean reset, int format, int types, ByteBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMinmax; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(values, 4); + nglGetMinmax(target, reset, format, types, MemoryUtil.getAddress(values), function_pointer); + } + public static void glGetMinmax(int target, boolean reset, int format, int types, DoubleBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMinmax; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(values, 4); + nglGetMinmax(target, reset, format, types, MemoryUtil.getAddress(values), function_pointer); + } + public static void glGetMinmax(int target, boolean reset, int format, int types, FloatBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMinmax; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(values, 4); + nglGetMinmax(target, reset, format, types, MemoryUtil.getAddress(values), function_pointer); + } + public static void glGetMinmax(int target, boolean reset, int format, int types, IntBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMinmax; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(values, 4); + nglGetMinmax(target, reset, format, types, MemoryUtil.getAddress(values), function_pointer); + } + public static void glGetMinmax(int target, boolean reset, int format, int types, ShortBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMinmax; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(values, 4); + nglGetMinmax(target, reset, format, types, MemoryUtil.getAddress(values), function_pointer); + } + static native void nglGetMinmax(int target, boolean reset, int format, int types, long values, long function_pointer); + public static void glGetMinmax(int target, boolean reset, int format, int types, long values_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMinmax; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOenabled(caps); + nglGetMinmaxBO(target, reset, format, types, values_buffer_offset, function_pointer); + } + static native void nglGetMinmaxBO(int target, boolean reset, int format, int types, long values_buffer_offset, long function_pointer); + + public static void glGetMinmaxParameter(int target, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMinmaxParameterfv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetMinmaxParameterfv(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetMinmaxParameterfv(int target, int pname, long params, long function_pointer); + + public static void glGetMinmaxParameter(int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMinmaxParameteriv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetMinmaxParameteriv(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetMinmaxParameteriv(int target, int pname, long params, long function_pointer); + + public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, ByteBuffer image) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glConvolutionFilter1D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(image, GLChecks.calculateImageStorage(image, format, type, width, 1, 1)); + nglConvolutionFilter1D(target, internalformat, width, format, type, MemoryUtil.getAddress(image), function_pointer); + } + public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, DoubleBuffer image) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glConvolutionFilter1D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(image, GLChecks.calculateImageStorage(image, format, type, width, 1, 1)); + nglConvolutionFilter1D(target, internalformat, width, format, type, MemoryUtil.getAddress(image), function_pointer); + } + public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, FloatBuffer image) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glConvolutionFilter1D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(image, GLChecks.calculateImageStorage(image, format, type, width, 1, 1)); + nglConvolutionFilter1D(target, internalformat, width, format, type, MemoryUtil.getAddress(image), function_pointer); + } + public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, IntBuffer image) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glConvolutionFilter1D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(image, GLChecks.calculateImageStorage(image, format, type, width, 1, 1)); + nglConvolutionFilter1D(target, internalformat, width, format, type, MemoryUtil.getAddress(image), function_pointer); + } + public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, ShortBuffer image) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glConvolutionFilter1D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(image, GLChecks.calculateImageStorage(image, format, type, width, 1, 1)); + nglConvolutionFilter1D(target, internalformat, width, format, type, MemoryUtil.getAddress(image), function_pointer); + } + static native void nglConvolutionFilter1D(int target, int internalformat, int width, int format, int type, long image, long function_pointer); + public static void glConvolutionFilter1D(int target, int internalformat, int width, int format, int type, long image_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glConvolutionFilter1D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglConvolutionFilter1DBO(target, internalformat, width, format, type, image_buffer_offset, function_pointer); + } + static native void nglConvolutionFilter1DBO(int target, int internalformat, int width, int format, int type, long image_buffer_offset, long function_pointer); + + public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, ByteBuffer image) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glConvolutionFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(image, GLChecks.calculateImageStorage(image, format, type, width, height, 1)); + nglConvolutionFilter2D(target, internalformat, width, height, format, type, MemoryUtil.getAddress(image), function_pointer); + } + public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, IntBuffer image) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glConvolutionFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(image, GLChecks.calculateImageStorage(image, format, type, width, height, 1)); + nglConvolutionFilter2D(target, internalformat, width, height, format, type, MemoryUtil.getAddress(image), function_pointer); + } + public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, ShortBuffer image) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glConvolutionFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(image, GLChecks.calculateImageStorage(image, format, type, width, height, 1)); + nglConvolutionFilter2D(target, internalformat, width, height, format, type, MemoryUtil.getAddress(image), function_pointer); + } + static native void nglConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, long image, long function_pointer); + public static void glConvolutionFilter2D(int target, int internalformat, int width, int height, int format, int type, long image_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glConvolutionFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglConvolutionFilter2DBO(target, internalformat, width, height, format, type, image_buffer_offset, function_pointer); + } + static native void nglConvolutionFilter2DBO(int target, int internalformat, int width, int height, int format, int type, long image_buffer_offset, long function_pointer); + + public static void glConvolutionParameterf(int target, int pname, float params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glConvolutionParameterf; + BufferChecks.checkFunctionAddress(function_pointer); + nglConvolutionParameterf(target, pname, params, function_pointer); + } + static native void nglConvolutionParameterf(int target, int pname, float params, long function_pointer); + + public static void glConvolutionParameter(int target, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glConvolutionParameterfv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglConvolutionParameterfv(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglConvolutionParameterfv(int target, int pname, long params, long function_pointer); + + public static void glConvolutionParameteri(int target, int pname, int params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glConvolutionParameteri; + BufferChecks.checkFunctionAddress(function_pointer); + nglConvolutionParameteri(target, pname, params, function_pointer); + } + static native void nglConvolutionParameteri(int target, int pname, int params, long function_pointer); + + public static void glConvolutionParameter(int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glConvolutionParameteriv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglConvolutionParameteriv(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglConvolutionParameteriv(int target, int pname, long params, long function_pointer); + + public static void glCopyConvolutionFilter1D(int target, int internalformat, int x, int y, int width) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCopyConvolutionFilter1D; + BufferChecks.checkFunctionAddress(function_pointer); + nglCopyConvolutionFilter1D(target, internalformat, x, y, width, function_pointer); + } + static native void nglCopyConvolutionFilter1D(int target, int internalformat, int x, int y, int width, long function_pointer); + + public static void glCopyConvolutionFilter2D(int target, int internalformat, int x, int y, int width, int height) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCopyConvolutionFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + nglCopyConvolutionFilter2D(target, internalformat, x, y, width, height, function_pointer); + } + static native void nglCopyConvolutionFilter2D(int target, int internalformat, int x, int y, int width, int height, long function_pointer); + + public static void glGetConvolutionFilter(int target, int format, int type, ByteBuffer image) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetConvolutionFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(image); + nglGetConvolutionFilter(target, format, type, MemoryUtil.getAddress(image), function_pointer); + } + public static void glGetConvolutionFilter(int target, int format, int type, DoubleBuffer image) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetConvolutionFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(image); + nglGetConvolutionFilter(target, format, type, MemoryUtil.getAddress(image), function_pointer); + } + public static void glGetConvolutionFilter(int target, int format, int type, FloatBuffer image) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetConvolutionFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(image); + nglGetConvolutionFilter(target, format, type, MemoryUtil.getAddress(image), function_pointer); + } + public static void glGetConvolutionFilter(int target, int format, int type, IntBuffer image) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetConvolutionFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(image); + nglGetConvolutionFilter(target, format, type, MemoryUtil.getAddress(image), function_pointer); + } + public static void glGetConvolutionFilter(int target, int format, int type, ShortBuffer image) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetConvolutionFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(image); + nglGetConvolutionFilter(target, format, type, MemoryUtil.getAddress(image), function_pointer); + } + static native void nglGetConvolutionFilter(int target, int format, int type, long image, long function_pointer); + public static void glGetConvolutionFilter(int target, int format, int type, long image_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetConvolutionFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOenabled(caps); + nglGetConvolutionFilterBO(target, format, type, image_buffer_offset, function_pointer); + } + static native void nglGetConvolutionFilterBO(int target, int format, int type, long image_buffer_offset, long function_pointer); + + public static void glGetConvolutionParameter(int target, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetConvolutionParameterfv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetConvolutionParameterfv(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetConvolutionParameterfv(int target, int pname, long params, long function_pointer); + + public static void glGetConvolutionParameter(int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetConvolutionParameteriv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetConvolutionParameteriv(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetConvolutionParameteriv(int target, int pname, long params, long function_pointer); + + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, ByteBuffer row, ByteBuffer column) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSeparableFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + nglSeparableFilter2D(target, internalformat, width, height, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), function_pointer); + } + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, ByteBuffer row, DoubleBuffer column) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSeparableFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + nglSeparableFilter2D(target, internalformat, width, height, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), function_pointer); + } + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, ByteBuffer row, FloatBuffer column) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSeparableFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + nglSeparableFilter2D(target, internalformat, width, height, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), function_pointer); + } + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, ByteBuffer row, IntBuffer column) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSeparableFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + nglSeparableFilter2D(target, internalformat, width, height, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), function_pointer); + } + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, ByteBuffer row, ShortBuffer column) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSeparableFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + nglSeparableFilter2D(target, internalformat, width, height, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), function_pointer); + } + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, DoubleBuffer row, ByteBuffer column) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSeparableFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + nglSeparableFilter2D(target, internalformat, width, height, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), function_pointer); + } + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, DoubleBuffer row, DoubleBuffer column) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSeparableFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + nglSeparableFilter2D(target, internalformat, width, height, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), function_pointer); + } + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, DoubleBuffer row, FloatBuffer column) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSeparableFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + nglSeparableFilter2D(target, internalformat, width, height, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), function_pointer); + } + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, DoubleBuffer row, IntBuffer column) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSeparableFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + nglSeparableFilter2D(target, internalformat, width, height, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), function_pointer); + } + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, DoubleBuffer row, ShortBuffer column) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSeparableFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + nglSeparableFilter2D(target, internalformat, width, height, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), function_pointer); + } + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, FloatBuffer row, ByteBuffer column) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSeparableFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + nglSeparableFilter2D(target, internalformat, width, height, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), function_pointer); + } + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, FloatBuffer row, DoubleBuffer column) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSeparableFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + nglSeparableFilter2D(target, internalformat, width, height, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), function_pointer); + } + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, FloatBuffer row, FloatBuffer column) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSeparableFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + nglSeparableFilter2D(target, internalformat, width, height, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), function_pointer); + } + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, FloatBuffer row, IntBuffer column) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSeparableFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + nglSeparableFilter2D(target, internalformat, width, height, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), function_pointer); + } + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, FloatBuffer row, ShortBuffer column) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSeparableFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + nglSeparableFilter2D(target, internalformat, width, height, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), function_pointer); + } + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, IntBuffer row, ByteBuffer column) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSeparableFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + nglSeparableFilter2D(target, internalformat, width, height, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), function_pointer); + } + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, IntBuffer row, DoubleBuffer column) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSeparableFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + nglSeparableFilter2D(target, internalformat, width, height, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), function_pointer); + } + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, IntBuffer row, FloatBuffer column) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSeparableFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + nglSeparableFilter2D(target, internalformat, width, height, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), function_pointer); + } + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, IntBuffer row, IntBuffer column) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSeparableFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + nglSeparableFilter2D(target, internalformat, width, height, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), function_pointer); + } + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, IntBuffer row, ShortBuffer column) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSeparableFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + nglSeparableFilter2D(target, internalformat, width, height, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), function_pointer); + } + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, ShortBuffer row, ByteBuffer column) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSeparableFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + nglSeparableFilter2D(target, internalformat, width, height, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), function_pointer); + } + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, ShortBuffer row, DoubleBuffer column) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSeparableFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + nglSeparableFilter2D(target, internalformat, width, height, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), function_pointer); + } + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, ShortBuffer row, FloatBuffer column) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSeparableFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + nglSeparableFilter2D(target, internalformat, width, height, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), function_pointer); + } + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, ShortBuffer row, IntBuffer column) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSeparableFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + nglSeparableFilter2D(target, internalformat, width, height, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), function_pointer); + } + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, ShortBuffer row, ShortBuffer column) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSeparableFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + nglSeparableFilter2D(target, internalformat, width, height, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), function_pointer); + } + static native void nglSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, long row, long column, long function_pointer); + public static void glSeparableFilter2D(int target, int internalformat, int width, int height, int format, int type, long row_buffer_offset, long column_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSeparableFilter2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglSeparableFilter2DBO(target, internalformat, width, height, format, type, row_buffer_offset, column_buffer_offset, function_pointer); + } + static native void nglSeparableFilter2DBO(int target, int internalformat, int width, int height, int format, int type, long row_buffer_offset, long column_buffer_offset, long function_pointer); + + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ByteBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ByteBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ByteBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ByteBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, DoubleBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, DoubleBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, DoubleBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, DoubleBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, IntBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, IntBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, IntBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, IntBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ShortBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ShortBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ShortBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ByteBuffer row, ShortBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, DoubleBuffer row, ByteBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, DoubleBuffer row, ByteBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, DoubleBuffer row, ByteBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, DoubleBuffer row, ByteBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, DoubleBuffer row, DoubleBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, DoubleBuffer row, DoubleBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, DoubleBuffer row, DoubleBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, DoubleBuffer row, DoubleBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, DoubleBuffer row, IntBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, DoubleBuffer row, IntBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, DoubleBuffer row, IntBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, DoubleBuffer row, IntBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, DoubleBuffer row, ShortBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, DoubleBuffer row, ShortBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, DoubleBuffer row, ShortBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, DoubleBuffer row, ShortBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ByteBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ByteBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ByteBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ByteBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, DoubleBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, DoubleBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, DoubleBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, DoubleBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, IntBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, IntBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, IntBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, IntBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ShortBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ShortBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ShortBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, FloatBuffer row, ShortBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ByteBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ByteBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ByteBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ByteBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, DoubleBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, DoubleBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, DoubleBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, DoubleBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, IntBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, IntBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, IntBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, IntBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ShortBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ShortBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ShortBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, IntBuffer row, ShortBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ByteBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ByteBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ByteBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ByteBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, DoubleBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, DoubleBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, DoubleBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, DoubleBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, IntBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, IntBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, IntBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, IntBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ShortBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ShortBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ShortBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetSeparableFilter(int target, int format, int type, ShortBuffer row, ShortBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetSeparableFilter(target, format, type, MemoryUtil.getAddress(row), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + static native void nglGetSeparableFilter(int target, int format, int type, long row, long column, long span, long function_pointer); + public static void glGetSeparableFilter(int target, int format, int type, long row_buffer_offset, long column_buffer_offset, long span_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSeparableFilter; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOenabled(caps); + nglGetSeparableFilterBO(target, format, type, row_buffer_offset, column_buffer_offset, span_buffer_offset, function_pointer); + } + static native void nglGetSeparableFilterBO(int target, int format, int type, long row_buffer_offset, long column_buffer_offset, long span_buffer_offset, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBIndirectParameters.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBIndirectParameters.java new file mode 100644 index 0000000..f2b1436 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBIndirectParameters.java @@ -0,0 +1,81 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBIndirectParameters { + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, + * GetBufferPointerv, MapBufferRange, FlushMappedBufferRange, + * GetBufferParameteriv, and CopyBufferSubData: + */ + public static final int GL_PARAMETER_BUFFER_ARB = 0x80EE; + + /** + * Accepted by the <value> parameter of GetIntegerv, GetBooleanv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_PARAMETER_BUFFER_BINDING_ARB = 0x80EF; + + private ARBIndirectParameters() {} + + public static void glMultiDrawArraysIndirectCountARB(int mode, ByteBuffer indirect, long drawcount, int maxdrawcount, int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiDrawArraysIndirectCountARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureIndirectBOdisabled(caps); + BufferChecks.checkBuffer(indirect, (stride == 0 ? 4 * 4 : stride) * maxdrawcount); + nglMultiDrawArraysIndirectCountARB(mode, MemoryUtil.getAddress(indirect), drawcount, maxdrawcount, stride, function_pointer); + } + static native void nglMultiDrawArraysIndirectCountARB(int mode, long indirect, long drawcount, int maxdrawcount, int stride, long function_pointer); + public static void glMultiDrawArraysIndirectCountARB(int mode, long indirect_buffer_offset, long drawcount, int maxdrawcount, int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiDrawArraysIndirectCountARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureIndirectBOenabled(caps); + nglMultiDrawArraysIndirectCountARBBO(mode, indirect_buffer_offset, drawcount, maxdrawcount, stride, function_pointer); + } + static native void nglMultiDrawArraysIndirectCountARBBO(int mode, long indirect_buffer_offset, long drawcount, int maxdrawcount, int stride, long function_pointer); + + /** Overloads glMultiDrawArraysIndirectCountARB. */ + public static void glMultiDrawArraysIndirectCountARB(int mode, IntBuffer indirect, long drawcount, int maxdrawcount, int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiDrawArraysIndirectCountARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureIndirectBOdisabled(caps); + BufferChecks.checkBuffer(indirect, (stride == 0 ? 4 : stride >> 2) * maxdrawcount); + nglMultiDrawArraysIndirectCountARB(mode, MemoryUtil.getAddress(indirect), drawcount, maxdrawcount, stride, function_pointer); + } + + public static void glMultiDrawElementsIndirectCountARB(int mode, int type, ByteBuffer indirect, long drawcount, int maxdrawcount, int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiDrawElementsIndirectCountARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureIndirectBOdisabled(caps); + BufferChecks.checkBuffer(indirect, (stride == 0 ? 5 * 4 : stride) * maxdrawcount); + nglMultiDrawElementsIndirectCountARB(mode, type, MemoryUtil.getAddress(indirect), drawcount, maxdrawcount, stride, function_pointer); + } + static native void nglMultiDrawElementsIndirectCountARB(int mode, int type, long indirect, long drawcount, int maxdrawcount, int stride, long function_pointer); + public static void glMultiDrawElementsIndirectCountARB(int mode, int type, long indirect_buffer_offset, long drawcount, int maxdrawcount, int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiDrawElementsIndirectCountARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureIndirectBOenabled(caps); + nglMultiDrawElementsIndirectCountARBBO(mode, type, indirect_buffer_offset, drawcount, maxdrawcount, stride, function_pointer); + } + static native void nglMultiDrawElementsIndirectCountARBBO(int mode, int type, long indirect_buffer_offset, long drawcount, int maxdrawcount, int stride, long function_pointer); + + /** Overloads glMultiDrawElementsIndirectCountARB. */ + public static void glMultiDrawElementsIndirectCountARB(int mode, int type, IntBuffer indirect, long drawcount, int maxdrawcount, int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiDrawElementsIndirectCountARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureIndirectBOdisabled(caps); + BufferChecks.checkBuffer(indirect, (stride == 0 ? 5 : stride >> 2) * maxdrawcount); + nglMultiDrawElementsIndirectCountARB(mode, type, MemoryUtil.getAddress(indirect), drawcount, maxdrawcount, stride, function_pointer); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBInstancedArrays.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBInstancedArrays.java new file mode 100644 index 0000000..5637002 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBInstancedArrays.java @@ -0,0 +1,25 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBInstancedArrays { + + /** + * Accepted by the <pname> parameters of GetVertexAttribdv, + * GetVertexAttribfv, and GetVertexAttribiv: + */ + public static final int GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB = 0x88FE; + + private ARBInstancedArrays() {} + + public static void glVertexAttribDivisorARB(int index, int divisor) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribDivisorARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribDivisorARB(index, divisor, function_pointer); + } + static native void nglVertexAttribDivisorARB(int index, int divisor, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBInternalformatQuery.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBInternalformatQuery.java new file mode 100644 index 0000000..750ee51 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBInternalformatQuery.java @@ -0,0 +1,25 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBInternalformatQuery { + + /** + * Accepted by the <pname> parameter of GetInternalformativ: + */ + public static final int GL_NUM_SAMPLE_COUNTS = 0x9380; + + private ARBInternalformatQuery() {} + + public static void glGetInternalformat(int target, int internalformat, int pname, IntBuffer params) { + GL42.glGetInternalformat(target, internalformat, pname, params); + } + + /** Overloads glGetInternalformativ. */ + public static int glGetInternalformat(int target, int internalformat, int pname) { + return GL42.glGetInternalformat(target, internalformat, pname); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBInternalformatQuery2.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBInternalformatQuery2.java new file mode 100644 index 0000000..bbb79fa --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBInternalformatQuery2.java @@ -0,0 +1,150 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBInternalformatQuery2 { + + /** + * Accepted by the <target> parameter of GetInternalformativ + * and GetInternalformati64v: + */ + public static final int GL_TEXTURE_1D = 0xDE0, + GL_TEXTURE_1D_ARRAY = 0x8C18, + GL_TEXTURE_2D = 0xDE1, + GL_TEXTURE_2D_ARRAY = 0x8C1A, + GL_TEXTURE_3D = 0x806F, + GL_TEXTURE_CUBE_MAP = 0x8513, + GL_TEXTURE_CUBE_MAP_ARRAY = 0x9009, + GL_TEXTURE_RECTANGLE = 0x84F5, + GL_TEXTURE_BUFFER = 0x8C2A, + GL_RENDERBUFFER = 0x8D41, + GL_TEXTURE_2D_MULTISAMPLE = 0x9100, + GL_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9102; + + /** + * Accepted by the <pname> parameter of GetInternalformativ + * and GetInternalformati64v: + */ + public static final int GL_SAMPLES = 0x80A9, + GL_NUM_SAMPLE_COUNTS = 0x9380, + GL_INTERNALFORMAT_SUPPORTED = 0x826F, + GL_INTERNALFORMAT_PREFERRED = 0x8270, + GL_INTERNALFORMAT_RED_SIZE = 0x8271, + GL_INTERNALFORMAT_GREEN_SIZE = 0x8272, + GL_INTERNALFORMAT_BLUE_SIZE = 0x8273, + GL_INTERNALFORMAT_ALPHA_SIZE = 0x8274, + GL_INTERNALFORMAT_DEPTH_SIZE = 0x8275, + GL_INTERNALFORMAT_STENCIL_SIZE = 0x8276, + GL_INTERNALFORMAT_SHARED_SIZE = 0x8277, + GL_INTERNALFORMAT_RED_TYPE = 0x8278, + GL_INTERNALFORMAT_GREEN_TYPE = 0x8279, + GL_INTERNALFORMAT_BLUE_TYPE = 0x827A, + GL_INTERNALFORMAT_ALPHA_TYPE = 0x827B, + GL_INTERNALFORMAT_DEPTH_TYPE = 0x827C, + GL_INTERNALFORMAT_STENCIL_TYPE = 0x827D, + GL_MAX_WIDTH = 0x827E, + GL_MAX_HEIGHT = 0x827F, + GL_MAX_DEPTH = 0x8280, + GL_MAX_LAYERS = 0x8281, + GL_MAX_COMBINED_DIMENSIONS = 0x8282, + GL_COLOR_COMPONENTS = 0x8283, + GL_DEPTH_COMPONENTS = 0x8284, + GL_STENCIL_COMPONENTS = 0x8285, + GL_COLOR_RENDERABLE = 0x8286, + GL_DEPTH_RENDERABLE = 0x8287, + GL_STENCIL_RENDERABLE = 0x8288, + GL_FRAMEBUFFER_RENDERABLE = 0x8289, + GL_FRAMEBUFFER_RENDERABLE_LAYERED = 0x828A, + GL_FRAMEBUFFER_BLEND = 0x828B, + GL_READ_PIXELS = 0x828C, + GL_READ_PIXELS_FORMAT = 0x828D, + GL_READ_PIXELS_TYPE = 0x828E, + GL_TEXTURE_IMAGE_FORMAT = 0x828F, + GL_TEXTURE_IMAGE_TYPE = 0x8290, + GL_GET_TEXTURE_IMAGE_FORMAT = 0x8291, + GL_GET_TEXTURE_IMAGE_TYPE = 0x8292, + GL_MIPMAP = 0x8293, + GL_MANUAL_GENERATE_MIPMAP = 0x8294, + GL_AUTO_GENERATE_MIPMAP = 0x8295, + GL_COLOR_ENCODING = 0x8296, + GL_SRGB_READ = 0x8297, + GL_SRGB_WRITE = 0x8298, + GL_SRGB_DECODE_ARB = 0x8299, + GL_FILTER = 0x829A, + GL_VERTEX_TEXTURE = 0x829B, + GL_TESS_CONTROL_TEXTURE = 0x829C, + GL_TESS_EVALUATION_TEXTURE = 0x829D, + GL_GEOMETRY_TEXTURE = 0x829E, + GL_FRAGMENT_TEXTURE = 0x829F, + GL_COMPUTE_TEXTURE = 0x82A0, + GL_TEXTURE_SHADOW = 0x82A1, + GL_TEXTURE_GATHER = 0x82A2, + GL_TEXTURE_GATHER_SHADOW = 0x82A3, + GL_SHADER_IMAGE_LOAD = 0x82A4, + GL_SHADER_IMAGE_STORE = 0x82A5, + GL_SHADER_IMAGE_ATOMIC = 0x82A6, + GL_IMAGE_TEXEL_SIZE = 0x82A7, + GL_IMAGE_COMPATIBILITY_CLASS = 0x82A8, + GL_IMAGE_PIXEL_FORMAT = 0x82A9, + GL_IMAGE_PIXEL_TYPE = 0x82AA, + GL_IMAGE_FORMAT_COMPATIBILITY_TYPE = 0x90C7, + GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST = 0x82AC, + GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST = 0x82AD, + GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE = 0x82AE, + GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE = 0x82AF, + GL_TEXTURE_COMPRESSED = 0x86A1, + GL_TEXTURE_COMPRESSED_BLOCK_WIDTH = 0x82B1, + GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT = 0x82B2, + GL_TEXTURE_COMPRESSED_BLOCK_SIZE = 0x82B3, + GL_CLEAR_BUFFER = 0x82B4, + GL_TEXTURE_VIEW = 0x82B5, + GL_VIEW_COMPATIBILITY_CLASS = 0x82B6; + + /** + * Returned as possible responses for various <pname> queries + * to GetInternalformativ and GetInternalformati64v + */ + public static final int GL_FULL_SUPPORT = 0x82B7, + GL_CAVEAT_SUPPORT = 0x82B8, + GL_IMAGE_CLASS_4_X_32 = 0x82B9, + GL_IMAGE_CLASS_2_X_32 = 0x82BA, + GL_IMAGE_CLASS_1_X_32 = 0x82BB, + GL_IMAGE_CLASS_4_X_16 = 0x82BC, + GL_IMAGE_CLASS_2_X_16 = 0x82BD, + GL_IMAGE_CLASS_1_X_16 = 0x82BE, + GL_IMAGE_CLASS_4_X_8 = 0x82BF, + GL_IMAGE_CLASS_2_X_8 = 0x82C0, + GL_IMAGE_CLASS_1_X_8 = 0x82C1, + GL_IMAGE_CLASS_11_11_10 = 0x82C2, + GL_IMAGE_CLASS_10_10_10_2 = 0x82C3, + GL_VIEW_CLASS_128_BITS = 0x82C4, + GL_VIEW_CLASS_96_BITS = 0x82C5, + GL_VIEW_CLASS_64_BITS = 0x82C6, + GL_VIEW_CLASS_48_BITS = 0x82C7, + GL_VIEW_CLASS_32_BITS = 0x82C8, + GL_VIEW_CLASS_24_BITS = 0x82C9, + GL_VIEW_CLASS_16_BITS = 0x82CA, + GL_VIEW_CLASS_8_BITS = 0x82CB, + GL_VIEW_CLASS_S3TC_DXT1_RGB = 0x82CC, + GL_VIEW_CLASS_S3TC_DXT1_RGBA = 0x82CD, + GL_VIEW_CLASS_S3TC_DXT3_RGBA = 0x82CE, + GL_VIEW_CLASS_S3TC_DXT5_RGBA = 0x82CF, + GL_VIEW_CLASS_RGTC1_RED = 0x82D0, + GL_VIEW_CLASS_RGTC2_RG = 0x82D1, + GL_VIEW_CLASS_BPTC_UNORM = 0x82D2, + GL_VIEW_CLASS_BPTC_FLOAT = 0x82D3; + + private ARBInternalformatQuery2() {} + + public static void glGetInternalformat(int target, int internalformat, int pname, LongBuffer params) { + GL43.glGetInternalformat(target, internalformat, pname, params); + } + + /** Overloads glGetInternalformati64v. */ + public static long glGetInternalformati64(int target, int internalformat, int pname) { + return GL43.glGetInternalformati64(target, internalformat, pname); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBInvalidateSubdata.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBInvalidateSubdata.java new file mode 100644 index 0000000..e923946 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBInvalidateSubdata.java @@ -0,0 +1,35 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBInvalidateSubdata { + + private ARBInvalidateSubdata() {} + + public static void glInvalidateTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth) { + GL43.glInvalidateTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth); + } + + public static void glInvalidateTexImage(int texture, int level) { + GL43.glInvalidateTexImage(texture, level); + } + + public static void glInvalidateBufferSubData(int buffer, long offset, long length) { + GL43.glInvalidateBufferSubData(buffer, offset, length); + } + + public static void glInvalidateBufferData(int buffer) { + GL43.glInvalidateBufferData(buffer); + } + + public static void glInvalidateFramebuffer(int target, IntBuffer attachments) { + GL43.glInvalidateFramebuffer(target, attachments); + } + + public static void glInvalidateSubFramebuffer(int target, IntBuffer attachments, int x, int y, int width, int height) { + GL43.glInvalidateSubFramebuffer(target, attachments, x, y, width, height); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBMapBufferAlignment.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBMapBufferAlignment.java new file mode 100644 index 0000000..101517a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBMapBufferAlignment.java @@ -0,0 +1,17 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBMapBufferAlignment { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + public static final int GL_MIN_MAP_BUFFER_ALIGNMENT = 0x90BC; + + private ARBMapBufferAlignment() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBMapBufferRange.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBMapBufferRange.java new file mode 100644 index 0000000..718d94c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBMapBufferRange.java @@ -0,0 +1,43 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBMapBufferRange { + + /** + * Accepted by the <access> parameter of MapBufferRange: + */ + public static final int GL_MAP_READ_BIT = 0x1, + GL_MAP_WRITE_BIT = 0x2, + GL_MAP_INVALIDATE_RANGE_BIT = 0x4, + GL_MAP_INVALIDATE_BUFFER_BIT = 0x8, + GL_MAP_FLUSH_EXPLICIT_BIT = 0x10, + GL_MAP_UNSYNCHRONIZED_BIT = 0x20; + + private ARBMapBufferRange() {} + + /** + * glMapBufferRange maps a GL buffer object range to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapBufferRange like this: + *

+ * ByteBuffer mapped_buffer; mapped_buffer = glMapBufferRange(..., ..., ..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBufferRange(..., ..., ..., ..., mapped_buffer); + *

+ * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + *

+ * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. + *

+ * @return A ByteBuffer representing the mapped buffer memory. + */ + public static ByteBuffer glMapBufferRange(int target, long offset, long length, int access, ByteBuffer old_buffer) { + return GL30.glMapBufferRange(target, offset, length, access, old_buffer); + } + + public static void glFlushMappedBufferRange(int target, long offset, long length) { + GL30.glFlushMappedBufferRange(target, offset, length); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBMatrixPalette.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBMatrixPalette.java new file mode 100644 index 0000000..09ad0a9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBMatrixPalette.java @@ -0,0 +1,94 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBMatrixPalette { + + public static final int GL_MATRIX_PALETTE_ARB = 0x8840, + GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB = 0x8841, + GL_MAX_PALETTE_MATRICES_ARB = 0x8842, + GL_CURRENT_PALETTE_MATRIX_ARB = 0x8843, + GL_MATRIX_INDEX_ARRAY_ARB = 0x8844, + GL_CURRENT_MATRIX_INDEX_ARB = 0x8845, + GL_MATRIX_INDEX_ARRAY_SIZE_ARB = 0x8846, + GL_MATRIX_INDEX_ARRAY_TYPE_ARB = 0x8847, + GL_MATRIX_INDEX_ARRAY_STRIDE_ARB = 0x8848, + GL_MATRIX_INDEX_ARRAY_POINTER_ARB = 0x8849; + + private ARBMatrixPalette() {} + + public static void glCurrentPaletteMatrixARB(int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCurrentPaletteMatrixARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglCurrentPaletteMatrixARB(index, function_pointer); + } + static native void nglCurrentPaletteMatrixARB(int index, long function_pointer); + + public static void glMatrixIndexPointerARB(int size, int stride, ByteBuffer pPointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMatrixIndexPointerARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pPointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).ARB_matrix_palette_glMatrixIndexPointerARB_pPointer = pPointer; + nglMatrixIndexPointerARB(size, GL11.GL_UNSIGNED_BYTE, stride, MemoryUtil.getAddress(pPointer), function_pointer); + } + public static void glMatrixIndexPointerARB(int size, int stride, IntBuffer pPointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMatrixIndexPointerARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pPointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).ARB_matrix_palette_glMatrixIndexPointerARB_pPointer = pPointer; + nglMatrixIndexPointerARB(size, GL11.GL_UNSIGNED_INT, stride, MemoryUtil.getAddress(pPointer), function_pointer); + } + public static void glMatrixIndexPointerARB(int size, int stride, ShortBuffer pPointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMatrixIndexPointerARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pPointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).ARB_matrix_palette_glMatrixIndexPointerARB_pPointer = pPointer; + nglMatrixIndexPointerARB(size, GL11.GL_UNSIGNED_SHORT, stride, MemoryUtil.getAddress(pPointer), function_pointer); + } + static native void nglMatrixIndexPointerARB(int size, int type, int stride, long pPointer, long function_pointer); + public static void glMatrixIndexPointerARB(int size, int type, int stride, long pPointer_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMatrixIndexPointerARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOenabled(caps); + nglMatrixIndexPointerARBBO(size, type, stride, pPointer_buffer_offset, function_pointer); + } + static native void nglMatrixIndexPointerARBBO(int size, int type, int stride, long pPointer_buffer_offset, long function_pointer); + + public static void glMatrixIndexuARB(ByteBuffer pIndices) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMatrixIndexubvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pIndices); + nglMatrixIndexubvARB(pIndices.remaining(), MemoryUtil.getAddress(pIndices), function_pointer); + } + static native void nglMatrixIndexubvARB(int pIndices_size, long pIndices, long function_pointer); + + public static void glMatrixIndexuARB(ShortBuffer pIndices) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMatrixIndexusvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pIndices); + nglMatrixIndexusvARB(pIndices.remaining(), MemoryUtil.getAddress(pIndices), function_pointer); + } + static native void nglMatrixIndexusvARB(int pIndices_size, long pIndices, long function_pointer); + + public static void glMatrixIndexuARB(IntBuffer pIndices) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMatrixIndexuivARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pIndices); + nglMatrixIndexuivARB(pIndices.remaining(), MemoryUtil.getAddress(pIndices), function_pointer); + } + static native void nglMatrixIndexuivARB(int pIndices_size, long pIndices, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBMultiBind.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBMultiBind.java new file mode 100644 index 0000000..f2bb59f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBMultiBind.java @@ -0,0 +1,35 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBMultiBind { + + private ARBMultiBind() {} + + public static void glBindBuffersBase(int target, int first, int count, IntBuffer buffers) { + GL44.glBindBuffersBase(target, first, count, buffers); + } + + public static void glBindBuffersRange(int target, int first, int count, IntBuffer buffers, PointerBuffer offsets, PointerBuffer sizes) { + GL44.glBindBuffersRange(target, first, count, buffers, offsets, sizes); + } + + public static void glBindTextures(int first, int count, IntBuffer textures) { + GL44.glBindTextures(first, count, textures); + } + + public static void glBindSamplers(int first, int count, IntBuffer samplers) { + GL44.glBindSamplers(first, count, samplers); + } + + public static void glBindImageTextures(int first, int count, IntBuffer textures) { + GL44.glBindImageTextures(first, count, textures); + } + + public static void glBindVertexBuffers(int first, int count, IntBuffer buffers, PointerBuffer offsets, IntBuffer strides) { + GL44.glBindVertexBuffers(first, count, buffers, offsets, strides); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBMultiDrawIndirect.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBMultiDrawIndirect.java new file mode 100644 index 0000000..99f101f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBMultiDrawIndirect.java @@ -0,0 +1,35 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBMultiDrawIndirect { + + private ARBMultiDrawIndirect() {} + + public static void glMultiDrawArraysIndirect(int mode, ByteBuffer indirect, int primcount, int stride) { + GL43.glMultiDrawArraysIndirect(mode, indirect, primcount, stride); + } + public static void glMultiDrawArraysIndirect(int mode, long indirect_buffer_offset, int primcount, int stride) { + GL43.glMultiDrawArraysIndirect(mode, indirect_buffer_offset, primcount, stride); + } + + /** Overloads glMultiDrawArraysIndirect. */ + public static void glMultiDrawArraysIndirect(int mode, IntBuffer indirect, int primcount, int stride) { + GL43.glMultiDrawArraysIndirect(mode, indirect, primcount, stride); + } + + public static void glMultiDrawElementsIndirect(int mode, int type, ByteBuffer indirect, int primcount, int stride) { + GL43.glMultiDrawElementsIndirect(mode, type, indirect, primcount, stride); + } + public static void glMultiDrawElementsIndirect(int mode, int type, long indirect_buffer_offset, int primcount, int stride) { + GL43.glMultiDrawElementsIndirect(mode, type, indirect_buffer_offset, primcount, stride); + } + + /** Overloads glMultiDrawElementsIndirect. */ + public static void glMultiDrawElementsIndirect(int mode, int type, IntBuffer indirect, int primcount, int stride) { + GL43.glMultiDrawElementsIndirect(mode, type, indirect, primcount, stride); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBMultisample.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBMultisample.java new file mode 100644 index 0000000..bebd14c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBMultisample.java @@ -0,0 +1,29 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBMultisample { + + public static final int GL_MULTISAMPLE_ARB = 0x809D, + GL_SAMPLE_ALPHA_TO_COVERAGE_ARB = 0x809E, + GL_SAMPLE_ALPHA_TO_ONE_ARB = 0x809F, + GL_SAMPLE_COVERAGE_ARB = 0x80A0, + GL_SAMPLE_BUFFERS_ARB = 0x80A8, + GL_SAMPLES_ARB = 0x80A9, + GL_SAMPLE_COVERAGE_VALUE_ARB = 0x80AA, + GL_SAMPLE_COVERAGE_INVERT_ARB = 0x80AB, + GL_MULTISAMPLE_BIT_ARB = 0x20000000; + + private ARBMultisample() {} + + public static void glSampleCoverageARB(float value, boolean invert) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSampleCoverageARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglSampleCoverageARB(value, invert, function_pointer); + } + static native void nglSampleCoverageARB(float value, boolean invert, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBMultitexture.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBMultitexture.java new file mode 100644 index 0000000..e0293e2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBMultitexture.java @@ -0,0 +1,191 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBMultitexture { + + public static final int GL_TEXTURE0_ARB = 0x84C0, + GL_TEXTURE1_ARB = 0x84C1, + GL_TEXTURE2_ARB = 0x84C2, + GL_TEXTURE3_ARB = 0x84C3, + GL_TEXTURE4_ARB = 0x84C4, + GL_TEXTURE5_ARB = 0x84C5, + GL_TEXTURE6_ARB = 0x84C6, + GL_TEXTURE7_ARB = 0x84C7, + GL_TEXTURE8_ARB = 0x84C8, + GL_TEXTURE9_ARB = 0x84C9, + GL_TEXTURE10_ARB = 0x84CA, + GL_TEXTURE11_ARB = 0x84CB, + GL_TEXTURE12_ARB = 0x84CC, + GL_TEXTURE13_ARB = 0x84CD, + GL_TEXTURE14_ARB = 0x84CE, + GL_TEXTURE15_ARB = 0x84CF, + GL_TEXTURE16_ARB = 0x84D0, + GL_TEXTURE17_ARB = 0x84D1, + GL_TEXTURE18_ARB = 0x84D2, + GL_TEXTURE19_ARB = 0x84D3, + GL_TEXTURE20_ARB = 0x84D4, + GL_TEXTURE21_ARB = 0x84D5, + GL_TEXTURE22_ARB = 0x84D6, + GL_TEXTURE23_ARB = 0x84D7, + GL_TEXTURE24_ARB = 0x84D8, + GL_TEXTURE25_ARB = 0x84D9, + GL_TEXTURE26_ARB = 0x84DA, + GL_TEXTURE27_ARB = 0x84DB, + GL_TEXTURE28_ARB = 0x84DC, + GL_TEXTURE29_ARB = 0x84DD, + GL_TEXTURE30_ARB = 0x84DE, + GL_TEXTURE31_ARB = 0x84DF, + GL_ACTIVE_TEXTURE_ARB = 0x84E0, + GL_CLIENT_ACTIVE_TEXTURE_ARB = 0x84E1, + GL_MAX_TEXTURE_UNITS_ARB = 0x84E2; + + private ARBMultitexture() {} + + public static void glClientActiveTextureARB(int texture) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClientActiveTextureARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglClientActiveTextureARB(texture, function_pointer); + } + static native void nglClientActiveTextureARB(int texture, long function_pointer); + + public static void glActiveTextureARB(int texture) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glActiveTextureARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglActiveTextureARB(texture, function_pointer); + } + static native void nglActiveTextureARB(int texture, long function_pointer); + + public static void glMultiTexCoord1fARB(int target, float s) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoord1fARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoord1fARB(target, s, function_pointer); + } + static native void nglMultiTexCoord1fARB(int target, float s, long function_pointer); + + public static void glMultiTexCoord1dARB(int target, double s) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoord1dARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoord1dARB(target, s, function_pointer); + } + static native void nglMultiTexCoord1dARB(int target, double s, long function_pointer); + + public static void glMultiTexCoord1iARB(int target, int s) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoord1iARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoord1iARB(target, s, function_pointer); + } + static native void nglMultiTexCoord1iARB(int target, int s, long function_pointer); + + public static void glMultiTexCoord1sARB(int target, short s) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoord1sARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoord1sARB(target, s, function_pointer); + } + static native void nglMultiTexCoord1sARB(int target, short s, long function_pointer); + + public static void glMultiTexCoord2fARB(int target, float s, float t) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoord2fARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoord2fARB(target, s, t, function_pointer); + } + static native void nglMultiTexCoord2fARB(int target, float s, float t, long function_pointer); + + public static void glMultiTexCoord2dARB(int target, double s, double t) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoord2dARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoord2dARB(target, s, t, function_pointer); + } + static native void nglMultiTexCoord2dARB(int target, double s, double t, long function_pointer); + + public static void glMultiTexCoord2iARB(int target, int s, int t) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoord2iARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoord2iARB(target, s, t, function_pointer); + } + static native void nglMultiTexCoord2iARB(int target, int s, int t, long function_pointer); + + public static void glMultiTexCoord2sARB(int target, short s, short t) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoord2sARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoord2sARB(target, s, t, function_pointer); + } + static native void nglMultiTexCoord2sARB(int target, short s, short t, long function_pointer); + + public static void glMultiTexCoord3fARB(int target, float s, float t, float r) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoord3fARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoord3fARB(target, s, t, r, function_pointer); + } + static native void nglMultiTexCoord3fARB(int target, float s, float t, float r, long function_pointer); + + public static void glMultiTexCoord3dARB(int target, double s, double t, double r) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoord3dARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoord3dARB(target, s, t, r, function_pointer); + } + static native void nglMultiTexCoord3dARB(int target, double s, double t, double r, long function_pointer); + + public static void glMultiTexCoord3iARB(int target, int s, int t, int r) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoord3iARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoord3iARB(target, s, t, r, function_pointer); + } + static native void nglMultiTexCoord3iARB(int target, int s, int t, int r, long function_pointer); + + public static void glMultiTexCoord3sARB(int target, short s, short t, short r) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoord3sARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoord3sARB(target, s, t, r, function_pointer); + } + static native void nglMultiTexCoord3sARB(int target, short s, short t, short r, long function_pointer); + + public static void glMultiTexCoord4fARB(int target, float s, float t, float r, float q) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoord4fARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoord4fARB(target, s, t, r, q, function_pointer); + } + static native void nglMultiTexCoord4fARB(int target, float s, float t, float r, float q, long function_pointer); + + public static void glMultiTexCoord4dARB(int target, double s, double t, double r, double q) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoord4dARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoord4dARB(target, s, t, r, q, function_pointer); + } + static native void nglMultiTexCoord4dARB(int target, double s, double t, double r, double q, long function_pointer); + + public static void glMultiTexCoord4iARB(int target, int s, int t, int r, int q) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoord4iARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoord4iARB(target, s, t, r, q, function_pointer); + } + static native void nglMultiTexCoord4iARB(int target, int s, int t, int r, int q, long function_pointer); + + public static void glMultiTexCoord4sARB(int target, short s, short t, short r, short q) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoord4sARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoord4sARB(target, s, t, r, q, function_pointer); + } + static native void nglMultiTexCoord4sARB(int target, short s, short t, short r, short q, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBOcclusionQuery.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBOcclusionQuery.java new file mode 100644 index 0000000..58b353c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBOcclusionQuery.java @@ -0,0 +1,158 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBOcclusionQuery { + + /** + * Accepted by the <target> parameter of BeginQueryARB, EndQueryARB, + * and GetQueryivARB: + */ + public static final int GL_SAMPLES_PASSED_ARB = 0x8914; + + /** + * Accepted by the <pname> parameter of GetQueryivARB: + */ + public static final int GL_QUERY_COUNTER_BITS_ARB = 0x8864, + GL_CURRENT_QUERY_ARB = 0x8865; + + /** + * Accepted by the <pname> parameter of GetQueryObjectivARB and + * GetQueryObjectuivARB: + */ + public static final int GL_QUERY_RESULT_ARB = 0x8866, + GL_QUERY_RESULT_AVAILABLE_ARB = 0x8867; + + private ARBOcclusionQuery() {} + + public static void glGenQueriesARB(IntBuffer ids) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenQueriesARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(ids); + nglGenQueriesARB(ids.remaining(), MemoryUtil.getAddress(ids), function_pointer); + } + static native void nglGenQueriesARB(int ids_n, long ids, long function_pointer); + + /** Overloads glGenQueriesARB. */ + public static int glGenQueriesARB() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenQueriesARB; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer ids = APIUtil.getBufferInt(caps); + nglGenQueriesARB(1, MemoryUtil.getAddress(ids), function_pointer); + return ids.get(0); + } + + public static void glDeleteQueriesARB(IntBuffer ids) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteQueriesARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(ids); + nglDeleteQueriesARB(ids.remaining(), MemoryUtil.getAddress(ids), function_pointer); + } + static native void nglDeleteQueriesARB(int ids_n, long ids, long function_pointer); + + /** Overloads glDeleteQueriesARB. */ + public static void glDeleteQueriesARB(int id) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteQueriesARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeleteQueriesARB(1, APIUtil.getInt(caps, id), function_pointer); + } + + public static boolean glIsQueryARB(int id) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsQueryARB; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsQueryARB(id, function_pointer); + return __result; + } + static native boolean nglIsQueryARB(int id, long function_pointer); + + public static void glBeginQueryARB(int target, int id) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBeginQueryARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglBeginQueryARB(target, id, function_pointer); + } + static native void nglBeginQueryARB(int target, int id, long function_pointer); + + public static void glEndQueryARB(int target) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEndQueryARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglEndQueryARB(target, function_pointer); + } + static native void nglEndQueryARB(int target, long function_pointer); + + public static void glGetQueryARB(int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetQueryivARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetQueryivARB(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetQueryivARB(int target, int pname, long params, long function_pointer); + + /** + * Overloads glGetQueryivARB. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetQueryiARB} instead. + */ + @Deprecated + public static int glGetQueryARB(int target, int pname) { + return ARBOcclusionQuery.glGetQueryiARB(target, pname); + } + + /** Overloads glGetQueryivARB. */ + public static int glGetQueryiARB(int target, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetQueryivARB; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetQueryivARB(target, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetQueryObjectARB(int id, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetQueryObjectivARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetQueryObjectivARB(id, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetQueryObjectivARB(int id, int pname, long params, long function_pointer); + + /** Overloads glGetQueryObjectivARB. */ + public static int glGetQueryObjectiARB(int id, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetQueryObjectivARB; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetQueryObjectivARB(id, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetQueryObjectuARB(int id, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetQueryObjectuivARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetQueryObjectuivARB(id, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetQueryObjectuivARB(int id, int pname, long params, long function_pointer); + + /** Overloads glGetQueryObjectuivARB. */ + public static int glGetQueryObjectuiARB(int id, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetQueryObjectuivARB; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetQueryObjectuivARB(id, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBOcclusionQuery2.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBOcclusionQuery2.java new file mode 100644 index 0000000..b05ce17 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBOcclusionQuery2.java @@ -0,0 +1,17 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBOcclusionQuery2 { + + /** + * Accepted by the <target> parameter of BeginQuery, EndQuery, + * and GetQueryiv: + */ + public static final int GL_ANY_SAMPLES_PASSED = 0x8C2F; + + private ARBOcclusionQuery2() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBPixelBufferObject.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBPixelBufferObject.java new file mode 100644 index 0000000..282faa5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBPixelBufferObject.java @@ -0,0 +1,26 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBPixelBufferObject extends ARBBufferObject { + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, + * GetBufferParameteriv, and GetBufferPointerv: + */ + public static final int GL_PIXEL_PACK_BUFFER_ARB = 0x88EB, + GL_PIXEL_UNPACK_BUFFER_ARB = 0x88EC; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_PIXEL_PACK_BUFFER_BINDING_ARB = 0x88ED, + GL_PIXEL_UNPACK_BUFFER_BINDING_ARB = 0x88EF; + + private ARBPixelBufferObject() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBPointParameters.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBPointParameters.java new file mode 100644 index 0000000..05e9dcc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBPointParameters.java @@ -0,0 +1,33 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBPointParameters { + + public static final int GL_POINT_SIZE_MIN_ARB = 0x8126, + GL_POINT_SIZE_MAX_ARB = 0x8127, + GL_POINT_FADE_THRESHOLD_SIZE_ARB = 0x8128, + GL_POINT_DISTANCE_ATTENUATION_ARB = 0x8129; + + private ARBPointParameters() {} + + public static void glPointParameterfARB(int pname, float param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPointParameterfARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglPointParameterfARB(pname, param, function_pointer); + } + static native void nglPointParameterfARB(int pname, float param, long function_pointer); + + public static void glPointParameterARB(int pname, FloatBuffer pfParams) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPointParameterfvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pfParams, 4); + nglPointParameterfvARB(pname, MemoryUtil.getAddress(pfParams), function_pointer); + } + static native void nglPointParameterfvARB(int pname, long pfParams, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBPointSprite.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBPointSprite.java new file mode 100644 index 0000000..22db3c1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBPointSprite.java @@ -0,0 +1,26 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBPointSprite { + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, by + * the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev, and by the <target> parameter of TexEnvi, TexEnviv, + * TexEnvf, TexEnvfv, GetTexEnviv, and GetTexEnvfv: + */ + public static final int GL_POINT_SPRITE_ARB = 0x8861; + + /** + * When the <target> parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv, + * GetTexEnvfv, or GetTexEnviv is POINT_SPRITE_ARB, then the value of + * <pname> may be: + */ + public static final int GL_COORD_REPLACE_ARB = 0x8862; + + private ARBPointSprite() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBProgram.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBProgram.java new file mode 100644 index 0000000..d63f0bd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBProgram.java @@ -0,0 +1,322 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public class ARBProgram { + + /** + * Accepted by the <format> parameter of ProgramStringARB: + */ + public static final int GL_PROGRAM_FORMAT_ASCII_ARB = 0x8875; + + /** + * Accepted by the <pname> parameter of GetProgramivARB: + */ + public static final int GL_PROGRAM_LENGTH_ARB = 0x8627, + GL_PROGRAM_FORMAT_ARB = 0x8876, + GL_PROGRAM_BINDING_ARB = 0x8677, + GL_PROGRAM_INSTRUCTIONS_ARB = 0x88A0, + GL_MAX_PROGRAM_INSTRUCTIONS_ARB = 0x88A1, + GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB = 0x88A2, + GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB = 0x88A3, + GL_PROGRAM_TEMPORARIES_ARB = 0x88A4, + GL_MAX_PROGRAM_TEMPORARIES_ARB = 0x88A5, + GL_PROGRAM_NATIVE_TEMPORARIES_ARB = 0x88A6, + GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB = 0x88A7, + GL_PROGRAM_PARAMETERS_ARB = 0x88A8, + GL_MAX_PROGRAM_PARAMETERS_ARB = 0x88A9, + GL_PROGRAM_NATIVE_PARAMETERS_ARB = 0x88AA, + GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB = 0x88AB, + GL_PROGRAM_ATTRIBS_ARB = 0x88AC, + GL_MAX_PROGRAM_ATTRIBS_ARB = 0x88AD, + GL_PROGRAM_NATIVE_ATTRIBS_ARB = 0x88AE, + GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB = 0x88AF, + GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB = 0x88B4, + GL_MAX_PROGRAM_ENV_PARAMETERS_ARB = 0x88B5, + GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB = 0x88B6; + + /** + * Accepted by the <pname> parameter of GetProgramStringARB: + */ + public static final int GL_PROGRAM_STRING_ARB = 0x8628; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_PROGRAM_ERROR_POSITION_ARB = 0x864B, + GL_CURRENT_MATRIX_ARB = 0x8641, + GL_TRANSPOSE_CURRENT_MATRIX_ARB = 0x88B7, + GL_CURRENT_MATRIX_STACK_DEPTH_ARB = 0x8640, + GL_MAX_PROGRAM_MATRICES_ARB = 0x862F, + GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB = 0x862E; + + /** + * Accepted by the <name> parameter of GetString: + */ + public static final int GL_PROGRAM_ERROR_STRING_ARB = 0x8874; + + /** + * Accepted by the <mode> parameter of MatrixMode: + */ + public static final int GL_MATRIX0_ARB = 0x88C0, + GL_MATRIX1_ARB = 0x88C1, + GL_MATRIX2_ARB = 0x88C2, + GL_MATRIX3_ARB = 0x88C3, + GL_MATRIX4_ARB = 0x88C4, + GL_MATRIX5_ARB = 0x88C5, + GL_MATRIX6_ARB = 0x88C6, + GL_MATRIX7_ARB = 0x88C7, + GL_MATRIX8_ARB = 0x88C8, + GL_MATRIX9_ARB = 0x88C9, + GL_MATRIX10_ARB = 0x88CA, + GL_MATRIX11_ARB = 0x88CB, + GL_MATRIX12_ARB = 0x88CC, + GL_MATRIX13_ARB = 0x88CD, + GL_MATRIX14_ARB = 0x88CE, + GL_MATRIX15_ARB = 0x88CF, + GL_MATRIX16_ARB = 0x88D0, + GL_MATRIX17_ARB = 0x88D1, + GL_MATRIX18_ARB = 0x88D2, + GL_MATRIX19_ARB = 0x88D3, + GL_MATRIX20_ARB = 0x88D4, + GL_MATRIX21_ARB = 0x88D5, + GL_MATRIX22_ARB = 0x88D6, + GL_MATRIX23_ARB = 0x88D7, + GL_MATRIX24_ARB = 0x88D8, + GL_MATRIX25_ARB = 0x88D9, + GL_MATRIX26_ARB = 0x88DA, + GL_MATRIX27_ARB = 0x88DB, + GL_MATRIX28_ARB = 0x88DC, + GL_MATRIX29_ARB = 0x88DD, + GL_MATRIX30_ARB = 0x88DE, + GL_MATRIX31_ARB = 0x88DF; + + + public static void glProgramStringARB(int target, int format, ByteBuffer string) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramStringARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(string); + nglProgramStringARB(target, format, string.remaining(), MemoryUtil.getAddress(string), function_pointer); + } + static native void nglProgramStringARB(int target, int format, int string_length, long string, long function_pointer); + + /** Overloads glProgramStringARB. */ + public static void glProgramStringARB(int target, int format, CharSequence string) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramStringARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramStringARB(target, format, string.length(), APIUtil.getBuffer(caps, string), function_pointer); + } + + public static void glBindProgramARB(int target, int program) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindProgramARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindProgramARB(target, program, function_pointer); + } + static native void nglBindProgramARB(int target, int program, long function_pointer); + + public static void glDeleteProgramsARB(IntBuffer programs) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteProgramsARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(programs); + nglDeleteProgramsARB(programs.remaining(), MemoryUtil.getAddress(programs), function_pointer); + } + static native void nglDeleteProgramsARB(int programs_n, long programs, long function_pointer); + + /** Overloads glDeleteProgramsARB. */ + public static void glDeleteProgramsARB(int program) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteProgramsARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeleteProgramsARB(1, APIUtil.getInt(caps, program), function_pointer); + } + + public static void glGenProgramsARB(IntBuffer programs) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenProgramsARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(programs); + nglGenProgramsARB(programs.remaining(), MemoryUtil.getAddress(programs), function_pointer); + } + static native void nglGenProgramsARB(int programs_n, long programs, long function_pointer); + + /** Overloads glGenProgramsARB. */ + public static int glGenProgramsARB() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenProgramsARB; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer programs = APIUtil.getBufferInt(caps); + nglGenProgramsARB(1, MemoryUtil.getAddress(programs), function_pointer); + return programs.get(0); + } + + public static void glProgramEnvParameter4fARB(int target, int index, float x, float y, float z, float w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramEnvParameter4fARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramEnvParameter4fARB(target, index, x, y, z, w, function_pointer); + } + static native void nglProgramEnvParameter4fARB(int target, int index, float x, float y, float z, float w, long function_pointer); + + public static void glProgramEnvParameter4dARB(int target, int index, double x, double y, double z, double w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramEnvParameter4dARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramEnvParameter4dARB(target, index, x, y, z, w, function_pointer); + } + static native void nglProgramEnvParameter4dARB(int target, int index, double x, double y, double z, double w, long function_pointer); + + public static void glProgramEnvParameter4ARB(int target, int index, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramEnvParameter4fvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglProgramEnvParameter4fvARB(target, index, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglProgramEnvParameter4fvARB(int target, int index, long params, long function_pointer); + + public static void glProgramEnvParameter4ARB(int target, int index, DoubleBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramEnvParameter4dvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglProgramEnvParameter4dvARB(target, index, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglProgramEnvParameter4dvARB(int target, int index, long params, long function_pointer); + + public static void glProgramLocalParameter4fARB(int target, int index, float x, float y, float z, float w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramLocalParameter4fARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramLocalParameter4fARB(target, index, x, y, z, w, function_pointer); + } + static native void nglProgramLocalParameter4fARB(int target, int index, float x, float y, float z, float w, long function_pointer); + + public static void glProgramLocalParameter4dARB(int target, int index, double x, double y, double z, double w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramLocalParameter4dARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramLocalParameter4dARB(target, index, x, y, z, w, function_pointer); + } + static native void nglProgramLocalParameter4dARB(int target, int index, double x, double y, double z, double w, long function_pointer); + + public static void glProgramLocalParameter4ARB(int target, int index, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramLocalParameter4fvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglProgramLocalParameter4fvARB(target, index, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglProgramLocalParameter4fvARB(int target, int index, long params, long function_pointer); + + public static void glProgramLocalParameter4ARB(int target, int index, DoubleBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramLocalParameter4dvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglProgramLocalParameter4dvARB(target, index, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglProgramLocalParameter4dvARB(int target, int index, long params, long function_pointer); + + public static void glGetProgramEnvParameterARB(int target, int index, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramEnvParameterfvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetProgramEnvParameterfvARB(target, index, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetProgramEnvParameterfvARB(int target, int index, long params, long function_pointer); + + public static void glGetProgramEnvParameterARB(int target, int index, DoubleBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramEnvParameterdvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetProgramEnvParameterdvARB(target, index, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetProgramEnvParameterdvARB(int target, int index, long params, long function_pointer); + + public static void glGetProgramLocalParameterARB(int target, int index, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramLocalParameterfvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetProgramLocalParameterfvARB(target, index, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetProgramLocalParameterfvARB(int target, int index, long params, long function_pointer); + + public static void glGetProgramLocalParameterARB(int target, int index, DoubleBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramLocalParameterdvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetProgramLocalParameterdvARB(target, index, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetProgramLocalParameterdvARB(int target, int index, long params, long function_pointer); + + public static void glGetProgramARB(int target, int parameterName, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramivARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetProgramivARB(target, parameterName, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetProgramivARB(int target, int parameterName, long params, long function_pointer); + + /** + * Overloads glGetProgramivARB. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetProgramiARB} instead. + */ + @Deprecated + public static int glGetProgramARB(int target, int parameterName) { + return ARBProgram.glGetProgramiARB(target, parameterName); + } + + /** Overloads glGetProgramivARB. */ + public static int glGetProgramiARB(int target, int parameterName) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramivARB; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetProgramivARB(target, parameterName, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetProgramStringARB(int target, int parameterName, ByteBuffer paramString) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramStringARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(paramString); + nglGetProgramStringARB(target, parameterName, MemoryUtil.getAddress(paramString), function_pointer); + } + static native void nglGetProgramStringARB(int target, int parameterName, long paramString, long function_pointer); + + /** Overloads glGetProgramStringARB. */ + public static String glGetProgramStringARB(int target, int parameterName) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramStringARB; + BufferChecks.checkFunctionAddress(function_pointer); + int programLength = glGetProgramiARB(target, GL_PROGRAM_LENGTH_ARB); + ByteBuffer paramString = APIUtil.getBufferByte(caps, programLength); + nglGetProgramStringARB(target, parameterName, MemoryUtil.getAddress(paramString), function_pointer); + paramString.limit(programLength); + return APIUtil.getString(caps, paramString); + } + + public static boolean glIsProgramARB(int program) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsProgramARB; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsProgramARB(program, function_pointer); + return __result; + } + static native boolean nglIsProgramARB(int program, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBProgramInterfaceQuery.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBProgramInterfaceQuery.java new file mode 100644 index 0000000..f310d5d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBProgramInterfaceQuery.java @@ -0,0 +1,121 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBProgramInterfaceQuery { + + /** + * Accepted by the <programInterface> parameter of GetProgramInterfaceiv, + * GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, + * GetProgramResourceLocation, and GetProgramResourceLocationIndex: + */ + public static final int GL_UNIFORM = 0x92E1, + GL_UNIFORM_BLOCK = 0x92E2, + GL_PROGRAM_INPUT = 0x92E3, + GL_PROGRAM_OUTPUT = 0x92E4, + GL_BUFFER_VARIABLE = 0x92E5, + GL_SHADER_STORAGE_BLOCK = 0x92E6, + GL_VERTEX_SUBROUTINE = 0x92E8, + GL_TESS_CONTROL_SUBROUTINE = 0x92E9, + GL_TESS_EVALUATION_SUBROUTINE = 0x92EA, + GL_GEOMETRY_SUBROUTINE = 0x92EB, + GL_FRAGMENT_SUBROUTINE = 0x92EC, + GL_COMPUTE_SUBROUTINE = 0x92ED, + GL_VERTEX_SUBROUTINE_UNIFORM = 0x92EE, + GL_TESS_CONTROL_SUBROUTINE_UNIFORM = 0x92EF, + GL_TESS_EVALUATION_SUBROUTINE_UNIFORM = 0x92F0, + GL_GEOMETRY_SUBROUTINE_UNIFORM = 0x92F1, + GL_FRAGMENT_SUBROUTINE_UNIFORM = 0x92F2, + GL_COMPUTE_SUBROUTINE_UNIFORM = 0x92F3, + GL_TRANSFORM_FEEDBACK_VARYING = 0x92F4; + + /** + * Accepted by the <pname> parameter of GetProgramInterfaceiv: + */ + public static final int GL_ACTIVE_RESOURCES = 0x92F5, + GL_MAX_NAME_LENGTH = 0x92F6, + GL_MAX_NUM_ACTIVE_VARIABLES = 0x92F7, + GL_MAX_NUM_COMPATIBLE_SUBROUTINES = 0x92F8; + + /** + * Accepted in the <props> array of GetProgramResourceiv: + */ + public static final int GL_NAME_LENGTH = 0x92F9, + GL_TYPE = 0x92FA, + GL_ARRAY_SIZE = 0x92FB, + GL_OFFSET = 0x92FC, + GL_BLOCK_INDEX = 0x92FD, + GL_ARRAY_STRIDE = 0x92FE, + GL_MATRIX_STRIDE = 0x92FF, + GL_IS_ROW_MAJOR = 0x9300, + GL_ATOMIC_COUNTER_BUFFER_INDEX = 0x9301, + GL_BUFFER_BINDING = 0x9302, + GL_BUFFER_DATA_SIZE = 0x9303, + GL_NUM_ACTIVE_VARIABLES = 0x9304, + GL_ACTIVE_VARIABLES = 0x9305, + GL_REFERENCED_BY_VERTEX_SHADER = 0x9306, + GL_REFERENCED_BY_TESS_CONTROL_SHADER = 0x9307, + GL_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x9308, + GL_REFERENCED_BY_GEOMETRY_SHADER = 0x9309, + GL_REFERENCED_BY_FRAGMENT_SHADER = 0x930A, + GL_REFERENCED_BY_COMPUTE_SHADER = 0x930B, + GL_TOP_LEVEL_ARRAY_SIZE = 0x930C, + GL_TOP_LEVEL_ARRAY_STRIDE = 0x930D, + GL_LOCATION = 0x930E, + GL_LOCATION_INDEX = 0x930F, + GL_IS_PER_PATCH = 0x92E7; + + private ARBProgramInterfaceQuery() {} + + public static void glGetProgramInterface(int program, int programInterface, int pname, IntBuffer params) { + GL43.glGetProgramInterface(program, programInterface, pname, params); + } + + /** Overloads glGetProgramInterfaceiv. */ + public static int glGetProgramInterfacei(int program, int programInterface, int pname) { + return GL43.glGetProgramInterfacei(program, programInterface, pname); + } + + public static int glGetProgramResourceIndex(int program, int programInterface, ByteBuffer name) { + return GL43.glGetProgramResourceIndex(program, programInterface, name); + } + + /** Overloads glGetProgramResourceIndex. */ + public static int glGetProgramResourceIndex(int program, int programInterface, CharSequence name) { + return GL43.glGetProgramResourceIndex(program, programInterface, name); + } + + public static void glGetProgramResourceName(int program, int programInterface, int index, IntBuffer length, ByteBuffer name) { + GL43.glGetProgramResourceName(program, programInterface, index, length, name); + } + + /** Overloads glGetProgramResourceName. */ + public static String glGetProgramResourceName(int program, int programInterface, int index, int bufSize) { + return GL43.glGetProgramResourceName(program, programInterface, index, bufSize); + } + + public static void glGetProgramResource(int program, int programInterface, int index, IntBuffer props, IntBuffer length, IntBuffer params) { + GL43.glGetProgramResource(program, programInterface, index, props, length, params); + } + + public static int glGetProgramResourceLocation(int program, int programInterface, ByteBuffer name) { + return GL43.glGetProgramResourceLocation(program, programInterface, name); + } + + /** Overloads glGetProgramResourceLocation. */ + public static int glGetProgramResourceLocation(int program, int programInterface, CharSequence name) { + return GL43.glGetProgramResourceLocation(program, programInterface, name); + } + + public static int glGetProgramResourceLocationIndex(int program, int programInterface, ByteBuffer name) { + return GL43.glGetProgramResourceLocationIndex(program, programInterface, name); + } + + /** Overloads glGetProgramResourceLocationIndex. */ + public static int glGetProgramResourceLocationIndex(int program, int programInterface, CharSequence name) { + return GL43.glGetProgramResourceLocationIndex(program, programInterface, name); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBProvokingVertex.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBProvokingVertex.java new file mode 100644 index 0000000..ff211e3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBProvokingVertex.java @@ -0,0 +1,28 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBProvokingVertex { + + /** + * Accepted by the <mode> parameter of ProvokingVertex: + */ + public static final int GL_FIRST_VERTEX_CONVENTION = 0x8E4D, + GL_LAST_VERTEX_CONVENTION = 0x8E4E; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_PROVOKING_VERTEX = 0x8E4F, + GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION = 0x8E4C; + + private ARBProvokingVertex() {} + + public static void glProvokingVertex(int mode) { + GL32.glProvokingVertex(mode); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBQueryBufferObject.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBQueryBufferObject.java new file mode 100644 index 0000000..b1bf0db --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBQueryBufferObject.java @@ -0,0 +1,37 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBQueryBufferObject { + + /** + * Accepted by the <pname> parameter of GetQueryObjectiv, GetQueryObjectuiv, + * GetQueryObjecti64v and GetQueryObjectui64v: + */ + public static final int GL_QUERY_RESULT_NO_WAIT = 0x9194; + + /** + * Accepted by the <target> parameter of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, MapBufferRange, GetBufferSubData, + * GetBufferParameteriv, GetBufferParameteri64v, GetBufferPointerv, + * ClearBufferSubData, and the <readtarget> and <writetarget> parameters of + * CopyBufferSubData: + */ + public static final int GL_QUERY_BUFFER = 0x9192; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_QUERY_BUFFER_BINDING = 0x9193; + + /** + * Accepted in the <barriers> bitfield in MemoryBarrier: + */ + public static final int GL_QUERY_BUFFER_BARRIER_BIT = 0x8000; + + private ARBQueryBufferObject() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBRobustness.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBRobustness.java new file mode 100644 index 0000000..94ca83d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBRobustness.java @@ -0,0 +1,1712 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBRobustness { + + /** + * Returned by GetGraphicsResetStatusARB: + */ + public static final int GL_NO_ERROR = 0x0, + GL_GUILTY_CONTEXT_RESET_ARB = 0x8253, + GL_INNOCENT_CONTEXT_RESET_ARB = 0x8254, + GL_UNKNOWN_CONTEXT_RESET_ARB = 0x8255; + + /** + * Accepted by the <value> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + public static final int GL_RESET_NOTIFICATION_STRATEGY_ARB = 0x8256; + + /** + * Returned by GetIntegerv and related simple queries when + * <value> is RESET_NOTIFICATION_STRATEGY_ARB: + */ + public static final int GL_LOSE_CONTEXT_ON_RESET_ARB = 0x8252, + GL_NO_RESET_NOTIFICATION_ARB = 0x8261; + + /** + * Returned by GetIntegerv when <pname> is CONTEXT_FLAGS: + */ + public static final int GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB = 0x4; + + private ARBRobustness() {} + + public static int glGetGraphicsResetStatusARB() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetGraphicsResetStatusARB; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglGetGraphicsResetStatusARB(function_pointer); + return __result; + } + static native int nglGetGraphicsResetStatusARB(long function_pointer); + + public static void glGetnMapdvARB(int target, int query, DoubleBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnMapdvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(v); + nglGetnMapdvARB(target, query, v.remaining() << 3, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglGetnMapdvARB(int target, int query, int bufSize, long v, long function_pointer); + + public static void glGetnMapfvARB(int target, int query, FloatBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnMapfvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(v); + nglGetnMapfvARB(target, query, v.remaining() << 2, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglGetnMapfvARB(int target, int query, int bufSize, long v, long function_pointer); + + public static void glGetnMapivARB(int target, int query, IntBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnMapivARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(v); + nglGetnMapivARB(target, query, v.remaining() << 2, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglGetnMapivARB(int target, int query, int bufSize, long v, long function_pointer); + + public static void glGetnPixelMapfvARB(int map, FloatBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnPixelMapfvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(values); + nglGetnPixelMapfvARB(map, values.remaining() << 2, MemoryUtil.getAddress(values), function_pointer); + } + static native void nglGetnPixelMapfvARB(int map, int bufSize, long values, long function_pointer); + + public static void glGetnPixelMapuivARB(int map, IntBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnPixelMapuivARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(values); + nglGetnPixelMapuivARB(map, values.remaining() << 2, MemoryUtil.getAddress(values), function_pointer); + } + static native void nglGetnPixelMapuivARB(int map, int bufSize, long values, long function_pointer); + + public static void glGetnPixelMapusvARB(int map, ShortBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnPixelMapusvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(values); + nglGetnPixelMapusvARB(map, values.remaining() << 1, MemoryUtil.getAddress(values), function_pointer); + } + static native void nglGetnPixelMapusvARB(int map, int bufSize, long values, long function_pointer); + + public static void glGetnPolygonStippleARB(ByteBuffer pattern) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnPolygonStippleARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pattern); + nglGetnPolygonStippleARB(pattern.remaining(), MemoryUtil.getAddress(pattern), function_pointer); + } + static native void nglGetnPolygonStippleARB(int pattern_bufSize, long pattern, long function_pointer); + + public static void glGetnTexImageARB(int target, int level, int format, int type, ByteBuffer img) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnTexImageARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(img); + nglGetnTexImageARB(target, level, format, type, img.remaining(), MemoryUtil.getAddress(img), function_pointer); + } + public static void glGetnTexImageARB(int target, int level, int format, int type, DoubleBuffer img) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnTexImageARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(img); + nglGetnTexImageARB(target, level, format, type, (img.remaining() << 3), MemoryUtil.getAddress(img), function_pointer); + } + public static void glGetnTexImageARB(int target, int level, int format, int type, FloatBuffer img) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnTexImageARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(img); + nglGetnTexImageARB(target, level, format, type, (img.remaining() << 2), MemoryUtil.getAddress(img), function_pointer); + } + public static void glGetnTexImageARB(int target, int level, int format, int type, IntBuffer img) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnTexImageARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(img); + nglGetnTexImageARB(target, level, format, type, (img.remaining() << 2), MemoryUtil.getAddress(img), function_pointer); + } + public static void glGetnTexImageARB(int target, int level, int format, int type, ShortBuffer img) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnTexImageARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(img); + nglGetnTexImageARB(target, level, format, type, (img.remaining() << 1), MemoryUtil.getAddress(img), function_pointer); + } + static native void nglGetnTexImageARB(int target, int level, int format, int type, int img_bufSize, long img, long function_pointer); + public static void glGetnTexImageARB(int target, int level, int format, int type, int img_bufSize, long img_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnTexImageARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOenabled(caps); + nglGetnTexImageARBBO(target, level, format, type, img_bufSize, img_buffer_offset, function_pointer); + } + static native void nglGetnTexImageARBBO(int target, int level, int format, int type, int img_bufSize, long img_buffer_offset, long function_pointer); + + public static void glReadnPixelsARB(int x, int y, int width, int height, int format, int type, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glReadnPixelsARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(data); + nglReadnPixelsARB(x, y, width, height, format, type, data.remaining(), MemoryUtil.getAddress(data), function_pointer); + } + public static void glReadnPixelsARB(int x, int y, int width, int height, int format, int type, DoubleBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glReadnPixelsARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(data); + nglReadnPixelsARB(x, y, width, height, format, type, (data.remaining() << 3), MemoryUtil.getAddress(data), function_pointer); + } + public static void glReadnPixelsARB(int x, int y, int width, int height, int format, int type, FloatBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glReadnPixelsARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(data); + nglReadnPixelsARB(x, y, width, height, format, type, (data.remaining() << 2), MemoryUtil.getAddress(data), function_pointer); + } + public static void glReadnPixelsARB(int x, int y, int width, int height, int format, int type, IntBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glReadnPixelsARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(data); + nglReadnPixelsARB(x, y, width, height, format, type, (data.remaining() << 2), MemoryUtil.getAddress(data), function_pointer); + } + public static void glReadnPixelsARB(int x, int y, int width, int height, int format, int type, ShortBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glReadnPixelsARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(data); + nglReadnPixelsARB(x, y, width, height, format, type, (data.remaining() << 1), MemoryUtil.getAddress(data), function_pointer); + } + static native void nglReadnPixelsARB(int x, int y, int width, int height, int format, int type, int data_bufSize, long data, long function_pointer); + public static void glReadnPixelsARB(int x, int y, int width, int height, int format, int type, int data_bufSize, long data_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glReadnPixelsARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOenabled(caps); + nglReadnPixelsARBBO(x, y, width, height, format, type, data_bufSize, data_buffer_offset, function_pointer); + } + static native void nglReadnPixelsARBBO(int x, int y, int width, int height, int format, int type, int data_bufSize, long data_buffer_offset, long function_pointer); + + public static void glGetnColorTableARB(int target, int format, int type, ByteBuffer table) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnColorTableARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(table); + nglGetnColorTableARB(target, format, type, table.remaining(), MemoryUtil.getAddress(table), function_pointer); + } + public static void glGetnColorTableARB(int target, int format, int type, DoubleBuffer table) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnColorTableARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(table); + nglGetnColorTableARB(target, format, type, (table.remaining() << 3), MemoryUtil.getAddress(table), function_pointer); + } + public static void glGetnColorTableARB(int target, int format, int type, FloatBuffer table) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnColorTableARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(table); + nglGetnColorTableARB(target, format, type, (table.remaining() << 2), MemoryUtil.getAddress(table), function_pointer); + } + static native void nglGetnColorTableARB(int target, int format, int type, int table_bufSize, long table, long function_pointer); + + public static void glGetnConvolutionFilterARB(int target, int format, int type, ByteBuffer image) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnConvolutionFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(image); + nglGetnConvolutionFilterARB(target, format, type, image.remaining(), MemoryUtil.getAddress(image), function_pointer); + } + public static void glGetnConvolutionFilterARB(int target, int format, int type, DoubleBuffer image) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnConvolutionFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(image); + nglGetnConvolutionFilterARB(target, format, type, (image.remaining() << 3), MemoryUtil.getAddress(image), function_pointer); + } + public static void glGetnConvolutionFilterARB(int target, int format, int type, FloatBuffer image) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnConvolutionFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(image); + nglGetnConvolutionFilterARB(target, format, type, (image.remaining() << 2), MemoryUtil.getAddress(image), function_pointer); + } + public static void glGetnConvolutionFilterARB(int target, int format, int type, IntBuffer image) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnConvolutionFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(image); + nglGetnConvolutionFilterARB(target, format, type, (image.remaining() << 2), MemoryUtil.getAddress(image), function_pointer); + } + public static void glGetnConvolutionFilterARB(int target, int format, int type, ShortBuffer image) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnConvolutionFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(image); + nglGetnConvolutionFilterARB(target, format, type, (image.remaining() << 1), MemoryUtil.getAddress(image), function_pointer); + } + static native void nglGetnConvolutionFilterARB(int target, int format, int type, int image_bufSize, long image, long function_pointer); + public static void glGetnConvolutionFilterARB(int target, int format, int type, int image_bufSize, long image_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnConvolutionFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOenabled(caps); + nglGetnConvolutionFilterARBBO(target, format, type, image_bufSize, image_buffer_offset, function_pointer); + } + static native void nglGetnConvolutionFilterARBBO(int target, int format, int type, int image_bufSize, long image_buffer_offset, long function_pointer); + + public static void glGetnSeparableFilterARB(int target, int format, int type, ByteBuffer row, ByteBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, row.remaining(), MemoryUtil.getAddress(row), column.remaining(), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ByteBuffer row, ByteBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, row.remaining(), MemoryUtil.getAddress(row), column.remaining(), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ByteBuffer row, ByteBuffer column, FloatBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, row.remaining(), MemoryUtil.getAddress(row), column.remaining(), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ByteBuffer row, ByteBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, row.remaining(), MemoryUtil.getAddress(row), column.remaining(), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ByteBuffer row, ByteBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, row.remaining(), MemoryUtil.getAddress(row), column.remaining(), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ByteBuffer row, DoubleBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, row.remaining(), MemoryUtil.getAddress(row), (column.remaining() << 3), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ByteBuffer row, DoubleBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, row.remaining(), MemoryUtil.getAddress(row), (column.remaining() << 3), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ByteBuffer row, DoubleBuffer column, FloatBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, row.remaining(), MemoryUtil.getAddress(row), (column.remaining() << 3), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ByteBuffer row, DoubleBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, row.remaining(), MemoryUtil.getAddress(row), (column.remaining() << 3), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ByteBuffer row, DoubleBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, row.remaining(), MemoryUtil.getAddress(row), (column.remaining() << 3), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ByteBuffer row, FloatBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, row.remaining(), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ByteBuffer row, FloatBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, row.remaining(), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ByteBuffer row, FloatBuffer column, FloatBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, row.remaining(), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ByteBuffer row, FloatBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, row.remaining(), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ByteBuffer row, FloatBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, row.remaining(), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ByteBuffer row, IntBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, row.remaining(), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ByteBuffer row, IntBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, row.remaining(), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ByteBuffer row, IntBuffer column, FloatBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, row.remaining(), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ByteBuffer row, IntBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, row.remaining(), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ByteBuffer row, IntBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, row.remaining(), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ByteBuffer row, ShortBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, row.remaining(), MemoryUtil.getAddress(row), (column.remaining() << 1), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ByteBuffer row, ShortBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, row.remaining(), MemoryUtil.getAddress(row), (column.remaining() << 1), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ByteBuffer row, ShortBuffer column, FloatBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, row.remaining(), MemoryUtil.getAddress(row), (column.remaining() << 1), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ByteBuffer row, ShortBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, row.remaining(), MemoryUtil.getAddress(row), (column.remaining() << 1), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ByteBuffer row, ShortBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, row.remaining(), MemoryUtil.getAddress(row), (column.remaining() << 1), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, DoubleBuffer row, ByteBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 3), MemoryUtil.getAddress(row), column.remaining(), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, DoubleBuffer row, ByteBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 3), MemoryUtil.getAddress(row), column.remaining(), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, DoubleBuffer row, ByteBuffer column, FloatBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 3), MemoryUtil.getAddress(row), column.remaining(), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, DoubleBuffer row, ByteBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 3), MemoryUtil.getAddress(row), column.remaining(), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, DoubleBuffer row, ByteBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 3), MemoryUtil.getAddress(row), column.remaining(), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, DoubleBuffer row, DoubleBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 3), MemoryUtil.getAddress(row), (column.remaining() << 3), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, DoubleBuffer row, DoubleBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 3), MemoryUtil.getAddress(row), (column.remaining() << 3), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, DoubleBuffer row, DoubleBuffer column, FloatBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 3), MemoryUtil.getAddress(row), (column.remaining() << 3), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, DoubleBuffer row, DoubleBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 3), MemoryUtil.getAddress(row), (column.remaining() << 3), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, DoubleBuffer row, DoubleBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 3), MemoryUtil.getAddress(row), (column.remaining() << 3), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, DoubleBuffer row, FloatBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 3), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, DoubleBuffer row, FloatBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 3), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, DoubleBuffer row, FloatBuffer column, FloatBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 3), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, DoubleBuffer row, FloatBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 3), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, DoubleBuffer row, FloatBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 3), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, DoubleBuffer row, IntBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 3), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, DoubleBuffer row, IntBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 3), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, DoubleBuffer row, IntBuffer column, FloatBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 3), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, DoubleBuffer row, IntBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 3), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, DoubleBuffer row, IntBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 3), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, DoubleBuffer row, ShortBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 3), MemoryUtil.getAddress(row), (column.remaining() << 1), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, DoubleBuffer row, ShortBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 3), MemoryUtil.getAddress(row), (column.remaining() << 1), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, DoubleBuffer row, ShortBuffer column, FloatBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 3), MemoryUtil.getAddress(row), (column.remaining() << 1), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, DoubleBuffer row, ShortBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 3), MemoryUtil.getAddress(row), (column.remaining() << 1), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, DoubleBuffer row, ShortBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 3), MemoryUtil.getAddress(row), (column.remaining() << 1), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, FloatBuffer row, ByteBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), column.remaining(), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, FloatBuffer row, ByteBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), column.remaining(), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, FloatBuffer row, ByteBuffer column, FloatBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), column.remaining(), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, FloatBuffer row, ByteBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), column.remaining(), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, FloatBuffer row, ByteBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), column.remaining(), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, FloatBuffer row, DoubleBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 3), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, FloatBuffer row, DoubleBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 3), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, FloatBuffer row, DoubleBuffer column, FloatBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 3), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, FloatBuffer row, DoubleBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 3), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, FloatBuffer row, DoubleBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 3), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, FloatBuffer row, FloatBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, FloatBuffer row, FloatBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, FloatBuffer row, FloatBuffer column, FloatBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, FloatBuffer row, FloatBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, FloatBuffer row, FloatBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, FloatBuffer row, IntBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, FloatBuffer row, IntBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, FloatBuffer row, IntBuffer column, FloatBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, FloatBuffer row, IntBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, FloatBuffer row, IntBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, FloatBuffer row, ShortBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 1), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, FloatBuffer row, ShortBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 1), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, FloatBuffer row, ShortBuffer column, FloatBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 1), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, FloatBuffer row, ShortBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 1), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, FloatBuffer row, ShortBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 1), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, IntBuffer row, ByteBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), column.remaining(), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, IntBuffer row, ByteBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), column.remaining(), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, IntBuffer row, ByteBuffer column, FloatBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), column.remaining(), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, IntBuffer row, ByteBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), column.remaining(), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, IntBuffer row, ByteBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), column.remaining(), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, IntBuffer row, DoubleBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 3), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, IntBuffer row, DoubleBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 3), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, IntBuffer row, DoubleBuffer column, FloatBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 3), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, IntBuffer row, DoubleBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 3), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, IntBuffer row, DoubleBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 3), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, IntBuffer row, FloatBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, IntBuffer row, FloatBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, IntBuffer row, FloatBuffer column, FloatBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, IntBuffer row, FloatBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, IntBuffer row, FloatBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, IntBuffer row, IntBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, IntBuffer row, IntBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, IntBuffer row, IntBuffer column, FloatBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, IntBuffer row, IntBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, IntBuffer row, IntBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, IntBuffer row, ShortBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 1), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, IntBuffer row, ShortBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 1), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, IntBuffer row, ShortBuffer column, FloatBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 1), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, IntBuffer row, ShortBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 1), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, IntBuffer row, ShortBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 2), MemoryUtil.getAddress(row), (column.remaining() << 1), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ShortBuffer row, ByteBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 1), MemoryUtil.getAddress(row), column.remaining(), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ShortBuffer row, ByteBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 1), MemoryUtil.getAddress(row), column.remaining(), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ShortBuffer row, ByteBuffer column, FloatBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 1), MemoryUtil.getAddress(row), column.remaining(), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ShortBuffer row, ByteBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 1), MemoryUtil.getAddress(row), column.remaining(), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ShortBuffer row, ByteBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 1), MemoryUtil.getAddress(row), column.remaining(), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ShortBuffer row, DoubleBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 1), MemoryUtil.getAddress(row), (column.remaining() << 3), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ShortBuffer row, DoubleBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 1), MemoryUtil.getAddress(row), (column.remaining() << 3), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ShortBuffer row, DoubleBuffer column, FloatBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 1), MemoryUtil.getAddress(row), (column.remaining() << 3), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ShortBuffer row, DoubleBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 1), MemoryUtil.getAddress(row), (column.remaining() << 3), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ShortBuffer row, DoubleBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 1), MemoryUtil.getAddress(row), (column.remaining() << 3), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ShortBuffer row, FloatBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 1), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ShortBuffer row, FloatBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 1), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ShortBuffer row, FloatBuffer column, FloatBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 1), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ShortBuffer row, FloatBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 1), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ShortBuffer row, FloatBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 1), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ShortBuffer row, IntBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 1), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ShortBuffer row, IntBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 1), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ShortBuffer row, IntBuffer column, FloatBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 1), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ShortBuffer row, IntBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 1), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ShortBuffer row, IntBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 1), MemoryUtil.getAddress(row), (column.remaining() << 2), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ShortBuffer row, ShortBuffer column, ByteBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 1), MemoryUtil.getAddress(row), (column.remaining() << 1), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ShortBuffer row, ShortBuffer column, DoubleBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 1), MemoryUtil.getAddress(row), (column.remaining() << 1), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ShortBuffer row, ShortBuffer column, FloatBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 1), MemoryUtil.getAddress(row), (column.remaining() << 1), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ShortBuffer row, ShortBuffer column, IntBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 1), MemoryUtil.getAddress(row), (column.remaining() << 1), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + public static void glGetnSeparableFilterARB(int target, int format, int type, ShortBuffer row, ShortBuffer column, ShortBuffer span) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(row); + BufferChecks.checkDirect(column); + BufferChecks.checkDirect(span); + nglGetnSeparableFilterARB(target, format, type, (row.remaining() << 1), MemoryUtil.getAddress(row), (column.remaining() << 1), MemoryUtil.getAddress(column), MemoryUtil.getAddress(span), function_pointer); + } + static native void nglGetnSeparableFilterARB(int target, int format, int type, int row_rowBufSize, long row, int column_columnBufSize, long column, long span, long function_pointer); + public static void glGetnSeparableFilterARB(int target, int format, int type, int row_rowBufSize, long row_buffer_offset, int column_columnBufSize, long column_buffer_offset, long span_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnSeparableFilterARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOenabled(caps); + nglGetnSeparableFilterARBBO(target, format, type, row_rowBufSize, row_buffer_offset, column_columnBufSize, column_buffer_offset, span_buffer_offset, function_pointer); + } + static native void nglGetnSeparableFilterARBBO(int target, int format, int type, int row_rowBufSize, long row_buffer_offset, int column_columnBufSize, long column_buffer_offset, long span_buffer_offset, long function_pointer); + + public static void glGetnHistogramARB(int target, boolean reset, int format, int type, ByteBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnHistogramARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(values); + nglGetnHistogramARB(target, reset, format, type, values.remaining(), MemoryUtil.getAddress(values), function_pointer); + } + public static void glGetnHistogramARB(int target, boolean reset, int format, int type, DoubleBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnHistogramARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(values); + nglGetnHistogramARB(target, reset, format, type, (values.remaining() << 3), MemoryUtil.getAddress(values), function_pointer); + } + public static void glGetnHistogramARB(int target, boolean reset, int format, int type, FloatBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnHistogramARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(values); + nglGetnHistogramARB(target, reset, format, type, (values.remaining() << 2), MemoryUtil.getAddress(values), function_pointer); + } + public static void glGetnHistogramARB(int target, boolean reset, int format, int type, IntBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnHistogramARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(values); + nglGetnHistogramARB(target, reset, format, type, (values.remaining() << 2), MemoryUtil.getAddress(values), function_pointer); + } + public static void glGetnHistogramARB(int target, boolean reset, int format, int type, ShortBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnHistogramARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(values); + nglGetnHistogramARB(target, reset, format, type, (values.remaining() << 1), MemoryUtil.getAddress(values), function_pointer); + } + static native void nglGetnHistogramARB(int target, boolean reset, int format, int type, int values_bufSize, long values, long function_pointer); + public static void glGetnHistogramARB(int target, boolean reset, int format, int type, int values_bufSize, long values_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnHistogramARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOenabled(caps); + nglGetnHistogramARBBO(target, reset, format, type, values_bufSize, values_buffer_offset, function_pointer); + } + static native void nglGetnHistogramARBBO(int target, boolean reset, int format, int type, int values_bufSize, long values_buffer_offset, long function_pointer); + + public static void glGetnMinmaxARB(int target, boolean reset, int format, int type, ByteBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnMinmaxARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(values); + nglGetnMinmaxARB(target, reset, format, type, values.remaining(), MemoryUtil.getAddress(values), function_pointer); + } + public static void glGetnMinmaxARB(int target, boolean reset, int format, int type, DoubleBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnMinmaxARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(values); + nglGetnMinmaxARB(target, reset, format, type, (values.remaining() << 3), MemoryUtil.getAddress(values), function_pointer); + } + public static void glGetnMinmaxARB(int target, boolean reset, int format, int type, FloatBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnMinmaxARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(values); + nglGetnMinmaxARB(target, reset, format, type, (values.remaining() << 2), MemoryUtil.getAddress(values), function_pointer); + } + public static void glGetnMinmaxARB(int target, boolean reset, int format, int type, IntBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnMinmaxARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(values); + nglGetnMinmaxARB(target, reset, format, type, (values.remaining() << 2), MemoryUtil.getAddress(values), function_pointer); + } + public static void glGetnMinmaxARB(int target, boolean reset, int format, int type, ShortBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnMinmaxARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(values); + nglGetnMinmaxARB(target, reset, format, type, (values.remaining() << 1), MemoryUtil.getAddress(values), function_pointer); + } + static native void nglGetnMinmaxARB(int target, boolean reset, int format, int type, int values_bufSize, long values, long function_pointer); + public static void glGetnMinmaxARB(int target, boolean reset, int format, int type, int values_bufSize, long values_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnMinmaxARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOenabled(caps); + nglGetnMinmaxARBBO(target, reset, format, type, values_bufSize, values_buffer_offset, function_pointer); + } + static native void nglGetnMinmaxARBBO(int target, boolean reset, int format, int type, int values_bufSize, long values_buffer_offset, long function_pointer); + + public static void glGetnCompressedTexImageARB(int target, int lod, ByteBuffer img) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnCompressedTexImageARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(img); + nglGetnCompressedTexImageARB(target, lod, img.remaining(), MemoryUtil.getAddress(img), function_pointer); + } + public static void glGetnCompressedTexImageARB(int target, int lod, IntBuffer img) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnCompressedTexImageARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(img); + nglGetnCompressedTexImageARB(target, lod, (img.remaining() << 2), MemoryUtil.getAddress(img), function_pointer); + } + public static void glGetnCompressedTexImageARB(int target, int lod, ShortBuffer img) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnCompressedTexImageARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(img); + nglGetnCompressedTexImageARB(target, lod, (img.remaining() << 1), MemoryUtil.getAddress(img), function_pointer); + } + static native void nglGetnCompressedTexImageARB(int target, int lod, int img_bufSize, long img, long function_pointer); + public static void glGetnCompressedTexImageARB(int target, int lod, int img_bufSize, long img_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnCompressedTexImageARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOenabled(caps); + nglGetnCompressedTexImageARBBO(target, lod, img_bufSize, img_buffer_offset, function_pointer); + } + static native void nglGetnCompressedTexImageARBBO(int target, int lod, int img_bufSize, long img_buffer_offset, long function_pointer); + + public static void glGetnUniformfvARB(int program, int location, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnUniformfvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglGetnUniformfvARB(program, location, params.remaining() << 2, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetnUniformfvARB(int program, int location, int bufSize, long params, long function_pointer); + + public static void glGetnUniformivARB(int program, int location, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnUniformivARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglGetnUniformivARB(program, location, params.remaining() << 2, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetnUniformivARB(int program, int location, int bufSize, long params, long function_pointer); + + public static void glGetnUniformuivARB(int program, int location, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnUniformuivARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglGetnUniformuivARB(program, location, params.remaining() << 2, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetnUniformuivARB(int program, int location, int bufSize, long params, long function_pointer); + + public static void glGetnUniformdvARB(int program, int location, DoubleBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetnUniformdvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglGetnUniformdvARB(program, location, params.remaining() << 3, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetnUniformdvARB(int program, int location, int bufSize, long params, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBSampleShading.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBSampleShading.java new file mode 100644 index 0000000..4396c0f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBSampleShading.java @@ -0,0 +1,32 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBSampleShading { + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_SAMPLE_SHADING_ARB = 0x8C36; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, + * GetIntegerv, and GetFloatv: + */ + public static final int GL_MIN_SAMPLE_SHADING_VALUE_ARB = 0x8C37; + + private ARBSampleShading() {} + + public static void glMinSampleShadingARB(float value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMinSampleShadingARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglMinSampleShadingARB(value, function_pointer); + } + static native void nglMinSampleShadingARB(float value, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBSamplerObjects.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBSamplerObjects.java new file mode 100644 index 0000000..da4d1e1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBSamplerObjects.java @@ -0,0 +1,103 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBSamplerObjects { + + /** + * Accepted by the <value> parameter of the GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv and GetDoublev functions: + */ + public static final int GL_SAMPLER_BINDING = 0x8919; + + private ARBSamplerObjects() {} + + public static void glGenSamplers(IntBuffer samplers) { + GL33.glGenSamplers(samplers); + } + + /** Overloads glGenSamplers. */ + public static int glGenSamplers() { + return GL33.glGenSamplers(); + } + + public static void glDeleteSamplers(IntBuffer samplers) { + GL33.glDeleteSamplers(samplers); + } + + /** Overloads glDeleteSamplers. */ + public static void glDeleteSamplers(int sampler) { + GL33.glDeleteSamplers(sampler); + } + + public static boolean glIsSampler(int sampler) { + return GL33.glIsSampler(sampler); + } + + public static void glBindSampler(int unit, int sampler) { + GL33.glBindSampler(unit, sampler); + } + + public static void glSamplerParameteri(int sampler, int pname, int param) { + GL33.glSamplerParameteri(sampler, pname, param); + } + + public static void glSamplerParameterf(int sampler, int pname, float param) { + GL33.glSamplerParameterf(sampler, pname, param); + } + + public static void glSamplerParameter(int sampler, int pname, IntBuffer params) { + GL33.glSamplerParameter(sampler, pname, params); + } + + public static void glSamplerParameter(int sampler, int pname, FloatBuffer params) { + GL33.glSamplerParameter(sampler, pname, params); + } + + public static void glSamplerParameterI(int sampler, int pname, IntBuffer params) { + GL33.glSamplerParameterI(sampler, pname, params); + } + + public static void glSamplerParameterIu(int sampler, int pname, IntBuffer params) { + GL33.glSamplerParameterIu(sampler, pname, params); + } + + public static void glGetSamplerParameter(int sampler, int pname, IntBuffer params) { + GL33.glGetSamplerParameter(sampler, pname, params); + } + + /** Overloads glGetSamplerParameteriv. */ + public static int glGetSamplerParameteri(int sampler, int pname) { + return GL33.glGetSamplerParameteri(sampler, pname); + } + + public static void glGetSamplerParameter(int sampler, int pname, FloatBuffer params) { + GL33.glGetSamplerParameter(sampler, pname, params); + } + + /** Overloads glGetSamplerParameterfv. */ + public static float glGetSamplerParameterf(int sampler, int pname) { + return GL33.glGetSamplerParameterf(sampler, pname); + } + + public static void glGetSamplerParameterI(int sampler, int pname, IntBuffer params) { + GL33.glGetSamplerParameterI(sampler, pname, params); + } + + /** Overloads glGetSamplerParameterIiv. */ + public static int glGetSamplerParameterIi(int sampler, int pname) { + return GL33.glGetSamplerParameterIi(sampler, pname); + } + + public static void glGetSamplerParameterIu(int sampler, int pname, IntBuffer params) { + GL33.glGetSamplerParameterIu(sampler, pname, params); + } + + /** Overloads glGetSamplerParameterIuiv. */ + public static int glGetSamplerParameterIui(int sampler, int pname) { + return GL33.glGetSamplerParameterIui(sampler, pname); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBSeamlessCubeMap.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBSeamlessCubeMap.java new file mode 100644 index 0000000..9df648e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBSeamlessCubeMap.java @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBSeamlessCubeMap { + + /** + * Accepted by the <cap> parameter of Enable, Disable and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv + * and GetDoublev: + */ + public static final int GL_TEXTURE_CUBE_MAP_SEAMLESS = 0x884F; + + private ARBSeamlessCubeMap() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBSeamlessCubemapPerTexture.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBSeamlessCubemapPerTexture.java new file mode 100644 index 0000000..607d496 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBSeamlessCubemapPerTexture.java @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBSeamlessCubemapPerTexture { + + /** + * Accepted by the <pname> parameter of TexParameter{if}, + * TexParameter{if}v, GetTexParameter{if}v, SamplerParameter{if}, + * SamplerParameter{if}v, and GetSamplerParameter{if}v: + */ + public static final int GL_TEXTURE_CUBE_MAP_SEAMLESS = 0x884F; + + private ARBSeamlessCubemapPerTexture() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBSeparateShaderObjects.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBSeparateShaderObjects.java new file mode 100644 index 0000000..f270571 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBSeparateShaderObjects.java @@ -0,0 +1,329 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBSeparateShaderObjects { + + /** + * Accepted by <stages> parameter to UseProgramStages: + */ + public static final int GL_VERTEX_SHADER_BIT = 0x1, + GL_FRAGMENT_SHADER_BIT = 0x2, + GL_GEOMETRY_SHADER_BIT = 0x4, + GL_TESS_CONTROL_SHADER_BIT = 0x8, + GL_TESS_EVALUATION_SHADER_BIT = 0x10, + GL_ALL_SHADER_BITS = 0xFFFFFFFF; + + /** + * Accepted by the <pname> parameter of ProgramParameteri and + * GetProgramiv: + */ + public static final int GL_PROGRAM_SEPARABLE = 0x8258; + + /** + * Accepted by <type> parameter to GetProgramPipelineiv: + */ + public static final int GL_ACTIVE_PROGRAM = 0x8259; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + public static final int GL_PROGRAM_PIPELINE_BINDING = 0x825A; + + private ARBSeparateShaderObjects() {} + + public static void glUseProgramStages(int pipeline, int stages, int program) { + GL41.glUseProgramStages(pipeline, stages, program); + } + + public static void glActiveShaderProgram(int pipeline, int program) { + GL41.glActiveShaderProgram(pipeline, program); + } + + /** + * Single null-terminated source code string. + */ + public static int glCreateShaderProgram(int type, ByteBuffer string) { + return GL41.glCreateShaderProgram(type, string); + } + + /** + * Overloads glCreateShaderProgramv. + *

+ * Multiple null-terminated source code strings, one after the other. + */ + public static int glCreateShaderProgram(int type, int count, ByteBuffer strings) { + return GL41.glCreateShaderProgram(type, count, strings); + } + + /** Overloads glCreateShaderProgramv. */ + public static int glCreateShaderProgram(int type, ByteBuffer[] strings) { + return GL41.glCreateShaderProgram(type, strings); + } + + /** Overloads glCreateShaderProgramv. */ + public static int glCreateShaderProgram(int type, CharSequence string) { + return GL41.glCreateShaderProgram(type, string); + } + + /** Overloads glCreateShaderProgramv. */ + public static int glCreateShaderProgram(int type, CharSequence[] strings) { + return GL41.glCreateShaderProgram(type, strings); + } + + public static void glBindProgramPipeline(int pipeline) { + GL41.glBindProgramPipeline(pipeline); + } + + public static void glDeleteProgramPipelines(IntBuffer pipelines) { + GL41.glDeleteProgramPipelines(pipelines); + } + + /** Overloads glDeleteProgramPipelines. */ + public static void glDeleteProgramPipelines(int pipeline) { + GL41.glDeleteProgramPipelines(pipeline); + } + + public static void glGenProgramPipelines(IntBuffer pipelines) { + GL41.glGenProgramPipelines(pipelines); + } + + /** Overloads glGenProgramPipelines. */ + public static int glGenProgramPipelines() { + return GL41.glGenProgramPipelines(); + } + + public static boolean glIsProgramPipeline(int pipeline) { + return GL41.glIsProgramPipeline(pipeline); + } + + public static void glProgramParameteri(int program, int pname, int value) { + GL41.glProgramParameteri(program, pname, value); + } + + public static void glGetProgramPipeline(int pipeline, int pname, IntBuffer params) { + GL41.glGetProgramPipeline(pipeline, pname, params); + } + + /** Overloads glGetProgramPipelineiv. */ + public static int glGetProgramPipelinei(int pipeline, int pname) { + return GL41.glGetProgramPipelinei(pipeline, pname); + } + + public static void glProgramUniform1i(int program, int location, int v0) { + GL41.glProgramUniform1i(program, location, v0); + } + + public static void glProgramUniform2i(int program, int location, int v0, int v1) { + GL41.glProgramUniform2i(program, location, v0, v1); + } + + public static void glProgramUniform3i(int program, int location, int v0, int v1, int v2) { + GL41.glProgramUniform3i(program, location, v0, v1, v2); + } + + public static void glProgramUniform4i(int program, int location, int v0, int v1, int v2, int v3) { + GL41.glProgramUniform4i(program, location, v0, v1, v2, v3); + } + + public static void glProgramUniform1f(int program, int location, float v0) { + GL41.glProgramUniform1f(program, location, v0); + } + + public static void glProgramUniform2f(int program, int location, float v0, float v1) { + GL41.glProgramUniform2f(program, location, v0, v1); + } + + public static void glProgramUniform3f(int program, int location, float v0, float v1, float v2) { + GL41.glProgramUniform3f(program, location, v0, v1, v2); + } + + public static void glProgramUniform4f(int program, int location, float v0, float v1, float v2, float v3) { + GL41.glProgramUniform4f(program, location, v0, v1, v2, v3); + } + + public static void glProgramUniform1d(int program, int location, double v0) { + GL41.glProgramUniform1d(program, location, v0); + } + + public static void glProgramUniform2d(int program, int location, double v0, double v1) { + GL41.glProgramUniform2d(program, location, v0, v1); + } + + public static void glProgramUniform3d(int program, int location, double v0, double v1, double v2) { + GL41.glProgramUniform3d(program, location, v0, v1, v2); + } + + public static void glProgramUniform4d(int program, int location, double v0, double v1, double v2, double v3) { + GL41.glProgramUniform4d(program, location, v0, v1, v2, v3); + } + + public static void glProgramUniform1(int program, int location, IntBuffer value) { + GL41.glProgramUniform1(program, location, value); + } + + public static void glProgramUniform2(int program, int location, IntBuffer value) { + GL41.glProgramUniform2(program, location, value); + } + + public static void glProgramUniform3(int program, int location, IntBuffer value) { + GL41.glProgramUniform3(program, location, value); + } + + public static void glProgramUniform4(int program, int location, IntBuffer value) { + GL41.glProgramUniform4(program, location, value); + } + + public static void glProgramUniform1(int program, int location, FloatBuffer value) { + GL41.glProgramUniform1(program, location, value); + } + + public static void glProgramUniform2(int program, int location, FloatBuffer value) { + GL41.glProgramUniform2(program, location, value); + } + + public static void glProgramUniform3(int program, int location, FloatBuffer value) { + GL41.glProgramUniform3(program, location, value); + } + + public static void glProgramUniform4(int program, int location, FloatBuffer value) { + GL41.glProgramUniform4(program, location, value); + } + + public static void glProgramUniform1(int program, int location, DoubleBuffer value) { + GL41.glProgramUniform1(program, location, value); + } + + public static void glProgramUniform2(int program, int location, DoubleBuffer value) { + GL41.glProgramUniform2(program, location, value); + } + + public static void glProgramUniform3(int program, int location, DoubleBuffer value) { + GL41.glProgramUniform3(program, location, value); + } + + public static void glProgramUniform4(int program, int location, DoubleBuffer value) { + GL41.glProgramUniform4(program, location, value); + } + + public static void glProgramUniform1ui(int program, int location, int v0) { + GL41.glProgramUniform1ui(program, location, v0); + } + + public static void glProgramUniform2ui(int program, int location, int v0, int v1) { + GL41.glProgramUniform2ui(program, location, v0, v1); + } + + public static void glProgramUniform3ui(int program, int location, int v0, int v1, int v2) { + GL41.glProgramUniform3ui(program, location, v0, v1, v2); + } + + public static void glProgramUniform4ui(int program, int location, int v0, int v1, int v2, int v3) { + GL41.glProgramUniform4ui(program, location, v0, v1, v2, v3); + } + + public static void glProgramUniform1u(int program, int location, IntBuffer value) { + GL41.glProgramUniform1u(program, location, value); + } + + public static void glProgramUniform2u(int program, int location, IntBuffer value) { + GL41.glProgramUniform2u(program, location, value); + } + + public static void glProgramUniform3u(int program, int location, IntBuffer value) { + GL41.glProgramUniform3u(program, location, value); + } + + public static void glProgramUniform4u(int program, int location, IntBuffer value) { + GL41.glProgramUniform4u(program, location, value); + } + + public static void glProgramUniformMatrix2(int program, int location, boolean transpose, FloatBuffer value) { + GL41.glProgramUniformMatrix2(program, location, transpose, value); + } + + public static void glProgramUniformMatrix3(int program, int location, boolean transpose, FloatBuffer value) { + GL41.glProgramUniformMatrix3(program, location, transpose, value); + } + + public static void glProgramUniformMatrix4(int program, int location, boolean transpose, FloatBuffer value) { + GL41.glProgramUniformMatrix4(program, location, transpose, value); + } + + public static void glProgramUniformMatrix2(int program, int location, boolean transpose, DoubleBuffer value) { + GL41.glProgramUniformMatrix2(program, location, transpose, value); + } + + public static void glProgramUniformMatrix3(int program, int location, boolean transpose, DoubleBuffer value) { + GL41.glProgramUniformMatrix3(program, location, transpose, value); + } + + public static void glProgramUniformMatrix4(int program, int location, boolean transpose, DoubleBuffer value) { + GL41.glProgramUniformMatrix4(program, location, transpose, value); + } + + public static void glProgramUniformMatrix2x3(int program, int location, boolean transpose, FloatBuffer value) { + GL41.glProgramUniformMatrix2x3(program, location, transpose, value); + } + + public static void glProgramUniformMatrix3x2(int program, int location, boolean transpose, FloatBuffer value) { + GL41.glProgramUniformMatrix3x2(program, location, transpose, value); + } + + public static void glProgramUniformMatrix2x4(int program, int location, boolean transpose, FloatBuffer value) { + GL41.glProgramUniformMatrix2x4(program, location, transpose, value); + } + + public static void glProgramUniformMatrix4x2(int program, int location, boolean transpose, FloatBuffer value) { + GL41.glProgramUniformMatrix4x2(program, location, transpose, value); + } + + public static void glProgramUniformMatrix3x4(int program, int location, boolean transpose, FloatBuffer value) { + GL41.glProgramUniformMatrix3x4(program, location, transpose, value); + } + + public static void glProgramUniformMatrix4x3(int program, int location, boolean transpose, FloatBuffer value) { + GL41.glProgramUniformMatrix4x3(program, location, transpose, value); + } + + public static void glProgramUniformMatrix2x3(int program, int location, boolean transpose, DoubleBuffer value) { + GL41.glProgramUniformMatrix2x3(program, location, transpose, value); + } + + public static void glProgramUniformMatrix3x2(int program, int location, boolean transpose, DoubleBuffer value) { + GL41.glProgramUniformMatrix3x2(program, location, transpose, value); + } + + public static void glProgramUniformMatrix2x4(int program, int location, boolean transpose, DoubleBuffer value) { + GL41.glProgramUniformMatrix2x4(program, location, transpose, value); + } + + public static void glProgramUniformMatrix4x2(int program, int location, boolean transpose, DoubleBuffer value) { + GL41.glProgramUniformMatrix4x2(program, location, transpose, value); + } + + public static void glProgramUniformMatrix3x4(int program, int location, boolean transpose, DoubleBuffer value) { + GL41.glProgramUniformMatrix3x4(program, location, transpose, value); + } + + public static void glProgramUniformMatrix4x3(int program, int location, boolean transpose, DoubleBuffer value) { + GL41.glProgramUniformMatrix4x3(program, location, transpose, value); + } + + public static void glValidateProgramPipeline(int pipeline) { + GL41.glValidateProgramPipeline(pipeline); + } + + public static void glGetProgramPipelineInfoLog(int pipeline, IntBuffer length, ByteBuffer infoLog) { + GL41.glGetProgramPipelineInfoLog(pipeline, length, infoLog); + } + + /** Overloads glGetProgramPipelineInfoLog. */ + public static String glGetProgramPipelineInfoLog(int pipeline, int bufSize) { + return GL41.glGetProgramPipelineInfoLog(pipeline, bufSize); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBShaderAtomicCounters.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBShaderAtomicCounters.java new file mode 100644 index 0000000..8a76c61 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBShaderAtomicCounters.java @@ -0,0 +1,84 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBShaderAtomicCounters { + + /** + * Accepted by the <target> parameter of BindBufferBase and BindBufferRange: + */ + public static final int GL_ATOMIC_COUNTER_BUFFER = 0x92C0; + + /** + * Accepted by the <pname> parameter of GetBooleani_v, GetIntegeri_v, + * GetFloati_v, GetDoublei_v, GetInteger64i_v, GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, GetDoublev, and GetActiveAtomicCounterBufferiv: + */ + public static final int GL_ATOMIC_COUNTER_BUFFER_BINDING = 0x92C1; + + /** + * Accepted by the <pname> parameter of GetIntegeri_64v: + */ + public static final int GL_ATOMIC_COUNTER_BUFFER_START = 0x92C2, + GL_ATOMIC_COUNTER_BUFFER_SIZE = 0x92C3; + + /** + * Accepted by the <pname> parameter of GetActiveAtomicCounterBufferiv: + */ + public static final int GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE = 0x92C4, + GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS = 0x92C5, + GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES = 0x92C6, + GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER = 0x92C7, + GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER = 0x92C8, + GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x92C9, + GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER = 0x92CA, + GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER = 0x92CB; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + public static final int GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS = 0x92CC, + GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS = 0x92CD, + GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS = 0x92CE, + GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS = 0x92CF, + GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS = 0x92D0, + GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS = 0x92D1, + GL_MAX_VERTEX_ATOMIC_COUNTERS = 0x92D2, + GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS = 0x92D3, + GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS = 0x92D4, + GL_MAX_GEOMETRY_ATOMIC_COUNTERS = 0x92D5, + GL_MAX_FRAGMENT_ATOMIC_COUNTERS = 0x92D6, + GL_MAX_COMBINED_ATOMIC_COUNTERS = 0x92D7, + GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE = 0x92D8, + GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS = 0x92DC; + + /** + * Accepted by the <pname> parameter of GetProgramiv: + */ + public static final int GL_ACTIVE_ATOMIC_COUNTER_BUFFERS = 0x92D9; + + /** + * Accepted by the <pname> parameter of GetActiveUniformsiv: + */ + public static final int GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX = 0x92DA; + + /** + * Returned in <params> by GetActiveUniform and GetActiveUniformsiv: + */ + public static final int GL_UNSIGNED_INT_ATOMIC_COUNTER = 0x92DB; + + private ARBShaderAtomicCounters() {} + + public static void glGetActiveAtomicCounterBuffer(int program, int bufferIndex, int pname, IntBuffer params) { + GL42.glGetActiveAtomicCounterBuffer(program, bufferIndex, pname, params); + } + + /** Overloads glGetActiveAtomicCounterBufferiv. */ + public static int glGetActiveAtomicCounterBuffer(int program, int bufferIndex, int pname) { + return GL42.glGetActiveAtomicCounterBuffer(program, bufferIndex, pname); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBShaderImageLoadStore.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBShaderImageLoadStore.java new file mode 100644 index 0000000..59a8c74 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBShaderImageLoadStore.java @@ -0,0 +1,111 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBShaderImageLoadStore { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, GetDoublev, and GetInteger64v: + */ + public static final int GL_MAX_IMAGE_UNITS = 0x8F38, + GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS = 0x8F39, + GL_MAX_IMAGE_SAMPLES = 0x906D, + GL_MAX_VERTEX_IMAGE_UNIFORMS = 0x90CA, + GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS = 0x90CB, + GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS = 0x90CC, + GL_MAX_GEOMETRY_IMAGE_UNIFORMS = 0x90CD, + GL_MAX_FRAGMENT_IMAGE_UNIFORMS = 0x90CE, + GL_MAX_COMBINED_IMAGE_UNIFORMS = 0x90CF; + + /** + * Accepted by the <target> parameter of GetIntegeri_v and GetBooleani_v: + */ + public static final int GL_IMAGE_BINDING_NAME = 0x8F3A, + GL_IMAGE_BINDING_LEVEL = 0x8F3B, + GL_IMAGE_BINDING_LAYERED = 0x8F3C, + GL_IMAGE_BINDING_LAYER = 0x8F3D, + GL_IMAGE_BINDING_ACCESS = 0x8F3E, + GL_IMAGE_BINDING_FORMAT = 0x906E; + + /** + * Accepted by the <barriers> parameter of MemoryBarrier: + */ + public static final int GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT = 0x1, + GL_ELEMENT_ARRAY_BARRIER_BIT = 0x2, + GL_UNIFORM_BARRIER_BIT = 0x4, + GL_TEXTURE_FETCH_BARRIER_BIT = 0x8, + GL_SHADER_IMAGE_ACCESS_BARRIER_BIT = 0x20, + GL_COMMAND_BARRIER_BIT = 0x40, + GL_PIXEL_BUFFER_BARRIER_BIT = 0x80, + GL_TEXTURE_UPDATE_BARRIER_BIT = 0x100, + GL_BUFFER_UPDATE_BARRIER_BIT = 0x200, + GL_FRAMEBUFFER_BARRIER_BIT = 0x400, + GL_TRANSFORM_FEEDBACK_BARRIER_BIT = 0x800, + GL_ATOMIC_COUNTER_BARRIER_BIT = 0x1000, + GL_ALL_BARRIER_BITS = 0xFFFFFFFF; + + /** + * Returned by the <type> parameter of GetActiveUniform: + */ + public static final int GL_IMAGE_1D = 0x904C, + GL_IMAGE_2D = 0x904D, + GL_IMAGE_3D = 0x904E, + GL_IMAGE_2D_RECT = 0x904F, + GL_IMAGE_CUBE = 0x9050, + GL_IMAGE_BUFFER = 0x9051, + GL_IMAGE_1D_ARRAY = 0x9052, + GL_IMAGE_2D_ARRAY = 0x9053, + GL_IMAGE_CUBE_MAP_ARRAY = 0x9054, + GL_IMAGE_2D_MULTISAMPLE = 0x9055, + GL_IMAGE_2D_MULTISAMPLE_ARRAY = 0x9056, + GL_INT_IMAGE_1D = 0x9057, + GL_INT_IMAGE_2D = 0x9058, + GL_INT_IMAGE_3D = 0x9059, + GL_INT_IMAGE_2D_RECT = 0x905A, + GL_INT_IMAGE_CUBE = 0x905B, + GL_INT_IMAGE_BUFFER = 0x905C, + GL_INT_IMAGE_1D_ARRAY = 0x905D, + GL_INT_IMAGE_2D_ARRAY = 0x905E, + GL_INT_IMAGE_CUBE_MAP_ARRAY = 0x905F, + GL_INT_IMAGE_2D_MULTISAMPLE = 0x9060, + GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY = 0x9061, + GL_UNSIGNED_INT_IMAGE_1D = 0x9062, + GL_UNSIGNED_INT_IMAGE_2D = 0x9063, + GL_UNSIGNED_INT_IMAGE_3D = 0x9064, + GL_UNSIGNED_INT_IMAGE_2D_RECT = 0x9065, + GL_UNSIGNED_INT_IMAGE_CUBE = 0x9066, + GL_UNSIGNED_INT_IMAGE_BUFFER = 0x9067, + GL_UNSIGNED_INT_IMAGE_1D_ARRAY = 0x9068, + GL_UNSIGNED_INT_IMAGE_2D_ARRAY = 0x9069, + GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY = 0x906A, + GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE = 0x906B, + GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY = 0x906C; + + /** + * Accepted by the <value> parameter of GetTexParameteriv, GetTexParameterfv, + * GetTexParameterIiv, and GetTexParameterIuiv: + */ + public static final int GL_IMAGE_FORMAT_COMPATIBILITY_TYPE = 0x90C7; + + /** + * Returned in the <data> parameter of GetTexParameteriv, GetTexParameterfv, + * GetTexParameterIiv, and GetTexParameterIuiv when <value> is + * IMAGE_FORMAT_COMPATIBILITY_TYPE: + */ + public static final int GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE = 0x90C8, + IMAGE_FORMAT_COMPATIBILITY_BY_CLASS = 0x90C9; + + private ARBShaderImageLoadStore() {} + + public static void glBindImageTexture(int unit, int texture, int level, boolean layered, int layer, int access, int format) { + GL42.glBindImageTexture(unit, texture, level, layered, layer, access, format); + } + + public static void glMemoryBarrier(int barriers) { + GL42.glMemoryBarrier(barriers); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBShaderObjects.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBShaderObjects.java new file mode 100644 index 0000000..530a1db --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBShaderObjects.java @@ -0,0 +1,552 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBShaderObjects { + + /** + * Accepted by the <pname> argument of GetHandleARB: + */ + public static final int GL_PROGRAM_OBJECT_ARB = 0x8B40; + + /** + * Accepted by the <pname> parameter of GetObjectParameter{fi}vARB: + */ + public static final int GL_OBJECT_TYPE_ARB = 0x8B4E, + GL_OBJECT_SUBTYPE_ARB = 0x8B4F, + GL_OBJECT_DELETE_STATUS_ARB = 0x8B80, + GL_OBJECT_COMPILE_STATUS_ARB = 0x8B81, + GL_OBJECT_LINK_STATUS_ARB = 0x8B82, + GL_OBJECT_VALIDATE_STATUS_ARB = 0x8B83, + GL_OBJECT_INFO_LOG_LENGTH_ARB = 0x8B84, + GL_OBJECT_ATTACHED_OBJECTS_ARB = 0x8B85, + GL_OBJECT_ACTIVE_UNIFORMS_ARB = 0x8B86, + GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB = 0x8B87, + GL_OBJECT_SHADER_SOURCE_LENGTH_ARB = 0x8B88; + + /** + * Returned by the <params> parameter of GetObjectParameter{fi}vARB: + */ + public static final int GL_SHADER_OBJECT_ARB = 0x8B48; + + /** + * Returned by the <type> parameter of GetActiveUniformARB: + */ + public static final int GL_FLOAT_VEC2_ARB = 0x8B50, + GL_FLOAT_VEC3_ARB = 0x8B51, + GL_FLOAT_VEC4_ARB = 0x8B52, + GL_INT_VEC2_ARB = 0x8B53, + GL_INT_VEC3_ARB = 0x8B54, + GL_INT_VEC4_ARB = 0x8B55, + GL_BOOL_ARB = 0x8B56, + GL_BOOL_VEC2_ARB = 0x8B57, + GL_BOOL_VEC3_ARB = 0x8B58, + GL_BOOL_VEC4_ARB = 0x8B59, + GL_FLOAT_MAT2_ARB = 0x8B5A, + GL_FLOAT_MAT3_ARB = 0x8B5B, + GL_FLOAT_MAT4_ARB = 0x8B5C, + GL_SAMPLER_1D_ARB = 0x8B5D, + GL_SAMPLER_2D_ARB = 0x8B5E, + GL_SAMPLER_3D_ARB = 0x8B5F, + GL_SAMPLER_CUBE_ARB = 0x8B60, + GL_SAMPLER_1D_SHADOW_ARB = 0x8B61, + GL_SAMPLER_2D_SHADOW_ARB = 0x8B62, + GL_SAMPLER_2D_RECT_ARB = 0x8B63, + GL_SAMPLER_2D_RECT_SHADOW_ARB = 0x8B64; + + private ARBShaderObjects() {} + + public static void glDeleteObjectARB(int obj) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteObjectARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeleteObjectARB(obj, function_pointer); + } + static native void nglDeleteObjectARB(int obj, long function_pointer); + + public static int glGetHandleARB(int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetHandleARB; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglGetHandleARB(pname, function_pointer); + return __result; + } + static native int nglGetHandleARB(int pname, long function_pointer); + + public static void glDetachObjectARB(int containerObj, int attachedObj) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDetachObjectARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglDetachObjectARB(containerObj, attachedObj, function_pointer); + } + static native void nglDetachObjectARB(int containerObj, int attachedObj, long function_pointer); + + public static int glCreateShaderObjectARB(int shaderType) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCreateShaderObjectARB; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglCreateShaderObjectARB(shaderType, function_pointer); + return __result; + } + static native int nglCreateShaderObjectARB(int shaderType, long function_pointer); + + /** + * The ARB_shader_objects extension allows multiple, optionally null-terminated, source strings to define a shader program. + *

+ * This method uses just a single string, that should NOT be null-terminated. + */ + public static void glShaderSourceARB(int shader, ByteBuffer string) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glShaderSourceARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(string); + nglShaderSourceARB(shader, 1, MemoryUtil.getAddress(string), string.remaining(), function_pointer); + } + static native void nglShaderSourceARB(int shader, int count, long string, int string_length, long function_pointer); + + /** Overloads glShaderSourceARB. */ + public static void glShaderSourceARB(int shader, CharSequence string) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glShaderSourceARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglShaderSourceARB(shader, 1, APIUtil.getBuffer(caps, string), string.length(), function_pointer); + } + + /** Overloads glShaderSourceARB. */ + public static void glShaderSourceARB(int shader, CharSequence[] strings) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glShaderSourceARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkArray(strings); + nglShaderSourceARB3(shader, strings.length, APIUtil.getBuffer(caps, strings), APIUtil.getLengths(caps, strings), function_pointer); + } + static native void nglShaderSourceARB3(int shader, int count, long strings, long length, long function_pointer); + + public static void glCompileShaderARB(int shaderObj) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompileShaderARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglCompileShaderARB(shaderObj, function_pointer); + } + static native void nglCompileShaderARB(int shaderObj, long function_pointer); + + public static int glCreateProgramObjectARB() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCreateProgramObjectARB; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglCreateProgramObjectARB(function_pointer); + return __result; + } + static native int nglCreateProgramObjectARB(long function_pointer); + + public static void glAttachObjectARB(int containerObj, int obj) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glAttachObjectARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglAttachObjectARB(containerObj, obj, function_pointer); + } + static native void nglAttachObjectARB(int containerObj, int obj, long function_pointer); + + public static void glLinkProgramARB(int programObj) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glLinkProgramARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglLinkProgramARB(programObj, function_pointer); + } + static native void nglLinkProgramARB(int programObj, long function_pointer); + + public static void glUseProgramObjectARB(int programObj) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUseProgramObjectARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglUseProgramObjectARB(programObj, function_pointer); + } + static native void nglUseProgramObjectARB(int programObj, long function_pointer); + + public static void glValidateProgramARB(int programObj) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glValidateProgramARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglValidateProgramARB(programObj, function_pointer); + } + static native void nglValidateProgramARB(int programObj, long function_pointer); + + public static void glUniform1fARB(int location, float v0) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform1fARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform1fARB(location, v0, function_pointer); + } + static native void nglUniform1fARB(int location, float v0, long function_pointer); + + public static void glUniform2fARB(int location, float v0, float v1) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform2fARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform2fARB(location, v0, v1, function_pointer); + } + static native void nglUniform2fARB(int location, float v0, float v1, long function_pointer); + + public static void glUniform3fARB(int location, float v0, float v1, float v2) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform3fARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform3fARB(location, v0, v1, v2, function_pointer); + } + static native void nglUniform3fARB(int location, float v0, float v1, float v2, long function_pointer); + + public static void glUniform4fARB(int location, float v0, float v1, float v2, float v3) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform4fARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform4fARB(location, v0, v1, v2, v3, function_pointer); + } + static native void nglUniform4fARB(int location, float v0, float v1, float v2, float v3, long function_pointer); + + public static void glUniform1iARB(int location, int v0) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform1iARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform1iARB(location, v0, function_pointer); + } + static native void nglUniform1iARB(int location, int v0, long function_pointer); + + public static void glUniform2iARB(int location, int v0, int v1) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform2iARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform2iARB(location, v0, v1, function_pointer); + } + static native void nglUniform2iARB(int location, int v0, int v1, long function_pointer); + + public static void glUniform3iARB(int location, int v0, int v1, int v2) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform3iARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform3iARB(location, v0, v1, v2, function_pointer); + } + static native void nglUniform3iARB(int location, int v0, int v1, int v2, long function_pointer); + + public static void glUniform4iARB(int location, int v0, int v1, int v2, int v3) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform4iARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform4iARB(location, v0, v1, v2, v3, function_pointer); + } + static native void nglUniform4iARB(int location, int v0, int v1, int v2, int v3, long function_pointer); + + public static void glUniform1ARB(int location, FloatBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform1fvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(values); + nglUniform1fvARB(location, values.remaining(), MemoryUtil.getAddress(values), function_pointer); + } + static native void nglUniform1fvARB(int location, int values_count, long values, long function_pointer); + + public static void glUniform2ARB(int location, FloatBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform2fvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(values); + nglUniform2fvARB(location, values.remaining() >> 1, MemoryUtil.getAddress(values), function_pointer); + } + static native void nglUniform2fvARB(int location, int values_count, long values, long function_pointer); + + public static void glUniform3ARB(int location, FloatBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform3fvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(values); + nglUniform3fvARB(location, values.remaining() / 3, MemoryUtil.getAddress(values), function_pointer); + } + static native void nglUniform3fvARB(int location, int values_count, long values, long function_pointer); + + public static void glUniform4ARB(int location, FloatBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform4fvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(values); + nglUniform4fvARB(location, values.remaining() >> 2, MemoryUtil.getAddress(values), function_pointer); + } + static native void nglUniform4fvARB(int location, int values_count, long values, long function_pointer); + + public static void glUniform1ARB(int location, IntBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform1ivARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(values); + nglUniform1ivARB(location, values.remaining(), MemoryUtil.getAddress(values), function_pointer); + } + static native void nglUniform1ivARB(int location, int values_count, long values, long function_pointer); + + public static void glUniform2ARB(int location, IntBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform2ivARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(values); + nglUniform2ivARB(location, values.remaining() >> 1, MemoryUtil.getAddress(values), function_pointer); + } + static native void nglUniform2ivARB(int location, int values_count, long values, long function_pointer); + + public static void glUniform3ARB(int location, IntBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform3ivARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(values); + nglUniform3ivARB(location, values.remaining() / 3, MemoryUtil.getAddress(values), function_pointer); + } + static native void nglUniform3ivARB(int location, int values_count, long values, long function_pointer); + + public static void glUniform4ARB(int location, IntBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform4ivARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(values); + nglUniform4ivARB(location, values.remaining() >> 2, MemoryUtil.getAddress(values), function_pointer); + } + static native void nglUniform4ivARB(int location, int values_count, long values, long function_pointer); + + public static void glUniformMatrix2ARB(int location, boolean transpose, FloatBuffer matrices) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformMatrix2fvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(matrices); + nglUniformMatrix2fvARB(location, matrices.remaining() >> 2, transpose, MemoryUtil.getAddress(matrices), function_pointer); + } + static native void nglUniformMatrix2fvARB(int location, int matrices_count, boolean transpose, long matrices, long function_pointer); + + public static void glUniformMatrix3ARB(int location, boolean transpose, FloatBuffer matrices) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformMatrix3fvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(matrices); + nglUniformMatrix3fvARB(location, matrices.remaining() / (3 * 3), transpose, MemoryUtil.getAddress(matrices), function_pointer); + } + static native void nglUniformMatrix3fvARB(int location, int matrices_count, boolean transpose, long matrices, long function_pointer); + + public static void glUniformMatrix4ARB(int location, boolean transpose, FloatBuffer matrices) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformMatrix4fvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(matrices); + nglUniformMatrix4fvARB(location, matrices.remaining() >> 4, transpose, MemoryUtil.getAddress(matrices), function_pointer); + } + static native void nglUniformMatrix4fvARB(int location, int matrices_count, boolean transpose, long matrices, long function_pointer); + + public static void glGetObjectParameterARB(int obj, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetObjectParameterfvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglGetObjectParameterfvARB(obj, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetObjectParameterfvARB(int obj, int pname, long params, long function_pointer); + + /** Overloads glGetObjectParameterfvARB. */ + public static float glGetObjectParameterfARB(int obj, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetObjectParameterfvARB; + BufferChecks.checkFunctionAddress(function_pointer); + FloatBuffer params = APIUtil.getBufferFloat(caps); + nglGetObjectParameterfvARB(obj, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetObjectParameterARB(int obj, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetObjectParameterivARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglGetObjectParameterivARB(obj, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetObjectParameterivARB(int obj, int pname, long params, long function_pointer); + + /** Overloads glGetObjectParameterivARB. */ + public static int glGetObjectParameteriARB(int obj, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetObjectParameterivARB; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetObjectParameterivARB(obj, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetInfoLogARB(int obj, IntBuffer length, ByteBuffer infoLog) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetInfoLogARB; + BufferChecks.checkFunctionAddress(function_pointer); + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkDirect(infoLog); + nglGetInfoLogARB(obj, infoLog.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(infoLog), function_pointer); + } + static native void nglGetInfoLogARB(int obj, int infoLog_maxLength, long length, long infoLog, long function_pointer); + + /** Overloads glGetInfoLogARB. */ + public static String glGetInfoLogARB(int obj, int maxLength) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetInfoLogARB; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer infoLog_length = APIUtil.getLengths(caps); + ByteBuffer infoLog = APIUtil.getBufferByte(caps, maxLength); + nglGetInfoLogARB(obj, maxLength, MemoryUtil.getAddress0(infoLog_length), MemoryUtil.getAddress(infoLog), function_pointer); + infoLog.limit(infoLog_length.get(0)); + return APIUtil.getString(caps, infoLog); + } + + public static void glGetAttachedObjectsARB(int containerObj, IntBuffer count, IntBuffer obj) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetAttachedObjectsARB; + BufferChecks.checkFunctionAddress(function_pointer); + if (count != null) + BufferChecks.checkBuffer(count, 1); + BufferChecks.checkDirect(obj); + nglGetAttachedObjectsARB(containerObj, obj.remaining(), MemoryUtil.getAddressSafe(count), MemoryUtil.getAddress(obj), function_pointer); + } + static native void nglGetAttachedObjectsARB(int containerObj, int obj_maxCount, long count, long obj, long function_pointer); + + /** + * Returns the location of the uniform with the specified name. The ByteBuffer should contain the uniform name as a null-terminated string. + *

+ * @param programObj + * @param name + */ + public static int glGetUniformLocationARB(int programObj, ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetUniformLocationARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(name); + BufferChecks.checkNullTerminated(name); + int __result = nglGetUniformLocationARB(programObj, MemoryUtil.getAddress(name), function_pointer); + return __result; + } + static native int nglGetUniformLocationARB(int programObj, long name, long function_pointer); + + /** Overloads glGetUniformLocationARB. */ + public static int glGetUniformLocationARB(int programObj, CharSequence name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetUniformLocationARB; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglGetUniformLocationARB(programObj, APIUtil.getBufferNT(caps, name), function_pointer); + return __result; + } + + public static void glGetActiveUniformARB(int programObj, int index, IntBuffer length, IntBuffer size, IntBuffer type, ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveUniformARB; + BufferChecks.checkFunctionAddress(function_pointer); + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkBuffer(size, 1); + BufferChecks.checkBuffer(type, 1); + BufferChecks.checkDirect(name); + nglGetActiveUniformARB(programObj, index, name.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(size), MemoryUtil.getAddress(type), MemoryUtil.getAddress(name), function_pointer); + } + static native void nglGetActiveUniformARB(int programObj, int index, int name_maxLength, long length, long size, long type, long name, long function_pointer); + + /** + * Overloads glGetActiveUniformARB. + *

+ * Overloads glGetActiveUniformARB. This version returns both size and type in the sizeType buffer (at .position() and .position() + 1). + */ + public static String glGetActiveUniformARB(int programObj, int index, int maxLength, IntBuffer sizeType) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveUniformARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(sizeType, 2); + IntBuffer name_length = APIUtil.getLengths(caps); + ByteBuffer name = APIUtil.getBufferByte(caps, maxLength); + nglGetActiveUniformARB(programObj, index, maxLength, MemoryUtil.getAddress0(name_length), MemoryUtil.getAddress(sizeType), MemoryUtil.getAddress(sizeType, sizeType.position() + 1), MemoryUtil.getAddress(name), function_pointer); + name.limit(name_length.get(0)); + return APIUtil.getString(caps, name); + } + + /** + * Overloads glGetActiveUniformARB. + *

+ * Overloads glGetActiveUniformARB. This version returns only the uniform name. + */ + public static String glGetActiveUniformARB(int programObj, int index, int maxLength) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveUniformARB; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer name_length = APIUtil.getLengths(caps); + ByteBuffer name = APIUtil.getBufferByte(caps, maxLength); + nglGetActiveUniformARB(programObj, index, maxLength, MemoryUtil.getAddress0(name_length), MemoryUtil.getAddress0(APIUtil.getBufferInt(caps)), MemoryUtil.getAddress(APIUtil.getBufferInt(caps), 1), MemoryUtil.getAddress(name), function_pointer); + name.limit(name_length.get(0)); + return APIUtil.getString(caps, name); + } + + /** + * Overloads glGetActiveUniformARB. + *

+ * Overloads glGetActiveUniformARB. This version returns only the uniform size. + */ + public static int glGetActiveUniformSizeARB(int programObj, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveUniformARB; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer size = APIUtil.getBufferInt(caps); + nglGetActiveUniformARB(programObj, index, 0, 0L, MemoryUtil.getAddress(size), MemoryUtil.getAddress(size, 1), APIUtil.getBufferByte0(caps), function_pointer); + return size.get(0); + } + + /** + * Overloads glGetActiveUniformARB. + *

+ * Overloads glGetActiveUniformARB. This version returns only the uniform type. + */ + public static int glGetActiveUniformTypeARB(int programObj, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveUniformARB; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer type = APIUtil.getBufferInt(caps); + nglGetActiveUniformARB(programObj, index, 0, 0L, MemoryUtil.getAddress(type, 1), MemoryUtil.getAddress(type), APIUtil.getBufferByte0(caps), function_pointer); + return type.get(0); + } + + public static void glGetUniformARB(int programObj, int location, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetUniformfvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglGetUniformfvARB(programObj, location, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetUniformfvARB(int programObj, int location, long params, long function_pointer); + + public static void glGetUniformARB(int programObj, int location, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetUniformivARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglGetUniformivARB(programObj, location, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetUniformivARB(int programObj, int location, long params, long function_pointer); + + public static void glGetShaderSourceARB(int obj, IntBuffer length, ByteBuffer source) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetShaderSourceARB; + BufferChecks.checkFunctionAddress(function_pointer); + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkDirect(source); + nglGetShaderSourceARB(obj, source.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(source), function_pointer); + } + static native void nglGetShaderSourceARB(int obj, int source_maxLength, long length, long source, long function_pointer); + + /** Overloads glGetShaderSourceARB. */ + public static String glGetShaderSourceARB(int obj, int maxLength) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetShaderSourceARB; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer source_length = APIUtil.getLengths(caps); + ByteBuffer source = APIUtil.getBufferByte(caps, maxLength); + nglGetShaderSourceARB(obj, maxLength, MemoryUtil.getAddress0(source_length), MemoryUtil.getAddress(source), function_pointer); + source.limit(source_length.get(0)); + return APIUtil.getString(caps, source); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBShaderStorageBufferObject.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBShaderStorageBufferObject.java new file mode 100644 index 0000000..ad5a462 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBShaderStorageBufferObject.java @@ -0,0 +1,62 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBShaderStorageBufferObject { + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, and + * GetBufferPointerv: + */ + public static final int GL_SHADER_STORAGE_BUFFER = 0x90D2; + + /** + * Accepted by the <pname> parameter of GetIntegerv, GetIntegeri_v, + * GetBooleanv, GetInteger64v, GetFloatv, GetDoublev, GetBooleani_v, + * GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v: + */ + public static final int GL_SHADER_STORAGE_BUFFER_BINDING = 0x90D3; + + /** + * Accepted by the <pname> parameter of GetIntegeri_v, GetBooleani_v, + * GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v: + */ + public static final int GL_SHADER_STORAGE_BUFFER_START = 0x90D4, + GL_SHADER_STORAGE_BUFFER_SIZE = 0x90D5; + + /** + * Accepted by the <pname> parameter of GetIntegerv, GetBooleanv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + public static final int GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS = 0x90D6, + GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS = 0x90D7, + GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS = 0x90D8, + GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS = 0x90D9, + GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS = 0x90DA, + GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS = 0x90DB, + GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS = 0x90DC, + GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS = 0x90DD, + GL_MAX_SHADER_STORAGE_BLOCK_SIZE = 0x90DE, + GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT = 0x90DF; + + /** + * Accepted in the <barriers> bitfield in glMemoryBarrier: + */ + public static final int GL_SHADER_STORAGE_BARRIER_BIT = 0x2000; + + /** + * Alias for the existing token + * MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS: + */ + public static final int GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES = 0x8F39; + + private ARBShaderStorageBufferObject() {} + + public static void glShaderStorageBlockBinding(int program, int storageBlockIndex, int storageBlockBinding) { + GL43.glShaderStorageBlockBinding(program, storageBlockIndex, storageBlockBinding); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBShaderSubroutine.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBShaderSubroutine.java new file mode 100644 index 0000000..a4683f0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBShaderSubroutine.java @@ -0,0 +1,102 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBShaderSubroutine { + + /** + * Accepted by the <pname> parameter of GetProgramStageiv: + */ + public static final int GL_ACTIVE_SUBROUTINES = 0x8DE5, + GL_ACTIVE_SUBROUTINE_UNIFORMS = 0x8DE6, + GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS = 0x8E47, + GL_ACTIVE_SUBROUTINE_MAX_LENGTH = 0x8E48, + GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH = 0x8E49; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, GetDoublev, and GetInteger64v: + */ + public static final int GL_MAX_SUBROUTINES = 0x8DE7, + GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS = 0x8DE8; + + /** + * Accepted by the <pname> parameter of GetActiveSubroutineUniformiv: + */ + public static final int GL_NUM_COMPATIBLE_SUBROUTINES = 0x8E4A, + GL_COMPATIBLE_SUBROUTINES = 0x8E4B, + GL_UNIFORM_SIZE = 0x8A38, + GL_UNIFORM_NAME_LENGTH = 0x8A39; + + private ARBShaderSubroutine() {} + + public static int glGetSubroutineUniformLocation(int program, int shadertype, ByteBuffer name) { + return GL40.glGetSubroutineUniformLocation(program, shadertype, name); + } + + /** Overloads glGetSubroutineUniformLocation. */ + public static int glGetSubroutineUniformLocation(int program, int shadertype, CharSequence name) { + return GL40.glGetSubroutineUniformLocation(program, shadertype, name); + } + + public static int glGetSubroutineIndex(int program, int shadertype, ByteBuffer name) { + return GL40.glGetSubroutineIndex(program, shadertype, name); + } + + /** Overloads glGetSubroutineIndex. */ + public static int glGetSubroutineIndex(int program, int shadertype, CharSequence name) { + return GL40.glGetSubroutineIndex(program, shadertype, name); + } + + public static void glGetActiveSubroutineUniform(int program, int shadertype, int index, int pname, IntBuffer values) { + GL40.glGetActiveSubroutineUniform(program, shadertype, index, pname, values); + } + + /** Overloads glGetActiveSubroutineUniformiv. */ + public static int glGetActiveSubroutineUniformi(int program, int shadertype, int index, int pname) { + return GL40.glGetActiveSubroutineUniformi(program, shadertype, index, pname); + } + + public static void glGetActiveSubroutineUniformName(int program, int shadertype, int index, IntBuffer length, ByteBuffer name) { + GL40.glGetActiveSubroutineUniformName(program, shadertype, index, length, name); + } + + /** Overloads glGetActiveSubroutineUniformName. */ + public static String glGetActiveSubroutineUniformName(int program, int shadertype, int index, int bufsize) { + return GL40.glGetActiveSubroutineUniformName(program, shadertype, index, bufsize); + } + + public static void glGetActiveSubroutineName(int program, int shadertype, int index, IntBuffer length, ByteBuffer name) { + GL40.glGetActiveSubroutineName(program, shadertype, index, length, name); + } + + /** Overloads glGetActiveSubroutineName. */ + public static String glGetActiveSubroutineName(int program, int shadertype, int index, int bufsize) { + return GL40.glGetActiveSubroutineName(program, shadertype, index, bufsize); + } + + public static void glUniformSubroutinesu(int shadertype, IntBuffer indices) { + GL40.glUniformSubroutinesu(shadertype, indices); + } + + public static void glGetUniformSubroutineu(int shadertype, int location, IntBuffer params) { + GL40.glGetUniformSubroutineu(shadertype, location, params); + } + + /** Overloads glGetUniformSubroutineuiv. */ + public static int glGetUniformSubroutineui(int shadertype, int location) { + return GL40.glGetUniformSubroutineui(shadertype, location); + } + + public static void glGetProgramStage(int program, int shadertype, int pname, IntBuffer values) { + GL40.glGetProgramStage(program, shadertype, pname, values); + } + + /** Overloads glGetProgramStageiv. */ + public static int glGetProgramStagei(int program, int shadertype, int pname) { + return GL40.glGetProgramStagei(program, shadertype, pname); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBShadingLanguage100.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBShadingLanguage100.java new file mode 100644 index 0000000..06af31c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBShadingLanguage100.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBShadingLanguage100 { + + /** + * Accepted by the <name> parameter of GetString: + */ + public static final int GL_SHADING_LANGUAGE_VERSION_ARB = 0x8B8C; + + private ARBShadingLanguage100() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBShadingLanguageInclude.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBShadingLanguageInclude.java new file mode 100644 index 0000000..a8c5012 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBShadingLanguageInclude.java @@ -0,0 +1,160 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBShadingLanguageInclude { + + /** + * Accepted by the <type> parameter of NamedStringARB: + */ + public static final int GL_SHADER_INCLUDE_ARB = 0x8DAE; + + /** + * Accepted by the <pname> parameter of GetNamedStringivARB: + */ + public static final int GL_NAMED_STRING_LENGTH_ARB = 0x8DE9, + GL_NAMED_STRING_TYPE_ARB = 0x8DEA; + + private ARBShadingLanguageInclude() {} + + public static void glNamedStringARB(int type, ByteBuffer name, ByteBuffer string) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedStringARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(name); + BufferChecks.checkDirect(string); + nglNamedStringARB(type, name.remaining(), MemoryUtil.getAddress(name), string.remaining(), MemoryUtil.getAddress(string), function_pointer); + } + static native void nglNamedStringARB(int type, int name_namelen, long name, int string_stringlen, long string, long function_pointer); + + /** Overloads glNamedStringARB. */ + public static void glNamedStringARB(int type, CharSequence name, CharSequence string) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedStringARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglNamedStringARB(type, name.length(), APIUtil.getBuffer(caps, name), string.length(), APIUtil.getBuffer(caps, string, name.length()), function_pointer); + } + + public static void glDeleteNamedStringARB(ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteNamedStringARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(name); + nglDeleteNamedStringARB(name.remaining(), MemoryUtil.getAddress(name), function_pointer); + } + static native void nglDeleteNamedStringARB(int name_namelen, long name, long function_pointer); + + /** Overloads glDeleteNamedStringARB. */ + public static void glDeleteNamedStringARB(CharSequence name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteNamedStringARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeleteNamedStringARB(name.length(), APIUtil.getBuffer(caps, name), function_pointer); + } + + public static void glCompileShaderIncludeARB(int shader, int count, ByteBuffer path) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompileShaderIncludeARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(path); + BufferChecks.checkNullTerminated(path, count); + nglCompileShaderIncludeARB(shader, count, MemoryUtil.getAddress(path), 0L, function_pointer); + } + static native void nglCompileShaderIncludeARB(int shader, int count, long path, long length, long function_pointer); + + /** Overloads glCompileShaderIncludeARB. */ + public static void glCompileShaderIncludeARB(int shader, CharSequence[] path) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompileShaderIncludeARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkArray(path); + nglCompileShaderIncludeARB2(shader, path.length, APIUtil.getBuffer(caps, path), APIUtil.getLengths(caps, path), function_pointer); + } + static native void nglCompileShaderIncludeARB2(int shader, int count, long path, long length, long function_pointer); + + public static boolean glIsNamedStringARB(ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsNamedStringARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(name); + boolean __result = nglIsNamedStringARB(name.remaining(), MemoryUtil.getAddress(name), function_pointer); + return __result; + } + static native boolean nglIsNamedStringARB(int name_namelen, long name, long function_pointer); + + /** Overloads glIsNamedStringARB. */ + public static boolean glIsNamedStringARB(CharSequence name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsNamedStringARB; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsNamedStringARB(name.length(), APIUtil.getBuffer(caps, name), function_pointer); + return __result; + } + + public static void glGetNamedStringARB(ByteBuffer name, IntBuffer stringlen, ByteBuffer string) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedStringARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(name); + if (stringlen != null) + BufferChecks.checkBuffer(stringlen, 1); + BufferChecks.checkDirect(string); + nglGetNamedStringARB(name.remaining(), MemoryUtil.getAddress(name), string.remaining(), MemoryUtil.getAddressSafe(stringlen), MemoryUtil.getAddress(string), function_pointer); + } + static native void nglGetNamedStringARB(int name_namelen, long name, int string_bufSize, long stringlen, long string, long function_pointer); + + /** Overloads glGetNamedStringARB. */ + public static void glGetNamedStringARB(CharSequence name, IntBuffer stringlen, ByteBuffer string) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedStringARB; + BufferChecks.checkFunctionAddress(function_pointer); + if (stringlen != null) + BufferChecks.checkBuffer(stringlen, 1); + BufferChecks.checkDirect(string); + nglGetNamedStringARB(name.length(), APIUtil.getBuffer(caps, name), string.remaining(), MemoryUtil.getAddressSafe(stringlen), MemoryUtil.getAddress(string), function_pointer); + } + + /** Overloads glGetNamedStringARB. */ + public static String glGetNamedStringARB(CharSequence name, int bufSize) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedStringARB; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer string_length = APIUtil.getLengths(caps); + ByteBuffer string = APIUtil.getBufferByte(caps, bufSize + name.length()); + nglGetNamedStringARB(name.length(), APIUtil.getBuffer(caps, name), bufSize, MemoryUtil.getAddress0(string_length), MemoryUtil.getAddress(string), function_pointer); + string.limit(name.length() + string_length.get(0)); + return APIUtil.getString(caps, string); + } + + public static void glGetNamedStringARB(ByteBuffer name, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedStringivARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(name); + BufferChecks.checkBuffer(params, 1); + nglGetNamedStringivARB(name.remaining(), MemoryUtil.getAddress(name), pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetNamedStringivARB(int name_namelen, long name, int pname, long params, long function_pointer); + + /** Overloads glGetNamedStringivARB. */ + public static void glGetNamedStringiARB(CharSequence name, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedStringivARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetNamedStringivARB(name.length(), APIUtil.getBuffer(caps, name), pname, MemoryUtil.getAddress(params), function_pointer); + } + + /** Overloads glGetNamedStringivARB. */ + public static int glGetNamedStringiARB(CharSequence name, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedStringivARB; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetNamedStringivARB(name.length(), APIUtil.getBuffer(caps, name), pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBShadow.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBShadow.java new file mode 100644 index 0000000..ff9f1b9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBShadow.java @@ -0,0 +1,15 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBShadow { + + public static final int GL_TEXTURE_COMPARE_MODE_ARB = 0x884C, + GL_TEXTURE_COMPARE_FUNC_ARB = 0x884D, + GL_COMPARE_R_TO_TEXTURE_ARB = 0x884E; + + private ARBShadow() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBShadowAmbient.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBShadowAmbient.java new file mode 100644 index 0000000..92619ad --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBShadowAmbient.java @@ -0,0 +1,13 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBShadowAmbient { + + public static final int GL_TEXTURE_COMPARE_FAIL_VALUE_ARB = 0x80BF; + + private ARBShadowAmbient() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBSparseTexture.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBSparseTexture.java new file mode 100644 index 0000000..e39991e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBSparseTexture.java @@ -0,0 +1,57 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBSparseTexture { + + /** + * Accepted by the <pname> parameter to TexParameter{i f}{v}, + * TexParameterI{u}v, GetTexParameter{if}v and GetTexParameterIi{u}v: + */ + public static final int GL_TEXTURE_SPARSE_ARB = 0x91A6, + GL_VIRTUAL_PAGE_SIZE_INDEX_ARB = 0x91A7; + + /** + * Accepted by the <pname> parameter of GetTexParameter{if}v and + * GetTexParameterIi{u}v: + */ + public static final int GL_NUM_SPARSE_LEVELS_ARB = 0x91AA; + + /** + * Accepted by the <pname> parameter to GetInternalformativ: + */ + public static final int GL_NUM_VIRTUAL_PAGE_SIZES_ARB = 0x91A8, + GL_VIRTUAL_PAGE_SIZE_X_ARB = 0x9195, + GL_VIRTUAL_PAGE_SIZE_Y_ARB = 0x9196, + GL_VIRTUAL_PAGE_SIZE_Z_ARB = 0x9197; + + /** + * Accepted by the <pname> parameter to GetIntegerv, GetFloatv, GetDoublev, + * GetInteger64v, and GetBooleanv: + */ + public static final int GL_MAX_SPARSE_TEXTURE_SIZE_ARB = 0x9198, + GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB = 0x9199, + GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB = 0x919A, + GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB = 0x91A9; + + private ARBSparseTexture() {} + + public static void glTexPageCommitmentARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, boolean commit) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexPageCommitmentARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexPageCommitmentARB(target, level, xoffset, yoffset, zoffset, width, height, depth, commit, function_pointer); + } + static native void nglTexPageCommitmentARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, boolean commit, long function_pointer); + + public static void glTexturePageCommitmentEXT(int texture, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, boolean commit) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexturePageCommitmentEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexturePageCommitmentEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, commit, function_pointer); + } + static native void nglTexturePageCommitmentEXT(int texture, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, boolean commit, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBStencilTexturing.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBStencilTexturing.java new file mode 100644 index 0000000..c03b7ef --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBStencilTexturing.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBStencilTexturing { + + /** + * Accepted by the <pname> parameter of TexParameter* and GetTexParameter*: + */ + public static final int GL_DEPTH_STENCIL_TEXTURE_MODE = 0x90EA; + + private ARBStencilTexturing() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBSync.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBSync.java new file mode 100644 index 0000000..30fe11f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBSync.java @@ -0,0 +1,106 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBSync { + + /** + * Accepted as the <pname> parameter of GetInteger64v: + */ + public static final int GL_MAX_SERVER_WAIT_TIMEOUT = 0x9111; + + /** + * Accepted as the <pname> parameter of GetSynciv: + */ + public static final int GL_OBJECT_TYPE = 0x9112, + GL_SYNC_CONDITION = 0x9113, + GL_SYNC_STATUS = 0x9114, + GL_SYNC_FLAGS = 0x9115; + + /** + * Returned in <values> for GetSynciv <pname> OBJECT_TYPE: + */ + public static final int GL_SYNC_FENCE = 0x9116; + + /** + * Returned in <values> for GetSynciv <pname> SYNC_CONDITION: + */ + public static final int GL_SYNC_GPU_COMMANDS_COMPLETE = 0x9117; + + /** + * Returned in <values> for GetSynciv <pname> SYNC_STATUS: + */ + public static final int GL_UNSIGNALED = 0x9118, + GL_SIGNALED = 0x9119; + + /** + * Accepted in the <flags> parameter of ClientWaitSync: + */ + public static final int GL_SYNC_FLUSH_COMMANDS_BIT = 0x1; + + /** + * Accepted in the <timeout> parameter of WaitSync: + */ + public static final long GL_TIMEOUT_IGNORED = 0xFFFFFFFFFFFFFFFFL; + + /** + * Returned by ClientWaitSync: + */ + public static final int GL_ALREADY_SIGNALED = 0x911A, + GL_TIMEOUT_EXPIRED = 0x911B, + GL_CONDITION_SATISFIED = 0x911C, + GL_WAIT_FAILED = 0x911D; + + private ARBSync() {} + + public static GLSync glFenceSync(int condition, int flags) { + return GL32.glFenceSync(condition, flags); + } + + public static boolean glIsSync(GLSync sync) { + return GL32.glIsSync(sync); + } + + public static void glDeleteSync(GLSync sync) { + GL32.glDeleteSync(sync); + } + + public static int glClientWaitSync(GLSync sync, int flags, long timeout) { + return GL32.glClientWaitSync(sync, flags, timeout); + } + + public static void glWaitSync(GLSync sync, int flags, long timeout) { + GL32.glWaitSync(sync, flags, timeout); + } + + public static void glGetInteger64(int pname, LongBuffer params) { + GL32.glGetInteger64(pname, params); + } + + /** Overloads glGetInteger64v. */ + public static long glGetInteger64(int pname) { + return GL32.glGetInteger64(pname); + } + + public static void glGetSync(GLSync sync, int pname, IntBuffer length, IntBuffer values) { + GL32.glGetSync(sync, pname, length, values); + } + + /** + * Overloads glGetSynciv. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetSynci} instead. + */ + @Deprecated + public static int glGetSync(GLSync sync, int pname) { + return GL32.glGetSynci(sync, pname); + } + + /** Overloads glGetSynciv. */ + public static int glGetSynci(GLSync sync, int pname) { + return GL32.glGetSynci(sync, pname); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTessellationShader.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTessellationShader.java new file mode 100644 index 0000000..2aee60b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTessellationShader.java @@ -0,0 +1,107 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBTessellationShader { + + /** + * Accepted by the <mode> parameter of Begin and all vertex array functions + * that implicitly call Begin: + */ + public static final int GL_PATCHES = 0xE; + + /** + * Accepted by the <pname> parameter of PatchParameteri, GetBooleanv, + * GetDoublev, GetFloatv, GetIntegerv, and GetInteger64v: + */ + public static final int GL_PATCH_VERTICES = 0x8E72; + + /** + * Accepted by the <pname> parameter of PatchParameterfv, GetBooleanv, + * GetDoublev, GetFloatv, and GetIntegerv, and GetInteger64v: + */ + public static final int GL_PATCH_DEFAULT_INNER_LEVEL = 0x8E73, + GL_PATCH_DEFAULT_OUTER_LEVEL = 0x8E74; + + /** + * Accepted by the <pname> parameter of GetProgramiv: + */ + public static final int GL_TESS_CONTROL_OUTPUT_VERTICES = 0x8E75, + GL_TESS_GEN_MODE = 0x8E76, + GL_TESS_GEN_SPACING = 0x8E77, + GL_TESS_GEN_VERTEX_ORDER = 0x8E78, + GL_TESS_GEN_POINT_MODE = 0x8E79; + + /** + * Returned by GetProgramiv when <pname> is TESS_GEN_MODE: + */ + public static final int GL_TRIANGLES = 0x4, + GL_QUADS = 0x7, + GL_ISOLINES = 0x8E7A; + + /** + * Returned by GetProgramiv when <pname> is TESS_GEN_SPACING: + */ + public static final int GL_EQUAL = 0x202, + GL_FRACTIONAL_ODD = 0x8E7B, + GL_FRACTIONAL_EVEN = 0x8E7C; + + /** + * Returned by GetProgramiv when <pname> is TESS_GEN_VERTEX_ORDER: + */ + public static final int GL_CCW = 0x901, + GL_CW = 0x900; + + /** + * Returned by GetProgramiv when <pname> is TESS_GEN_POINT_MODE: + */ + public static final int GL_FALSE = 0x0, + GL_TRUE = 0x1; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetFloatv, + * GetIntegerv, and GetInteger64v: + */ + public static final int GL_MAX_PATCH_VERTICES = 0x8E7D, + GL_MAX_TESS_GEN_LEVEL = 0x8E7E, + GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E7F, + GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E80, + GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS = 0x8E81, + GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS = 0x8E82, + GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS = 0x8E83, + GL_MAX_TESS_PATCH_COMPONENTS = 0x8E84, + GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS = 0x8E85, + GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS = 0x8E86, + GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS = 0x8E89, + GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS = 0x8E8A, + GL_MAX_TESS_CONTROL_INPUT_COMPONENTS = 0x886C, + GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS = 0x886D, + GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E1E, + GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E1F; + + /** + * Accepted by the <pname> parameter of GetActiveUniformBlockiv: + */ + public static final int GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER = 0x84F0, + GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x84F1; + + /** + * Accepted by the <type> parameter of CreateShader and returned by the + * <params> parameter of GetShaderiv: + */ + public static final int GL_TESS_EVALUATION_SHADER = 0x8E87, + GL_TESS_CONTROL_SHADER = 0x8E88; + + private ARBTessellationShader() {} + + public static void glPatchParameteri(int pname, int value) { + GL40.glPatchParameteri(pname, value); + } + + public static void glPatchParameter(int pname, FloatBuffer values) { + GL40.glPatchParameter(pname, values); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureBorderClamp.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureBorderClamp.java new file mode 100644 index 0000000..86a0b1b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureBorderClamp.java @@ -0,0 +1,13 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBTextureBorderClamp { + + public static final int GL_CLAMP_TO_BORDER_ARB = 0x812D; + + private ARBTextureBorderClamp() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureBufferObject.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureBufferObject.java new file mode 100644 index 0000000..a0c5d11 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureBufferObject.java @@ -0,0 +1,37 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBTextureBufferObject { + + /** + * Accepted by the <target> parameter of BindBuffer, BufferData, + * BufferSubData, MapBuffer, MapBufferRangeARB, BindTexture, UnmapBuffer, + * GetBufferSubData, GetBufferParameteriv, GetBufferPointerv, and TexBufferARB, + * and the parameter of GetBooleanv, GetDoublev, GetFloatv, and + * GetIntegerv: + */ + public static final int GL_TEXTURE_BUFFER_ARB = 0x8C2A; + + /** + * Accepted by the <pname> parameters of GetBooleanv, GetDoublev, + * GetFloatv, and GetIntegerv: + */ + public static final int GL_MAX_TEXTURE_BUFFER_SIZE_ARB = 0x8C2B, + GL_TEXTURE_BINDING_BUFFER_ARB = 0x8C2C, + GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB = 0x8C2D, + GL_TEXTURE_BUFFER_FORMAT_ARB = 0x8C2E; + + private ARBTextureBufferObject() {} + + public static void glTexBufferARB(int target, int internalformat, int buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexBufferARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexBufferARB(target, internalformat, buffer, function_pointer); + } + static native void nglTexBufferARB(int target, int internalformat, int buffer, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureBufferRange.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureBufferRange.java new file mode 100644 index 0000000..f6e2179 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureBufferRange.java @@ -0,0 +1,35 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBTextureBufferRange { + + /** + * Accepted by the <pname> parameter of GetTexLevelParameter: + */ + public static final int GL_TEXTURE_BUFFER_OFFSET = 0x919D, + GL_TEXTURE_BUFFER_SIZE = 0x919E; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT = 0x919F; + + private ARBTextureBufferRange() {} + + public static void glTexBufferRange(int target, int internalformat, int buffer, long offset, long size) { + GL43.glTexBufferRange(target, internalformat, buffer, offset, size); + } + + public static void glTextureBufferRangeEXT(int texture, int target, int internalformat, int buffer, long offset, long size) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureBufferRangeEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglTextureBufferRangeEXT(texture, target, internalformat, buffer, offset, size, function_pointer); + } + static native void nglTextureBufferRangeEXT(int texture, int target, int internalformat, int buffer, long offset, long size, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureCompression.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureCompression.java new file mode 100644 index 0000000..85a556a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureCompression.java @@ -0,0 +1,149 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBTextureCompression { + + public static final int GL_COMPRESSED_ALPHA_ARB = 0x84E9, + GL_COMPRESSED_LUMINANCE_ARB = 0x84EA, + GL_COMPRESSED_LUMINANCE_ALPHA_ARB = 0x84EB, + GL_COMPRESSED_INTENSITY_ARB = 0x84EC, + GL_COMPRESSED_RGB_ARB = 0x84ED, + GL_COMPRESSED_RGBA_ARB = 0x84EE, + GL_TEXTURE_COMPRESSION_HINT_ARB = 0x84EF, + GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB = 0x86A0, + GL_TEXTURE_COMPRESSED_ARB = 0x86A1, + GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB = 0x86A2, + GL_COMPRESSED_TEXTURE_FORMATS_ARB = 0x86A3; + + private ARBTextureCompression() {} + + public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, ByteBuffer pData) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTexImage1DARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(pData); + nglCompressedTexImage1DARB(target, level, internalformat, width, border, pData.remaining(), MemoryUtil.getAddress(pData), function_pointer); + } + static native void nglCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int pData_imageSize, long pData, long function_pointer); + public static void glCompressedTexImage1DARB(int target, int level, int internalformat, int width, int border, int pData_imageSize, long pData_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTexImage1DARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglCompressedTexImage1DARBBO(target, level, internalformat, width, border, pData_imageSize, pData_buffer_offset, function_pointer); + } + static native void nglCompressedTexImage1DARBBO(int target, int level, int internalformat, int width, int border, int pData_imageSize, long pData_buffer_offset, long function_pointer); + + public static void glCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, ByteBuffer pData) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTexImage2DARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(pData); + nglCompressedTexImage2DARB(target, level, internalformat, width, height, border, pData.remaining(), MemoryUtil.getAddress(pData), function_pointer); + } + static native void nglCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int pData_imageSize, long pData, long function_pointer); + public static void glCompressedTexImage2DARB(int target, int level, int internalformat, int width, int height, int border, int pData_imageSize, long pData_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTexImage2DARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglCompressedTexImage2DARBBO(target, level, internalformat, width, height, border, pData_imageSize, pData_buffer_offset, function_pointer); + } + static native void nglCompressedTexImage2DARBBO(int target, int level, int internalformat, int width, int height, int border, int pData_imageSize, long pData_buffer_offset, long function_pointer); + + public static void glCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, int depth, int border, ByteBuffer pData) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTexImage3DARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(pData); + nglCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, pData.remaining(), MemoryUtil.getAddress(pData), function_pointer); + } + static native void nglCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, int depth, int border, int pData_imageSize, long pData, long function_pointer); + public static void glCompressedTexImage3DARB(int target, int level, int internalformat, int width, int height, int depth, int border, int pData_imageSize, long pData_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTexImage3DARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglCompressedTexImage3DARBBO(target, level, internalformat, width, height, depth, border, pData_imageSize, pData_buffer_offset, function_pointer); + } + static native void nglCompressedTexImage3DARBBO(int target, int level, int internalformat, int width, int height, int depth, int border, int pData_imageSize, long pData_buffer_offset, long function_pointer); + + public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, ByteBuffer pData) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTexSubImage1DARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(pData); + nglCompressedTexSubImage1DARB(target, level, xoffset, width, format, pData.remaining(), MemoryUtil.getAddress(pData), function_pointer); + } + static native void nglCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, int pData_imageSize, long pData, long function_pointer); + public static void glCompressedTexSubImage1DARB(int target, int level, int xoffset, int width, int format, int pData_imageSize, long pData_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTexSubImage1DARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglCompressedTexSubImage1DARBBO(target, level, xoffset, width, format, pData_imageSize, pData_buffer_offset, function_pointer); + } + static native void nglCompressedTexSubImage1DARBBO(int target, int level, int xoffset, int width, int format, int pData_imageSize, long pData_buffer_offset, long function_pointer); + + public static void glCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, int height, int format, ByteBuffer pData) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTexSubImage2DARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(pData); + nglCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, format, pData.remaining(), MemoryUtil.getAddress(pData), function_pointer); + } + static native void nglCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, int height, int format, int pData_imageSize, long pData, long function_pointer); + public static void glCompressedTexSubImage2DARB(int target, int level, int xoffset, int yoffset, int width, int height, int format, int pData_imageSize, long pData_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTexSubImage2DARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglCompressedTexSubImage2DARBBO(target, level, xoffset, yoffset, width, height, format, pData_imageSize, pData_buffer_offset, function_pointer); + } + static native void nglCompressedTexSubImage2DARBBO(int target, int level, int xoffset, int yoffset, int width, int height, int format, int pData_imageSize, long pData_buffer_offset, long function_pointer); + + public static void glCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, ByteBuffer pData) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTexSubImage3DARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(pData); + nglCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, format, pData.remaining(), MemoryUtil.getAddress(pData), function_pointer); + } + static native void nglCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int pData_imageSize, long pData, long function_pointer); + public static void glCompressedTexSubImage3DARB(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int pData_imageSize, long pData_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTexSubImage3DARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglCompressedTexSubImage3DARBBO(target, level, xoffset, yoffset, zoffset, width, height, depth, format, pData_imageSize, pData_buffer_offset, function_pointer); + } + static native void nglCompressedTexSubImage3DARBBO(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int pData_imageSize, long pData_buffer_offset, long function_pointer); + + public static void glGetCompressedTexImageARB(int target, int lod, ByteBuffer pImg) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetCompressedTexImageARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(pImg); + nglGetCompressedTexImageARB(target, lod, MemoryUtil.getAddress(pImg), function_pointer); + } + static native void nglGetCompressedTexImageARB(int target, int lod, long pImg, long function_pointer); + public static void glGetCompressedTexImageARB(int target, int lod, long pImg_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetCompressedTexImageARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOenabled(caps); + nglGetCompressedTexImageARBBO(target, lod, pImg_buffer_offset, function_pointer); + } + static native void nglGetCompressedTexImageARBBO(int target, int lod, long pImg_buffer_offset, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureCompressionBPTC.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureCompressionBPTC.java new file mode 100644 index 0000000..777bf14 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureCompressionBPTC.java @@ -0,0 +1,22 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBTextureCompressionBPTC { + + /** + * Accepted by the <internalformat> parameter of TexImage2D, TexImage3D, + * CopyTexImage2D, CopyTexImage3D, CompressedTexImage2DARB, and + * CompressedTexImage3DARB and the <format> parameter of + * CompressedTexSubImage2DARB and CompressedTexSubImage3DARB: + */ + public static final int GL_COMPRESSED_RGBA_BPTC_UNORM_ARB = 0x8E8C, + GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB = 0x8E8D, + GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB = 0x8E8E, + GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB = 0x8E8F; + + private ARBTextureCompressionBPTC() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureCompressionRGTC.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureCompressionRGTC.java new file mode 100644 index 0000000..0ebb60f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureCompressionRGTC.java @@ -0,0 +1,21 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBTextureCompressionRGTC { + + /** + * Accepted by the <internalformat> parameter of TexImage2D, + * CopyTexImage2D, and CompressedTexImage2D and the <format> parameter + * of CompressedTexSubImage2D: + */ + public static final int GL_COMPRESSED_RED_RGTC1 = 0x8DBB, + GL_COMPRESSED_SIGNED_RED_RGTC1 = 0x8DBC, + GL_COMPRESSED_RG_RGTC2 = 0x8DBD, + GL_COMPRESSED_SIGNED_RG_RGTC2 = 0x8DBE; + + private ARBTextureCompressionRGTC() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureCubeMap.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureCubeMap.java new file mode 100644 index 0000000..dc75f31 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureCubeMap.java @@ -0,0 +1,24 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBTextureCubeMap { + + public static final int GL_NORMAL_MAP_ARB = 0x8511, + GL_REFLECTION_MAP_ARB = 0x8512, + GL_TEXTURE_CUBE_MAP_ARB = 0x8513, + GL_TEXTURE_BINDING_CUBE_MAP_ARB = 0x8514, + GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB = 0x8515, + GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB = 0x8516, + GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB = 0x8517, + GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB = 0x8518, + GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB = 0x8519, + GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB = 0x851A, + GL_PROXY_TEXTURE_CUBE_MAP_ARB = 0x851B, + GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB = 0x851C; + + private ARBTextureCubeMap() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureCubeMapArray.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureCubeMapArray.java new file mode 100644 index 0000000..41ff84e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureCubeMapArray.java @@ -0,0 +1,42 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBTextureCubeMapArray { + + /** + * Accepted by the <target> parameter of TexParameteri, TexParameteriv, + * TexParameterf, TexParameterfv, BindTexture, and GenerateMipmap: + *

+ * Accepted by the <target> parameter of TexImage3D, TexSubImage3D, + * CompressedTeximage3D, CompressedTexSubImage3D and CopyTexSubImage3D: + *

+ * Accepted by the <tex> parameter of GetTexImage: + */ + public static final int GL_TEXTURE_CUBE_MAP_ARRAY_ARB = 0x9009; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, + * GetIntegerv and GetFloatv: + */ + public static final int GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB = 0x900A; + + /** + * Accepted by the <target> parameter of TexImage3D, TexSubImage3D, + * CompressedTeximage3D, CompressedTexSubImage3D and CopyTexSubImage3D: + */ + public static final int GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB = 0x900B; + + /** + * Returned by the <type> parameter of GetActiveUniform: + */ + public static final int GL_SAMPLER_CUBE_MAP_ARRAY_ARB = 0x900C, + GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB = 0x900D, + GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB = 0x900E, + GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB = 0x900F; + + private ARBTextureCubeMapArray() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureEnvCombine.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureEnvCombine.java new file mode 100644 index 0000000..6623eb3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureEnvCombine.java @@ -0,0 +1,34 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBTextureEnvCombine { + + public static final int GL_COMBINE_ARB = 0x8570, + GL_COMBINE_RGB_ARB = 0x8571, + GL_COMBINE_ALPHA_ARB = 0x8572, + GL_SOURCE0_RGB_ARB = 0x8580, + GL_SOURCE1_RGB_ARB = 0x8581, + GL_SOURCE2_RGB_ARB = 0x8582, + GL_SOURCE0_ALPHA_ARB = 0x8588, + GL_SOURCE1_ALPHA_ARB = 0x8589, + GL_SOURCE2_ALPHA_ARB = 0x858A, + GL_OPERAND0_RGB_ARB = 0x8590, + GL_OPERAND1_RGB_ARB = 0x8591, + GL_OPERAND2_RGB_ARB = 0x8592, + GL_OPERAND0_ALPHA_ARB = 0x8598, + GL_OPERAND1_ALPHA_ARB = 0x8599, + GL_OPERAND2_ALPHA_ARB = 0x859A, + GL_RGB_SCALE_ARB = 0x8573, + GL_ADD_SIGNED_ARB = 0x8574, + GL_INTERPOLATE_ARB = 0x8575, + GL_SUBTRACT_ARB = 0x84E7, + GL_CONSTANT_ARB = 0x8576, + GL_PRIMARY_COLOR_ARB = 0x8577, + GL_PREVIOUS_ARB = 0x8578; + + private ARBTextureEnvCombine() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureEnvDot3.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureEnvDot3.java new file mode 100644 index 0000000..2a5d0f2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureEnvDot3.java @@ -0,0 +1,14 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBTextureEnvDot3 { + + public static final int GL_DOT3_RGB_ARB = 0x86AE, + GL_DOT3_RGBA_ARB = 0x86AF; + + private ARBTextureEnvDot3() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureFloat.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureFloat.java new file mode 100644 index 0000000..428f068 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureFloat.java @@ -0,0 +1,44 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBTextureFloat { + + /** + * Accepted by the <value> parameter of GetTexLevelParameter: + */ + public static final int GL_TEXTURE_RED_TYPE_ARB = 0x8C10, + GL_TEXTURE_GREEN_TYPE_ARB = 0x8C11, + GL_TEXTURE_BLUE_TYPE_ARB = 0x8C12, + GL_TEXTURE_ALPHA_TYPE_ARB = 0x8C13, + GL_TEXTURE_LUMINANCE_TYPE_ARB = 0x8C14, + GL_TEXTURE_INTENSITY_TYPE_ARB = 0x8C15, + GL_TEXTURE_DEPTH_TYPE_ARB = 0x8C16; + + /** + * Returned by the <params> parameter of GetTexLevelParameter: + */ + public static final int GL_UNSIGNED_NORMALIZED_ARB = 0x8C17; + + /** + * Accepted by the <internalFormat> parameter of TexImage1D, + * TexImage2D, and TexImage3D: + */ + public static final int GL_RGBA32F_ARB = 0x8814, + GL_RGB32F_ARB = 0x8815, + GL_ALPHA32F_ARB = 0x8816, + GL_INTENSITY32F_ARB = 0x8817, + GL_LUMINANCE32F_ARB = 0x8818, + GL_LUMINANCE_ALPHA32F_ARB = 0x8819, + GL_RGBA16F_ARB = 0x881A, + GL_RGB16F_ARB = 0x881B, + GL_ALPHA16F_ARB = 0x881C, + GL_INTENSITY16F_ARB = 0x881D, + GL_LUMINANCE16F_ARB = 0x881E, + GL_LUMINANCE_ALPHA16F_ARB = 0x881F; + + private ARBTextureFloat() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureGather.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureGather.java new file mode 100644 index 0000000..6aff98e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureGather.java @@ -0,0 +1,19 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBTextureGather { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = 0x8E5E, + GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = 0x8E5F, + GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB = 0x8F9F; + + private ARBTextureGather() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureMirrorClampToEdge.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureMirrorClampToEdge.java new file mode 100644 index 0000000..eadf435 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureMirrorClampToEdge.java @@ -0,0 +1,20 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBTextureMirrorClampToEdge { + + /** + * Accepted by the <param> parameter of TexParameter{if}, SamplerParameter{if} + * and SamplerParameter{if}v, and by the <params> parameter of + * TexParameter{if}v, TexParameterI{i ui}v and SamplerParameterI{i ui}v when + * their <pname> parameter is TEXTURE_WRAP_S, TEXTURE_WRAP_T, or + * TEXTURE_WRAP_R: + */ + public static final int GL_MIRROR_CLAMP_TO_EDGE = 0x8743; + + private ARBTextureMirrorClampToEdge() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureMirroredRepeat.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureMirroredRepeat.java new file mode 100644 index 0000000..7980995 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureMirroredRepeat.java @@ -0,0 +1,13 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBTextureMirroredRepeat { + + public static final int GL_MIRRORED_REPEAT_ARB = 0x8370; + + private ARBTextureMirroredRepeat() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureMultisample.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureMultisample.java new file mode 100644 index 0000000..939611a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureMultisample.java @@ -0,0 +1,94 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBTextureMultisample { + + /** + * Accepted by the <pname> parameter of GetMultisamplefv: + */ + public static final int GL_SAMPLE_POSITION = 0x8E50; + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, and by + * the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev: + */ + public static final int GL_SAMPLE_MASK = 0x8E51; + + /** + * Accepted by the <target> parameter of GetBooleani_v and + * GetIntegeri_v: + */ + public static final int GL_SAMPLE_MASK_VALUE = 0x8E52; + + /** + * Accepted by the <target> parameter of BindTexture and + * TexImage2DMultisample: + */ + public static final int GL_TEXTURE_2D_MULTISAMPLE = 0x9100; + + /** + * Accepted by the <target> parameter of TexImage2DMultisample: + */ + public static final int GL_PROXY_TEXTURE_2D_MULTISAMPLE = 0x9101; + + /** + * Accepted by the <target> parameter of BindTexture and + * TexImage3DMultisample: + */ + public static final int GL_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9102; + + /** + * Accepted by the <target> parameter of TexImage3DMultisample: + */ + public static final int GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9103; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv, + * and GetFloatv: + */ + public static final int GL_MAX_SAMPLE_MASK_WORDS = 0x8E59, + GL_MAX_COLOR_TEXTURE_SAMPLES = 0x910E, + GL_MAX_DEPTH_TEXTURE_SAMPLES = 0x910F, + GL_MAX_INTEGER_SAMPLES = 0x9110, + GL_TEXTURE_BINDING_2D_MULTISAMPLE = 0x9104, + GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY = 0x9105; + + /** + * Accepted by the <pname> parameter of GetTexLevelParameter + */ + public static final int GL_TEXTURE_SAMPLES = 0x9106, + GL_TEXTURE_FIXED_SAMPLE_LOCATIONS = 0x9107; + + /** + * Returned by the <type> parameter of GetActiveUniform: + */ + public static final int GL_SAMPLER_2D_MULTISAMPLE = 0x9108, + GL_INT_SAMPLER_2D_MULTISAMPLE = 0x9109, + GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE = 0x910A, + GL_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910B, + GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910C, + GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910D; + + private ARBTextureMultisample() {} + + public static void glTexImage2DMultisample(int target, int samples, int internalformat, int width, int height, boolean fixedsamplelocations) { + GL32.glTexImage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations); + } + + public static void glTexImage3DMultisample(int target, int samples, int internalformat, int width, int height, int depth, boolean fixedsamplelocations) { + GL32.glTexImage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations); + } + + public static void glGetMultisample(int pname, int index, FloatBuffer val) { + GL32.glGetMultisample(pname, index, val); + } + + public static void glSampleMaski(int index, int mask) { + GL32.glSampleMaski(index, mask); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureRGB10_A2UI.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureRGB10_A2UI.java new file mode 100644 index 0000000..a77977c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureRGB10_A2UI.java @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBTextureRGB10_A2UI { + + /** + * Accepted by the <internalFormat> parameter of TexImage1D, TexImage2D, + * TexImage3D, CopyTexImage1D, CopyTexImage2D, RenderbufferStorage and + * RenderbufferStorageMultisample: + */ + public static final int GL_RGB10_A2UI = 0x906F; + + private ARBTextureRGB10_A2UI() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureRectangle.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureRectangle.java new file mode 100644 index 0000000..cc2bc2f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureRectangle.java @@ -0,0 +1,53 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBTextureRectangle { + + /** + * Accepted by the <cap> parameter of Enable, Disable and IsEnabled; + * by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv + * and GetDoublev; and by the <target> parameter of BindTexture, + * GetTexParameterfv, GetTexParameteriv, TexParameterf, TexParameteri, + * TexParameterfv and TexParameteriv: + * Accepted by the <target> parameter of GetTexImage, + * GetTexLevelParameteriv, GetTexLevelParameterfv, TexImage2D, + * CopyTexImage2D, TexSubImage2D and CopySubTexImage2D: + */ + public static final int GL_TEXTURE_RECTANGLE_ARB = 0x84F5; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv and GetDoublev: + */ + public static final int GL_TEXTURE_BINDING_RECTANGLE_ARB = 0x84F6; + + /** + * Accepted by the <target> parameter of GetTexLevelParameteriv, + * GetTexLevelParameterfv, GetTexParameteriv and TexImage2D: + */ + public static final int GL_PROXY_TEXTURE_RECTANGLE_ARB = 0x84F7; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, + * GetIntegerv and GetFloatv: + */ + public static final int GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB = 0x84F8; + + /** + * Returned by <type> parameter of GetActiveUniform when the location + * <index> for program object <program> is of type sampler2DRect: + */ + public static final int GL_SAMPLER_2D_RECT_ARB = 0x8B63; + + /** + * Returned by <type> parameter of GetActiveUniform when the location + * <index> for program object <program> is of type sampler2DRectShadow: + */ + public static final int GL_SAMPLER_2D_RECT_SHADOW_ARB = 0x8B64; + + private ARBTextureRectangle() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureRg.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureRg.java new file mode 100644 index 0000000..a7159a5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureRg.java @@ -0,0 +1,44 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBTextureRg { + + /** + * Accepted by the <internalFormat> parameter of TexImage1D, TexImage2D, + * TexImage3D, CopyTexImage1D, and CopyTexImage2D: + */ + public static final int GL_R8 = 0x8229, + GL_R16 = 0x822A, + GL_RG8 = 0x822B, + GL_RG16 = 0x822C, + GL_R16F = 0x822D, + GL_R32F = 0x822E, + GL_RG16F = 0x822F, + GL_RG32F = 0x8230, + GL_R8I = 0x8231, + GL_R8UI = 0x8232, + GL_R16I = 0x8233, + GL_R16UI = 0x8234, + GL_R32I = 0x8235, + GL_R32UI = 0x8236, + GL_RG8I = 0x8237, + GL_RG8UI = 0x8238, + GL_RG16I = 0x8239, + GL_RG16UI = 0x823A, + GL_RG32I = 0x823B, + GL_RG32UI = 0x823C; + + /** + * Accepted by the <format> parameter of TexImage3D, TexImage2D, + * TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, + * DrawPixels and ReadPixels: + */ + public static final int GL_RG = 0x8227, + GL_RG_INTEGER = 0x8228; + + private ARBTextureRg() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureStorage.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureStorage.java new file mode 100644 index 0000000..171cfb5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureStorage.java @@ -0,0 +1,52 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBTextureStorage { + + /** + * Accepted by the <value> parameter of GetTexParameter{if}v: + */ + public static final int GL_TEXTURE_IMMUTABLE_FORMAT = 0x912F; + + private ARBTextureStorage() {} + + public static void glTexStorage1D(int target, int levels, int internalformat, int width) { + GL42.glTexStorage1D(target, levels, internalformat, width); + } + + public static void glTexStorage2D(int target, int levels, int internalformat, int width, int height) { + GL42.glTexStorage2D(target, levels, internalformat, width, height); + } + + public static void glTexStorage3D(int target, int levels, int internalformat, int width, int height, int depth) { + GL42.glTexStorage3D(target, levels, internalformat, width, height, depth); + } + + public static void glTextureStorage1DEXT(int texture, int target, int levels, int internalformat, int width) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureStorage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglTextureStorage1DEXT(texture, target, levels, internalformat, width, function_pointer); + } + static native void nglTextureStorage1DEXT(int texture, int target, int levels, int internalformat, int width, long function_pointer); + + public static void glTextureStorage2DEXT(int texture, int target, int levels, int internalformat, int width, int height) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureStorage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglTextureStorage2DEXT(texture, target, levels, internalformat, width, height, function_pointer); + } + static native void nglTextureStorage2DEXT(int texture, int target, int levels, int internalformat, int width, int height, long function_pointer); + + public static void glTextureStorage3DEXT(int texture, int target, int levels, int internalformat, int width, int height, int depth) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureStorage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglTextureStorage3DEXT(texture, target, levels, internalformat, width, height, depth, function_pointer); + } + static native void nglTextureStorage3DEXT(int texture, int target, int levels, int internalformat, int width, int height, int depth, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureStorageMultisample.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureStorageMultisample.java new file mode 100644 index 0000000..ebb24a0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureStorageMultisample.java @@ -0,0 +1,35 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBTextureStorageMultisample { + + private ARBTextureStorageMultisample() {} + + public static void glTexStorage2DMultisample(int target, int samples, int internalformat, int width, int height, boolean fixedsamplelocations) { + GL43.glTexStorage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations); + } + + public static void glTexStorage3DMultisample(int target, int samples, int internalformat, int width, int height, int depth, boolean fixedsamplelocations) { + GL43.glTexStorage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations); + } + + public static void glTextureStorage2DMultisampleEXT(int texture, int target, int samples, int internalformat, int width, int height, boolean fixedsamplelocations) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureStorage2DMultisampleEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglTextureStorage2DMultisampleEXT(texture, target, samples, internalformat, width, height, fixedsamplelocations, function_pointer); + } + static native void nglTextureStorage2DMultisampleEXT(int texture, int target, int samples, int internalformat, int width, int height, boolean fixedsamplelocations, long function_pointer); + + public static void glTextureStorage3DMultisampleEXT(int texture, int target, int samples, int internalformat, int width, int height, int depth, boolean fixedsamplelocations) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureStorage3DMultisampleEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglTextureStorage3DMultisampleEXT(texture, target, samples, internalformat, width, height, depth, fixedsamplelocations, function_pointer); + } + static native void nglTextureStorage3DMultisampleEXT(int texture, int target, int samples, int internalformat, int width, int height, int depth, boolean fixedsamplelocations, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureSwizzle.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureSwizzle.java new file mode 100644 index 0000000..2d08d30 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureSwizzle.java @@ -0,0 +1,27 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBTextureSwizzle { + + /** + * Accepted by the <pname> parameters of TexParameteri, + * TexParameterf, TexParameteriv, TexParameterfv, + * GetTexParameterfv, and GetTexParameteriv: + */ + public static final int GL_TEXTURE_SWIZZLE_R = 0x8E42, + GL_TEXTURE_SWIZZLE_G = 0x8E43, + GL_TEXTURE_SWIZZLE_B = 0x8E44, + GL_TEXTURE_SWIZZLE_A = 0x8E45; + + /** + * Accepted by the <pname> parameters of TexParameteriv, + * TexParameterfv, GetTexParameterfv, and GetTexParameteriv: + */ + public static final int GL_TEXTURE_SWIZZLE_RGBA = 0x8E46; + + private ARBTextureSwizzle() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureView.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureView.java new file mode 100644 index 0000000..cb3289f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTextureView.java @@ -0,0 +1,25 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBTextureView { + + /** + * Accepted by the <pname> parameters of GetTexParameterfv and + * GetTexParameteriv: + */ + public static final int GL_TEXTURE_VIEW_MIN_LEVEL = 0x82DB, + GL_TEXTURE_VIEW_NUM_LEVELS = 0x82DC, + GL_TEXTURE_VIEW_MIN_LAYER = 0x82DD, + GL_TEXTURE_VIEW_NUM_LAYERS = 0x82DE, + GL_TEXTURE_IMMUTABLE_LEVELS = 0x82DF; + + private ARBTextureView() {} + + public static void glTextureView(int texture, int target, int origtexture, int internalformat, int minlevel, int numlevels, int minlayer, int numlayers) { + GL43.glTextureView(texture, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTimerQuery.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTimerQuery.java new file mode 100644 index 0000000..b079364 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTimerQuery.java @@ -0,0 +1,46 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBTimerQuery { + + /** + * Accepted by the <target> parameter of BeginQuery, EndQuery, and + * GetQueryiv: + */ + public static final int GL_TIME_ELAPSED = 0x88BF; + + /** + * Accepted by the <target> parameter of GetQueryiv and QueryCounter. + * Accepted by the <value> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + public static final int GL_TIMESTAMP = 0x8E28; + + private ARBTimerQuery() {} + + public static void glQueryCounter(int id, int target) { + GL33.glQueryCounter(id, target); + } + + public static void glGetQueryObject(int id, int pname, LongBuffer params) { + GL33.glGetQueryObject(id, pname, params); + } + + /** Overloads glGetQueryObjecti64v. */ + public static long glGetQueryObjecti64(int id, int pname) { + return GL33.glGetQueryObjecti64(id, pname); + } + + public static void glGetQueryObjectu(int id, int pname, LongBuffer params) { + GL33.glGetQueryObjectu(id, pname, params); + } + + /** Overloads glGetQueryObjectui64v. */ + public static long glGetQueryObjectui64(int id, int pname) { + return GL33.glGetQueryObjectui64(id, pname); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTransformFeedback2.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTransformFeedback2.java new file mode 100644 index 0000000..eb5096d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTransformFeedback2.java @@ -0,0 +1,62 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBTransformFeedback2 { + + /** + * Accepted by the <target> parameter of BindTransformFeedback: + */ + public static final int GL_TRANSFORM_FEEDBACK = 0x8E22; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv, + * and GetFloatv: + */ + public static final int GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED = 0x8E23, + GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE = 0x8E24, + GL_TRANSFORM_FEEDBACK_BINDING = 0x8E25; + + private ARBTransformFeedback2() {} + + public static void glBindTransformFeedback(int target, int id) { + GL40.glBindTransformFeedback(target, id); + } + + public static void glDeleteTransformFeedbacks(IntBuffer ids) { + GL40.glDeleteTransformFeedbacks(ids); + } + + /** Overloads glDeleteTransformFeedbacks. */ + public static void glDeleteTransformFeedbacks(int id) { + GL40.glDeleteTransformFeedbacks(id); + } + + public static void glGenTransformFeedbacks(IntBuffer ids) { + GL40.glGenTransformFeedbacks(ids); + } + + /** Overloads glGenTransformFeedbacks. */ + public static int glGenTransformFeedbacks() { + return GL40.glGenTransformFeedbacks(); + } + + public static boolean glIsTransformFeedback(int id) { + return GL40.glIsTransformFeedback(id); + } + + public static void glPauseTransformFeedback() { + GL40.glPauseTransformFeedback(); + } + + public static void glResumeTransformFeedback() { + GL40.glResumeTransformFeedback(); + } + + public static void glDrawTransformFeedback(int mode, int id) { + GL40.glDrawTransformFeedback(mode, id); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTransformFeedback3.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTransformFeedback3.java new file mode 100644 index 0000000..775a12b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTransformFeedback3.java @@ -0,0 +1,39 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBTransformFeedback3 { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv, + * and GetFloatv: + */ + public static final int GL_MAX_TRANSFORM_FEEDBACK_BUFFERS = 0x8E70, + GL_MAX_VERTEX_STREAMS = 0x8E71; + + private ARBTransformFeedback3() {} + + public static void glDrawTransformFeedbackStream(int mode, int id, int stream) { + GL40.glDrawTransformFeedbackStream(mode, id, stream); + } + + public static void glBeginQueryIndexed(int target, int index, int id) { + GL40.glBeginQueryIndexed(target, index, id); + } + + public static void glEndQueryIndexed(int target, int index) { + GL40.glEndQueryIndexed(target, index); + } + + public static void glGetQueryIndexed(int target, int index, int pname, IntBuffer params) { + GL40.glGetQueryIndexed(target, index, pname, params); + } + + /** Overloads glGetQueryIndexediv. */ + public static int glGetQueryIndexedi(int target, int index, int pname) { + return GL40.glGetQueryIndexedi(target, index, pname); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTransformFeedbackInstanced.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTransformFeedbackInstanced.java new file mode 100644 index 0000000..6972db0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTransformFeedbackInstanced.java @@ -0,0 +1,19 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBTransformFeedbackInstanced { + + private ARBTransformFeedbackInstanced() {} + + public static void glDrawTransformFeedbackInstanced(int mode, int id, int primcount) { + GL42.glDrawTransformFeedbackInstanced(mode, id, primcount); + } + + public static void glDrawTransformFeedbackStreamInstanced(int mode, int id, int stream, int primcount) { + GL42.glDrawTransformFeedbackStreamInstanced(mode, id, stream, primcount); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTransposeMatrix.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTransposeMatrix.java new file mode 100644 index 0000000..f242822 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBTransposeMatrix.java @@ -0,0 +1,34 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBTransposeMatrix { + + public static final int GL_TRANSPOSE_MODELVIEW_MATRIX_ARB = 0x84E3, + GL_TRANSPOSE_PROJECTION_MATRIX_ARB = 0x84E4, + GL_TRANSPOSE_TEXTURE_MATRIX_ARB = 0x84E5, + GL_TRANSPOSE_COLOR_MATRIX_ARB = 0x84E6; + + private ARBTransposeMatrix() {} + + public static void glLoadTransposeMatrixARB(FloatBuffer pfMtx) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glLoadTransposeMatrixfARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pfMtx, 16); + nglLoadTransposeMatrixfARB(MemoryUtil.getAddress(pfMtx), function_pointer); + } + static native void nglLoadTransposeMatrixfARB(long pfMtx, long function_pointer); + + public static void glMultTransposeMatrixARB(FloatBuffer pfMtx) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultTransposeMatrixfARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pfMtx, 16); + nglMultTransposeMatrixfARB(MemoryUtil.getAddress(pfMtx), function_pointer); + } + static native void nglMultTransposeMatrixfARB(long pfMtx, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBUniformBufferObject.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBUniformBufferObject.java new file mode 100644 index 0000000..59703da --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBUniformBufferObject.java @@ -0,0 +1,175 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBUniformBufferObject { + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, and + * GetBufferPointerv: + */ + public static final int GL_UNIFORM_BUFFER = 0x8A11; + + /** + * Accepted by the <pname> parameter of GetIntegeri_v, GetBooleanv, + * GetIntegerv, GetFloatv, and GetDoublev: + */ + public static final int GL_UNIFORM_BUFFER_BINDING = 0x8A28; + + /** + * Accepted by the <pname> parameter of GetIntegeri_v: + */ + public static final int GL_UNIFORM_BUFFER_START = 0x8A29, + GL_UNIFORM_BUFFER_SIZE = 0x8A2A; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_MAX_VERTEX_UNIFORM_BLOCKS = 0x8A2B, + GL_MAX_GEOMETRY_UNIFORM_BLOCKS = 0x8A2C, + GL_MAX_FRAGMENT_UNIFORM_BLOCKS = 0x8A2D, + GL_MAX_COMBINED_UNIFORM_BLOCKS = 0x8A2E, + GL_MAX_UNIFORM_BUFFER_BINDINGS = 0x8A2F, + GL_MAX_UNIFORM_BLOCK_SIZE = 0x8A30, + GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 0x8A31, + GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS = 0x8A32, + GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 0x8A33, + GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = 0x8A34; + + /** + * Accepted by the <pname> parameter of GetProgramiv: + */ + public static final int GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = 0x8A35, + GL_ACTIVE_UNIFORM_BLOCKS = 0x8A36; + + /** + * Accepted by the <pname> parameter of GetActiveUniformsivARB: + */ + public static final int GL_UNIFORM_TYPE = 0x8A37, + GL_UNIFORM_SIZE = 0x8A38, + GL_UNIFORM_NAME_LENGTH = 0x8A39, + GL_UNIFORM_BLOCK_INDEX = 0x8A3A, + GL_UNIFORM_OFFSET = 0x8A3B, + GL_UNIFORM_ARRAY_STRIDE = 0x8A3C, + GL_UNIFORM_MATRIX_STRIDE = 0x8A3D, + GL_UNIFORM_IS_ROW_MAJOR = 0x8A3E; + + /** + * Accepted by the <pname> parameter of GetActiveUniformBlockivARB: + */ + public static final int GL_UNIFORM_BLOCK_BINDING = 0x8A3F, + GL_UNIFORM_BLOCK_DATA_SIZE = 0x8A40, + GL_UNIFORM_BLOCK_NAME_LENGTH = 0x8A41, + GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS = 0x8A42, + GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 0x8A43, + GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 0x8A44, + GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER = 0x8A45, + GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 0x8A46; + + /** + * Returned by GetActiveUniformsivARB and GetUniformBlockIndexARB + */ + public static final int GL_INVALID_INDEX = 0xFFFFFFFF; + + private ARBUniformBufferObject() {} + + public static void glGetUniformIndices(int program, ByteBuffer uniformNames, IntBuffer uniformIndices) { + GL31.glGetUniformIndices(program, uniformNames, uniformIndices); + } + + /** Overloads glGetUniformIndices. */ + public static void glGetUniformIndices(int program, CharSequence[] uniformNames, IntBuffer uniformIndices) { + GL31.glGetUniformIndices(program, uniformNames, uniformIndices); + } + + public static void glGetActiveUniforms(int program, IntBuffer uniformIndices, int pname, IntBuffer params) { + GL31.glGetActiveUniforms(program, uniformIndices, pname, params); + } + + /** + * Overloads glGetActiveUniformsiv. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetActiveUniformsi} instead. + */ + @Deprecated + public static int glGetActiveUniforms(int program, int uniformIndex, int pname) { + return GL31.glGetActiveUniformsi(program, uniformIndex, pname); + } + + /** Overloads glGetActiveUniformsiv. */ + public static int glGetActiveUniformsi(int program, int uniformIndex, int pname) { + return GL31.glGetActiveUniformsi(program, uniformIndex, pname); + } + + public static void glGetActiveUniformName(int program, int uniformIndex, IntBuffer length, ByteBuffer uniformName) { + GL31.glGetActiveUniformName(program, uniformIndex, length, uniformName); + } + + /** Overloads glGetActiveUniformName. */ + public static String glGetActiveUniformName(int program, int uniformIndex, int bufSize) { + return GL31.glGetActiveUniformName(program, uniformIndex, bufSize); + } + + public static int glGetUniformBlockIndex(int program, ByteBuffer uniformBlockName) { + return GL31.glGetUniformBlockIndex(program, uniformBlockName); + } + + /** Overloads glGetUniformBlockIndex. */ + public static int glGetUniformBlockIndex(int program, CharSequence uniformBlockName) { + return GL31.glGetUniformBlockIndex(program, uniformBlockName); + } + + public static void glGetActiveUniformBlock(int program, int uniformBlockIndex, int pname, IntBuffer params) { + GL31.glGetActiveUniformBlock(program, uniformBlockIndex, pname, params); + } + + /** + * Overloads glGetActiveUniformBlockiv. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetActiveUniformBlocki} instead. + */ + @Deprecated + public static int glGetActiveUniformBlock(int program, int uniformBlockIndex, int pname) { + return GL31.glGetActiveUniformBlocki(program, uniformBlockIndex, pname); + } + + /** Overloads glGetActiveUniformBlockiv. */ + public static int glGetActiveUniformBlocki(int program, int uniformBlockIndex, int pname) { + return GL31.glGetActiveUniformBlocki(program, uniformBlockIndex, pname); + } + + public static void glGetActiveUniformBlockName(int program, int uniformBlockIndex, IntBuffer length, ByteBuffer uniformBlockName) { + GL31.glGetActiveUniformBlockName(program, uniformBlockIndex, length, uniformBlockName); + } + + /** Overloads glGetActiveUniformBlockName. */ + public static String glGetActiveUniformBlockName(int program, int uniformBlockIndex, int bufSize) { + return GL31.glGetActiveUniformBlockName(program, uniformBlockIndex, bufSize); + } + + public static void glBindBufferRange(int target, int index, int buffer, long offset, long size) { + GL30.glBindBufferRange(target, index, buffer, offset, size); + } + + public static void glBindBufferBase(int target, int index, int buffer) { + GL30.glBindBufferBase(target, index, buffer); + } + + public static void glGetInteger(int value, int index, IntBuffer data) { + GL30.glGetInteger(value, index, data); + } + + /** Overloads glGetIntegeri_v. */ + public static int glGetInteger(int value, int index) { + return GL30.glGetInteger(value, index); + } + + public static void glUniformBlockBinding(int program, int uniformBlockIndex, int uniformBlockBinding) { + GL31.glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBVertexArrayBgra.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBVertexArrayBgra.java new file mode 100644 index 0000000..ac036a3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBVertexArrayBgra.java @@ -0,0 +1,17 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBVertexArrayBgra { + + /** + * Accepted by the <size> parameter of ColorPointer, + * SecondaryColorPointer, and VertexAttribPointer: + */ + public static final int GL_BGRA = 0x80E1; + + private ARBVertexArrayBgra() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBVertexArrayObject.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBVertexArrayObject.java new file mode 100644 index 0000000..e83de31 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBVertexArrayObject.java @@ -0,0 +1,43 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBVertexArrayObject { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_VERTEX_ARRAY_BINDING = 0x85B5; + + private ARBVertexArrayObject() {} + + public static void glBindVertexArray(int array) { + GL30.glBindVertexArray(array); + } + + public static void glDeleteVertexArrays(IntBuffer arrays) { + GL30.glDeleteVertexArrays(arrays); + } + + /** Overloads glDeleteVertexArrays. */ + public static void glDeleteVertexArrays(int array) { + GL30.glDeleteVertexArrays(array); + } + + public static void glGenVertexArrays(IntBuffer arrays) { + GL30.glGenVertexArrays(arrays); + } + + /** Overloads glGenVertexArrays. */ + public static int glGenVertexArrays() { + return GL30.glGenVertexArrays(); + } + + public static boolean glIsVertexArray(int array) { + return GL30.glIsVertexArray(array); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBVertexAttrib64bit.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBVertexAttrib64bit.java new file mode 100644 index 0000000..7da665a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBVertexAttrib64bit.java @@ -0,0 +1,78 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBVertexAttrib64bit { + + /** + * Returned in the <type> parameter of GetActiveAttrib: + */ + public static final int GL_DOUBLE_VEC2 = 0x8FFC, + GL_DOUBLE_VEC3 = 0x8FFD, + GL_DOUBLE_VEC4 = 0x8FFE, + GL_DOUBLE_MAT2 = 0x8F46, + GL_DOUBLE_MAT3 = 0x8F47, + GL_DOUBLE_MAT4 = 0x8F48, + GL_DOUBLE_MAT2x3 = 0x8F49, + GL_DOUBLE_MAT2x4 = 0x8F4A, + GL_DOUBLE_MAT3x2 = 0x8F4B, + GL_DOUBLE_MAT3x4 = 0x8F4C, + GL_DOUBLE_MAT4x2 = 0x8F4D, + GL_DOUBLE_MAT4x3 = 0x8F4E; + + private ARBVertexAttrib64bit() {} + + public static void glVertexAttribL1d(int index, double x) { + GL41.glVertexAttribL1d(index, x); + } + + public static void glVertexAttribL2d(int index, double x, double y) { + GL41.glVertexAttribL2d(index, x, y); + } + + public static void glVertexAttribL3d(int index, double x, double y, double z) { + GL41.glVertexAttribL3d(index, x, y, z); + } + + public static void glVertexAttribL4d(int index, double x, double y, double z, double w) { + GL41.glVertexAttribL4d(index, x, y, z, w); + } + + public static void glVertexAttribL1(int index, DoubleBuffer v) { + GL41.glVertexAttribL1(index, v); + } + + public static void glVertexAttribL2(int index, DoubleBuffer v) { + GL41.glVertexAttribL2(index, v); + } + + public static void glVertexAttribL3(int index, DoubleBuffer v) { + GL41.glVertexAttribL3(index, v); + } + + public static void glVertexAttribL4(int index, DoubleBuffer v) { + GL41.glVertexAttribL4(index, v); + } + + public static void glVertexAttribLPointer(int index, int size, int stride, DoubleBuffer pointer) { + GL41.glVertexAttribLPointer(index, size, stride, pointer); + } + public static void glVertexAttribLPointer(int index, int size, int stride, long pointer_buffer_offset) { + GL41.glVertexAttribLPointer(index, size, stride, pointer_buffer_offset); + } + + public static void glGetVertexAttribL(int index, int pname, DoubleBuffer params) { + GL41.glGetVertexAttribL(index, pname, params); + } + + public static void glVertexArrayVertexAttribLOffsetEXT(int vaobj, int buffer, int index, int size, int type, int stride, long offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexArrayVertexAttribLOffsetEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexArrayVertexAttribLOffsetEXT(vaobj, buffer, index, size, type, stride, offset, function_pointer); + } + static native void nglVertexArrayVertexAttribLOffsetEXT(int vaobj, int buffer, int index, int size, int type, int stride, long offset, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBVertexAttribBinding.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBVertexAttribBinding.java new file mode 100644 index 0000000..4afb727 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBVertexAttribBinding.java @@ -0,0 +1,55 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBVertexAttribBinding { + + /** + * Accepted by the <pname> parameter of GetVertexAttrib*v: + */ + public static final int GL_VERTEX_ATTRIB_BINDING = 0x82D4, + GL_VERTEX_ATTRIB_RELATIVE_OFFSET = 0x82D5; + + /** + * Accepted by the <target> parameter of GetBooleani_v, GetIntegeri_v, + * GetFloati_v, GetDoublei_v, and GetInteger64i_v: + */ + public static final int GL_VERTEX_BINDING_DIVISOR = 0x82D6, + GL_VERTEX_BINDING_OFFSET = 0x82D7, + GL_VERTEX_BINDING_STRIDE = 0x82D8; + + /** + * Accepted by the <pname> parameter of GetIntegerv, ... + */ + public static final int GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET = 0x82D9, + GL_MAX_VERTEX_ATTRIB_BINDINGS = 0x82DA; + + private ARBVertexAttribBinding() {} + + public static void glBindVertexBuffer(int bindingindex, int buffer, long offset, int stride) { + GL43.glBindVertexBuffer(bindingindex, buffer, offset, stride); + } + + public static void glVertexAttribFormat(int attribindex, int size, int type, boolean normalized, int relativeoffset) { + GL43.glVertexAttribFormat(attribindex, size, type, normalized, relativeoffset); + } + + public static void glVertexAttribIFormat(int attribindex, int size, int type, int relativeoffset) { + GL43.glVertexAttribIFormat(attribindex, size, type, relativeoffset); + } + + public static void glVertexAttribLFormat(int attribindex, int size, int type, int relativeoffset) { + GL43.glVertexAttribLFormat(attribindex, size, type, relativeoffset); + } + + public static void glVertexAttribBinding(int attribindex, int bindingindex) { + GL43.glVertexAttribBinding(attribindex, bindingindex); + } + + public static void glVertexBindingDivisor(int bindingindex, int divisor) { + GL43.glVertexBindingDivisor(bindingindex, divisor); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBVertexBlend.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBVertexBlend.java new file mode 100644 index 0000000..084211e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBVertexBlend.java @@ -0,0 +1,189 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBVertexBlend { + + public static final int GL_MAX_VERTEX_UNITS_ARB = 0x86A4, + GL_ACTIVE_VERTEX_UNITS_ARB = 0x86A5, + GL_WEIGHT_SUM_UNITY_ARB = 0x86A6, + GL_VERTEX_BLEND_ARB = 0x86A7, + GL_CURRENT_WEIGHT_ARB = 0x86A8, + GL_WEIGHT_ARRAY_TYPE_ARB = 0x86A9, + GL_WEIGHT_ARRAY_STRIDE_ARB = 0x86AA, + GL_WEIGHT_ARRAY_SIZE_ARB = 0x86AB, + GL_WEIGHT_ARRAY_POINTER_ARB = 0x86AC, + GL_WEIGHT_ARRAY_ARB = 0x86AD, + GL_MODELVIEW0_ARB = 0x1700, + GL_MODELVIEW1_ARB = 0x850A, + GL_MODELVIEW2_ARB = 0x8722, + GL_MODELVIEW3_ARB = 0x8723, + GL_MODELVIEW4_ARB = 0x8724, + GL_MODELVIEW5_ARB = 0x8725, + GL_MODELVIEW6_ARB = 0x8726, + GL_MODELVIEW7_ARB = 0x8727, + GL_MODELVIEW8_ARB = 0x8728, + GL_MODELVIEW9_ARB = 0x8729, + GL_MODELVIEW10_ARB = 0x872A, + GL_MODELVIEW11_ARB = 0x872B, + GL_MODELVIEW12_ARB = 0x872C, + GL_MODELVIEW13_ARB = 0x872D, + GL_MODELVIEW14_ARB = 0x872E, + GL_MODELVIEW15_ARB = 0x872F, + GL_MODELVIEW16_ARB = 0x8730, + GL_MODELVIEW17_ARB = 0x8731, + GL_MODELVIEW18_ARB = 0x8732, + GL_MODELVIEW19_ARB = 0x8733, + GL_MODELVIEW20_ARB = 0x8734, + GL_MODELVIEW21_ARB = 0x8735, + GL_MODELVIEW22_ARB = 0x8736, + GL_MODELVIEW23_ARB = 0x8737, + GL_MODELVIEW24_ARB = 0x8738, + GL_MODELVIEW25_ARB = 0x8739, + GL_MODELVIEW26_ARB = 0x873A, + GL_MODELVIEW27_ARB = 0x873B, + GL_MODELVIEW28_ARB = 0x873C, + GL_MODELVIEW29_ARB = 0x873D, + GL_MODELVIEW30_ARB = 0x873E, + GL_MODELVIEW31_ARB = 0x873F; + + private ARBVertexBlend() {} + + public static void glWeightARB(ByteBuffer pWeights) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWeightbvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pWeights); + nglWeightbvARB(pWeights.remaining(), MemoryUtil.getAddress(pWeights), function_pointer); + } + static native void nglWeightbvARB(int pWeights_size, long pWeights, long function_pointer); + + public static void glWeightARB(ShortBuffer pWeights) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWeightsvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pWeights); + nglWeightsvARB(pWeights.remaining(), MemoryUtil.getAddress(pWeights), function_pointer); + } + static native void nglWeightsvARB(int pWeights_size, long pWeights, long function_pointer); + + public static void glWeightARB(IntBuffer pWeights) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWeightivARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pWeights); + nglWeightivARB(pWeights.remaining(), MemoryUtil.getAddress(pWeights), function_pointer); + } + static native void nglWeightivARB(int pWeights_size, long pWeights, long function_pointer); + + public static void glWeightARB(FloatBuffer pWeights) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWeightfvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pWeights); + nglWeightfvARB(pWeights.remaining(), MemoryUtil.getAddress(pWeights), function_pointer); + } + static native void nglWeightfvARB(int pWeights_size, long pWeights, long function_pointer); + + public static void glWeightARB(DoubleBuffer pWeights) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWeightdvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pWeights); + nglWeightdvARB(pWeights.remaining(), MemoryUtil.getAddress(pWeights), function_pointer); + } + static native void nglWeightdvARB(int pWeights_size, long pWeights, long function_pointer); + + public static void glWeightuARB(ByteBuffer pWeights) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWeightubvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pWeights); + nglWeightubvARB(pWeights.remaining(), MemoryUtil.getAddress(pWeights), function_pointer); + } + static native void nglWeightubvARB(int pWeights_size, long pWeights, long function_pointer); + + public static void glWeightuARB(ShortBuffer pWeights) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWeightusvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pWeights); + nglWeightusvARB(pWeights.remaining(), MemoryUtil.getAddress(pWeights), function_pointer); + } + static native void nglWeightusvARB(int pWeights_size, long pWeights, long function_pointer); + + public static void glWeightuARB(IntBuffer pWeights) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWeightuivARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pWeights); + nglWeightuivARB(pWeights.remaining(), MemoryUtil.getAddress(pWeights), function_pointer); + } + static native void nglWeightuivARB(int pWeights_size, long pWeights, long function_pointer); + + public static void glWeightPointerARB(int size, int stride, DoubleBuffer pPointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWeightPointerARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pPointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).ARB_vertex_blend_glWeightPointerARB_pPointer = pPointer; + nglWeightPointerARB(size, GL11.GL_DOUBLE, stride, MemoryUtil.getAddress(pPointer), function_pointer); + } + public static void glWeightPointerARB(int size, int stride, FloatBuffer pPointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWeightPointerARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pPointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).ARB_vertex_blend_glWeightPointerARB_pPointer = pPointer; + nglWeightPointerARB(size, GL11.GL_FLOAT, stride, MemoryUtil.getAddress(pPointer), function_pointer); + } + public static void glWeightPointerARB(int size, boolean unsigned, int stride, ByteBuffer pPointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWeightPointerARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pPointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).ARB_vertex_blend_glWeightPointerARB_pPointer = pPointer; + nglWeightPointerARB(size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, stride, MemoryUtil.getAddress(pPointer), function_pointer); + } + public static void glWeightPointerARB(int size, boolean unsigned, int stride, IntBuffer pPointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWeightPointerARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pPointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).ARB_vertex_blend_glWeightPointerARB_pPointer = pPointer; + nglWeightPointerARB(size, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, stride, MemoryUtil.getAddress(pPointer), function_pointer); + } + public static void glWeightPointerARB(int size, boolean unsigned, int stride, ShortBuffer pPointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWeightPointerARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pPointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).ARB_vertex_blend_glWeightPointerARB_pPointer = pPointer; + nglWeightPointerARB(size, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, stride, MemoryUtil.getAddress(pPointer), function_pointer); + } + static native void nglWeightPointerARB(int size, int type, int stride, long pPointer, long function_pointer); + public static void glWeightPointerARB(int size, int type, int stride, long pPointer_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWeightPointerARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOenabled(caps); + nglWeightPointerARBBO(size, type, stride, pPointer_buffer_offset, function_pointer); + } + static native void nglWeightPointerARBBO(int size, int type, int stride, long pPointer_buffer_offset, long function_pointer); + + public static void glVertexBlendARB(int count) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexBlendARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexBlendARB(count, function_pointer); + } + static native void nglVertexBlendARB(int count, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBVertexBufferObject.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBVertexBufferObject.java new file mode 100644 index 0000000..cd0fc4c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBVertexBufferObject.java @@ -0,0 +1,41 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBVertexBufferObject extends ARBBufferObject { + + /** + * Accepted by the <target> parameters of BindBufferARB, BufferDataARB, + * BufferSubDataARB, MapBufferARB, UnmapBufferARB, + * GetBufferSubDataARB, GetBufferParameterivARB, and + * GetBufferPointervARB: + */ + public static final int GL_ARRAY_BUFFER_ARB = 0x8892, + GL_ELEMENT_ARRAY_BUFFER_ARB = 0x8893; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_ARRAY_BUFFER_BINDING_ARB = 0x8894, + GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB = 0x8895, + GL_VERTEX_ARRAY_BUFFER_BINDING_ARB = 0x8896, + GL_NORMAL_ARRAY_BUFFER_BINDING_ARB = 0x8897, + GL_COLOR_ARRAY_BUFFER_BINDING_ARB = 0x8898, + GL_INDEX_ARRAY_BUFFER_BINDING_ARB = 0x8899, + GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB = 0x889A, + GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB = 0x889B, + GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB = 0x889C, + GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB = 0x889D, + GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB = 0x889E; + + /** + * Accepted by the <pname> parameter of GetVertexAttribivARB: + */ + public static final int GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB = 0x889F; + + private ARBVertexBufferObject() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBVertexProgram.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBVertexProgram.java new file mode 100644 index 0000000..39b3951 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBVertexProgram.java @@ -0,0 +1,154 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBVertexProgram extends ARBProgram { + + /** + * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, by the + * <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev, + * and by the <target> parameter of ProgramStringARB, BindProgramARB, + * ProgramEnvParameter4[df][v]ARB, ProgramLocalParameter4[df][v]ARB, + * GetProgramEnvParameter[df]vARB, GetProgramLocalParameter[df]vARB, + * GetProgramivARB, and GetProgramStringARB. + */ + public static final int GL_VERTEX_PROGRAM_ARB = 0x8620; + + /** + * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, and by + * the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev: + */ + public static final int GL_VERTEX_PROGRAM_POINT_SIZE_ARB = 0x8642, + GL_VERTEX_PROGRAM_TWO_SIDE_ARB = 0x8643, + GL_COLOR_SUM_ARB = 0x8458; + + /** + * Accepted by the <pname> parameter of GetVertexAttrib[dfi]vARB: + */ + public static final int GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB = 0x8622, + GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB = 0x8623, + GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB = 0x8624, + GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB = 0x8625, + GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB = 0x886A, + GL_CURRENT_VERTEX_ATTRIB_ARB = 0x8626; + + /** + * Accepted by the <pname> parameter of GetVertexAttribPointervARB: + */ + public static final int GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB = 0x8645; + + /** + * Accepted by the <pname> parameter of GetProgramivARB: + */ + public static final int GL_PROGRAM_ADDRESS_REGISTERS_ARB = 0x88B0, + GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB = 0x88B1, + GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = 0x88B2, + GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = 0x88B3; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_MAX_VERTEX_ATTRIBS_ARB = 0x8869; + + private ARBVertexProgram() {} + + public static void glVertexAttrib1sARB(int index, short x) { + ARBVertexShader.glVertexAttrib1sARB(index, x); + } + + public static void glVertexAttrib1fARB(int index, float x) { + ARBVertexShader.glVertexAttrib1fARB(index, x); + } + + public static void glVertexAttrib1dARB(int index, double x) { + ARBVertexShader.glVertexAttrib1dARB(index, x); + } + + public static void glVertexAttrib2sARB(int index, short x, short y) { + ARBVertexShader.glVertexAttrib2sARB(index, x, y); + } + + public static void glVertexAttrib2fARB(int index, float x, float y) { + ARBVertexShader.glVertexAttrib2fARB(index, x, y); + } + + public static void glVertexAttrib2dARB(int index, double x, double y) { + ARBVertexShader.glVertexAttrib2dARB(index, x, y); + } + + public static void glVertexAttrib3sARB(int index, short x, short y, short z) { + ARBVertexShader.glVertexAttrib3sARB(index, x, y, z); + } + + public static void glVertexAttrib3fARB(int index, float x, float y, float z) { + ARBVertexShader.glVertexAttrib3fARB(index, x, y, z); + } + + public static void glVertexAttrib3dARB(int index, double x, double y, double z) { + ARBVertexShader.glVertexAttrib3dARB(index, x, y, z); + } + + public static void glVertexAttrib4sARB(int index, short x, short y, short z, short w) { + ARBVertexShader.glVertexAttrib4sARB(index, x, y, z, w); + } + + public static void glVertexAttrib4fARB(int index, float x, float y, float z, float w) { + ARBVertexShader.glVertexAttrib4fARB(index, x, y, z, w); + } + + public static void glVertexAttrib4dARB(int index, double x, double y, double z, double w) { + ARBVertexShader.glVertexAttrib4dARB(index, x, y, z, w); + } + + public static void glVertexAttrib4NubARB(int index, byte x, byte y, byte z, byte w) { + ARBVertexShader.glVertexAttrib4NubARB(index, x, y, z, w); + } + + public static void glVertexAttribPointerARB(int index, int size, boolean normalized, int stride, DoubleBuffer buffer) { + ARBVertexShader.glVertexAttribPointerARB(index, size, normalized, stride, buffer); + } + public static void glVertexAttribPointerARB(int index, int size, boolean normalized, int stride, FloatBuffer buffer) { + ARBVertexShader.glVertexAttribPointerARB(index, size, normalized, stride, buffer); + } + public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, ByteBuffer buffer) { + ARBVertexShader.glVertexAttribPointerARB(index, size, unsigned, normalized, stride, buffer); + } + public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, IntBuffer buffer) { + ARBVertexShader.glVertexAttribPointerARB(index, size, unsigned, normalized, stride, buffer); + } + public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, ShortBuffer buffer) { + ARBVertexShader.glVertexAttribPointerARB(index, size, unsigned, normalized, stride, buffer); + } + public static void glVertexAttribPointerARB(int index, int size, int type, boolean normalized, int stride, long buffer_buffer_offset) { + ARBVertexShader.glVertexAttribPointerARB(index, size, type, normalized, stride, buffer_buffer_offset); + } + + public static void glEnableVertexAttribArrayARB(int index) { + ARBVertexShader.glEnableVertexAttribArrayARB(index); + } + + public static void glDisableVertexAttribArrayARB(int index) { + ARBVertexShader.glDisableVertexAttribArrayARB(index); + } + + public static void glGetVertexAttribARB(int index, int pname, FloatBuffer params) { + ARBVertexShader.glGetVertexAttribARB(index, pname, params); + } + + public static void glGetVertexAttribARB(int index, int pname, DoubleBuffer params) { + ARBVertexShader.glGetVertexAttribARB(index, pname, params); + } + + public static void glGetVertexAttribARB(int index, int pname, IntBuffer params) { + ARBVertexShader.glGetVertexAttribARB(index, pname, params); + } + + public static ByteBuffer glGetVertexAttribPointerARB(int index, int pname, long result_size) { + return ARBVertexShader.glGetVertexAttribPointerARB(index, pname, result_size); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBVertexShader.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBVertexShader.java new file mode 100644 index 0000000..ad6b048 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBVertexShader.java @@ -0,0 +1,402 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBVertexShader { + + /** + * Accepted by the <shaderType> argument of CreateShaderObjectARB and + * returned by the <params> parameter of GetObjectParameter{if}vARB: + */ + public static final int GL_VERTEX_SHADER_ARB = 0x8B31; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB = 0x8B4A, + GL_MAX_VARYING_FLOATS_ARB = 0x8B4B, + GL_MAX_VERTEX_ATTRIBS_ARB = 0x8869, + GL_MAX_TEXTURE_IMAGE_UNITS_ARB = 0x8872, + GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB = 0x8B4C, + GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB = 0x8B4D, + GL_MAX_TEXTURE_COORDS_ARB = 0x8871; + + /** + * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, and + * by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev: + */ + public static final int GL_VERTEX_PROGRAM_POINT_SIZE_ARB = 0x8642, + GL_VERTEX_PROGRAM_TWO_SIDE_ARB = 0x8643; + + /** + * Accepted by the <pname> parameter GetObjectParameter{if}vARB: + */ + public static final int GL_OBJECT_ACTIVE_ATTRIBUTES_ARB = 0x8B89, + GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB = 0x8B8A; + + /** + * Accepted by the <pname> parameter of GetVertexAttrib{dfi}vARB: + */ + public static final int GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB = 0x8622, + GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB = 0x8623, + GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB = 0x8624, + GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB = 0x8625, + GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB = 0x886A, + GL_CURRENT_VERTEX_ATTRIB_ARB = 0x8626; + + /** + * Accepted by the <pname> parameter of GetVertexAttribPointervARB: + */ + public static final int GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB = 0x8645; + + /** + * Returned by the <type> parameter of GetActiveAttribARB: + */ + public static final int GL_FLOAT_VEC2_ARB = 0x8B50, + GL_FLOAT_VEC3_ARB = 0x8B51, + GL_FLOAT_VEC4_ARB = 0x8B52, + GL_FLOAT_MAT2_ARB = 0x8B5A, + GL_FLOAT_MAT3_ARB = 0x8B5B, + GL_FLOAT_MAT4_ARB = 0x8B5C; + + private ARBVertexShader() {} + + public static void glVertexAttrib1sARB(int index, short v0) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib1sARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib1sARB(index, v0, function_pointer); + } + static native void nglVertexAttrib1sARB(int index, short v0, long function_pointer); + + public static void glVertexAttrib1fARB(int index, float v0) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib1fARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib1fARB(index, v0, function_pointer); + } + static native void nglVertexAttrib1fARB(int index, float v0, long function_pointer); + + public static void glVertexAttrib1dARB(int index, double v0) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib1dARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib1dARB(index, v0, function_pointer); + } + static native void nglVertexAttrib1dARB(int index, double v0, long function_pointer); + + public static void glVertexAttrib2sARB(int index, short v0, short v1) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib2sARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib2sARB(index, v0, v1, function_pointer); + } + static native void nglVertexAttrib2sARB(int index, short v0, short v1, long function_pointer); + + public static void glVertexAttrib2fARB(int index, float v0, float v1) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib2fARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib2fARB(index, v0, v1, function_pointer); + } + static native void nglVertexAttrib2fARB(int index, float v0, float v1, long function_pointer); + + public static void glVertexAttrib2dARB(int index, double v0, double v1) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib2dARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib2dARB(index, v0, v1, function_pointer); + } + static native void nglVertexAttrib2dARB(int index, double v0, double v1, long function_pointer); + + public static void glVertexAttrib3sARB(int index, short v0, short v1, short v2) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib3sARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib3sARB(index, v0, v1, v2, function_pointer); + } + static native void nglVertexAttrib3sARB(int index, short v0, short v1, short v2, long function_pointer); + + public static void glVertexAttrib3fARB(int index, float v0, float v1, float v2) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib3fARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib3fARB(index, v0, v1, v2, function_pointer); + } + static native void nglVertexAttrib3fARB(int index, float v0, float v1, float v2, long function_pointer); + + public static void glVertexAttrib3dARB(int index, double v0, double v1, double v2) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib3dARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib3dARB(index, v0, v1, v2, function_pointer); + } + static native void nglVertexAttrib3dARB(int index, double v0, double v1, double v2, long function_pointer); + + public static void glVertexAttrib4sARB(int index, short v0, short v1, short v2, short v3) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib4sARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib4sARB(index, v0, v1, v2, v3, function_pointer); + } + static native void nglVertexAttrib4sARB(int index, short v0, short v1, short v2, short v3, long function_pointer); + + public static void glVertexAttrib4fARB(int index, float v0, float v1, float v2, float v3) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib4fARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib4fARB(index, v0, v1, v2, v3, function_pointer); + } + static native void nglVertexAttrib4fARB(int index, float v0, float v1, float v2, float v3, long function_pointer); + + public static void glVertexAttrib4dARB(int index, double v0, double v1, double v2, double v3) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib4dARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib4dARB(index, v0, v1, v2, v3, function_pointer); + } + static native void nglVertexAttrib4dARB(int index, double v0, double v1, double v2, double v3, long function_pointer); + + public static void glVertexAttrib4NubARB(int index, byte x, byte y, byte z, byte w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib4NubARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib4NubARB(index, x, y, z, w, function_pointer); + } + static native void nglVertexAttrib4NubARB(int index, byte x, byte y, byte z, byte w, long function_pointer); + + public static void glVertexAttribPointerARB(int index, int size, boolean normalized, int stride, DoubleBuffer buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribPointerARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribPointerARB(index, size, GL11.GL_DOUBLE, normalized, stride, MemoryUtil.getAddress(buffer), function_pointer); + } + public static void glVertexAttribPointerARB(int index, int size, boolean normalized, int stride, FloatBuffer buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribPointerARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribPointerARB(index, size, GL11.GL_FLOAT, normalized, stride, MemoryUtil.getAddress(buffer), function_pointer); + } + public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, ByteBuffer buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribPointerARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribPointerARB(index, size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, normalized, stride, MemoryUtil.getAddress(buffer), function_pointer); + } + public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, IntBuffer buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribPointerARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribPointerARB(index, size, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, normalized, stride, MemoryUtil.getAddress(buffer), function_pointer); + } + public static void glVertexAttribPointerARB(int index, int size, boolean unsigned, boolean normalized, int stride, ShortBuffer buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribPointerARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribPointerARB(index, size, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, normalized, stride, MemoryUtil.getAddress(buffer), function_pointer); + } + static native void nglVertexAttribPointerARB(int index, int size, int type, boolean normalized, int stride, long buffer, long function_pointer); + public static void glVertexAttribPointerARB(int index, int size, int type, boolean normalized, int stride, long buffer_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribPointerARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOenabled(caps); + nglVertexAttribPointerARBBO(index, size, type, normalized, stride, buffer_buffer_offset, function_pointer); + } + static native void nglVertexAttribPointerARBBO(int index, int size, int type, boolean normalized, int stride, long buffer_buffer_offset, long function_pointer); + + /** Overloads glVertexAttribPointerARB. */ + public static void glVertexAttribPointerARB(int index, int size, int type, boolean normalized, int stride, ByteBuffer buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribPointerARB; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribPointerARB(index, size, type, normalized, stride, MemoryUtil.getAddress(buffer), function_pointer); + } + + public static void glEnableVertexAttribArrayARB(int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEnableVertexAttribArrayARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglEnableVertexAttribArrayARB(index, function_pointer); + } + static native void nglEnableVertexAttribArrayARB(int index, long function_pointer); + + public static void glDisableVertexAttribArrayARB(int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDisableVertexAttribArrayARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglDisableVertexAttribArrayARB(index, function_pointer); + } + static native void nglDisableVertexAttribArrayARB(int index, long function_pointer); + + public static void glBindAttribLocationARB(int programObj, int index, ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindAttribLocationARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(name); + BufferChecks.checkNullTerminated(name); + nglBindAttribLocationARB(programObj, index, MemoryUtil.getAddress(name), function_pointer); + } + static native void nglBindAttribLocationARB(int programObj, int index, long name, long function_pointer); + + /** Overloads glBindAttribLocationARB. */ + public static void glBindAttribLocationARB(int programObj, int index, CharSequence name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindAttribLocationARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindAttribLocationARB(programObj, index, APIUtil.getBufferNT(caps, name), function_pointer); + } + + public static void glGetActiveAttribARB(int programObj, int index, IntBuffer length, IntBuffer size, IntBuffer type, ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveAttribARB; + BufferChecks.checkFunctionAddress(function_pointer); + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkBuffer(size, 1); + BufferChecks.checkBuffer(type, 1); + BufferChecks.checkDirect(name); + nglGetActiveAttribARB(programObj, index, name.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(size), MemoryUtil.getAddress(type), MemoryUtil.getAddress(name), function_pointer); + } + static native void nglGetActiveAttribARB(int programObj, int index, int name_maxLength, long length, long size, long type, long name, long function_pointer); + + /** + * Overloads glGetActiveAttribARB. + *

+ * Overloads glGetActiveAttribARB. This version returns both size and type in the sizeType buffer (at .position() and .position() + 1). + */ + public static String glGetActiveAttribARB(int programObj, int index, int maxLength, IntBuffer sizeType) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveAttribARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(sizeType, 2); + IntBuffer name_length = APIUtil.getLengths(caps); + ByteBuffer name = APIUtil.getBufferByte(caps, maxLength); + nglGetActiveAttribARB(programObj, index, maxLength, MemoryUtil.getAddress0(name_length), MemoryUtil.getAddress(sizeType), MemoryUtil.getAddress(sizeType, sizeType.position() + 1), MemoryUtil.getAddress(name), function_pointer); + name.limit(name_length.get(0)); + return APIUtil.getString(caps, name); + } + + /** + * Overloads glGetActiveAttribARB. + *

+ * Overloads glGetActiveAttribARB. This version returns only the attrib name. + */ + public static String glGetActiveAttribARB(int programObj, int index, int maxLength) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveAttribARB; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer name_length = APIUtil.getLengths(caps); + ByteBuffer name = APIUtil.getBufferByte(caps, maxLength); + nglGetActiveAttribARB(programObj, index, maxLength, MemoryUtil.getAddress0(name_length), MemoryUtil.getAddress0(APIUtil.getBufferInt(caps)), MemoryUtil.getAddress(APIUtil.getBufferInt(caps), 1), MemoryUtil.getAddress(name), function_pointer); + name.limit(name_length.get(0)); + return APIUtil.getString(caps, name); + } + + /** + * Overloads glGetActiveAttribARB. + *

+ * Overloads glGetActiveAttribARB. This version returns only the attrib size. + */ + public static int glGetActiveAttribSizeARB(int programObj, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveAttribARB; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer size = APIUtil.getBufferInt(caps); + nglGetActiveAttribARB(programObj, index, 0, 0L, MemoryUtil.getAddress(size), MemoryUtil.getAddress(size, 1), APIUtil.getBufferByte0(caps), function_pointer); + return size.get(0); + } + + /** + * Overloads glGetActiveAttribARB. + *

+ * Overloads glGetActiveAttribARB. This version returns only the attrib type. + */ + public static int glGetActiveAttribTypeARB(int programObj, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveAttribARB; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer type = APIUtil.getBufferInt(caps); + nglGetActiveAttribARB(programObj, index, 0, 0L, MemoryUtil.getAddress(type, 1), MemoryUtil.getAddress(type), APIUtil.getBufferByte0(caps), function_pointer); + return type.get(0); + } + + public static int glGetAttribLocationARB(int programObj, ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetAttribLocationARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(name); + BufferChecks.checkNullTerminated(name); + int __result = nglGetAttribLocationARB(programObj, MemoryUtil.getAddress(name), function_pointer); + return __result; + } + static native int nglGetAttribLocationARB(int programObj, long name, long function_pointer); + + /** Overloads glGetAttribLocationARB. */ + public static int glGetAttribLocationARB(int programObj, CharSequence name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetAttribLocationARB; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglGetAttribLocationARB(programObj, APIUtil.getBufferNT(caps, name), function_pointer); + return __result; + } + + public static void glGetVertexAttribARB(int index, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexAttribfvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetVertexAttribfvARB(index, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVertexAttribfvARB(int index, int pname, long params, long function_pointer); + + public static void glGetVertexAttribARB(int index, int pname, DoubleBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexAttribdvARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetVertexAttribdvARB(index, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVertexAttribdvARB(int index, int pname, long params, long function_pointer); + + public static void glGetVertexAttribARB(int index, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexAttribivARB; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetVertexAttribivARB(index, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVertexAttribivARB(int index, int pname, long params, long function_pointer); + + public static ByteBuffer glGetVertexAttribPointerARB(int index, int pname, long result_size) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexAttribPointervARB; + BufferChecks.checkFunctionAddress(function_pointer); + ByteBuffer __result = nglGetVertexAttribPointervARB(index, pname, result_size, function_pointer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + static native ByteBuffer nglGetVertexAttribPointervARB(int index, int pname, long result_size, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBVertexType2_10_10_10_REV.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBVertexType2_10_10_10_REV.java new file mode 100644 index 0000000..b4abfc0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBVertexType2_10_10_10_REV.java @@ -0,0 +1,172 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBVertexType2_10_10_10_REV { + + /** + * Accepted by the <type> parameter of VertexAttribPointer, VertexPointer, + * NormalPointer, ColorPointer, SecondaryColorPointer, TexCoordPointer, + * VertexAttribP{1234}ui, VertexP*, TexCoordP*, MultiTexCoordP*, NormalP3ui, + * ColorP*, SecondaryColorP* and VertexAttribP* + */ + public static final int GL_UNSIGNED_INT_2_10_10_10_REV = 0x8368, + GL_INT_2_10_10_10_REV = 0x8D9F; + + private ARBVertexType2_10_10_10_REV() {} + + public static void glVertexP2ui(int type, int value) { + GL33.glVertexP2ui(type, value); + } + + public static void glVertexP3ui(int type, int value) { + GL33.glVertexP3ui(type, value); + } + + public static void glVertexP4ui(int type, int value) { + GL33.glVertexP4ui(type, value); + } + + public static void glVertexP2u(int type, IntBuffer value) { + GL33.glVertexP2u(type, value); + } + + public static void glVertexP3u(int type, IntBuffer value) { + GL33.glVertexP3u(type, value); + } + + public static void glVertexP4u(int type, IntBuffer value) { + GL33.glVertexP4u(type, value); + } + + public static void glTexCoordP1ui(int type, int coords) { + GL33.glTexCoordP1ui(type, coords); + } + + public static void glTexCoordP2ui(int type, int coords) { + GL33.glTexCoordP2ui(type, coords); + } + + public static void glTexCoordP3ui(int type, int coords) { + GL33.glTexCoordP3ui(type, coords); + } + + public static void glTexCoordP4ui(int type, int coords) { + GL33.glTexCoordP4ui(type, coords); + } + + public static void glTexCoordP1u(int type, IntBuffer coords) { + GL33.glTexCoordP1u(type, coords); + } + + public static void glTexCoordP2u(int type, IntBuffer coords) { + GL33.glTexCoordP2u(type, coords); + } + + public static void glTexCoordP3u(int type, IntBuffer coords) { + GL33.glTexCoordP3u(type, coords); + } + + public static void glTexCoordP4u(int type, IntBuffer coords) { + GL33.glTexCoordP4u(type, coords); + } + + public static void glMultiTexCoordP1ui(int texture, int type, int coords) { + GL33.glMultiTexCoordP1ui(texture, type, coords); + } + + public static void glMultiTexCoordP2ui(int texture, int type, int coords) { + GL33.glMultiTexCoordP2ui(texture, type, coords); + } + + public static void glMultiTexCoordP3ui(int texture, int type, int coords) { + GL33.glMultiTexCoordP3ui(texture, type, coords); + } + + public static void glMultiTexCoordP4ui(int texture, int type, int coords) { + GL33.glMultiTexCoordP4ui(texture, type, coords); + } + + public static void glMultiTexCoordP1u(int texture, int type, IntBuffer coords) { + GL33.glMultiTexCoordP1u(texture, type, coords); + } + + public static void glMultiTexCoordP2u(int texture, int type, IntBuffer coords) { + GL33.glMultiTexCoordP2u(texture, type, coords); + } + + public static void glMultiTexCoordP3u(int texture, int type, IntBuffer coords) { + GL33.glMultiTexCoordP3u(texture, type, coords); + } + + public static void glMultiTexCoordP4u(int texture, int type, IntBuffer coords) { + GL33.glMultiTexCoordP4u(texture, type, coords); + } + + public static void glNormalP3ui(int type, int coords) { + GL33.glNormalP3ui(type, coords); + } + + public static void glNormalP3u(int type, IntBuffer coords) { + GL33.glNormalP3u(type, coords); + } + + public static void glColorP3ui(int type, int color) { + GL33.glColorP3ui(type, color); + } + + public static void glColorP4ui(int type, int color) { + GL33.glColorP4ui(type, color); + } + + public static void glColorP3u(int type, IntBuffer color) { + GL33.glColorP3u(type, color); + } + + public static void glColorP4u(int type, IntBuffer color) { + GL33.glColorP4u(type, color); + } + + public static void glSecondaryColorP3ui(int type, int color) { + GL33.glSecondaryColorP3ui(type, color); + } + + public static void glSecondaryColorP3u(int type, IntBuffer color) { + GL33.glSecondaryColorP3u(type, color); + } + + public static void glVertexAttribP1ui(int index, int type, boolean normalized, int value) { + GL33.glVertexAttribP1ui(index, type, normalized, value); + } + + public static void glVertexAttribP2ui(int index, int type, boolean normalized, int value) { + GL33.glVertexAttribP2ui(index, type, normalized, value); + } + + public static void glVertexAttribP3ui(int index, int type, boolean normalized, int value) { + GL33.glVertexAttribP3ui(index, type, normalized, value); + } + + public static void glVertexAttribP4ui(int index, int type, boolean normalized, int value) { + GL33.glVertexAttribP4ui(index, type, normalized, value); + } + + public static void glVertexAttribP1u(int index, int type, boolean normalized, IntBuffer value) { + GL33.glVertexAttribP1u(index, type, normalized, value); + } + + public static void glVertexAttribP2u(int index, int type, boolean normalized, IntBuffer value) { + GL33.glVertexAttribP2u(index, type, normalized, value); + } + + public static void glVertexAttribP3u(int index, int type, boolean normalized, IntBuffer value) { + GL33.glVertexAttribP3u(index, type, normalized, value); + } + + public static void glVertexAttribP4u(int index, int type, boolean normalized, IntBuffer value) { + GL33.glVertexAttribP4u(index, type, normalized, value); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBViewportArray.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBViewportArray.java new file mode 100644 index 0000000..0c13d8b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBViewportArray.java @@ -0,0 +1,121 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBViewportArray { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * GetDoublev and GetInteger64v: + */ + public static final int GL_MAX_VIEWPORTS = 0x825B, + GL_VIEWPORT_SUBPIXEL_BITS = 0x825C, + GL_VIEWPORT_BOUNDS_RANGE = 0x825D, + GL_LAYER_PROVOKING_VERTEX = 0x825E, + GL_VIEWPORT_INDEX_PROVOKING_VERTEX = 0x825F; + + /** + * Accepted by the <pname> parameter of GetIntegeri_v: + */ + public static final int GL_SCISSOR_BOX = 0xC10; + + /** + * Accepted by the <pname> parameter of GetFloati_v: + */ + public static final int GL_VIEWPORT = 0xBA2; + + /** + * Accepted by the <pname> parameter of GetDoublei_v: + */ + public static final int GL_DEPTH_RANGE = 0xB70; + + /** + * Accepted by the <pname> parameter of Enablei, Disablei, and IsEnabledi: + */ + public static final int GL_SCISSOR_TEST = 0xC11; + + /** + * Returned in the <data> parameter from a Get query with a <pname> of + * LAYER_PROVOKING_VERTEX or VIEWPORT_INDEX_PROVOKING_VERTEX: + */ + public static final int GL_FIRST_VERTEX_CONVENTION = 0x8E4D, + GL_LAST_VERTEX_CONVENTION = 0x8E4E, + GL_PROVOKING_VERTEX = 0x8E4F, + GL_UNDEFINED_VERTEX = 0x8260; + + private ARBViewportArray() {} + + public static void glViewportArray(int first, FloatBuffer v) { + GL41.glViewportArray(first, v); + } + + public static void glViewportIndexedf(int index, float x, float y, float w, float h) { + GL41.glViewportIndexedf(index, x, y, w, h); + } + + public static void glViewportIndexed(int index, FloatBuffer v) { + GL41.glViewportIndexed(index, v); + } + + public static void glScissorArray(int first, IntBuffer v) { + GL41.glScissorArray(first, v); + } + + public static void glScissorIndexed(int index, int left, int bottom, int width, int height) { + GL41.glScissorIndexed(index, left, bottom, width, height); + } + + public static void glScissorIndexed(int index, IntBuffer v) { + GL41.glScissorIndexed(index, v); + } + + public static void glDepthRangeArray(int first, DoubleBuffer v) { + GL41.glDepthRangeArray(first, v); + } + + public static void glDepthRangeIndexed(int index, double n, double f) { + GL41.glDepthRangeIndexed(index, n, f); + } + + public static void glGetFloat(int target, int index, FloatBuffer data) { + GL41.glGetFloat(target, index, data); + } + + /** Overloads glGetFloati_v. */ + public static float glGetFloat(int target, int index) { + return GL41.glGetFloat(target, index); + } + + public static void glGetDouble(int target, int index, DoubleBuffer data) { + GL41.glGetDouble(target, index, data); + } + + /** Overloads glGetDoublei_v. */ + public static double glGetDouble(int target, int index) { + return GL41.glGetDouble(target, index); + } + + public static void glGetIntegerIndexedEXT(int target, int index, IntBuffer v) { + EXTDrawBuffers2.glGetIntegerIndexedEXT(target, index, v); + } + + /** Overloads glGetIntegerIndexedivEXT. */ + public static int glGetIntegerIndexedEXT(int target, int index) { + return EXTDrawBuffers2.glGetIntegerIndexedEXT(target, index); + } + + public static void glEnableIndexedEXT(int target, int index) { + EXTDrawBuffers2.glEnableIndexedEXT(target, index); + } + + public static void glDisableIndexedEXT(int target, int index) { + EXTDrawBuffers2.glDisableIndexedEXT(target, index); + } + + public static boolean glIsEnabledIndexedEXT(int target, int index) { + return EXTDrawBuffers2.glIsEnabledIndexedEXT(target, index); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBWindowPos.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBWindowPos.java new file mode 100644 index 0000000..363153b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ARBWindowPos.java @@ -0,0 +1,75 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBWindowPos { + + private ARBWindowPos() {} + + public static void glWindowPos2fARB(float x, float y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWindowPos2fARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglWindowPos2fARB(x, y, function_pointer); + } + static native void nglWindowPos2fARB(float x, float y, long function_pointer); + + public static void glWindowPos2dARB(double x, double y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWindowPos2dARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglWindowPos2dARB(x, y, function_pointer); + } + static native void nglWindowPos2dARB(double x, double y, long function_pointer); + + public static void glWindowPos2iARB(int x, int y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWindowPos2iARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglWindowPos2iARB(x, y, function_pointer); + } + static native void nglWindowPos2iARB(int x, int y, long function_pointer); + + public static void glWindowPos2sARB(short x, short y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWindowPos2sARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglWindowPos2sARB(x, y, function_pointer); + } + static native void nglWindowPos2sARB(short x, short y, long function_pointer); + + public static void glWindowPos3fARB(float x, float y, float z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWindowPos3fARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglWindowPos3fARB(x, y, z, function_pointer); + } + static native void nglWindowPos3fARB(float x, float y, float z, long function_pointer); + + public static void glWindowPos3dARB(double x, double y, double z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWindowPos3dARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglWindowPos3dARB(x, y, z, function_pointer); + } + static native void nglWindowPos3dARB(double x, double y, double z, long function_pointer); + + public static void glWindowPos3iARB(int x, int y, int z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWindowPos3iARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglWindowPos3iARB(x, y, z, function_pointer); + } + static native void nglWindowPos3iARB(int x, int y, int z, long function_pointer); + + public static void glWindowPos3sARB(short x, short y, short z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWindowPos3sARB; + BufferChecks.checkFunctionAddress(function_pointer); + nglWindowPos3sARB(x, y, z, function_pointer); + } + static native void nglWindowPos3sARB(short x, short y, short z, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIDrawBuffers.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIDrawBuffers.java new file mode 100644 index 0000000..eb55fbd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIDrawBuffers.java @@ -0,0 +1,50 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ATIDrawBuffers { + + /** + * Accepted by the <pname> parameters of GetIntegerv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_MAX_DRAW_BUFFERS_ATI = 0x8824, + GL_DRAW_BUFFER0_ATI = 0x8825, + GL_DRAW_BUFFER1_ATI = 0x8826, + GL_DRAW_BUFFER2_ATI = 0x8827, + GL_DRAW_BUFFER3_ATI = 0x8828, + GL_DRAW_BUFFER4_ATI = 0x8829, + GL_DRAW_BUFFER5_ATI = 0x882A, + GL_DRAW_BUFFER6_ATI = 0x882B, + GL_DRAW_BUFFER7_ATI = 0x882C, + GL_DRAW_BUFFER8_ATI = 0x882D, + GL_DRAW_BUFFER9_ATI = 0x882E, + GL_DRAW_BUFFER10_ATI = 0x882F, + GL_DRAW_BUFFER11_ATI = 0x8830, + GL_DRAW_BUFFER12_ATI = 0x8831, + GL_DRAW_BUFFER13_ATI = 0x8832, + GL_DRAW_BUFFER14_ATI = 0x8833, + GL_DRAW_BUFFER15_ATI = 0x8834; + + private ATIDrawBuffers() {} + + public static void glDrawBuffersATI(IntBuffer buffers) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawBuffersATI; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(buffers); + nglDrawBuffersATI(buffers.remaining(), MemoryUtil.getAddress(buffers), function_pointer); + } + static native void nglDrawBuffersATI(int buffers_size, long buffers, long function_pointer); + + /** Overloads glDrawBuffersATI. */ + public static void glDrawBuffersATI(int buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawBuffersATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglDrawBuffersATI(1, APIUtil.getInt(caps, buffer), function_pointer); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIElementArray.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIElementArray.java new file mode 100644 index 0000000..cb31afd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIElementArray.java @@ -0,0 +1,54 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ATIElementArray { + + public static final int GL_ELEMENT_ARRAY_ATI = 0x8768, + GL_ELEMENT_ARRAY_TYPE_ATI = 0x8769, + GL_ELEMENT_ARRAY_POINTER_ATI = 0x876A; + + private ATIElementArray() {} + + public static void glElementPointerATI(ByteBuffer pPointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glElementPointerATI; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pPointer); + nglElementPointerATI(GL11.GL_UNSIGNED_BYTE, MemoryUtil.getAddress(pPointer), function_pointer); + } + public static void glElementPointerATI(IntBuffer pPointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glElementPointerATI; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pPointer); + nglElementPointerATI(GL11.GL_UNSIGNED_INT, MemoryUtil.getAddress(pPointer), function_pointer); + } + public static void glElementPointerATI(ShortBuffer pPointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glElementPointerATI; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pPointer); + nglElementPointerATI(GL11.GL_UNSIGNED_SHORT, MemoryUtil.getAddress(pPointer), function_pointer); + } + static native void nglElementPointerATI(int type, long pPointer, long function_pointer); + + public static void glDrawElementArrayATI(int mode, int count) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementArrayATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglDrawElementArrayATI(mode, count, function_pointer); + } + static native void nglDrawElementArrayATI(int mode, int count, long function_pointer); + + public static void glDrawRangeElementArrayATI(int mode, int start, int end, int count) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawRangeElementArrayATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglDrawRangeElementArrayATI(mode, start, end, count, function_pointer); + } + static native void nglDrawRangeElementArrayATI(int mode, int start, int end, int count, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIEnvmapBumpmap.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIEnvmapBumpmap.java new file mode 100644 index 0000000..ab1abba --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIEnvmapBumpmap.java @@ -0,0 +1,56 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ATIEnvmapBumpmap { + + public static final int GL_BUMP_ROT_MATRIX_ATI = 0x8775, + GL_BUMP_ROT_MATRIX_SIZE_ATI = 0x8776, + GL_BUMP_NUM_TEX_UNITS_ATI = 0x8777, + GL_BUMP_TEX_UNITS_ATI = 0x8778, + GL_DUDV_ATI = 0x8779, + GL_DU8DV8_ATI = 0x877A, + GL_BUMP_ENVMAP_ATI = 0x877B, + GL_BUMP_TARGET_ATI = 0x877C; + + private ATIEnvmapBumpmap() {} + + public static void glTexBumpParameterATI(int pname, FloatBuffer param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexBumpParameterfvATI; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(param, 4); + nglTexBumpParameterfvATI(pname, MemoryUtil.getAddress(param), function_pointer); + } + static native void nglTexBumpParameterfvATI(int pname, long param, long function_pointer); + + public static void glTexBumpParameterATI(int pname, IntBuffer param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexBumpParameterivATI; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(param, 4); + nglTexBumpParameterivATI(pname, MemoryUtil.getAddress(param), function_pointer); + } + static native void nglTexBumpParameterivATI(int pname, long param, long function_pointer); + + public static void glGetTexBumpParameterATI(int pname, FloatBuffer param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexBumpParameterfvATI; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(param, 4); + nglGetTexBumpParameterfvATI(pname, MemoryUtil.getAddress(param), function_pointer); + } + static native void nglGetTexBumpParameterfvATI(int pname, long param, long function_pointer); + + public static void glGetTexBumpParameterATI(int pname, IntBuffer param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexBumpParameterivATI; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(param, 4); + nglGetTexBumpParameterivATI(pname, MemoryUtil.getAddress(param), function_pointer); + } + static native void nglGetTexBumpParameterivATI(int pname, long param, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIFragmentShader.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIFragmentShader.java new file mode 100644 index 0000000..637fae2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIFragmentShader.java @@ -0,0 +1,230 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ATIFragmentShader { + + public static final int GL_FRAGMENT_SHADER_ATI = 0x8920, + GL_REG_0_ATI = 0x8921, + GL_REG_1_ATI = 0x8922, + GL_REG_2_ATI = 0x8923, + GL_REG_3_ATI = 0x8924, + GL_REG_4_ATI = 0x8925, + GL_REG_5_ATI = 0x8926, + GL_REG_6_ATI = 0x8927, + GL_REG_7_ATI = 0x8928, + GL_REG_8_ATI = 0x8929, + GL_REG_9_ATI = 0x892A, + GL_REG_10_ATI = 0x892B, + GL_REG_11_ATI = 0x892C, + GL_REG_12_ATI = 0x892D, + GL_REG_13_ATI = 0x892E, + GL_REG_14_ATI = 0x892F, + GL_REG_15_ATI = 0x8930, + GL_REG_16_ATI = 0x8931, + GL_REG_17_ATI = 0x8932, + GL_REG_18_ATI = 0x8933, + GL_REG_19_ATI = 0x8934, + GL_REG_20_ATI = 0x8935, + GL_REG_21_ATI = 0x8936, + GL_REG_22_ATI = 0x8937, + GL_REG_23_ATI = 0x8938, + GL_REG_24_ATI = 0x8939, + GL_REG_25_ATI = 0x893A, + GL_REG_26_ATI = 0x893B, + GL_REG_27_ATI = 0x893C, + GL_REG_28_ATI = 0x893D, + GL_REG_29_ATI = 0x893E, + GL_REG_30_ATI = 0x893F, + GL_REG_31_ATI = 0x8940, + GL_CON_0_ATI = 0x8941, + GL_CON_1_ATI = 0x8942, + GL_CON_2_ATI = 0x8943, + GL_CON_3_ATI = 0x8944, + GL_CON_4_ATI = 0x8945, + GL_CON_5_ATI = 0x8946, + GL_CON_6_ATI = 0x8947, + GL_CON_7_ATI = 0x8948, + GL_CON_8_ATI = 0x8949, + GL_CON_9_ATI = 0x894A, + GL_CON_10_ATI = 0x894B, + GL_CON_11_ATI = 0x894C, + GL_CON_12_ATI = 0x894D, + GL_CON_13_ATI = 0x894E, + GL_CON_14_ATI = 0x894F, + GL_CON_15_ATI = 0x8950, + GL_CON_16_ATI = 0x8951, + GL_CON_17_ATI = 0x8952, + GL_CON_18_ATI = 0x8953, + GL_CON_19_ATI = 0x8954, + GL_CON_20_ATI = 0x8955, + GL_CON_21_ATI = 0x8956, + GL_CON_22_ATI = 0x8957, + GL_CON_23_ATI = 0x8958, + GL_CON_24_ATI = 0x8959, + GL_CON_25_ATI = 0x895A, + GL_CON_26_ATI = 0x895B, + GL_CON_27_ATI = 0x895C, + GL_CON_28_ATI = 0x895D, + GL_CON_29_ATI = 0x895E, + GL_CON_30_ATI = 0x895F, + GL_CON_31_ATI = 0x8960, + GL_MOV_ATI = 0x8961, + GL_ADD_ATI = 0x8963, + GL_MUL_ATI = 0x8964, + GL_SUB_ATI = 0x8965, + GL_DOT3_ATI = 0x8966, + GL_DOT4_ATI = 0x8967, + GL_MAD_ATI = 0x8968, + GL_LERP_ATI = 0x8969, + GL_CND_ATI = 0x896A, + GL_CND0_ATI = 0x896B, + GL_DOT2_ADD_ATI = 0x896C, + GL_SECONDARY_INTERPOLATOR_ATI = 0x896D, + GL_NUM_FRAGMENT_REGISTERS_ATI = 0x896E, + GL_NUM_FRAGMENT_CONSTANTS_ATI = 0x896F, + GL_NUM_PASSES_ATI = 0x8970, + GL_NUM_INSTRUCTIONS_PER_PASS_ATI = 0x8971, + GL_NUM_INSTRUCTIONS_TOTAL_ATI = 0x8972, + GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI = 0x8973, + GL_NUM_LOOPBACK_COMPONENTS_ATI = 0x8974, + GL_COLOR_ALPHA_PAIRING_ATI = 0x8975, + GL_SWIZZLE_STR_ATI = 0x8976, + GL_SWIZZLE_STQ_ATI = 0x8977, + GL_SWIZZLE_STR_DR_ATI = 0x8978, + GL_SWIZZLE_STQ_DQ_ATI = 0x8979, + GL_SWIZZLE_STRQ_ATI = 0x897A, + GL_SWIZZLE_STRQ_DQ_ATI = 0x897B, + GL_RED_BIT_ATI = 0x1, + GL_GREEN_BIT_ATI = 0x2, + GL_BLUE_BIT_ATI = 0x4, + GL_2X_BIT_ATI = 0x1, + GL_4X_BIT_ATI = 0x2, + GL_8X_BIT_ATI = 0x4, + GL_HALF_BIT_ATI = 0x8, + GL_QUARTER_BIT_ATI = 0x10, + GL_EIGHTH_BIT_ATI = 0x20, + GL_SATURATE_BIT_ATI = 0x40, + GL_COMP_BIT_ATI = 0x2, + GL_NEGATE_BIT_ATI = 0x4, + GL_BIAS_BIT_ATI = 0x8; + + private ATIFragmentShader() {} + + public static int glGenFragmentShadersATI(int range) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenFragmentShadersATI; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglGenFragmentShadersATI(range, function_pointer); + return __result; + } + static native int nglGenFragmentShadersATI(int range, long function_pointer); + + public static void glBindFragmentShaderATI(int id) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindFragmentShaderATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindFragmentShaderATI(id, function_pointer); + } + static native void nglBindFragmentShaderATI(int id, long function_pointer); + + public static void glDeleteFragmentShaderATI(int id) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteFragmentShaderATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeleteFragmentShaderATI(id, function_pointer); + } + static native void nglDeleteFragmentShaderATI(int id, long function_pointer); + + public static void glBeginFragmentShaderATI() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBeginFragmentShaderATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglBeginFragmentShaderATI(function_pointer); + } + static native void nglBeginFragmentShaderATI(long function_pointer); + + public static void glEndFragmentShaderATI() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEndFragmentShaderATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglEndFragmentShaderATI(function_pointer); + } + static native void nglEndFragmentShaderATI(long function_pointer); + + public static void glPassTexCoordATI(int dst, int coord, int swizzle) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPassTexCoordATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglPassTexCoordATI(dst, coord, swizzle, function_pointer); + } + static native void nglPassTexCoordATI(int dst, int coord, int swizzle, long function_pointer); + + public static void glSampleMapATI(int dst, int interp, int swizzle) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSampleMapATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglSampleMapATI(dst, interp, swizzle, function_pointer); + } + static native void nglSampleMapATI(int dst, int interp, int swizzle, long function_pointer); + + public static void glColorFragmentOp1ATI(int op, int dst, int dstMask, int dstMod, int arg1, int arg1Rep, int arg1Mod) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorFragmentOp1ATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglColorFragmentOp1ATI(op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, function_pointer); + } + static native void nglColorFragmentOp1ATI(int op, int dst, int dstMask, int dstMod, int arg1, int arg1Rep, int arg1Mod, long function_pointer); + + public static void glColorFragmentOp2ATI(int op, int dst, int dstMask, int dstMod, int arg1, int arg1Rep, int arg1Mod, int arg2, int arg2Rep, int arg2Mod) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorFragmentOp2ATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglColorFragmentOp2ATI(op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, function_pointer); + } + static native void nglColorFragmentOp2ATI(int op, int dst, int dstMask, int dstMod, int arg1, int arg1Rep, int arg1Mod, int arg2, int arg2Rep, int arg2Mod, long function_pointer); + + public static void glColorFragmentOp3ATI(int op, int dst, int dstMask, int dstMod, int arg1, int arg1Rep, int arg1Mod, int arg2, int arg2Rep, int arg2Mod, int arg3, int arg3Rep, int arg3Mod) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorFragmentOp3ATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglColorFragmentOp3ATI(op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod, function_pointer); + } + static native void nglColorFragmentOp3ATI(int op, int dst, int dstMask, int dstMod, int arg1, int arg1Rep, int arg1Mod, int arg2, int arg2Rep, int arg2Mod, int arg3, int arg3Rep, int arg3Mod, long function_pointer); + + public static void glAlphaFragmentOp1ATI(int op, int dst, int dstMod, int arg1, int arg1Rep, int arg1Mod) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glAlphaFragmentOp1ATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglAlphaFragmentOp1ATI(op, dst, dstMod, arg1, arg1Rep, arg1Mod, function_pointer); + } + static native void nglAlphaFragmentOp1ATI(int op, int dst, int dstMod, int arg1, int arg1Rep, int arg1Mod, long function_pointer); + + public static void glAlphaFragmentOp2ATI(int op, int dst, int dstMod, int arg1, int arg1Rep, int arg1Mod, int arg2, int arg2Rep, int arg2Mod) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glAlphaFragmentOp2ATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglAlphaFragmentOp2ATI(op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, function_pointer); + } + static native void nglAlphaFragmentOp2ATI(int op, int dst, int dstMod, int arg1, int arg1Rep, int arg1Mod, int arg2, int arg2Rep, int arg2Mod, long function_pointer); + + public static void glAlphaFragmentOp3ATI(int op, int dst, int dstMod, int arg1, int arg1Rep, int arg1Mod, int arg2, int arg2Rep, int arg2Mod, int arg3, int arg3Rep, int arg3Mod) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glAlphaFragmentOp3ATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglAlphaFragmentOp3ATI(op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod, function_pointer); + } + static native void nglAlphaFragmentOp3ATI(int op, int dst, int dstMod, int arg1, int arg1Rep, int arg1Mod, int arg2, int arg2Rep, int arg2Mod, int arg3, int arg3Rep, int arg3Mod, long function_pointer); + + public static void glSetFragmentShaderConstantATI(int dst, FloatBuffer pfValue) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSetFragmentShaderConstantATI; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pfValue, 4); + nglSetFragmentShaderConstantATI(dst, MemoryUtil.getAddress(pfValue), function_pointer); + } + static native void nglSetFragmentShaderConstantATI(int dst, long pfValue, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIMapObjectBuffer.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIMapObjectBuffer.java new file mode 100644 index 0000000..00a4b5f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIMapObjectBuffer.java @@ -0,0 +1,85 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ATIMapObjectBuffer { + + private ATIMapObjectBuffer() {} + + /** + * glMapObjectBufferATI maps an ATI vertex array object to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the vertex array object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapObjectBufferATI like this: + *

+ * ByteBuffer mapped_buffer; mapped_buffer = glMapObjectBufferATI(..., null); ... // Another map on the same buffer mapped_buffer = glMapObjectBufferATI(..., mapped_buffer); + *

+ * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + *

+ * The version of this method without an explicit length argument calls glGetObjectBufferATI internally to + * retrieve the current vertex array object size, which may cause a pipeline flush and reduce application performance. + *

+ * The version of this method with an explicit length argument is a fast alternative to the one without. No GL call + * is made to retrieve the vertex array object size, so the user is responsible for tracking and using the appropriate length.
+ * Security warning: The length argument should match the vertex array object size. Reading from or writing to outside + * the memory region that corresponds to the mapped vertex array object will cause native crashes. + *

+ * @param length the length of the mapped memory in bytes. + * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. + *

+ * @return A ByteBuffer representing the mapped buffer memory. + */ + public static ByteBuffer glMapObjectBufferATI(int buffer, ByteBuffer old_buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMapObjectBufferATI; + BufferChecks.checkFunctionAddress(function_pointer); + if (old_buffer != null) + BufferChecks.checkDirect(old_buffer); + ByteBuffer __result = nglMapObjectBufferATI(buffer, GLChecks.getBufferObjectSizeATI(caps, buffer), old_buffer, function_pointer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + /** + * glMapObjectBufferATI maps an ATI vertex array object to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the vertex array object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapObjectBufferATI like this: + *

+ * ByteBuffer mapped_buffer; mapped_buffer = glMapObjectBufferATI(..., null); ... // Another map on the same buffer mapped_buffer = glMapObjectBufferATI(..., mapped_buffer); + *

+ * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + *

+ * The version of this method without an explicit length argument calls glGetObjectBufferATI internally to + * retrieve the current vertex array object size, which may cause a pipeline flush and reduce application performance. + *

+ * The version of this method with an explicit length argument is a fast alternative to the one without. No GL call + * is made to retrieve the vertex array object size, so the user is responsible for tracking and using the appropriate length.
+ * Security warning: The length argument should match the vertex array object size. Reading from or writing to outside + * the memory region that corresponds to the mapped vertex array object will cause native crashes. + *

+ * @param length the length of the mapped memory in bytes. + * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. + *

+ * @return A ByteBuffer representing the mapped buffer memory. + */ + public static ByteBuffer glMapObjectBufferATI(int buffer, long length, ByteBuffer old_buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMapObjectBufferATI; + BufferChecks.checkFunctionAddress(function_pointer); + if (old_buffer != null) + BufferChecks.checkDirect(old_buffer); + ByteBuffer __result = nglMapObjectBufferATI(buffer, length, old_buffer, function_pointer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + static native ByteBuffer nglMapObjectBufferATI(int buffer, long result_size, ByteBuffer old_buffer, long function_pointer); + + public static void glUnmapObjectBufferATI(int buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUnmapObjectBufferATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglUnmapObjectBufferATI(buffer, function_pointer); + } + static native void nglUnmapObjectBufferATI(int buffer, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIMeminfo.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIMeminfo.java new file mode 100644 index 0000000..afe9291 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIMeminfo.java @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ATIMeminfo { + + /** + * Accepted by the <value> parameter of GetIntegerv: + */ + public static final int GL_VBO_FREE_MEMORY_ATI = 0x87FB, + GL_TEXTURE_FREE_MEMORY_ATI = 0x87FC, + GL_RENDERBUFFER_FREE_MEMORY_ATI = 0x87FD; + + private ATIMeminfo() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIPnTriangles.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIPnTriangles.java new file mode 100644 index 0000000..6b35b0b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIPnTriangles.java @@ -0,0 +1,37 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ATIPnTriangles { + + public static final int GL_PN_TRIANGLES_ATI = 0x87F0, + GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI = 0x87F1, + GL_PN_TRIANGLES_POINT_MODE_ATI = 0x87F2, + GL_PN_TRIANGLES_NORMAL_MODE_ATI = 0x87F3, + GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI = 0x87F4, + GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI = 0x87F5, + GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI = 0x87F6, + GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI = 0x87F7, + GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI = 0x87F8; + + private ATIPnTriangles() {} + + public static void glPNTrianglesfATI(int pname, float param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPNTrianglesfATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglPNTrianglesfATI(pname, param, function_pointer); + } + static native void nglPNTrianglesfATI(int pname, float param, long function_pointer); + + public static void glPNTrianglesiATI(int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPNTrianglesiATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglPNTrianglesiATI(pname, param, function_pointer); + } + static native void nglPNTrianglesiATI(int pname, int param, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATISeparateStencil.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATISeparateStencil.java new file mode 100644 index 0000000..69c6ebc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATISeparateStencil.java @@ -0,0 +1,32 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ATISeparateStencil { + + public static final int GL_STENCIL_BACK_FUNC_ATI = 0x8800, + GL_STENCIL_BACK_FAIL_ATI = 0x8801, + GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI = 0x8802, + GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI = 0x8803; + + private ATISeparateStencil() {} + + public static void glStencilOpSeparateATI(int face, int sfail, int dpfail, int dppass) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glStencilOpSeparateATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglStencilOpSeparateATI(face, sfail, dpfail, dppass, function_pointer); + } + static native void nglStencilOpSeparateATI(int face, int sfail, int dpfail, int dppass, long function_pointer); + + public static void glStencilFuncSeparateATI(int frontfunc, int backfunc, int ref, int mask) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glStencilFuncSeparateATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglStencilFuncSeparateATI(frontfunc, backfunc, ref, mask, function_pointer); + } + static native void nglStencilFuncSeparateATI(int frontfunc, int backfunc, int ref, int mask, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATITextFragmentShader.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATITextFragmentShader.java new file mode 100644 index 0000000..bad03ea --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATITextFragmentShader.java @@ -0,0 +1,22 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ATITextFragmentShader { + + /** + * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev, and by the <target> parameter of ProgramStringARB, + * BindProgramARB, ProgramEnvParameter4{d,dv,f,fv}ARB, + * ProgramLocalParameter4{d,dv,f,fv}ARB, + * GetProgramEnvParameter{dv,fv}ARB, GetProgramLocalParameter{dv,fv}ARB, + * GetProgramivARB, GetProgramfvATI, and GetProgramStringARB. + */ + public static final int GL_TEXT_FRAGMENT_SHADER_ATI = 0x8200; + + private ATITextFragmentShader() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATITextureCompression3DC.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATITextureCompression3DC.java new file mode 100644 index 0000000..9add243 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATITextureCompression3DC.java @@ -0,0 +1,13 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ATITextureCompression3DC { + + public static final int GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI = 0x8837; + + private ATITextureCompression3DC() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATITextureEnvCombine3.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATITextureEnvCombine3.java new file mode 100644 index 0000000..6f854cc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATITextureEnvCombine3.java @@ -0,0 +1,20 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ATITextureEnvCombine3 { + + /** + * Accepted by the <params> parameter of TexEnvf, TexEnvi, TexEnvfv, + * and TexEnviv when the <pname> parameter value is COMBINE_RGB_ARB + * or COMBINE_ALPHA_ARB + */ + public static final int GL_MODULATE_ADD_ATI = 0x8744, + GL_MODULATE_SIGNED_ADD_ATI = 0x8745, + GL_MODULATE_SUBTRACT_ATI = 0x8746; + + private ATITextureEnvCombine3() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATITextureFloat.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATITextureFloat.java new file mode 100644 index 0000000..bbe80e7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATITextureFloat.java @@ -0,0 +1,28 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ATITextureFloat { + + /** + * Accepted by the <internalFormat> parameter of TexImage1D, + * TexImage2D, and TexImage3D: + */ + public static final int GL_RGBA_FLOAT32_ATI = 0x8814, + GL_RGB_FLOAT32_ATI = 0x8815, + GL_ALPHA_FLOAT32_ATI = 0x8816, + GL_INTENSITY_FLOAT32_ATI = 0x8817, + GL_LUMINANCE_FLOAT32_ATI = 0x8818, + GL_LUMINANCE_ALPHA_FLOAT32_ATI = 0x8819, + GL_RGBA_FLOAT16_ATI = 0x881A, + GL_RGB_FLOAT16_ATI = 0x881B, + GL_ALPHA_FLOAT16_ATI = 0x881C, + GL_INTENSITY_FLOAT16_ATI = 0x881D, + GL_LUMINANCE_FLOAT16_ATI = 0x881E, + GL_LUMINANCE_ALPHA_FLOAT16_ATI = 0x881F; + + private ATITextureFloat() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATITextureMirrorOnce.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATITextureMirrorOnce.java new file mode 100644 index 0000000..b45ec38 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATITextureMirrorOnce.java @@ -0,0 +1,14 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ATITextureMirrorOnce { + + public static final int GL_MIRROR_CLAMP_ATI = 0x8742, + GL_MIRROR_CLAMP_TO_EDGE_ATI = 0x8743; + + private ATITextureMirrorOnce() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIVertexArrayObject.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIVertexArrayObject.java new file mode 100644 index 0000000..5574ddb --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIVertexArrayObject.java @@ -0,0 +1,203 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ATIVertexArrayObject { + + public static final int GL_STATIC_ATI = 0x8760, + GL_DYNAMIC_ATI = 0x8761, + GL_PRESERVE_ATI = 0x8762, + GL_DISCARD_ATI = 0x8763, + GL_OBJECT_BUFFER_SIZE_ATI = 0x8764, + GL_OBJECT_BUFFER_USAGE_ATI = 0x8765, + GL_ARRAY_OBJECT_BUFFER_ATI = 0x8766, + GL_ARRAY_OBJECT_OFFSET_ATI = 0x8767; + + private ATIVertexArrayObject() {} + + public static int glNewObjectBufferATI(int pPointer_size, int usage) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNewObjectBufferATI; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglNewObjectBufferATI(pPointer_size, 0L, usage, function_pointer); + return __result; + } + public static int glNewObjectBufferATI(ByteBuffer pPointer, int usage) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNewObjectBufferATI; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pPointer); + int __result = nglNewObjectBufferATI(pPointer.remaining(), MemoryUtil.getAddress(pPointer), usage, function_pointer); + return __result; + } + public static int glNewObjectBufferATI(DoubleBuffer pPointer, int usage) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNewObjectBufferATI; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pPointer); + int __result = nglNewObjectBufferATI((pPointer.remaining() << 3), MemoryUtil.getAddress(pPointer), usage, function_pointer); + return __result; + } + public static int glNewObjectBufferATI(FloatBuffer pPointer, int usage) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNewObjectBufferATI; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pPointer); + int __result = nglNewObjectBufferATI((pPointer.remaining() << 2), MemoryUtil.getAddress(pPointer), usage, function_pointer); + return __result; + } + public static int glNewObjectBufferATI(IntBuffer pPointer, int usage) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNewObjectBufferATI; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pPointer); + int __result = nglNewObjectBufferATI((pPointer.remaining() << 2), MemoryUtil.getAddress(pPointer), usage, function_pointer); + return __result; + } + public static int glNewObjectBufferATI(ShortBuffer pPointer, int usage) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNewObjectBufferATI; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pPointer); + int __result = nglNewObjectBufferATI((pPointer.remaining() << 1), MemoryUtil.getAddress(pPointer), usage, function_pointer); + return __result; + } + static native int nglNewObjectBufferATI(int pPointer_size, long pPointer, int usage, long function_pointer); + + public static boolean glIsObjectBufferATI(int buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsObjectBufferATI; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsObjectBufferATI(buffer, function_pointer); + return __result; + } + static native boolean nglIsObjectBufferATI(int buffer, long function_pointer); + + public static void glUpdateObjectBufferATI(int buffer, int offset, ByteBuffer pPointer, int preserve) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUpdateObjectBufferATI; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pPointer); + nglUpdateObjectBufferATI(buffer, offset, pPointer.remaining(), MemoryUtil.getAddress(pPointer), preserve, function_pointer); + } + public static void glUpdateObjectBufferATI(int buffer, int offset, DoubleBuffer pPointer, int preserve) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUpdateObjectBufferATI; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pPointer); + nglUpdateObjectBufferATI(buffer, offset, (pPointer.remaining() << 3), MemoryUtil.getAddress(pPointer), preserve, function_pointer); + } + public static void glUpdateObjectBufferATI(int buffer, int offset, FloatBuffer pPointer, int preserve) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUpdateObjectBufferATI; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pPointer); + nglUpdateObjectBufferATI(buffer, offset, (pPointer.remaining() << 2), MemoryUtil.getAddress(pPointer), preserve, function_pointer); + } + public static void glUpdateObjectBufferATI(int buffer, int offset, IntBuffer pPointer, int preserve) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUpdateObjectBufferATI; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pPointer); + nglUpdateObjectBufferATI(buffer, offset, (pPointer.remaining() << 2), MemoryUtil.getAddress(pPointer), preserve, function_pointer); + } + public static void glUpdateObjectBufferATI(int buffer, int offset, ShortBuffer pPointer, int preserve) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUpdateObjectBufferATI; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pPointer); + nglUpdateObjectBufferATI(buffer, offset, (pPointer.remaining() << 1), MemoryUtil.getAddress(pPointer), preserve, function_pointer); + } + static native void nglUpdateObjectBufferATI(int buffer, int offset, int pPointer_size, long pPointer, int preserve, long function_pointer); + + public static void glGetObjectBufferATI(int buffer, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetObjectBufferfvATI; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglGetObjectBufferfvATI(buffer, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetObjectBufferfvATI(int buffer, int pname, long params, long function_pointer); + + public static void glGetObjectBufferATI(int buffer, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetObjectBufferivATI; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglGetObjectBufferivATI(buffer, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetObjectBufferivATI(int buffer, int pname, long params, long function_pointer); + + /** Overloads glGetObjectBufferivATI. */ + public static int glGetObjectBufferiATI(int buffer, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetObjectBufferivATI; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetObjectBufferivATI(buffer, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glFreeObjectBufferATI(int buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFreeObjectBufferATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglFreeObjectBufferATI(buffer, function_pointer); + } + static native void nglFreeObjectBufferATI(int buffer, long function_pointer); + + public static void glArrayObjectATI(int array, int size, int type, int stride, int buffer, int offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glArrayObjectATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglArrayObjectATI(array, size, type, stride, buffer, offset, function_pointer); + } + static native void nglArrayObjectATI(int array, int size, int type, int stride, int buffer, int offset, long function_pointer); + + public static void glGetArrayObjectATI(int array, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetArrayObjectfvATI; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetArrayObjectfvATI(array, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetArrayObjectfvATI(int array, int pname, long params, long function_pointer); + + public static void glGetArrayObjectATI(int array, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetArrayObjectivATI; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetArrayObjectivATI(array, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetArrayObjectivATI(int array, int pname, long params, long function_pointer); + + public static void glVariantArrayObjectATI(int id, int type, int stride, int buffer, int offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVariantArrayObjectATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglVariantArrayObjectATI(id, type, stride, buffer, offset, function_pointer); + } + static native void nglVariantArrayObjectATI(int id, int type, int stride, int buffer, int offset, long function_pointer); + + public static void glGetVariantArrayObjectATI(int id, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVariantArrayObjectfvATI; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetVariantArrayObjectfvATI(id, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVariantArrayObjectfvATI(int id, int pname, long params, long function_pointer); + + public static void glGetVariantArrayObjectATI(int id, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVariantArrayObjectivATI; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetVariantArrayObjectivATI(id, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVariantArrayObjectivATI(int id, int pname, long params, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIVertexAttribArrayObject.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIVertexAttribArrayObject.java new file mode 100644 index 0000000..d3a8f16 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIVertexAttribArrayObject.java @@ -0,0 +1,37 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ATIVertexAttribArrayObject { + + private ATIVertexAttribArrayObject() {} + + public static void glVertexAttribArrayObjectATI(int index, int size, int type, boolean normalized, int stride, int buffer, int offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribArrayObjectATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribArrayObjectATI(index, size, type, normalized, stride, buffer, offset, function_pointer); + } + static native void nglVertexAttribArrayObjectATI(int index, int size, int type, boolean normalized, int stride, int buffer, int offset, long function_pointer); + + public static void glGetVertexAttribArrayObjectATI(int index, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexAttribArrayObjectfvATI; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetVertexAttribArrayObjectfvATI(index, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVertexAttribArrayObjectfvATI(int index, int pname, long params, long function_pointer); + + public static void glGetVertexAttribArrayObjectATI(int index, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexAttribArrayObjectivATI; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetVertexAttribArrayObjectivATI(index, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVertexAttribArrayObjectivATI(int index, int pname, long params, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIVertexStreams.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIVertexStreams.java new file mode 100644 index 0000000..ddb353e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ATIVertexStreams.java @@ -0,0 +1,182 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class ATIVertexStreams { + + public static final int GL_MAX_VERTEX_STREAMS_ATI = 0x876B, + GL_VERTEX_SOURCE_ATI = 0x876C, + GL_VERTEX_STREAM0_ATI = 0x876D, + GL_VERTEX_STREAM1_ATI = 0x876E, + GL_VERTEX_STREAM2_ATI = 0x876F, + GL_VERTEX_STREAM3_ATI = 0x8770, + GL_VERTEX_STREAM4_ATI = 0x8771, + GL_VERTEX_STREAM5_ATI = 0x8772, + GL_VERTEX_STREAM6_ATI = 0x8773, + GL_VERTEX_STREAM7_ATI = 0x8774; + + private ATIVertexStreams() {} + + public static void glVertexStream2fATI(int stream, float x, float y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexStream2fATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexStream2fATI(stream, x, y, function_pointer); + } + static native void nglVertexStream2fATI(int stream, float x, float y, long function_pointer); + + public static void glVertexStream2dATI(int stream, double x, double y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexStream2dATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexStream2dATI(stream, x, y, function_pointer); + } + static native void nglVertexStream2dATI(int stream, double x, double y, long function_pointer); + + public static void glVertexStream2iATI(int stream, int x, int y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexStream2iATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexStream2iATI(stream, x, y, function_pointer); + } + static native void nglVertexStream2iATI(int stream, int x, int y, long function_pointer); + + public static void glVertexStream2sATI(int stream, short x, short y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexStream2sATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexStream2sATI(stream, x, y, function_pointer); + } + static native void nglVertexStream2sATI(int stream, short x, short y, long function_pointer); + + public static void glVertexStream3fATI(int stream, float x, float y, float z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexStream3fATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexStream3fATI(stream, x, y, z, function_pointer); + } + static native void nglVertexStream3fATI(int stream, float x, float y, float z, long function_pointer); + + public static void glVertexStream3dATI(int stream, double x, double y, double z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexStream3dATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexStream3dATI(stream, x, y, z, function_pointer); + } + static native void nglVertexStream3dATI(int stream, double x, double y, double z, long function_pointer); + + public static void glVertexStream3iATI(int stream, int x, int y, int z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexStream3iATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexStream3iATI(stream, x, y, z, function_pointer); + } + static native void nglVertexStream3iATI(int stream, int x, int y, int z, long function_pointer); + + public static void glVertexStream3sATI(int stream, short x, short y, short z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexStream3sATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexStream3sATI(stream, x, y, z, function_pointer); + } + static native void nglVertexStream3sATI(int stream, short x, short y, short z, long function_pointer); + + public static void glVertexStream4fATI(int stream, float x, float y, float z, float w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexStream4fATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexStream4fATI(stream, x, y, z, w, function_pointer); + } + static native void nglVertexStream4fATI(int stream, float x, float y, float z, float w, long function_pointer); + + public static void glVertexStream4dATI(int stream, double x, double y, double z, double w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexStream4dATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexStream4dATI(stream, x, y, z, w, function_pointer); + } + static native void nglVertexStream4dATI(int stream, double x, double y, double z, double w, long function_pointer); + + public static void glVertexStream4iATI(int stream, int x, int y, int z, int w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexStream4iATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexStream4iATI(stream, x, y, z, w, function_pointer); + } + static native void nglVertexStream4iATI(int stream, int x, int y, int z, int w, long function_pointer); + + public static void glVertexStream4sATI(int stream, short x, short y, short z, short w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexStream4sATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexStream4sATI(stream, x, y, z, w, function_pointer); + } + static native void nglVertexStream4sATI(int stream, short x, short y, short z, short w, long function_pointer); + + public static void glNormalStream3bATI(int stream, byte x, byte y, byte z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNormalStream3bATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglNormalStream3bATI(stream, x, y, z, function_pointer); + } + static native void nglNormalStream3bATI(int stream, byte x, byte y, byte z, long function_pointer); + + public static void glNormalStream3fATI(int stream, float x, float y, float z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNormalStream3fATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglNormalStream3fATI(stream, x, y, z, function_pointer); + } + static native void nglNormalStream3fATI(int stream, float x, float y, float z, long function_pointer); + + public static void glNormalStream3dATI(int stream, double x, double y, double z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNormalStream3dATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglNormalStream3dATI(stream, x, y, z, function_pointer); + } + static native void nglNormalStream3dATI(int stream, double x, double y, double z, long function_pointer); + + public static void glNormalStream3iATI(int stream, int x, int y, int z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNormalStream3iATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglNormalStream3iATI(stream, x, y, z, function_pointer); + } + static native void nglNormalStream3iATI(int stream, int x, int y, int z, long function_pointer); + + public static void glNormalStream3sATI(int stream, short x, short y, short z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNormalStream3sATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglNormalStream3sATI(stream, x, y, z, function_pointer); + } + static native void nglNormalStream3sATI(int stream, short x, short y, short z, long function_pointer); + + public static void glClientActiveVertexStreamATI(int stream) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClientActiveVertexStreamATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglClientActiveVertexStreamATI(stream, function_pointer); + } + static native void nglClientActiveVertexStreamATI(int stream, long function_pointer); + + public static void glVertexBlendEnvfATI(int pname, float param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexBlendEnvfATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexBlendEnvfATI(pname, param, function_pointer); + } + static native void nglVertexBlendEnvfATI(int pname, float param, long function_pointer); + + public static void glVertexBlendEnviATI(int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexBlendEnviATI; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexBlendEnviATI(pname, param, function_pointer); + } + static native void nglVertexBlendEnviATI(int pname, int param, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ContextCapabilities.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ContextCapabilities.java new file mode 100644 index 0000000..cb91e91 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/ContextCapabilities.java @@ -0,0 +1,6239 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; +import java.util.Set; +import java.util.HashSet; + +public class ContextCapabilities { + static final boolean DEBUG = false; + final APIUtil util = new APIUtil(); + final StateTracker tracker = new StateTracker(); + + public final boolean GL_AMD_blend_minmax_factor; + public final boolean GL_AMD_conservative_depth; + public final boolean GL_AMD_debug_output; + public final boolean GL_AMD_depth_clamp_separate; + public final boolean GL_AMD_draw_buffers_blend; + public final boolean GL_AMD_interleaved_elements; + public final boolean GL_AMD_multi_draw_indirect; + public final boolean GL_AMD_name_gen_delete; + public final boolean GL_AMD_performance_monitor; + public final boolean GL_AMD_pinned_memory; + public final boolean GL_AMD_query_buffer_object; + public final boolean GL_AMD_sample_positions; + public final boolean GL_AMD_seamless_cubemap_per_texture; + public final boolean GL_AMD_shader_atomic_counter_ops; + public final boolean GL_AMD_shader_stencil_export; + public final boolean GL_AMD_shader_trinary_minmax; + public final boolean GL_AMD_sparse_texture; + public final boolean GL_AMD_stencil_operation_extended; + public final boolean GL_AMD_texture_texture4; + public final boolean GL_AMD_transform_feedback3_lines_triangles; + public final boolean GL_AMD_vertex_shader_layer; + public final boolean GL_AMD_vertex_shader_tessellator; + public final boolean GL_AMD_vertex_shader_viewport_index; + public final boolean GL_APPLE_aux_depth_stencil; + public final boolean GL_APPLE_client_storage; + public final boolean GL_APPLE_element_array; + public final boolean GL_APPLE_fence; + public final boolean GL_APPLE_float_pixels; + public final boolean GL_APPLE_flush_buffer_range; + public final boolean GL_APPLE_object_purgeable; + public final boolean GL_APPLE_packed_pixels; + public final boolean GL_APPLE_rgb_422; + public final boolean GL_APPLE_row_bytes; + public final boolean GL_APPLE_texture_range; + public final boolean GL_APPLE_vertex_array_object; + public final boolean GL_APPLE_vertex_array_range; + public final boolean GL_APPLE_vertex_program_evaluators; + public final boolean GL_APPLE_ycbcr_422; + public final boolean GL_ARB_ES2_compatibility; + public final boolean GL_ARB_ES3_compatibility; + public final boolean GL_ARB_arrays_of_arrays; + public final boolean GL_ARB_base_instance; + public final boolean GL_ARB_bindless_texture; + public final boolean GL_ARB_blend_func_extended; + public final boolean GL_ARB_buffer_storage; + public final boolean GL_ARB_cl_event; + public final boolean GL_ARB_clear_buffer_object; + public final boolean GL_ARB_clear_texture; + public final boolean GL_ARB_color_buffer_float; + public final boolean GL_ARB_compatibility; + public final boolean GL_ARB_compressed_texture_pixel_storage; + public final boolean GL_ARB_compute_shader; + public final boolean GL_ARB_compute_variable_group_size; + public final boolean GL_ARB_conservative_depth; + public final boolean GL_ARB_copy_buffer; + public final boolean GL_ARB_copy_image; + public final boolean GL_ARB_debug_output; + public final boolean GL_ARB_depth_buffer_float; + public final boolean GL_ARB_depth_clamp; + public final boolean GL_ARB_depth_texture; + public final boolean GL_ARB_draw_buffers; + public final boolean GL_ARB_draw_buffers_blend; + public final boolean GL_ARB_draw_elements_base_vertex; + public final boolean GL_ARB_draw_indirect; + public final boolean GL_ARB_draw_instanced; + public final boolean GL_ARB_enhanced_layouts; + public final boolean GL_ARB_explicit_attrib_location; + public final boolean GL_ARB_explicit_uniform_location; + public final boolean GL_ARB_fragment_coord_conventions; + public final boolean GL_ARB_fragment_layer_viewport; + public final boolean GL_ARB_fragment_program; + public final boolean GL_ARB_fragment_program_shadow; + public final boolean GL_ARB_fragment_shader; + public final boolean GL_ARB_framebuffer_no_attachments; + public final boolean GL_ARB_framebuffer_object; + public final boolean GL_ARB_framebuffer_sRGB; + public final boolean GL_ARB_geometry_shader4; + public final boolean GL_ARB_get_program_binary; + public final boolean GL_ARB_gpu_shader5; + public final boolean GL_ARB_gpu_shader_fp64; + public final boolean GL_ARB_half_float_pixel; + public final boolean GL_ARB_half_float_vertex; + public final boolean GL_ARB_imaging; + public final boolean GL_ARB_indirect_parameters; + public final boolean GL_ARB_instanced_arrays; + public final boolean GL_ARB_internalformat_query; + public final boolean GL_ARB_internalformat_query2; + public final boolean GL_ARB_invalidate_subdata; + public final boolean GL_ARB_map_buffer_alignment; + public final boolean GL_ARB_map_buffer_range; + public final boolean GL_ARB_matrix_palette; + public final boolean GL_ARB_multi_bind; + public final boolean GL_ARB_multi_draw_indirect; + public final boolean GL_ARB_multisample; + public final boolean GL_ARB_multitexture; + public final boolean GL_ARB_occlusion_query; + public final boolean GL_ARB_occlusion_query2; + public final boolean GL_ARB_pixel_buffer_object; + public final boolean GL_ARB_point_parameters; + public final boolean GL_ARB_point_sprite; + public final boolean GL_ARB_program_interface_query; + public final boolean GL_ARB_provoking_vertex; + public final boolean GL_ARB_query_buffer_object; + public final boolean GL_ARB_robust_buffer_access_behavior; + public final boolean GL_ARB_robustness; + public final boolean GL_ARB_robustness_isolation; + public final boolean GL_ARB_sample_shading; + public final boolean GL_ARB_sampler_objects; + public final boolean GL_ARB_seamless_cube_map; + public final boolean GL_ARB_seamless_cubemap_per_texture; + public final boolean GL_ARB_separate_shader_objects; + public final boolean GL_ARB_shader_atomic_counters; + public final boolean GL_ARB_shader_bit_encoding; + public final boolean GL_ARB_shader_draw_parameters; + public final boolean GL_ARB_shader_group_vote; + public final boolean GL_ARB_shader_image_load_store; + public final boolean GL_ARB_shader_image_size; + public final boolean GL_ARB_shader_objects; + public final boolean GL_ARB_shader_precision; + public final boolean GL_ARB_shader_stencil_export; + public final boolean GL_ARB_shader_storage_buffer_object; + public final boolean GL_ARB_shader_subroutine; + public final boolean GL_ARB_shader_texture_lod; + public final boolean GL_ARB_shading_language_100; + public final boolean GL_ARB_shading_language_420pack; + public final boolean GL_ARB_shading_language_include; + public final boolean GL_ARB_shading_language_packing; + public final boolean GL_ARB_shadow; + public final boolean GL_ARB_shadow_ambient; + public final boolean GL_ARB_sparse_texture; + public final boolean GL_ARB_stencil_texturing; + public final boolean GL_ARB_sync; + public final boolean GL_ARB_tessellation_shader; + public final boolean GL_ARB_texture_border_clamp; + public final boolean GL_ARB_texture_buffer_object; + public final boolean GL_ARB_texture_buffer_object_rgb32; + public final boolean GL_ARB_texture_buffer_range; + public final boolean GL_ARB_texture_compression; + public final boolean GL_ARB_texture_compression_bptc; + public final boolean GL_ARB_texture_compression_rgtc; + public final boolean GL_ARB_texture_cube_map; + public final boolean GL_ARB_texture_cube_map_array; + public final boolean GL_ARB_texture_env_add; + public final boolean GL_ARB_texture_env_combine; + public final boolean GL_ARB_texture_env_crossbar; + public final boolean GL_ARB_texture_env_dot3; + public final boolean GL_ARB_texture_float; + public final boolean GL_ARB_texture_gather; + public final boolean GL_ARB_texture_mirror_clamp_to_edge; + public final boolean GL_ARB_texture_mirrored_repeat; + public final boolean GL_ARB_texture_multisample; + public final boolean GL_ARB_texture_non_power_of_two; + public final boolean GL_ARB_texture_query_levels; + public final boolean GL_ARB_texture_query_lod; + public final boolean GL_ARB_texture_rectangle; + public final boolean GL_ARB_texture_rg; + public final boolean GL_ARB_texture_rgb10_a2ui; + public final boolean GL_ARB_texture_stencil8; + public final boolean GL_ARB_texture_storage; + public final boolean GL_ARB_texture_storage_multisample; + public final boolean GL_ARB_texture_swizzle; + public final boolean GL_ARB_texture_view; + public final boolean GL_ARB_timer_query; + public final boolean GL_ARB_transform_feedback2; + public final boolean GL_ARB_transform_feedback3; + public final boolean GL_ARB_transform_feedback_instanced; + public final boolean GL_ARB_transpose_matrix; + public final boolean GL_ARB_uniform_buffer_object; + public final boolean GL_ARB_vertex_array_bgra; + public final boolean GL_ARB_vertex_array_object; + public final boolean GL_ARB_vertex_attrib_64bit; + public final boolean GL_ARB_vertex_attrib_binding; + public final boolean GL_ARB_vertex_blend; + public final boolean GL_ARB_vertex_buffer_object; + public final boolean GL_ARB_vertex_program; + public final boolean GL_ARB_vertex_shader; + public final boolean GL_ARB_vertex_type_10f_11f_11f_rev; + public final boolean GL_ARB_vertex_type_2_10_10_10_rev; + public final boolean GL_ARB_viewport_array; + public final boolean GL_ARB_window_pos; + public final boolean GL_ATI_draw_buffers; + public final boolean GL_ATI_element_array; + public final boolean GL_ATI_envmap_bumpmap; + public final boolean GL_ATI_fragment_shader; + public final boolean GL_ATI_map_object_buffer; + public final boolean GL_ATI_meminfo; + public final boolean GL_ATI_pn_triangles; + public final boolean GL_ATI_separate_stencil; + public final boolean GL_ATI_shader_texture_lod; + public final boolean GL_ATI_text_fragment_shader; + public final boolean GL_ATI_texture_compression_3dc; + public final boolean GL_ATI_texture_env_combine3; + public final boolean GL_ATI_texture_float; + public final boolean GL_ATI_texture_mirror_once; + public final boolean GL_ATI_vertex_array_object; + public final boolean GL_ATI_vertex_attrib_array_object; + public final boolean GL_ATI_vertex_streams; + public final boolean GL_EXT_abgr; + public final boolean GL_EXT_bgra; + public final boolean GL_EXT_bindable_uniform; + public final boolean GL_EXT_blend_color; + public final boolean GL_EXT_blend_equation_separate; + public final boolean GL_EXT_blend_func_separate; + public final boolean GL_EXT_blend_minmax; + public final boolean GL_EXT_blend_subtract; + public final boolean GL_EXT_Cg_shader; + public final boolean GL_EXT_compiled_vertex_array; + public final boolean GL_EXT_depth_bounds_test; + public final boolean GL_EXT_direct_state_access; + public final boolean GL_EXT_draw_buffers2; + public final boolean GL_EXT_draw_instanced; + public final boolean GL_EXT_draw_range_elements; + public final boolean GL_EXT_fog_coord; + public final boolean GL_EXT_framebuffer_blit; + public final boolean GL_EXT_framebuffer_multisample; + public final boolean GL_EXT_framebuffer_multisample_blit_scaled; + public final boolean GL_EXT_framebuffer_object; + public final boolean GL_EXT_framebuffer_sRGB; + public final boolean GL_EXT_geometry_shader4; + public final boolean GL_EXT_gpu_program_parameters; + public final boolean GL_EXT_gpu_shader4; + public final boolean GL_EXT_multi_draw_arrays; + public final boolean GL_EXT_packed_depth_stencil; + public final boolean GL_EXT_packed_float; + public final boolean GL_EXT_packed_pixels; + public final boolean GL_EXT_paletted_texture; + public final boolean GL_EXT_pixel_buffer_object; + public final boolean GL_EXT_point_parameters; + public final boolean GL_EXT_provoking_vertex; + public final boolean GL_EXT_rescale_normal; + public final boolean GL_EXT_secondary_color; + public final boolean GL_EXT_separate_shader_objects; + public final boolean GL_EXT_separate_specular_color; + public final boolean GL_EXT_shader_image_load_store; + public final boolean GL_EXT_shadow_funcs; + public final boolean GL_EXT_shared_texture_palette; + public final boolean GL_EXT_stencil_clear_tag; + public final boolean GL_EXT_stencil_two_side; + public final boolean GL_EXT_stencil_wrap; + public final boolean GL_EXT_texture_3d; + public final boolean GL_EXT_texture_array; + public final boolean GL_EXT_texture_buffer_object; + public final boolean GL_EXT_texture_compression_latc; + public final boolean GL_EXT_texture_compression_rgtc; + public final boolean GL_EXT_texture_compression_s3tc; + public final boolean GL_EXT_texture_env_combine; + public final boolean GL_EXT_texture_env_dot3; + public final boolean GL_EXT_texture_filter_anisotropic; + public final boolean GL_EXT_texture_integer; + public final boolean GL_EXT_texture_lod_bias; + public final boolean GL_EXT_texture_mirror_clamp; + public final boolean GL_EXT_texture_rectangle; + public final boolean GL_EXT_texture_sRGB; + public final boolean GL_EXT_texture_sRGB_decode; + public final boolean GL_EXT_texture_shared_exponent; + public final boolean GL_EXT_texture_snorm; + public final boolean GL_EXT_texture_swizzle; + public final boolean GL_EXT_timer_query; + public final boolean GL_EXT_transform_feedback; + public final boolean GL_EXT_vertex_array_bgra; + public final boolean GL_EXT_vertex_attrib_64bit; + public final boolean GL_EXT_vertex_shader; + public final boolean GL_EXT_vertex_weighting; + public final boolean OpenGL11; + public final boolean OpenGL12; + public final boolean OpenGL13; + public final boolean OpenGL14; + public final boolean OpenGL15; + public final boolean OpenGL20; + public final boolean OpenGL21; + public final boolean OpenGL30; + public final boolean OpenGL31; + public final boolean OpenGL32; + public final boolean OpenGL33; + public final boolean OpenGL40; + public final boolean OpenGL41; + public final boolean OpenGL42; + public final boolean OpenGL43; + public final boolean OpenGL44; + public final boolean GL_GREMEDY_frame_terminator; + public final boolean GL_GREMEDY_string_marker; + public final boolean GL_HP_occlusion_test; + public final boolean GL_IBM_rasterpos_clip; + public final boolean GL_INTEL_map_texture; + public final boolean GL_KHR_debug; + public final boolean GL_KHR_texture_compression_astc_ldr; + public final boolean GL_NVX_gpu_memory_info; + public final boolean GL_NV_bindless_multi_draw_indirect; + public final boolean GL_NV_bindless_texture; + public final boolean GL_NV_blend_equation_advanced; + public final boolean GL_NV_blend_square; + public final boolean GL_NV_compute_program5; + public final boolean GL_NV_conditional_render; + public final boolean GL_NV_copy_depth_to_color; + public final boolean GL_NV_copy_image; + public final boolean GL_NV_deep_texture3D; + public final boolean GL_NV_depth_buffer_float; + public final boolean GL_NV_depth_clamp; + public final boolean GL_NV_draw_texture; + public final boolean GL_NV_evaluators; + public final boolean GL_NV_explicit_multisample; + public final boolean GL_NV_fence; + public final boolean GL_NV_float_buffer; + public final boolean GL_NV_fog_distance; + public final boolean GL_NV_fragment_program; + public final boolean GL_NV_fragment_program2; + public final boolean GL_NV_fragment_program4; + public final boolean GL_NV_fragment_program_option; + public final boolean GL_NV_framebuffer_multisample_coverage; + public final boolean GL_NV_geometry_program4; + public final boolean GL_NV_geometry_shader4; + public final boolean GL_NV_gpu_program4; + public final boolean GL_NV_gpu_program5; + public final boolean GL_NV_gpu_program5_mem_extended; + public final boolean GL_NV_gpu_shader5; + public final boolean GL_NV_half_float; + public final boolean GL_NV_light_max_exponent; + public final boolean GL_NV_multisample_coverage; + public final boolean GL_NV_multisample_filter_hint; + public final boolean GL_NV_occlusion_query; + public final boolean GL_NV_packed_depth_stencil; + public final boolean GL_NV_parameter_buffer_object; + public final boolean GL_NV_parameter_buffer_object2; + public final boolean GL_NV_path_rendering; + public final boolean GL_NV_pixel_data_range; + public final boolean GL_NV_point_sprite; + public final boolean GL_NV_present_video; + public final boolean GL_NV_primitive_restart; + public final boolean GL_NV_register_combiners; + public final boolean GL_NV_register_combiners2; + public final boolean GL_NV_shader_atomic_counters; + public final boolean GL_NV_shader_atomic_float; + public final boolean GL_NV_shader_buffer_load; + public final boolean GL_NV_shader_buffer_store; + public final boolean GL_NV_shader_storage_buffer_object; + public final boolean GL_NV_tessellation_program5; + public final boolean GL_NV_texgen_reflection; + public final boolean GL_NV_texture_barrier; + public final boolean GL_NV_texture_compression_vtc; + public final boolean GL_NV_texture_env_combine4; + public final boolean GL_NV_texture_expand_normal; + public final boolean GL_NV_texture_multisample; + public final boolean GL_NV_texture_rectangle; + public final boolean GL_NV_texture_shader; + public final boolean GL_NV_texture_shader2; + public final boolean GL_NV_texture_shader3; + public final boolean GL_NV_transform_feedback; + public final boolean GL_NV_transform_feedback2; + public final boolean GL_NV_vertex_array_range; + public final boolean GL_NV_vertex_array_range2; + public final boolean GL_NV_vertex_attrib_integer_64bit; + public final boolean GL_NV_vertex_buffer_unified_memory; + public final boolean GL_NV_vertex_program; + public final boolean GL_NV_vertex_program1_1; + public final boolean GL_NV_vertex_program2; + public final boolean GL_NV_vertex_program2_option; + public final boolean GL_NV_vertex_program3; + public final boolean GL_NV_vertex_program4; + public final boolean GL_NV_video_capture; + public final boolean GL_SGIS_generate_mipmap; + public final boolean GL_SGIS_texture_lod; + public final boolean GL_SUN_slice_accum; + + // AMD_debug_output + long glDebugMessageEnableAMD; + long glDebugMessageInsertAMD; + long glDebugMessageCallbackAMD; + long glGetDebugMessageLogAMD; + // AMD_draw_buffers_blend + long glBlendFuncIndexedAMD; + long glBlendFuncSeparateIndexedAMD; + long glBlendEquationIndexedAMD; + long glBlendEquationSeparateIndexedAMD; + // AMD_interleaved_elements + long glVertexAttribParameteriAMD; + // AMD_multi_draw_indirect + long glMultiDrawArraysIndirectAMD; + long glMultiDrawElementsIndirectAMD; + // AMD_name_gen_delete + long glGenNamesAMD; + long glDeleteNamesAMD; + long glIsNameAMD; + // AMD_performance_monitor + long glGetPerfMonitorGroupsAMD; + long glGetPerfMonitorCountersAMD; + long glGetPerfMonitorGroupStringAMD; + long glGetPerfMonitorCounterStringAMD; + long glGetPerfMonitorCounterInfoAMD; + long glGenPerfMonitorsAMD; + long glDeletePerfMonitorsAMD; + long glSelectPerfMonitorCountersAMD; + long glBeginPerfMonitorAMD; + long glEndPerfMonitorAMD; + long glGetPerfMonitorCounterDataAMD; + // AMD_sample_positions + long glSetMultisamplefvAMD; + // AMD_sparse_texture + long glTexStorageSparseAMD; + long glTextureStorageSparseAMD; + // AMD_stencil_operation_extended + long glStencilOpValueAMD; + // AMD_vertex_shader_tessellator + long glTessellationFactorAMD; + long glTessellationModeAMD; + // APPLE_element_array + long glElementPointerAPPLE; + long glDrawElementArrayAPPLE; + long glDrawRangeElementArrayAPPLE; + long glMultiDrawElementArrayAPPLE; + long glMultiDrawRangeElementArrayAPPLE; + // APPLE_fence + long glGenFencesAPPLE; + long glDeleteFencesAPPLE; + long glSetFenceAPPLE; + long glIsFenceAPPLE; + long glTestFenceAPPLE; + long glFinishFenceAPPLE; + long glTestObjectAPPLE; + long glFinishObjectAPPLE; + // APPLE_flush_buffer_range + long glBufferParameteriAPPLE; + long glFlushMappedBufferRangeAPPLE; + // APPLE_object_purgeable + long glObjectPurgeableAPPLE; + long glObjectUnpurgeableAPPLE; + long glGetObjectParameterivAPPLE; + // APPLE_texture_range + long glTextureRangeAPPLE; + long glGetTexParameterPointervAPPLE; + // APPLE_vertex_array_object + long glBindVertexArrayAPPLE; + long glDeleteVertexArraysAPPLE; + long glGenVertexArraysAPPLE; + long glIsVertexArrayAPPLE; + // APPLE_vertex_array_range + long glVertexArrayRangeAPPLE; + long glFlushVertexArrayRangeAPPLE; + long glVertexArrayParameteriAPPLE; + // APPLE_vertex_program_evaluators + long glEnableVertexAttribAPPLE; + long glDisableVertexAttribAPPLE; + long glIsVertexAttribEnabledAPPLE; + long glMapVertexAttrib1dAPPLE; + long glMapVertexAttrib1fAPPLE; + long glMapVertexAttrib2dAPPLE; + long glMapVertexAttrib2fAPPLE; + // ARB_bindless_texture + long glGetTextureHandleARB; + long glGetTextureSamplerHandleARB; + long glMakeTextureHandleResidentARB; + long glMakeTextureHandleNonResidentARB; + long glGetImageHandleARB; + long glMakeImageHandleResidentARB; + long glMakeImageHandleNonResidentARB; + long glUniformHandleui64ARB; + long glUniformHandleui64vARB; + long glProgramUniformHandleui64ARB; + long glProgramUniformHandleui64vARB; + long glIsTextureHandleResidentARB; + long glIsImageHandleResidentARB; + long glVertexAttribL1ui64ARB; + long glVertexAttribL1ui64vARB; + long glGetVertexAttribLui64vARB; + // ARB_buffer_object + long glBindBufferARB; + long glDeleteBuffersARB; + long glGenBuffersARB; + long glIsBufferARB; + long glBufferDataARB; + long glBufferSubDataARB; + long glGetBufferSubDataARB; + long glMapBufferARB; + long glUnmapBufferARB; + long glGetBufferParameterivARB; + long glGetBufferPointervARB; + // ARB_buffer_storage + long glNamedBufferStorageEXT; + // ARB_cl_event + long glCreateSyncFromCLeventARB; + // ARB_clear_buffer_object + long glClearNamedBufferDataEXT; + long glClearNamedBufferSubDataEXT; + // ARB_color_buffer_float + long glClampColorARB; + // ARB_compute_variable_group_size + long glDispatchComputeGroupSizeARB; + // ARB_debug_output + long glDebugMessageControlARB; + long glDebugMessageInsertARB; + long glDebugMessageCallbackARB; + long glGetDebugMessageLogARB; + // ARB_draw_buffers + long glDrawBuffersARB; + // ARB_draw_buffers_blend + long glBlendEquationiARB; + long glBlendEquationSeparateiARB; + long glBlendFunciARB; + long glBlendFuncSeparateiARB; + // ARB_draw_instanced + long glDrawArraysInstancedARB; + long glDrawElementsInstancedARB; + // ARB_framebuffer_no_attachments + long glNamedFramebufferParameteriEXT; + long glGetNamedFramebufferParameterivEXT; + // ARB_geometry_shader4 + long glProgramParameteriARB; + long glFramebufferTextureARB; + long glFramebufferTextureLayerARB; + long glFramebufferTextureFaceARB; + // ARB_gpu_shader_fp64 + long glProgramUniform1dEXT; + long glProgramUniform2dEXT; + long glProgramUniform3dEXT; + long glProgramUniform4dEXT; + long glProgramUniform1dvEXT; + long glProgramUniform2dvEXT; + long glProgramUniform3dvEXT; + long glProgramUniform4dvEXT; + long glProgramUniformMatrix2dvEXT; + long glProgramUniformMatrix3dvEXT; + long glProgramUniformMatrix4dvEXT; + long glProgramUniformMatrix2x3dvEXT; + long glProgramUniformMatrix2x4dvEXT; + long glProgramUniformMatrix3x2dvEXT; + long glProgramUniformMatrix3x4dvEXT; + long glProgramUniformMatrix4x2dvEXT; + long glProgramUniformMatrix4x3dvEXT; + // ARB_imaging + long glColorTable; + long glColorSubTable; + long glColorTableParameteriv; + long glColorTableParameterfv; + long glCopyColorSubTable; + long glCopyColorTable; + long glGetColorTable; + long glGetColorTableParameteriv; + long glGetColorTableParameterfv; + long glHistogram; + long glResetHistogram; + long glGetHistogram; + long glGetHistogramParameterfv; + long glGetHistogramParameteriv; + long glMinmax; + long glResetMinmax; + long glGetMinmax; + long glGetMinmaxParameterfv; + long glGetMinmaxParameteriv; + long glConvolutionFilter1D; + long glConvolutionFilter2D; + long glConvolutionParameterf; + long glConvolutionParameterfv; + long glConvolutionParameteri; + long glConvolutionParameteriv; + long glCopyConvolutionFilter1D; + long glCopyConvolutionFilter2D; + long glGetConvolutionFilter; + long glGetConvolutionParameterfv; + long glGetConvolutionParameteriv; + long glSeparableFilter2D; + long glGetSeparableFilter; + // ARB_indirect_parameters + long glMultiDrawArraysIndirectCountARB; + long glMultiDrawElementsIndirectCountARB; + // ARB_instanced_arrays + long glVertexAttribDivisorARB; + // ARB_matrix_palette + long glCurrentPaletteMatrixARB; + long glMatrixIndexPointerARB; + long glMatrixIndexubvARB; + long glMatrixIndexusvARB; + long glMatrixIndexuivARB; + // ARB_multisample + long glSampleCoverageARB; + // ARB_multitexture + long glClientActiveTextureARB; + long glActiveTextureARB; + long glMultiTexCoord1fARB; + long glMultiTexCoord1dARB; + long glMultiTexCoord1iARB; + long glMultiTexCoord1sARB; + long glMultiTexCoord2fARB; + long glMultiTexCoord2dARB; + long glMultiTexCoord2iARB; + long glMultiTexCoord2sARB; + long glMultiTexCoord3fARB; + long glMultiTexCoord3dARB; + long glMultiTexCoord3iARB; + long glMultiTexCoord3sARB; + long glMultiTexCoord4fARB; + long glMultiTexCoord4dARB; + long glMultiTexCoord4iARB; + long glMultiTexCoord4sARB; + // ARB_occlusion_query + long glGenQueriesARB; + long glDeleteQueriesARB; + long glIsQueryARB; + long glBeginQueryARB; + long glEndQueryARB; + long glGetQueryivARB; + long glGetQueryObjectivARB; + long glGetQueryObjectuivARB; + // ARB_point_parameters + long glPointParameterfARB; + long glPointParameterfvARB; + // ARB_program + long glProgramStringARB; + long glBindProgramARB; + long glDeleteProgramsARB; + long glGenProgramsARB; + long glProgramEnvParameter4fARB; + long glProgramEnvParameter4dARB; + long glProgramEnvParameter4fvARB; + long glProgramEnvParameter4dvARB; + long glProgramLocalParameter4fARB; + long glProgramLocalParameter4dARB; + long glProgramLocalParameter4fvARB; + long glProgramLocalParameter4dvARB; + long glGetProgramEnvParameterfvARB; + long glGetProgramEnvParameterdvARB; + long glGetProgramLocalParameterfvARB; + long glGetProgramLocalParameterdvARB; + long glGetProgramivARB; + long glGetProgramStringARB; + long glIsProgramARB; + // ARB_robustness + long glGetGraphicsResetStatusARB; + long glGetnMapdvARB; + long glGetnMapfvARB; + long glGetnMapivARB; + long glGetnPixelMapfvARB; + long glGetnPixelMapuivARB; + long glGetnPixelMapusvARB; + long glGetnPolygonStippleARB; + long glGetnTexImageARB; + long glReadnPixelsARB; + long glGetnColorTableARB; + long glGetnConvolutionFilterARB; + long glGetnSeparableFilterARB; + long glGetnHistogramARB; + long glGetnMinmaxARB; + long glGetnCompressedTexImageARB; + long glGetnUniformfvARB; + long glGetnUniformivARB; + long glGetnUniformuivARB; + long glGetnUniformdvARB; + // ARB_sample_shading + long glMinSampleShadingARB; + // ARB_shader_objects + long glDeleteObjectARB; + long glGetHandleARB; + long glDetachObjectARB; + long glCreateShaderObjectARB; + long glShaderSourceARB; + long glCompileShaderARB; + long glCreateProgramObjectARB; + long glAttachObjectARB; + long glLinkProgramARB; + long glUseProgramObjectARB; + long glValidateProgramARB; + long glUniform1fARB; + long glUniform2fARB; + long glUniform3fARB; + long glUniform4fARB; + long glUniform1iARB; + long glUniform2iARB; + long glUniform3iARB; + long glUniform4iARB; + long glUniform1fvARB; + long glUniform2fvARB; + long glUniform3fvARB; + long glUniform4fvARB; + long glUniform1ivARB; + long glUniform2ivARB; + long glUniform3ivARB; + long glUniform4ivARB; + long glUniformMatrix2fvARB; + long glUniformMatrix3fvARB; + long glUniformMatrix4fvARB; + long glGetObjectParameterfvARB; + long glGetObjectParameterivARB; + long glGetInfoLogARB; + long glGetAttachedObjectsARB; + long glGetUniformLocationARB; + long glGetActiveUniformARB; + long glGetUniformfvARB; + long glGetUniformivARB; + long glGetShaderSourceARB; + // ARB_shading_language_include + long glNamedStringARB; + long glDeleteNamedStringARB; + long glCompileShaderIncludeARB; + long glIsNamedStringARB; + long glGetNamedStringARB; + long glGetNamedStringivARB; + // ARB_sparse_texture + long glTexPageCommitmentARB; + long glTexturePageCommitmentEXT; + // ARB_texture_buffer_object + long glTexBufferARB; + // ARB_texture_buffer_range + long glTextureBufferRangeEXT; + // ARB_texture_compression + long glCompressedTexImage1DARB; + long glCompressedTexImage2DARB; + long glCompressedTexImage3DARB; + long glCompressedTexSubImage1DARB; + long glCompressedTexSubImage2DARB; + long glCompressedTexSubImage3DARB; + long glGetCompressedTexImageARB; + // ARB_texture_storage + long glTextureStorage1DEXT; + long glTextureStorage2DEXT; + long glTextureStorage3DEXT; + // ARB_texture_storage_multisample + long glTextureStorage2DMultisampleEXT; + long glTextureStorage3DMultisampleEXT; + // ARB_transpose_matrix + long glLoadTransposeMatrixfARB; + long glMultTransposeMatrixfARB; + // ARB_vertex_attrib_64bit + long glVertexArrayVertexAttribLOffsetEXT; + // ARB_vertex_blend + long glWeightbvARB; + long glWeightsvARB; + long glWeightivARB; + long glWeightfvARB; + long glWeightdvARB; + long glWeightubvARB; + long glWeightusvARB; + long glWeightuivARB; + long glWeightPointerARB; + long glVertexBlendARB; + // ARB_vertex_shader + long glVertexAttrib1sARB; + long glVertexAttrib1fARB; + long glVertexAttrib1dARB; + long glVertexAttrib2sARB; + long glVertexAttrib2fARB; + long glVertexAttrib2dARB; + long glVertexAttrib3sARB; + long glVertexAttrib3fARB; + long glVertexAttrib3dARB; + long glVertexAttrib4sARB; + long glVertexAttrib4fARB; + long glVertexAttrib4dARB; + long glVertexAttrib4NubARB; + long glVertexAttribPointerARB; + long glEnableVertexAttribArrayARB; + long glDisableVertexAttribArrayARB; + long glBindAttribLocationARB; + long glGetActiveAttribARB; + long glGetAttribLocationARB; + long glGetVertexAttribfvARB; + long glGetVertexAttribdvARB; + long glGetVertexAttribivARB; + long glGetVertexAttribPointervARB; + // ARB_window_pos + long glWindowPos2fARB; + long glWindowPos2dARB; + long glWindowPos2iARB; + long glWindowPos2sARB; + long glWindowPos3fARB; + long glWindowPos3dARB; + long glWindowPos3iARB; + long glWindowPos3sARB; + // ATI_draw_buffers + long glDrawBuffersATI; + // ATI_element_array + long glElementPointerATI; + long glDrawElementArrayATI; + long glDrawRangeElementArrayATI; + // ATI_envmap_bumpmap + long glTexBumpParameterfvATI; + long glTexBumpParameterivATI; + long glGetTexBumpParameterfvATI; + long glGetTexBumpParameterivATI; + // ATI_fragment_shader + long glGenFragmentShadersATI; + long glBindFragmentShaderATI; + long glDeleteFragmentShaderATI; + long glBeginFragmentShaderATI; + long glEndFragmentShaderATI; + long glPassTexCoordATI; + long glSampleMapATI; + long glColorFragmentOp1ATI; + long glColorFragmentOp2ATI; + long glColorFragmentOp3ATI; + long glAlphaFragmentOp1ATI; + long glAlphaFragmentOp2ATI; + long glAlphaFragmentOp3ATI; + long glSetFragmentShaderConstantATI; + // ATI_map_object_buffer + long glMapObjectBufferATI; + long glUnmapObjectBufferATI; + // ATI_pn_triangles + long glPNTrianglesfATI; + long glPNTrianglesiATI; + // ATI_separate_stencil + long glStencilOpSeparateATI; + long glStencilFuncSeparateATI; + // ATI_vertex_array_object + long glNewObjectBufferATI; + long glIsObjectBufferATI; + long glUpdateObjectBufferATI; + long glGetObjectBufferfvATI; + long glGetObjectBufferivATI; + long glFreeObjectBufferATI; + long glArrayObjectATI; + long glGetArrayObjectfvATI; + long glGetArrayObjectivATI; + long glVariantArrayObjectATI; + long glGetVariantArrayObjectfvATI; + long glGetVariantArrayObjectivATI; + // ATI_vertex_attrib_array_object + long glVertexAttribArrayObjectATI; + long glGetVertexAttribArrayObjectfvATI; + long glGetVertexAttribArrayObjectivATI; + // ATI_vertex_streams + long glVertexStream2fATI; + long glVertexStream2dATI; + long glVertexStream2iATI; + long glVertexStream2sATI; + long glVertexStream3fATI; + long glVertexStream3dATI; + long glVertexStream3iATI; + long glVertexStream3sATI; + long glVertexStream4fATI; + long glVertexStream4dATI; + long glVertexStream4iATI; + long glVertexStream4sATI; + long glNormalStream3bATI; + long glNormalStream3fATI; + long glNormalStream3dATI; + long glNormalStream3iATI; + long glNormalStream3sATI; + long glClientActiveVertexStreamATI; + long glVertexBlendEnvfATI; + long glVertexBlendEnviATI; + // EXT_bindable_uniform + long glUniformBufferEXT; + long glGetUniformBufferSizeEXT; + long glGetUniformOffsetEXT; + // EXT_blend_color + long glBlendColorEXT; + // EXT_blend_equation_separate + long glBlendEquationSeparateEXT; + // EXT_blend_func_separate + long glBlendFuncSeparateEXT; + // EXT_blend_minmax + long glBlendEquationEXT; + // EXT_compiled_vertex_array + long glLockArraysEXT; + long glUnlockArraysEXT; + // EXT_depth_bounds_test + long glDepthBoundsEXT; + // EXT_direct_state_access + long glClientAttribDefaultEXT; + long glPushClientAttribDefaultEXT; + long glMatrixLoadfEXT; + long glMatrixLoaddEXT; + long glMatrixMultfEXT; + long glMatrixMultdEXT; + long glMatrixLoadIdentityEXT; + long glMatrixRotatefEXT; + long glMatrixRotatedEXT; + long glMatrixScalefEXT; + long glMatrixScaledEXT; + long glMatrixTranslatefEXT; + long glMatrixTranslatedEXT; + long glMatrixOrthoEXT; + long glMatrixFrustumEXT; + long glMatrixPushEXT; + long glMatrixPopEXT; + long glTextureParameteriEXT; + long glTextureParameterivEXT; + long glTextureParameterfEXT; + long glTextureParameterfvEXT; + long glTextureImage1DEXT; + long glTextureImage2DEXT; + long glTextureSubImage1DEXT; + long glTextureSubImage2DEXT; + long glCopyTextureImage1DEXT; + long glCopyTextureImage2DEXT; + long glCopyTextureSubImage1DEXT; + long glCopyTextureSubImage2DEXT; + long glGetTextureImageEXT; + long glGetTextureParameterfvEXT; + long glGetTextureParameterivEXT; + long glGetTextureLevelParameterfvEXT; + long glGetTextureLevelParameterivEXT; + long glTextureImage3DEXT; + long glTextureSubImage3DEXT; + long glCopyTextureSubImage3DEXT; + long glBindMultiTextureEXT; + long glMultiTexCoordPointerEXT; + long glMultiTexEnvfEXT; + long glMultiTexEnvfvEXT; + long glMultiTexEnviEXT; + long glMultiTexEnvivEXT; + long glMultiTexGendEXT; + long glMultiTexGendvEXT; + long glMultiTexGenfEXT; + long glMultiTexGenfvEXT; + long glMultiTexGeniEXT; + long glMultiTexGenivEXT; + long glGetMultiTexEnvfvEXT; + long glGetMultiTexEnvivEXT; + long glGetMultiTexGendvEXT; + long glGetMultiTexGenfvEXT; + long glGetMultiTexGenivEXT; + long glMultiTexParameteriEXT; + long glMultiTexParameterivEXT; + long glMultiTexParameterfEXT; + long glMultiTexParameterfvEXT; + long glMultiTexImage1DEXT; + long glMultiTexImage2DEXT; + long glMultiTexSubImage1DEXT; + long glMultiTexSubImage2DEXT; + long glCopyMultiTexImage1DEXT; + long glCopyMultiTexImage2DEXT; + long glCopyMultiTexSubImage1DEXT; + long glCopyMultiTexSubImage2DEXT; + long glGetMultiTexImageEXT; + long glGetMultiTexParameterfvEXT; + long glGetMultiTexParameterivEXT; + long glGetMultiTexLevelParameterfvEXT; + long glGetMultiTexLevelParameterivEXT; + long glMultiTexImage3DEXT; + long glMultiTexSubImage3DEXT; + long glCopyMultiTexSubImage3DEXT; + long glEnableClientStateIndexedEXT; + long glDisableClientStateIndexedEXT; + long glEnableClientStateiEXT; + long glDisableClientStateiEXT; + long glGetFloatIndexedvEXT; + long glGetDoubleIndexedvEXT; + long glGetPointerIndexedvEXT; + long glGetFloati_vEXT; + long glGetDoublei_vEXT; + long glGetPointeri_vEXT; + long glNamedProgramStringEXT; + long glNamedProgramLocalParameter4dEXT; + long glNamedProgramLocalParameter4dvEXT; + long glNamedProgramLocalParameter4fEXT; + long glNamedProgramLocalParameter4fvEXT; + long glGetNamedProgramLocalParameterdvEXT; + long glGetNamedProgramLocalParameterfvEXT; + long glGetNamedProgramivEXT; + long glGetNamedProgramStringEXT; + long glCompressedTextureImage3DEXT; + long glCompressedTextureImage2DEXT; + long glCompressedTextureImage1DEXT; + long glCompressedTextureSubImage3DEXT; + long glCompressedTextureSubImage2DEXT; + long glCompressedTextureSubImage1DEXT; + long glGetCompressedTextureImageEXT; + long glCompressedMultiTexImage3DEXT; + long glCompressedMultiTexImage2DEXT; + long glCompressedMultiTexImage1DEXT; + long glCompressedMultiTexSubImage3DEXT; + long glCompressedMultiTexSubImage2DEXT; + long glCompressedMultiTexSubImage1DEXT; + long glGetCompressedMultiTexImageEXT; + long glMatrixLoadTransposefEXT; + long glMatrixLoadTransposedEXT; + long glMatrixMultTransposefEXT; + long glMatrixMultTransposedEXT; + long glNamedBufferDataEXT; + long glNamedBufferSubDataEXT; + long glMapNamedBufferEXT; + long glUnmapNamedBufferEXT; + long glGetNamedBufferParameterivEXT; + long glGetNamedBufferPointervEXT; + long glGetNamedBufferSubDataEXT; + long glProgramUniform1fEXT; + long glProgramUniform2fEXT; + long glProgramUniform3fEXT; + long glProgramUniform4fEXT; + long glProgramUniform1iEXT; + long glProgramUniform2iEXT; + long glProgramUniform3iEXT; + long glProgramUniform4iEXT; + long glProgramUniform1fvEXT; + long glProgramUniform2fvEXT; + long glProgramUniform3fvEXT; + long glProgramUniform4fvEXT; + long glProgramUniform1ivEXT; + long glProgramUniform2ivEXT; + long glProgramUniform3ivEXT; + long glProgramUniform4ivEXT; + long glProgramUniformMatrix2fvEXT; + long glProgramUniformMatrix3fvEXT; + long glProgramUniformMatrix4fvEXT; + long glProgramUniformMatrix2x3fvEXT; + long glProgramUniformMatrix3x2fvEXT; + long glProgramUniformMatrix2x4fvEXT; + long glProgramUniformMatrix4x2fvEXT; + long glProgramUniformMatrix3x4fvEXT; + long glProgramUniformMatrix4x3fvEXT; + long glTextureBufferEXT; + long glMultiTexBufferEXT; + long glTextureParameterIivEXT; + long glTextureParameterIuivEXT; + long glGetTextureParameterIivEXT; + long glGetTextureParameterIuivEXT; + long glMultiTexParameterIivEXT; + long glMultiTexParameterIuivEXT; + long glGetMultiTexParameterIivEXT; + long glGetMultiTexParameterIuivEXT; + long glProgramUniform1uiEXT; + long glProgramUniform2uiEXT; + long glProgramUniform3uiEXT; + long glProgramUniform4uiEXT; + long glProgramUniform1uivEXT; + long glProgramUniform2uivEXT; + long glProgramUniform3uivEXT; + long glProgramUniform4uivEXT; + long glNamedProgramLocalParameters4fvEXT; + long glNamedProgramLocalParameterI4iEXT; + long glNamedProgramLocalParameterI4ivEXT; + long glNamedProgramLocalParametersI4ivEXT; + long glNamedProgramLocalParameterI4uiEXT; + long glNamedProgramLocalParameterI4uivEXT; + long glNamedProgramLocalParametersI4uivEXT; + long glGetNamedProgramLocalParameterIivEXT; + long glGetNamedProgramLocalParameterIuivEXT; + long glNamedRenderbufferStorageEXT; + long glGetNamedRenderbufferParameterivEXT; + long glNamedRenderbufferStorageMultisampleEXT; + long glNamedRenderbufferStorageMultisampleCoverageEXT; + long glCheckNamedFramebufferStatusEXT; + long glNamedFramebufferTexture1DEXT; + long glNamedFramebufferTexture2DEXT; + long glNamedFramebufferTexture3DEXT; + long glNamedFramebufferRenderbufferEXT; + long glGetNamedFramebufferAttachmentParameterivEXT; + long glGenerateTextureMipmapEXT; + long glGenerateMultiTexMipmapEXT; + long glFramebufferDrawBufferEXT; + long glFramebufferDrawBuffersEXT; + long glFramebufferReadBufferEXT; + long glGetFramebufferParameterivEXT; + long glNamedCopyBufferSubDataEXT; + long glNamedFramebufferTextureEXT; + long glNamedFramebufferTextureLayerEXT; + long glNamedFramebufferTextureFaceEXT; + long glTextureRenderbufferEXT; + long glMultiTexRenderbufferEXT; + long glVertexArrayVertexOffsetEXT; + long glVertexArrayColorOffsetEXT; + long glVertexArrayEdgeFlagOffsetEXT; + long glVertexArrayIndexOffsetEXT; + long glVertexArrayNormalOffsetEXT; + long glVertexArrayTexCoordOffsetEXT; + long glVertexArrayMultiTexCoordOffsetEXT; + long glVertexArrayFogCoordOffsetEXT; + long glVertexArraySecondaryColorOffsetEXT; + long glVertexArrayVertexAttribOffsetEXT; + long glVertexArrayVertexAttribIOffsetEXT; + long glEnableVertexArrayEXT; + long glDisableVertexArrayEXT; + long glEnableVertexArrayAttribEXT; + long glDisableVertexArrayAttribEXT; + long glGetVertexArrayIntegervEXT; + long glGetVertexArrayPointervEXT; + long glGetVertexArrayIntegeri_vEXT; + long glGetVertexArrayPointeri_vEXT; + long glMapNamedBufferRangeEXT; + long glFlushMappedNamedBufferRangeEXT; + // EXT_draw_buffers2 + long glColorMaskIndexedEXT; + long glGetBooleanIndexedvEXT; + long glGetIntegerIndexedvEXT; + long glEnableIndexedEXT; + long glDisableIndexedEXT; + long glIsEnabledIndexedEXT; + // EXT_draw_instanced + long glDrawArraysInstancedEXT; + long glDrawElementsInstancedEXT; + // EXT_draw_range_elements + long glDrawRangeElementsEXT; + // EXT_fog_coord + long glFogCoordfEXT; + long glFogCoorddEXT; + long glFogCoordPointerEXT; + // EXT_framebuffer_blit + long glBlitFramebufferEXT; + // EXT_framebuffer_multisample + long glRenderbufferStorageMultisampleEXT; + // EXT_framebuffer_object + long glIsRenderbufferEXT; + long glBindRenderbufferEXT; + long glDeleteRenderbuffersEXT; + long glGenRenderbuffersEXT; + long glRenderbufferStorageEXT; + long glGetRenderbufferParameterivEXT; + long glIsFramebufferEXT; + long glBindFramebufferEXT; + long glDeleteFramebuffersEXT; + long glGenFramebuffersEXT; + long glCheckFramebufferStatusEXT; + long glFramebufferTexture1DEXT; + long glFramebufferTexture2DEXT; + long glFramebufferTexture3DEXT; + long glFramebufferRenderbufferEXT; + long glGetFramebufferAttachmentParameterivEXT; + long glGenerateMipmapEXT; + // EXT_geometry_shader4 + long glProgramParameteriEXT; + long glFramebufferTextureEXT; + long glFramebufferTextureLayerEXT; + long glFramebufferTextureFaceEXT; + // EXT_gpu_program_parameters + long glProgramEnvParameters4fvEXT; + long glProgramLocalParameters4fvEXT; + // EXT_gpu_shader4 + long glVertexAttribI1iEXT; + long glVertexAttribI2iEXT; + long glVertexAttribI3iEXT; + long glVertexAttribI4iEXT; + long glVertexAttribI1uiEXT; + long glVertexAttribI2uiEXT; + long glVertexAttribI3uiEXT; + long glVertexAttribI4uiEXT; + long glVertexAttribI1ivEXT; + long glVertexAttribI2ivEXT; + long glVertexAttribI3ivEXT; + long glVertexAttribI4ivEXT; + long glVertexAttribI1uivEXT; + long glVertexAttribI2uivEXT; + long glVertexAttribI3uivEXT; + long glVertexAttribI4uivEXT; + long glVertexAttribI4bvEXT; + long glVertexAttribI4svEXT; + long glVertexAttribI4ubvEXT; + long glVertexAttribI4usvEXT; + long glVertexAttribIPointerEXT; + long glGetVertexAttribIivEXT; + long glGetVertexAttribIuivEXT; + long glUniform1uiEXT; + long glUniform2uiEXT; + long glUniform3uiEXT; + long glUniform4uiEXT; + long glUniform1uivEXT; + long glUniform2uivEXT; + long glUniform3uivEXT; + long glUniform4uivEXT; + long glGetUniformuivEXT; + long glBindFragDataLocationEXT; + long glGetFragDataLocationEXT; + // EXT_multi_draw_arrays + long glMultiDrawArraysEXT; + // EXT_paletted_texture + long glColorTableEXT; + long glColorSubTableEXT; + long glGetColorTableEXT; + long glGetColorTableParameterivEXT; + long glGetColorTableParameterfvEXT; + // EXT_point_parameters + long glPointParameterfEXT; + long glPointParameterfvEXT; + // EXT_provoking_vertex + long glProvokingVertexEXT; + // EXT_secondary_color + long glSecondaryColor3bEXT; + long glSecondaryColor3fEXT; + long glSecondaryColor3dEXT; + long glSecondaryColor3ubEXT; + long glSecondaryColorPointerEXT; + // EXT_separate_shader_objects + long glUseShaderProgramEXT; + long glActiveProgramEXT; + long glCreateShaderProgramEXT; + // EXT_shader_image_load_store + long glBindImageTextureEXT; + long glMemoryBarrierEXT; + // EXT_stencil_clear_tag + long glStencilClearTagEXT; + // EXT_stencil_two_side + long glActiveStencilFaceEXT; + // EXT_texture_buffer_object + long glTexBufferEXT; + // EXT_texture_integer + long glClearColorIiEXT; + long glClearColorIuiEXT; + long glTexParameterIivEXT; + long glTexParameterIuivEXT; + long glGetTexParameterIivEXT; + long glGetTexParameterIuivEXT; + // EXT_timer_query + long glGetQueryObjecti64vEXT; + long glGetQueryObjectui64vEXT; + // EXT_transform_feedback + long glBindBufferRangeEXT; + long glBindBufferOffsetEXT; + long glBindBufferBaseEXT; + long glBeginTransformFeedbackEXT; + long glEndTransformFeedbackEXT; + long glTransformFeedbackVaryingsEXT; + long glGetTransformFeedbackVaryingEXT; + // EXT_vertex_attrib_64bit + long glVertexAttribL1dEXT; + long glVertexAttribL2dEXT; + long glVertexAttribL3dEXT; + long glVertexAttribL4dEXT; + long glVertexAttribL1dvEXT; + long glVertexAttribL2dvEXT; + long glVertexAttribL3dvEXT; + long glVertexAttribL4dvEXT; + long glVertexAttribLPointerEXT; + long glGetVertexAttribLdvEXT; + // EXT_vertex_shader + long glBeginVertexShaderEXT; + long glEndVertexShaderEXT; + long glBindVertexShaderEXT; + long glGenVertexShadersEXT; + long glDeleteVertexShaderEXT; + long glShaderOp1EXT; + long glShaderOp2EXT; + long glShaderOp3EXT; + long glSwizzleEXT; + long glWriteMaskEXT; + long glInsertComponentEXT; + long glExtractComponentEXT; + long glGenSymbolsEXT; + long glSetInvariantEXT; + long glSetLocalConstantEXT; + long glVariantbvEXT; + long glVariantsvEXT; + long glVariantivEXT; + long glVariantfvEXT; + long glVariantdvEXT; + long glVariantubvEXT; + long glVariantusvEXT; + long glVariantuivEXT; + long glVariantPointerEXT; + long glEnableVariantClientStateEXT; + long glDisableVariantClientStateEXT; + long glBindLightParameterEXT; + long glBindMaterialParameterEXT; + long glBindTexGenParameterEXT; + long glBindTextureUnitParameterEXT; + long glBindParameterEXT; + long glIsVariantEnabledEXT; + long glGetVariantBooleanvEXT; + long glGetVariantIntegervEXT; + long glGetVariantFloatvEXT; + long glGetVariantPointervEXT; + long glGetInvariantBooleanvEXT; + long glGetInvariantIntegervEXT; + long glGetInvariantFloatvEXT; + long glGetLocalConstantBooleanvEXT; + long glGetLocalConstantIntegervEXT; + long glGetLocalConstantFloatvEXT; + // EXT_vertex_weighting + long glVertexWeightfEXT; + long glVertexWeightPointerEXT; + // GL11 + long glAccum; + long glAlphaFunc; + long glClearColor; + long glClearAccum; + long glClear; + long glCallLists; + long glCallList; + long glBlendFunc; + long glBitmap; + long glBindTexture; + long glPrioritizeTextures; + long glAreTexturesResident; + long glBegin; + long glEnd; + long glArrayElement; + long glClearDepth; + long glDeleteLists; + long glDeleteTextures; + long glCullFace; + long glCopyTexSubImage2D; + long glCopyTexSubImage1D; + long glCopyTexImage2D; + long glCopyTexImage1D; + long glCopyPixels; + long glColorPointer; + long glColorMaterial; + long glColorMask; + long glColor3b; + long glColor3f; + long glColor3d; + long glColor3ub; + long glColor4b; + long glColor4f; + long glColor4d; + long glColor4ub; + long glClipPlane; + long glClearStencil; + long glEvalPoint1; + long glEvalPoint2; + long glEvalMesh1; + long glEvalMesh2; + long glEvalCoord1f; + long glEvalCoord1d; + long glEvalCoord2f; + long glEvalCoord2d; + long glEnableClientState; + long glDisableClientState; + long glEnable; + long glDisable; + long glEdgeFlagPointer; + long glEdgeFlag; + long glDrawPixels; + long glDrawElements; + long glDrawBuffer; + long glDrawArrays; + long glDepthRange; + long glDepthMask; + long glDepthFunc; + long glFeedbackBuffer; + long glGetPixelMapfv; + long glGetPixelMapuiv; + long glGetPixelMapusv; + long glGetMaterialfv; + long glGetMaterialiv; + long glGetMapfv; + long glGetMapdv; + long glGetMapiv; + long glGetLightfv; + long glGetLightiv; + long glGetError; + long glGetClipPlane; + long glGetBooleanv; + long glGetDoublev; + long glGetFloatv; + long glGetIntegerv; + long glGenTextures; + long glGenLists; + long glFrustum; + long glFrontFace; + long glFogf; + long glFogi; + long glFogfv; + long glFogiv; + long glFlush; + long glFinish; + long glGetPointerv; + long glIsEnabled; + long glInterleavedArrays; + long glInitNames; + long glHint; + long glGetTexParameterfv; + long glGetTexParameteriv; + long glGetTexLevelParameterfv; + long glGetTexLevelParameteriv; + long glGetTexImage; + long glGetTexGeniv; + long glGetTexGenfv; + long glGetTexGendv; + long glGetTexEnviv; + long glGetTexEnvfv; + long glGetString; + long glGetPolygonStipple; + long glIsList; + long glMaterialf; + long glMateriali; + long glMaterialfv; + long glMaterialiv; + long glMapGrid1f; + long glMapGrid1d; + long glMapGrid2f; + long glMapGrid2d; + long glMap2f; + long glMap2d; + long glMap1f; + long glMap1d; + long glLogicOp; + long glLoadName; + long glLoadMatrixf; + long glLoadMatrixd; + long glLoadIdentity; + long glListBase; + long glLineWidth; + long glLineStipple; + long glLightModelf; + long glLightModeli; + long glLightModelfv; + long glLightModeliv; + long glLightf; + long glLighti; + long glLightfv; + long glLightiv; + long glIsTexture; + long glMatrixMode; + long glPolygonStipple; + long glPolygonOffset; + long glPolygonMode; + long glPointSize; + long glPixelZoom; + long glPixelTransferf; + long glPixelTransferi; + long glPixelStoref; + long glPixelStorei; + long glPixelMapfv; + long glPixelMapuiv; + long glPixelMapusv; + long glPassThrough; + long glOrtho; + long glNormalPointer; + long glNormal3b; + long glNormal3f; + long glNormal3d; + long glNormal3i; + long glNewList; + long glEndList; + long glMultMatrixf; + long glMultMatrixd; + long glShadeModel; + long glSelectBuffer; + long glScissor; + long glScalef; + long glScaled; + long glRotatef; + long glRotated; + long glRenderMode; + long glRectf; + long glRectd; + long glRecti; + long glReadPixels; + long glReadBuffer; + long glRasterPos2f; + long glRasterPos2d; + long glRasterPos2i; + long glRasterPos3f; + long glRasterPos3d; + long glRasterPos3i; + long glRasterPos4f; + long glRasterPos4d; + long glRasterPos4i; + long glPushName; + long glPopName; + long glPushMatrix; + long glPopMatrix; + long glPushClientAttrib; + long glPopClientAttrib; + long glPushAttrib; + long glPopAttrib; + long glStencilFunc; + long glVertexPointer; + long glVertex2f; + long glVertex2d; + long glVertex2i; + long glVertex3f; + long glVertex3d; + long glVertex3i; + long glVertex4f; + long glVertex4d; + long glVertex4i; + long glTranslatef; + long glTranslated; + long glTexImage1D; + long glTexImage2D; + long glTexSubImage1D; + long glTexSubImage2D; + long glTexParameterf; + long glTexParameteri; + long glTexParameterfv; + long glTexParameteriv; + long glTexGenf; + long glTexGend; + long glTexGenfv; + long glTexGendv; + long glTexGeni; + long glTexGeniv; + long glTexEnvf; + long glTexEnvi; + long glTexEnvfv; + long glTexEnviv; + long glTexCoordPointer; + long glTexCoord1f; + long glTexCoord1d; + long glTexCoord2f; + long glTexCoord2d; + long glTexCoord3f; + long glTexCoord3d; + long glTexCoord4f; + long glTexCoord4d; + long glStencilOp; + long glStencilMask; + long glViewport; + // GL12 + long glDrawRangeElements; + long glTexImage3D; + long glTexSubImage3D; + long glCopyTexSubImage3D; + // GL13 + long glActiveTexture; + long glClientActiveTexture; + long glCompressedTexImage1D; + long glCompressedTexImage2D; + long glCompressedTexImage3D; + long glCompressedTexSubImage1D; + long glCompressedTexSubImage2D; + long glCompressedTexSubImage3D; + long glGetCompressedTexImage; + long glMultiTexCoord1f; + long glMultiTexCoord1d; + long glMultiTexCoord2f; + long glMultiTexCoord2d; + long glMultiTexCoord3f; + long glMultiTexCoord3d; + long glMultiTexCoord4f; + long glMultiTexCoord4d; + long glLoadTransposeMatrixf; + long glLoadTransposeMatrixd; + long glMultTransposeMatrixf; + long glMultTransposeMatrixd; + long glSampleCoverage; + // GL14 + long glBlendEquation; + long glBlendColor; + long glFogCoordf; + long glFogCoordd; + long glFogCoordPointer; + long glMultiDrawArrays; + long glPointParameteri; + long glPointParameterf; + long glPointParameteriv; + long glPointParameterfv; + long glSecondaryColor3b; + long glSecondaryColor3f; + long glSecondaryColor3d; + long glSecondaryColor3ub; + long glSecondaryColorPointer; + long glBlendFuncSeparate; + long glWindowPos2f; + long glWindowPos2d; + long glWindowPos2i; + long glWindowPos3f; + long glWindowPos3d; + long glWindowPos3i; + // GL15 + long glBindBuffer; + long glDeleteBuffers; + long glGenBuffers; + long glIsBuffer; + long glBufferData; + long glBufferSubData; + long glGetBufferSubData; + long glMapBuffer; + long glUnmapBuffer; + long glGetBufferParameteriv; + long glGetBufferPointerv; + long glGenQueries; + long glDeleteQueries; + long glIsQuery; + long glBeginQuery; + long glEndQuery; + long glGetQueryiv; + long glGetQueryObjectiv; + long glGetQueryObjectuiv; + // GL20 + long glShaderSource; + long glCreateShader; + long glIsShader; + long glCompileShader; + long glDeleteShader; + long glCreateProgram; + long glIsProgram; + long glAttachShader; + long glDetachShader; + long glLinkProgram; + long glUseProgram; + long glValidateProgram; + long glDeleteProgram; + long glUniform1f; + long glUniform2f; + long glUniform3f; + long glUniform4f; + long glUniform1i; + long glUniform2i; + long glUniform3i; + long glUniform4i; + long glUniform1fv; + long glUniform2fv; + long glUniform3fv; + long glUniform4fv; + long glUniform1iv; + long glUniform2iv; + long glUniform3iv; + long glUniform4iv; + long glUniformMatrix2fv; + long glUniformMatrix3fv; + long glUniformMatrix4fv; + long glGetShaderiv; + long glGetProgramiv; + long glGetShaderInfoLog; + long glGetProgramInfoLog; + long glGetAttachedShaders; + long glGetUniformLocation; + long glGetActiveUniform; + long glGetUniformfv; + long glGetUniformiv; + long glGetShaderSource; + long glVertexAttrib1s; + long glVertexAttrib1f; + long glVertexAttrib1d; + long glVertexAttrib2s; + long glVertexAttrib2f; + long glVertexAttrib2d; + long glVertexAttrib3s; + long glVertexAttrib3f; + long glVertexAttrib3d; + long glVertexAttrib4s; + long glVertexAttrib4f; + long glVertexAttrib4d; + long glVertexAttrib4Nub; + long glVertexAttribPointer; + long glEnableVertexAttribArray; + long glDisableVertexAttribArray; + long glGetVertexAttribfv; + long glGetVertexAttribdv; + long glGetVertexAttribiv; + long glGetVertexAttribPointerv; + long glBindAttribLocation; + long glGetActiveAttrib; + long glGetAttribLocation; + long glDrawBuffers; + long glStencilOpSeparate; + long glStencilFuncSeparate; + long glStencilMaskSeparate; + long glBlendEquationSeparate; + // GL21 + long glUniformMatrix2x3fv; + long glUniformMatrix3x2fv; + long glUniformMatrix2x4fv; + long glUniformMatrix4x2fv; + long glUniformMatrix3x4fv; + long glUniformMatrix4x3fv; + // GL30 + long glGetStringi; + long glClearBufferfv; + long glClearBufferiv; + long glClearBufferuiv; + long glClearBufferfi; + long glVertexAttribI1i; + long glVertexAttribI2i; + long glVertexAttribI3i; + long glVertexAttribI4i; + long glVertexAttribI1ui; + long glVertexAttribI2ui; + long glVertexAttribI3ui; + long glVertexAttribI4ui; + long glVertexAttribI1iv; + long glVertexAttribI2iv; + long glVertexAttribI3iv; + long glVertexAttribI4iv; + long glVertexAttribI1uiv; + long glVertexAttribI2uiv; + long glVertexAttribI3uiv; + long glVertexAttribI4uiv; + long glVertexAttribI4bv; + long glVertexAttribI4sv; + long glVertexAttribI4ubv; + long glVertexAttribI4usv; + long glVertexAttribIPointer; + long glGetVertexAttribIiv; + long glGetVertexAttribIuiv; + long glUniform1ui; + long glUniform2ui; + long glUniform3ui; + long glUniform4ui; + long glUniform1uiv; + long glUniform2uiv; + long glUniform3uiv; + long glUniform4uiv; + long glGetUniformuiv; + long glBindFragDataLocation; + long glGetFragDataLocation; + long glBeginConditionalRender; + long glEndConditionalRender; + long glMapBufferRange; + long glFlushMappedBufferRange; + long glClampColor; + long glIsRenderbuffer; + long glBindRenderbuffer; + long glDeleteRenderbuffers; + long glGenRenderbuffers; + long glRenderbufferStorage; + long glGetRenderbufferParameteriv; + long glIsFramebuffer; + long glBindFramebuffer; + long glDeleteFramebuffers; + long glGenFramebuffers; + long glCheckFramebufferStatus; + long glFramebufferTexture1D; + long glFramebufferTexture2D; + long glFramebufferTexture3D; + long glFramebufferRenderbuffer; + long glGetFramebufferAttachmentParameteriv; + long glGenerateMipmap; + long glRenderbufferStorageMultisample; + long glBlitFramebuffer; + long glTexParameterIiv; + long glTexParameterIuiv; + long glGetTexParameterIiv; + long glGetTexParameterIuiv; + long glFramebufferTextureLayer; + long glColorMaski; + long glGetBooleani_v; + long glGetIntegeri_v; + long glEnablei; + long glDisablei; + long glIsEnabledi; + long glBindBufferRange; + long glBindBufferBase; + long glBeginTransformFeedback; + long glEndTransformFeedback; + long glTransformFeedbackVaryings; + long glGetTransformFeedbackVarying; + long glBindVertexArray; + long glDeleteVertexArrays; + long glGenVertexArrays; + long glIsVertexArray; + // GL31 + long glDrawArraysInstanced; + long glDrawElementsInstanced; + long glCopyBufferSubData; + long glPrimitiveRestartIndex; + long glTexBuffer; + long glGetUniformIndices; + long glGetActiveUniformsiv; + long glGetActiveUniformName; + long glGetUniformBlockIndex; + long glGetActiveUniformBlockiv; + long glGetActiveUniformBlockName; + long glUniformBlockBinding; + // GL32 + long glGetBufferParameteri64v; + long glDrawElementsBaseVertex; + long glDrawRangeElementsBaseVertex; + long glDrawElementsInstancedBaseVertex; + long glProvokingVertex; + long glTexImage2DMultisample; + long glTexImage3DMultisample; + long glGetMultisamplefv; + long glSampleMaski; + long glFramebufferTexture; + long glFenceSync; + long glIsSync; + long glDeleteSync; + long glClientWaitSync; + long glWaitSync; + long glGetInteger64v; + long glGetInteger64i_v; + long glGetSynciv; + // GL33 + long glBindFragDataLocationIndexed; + long glGetFragDataIndex; + long glGenSamplers; + long glDeleteSamplers; + long glIsSampler; + long glBindSampler; + long glSamplerParameteri; + long glSamplerParameterf; + long glSamplerParameteriv; + long glSamplerParameterfv; + long glSamplerParameterIiv; + long glSamplerParameterIuiv; + long glGetSamplerParameteriv; + long glGetSamplerParameterfv; + long glGetSamplerParameterIiv; + long glGetSamplerParameterIuiv; + long glQueryCounter; + long glGetQueryObjecti64v; + long glGetQueryObjectui64v; + long glVertexAttribDivisor; + long glVertexP2ui; + long glVertexP3ui; + long glVertexP4ui; + long glVertexP2uiv; + long glVertexP3uiv; + long glVertexP4uiv; + long glTexCoordP1ui; + long glTexCoordP2ui; + long glTexCoordP3ui; + long glTexCoordP4ui; + long glTexCoordP1uiv; + long glTexCoordP2uiv; + long glTexCoordP3uiv; + long glTexCoordP4uiv; + long glMultiTexCoordP1ui; + long glMultiTexCoordP2ui; + long glMultiTexCoordP3ui; + long glMultiTexCoordP4ui; + long glMultiTexCoordP1uiv; + long glMultiTexCoordP2uiv; + long glMultiTexCoordP3uiv; + long glMultiTexCoordP4uiv; + long glNormalP3ui; + long glNormalP3uiv; + long glColorP3ui; + long glColorP4ui; + long glColorP3uiv; + long glColorP4uiv; + long glSecondaryColorP3ui; + long glSecondaryColorP3uiv; + long glVertexAttribP1ui; + long glVertexAttribP2ui; + long glVertexAttribP3ui; + long glVertexAttribP4ui; + long glVertexAttribP1uiv; + long glVertexAttribP2uiv; + long glVertexAttribP3uiv; + long glVertexAttribP4uiv; + // GL40 + long glBlendEquationi; + long glBlendEquationSeparatei; + long glBlendFunci; + long glBlendFuncSeparatei; + long glDrawArraysIndirect; + long glDrawElementsIndirect; + long glUniform1d; + long glUniform2d; + long glUniform3d; + long glUniform4d; + long glUniform1dv; + long glUniform2dv; + long glUniform3dv; + long glUniform4dv; + long glUniformMatrix2dv; + long glUniformMatrix3dv; + long glUniformMatrix4dv; + long glUniformMatrix2x3dv; + long glUniformMatrix2x4dv; + long glUniformMatrix3x2dv; + long glUniformMatrix3x4dv; + long glUniformMatrix4x2dv; + long glUniformMatrix4x3dv; + long glGetUniformdv; + long glMinSampleShading; + long glGetSubroutineUniformLocation; + long glGetSubroutineIndex; + long glGetActiveSubroutineUniformiv; + long glGetActiveSubroutineUniformName; + long glGetActiveSubroutineName; + long glUniformSubroutinesuiv; + long glGetUniformSubroutineuiv; + long glGetProgramStageiv; + long glPatchParameteri; + long glPatchParameterfv; + long glBindTransformFeedback; + long glDeleteTransformFeedbacks; + long glGenTransformFeedbacks; + long glIsTransformFeedback; + long glPauseTransformFeedback; + long glResumeTransformFeedback; + long glDrawTransformFeedback; + long glDrawTransformFeedbackStream; + long glBeginQueryIndexed; + long glEndQueryIndexed; + long glGetQueryIndexediv; + // GL41 + long glReleaseShaderCompiler; + long glShaderBinary; + long glGetShaderPrecisionFormat; + long glDepthRangef; + long glClearDepthf; + long glGetProgramBinary; + long glProgramBinary; + long glProgramParameteri; + long glUseProgramStages; + long glActiveShaderProgram; + long glCreateShaderProgramv; + long glBindProgramPipeline; + long glDeleteProgramPipelines; + long glGenProgramPipelines; + long glIsProgramPipeline; + long glGetProgramPipelineiv; + long glProgramUniform1i; + long glProgramUniform2i; + long glProgramUniform3i; + long glProgramUniform4i; + long glProgramUniform1f; + long glProgramUniform2f; + long glProgramUniform3f; + long glProgramUniform4f; + long glProgramUniform1d; + long glProgramUniform2d; + long glProgramUniform3d; + long glProgramUniform4d; + long glProgramUniform1iv; + long glProgramUniform2iv; + long glProgramUniform3iv; + long glProgramUniform4iv; + long glProgramUniform1fv; + long glProgramUniform2fv; + long glProgramUniform3fv; + long glProgramUniform4fv; + long glProgramUniform1dv; + long glProgramUniform2dv; + long glProgramUniform3dv; + long glProgramUniform4dv; + long glProgramUniform1ui; + long glProgramUniform2ui; + long glProgramUniform3ui; + long glProgramUniform4ui; + long glProgramUniform1uiv; + long glProgramUniform2uiv; + long glProgramUniform3uiv; + long glProgramUniform4uiv; + long glProgramUniformMatrix2fv; + long glProgramUniformMatrix3fv; + long glProgramUniformMatrix4fv; + long glProgramUniformMatrix2dv; + long glProgramUniformMatrix3dv; + long glProgramUniformMatrix4dv; + long glProgramUniformMatrix2x3fv; + long glProgramUniformMatrix3x2fv; + long glProgramUniformMatrix2x4fv; + long glProgramUniformMatrix4x2fv; + long glProgramUniformMatrix3x4fv; + long glProgramUniformMatrix4x3fv; + long glProgramUniformMatrix2x3dv; + long glProgramUniformMatrix3x2dv; + long glProgramUniformMatrix2x4dv; + long glProgramUniformMatrix4x2dv; + long glProgramUniformMatrix3x4dv; + long glProgramUniformMatrix4x3dv; + long glValidateProgramPipeline; + long glGetProgramPipelineInfoLog; + long glVertexAttribL1d; + long glVertexAttribL2d; + long glVertexAttribL3d; + long glVertexAttribL4d; + long glVertexAttribL1dv; + long glVertexAttribL2dv; + long glVertexAttribL3dv; + long glVertexAttribL4dv; + long glVertexAttribLPointer; + long glGetVertexAttribLdv; + long glViewportArrayv; + long glViewportIndexedf; + long glViewportIndexedfv; + long glScissorArrayv; + long glScissorIndexed; + long glScissorIndexedv; + long glDepthRangeArrayv; + long glDepthRangeIndexed; + long glGetFloati_v; + long glGetDoublei_v; + // GL42 + long glGetActiveAtomicCounterBufferiv; + long glTexStorage1D; + long glTexStorage2D; + long glTexStorage3D; + long glDrawTransformFeedbackInstanced; + long glDrawTransformFeedbackStreamInstanced; + long glDrawArraysInstancedBaseInstance; + long glDrawElementsInstancedBaseInstance; + long glDrawElementsInstancedBaseVertexBaseInstance; + long glBindImageTexture; + long glMemoryBarrier; + long glGetInternalformativ; + // GL43 + long glClearBufferData; + long glClearBufferSubData; + long glDispatchCompute; + long glDispatchComputeIndirect; + long glCopyImageSubData; + long glDebugMessageControl; + long glDebugMessageInsert; + long glDebugMessageCallback; + long glGetDebugMessageLog; + long glPushDebugGroup; + long glPopDebugGroup; + long glObjectLabel; + long glGetObjectLabel; + long glObjectPtrLabel; + long glGetObjectPtrLabel; + long glFramebufferParameteri; + long glGetFramebufferParameteriv; + long glGetInternalformati64v; + long glInvalidateTexSubImage; + long glInvalidateTexImage; + long glInvalidateBufferSubData; + long glInvalidateBufferData; + long glInvalidateFramebuffer; + long glInvalidateSubFramebuffer; + long glMultiDrawArraysIndirect; + long glMultiDrawElementsIndirect; + long glGetProgramInterfaceiv; + long glGetProgramResourceIndex; + long glGetProgramResourceName; + long glGetProgramResourceiv; + long glGetProgramResourceLocation; + long glGetProgramResourceLocationIndex; + long glShaderStorageBlockBinding; + long glTexBufferRange; + long glTexStorage2DMultisample; + long glTexStorage3DMultisample; + long glTextureView; + long glBindVertexBuffer; + long glVertexAttribFormat; + long glVertexAttribIFormat; + long glVertexAttribLFormat; + long glVertexAttribBinding; + long glVertexBindingDivisor; + // GL44 + long glBufferStorage; + long glClearTexImage; + long glClearTexSubImage; + long glBindBuffersBase; + long glBindBuffersRange; + long glBindTextures; + long glBindSamplers; + long glBindImageTextures; + long glBindVertexBuffers; + // GREMEDY_frame_terminator + long glFrameTerminatorGREMEDY; + // GREMEDY_string_marker + long glStringMarkerGREMEDY; + // INTEL_map_texture + long glMapTexture2DINTEL; + long glUnmapTexture2DINTEL; + long glSyncTextureINTEL; + // NV_bindless_multi_draw_indirect + long glMultiDrawArraysIndirectBindlessNV; + long glMultiDrawElementsIndirectBindlessNV; + // NV_bindless_texture + long glGetTextureHandleNV; + long glGetTextureSamplerHandleNV; + long glMakeTextureHandleResidentNV; + long glMakeTextureHandleNonResidentNV; + long glGetImageHandleNV; + long glMakeImageHandleResidentNV; + long glMakeImageHandleNonResidentNV; + long glUniformHandleui64NV; + long glUniformHandleui64vNV; + long glProgramUniformHandleui64NV; + long glProgramUniformHandleui64vNV; + long glIsTextureHandleResidentNV; + long glIsImageHandleResidentNV; + // NV_blend_equation_advanced + long glBlendParameteriNV; + long glBlendBarrierNV; + // NV_conditional_render + long glBeginConditionalRenderNV; + long glEndConditionalRenderNV; + // NV_copy_image + long glCopyImageSubDataNV; + // NV_depth_buffer_float + long glDepthRangedNV; + long glClearDepthdNV; + long glDepthBoundsdNV; + // NV_draw_texture + long glDrawTextureNV; + // NV_evaluators + long glGetMapControlPointsNV; + long glMapControlPointsNV; + long glMapParameterfvNV; + long glMapParameterivNV; + long glGetMapParameterfvNV; + long glGetMapParameterivNV; + long glGetMapAttribParameterfvNV; + long glGetMapAttribParameterivNV; + long glEvalMapsNV; + // NV_explicit_multisample + long glGetMultisamplefvNV; + long glSampleMaskIndexedNV; + long glTexRenderbufferNV; + // NV_fence + long glGenFencesNV; + long glDeleteFencesNV; + long glSetFenceNV; + long glTestFenceNV; + long glFinishFenceNV; + long glIsFenceNV; + long glGetFenceivNV; + // NV_fragment_program + long glProgramNamedParameter4fNV; + long glProgramNamedParameter4dNV; + long glGetProgramNamedParameterfvNV; + long glGetProgramNamedParameterdvNV; + // NV_framebuffer_multisample_coverage + long glRenderbufferStorageMultisampleCoverageNV; + // NV_geometry_program4 + long glProgramVertexLimitNV; + // NV_gpu_program4 + long glProgramLocalParameterI4iNV; + long glProgramLocalParameterI4ivNV; + long glProgramLocalParametersI4ivNV; + long glProgramLocalParameterI4uiNV; + long glProgramLocalParameterI4uivNV; + long glProgramLocalParametersI4uivNV; + long glProgramEnvParameterI4iNV; + long glProgramEnvParameterI4ivNV; + long glProgramEnvParametersI4ivNV; + long glProgramEnvParameterI4uiNV; + long glProgramEnvParameterI4uivNV; + long glProgramEnvParametersI4uivNV; + long glGetProgramLocalParameterIivNV; + long glGetProgramLocalParameterIuivNV; + long glGetProgramEnvParameterIivNV; + long glGetProgramEnvParameterIuivNV; + // NV_gpu_shader5 + long glUniform1i64NV; + long glUniform2i64NV; + long glUniform3i64NV; + long glUniform4i64NV; + long glUniform1i64vNV; + long glUniform2i64vNV; + long glUniform3i64vNV; + long glUniform4i64vNV; + long glUniform1ui64NV; + long glUniform2ui64NV; + long glUniform3ui64NV; + long glUniform4ui64NV; + long glUniform1ui64vNV; + long glUniform2ui64vNV; + long glUniform3ui64vNV; + long glUniform4ui64vNV; + long glGetUniformi64vNV; + long glGetUniformui64vNV; + long glProgramUniform1i64NV; + long glProgramUniform2i64NV; + long glProgramUniform3i64NV; + long glProgramUniform4i64NV; + long glProgramUniform1i64vNV; + long glProgramUniform2i64vNV; + long glProgramUniform3i64vNV; + long glProgramUniform4i64vNV; + long glProgramUniform1ui64NV; + long glProgramUniform2ui64NV; + long glProgramUniform3ui64NV; + long glProgramUniform4ui64NV; + long glProgramUniform1ui64vNV; + long glProgramUniform2ui64vNV; + long glProgramUniform3ui64vNV; + long glProgramUniform4ui64vNV; + // NV_half_float + long glVertex2hNV; + long glVertex3hNV; + long glVertex4hNV; + long glNormal3hNV; + long glColor3hNV; + long glColor4hNV; + long glTexCoord1hNV; + long glTexCoord2hNV; + long glTexCoord3hNV; + long glTexCoord4hNV; + long glMultiTexCoord1hNV; + long glMultiTexCoord2hNV; + long glMultiTexCoord3hNV; + long glMultiTexCoord4hNV; + long glFogCoordhNV; + long glSecondaryColor3hNV; + long glVertexWeighthNV; + long glVertexAttrib1hNV; + long glVertexAttrib2hNV; + long glVertexAttrib3hNV; + long glVertexAttrib4hNV; + long glVertexAttribs1hvNV; + long glVertexAttribs2hvNV; + long glVertexAttribs3hvNV; + long glVertexAttribs4hvNV; + // NV_occlusion_query + long glGenOcclusionQueriesNV; + long glDeleteOcclusionQueriesNV; + long glIsOcclusionQueryNV; + long glBeginOcclusionQueryNV; + long glEndOcclusionQueryNV; + long glGetOcclusionQueryuivNV; + long glGetOcclusionQueryivNV; + // NV_parameter_buffer_object + long glProgramBufferParametersfvNV; + long glProgramBufferParametersIivNV; + long glProgramBufferParametersIuivNV; + // NV_path_rendering + long glPathCommandsNV; + long glPathCoordsNV; + long glPathSubCommandsNV; + long glPathSubCoordsNV; + long glPathStringNV; + long glPathGlyphsNV; + long glPathGlyphRangeNV; + long glWeightPathsNV; + long glCopyPathNV; + long glInterpolatePathsNV; + long glTransformPathNV; + long glPathParameterivNV; + long glPathParameteriNV; + long glPathParameterfvNV; + long glPathParameterfNV; + long glPathDashArrayNV; + long glGenPathsNV; + long glDeletePathsNV; + long glIsPathNV; + long glPathStencilFuncNV; + long glPathStencilDepthOffsetNV; + long glStencilFillPathNV; + long glStencilStrokePathNV; + long glStencilFillPathInstancedNV; + long glStencilStrokePathInstancedNV; + long glPathCoverDepthFuncNV; + long glPathColorGenNV; + long glPathTexGenNV; + long glPathFogGenNV; + long glCoverFillPathNV; + long glCoverStrokePathNV; + long glCoverFillPathInstancedNV; + long glCoverStrokePathInstancedNV; + long glGetPathParameterivNV; + long glGetPathParameterfvNV; + long glGetPathCommandsNV; + long glGetPathCoordsNV; + long glGetPathDashArrayNV; + long glGetPathMetricsNV; + long glGetPathMetricRangeNV; + long glGetPathSpacingNV; + long glGetPathColorGenivNV; + long glGetPathColorGenfvNV; + long glGetPathTexGenivNV; + long glGetPathTexGenfvNV; + long glIsPointInFillPathNV; + long glIsPointInStrokePathNV; + long glGetPathLengthNV; + long glPointAlongPathNV; + // NV_pixel_data_range + long glPixelDataRangeNV; + long glFlushPixelDataRangeNV; + // NV_point_sprite + long glPointParameteriNV; + long glPointParameterivNV; + // NV_present_video + long glPresentFrameKeyedNV; + long glPresentFrameDualFillNV; + long glGetVideoivNV; + long glGetVideouivNV; + long glGetVideoi64vNV; + long glGetVideoui64vNV; + // NV_primitive_restart + long glPrimitiveRestartNV; + long glPrimitiveRestartIndexNV; + // NV_program + long glLoadProgramNV; + long glBindProgramNV; + long glDeleteProgramsNV; + long glGenProgramsNV; + long glGetProgramivNV; + long glGetProgramStringNV; + long glIsProgramNV; + long glAreProgramsResidentNV; + long glRequestResidentProgramsNV; + // NV_register_combiners + long glCombinerParameterfNV; + long glCombinerParameterfvNV; + long glCombinerParameteriNV; + long glCombinerParameterivNV; + long glCombinerInputNV; + long glCombinerOutputNV; + long glFinalCombinerInputNV; + long glGetCombinerInputParameterfvNV; + long glGetCombinerInputParameterivNV; + long glGetCombinerOutputParameterfvNV; + long glGetCombinerOutputParameterivNV; + long glGetFinalCombinerInputParameterfvNV; + long glGetFinalCombinerInputParameterivNV; + // NV_register_combiners2 + long glCombinerStageParameterfvNV; + long glGetCombinerStageParameterfvNV; + // NV_shader_buffer_load + long glMakeBufferResidentNV; + long glMakeBufferNonResidentNV; + long glIsBufferResidentNV; + long glMakeNamedBufferResidentNV; + long glMakeNamedBufferNonResidentNV; + long glIsNamedBufferResidentNV; + long glGetBufferParameterui64vNV; + long glGetNamedBufferParameterui64vNV; + long glGetIntegerui64vNV; + long glUniformui64NV; + long glUniformui64vNV; + long glProgramUniformui64NV; + long glProgramUniformui64vNV; + // NV_texture_barrier + long glTextureBarrierNV; + // NV_texture_multisample + long glTexImage2DMultisampleCoverageNV; + long glTexImage3DMultisampleCoverageNV; + long glTextureImage2DMultisampleNV; + long glTextureImage3DMultisampleNV; + long glTextureImage2DMultisampleCoverageNV; + long glTextureImage3DMultisampleCoverageNV; + // NV_transform_feedback + long glBindBufferRangeNV; + long glBindBufferOffsetNV; + long glBindBufferBaseNV; + long glTransformFeedbackAttribsNV; + long glTransformFeedbackVaryingsNV; + long glBeginTransformFeedbackNV; + long glEndTransformFeedbackNV; + long glGetVaryingLocationNV; + long glGetActiveVaryingNV; + long glActiveVaryingNV; + long glGetTransformFeedbackVaryingNV; + // NV_transform_feedback2 + long glBindTransformFeedbackNV; + long glDeleteTransformFeedbacksNV; + long glGenTransformFeedbacksNV; + long glIsTransformFeedbackNV; + long glPauseTransformFeedbackNV; + long glResumeTransformFeedbackNV; + long glDrawTransformFeedbackNV; + // NV_vertex_array_range + long glVertexArrayRangeNV; + long glFlushVertexArrayRangeNV; + long glAllocateMemoryNV; + long glFreeMemoryNV; + // NV_vertex_attrib_integer_64bit + long glVertexAttribL1i64NV; + long glVertexAttribL2i64NV; + long glVertexAttribL3i64NV; + long glVertexAttribL4i64NV; + long glVertexAttribL1i64vNV; + long glVertexAttribL2i64vNV; + long glVertexAttribL3i64vNV; + long glVertexAttribL4i64vNV; + long glVertexAttribL1ui64NV; + long glVertexAttribL2ui64NV; + long glVertexAttribL3ui64NV; + long glVertexAttribL4ui64NV; + long glVertexAttribL1ui64vNV; + long glVertexAttribL2ui64vNV; + long glVertexAttribL3ui64vNV; + long glVertexAttribL4ui64vNV; + long glGetVertexAttribLi64vNV; + long glGetVertexAttribLui64vNV; + long glVertexAttribLFormatNV; + // NV_vertex_buffer_unified_memory + long glBufferAddressRangeNV; + long glVertexFormatNV; + long glNormalFormatNV; + long glColorFormatNV; + long glIndexFormatNV; + long glTexCoordFormatNV; + long glEdgeFlagFormatNV; + long glSecondaryColorFormatNV; + long glFogCoordFormatNV; + long glVertexAttribFormatNV; + long glVertexAttribIFormatNV; + long glGetIntegerui64i_vNV; + // NV_vertex_program + long glExecuteProgramNV; + long glGetProgramParameterfvNV; + long glGetProgramParameterdvNV; + long glGetTrackMatrixivNV; + long glGetVertexAttribfvNV; + long glGetVertexAttribdvNV; + long glGetVertexAttribivNV; + long glGetVertexAttribPointervNV; + long glProgramParameter4fNV; + long glProgramParameter4dNV; + long glProgramParameters4fvNV; + long glProgramParameters4dvNV; + long glTrackMatrixNV; + long glVertexAttribPointerNV; + long glVertexAttrib1sNV; + long glVertexAttrib1fNV; + long glVertexAttrib1dNV; + long glVertexAttrib2sNV; + long glVertexAttrib2fNV; + long glVertexAttrib2dNV; + long glVertexAttrib3sNV; + long glVertexAttrib3fNV; + long glVertexAttrib3dNV; + long glVertexAttrib4sNV; + long glVertexAttrib4fNV; + long glVertexAttrib4dNV; + long glVertexAttrib4ubNV; + long glVertexAttribs1svNV; + long glVertexAttribs1fvNV; + long glVertexAttribs1dvNV; + long glVertexAttribs2svNV; + long glVertexAttribs2fvNV; + long glVertexAttribs2dvNV; + long glVertexAttribs3svNV; + long glVertexAttribs3fvNV; + long glVertexAttribs3dvNV; + long glVertexAttribs4svNV; + long glVertexAttribs4fvNV; + long glVertexAttribs4dvNV; + // NV_video_capture + long glBeginVideoCaptureNV; + long glBindVideoCaptureStreamBufferNV; + long glBindVideoCaptureStreamTextureNV; + long glEndVideoCaptureNV; + long glGetVideoCaptureivNV; + long glGetVideoCaptureStreamivNV; + long glGetVideoCaptureStreamfvNV; + long glGetVideoCaptureStreamdvNV; + long glVideoCaptureNV; + long glVideoCaptureStreamParameterivNV; + long glVideoCaptureStreamParameterfvNV; + long glVideoCaptureStreamParameterdvNV; + + private boolean AMD_debug_output_initNativeFunctionAddresses() { + return + (glDebugMessageEnableAMD = GLContext.getFunctionAddress(new String[] {"glDebugMessageEnableAMD","glDebugMessageEnableAMDX"})) != 0 & + (glDebugMessageInsertAMD = GLContext.getFunctionAddress(new String[] {"glDebugMessageInsertAMD","glDebugMessageInsertAMDX"})) != 0 & + (glDebugMessageCallbackAMD = GLContext.getFunctionAddress(new String[] {"glDebugMessageCallbackAMD","glDebugMessageCallbackAMDX"})) != 0 & + (glGetDebugMessageLogAMD = GLContext.getFunctionAddress(new String[] {"glGetDebugMessageLogAMD","glGetDebugMessageLogAMDX"})) != 0; + } + + private boolean AMD_draw_buffers_blend_initNativeFunctionAddresses() { + return + (glBlendFuncIndexedAMD = GLContext.getFunctionAddress("glBlendFuncIndexedAMD")) != 0 & + (glBlendFuncSeparateIndexedAMD = GLContext.getFunctionAddress("glBlendFuncSeparateIndexedAMD")) != 0 & + (glBlendEquationIndexedAMD = GLContext.getFunctionAddress("glBlendEquationIndexedAMD")) != 0 & + (glBlendEquationSeparateIndexedAMD = GLContext.getFunctionAddress("glBlendEquationSeparateIndexedAMD")) != 0; + } + + private boolean AMD_interleaved_elements_initNativeFunctionAddresses() { + return + (glVertexAttribParameteriAMD = GLContext.getFunctionAddress("glVertexAttribParameteriAMD")) != 0; + } + + private boolean AMD_multi_draw_indirect_initNativeFunctionAddresses() { + return + (glMultiDrawArraysIndirectAMD = GLContext.getFunctionAddress("glMultiDrawArraysIndirectAMD")) != 0 & + (glMultiDrawElementsIndirectAMD = GLContext.getFunctionAddress("glMultiDrawElementsIndirectAMD")) != 0; + } + + private boolean AMD_name_gen_delete_initNativeFunctionAddresses() { + return + (glGenNamesAMD = GLContext.getFunctionAddress("glGenNamesAMD")) != 0 & + (glDeleteNamesAMD = GLContext.getFunctionAddress("glDeleteNamesAMD")) != 0 & + (glIsNameAMD = GLContext.getFunctionAddress("glIsNameAMD")) != 0; + } + + private boolean AMD_performance_monitor_initNativeFunctionAddresses() { + return + (glGetPerfMonitorGroupsAMD = GLContext.getFunctionAddress("glGetPerfMonitorGroupsAMD")) != 0 & + (glGetPerfMonitorCountersAMD = GLContext.getFunctionAddress("glGetPerfMonitorCountersAMD")) != 0 & + (glGetPerfMonitorGroupStringAMD = GLContext.getFunctionAddress("glGetPerfMonitorGroupStringAMD")) != 0 & + (glGetPerfMonitorCounterStringAMD = GLContext.getFunctionAddress("glGetPerfMonitorCounterStringAMD")) != 0 & + (glGetPerfMonitorCounterInfoAMD = GLContext.getFunctionAddress("glGetPerfMonitorCounterInfoAMD")) != 0 & + (glGenPerfMonitorsAMD = GLContext.getFunctionAddress("glGenPerfMonitorsAMD")) != 0 & + (glDeletePerfMonitorsAMD = GLContext.getFunctionAddress("glDeletePerfMonitorsAMD")) != 0 & + (glSelectPerfMonitorCountersAMD = GLContext.getFunctionAddress("glSelectPerfMonitorCountersAMD")) != 0 & + (glBeginPerfMonitorAMD = GLContext.getFunctionAddress("glBeginPerfMonitorAMD")) != 0 & + (glEndPerfMonitorAMD = GLContext.getFunctionAddress("glEndPerfMonitorAMD")) != 0 & + (glGetPerfMonitorCounterDataAMD = GLContext.getFunctionAddress("glGetPerfMonitorCounterDataAMD")) != 0; + } + + private boolean AMD_sample_positions_initNativeFunctionAddresses() { + return + (glSetMultisamplefvAMD = GLContext.getFunctionAddress("glSetMultisamplefvAMD")) != 0; + } + + private boolean AMD_sparse_texture_initNativeFunctionAddresses() { + return + (glTexStorageSparseAMD = GLContext.getFunctionAddress("glTexStorageSparseAMD")) != 0 & + (glTextureStorageSparseAMD = GLContext.getFunctionAddress("glTextureStorageSparseAMD")) != 0; + } + + private boolean AMD_stencil_operation_extended_initNativeFunctionAddresses() { + return + (glStencilOpValueAMD = GLContext.getFunctionAddress("glStencilOpValueAMD")) != 0; + } + + private boolean AMD_vertex_shader_tessellator_initNativeFunctionAddresses() { + return + (glTessellationFactorAMD = GLContext.getFunctionAddress("glTessellationFactorAMD")) != 0 & + (glTessellationModeAMD = GLContext.getFunctionAddress("glTessellationModeAMD")) != 0; + } + + private boolean APPLE_element_array_initNativeFunctionAddresses() { + return + (glElementPointerAPPLE = GLContext.getFunctionAddress("glElementPointerAPPLE")) != 0 & + (glDrawElementArrayAPPLE = GLContext.getFunctionAddress("glDrawElementArrayAPPLE")) != 0 & + (glDrawRangeElementArrayAPPLE = GLContext.getFunctionAddress("glDrawRangeElementArrayAPPLE")) != 0 & + (glMultiDrawElementArrayAPPLE = GLContext.getFunctionAddress("glMultiDrawElementArrayAPPLE")) != 0 & + (glMultiDrawRangeElementArrayAPPLE = GLContext.getFunctionAddress("glMultiDrawRangeElementArrayAPPLE")) != 0; + } + + private boolean APPLE_fence_initNativeFunctionAddresses() { + return + (glGenFencesAPPLE = GLContext.getFunctionAddress("glGenFencesAPPLE")) != 0 & + (glDeleteFencesAPPLE = GLContext.getFunctionAddress("glDeleteFencesAPPLE")) != 0 & + (glSetFenceAPPLE = GLContext.getFunctionAddress("glSetFenceAPPLE")) != 0 & + (glIsFenceAPPLE = GLContext.getFunctionAddress("glIsFenceAPPLE")) != 0 & + (glTestFenceAPPLE = GLContext.getFunctionAddress("glTestFenceAPPLE")) != 0 & + (glFinishFenceAPPLE = GLContext.getFunctionAddress("glFinishFenceAPPLE")) != 0 & + (glTestObjectAPPLE = GLContext.getFunctionAddress("glTestObjectAPPLE")) != 0 & + (glFinishObjectAPPLE = GLContext.getFunctionAddress("glFinishObjectAPPLE")) != 0; + } + + private boolean APPLE_flush_buffer_range_initNativeFunctionAddresses() { + return + (glBufferParameteriAPPLE = GLContext.getFunctionAddress("glBufferParameteriAPPLE")) != 0 & + (glFlushMappedBufferRangeAPPLE = GLContext.getFunctionAddress("glFlushMappedBufferRangeAPPLE")) != 0; + } + + private boolean APPLE_object_purgeable_initNativeFunctionAddresses() { + return + (glObjectPurgeableAPPLE = GLContext.getFunctionAddress("glObjectPurgeableAPPLE")) != 0 & + (glObjectUnpurgeableAPPLE = GLContext.getFunctionAddress("glObjectUnpurgeableAPPLE")) != 0 & + (glGetObjectParameterivAPPLE = GLContext.getFunctionAddress("glGetObjectParameterivAPPLE")) != 0; + } + + private boolean APPLE_texture_range_initNativeFunctionAddresses() { + return + (glTextureRangeAPPLE = GLContext.getFunctionAddress("glTextureRangeAPPLE")) != 0 & + (glGetTexParameterPointervAPPLE = GLContext.getFunctionAddress("glGetTexParameterPointervAPPLE")) != 0; + } + + private boolean APPLE_vertex_array_object_initNativeFunctionAddresses() { + return + (glBindVertexArrayAPPLE = GLContext.getFunctionAddress("glBindVertexArrayAPPLE")) != 0 & + (glDeleteVertexArraysAPPLE = GLContext.getFunctionAddress("glDeleteVertexArraysAPPLE")) != 0 & + (glGenVertexArraysAPPLE = GLContext.getFunctionAddress("glGenVertexArraysAPPLE")) != 0 & + (glIsVertexArrayAPPLE = GLContext.getFunctionAddress("glIsVertexArrayAPPLE")) != 0; + } + + private boolean APPLE_vertex_array_range_initNativeFunctionAddresses() { + return + (glVertexArrayRangeAPPLE = GLContext.getFunctionAddress("glVertexArrayRangeAPPLE")) != 0 & + (glFlushVertexArrayRangeAPPLE = GLContext.getFunctionAddress("glFlushVertexArrayRangeAPPLE")) != 0 & + (glVertexArrayParameteriAPPLE = GLContext.getFunctionAddress("glVertexArrayParameteriAPPLE")) != 0; + } + + private boolean APPLE_vertex_program_evaluators_initNativeFunctionAddresses() { + return + (glEnableVertexAttribAPPLE = GLContext.getFunctionAddress("glEnableVertexAttribAPPLE")) != 0 & + (glDisableVertexAttribAPPLE = GLContext.getFunctionAddress("glDisableVertexAttribAPPLE")) != 0 & + (glIsVertexAttribEnabledAPPLE = GLContext.getFunctionAddress("glIsVertexAttribEnabledAPPLE")) != 0 & + (glMapVertexAttrib1dAPPLE = GLContext.getFunctionAddress("glMapVertexAttrib1dAPPLE")) != 0 & + (glMapVertexAttrib1fAPPLE = GLContext.getFunctionAddress("glMapVertexAttrib1fAPPLE")) != 0 & + (glMapVertexAttrib2dAPPLE = GLContext.getFunctionAddress("glMapVertexAttrib2dAPPLE")) != 0 & + (glMapVertexAttrib2fAPPLE = GLContext.getFunctionAddress("glMapVertexAttrib2fAPPLE")) != 0; + } + + private boolean ARB_ES2_compatibility_initNativeFunctionAddresses() { + return + (glReleaseShaderCompiler = GLContext.getFunctionAddress("glReleaseShaderCompiler")) != 0 & + (glShaderBinary = GLContext.getFunctionAddress("glShaderBinary")) != 0 & + (glGetShaderPrecisionFormat = GLContext.getFunctionAddress("glGetShaderPrecisionFormat")) != 0 & + (glDepthRangef = GLContext.getFunctionAddress("glDepthRangef")) != 0 & + (glClearDepthf = GLContext.getFunctionAddress("glClearDepthf")) != 0; + } + + private boolean ARB_base_instance_initNativeFunctionAddresses() { + return + (glDrawArraysInstancedBaseInstance = GLContext.getFunctionAddress("glDrawArraysInstancedBaseInstance")) != 0 & + (glDrawElementsInstancedBaseInstance = GLContext.getFunctionAddress("glDrawElementsInstancedBaseInstance")) != 0 & + (glDrawElementsInstancedBaseVertexBaseInstance = GLContext.getFunctionAddress("glDrawElementsInstancedBaseVertexBaseInstance")) != 0; + } + + private boolean ARB_bindless_texture_initNativeFunctionAddresses() { + return + (glGetTextureHandleARB = GLContext.getFunctionAddress("glGetTextureHandleARB")) != 0 & + (glGetTextureSamplerHandleARB = GLContext.getFunctionAddress("glGetTextureSamplerHandleARB")) != 0 & + (glMakeTextureHandleResidentARB = GLContext.getFunctionAddress("glMakeTextureHandleResidentARB")) != 0 & + (glMakeTextureHandleNonResidentARB = GLContext.getFunctionAddress("glMakeTextureHandleNonResidentARB")) != 0 & + (glGetImageHandleARB = GLContext.getFunctionAddress("glGetImageHandleARB")) != 0 & + (glMakeImageHandleResidentARB = GLContext.getFunctionAddress("glMakeImageHandleResidentARB")) != 0 & + (glMakeImageHandleNonResidentARB = GLContext.getFunctionAddress("glMakeImageHandleNonResidentARB")) != 0 & + (glUniformHandleui64ARB = GLContext.getFunctionAddress("glUniformHandleui64ARB")) != 0 & + (glUniformHandleui64vARB = GLContext.getFunctionAddress("glUniformHandleui64vARB")) != 0 & + (glProgramUniformHandleui64ARB = GLContext.getFunctionAddress("glProgramUniformHandleui64ARB")) != 0 & + (glProgramUniformHandleui64vARB = GLContext.getFunctionAddress("glProgramUniformHandleui64vARB")) != 0 & + (glIsTextureHandleResidentARB = GLContext.getFunctionAddress("glIsTextureHandleResidentARB")) != 0 & + (glIsImageHandleResidentARB = GLContext.getFunctionAddress("glIsImageHandleResidentARB")) != 0 & + (glVertexAttribL1ui64ARB = GLContext.getFunctionAddress("glVertexAttribL1ui64ARB")) != 0 & + (glVertexAttribL1ui64vARB = GLContext.getFunctionAddress("glVertexAttribL1ui64vARB")) != 0 & + (glGetVertexAttribLui64vARB = GLContext.getFunctionAddress("glGetVertexAttribLui64vARB")) != 0; + } + + private boolean ARB_blend_func_extended_initNativeFunctionAddresses() { + return + (glBindFragDataLocationIndexed = GLContext.getFunctionAddress("glBindFragDataLocationIndexed")) != 0 & + (glGetFragDataIndex = GLContext.getFunctionAddress("glGetFragDataIndex")) != 0; + } + + private boolean ARB_buffer_object_initNativeFunctionAddresses() { + return + (glBindBufferARB = GLContext.getFunctionAddress("glBindBufferARB")) != 0 & + (glDeleteBuffersARB = GLContext.getFunctionAddress("glDeleteBuffersARB")) != 0 & + (glGenBuffersARB = GLContext.getFunctionAddress("glGenBuffersARB")) != 0 & + (glIsBufferARB = GLContext.getFunctionAddress("glIsBufferARB")) != 0 & + (glBufferDataARB = GLContext.getFunctionAddress("glBufferDataARB")) != 0 & + (glBufferSubDataARB = GLContext.getFunctionAddress("glBufferSubDataARB")) != 0 & + (glGetBufferSubDataARB = GLContext.getFunctionAddress("glGetBufferSubDataARB")) != 0 & + (glMapBufferARB = GLContext.getFunctionAddress("glMapBufferARB")) != 0 & + (glUnmapBufferARB = GLContext.getFunctionAddress("glUnmapBufferARB")) != 0 & + (glGetBufferParameterivARB = GLContext.getFunctionAddress("glGetBufferParameterivARB")) != 0 & + (glGetBufferPointervARB = GLContext.getFunctionAddress("glGetBufferPointervARB")) != 0; + } + + private boolean ARB_buffer_storage_initNativeFunctionAddresses(Set supported_extensions) { + return + (glBufferStorage = GLContext.getFunctionAddress("glBufferStorage")) != 0 & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glNamedBufferStorageEXT = GLContext.getFunctionAddress("glNamedBufferStorageEXT")) != 0); + } + + private boolean ARB_cl_event_initNativeFunctionAddresses() { + return + (glCreateSyncFromCLeventARB = GLContext.getFunctionAddress("glCreateSyncFromCLeventARB")) != 0; + } + + private boolean ARB_clear_buffer_object_initNativeFunctionAddresses(Set supported_extensions) { + return + (glClearBufferData = GLContext.getFunctionAddress("glClearBufferData")) != 0 & + (glClearBufferSubData = GLContext.getFunctionAddress("glClearBufferSubData")) != 0 & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glClearNamedBufferDataEXT = GLContext.getFunctionAddress("glClearNamedBufferDataEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glClearNamedBufferSubDataEXT = GLContext.getFunctionAddress("glClearNamedBufferSubDataEXT")) != 0); + } + + private boolean ARB_clear_texture_initNativeFunctionAddresses() { + return + (glClearTexImage = GLContext.getFunctionAddress("glClearTexImage")) != 0 & + (glClearTexSubImage = GLContext.getFunctionAddress("glClearTexSubImage")) != 0; + } + + private boolean ARB_color_buffer_float_initNativeFunctionAddresses() { + return + (glClampColorARB = GLContext.getFunctionAddress("glClampColorARB")) != 0; + } + + private boolean ARB_compute_shader_initNativeFunctionAddresses() { + return + (glDispatchCompute = GLContext.getFunctionAddress("glDispatchCompute")) != 0 & + (glDispatchComputeIndirect = GLContext.getFunctionAddress("glDispatchComputeIndirect")) != 0; + } + + private boolean ARB_compute_variable_group_size_initNativeFunctionAddresses() { + return + (glDispatchComputeGroupSizeARB = GLContext.getFunctionAddress("glDispatchComputeGroupSizeARB")) != 0; + } + + private boolean ARB_copy_buffer_initNativeFunctionAddresses() { + return + (glCopyBufferSubData = GLContext.getFunctionAddress("glCopyBufferSubData")) != 0; + } + + private boolean ARB_copy_image_initNativeFunctionAddresses() { + return + (glCopyImageSubData = GLContext.getFunctionAddress("glCopyImageSubData")) != 0; + } + + private boolean ARB_debug_output_initNativeFunctionAddresses() { + return + (glDebugMessageControlARB = GLContext.getFunctionAddress("glDebugMessageControlARB")) != 0 & + (glDebugMessageInsertARB = GLContext.getFunctionAddress("glDebugMessageInsertARB")) != 0 & + (glDebugMessageCallbackARB = GLContext.getFunctionAddress("glDebugMessageCallbackARB")) != 0 & + (glGetDebugMessageLogARB = GLContext.getFunctionAddress("glGetDebugMessageLogARB")) != 0; + } + + private boolean ARB_draw_buffers_initNativeFunctionAddresses() { + return + (glDrawBuffersARB = GLContext.getFunctionAddress("glDrawBuffersARB")) != 0; + } + + private boolean ARB_draw_buffers_blend_initNativeFunctionAddresses() { + return + (glBlendEquationiARB = GLContext.getFunctionAddress("glBlendEquationiARB")) != 0 & + (glBlendEquationSeparateiARB = GLContext.getFunctionAddress("glBlendEquationSeparateiARB")) != 0 & + (glBlendFunciARB = GLContext.getFunctionAddress("glBlendFunciARB")) != 0 & + (glBlendFuncSeparateiARB = GLContext.getFunctionAddress("glBlendFuncSeparateiARB")) != 0; + } + + private boolean ARB_draw_elements_base_vertex_initNativeFunctionAddresses() { + return + (glDrawElementsBaseVertex = GLContext.getFunctionAddress("glDrawElementsBaseVertex")) != 0 & + (glDrawRangeElementsBaseVertex = GLContext.getFunctionAddress("glDrawRangeElementsBaseVertex")) != 0 & + (glDrawElementsInstancedBaseVertex = GLContext.getFunctionAddress("glDrawElementsInstancedBaseVertex")) != 0; + } + + private boolean ARB_draw_indirect_initNativeFunctionAddresses() { + return + (glDrawArraysIndirect = GLContext.getFunctionAddress("glDrawArraysIndirect")) != 0 & + (glDrawElementsIndirect = GLContext.getFunctionAddress("glDrawElementsIndirect")) != 0; + } + + private boolean ARB_draw_instanced_initNativeFunctionAddresses() { + return + (glDrawArraysInstancedARB = GLContext.getFunctionAddress("glDrawArraysInstancedARB")) != 0 & + (glDrawElementsInstancedARB = GLContext.getFunctionAddress("glDrawElementsInstancedARB")) != 0; + } + + private boolean ARB_framebuffer_no_attachments_initNativeFunctionAddresses(Set supported_extensions) { + return + (glFramebufferParameteri = GLContext.getFunctionAddress("glFramebufferParameteri")) != 0 & + (glGetFramebufferParameteriv = GLContext.getFunctionAddress("glGetFramebufferParameteriv")) != 0 & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glNamedFramebufferParameteriEXT = GLContext.getFunctionAddress("glNamedFramebufferParameteriEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glGetNamedFramebufferParameterivEXT = GLContext.getFunctionAddress("glGetNamedFramebufferParameterivEXT")) != 0); + } + + private boolean ARB_framebuffer_object_initNativeFunctionAddresses() { + return + (glIsRenderbuffer = GLContext.getFunctionAddress("glIsRenderbuffer")) != 0 & + (glBindRenderbuffer = GLContext.getFunctionAddress("glBindRenderbuffer")) != 0 & + (glDeleteRenderbuffers = GLContext.getFunctionAddress("glDeleteRenderbuffers")) != 0 & + (glGenRenderbuffers = GLContext.getFunctionAddress("glGenRenderbuffers")) != 0 & + (glRenderbufferStorage = GLContext.getFunctionAddress("glRenderbufferStorage")) != 0 & + (glRenderbufferStorageMultisample = GLContext.getFunctionAddress("glRenderbufferStorageMultisample")) != 0 & + (glGetRenderbufferParameteriv = GLContext.getFunctionAddress("glGetRenderbufferParameteriv")) != 0 & + (glIsFramebuffer = GLContext.getFunctionAddress("glIsFramebuffer")) != 0 & + (glBindFramebuffer = GLContext.getFunctionAddress("glBindFramebuffer")) != 0 & + (glDeleteFramebuffers = GLContext.getFunctionAddress("glDeleteFramebuffers")) != 0 & + (glGenFramebuffers = GLContext.getFunctionAddress("glGenFramebuffers")) != 0 & + (glCheckFramebufferStatus = GLContext.getFunctionAddress("glCheckFramebufferStatus")) != 0 & + (glFramebufferTexture1D = GLContext.getFunctionAddress("glFramebufferTexture1D")) != 0 & + (glFramebufferTexture2D = GLContext.getFunctionAddress("glFramebufferTexture2D")) != 0 & + (glFramebufferTexture3D = GLContext.getFunctionAddress("glFramebufferTexture3D")) != 0 & + (glFramebufferTextureLayer = GLContext.getFunctionAddress("glFramebufferTextureLayer")) != 0 & + (glFramebufferRenderbuffer = GLContext.getFunctionAddress("glFramebufferRenderbuffer")) != 0 & + (glGetFramebufferAttachmentParameteriv = GLContext.getFunctionAddress("glGetFramebufferAttachmentParameteriv")) != 0 & + (glBlitFramebuffer = GLContext.getFunctionAddress("glBlitFramebuffer")) != 0 & + (glGenerateMipmap = GLContext.getFunctionAddress("glGenerateMipmap")) != 0; + } + + private boolean ARB_geometry_shader4_initNativeFunctionAddresses() { + return + (glProgramParameteriARB = GLContext.getFunctionAddress("glProgramParameteriARB")) != 0 & + (glFramebufferTextureARB = GLContext.getFunctionAddress("glFramebufferTextureARB")) != 0 & + (glFramebufferTextureLayerARB = GLContext.getFunctionAddress("glFramebufferTextureLayerARB")) != 0 & + (glFramebufferTextureFaceARB = GLContext.getFunctionAddress("glFramebufferTextureFaceARB")) != 0; + } + + private boolean ARB_get_program_binary_initNativeFunctionAddresses() { + return + (glGetProgramBinary = GLContext.getFunctionAddress("glGetProgramBinary")) != 0 & + (glProgramBinary = GLContext.getFunctionAddress("glProgramBinary")) != 0 & + (glProgramParameteri = GLContext.getFunctionAddress("glProgramParameteri")) != 0; + } + + private boolean ARB_gpu_shader_fp64_initNativeFunctionAddresses(Set supported_extensions) { + return + (glUniform1d = GLContext.getFunctionAddress("glUniform1d")) != 0 & + (glUniform2d = GLContext.getFunctionAddress("glUniform2d")) != 0 & + (glUniform3d = GLContext.getFunctionAddress("glUniform3d")) != 0 & + (glUniform4d = GLContext.getFunctionAddress("glUniform4d")) != 0 & + (glUniform1dv = GLContext.getFunctionAddress("glUniform1dv")) != 0 & + (glUniform2dv = GLContext.getFunctionAddress("glUniform2dv")) != 0 & + (glUniform3dv = GLContext.getFunctionAddress("glUniform3dv")) != 0 & + (glUniform4dv = GLContext.getFunctionAddress("glUniform4dv")) != 0 & + (glUniformMatrix2dv = GLContext.getFunctionAddress("glUniformMatrix2dv")) != 0 & + (glUniformMatrix3dv = GLContext.getFunctionAddress("glUniformMatrix3dv")) != 0 & + (glUniformMatrix4dv = GLContext.getFunctionAddress("glUniformMatrix4dv")) != 0 & + (glUniformMatrix2x3dv = GLContext.getFunctionAddress("glUniformMatrix2x3dv")) != 0 & + (glUniformMatrix2x4dv = GLContext.getFunctionAddress("glUniformMatrix2x4dv")) != 0 & + (glUniformMatrix3x2dv = GLContext.getFunctionAddress("glUniformMatrix3x2dv")) != 0 & + (glUniformMatrix3x4dv = GLContext.getFunctionAddress("glUniformMatrix3x4dv")) != 0 & + (glUniformMatrix4x2dv = GLContext.getFunctionAddress("glUniformMatrix4x2dv")) != 0 & + (glUniformMatrix4x3dv = GLContext.getFunctionAddress("glUniformMatrix4x3dv")) != 0 & + (glGetUniformdv = GLContext.getFunctionAddress("glGetUniformdv")) != 0 & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniform1dEXT = GLContext.getFunctionAddress("glProgramUniform1dEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniform2dEXT = GLContext.getFunctionAddress("glProgramUniform2dEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniform3dEXT = GLContext.getFunctionAddress("glProgramUniform3dEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniform4dEXT = GLContext.getFunctionAddress("glProgramUniform4dEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniform1dvEXT = GLContext.getFunctionAddress("glProgramUniform1dvEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniform2dvEXT = GLContext.getFunctionAddress("glProgramUniform2dvEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniform3dvEXT = GLContext.getFunctionAddress("glProgramUniform3dvEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniform4dvEXT = GLContext.getFunctionAddress("glProgramUniform4dvEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniformMatrix2dvEXT = GLContext.getFunctionAddress("glProgramUniformMatrix2dvEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniformMatrix3dvEXT = GLContext.getFunctionAddress("glProgramUniformMatrix3dvEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniformMatrix4dvEXT = GLContext.getFunctionAddress("glProgramUniformMatrix4dvEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniformMatrix2x3dvEXT = GLContext.getFunctionAddress("glProgramUniformMatrix2x3dvEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniformMatrix2x4dvEXT = GLContext.getFunctionAddress("glProgramUniformMatrix2x4dvEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniformMatrix3x2dvEXT = GLContext.getFunctionAddress("glProgramUniformMatrix3x2dvEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniformMatrix3x4dvEXT = GLContext.getFunctionAddress("glProgramUniformMatrix3x4dvEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniformMatrix4x2dvEXT = GLContext.getFunctionAddress("glProgramUniformMatrix4x2dvEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniformMatrix4x3dvEXT = GLContext.getFunctionAddress("glProgramUniformMatrix4x3dvEXT")) != 0); + } + + private boolean ARB_imaging_initNativeFunctionAddresses(boolean forwardCompatible) { + return + (forwardCompatible || (glColorTable = GLContext.getFunctionAddress("glColorTable")) != 0) & + (forwardCompatible || (glColorSubTable = GLContext.getFunctionAddress("glColorSubTable")) != 0) & + (forwardCompatible || (glColorTableParameteriv = GLContext.getFunctionAddress("glColorTableParameteriv")) != 0) & + (forwardCompatible || (glColorTableParameterfv = GLContext.getFunctionAddress("glColorTableParameterfv")) != 0) & + (forwardCompatible || (glCopyColorSubTable = GLContext.getFunctionAddress("glCopyColorSubTable")) != 0) & + (forwardCompatible || (glCopyColorTable = GLContext.getFunctionAddress("glCopyColorTable")) != 0) & + (forwardCompatible || (glGetColorTable = GLContext.getFunctionAddress("glGetColorTable")) != 0) & + (forwardCompatible || (glGetColorTableParameteriv = GLContext.getFunctionAddress("glGetColorTableParameteriv")) != 0) & + (forwardCompatible || (glGetColorTableParameterfv = GLContext.getFunctionAddress("glGetColorTableParameterfv")) != 0) & + (glBlendEquation = GLContext.getFunctionAddress("glBlendEquation")) != 0 & + (glBlendColor = GLContext.getFunctionAddress("glBlendColor")) != 0 & + (forwardCompatible || (glHistogram = GLContext.getFunctionAddress("glHistogram")) != 0) & + (forwardCompatible || (glResetHistogram = GLContext.getFunctionAddress("glResetHistogram")) != 0) & + (forwardCompatible || (glGetHistogram = GLContext.getFunctionAddress("glGetHistogram")) != 0) & + (forwardCompatible || (glGetHistogramParameterfv = GLContext.getFunctionAddress("glGetHistogramParameterfv")) != 0) & + (forwardCompatible || (glGetHistogramParameteriv = GLContext.getFunctionAddress("glGetHistogramParameteriv")) != 0) & + (forwardCompatible || (glMinmax = GLContext.getFunctionAddress("glMinmax")) != 0) & + (forwardCompatible || (glResetMinmax = GLContext.getFunctionAddress("glResetMinmax")) != 0) & + (forwardCompatible || (glGetMinmax = GLContext.getFunctionAddress("glGetMinmax")) != 0) & + (forwardCompatible || (glGetMinmaxParameterfv = GLContext.getFunctionAddress("glGetMinmaxParameterfv")) != 0) & + (forwardCompatible || (glGetMinmaxParameteriv = GLContext.getFunctionAddress("glGetMinmaxParameteriv")) != 0) & + (forwardCompatible || (glConvolutionFilter1D = GLContext.getFunctionAddress("glConvolutionFilter1D")) != 0) & + (forwardCompatible || (glConvolutionFilter2D = GLContext.getFunctionAddress("glConvolutionFilter2D")) != 0) & + (forwardCompatible || (glConvolutionParameterf = GLContext.getFunctionAddress("glConvolutionParameterf")) != 0) & + (forwardCompatible || (glConvolutionParameterfv = GLContext.getFunctionAddress("glConvolutionParameterfv")) != 0) & + (forwardCompatible || (glConvolutionParameteri = GLContext.getFunctionAddress("glConvolutionParameteri")) != 0) & + (forwardCompatible || (glConvolutionParameteriv = GLContext.getFunctionAddress("glConvolutionParameteriv")) != 0) & + (forwardCompatible || (glCopyConvolutionFilter1D = GLContext.getFunctionAddress("glCopyConvolutionFilter1D")) != 0) & + (forwardCompatible || (glCopyConvolutionFilter2D = GLContext.getFunctionAddress("glCopyConvolutionFilter2D")) != 0) & + (forwardCompatible || (glGetConvolutionFilter = GLContext.getFunctionAddress("glGetConvolutionFilter")) != 0) & + (forwardCompatible || (glGetConvolutionParameterfv = GLContext.getFunctionAddress("glGetConvolutionParameterfv")) != 0) & + (forwardCompatible || (glGetConvolutionParameteriv = GLContext.getFunctionAddress("glGetConvolutionParameteriv")) != 0) & + (forwardCompatible || (glSeparableFilter2D = GLContext.getFunctionAddress("glSeparableFilter2D")) != 0) & + (forwardCompatible || (glGetSeparableFilter = GLContext.getFunctionAddress("glGetSeparableFilter")) != 0); + } + + private boolean ARB_indirect_parameters_initNativeFunctionAddresses() { + return + (glMultiDrawArraysIndirectCountARB = GLContext.getFunctionAddress("glMultiDrawArraysIndirectCountARB")) != 0 & + (glMultiDrawElementsIndirectCountARB = GLContext.getFunctionAddress("glMultiDrawElementsIndirectCountARB")) != 0; + } + + private boolean ARB_instanced_arrays_initNativeFunctionAddresses() { + return + (glVertexAttribDivisorARB = GLContext.getFunctionAddress("glVertexAttribDivisorARB")) != 0; + } + + private boolean ARB_internalformat_query_initNativeFunctionAddresses() { + return + (glGetInternalformativ = GLContext.getFunctionAddress("glGetInternalformativ")) != 0; + } + + private boolean ARB_internalformat_query2_initNativeFunctionAddresses() { + return + (glGetInternalformati64v = GLContext.getFunctionAddress("glGetInternalformati64v")) != 0; + } + + private boolean ARB_invalidate_subdata_initNativeFunctionAddresses() { + return + (glInvalidateTexSubImage = GLContext.getFunctionAddress("glInvalidateTexSubImage")) != 0 & + (glInvalidateTexImage = GLContext.getFunctionAddress("glInvalidateTexImage")) != 0 & + (glInvalidateBufferSubData = GLContext.getFunctionAddress("glInvalidateBufferSubData")) != 0 & + (glInvalidateBufferData = GLContext.getFunctionAddress("glInvalidateBufferData")) != 0 & + (glInvalidateFramebuffer = GLContext.getFunctionAddress("glInvalidateFramebuffer")) != 0 & + (glInvalidateSubFramebuffer = GLContext.getFunctionAddress("glInvalidateSubFramebuffer")) != 0; + } + + private boolean ARB_map_buffer_range_initNativeFunctionAddresses() { + return + (glMapBufferRange = GLContext.getFunctionAddress("glMapBufferRange")) != 0 & + (glFlushMappedBufferRange = GLContext.getFunctionAddress("glFlushMappedBufferRange")) != 0; + } + + private boolean ARB_matrix_palette_initNativeFunctionAddresses() { + return + (glCurrentPaletteMatrixARB = GLContext.getFunctionAddress("glCurrentPaletteMatrixARB")) != 0 & + (glMatrixIndexPointerARB = GLContext.getFunctionAddress("glMatrixIndexPointerARB")) != 0 & + (glMatrixIndexubvARB = GLContext.getFunctionAddress("glMatrixIndexubvARB")) != 0 & + (glMatrixIndexusvARB = GLContext.getFunctionAddress("glMatrixIndexusvARB")) != 0 & + (glMatrixIndexuivARB = GLContext.getFunctionAddress("glMatrixIndexuivARB")) != 0; + } + + private boolean ARB_multi_bind_initNativeFunctionAddresses() { + return + (glBindBuffersBase = GLContext.getFunctionAddress("glBindBuffersBase")) != 0 & + (glBindBuffersRange = GLContext.getFunctionAddress("glBindBuffersRange")) != 0 & + (glBindTextures = GLContext.getFunctionAddress("glBindTextures")) != 0 & + (glBindSamplers = GLContext.getFunctionAddress("glBindSamplers")) != 0 & + (glBindImageTextures = GLContext.getFunctionAddress("glBindImageTextures")) != 0 & + (glBindVertexBuffers = GLContext.getFunctionAddress("glBindVertexBuffers")) != 0; + } + + private boolean ARB_multi_draw_indirect_initNativeFunctionAddresses() { + return + (glMultiDrawArraysIndirect = GLContext.getFunctionAddress("glMultiDrawArraysIndirect")) != 0 & + (glMultiDrawElementsIndirect = GLContext.getFunctionAddress("glMultiDrawElementsIndirect")) != 0; + } + + private boolean ARB_multisample_initNativeFunctionAddresses() { + return + (glSampleCoverageARB = GLContext.getFunctionAddress("glSampleCoverageARB")) != 0; + } + + private boolean ARB_multitexture_initNativeFunctionAddresses() { + return + (glClientActiveTextureARB = GLContext.getFunctionAddress("glClientActiveTextureARB")) != 0 & + (glActiveTextureARB = GLContext.getFunctionAddress("glActiveTextureARB")) != 0 & + (glMultiTexCoord1fARB = GLContext.getFunctionAddress("glMultiTexCoord1fARB")) != 0 & + (glMultiTexCoord1dARB = GLContext.getFunctionAddress("glMultiTexCoord1dARB")) != 0 & + (glMultiTexCoord1iARB = GLContext.getFunctionAddress("glMultiTexCoord1iARB")) != 0 & + (glMultiTexCoord1sARB = GLContext.getFunctionAddress("glMultiTexCoord1sARB")) != 0 & + (glMultiTexCoord2fARB = GLContext.getFunctionAddress("glMultiTexCoord2fARB")) != 0 & + (glMultiTexCoord2dARB = GLContext.getFunctionAddress("glMultiTexCoord2dARB")) != 0 & + (glMultiTexCoord2iARB = GLContext.getFunctionAddress("glMultiTexCoord2iARB")) != 0 & + (glMultiTexCoord2sARB = GLContext.getFunctionAddress("glMultiTexCoord2sARB")) != 0 & + (glMultiTexCoord3fARB = GLContext.getFunctionAddress("glMultiTexCoord3fARB")) != 0 & + (glMultiTexCoord3dARB = GLContext.getFunctionAddress("glMultiTexCoord3dARB")) != 0 & + (glMultiTexCoord3iARB = GLContext.getFunctionAddress("glMultiTexCoord3iARB")) != 0 & + (glMultiTexCoord3sARB = GLContext.getFunctionAddress("glMultiTexCoord3sARB")) != 0 & + (glMultiTexCoord4fARB = GLContext.getFunctionAddress("glMultiTexCoord4fARB")) != 0 & + (glMultiTexCoord4dARB = GLContext.getFunctionAddress("glMultiTexCoord4dARB")) != 0 & + (glMultiTexCoord4iARB = GLContext.getFunctionAddress("glMultiTexCoord4iARB")) != 0 & + (glMultiTexCoord4sARB = GLContext.getFunctionAddress("glMultiTexCoord4sARB")) != 0; + } + + private boolean ARB_occlusion_query_initNativeFunctionAddresses() { + return + (glGenQueriesARB = GLContext.getFunctionAddress("glGenQueriesARB")) != 0 & + (glDeleteQueriesARB = GLContext.getFunctionAddress("glDeleteQueriesARB")) != 0 & + (glIsQueryARB = GLContext.getFunctionAddress("glIsQueryARB")) != 0 & + (glBeginQueryARB = GLContext.getFunctionAddress("glBeginQueryARB")) != 0 & + (glEndQueryARB = GLContext.getFunctionAddress("glEndQueryARB")) != 0 & + (glGetQueryivARB = GLContext.getFunctionAddress("glGetQueryivARB")) != 0 & + (glGetQueryObjectivARB = GLContext.getFunctionAddress("glGetQueryObjectivARB")) != 0 & + (glGetQueryObjectuivARB = GLContext.getFunctionAddress("glGetQueryObjectuivARB")) != 0; + } + + private boolean ARB_point_parameters_initNativeFunctionAddresses() { + return + (glPointParameterfARB = GLContext.getFunctionAddress("glPointParameterfARB")) != 0 & + (glPointParameterfvARB = GLContext.getFunctionAddress("glPointParameterfvARB")) != 0; + } + + private boolean ARB_program_initNativeFunctionAddresses() { + return + (glProgramStringARB = GLContext.getFunctionAddress("glProgramStringARB")) != 0 & + (glBindProgramARB = GLContext.getFunctionAddress("glBindProgramARB")) != 0 & + (glDeleteProgramsARB = GLContext.getFunctionAddress("glDeleteProgramsARB")) != 0 & + (glGenProgramsARB = GLContext.getFunctionAddress("glGenProgramsARB")) != 0 & + (glProgramEnvParameter4fARB = GLContext.getFunctionAddress("glProgramEnvParameter4fARB")) != 0 & + (glProgramEnvParameter4dARB = GLContext.getFunctionAddress("glProgramEnvParameter4dARB")) != 0 & + (glProgramEnvParameter4fvARB = GLContext.getFunctionAddress("glProgramEnvParameter4fvARB")) != 0 & + (glProgramEnvParameter4dvARB = GLContext.getFunctionAddress("glProgramEnvParameter4dvARB")) != 0 & + (glProgramLocalParameter4fARB = GLContext.getFunctionAddress("glProgramLocalParameter4fARB")) != 0 & + (glProgramLocalParameter4dARB = GLContext.getFunctionAddress("glProgramLocalParameter4dARB")) != 0 & + (glProgramLocalParameter4fvARB = GLContext.getFunctionAddress("glProgramLocalParameter4fvARB")) != 0 & + (glProgramLocalParameter4dvARB = GLContext.getFunctionAddress("glProgramLocalParameter4dvARB")) != 0 & + (glGetProgramEnvParameterfvARB = GLContext.getFunctionAddress("glGetProgramEnvParameterfvARB")) != 0 & + (glGetProgramEnvParameterdvARB = GLContext.getFunctionAddress("glGetProgramEnvParameterdvARB")) != 0 & + (glGetProgramLocalParameterfvARB = GLContext.getFunctionAddress("glGetProgramLocalParameterfvARB")) != 0 & + (glGetProgramLocalParameterdvARB = GLContext.getFunctionAddress("glGetProgramLocalParameterdvARB")) != 0 & + (glGetProgramivARB = GLContext.getFunctionAddress("glGetProgramivARB")) != 0 & + (glGetProgramStringARB = GLContext.getFunctionAddress("glGetProgramStringARB")) != 0 & + (glIsProgramARB = GLContext.getFunctionAddress("glIsProgramARB")) != 0; + } + + private boolean ARB_program_interface_query_initNativeFunctionAddresses() { + return + (glGetProgramInterfaceiv = GLContext.getFunctionAddress("glGetProgramInterfaceiv")) != 0 & + (glGetProgramResourceIndex = GLContext.getFunctionAddress("glGetProgramResourceIndex")) != 0 & + (glGetProgramResourceName = GLContext.getFunctionAddress("glGetProgramResourceName")) != 0 & + (glGetProgramResourceiv = GLContext.getFunctionAddress("glGetProgramResourceiv")) != 0 & + (glGetProgramResourceLocation = GLContext.getFunctionAddress("glGetProgramResourceLocation")) != 0 & + (glGetProgramResourceLocationIndex = GLContext.getFunctionAddress("glGetProgramResourceLocationIndex")) != 0; + } + + private boolean ARB_provoking_vertex_initNativeFunctionAddresses() { + return + (glProvokingVertex = GLContext.getFunctionAddress("glProvokingVertex")) != 0; + } + + private boolean ARB_robustness_initNativeFunctionAddresses(boolean forwardCompatible,Set supported_extensions) { + return + (glGetGraphicsResetStatusARB = GLContext.getFunctionAddress("glGetGraphicsResetStatusARB")) != 0 & + (forwardCompatible || (glGetnMapdvARB = GLContext.getFunctionAddress("glGetnMapdvARB")) != 0) & + (forwardCompatible || (glGetnMapfvARB = GLContext.getFunctionAddress("glGetnMapfvARB")) != 0) & + (forwardCompatible || (glGetnMapivARB = GLContext.getFunctionAddress("glGetnMapivARB")) != 0) & + (forwardCompatible || (glGetnPixelMapfvARB = GLContext.getFunctionAddress("glGetnPixelMapfvARB")) != 0) & + (forwardCompatible || (glGetnPixelMapuivARB = GLContext.getFunctionAddress("glGetnPixelMapuivARB")) != 0) & + (forwardCompatible || (glGetnPixelMapusvARB = GLContext.getFunctionAddress("glGetnPixelMapusvARB")) != 0) & + (forwardCompatible || (glGetnPolygonStippleARB = GLContext.getFunctionAddress("glGetnPolygonStippleARB")) != 0) & + (glGetnTexImageARB = GLContext.getFunctionAddress("glGetnTexImageARB")) != 0 & + (glReadnPixelsARB = GLContext.getFunctionAddress("glReadnPixelsARB")) != 0 & + (!supported_extensions.contains("GL_ARB_imaging") || (glGetnColorTableARB = GLContext.getFunctionAddress("glGetnColorTableARB")) != 0) & + (!supported_extensions.contains("GL_ARB_imaging") || (glGetnConvolutionFilterARB = GLContext.getFunctionAddress("glGetnConvolutionFilterARB")) != 0) & + (!supported_extensions.contains("GL_ARB_imaging") || (glGetnSeparableFilterARB = GLContext.getFunctionAddress("glGetnSeparableFilterARB")) != 0) & + (!supported_extensions.contains("GL_ARB_imaging") || (glGetnHistogramARB = GLContext.getFunctionAddress("glGetnHistogramARB")) != 0) & + (!supported_extensions.contains("GL_ARB_imaging") || (glGetnMinmaxARB = GLContext.getFunctionAddress("glGetnMinmaxARB")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glGetnCompressedTexImageARB = GLContext.getFunctionAddress("glGetnCompressedTexImageARB")) != 0) & + (!supported_extensions.contains("OpenGL20") || (glGetnUniformfvARB = GLContext.getFunctionAddress("glGetnUniformfvARB")) != 0) & + (!supported_extensions.contains("OpenGL20") || (glGetnUniformivARB = GLContext.getFunctionAddress("glGetnUniformivARB")) != 0) & + (!supported_extensions.contains("OpenGL20") || (glGetnUniformuivARB = GLContext.getFunctionAddress("glGetnUniformuivARB")) != 0) & + (!supported_extensions.contains("OpenGL20") || (glGetnUniformdvARB = GLContext.getFunctionAddress("glGetnUniformdvARB")) != 0); + } + + private boolean ARB_sample_shading_initNativeFunctionAddresses() { + return + (glMinSampleShadingARB = GLContext.getFunctionAddress("glMinSampleShadingARB")) != 0; + } + + private boolean ARB_sampler_objects_initNativeFunctionAddresses() { + return + (glGenSamplers = GLContext.getFunctionAddress("glGenSamplers")) != 0 & + (glDeleteSamplers = GLContext.getFunctionAddress("glDeleteSamplers")) != 0 & + (glIsSampler = GLContext.getFunctionAddress("glIsSampler")) != 0 & + (glBindSampler = GLContext.getFunctionAddress("glBindSampler")) != 0 & + (glSamplerParameteri = GLContext.getFunctionAddress("glSamplerParameteri")) != 0 & + (glSamplerParameterf = GLContext.getFunctionAddress("glSamplerParameterf")) != 0 & + (glSamplerParameteriv = GLContext.getFunctionAddress("glSamplerParameteriv")) != 0 & + (glSamplerParameterfv = GLContext.getFunctionAddress("glSamplerParameterfv")) != 0 & + (glSamplerParameterIiv = GLContext.getFunctionAddress("glSamplerParameterIiv")) != 0 & + (glSamplerParameterIuiv = GLContext.getFunctionAddress("glSamplerParameterIuiv")) != 0 & + (glGetSamplerParameteriv = GLContext.getFunctionAddress("glGetSamplerParameteriv")) != 0 & + (glGetSamplerParameterfv = GLContext.getFunctionAddress("glGetSamplerParameterfv")) != 0 & + (glGetSamplerParameterIiv = GLContext.getFunctionAddress("glGetSamplerParameterIiv")) != 0 & + (glGetSamplerParameterIuiv = GLContext.getFunctionAddress("glGetSamplerParameterIuiv")) != 0; + } + + private boolean ARB_separate_shader_objects_initNativeFunctionAddresses() { + return + (glUseProgramStages = GLContext.getFunctionAddress("glUseProgramStages")) != 0 & + (glActiveShaderProgram = GLContext.getFunctionAddress("glActiveShaderProgram")) != 0 & + (glCreateShaderProgramv = GLContext.getFunctionAddress("glCreateShaderProgramv")) != 0 & + (glBindProgramPipeline = GLContext.getFunctionAddress("glBindProgramPipeline")) != 0 & + (glDeleteProgramPipelines = GLContext.getFunctionAddress("glDeleteProgramPipelines")) != 0 & + (glGenProgramPipelines = GLContext.getFunctionAddress("glGenProgramPipelines")) != 0 & + (glIsProgramPipeline = GLContext.getFunctionAddress("glIsProgramPipeline")) != 0 & + (glProgramParameteri = GLContext.getFunctionAddress("glProgramParameteri")) != 0 & + (glGetProgramPipelineiv = GLContext.getFunctionAddress("glGetProgramPipelineiv")) != 0 & + (glProgramUniform1i = GLContext.getFunctionAddress("glProgramUniform1i")) != 0 & + (glProgramUniform2i = GLContext.getFunctionAddress("glProgramUniform2i")) != 0 & + (glProgramUniform3i = GLContext.getFunctionAddress("glProgramUniform3i")) != 0 & + (glProgramUniform4i = GLContext.getFunctionAddress("glProgramUniform4i")) != 0 & + (glProgramUniform1f = GLContext.getFunctionAddress("glProgramUniform1f")) != 0 & + (glProgramUniform2f = GLContext.getFunctionAddress("glProgramUniform2f")) != 0 & + (glProgramUniform3f = GLContext.getFunctionAddress("glProgramUniform3f")) != 0 & + (glProgramUniform4f = GLContext.getFunctionAddress("glProgramUniform4f")) != 0 & + (glProgramUniform1d = GLContext.getFunctionAddress("glProgramUniform1d")) != 0 & + (glProgramUniform2d = GLContext.getFunctionAddress("glProgramUniform2d")) != 0 & + (glProgramUniform3d = GLContext.getFunctionAddress("glProgramUniform3d")) != 0 & + (glProgramUniform4d = GLContext.getFunctionAddress("glProgramUniform4d")) != 0 & + (glProgramUniform1iv = GLContext.getFunctionAddress("glProgramUniform1iv")) != 0 & + (glProgramUniform2iv = GLContext.getFunctionAddress("glProgramUniform2iv")) != 0 & + (glProgramUniform3iv = GLContext.getFunctionAddress("glProgramUniform3iv")) != 0 & + (glProgramUniform4iv = GLContext.getFunctionAddress("glProgramUniform4iv")) != 0 & + (glProgramUniform1fv = GLContext.getFunctionAddress("glProgramUniform1fv")) != 0 & + (glProgramUniform2fv = GLContext.getFunctionAddress("glProgramUniform2fv")) != 0 & + (glProgramUniform3fv = GLContext.getFunctionAddress("glProgramUniform3fv")) != 0 & + (glProgramUniform4fv = GLContext.getFunctionAddress("glProgramUniform4fv")) != 0 & + (glProgramUniform1dv = GLContext.getFunctionAddress("glProgramUniform1dv")) != 0 & + (glProgramUniform2dv = GLContext.getFunctionAddress("glProgramUniform2dv")) != 0 & + (glProgramUniform3dv = GLContext.getFunctionAddress("glProgramUniform3dv")) != 0 & + (glProgramUniform4dv = GLContext.getFunctionAddress("glProgramUniform4dv")) != 0 & + (glProgramUniform1ui = GLContext.getFunctionAddress("glProgramUniform1ui")) != 0 & + (glProgramUniform2ui = GLContext.getFunctionAddress("glProgramUniform2ui")) != 0 & + (glProgramUniform3ui = GLContext.getFunctionAddress("glProgramUniform3ui")) != 0 & + (glProgramUniform4ui = GLContext.getFunctionAddress("glProgramUniform4ui")) != 0 & + (glProgramUniform1uiv = GLContext.getFunctionAddress("glProgramUniform1uiv")) != 0 & + (glProgramUniform2uiv = GLContext.getFunctionAddress("glProgramUniform2uiv")) != 0 & + (glProgramUniform3uiv = GLContext.getFunctionAddress("glProgramUniform3uiv")) != 0 & + (glProgramUniform4uiv = GLContext.getFunctionAddress("glProgramUniform4uiv")) != 0 & + (glProgramUniformMatrix2fv = GLContext.getFunctionAddress("glProgramUniformMatrix2fv")) != 0 & + (glProgramUniformMatrix3fv = GLContext.getFunctionAddress("glProgramUniformMatrix3fv")) != 0 & + (glProgramUniformMatrix4fv = GLContext.getFunctionAddress("glProgramUniformMatrix4fv")) != 0 & + (glProgramUniformMatrix2dv = GLContext.getFunctionAddress("glProgramUniformMatrix2dv")) != 0 & + (glProgramUniformMatrix3dv = GLContext.getFunctionAddress("glProgramUniformMatrix3dv")) != 0 & + (glProgramUniformMatrix4dv = GLContext.getFunctionAddress("glProgramUniformMatrix4dv")) != 0 & + (glProgramUniformMatrix2x3fv = GLContext.getFunctionAddress("glProgramUniformMatrix2x3fv")) != 0 & + (glProgramUniformMatrix3x2fv = GLContext.getFunctionAddress("glProgramUniformMatrix3x2fv")) != 0 & + (glProgramUniformMatrix2x4fv = GLContext.getFunctionAddress("glProgramUniformMatrix2x4fv")) != 0 & + (glProgramUniformMatrix4x2fv = GLContext.getFunctionAddress("glProgramUniformMatrix4x2fv")) != 0 & + (glProgramUniformMatrix3x4fv = GLContext.getFunctionAddress("glProgramUniformMatrix3x4fv")) != 0 & + (glProgramUniformMatrix4x3fv = GLContext.getFunctionAddress("glProgramUniformMatrix4x3fv")) != 0 & + (glProgramUniformMatrix2x3dv = GLContext.getFunctionAddress("glProgramUniformMatrix2x3dv")) != 0 & + (glProgramUniformMatrix3x2dv = GLContext.getFunctionAddress("glProgramUniformMatrix3x2dv")) != 0 & + (glProgramUniformMatrix2x4dv = GLContext.getFunctionAddress("glProgramUniformMatrix2x4dv")) != 0 & + (glProgramUniformMatrix4x2dv = GLContext.getFunctionAddress("glProgramUniformMatrix4x2dv")) != 0 & + (glProgramUniformMatrix3x4dv = GLContext.getFunctionAddress("glProgramUniformMatrix3x4dv")) != 0 & + (glProgramUniformMatrix4x3dv = GLContext.getFunctionAddress("glProgramUniformMatrix4x3dv")) != 0 & + (glValidateProgramPipeline = GLContext.getFunctionAddress("glValidateProgramPipeline")) != 0 & + (glGetProgramPipelineInfoLog = GLContext.getFunctionAddress("glGetProgramPipelineInfoLog")) != 0; + } + + private boolean ARB_shader_atomic_counters_initNativeFunctionAddresses() { + return + (glGetActiveAtomicCounterBufferiv = GLContext.getFunctionAddress("glGetActiveAtomicCounterBufferiv")) != 0; + } + + private boolean ARB_shader_image_load_store_initNativeFunctionAddresses() { + return + (glBindImageTexture = GLContext.getFunctionAddress("glBindImageTexture")) != 0 & + (glMemoryBarrier = GLContext.getFunctionAddress("glMemoryBarrier")) != 0; + } + + private boolean ARB_shader_objects_initNativeFunctionAddresses() { + return + (glDeleteObjectARB = GLContext.getFunctionAddress("glDeleteObjectARB")) != 0 & + (glGetHandleARB = GLContext.getFunctionAddress("glGetHandleARB")) != 0 & + (glDetachObjectARB = GLContext.getFunctionAddress("glDetachObjectARB")) != 0 & + (glCreateShaderObjectARB = GLContext.getFunctionAddress("glCreateShaderObjectARB")) != 0 & + (glShaderSourceARB = GLContext.getFunctionAddress("glShaderSourceARB")) != 0 & + (glCompileShaderARB = GLContext.getFunctionAddress("glCompileShaderARB")) != 0 & + (glCreateProgramObjectARB = GLContext.getFunctionAddress("glCreateProgramObjectARB")) != 0 & + (glAttachObjectARB = GLContext.getFunctionAddress("glAttachObjectARB")) != 0 & + (glLinkProgramARB = GLContext.getFunctionAddress("glLinkProgramARB")) != 0 & + (glUseProgramObjectARB = GLContext.getFunctionAddress("glUseProgramObjectARB")) != 0 & + (glValidateProgramARB = GLContext.getFunctionAddress("glValidateProgramARB")) != 0 & + (glUniform1fARB = GLContext.getFunctionAddress("glUniform1fARB")) != 0 & + (glUniform2fARB = GLContext.getFunctionAddress("glUniform2fARB")) != 0 & + (glUniform3fARB = GLContext.getFunctionAddress("glUniform3fARB")) != 0 & + (glUniform4fARB = GLContext.getFunctionAddress("glUniform4fARB")) != 0 & + (glUniform1iARB = GLContext.getFunctionAddress("glUniform1iARB")) != 0 & + (glUniform2iARB = GLContext.getFunctionAddress("glUniform2iARB")) != 0 & + (glUniform3iARB = GLContext.getFunctionAddress("glUniform3iARB")) != 0 & + (glUniform4iARB = GLContext.getFunctionAddress("glUniform4iARB")) != 0 & + (glUniform1fvARB = GLContext.getFunctionAddress("glUniform1fvARB")) != 0 & + (glUniform2fvARB = GLContext.getFunctionAddress("glUniform2fvARB")) != 0 & + (glUniform3fvARB = GLContext.getFunctionAddress("glUniform3fvARB")) != 0 & + (glUniform4fvARB = GLContext.getFunctionAddress("glUniform4fvARB")) != 0 & + (glUniform1ivARB = GLContext.getFunctionAddress("glUniform1ivARB")) != 0 & + (glUniform2ivARB = GLContext.getFunctionAddress("glUniform2ivARB")) != 0 & + (glUniform3ivARB = GLContext.getFunctionAddress("glUniform3ivARB")) != 0 & + (glUniform4ivARB = GLContext.getFunctionAddress("glUniform4ivARB")) != 0 & + (glUniformMatrix2fvARB = GLContext.getFunctionAddress("glUniformMatrix2fvARB")) != 0 & + (glUniformMatrix3fvARB = GLContext.getFunctionAddress("glUniformMatrix3fvARB")) != 0 & + (glUniformMatrix4fvARB = GLContext.getFunctionAddress("glUniformMatrix4fvARB")) != 0 & + (glGetObjectParameterfvARB = GLContext.getFunctionAddress("glGetObjectParameterfvARB")) != 0 & + (glGetObjectParameterivARB = GLContext.getFunctionAddress("glGetObjectParameterivARB")) != 0 & + (glGetInfoLogARB = GLContext.getFunctionAddress("glGetInfoLogARB")) != 0 & + (glGetAttachedObjectsARB = GLContext.getFunctionAddress("glGetAttachedObjectsARB")) != 0 & + (glGetUniformLocationARB = GLContext.getFunctionAddress("glGetUniformLocationARB")) != 0 & + (glGetActiveUniformARB = GLContext.getFunctionAddress("glGetActiveUniformARB")) != 0 & + (glGetUniformfvARB = GLContext.getFunctionAddress("glGetUniformfvARB")) != 0 & + (glGetUniformivARB = GLContext.getFunctionAddress("glGetUniformivARB")) != 0 & + (glGetShaderSourceARB = GLContext.getFunctionAddress("glGetShaderSourceARB")) != 0; + } + + private boolean ARB_shader_storage_buffer_object_initNativeFunctionAddresses() { + return + (glShaderStorageBlockBinding = GLContext.getFunctionAddress("glShaderStorageBlockBinding")) != 0; + } + + private boolean ARB_shader_subroutine_initNativeFunctionAddresses() { + return + (glGetSubroutineUniformLocation = GLContext.getFunctionAddress("glGetSubroutineUniformLocation")) != 0 & + (glGetSubroutineIndex = GLContext.getFunctionAddress("glGetSubroutineIndex")) != 0 & + (glGetActiveSubroutineUniformiv = GLContext.getFunctionAddress("glGetActiveSubroutineUniformiv")) != 0 & + (glGetActiveSubroutineUniformName = GLContext.getFunctionAddress("glGetActiveSubroutineUniformName")) != 0 & + (glGetActiveSubroutineName = GLContext.getFunctionAddress("glGetActiveSubroutineName")) != 0 & + (glUniformSubroutinesuiv = GLContext.getFunctionAddress("glUniformSubroutinesuiv")) != 0 & + (glGetUniformSubroutineuiv = GLContext.getFunctionAddress("glGetUniformSubroutineuiv")) != 0 & + (glGetProgramStageiv = GLContext.getFunctionAddress("glGetProgramStageiv")) != 0; + } + + private boolean ARB_shading_language_include_initNativeFunctionAddresses() { + return + (glNamedStringARB = GLContext.getFunctionAddress("glNamedStringARB")) != 0 & + (glDeleteNamedStringARB = GLContext.getFunctionAddress("glDeleteNamedStringARB")) != 0 & + (glCompileShaderIncludeARB = GLContext.getFunctionAddress("glCompileShaderIncludeARB")) != 0 & + (glIsNamedStringARB = GLContext.getFunctionAddress("glIsNamedStringARB")) != 0 & + (glGetNamedStringARB = GLContext.getFunctionAddress("glGetNamedStringARB")) != 0 & + (glGetNamedStringivARB = GLContext.getFunctionAddress("glGetNamedStringivARB")) != 0; + } + + private boolean ARB_sparse_texture_initNativeFunctionAddresses(Set supported_extensions) { + return + (glTexPageCommitmentARB = GLContext.getFunctionAddress("glTexPageCommitmentARB")) != 0 & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glTexturePageCommitmentEXT = GLContext.getFunctionAddress("glTexturePageCommitmentEXT")) != 0); + } + + private boolean ARB_sync_initNativeFunctionAddresses() { + return + (glFenceSync = GLContext.getFunctionAddress("glFenceSync")) != 0 & + (glIsSync = GLContext.getFunctionAddress("glIsSync")) != 0 & + (glDeleteSync = GLContext.getFunctionAddress("glDeleteSync")) != 0 & + (glClientWaitSync = GLContext.getFunctionAddress("glClientWaitSync")) != 0 & + (glWaitSync = GLContext.getFunctionAddress("glWaitSync")) != 0 & + (glGetInteger64v = GLContext.getFunctionAddress("glGetInteger64v")) != 0 & + (glGetSynciv = GLContext.getFunctionAddress("glGetSynciv")) != 0; + } + + private boolean ARB_tessellation_shader_initNativeFunctionAddresses() { + return + (glPatchParameteri = GLContext.getFunctionAddress("glPatchParameteri")) != 0 & + (glPatchParameterfv = GLContext.getFunctionAddress("glPatchParameterfv")) != 0; + } + + private boolean ARB_texture_buffer_object_initNativeFunctionAddresses() { + return + (glTexBufferARB = GLContext.getFunctionAddress("glTexBufferARB")) != 0; + } + + private boolean ARB_texture_buffer_range_initNativeFunctionAddresses(Set supported_extensions) { + return + (glTexBufferRange = GLContext.getFunctionAddress("glTexBufferRange")) != 0 & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glTextureBufferRangeEXT = GLContext.getFunctionAddress("glTextureBufferRangeEXT")) != 0); + } + + private boolean ARB_texture_compression_initNativeFunctionAddresses() { + return + (glCompressedTexImage1DARB = GLContext.getFunctionAddress("glCompressedTexImage1DARB")) != 0 & + (glCompressedTexImage2DARB = GLContext.getFunctionAddress("glCompressedTexImage2DARB")) != 0 & + (glCompressedTexImage3DARB = GLContext.getFunctionAddress("glCompressedTexImage3DARB")) != 0 & + (glCompressedTexSubImage1DARB = GLContext.getFunctionAddress("glCompressedTexSubImage1DARB")) != 0 & + (glCompressedTexSubImage2DARB = GLContext.getFunctionAddress("glCompressedTexSubImage2DARB")) != 0 & + (glCompressedTexSubImage3DARB = GLContext.getFunctionAddress("glCompressedTexSubImage3DARB")) != 0 & + (glGetCompressedTexImageARB = GLContext.getFunctionAddress("glGetCompressedTexImageARB")) != 0; + } + + private boolean ARB_texture_multisample_initNativeFunctionAddresses() { + return + (glTexImage2DMultisample = GLContext.getFunctionAddress("glTexImage2DMultisample")) != 0 & + (glTexImage3DMultisample = GLContext.getFunctionAddress("glTexImage3DMultisample")) != 0 & + (glGetMultisamplefv = GLContext.getFunctionAddress("glGetMultisamplefv")) != 0 & + (glSampleMaski = GLContext.getFunctionAddress("glSampleMaski")) != 0; + } + + private boolean ARB_texture_storage_initNativeFunctionAddresses(Set supported_extensions) { + return + (glTexStorage1D = GLContext.getFunctionAddress(new String[] {"glTexStorage1D","glTexStorage1DEXT"})) != 0 & + (glTexStorage2D = GLContext.getFunctionAddress(new String[] {"glTexStorage2D","glTexStorage2DEXT"})) != 0 & + (glTexStorage3D = GLContext.getFunctionAddress(new String[] {"glTexStorage3D","glTexStorage3DEXT"})) != 0 & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glTextureStorage1DEXT = GLContext.getFunctionAddress(new String[] {"glTextureStorage1DEXT","glTextureStorage1DEXTEXT"})) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glTextureStorage2DEXT = GLContext.getFunctionAddress(new String[] {"glTextureStorage2DEXT","glTextureStorage2DEXTEXT"})) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glTextureStorage3DEXT = GLContext.getFunctionAddress(new String[] {"glTextureStorage3DEXT","glTextureStorage3DEXTEXT"})) != 0); + } + + private boolean ARB_texture_storage_multisample_initNativeFunctionAddresses(Set supported_extensions) { + return + (glTexStorage2DMultisample = GLContext.getFunctionAddress("glTexStorage2DMultisample")) != 0 & + (glTexStorage3DMultisample = GLContext.getFunctionAddress("glTexStorage3DMultisample")) != 0 & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glTextureStorage2DMultisampleEXT = GLContext.getFunctionAddress("glTextureStorage2DMultisampleEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glTextureStorage3DMultisampleEXT = GLContext.getFunctionAddress("glTextureStorage3DMultisampleEXT")) != 0); + } + + private boolean ARB_texture_view_initNativeFunctionAddresses() { + return + (glTextureView = GLContext.getFunctionAddress("glTextureView")) != 0; + } + + private boolean ARB_timer_query_initNativeFunctionAddresses() { + return + (glQueryCounter = GLContext.getFunctionAddress("glQueryCounter")) != 0 & + (glGetQueryObjecti64v = GLContext.getFunctionAddress("glGetQueryObjecti64v")) != 0 & + (glGetQueryObjectui64v = GLContext.getFunctionAddress("glGetQueryObjectui64v")) != 0; + } + + private boolean ARB_transform_feedback2_initNativeFunctionAddresses() { + return + (glBindTransformFeedback = GLContext.getFunctionAddress("glBindTransformFeedback")) != 0 & + (glDeleteTransformFeedbacks = GLContext.getFunctionAddress("glDeleteTransformFeedbacks")) != 0 & + (glGenTransformFeedbacks = GLContext.getFunctionAddress("glGenTransformFeedbacks")) != 0 & + (glIsTransformFeedback = GLContext.getFunctionAddress("glIsTransformFeedback")) != 0 & + (glPauseTransformFeedback = GLContext.getFunctionAddress("glPauseTransformFeedback")) != 0 & + (glResumeTransformFeedback = GLContext.getFunctionAddress("glResumeTransformFeedback")) != 0 & + (glDrawTransformFeedback = GLContext.getFunctionAddress("glDrawTransformFeedback")) != 0; + } + + private boolean ARB_transform_feedback3_initNativeFunctionAddresses() { + return + (glDrawTransformFeedbackStream = GLContext.getFunctionAddress("glDrawTransformFeedbackStream")) != 0 & + (glBeginQueryIndexed = GLContext.getFunctionAddress("glBeginQueryIndexed")) != 0 & + (glEndQueryIndexed = GLContext.getFunctionAddress("glEndQueryIndexed")) != 0 & + (glGetQueryIndexediv = GLContext.getFunctionAddress("glGetQueryIndexediv")) != 0; + } + + private boolean ARB_transform_feedback_instanced_initNativeFunctionAddresses() { + return + (glDrawTransformFeedbackInstanced = GLContext.getFunctionAddress("glDrawTransformFeedbackInstanced")) != 0 & + (glDrawTransformFeedbackStreamInstanced = GLContext.getFunctionAddress("glDrawTransformFeedbackStreamInstanced")) != 0; + } + + private boolean ARB_transpose_matrix_initNativeFunctionAddresses() { + return + (glLoadTransposeMatrixfARB = GLContext.getFunctionAddress("glLoadTransposeMatrixfARB")) != 0 & + (glMultTransposeMatrixfARB = GLContext.getFunctionAddress("glMultTransposeMatrixfARB")) != 0; + } + + private boolean ARB_uniform_buffer_object_initNativeFunctionAddresses() { + return + (glGetUniformIndices = GLContext.getFunctionAddress("glGetUniformIndices")) != 0 & + (glGetActiveUniformsiv = GLContext.getFunctionAddress("glGetActiveUniformsiv")) != 0 & + (glGetActiveUniformName = GLContext.getFunctionAddress("glGetActiveUniformName")) != 0 & + (glGetUniformBlockIndex = GLContext.getFunctionAddress("glGetUniformBlockIndex")) != 0 & + (glGetActiveUniformBlockiv = GLContext.getFunctionAddress("glGetActiveUniformBlockiv")) != 0 & + (glGetActiveUniformBlockName = GLContext.getFunctionAddress("glGetActiveUniformBlockName")) != 0 & + (glBindBufferRange = GLContext.getFunctionAddress("glBindBufferRange")) != 0 & + (glBindBufferBase = GLContext.getFunctionAddress("glBindBufferBase")) != 0 & + (glGetIntegeri_v = GLContext.getFunctionAddress("glGetIntegeri_v")) != 0 & + (glUniformBlockBinding = GLContext.getFunctionAddress("glUniformBlockBinding")) != 0; + } + + private boolean ARB_vertex_array_object_initNativeFunctionAddresses() { + return + (glBindVertexArray = GLContext.getFunctionAddress("glBindVertexArray")) != 0 & + (glDeleteVertexArrays = GLContext.getFunctionAddress("glDeleteVertexArrays")) != 0 & + (glGenVertexArrays = GLContext.getFunctionAddress("glGenVertexArrays")) != 0 & + (glIsVertexArray = GLContext.getFunctionAddress("glIsVertexArray")) != 0; + } + + private boolean ARB_vertex_attrib_64bit_initNativeFunctionAddresses(Set supported_extensions) { + return + (glVertexAttribL1d = GLContext.getFunctionAddress("glVertexAttribL1d")) != 0 & + (glVertexAttribL2d = GLContext.getFunctionAddress("glVertexAttribL2d")) != 0 & + (glVertexAttribL3d = GLContext.getFunctionAddress("glVertexAttribL3d")) != 0 & + (glVertexAttribL4d = GLContext.getFunctionAddress("glVertexAttribL4d")) != 0 & + (glVertexAttribL1dv = GLContext.getFunctionAddress("glVertexAttribL1dv")) != 0 & + (glVertexAttribL2dv = GLContext.getFunctionAddress("glVertexAttribL2dv")) != 0 & + (glVertexAttribL3dv = GLContext.getFunctionAddress("glVertexAttribL3dv")) != 0 & + (glVertexAttribL4dv = GLContext.getFunctionAddress("glVertexAttribL4dv")) != 0 & + (glVertexAttribLPointer = GLContext.getFunctionAddress("glVertexAttribLPointer")) != 0 & + (glGetVertexAttribLdv = GLContext.getFunctionAddress("glGetVertexAttribLdv")) != 0 & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glVertexArrayVertexAttribLOffsetEXT = GLContext.getFunctionAddress("glVertexArrayVertexAttribLOffsetEXT")) != 0); + } + + private boolean ARB_vertex_attrib_binding_initNativeFunctionAddresses() { + return + (glBindVertexBuffer = GLContext.getFunctionAddress("glBindVertexBuffer")) != 0 & + (glVertexAttribFormat = GLContext.getFunctionAddress("glVertexAttribFormat")) != 0 & + (glVertexAttribIFormat = GLContext.getFunctionAddress("glVertexAttribIFormat")) != 0 & + (glVertexAttribLFormat = GLContext.getFunctionAddress("glVertexAttribLFormat")) != 0 & + (glVertexAttribBinding = GLContext.getFunctionAddress("glVertexAttribBinding")) != 0 & + (glVertexBindingDivisor = GLContext.getFunctionAddress("glVertexBindingDivisor")) != 0; + } + + private boolean ARB_vertex_blend_initNativeFunctionAddresses() { + return + (glWeightbvARB = GLContext.getFunctionAddress("glWeightbvARB")) != 0 & + (glWeightsvARB = GLContext.getFunctionAddress("glWeightsvARB")) != 0 & + (glWeightivARB = GLContext.getFunctionAddress("glWeightivARB")) != 0 & + (glWeightfvARB = GLContext.getFunctionAddress("glWeightfvARB")) != 0 & + (glWeightdvARB = GLContext.getFunctionAddress("glWeightdvARB")) != 0 & + (glWeightubvARB = GLContext.getFunctionAddress("glWeightubvARB")) != 0 & + (glWeightusvARB = GLContext.getFunctionAddress("glWeightusvARB")) != 0 & + (glWeightuivARB = GLContext.getFunctionAddress("glWeightuivARB")) != 0 & + (glWeightPointerARB = GLContext.getFunctionAddress("glWeightPointerARB")) != 0 & + (glVertexBlendARB = GLContext.getFunctionAddress("glVertexBlendARB")) != 0; + } + + private boolean ARB_vertex_program_initNativeFunctionAddresses() { + return + (glVertexAttrib1sARB = GLContext.getFunctionAddress("glVertexAttrib1sARB")) != 0 & + (glVertexAttrib1fARB = GLContext.getFunctionAddress("glVertexAttrib1fARB")) != 0 & + (glVertexAttrib1dARB = GLContext.getFunctionAddress("glVertexAttrib1dARB")) != 0 & + (glVertexAttrib2sARB = GLContext.getFunctionAddress("glVertexAttrib2sARB")) != 0 & + (glVertexAttrib2fARB = GLContext.getFunctionAddress("glVertexAttrib2fARB")) != 0 & + (glVertexAttrib2dARB = GLContext.getFunctionAddress("glVertexAttrib2dARB")) != 0 & + (glVertexAttrib3sARB = GLContext.getFunctionAddress("glVertexAttrib3sARB")) != 0 & + (glVertexAttrib3fARB = GLContext.getFunctionAddress("glVertexAttrib3fARB")) != 0 & + (glVertexAttrib3dARB = GLContext.getFunctionAddress("glVertexAttrib3dARB")) != 0 & + (glVertexAttrib4sARB = GLContext.getFunctionAddress("glVertexAttrib4sARB")) != 0 & + (glVertexAttrib4fARB = GLContext.getFunctionAddress("glVertexAttrib4fARB")) != 0 & + (glVertexAttrib4dARB = GLContext.getFunctionAddress("glVertexAttrib4dARB")) != 0 & + (glVertexAttrib4NubARB = GLContext.getFunctionAddress("glVertexAttrib4NubARB")) != 0 & + (glVertexAttribPointerARB = GLContext.getFunctionAddress("glVertexAttribPointerARB")) != 0 & + (glEnableVertexAttribArrayARB = GLContext.getFunctionAddress("glEnableVertexAttribArrayARB")) != 0 & + (glDisableVertexAttribArrayARB = GLContext.getFunctionAddress("glDisableVertexAttribArrayARB")) != 0 & + (glGetVertexAttribfvARB = GLContext.getFunctionAddress("glGetVertexAttribfvARB")) != 0 & + (glGetVertexAttribdvARB = GLContext.getFunctionAddress("glGetVertexAttribdvARB")) != 0 & + (glGetVertexAttribivARB = GLContext.getFunctionAddress("glGetVertexAttribivARB")) != 0 & + (glGetVertexAttribPointervARB = GLContext.getFunctionAddress("glGetVertexAttribPointervARB")) != 0; + } + + private boolean ARB_vertex_shader_initNativeFunctionAddresses() { + return + (glVertexAttrib1sARB = GLContext.getFunctionAddress("glVertexAttrib1sARB")) != 0 & + (glVertexAttrib1fARB = GLContext.getFunctionAddress("glVertexAttrib1fARB")) != 0 & + (glVertexAttrib1dARB = GLContext.getFunctionAddress("glVertexAttrib1dARB")) != 0 & + (glVertexAttrib2sARB = GLContext.getFunctionAddress("glVertexAttrib2sARB")) != 0 & + (glVertexAttrib2fARB = GLContext.getFunctionAddress("glVertexAttrib2fARB")) != 0 & + (glVertexAttrib2dARB = GLContext.getFunctionAddress("glVertexAttrib2dARB")) != 0 & + (glVertexAttrib3sARB = GLContext.getFunctionAddress("glVertexAttrib3sARB")) != 0 & + (glVertexAttrib3fARB = GLContext.getFunctionAddress("glVertexAttrib3fARB")) != 0 & + (glVertexAttrib3dARB = GLContext.getFunctionAddress("glVertexAttrib3dARB")) != 0 & + (glVertexAttrib4sARB = GLContext.getFunctionAddress("glVertexAttrib4sARB")) != 0 & + (glVertexAttrib4fARB = GLContext.getFunctionAddress("glVertexAttrib4fARB")) != 0 & + (glVertexAttrib4dARB = GLContext.getFunctionAddress("glVertexAttrib4dARB")) != 0 & + (glVertexAttrib4NubARB = GLContext.getFunctionAddress("glVertexAttrib4NubARB")) != 0 & + (glVertexAttribPointerARB = GLContext.getFunctionAddress("glVertexAttribPointerARB")) != 0 & + (glEnableVertexAttribArrayARB = GLContext.getFunctionAddress("glEnableVertexAttribArrayARB")) != 0 & + (glDisableVertexAttribArrayARB = GLContext.getFunctionAddress("glDisableVertexAttribArrayARB")) != 0 & + (glBindAttribLocationARB = GLContext.getFunctionAddress("glBindAttribLocationARB")) != 0 & + (glGetActiveAttribARB = GLContext.getFunctionAddress("glGetActiveAttribARB")) != 0 & + (glGetAttribLocationARB = GLContext.getFunctionAddress("glGetAttribLocationARB")) != 0 & + (glGetVertexAttribfvARB = GLContext.getFunctionAddress("glGetVertexAttribfvARB")) != 0 & + (glGetVertexAttribdvARB = GLContext.getFunctionAddress("glGetVertexAttribdvARB")) != 0 & + (glGetVertexAttribivARB = GLContext.getFunctionAddress("glGetVertexAttribivARB")) != 0 & + (glGetVertexAttribPointervARB = GLContext.getFunctionAddress("glGetVertexAttribPointervARB")) != 0; + } + + private boolean ARB_vertex_type_2_10_10_10_rev_initNativeFunctionAddresses() { + return + (glVertexP2ui = GLContext.getFunctionAddress("glVertexP2ui")) != 0 & + (glVertexP3ui = GLContext.getFunctionAddress("glVertexP3ui")) != 0 & + (glVertexP4ui = GLContext.getFunctionAddress("glVertexP4ui")) != 0 & + (glVertexP2uiv = GLContext.getFunctionAddress("glVertexP2uiv")) != 0 & + (glVertexP3uiv = GLContext.getFunctionAddress("glVertexP3uiv")) != 0 & + (glVertexP4uiv = GLContext.getFunctionAddress("glVertexP4uiv")) != 0 & + (glTexCoordP1ui = GLContext.getFunctionAddress("glTexCoordP1ui")) != 0 & + (glTexCoordP2ui = GLContext.getFunctionAddress("glTexCoordP2ui")) != 0 & + (glTexCoordP3ui = GLContext.getFunctionAddress("glTexCoordP3ui")) != 0 & + (glTexCoordP4ui = GLContext.getFunctionAddress("glTexCoordP4ui")) != 0 & + (glTexCoordP1uiv = GLContext.getFunctionAddress("glTexCoordP1uiv")) != 0 & + (glTexCoordP2uiv = GLContext.getFunctionAddress("glTexCoordP2uiv")) != 0 & + (glTexCoordP3uiv = GLContext.getFunctionAddress("glTexCoordP3uiv")) != 0 & + (glTexCoordP4uiv = GLContext.getFunctionAddress("glTexCoordP4uiv")) != 0 & + (glMultiTexCoordP1ui = GLContext.getFunctionAddress("glMultiTexCoordP1ui")) != 0 & + (glMultiTexCoordP2ui = GLContext.getFunctionAddress("glMultiTexCoordP2ui")) != 0 & + (glMultiTexCoordP3ui = GLContext.getFunctionAddress("glMultiTexCoordP3ui")) != 0 & + (glMultiTexCoordP4ui = GLContext.getFunctionAddress("glMultiTexCoordP4ui")) != 0 & + (glMultiTexCoordP1uiv = GLContext.getFunctionAddress("glMultiTexCoordP1uiv")) != 0 & + (glMultiTexCoordP2uiv = GLContext.getFunctionAddress("glMultiTexCoordP2uiv")) != 0 & + (glMultiTexCoordP3uiv = GLContext.getFunctionAddress("glMultiTexCoordP3uiv")) != 0 & + (glMultiTexCoordP4uiv = GLContext.getFunctionAddress("glMultiTexCoordP4uiv")) != 0 & + (glNormalP3ui = GLContext.getFunctionAddress("glNormalP3ui")) != 0 & + (glNormalP3uiv = GLContext.getFunctionAddress("glNormalP3uiv")) != 0 & + (glColorP3ui = GLContext.getFunctionAddress("glColorP3ui")) != 0 & + (glColorP4ui = GLContext.getFunctionAddress("glColorP4ui")) != 0 & + (glColorP3uiv = GLContext.getFunctionAddress("glColorP3uiv")) != 0 & + (glColorP4uiv = GLContext.getFunctionAddress("glColorP4uiv")) != 0 & + (glSecondaryColorP3ui = GLContext.getFunctionAddress("glSecondaryColorP3ui")) != 0 & + (glSecondaryColorP3uiv = GLContext.getFunctionAddress("glSecondaryColorP3uiv")) != 0 & + (glVertexAttribP1ui = GLContext.getFunctionAddress("glVertexAttribP1ui")) != 0 & + (glVertexAttribP2ui = GLContext.getFunctionAddress("glVertexAttribP2ui")) != 0 & + (glVertexAttribP3ui = GLContext.getFunctionAddress("glVertexAttribP3ui")) != 0 & + (glVertexAttribP4ui = GLContext.getFunctionAddress("glVertexAttribP4ui")) != 0 & + (glVertexAttribP1uiv = GLContext.getFunctionAddress("glVertexAttribP1uiv")) != 0 & + (glVertexAttribP2uiv = GLContext.getFunctionAddress("glVertexAttribP2uiv")) != 0 & + (glVertexAttribP3uiv = GLContext.getFunctionAddress("glVertexAttribP3uiv")) != 0 & + (glVertexAttribP4uiv = GLContext.getFunctionAddress("glVertexAttribP4uiv")) != 0; + } + + private boolean ARB_viewport_array_initNativeFunctionAddresses() { + return + (glViewportArrayv = GLContext.getFunctionAddress("glViewportArrayv")) != 0 & + (glViewportIndexedf = GLContext.getFunctionAddress("glViewportIndexedf")) != 0 & + (glViewportIndexedfv = GLContext.getFunctionAddress("glViewportIndexedfv")) != 0 & + (glScissorArrayv = GLContext.getFunctionAddress("glScissorArrayv")) != 0 & + (glScissorIndexed = GLContext.getFunctionAddress("glScissorIndexed")) != 0 & + (glScissorIndexedv = GLContext.getFunctionAddress("glScissorIndexedv")) != 0 & + (glDepthRangeArrayv = GLContext.getFunctionAddress("glDepthRangeArrayv")) != 0 & + (glDepthRangeIndexed = GLContext.getFunctionAddress("glDepthRangeIndexed")) != 0 & + (glGetFloati_v = GLContext.getFunctionAddress("glGetFloati_v")) != 0 & + (glGetDoublei_v = GLContext.getFunctionAddress("glGetDoublei_v")) != 0 & + (glGetIntegerIndexedvEXT = GLContext.getFunctionAddress("glGetIntegerIndexedvEXT")) != 0 & + (glEnableIndexedEXT = GLContext.getFunctionAddress("glEnableIndexedEXT")) != 0 & + (glDisableIndexedEXT = GLContext.getFunctionAddress("glDisableIndexedEXT")) != 0 & + (glIsEnabledIndexedEXT = GLContext.getFunctionAddress("glIsEnabledIndexedEXT")) != 0; + } + + private boolean ARB_window_pos_initNativeFunctionAddresses(boolean forwardCompatible) { + return + (forwardCompatible || (glWindowPos2fARB = GLContext.getFunctionAddress("glWindowPos2fARB")) != 0) & + (forwardCompatible || (glWindowPos2dARB = GLContext.getFunctionAddress("glWindowPos2dARB")) != 0) & + (forwardCompatible || (glWindowPos2iARB = GLContext.getFunctionAddress("glWindowPos2iARB")) != 0) & + (forwardCompatible || (glWindowPos2sARB = GLContext.getFunctionAddress("glWindowPos2sARB")) != 0) & + (forwardCompatible || (glWindowPos3fARB = GLContext.getFunctionAddress("glWindowPos3fARB")) != 0) & + (forwardCompatible || (glWindowPos3dARB = GLContext.getFunctionAddress("glWindowPos3dARB")) != 0) & + (forwardCompatible || (glWindowPos3iARB = GLContext.getFunctionAddress("glWindowPos3iARB")) != 0) & + (forwardCompatible || (glWindowPos3sARB = GLContext.getFunctionAddress("glWindowPos3sARB")) != 0); + } + + private boolean ATI_draw_buffers_initNativeFunctionAddresses() { + return + (glDrawBuffersATI = GLContext.getFunctionAddress("glDrawBuffersATI")) != 0; + } + + private boolean ATI_element_array_initNativeFunctionAddresses() { + return + (glElementPointerATI = GLContext.getFunctionAddress("glElementPointerATI")) != 0 & + (glDrawElementArrayATI = GLContext.getFunctionAddress("glDrawElementArrayATI")) != 0 & + (glDrawRangeElementArrayATI = GLContext.getFunctionAddress("glDrawRangeElementArrayATI")) != 0; + } + + private boolean ATI_envmap_bumpmap_initNativeFunctionAddresses() { + return + (glTexBumpParameterfvATI = GLContext.getFunctionAddress("glTexBumpParameterfvATI")) != 0 & + (glTexBumpParameterivATI = GLContext.getFunctionAddress("glTexBumpParameterivATI")) != 0 & + (glGetTexBumpParameterfvATI = GLContext.getFunctionAddress("glGetTexBumpParameterfvATI")) != 0 & + (glGetTexBumpParameterivATI = GLContext.getFunctionAddress("glGetTexBumpParameterivATI")) != 0; + } + + private boolean ATI_fragment_shader_initNativeFunctionAddresses() { + return + (glGenFragmentShadersATI = GLContext.getFunctionAddress("glGenFragmentShadersATI")) != 0 & + (glBindFragmentShaderATI = GLContext.getFunctionAddress("glBindFragmentShaderATI")) != 0 & + (glDeleteFragmentShaderATI = GLContext.getFunctionAddress("glDeleteFragmentShaderATI")) != 0 & + (glBeginFragmentShaderATI = GLContext.getFunctionAddress("glBeginFragmentShaderATI")) != 0 & + (glEndFragmentShaderATI = GLContext.getFunctionAddress("glEndFragmentShaderATI")) != 0 & + (glPassTexCoordATI = GLContext.getFunctionAddress("glPassTexCoordATI")) != 0 & + (glSampleMapATI = GLContext.getFunctionAddress("glSampleMapATI")) != 0 & + (glColorFragmentOp1ATI = GLContext.getFunctionAddress("glColorFragmentOp1ATI")) != 0 & + (glColorFragmentOp2ATI = GLContext.getFunctionAddress("glColorFragmentOp2ATI")) != 0 & + (glColorFragmentOp3ATI = GLContext.getFunctionAddress("glColorFragmentOp3ATI")) != 0 & + (glAlphaFragmentOp1ATI = GLContext.getFunctionAddress("glAlphaFragmentOp1ATI")) != 0 & + (glAlphaFragmentOp2ATI = GLContext.getFunctionAddress("glAlphaFragmentOp2ATI")) != 0 & + (glAlphaFragmentOp3ATI = GLContext.getFunctionAddress("glAlphaFragmentOp3ATI")) != 0 & + (glSetFragmentShaderConstantATI = GLContext.getFunctionAddress("glSetFragmentShaderConstantATI")) != 0; + } + + private boolean ATI_map_object_buffer_initNativeFunctionAddresses() { + return + (glMapObjectBufferATI = GLContext.getFunctionAddress("glMapObjectBufferATI")) != 0 & + (glUnmapObjectBufferATI = GLContext.getFunctionAddress("glUnmapObjectBufferATI")) != 0; + } + + private boolean ATI_pn_triangles_initNativeFunctionAddresses() { + return + (glPNTrianglesfATI = GLContext.getFunctionAddress("glPNTrianglesfATI")) != 0 & + (glPNTrianglesiATI = GLContext.getFunctionAddress("glPNTrianglesiATI")) != 0; + } + + private boolean ATI_separate_stencil_initNativeFunctionAddresses() { + return + (glStencilOpSeparateATI = GLContext.getFunctionAddress("glStencilOpSeparateATI")) != 0 & + (glStencilFuncSeparateATI = GLContext.getFunctionAddress("glStencilFuncSeparateATI")) != 0; + } + + private boolean ATI_vertex_array_object_initNativeFunctionAddresses() { + return + (glNewObjectBufferATI = GLContext.getFunctionAddress("glNewObjectBufferATI")) != 0 & + (glIsObjectBufferATI = GLContext.getFunctionAddress("glIsObjectBufferATI")) != 0 & + (glUpdateObjectBufferATI = GLContext.getFunctionAddress("glUpdateObjectBufferATI")) != 0 & + (glGetObjectBufferfvATI = GLContext.getFunctionAddress("glGetObjectBufferfvATI")) != 0 & + (glGetObjectBufferivATI = GLContext.getFunctionAddress("glGetObjectBufferivATI")) != 0 & + (glFreeObjectBufferATI = GLContext.getFunctionAddress("glFreeObjectBufferATI")) != 0 & + (glArrayObjectATI = GLContext.getFunctionAddress("glArrayObjectATI")) != 0 & + (glGetArrayObjectfvATI = GLContext.getFunctionAddress("glGetArrayObjectfvATI")) != 0 & + (glGetArrayObjectivATI = GLContext.getFunctionAddress("glGetArrayObjectivATI")) != 0 & + (glVariantArrayObjectATI = GLContext.getFunctionAddress("glVariantArrayObjectATI")) != 0 & + (glGetVariantArrayObjectfvATI = GLContext.getFunctionAddress("glGetVariantArrayObjectfvATI")) != 0 & + (glGetVariantArrayObjectivATI = GLContext.getFunctionAddress("glGetVariantArrayObjectivATI")) != 0; + } + + private boolean ATI_vertex_attrib_array_object_initNativeFunctionAddresses() { + return + (glVertexAttribArrayObjectATI = GLContext.getFunctionAddress("glVertexAttribArrayObjectATI")) != 0 & + (glGetVertexAttribArrayObjectfvATI = GLContext.getFunctionAddress("glGetVertexAttribArrayObjectfvATI")) != 0 & + (glGetVertexAttribArrayObjectivATI = GLContext.getFunctionAddress("glGetVertexAttribArrayObjectivATI")) != 0; + } + + private boolean ATI_vertex_streams_initNativeFunctionAddresses() { + return + (glVertexStream2fATI = GLContext.getFunctionAddress("glVertexStream2fATI")) != 0 & + (glVertexStream2dATI = GLContext.getFunctionAddress("glVertexStream2dATI")) != 0 & + (glVertexStream2iATI = GLContext.getFunctionAddress("glVertexStream2iATI")) != 0 & + (glVertexStream2sATI = GLContext.getFunctionAddress("glVertexStream2sATI")) != 0 & + (glVertexStream3fATI = GLContext.getFunctionAddress("glVertexStream3fATI")) != 0 & + (glVertexStream3dATI = GLContext.getFunctionAddress("glVertexStream3dATI")) != 0 & + (glVertexStream3iATI = GLContext.getFunctionAddress("glVertexStream3iATI")) != 0 & + (glVertexStream3sATI = GLContext.getFunctionAddress("glVertexStream3sATI")) != 0 & + (glVertexStream4fATI = GLContext.getFunctionAddress("glVertexStream4fATI")) != 0 & + (glVertexStream4dATI = GLContext.getFunctionAddress("glVertexStream4dATI")) != 0 & + (glVertexStream4iATI = GLContext.getFunctionAddress("glVertexStream4iATI")) != 0 & + (glVertexStream4sATI = GLContext.getFunctionAddress("glVertexStream4sATI")) != 0 & + (glNormalStream3bATI = GLContext.getFunctionAddress("glNormalStream3bATI")) != 0 & + (glNormalStream3fATI = GLContext.getFunctionAddress("glNormalStream3fATI")) != 0 & + (glNormalStream3dATI = GLContext.getFunctionAddress("glNormalStream3dATI")) != 0 & + (glNormalStream3iATI = GLContext.getFunctionAddress("glNormalStream3iATI")) != 0 & + (glNormalStream3sATI = GLContext.getFunctionAddress("glNormalStream3sATI")) != 0 & + (glClientActiveVertexStreamATI = GLContext.getFunctionAddress("glClientActiveVertexStreamATI")) != 0 & + (glVertexBlendEnvfATI = GLContext.getFunctionAddress("glVertexBlendEnvfATI")) != 0 & + (glVertexBlendEnviATI = GLContext.getFunctionAddress("glVertexBlendEnviATI")) != 0; + } + + private boolean EXT_bindable_uniform_initNativeFunctionAddresses() { + return + (glUniformBufferEXT = GLContext.getFunctionAddress("glUniformBufferEXT")) != 0 & + (glGetUniformBufferSizeEXT = GLContext.getFunctionAddress("glGetUniformBufferSizeEXT")) != 0 & + (glGetUniformOffsetEXT = GLContext.getFunctionAddress("glGetUniformOffsetEXT")) != 0; + } + + private boolean EXT_blend_color_initNativeFunctionAddresses() { + return + (glBlendColorEXT = GLContext.getFunctionAddress("glBlendColorEXT")) != 0; + } + + private boolean EXT_blend_equation_separate_initNativeFunctionAddresses() { + return + (glBlendEquationSeparateEXT = GLContext.getFunctionAddress("glBlendEquationSeparateEXT")) != 0; + } + + private boolean EXT_blend_func_separate_initNativeFunctionAddresses() { + return + (glBlendFuncSeparateEXT = GLContext.getFunctionAddress("glBlendFuncSeparateEXT")) != 0; + } + + private boolean EXT_blend_minmax_initNativeFunctionAddresses() { + return + (glBlendEquationEXT = GLContext.getFunctionAddress("glBlendEquationEXT")) != 0; + } + + private boolean EXT_compiled_vertex_array_initNativeFunctionAddresses() { + return + (glLockArraysEXT = GLContext.getFunctionAddress("glLockArraysEXT")) != 0 & + (glUnlockArraysEXT = GLContext.getFunctionAddress("glUnlockArraysEXT")) != 0; + } + + private boolean EXT_depth_bounds_test_initNativeFunctionAddresses() { + return + (glDepthBoundsEXT = GLContext.getFunctionAddress("glDepthBoundsEXT")) != 0; + } + + private boolean EXT_direct_state_access_initNativeFunctionAddresses(boolean forwardCompatible,Set supported_extensions) { + return + (forwardCompatible || (glClientAttribDefaultEXT = GLContext.getFunctionAddress("glClientAttribDefaultEXT")) != 0) & + (forwardCompatible || (glPushClientAttribDefaultEXT = GLContext.getFunctionAddress("glPushClientAttribDefaultEXT")) != 0) & + (forwardCompatible || (glMatrixLoadfEXT = GLContext.getFunctionAddress("glMatrixLoadfEXT")) != 0) & + (forwardCompatible || (glMatrixLoaddEXT = GLContext.getFunctionAddress("glMatrixLoaddEXT")) != 0) & + (forwardCompatible || (glMatrixMultfEXT = GLContext.getFunctionAddress("glMatrixMultfEXT")) != 0) & + (forwardCompatible || (glMatrixMultdEXT = GLContext.getFunctionAddress("glMatrixMultdEXT")) != 0) & + (forwardCompatible || (glMatrixLoadIdentityEXT = GLContext.getFunctionAddress("glMatrixLoadIdentityEXT")) != 0) & + (forwardCompatible || (glMatrixRotatefEXT = GLContext.getFunctionAddress("glMatrixRotatefEXT")) != 0) & + (forwardCompatible || (glMatrixRotatedEXT = GLContext.getFunctionAddress("glMatrixRotatedEXT")) != 0) & + (forwardCompatible || (glMatrixScalefEXT = GLContext.getFunctionAddress("glMatrixScalefEXT")) != 0) & + (forwardCompatible || (glMatrixScaledEXT = GLContext.getFunctionAddress("glMatrixScaledEXT")) != 0) & + (forwardCompatible || (glMatrixTranslatefEXT = GLContext.getFunctionAddress("glMatrixTranslatefEXT")) != 0) & + (forwardCompatible || (glMatrixTranslatedEXT = GLContext.getFunctionAddress("glMatrixTranslatedEXT")) != 0) & + (forwardCompatible || (glMatrixOrthoEXT = GLContext.getFunctionAddress("glMatrixOrthoEXT")) != 0) & + (forwardCompatible || (glMatrixFrustumEXT = GLContext.getFunctionAddress("glMatrixFrustumEXT")) != 0) & + (forwardCompatible || (glMatrixPushEXT = GLContext.getFunctionAddress("glMatrixPushEXT")) != 0) & + (forwardCompatible || (glMatrixPopEXT = GLContext.getFunctionAddress("glMatrixPopEXT")) != 0) & + (glTextureParameteriEXT = GLContext.getFunctionAddress("glTextureParameteriEXT")) != 0 & + (glTextureParameterivEXT = GLContext.getFunctionAddress("glTextureParameterivEXT")) != 0 & + (glTextureParameterfEXT = GLContext.getFunctionAddress("glTextureParameterfEXT")) != 0 & + (glTextureParameterfvEXT = GLContext.getFunctionAddress("glTextureParameterfvEXT")) != 0 & + (glTextureImage1DEXT = GLContext.getFunctionAddress("glTextureImage1DEXT")) != 0 & + (glTextureImage2DEXT = GLContext.getFunctionAddress("glTextureImage2DEXT")) != 0 & + (glTextureSubImage1DEXT = GLContext.getFunctionAddress("glTextureSubImage1DEXT")) != 0 & + (glTextureSubImage2DEXT = GLContext.getFunctionAddress("glTextureSubImage2DEXT")) != 0 & + (glCopyTextureImage1DEXT = GLContext.getFunctionAddress("glCopyTextureImage1DEXT")) != 0 & + (glCopyTextureImage2DEXT = GLContext.getFunctionAddress("glCopyTextureImage2DEXT")) != 0 & + (glCopyTextureSubImage1DEXT = GLContext.getFunctionAddress("glCopyTextureSubImage1DEXT")) != 0 & + (glCopyTextureSubImage2DEXT = GLContext.getFunctionAddress("glCopyTextureSubImage2DEXT")) != 0 & + (glGetTextureImageEXT = GLContext.getFunctionAddress("glGetTextureImageEXT")) != 0 & + (glGetTextureParameterfvEXT = GLContext.getFunctionAddress("glGetTextureParameterfvEXT")) != 0 & + (glGetTextureParameterivEXT = GLContext.getFunctionAddress("glGetTextureParameterivEXT")) != 0 & + (glGetTextureLevelParameterfvEXT = GLContext.getFunctionAddress("glGetTextureLevelParameterfvEXT")) != 0 & + (glGetTextureLevelParameterivEXT = GLContext.getFunctionAddress("glGetTextureLevelParameterivEXT")) != 0 & + (!supported_extensions.contains("OpenGL12") || (glTextureImage3DEXT = GLContext.getFunctionAddress("glTextureImage3DEXT")) != 0) & + (!supported_extensions.contains("OpenGL12") || (glTextureSubImage3DEXT = GLContext.getFunctionAddress("glTextureSubImage3DEXT")) != 0) & + (!supported_extensions.contains("OpenGL12") || (glCopyTextureSubImage3DEXT = GLContext.getFunctionAddress("glCopyTextureSubImage3DEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glBindMultiTextureEXT = GLContext.getFunctionAddress("glBindMultiTextureEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL13") || (glMultiTexCoordPointerEXT = GLContext.getFunctionAddress("glMultiTexCoordPointerEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL13") || (glMultiTexEnvfEXT = GLContext.getFunctionAddress("glMultiTexEnvfEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL13") || (glMultiTexEnvfvEXT = GLContext.getFunctionAddress("glMultiTexEnvfvEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL13") || (glMultiTexEnviEXT = GLContext.getFunctionAddress("glMultiTexEnviEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL13") || (glMultiTexEnvivEXT = GLContext.getFunctionAddress("glMultiTexEnvivEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL13") || (glMultiTexGendEXT = GLContext.getFunctionAddress("glMultiTexGendEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL13") || (glMultiTexGendvEXT = GLContext.getFunctionAddress("glMultiTexGendvEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL13") || (glMultiTexGenfEXT = GLContext.getFunctionAddress("glMultiTexGenfEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL13") || (glMultiTexGenfvEXT = GLContext.getFunctionAddress("glMultiTexGenfvEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL13") || (glMultiTexGeniEXT = GLContext.getFunctionAddress("glMultiTexGeniEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL13") || (glMultiTexGenivEXT = GLContext.getFunctionAddress("glMultiTexGenivEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL13") || (glGetMultiTexEnvfvEXT = GLContext.getFunctionAddress("glGetMultiTexEnvfvEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL13") || (glGetMultiTexEnvivEXT = GLContext.getFunctionAddress("glGetMultiTexEnvivEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL13") || (glGetMultiTexGendvEXT = GLContext.getFunctionAddress("glGetMultiTexGendvEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL13") || (glGetMultiTexGenfvEXT = GLContext.getFunctionAddress("glGetMultiTexGenfvEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL13") || (glGetMultiTexGenivEXT = GLContext.getFunctionAddress("glGetMultiTexGenivEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glMultiTexParameteriEXT = GLContext.getFunctionAddress("glMultiTexParameteriEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glMultiTexParameterivEXT = GLContext.getFunctionAddress("glMultiTexParameterivEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glMultiTexParameterfEXT = GLContext.getFunctionAddress("glMultiTexParameterfEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glMultiTexParameterfvEXT = GLContext.getFunctionAddress("glMultiTexParameterfvEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glMultiTexImage1DEXT = GLContext.getFunctionAddress("glMultiTexImage1DEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glMultiTexImage2DEXT = GLContext.getFunctionAddress("glMultiTexImage2DEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glMultiTexSubImage1DEXT = GLContext.getFunctionAddress("glMultiTexSubImage1DEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glMultiTexSubImage2DEXT = GLContext.getFunctionAddress("glMultiTexSubImage2DEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glCopyMultiTexImage1DEXT = GLContext.getFunctionAddress("glCopyMultiTexImage1DEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glCopyMultiTexImage2DEXT = GLContext.getFunctionAddress("glCopyMultiTexImage2DEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glCopyMultiTexSubImage1DEXT = GLContext.getFunctionAddress("glCopyMultiTexSubImage1DEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glCopyMultiTexSubImage2DEXT = GLContext.getFunctionAddress("glCopyMultiTexSubImage2DEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glGetMultiTexImageEXT = GLContext.getFunctionAddress("glGetMultiTexImageEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glGetMultiTexParameterfvEXT = GLContext.getFunctionAddress("glGetMultiTexParameterfvEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glGetMultiTexParameterivEXT = GLContext.getFunctionAddress("glGetMultiTexParameterivEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glGetMultiTexLevelParameterfvEXT = GLContext.getFunctionAddress("glGetMultiTexLevelParameterfvEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glGetMultiTexLevelParameterivEXT = GLContext.getFunctionAddress("glGetMultiTexLevelParameterivEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glMultiTexImage3DEXT = GLContext.getFunctionAddress("glMultiTexImage3DEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glMultiTexSubImage3DEXT = GLContext.getFunctionAddress("glMultiTexSubImage3DEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glCopyMultiTexSubImage3DEXT = GLContext.getFunctionAddress("glCopyMultiTexSubImage3DEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL13") || (glEnableClientStateIndexedEXT = GLContext.getFunctionAddress("glEnableClientStateIndexedEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL13") || (glDisableClientStateIndexedEXT = GLContext.getFunctionAddress("glDisableClientStateIndexedEXT")) != 0) & + ((!supported_extensions.contains("OpenGL30") || (glEnableClientStateiEXT = GLContext.getFunctionAddress("glEnableClientStateiEXT")) != 0) || true) & + ((!supported_extensions.contains("OpenGL30") || (glDisableClientStateiEXT = GLContext.getFunctionAddress("glDisableClientStateiEXT")) != 0) || true) & + (!supported_extensions.contains("OpenGL13") || (glGetFloatIndexedvEXT = GLContext.getFunctionAddress("glGetFloatIndexedvEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glGetDoubleIndexedvEXT = GLContext.getFunctionAddress("glGetDoubleIndexedvEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glGetPointerIndexedvEXT = GLContext.getFunctionAddress("glGetPointerIndexedvEXT")) != 0) & + ((!supported_extensions.contains("OpenGL30") || (glGetFloati_vEXT = GLContext.getFunctionAddress("glGetFloati_vEXT")) != 0) || true) & + ((!supported_extensions.contains("OpenGL30") || (glGetDoublei_vEXT = GLContext.getFunctionAddress("glGetDoublei_vEXT")) != 0) || true) & + ((!supported_extensions.contains("OpenGL30") || (glGetPointeri_vEXT = GLContext.getFunctionAddress("glGetPointeri_vEXT")) != 0) || true) & + (!supported_extensions.contains("OpenGL13") || (glEnableIndexedEXT = GLContext.getFunctionAddress("glEnableIndexedEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glDisableIndexedEXT = GLContext.getFunctionAddress("glDisableIndexedEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glIsEnabledIndexedEXT = GLContext.getFunctionAddress("glIsEnabledIndexedEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glGetIntegerIndexedvEXT = GLContext.getFunctionAddress("glGetIntegerIndexedvEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glGetBooleanIndexedvEXT = GLContext.getFunctionAddress("glGetBooleanIndexedvEXT")) != 0) & + (!supported_extensions.contains("GL_ARB_vertex_program") || (glNamedProgramStringEXT = GLContext.getFunctionAddress("glNamedProgramStringEXT")) != 0) & + (!supported_extensions.contains("GL_ARB_vertex_program") || (glNamedProgramLocalParameter4dEXT = GLContext.getFunctionAddress("glNamedProgramLocalParameter4dEXT")) != 0) & + (!supported_extensions.contains("GL_ARB_vertex_program") || (glNamedProgramLocalParameter4dvEXT = GLContext.getFunctionAddress("glNamedProgramLocalParameter4dvEXT")) != 0) & + (!supported_extensions.contains("GL_ARB_vertex_program") || (glNamedProgramLocalParameter4fEXT = GLContext.getFunctionAddress("glNamedProgramLocalParameter4fEXT")) != 0) & + (!supported_extensions.contains("GL_ARB_vertex_program") || (glNamedProgramLocalParameter4fvEXT = GLContext.getFunctionAddress("glNamedProgramLocalParameter4fvEXT")) != 0) & + (!supported_extensions.contains("GL_ARB_vertex_program") || (glGetNamedProgramLocalParameterdvEXT = GLContext.getFunctionAddress("glGetNamedProgramLocalParameterdvEXT")) != 0) & + (!supported_extensions.contains("GL_ARB_vertex_program") || (glGetNamedProgramLocalParameterfvEXT = GLContext.getFunctionAddress("glGetNamedProgramLocalParameterfvEXT")) != 0) & + (!supported_extensions.contains("GL_ARB_vertex_program") || (glGetNamedProgramivEXT = GLContext.getFunctionAddress("glGetNamedProgramivEXT")) != 0) & + (!supported_extensions.contains("GL_ARB_vertex_program") || (glGetNamedProgramStringEXT = GLContext.getFunctionAddress("glGetNamedProgramStringEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glCompressedTextureImage3DEXT = GLContext.getFunctionAddress("glCompressedTextureImage3DEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glCompressedTextureImage2DEXT = GLContext.getFunctionAddress("glCompressedTextureImage2DEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glCompressedTextureImage1DEXT = GLContext.getFunctionAddress("glCompressedTextureImage1DEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glCompressedTextureSubImage3DEXT = GLContext.getFunctionAddress("glCompressedTextureSubImage3DEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glCompressedTextureSubImage2DEXT = GLContext.getFunctionAddress("glCompressedTextureSubImage2DEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glCompressedTextureSubImage1DEXT = GLContext.getFunctionAddress("glCompressedTextureSubImage1DEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glGetCompressedTextureImageEXT = GLContext.getFunctionAddress("glGetCompressedTextureImageEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glCompressedMultiTexImage3DEXT = GLContext.getFunctionAddress("glCompressedMultiTexImage3DEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glCompressedMultiTexImage2DEXT = GLContext.getFunctionAddress("glCompressedMultiTexImage2DEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glCompressedMultiTexImage1DEXT = GLContext.getFunctionAddress("glCompressedMultiTexImage1DEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glCompressedMultiTexSubImage3DEXT = GLContext.getFunctionAddress("glCompressedMultiTexSubImage3DEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glCompressedMultiTexSubImage2DEXT = GLContext.getFunctionAddress("glCompressedMultiTexSubImage2DEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glCompressedMultiTexSubImage1DEXT = GLContext.getFunctionAddress("glCompressedMultiTexSubImage1DEXT")) != 0) & + (!supported_extensions.contains("OpenGL13") || (glGetCompressedMultiTexImageEXT = GLContext.getFunctionAddress("glGetCompressedMultiTexImageEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL13") || (glMatrixLoadTransposefEXT = GLContext.getFunctionAddress("glMatrixLoadTransposefEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL13") || (glMatrixLoadTransposedEXT = GLContext.getFunctionAddress("glMatrixLoadTransposedEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL13") || (glMatrixMultTransposefEXT = GLContext.getFunctionAddress("glMatrixMultTransposefEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL13") || (glMatrixMultTransposedEXT = GLContext.getFunctionAddress("glMatrixMultTransposedEXT")) != 0) & + (!supported_extensions.contains("OpenGL15") || (glNamedBufferDataEXT = GLContext.getFunctionAddress("glNamedBufferDataEXT")) != 0) & + (!supported_extensions.contains("OpenGL15") || (glNamedBufferSubDataEXT = GLContext.getFunctionAddress("glNamedBufferSubDataEXT")) != 0) & + (!supported_extensions.contains("OpenGL15") || (glMapNamedBufferEXT = GLContext.getFunctionAddress("glMapNamedBufferEXT")) != 0) & + (!supported_extensions.contains("OpenGL15") || (glUnmapNamedBufferEXT = GLContext.getFunctionAddress("glUnmapNamedBufferEXT")) != 0) & + (!supported_extensions.contains("OpenGL15") || (glGetNamedBufferParameterivEXT = GLContext.getFunctionAddress("glGetNamedBufferParameterivEXT")) != 0) & + (!supported_extensions.contains("OpenGL15") || (glGetNamedBufferPointervEXT = GLContext.getFunctionAddress("glGetNamedBufferPointervEXT")) != 0) & + (!supported_extensions.contains("OpenGL15") || (glGetNamedBufferSubDataEXT = GLContext.getFunctionAddress("glGetNamedBufferSubDataEXT")) != 0) & + (!supported_extensions.contains("OpenGL20") || (glProgramUniform1fEXT = GLContext.getFunctionAddress("glProgramUniform1fEXT")) != 0) & + (!supported_extensions.contains("OpenGL20") || (glProgramUniform2fEXT = GLContext.getFunctionAddress("glProgramUniform2fEXT")) != 0) & + (!supported_extensions.contains("OpenGL20") || (glProgramUniform3fEXT = GLContext.getFunctionAddress("glProgramUniform3fEXT")) != 0) & + (!supported_extensions.contains("OpenGL20") || (glProgramUniform4fEXT = GLContext.getFunctionAddress("glProgramUniform4fEXT")) != 0) & + (!supported_extensions.contains("OpenGL20") || (glProgramUniform1iEXT = GLContext.getFunctionAddress("glProgramUniform1iEXT")) != 0) & + (!supported_extensions.contains("OpenGL20") || (glProgramUniform2iEXT = GLContext.getFunctionAddress("glProgramUniform2iEXT")) != 0) & + (!supported_extensions.contains("OpenGL20") || (glProgramUniform3iEXT = GLContext.getFunctionAddress("glProgramUniform3iEXT")) != 0) & + (!supported_extensions.contains("OpenGL20") || (glProgramUniform4iEXT = GLContext.getFunctionAddress("glProgramUniform4iEXT")) != 0) & + (!supported_extensions.contains("OpenGL20") || (glProgramUniform1fvEXT = GLContext.getFunctionAddress("glProgramUniform1fvEXT")) != 0) & + (!supported_extensions.contains("OpenGL20") || (glProgramUniform2fvEXT = GLContext.getFunctionAddress("glProgramUniform2fvEXT")) != 0) & + (!supported_extensions.contains("OpenGL20") || (glProgramUniform3fvEXT = GLContext.getFunctionAddress("glProgramUniform3fvEXT")) != 0) & + (!supported_extensions.contains("OpenGL20") || (glProgramUniform4fvEXT = GLContext.getFunctionAddress("glProgramUniform4fvEXT")) != 0) & + (!supported_extensions.contains("OpenGL20") || (glProgramUniform1ivEXT = GLContext.getFunctionAddress("glProgramUniform1ivEXT")) != 0) & + (!supported_extensions.contains("OpenGL20") || (glProgramUniform2ivEXT = GLContext.getFunctionAddress("glProgramUniform2ivEXT")) != 0) & + (!supported_extensions.contains("OpenGL20") || (glProgramUniform3ivEXT = GLContext.getFunctionAddress("glProgramUniform3ivEXT")) != 0) & + (!supported_extensions.contains("OpenGL20") || (glProgramUniform4ivEXT = GLContext.getFunctionAddress("glProgramUniform4ivEXT")) != 0) & + (!supported_extensions.contains("OpenGL20") || (glProgramUniformMatrix2fvEXT = GLContext.getFunctionAddress("glProgramUniformMatrix2fvEXT")) != 0) & + (!supported_extensions.contains("OpenGL20") || (glProgramUniformMatrix3fvEXT = GLContext.getFunctionAddress("glProgramUniformMatrix3fvEXT")) != 0) & + (!supported_extensions.contains("OpenGL20") || (glProgramUniformMatrix4fvEXT = GLContext.getFunctionAddress("glProgramUniformMatrix4fvEXT")) != 0) & + (!supported_extensions.contains("OpenGL21") || (glProgramUniformMatrix2x3fvEXT = GLContext.getFunctionAddress("glProgramUniformMatrix2x3fvEXT")) != 0) & + (!supported_extensions.contains("OpenGL21") || (glProgramUniformMatrix3x2fvEXT = GLContext.getFunctionAddress("glProgramUniformMatrix3x2fvEXT")) != 0) & + (!supported_extensions.contains("OpenGL21") || (glProgramUniformMatrix2x4fvEXT = GLContext.getFunctionAddress("glProgramUniformMatrix2x4fvEXT")) != 0) & + (!supported_extensions.contains("OpenGL21") || (glProgramUniformMatrix4x2fvEXT = GLContext.getFunctionAddress("glProgramUniformMatrix4x2fvEXT")) != 0) & + (!supported_extensions.contains("OpenGL21") || (glProgramUniformMatrix3x4fvEXT = GLContext.getFunctionAddress("glProgramUniformMatrix3x4fvEXT")) != 0) & + (!supported_extensions.contains("OpenGL21") || (glProgramUniformMatrix4x3fvEXT = GLContext.getFunctionAddress("glProgramUniformMatrix4x3fvEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_texture_buffer_object") || (glTextureBufferEXT = GLContext.getFunctionAddress("glTextureBufferEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_texture_buffer_object") || (glMultiTexBufferEXT = GLContext.getFunctionAddress("glMultiTexBufferEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_texture_integer") || (glTextureParameterIivEXT = GLContext.getFunctionAddress("glTextureParameterIivEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_texture_integer") || (glTextureParameterIuivEXT = GLContext.getFunctionAddress("glTextureParameterIuivEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_texture_integer") || (glGetTextureParameterIivEXT = GLContext.getFunctionAddress("glGetTextureParameterIivEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_texture_integer") || (glGetTextureParameterIuivEXT = GLContext.getFunctionAddress("glGetTextureParameterIuivEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_texture_integer") || (glMultiTexParameterIivEXT = GLContext.getFunctionAddress("glMultiTexParameterIivEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_texture_integer") || (glMultiTexParameterIuivEXT = GLContext.getFunctionAddress("glMultiTexParameterIuivEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_texture_integer") || (glGetMultiTexParameterIivEXT = GLContext.getFunctionAddress("glGetMultiTexParameterIivEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_texture_integer") || (glGetMultiTexParameterIuivEXT = GLContext.getFunctionAddress("glGetMultiTexParameterIuivEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_gpu_shader4") || (glProgramUniform1uiEXT = GLContext.getFunctionAddress("glProgramUniform1uiEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_gpu_shader4") || (glProgramUniform2uiEXT = GLContext.getFunctionAddress("glProgramUniform2uiEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_gpu_shader4") || (glProgramUniform3uiEXT = GLContext.getFunctionAddress("glProgramUniform3uiEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_gpu_shader4") || (glProgramUniform4uiEXT = GLContext.getFunctionAddress("glProgramUniform4uiEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_gpu_shader4") || (glProgramUniform1uivEXT = GLContext.getFunctionAddress("glProgramUniform1uivEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_gpu_shader4") || (glProgramUniform2uivEXT = GLContext.getFunctionAddress("glProgramUniform2uivEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_gpu_shader4") || (glProgramUniform3uivEXT = GLContext.getFunctionAddress("glProgramUniform3uivEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_gpu_shader4") || (glProgramUniform4uivEXT = GLContext.getFunctionAddress("glProgramUniform4uivEXT")) != 0) & + (!supported_extensions.contains("GL_EXT_gpu_program_parameters") || (glNamedProgramLocalParameters4fvEXT = GLContext.getFunctionAddress("glNamedProgramLocalParameters4fvEXT")) != 0) & + (!supported_extensions.contains("GL_NV_gpu_program4") || (glNamedProgramLocalParameterI4iEXT = GLContext.getFunctionAddress("glNamedProgramLocalParameterI4iEXT")) != 0) & + (!supported_extensions.contains("GL_NV_gpu_program4") || (glNamedProgramLocalParameterI4ivEXT = GLContext.getFunctionAddress("glNamedProgramLocalParameterI4ivEXT")) != 0) & + (!supported_extensions.contains("GL_NV_gpu_program4") || (glNamedProgramLocalParametersI4ivEXT = GLContext.getFunctionAddress("glNamedProgramLocalParametersI4ivEXT")) != 0) & + (!supported_extensions.contains("GL_NV_gpu_program4") || (glNamedProgramLocalParameterI4uiEXT = GLContext.getFunctionAddress("glNamedProgramLocalParameterI4uiEXT")) != 0) & + (!supported_extensions.contains("GL_NV_gpu_program4") || (glNamedProgramLocalParameterI4uivEXT = GLContext.getFunctionAddress("glNamedProgramLocalParameterI4uivEXT")) != 0) & + (!supported_extensions.contains("GL_NV_gpu_program4") || (glNamedProgramLocalParametersI4uivEXT = GLContext.getFunctionAddress("glNamedProgramLocalParametersI4uivEXT")) != 0) & + (!supported_extensions.contains("GL_NV_gpu_program4") || (glGetNamedProgramLocalParameterIivEXT = GLContext.getFunctionAddress("glGetNamedProgramLocalParameterIivEXT")) != 0) & + (!supported_extensions.contains("GL_NV_gpu_program4") || (glGetNamedProgramLocalParameterIuivEXT = GLContext.getFunctionAddress("glGetNamedProgramLocalParameterIuivEXT")) != 0) & + (!(false || supported_extensions.contains("OpenGL30") || supported_extensions.contains("GL_EXT_framebuffer_object")) || (glNamedRenderbufferStorageEXT = GLContext.getFunctionAddress("glNamedRenderbufferStorageEXT")) != 0) & + (!(false || supported_extensions.contains("OpenGL30") || supported_extensions.contains("GL_EXT_framebuffer_object")) || (glGetNamedRenderbufferParameterivEXT = GLContext.getFunctionAddress("glGetNamedRenderbufferParameterivEXT")) != 0) & + (!(false || supported_extensions.contains("OpenGL30") || supported_extensions.contains("GL_EXT_framebuffer_multisample")) || (glNamedRenderbufferStorageMultisampleEXT = GLContext.getFunctionAddress("glNamedRenderbufferStorageMultisampleEXT")) != 0) & + (!supported_extensions.contains("GL_NV_framebuffer_multisample_coverage") || (glNamedRenderbufferStorageMultisampleCoverageEXT = GLContext.getFunctionAddress("glNamedRenderbufferStorageMultisampleCoverageEXT")) != 0) & + (!(false || supported_extensions.contains("OpenGL30") || supported_extensions.contains("GL_EXT_framebuffer_object")) || (glCheckNamedFramebufferStatusEXT = GLContext.getFunctionAddress("glCheckNamedFramebufferStatusEXT")) != 0) & + (!(false || supported_extensions.contains("OpenGL30") || supported_extensions.contains("GL_EXT_framebuffer_object")) || (glNamedFramebufferTexture1DEXT = GLContext.getFunctionAddress("glNamedFramebufferTexture1DEXT")) != 0) & + (!(false || supported_extensions.contains("OpenGL30") || supported_extensions.contains("GL_EXT_framebuffer_object")) || (glNamedFramebufferTexture2DEXT = GLContext.getFunctionAddress("glNamedFramebufferTexture2DEXT")) != 0) & + (!(false || supported_extensions.contains("OpenGL30") || supported_extensions.contains("GL_EXT_framebuffer_object")) || (glNamedFramebufferTexture3DEXT = GLContext.getFunctionAddress("glNamedFramebufferTexture3DEXT")) != 0) & + (!(false || supported_extensions.contains("OpenGL30") || supported_extensions.contains("GL_EXT_framebuffer_object")) || (glNamedFramebufferRenderbufferEXT = GLContext.getFunctionAddress("glNamedFramebufferRenderbufferEXT")) != 0) & + (!(false || supported_extensions.contains("OpenGL30") || supported_extensions.contains("GL_EXT_framebuffer_object")) || (glGetNamedFramebufferAttachmentParameterivEXT = GLContext.getFunctionAddress("glGetNamedFramebufferAttachmentParameterivEXT")) != 0) & + (!(false || supported_extensions.contains("OpenGL30") || supported_extensions.contains("GL_EXT_framebuffer_object")) || (glGenerateTextureMipmapEXT = GLContext.getFunctionAddress("glGenerateTextureMipmapEXT")) != 0) & + (!(false || supported_extensions.contains("OpenGL30") || supported_extensions.contains("GL_EXT_framebuffer_object")) || (glGenerateMultiTexMipmapEXT = GLContext.getFunctionAddress("glGenerateMultiTexMipmapEXT")) != 0) & + (!(false || supported_extensions.contains("OpenGL30") || supported_extensions.contains("GL_EXT_framebuffer_object")) || (glFramebufferDrawBufferEXT = GLContext.getFunctionAddress("glFramebufferDrawBufferEXT")) != 0) & + (!(false || supported_extensions.contains("OpenGL30") || supported_extensions.contains("GL_EXT_framebuffer_object")) || (glFramebufferDrawBuffersEXT = GLContext.getFunctionAddress("glFramebufferDrawBuffersEXT")) != 0) & + (!(false || supported_extensions.contains("OpenGL30") || supported_extensions.contains("GL_EXT_framebuffer_object")) || (glFramebufferReadBufferEXT = GLContext.getFunctionAddress("glFramebufferReadBufferEXT")) != 0) & + (!(false || supported_extensions.contains("OpenGL30") || supported_extensions.contains("GL_EXT_framebuffer_object")) || (glGetFramebufferParameterivEXT = GLContext.getFunctionAddress("glGetFramebufferParameterivEXT")) != 0) & + (!(false || supported_extensions.contains("OpenGL31") || supported_extensions.contains("GL_ARB_copy_buffer")) || (glNamedCopyBufferSubDataEXT = GLContext.getFunctionAddress("glNamedCopyBufferSubDataEXT")) != 0) & + (!(false || supported_extensions.contains("GL_EXT_geometry_shader4") || supported_extensions.contains("GL_NV_geometry_program4")) || (glNamedFramebufferTextureEXT = GLContext.getFunctionAddress("glNamedFramebufferTextureEXT")) != 0) & + (!(false || supported_extensions.contains("GL_EXT_geometry_shader4") || supported_extensions.contains("GL_NV_geometry_program4")) || (glNamedFramebufferTextureLayerEXT = GLContext.getFunctionAddress("glNamedFramebufferTextureLayerEXT")) != 0) & + (!(false || supported_extensions.contains("GL_EXT_geometry_shader4") || supported_extensions.contains("GL_NV_geometry_program4")) || (glNamedFramebufferTextureFaceEXT = GLContext.getFunctionAddress("glNamedFramebufferTextureFaceEXT")) != 0) & + (!supported_extensions.contains("GL_NV_explicit_multisample") || (glTextureRenderbufferEXT = GLContext.getFunctionAddress("glTextureRenderbufferEXT")) != 0) & + (!supported_extensions.contains("GL_NV_explicit_multisample") || (glMultiTexRenderbufferEXT = GLContext.getFunctionAddress("glMultiTexRenderbufferEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL30") || (glVertexArrayVertexOffsetEXT = GLContext.getFunctionAddress("glVertexArrayVertexOffsetEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL30") || (glVertexArrayColorOffsetEXT = GLContext.getFunctionAddress("glVertexArrayColorOffsetEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL30") || (glVertexArrayEdgeFlagOffsetEXT = GLContext.getFunctionAddress("glVertexArrayEdgeFlagOffsetEXT")) != 0) & + (!supported_extensions.contains("OpenGL30") || (glVertexArrayIndexOffsetEXT = GLContext.getFunctionAddress("glVertexArrayIndexOffsetEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL30") || (glVertexArrayNormalOffsetEXT = GLContext.getFunctionAddress("glVertexArrayNormalOffsetEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL30") || (glVertexArrayTexCoordOffsetEXT = GLContext.getFunctionAddress("glVertexArrayTexCoordOffsetEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL30") || (glVertexArrayMultiTexCoordOffsetEXT = GLContext.getFunctionAddress("glVertexArrayMultiTexCoordOffsetEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL30") || (glVertexArrayFogCoordOffsetEXT = GLContext.getFunctionAddress("glVertexArrayFogCoordOffsetEXT")) != 0) & + (forwardCompatible || !supported_extensions.contains("OpenGL30") || (glVertexArraySecondaryColorOffsetEXT = GLContext.getFunctionAddress("glVertexArraySecondaryColorOffsetEXT")) != 0) & + (!supported_extensions.contains("OpenGL30") || (glVertexArrayVertexAttribOffsetEXT = GLContext.getFunctionAddress("glVertexArrayVertexAttribOffsetEXT")) != 0) & + (!supported_extensions.contains("OpenGL30") || (glVertexArrayVertexAttribIOffsetEXT = GLContext.getFunctionAddress("glVertexArrayVertexAttribIOffsetEXT")) != 0) & + (!supported_extensions.contains("OpenGL30") || (glEnableVertexArrayEXT = GLContext.getFunctionAddress("glEnableVertexArrayEXT")) != 0) & + (!supported_extensions.contains("OpenGL30") || (glDisableVertexArrayEXT = GLContext.getFunctionAddress("glDisableVertexArrayEXT")) != 0) & + (!supported_extensions.contains("OpenGL30") || (glEnableVertexArrayAttribEXT = GLContext.getFunctionAddress("glEnableVertexArrayAttribEXT")) != 0) & + (!supported_extensions.contains("OpenGL30") || (glDisableVertexArrayAttribEXT = GLContext.getFunctionAddress("glDisableVertexArrayAttribEXT")) != 0) & + (!supported_extensions.contains("OpenGL30") || (glGetVertexArrayIntegervEXT = GLContext.getFunctionAddress("glGetVertexArrayIntegervEXT")) != 0) & + (!supported_extensions.contains("OpenGL30") || (glGetVertexArrayPointervEXT = GLContext.getFunctionAddress("glGetVertexArrayPointervEXT")) != 0) & + (!supported_extensions.contains("OpenGL30") || (glGetVertexArrayIntegeri_vEXT = GLContext.getFunctionAddress("glGetVertexArrayIntegeri_vEXT")) != 0) & + (!supported_extensions.contains("OpenGL30") || (glGetVertexArrayPointeri_vEXT = GLContext.getFunctionAddress("glGetVertexArrayPointeri_vEXT")) != 0) & + (!supported_extensions.contains("OpenGL30") || (glMapNamedBufferRangeEXT = GLContext.getFunctionAddress("glMapNamedBufferRangeEXT")) != 0) & + (!supported_extensions.contains("OpenGL30") || (glFlushMappedNamedBufferRangeEXT = GLContext.getFunctionAddress("glFlushMappedNamedBufferRangeEXT")) != 0); + } + + private boolean EXT_draw_buffers2_initNativeFunctionAddresses() { + return + (glColorMaskIndexedEXT = GLContext.getFunctionAddress("glColorMaskIndexedEXT")) != 0 & + (glGetBooleanIndexedvEXT = GLContext.getFunctionAddress("glGetBooleanIndexedvEXT")) != 0 & + (glGetIntegerIndexedvEXT = GLContext.getFunctionAddress("glGetIntegerIndexedvEXT")) != 0 & + (glEnableIndexedEXT = GLContext.getFunctionAddress("glEnableIndexedEXT")) != 0 & + (glDisableIndexedEXT = GLContext.getFunctionAddress("glDisableIndexedEXT")) != 0 & + (glIsEnabledIndexedEXT = GLContext.getFunctionAddress("glIsEnabledIndexedEXT")) != 0; + } + + private boolean EXT_draw_instanced_initNativeFunctionAddresses() { + return + (glDrawArraysInstancedEXT = GLContext.getFunctionAddress("glDrawArraysInstancedEXT")) != 0 & + (glDrawElementsInstancedEXT = GLContext.getFunctionAddress("glDrawElementsInstancedEXT")) != 0; + } + + private boolean EXT_draw_range_elements_initNativeFunctionAddresses() { + return + (glDrawRangeElementsEXT = GLContext.getFunctionAddress("glDrawRangeElementsEXT")) != 0; + } + + private boolean EXT_fog_coord_initNativeFunctionAddresses() { + return + (glFogCoordfEXT = GLContext.getFunctionAddress("glFogCoordfEXT")) != 0 & + (glFogCoorddEXT = GLContext.getFunctionAddress("glFogCoorddEXT")) != 0 & + (glFogCoordPointerEXT = GLContext.getFunctionAddress("glFogCoordPointerEXT")) != 0; + } + + private boolean EXT_framebuffer_blit_initNativeFunctionAddresses() { + return + (glBlitFramebufferEXT = GLContext.getFunctionAddress("glBlitFramebufferEXT")) != 0; + } + + private boolean EXT_framebuffer_multisample_initNativeFunctionAddresses() { + return + (glRenderbufferStorageMultisampleEXT = GLContext.getFunctionAddress("glRenderbufferStorageMultisampleEXT")) != 0; + } + + private boolean EXT_framebuffer_object_initNativeFunctionAddresses() { + return + (glIsRenderbufferEXT = GLContext.getFunctionAddress("glIsRenderbufferEXT")) != 0 & + (glBindRenderbufferEXT = GLContext.getFunctionAddress("glBindRenderbufferEXT")) != 0 & + (glDeleteRenderbuffersEXT = GLContext.getFunctionAddress("glDeleteRenderbuffersEXT")) != 0 & + (glGenRenderbuffersEXT = GLContext.getFunctionAddress("glGenRenderbuffersEXT")) != 0 & + (glRenderbufferStorageEXT = GLContext.getFunctionAddress("glRenderbufferStorageEXT")) != 0 & + (glGetRenderbufferParameterivEXT = GLContext.getFunctionAddress("glGetRenderbufferParameterivEXT")) != 0 & + (glIsFramebufferEXT = GLContext.getFunctionAddress("glIsFramebufferEXT")) != 0 & + (glBindFramebufferEXT = GLContext.getFunctionAddress("glBindFramebufferEXT")) != 0 & + (glDeleteFramebuffersEXT = GLContext.getFunctionAddress("glDeleteFramebuffersEXT")) != 0 & + (glGenFramebuffersEXT = GLContext.getFunctionAddress("glGenFramebuffersEXT")) != 0 & + (glCheckFramebufferStatusEXT = GLContext.getFunctionAddress("glCheckFramebufferStatusEXT")) != 0 & + (glFramebufferTexture1DEXT = GLContext.getFunctionAddress("glFramebufferTexture1DEXT")) != 0 & + (glFramebufferTexture2DEXT = GLContext.getFunctionAddress("glFramebufferTexture2DEXT")) != 0 & + (glFramebufferTexture3DEXT = GLContext.getFunctionAddress("glFramebufferTexture3DEXT")) != 0 & + (glFramebufferRenderbufferEXT = GLContext.getFunctionAddress("glFramebufferRenderbufferEXT")) != 0 & + (glGetFramebufferAttachmentParameterivEXT = GLContext.getFunctionAddress("glGetFramebufferAttachmentParameterivEXT")) != 0 & + (glGenerateMipmapEXT = GLContext.getFunctionAddress("glGenerateMipmapEXT")) != 0; + } + + private boolean EXT_geometry_shader4_initNativeFunctionAddresses() { + return + (glProgramParameteriEXT = GLContext.getFunctionAddress("glProgramParameteriEXT")) != 0 & + (glFramebufferTextureEXT = GLContext.getFunctionAddress("glFramebufferTextureEXT")) != 0 & + (glFramebufferTextureLayerEXT = GLContext.getFunctionAddress("glFramebufferTextureLayerEXT")) != 0 & + (glFramebufferTextureFaceEXT = GLContext.getFunctionAddress("glFramebufferTextureFaceEXT")) != 0; + } + + private boolean EXT_gpu_program_parameters_initNativeFunctionAddresses() { + return + (glProgramEnvParameters4fvEXT = GLContext.getFunctionAddress("glProgramEnvParameters4fvEXT")) != 0 & + (glProgramLocalParameters4fvEXT = GLContext.getFunctionAddress("glProgramLocalParameters4fvEXT")) != 0; + } + + private boolean EXT_gpu_shader4_initNativeFunctionAddresses() { + return + (glVertexAttribI1iEXT = GLContext.getFunctionAddress("glVertexAttribI1iEXT")) != 0 & + (glVertexAttribI2iEXT = GLContext.getFunctionAddress("glVertexAttribI2iEXT")) != 0 & + (glVertexAttribI3iEXT = GLContext.getFunctionAddress("glVertexAttribI3iEXT")) != 0 & + (glVertexAttribI4iEXT = GLContext.getFunctionAddress("glVertexAttribI4iEXT")) != 0 & + (glVertexAttribI1uiEXT = GLContext.getFunctionAddress("glVertexAttribI1uiEXT")) != 0 & + (glVertexAttribI2uiEXT = GLContext.getFunctionAddress("glVertexAttribI2uiEXT")) != 0 & + (glVertexAttribI3uiEXT = GLContext.getFunctionAddress("glVertexAttribI3uiEXT")) != 0 & + (glVertexAttribI4uiEXT = GLContext.getFunctionAddress("glVertexAttribI4uiEXT")) != 0 & + (glVertexAttribI1ivEXT = GLContext.getFunctionAddress("glVertexAttribI1ivEXT")) != 0 & + (glVertexAttribI2ivEXT = GLContext.getFunctionAddress("glVertexAttribI2ivEXT")) != 0 & + (glVertexAttribI3ivEXT = GLContext.getFunctionAddress("glVertexAttribI3ivEXT")) != 0 & + (glVertexAttribI4ivEXT = GLContext.getFunctionAddress("glVertexAttribI4ivEXT")) != 0 & + (glVertexAttribI1uivEXT = GLContext.getFunctionAddress("glVertexAttribI1uivEXT")) != 0 & + (glVertexAttribI2uivEXT = GLContext.getFunctionAddress("glVertexAttribI2uivEXT")) != 0 & + (glVertexAttribI3uivEXT = GLContext.getFunctionAddress("glVertexAttribI3uivEXT")) != 0 & + (glVertexAttribI4uivEXT = GLContext.getFunctionAddress("glVertexAttribI4uivEXT")) != 0 & + (glVertexAttribI4bvEXT = GLContext.getFunctionAddress("glVertexAttribI4bvEXT")) != 0 & + (glVertexAttribI4svEXT = GLContext.getFunctionAddress("glVertexAttribI4svEXT")) != 0 & + (glVertexAttribI4ubvEXT = GLContext.getFunctionAddress("glVertexAttribI4ubvEXT")) != 0 & + (glVertexAttribI4usvEXT = GLContext.getFunctionAddress("glVertexAttribI4usvEXT")) != 0 & + (glVertexAttribIPointerEXT = GLContext.getFunctionAddress("glVertexAttribIPointerEXT")) != 0 & + (glGetVertexAttribIivEXT = GLContext.getFunctionAddress("glGetVertexAttribIivEXT")) != 0 & + (glGetVertexAttribIuivEXT = GLContext.getFunctionAddress("glGetVertexAttribIuivEXT")) != 0 & + (glUniform1uiEXT = GLContext.getFunctionAddress("glUniform1uiEXT")) != 0 & + (glUniform2uiEXT = GLContext.getFunctionAddress("glUniform2uiEXT")) != 0 & + (glUniform3uiEXT = GLContext.getFunctionAddress("glUniform3uiEXT")) != 0 & + (glUniform4uiEXT = GLContext.getFunctionAddress("glUniform4uiEXT")) != 0 & + (glUniform1uivEXT = GLContext.getFunctionAddress("glUniform1uivEXT")) != 0 & + (glUniform2uivEXT = GLContext.getFunctionAddress("glUniform2uivEXT")) != 0 & + (glUniform3uivEXT = GLContext.getFunctionAddress("glUniform3uivEXT")) != 0 & + (glUniform4uivEXT = GLContext.getFunctionAddress("glUniform4uivEXT")) != 0 & + (glGetUniformuivEXT = GLContext.getFunctionAddress("glGetUniformuivEXT")) != 0 & + (glBindFragDataLocationEXT = GLContext.getFunctionAddress("glBindFragDataLocationEXT")) != 0 & + (glGetFragDataLocationEXT = GLContext.getFunctionAddress("glGetFragDataLocationEXT")) != 0; + } + + private boolean EXT_multi_draw_arrays_initNativeFunctionAddresses() { + return + (glMultiDrawArraysEXT = GLContext.getFunctionAddress("glMultiDrawArraysEXT")) != 0; + } + + private boolean EXT_paletted_texture_initNativeFunctionAddresses() { + return + (glColorTableEXT = GLContext.getFunctionAddress("glColorTableEXT")) != 0 & + (glColorSubTableEXT = GLContext.getFunctionAddress("glColorSubTableEXT")) != 0 & + (glGetColorTableEXT = GLContext.getFunctionAddress("glGetColorTableEXT")) != 0 & + (glGetColorTableParameterivEXT = GLContext.getFunctionAddress("glGetColorTableParameterivEXT")) != 0 & + (glGetColorTableParameterfvEXT = GLContext.getFunctionAddress("glGetColorTableParameterfvEXT")) != 0; + } + + private boolean EXT_point_parameters_initNativeFunctionAddresses() { + return + (glPointParameterfEXT = GLContext.getFunctionAddress("glPointParameterfEXT")) != 0 & + (glPointParameterfvEXT = GLContext.getFunctionAddress("glPointParameterfvEXT")) != 0; + } + + private boolean EXT_provoking_vertex_initNativeFunctionAddresses() { + return + (glProvokingVertexEXT = GLContext.getFunctionAddress("glProvokingVertexEXT")) != 0; + } + + private boolean EXT_secondary_color_initNativeFunctionAddresses() { + return + (glSecondaryColor3bEXT = GLContext.getFunctionAddress("glSecondaryColor3bEXT")) != 0 & + (glSecondaryColor3fEXT = GLContext.getFunctionAddress("glSecondaryColor3fEXT")) != 0 & + (glSecondaryColor3dEXT = GLContext.getFunctionAddress("glSecondaryColor3dEXT")) != 0 & + (glSecondaryColor3ubEXT = GLContext.getFunctionAddress("glSecondaryColor3ubEXT")) != 0 & + (glSecondaryColorPointerEXT = GLContext.getFunctionAddress("glSecondaryColorPointerEXT")) != 0; + } + + private boolean EXT_separate_shader_objects_initNativeFunctionAddresses() { + return + (glUseShaderProgramEXT = GLContext.getFunctionAddress("glUseShaderProgramEXT")) != 0 & + (glActiveProgramEXT = GLContext.getFunctionAddress("glActiveProgramEXT")) != 0 & + (glCreateShaderProgramEXT = GLContext.getFunctionAddress("glCreateShaderProgramEXT")) != 0; + } + + private boolean EXT_shader_image_load_store_initNativeFunctionAddresses() { + return + (glBindImageTextureEXT = GLContext.getFunctionAddress("glBindImageTextureEXT")) != 0 & + (glMemoryBarrierEXT = GLContext.getFunctionAddress("glMemoryBarrierEXT")) != 0; + } + + private boolean EXT_stencil_clear_tag_initNativeFunctionAddresses() { + return + (glStencilClearTagEXT = GLContext.getFunctionAddress("glStencilClearTagEXT")) != 0; + } + + private boolean EXT_stencil_two_side_initNativeFunctionAddresses() { + return + (glActiveStencilFaceEXT = GLContext.getFunctionAddress("glActiveStencilFaceEXT")) != 0; + } + + private boolean EXT_texture_array_initNativeFunctionAddresses() { + return + (glFramebufferTextureLayerEXT = GLContext.getFunctionAddress("glFramebufferTextureLayerEXT")) != 0; + } + + private boolean EXT_texture_buffer_object_initNativeFunctionAddresses() { + return + (glTexBufferEXT = GLContext.getFunctionAddress("glTexBufferEXT")) != 0; + } + + private boolean EXT_texture_integer_initNativeFunctionAddresses() { + return + (glClearColorIiEXT = GLContext.getFunctionAddress("glClearColorIiEXT")) != 0 & + (glClearColorIuiEXT = GLContext.getFunctionAddress("glClearColorIuiEXT")) != 0 & + (glTexParameterIivEXT = GLContext.getFunctionAddress("glTexParameterIivEXT")) != 0 & + (glTexParameterIuivEXT = GLContext.getFunctionAddress("glTexParameterIuivEXT")) != 0 & + (glGetTexParameterIivEXT = GLContext.getFunctionAddress("glGetTexParameterIivEXT")) != 0 & + (glGetTexParameterIuivEXT = GLContext.getFunctionAddress("glGetTexParameterIuivEXT")) != 0; + } + + private boolean EXT_timer_query_initNativeFunctionAddresses() { + return + (glGetQueryObjecti64vEXT = GLContext.getFunctionAddress("glGetQueryObjecti64vEXT")) != 0 & + (glGetQueryObjectui64vEXT = GLContext.getFunctionAddress("glGetQueryObjectui64vEXT")) != 0; + } + + private boolean EXT_transform_feedback_initNativeFunctionAddresses() { + return + (glBindBufferRangeEXT = GLContext.getFunctionAddress("glBindBufferRangeEXT")) != 0 & + (glBindBufferOffsetEXT = GLContext.getFunctionAddress("glBindBufferOffsetEXT")) != 0 & + (glBindBufferBaseEXT = GLContext.getFunctionAddress("glBindBufferBaseEXT")) != 0 & + (glBeginTransformFeedbackEXT = GLContext.getFunctionAddress("glBeginTransformFeedbackEXT")) != 0 & + (glEndTransformFeedbackEXT = GLContext.getFunctionAddress("glEndTransformFeedbackEXT")) != 0 & + (glTransformFeedbackVaryingsEXT = GLContext.getFunctionAddress("glTransformFeedbackVaryingsEXT")) != 0 & + (glGetTransformFeedbackVaryingEXT = GLContext.getFunctionAddress("glGetTransformFeedbackVaryingEXT")) != 0; + } + + private boolean EXT_vertex_attrib_64bit_initNativeFunctionAddresses(Set supported_extensions) { + return + (glVertexAttribL1dEXT = GLContext.getFunctionAddress("glVertexAttribL1dEXT")) != 0 & + (glVertexAttribL2dEXT = GLContext.getFunctionAddress("glVertexAttribL2dEXT")) != 0 & + (glVertexAttribL3dEXT = GLContext.getFunctionAddress("glVertexAttribL3dEXT")) != 0 & + (glVertexAttribL4dEXT = GLContext.getFunctionAddress("glVertexAttribL4dEXT")) != 0 & + (glVertexAttribL1dvEXT = GLContext.getFunctionAddress("glVertexAttribL1dvEXT")) != 0 & + (glVertexAttribL2dvEXT = GLContext.getFunctionAddress("glVertexAttribL2dvEXT")) != 0 & + (glVertexAttribL3dvEXT = GLContext.getFunctionAddress("glVertexAttribL3dvEXT")) != 0 & + (glVertexAttribL4dvEXT = GLContext.getFunctionAddress("glVertexAttribL4dvEXT")) != 0 & + (glVertexAttribLPointerEXT = GLContext.getFunctionAddress("glVertexAttribLPointerEXT")) != 0 & + (glGetVertexAttribLdvEXT = GLContext.getFunctionAddress("glGetVertexAttribLdvEXT")) != 0 & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glVertexArrayVertexAttribLOffsetEXT = GLContext.getFunctionAddress("glVertexArrayVertexAttribLOffsetEXT")) != 0); + } + + private boolean EXT_vertex_shader_initNativeFunctionAddresses() { + return + (glBeginVertexShaderEXT = GLContext.getFunctionAddress("glBeginVertexShaderEXT")) != 0 & + (glEndVertexShaderEXT = GLContext.getFunctionAddress("glEndVertexShaderEXT")) != 0 & + (glBindVertexShaderEXT = GLContext.getFunctionAddress("glBindVertexShaderEXT")) != 0 & + (glGenVertexShadersEXT = GLContext.getFunctionAddress("glGenVertexShadersEXT")) != 0 & + (glDeleteVertexShaderEXT = GLContext.getFunctionAddress("glDeleteVertexShaderEXT")) != 0 & + (glShaderOp1EXT = GLContext.getFunctionAddress("glShaderOp1EXT")) != 0 & + (glShaderOp2EXT = GLContext.getFunctionAddress("glShaderOp2EXT")) != 0 & + (glShaderOp3EXT = GLContext.getFunctionAddress("glShaderOp3EXT")) != 0 & + (glSwizzleEXT = GLContext.getFunctionAddress("glSwizzleEXT")) != 0 & + (glWriteMaskEXT = GLContext.getFunctionAddress("glWriteMaskEXT")) != 0 & + (glInsertComponentEXT = GLContext.getFunctionAddress("glInsertComponentEXT")) != 0 & + (glExtractComponentEXT = GLContext.getFunctionAddress("glExtractComponentEXT")) != 0 & + (glGenSymbolsEXT = GLContext.getFunctionAddress("glGenSymbolsEXT")) != 0 & + (glSetInvariantEXT = GLContext.getFunctionAddress("glSetInvariantEXT")) != 0 & + (glSetLocalConstantEXT = GLContext.getFunctionAddress("glSetLocalConstantEXT")) != 0 & + (glVariantbvEXT = GLContext.getFunctionAddress("glVariantbvEXT")) != 0 & + (glVariantsvEXT = GLContext.getFunctionAddress("glVariantsvEXT")) != 0 & + (glVariantivEXT = GLContext.getFunctionAddress("glVariantivEXT")) != 0 & + (glVariantfvEXT = GLContext.getFunctionAddress("glVariantfvEXT")) != 0 & + (glVariantdvEXT = GLContext.getFunctionAddress("glVariantdvEXT")) != 0 & + (glVariantubvEXT = GLContext.getFunctionAddress("glVariantubvEXT")) != 0 & + (glVariantusvEXT = GLContext.getFunctionAddress("glVariantusvEXT")) != 0 & + (glVariantuivEXT = GLContext.getFunctionAddress("glVariantuivEXT")) != 0 & + (glVariantPointerEXT = GLContext.getFunctionAddress("glVariantPointerEXT")) != 0 & + (glEnableVariantClientStateEXT = GLContext.getFunctionAddress("glEnableVariantClientStateEXT")) != 0 & + (glDisableVariantClientStateEXT = GLContext.getFunctionAddress("glDisableVariantClientStateEXT")) != 0 & + (glBindLightParameterEXT = GLContext.getFunctionAddress("glBindLightParameterEXT")) != 0 & + (glBindMaterialParameterEXT = GLContext.getFunctionAddress("glBindMaterialParameterEXT")) != 0 & + (glBindTexGenParameterEXT = GLContext.getFunctionAddress("glBindTexGenParameterEXT")) != 0 & + (glBindTextureUnitParameterEXT = GLContext.getFunctionAddress("glBindTextureUnitParameterEXT")) != 0 & + (glBindParameterEXT = GLContext.getFunctionAddress("glBindParameterEXT")) != 0 & + (glIsVariantEnabledEXT = GLContext.getFunctionAddress("glIsVariantEnabledEXT")) != 0 & + (glGetVariantBooleanvEXT = GLContext.getFunctionAddress("glGetVariantBooleanvEXT")) != 0 & + (glGetVariantIntegervEXT = GLContext.getFunctionAddress("glGetVariantIntegervEXT")) != 0 & + (glGetVariantFloatvEXT = GLContext.getFunctionAddress("glGetVariantFloatvEXT")) != 0 & + (glGetVariantPointervEXT = GLContext.getFunctionAddress("glGetVariantPointervEXT")) != 0 & + (glGetInvariantBooleanvEXT = GLContext.getFunctionAddress("glGetInvariantBooleanvEXT")) != 0 & + (glGetInvariantIntegervEXT = GLContext.getFunctionAddress("glGetInvariantIntegervEXT")) != 0 & + (glGetInvariantFloatvEXT = GLContext.getFunctionAddress("glGetInvariantFloatvEXT")) != 0 & + (glGetLocalConstantBooleanvEXT = GLContext.getFunctionAddress("glGetLocalConstantBooleanvEXT")) != 0 & + (glGetLocalConstantIntegervEXT = GLContext.getFunctionAddress("glGetLocalConstantIntegervEXT")) != 0 & + (glGetLocalConstantFloatvEXT = GLContext.getFunctionAddress("glGetLocalConstantFloatvEXT")) != 0; + } + + private boolean EXT_vertex_weighting_initNativeFunctionAddresses() { + return + (glVertexWeightfEXT = GLContext.getFunctionAddress("glVertexWeightfEXT")) != 0 & + (glVertexWeightPointerEXT = GLContext.getFunctionAddress("glVertexWeightPointerEXT")) != 0; + } + + private boolean GL11_initNativeFunctionAddresses(boolean forwardCompatible) { + return + (forwardCompatible || (glAccum = GLContext.getFunctionAddress("glAccum")) != 0) & + (forwardCompatible || (glAlphaFunc = GLContext.getFunctionAddress("glAlphaFunc")) != 0) & + (glClearColor = GLContext.getFunctionAddress("glClearColor")) != 0 & + (forwardCompatible || (glClearAccum = GLContext.getFunctionAddress("glClearAccum")) != 0) & + (glClear = GLContext.getFunctionAddress("glClear")) != 0 & + (forwardCompatible || (glCallLists = GLContext.getFunctionAddress("glCallLists")) != 0) & + (forwardCompatible || (glCallList = GLContext.getFunctionAddress("glCallList")) != 0) & + (glBlendFunc = GLContext.getFunctionAddress("glBlendFunc")) != 0 & + (forwardCompatible || (glBitmap = GLContext.getFunctionAddress("glBitmap")) != 0) & + (glBindTexture = GLContext.getFunctionAddress("glBindTexture")) != 0 & + (forwardCompatible || (glPrioritizeTextures = GLContext.getFunctionAddress("glPrioritizeTextures")) != 0) & + (forwardCompatible || (glAreTexturesResident = GLContext.getFunctionAddress("glAreTexturesResident")) != 0) & + (forwardCompatible || (glBegin = GLContext.getFunctionAddress("glBegin")) != 0) & + (forwardCompatible || (glEnd = GLContext.getFunctionAddress("glEnd")) != 0) & + (glArrayElement = GLContext.getFunctionAddress("glArrayElement")) != 0 & + (glClearDepth = GLContext.getFunctionAddress("glClearDepth")) != 0 & + (forwardCompatible || (glDeleteLists = GLContext.getFunctionAddress("glDeleteLists")) != 0) & + (glDeleteTextures = GLContext.getFunctionAddress("glDeleteTextures")) != 0 & + (glCullFace = GLContext.getFunctionAddress("glCullFace")) != 0 & + (glCopyTexSubImage2D = GLContext.getFunctionAddress("glCopyTexSubImage2D")) != 0 & + (glCopyTexSubImage1D = GLContext.getFunctionAddress("glCopyTexSubImage1D")) != 0 & + (glCopyTexImage2D = GLContext.getFunctionAddress("glCopyTexImage2D")) != 0 & + (glCopyTexImage1D = GLContext.getFunctionAddress("glCopyTexImage1D")) != 0 & + (glCopyPixels = GLContext.getFunctionAddress("glCopyPixels")) != 0 & + (forwardCompatible || (glColorPointer = GLContext.getFunctionAddress("glColorPointer")) != 0) & + (forwardCompatible || (glColorMaterial = GLContext.getFunctionAddress("glColorMaterial")) != 0) & + (glColorMask = GLContext.getFunctionAddress("glColorMask")) != 0 & + (forwardCompatible || (glColor3b = GLContext.getFunctionAddress("glColor3b")) != 0) & + (forwardCompatible || (glColor3f = GLContext.getFunctionAddress("glColor3f")) != 0) & + (forwardCompatible || (glColor3d = GLContext.getFunctionAddress("glColor3d")) != 0) & + (forwardCompatible || (glColor3ub = GLContext.getFunctionAddress("glColor3ub")) != 0) & + (forwardCompatible || (glColor4b = GLContext.getFunctionAddress("glColor4b")) != 0) & + (forwardCompatible || (glColor4f = GLContext.getFunctionAddress("glColor4f")) != 0) & + (forwardCompatible || (glColor4d = GLContext.getFunctionAddress("glColor4d")) != 0) & + (forwardCompatible || (glColor4ub = GLContext.getFunctionAddress("glColor4ub")) != 0) & + (glClipPlane = GLContext.getFunctionAddress("glClipPlane")) != 0 & + (glClearStencil = GLContext.getFunctionAddress("glClearStencil")) != 0 & + (forwardCompatible || (glEvalPoint1 = GLContext.getFunctionAddress("glEvalPoint1")) != 0) & + (forwardCompatible || (glEvalPoint2 = GLContext.getFunctionAddress("glEvalPoint2")) != 0) & + (forwardCompatible || (glEvalMesh1 = GLContext.getFunctionAddress("glEvalMesh1")) != 0) & + (forwardCompatible || (glEvalMesh2 = GLContext.getFunctionAddress("glEvalMesh2")) != 0) & + (forwardCompatible || (glEvalCoord1f = GLContext.getFunctionAddress("glEvalCoord1f")) != 0) & + (forwardCompatible || (glEvalCoord1d = GLContext.getFunctionAddress("glEvalCoord1d")) != 0) & + (forwardCompatible || (glEvalCoord2f = GLContext.getFunctionAddress("glEvalCoord2f")) != 0) & + (forwardCompatible || (glEvalCoord2d = GLContext.getFunctionAddress("glEvalCoord2d")) != 0) & + (forwardCompatible || (glEnableClientState = GLContext.getFunctionAddress("glEnableClientState")) != 0) & + (forwardCompatible || (glDisableClientState = GLContext.getFunctionAddress("glDisableClientState")) != 0) & + (glEnable = GLContext.getFunctionAddress("glEnable")) != 0 & + (glDisable = GLContext.getFunctionAddress("glDisable")) != 0 & + (forwardCompatible || (glEdgeFlagPointer = GLContext.getFunctionAddress("glEdgeFlagPointer")) != 0) & + (forwardCompatible || (glEdgeFlag = GLContext.getFunctionAddress("glEdgeFlag")) != 0) & + (forwardCompatible || (glDrawPixels = GLContext.getFunctionAddress("glDrawPixels")) != 0) & + (glDrawElements = GLContext.getFunctionAddress("glDrawElements")) != 0 & + (glDrawBuffer = GLContext.getFunctionAddress("glDrawBuffer")) != 0 & + (glDrawArrays = GLContext.getFunctionAddress("glDrawArrays")) != 0 & + (glDepthRange = GLContext.getFunctionAddress("glDepthRange")) != 0 & + (glDepthMask = GLContext.getFunctionAddress("glDepthMask")) != 0 & + (glDepthFunc = GLContext.getFunctionAddress("glDepthFunc")) != 0 & + (forwardCompatible || (glFeedbackBuffer = GLContext.getFunctionAddress("glFeedbackBuffer")) != 0) & + (forwardCompatible || (glGetPixelMapfv = GLContext.getFunctionAddress("glGetPixelMapfv")) != 0) & + (forwardCompatible || (glGetPixelMapuiv = GLContext.getFunctionAddress("glGetPixelMapuiv")) != 0) & + (forwardCompatible || (glGetPixelMapusv = GLContext.getFunctionAddress("glGetPixelMapusv")) != 0) & + (forwardCompatible || (glGetMaterialfv = GLContext.getFunctionAddress("glGetMaterialfv")) != 0) & + (forwardCompatible || (glGetMaterialiv = GLContext.getFunctionAddress("glGetMaterialiv")) != 0) & + (forwardCompatible || (glGetMapfv = GLContext.getFunctionAddress("glGetMapfv")) != 0) & + (forwardCompatible || (glGetMapdv = GLContext.getFunctionAddress("glGetMapdv")) != 0) & + (forwardCompatible || (glGetMapiv = GLContext.getFunctionAddress("glGetMapiv")) != 0) & + (forwardCompatible || (glGetLightfv = GLContext.getFunctionAddress("glGetLightfv")) != 0) & + (forwardCompatible || (glGetLightiv = GLContext.getFunctionAddress("glGetLightiv")) != 0) & + (glGetError = GLContext.getFunctionAddress("glGetError")) != 0 & + (glGetClipPlane = GLContext.getFunctionAddress("glGetClipPlane")) != 0 & + (glGetBooleanv = GLContext.getFunctionAddress("glGetBooleanv")) != 0 & + (glGetDoublev = GLContext.getFunctionAddress("glGetDoublev")) != 0 & + (glGetFloatv = GLContext.getFunctionAddress("glGetFloatv")) != 0 & + (glGetIntegerv = GLContext.getFunctionAddress("glGetIntegerv")) != 0 & + (glGenTextures = GLContext.getFunctionAddress("glGenTextures")) != 0 & + (forwardCompatible || (glGenLists = GLContext.getFunctionAddress("glGenLists")) != 0) & + (forwardCompatible || (glFrustum = GLContext.getFunctionAddress("glFrustum")) != 0) & + (glFrontFace = GLContext.getFunctionAddress("glFrontFace")) != 0 & + (forwardCompatible || (glFogf = GLContext.getFunctionAddress("glFogf")) != 0) & + (forwardCompatible || (glFogi = GLContext.getFunctionAddress("glFogi")) != 0) & + (forwardCompatible || (glFogfv = GLContext.getFunctionAddress("glFogfv")) != 0) & + (forwardCompatible || (glFogiv = GLContext.getFunctionAddress("glFogiv")) != 0) & + (glFlush = GLContext.getFunctionAddress("glFlush")) != 0 & + (glFinish = GLContext.getFunctionAddress("glFinish")) != 0 & + (glGetPointerv = GLContext.getFunctionAddress("glGetPointerv")) != 0 & + (glIsEnabled = GLContext.getFunctionAddress("glIsEnabled")) != 0 & + (glInterleavedArrays = GLContext.getFunctionAddress("glInterleavedArrays")) != 0 & + (forwardCompatible || (glInitNames = GLContext.getFunctionAddress("glInitNames")) != 0) & + (glHint = GLContext.getFunctionAddress("glHint")) != 0 & + (glGetTexParameterfv = GLContext.getFunctionAddress("glGetTexParameterfv")) != 0 & + (glGetTexParameteriv = GLContext.getFunctionAddress("glGetTexParameteriv")) != 0 & + (glGetTexLevelParameterfv = GLContext.getFunctionAddress("glGetTexLevelParameterfv")) != 0 & + (glGetTexLevelParameteriv = GLContext.getFunctionAddress("glGetTexLevelParameteriv")) != 0 & + (glGetTexImage = GLContext.getFunctionAddress("glGetTexImage")) != 0 & + (forwardCompatible || (glGetTexGeniv = GLContext.getFunctionAddress("glGetTexGeniv")) != 0) & + (forwardCompatible || (glGetTexGenfv = GLContext.getFunctionAddress("glGetTexGenfv")) != 0) & + (forwardCompatible || (glGetTexGendv = GLContext.getFunctionAddress("glGetTexGendv")) != 0) & + (glGetTexEnviv = GLContext.getFunctionAddress("glGetTexEnviv")) != 0 & + (glGetTexEnvfv = GLContext.getFunctionAddress("glGetTexEnvfv")) != 0 & + (glGetString = GLContext.getFunctionAddress("glGetString")) != 0 & + (forwardCompatible || (glGetPolygonStipple = GLContext.getFunctionAddress("glGetPolygonStipple")) != 0) & + (forwardCompatible || (glIsList = GLContext.getFunctionAddress("glIsList")) != 0) & + (forwardCompatible || (glMaterialf = GLContext.getFunctionAddress("glMaterialf")) != 0) & + (forwardCompatible || (glMateriali = GLContext.getFunctionAddress("glMateriali")) != 0) & + (forwardCompatible || (glMaterialfv = GLContext.getFunctionAddress("glMaterialfv")) != 0) & + (forwardCompatible || (glMaterialiv = GLContext.getFunctionAddress("glMaterialiv")) != 0) & + (forwardCompatible || (glMapGrid1f = GLContext.getFunctionAddress("glMapGrid1f")) != 0) & + (forwardCompatible || (glMapGrid1d = GLContext.getFunctionAddress("glMapGrid1d")) != 0) & + (forwardCompatible || (glMapGrid2f = GLContext.getFunctionAddress("glMapGrid2f")) != 0) & + (forwardCompatible || (glMapGrid2d = GLContext.getFunctionAddress("glMapGrid2d")) != 0) & + (forwardCompatible || (glMap2f = GLContext.getFunctionAddress("glMap2f")) != 0) & + (forwardCompatible || (glMap2d = GLContext.getFunctionAddress("glMap2d")) != 0) & + (forwardCompatible || (glMap1f = GLContext.getFunctionAddress("glMap1f")) != 0) & + (forwardCompatible || (glMap1d = GLContext.getFunctionAddress("glMap1d")) != 0) & + (glLogicOp = GLContext.getFunctionAddress("glLogicOp")) != 0 & + (forwardCompatible || (glLoadName = GLContext.getFunctionAddress("glLoadName")) != 0) & + (forwardCompatible || (glLoadMatrixf = GLContext.getFunctionAddress("glLoadMatrixf")) != 0) & + (forwardCompatible || (glLoadMatrixd = GLContext.getFunctionAddress("glLoadMatrixd")) != 0) & + (forwardCompatible || (glLoadIdentity = GLContext.getFunctionAddress("glLoadIdentity")) != 0) & + (forwardCompatible || (glListBase = GLContext.getFunctionAddress("glListBase")) != 0) & + (glLineWidth = GLContext.getFunctionAddress("glLineWidth")) != 0 & + (forwardCompatible || (glLineStipple = GLContext.getFunctionAddress("glLineStipple")) != 0) & + (forwardCompatible || (glLightModelf = GLContext.getFunctionAddress("glLightModelf")) != 0) & + (forwardCompatible || (glLightModeli = GLContext.getFunctionAddress("glLightModeli")) != 0) & + (forwardCompatible || (glLightModelfv = GLContext.getFunctionAddress("glLightModelfv")) != 0) & + (forwardCompatible || (glLightModeliv = GLContext.getFunctionAddress("glLightModeliv")) != 0) & + (forwardCompatible || (glLightf = GLContext.getFunctionAddress("glLightf")) != 0) & + (forwardCompatible || (glLighti = GLContext.getFunctionAddress("glLighti")) != 0) & + (forwardCompatible || (glLightfv = GLContext.getFunctionAddress("glLightfv")) != 0) & + (forwardCompatible || (glLightiv = GLContext.getFunctionAddress("glLightiv")) != 0) & + (glIsTexture = GLContext.getFunctionAddress("glIsTexture")) != 0 & + (forwardCompatible || (glMatrixMode = GLContext.getFunctionAddress("glMatrixMode")) != 0) & + (forwardCompatible || (glPolygonStipple = GLContext.getFunctionAddress("glPolygonStipple")) != 0) & + (glPolygonOffset = GLContext.getFunctionAddress("glPolygonOffset")) != 0 & + (glPolygonMode = GLContext.getFunctionAddress("glPolygonMode")) != 0 & + (glPointSize = GLContext.getFunctionAddress("glPointSize")) != 0 & + (forwardCompatible || (glPixelZoom = GLContext.getFunctionAddress("glPixelZoom")) != 0) & + (forwardCompatible || (glPixelTransferf = GLContext.getFunctionAddress("glPixelTransferf")) != 0) & + (forwardCompatible || (glPixelTransferi = GLContext.getFunctionAddress("glPixelTransferi")) != 0) & + (glPixelStoref = GLContext.getFunctionAddress("glPixelStoref")) != 0 & + (glPixelStorei = GLContext.getFunctionAddress("glPixelStorei")) != 0 & + (forwardCompatible || (glPixelMapfv = GLContext.getFunctionAddress("glPixelMapfv")) != 0) & + (forwardCompatible || (glPixelMapuiv = GLContext.getFunctionAddress("glPixelMapuiv")) != 0) & + (forwardCompatible || (glPixelMapusv = GLContext.getFunctionAddress("glPixelMapusv")) != 0) & + (forwardCompatible || (glPassThrough = GLContext.getFunctionAddress("glPassThrough")) != 0) & + (forwardCompatible || (glOrtho = GLContext.getFunctionAddress("glOrtho")) != 0) & + (forwardCompatible || (glNormalPointer = GLContext.getFunctionAddress("glNormalPointer")) != 0) & + (forwardCompatible || (glNormal3b = GLContext.getFunctionAddress("glNormal3b")) != 0) & + (forwardCompatible || (glNormal3f = GLContext.getFunctionAddress("glNormal3f")) != 0) & + (forwardCompatible || (glNormal3d = GLContext.getFunctionAddress("glNormal3d")) != 0) & + (forwardCompatible || (glNormal3i = GLContext.getFunctionAddress("glNormal3i")) != 0) & + (forwardCompatible || (glNewList = GLContext.getFunctionAddress("glNewList")) != 0) & + (forwardCompatible || (glEndList = GLContext.getFunctionAddress("glEndList")) != 0) & + (forwardCompatible || (glMultMatrixf = GLContext.getFunctionAddress("glMultMatrixf")) != 0) & + (forwardCompatible || (glMultMatrixd = GLContext.getFunctionAddress("glMultMatrixd")) != 0) & + (glShadeModel = GLContext.getFunctionAddress("glShadeModel")) != 0 & + (forwardCompatible || (glSelectBuffer = GLContext.getFunctionAddress("glSelectBuffer")) != 0) & + (glScissor = GLContext.getFunctionAddress("glScissor")) != 0 & + (forwardCompatible || (glScalef = GLContext.getFunctionAddress("glScalef")) != 0) & + (forwardCompatible || (glScaled = GLContext.getFunctionAddress("glScaled")) != 0) & + (forwardCompatible || (glRotatef = GLContext.getFunctionAddress("glRotatef")) != 0) & + (forwardCompatible || (glRotated = GLContext.getFunctionAddress("glRotated")) != 0) & + (forwardCompatible || (glRenderMode = GLContext.getFunctionAddress("glRenderMode")) != 0) & + (forwardCompatible || (glRectf = GLContext.getFunctionAddress("glRectf")) != 0) & + (forwardCompatible || (glRectd = GLContext.getFunctionAddress("glRectd")) != 0) & + (forwardCompatible || (glRecti = GLContext.getFunctionAddress("glRecti")) != 0) & + (glReadPixels = GLContext.getFunctionAddress("glReadPixels")) != 0 & + (glReadBuffer = GLContext.getFunctionAddress("glReadBuffer")) != 0 & + (forwardCompatible || (glRasterPos2f = GLContext.getFunctionAddress("glRasterPos2f")) != 0) & + (forwardCompatible || (glRasterPos2d = GLContext.getFunctionAddress("glRasterPos2d")) != 0) & + (forwardCompatible || (glRasterPos2i = GLContext.getFunctionAddress("glRasterPos2i")) != 0) & + (forwardCompatible || (glRasterPos3f = GLContext.getFunctionAddress("glRasterPos3f")) != 0) & + (forwardCompatible || (glRasterPos3d = GLContext.getFunctionAddress("glRasterPos3d")) != 0) & + (forwardCompatible || (glRasterPos3i = GLContext.getFunctionAddress("glRasterPos3i")) != 0) & + (forwardCompatible || (glRasterPos4f = GLContext.getFunctionAddress("glRasterPos4f")) != 0) & + (forwardCompatible || (glRasterPos4d = GLContext.getFunctionAddress("glRasterPos4d")) != 0) & + (forwardCompatible || (glRasterPos4i = GLContext.getFunctionAddress("glRasterPos4i")) != 0) & + (forwardCompatible || (glPushName = GLContext.getFunctionAddress("glPushName")) != 0) & + (forwardCompatible || (glPopName = GLContext.getFunctionAddress("glPopName")) != 0) & + (forwardCompatible || (glPushMatrix = GLContext.getFunctionAddress("glPushMatrix")) != 0) & + (forwardCompatible || (glPopMatrix = GLContext.getFunctionAddress("glPopMatrix")) != 0) & + (forwardCompatible || (glPushClientAttrib = GLContext.getFunctionAddress("glPushClientAttrib")) != 0) & + (forwardCompatible || (glPopClientAttrib = GLContext.getFunctionAddress("glPopClientAttrib")) != 0) & + (forwardCompatible || (glPushAttrib = GLContext.getFunctionAddress("glPushAttrib")) != 0) & + (forwardCompatible || (glPopAttrib = GLContext.getFunctionAddress("glPopAttrib")) != 0) & + (glStencilFunc = GLContext.getFunctionAddress("glStencilFunc")) != 0 & + (forwardCompatible || (glVertexPointer = GLContext.getFunctionAddress("glVertexPointer")) != 0) & + (forwardCompatible || (glVertex2f = GLContext.getFunctionAddress("glVertex2f")) != 0) & + (forwardCompatible || (glVertex2d = GLContext.getFunctionAddress("glVertex2d")) != 0) & + (forwardCompatible || (glVertex2i = GLContext.getFunctionAddress("glVertex2i")) != 0) & + (forwardCompatible || (glVertex3f = GLContext.getFunctionAddress("glVertex3f")) != 0) & + (forwardCompatible || (glVertex3d = GLContext.getFunctionAddress("glVertex3d")) != 0) & + (forwardCompatible || (glVertex3i = GLContext.getFunctionAddress("glVertex3i")) != 0) & + (forwardCompatible || (glVertex4f = GLContext.getFunctionAddress("glVertex4f")) != 0) & + (forwardCompatible || (glVertex4d = GLContext.getFunctionAddress("glVertex4d")) != 0) & + (forwardCompatible || (glVertex4i = GLContext.getFunctionAddress("glVertex4i")) != 0) & + (forwardCompatible || (glTranslatef = GLContext.getFunctionAddress("glTranslatef")) != 0) & + (forwardCompatible || (glTranslated = GLContext.getFunctionAddress("glTranslated")) != 0) & + (glTexImage1D = GLContext.getFunctionAddress("glTexImage1D")) != 0 & + (glTexImage2D = GLContext.getFunctionAddress("glTexImage2D")) != 0 & + (glTexSubImage1D = GLContext.getFunctionAddress("glTexSubImage1D")) != 0 & + (glTexSubImage2D = GLContext.getFunctionAddress("glTexSubImage2D")) != 0 & + (glTexParameterf = GLContext.getFunctionAddress("glTexParameterf")) != 0 & + (glTexParameteri = GLContext.getFunctionAddress("glTexParameteri")) != 0 & + (glTexParameterfv = GLContext.getFunctionAddress("glTexParameterfv")) != 0 & + (glTexParameteriv = GLContext.getFunctionAddress("glTexParameteriv")) != 0 & + (forwardCompatible || (glTexGenf = GLContext.getFunctionAddress("glTexGenf")) != 0) & + (forwardCompatible || (glTexGend = GLContext.getFunctionAddress("glTexGend")) != 0) & + (forwardCompatible || (glTexGenfv = GLContext.getFunctionAddress("glTexGenfv")) != 0) & + (forwardCompatible || (glTexGendv = GLContext.getFunctionAddress("glTexGendv")) != 0) & + (forwardCompatible || (glTexGeni = GLContext.getFunctionAddress("glTexGeni")) != 0) & + (forwardCompatible || (glTexGeniv = GLContext.getFunctionAddress("glTexGeniv")) != 0) & + (glTexEnvf = GLContext.getFunctionAddress("glTexEnvf")) != 0 & + (glTexEnvi = GLContext.getFunctionAddress("glTexEnvi")) != 0 & + (glTexEnvfv = GLContext.getFunctionAddress("glTexEnvfv")) != 0 & + (glTexEnviv = GLContext.getFunctionAddress("glTexEnviv")) != 0 & + (forwardCompatible || (glTexCoordPointer = GLContext.getFunctionAddress("glTexCoordPointer")) != 0) & + (forwardCompatible || (glTexCoord1f = GLContext.getFunctionAddress("glTexCoord1f")) != 0) & + (forwardCompatible || (glTexCoord1d = GLContext.getFunctionAddress("glTexCoord1d")) != 0) & + (forwardCompatible || (glTexCoord2f = GLContext.getFunctionAddress("glTexCoord2f")) != 0) & + (forwardCompatible || (glTexCoord2d = GLContext.getFunctionAddress("glTexCoord2d")) != 0) & + (forwardCompatible || (glTexCoord3f = GLContext.getFunctionAddress("glTexCoord3f")) != 0) & + (forwardCompatible || (glTexCoord3d = GLContext.getFunctionAddress("glTexCoord3d")) != 0) & + (forwardCompatible || (glTexCoord4f = GLContext.getFunctionAddress("glTexCoord4f")) != 0) & + (forwardCompatible || (glTexCoord4d = GLContext.getFunctionAddress("glTexCoord4d")) != 0) & + (glStencilOp = GLContext.getFunctionAddress("glStencilOp")) != 0 & + (glStencilMask = GLContext.getFunctionAddress("glStencilMask")) != 0 & + (glViewport = GLContext.getFunctionAddress("glViewport")) != 0; + } + + private boolean GL12_initNativeFunctionAddresses() { + return + (glDrawRangeElements = GLContext.getFunctionAddress("glDrawRangeElements")) != 0 & + (glTexImage3D = GLContext.getFunctionAddress("glTexImage3D")) != 0 & + (glTexSubImage3D = GLContext.getFunctionAddress("glTexSubImage3D")) != 0 & + (glCopyTexSubImage3D = GLContext.getFunctionAddress("glCopyTexSubImage3D")) != 0; + } + + private boolean GL13_initNativeFunctionAddresses(boolean forwardCompatible) { + return + (glActiveTexture = GLContext.getFunctionAddress("glActiveTexture")) != 0 & + (forwardCompatible || (glClientActiveTexture = GLContext.getFunctionAddress("glClientActiveTexture")) != 0) & + (glCompressedTexImage1D = GLContext.getFunctionAddress("glCompressedTexImage1D")) != 0 & + (glCompressedTexImage2D = GLContext.getFunctionAddress("glCompressedTexImage2D")) != 0 & + (glCompressedTexImage3D = GLContext.getFunctionAddress("glCompressedTexImage3D")) != 0 & + (glCompressedTexSubImage1D = GLContext.getFunctionAddress("glCompressedTexSubImage1D")) != 0 & + (glCompressedTexSubImage2D = GLContext.getFunctionAddress("glCompressedTexSubImage2D")) != 0 & + (glCompressedTexSubImage3D = GLContext.getFunctionAddress("glCompressedTexSubImage3D")) != 0 & + (glGetCompressedTexImage = GLContext.getFunctionAddress("glGetCompressedTexImage")) != 0 & + (forwardCompatible || (glMultiTexCoord1f = GLContext.getFunctionAddress("glMultiTexCoord1f")) != 0) & + (forwardCompatible || (glMultiTexCoord1d = GLContext.getFunctionAddress("glMultiTexCoord1d")) != 0) & + (forwardCompatible || (glMultiTexCoord2f = GLContext.getFunctionAddress("glMultiTexCoord2f")) != 0) & + (forwardCompatible || (glMultiTexCoord2d = GLContext.getFunctionAddress("glMultiTexCoord2d")) != 0) & + (forwardCompatible || (glMultiTexCoord3f = GLContext.getFunctionAddress("glMultiTexCoord3f")) != 0) & + (forwardCompatible || (glMultiTexCoord3d = GLContext.getFunctionAddress("glMultiTexCoord3d")) != 0) & + (forwardCompatible || (glMultiTexCoord4f = GLContext.getFunctionAddress("glMultiTexCoord4f")) != 0) & + (forwardCompatible || (glMultiTexCoord4d = GLContext.getFunctionAddress("glMultiTexCoord4d")) != 0) & + (forwardCompatible || (glLoadTransposeMatrixf = GLContext.getFunctionAddress("glLoadTransposeMatrixf")) != 0) & + (forwardCompatible || (glLoadTransposeMatrixd = GLContext.getFunctionAddress("glLoadTransposeMatrixd")) != 0) & + (forwardCompatible || (glMultTransposeMatrixf = GLContext.getFunctionAddress("glMultTransposeMatrixf")) != 0) & + (forwardCompatible || (glMultTransposeMatrixd = GLContext.getFunctionAddress("glMultTransposeMatrixd")) != 0) & + (glSampleCoverage = GLContext.getFunctionAddress("glSampleCoverage")) != 0; + } + + private boolean GL14_initNativeFunctionAddresses(boolean forwardCompatible) { + return + (glBlendEquation = GLContext.getFunctionAddress("glBlendEquation")) != 0 & + (glBlendColor = GLContext.getFunctionAddress("glBlendColor")) != 0 & + (forwardCompatible || (glFogCoordf = GLContext.getFunctionAddress("glFogCoordf")) != 0) & + (forwardCompatible || (glFogCoordd = GLContext.getFunctionAddress("glFogCoordd")) != 0) & + (forwardCompatible || (glFogCoordPointer = GLContext.getFunctionAddress("glFogCoordPointer")) != 0) & + (glMultiDrawArrays = GLContext.getFunctionAddress("glMultiDrawArrays")) != 0 & + (glPointParameteri = GLContext.getFunctionAddress("glPointParameteri")) != 0 & + (glPointParameterf = GLContext.getFunctionAddress("glPointParameterf")) != 0 & + (glPointParameteriv = GLContext.getFunctionAddress("glPointParameteriv")) != 0 & + (glPointParameterfv = GLContext.getFunctionAddress("glPointParameterfv")) != 0 & + (forwardCompatible || (glSecondaryColor3b = GLContext.getFunctionAddress("glSecondaryColor3b")) != 0) & + (forwardCompatible || (glSecondaryColor3f = GLContext.getFunctionAddress("glSecondaryColor3f")) != 0) & + (forwardCompatible || (glSecondaryColor3d = GLContext.getFunctionAddress("glSecondaryColor3d")) != 0) & + (forwardCompatible || (glSecondaryColor3ub = GLContext.getFunctionAddress("glSecondaryColor3ub")) != 0) & + (forwardCompatible || (glSecondaryColorPointer = GLContext.getFunctionAddress("glSecondaryColorPointer")) != 0) & + (glBlendFuncSeparate = GLContext.getFunctionAddress("glBlendFuncSeparate")) != 0 & + (forwardCompatible || (glWindowPos2f = GLContext.getFunctionAddress("glWindowPos2f")) != 0) & + (forwardCompatible || (glWindowPos2d = GLContext.getFunctionAddress("glWindowPos2d")) != 0) & + (forwardCompatible || (glWindowPos2i = GLContext.getFunctionAddress("glWindowPos2i")) != 0) & + (forwardCompatible || (glWindowPos3f = GLContext.getFunctionAddress("glWindowPos3f")) != 0) & + (forwardCompatible || (glWindowPos3d = GLContext.getFunctionAddress("glWindowPos3d")) != 0) & + (forwardCompatible || (glWindowPos3i = GLContext.getFunctionAddress("glWindowPos3i")) != 0); + } + + private boolean GL15_initNativeFunctionAddresses() { + return + (glBindBuffer = GLContext.getFunctionAddress("glBindBuffer")) != 0 & + (glDeleteBuffers = GLContext.getFunctionAddress("glDeleteBuffers")) != 0 & + (glGenBuffers = GLContext.getFunctionAddress("glGenBuffers")) != 0 & + (glIsBuffer = GLContext.getFunctionAddress("glIsBuffer")) != 0 & + (glBufferData = GLContext.getFunctionAddress("glBufferData")) != 0 & + (glBufferSubData = GLContext.getFunctionAddress("glBufferSubData")) != 0 & + (glGetBufferSubData = GLContext.getFunctionAddress("glGetBufferSubData")) != 0 & + (glMapBuffer = GLContext.getFunctionAddress("glMapBuffer")) != 0 & + (glUnmapBuffer = GLContext.getFunctionAddress("glUnmapBuffer")) != 0 & + (glGetBufferParameteriv = GLContext.getFunctionAddress("glGetBufferParameteriv")) != 0 & + (glGetBufferPointerv = GLContext.getFunctionAddress("glGetBufferPointerv")) != 0 & + (glGenQueries = GLContext.getFunctionAddress("glGenQueries")) != 0 & + (glDeleteQueries = GLContext.getFunctionAddress("glDeleteQueries")) != 0 & + (glIsQuery = GLContext.getFunctionAddress("glIsQuery")) != 0 & + (glBeginQuery = GLContext.getFunctionAddress("glBeginQuery")) != 0 & + (glEndQuery = GLContext.getFunctionAddress("glEndQuery")) != 0 & + (glGetQueryiv = GLContext.getFunctionAddress("glGetQueryiv")) != 0 & + (glGetQueryObjectiv = GLContext.getFunctionAddress("glGetQueryObjectiv")) != 0 & + (glGetQueryObjectuiv = GLContext.getFunctionAddress("glGetQueryObjectuiv")) != 0; + } + + private boolean GL20_initNativeFunctionAddresses() { + return + (glShaderSource = GLContext.getFunctionAddress("glShaderSource")) != 0 & + (glCreateShader = GLContext.getFunctionAddress("glCreateShader")) != 0 & + (glIsShader = GLContext.getFunctionAddress("glIsShader")) != 0 & + (glCompileShader = GLContext.getFunctionAddress("glCompileShader")) != 0 & + (glDeleteShader = GLContext.getFunctionAddress("glDeleteShader")) != 0 & + (glCreateProgram = GLContext.getFunctionAddress("glCreateProgram")) != 0 & + (glIsProgram = GLContext.getFunctionAddress("glIsProgram")) != 0 & + (glAttachShader = GLContext.getFunctionAddress("glAttachShader")) != 0 & + (glDetachShader = GLContext.getFunctionAddress("glDetachShader")) != 0 & + (glLinkProgram = GLContext.getFunctionAddress("glLinkProgram")) != 0 & + (glUseProgram = GLContext.getFunctionAddress("glUseProgram")) != 0 & + (glValidateProgram = GLContext.getFunctionAddress("glValidateProgram")) != 0 & + (glDeleteProgram = GLContext.getFunctionAddress("glDeleteProgram")) != 0 & + (glUniform1f = GLContext.getFunctionAddress("glUniform1f")) != 0 & + (glUniform2f = GLContext.getFunctionAddress("glUniform2f")) != 0 & + (glUniform3f = GLContext.getFunctionAddress("glUniform3f")) != 0 & + (glUniform4f = GLContext.getFunctionAddress("glUniform4f")) != 0 & + (glUniform1i = GLContext.getFunctionAddress("glUniform1i")) != 0 & + (glUniform2i = GLContext.getFunctionAddress("glUniform2i")) != 0 & + (glUniform3i = GLContext.getFunctionAddress("glUniform3i")) != 0 & + (glUniform4i = GLContext.getFunctionAddress("glUniform4i")) != 0 & + (glUniform1fv = GLContext.getFunctionAddress("glUniform1fv")) != 0 & + (glUniform2fv = GLContext.getFunctionAddress("glUniform2fv")) != 0 & + (glUniform3fv = GLContext.getFunctionAddress("glUniform3fv")) != 0 & + (glUniform4fv = GLContext.getFunctionAddress("glUniform4fv")) != 0 & + (glUniform1iv = GLContext.getFunctionAddress("glUniform1iv")) != 0 & + (glUniform2iv = GLContext.getFunctionAddress("glUniform2iv")) != 0 & + (glUniform3iv = GLContext.getFunctionAddress("glUniform3iv")) != 0 & + (glUniform4iv = GLContext.getFunctionAddress("glUniform4iv")) != 0 & + (glUniformMatrix2fv = GLContext.getFunctionAddress("glUniformMatrix2fv")) != 0 & + (glUniformMatrix3fv = GLContext.getFunctionAddress("glUniformMatrix3fv")) != 0 & + (glUniformMatrix4fv = GLContext.getFunctionAddress("glUniformMatrix4fv")) != 0 & + (glGetShaderiv = GLContext.getFunctionAddress("glGetShaderiv")) != 0 & + (glGetProgramiv = GLContext.getFunctionAddress("glGetProgramiv")) != 0 & + (glGetShaderInfoLog = GLContext.getFunctionAddress("glGetShaderInfoLog")) != 0 & + (glGetProgramInfoLog = GLContext.getFunctionAddress("glGetProgramInfoLog")) != 0 & + (glGetAttachedShaders = GLContext.getFunctionAddress("glGetAttachedShaders")) != 0 & + (glGetUniformLocation = GLContext.getFunctionAddress("glGetUniformLocation")) != 0 & + (glGetActiveUniform = GLContext.getFunctionAddress("glGetActiveUniform")) != 0 & + (glGetUniformfv = GLContext.getFunctionAddress("glGetUniformfv")) != 0 & + (glGetUniformiv = GLContext.getFunctionAddress("glGetUniformiv")) != 0 & + (glGetShaderSource = GLContext.getFunctionAddress("glGetShaderSource")) != 0 & + (glVertexAttrib1s = GLContext.getFunctionAddress("glVertexAttrib1s")) != 0 & + (glVertexAttrib1f = GLContext.getFunctionAddress("glVertexAttrib1f")) != 0 & + (glVertexAttrib1d = GLContext.getFunctionAddress("glVertexAttrib1d")) != 0 & + (glVertexAttrib2s = GLContext.getFunctionAddress("glVertexAttrib2s")) != 0 & + (glVertexAttrib2f = GLContext.getFunctionAddress("glVertexAttrib2f")) != 0 & + (glVertexAttrib2d = GLContext.getFunctionAddress("glVertexAttrib2d")) != 0 & + (glVertexAttrib3s = GLContext.getFunctionAddress("glVertexAttrib3s")) != 0 & + (glVertexAttrib3f = GLContext.getFunctionAddress("glVertexAttrib3f")) != 0 & + (glVertexAttrib3d = GLContext.getFunctionAddress("glVertexAttrib3d")) != 0 & + (glVertexAttrib4s = GLContext.getFunctionAddress("glVertexAttrib4s")) != 0 & + (glVertexAttrib4f = GLContext.getFunctionAddress("glVertexAttrib4f")) != 0 & + (glVertexAttrib4d = GLContext.getFunctionAddress("glVertexAttrib4d")) != 0 & + (glVertexAttrib4Nub = GLContext.getFunctionAddress("glVertexAttrib4Nub")) != 0 & + (glVertexAttribPointer = GLContext.getFunctionAddress("glVertexAttribPointer")) != 0 & + (glEnableVertexAttribArray = GLContext.getFunctionAddress("glEnableVertexAttribArray")) != 0 & + (glDisableVertexAttribArray = GLContext.getFunctionAddress("glDisableVertexAttribArray")) != 0 & + (glGetVertexAttribfv = GLContext.getFunctionAddress("glGetVertexAttribfv")) != 0 & + (glGetVertexAttribdv = GLContext.getFunctionAddress("glGetVertexAttribdv")) != 0 & + (glGetVertexAttribiv = GLContext.getFunctionAddress("glGetVertexAttribiv")) != 0 & + (glGetVertexAttribPointerv = GLContext.getFunctionAddress("glGetVertexAttribPointerv")) != 0 & + (glBindAttribLocation = GLContext.getFunctionAddress("glBindAttribLocation")) != 0 & + (glGetActiveAttrib = GLContext.getFunctionAddress("glGetActiveAttrib")) != 0 & + (glGetAttribLocation = GLContext.getFunctionAddress("glGetAttribLocation")) != 0 & + (glDrawBuffers = GLContext.getFunctionAddress("glDrawBuffers")) != 0 & + (glStencilOpSeparate = GLContext.getFunctionAddress("glStencilOpSeparate")) != 0 & + (glStencilFuncSeparate = GLContext.getFunctionAddress("glStencilFuncSeparate")) != 0 & + (glStencilMaskSeparate = GLContext.getFunctionAddress("glStencilMaskSeparate")) != 0 & + (glBlendEquationSeparate = GLContext.getFunctionAddress("glBlendEquationSeparate")) != 0; + } + + private boolean GL21_initNativeFunctionAddresses() { + return + (glUniformMatrix2x3fv = GLContext.getFunctionAddress("glUniformMatrix2x3fv")) != 0 & + (glUniformMatrix3x2fv = GLContext.getFunctionAddress("glUniformMatrix3x2fv")) != 0 & + (glUniformMatrix2x4fv = GLContext.getFunctionAddress("glUniformMatrix2x4fv")) != 0 & + (glUniformMatrix4x2fv = GLContext.getFunctionAddress("glUniformMatrix4x2fv")) != 0 & + (glUniformMatrix3x4fv = GLContext.getFunctionAddress("glUniformMatrix3x4fv")) != 0 & + (glUniformMatrix4x3fv = GLContext.getFunctionAddress("glUniformMatrix4x3fv")) != 0; + } + + private boolean GL30_initNativeFunctionAddresses() { + return + (glGetStringi = GLContext.getFunctionAddress("glGetStringi")) != 0 & + (glClearBufferfv = GLContext.getFunctionAddress("glClearBufferfv")) != 0 & + (glClearBufferiv = GLContext.getFunctionAddress("glClearBufferiv")) != 0 & + (glClearBufferuiv = GLContext.getFunctionAddress("glClearBufferuiv")) != 0 & + (glClearBufferfi = GLContext.getFunctionAddress("glClearBufferfi")) != 0 & + (glVertexAttribI1i = GLContext.getFunctionAddress("glVertexAttribI1i")) != 0 & + (glVertexAttribI2i = GLContext.getFunctionAddress("glVertexAttribI2i")) != 0 & + (glVertexAttribI3i = GLContext.getFunctionAddress("glVertexAttribI3i")) != 0 & + (glVertexAttribI4i = GLContext.getFunctionAddress("glVertexAttribI4i")) != 0 & + (glVertexAttribI1ui = GLContext.getFunctionAddress("glVertexAttribI1ui")) != 0 & + (glVertexAttribI2ui = GLContext.getFunctionAddress("glVertexAttribI2ui")) != 0 & + (glVertexAttribI3ui = GLContext.getFunctionAddress("glVertexAttribI3ui")) != 0 & + (glVertexAttribI4ui = GLContext.getFunctionAddress("glVertexAttribI4ui")) != 0 & + (glVertexAttribI1iv = GLContext.getFunctionAddress("glVertexAttribI1iv")) != 0 & + (glVertexAttribI2iv = GLContext.getFunctionAddress("glVertexAttribI2iv")) != 0 & + (glVertexAttribI3iv = GLContext.getFunctionAddress("glVertexAttribI3iv")) != 0 & + (glVertexAttribI4iv = GLContext.getFunctionAddress("glVertexAttribI4iv")) != 0 & + (glVertexAttribI1uiv = GLContext.getFunctionAddress("glVertexAttribI1uiv")) != 0 & + (glVertexAttribI2uiv = GLContext.getFunctionAddress("glVertexAttribI2uiv")) != 0 & + (glVertexAttribI3uiv = GLContext.getFunctionAddress("glVertexAttribI3uiv")) != 0 & + (glVertexAttribI4uiv = GLContext.getFunctionAddress("glVertexAttribI4uiv")) != 0 & + (glVertexAttribI4bv = GLContext.getFunctionAddress("glVertexAttribI4bv")) != 0 & + (glVertexAttribI4sv = GLContext.getFunctionAddress("glVertexAttribI4sv")) != 0 & + (glVertexAttribI4ubv = GLContext.getFunctionAddress("glVertexAttribI4ubv")) != 0 & + (glVertexAttribI4usv = GLContext.getFunctionAddress("glVertexAttribI4usv")) != 0 & + (glVertexAttribIPointer = GLContext.getFunctionAddress("glVertexAttribIPointer")) != 0 & + (glGetVertexAttribIiv = GLContext.getFunctionAddress("glGetVertexAttribIiv")) != 0 & + (glGetVertexAttribIuiv = GLContext.getFunctionAddress("glGetVertexAttribIuiv")) != 0 & + (glUniform1ui = GLContext.getFunctionAddress("glUniform1ui")) != 0 & + (glUniform2ui = GLContext.getFunctionAddress("glUniform2ui")) != 0 & + (glUniform3ui = GLContext.getFunctionAddress("glUniform3ui")) != 0 & + (glUniform4ui = GLContext.getFunctionAddress("glUniform4ui")) != 0 & + (glUniform1uiv = GLContext.getFunctionAddress("glUniform1uiv")) != 0 & + (glUniform2uiv = GLContext.getFunctionAddress("glUniform2uiv")) != 0 & + (glUniform3uiv = GLContext.getFunctionAddress("glUniform3uiv")) != 0 & + (glUniform4uiv = GLContext.getFunctionAddress("glUniform4uiv")) != 0 & + (glGetUniformuiv = GLContext.getFunctionAddress("glGetUniformuiv")) != 0 & + (glBindFragDataLocation = GLContext.getFunctionAddress("glBindFragDataLocation")) != 0 & + (glGetFragDataLocation = GLContext.getFunctionAddress("glGetFragDataLocation")) != 0 & + (glBeginConditionalRender = GLContext.getFunctionAddress("glBeginConditionalRender")) != 0 & + (glEndConditionalRender = GLContext.getFunctionAddress("glEndConditionalRender")) != 0 & + (glMapBufferRange = GLContext.getFunctionAddress("glMapBufferRange")) != 0 & + (glFlushMappedBufferRange = GLContext.getFunctionAddress("glFlushMappedBufferRange")) != 0 & + (glClampColor = GLContext.getFunctionAddress("glClampColor")) != 0 & + (glIsRenderbuffer = GLContext.getFunctionAddress("glIsRenderbuffer")) != 0 & + (glBindRenderbuffer = GLContext.getFunctionAddress("glBindRenderbuffer")) != 0 & + (glDeleteRenderbuffers = GLContext.getFunctionAddress("glDeleteRenderbuffers")) != 0 & + (glGenRenderbuffers = GLContext.getFunctionAddress("glGenRenderbuffers")) != 0 & + (glRenderbufferStorage = GLContext.getFunctionAddress("glRenderbufferStorage")) != 0 & + (glGetRenderbufferParameteriv = GLContext.getFunctionAddress("glGetRenderbufferParameteriv")) != 0 & + (glIsFramebuffer = GLContext.getFunctionAddress("glIsFramebuffer")) != 0 & + (glBindFramebuffer = GLContext.getFunctionAddress("glBindFramebuffer")) != 0 & + (glDeleteFramebuffers = GLContext.getFunctionAddress("glDeleteFramebuffers")) != 0 & + (glGenFramebuffers = GLContext.getFunctionAddress("glGenFramebuffers")) != 0 & + (glCheckFramebufferStatus = GLContext.getFunctionAddress("glCheckFramebufferStatus")) != 0 & + (glFramebufferTexture1D = GLContext.getFunctionAddress("glFramebufferTexture1D")) != 0 & + (glFramebufferTexture2D = GLContext.getFunctionAddress("glFramebufferTexture2D")) != 0 & + (glFramebufferTexture3D = GLContext.getFunctionAddress("glFramebufferTexture3D")) != 0 & + (glFramebufferRenderbuffer = GLContext.getFunctionAddress("glFramebufferRenderbuffer")) != 0 & + (glGetFramebufferAttachmentParameteriv = GLContext.getFunctionAddress("glGetFramebufferAttachmentParameteriv")) != 0 & + (glGenerateMipmap = GLContext.getFunctionAddress("glGenerateMipmap")) != 0 & + (glRenderbufferStorageMultisample = GLContext.getFunctionAddress("glRenderbufferStorageMultisample")) != 0 & + (glBlitFramebuffer = GLContext.getFunctionAddress("glBlitFramebuffer")) != 0 & + (glTexParameterIiv = GLContext.getFunctionAddress("glTexParameterIiv")) != 0 & + (glTexParameterIuiv = GLContext.getFunctionAddress("glTexParameterIuiv")) != 0 & + (glGetTexParameterIiv = GLContext.getFunctionAddress("glGetTexParameterIiv")) != 0 & + (glGetTexParameterIuiv = GLContext.getFunctionAddress("glGetTexParameterIuiv")) != 0 & + (glFramebufferTextureLayer = GLContext.getFunctionAddress("glFramebufferTextureLayer")) != 0 & + (glColorMaski = GLContext.getFunctionAddress("glColorMaski")) != 0 & + (glGetBooleani_v = GLContext.getFunctionAddress("glGetBooleani_v")) != 0 & + (glGetIntegeri_v = GLContext.getFunctionAddress("glGetIntegeri_v")) != 0 & + (glEnablei = GLContext.getFunctionAddress("glEnablei")) != 0 & + (glDisablei = GLContext.getFunctionAddress("glDisablei")) != 0 & + (glIsEnabledi = GLContext.getFunctionAddress("glIsEnabledi")) != 0 & + (glBindBufferRange = GLContext.getFunctionAddress("glBindBufferRange")) != 0 & + (glBindBufferBase = GLContext.getFunctionAddress("glBindBufferBase")) != 0 & + (glBeginTransformFeedback = GLContext.getFunctionAddress("glBeginTransformFeedback")) != 0 & + (glEndTransformFeedback = GLContext.getFunctionAddress("glEndTransformFeedback")) != 0 & + (glTransformFeedbackVaryings = GLContext.getFunctionAddress("glTransformFeedbackVaryings")) != 0 & + (glGetTransformFeedbackVarying = GLContext.getFunctionAddress("glGetTransformFeedbackVarying")) != 0 & + (glBindVertexArray = GLContext.getFunctionAddress("glBindVertexArray")) != 0 & + (glDeleteVertexArrays = GLContext.getFunctionAddress("glDeleteVertexArrays")) != 0 & + (glGenVertexArrays = GLContext.getFunctionAddress("glGenVertexArrays")) != 0 & + (glIsVertexArray = GLContext.getFunctionAddress("glIsVertexArray")) != 0; + } + + private boolean GL31_initNativeFunctionAddresses() { + return + (glDrawArraysInstanced = GLContext.getFunctionAddress("glDrawArraysInstanced")) != 0 & + (glDrawElementsInstanced = GLContext.getFunctionAddress("glDrawElementsInstanced")) != 0 & + (glCopyBufferSubData = GLContext.getFunctionAddress("glCopyBufferSubData")) != 0 & + (glPrimitiveRestartIndex = GLContext.getFunctionAddress("glPrimitiveRestartIndex")) != 0 & + (glTexBuffer = GLContext.getFunctionAddress("glTexBuffer")) != 0 & + (glGetUniformIndices = GLContext.getFunctionAddress("glGetUniformIndices")) != 0 & + (glGetActiveUniformsiv = GLContext.getFunctionAddress("glGetActiveUniformsiv")) != 0 & + (glGetActiveUniformName = GLContext.getFunctionAddress("glGetActiveUniformName")) != 0 & + (glGetUniformBlockIndex = GLContext.getFunctionAddress("glGetUniformBlockIndex")) != 0 & + (glGetActiveUniformBlockiv = GLContext.getFunctionAddress("glGetActiveUniformBlockiv")) != 0 & + (glGetActiveUniformBlockName = GLContext.getFunctionAddress("glGetActiveUniformBlockName")) != 0 & + (glUniformBlockBinding = GLContext.getFunctionAddress("glUniformBlockBinding")) != 0; + } + + private boolean GL32_initNativeFunctionAddresses() { + return + (glGetBufferParameteri64v = GLContext.getFunctionAddress("glGetBufferParameteri64v")) != 0 & + (glDrawElementsBaseVertex = GLContext.getFunctionAddress("glDrawElementsBaseVertex")) != 0 & + (glDrawRangeElementsBaseVertex = GLContext.getFunctionAddress("glDrawRangeElementsBaseVertex")) != 0 & + (glDrawElementsInstancedBaseVertex = GLContext.getFunctionAddress("glDrawElementsInstancedBaseVertex")) != 0 & + (glProvokingVertex = GLContext.getFunctionAddress("glProvokingVertex")) != 0 & + (glTexImage2DMultisample = GLContext.getFunctionAddress("glTexImage2DMultisample")) != 0 & + (glTexImage3DMultisample = GLContext.getFunctionAddress("glTexImage3DMultisample")) != 0 & + (glGetMultisamplefv = GLContext.getFunctionAddress("glGetMultisamplefv")) != 0 & + (glSampleMaski = GLContext.getFunctionAddress("glSampleMaski")) != 0 & + (glFramebufferTexture = GLContext.getFunctionAddress("glFramebufferTexture")) != 0 & + (glFenceSync = GLContext.getFunctionAddress("glFenceSync")) != 0 & + (glIsSync = GLContext.getFunctionAddress("glIsSync")) != 0 & + (glDeleteSync = GLContext.getFunctionAddress("glDeleteSync")) != 0 & + (glClientWaitSync = GLContext.getFunctionAddress("glClientWaitSync")) != 0 & + (glWaitSync = GLContext.getFunctionAddress("glWaitSync")) != 0 & + (glGetInteger64v = GLContext.getFunctionAddress("glGetInteger64v")) != 0 & + ((glGetInteger64i_v = GLContext.getFunctionAddress("glGetInteger64i_v")) != 0 || true) & + (glGetSynciv = GLContext.getFunctionAddress("glGetSynciv")) != 0; + } + + private boolean GL33_initNativeFunctionAddresses(boolean forwardCompatible) { + return + (glBindFragDataLocationIndexed = GLContext.getFunctionAddress("glBindFragDataLocationIndexed")) != 0 & + (glGetFragDataIndex = GLContext.getFunctionAddress("glGetFragDataIndex")) != 0 & + (glGenSamplers = GLContext.getFunctionAddress("glGenSamplers")) != 0 & + (glDeleteSamplers = GLContext.getFunctionAddress("glDeleteSamplers")) != 0 & + (glIsSampler = GLContext.getFunctionAddress("glIsSampler")) != 0 & + (glBindSampler = GLContext.getFunctionAddress("glBindSampler")) != 0 & + (glSamplerParameteri = GLContext.getFunctionAddress("glSamplerParameteri")) != 0 & + (glSamplerParameterf = GLContext.getFunctionAddress("glSamplerParameterf")) != 0 & + (glSamplerParameteriv = GLContext.getFunctionAddress("glSamplerParameteriv")) != 0 & + (glSamplerParameterfv = GLContext.getFunctionAddress("glSamplerParameterfv")) != 0 & + (glSamplerParameterIiv = GLContext.getFunctionAddress("glSamplerParameterIiv")) != 0 & + (glSamplerParameterIuiv = GLContext.getFunctionAddress("glSamplerParameterIuiv")) != 0 & + (glGetSamplerParameteriv = GLContext.getFunctionAddress("glGetSamplerParameteriv")) != 0 & + (glGetSamplerParameterfv = GLContext.getFunctionAddress("glGetSamplerParameterfv")) != 0 & + (glGetSamplerParameterIiv = GLContext.getFunctionAddress("glGetSamplerParameterIiv")) != 0 & + (glGetSamplerParameterIuiv = GLContext.getFunctionAddress("glGetSamplerParameterIuiv")) != 0 & + (glQueryCounter = GLContext.getFunctionAddress("glQueryCounter")) != 0 & + (glGetQueryObjecti64v = GLContext.getFunctionAddress("glGetQueryObjecti64v")) != 0 & + (glGetQueryObjectui64v = GLContext.getFunctionAddress("glGetQueryObjectui64v")) != 0 & + (glVertexAttribDivisor = GLContext.getFunctionAddress("glVertexAttribDivisor")) != 0 & + (forwardCompatible || (glVertexP2ui = GLContext.getFunctionAddress("glVertexP2ui")) != 0) & + (forwardCompatible || (glVertexP3ui = GLContext.getFunctionAddress("glVertexP3ui")) != 0) & + (forwardCompatible || (glVertexP4ui = GLContext.getFunctionAddress("glVertexP4ui")) != 0) & + (forwardCompatible || (glVertexP2uiv = GLContext.getFunctionAddress("glVertexP2uiv")) != 0) & + (forwardCompatible || (glVertexP3uiv = GLContext.getFunctionAddress("glVertexP3uiv")) != 0) & + (forwardCompatible || (glVertexP4uiv = GLContext.getFunctionAddress("glVertexP4uiv")) != 0) & + (forwardCompatible || (glTexCoordP1ui = GLContext.getFunctionAddress("glTexCoordP1ui")) != 0) & + (forwardCompatible || (glTexCoordP2ui = GLContext.getFunctionAddress("glTexCoordP2ui")) != 0) & + (forwardCompatible || (glTexCoordP3ui = GLContext.getFunctionAddress("glTexCoordP3ui")) != 0) & + (forwardCompatible || (glTexCoordP4ui = GLContext.getFunctionAddress("glTexCoordP4ui")) != 0) & + (forwardCompatible || (glTexCoordP1uiv = GLContext.getFunctionAddress("glTexCoordP1uiv")) != 0) & + (forwardCompatible || (glTexCoordP2uiv = GLContext.getFunctionAddress("glTexCoordP2uiv")) != 0) & + (forwardCompatible || (glTexCoordP3uiv = GLContext.getFunctionAddress("glTexCoordP3uiv")) != 0) & + (forwardCompatible || (glTexCoordP4uiv = GLContext.getFunctionAddress("glTexCoordP4uiv")) != 0) & + (forwardCompatible || (glMultiTexCoordP1ui = GLContext.getFunctionAddress("glMultiTexCoordP1ui")) != 0) & + (forwardCompatible || (glMultiTexCoordP2ui = GLContext.getFunctionAddress("glMultiTexCoordP2ui")) != 0) & + (forwardCompatible || (glMultiTexCoordP3ui = GLContext.getFunctionAddress("glMultiTexCoordP3ui")) != 0) & + (forwardCompatible || (glMultiTexCoordP4ui = GLContext.getFunctionAddress("glMultiTexCoordP4ui")) != 0) & + (forwardCompatible || (glMultiTexCoordP1uiv = GLContext.getFunctionAddress("glMultiTexCoordP1uiv")) != 0) & + (forwardCompatible || (glMultiTexCoordP2uiv = GLContext.getFunctionAddress("glMultiTexCoordP2uiv")) != 0) & + (forwardCompatible || (glMultiTexCoordP3uiv = GLContext.getFunctionAddress("glMultiTexCoordP3uiv")) != 0) & + (forwardCompatible || (glMultiTexCoordP4uiv = GLContext.getFunctionAddress("glMultiTexCoordP4uiv")) != 0) & + (forwardCompatible || (glNormalP3ui = GLContext.getFunctionAddress("glNormalP3ui")) != 0) & + (forwardCompatible || (glNormalP3uiv = GLContext.getFunctionAddress("glNormalP3uiv")) != 0) & + (forwardCompatible || (glColorP3ui = GLContext.getFunctionAddress("glColorP3ui")) != 0) & + (forwardCompatible || (glColorP4ui = GLContext.getFunctionAddress("glColorP4ui")) != 0) & + (forwardCompatible || (glColorP3uiv = GLContext.getFunctionAddress("glColorP3uiv")) != 0) & + (forwardCompatible || (glColorP4uiv = GLContext.getFunctionAddress("glColorP4uiv")) != 0) & + (forwardCompatible || (glSecondaryColorP3ui = GLContext.getFunctionAddress("glSecondaryColorP3ui")) != 0) & + (forwardCompatible || (glSecondaryColorP3uiv = GLContext.getFunctionAddress("glSecondaryColorP3uiv")) != 0) & + (forwardCompatible || (glVertexAttribP1ui = GLContext.getFunctionAddress("glVertexAttribP1ui")) != 0) & + (forwardCompatible || (glVertexAttribP2ui = GLContext.getFunctionAddress("glVertexAttribP2ui")) != 0) & + (forwardCompatible || (glVertexAttribP3ui = GLContext.getFunctionAddress("glVertexAttribP3ui")) != 0) & + (forwardCompatible || (glVertexAttribP4ui = GLContext.getFunctionAddress("glVertexAttribP4ui")) != 0) & + (forwardCompatible || (glVertexAttribP1uiv = GLContext.getFunctionAddress("glVertexAttribP1uiv")) != 0) & + (forwardCompatible || (glVertexAttribP2uiv = GLContext.getFunctionAddress("glVertexAttribP2uiv")) != 0) & + (forwardCompatible || (glVertexAttribP3uiv = GLContext.getFunctionAddress("glVertexAttribP3uiv")) != 0) & + (forwardCompatible || (glVertexAttribP4uiv = GLContext.getFunctionAddress("glVertexAttribP4uiv")) != 0); + } + + private boolean GL40_initNativeFunctionAddresses() { + return + (glBlendEquationi = GLContext.getFunctionAddress("glBlendEquationi")) != 0 & + (glBlendEquationSeparatei = GLContext.getFunctionAddress("glBlendEquationSeparatei")) != 0 & + (glBlendFunci = GLContext.getFunctionAddress("glBlendFunci")) != 0 & + (glBlendFuncSeparatei = GLContext.getFunctionAddress("glBlendFuncSeparatei")) != 0 & + (glDrawArraysIndirect = GLContext.getFunctionAddress("glDrawArraysIndirect")) != 0 & + (glDrawElementsIndirect = GLContext.getFunctionAddress("glDrawElementsIndirect")) != 0 & + (glUniform1d = GLContext.getFunctionAddress("glUniform1d")) != 0 & + (glUniform2d = GLContext.getFunctionAddress("glUniform2d")) != 0 & + (glUniform3d = GLContext.getFunctionAddress("glUniform3d")) != 0 & + (glUniform4d = GLContext.getFunctionAddress("glUniform4d")) != 0 & + (glUniform1dv = GLContext.getFunctionAddress("glUniform1dv")) != 0 & + (glUniform2dv = GLContext.getFunctionAddress("glUniform2dv")) != 0 & + (glUniform3dv = GLContext.getFunctionAddress("glUniform3dv")) != 0 & + (glUniform4dv = GLContext.getFunctionAddress("glUniform4dv")) != 0 & + (glUniformMatrix2dv = GLContext.getFunctionAddress("glUniformMatrix2dv")) != 0 & + (glUniformMatrix3dv = GLContext.getFunctionAddress("glUniformMatrix3dv")) != 0 & + (glUniformMatrix4dv = GLContext.getFunctionAddress("glUniformMatrix4dv")) != 0 & + (glUniformMatrix2x3dv = GLContext.getFunctionAddress("glUniformMatrix2x3dv")) != 0 & + (glUniformMatrix2x4dv = GLContext.getFunctionAddress("glUniformMatrix2x4dv")) != 0 & + (glUniformMatrix3x2dv = GLContext.getFunctionAddress("glUniformMatrix3x2dv")) != 0 & + (glUniformMatrix3x4dv = GLContext.getFunctionAddress("glUniformMatrix3x4dv")) != 0 & + (glUniformMatrix4x2dv = GLContext.getFunctionAddress("glUniformMatrix4x2dv")) != 0 & + (glUniformMatrix4x3dv = GLContext.getFunctionAddress("glUniformMatrix4x3dv")) != 0 & + (glGetUniformdv = GLContext.getFunctionAddress("glGetUniformdv")) != 0 & + (glMinSampleShading = GLContext.getFunctionAddress("glMinSampleShading")) != 0 & + (glGetSubroutineUniformLocation = GLContext.getFunctionAddress("glGetSubroutineUniformLocation")) != 0 & + (glGetSubroutineIndex = GLContext.getFunctionAddress("glGetSubroutineIndex")) != 0 & + (glGetActiveSubroutineUniformiv = GLContext.getFunctionAddress("glGetActiveSubroutineUniformiv")) != 0 & + (glGetActiveSubroutineUniformName = GLContext.getFunctionAddress("glGetActiveSubroutineUniformName")) != 0 & + (glGetActiveSubroutineName = GLContext.getFunctionAddress("glGetActiveSubroutineName")) != 0 & + (glUniformSubroutinesuiv = GLContext.getFunctionAddress("glUniformSubroutinesuiv")) != 0 & + (glGetUniformSubroutineuiv = GLContext.getFunctionAddress("glGetUniformSubroutineuiv")) != 0 & + (glGetProgramStageiv = GLContext.getFunctionAddress("glGetProgramStageiv")) != 0 & + (glPatchParameteri = GLContext.getFunctionAddress("glPatchParameteri")) != 0 & + (glPatchParameterfv = GLContext.getFunctionAddress("glPatchParameterfv")) != 0 & + (glBindTransformFeedback = GLContext.getFunctionAddress("glBindTransformFeedback")) != 0 & + (glDeleteTransformFeedbacks = GLContext.getFunctionAddress("glDeleteTransformFeedbacks")) != 0 & + (glGenTransformFeedbacks = GLContext.getFunctionAddress("glGenTransformFeedbacks")) != 0 & + (glIsTransformFeedback = GLContext.getFunctionAddress("glIsTransformFeedback")) != 0 & + (glPauseTransformFeedback = GLContext.getFunctionAddress("glPauseTransformFeedback")) != 0 & + (glResumeTransformFeedback = GLContext.getFunctionAddress("glResumeTransformFeedback")) != 0 & + (glDrawTransformFeedback = GLContext.getFunctionAddress("glDrawTransformFeedback")) != 0 & + (glDrawTransformFeedbackStream = GLContext.getFunctionAddress("glDrawTransformFeedbackStream")) != 0 & + (glBeginQueryIndexed = GLContext.getFunctionAddress("glBeginQueryIndexed")) != 0 & + (glEndQueryIndexed = GLContext.getFunctionAddress("glEndQueryIndexed")) != 0 & + (glGetQueryIndexediv = GLContext.getFunctionAddress("glGetQueryIndexediv")) != 0; + } + + private boolean GL41_initNativeFunctionAddresses() { + return + (glReleaseShaderCompiler = GLContext.getFunctionAddress("glReleaseShaderCompiler")) != 0 & + (glShaderBinary = GLContext.getFunctionAddress("glShaderBinary")) != 0 & + (glGetShaderPrecisionFormat = GLContext.getFunctionAddress("glGetShaderPrecisionFormat")) != 0 & + (glDepthRangef = GLContext.getFunctionAddress("glDepthRangef")) != 0 & + (glClearDepthf = GLContext.getFunctionAddress("glClearDepthf")) != 0 & + (glGetProgramBinary = GLContext.getFunctionAddress("glGetProgramBinary")) != 0 & + (glProgramBinary = GLContext.getFunctionAddress("glProgramBinary")) != 0 & + (glProgramParameteri = GLContext.getFunctionAddress("glProgramParameteri")) != 0 & + (glUseProgramStages = GLContext.getFunctionAddress("glUseProgramStages")) != 0 & + (glActiveShaderProgram = GLContext.getFunctionAddress("glActiveShaderProgram")) != 0 & + (glCreateShaderProgramv = GLContext.getFunctionAddress("glCreateShaderProgramv")) != 0 & + (glBindProgramPipeline = GLContext.getFunctionAddress("glBindProgramPipeline")) != 0 & + (glDeleteProgramPipelines = GLContext.getFunctionAddress("glDeleteProgramPipelines")) != 0 & + (glGenProgramPipelines = GLContext.getFunctionAddress("glGenProgramPipelines")) != 0 & + (glIsProgramPipeline = GLContext.getFunctionAddress("glIsProgramPipeline")) != 0 & + (glGetProgramPipelineiv = GLContext.getFunctionAddress("glGetProgramPipelineiv")) != 0 & + (glProgramUniform1i = GLContext.getFunctionAddress("glProgramUniform1i")) != 0 & + (glProgramUniform2i = GLContext.getFunctionAddress("glProgramUniform2i")) != 0 & + (glProgramUniform3i = GLContext.getFunctionAddress("glProgramUniform3i")) != 0 & + (glProgramUniform4i = GLContext.getFunctionAddress("glProgramUniform4i")) != 0 & + (glProgramUniform1f = GLContext.getFunctionAddress("glProgramUniform1f")) != 0 & + (glProgramUniform2f = GLContext.getFunctionAddress("glProgramUniform2f")) != 0 & + (glProgramUniform3f = GLContext.getFunctionAddress("glProgramUniform3f")) != 0 & + (glProgramUniform4f = GLContext.getFunctionAddress("glProgramUniform4f")) != 0 & + (glProgramUniform1d = GLContext.getFunctionAddress("glProgramUniform1d")) != 0 & + (glProgramUniform2d = GLContext.getFunctionAddress("glProgramUniform2d")) != 0 & + (glProgramUniform3d = GLContext.getFunctionAddress("glProgramUniform3d")) != 0 & + (glProgramUniform4d = GLContext.getFunctionAddress("glProgramUniform4d")) != 0 & + (glProgramUniform1iv = GLContext.getFunctionAddress("glProgramUniform1iv")) != 0 & + (glProgramUniform2iv = GLContext.getFunctionAddress("glProgramUniform2iv")) != 0 & + (glProgramUniform3iv = GLContext.getFunctionAddress("glProgramUniform3iv")) != 0 & + (glProgramUniform4iv = GLContext.getFunctionAddress("glProgramUniform4iv")) != 0 & + (glProgramUniform1fv = GLContext.getFunctionAddress("glProgramUniform1fv")) != 0 & + (glProgramUniform2fv = GLContext.getFunctionAddress("glProgramUniform2fv")) != 0 & + (glProgramUniform3fv = GLContext.getFunctionAddress("glProgramUniform3fv")) != 0 & + (glProgramUniform4fv = GLContext.getFunctionAddress("glProgramUniform4fv")) != 0 & + (glProgramUniform1dv = GLContext.getFunctionAddress("glProgramUniform1dv")) != 0 & + (glProgramUniform2dv = GLContext.getFunctionAddress("glProgramUniform2dv")) != 0 & + (glProgramUniform3dv = GLContext.getFunctionAddress("glProgramUniform3dv")) != 0 & + (glProgramUniform4dv = GLContext.getFunctionAddress("glProgramUniform4dv")) != 0 & + (glProgramUniform1ui = GLContext.getFunctionAddress("glProgramUniform1ui")) != 0 & + (glProgramUniform2ui = GLContext.getFunctionAddress("glProgramUniform2ui")) != 0 & + (glProgramUniform3ui = GLContext.getFunctionAddress("glProgramUniform3ui")) != 0 & + (glProgramUniform4ui = GLContext.getFunctionAddress("glProgramUniform4ui")) != 0 & + (glProgramUniform1uiv = GLContext.getFunctionAddress("glProgramUniform1uiv")) != 0 & + (glProgramUniform2uiv = GLContext.getFunctionAddress("glProgramUniform2uiv")) != 0 & + (glProgramUniform3uiv = GLContext.getFunctionAddress("glProgramUniform3uiv")) != 0 & + (glProgramUniform4uiv = GLContext.getFunctionAddress("glProgramUniform4uiv")) != 0 & + (glProgramUniformMatrix2fv = GLContext.getFunctionAddress("glProgramUniformMatrix2fv")) != 0 & + (glProgramUniformMatrix3fv = GLContext.getFunctionAddress("glProgramUniformMatrix3fv")) != 0 & + (glProgramUniformMatrix4fv = GLContext.getFunctionAddress("glProgramUniformMatrix4fv")) != 0 & + (glProgramUniformMatrix2dv = GLContext.getFunctionAddress("glProgramUniformMatrix2dv")) != 0 & + (glProgramUniformMatrix3dv = GLContext.getFunctionAddress("glProgramUniformMatrix3dv")) != 0 & + (glProgramUniformMatrix4dv = GLContext.getFunctionAddress("glProgramUniformMatrix4dv")) != 0 & + (glProgramUniformMatrix2x3fv = GLContext.getFunctionAddress("glProgramUniformMatrix2x3fv")) != 0 & + (glProgramUniformMatrix3x2fv = GLContext.getFunctionAddress("glProgramUniformMatrix3x2fv")) != 0 & + (glProgramUniformMatrix2x4fv = GLContext.getFunctionAddress("glProgramUniformMatrix2x4fv")) != 0 & + (glProgramUniformMatrix4x2fv = GLContext.getFunctionAddress("glProgramUniformMatrix4x2fv")) != 0 & + (glProgramUniformMatrix3x4fv = GLContext.getFunctionAddress("glProgramUniformMatrix3x4fv")) != 0 & + (glProgramUniformMatrix4x3fv = GLContext.getFunctionAddress("glProgramUniformMatrix4x3fv")) != 0 & + (glProgramUniformMatrix2x3dv = GLContext.getFunctionAddress("glProgramUniformMatrix2x3dv")) != 0 & + (glProgramUniformMatrix3x2dv = GLContext.getFunctionAddress("glProgramUniformMatrix3x2dv")) != 0 & + (glProgramUniformMatrix2x4dv = GLContext.getFunctionAddress("glProgramUniformMatrix2x4dv")) != 0 & + (glProgramUniformMatrix4x2dv = GLContext.getFunctionAddress("glProgramUniformMatrix4x2dv")) != 0 & + (glProgramUniformMatrix3x4dv = GLContext.getFunctionAddress("glProgramUniformMatrix3x4dv")) != 0 & + (glProgramUniformMatrix4x3dv = GLContext.getFunctionAddress("glProgramUniformMatrix4x3dv")) != 0 & + (glValidateProgramPipeline = GLContext.getFunctionAddress("glValidateProgramPipeline")) != 0 & + (glGetProgramPipelineInfoLog = GLContext.getFunctionAddress("glGetProgramPipelineInfoLog")) != 0 & + (glVertexAttribL1d = GLContext.getFunctionAddress("glVertexAttribL1d")) != 0 & + (glVertexAttribL2d = GLContext.getFunctionAddress("glVertexAttribL2d")) != 0 & + (glVertexAttribL3d = GLContext.getFunctionAddress("glVertexAttribL3d")) != 0 & + (glVertexAttribL4d = GLContext.getFunctionAddress("glVertexAttribL4d")) != 0 & + (glVertexAttribL1dv = GLContext.getFunctionAddress("glVertexAttribL1dv")) != 0 & + (glVertexAttribL2dv = GLContext.getFunctionAddress("glVertexAttribL2dv")) != 0 & + (glVertexAttribL3dv = GLContext.getFunctionAddress("glVertexAttribL3dv")) != 0 & + (glVertexAttribL4dv = GLContext.getFunctionAddress("glVertexAttribL4dv")) != 0 & + (glVertexAttribLPointer = GLContext.getFunctionAddress("glVertexAttribLPointer")) != 0 & + (glGetVertexAttribLdv = GLContext.getFunctionAddress("glGetVertexAttribLdv")) != 0 & + (glViewportArrayv = GLContext.getFunctionAddress("glViewportArrayv")) != 0 & + (glViewportIndexedf = GLContext.getFunctionAddress("glViewportIndexedf")) != 0 & + (glViewportIndexedfv = GLContext.getFunctionAddress("glViewportIndexedfv")) != 0 & + (glScissorArrayv = GLContext.getFunctionAddress("glScissorArrayv")) != 0 & + (glScissorIndexed = GLContext.getFunctionAddress("glScissorIndexed")) != 0 & + (glScissorIndexedv = GLContext.getFunctionAddress("glScissorIndexedv")) != 0 & + (glDepthRangeArrayv = GLContext.getFunctionAddress("glDepthRangeArrayv")) != 0 & + (glDepthRangeIndexed = GLContext.getFunctionAddress("glDepthRangeIndexed")) != 0 & + (glGetFloati_v = GLContext.getFunctionAddress("glGetFloati_v")) != 0 & + (glGetDoublei_v = GLContext.getFunctionAddress("glGetDoublei_v")) != 0; + } + + private boolean GL42_initNativeFunctionAddresses() { + return + ((glGetActiveAtomicCounterBufferiv = GLContext.getFunctionAddress("glGetActiveAtomicCounterBufferiv")) != 0 || true) & + (glTexStorage1D = GLContext.getFunctionAddress("glTexStorage1D")) != 0 & + (glTexStorage2D = GLContext.getFunctionAddress("glTexStorage2D")) != 0 & + (glTexStorage3D = GLContext.getFunctionAddress("glTexStorage3D")) != 0 & + (glDrawTransformFeedbackInstanced = GLContext.getFunctionAddress("glDrawTransformFeedbackInstanced")) != 0 & + (glDrawTransformFeedbackStreamInstanced = GLContext.getFunctionAddress("glDrawTransformFeedbackStreamInstanced")) != 0 & + (glDrawArraysInstancedBaseInstance = GLContext.getFunctionAddress("glDrawArraysInstancedBaseInstance")) != 0 & + (glDrawElementsInstancedBaseInstance = GLContext.getFunctionAddress("glDrawElementsInstancedBaseInstance")) != 0 & + (glDrawElementsInstancedBaseVertexBaseInstance = GLContext.getFunctionAddress("glDrawElementsInstancedBaseVertexBaseInstance")) != 0 & + (glBindImageTexture = GLContext.getFunctionAddress("glBindImageTexture")) != 0 & + (glMemoryBarrier = GLContext.getFunctionAddress("glMemoryBarrier")) != 0 & + (glGetInternalformativ = GLContext.getFunctionAddress("glGetInternalformativ")) != 0; + } + + private boolean GL43_initNativeFunctionAddresses() { + return + (glClearBufferData = GLContext.getFunctionAddress("glClearBufferData")) != 0 & + (glClearBufferSubData = GLContext.getFunctionAddress("glClearBufferSubData")) != 0 & + (glDispatchCompute = GLContext.getFunctionAddress("glDispatchCompute")) != 0 & + (glDispatchComputeIndirect = GLContext.getFunctionAddress("glDispatchComputeIndirect")) != 0 & + (glCopyImageSubData = GLContext.getFunctionAddress("glCopyImageSubData")) != 0 & + (glDebugMessageControl = GLContext.getFunctionAddress("glDebugMessageControl")) != 0 & + (glDebugMessageInsert = GLContext.getFunctionAddress("glDebugMessageInsert")) != 0 & + (glDebugMessageCallback = GLContext.getFunctionAddress("glDebugMessageCallback")) != 0 & + (glGetDebugMessageLog = GLContext.getFunctionAddress("glGetDebugMessageLog")) != 0 & + (glPushDebugGroup = GLContext.getFunctionAddress("glPushDebugGroup")) != 0 & + (glPopDebugGroup = GLContext.getFunctionAddress("glPopDebugGroup")) != 0 & + (glObjectLabel = GLContext.getFunctionAddress("glObjectLabel")) != 0 & + (glGetObjectLabel = GLContext.getFunctionAddress("glGetObjectLabel")) != 0 & + (glObjectPtrLabel = GLContext.getFunctionAddress("glObjectPtrLabel")) != 0 & + (glGetObjectPtrLabel = GLContext.getFunctionAddress("glGetObjectPtrLabel")) != 0 & + (glFramebufferParameteri = GLContext.getFunctionAddress("glFramebufferParameteri")) != 0 & + (glGetFramebufferParameteriv = GLContext.getFunctionAddress("glGetFramebufferParameteriv")) != 0 & + (glGetInternalformati64v = GLContext.getFunctionAddress("glGetInternalformati64v")) != 0 & + (glInvalidateTexSubImage = GLContext.getFunctionAddress("glInvalidateTexSubImage")) != 0 & + (glInvalidateTexImage = GLContext.getFunctionAddress("glInvalidateTexImage")) != 0 & + (glInvalidateBufferSubData = GLContext.getFunctionAddress("glInvalidateBufferSubData")) != 0 & + (glInvalidateBufferData = GLContext.getFunctionAddress("glInvalidateBufferData")) != 0 & + (glInvalidateFramebuffer = GLContext.getFunctionAddress("glInvalidateFramebuffer")) != 0 & + (glInvalidateSubFramebuffer = GLContext.getFunctionAddress("glInvalidateSubFramebuffer")) != 0 & + (glMultiDrawArraysIndirect = GLContext.getFunctionAddress("glMultiDrawArraysIndirect")) != 0 & + (glMultiDrawElementsIndirect = GLContext.getFunctionAddress("glMultiDrawElementsIndirect")) != 0 & + (glGetProgramInterfaceiv = GLContext.getFunctionAddress("glGetProgramInterfaceiv")) != 0 & + (glGetProgramResourceIndex = GLContext.getFunctionAddress("glGetProgramResourceIndex")) != 0 & + (glGetProgramResourceName = GLContext.getFunctionAddress("glGetProgramResourceName")) != 0 & + (glGetProgramResourceiv = GLContext.getFunctionAddress("glGetProgramResourceiv")) != 0 & + (glGetProgramResourceLocation = GLContext.getFunctionAddress("glGetProgramResourceLocation")) != 0 & + (glGetProgramResourceLocationIndex = GLContext.getFunctionAddress("glGetProgramResourceLocationIndex")) != 0 & + (glShaderStorageBlockBinding = GLContext.getFunctionAddress("glShaderStorageBlockBinding")) != 0 & + (glTexBufferRange = GLContext.getFunctionAddress("glTexBufferRange")) != 0 & + (glTexStorage2DMultisample = GLContext.getFunctionAddress("glTexStorage2DMultisample")) != 0 & + (glTexStorage3DMultisample = GLContext.getFunctionAddress("glTexStorage3DMultisample")) != 0 & + (glTextureView = GLContext.getFunctionAddress("glTextureView")) != 0 & + (glBindVertexBuffer = GLContext.getFunctionAddress("glBindVertexBuffer")) != 0 & + (glVertexAttribFormat = GLContext.getFunctionAddress("glVertexAttribFormat")) != 0 & + (glVertexAttribIFormat = GLContext.getFunctionAddress("glVertexAttribIFormat")) != 0 & + (glVertexAttribLFormat = GLContext.getFunctionAddress("glVertexAttribLFormat")) != 0 & + (glVertexAttribBinding = GLContext.getFunctionAddress("glVertexAttribBinding")) != 0 & + (glVertexBindingDivisor = GLContext.getFunctionAddress("glVertexBindingDivisor")) != 0; + } + + private boolean GL44_initNativeFunctionAddresses() { + return + (glBufferStorage = GLContext.getFunctionAddress("glBufferStorage")) != 0 & + (glClearTexImage = GLContext.getFunctionAddress("glClearTexImage")) != 0 & + (glClearTexSubImage = GLContext.getFunctionAddress("glClearTexSubImage")) != 0 & + (glBindBuffersBase = GLContext.getFunctionAddress("glBindBuffersBase")) != 0 & + (glBindBuffersRange = GLContext.getFunctionAddress("glBindBuffersRange")) != 0 & + (glBindTextures = GLContext.getFunctionAddress("glBindTextures")) != 0 & + (glBindSamplers = GLContext.getFunctionAddress("glBindSamplers")) != 0 & + (glBindImageTextures = GLContext.getFunctionAddress("glBindImageTextures")) != 0 & + (glBindVertexBuffers = GLContext.getFunctionAddress("glBindVertexBuffers")) != 0; + } + + private boolean GREMEDY_frame_terminator_initNativeFunctionAddresses() { + return + (glFrameTerminatorGREMEDY = GLContext.getFunctionAddress("glFrameTerminatorGREMEDY")) != 0; + } + + private boolean GREMEDY_string_marker_initNativeFunctionAddresses() { + return + (glStringMarkerGREMEDY = GLContext.getFunctionAddress("glStringMarkerGREMEDY")) != 0; + } + + private boolean INTEL_map_texture_initNativeFunctionAddresses() { + return + (glMapTexture2DINTEL = GLContext.getFunctionAddress("glMapTexture2DINTEL")) != 0 & + (glUnmapTexture2DINTEL = GLContext.getFunctionAddress("glUnmapTexture2DINTEL")) != 0 & + (glSyncTextureINTEL = GLContext.getFunctionAddress("glSyncTextureINTEL")) != 0; + } + + private boolean KHR_debug_initNativeFunctionAddresses() { + return + (glDebugMessageControl = GLContext.getFunctionAddress("glDebugMessageControl")) != 0 & + (glDebugMessageInsert = GLContext.getFunctionAddress("glDebugMessageInsert")) != 0 & + (glDebugMessageCallback = GLContext.getFunctionAddress("glDebugMessageCallback")) != 0 & + (glGetDebugMessageLog = GLContext.getFunctionAddress("glGetDebugMessageLog")) != 0 & + (glPushDebugGroup = GLContext.getFunctionAddress("glPushDebugGroup")) != 0 & + (glPopDebugGroup = GLContext.getFunctionAddress("glPopDebugGroup")) != 0 & + (glObjectLabel = GLContext.getFunctionAddress("glObjectLabel")) != 0 & + (glGetObjectLabel = GLContext.getFunctionAddress("glGetObjectLabel")) != 0 & + (glObjectPtrLabel = GLContext.getFunctionAddress("glObjectPtrLabel")) != 0 & + (glGetObjectPtrLabel = GLContext.getFunctionAddress("glGetObjectPtrLabel")) != 0; + } + + private boolean NV_bindless_multi_draw_indirect_initNativeFunctionAddresses() { + return + (glMultiDrawArraysIndirectBindlessNV = GLContext.getFunctionAddress("glMultiDrawArraysIndirectBindlessNV")) != 0 & + (glMultiDrawElementsIndirectBindlessNV = GLContext.getFunctionAddress("glMultiDrawElementsIndirectBindlessNV")) != 0; + } + + private boolean NV_bindless_texture_initNativeFunctionAddresses() { + return + (glGetTextureHandleNV = GLContext.getFunctionAddress("glGetTextureHandleNV")) != 0 & + (glGetTextureSamplerHandleNV = GLContext.getFunctionAddress("glGetTextureSamplerHandleNV")) != 0 & + (glMakeTextureHandleResidentNV = GLContext.getFunctionAddress("glMakeTextureHandleResidentNV")) != 0 & + (glMakeTextureHandleNonResidentNV = GLContext.getFunctionAddress("glMakeTextureHandleNonResidentNV")) != 0 & + (glGetImageHandleNV = GLContext.getFunctionAddress("glGetImageHandleNV")) != 0 & + (glMakeImageHandleResidentNV = GLContext.getFunctionAddress("glMakeImageHandleResidentNV")) != 0 & + (glMakeImageHandleNonResidentNV = GLContext.getFunctionAddress("glMakeImageHandleNonResidentNV")) != 0 & + (glUniformHandleui64NV = GLContext.getFunctionAddress("glUniformHandleui64NV")) != 0 & + (glUniformHandleui64vNV = GLContext.getFunctionAddress("glUniformHandleui64vNV")) != 0 & + (glProgramUniformHandleui64NV = GLContext.getFunctionAddress("glProgramUniformHandleui64NV")) != 0 & + (glProgramUniformHandleui64vNV = GLContext.getFunctionAddress("glProgramUniformHandleui64vNV")) != 0 & + (glIsTextureHandleResidentNV = GLContext.getFunctionAddress("glIsTextureHandleResidentNV")) != 0 & + (glIsImageHandleResidentNV = GLContext.getFunctionAddress("glIsImageHandleResidentNV")) != 0; + } + + private boolean NV_blend_equation_advanced_initNativeFunctionAddresses() { + return + (glBlendParameteriNV = GLContext.getFunctionAddress("glBlendParameteriNV")) != 0 & + (glBlendBarrierNV = GLContext.getFunctionAddress("glBlendBarrierNV")) != 0; + } + + private boolean NV_conditional_render_initNativeFunctionAddresses() { + return + (glBeginConditionalRenderNV = GLContext.getFunctionAddress("glBeginConditionalRenderNV")) != 0 & + (glEndConditionalRenderNV = GLContext.getFunctionAddress("glEndConditionalRenderNV")) != 0; + } + + private boolean NV_copy_image_initNativeFunctionAddresses() { + return + (glCopyImageSubDataNV = GLContext.getFunctionAddress("glCopyImageSubDataNV")) != 0; + } + + private boolean NV_depth_buffer_float_initNativeFunctionAddresses() { + return + (glDepthRangedNV = GLContext.getFunctionAddress("glDepthRangedNV")) != 0 & + (glClearDepthdNV = GLContext.getFunctionAddress("glClearDepthdNV")) != 0 & + (glDepthBoundsdNV = GLContext.getFunctionAddress("glDepthBoundsdNV")) != 0; + } + + private boolean NV_draw_texture_initNativeFunctionAddresses() { + return + (glDrawTextureNV = GLContext.getFunctionAddress("glDrawTextureNV")) != 0; + } + + private boolean NV_evaluators_initNativeFunctionAddresses() { + return + (glGetMapControlPointsNV = GLContext.getFunctionAddress("glGetMapControlPointsNV")) != 0 & + (glMapControlPointsNV = GLContext.getFunctionAddress("glMapControlPointsNV")) != 0 & + (glMapParameterfvNV = GLContext.getFunctionAddress("glMapParameterfvNV")) != 0 & + (glMapParameterivNV = GLContext.getFunctionAddress("glMapParameterivNV")) != 0 & + (glGetMapParameterfvNV = GLContext.getFunctionAddress("glGetMapParameterfvNV")) != 0 & + (glGetMapParameterivNV = GLContext.getFunctionAddress("glGetMapParameterivNV")) != 0 & + (glGetMapAttribParameterfvNV = GLContext.getFunctionAddress("glGetMapAttribParameterfvNV")) != 0 & + (glGetMapAttribParameterivNV = GLContext.getFunctionAddress("glGetMapAttribParameterivNV")) != 0 & + (glEvalMapsNV = GLContext.getFunctionAddress("glEvalMapsNV")) != 0; + } + + private boolean NV_explicit_multisample_initNativeFunctionAddresses() { + return + (glGetBooleanIndexedvEXT = GLContext.getFunctionAddress("glGetBooleanIndexedvEXT")) != 0 & + (glGetIntegerIndexedvEXT = GLContext.getFunctionAddress("glGetIntegerIndexedvEXT")) != 0 & + (glGetMultisamplefvNV = GLContext.getFunctionAddress("glGetMultisamplefvNV")) != 0 & + (glSampleMaskIndexedNV = GLContext.getFunctionAddress("glSampleMaskIndexedNV")) != 0 & + (glTexRenderbufferNV = GLContext.getFunctionAddress("glTexRenderbufferNV")) != 0; + } + + private boolean NV_fence_initNativeFunctionAddresses() { + return + (glGenFencesNV = GLContext.getFunctionAddress("glGenFencesNV")) != 0 & + (glDeleteFencesNV = GLContext.getFunctionAddress("glDeleteFencesNV")) != 0 & + (glSetFenceNV = GLContext.getFunctionAddress("glSetFenceNV")) != 0 & + (glTestFenceNV = GLContext.getFunctionAddress("glTestFenceNV")) != 0 & + (glFinishFenceNV = GLContext.getFunctionAddress("glFinishFenceNV")) != 0 & + (glIsFenceNV = GLContext.getFunctionAddress("glIsFenceNV")) != 0 & + (glGetFenceivNV = GLContext.getFunctionAddress("glGetFenceivNV")) != 0; + } + + private boolean NV_fragment_program_initNativeFunctionAddresses() { + return + (glProgramNamedParameter4fNV = GLContext.getFunctionAddress("glProgramNamedParameter4fNV")) != 0 & + (glProgramNamedParameter4dNV = GLContext.getFunctionAddress("glProgramNamedParameter4dNV")) != 0 & + (glGetProgramNamedParameterfvNV = GLContext.getFunctionAddress("glGetProgramNamedParameterfvNV")) != 0 & + (glGetProgramNamedParameterdvNV = GLContext.getFunctionAddress("glGetProgramNamedParameterdvNV")) != 0; + } + + private boolean NV_framebuffer_multisample_coverage_initNativeFunctionAddresses() { + return + (glRenderbufferStorageMultisampleCoverageNV = GLContext.getFunctionAddress("glRenderbufferStorageMultisampleCoverageNV")) != 0; + } + + private boolean NV_geometry_program4_initNativeFunctionAddresses() { + return + (glProgramVertexLimitNV = GLContext.getFunctionAddress("glProgramVertexLimitNV")) != 0 & + (glFramebufferTextureEXT = GLContext.getFunctionAddress("glFramebufferTextureEXT")) != 0 & + (glFramebufferTextureLayerEXT = GLContext.getFunctionAddress("glFramebufferTextureLayerEXT")) != 0 & + (glFramebufferTextureFaceEXT = GLContext.getFunctionAddress("glFramebufferTextureFaceEXT")) != 0; + } + + private boolean NV_gpu_program4_initNativeFunctionAddresses() { + return + (glProgramLocalParameterI4iNV = GLContext.getFunctionAddress("glProgramLocalParameterI4iNV")) != 0 & + (glProgramLocalParameterI4ivNV = GLContext.getFunctionAddress("glProgramLocalParameterI4ivNV")) != 0 & + (glProgramLocalParametersI4ivNV = GLContext.getFunctionAddress("glProgramLocalParametersI4ivNV")) != 0 & + (glProgramLocalParameterI4uiNV = GLContext.getFunctionAddress("glProgramLocalParameterI4uiNV")) != 0 & + (glProgramLocalParameterI4uivNV = GLContext.getFunctionAddress("glProgramLocalParameterI4uivNV")) != 0 & + (glProgramLocalParametersI4uivNV = GLContext.getFunctionAddress("glProgramLocalParametersI4uivNV")) != 0 & + (glProgramEnvParameterI4iNV = GLContext.getFunctionAddress("glProgramEnvParameterI4iNV")) != 0 & + (glProgramEnvParameterI4ivNV = GLContext.getFunctionAddress("glProgramEnvParameterI4ivNV")) != 0 & + (glProgramEnvParametersI4ivNV = GLContext.getFunctionAddress("glProgramEnvParametersI4ivNV")) != 0 & + (glProgramEnvParameterI4uiNV = GLContext.getFunctionAddress("glProgramEnvParameterI4uiNV")) != 0 & + (glProgramEnvParameterI4uivNV = GLContext.getFunctionAddress("glProgramEnvParameterI4uivNV")) != 0 & + (glProgramEnvParametersI4uivNV = GLContext.getFunctionAddress("glProgramEnvParametersI4uivNV")) != 0 & + (glGetProgramLocalParameterIivNV = GLContext.getFunctionAddress("glGetProgramLocalParameterIivNV")) != 0 & + (glGetProgramLocalParameterIuivNV = GLContext.getFunctionAddress("glGetProgramLocalParameterIuivNV")) != 0 & + (glGetProgramEnvParameterIivNV = GLContext.getFunctionAddress("glGetProgramEnvParameterIivNV")) != 0 & + (glGetProgramEnvParameterIuivNV = GLContext.getFunctionAddress("glGetProgramEnvParameterIuivNV")) != 0; + } + + private boolean NV_gpu_shader5_initNativeFunctionAddresses(Set supported_extensions) { + return + (glUniform1i64NV = GLContext.getFunctionAddress("glUniform1i64NV")) != 0 & + (glUniform2i64NV = GLContext.getFunctionAddress("glUniform2i64NV")) != 0 & + (glUniform3i64NV = GLContext.getFunctionAddress("glUniform3i64NV")) != 0 & + (glUniform4i64NV = GLContext.getFunctionAddress("glUniform4i64NV")) != 0 & + (glUniform1i64vNV = GLContext.getFunctionAddress("glUniform1i64vNV")) != 0 & + (glUniform2i64vNV = GLContext.getFunctionAddress("glUniform2i64vNV")) != 0 & + (glUniform3i64vNV = GLContext.getFunctionAddress("glUniform3i64vNV")) != 0 & + (glUniform4i64vNV = GLContext.getFunctionAddress("glUniform4i64vNV")) != 0 & + (glUniform1ui64NV = GLContext.getFunctionAddress("glUniform1ui64NV")) != 0 & + (glUniform2ui64NV = GLContext.getFunctionAddress("glUniform2ui64NV")) != 0 & + (glUniform3ui64NV = GLContext.getFunctionAddress("glUniform3ui64NV")) != 0 & + (glUniform4ui64NV = GLContext.getFunctionAddress("glUniform4ui64NV")) != 0 & + (glUniform1ui64vNV = GLContext.getFunctionAddress("glUniform1ui64vNV")) != 0 & + (glUniform2ui64vNV = GLContext.getFunctionAddress("glUniform2ui64vNV")) != 0 & + (glUniform3ui64vNV = GLContext.getFunctionAddress("glUniform3ui64vNV")) != 0 & + (glUniform4ui64vNV = GLContext.getFunctionAddress("glUniform4ui64vNV")) != 0 & + (glGetUniformi64vNV = GLContext.getFunctionAddress("glGetUniformi64vNV")) != 0 & + (glGetUniformui64vNV = GLContext.getFunctionAddress("glGetUniformui64vNV")) != 0 & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniform1i64NV = GLContext.getFunctionAddress("glProgramUniform1i64NV")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniform2i64NV = GLContext.getFunctionAddress("glProgramUniform2i64NV")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniform3i64NV = GLContext.getFunctionAddress("glProgramUniform3i64NV")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniform4i64NV = GLContext.getFunctionAddress("glProgramUniform4i64NV")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniform1i64vNV = GLContext.getFunctionAddress("glProgramUniform1i64vNV")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniform2i64vNV = GLContext.getFunctionAddress("glProgramUniform2i64vNV")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniform3i64vNV = GLContext.getFunctionAddress("glProgramUniform3i64vNV")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniform4i64vNV = GLContext.getFunctionAddress("glProgramUniform4i64vNV")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniform1ui64NV = GLContext.getFunctionAddress("glProgramUniform1ui64NV")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniform2ui64NV = GLContext.getFunctionAddress("glProgramUniform2ui64NV")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniform3ui64NV = GLContext.getFunctionAddress("glProgramUniform3ui64NV")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniform4ui64NV = GLContext.getFunctionAddress("glProgramUniform4ui64NV")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniform1ui64vNV = GLContext.getFunctionAddress("glProgramUniform1ui64vNV")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniform2ui64vNV = GLContext.getFunctionAddress("glProgramUniform2ui64vNV")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniform3ui64vNV = GLContext.getFunctionAddress("glProgramUniform3ui64vNV")) != 0) & + (!supported_extensions.contains("GL_EXT_direct_state_access") || (glProgramUniform4ui64vNV = GLContext.getFunctionAddress("glProgramUniform4ui64vNV")) != 0); + } + + private boolean NV_half_float_initNativeFunctionAddresses() { + return + (glVertex2hNV = GLContext.getFunctionAddress("glVertex2hNV")) != 0 & + (glVertex3hNV = GLContext.getFunctionAddress("glVertex3hNV")) != 0 & + (glVertex4hNV = GLContext.getFunctionAddress("glVertex4hNV")) != 0 & + (glNormal3hNV = GLContext.getFunctionAddress("glNormal3hNV")) != 0 & + (glColor3hNV = GLContext.getFunctionAddress("glColor3hNV")) != 0 & + (glColor4hNV = GLContext.getFunctionAddress("glColor4hNV")) != 0 & + (glTexCoord1hNV = GLContext.getFunctionAddress("glTexCoord1hNV")) != 0 & + (glTexCoord2hNV = GLContext.getFunctionAddress("glTexCoord2hNV")) != 0 & + (glTexCoord3hNV = GLContext.getFunctionAddress("glTexCoord3hNV")) != 0 & + (glTexCoord4hNV = GLContext.getFunctionAddress("glTexCoord4hNV")) != 0 & + (glMultiTexCoord1hNV = GLContext.getFunctionAddress("glMultiTexCoord1hNV")) != 0 & + (glMultiTexCoord2hNV = GLContext.getFunctionAddress("glMultiTexCoord2hNV")) != 0 & + (glMultiTexCoord3hNV = GLContext.getFunctionAddress("glMultiTexCoord3hNV")) != 0 & + (glMultiTexCoord4hNV = GLContext.getFunctionAddress("glMultiTexCoord4hNV")) != 0 & + (glFogCoordhNV = GLContext.getFunctionAddress("glFogCoordhNV")) != 0 & + (glSecondaryColor3hNV = GLContext.getFunctionAddress("glSecondaryColor3hNV")) != 0 & + ((glVertexWeighthNV = GLContext.getFunctionAddress("glVertexWeighthNV")) != 0 || true) & + ((glVertexAttrib1hNV = GLContext.getFunctionAddress("glVertexAttrib1hNV")) != 0 || true) & + ((glVertexAttrib2hNV = GLContext.getFunctionAddress("glVertexAttrib2hNV")) != 0 || true) & + ((glVertexAttrib3hNV = GLContext.getFunctionAddress("glVertexAttrib3hNV")) != 0 || true) & + ((glVertexAttrib4hNV = GLContext.getFunctionAddress("glVertexAttrib4hNV")) != 0 || true) & + ((glVertexAttribs1hvNV = GLContext.getFunctionAddress("glVertexAttribs1hvNV")) != 0 || true) & + ((glVertexAttribs2hvNV = GLContext.getFunctionAddress("glVertexAttribs2hvNV")) != 0 || true) & + ((glVertexAttribs3hvNV = GLContext.getFunctionAddress("glVertexAttribs3hvNV")) != 0 || true) & + ((glVertexAttribs4hvNV = GLContext.getFunctionAddress("glVertexAttribs4hvNV")) != 0 || true); + } + + private boolean NV_occlusion_query_initNativeFunctionAddresses() { + return + (glGenOcclusionQueriesNV = GLContext.getFunctionAddress("glGenOcclusionQueriesNV")) != 0 & + (glDeleteOcclusionQueriesNV = GLContext.getFunctionAddress("glDeleteOcclusionQueriesNV")) != 0 & + (glIsOcclusionQueryNV = GLContext.getFunctionAddress("glIsOcclusionQueryNV")) != 0 & + (glBeginOcclusionQueryNV = GLContext.getFunctionAddress("glBeginOcclusionQueryNV")) != 0 & + (glEndOcclusionQueryNV = GLContext.getFunctionAddress("glEndOcclusionQueryNV")) != 0 & + (glGetOcclusionQueryuivNV = GLContext.getFunctionAddress("glGetOcclusionQueryuivNV")) != 0 & + (glGetOcclusionQueryivNV = GLContext.getFunctionAddress("glGetOcclusionQueryivNV")) != 0; + } + + private boolean NV_parameter_buffer_object_initNativeFunctionAddresses() { + return + (glProgramBufferParametersfvNV = GLContext.getFunctionAddress("glProgramBufferParametersfvNV")) != 0 & + (glProgramBufferParametersIivNV = GLContext.getFunctionAddress("glProgramBufferParametersIivNV")) != 0 & + (glProgramBufferParametersIuivNV = GLContext.getFunctionAddress("glProgramBufferParametersIuivNV")) != 0; + } + + private boolean NV_path_rendering_initNativeFunctionAddresses() { + return + (glPathCommandsNV = GLContext.getFunctionAddress("glPathCommandsNV")) != 0 & + (glPathCoordsNV = GLContext.getFunctionAddress("glPathCoordsNV")) != 0 & + (glPathSubCommandsNV = GLContext.getFunctionAddress("glPathSubCommandsNV")) != 0 & + (glPathSubCoordsNV = GLContext.getFunctionAddress("glPathSubCoordsNV")) != 0 & + (glPathStringNV = GLContext.getFunctionAddress("glPathStringNV")) != 0 & + (glPathGlyphsNV = GLContext.getFunctionAddress("glPathGlyphsNV")) != 0 & + (glPathGlyphRangeNV = GLContext.getFunctionAddress("glPathGlyphRangeNV")) != 0 & + (glWeightPathsNV = GLContext.getFunctionAddress("glWeightPathsNV")) != 0 & + (glCopyPathNV = GLContext.getFunctionAddress("glCopyPathNV")) != 0 & + (glInterpolatePathsNV = GLContext.getFunctionAddress("glInterpolatePathsNV")) != 0 & + (glTransformPathNV = GLContext.getFunctionAddress("glTransformPathNV")) != 0 & + (glPathParameterivNV = GLContext.getFunctionAddress("glPathParameterivNV")) != 0 & + (glPathParameteriNV = GLContext.getFunctionAddress("glPathParameteriNV")) != 0 & + (glPathParameterfvNV = GLContext.getFunctionAddress("glPathParameterfvNV")) != 0 & + (glPathParameterfNV = GLContext.getFunctionAddress("glPathParameterfNV")) != 0 & + (glPathDashArrayNV = GLContext.getFunctionAddress("glPathDashArrayNV")) != 0 & + (glGenPathsNV = GLContext.getFunctionAddress("glGenPathsNV")) != 0 & + (glDeletePathsNV = GLContext.getFunctionAddress("glDeletePathsNV")) != 0 & + (glIsPathNV = GLContext.getFunctionAddress("glIsPathNV")) != 0 & + (glPathStencilFuncNV = GLContext.getFunctionAddress("glPathStencilFuncNV")) != 0 & + (glPathStencilDepthOffsetNV = GLContext.getFunctionAddress("glPathStencilDepthOffsetNV")) != 0 & + (glStencilFillPathNV = GLContext.getFunctionAddress("glStencilFillPathNV")) != 0 & + (glStencilStrokePathNV = GLContext.getFunctionAddress("glStencilStrokePathNV")) != 0 & + (glStencilFillPathInstancedNV = GLContext.getFunctionAddress("glStencilFillPathInstancedNV")) != 0 & + (glStencilStrokePathInstancedNV = GLContext.getFunctionAddress("glStencilStrokePathInstancedNV")) != 0 & + (glPathCoverDepthFuncNV = GLContext.getFunctionAddress("glPathCoverDepthFuncNV")) != 0 & + (glPathColorGenNV = GLContext.getFunctionAddress("glPathColorGenNV")) != 0 & + (glPathTexGenNV = GLContext.getFunctionAddress("glPathTexGenNV")) != 0 & + (glPathFogGenNV = GLContext.getFunctionAddress("glPathFogGenNV")) != 0 & + (glCoverFillPathNV = GLContext.getFunctionAddress("glCoverFillPathNV")) != 0 & + (glCoverStrokePathNV = GLContext.getFunctionAddress("glCoverStrokePathNV")) != 0 & + (glCoverFillPathInstancedNV = GLContext.getFunctionAddress("glCoverFillPathInstancedNV")) != 0 & + (glCoverStrokePathInstancedNV = GLContext.getFunctionAddress("glCoverStrokePathInstancedNV")) != 0 & + (glGetPathParameterivNV = GLContext.getFunctionAddress("glGetPathParameterivNV")) != 0 & + (glGetPathParameterfvNV = GLContext.getFunctionAddress("glGetPathParameterfvNV")) != 0 & + (glGetPathCommandsNV = GLContext.getFunctionAddress("glGetPathCommandsNV")) != 0 & + (glGetPathCoordsNV = GLContext.getFunctionAddress("glGetPathCoordsNV")) != 0 & + (glGetPathDashArrayNV = GLContext.getFunctionAddress("glGetPathDashArrayNV")) != 0 & + (glGetPathMetricsNV = GLContext.getFunctionAddress("glGetPathMetricsNV")) != 0 & + (glGetPathMetricRangeNV = GLContext.getFunctionAddress("glGetPathMetricRangeNV")) != 0 & + (glGetPathSpacingNV = GLContext.getFunctionAddress("glGetPathSpacingNV")) != 0 & + (glGetPathColorGenivNV = GLContext.getFunctionAddress("glGetPathColorGenivNV")) != 0 & + (glGetPathColorGenfvNV = GLContext.getFunctionAddress("glGetPathColorGenfvNV")) != 0 & + (glGetPathTexGenivNV = GLContext.getFunctionAddress("glGetPathTexGenivNV")) != 0 & + (glGetPathTexGenfvNV = GLContext.getFunctionAddress("glGetPathTexGenfvNV")) != 0 & + (glIsPointInFillPathNV = GLContext.getFunctionAddress("glIsPointInFillPathNV")) != 0 & + (glIsPointInStrokePathNV = GLContext.getFunctionAddress("glIsPointInStrokePathNV")) != 0 & + (glGetPathLengthNV = GLContext.getFunctionAddress("glGetPathLengthNV")) != 0 & + (glPointAlongPathNV = GLContext.getFunctionAddress("glPointAlongPathNV")) != 0; + } + + private boolean NV_pixel_data_range_initNativeFunctionAddresses() { + return + (glPixelDataRangeNV = GLContext.getFunctionAddress("glPixelDataRangeNV")) != 0 & + (glFlushPixelDataRangeNV = GLContext.getFunctionAddress("glFlushPixelDataRangeNV")) != 0; + } + + private boolean NV_point_sprite_initNativeFunctionAddresses() { + return + (glPointParameteriNV = GLContext.getFunctionAddress("glPointParameteriNV")) != 0 & + (glPointParameterivNV = GLContext.getFunctionAddress("glPointParameterivNV")) != 0; + } + + private boolean NV_present_video_initNativeFunctionAddresses() { + return + (glPresentFrameKeyedNV = GLContext.getFunctionAddress("glPresentFrameKeyedNV")) != 0 & + (glPresentFrameDualFillNV = GLContext.getFunctionAddress("glPresentFrameDualFillNV")) != 0 & + (glGetVideoivNV = GLContext.getFunctionAddress("glGetVideoivNV")) != 0 & + (glGetVideouivNV = GLContext.getFunctionAddress("glGetVideouivNV")) != 0 & + (glGetVideoi64vNV = GLContext.getFunctionAddress("glGetVideoi64vNV")) != 0 & + (glGetVideoui64vNV = GLContext.getFunctionAddress("glGetVideoui64vNV")) != 0; + } + + private boolean NV_primitive_restart_initNativeFunctionAddresses() { + return + (glPrimitiveRestartNV = GLContext.getFunctionAddress("glPrimitiveRestartNV")) != 0 & + (glPrimitiveRestartIndexNV = GLContext.getFunctionAddress("glPrimitiveRestartIndexNV")) != 0; + } + + private boolean NV_program_initNativeFunctionAddresses() { + return + (glLoadProgramNV = GLContext.getFunctionAddress("glLoadProgramNV")) != 0 & + (glBindProgramNV = GLContext.getFunctionAddress("glBindProgramNV")) != 0 & + (glDeleteProgramsNV = GLContext.getFunctionAddress("glDeleteProgramsNV")) != 0 & + (glGenProgramsNV = GLContext.getFunctionAddress("glGenProgramsNV")) != 0 & + (glGetProgramivNV = GLContext.getFunctionAddress("glGetProgramivNV")) != 0 & + (glGetProgramStringNV = GLContext.getFunctionAddress("glGetProgramStringNV")) != 0 & + (glIsProgramNV = GLContext.getFunctionAddress("glIsProgramNV")) != 0 & + (glAreProgramsResidentNV = GLContext.getFunctionAddress("glAreProgramsResidentNV")) != 0 & + (glRequestResidentProgramsNV = GLContext.getFunctionAddress("glRequestResidentProgramsNV")) != 0; + } + + private boolean NV_register_combiners_initNativeFunctionAddresses() { + return + (glCombinerParameterfNV = GLContext.getFunctionAddress("glCombinerParameterfNV")) != 0 & + (glCombinerParameterfvNV = GLContext.getFunctionAddress("glCombinerParameterfvNV")) != 0 & + (glCombinerParameteriNV = GLContext.getFunctionAddress("glCombinerParameteriNV")) != 0 & + (glCombinerParameterivNV = GLContext.getFunctionAddress("glCombinerParameterivNV")) != 0 & + (glCombinerInputNV = GLContext.getFunctionAddress("glCombinerInputNV")) != 0 & + (glCombinerOutputNV = GLContext.getFunctionAddress("glCombinerOutputNV")) != 0 & + (glFinalCombinerInputNV = GLContext.getFunctionAddress("glFinalCombinerInputNV")) != 0 & + (glGetCombinerInputParameterfvNV = GLContext.getFunctionAddress("glGetCombinerInputParameterfvNV")) != 0 & + (glGetCombinerInputParameterivNV = GLContext.getFunctionAddress("glGetCombinerInputParameterivNV")) != 0 & + (glGetCombinerOutputParameterfvNV = GLContext.getFunctionAddress("glGetCombinerOutputParameterfvNV")) != 0 & + (glGetCombinerOutputParameterivNV = GLContext.getFunctionAddress("glGetCombinerOutputParameterivNV")) != 0 & + (glGetFinalCombinerInputParameterfvNV = GLContext.getFunctionAddress("glGetFinalCombinerInputParameterfvNV")) != 0 & + (glGetFinalCombinerInputParameterivNV = GLContext.getFunctionAddress("glGetFinalCombinerInputParameterivNV")) != 0; + } + + private boolean NV_register_combiners2_initNativeFunctionAddresses() { + return + (glCombinerStageParameterfvNV = GLContext.getFunctionAddress("glCombinerStageParameterfvNV")) != 0 & + (glGetCombinerStageParameterfvNV = GLContext.getFunctionAddress("glGetCombinerStageParameterfvNV")) != 0; + } + + private boolean NV_shader_buffer_load_initNativeFunctionAddresses() { + return + (glMakeBufferResidentNV = GLContext.getFunctionAddress("glMakeBufferResidentNV")) != 0 & + (glMakeBufferNonResidentNV = GLContext.getFunctionAddress("glMakeBufferNonResidentNV")) != 0 & + (glIsBufferResidentNV = GLContext.getFunctionAddress("glIsBufferResidentNV")) != 0 & + (glMakeNamedBufferResidentNV = GLContext.getFunctionAddress("glMakeNamedBufferResidentNV")) != 0 & + (glMakeNamedBufferNonResidentNV = GLContext.getFunctionAddress("glMakeNamedBufferNonResidentNV")) != 0 & + (glIsNamedBufferResidentNV = GLContext.getFunctionAddress("glIsNamedBufferResidentNV")) != 0 & + (glGetBufferParameterui64vNV = GLContext.getFunctionAddress("glGetBufferParameterui64vNV")) != 0 & + (glGetNamedBufferParameterui64vNV = GLContext.getFunctionAddress("glGetNamedBufferParameterui64vNV")) != 0 & + (glGetIntegerui64vNV = GLContext.getFunctionAddress("glGetIntegerui64vNV")) != 0 & + (glUniformui64NV = GLContext.getFunctionAddress("glUniformui64NV")) != 0 & + (glUniformui64vNV = GLContext.getFunctionAddress("glUniformui64vNV")) != 0 & + (glGetUniformui64vNV = GLContext.getFunctionAddress("glGetUniformui64vNV")) != 0 & + (glProgramUniformui64NV = GLContext.getFunctionAddress("glProgramUniformui64NV")) != 0 & + (glProgramUniformui64vNV = GLContext.getFunctionAddress("glProgramUniformui64vNV")) != 0; + } + + private boolean NV_texture_barrier_initNativeFunctionAddresses() { + return + (glTextureBarrierNV = GLContext.getFunctionAddress("glTextureBarrierNV")) != 0; + } + + private boolean NV_texture_multisample_initNativeFunctionAddresses() { + return + (glTexImage2DMultisampleCoverageNV = GLContext.getFunctionAddress("glTexImage2DMultisampleCoverageNV")) != 0 & + (glTexImage3DMultisampleCoverageNV = GLContext.getFunctionAddress("glTexImage3DMultisampleCoverageNV")) != 0 & + (glTextureImage2DMultisampleNV = GLContext.getFunctionAddress("glTextureImage2DMultisampleNV")) != 0 & + (glTextureImage3DMultisampleNV = GLContext.getFunctionAddress("glTextureImage3DMultisampleNV")) != 0 & + (glTextureImage2DMultisampleCoverageNV = GLContext.getFunctionAddress("glTextureImage2DMultisampleCoverageNV")) != 0 & + (glTextureImage3DMultisampleCoverageNV = GLContext.getFunctionAddress("glTextureImage3DMultisampleCoverageNV")) != 0; + } + + private boolean NV_transform_feedback_initNativeFunctionAddresses() { + return + (glBindBufferRangeNV = GLContext.getFunctionAddress("glBindBufferRangeNV")) != 0 & + (glBindBufferOffsetNV = GLContext.getFunctionAddress("glBindBufferOffsetNV")) != 0 & + (glBindBufferBaseNV = GLContext.getFunctionAddress("glBindBufferBaseNV")) != 0 & + (glTransformFeedbackAttribsNV = GLContext.getFunctionAddress("glTransformFeedbackAttribsNV")) != 0 & + (glTransformFeedbackVaryingsNV = GLContext.getFunctionAddress("glTransformFeedbackVaryingsNV")) != 0 & + (glBeginTransformFeedbackNV = GLContext.getFunctionAddress("glBeginTransformFeedbackNV")) != 0 & + (glEndTransformFeedbackNV = GLContext.getFunctionAddress("glEndTransformFeedbackNV")) != 0 & + (glGetVaryingLocationNV = GLContext.getFunctionAddress("glGetVaryingLocationNV")) != 0 & + (glGetActiveVaryingNV = GLContext.getFunctionAddress("glGetActiveVaryingNV")) != 0 & + (glActiveVaryingNV = GLContext.getFunctionAddress("glActiveVaryingNV")) != 0 & + (glGetTransformFeedbackVaryingNV = GLContext.getFunctionAddress("glGetTransformFeedbackVaryingNV")) != 0; + } + + private boolean NV_transform_feedback2_initNativeFunctionAddresses() { + return + (glBindTransformFeedbackNV = GLContext.getFunctionAddress("glBindTransformFeedbackNV")) != 0 & + (glDeleteTransformFeedbacksNV = GLContext.getFunctionAddress("glDeleteTransformFeedbacksNV")) != 0 & + (glGenTransformFeedbacksNV = GLContext.getFunctionAddress("glGenTransformFeedbacksNV")) != 0 & + (glIsTransformFeedbackNV = GLContext.getFunctionAddress("glIsTransformFeedbackNV")) != 0 & + (glPauseTransformFeedbackNV = GLContext.getFunctionAddress("glPauseTransformFeedbackNV")) != 0 & + (glResumeTransformFeedbackNV = GLContext.getFunctionAddress("glResumeTransformFeedbackNV")) != 0 & + (glDrawTransformFeedbackNV = GLContext.getFunctionAddress("glDrawTransformFeedbackNV")) != 0; + } + + private boolean NV_vertex_array_range_initNativeFunctionAddresses() { + return + (glVertexArrayRangeNV = GLContext.getFunctionAddress("glVertexArrayRangeNV")) != 0 & + (glFlushVertexArrayRangeNV = GLContext.getFunctionAddress("glFlushVertexArrayRangeNV")) != 0 & + (glAllocateMemoryNV = GLContext.getPlatformSpecificFunctionAddress("gl", new String[]{"Windows", "Linux"}, new String[]{"wgl", "glX"}, "glAllocateMemoryNV")) != 0 & + (glFreeMemoryNV = GLContext.getPlatformSpecificFunctionAddress("gl", new String[]{"Windows", "Linux"}, new String[]{"wgl", "glX"}, "glFreeMemoryNV")) != 0; + } + + private boolean NV_vertex_attrib_integer_64bit_initNativeFunctionAddresses(Set supported_extensions) { + return + (glVertexAttribL1i64NV = GLContext.getFunctionAddress("glVertexAttribL1i64NV")) != 0 & + (glVertexAttribL2i64NV = GLContext.getFunctionAddress("glVertexAttribL2i64NV")) != 0 & + (glVertexAttribL3i64NV = GLContext.getFunctionAddress("glVertexAttribL3i64NV")) != 0 & + (glVertexAttribL4i64NV = GLContext.getFunctionAddress("glVertexAttribL4i64NV")) != 0 & + (glVertexAttribL1i64vNV = GLContext.getFunctionAddress("glVertexAttribL1i64vNV")) != 0 & + (glVertexAttribL2i64vNV = GLContext.getFunctionAddress("glVertexAttribL2i64vNV")) != 0 & + (glVertexAttribL3i64vNV = GLContext.getFunctionAddress("glVertexAttribL3i64vNV")) != 0 & + (glVertexAttribL4i64vNV = GLContext.getFunctionAddress("glVertexAttribL4i64vNV")) != 0 & + (glVertexAttribL1ui64NV = GLContext.getFunctionAddress("glVertexAttribL1ui64NV")) != 0 & + (glVertexAttribL2ui64NV = GLContext.getFunctionAddress("glVertexAttribL2ui64NV")) != 0 & + (glVertexAttribL3ui64NV = GLContext.getFunctionAddress("glVertexAttribL3ui64NV")) != 0 & + (glVertexAttribL4ui64NV = GLContext.getFunctionAddress("glVertexAttribL4ui64NV")) != 0 & + (glVertexAttribL1ui64vNV = GLContext.getFunctionAddress("glVertexAttribL1ui64vNV")) != 0 & + (glVertexAttribL2ui64vNV = GLContext.getFunctionAddress("glVertexAttribL2ui64vNV")) != 0 & + (glVertexAttribL3ui64vNV = GLContext.getFunctionAddress("glVertexAttribL3ui64vNV")) != 0 & + (glVertexAttribL4ui64vNV = GLContext.getFunctionAddress("glVertexAttribL4ui64vNV")) != 0 & + (glGetVertexAttribLi64vNV = GLContext.getFunctionAddress("glGetVertexAttribLi64vNV")) != 0 & + (glGetVertexAttribLui64vNV = GLContext.getFunctionAddress("glGetVertexAttribLui64vNV")) != 0 & + (!supported_extensions.contains("GL_NV_vertex_buffer_unified_memory") || (glVertexAttribLFormatNV = GLContext.getFunctionAddress("glVertexAttribLFormatNV")) != 0); + } + + private boolean NV_vertex_buffer_unified_memory_initNativeFunctionAddresses() { + return + (glBufferAddressRangeNV = GLContext.getFunctionAddress("glBufferAddressRangeNV")) != 0 & + (glVertexFormatNV = GLContext.getFunctionAddress("glVertexFormatNV")) != 0 & + (glNormalFormatNV = GLContext.getFunctionAddress("glNormalFormatNV")) != 0 & + (glColorFormatNV = GLContext.getFunctionAddress("glColorFormatNV")) != 0 & + (glIndexFormatNV = GLContext.getFunctionAddress("glIndexFormatNV")) != 0 & + (glTexCoordFormatNV = GLContext.getFunctionAddress("glTexCoordFormatNV")) != 0 & + (glEdgeFlagFormatNV = GLContext.getFunctionAddress("glEdgeFlagFormatNV")) != 0 & + (glSecondaryColorFormatNV = GLContext.getFunctionAddress("glSecondaryColorFormatNV")) != 0 & + (glFogCoordFormatNV = GLContext.getFunctionAddress("glFogCoordFormatNV")) != 0 & + (glVertexAttribFormatNV = GLContext.getFunctionAddress("glVertexAttribFormatNV")) != 0 & + (glVertexAttribIFormatNV = GLContext.getFunctionAddress("glVertexAttribIFormatNV")) != 0 & + (glGetIntegerui64i_vNV = GLContext.getFunctionAddress("glGetIntegerui64i_vNV")) != 0; + } + + private boolean NV_vertex_program_initNativeFunctionAddresses() { + return + (glExecuteProgramNV = GLContext.getFunctionAddress("glExecuteProgramNV")) != 0 & + (glGetProgramParameterfvNV = GLContext.getFunctionAddress("glGetProgramParameterfvNV")) != 0 & + (glGetProgramParameterdvNV = GLContext.getFunctionAddress("glGetProgramParameterdvNV")) != 0 & + (glGetTrackMatrixivNV = GLContext.getFunctionAddress("glGetTrackMatrixivNV")) != 0 & + (glGetVertexAttribfvNV = GLContext.getFunctionAddress("glGetVertexAttribfvNV")) != 0 & + (glGetVertexAttribdvNV = GLContext.getFunctionAddress("glGetVertexAttribdvNV")) != 0 & + (glGetVertexAttribivNV = GLContext.getFunctionAddress("glGetVertexAttribivNV")) != 0 & + (glGetVertexAttribPointervNV = GLContext.getFunctionAddress("glGetVertexAttribPointervNV")) != 0 & + (glProgramParameter4fNV = GLContext.getFunctionAddress("glProgramParameter4fNV")) != 0 & + (glProgramParameter4dNV = GLContext.getFunctionAddress("glProgramParameter4dNV")) != 0 & + (glProgramParameters4fvNV = GLContext.getFunctionAddress("glProgramParameters4fvNV")) != 0 & + (glProgramParameters4dvNV = GLContext.getFunctionAddress("glProgramParameters4dvNV")) != 0 & + (glTrackMatrixNV = GLContext.getFunctionAddress("glTrackMatrixNV")) != 0 & + (glVertexAttribPointerNV = GLContext.getFunctionAddress("glVertexAttribPointerNV")) != 0 & + (glVertexAttrib1sNV = GLContext.getFunctionAddress("glVertexAttrib1sNV")) != 0 & + (glVertexAttrib1fNV = GLContext.getFunctionAddress("glVertexAttrib1fNV")) != 0 & + (glVertexAttrib1dNV = GLContext.getFunctionAddress("glVertexAttrib1dNV")) != 0 & + (glVertexAttrib2sNV = GLContext.getFunctionAddress("glVertexAttrib2sNV")) != 0 & + (glVertexAttrib2fNV = GLContext.getFunctionAddress("glVertexAttrib2fNV")) != 0 & + (glVertexAttrib2dNV = GLContext.getFunctionAddress("glVertexAttrib2dNV")) != 0 & + (glVertexAttrib3sNV = GLContext.getFunctionAddress("glVertexAttrib3sNV")) != 0 & + (glVertexAttrib3fNV = GLContext.getFunctionAddress("glVertexAttrib3fNV")) != 0 & + (glVertexAttrib3dNV = GLContext.getFunctionAddress("glVertexAttrib3dNV")) != 0 & + (glVertexAttrib4sNV = GLContext.getFunctionAddress("glVertexAttrib4sNV")) != 0 & + (glVertexAttrib4fNV = GLContext.getFunctionAddress("glVertexAttrib4fNV")) != 0 & + (glVertexAttrib4dNV = GLContext.getFunctionAddress("glVertexAttrib4dNV")) != 0 & + (glVertexAttrib4ubNV = GLContext.getFunctionAddress("glVertexAttrib4ubNV")) != 0 & + (glVertexAttribs1svNV = GLContext.getFunctionAddress("glVertexAttribs1svNV")) != 0 & + (glVertexAttribs1fvNV = GLContext.getFunctionAddress("glVertexAttribs1fvNV")) != 0 & + (glVertexAttribs1dvNV = GLContext.getFunctionAddress("glVertexAttribs1dvNV")) != 0 & + (glVertexAttribs2svNV = GLContext.getFunctionAddress("glVertexAttribs2svNV")) != 0 & + (glVertexAttribs2fvNV = GLContext.getFunctionAddress("glVertexAttribs2fvNV")) != 0 & + (glVertexAttribs2dvNV = GLContext.getFunctionAddress("glVertexAttribs2dvNV")) != 0 & + (glVertexAttribs3svNV = GLContext.getFunctionAddress("glVertexAttribs3svNV")) != 0 & + (glVertexAttribs3fvNV = GLContext.getFunctionAddress("glVertexAttribs3fvNV")) != 0 & + (glVertexAttribs3dvNV = GLContext.getFunctionAddress("glVertexAttribs3dvNV")) != 0 & + (glVertexAttribs4svNV = GLContext.getFunctionAddress("glVertexAttribs4svNV")) != 0 & + (glVertexAttribs4fvNV = GLContext.getFunctionAddress("glVertexAttribs4fvNV")) != 0 & + (glVertexAttribs4dvNV = GLContext.getFunctionAddress("glVertexAttribs4dvNV")) != 0; + } + + private boolean NV_video_capture_initNativeFunctionAddresses() { + return + (glBeginVideoCaptureNV = GLContext.getFunctionAddress("glBeginVideoCaptureNV")) != 0 & + (glBindVideoCaptureStreamBufferNV = GLContext.getFunctionAddress("glBindVideoCaptureStreamBufferNV")) != 0 & + (glBindVideoCaptureStreamTextureNV = GLContext.getFunctionAddress("glBindVideoCaptureStreamTextureNV")) != 0 & + (glEndVideoCaptureNV = GLContext.getFunctionAddress("glEndVideoCaptureNV")) != 0 & + (glGetVideoCaptureivNV = GLContext.getFunctionAddress("glGetVideoCaptureivNV")) != 0 & + (glGetVideoCaptureStreamivNV = GLContext.getFunctionAddress("glGetVideoCaptureStreamivNV")) != 0 & + (glGetVideoCaptureStreamfvNV = GLContext.getFunctionAddress("glGetVideoCaptureStreamfvNV")) != 0 & + (glGetVideoCaptureStreamdvNV = GLContext.getFunctionAddress("glGetVideoCaptureStreamdvNV")) != 0 & + (glVideoCaptureNV = GLContext.getFunctionAddress("glVideoCaptureNV")) != 0 & + (glVideoCaptureStreamParameterivNV = GLContext.getFunctionAddress("glVideoCaptureStreamParameterivNV")) != 0 & + (glVideoCaptureStreamParameterfvNV = GLContext.getFunctionAddress("glVideoCaptureStreamParameterfvNV")) != 0 & + (glVideoCaptureStreamParameterdvNV = GLContext.getFunctionAddress("glVideoCaptureStreamParameterdvNV")) != 0; + } + + + private static void remove(Set supported_extensions, String extension) { + LWJGLUtil.log(extension + " was reported as available but an entry point is missing"); + supported_extensions.remove(extension); + } + + private Set initAllStubs(boolean forwardCompatible) throws LWJGLException { + glGetError = GLContext.getFunctionAddress("glGetError"); + glGetString = GLContext.getFunctionAddress("glGetString"); + glGetIntegerv = GLContext.getFunctionAddress("glGetIntegerv"); + glGetStringi = GLContext.getFunctionAddress("glGetStringi"); + GLContext.setCapabilities(this); + Set supported_extensions = new HashSet(256); + int profileMask = GLContext.getSupportedExtensions(supported_extensions); + if ( supported_extensions.contains("OpenGL31") && !(supported_extensions.contains("GL_ARB_compatibility") || (profileMask & GL32.GL_CONTEXT_COMPATIBILITY_PROFILE_BIT) != 0) ) + forwardCompatible = true; + if (!GL11_initNativeFunctionAddresses(forwardCompatible)) + throw new LWJGLException("GL11 not supported"); + if (supported_extensions.contains("GL_ARB_fragment_program")) + supported_extensions.add("GL_ARB_program"); + if (supported_extensions.contains("GL_ARB_pixel_buffer_object")) + supported_extensions.add("GL_ARB_buffer_object"); + if (supported_extensions.contains("GL_ARB_vertex_buffer_object")) + supported_extensions.add("GL_ARB_buffer_object"); + if (supported_extensions.contains("GL_ARB_vertex_program")) + supported_extensions.add("GL_ARB_program"); + if (supported_extensions.contains("GL_EXT_pixel_buffer_object")) + supported_extensions.add("GL_ARB_buffer_object"); + if (supported_extensions.contains("GL_NV_fragment_program")) + supported_extensions.add("GL_NV_program"); + if (supported_extensions.contains("GL_NV_vertex_program")) + supported_extensions.add("GL_NV_program"); + if ((supported_extensions.contains("GL_AMD_debug_output") || supported_extensions.contains("GL_AMDX_debug_output")) && !AMD_debug_output_initNativeFunctionAddresses()) { + remove(supported_extensions, "GL_AMDX_debug_output"); + remove(supported_extensions, "GL_AMD_debug_output"); + } + if (supported_extensions.contains("GL_AMD_draw_buffers_blend") && !AMD_draw_buffers_blend_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_AMD_draw_buffers_blend"); + if (supported_extensions.contains("GL_AMD_interleaved_elements") && !AMD_interleaved_elements_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_AMD_interleaved_elements"); + if (supported_extensions.contains("GL_AMD_multi_draw_indirect") && !AMD_multi_draw_indirect_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_AMD_multi_draw_indirect"); + if (supported_extensions.contains("GL_AMD_name_gen_delete") && !AMD_name_gen_delete_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_AMD_name_gen_delete"); + if (supported_extensions.contains("GL_AMD_performance_monitor") && !AMD_performance_monitor_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_AMD_performance_monitor"); + if (supported_extensions.contains("GL_AMD_sample_positions") && !AMD_sample_positions_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_AMD_sample_positions"); + if (supported_extensions.contains("GL_AMD_sparse_texture") && !AMD_sparse_texture_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_AMD_sparse_texture"); + if (supported_extensions.contains("GL_AMD_stencil_operation_extended") && !AMD_stencil_operation_extended_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_AMD_stencil_operation_extended"); + if (supported_extensions.contains("GL_AMD_vertex_shader_tessellator") && !AMD_vertex_shader_tessellator_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_AMD_vertex_shader_tessellator"); + if (supported_extensions.contains("GL_APPLE_element_array") && !APPLE_element_array_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_APPLE_element_array"); + if (supported_extensions.contains("GL_APPLE_fence") && !APPLE_fence_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_APPLE_fence"); + if (supported_extensions.contains("GL_APPLE_flush_buffer_range") && !APPLE_flush_buffer_range_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_APPLE_flush_buffer_range"); + if (supported_extensions.contains("GL_APPLE_object_purgeable") && !APPLE_object_purgeable_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_APPLE_object_purgeable"); + if (supported_extensions.contains("GL_APPLE_texture_range") && !APPLE_texture_range_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_APPLE_texture_range"); + if (supported_extensions.contains("GL_APPLE_vertex_array_object") && !APPLE_vertex_array_object_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_APPLE_vertex_array_object"); + if (supported_extensions.contains("GL_APPLE_vertex_array_range") && !APPLE_vertex_array_range_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_APPLE_vertex_array_range"); + if (supported_extensions.contains("GL_APPLE_vertex_program_evaluators") && !APPLE_vertex_program_evaluators_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_APPLE_vertex_program_evaluators"); + if (supported_extensions.contains("GL_ARB_ES2_compatibility") && !ARB_ES2_compatibility_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_ES2_compatibility"); + if (supported_extensions.contains("GL_ARB_base_instance") && !ARB_base_instance_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_base_instance"); + if (supported_extensions.contains("GL_ARB_bindless_texture") && !ARB_bindless_texture_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_bindless_texture"); + if (supported_extensions.contains("GL_ARB_blend_func_extended") && !ARB_blend_func_extended_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_blend_func_extended"); + if (supported_extensions.contains("GL_ARB_buffer_object") && !ARB_buffer_object_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_buffer_object"); + if (supported_extensions.contains("GL_ARB_buffer_storage") && !ARB_buffer_storage_initNativeFunctionAddresses(supported_extensions)) + remove(supported_extensions, "GL_ARB_buffer_storage"); + if (supported_extensions.contains("GL_ARB_cl_event") && !ARB_cl_event_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_cl_event"); + if (supported_extensions.contains("GL_ARB_clear_buffer_object") && !ARB_clear_buffer_object_initNativeFunctionAddresses(supported_extensions)) + remove(supported_extensions, "GL_ARB_clear_buffer_object"); + if (supported_extensions.contains("GL_ARB_clear_texture") && !ARB_clear_texture_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_clear_texture"); + if (supported_extensions.contains("GL_ARB_color_buffer_float") && !ARB_color_buffer_float_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_color_buffer_float"); + if (supported_extensions.contains("GL_ARB_compute_shader") && !ARB_compute_shader_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_compute_shader"); + if (supported_extensions.contains("GL_ARB_compute_variable_group_size") && !ARB_compute_variable_group_size_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_compute_variable_group_size"); + if (supported_extensions.contains("GL_ARB_copy_buffer") && !ARB_copy_buffer_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_copy_buffer"); + if (supported_extensions.contains("GL_ARB_copy_image") && !ARB_copy_image_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_copy_image"); + if (supported_extensions.contains("GL_ARB_debug_output") && !ARB_debug_output_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_debug_output"); + if (supported_extensions.contains("GL_ARB_draw_buffers") && !ARB_draw_buffers_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_draw_buffers"); + if (supported_extensions.contains("GL_ARB_draw_buffers_blend") && !ARB_draw_buffers_blend_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_draw_buffers_blend"); + if (supported_extensions.contains("GL_ARB_draw_elements_base_vertex") && !ARB_draw_elements_base_vertex_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_draw_elements_base_vertex"); + if (supported_extensions.contains("GL_ARB_draw_indirect") && !ARB_draw_indirect_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_draw_indirect"); + if (supported_extensions.contains("GL_ARB_draw_instanced") && !ARB_draw_instanced_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_draw_instanced"); + if (supported_extensions.contains("GL_ARB_framebuffer_no_attachments") && !ARB_framebuffer_no_attachments_initNativeFunctionAddresses(supported_extensions)) + remove(supported_extensions, "GL_ARB_framebuffer_no_attachments"); + if (supported_extensions.contains("GL_ARB_framebuffer_object") && !ARB_framebuffer_object_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_framebuffer_object"); + if (supported_extensions.contains("GL_ARB_geometry_shader4") && !ARB_geometry_shader4_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_geometry_shader4"); + if (supported_extensions.contains("GL_ARB_get_program_binary") && !ARB_get_program_binary_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_get_program_binary"); + if (supported_extensions.contains("GL_ARB_gpu_shader_fp64") && !ARB_gpu_shader_fp64_initNativeFunctionAddresses(supported_extensions)) + remove(supported_extensions, "GL_ARB_gpu_shader_fp64"); + if (supported_extensions.contains("GL_ARB_imaging") && !ARB_imaging_initNativeFunctionAddresses(forwardCompatible)) + remove(supported_extensions, "GL_ARB_imaging"); + if (supported_extensions.contains("GL_ARB_indirect_parameters") && !ARB_indirect_parameters_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_indirect_parameters"); + if (supported_extensions.contains("GL_ARB_instanced_arrays") && !ARB_instanced_arrays_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_instanced_arrays"); + if (supported_extensions.contains("GL_ARB_internalformat_query") && !ARB_internalformat_query_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_internalformat_query"); + if (supported_extensions.contains("GL_ARB_internalformat_query2") && !ARB_internalformat_query2_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_internalformat_query2"); + if (supported_extensions.contains("GL_ARB_invalidate_subdata") && !ARB_invalidate_subdata_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_invalidate_subdata"); + if (supported_extensions.contains("GL_ARB_map_buffer_range") && !ARB_map_buffer_range_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_map_buffer_range"); + if (supported_extensions.contains("GL_ARB_matrix_palette") && !ARB_matrix_palette_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_matrix_palette"); + if (supported_extensions.contains("GL_ARB_multi_bind") && !ARB_multi_bind_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_multi_bind"); + if (supported_extensions.contains("GL_ARB_multi_draw_indirect") && !ARB_multi_draw_indirect_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_multi_draw_indirect"); + if (supported_extensions.contains("GL_ARB_multisample") && !ARB_multisample_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_multisample"); + if (supported_extensions.contains("GL_ARB_multitexture") && !ARB_multitexture_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_multitexture"); + if (supported_extensions.contains("GL_ARB_occlusion_query") && !ARB_occlusion_query_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_occlusion_query"); + if (supported_extensions.contains("GL_ARB_point_parameters") && !ARB_point_parameters_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_point_parameters"); + if (supported_extensions.contains("GL_ARB_program") && !ARB_program_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_program"); + if (supported_extensions.contains("GL_ARB_program_interface_query") && !ARB_program_interface_query_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_program_interface_query"); + if (supported_extensions.contains("GL_ARB_provoking_vertex") && !ARB_provoking_vertex_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_provoking_vertex"); + if (supported_extensions.contains("GL_ARB_robustness") && !ARB_robustness_initNativeFunctionAddresses(forwardCompatible,supported_extensions)) + remove(supported_extensions, "GL_ARB_robustness"); + if (supported_extensions.contains("GL_ARB_sample_shading") && !ARB_sample_shading_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_sample_shading"); + if (supported_extensions.contains("GL_ARB_sampler_objects") && !ARB_sampler_objects_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_sampler_objects"); + if (supported_extensions.contains("GL_ARB_separate_shader_objects") && !ARB_separate_shader_objects_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_separate_shader_objects"); + if (supported_extensions.contains("GL_ARB_shader_atomic_counters") && !ARB_shader_atomic_counters_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_shader_atomic_counters"); + if (supported_extensions.contains("GL_ARB_shader_image_load_store") && !ARB_shader_image_load_store_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_shader_image_load_store"); + if (supported_extensions.contains("GL_ARB_shader_objects") && !ARB_shader_objects_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_shader_objects"); + if (supported_extensions.contains("GL_ARB_shader_storage_buffer_object") && !ARB_shader_storage_buffer_object_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_shader_storage_buffer_object"); + if (supported_extensions.contains("GL_ARB_shader_subroutine") && !ARB_shader_subroutine_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_shader_subroutine"); + if (supported_extensions.contains("GL_ARB_shading_language_include") && !ARB_shading_language_include_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_shading_language_include"); + if (supported_extensions.contains("GL_ARB_sparse_texture") && !ARB_sparse_texture_initNativeFunctionAddresses(supported_extensions)) + remove(supported_extensions, "GL_ARB_sparse_texture"); + if (supported_extensions.contains("GL_ARB_sync") && !ARB_sync_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_sync"); + if (supported_extensions.contains("GL_ARB_tessellation_shader") && !ARB_tessellation_shader_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_tessellation_shader"); + if (supported_extensions.contains("GL_ARB_texture_buffer_object") && !ARB_texture_buffer_object_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_texture_buffer_object"); + if (supported_extensions.contains("GL_ARB_texture_buffer_range") && !ARB_texture_buffer_range_initNativeFunctionAddresses(supported_extensions)) + remove(supported_extensions, "GL_ARB_texture_buffer_range"); + if (supported_extensions.contains("GL_ARB_texture_compression") && !ARB_texture_compression_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_texture_compression"); + if (supported_extensions.contains("GL_ARB_texture_multisample") && !ARB_texture_multisample_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_texture_multisample"); + if ((supported_extensions.contains("GL_ARB_texture_storage") || supported_extensions.contains("GL_EXT_texture_storage")) && !ARB_texture_storage_initNativeFunctionAddresses(supported_extensions)) { + remove(supported_extensions, "GL_EXT_texture_storage"); + remove(supported_extensions, "GL_ARB_texture_storage"); + } + if (supported_extensions.contains("GL_ARB_texture_storage_multisample") && !ARB_texture_storage_multisample_initNativeFunctionAddresses(supported_extensions)) + remove(supported_extensions, "GL_ARB_texture_storage_multisample"); + if (supported_extensions.contains("GL_ARB_texture_view") && !ARB_texture_view_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_texture_view"); + if (supported_extensions.contains("GL_ARB_timer_query") && !ARB_timer_query_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_timer_query"); + if (supported_extensions.contains("GL_ARB_transform_feedback2") && !ARB_transform_feedback2_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_transform_feedback2"); + if (supported_extensions.contains("GL_ARB_transform_feedback3") && !ARB_transform_feedback3_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_transform_feedback3"); + if (supported_extensions.contains("GL_ARB_transform_feedback_instanced") && !ARB_transform_feedback_instanced_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_transform_feedback_instanced"); + if (supported_extensions.contains("GL_ARB_transpose_matrix") && !ARB_transpose_matrix_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_transpose_matrix"); + if (supported_extensions.contains("GL_ARB_uniform_buffer_object") && !ARB_uniform_buffer_object_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_uniform_buffer_object"); + if (supported_extensions.contains("GL_ARB_vertex_array_object") && !ARB_vertex_array_object_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_vertex_array_object"); + if (supported_extensions.contains("GL_ARB_vertex_attrib_64bit") && !ARB_vertex_attrib_64bit_initNativeFunctionAddresses(supported_extensions)) + remove(supported_extensions, "GL_ARB_vertex_attrib_64bit"); + if (supported_extensions.contains("GL_ARB_vertex_attrib_binding") && !ARB_vertex_attrib_binding_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_vertex_attrib_binding"); + if (supported_extensions.contains("GL_ARB_vertex_blend") && !ARB_vertex_blend_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_vertex_blend"); + if (supported_extensions.contains("GL_ARB_vertex_program") && !ARB_vertex_program_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_vertex_program"); + if (supported_extensions.contains("GL_ARB_vertex_shader") && !ARB_vertex_shader_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_vertex_shader"); + if (supported_extensions.contains("GL_ARB_vertex_type_2_10_10_10_rev") && !ARB_vertex_type_2_10_10_10_rev_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_vertex_type_2_10_10_10_rev"); + if (supported_extensions.contains("GL_ARB_viewport_array") && !ARB_viewport_array_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ARB_viewport_array"); + if (supported_extensions.contains("GL_ARB_window_pos") && !ARB_window_pos_initNativeFunctionAddresses(forwardCompatible)) + remove(supported_extensions, "GL_ARB_window_pos"); + if (supported_extensions.contains("GL_ATI_draw_buffers") && !ATI_draw_buffers_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ATI_draw_buffers"); + if (supported_extensions.contains("GL_ATI_element_array") && !ATI_element_array_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ATI_element_array"); + if (supported_extensions.contains("GL_ATI_envmap_bumpmap") && !ATI_envmap_bumpmap_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ATI_envmap_bumpmap"); + if (supported_extensions.contains("GL_ATI_fragment_shader") && !ATI_fragment_shader_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ATI_fragment_shader"); + if (supported_extensions.contains("GL_ATI_map_object_buffer") && !ATI_map_object_buffer_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ATI_map_object_buffer"); + if (supported_extensions.contains("GL_ATI_pn_triangles") && !ATI_pn_triangles_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ATI_pn_triangles"); + if (supported_extensions.contains("GL_ATI_separate_stencil") && !ATI_separate_stencil_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ATI_separate_stencil"); + if (supported_extensions.contains("GL_ATI_vertex_array_object") && !ATI_vertex_array_object_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ATI_vertex_array_object"); + if (supported_extensions.contains("GL_ATI_vertex_attrib_array_object") && !ATI_vertex_attrib_array_object_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ATI_vertex_attrib_array_object"); + if (supported_extensions.contains("GL_ATI_vertex_streams") && !ATI_vertex_streams_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_ATI_vertex_streams"); + if (supported_extensions.contains("GL_EXT_bindable_uniform") && !EXT_bindable_uniform_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_bindable_uniform"); + if (supported_extensions.contains("GL_EXT_blend_color") && !EXT_blend_color_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_blend_color"); + if (supported_extensions.contains("GL_EXT_blend_equation_separate") && !EXT_blend_equation_separate_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_blend_equation_separate"); + if (supported_extensions.contains("GL_EXT_blend_func_separate") && !EXT_blend_func_separate_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_blend_func_separate"); + if (supported_extensions.contains("GL_EXT_blend_minmax") && !EXT_blend_minmax_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_blend_minmax"); + if (supported_extensions.contains("GL_EXT_compiled_vertex_array") && !EXT_compiled_vertex_array_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_compiled_vertex_array"); + if (supported_extensions.contains("GL_EXT_depth_bounds_test") && !EXT_depth_bounds_test_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_depth_bounds_test"); + supported_extensions.add("GL_EXT_direct_state_access"); + if (supported_extensions.contains("GL_EXT_direct_state_access") && !EXT_direct_state_access_initNativeFunctionAddresses(forwardCompatible,supported_extensions)) + remove(supported_extensions, "GL_EXT_direct_state_access"); + if (supported_extensions.contains("GL_EXT_draw_buffers2") && !EXT_draw_buffers2_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_draw_buffers2"); + if (supported_extensions.contains("GL_EXT_draw_instanced") && !EXT_draw_instanced_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_draw_instanced"); + if (supported_extensions.contains("GL_EXT_draw_range_elements") && !EXT_draw_range_elements_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_draw_range_elements"); + if (supported_extensions.contains("GL_EXT_fog_coord") && !EXT_fog_coord_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_fog_coord"); + if (supported_extensions.contains("GL_EXT_framebuffer_blit") && !EXT_framebuffer_blit_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_framebuffer_blit"); + if (supported_extensions.contains("GL_EXT_framebuffer_multisample") && !EXT_framebuffer_multisample_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_framebuffer_multisample"); + if (supported_extensions.contains("GL_EXT_framebuffer_object") && !EXT_framebuffer_object_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_framebuffer_object"); + if (supported_extensions.contains("GL_EXT_geometry_shader4") && !EXT_geometry_shader4_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_geometry_shader4"); + if (supported_extensions.contains("GL_EXT_gpu_program_parameters") && !EXT_gpu_program_parameters_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_gpu_program_parameters"); + if (supported_extensions.contains("GL_EXT_gpu_shader4") && !EXT_gpu_shader4_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_gpu_shader4"); + if (supported_extensions.contains("GL_EXT_multi_draw_arrays") && !EXT_multi_draw_arrays_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_multi_draw_arrays"); + if (supported_extensions.contains("GL_EXT_paletted_texture") && !EXT_paletted_texture_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_paletted_texture"); + if (supported_extensions.contains("GL_EXT_point_parameters") && !EXT_point_parameters_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_point_parameters"); + if (supported_extensions.contains("GL_EXT_provoking_vertex") && !EXT_provoking_vertex_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_provoking_vertex"); + if (supported_extensions.contains("GL_EXT_secondary_color") && !EXT_secondary_color_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_secondary_color"); + if (supported_extensions.contains("GL_EXT_separate_shader_objects") && !EXT_separate_shader_objects_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_separate_shader_objects"); + if (supported_extensions.contains("GL_EXT_shader_image_load_store") && !EXT_shader_image_load_store_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_shader_image_load_store"); + if (supported_extensions.contains("GL_EXT_stencil_clear_tag") && !EXT_stencil_clear_tag_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_stencil_clear_tag"); + if (supported_extensions.contains("GL_EXT_stencil_two_side") && !EXT_stencil_two_side_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_stencil_two_side"); + if (supported_extensions.contains("GL_EXT_texture_array") && !EXT_texture_array_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_texture_array"); + if (supported_extensions.contains("GL_EXT_texture_buffer_object") && !EXT_texture_buffer_object_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_texture_buffer_object"); + if (supported_extensions.contains("GL_EXT_texture_integer") && !EXT_texture_integer_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_texture_integer"); + if (supported_extensions.contains("GL_EXT_timer_query") && !EXT_timer_query_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_timer_query"); + if (supported_extensions.contains("GL_EXT_transform_feedback") && !EXT_transform_feedback_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_transform_feedback"); + if (supported_extensions.contains("GL_EXT_vertex_attrib_64bit") && !EXT_vertex_attrib_64bit_initNativeFunctionAddresses(supported_extensions)) + remove(supported_extensions, "GL_EXT_vertex_attrib_64bit"); + if (supported_extensions.contains("GL_EXT_vertex_shader") && !EXT_vertex_shader_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_vertex_shader"); + if (supported_extensions.contains("GL_EXT_vertex_weighting") && !EXT_vertex_weighting_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_EXT_vertex_weighting"); + if (supported_extensions.contains("OpenGL12") && !GL12_initNativeFunctionAddresses()) + remove(supported_extensions, "OpenGL12"); + if (supported_extensions.contains("OpenGL13") && !GL13_initNativeFunctionAddresses(forwardCompatible)) + remove(supported_extensions, "OpenGL13"); + if (supported_extensions.contains("OpenGL14") && !GL14_initNativeFunctionAddresses(forwardCompatible)) + remove(supported_extensions, "OpenGL14"); + if (supported_extensions.contains("OpenGL15") && !GL15_initNativeFunctionAddresses()) + remove(supported_extensions, "OpenGL15"); + if (supported_extensions.contains("OpenGL20") && !GL20_initNativeFunctionAddresses()) + remove(supported_extensions, "OpenGL20"); + if (supported_extensions.contains("OpenGL21") && !GL21_initNativeFunctionAddresses()) + remove(supported_extensions, "OpenGL21"); + if (supported_extensions.contains("OpenGL30") && !GL30_initNativeFunctionAddresses()) + remove(supported_extensions, "OpenGL30"); + if (supported_extensions.contains("OpenGL31") && !GL31_initNativeFunctionAddresses()) + remove(supported_extensions, "OpenGL31"); + if (supported_extensions.contains("OpenGL32") && !GL32_initNativeFunctionAddresses()) + remove(supported_extensions, "OpenGL32"); + if (supported_extensions.contains("OpenGL33") && !GL33_initNativeFunctionAddresses(forwardCompatible)) + remove(supported_extensions, "OpenGL33"); + if (supported_extensions.contains("OpenGL40") && !GL40_initNativeFunctionAddresses()) + remove(supported_extensions, "OpenGL40"); + if (supported_extensions.contains("OpenGL41") && !GL41_initNativeFunctionAddresses()) + remove(supported_extensions, "OpenGL41"); + if (supported_extensions.contains("OpenGL42") && !GL42_initNativeFunctionAddresses()) + remove(supported_extensions, "OpenGL42"); + if (supported_extensions.contains("OpenGL43") && !GL43_initNativeFunctionAddresses()) + remove(supported_extensions, "OpenGL43"); + if (supported_extensions.contains("OpenGL44") && !GL44_initNativeFunctionAddresses()) + remove(supported_extensions, "OpenGL44"); + if (supported_extensions.contains("GL_GREMEDY_frame_terminator") && !GREMEDY_frame_terminator_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_GREMEDY_frame_terminator"); + if (supported_extensions.contains("GL_GREMEDY_string_marker") && !GREMEDY_string_marker_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_GREMEDY_string_marker"); + if (supported_extensions.contains("GL_INTEL_map_texture") && !INTEL_map_texture_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_INTEL_map_texture"); + if (supported_extensions.contains("GL_KHR_debug") && !KHR_debug_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_KHR_debug"); + if (supported_extensions.contains("GL_NV_bindless_multi_draw_indirect") && !NV_bindless_multi_draw_indirect_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_bindless_multi_draw_indirect"); + if (supported_extensions.contains("GL_NV_bindless_texture") && !NV_bindless_texture_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_bindless_texture"); + if (supported_extensions.contains("GL_NV_blend_equation_advanced") && !NV_blend_equation_advanced_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_blend_equation_advanced"); + if (supported_extensions.contains("GL_NV_conditional_render") && !NV_conditional_render_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_conditional_render"); + if (supported_extensions.contains("GL_NV_copy_image") && !NV_copy_image_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_copy_image"); + if (supported_extensions.contains("GL_NV_depth_buffer_float") && !NV_depth_buffer_float_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_depth_buffer_float"); + if (supported_extensions.contains("GL_NV_draw_texture") && !NV_draw_texture_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_draw_texture"); + if (supported_extensions.contains("GL_NV_evaluators") && !NV_evaluators_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_evaluators"); + if (supported_extensions.contains("GL_NV_explicit_multisample") && !NV_explicit_multisample_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_explicit_multisample"); + if (supported_extensions.contains("GL_NV_fence") && !NV_fence_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_fence"); + if (supported_extensions.contains("GL_NV_fragment_program") && !NV_fragment_program_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_fragment_program"); + if (supported_extensions.contains("GL_NV_framebuffer_multisample_coverage") && !NV_framebuffer_multisample_coverage_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_framebuffer_multisample_coverage"); + if (supported_extensions.contains("GL_NV_geometry_program4") && !NV_geometry_program4_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_geometry_program4"); + if (supported_extensions.contains("GL_NV_gpu_program4") && !NV_gpu_program4_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_gpu_program4"); + if (supported_extensions.contains("GL_NV_gpu_shader5") && !NV_gpu_shader5_initNativeFunctionAddresses(supported_extensions)) + remove(supported_extensions, "GL_NV_gpu_shader5"); + if (supported_extensions.contains("GL_NV_half_float") && !NV_half_float_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_half_float"); + if (supported_extensions.contains("GL_NV_occlusion_query") && !NV_occlusion_query_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_occlusion_query"); + if (supported_extensions.contains("GL_NV_parameter_buffer_object") && !NV_parameter_buffer_object_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_parameter_buffer_object"); + if (supported_extensions.contains("GL_NV_path_rendering") && !NV_path_rendering_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_path_rendering"); + if (supported_extensions.contains("GL_NV_pixel_data_range") && !NV_pixel_data_range_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_pixel_data_range"); + if (supported_extensions.contains("GL_NV_point_sprite") && !NV_point_sprite_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_point_sprite"); + if (supported_extensions.contains("GL_NV_present_video") && !NV_present_video_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_present_video"); + supported_extensions.add("GL_NV_primitive_restart"); + if (supported_extensions.contains("GL_NV_primitive_restart") && !NV_primitive_restart_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_primitive_restart"); + if (supported_extensions.contains("GL_NV_program") && !NV_program_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_program"); + if (supported_extensions.contains("GL_NV_register_combiners") && !NV_register_combiners_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_register_combiners"); + if (supported_extensions.contains("GL_NV_register_combiners2") && !NV_register_combiners2_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_register_combiners2"); + if (supported_extensions.contains("GL_NV_shader_buffer_load") && !NV_shader_buffer_load_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_shader_buffer_load"); + if (supported_extensions.contains("GL_NV_texture_barrier") && !NV_texture_barrier_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_texture_barrier"); + if (supported_extensions.contains("GL_NV_texture_multisample") && !NV_texture_multisample_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_texture_multisample"); + if (supported_extensions.contains("GL_NV_transform_feedback") && !NV_transform_feedback_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_transform_feedback"); + if (supported_extensions.contains("GL_NV_transform_feedback2") && !NV_transform_feedback2_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_transform_feedback2"); + if (supported_extensions.contains("GL_NV_vertex_array_range") && !NV_vertex_array_range_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_vertex_array_range"); + if (supported_extensions.contains("GL_NV_vertex_attrib_integer_64bit") && !NV_vertex_attrib_integer_64bit_initNativeFunctionAddresses(supported_extensions)) + remove(supported_extensions, "GL_NV_vertex_attrib_integer_64bit"); + if (supported_extensions.contains("GL_NV_vertex_buffer_unified_memory") && !NV_vertex_buffer_unified_memory_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_vertex_buffer_unified_memory"); + if (supported_extensions.contains("GL_NV_vertex_program") && !NV_vertex_program_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_vertex_program"); + if (supported_extensions.contains("GL_NV_video_capture") && !NV_video_capture_initNativeFunctionAddresses()) + remove(supported_extensions, "GL_NV_video_capture"); + return supported_extensions; + } + + static void unloadAllStubs() { + } + + ContextCapabilities(boolean forwardCompatible) throws LWJGLException { + Set supported_extensions = initAllStubs(forwardCompatible); + this.GL_AMD_blend_minmax_factor = supported_extensions.contains("GL_AMD_blend_minmax_factor"); + this.GL_AMD_conservative_depth = supported_extensions.contains("GL_AMD_conservative_depth"); + this.GL_AMD_debug_output = supported_extensions.contains("GL_AMD_debug_output") + || supported_extensions.contains("GL_AMDX_debug_output"); + this.GL_AMD_depth_clamp_separate = supported_extensions.contains("GL_AMD_depth_clamp_separate"); + this.GL_AMD_draw_buffers_blend = supported_extensions.contains("GL_AMD_draw_buffers_blend"); + this.GL_AMD_interleaved_elements = supported_extensions.contains("GL_AMD_interleaved_elements"); + this.GL_AMD_multi_draw_indirect = supported_extensions.contains("GL_AMD_multi_draw_indirect"); + this.GL_AMD_name_gen_delete = supported_extensions.contains("GL_AMD_name_gen_delete"); + this.GL_AMD_performance_monitor = supported_extensions.contains("GL_AMD_performance_monitor"); + this.GL_AMD_pinned_memory = supported_extensions.contains("GL_AMD_pinned_memory"); + this.GL_AMD_query_buffer_object = supported_extensions.contains("GL_AMD_query_buffer_object"); + this.GL_AMD_sample_positions = supported_extensions.contains("GL_AMD_sample_positions"); + this.GL_AMD_seamless_cubemap_per_texture = supported_extensions.contains("GL_AMD_seamless_cubemap_per_texture"); + this.GL_AMD_shader_atomic_counter_ops = supported_extensions.contains("GL_AMD_shader_atomic_counter_ops"); + this.GL_AMD_shader_stencil_export = supported_extensions.contains("GL_AMD_shader_stencil_export"); + this.GL_AMD_shader_trinary_minmax = supported_extensions.contains("GL_AMD_shader_trinary_minmax"); + this.GL_AMD_sparse_texture = supported_extensions.contains("GL_AMD_sparse_texture"); + this.GL_AMD_stencil_operation_extended = supported_extensions.contains("GL_AMD_stencil_operation_extended"); + this.GL_AMD_texture_texture4 = supported_extensions.contains("GL_AMD_texture_texture4"); + this.GL_AMD_transform_feedback3_lines_triangles = supported_extensions.contains("GL_AMD_transform_feedback3_lines_triangles"); + this.GL_AMD_vertex_shader_layer = supported_extensions.contains("GL_AMD_vertex_shader_layer"); + this.GL_AMD_vertex_shader_tessellator = supported_extensions.contains("GL_AMD_vertex_shader_tessellator"); + this.GL_AMD_vertex_shader_viewport_index = supported_extensions.contains("GL_AMD_vertex_shader_viewport_index"); + this.GL_APPLE_aux_depth_stencil = supported_extensions.contains("GL_APPLE_aux_depth_stencil"); + this.GL_APPLE_client_storage = supported_extensions.contains("GL_APPLE_client_storage"); + this.GL_APPLE_element_array = supported_extensions.contains("GL_APPLE_element_array"); + this.GL_APPLE_fence = supported_extensions.contains("GL_APPLE_fence"); + this.GL_APPLE_float_pixels = supported_extensions.contains("GL_APPLE_float_pixels"); + this.GL_APPLE_flush_buffer_range = supported_extensions.contains("GL_APPLE_flush_buffer_range"); + this.GL_APPLE_object_purgeable = supported_extensions.contains("GL_APPLE_object_purgeable"); + this.GL_APPLE_packed_pixels = supported_extensions.contains("GL_APPLE_packed_pixels"); + this.GL_APPLE_rgb_422 = supported_extensions.contains("GL_APPLE_rgb_422"); + this.GL_APPLE_row_bytes = supported_extensions.contains("GL_APPLE_row_bytes"); + this.GL_APPLE_texture_range = supported_extensions.contains("GL_APPLE_texture_range"); + this.GL_APPLE_vertex_array_object = supported_extensions.contains("GL_APPLE_vertex_array_object"); + this.GL_APPLE_vertex_array_range = supported_extensions.contains("GL_APPLE_vertex_array_range"); + this.GL_APPLE_vertex_program_evaluators = supported_extensions.contains("GL_APPLE_vertex_program_evaluators"); + this.GL_APPLE_ycbcr_422 = supported_extensions.contains("GL_APPLE_ycbcr_422"); + this.GL_ARB_ES2_compatibility = supported_extensions.contains("GL_ARB_ES2_compatibility"); + this.GL_ARB_ES3_compatibility = supported_extensions.contains("GL_ARB_ES3_compatibility"); + this.GL_ARB_arrays_of_arrays = supported_extensions.contains("GL_ARB_arrays_of_arrays"); + this.GL_ARB_base_instance = supported_extensions.contains("GL_ARB_base_instance"); + this.GL_ARB_bindless_texture = supported_extensions.contains("GL_ARB_bindless_texture"); + this.GL_ARB_blend_func_extended = supported_extensions.contains("GL_ARB_blend_func_extended"); + this.GL_ARB_buffer_storage = supported_extensions.contains("GL_ARB_buffer_storage"); + this.GL_ARB_cl_event = supported_extensions.contains("GL_ARB_cl_event"); + this.GL_ARB_clear_buffer_object = supported_extensions.contains("GL_ARB_clear_buffer_object"); + this.GL_ARB_clear_texture = supported_extensions.contains("GL_ARB_clear_texture"); + this.GL_ARB_color_buffer_float = supported_extensions.contains("GL_ARB_color_buffer_float"); + this.GL_ARB_compatibility = supported_extensions.contains("GL_ARB_compatibility"); + this.GL_ARB_compressed_texture_pixel_storage = supported_extensions.contains("GL_ARB_compressed_texture_pixel_storage"); + this.GL_ARB_compute_shader = supported_extensions.contains("GL_ARB_compute_shader"); + this.GL_ARB_compute_variable_group_size = supported_extensions.contains("GL_ARB_compute_variable_group_size"); + this.GL_ARB_conservative_depth = supported_extensions.contains("GL_ARB_conservative_depth"); + this.GL_ARB_copy_buffer = supported_extensions.contains("GL_ARB_copy_buffer"); + this.GL_ARB_copy_image = supported_extensions.contains("GL_ARB_copy_image"); + this.GL_ARB_debug_output = supported_extensions.contains("GL_ARB_debug_output"); + this.GL_ARB_depth_buffer_float = supported_extensions.contains("GL_ARB_depth_buffer_float"); + this.GL_ARB_depth_clamp = supported_extensions.contains("GL_ARB_depth_clamp"); + this.GL_ARB_depth_texture = supported_extensions.contains("GL_ARB_depth_texture"); + this.GL_ARB_draw_buffers = supported_extensions.contains("GL_ARB_draw_buffers"); + this.GL_ARB_draw_buffers_blend = supported_extensions.contains("GL_ARB_draw_buffers_blend"); + this.GL_ARB_draw_elements_base_vertex = supported_extensions.contains("GL_ARB_draw_elements_base_vertex"); + this.GL_ARB_draw_indirect = supported_extensions.contains("GL_ARB_draw_indirect"); + this.GL_ARB_draw_instanced = supported_extensions.contains("GL_ARB_draw_instanced"); + this.GL_ARB_enhanced_layouts = supported_extensions.contains("GL_ARB_enhanced_layouts"); + this.GL_ARB_explicit_attrib_location = supported_extensions.contains("GL_ARB_explicit_attrib_location"); + this.GL_ARB_explicit_uniform_location = supported_extensions.contains("GL_ARB_explicit_uniform_location"); + this.GL_ARB_fragment_coord_conventions = supported_extensions.contains("GL_ARB_fragment_coord_conventions"); + this.GL_ARB_fragment_layer_viewport = supported_extensions.contains("GL_ARB_fragment_layer_viewport"); + this.GL_ARB_fragment_program = supported_extensions.contains("GL_ARB_fragment_program") + && supported_extensions.contains("GL_ARB_program"); + this.GL_ARB_fragment_program_shadow = supported_extensions.contains("GL_ARB_fragment_program_shadow"); + this.GL_ARB_fragment_shader = supported_extensions.contains("GL_ARB_fragment_shader"); + this.GL_ARB_framebuffer_no_attachments = supported_extensions.contains("GL_ARB_framebuffer_no_attachments"); + this.GL_ARB_framebuffer_object = supported_extensions.contains("GL_ARB_framebuffer_object"); + this.GL_ARB_framebuffer_sRGB = supported_extensions.contains("GL_ARB_framebuffer_sRGB"); + this.GL_ARB_geometry_shader4 = supported_extensions.contains("GL_ARB_geometry_shader4"); + this.GL_ARB_get_program_binary = supported_extensions.contains("GL_ARB_get_program_binary"); + this.GL_ARB_gpu_shader5 = supported_extensions.contains("GL_ARB_gpu_shader5"); + this.GL_ARB_gpu_shader_fp64 = supported_extensions.contains("GL_ARB_gpu_shader_fp64"); + this.GL_ARB_half_float_pixel = supported_extensions.contains("GL_ARB_half_float_pixel"); + this.GL_ARB_half_float_vertex = supported_extensions.contains("GL_ARB_half_float_vertex"); + this.GL_ARB_imaging = supported_extensions.contains("GL_ARB_imaging"); + this.GL_ARB_indirect_parameters = supported_extensions.contains("GL_ARB_indirect_parameters"); + this.GL_ARB_instanced_arrays = supported_extensions.contains("GL_ARB_instanced_arrays"); + this.GL_ARB_internalformat_query = supported_extensions.contains("GL_ARB_internalformat_query"); + this.GL_ARB_internalformat_query2 = supported_extensions.contains("GL_ARB_internalformat_query2"); + this.GL_ARB_invalidate_subdata = supported_extensions.contains("GL_ARB_invalidate_subdata"); + this.GL_ARB_map_buffer_alignment = supported_extensions.contains("GL_ARB_map_buffer_alignment"); + this.GL_ARB_map_buffer_range = supported_extensions.contains("GL_ARB_map_buffer_range"); + this.GL_ARB_matrix_palette = supported_extensions.contains("GL_ARB_matrix_palette"); + this.GL_ARB_multi_bind = supported_extensions.contains("GL_ARB_multi_bind"); + this.GL_ARB_multi_draw_indirect = supported_extensions.contains("GL_ARB_multi_draw_indirect"); + this.GL_ARB_multisample = supported_extensions.contains("GL_ARB_multisample"); + this.GL_ARB_multitexture = supported_extensions.contains("GL_ARB_multitexture"); + this.GL_ARB_occlusion_query = supported_extensions.contains("GL_ARB_occlusion_query"); + this.GL_ARB_occlusion_query2 = supported_extensions.contains("GL_ARB_occlusion_query2"); + this.GL_ARB_pixel_buffer_object = supported_extensions.contains("GL_ARB_pixel_buffer_object") + && supported_extensions.contains("GL_ARB_buffer_object"); + this.GL_ARB_point_parameters = supported_extensions.contains("GL_ARB_point_parameters"); + this.GL_ARB_point_sprite = supported_extensions.contains("GL_ARB_point_sprite"); + this.GL_ARB_program_interface_query = supported_extensions.contains("GL_ARB_program_interface_query"); + this.GL_ARB_provoking_vertex = supported_extensions.contains("GL_ARB_provoking_vertex"); + this.GL_ARB_query_buffer_object = supported_extensions.contains("GL_ARB_query_buffer_object"); + this.GL_ARB_robust_buffer_access_behavior = supported_extensions.contains("GL_ARB_robust_buffer_access_behavior"); + this.GL_ARB_robustness = supported_extensions.contains("GL_ARB_robustness"); + this.GL_ARB_robustness_isolation = supported_extensions.contains("GL_ARB_robustness_isolation"); + this.GL_ARB_sample_shading = supported_extensions.contains("GL_ARB_sample_shading"); + this.GL_ARB_sampler_objects = supported_extensions.contains("GL_ARB_sampler_objects"); + this.GL_ARB_seamless_cube_map = supported_extensions.contains("GL_ARB_seamless_cube_map"); + this.GL_ARB_seamless_cubemap_per_texture = supported_extensions.contains("GL_ARB_seamless_cubemap_per_texture"); + this.GL_ARB_separate_shader_objects = supported_extensions.contains("GL_ARB_separate_shader_objects"); + this.GL_ARB_shader_atomic_counters = supported_extensions.contains("GL_ARB_shader_atomic_counters"); + this.GL_ARB_shader_bit_encoding = supported_extensions.contains("GL_ARB_shader_bit_encoding"); + this.GL_ARB_shader_draw_parameters = supported_extensions.contains("GL_ARB_shader_draw_parameters"); + this.GL_ARB_shader_group_vote = supported_extensions.contains("GL_ARB_shader_group_vote"); + this.GL_ARB_shader_image_load_store = supported_extensions.contains("GL_ARB_shader_image_load_store"); + this.GL_ARB_shader_image_size = supported_extensions.contains("GL_ARB_shader_image_size"); + this.GL_ARB_shader_objects = supported_extensions.contains("GL_ARB_shader_objects"); + this.GL_ARB_shader_precision = supported_extensions.contains("GL_ARB_shader_precision"); + this.GL_ARB_shader_stencil_export = supported_extensions.contains("GL_ARB_shader_stencil_export"); + this.GL_ARB_shader_storage_buffer_object = supported_extensions.contains("GL_ARB_shader_storage_buffer_object"); + this.GL_ARB_shader_subroutine = supported_extensions.contains("GL_ARB_shader_subroutine"); + this.GL_ARB_shader_texture_lod = supported_extensions.contains("GL_ARB_shader_texture_lod"); + this.GL_ARB_shading_language_100 = supported_extensions.contains("GL_ARB_shading_language_100"); + this.GL_ARB_shading_language_420pack = supported_extensions.contains("GL_ARB_shading_language_420pack"); + this.GL_ARB_shading_language_include = supported_extensions.contains("GL_ARB_shading_language_include"); + this.GL_ARB_shading_language_packing = supported_extensions.contains("GL_ARB_shading_language_packing"); + this.GL_ARB_shadow = supported_extensions.contains("GL_ARB_shadow"); + this.GL_ARB_shadow_ambient = supported_extensions.contains("GL_ARB_shadow_ambient"); + this.GL_ARB_sparse_texture = supported_extensions.contains("GL_ARB_sparse_texture"); + this.GL_ARB_stencil_texturing = supported_extensions.contains("GL_ARB_stencil_texturing"); + this.GL_ARB_sync = supported_extensions.contains("GL_ARB_sync"); + this.GL_ARB_tessellation_shader = supported_extensions.contains("GL_ARB_tessellation_shader"); + this.GL_ARB_texture_border_clamp = supported_extensions.contains("GL_ARB_texture_border_clamp"); + this.GL_ARB_texture_buffer_object = supported_extensions.contains("GL_ARB_texture_buffer_object"); + this.GL_ARB_texture_buffer_object_rgb32 = supported_extensions.contains("GL_ARB_texture_buffer_object_rgb32") + || supported_extensions.contains("GL_EXT_texture_buffer_object_rgb32"); + this.GL_ARB_texture_buffer_range = supported_extensions.contains("GL_ARB_texture_buffer_range"); + this.GL_ARB_texture_compression = supported_extensions.contains("GL_ARB_texture_compression"); + this.GL_ARB_texture_compression_bptc = supported_extensions.contains("GL_ARB_texture_compression_bptc") + || supported_extensions.contains("GL_EXT_texture_compression_bptc"); + this.GL_ARB_texture_compression_rgtc = supported_extensions.contains("GL_ARB_texture_compression_rgtc"); + this.GL_ARB_texture_cube_map = supported_extensions.contains("GL_ARB_texture_cube_map"); + this.GL_ARB_texture_cube_map_array = supported_extensions.contains("GL_ARB_texture_cube_map_array"); + this.GL_ARB_texture_env_add = supported_extensions.contains("GL_ARB_texture_env_add"); + this.GL_ARB_texture_env_combine = supported_extensions.contains("GL_ARB_texture_env_combine"); + this.GL_ARB_texture_env_crossbar = supported_extensions.contains("GL_ARB_texture_env_crossbar"); + this.GL_ARB_texture_env_dot3 = supported_extensions.contains("GL_ARB_texture_env_dot3"); + this.GL_ARB_texture_float = supported_extensions.contains("GL_ARB_texture_float"); + this.GL_ARB_texture_gather = supported_extensions.contains("GL_ARB_texture_gather"); + this.GL_ARB_texture_mirror_clamp_to_edge = supported_extensions.contains("GL_ARB_texture_mirror_clamp_to_edge"); + this.GL_ARB_texture_mirrored_repeat = supported_extensions.contains("GL_ARB_texture_mirrored_repeat"); + this.GL_ARB_texture_multisample = supported_extensions.contains("GL_ARB_texture_multisample"); + this.GL_ARB_texture_non_power_of_two = supported_extensions.contains("GL_ARB_texture_non_power_of_two"); + this.GL_ARB_texture_query_levels = supported_extensions.contains("GL_ARB_texture_query_levels"); + this.GL_ARB_texture_query_lod = supported_extensions.contains("GL_ARB_texture_query_lod"); + this.GL_ARB_texture_rectangle = supported_extensions.contains("GL_ARB_texture_rectangle"); + this.GL_ARB_texture_rg = supported_extensions.contains("GL_ARB_texture_rg"); + this.GL_ARB_texture_rgb10_a2ui = supported_extensions.contains("GL_ARB_texture_rgb10_a2ui"); + this.GL_ARB_texture_stencil8 = supported_extensions.contains("GL_ARB_texture_stencil8"); + this.GL_ARB_texture_storage = supported_extensions.contains("GL_ARB_texture_storage") + || supported_extensions.contains("GL_EXT_texture_storage"); + this.GL_ARB_texture_storage_multisample = supported_extensions.contains("GL_ARB_texture_storage_multisample"); + this.GL_ARB_texture_swizzle = supported_extensions.contains("GL_ARB_texture_swizzle"); + this.GL_ARB_texture_view = supported_extensions.contains("GL_ARB_texture_view"); + this.GL_ARB_timer_query = supported_extensions.contains("GL_ARB_timer_query"); + this.GL_ARB_transform_feedback2 = supported_extensions.contains("GL_ARB_transform_feedback2"); + this.GL_ARB_transform_feedback3 = supported_extensions.contains("GL_ARB_transform_feedback3"); + this.GL_ARB_transform_feedback_instanced = supported_extensions.contains("GL_ARB_transform_feedback_instanced"); + this.GL_ARB_transpose_matrix = supported_extensions.contains("GL_ARB_transpose_matrix"); + this.GL_ARB_uniform_buffer_object = supported_extensions.contains("GL_ARB_uniform_buffer_object"); + this.GL_ARB_vertex_array_bgra = supported_extensions.contains("GL_ARB_vertex_array_bgra"); + this.GL_ARB_vertex_array_object = supported_extensions.contains("GL_ARB_vertex_array_object"); + this.GL_ARB_vertex_attrib_64bit = supported_extensions.contains("GL_ARB_vertex_attrib_64bit"); + this.GL_ARB_vertex_attrib_binding = supported_extensions.contains("GL_ARB_vertex_attrib_binding"); + this.GL_ARB_vertex_blend = supported_extensions.contains("GL_ARB_vertex_blend"); + this.GL_ARB_vertex_buffer_object = supported_extensions.contains("GL_ARB_vertex_buffer_object") + && supported_extensions.contains("GL_ARB_buffer_object"); + this.GL_ARB_vertex_program = supported_extensions.contains("GL_ARB_vertex_program") + && supported_extensions.contains("GL_ARB_program"); + this.GL_ARB_vertex_shader = supported_extensions.contains("GL_ARB_vertex_shader"); + this.GL_ARB_vertex_type_10f_11f_11f_rev = supported_extensions.contains("GL_ARB_vertex_type_10f_11f_11f_rev"); + this.GL_ARB_vertex_type_2_10_10_10_rev = supported_extensions.contains("GL_ARB_vertex_type_2_10_10_10_rev"); + this.GL_ARB_viewport_array = supported_extensions.contains("GL_ARB_viewport_array"); + this.GL_ARB_window_pos = supported_extensions.contains("GL_ARB_window_pos"); + this.GL_ATI_draw_buffers = supported_extensions.contains("GL_ATI_draw_buffers"); + this.GL_ATI_element_array = supported_extensions.contains("GL_ATI_element_array"); + this.GL_ATI_envmap_bumpmap = supported_extensions.contains("GL_ATI_envmap_bumpmap"); + this.GL_ATI_fragment_shader = supported_extensions.contains("GL_ATI_fragment_shader"); + this.GL_ATI_map_object_buffer = supported_extensions.contains("GL_ATI_map_object_buffer"); + this.GL_ATI_meminfo = supported_extensions.contains("GL_ATI_meminfo"); + this.GL_ATI_pn_triangles = supported_extensions.contains("GL_ATI_pn_triangles"); + this.GL_ATI_separate_stencil = supported_extensions.contains("GL_ATI_separate_stencil"); + this.GL_ATI_shader_texture_lod = supported_extensions.contains("GL_ATI_shader_texture_lod"); + this.GL_ATI_text_fragment_shader = supported_extensions.contains("GL_ATI_text_fragment_shader"); + this.GL_ATI_texture_compression_3dc = supported_extensions.contains("GL_ATI_texture_compression_3dc"); + this.GL_ATI_texture_env_combine3 = supported_extensions.contains("GL_ATI_texture_env_combine3"); + this.GL_ATI_texture_float = supported_extensions.contains("GL_ATI_texture_float"); + this.GL_ATI_texture_mirror_once = supported_extensions.contains("GL_ATI_texture_mirror_once"); + this.GL_ATI_vertex_array_object = supported_extensions.contains("GL_ATI_vertex_array_object"); + this.GL_ATI_vertex_attrib_array_object = supported_extensions.contains("GL_ATI_vertex_attrib_array_object"); + this.GL_ATI_vertex_streams = supported_extensions.contains("GL_ATI_vertex_streams"); + this.GL_EXT_abgr = supported_extensions.contains("GL_EXT_abgr"); + this.GL_EXT_bgra = supported_extensions.contains("GL_EXT_bgra"); + this.GL_EXT_bindable_uniform = supported_extensions.contains("GL_EXT_bindable_uniform"); + this.GL_EXT_blend_color = supported_extensions.contains("GL_EXT_blend_color"); + this.GL_EXT_blend_equation_separate = supported_extensions.contains("GL_EXT_blend_equation_separate"); + this.GL_EXT_blend_func_separate = supported_extensions.contains("GL_EXT_blend_func_separate"); + this.GL_EXT_blend_minmax = supported_extensions.contains("GL_EXT_blend_minmax"); + this.GL_EXT_blend_subtract = supported_extensions.contains("GL_EXT_blend_subtract"); + this.GL_EXT_Cg_shader = supported_extensions.contains("GL_EXT_Cg_shader"); + this.GL_EXT_compiled_vertex_array = supported_extensions.contains("GL_EXT_compiled_vertex_array"); + this.GL_EXT_depth_bounds_test = supported_extensions.contains("GL_EXT_depth_bounds_test"); + this.GL_EXT_direct_state_access = supported_extensions.contains("GL_EXT_direct_state_access"); + this.GL_EXT_draw_buffers2 = supported_extensions.contains("GL_EXT_draw_buffers2"); + this.GL_EXT_draw_instanced = supported_extensions.contains("GL_EXT_draw_instanced"); + this.GL_EXT_draw_range_elements = supported_extensions.contains("GL_EXT_draw_range_elements"); + this.GL_EXT_fog_coord = supported_extensions.contains("GL_EXT_fog_coord"); + this.GL_EXT_framebuffer_blit = supported_extensions.contains("GL_EXT_framebuffer_blit"); + this.GL_EXT_framebuffer_multisample = supported_extensions.contains("GL_EXT_framebuffer_multisample"); + this.GL_EXT_framebuffer_multisample_blit_scaled = supported_extensions.contains("GL_EXT_framebuffer_multisample_blit_scaled"); + this.GL_EXT_framebuffer_object = supported_extensions.contains("GL_EXT_framebuffer_object"); + this.GL_EXT_framebuffer_sRGB = supported_extensions.contains("GL_EXT_framebuffer_sRGB"); + this.GL_EXT_geometry_shader4 = supported_extensions.contains("GL_EXT_geometry_shader4"); + this.GL_EXT_gpu_program_parameters = supported_extensions.contains("GL_EXT_gpu_program_parameters"); + this.GL_EXT_gpu_shader4 = supported_extensions.contains("GL_EXT_gpu_shader4"); + this.GL_EXT_multi_draw_arrays = supported_extensions.contains("GL_EXT_multi_draw_arrays"); + this.GL_EXT_packed_depth_stencil = supported_extensions.contains("GL_EXT_packed_depth_stencil"); + this.GL_EXT_packed_float = supported_extensions.contains("GL_EXT_packed_float"); + this.GL_EXT_packed_pixels = supported_extensions.contains("GL_EXT_packed_pixels"); + this.GL_EXT_paletted_texture = supported_extensions.contains("GL_EXT_paletted_texture"); + this.GL_EXT_pixel_buffer_object = supported_extensions.contains("GL_EXT_pixel_buffer_object") + && supported_extensions.contains("GL_ARB_buffer_object"); + this.GL_EXT_point_parameters = supported_extensions.contains("GL_EXT_point_parameters"); + this.GL_EXT_provoking_vertex = supported_extensions.contains("GL_EXT_provoking_vertex"); + this.GL_EXT_rescale_normal = supported_extensions.contains("GL_EXT_rescale_normal"); + this.GL_EXT_secondary_color = supported_extensions.contains("GL_EXT_secondary_color"); + this.GL_EXT_separate_shader_objects = supported_extensions.contains("GL_EXT_separate_shader_objects"); + this.GL_EXT_separate_specular_color = supported_extensions.contains("GL_EXT_separate_specular_color"); + this.GL_EXT_shader_image_load_store = supported_extensions.contains("GL_EXT_shader_image_load_store"); + this.GL_EXT_shadow_funcs = supported_extensions.contains("GL_EXT_shadow_funcs"); + this.GL_EXT_shared_texture_palette = supported_extensions.contains("GL_EXT_shared_texture_palette"); + this.GL_EXT_stencil_clear_tag = supported_extensions.contains("GL_EXT_stencil_clear_tag"); + this.GL_EXT_stencil_two_side = supported_extensions.contains("GL_EXT_stencil_two_side"); + this.GL_EXT_stencil_wrap = supported_extensions.contains("GL_EXT_stencil_wrap"); + this.GL_EXT_texture_3d = supported_extensions.contains("GL_EXT_texture_3d"); + this.GL_EXT_texture_array = supported_extensions.contains("GL_EXT_texture_array"); + this.GL_EXT_texture_buffer_object = supported_extensions.contains("GL_EXT_texture_buffer_object"); + this.GL_EXT_texture_compression_latc = supported_extensions.contains("GL_EXT_texture_compression_latc"); + this.GL_EXT_texture_compression_rgtc = supported_extensions.contains("GL_EXT_texture_compression_rgtc"); + this.GL_EXT_texture_compression_s3tc = supported_extensions.contains("GL_EXT_texture_compression_s3tc"); + this.GL_EXT_texture_env_combine = supported_extensions.contains("GL_EXT_texture_env_combine"); + this.GL_EXT_texture_env_dot3 = supported_extensions.contains("GL_EXT_texture_env_dot3"); + this.GL_EXT_texture_filter_anisotropic = supported_extensions.contains("GL_EXT_texture_filter_anisotropic"); + this.GL_EXT_texture_integer = supported_extensions.contains("GL_EXT_texture_integer"); + this.GL_EXT_texture_lod_bias = supported_extensions.contains("GL_EXT_texture_lod_bias"); + this.GL_EXT_texture_mirror_clamp = supported_extensions.contains("GL_EXT_texture_mirror_clamp"); + this.GL_EXT_texture_rectangle = supported_extensions.contains("GL_EXT_texture_rectangle"); + this.GL_EXT_texture_sRGB = supported_extensions.contains("GL_EXT_texture_sRGB"); + this.GL_EXT_texture_sRGB_decode = supported_extensions.contains("GL_EXT_texture_sRGB_decode"); + this.GL_EXT_texture_shared_exponent = supported_extensions.contains("GL_EXT_texture_shared_exponent"); + this.GL_EXT_texture_snorm = supported_extensions.contains("GL_EXT_texture_snorm"); + this.GL_EXT_texture_swizzle = supported_extensions.contains("GL_EXT_texture_swizzle"); + this.GL_EXT_timer_query = supported_extensions.contains("GL_EXT_timer_query"); + this.GL_EXT_transform_feedback = supported_extensions.contains("GL_EXT_transform_feedback"); + this.GL_EXT_vertex_array_bgra = supported_extensions.contains("GL_EXT_vertex_array_bgra"); + this.GL_EXT_vertex_attrib_64bit = supported_extensions.contains("GL_EXT_vertex_attrib_64bit"); + this.GL_EXT_vertex_shader = supported_extensions.contains("GL_EXT_vertex_shader"); + this.GL_EXT_vertex_weighting = supported_extensions.contains("GL_EXT_vertex_weighting"); + this.OpenGL11 = supported_extensions.contains("OpenGL11"); + this.OpenGL12 = supported_extensions.contains("OpenGL12"); + this.OpenGL13 = supported_extensions.contains("OpenGL13"); + this.OpenGL14 = supported_extensions.contains("OpenGL14"); + this.OpenGL15 = supported_extensions.contains("OpenGL15"); + this.OpenGL20 = supported_extensions.contains("OpenGL20"); + this.OpenGL21 = supported_extensions.contains("OpenGL21"); + this.OpenGL30 = supported_extensions.contains("OpenGL30"); + this.OpenGL31 = supported_extensions.contains("OpenGL31"); + this.OpenGL32 = supported_extensions.contains("OpenGL32"); + this.OpenGL33 = supported_extensions.contains("OpenGL33"); + this.OpenGL40 = supported_extensions.contains("OpenGL40"); + this.OpenGL41 = supported_extensions.contains("OpenGL41"); + this.OpenGL42 = supported_extensions.contains("OpenGL42"); + this.OpenGL43 = supported_extensions.contains("OpenGL43"); + this.OpenGL44 = supported_extensions.contains("OpenGL44"); + this.GL_GREMEDY_frame_terminator = supported_extensions.contains("GL_GREMEDY_frame_terminator"); + this.GL_GREMEDY_string_marker = supported_extensions.contains("GL_GREMEDY_string_marker"); + this.GL_HP_occlusion_test = supported_extensions.contains("GL_HP_occlusion_test"); + this.GL_IBM_rasterpos_clip = supported_extensions.contains("GL_IBM_rasterpos_clip"); + this.GL_INTEL_map_texture = supported_extensions.contains("GL_INTEL_map_texture"); + this.GL_KHR_debug = supported_extensions.contains("GL_KHR_debug"); + this.GL_KHR_texture_compression_astc_ldr = supported_extensions.contains("GL_KHR_texture_compression_astc_ldr"); + this.GL_NVX_gpu_memory_info = supported_extensions.contains("GL_NVX_gpu_memory_info"); + this.GL_NV_bindless_multi_draw_indirect = supported_extensions.contains("GL_NV_bindless_multi_draw_indirect"); + this.GL_NV_bindless_texture = supported_extensions.contains("GL_NV_bindless_texture"); + this.GL_NV_blend_equation_advanced = supported_extensions.contains("GL_NV_blend_equation_advanced"); + this.GL_NV_blend_square = supported_extensions.contains("GL_NV_blend_square"); + this.GL_NV_compute_program5 = supported_extensions.contains("GL_NV_compute_program5"); + this.GL_NV_conditional_render = supported_extensions.contains("GL_NV_conditional_render"); + this.GL_NV_copy_depth_to_color = supported_extensions.contains("GL_NV_copy_depth_to_color"); + this.GL_NV_copy_image = supported_extensions.contains("GL_NV_copy_image"); + this.GL_NV_deep_texture3D = supported_extensions.contains("GL_NV_deep_texture3D"); + this.GL_NV_depth_buffer_float = supported_extensions.contains("GL_NV_depth_buffer_float"); + this.GL_NV_depth_clamp = supported_extensions.contains("GL_NV_depth_clamp"); + this.GL_NV_draw_texture = supported_extensions.contains("GL_NV_draw_texture"); + this.GL_NV_evaluators = supported_extensions.contains("GL_NV_evaluators"); + this.GL_NV_explicit_multisample = supported_extensions.contains("GL_NV_explicit_multisample"); + this.GL_NV_fence = supported_extensions.contains("GL_NV_fence"); + this.GL_NV_float_buffer = supported_extensions.contains("GL_NV_float_buffer"); + this.GL_NV_fog_distance = supported_extensions.contains("GL_NV_fog_distance"); + this.GL_NV_fragment_program = supported_extensions.contains("GL_NV_fragment_program") + && supported_extensions.contains("GL_NV_program"); + this.GL_NV_fragment_program2 = supported_extensions.contains("GL_NV_fragment_program2"); + this.GL_NV_fragment_program4 = supported_extensions.contains("GL_NV_fragment_program4"); + this.GL_NV_fragment_program_option = supported_extensions.contains("GL_NV_fragment_program_option"); + this.GL_NV_framebuffer_multisample_coverage = supported_extensions.contains("GL_NV_framebuffer_multisample_coverage"); + this.GL_NV_geometry_program4 = supported_extensions.contains("GL_NV_geometry_program4"); + this.GL_NV_geometry_shader4 = supported_extensions.contains("GL_NV_geometry_shader4"); + this.GL_NV_gpu_program4 = supported_extensions.contains("GL_NV_gpu_program4"); + this.GL_NV_gpu_program5 = supported_extensions.contains("GL_NV_gpu_program5"); + this.GL_NV_gpu_program5_mem_extended = supported_extensions.contains("GL_NV_gpu_program5_mem_extended"); + this.GL_NV_gpu_shader5 = supported_extensions.contains("GL_NV_gpu_shader5"); + this.GL_NV_half_float = supported_extensions.contains("GL_NV_half_float"); + this.GL_NV_light_max_exponent = supported_extensions.contains("GL_NV_light_max_exponent"); + this.GL_NV_multisample_coverage = supported_extensions.contains("GL_NV_multisample_coverage"); + this.GL_NV_multisample_filter_hint = supported_extensions.contains("GL_NV_multisample_filter_hint"); + this.GL_NV_occlusion_query = supported_extensions.contains("GL_NV_occlusion_query"); + this.GL_NV_packed_depth_stencil = supported_extensions.contains("GL_NV_packed_depth_stencil"); + this.GL_NV_parameter_buffer_object = supported_extensions.contains("GL_NV_parameter_buffer_object"); + this.GL_NV_parameter_buffer_object2 = supported_extensions.contains("GL_NV_parameter_buffer_object2"); + this.GL_NV_path_rendering = supported_extensions.contains("GL_NV_path_rendering"); + this.GL_NV_pixel_data_range = supported_extensions.contains("GL_NV_pixel_data_range"); + this.GL_NV_point_sprite = supported_extensions.contains("GL_NV_point_sprite"); + this.GL_NV_present_video = supported_extensions.contains("GL_NV_present_video"); + this.GL_NV_primitive_restart = supported_extensions.contains("GL_NV_primitive_restart"); + this.GL_NV_register_combiners = supported_extensions.contains("GL_NV_register_combiners"); + this.GL_NV_register_combiners2 = supported_extensions.contains("GL_NV_register_combiners2"); + this.GL_NV_shader_atomic_counters = supported_extensions.contains("GL_NV_shader_atomic_counters"); + this.GL_NV_shader_atomic_float = supported_extensions.contains("GL_NV_shader_atomic_float"); + this.GL_NV_shader_buffer_load = supported_extensions.contains("GL_NV_shader_buffer_load"); + this.GL_NV_shader_buffer_store = supported_extensions.contains("GL_NV_shader_buffer_store"); + this.GL_NV_shader_storage_buffer_object = supported_extensions.contains("GL_NV_shader_storage_buffer_object"); + this.GL_NV_tessellation_program5 = supported_extensions.contains("GL_NV_tessellation_program5"); + this.GL_NV_texgen_reflection = supported_extensions.contains("GL_NV_texgen_reflection"); + this.GL_NV_texture_barrier = supported_extensions.contains("GL_NV_texture_barrier"); + this.GL_NV_texture_compression_vtc = supported_extensions.contains("GL_NV_texture_compression_vtc"); + this.GL_NV_texture_env_combine4 = supported_extensions.contains("GL_NV_texture_env_combine4"); + this.GL_NV_texture_expand_normal = supported_extensions.contains("GL_NV_texture_expand_normal"); + this.GL_NV_texture_multisample = supported_extensions.contains("GL_NV_texture_multisample"); + this.GL_NV_texture_rectangle = supported_extensions.contains("GL_NV_texture_rectangle"); + this.GL_NV_texture_shader = supported_extensions.contains("GL_NV_texture_shader"); + this.GL_NV_texture_shader2 = supported_extensions.contains("GL_NV_texture_shader2"); + this.GL_NV_texture_shader3 = supported_extensions.contains("GL_NV_texture_shader3"); + this.GL_NV_transform_feedback = supported_extensions.contains("GL_NV_transform_feedback"); + this.GL_NV_transform_feedback2 = supported_extensions.contains("GL_NV_transform_feedback2"); + this.GL_NV_vertex_array_range = supported_extensions.contains("GL_NV_vertex_array_range"); + this.GL_NV_vertex_array_range2 = supported_extensions.contains("GL_NV_vertex_array_range2"); + this.GL_NV_vertex_attrib_integer_64bit = supported_extensions.contains("GL_NV_vertex_attrib_integer_64bit"); + this.GL_NV_vertex_buffer_unified_memory = supported_extensions.contains("GL_NV_vertex_buffer_unified_memory"); + this.GL_NV_vertex_program = supported_extensions.contains("GL_NV_vertex_program") + && supported_extensions.contains("GL_NV_program"); + this.GL_NV_vertex_program1_1 = supported_extensions.contains("GL_NV_vertex_program1_1"); + this.GL_NV_vertex_program2 = supported_extensions.contains("GL_NV_vertex_program2"); + this.GL_NV_vertex_program2_option = supported_extensions.contains("GL_NV_vertex_program2_option"); + this.GL_NV_vertex_program3 = supported_extensions.contains("GL_NV_vertex_program3"); + this.GL_NV_vertex_program4 = supported_extensions.contains("GL_NV_vertex_program4"); + this.GL_NV_video_capture = supported_extensions.contains("GL_NV_video_capture"); + this.GL_SGIS_generate_mipmap = supported_extensions.contains("GL_SGIS_generate_mipmap"); + this.GL_SGIS_texture_lod = supported_extensions.contains("GL_SGIS_texture_lod"); + this.GL_SUN_slice_accum = supported_extensions.contains("GL_SUN_slice_accum"); + tracker.init(); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTAbgr.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTAbgr.java new file mode 100644 index 0000000..e5d3cab --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTAbgr.java @@ -0,0 +1,13 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTAbgr { + + public static final int GL_ABGR_EXT = 0x8000; + + private EXTAbgr() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTBgra.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTBgra.java new file mode 100644 index 0000000..244c047 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTBgra.java @@ -0,0 +1,14 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTBgra { + + public static final int GL_BGR_EXT = 0x80E0, + GL_BGRA_EXT = 0x80E1; + + private EXTBgra() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTBindableUniform.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTBindableUniform.java new file mode 100644 index 0000000..ad578ac --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTBindableUniform.java @@ -0,0 +1,54 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTBindableUniform { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT = 0x8DE2, + GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT = 0x8DE3, + GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT = 0x8DE4, + GL_MAX_BINDABLE_UNIFORM_SIZE_EXT = 0x8DED, + GL_UNIFORM_BUFFER_BINDING_EXT = 0x8DEF; + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, and + * GetBufferPointerv: + */ + public static final int GL_UNIFORM_BUFFER_EXT = 0x8DEE; + + private EXTBindableUniform() {} + + public static void glUniformBufferEXT(int program, int location, int buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformBufferEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniformBufferEXT(program, location, buffer, function_pointer); + } + static native void nglUniformBufferEXT(int program, int location, int buffer, long function_pointer); + + public static int glGetUniformBufferSizeEXT(int program, int location) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetUniformBufferSizeEXT; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglGetUniformBufferSizeEXT(program, location, function_pointer); + return __result; + } + static native int nglGetUniformBufferSizeEXT(int program, int location, long function_pointer); + + public static long glGetUniformOffsetEXT(int program, int location) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetUniformOffsetEXT; + BufferChecks.checkFunctionAddress(function_pointer); + long __result = nglGetUniformOffsetEXT(program, location, function_pointer); + return __result; + } + static native long nglGetUniformOffsetEXT(int program, int location, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTBlendColor.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTBlendColor.java new file mode 100644 index 0000000..4529009 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTBlendColor.java @@ -0,0 +1,33 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTBlendColor { + + /** + * Accepted by the <sfactor> and <dfactor> parameters of BlendFunc. + */ + public static final int GL_CONSTANT_COLOR_EXT = 0x8001, + GL_ONE_MINUS_CONSTANT_COLOR_EXT = 0x8002, + GL_CONSTANT_ALPHA_EXT = 0x8003, + GL_ONE_MINUS_CONSTANT_ALPHA_EXT = 0x8004; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev. + */ + public static final int GL_BLEND_COLOR_EXT = 0x8005; + + private EXTBlendColor() {} + + public static void glBlendColorEXT(float red, float green, float blue, float alpha) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBlendColorEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglBlendColorEXT(red, green, blue, alpha, function_pointer); + } + static native void nglBlendColorEXT(float red, float green, float blue, float alpha, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTBlendEquationSeparate.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTBlendEquationSeparate.java new file mode 100644 index 0000000..01d4982 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTBlendEquationSeparate.java @@ -0,0 +1,26 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTBlendEquationSeparate { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_BLEND_EQUATION_RGB_EXT = 0x8009, + GL_BLEND_EQUATION_ALPHA_EXT = 0x883D; + + private EXTBlendEquationSeparate() {} + + public static void glBlendEquationSeparateEXT(int modeRGB, int modeAlpha) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBlendEquationSeparateEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglBlendEquationSeparateEXT(modeRGB, modeAlpha, function_pointer); + } + static native void nglBlendEquationSeparateEXT(int modeRGB, int modeAlpha, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTBlendFuncSeparate.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTBlendFuncSeparate.java new file mode 100644 index 0000000..a54f70e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTBlendFuncSeparate.java @@ -0,0 +1,24 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTBlendFuncSeparate { + + public static final int GL_BLEND_DST_RGB_EXT = 0x80C8, + GL_BLEND_SRC_RGB_EXT = 0x80C9, + GL_BLEND_DST_ALPHA_EXT = 0x80CA, + GL_BLEND_SRC_ALPHA_EXT = 0x80CB; + + private EXTBlendFuncSeparate() {} + + public static void glBlendFuncSeparateEXT(int sfactorRGB, int dfactorRGB, int sfactorAlpha, int dfactorAlpha) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBlendFuncSeparateEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglBlendFuncSeparateEXT(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha, function_pointer); + } + static native void nglBlendFuncSeparateEXT(int sfactorRGB, int dfactorRGB, int sfactorAlpha, int dfactorAlpha, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTBlendMinmax.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTBlendMinmax.java new file mode 100644 index 0000000..40d7828 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTBlendMinmax.java @@ -0,0 +1,32 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTBlendMinmax { + + /** + * Accepted by the <mode> parameter of BlendEquationEXT. + */ + public static final int GL_FUNC_ADD_EXT = 0x8006, + GL_MIN_EXT = 0x8007, + GL_MAX_EXT = 0x8008; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev. + */ + public static final int GL_BLEND_EQUATION_EXT = 0x8009; + + private EXTBlendMinmax() {} + + public static void glBlendEquationEXT(int mode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBlendEquationEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglBlendEquationEXT(mode, function_pointer); + } + static native void nglBlendEquationEXT(int mode, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTBlendSubtract.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTBlendSubtract.java new file mode 100644 index 0000000..b9d5d56 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTBlendSubtract.java @@ -0,0 +1,14 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTBlendSubtract { + + public static final int GL_FUNC_SUBTRACT_EXT = 0x800A, + GL_FUNC_REVERSE_SUBTRACT_EXT = 0x800B; + + private EXTBlendSubtract() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTCgShader.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTCgShader.java new file mode 100644 index 0000000..0f62e92 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTCgShader.java @@ -0,0 +1,20 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTCgShader { + + /** + * You can pass GL_CG_VERTEX_SHADER_EXT to glCreateShaderARB instead of GL_VERTEX_SHADER_ARB to create a vertex shader object + * that will parse and compile its shader source with the Cg compiler front-end rather than the GLSL front-end. Likewise, you + * can pass GL_CG_FRAGMENT_SHADER_EXT to glCreateShaderARB instead of GL_FRAGMENT_SHADER_ARB to create a fragment shader object + * that will parse and compile its shader source with the Cg front-end rather than the GLSL front-end. + */ + public static final int GL_CG_VERTEX_SHADER_EXT = 0x890E, + GL_CG_FRAGMENT_SHADER_EXT = 0x890F; + + private EXTCgShader() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTCompiledVertexArray.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTCompiledVertexArray.java new file mode 100644 index 0000000..d32ba69 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTCompiledVertexArray.java @@ -0,0 +1,30 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTCompiledVertexArray { + + public static final int GL_ARRAY_ELEMENT_LOCK_FIRST_EXT = 0x81A8, + GL_ARRAY_ELEMENT_LOCK_COUNT_EXT = 0x81A9; + + private EXTCompiledVertexArray() {} + + public static void glLockArraysEXT(int first, int count) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glLockArraysEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglLockArraysEXT(first, count, function_pointer); + } + static native void nglLockArraysEXT(int first, int count, long function_pointer); + + public static void glUnlockArraysEXT() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUnlockArraysEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglUnlockArraysEXT(function_pointer); + } + static native void nglUnlockArraysEXT(long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTDepthBoundsTest.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTDepthBoundsTest.java new file mode 100644 index 0000000..2c9b45a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTDepthBoundsTest.java @@ -0,0 +1,32 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTDepthBoundsTest { + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_DEPTH_BOUNDS_TEST_EXT = 0x8890; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_DEPTH_BOUNDS_EXT = 0x8891; + + private EXTDepthBoundsTest() {} + + public static void glDepthBoundsEXT(double zmin, double zmax) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDepthBoundsEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglDepthBoundsEXT(zmin, zmax, function_pointer); + } + static native void nglDepthBoundsEXT(double zmin, double zmax, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTDirectStateAccess.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTDirectStateAccess.java new file mode 100644 index 0000000..07d36c9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTDirectStateAccess.java @@ -0,0 +1,3103 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTDirectStateAccess { + + /** + * Accepted by the <pname> parameter of GetBooleanIndexedvEXT, + * GetIntegerIndexedvEXT, GetFloatIndexedvEXT, GetDoubleIndexedvEXT: + * GetBooleani_v, GetIntegeri_v, GetFloati_vEXT, GetDoublei_vEXT: + */ + public static final int GL_PROGRAM_MATRIX_EXT = 0x8E2D, + GL_TRANSPOSE_PROGRAM_MATRIX_EXT = 0x8E2E, + GL_PROGRAM_MATRIX_STACK_DEPTH_EXT = 0x8E2F; + + private EXTDirectStateAccess() {} + + public static void glClientAttribDefaultEXT(int mask) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClientAttribDefaultEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglClientAttribDefaultEXT(mask, function_pointer); + } + static native void nglClientAttribDefaultEXT(int mask, long function_pointer); + + public static void glPushClientAttribDefaultEXT(int mask) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPushClientAttribDefaultEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglPushClientAttribDefaultEXT(mask, function_pointer); + } + static native void nglPushClientAttribDefaultEXT(int mask, long function_pointer); + + public static void glMatrixLoadEXT(int matrixMode, FloatBuffer m) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMatrixLoadfEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(m, 16); + nglMatrixLoadfEXT(matrixMode, MemoryUtil.getAddress(m), function_pointer); + } + static native void nglMatrixLoadfEXT(int matrixMode, long m, long function_pointer); + + public static void glMatrixLoadEXT(int matrixMode, DoubleBuffer m) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMatrixLoaddEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(m, 16); + nglMatrixLoaddEXT(matrixMode, MemoryUtil.getAddress(m), function_pointer); + } + static native void nglMatrixLoaddEXT(int matrixMode, long m, long function_pointer); + + public static void glMatrixMultEXT(int matrixMode, FloatBuffer m) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMatrixMultfEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(m, 16); + nglMatrixMultfEXT(matrixMode, MemoryUtil.getAddress(m), function_pointer); + } + static native void nglMatrixMultfEXT(int matrixMode, long m, long function_pointer); + + public static void glMatrixMultEXT(int matrixMode, DoubleBuffer m) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMatrixMultdEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(m, 16); + nglMatrixMultdEXT(matrixMode, MemoryUtil.getAddress(m), function_pointer); + } + static native void nglMatrixMultdEXT(int matrixMode, long m, long function_pointer); + + public static void glMatrixLoadIdentityEXT(int matrixMode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMatrixLoadIdentityEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglMatrixLoadIdentityEXT(matrixMode, function_pointer); + } + static native void nglMatrixLoadIdentityEXT(int matrixMode, long function_pointer); + + public static void glMatrixRotatefEXT(int matrixMode, float angle, float x, float y, float z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMatrixRotatefEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglMatrixRotatefEXT(matrixMode, angle, x, y, z, function_pointer); + } + static native void nglMatrixRotatefEXT(int matrixMode, float angle, float x, float y, float z, long function_pointer); + + public static void glMatrixRotatedEXT(int matrixMode, double angle, double x, double y, double z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMatrixRotatedEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglMatrixRotatedEXT(matrixMode, angle, x, y, z, function_pointer); + } + static native void nglMatrixRotatedEXT(int matrixMode, double angle, double x, double y, double z, long function_pointer); + + public static void glMatrixScalefEXT(int matrixMode, float x, float y, float z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMatrixScalefEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglMatrixScalefEXT(matrixMode, x, y, z, function_pointer); + } + static native void nglMatrixScalefEXT(int matrixMode, float x, float y, float z, long function_pointer); + + public static void glMatrixScaledEXT(int matrixMode, double x, double y, double z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMatrixScaledEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglMatrixScaledEXT(matrixMode, x, y, z, function_pointer); + } + static native void nglMatrixScaledEXT(int matrixMode, double x, double y, double z, long function_pointer); + + public static void glMatrixTranslatefEXT(int matrixMode, float x, float y, float z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMatrixTranslatefEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglMatrixTranslatefEXT(matrixMode, x, y, z, function_pointer); + } + static native void nglMatrixTranslatefEXT(int matrixMode, float x, float y, float z, long function_pointer); + + public static void glMatrixTranslatedEXT(int matrixMode, double x, double y, double z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMatrixTranslatedEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglMatrixTranslatedEXT(matrixMode, x, y, z, function_pointer); + } + static native void nglMatrixTranslatedEXT(int matrixMode, double x, double y, double z, long function_pointer); + + public static void glMatrixOrthoEXT(int matrixMode, double l, double r, double b, double t, double n, double f) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMatrixOrthoEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglMatrixOrthoEXT(matrixMode, l, r, b, t, n, f, function_pointer); + } + static native void nglMatrixOrthoEXT(int matrixMode, double l, double r, double b, double t, double n, double f, long function_pointer); + + public static void glMatrixFrustumEXT(int matrixMode, double l, double r, double b, double t, double n, double f) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMatrixFrustumEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglMatrixFrustumEXT(matrixMode, l, r, b, t, n, f, function_pointer); + } + static native void nglMatrixFrustumEXT(int matrixMode, double l, double r, double b, double t, double n, double f, long function_pointer); + + public static void glMatrixPushEXT(int matrixMode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMatrixPushEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglMatrixPushEXT(matrixMode, function_pointer); + } + static native void nglMatrixPushEXT(int matrixMode, long function_pointer); + + public static void glMatrixPopEXT(int matrixMode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMatrixPopEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglMatrixPopEXT(matrixMode, function_pointer); + } + static native void nglMatrixPopEXT(int matrixMode, long function_pointer); + + public static void glTextureParameteriEXT(int texture, int target, int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureParameteriEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglTextureParameteriEXT(texture, target, pname, param, function_pointer); + } + static native void nglTextureParameteriEXT(int texture, int target, int pname, int param, long function_pointer); + + public static void glTextureParameterEXT(int texture, int target, int pname, IntBuffer param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureParameterivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(param, 4); + nglTextureParameterivEXT(texture, target, pname, MemoryUtil.getAddress(param), function_pointer); + } + static native void nglTextureParameterivEXT(int texture, int target, int pname, long param, long function_pointer); + + public static void glTextureParameterfEXT(int texture, int target, int pname, float param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureParameterfEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglTextureParameterfEXT(texture, target, pname, param, function_pointer); + } + static native void nglTextureParameterfEXT(int texture, int target, int pname, float param, long function_pointer); + + public static void glTextureParameterEXT(int texture, int target, int pname, FloatBuffer param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureParameterfvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(param, 4); + nglTextureParameterfvEXT(texture, target, pname, MemoryUtil.getAddress(param), function_pointer); + } + static native void nglTextureParameterfvEXT(int texture, int target, int pname, long param, long function_pointer); + + public static void glTextureImage1DEXT(int texture, int target, int level, int internalformat, int width, int border, int format, int type, ByteBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage1DStorage(pixels, format, type, width)); + nglTextureImage1DEXT(texture, target, level, internalformat, width, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glTextureImage1DEXT(int texture, int target, int level, int internalformat, int width, int border, int format, int type, DoubleBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage1DStorage(pixels, format, type, width)); + nglTextureImage1DEXT(texture, target, level, internalformat, width, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glTextureImage1DEXT(int texture, int target, int level, int internalformat, int width, int border, int format, int type, FloatBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage1DStorage(pixels, format, type, width)); + nglTextureImage1DEXT(texture, target, level, internalformat, width, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glTextureImage1DEXT(int texture, int target, int level, int internalformat, int width, int border, int format, int type, IntBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage1DStorage(pixels, format, type, width)); + nglTextureImage1DEXT(texture, target, level, internalformat, width, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glTextureImage1DEXT(int texture, int target, int level, int internalformat, int width, int border, int format, int type, ShortBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage1DStorage(pixels, format, type, width)); + nglTextureImage1DEXT(texture, target, level, internalformat, width, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + static native void nglTextureImage1DEXT(int texture, int target, int level, int internalformat, int width, int border, int format, int type, long pixels, long function_pointer); + public static void glTextureImage1DEXT(int texture, int target, int level, int internalformat, int width, int border, int format, int type, long pixels_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglTextureImage1DEXTBO(texture, target, level, internalformat, width, border, format, type, pixels_buffer_offset, function_pointer); + } + static native void nglTextureImage1DEXTBO(int texture, int target, int level, int internalformat, int width, int border, int format, int type, long pixels_buffer_offset, long function_pointer); + + public static void glTextureImage2DEXT(int texture, int target, int level, int internalformat, int width, int height, int border, int format, int type, ByteBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height)); + nglTextureImage2DEXT(texture, target, level, internalformat, width, height, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glTextureImage2DEXT(int texture, int target, int level, int internalformat, int width, int height, int border, int format, int type, DoubleBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height)); + nglTextureImage2DEXT(texture, target, level, internalformat, width, height, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glTextureImage2DEXT(int texture, int target, int level, int internalformat, int width, int height, int border, int format, int type, FloatBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height)); + nglTextureImage2DEXT(texture, target, level, internalformat, width, height, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glTextureImage2DEXT(int texture, int target, int level, int internalformat, int width, int height, int border, int format, int type, IntBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height)); + nglTextureImage2DEXT(texture, target, level, internalformat, width, height, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glTextureImage2DEXT(int texture, int target, int level, int internalformat, int width, int height, int border, int format, int type, ShortBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height)); + nglTextureImage2DEXT(texture, target, level, internalformat, width, height, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + static native void nglTextureImage2DEXT(int texture, int target, int level, int internalformat, int width, int height, int border, int format, int type, long pixels, long function_pointer); + public static void glTextureImage2DEXT(int texture, int target, int level, int internalformat, int width, int height, int border, int format, int type, long pixels_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglTextureImage2DEXTBO(texture, target, level, internalformat, width, height, border, format, type, pixels_buffer_offset, function_pointer); + } + static native void nglTextureImage2DEXTBO(int texture, int target, int level, int internalformat, int width, int height, int border, int format, int type, long pixels_buffer_offset, long function_pointer); + + public static void glTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int width, int format, int type, ByteBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureSubImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, 1, 1)); + nglTextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int width, int format, int type, DoubleBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureSubImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, 1, 1)); + nglTextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int width, int format, int type, FloatBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureSubImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, 1, 1)); + nglTextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int width, int format, int type, IntBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureSubImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, 1, 1)); + nglTextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int width, int format, int type, ShortBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureSubImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, 1, 1)); + nglTextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + static native void nglTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int width, int format, int type, long pixels, long function_pointer); + public static void glTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int width, int format, int type, long pixels_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureSubImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglTextureSubImage1DEXTBO(texture, target, level, xoffset, width, format, type, pixels_buffer_offset, function_pointer); + } + static native void nglTextureSubImage1DEXTBO(int texture, int target, int level, int xoffset, int width, int format, int type, long pixels_buffer_offset, long function_pointer); + + public static void glTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ByteBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureSubImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, DoubleBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureSubImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, FloatBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureSubImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, IntBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureSubImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ShortBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureSubImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + static native void nglTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, long pixels, long function_pointer); + public static void glTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, long pixels_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureSubImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglTextureSubImage2DEXTBO(texture, target, level, xoffset, yoffset, width, height, format, type, pixels_buffer_offset, function_pointer); + } + static native void nglTextureSubImage2DEXTBO(int texture, int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, long pixels_buffer_offset, long function_pointer); + + public static void glCopyTextureImage1DEXT(int texture, int target, int level, int internalformat, int x, int y, int width, int border) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCopyTextureImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglCopyTextureImage1DEXT(texture, target, level, internalformat, x, y, width, border, function_pointer); + } + static native void nglCopyTextureImage1DEXT(int texture, int target, int level, int internalformat, int x, int y, int width, int border, long function_pointer); + + public static void glCopyTextureImage2DEXT(int texture, int target, int level, int internalformat, int x, int y, int width, int height, int border) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCopyTextureImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglCopyTextureImage2DEXT(texture, target, level, internalformat, x, y, width, height, border, function_pointer); + } + static native void nglCopyTextureImage2DEXT(int texture, int target, int level, int internalformat, int x, int y, int width, int height, int border, long function_pointer); + + public static void glCopyTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int x, int y, int width) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCopyTextureSubImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglCopyTextureSubImage1DEXT(texture, target, level, xoffset, x, y, width, function_pointer); + } + static native void nglCopyTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int x, int y, int width, long function_pointer); + + public static void glCopyTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, int x, int y, int width, int height) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCopyTextureSubImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglCopyTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, x, y, width, height, function_pointer); + } + static native void nglCopyTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, int x, int y, int width, int height, long function_pointer); + + public static void glGetTextureImageEXT(int texture, int target, int level, int format, int type, ByteBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTextureImageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, 1, 1, 1)); + nglGetTextureImageEXT(texture, target, level, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glGetTextureImageEXT(int texture, int target, int level, int format, int type, DoubleBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTextureImageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, 1, 1, 1)); + nglGetTextureImageEXT(texture, target, level, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glGetTextureImageEXT(int texture, int target, int level, int format, int type, FloatBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTextureImageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, 1, 1, 1)); + nglGetTextureImageEXT(texture, target, level, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glGetTextureImageEXT(int texture, int target, int level, int format, int type, IntBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTextureImageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, 1, 1, 1)); + nglGetTextureImageEXT(texture, target, level, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glGetTextureImageEXT(int texture, int target, int level, int format, int type, ShortBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTextureImageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, 1, 1, 1)); + nglGetTextureImageEXT(texture, target, level, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + static native void nglGetTextureImageEXT(int texture, int target, int level, int format, int type, long pixels, long function_pointer); + public static void glGetTextureImageEXT(int texture, int target, int level, int format, int type, long pixels_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTextureImageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOenabled(caps); + nglGetTextureImageEXTBO(texture, target, level, format, type, pixels_buffer_offset, function_pointer); + } + static native void nglGetTextureImageEXTBO(int texture, int target, int level, int format, int type, long pixels_buffer_offset, long function_pointer); + + public static void glGetTextureParameterEXT(int texture, int target, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTextureParameterfvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetTextureParameterfvEXT(texture, target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetTextureParameterfvEXT(int texture, int target, int pname, long params, long function_pointer); + + /** Overloads glGetTextureParameterfvEXT. */ + public static float glGetTextureParameterfEXT(int texture, int target, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTextureParameterfvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + FloatBuffer params = APIUtil.getBufferFloat(caps); + nglGetTextureParameterfvEXT(texture, target, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetTextureParameterEXT(int texture, int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTextureParameterivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetTextureParameterivEXT(texture, target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetTextureParameterivEXT(int texture, int target, int pname, long params, long function_pointer); + + /** Overloads glGetTextureParameterivEXT. */ + public static int glGetTextureParameteriEXT(int texture, int target, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTextureParameterivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetTextureParameterivEXT(texture, target, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetTextureLevelParameterEXT(int texture, int target, int level, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTextureLevelParameterfvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetTextureLevelParameterfvEXT(texture, target, level, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetTextureLevelParameterfvEXT(int texture, int target, int level, int pname, long params, long function_pointer); + + /** Overloads glGetTextureLevelParameterfvEXT. */ + public static float glGetTextureLevelParameterfEXT(int texture, int target, int level, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTextureLevelParameterfvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + FloatBuffer params = APIUtil.getBufferFloat(caps); + nglGetTextureLevelParameterfvEXT(texture, target, level, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetTextureLevelParameterEXT(int texture, int target, int level, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTextureLevelParameterivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetTextureLevelParameterivEXT(texture, target, level, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetTextureLevelParameterivEXT(int texture, int target, int level, int pname, long params, long function_pointer); + + /** Overloads glGetTextureLevelParameterivEXT. */ + public static int glGetTextureLevelParameteriEXT(int texture, int target, int level, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTextureLevelParameterivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetTextureLevelParameterivEXT(texture, target, level, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glTextureImage3DEXT(int texture, int target, int level, int internalformat, int width, int height, int depth, int border, int format, int type, ByteBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth)); + nglTextureImage3DEXT(texture, target, level, internalformat, width, height, depth, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glTextureImage3DEXT(int texture, int target, int level, int internalformat, int width, int height, int depth, int border, int format, int type, DoubleBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth)); + nglTextureImage3DEXT(texture, target, level, internalformat, width, height, depth, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glTextureImage3DEXT(int texture, int target, int level, int internalformat, int width, int height, int depth, int border, int format, int type, FloatBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth)); + nglTextureImage3DEXT(texture, target, level, internalformat, width, height, depth, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glTextureImage3DEXT(int texture, int target, int level, int internalformat, int width, int height, int depth, int border, int format, int type, IntBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth)); + nglTextureImage3DEXT(texture, target, level, internalformat, width, height, depth, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glTextureImage3DEXT(int texture, int target, int level, int internalformat, int width, int height, int depth, int border, int format, int type, ShortBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth)); + nglTextureImage3DEXT(texture, target, level, internalformat, width, height, depth, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + static native void nglTextureImage3DEXT(int texture, int target, int level, int internalformat, int width, int height, int depth, int border, int format, int type, long pixels, long function_pointer); + public static void glTextureImage3DEXT(int texture, int target, int level, int internalformat, int width, int height, int depth, int border, int format, int type, long pixels_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglTextureImage3DEXTBO(texture, target, level, internalformat, width, height, depth, border, format, type, pixels_buffer_offset, function_pointer); + } + static native void nglTextureImage3DEXTBO(int texture, int target, int level, int internalformat, int width, int height, int depth, int border, int format, int type, long pixels_buffer_offset, long function_pointer); + + public static void glTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, ByteBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureSubImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, depth)); + nglTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, DoubleBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureSubImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, depth)); + nglTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, FloatBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureSubImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, depth)); + nglTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, IntBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureSubImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, depth)); + nglTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, ShortBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureSubImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, depth)); + nglTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + static native void nglTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, long pixels, long function_pointer); + public static void glTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, long pixels_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureSubImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglTextureSubImage3DEXTBO(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels_buffer_offset, function_pointer); + } + static native void nglTextureSubImage3DEXTBO(int texture, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, long pixels_buffer_offset, long function_pointer); + + public static void glCopyTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCopyTextureSubImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglCopyTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, x, y, width, height, function_pointer); + } + static native void nglCopyTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height, long function_pointer); + + public static void glBindMultiTextureEXT(int texunit, int target, int texture) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindMultiTextureEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindMultiTextureEXT(texunit, target, texture, function_pointer); + } + static native void nglBindMultiTextureEXT(int texunit, int target, int texture, long function_pointer); + + public static void glMultiTexCoordPointerEXT(int texunit, int size, int stride, DoubleBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoordPointerEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pointer); + nglMultiTexCoordPointerEXT(texunit, size, GL11.GL_DOUBLE, stride, MemoryUtil.getAddress(pointer), function_pointer); + } + public static void glMultiTexCoordPointerEXT(int texunit, int size, int stride, FloatBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoordPointerEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pointer); + nglMultiTexCoordPointerEXT(texunit, size, GL11.GL_FLOAT, stride, MemoryUtil.getAddress(pointer), function_pointer); + } + static native void nglMultiTexCoordPointerEXT(int texunit, int size, int type, int stride, long pointer, long function_pointer); + public static void glMultiTexCoordPointerEXT(int texunit, int size, int type, int stride, long pointer_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoordPointerEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOenabled(caps); + nglMultiTexCoordPointerEXTBO(texunit, size, type, stride, pointer_buffer_offset, function_pointer); + } + static native void nglMultiTexCoordPointerEXTBO(int texunit, int size, int type, int stride, long pointer_buffer_offset, long function_pointer); + + public static void glMultiTexEnvfEXT(int texunit, int target, int pname, float param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexEnvfEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexEnvfEXT(texunit, target, pname, param, function_pointer); + } + static native void nglMultiTexEnvfEXT(int texunit, int target, int pname, float param, long function_pointer); + + public static void glMultiTexEnvEXT(int texunit, int target, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexEnvfvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglMultiTexEnvfvEXT(texunit, target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglMultiTexEnvfvEXT(int texunit, int target, int pname, long params, long function_pointer); + + public static void glMultiTexEnviEXT(int texunit, int target, int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexEnviEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexEnviEXT(texunit, target, pname, param, function_pointer); + } + static native void nglMultiTexEnviEXT(int texunit, int target, int pname, int param, long function_pointer); + + public static void glMultiTexEnvEXT(int texunit, int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexEnvivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglMultiTexEnvivEXT(texunit, target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglMultiTexEnvivEXT(int texunit, int target, int pname, long params, long function_pointer); + + public static void glMultiTexGendEXT(int texunit, int coord, int pname, double param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexGendEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexGendEXT(texunit, coord, pname, param, function_pointer); + } + static native void nglMultiTexGendEXT(int texunit, int coord, int pname, double param, long function_pointer); + + public static void glMultiTexGenEXT(int texunit, int coord, int pname, DoubleBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexGendvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglMultiTexGendvEXT(texunit, coord, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglMultiTexGendvEXT(int texunit, int coord, int pname, long params, long function_pointer); + + public static void glMultiTexGenfEXT(int texunit, int coord, int pname, float param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexGenfEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexGenfEXT(texunit, coord, pname, param, function_pointer); + } + static native void nglMultiTexGenfEXT(int texunit, int coord, int pname, float param, long function_pointer); + + public static void glMultiTexGenEXT(int texunit, int coord, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexGenfvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglMultiTexGenfvEXT(texunit, coord, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglMultiTexGenfvEXT(int texunit, int coord, int pname, long params, long function_pointer); + + public static void glMultiTexGeniEXT(int texunit, int coord, int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexGeniEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexGeniEXT(texunit, coord, pname, param, function_pointer); + } + static native void nglMultiTexGeniEXT(int texunit, int coord, int pname, int param, long function_pointer); + + public static void glMultiTexGenEXT(int texunit, int coord, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexGenivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglMultiTexGenivEXT(texunit, coord, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglMultiTexGenivEXT(int texunit, int coord, int pname, long params, long function_pointer); + + public static void glGetMultiTexEnvEXT(int texunit, int target, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMultiTexEnvfvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetMultiTexEnvfvEXT(texunit, target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetMultiTexEnvfvEXT(int texunit, int target, int pname, long params, long function_pointer); + + public static void glGetMultiTexEnvEXT(int texunit, int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMultiTexEnvivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetMultiTexEnvivEXT(texunit, target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetMultiTexEnvivEXT(int texunit, int target, int pname, long params, long function_pointer); + + public static void glGetMultiTexGenEXT(int texunit, int coord, int pname, DoubleBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMultiTexGendvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetMultiTexGendvEXT(texunit, coord, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetMultiTexGendvEXT(int texunit, int coord, int pname, long params, long function_pointer); + + public static void glGetMultiTexGenEXT(int texunit, int coord, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMultiTexGenfvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetMultiTexGenfvEXT(texunit, coord, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetMultiTexGenfvEXT(int texunit, int coord, int pname, long params, long function_pointer); + + public static void glGetMultiTexGenEXT(int texunit, int coord, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMultiTexGenivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetMultiTexGenivEXT(texunit, coord, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetMultiTexGenivEXT(int texunit, int coord, int pname, long params, long function_pointer); + + public static void glMultiTexParameteriEXT(int texunit, int target, int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexParameteriEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexParameteriEXT(texunit, target, pname, param, function_pointer); + } + static native void nglMultiTexParameteriEXT(int texunit, int target, int pname, int param, long function_pointer); + + public static void glMultiTexParameterEXT(int texunit, int target, int pname, IntBuffer param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexParameterivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(param, 4); + nglMultiTexParameterivEXT(texunit, target, pname, MemoryUtil.getAddress(param), function_pointer); + } + static native void nglMultiTexParameterivEXT(int texunit, int target, int pname, long param, long function_pointer); + + public static void glMultiTexParameterfEXT(int texunit, int target, int pname, float param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexParameterfEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexParameterfEXT(texunit, target, pname, param, function_pointer); + } + static native void nglMultiTexParameterfEXT(int texunit, int target, int pname, float param, long function_pointer); + + public static void glMultiTexParameterEXT(int texunit, int target, int pname, FloatBuffer param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexParameterfvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(param, 4); + nglMultiTexParameterfvEXT(texunit, target, pname, MemoryUtil.getAddress(param), function_pointer); + } + static native void nglMultiTexParameterfvEXT(int texunit, int target, int pname, long param, long function_pointer); + + public static void glMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int width, int border, int format, int type, ByteBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage1DStorage(pixels, format, type, width)); + nglMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int width, int border, int format, int type, DoubleBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage1DStorage(pixels, format, type, width)); + nglMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int width, int border, int format, int type, FloatBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage1DStorage(pixels, format, type, width)); + nglMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int width, int border, int format, int type, IntBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage1DStorage(pixels, format, type, width)); + nglMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int width, int border, int format, int type, ShortBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage1DStorage(pixels, format, type, width)); + nglMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + static native void nglMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int width, int border, int format, int type, long pixels, long function_pointer); + public static void glMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int width, int border, int format, int type, long pixels_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglMultiTexImage1DEXTBO(texunit, target, level, internalformat, width, border, format, type, pixels_buffer_offset, function_pointer); + } + static native void nglMultiTexImage1DEXTBO(int texunit, int target, int level, int internalformat, int width, int border, int format, int type, long pixels_buffer_offset, long function_pointer); + + public static void glMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int width, int height, int border, int format, int type, ByteBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height)); + nglMultiTexImage2DEXT(texunit, target, level, internalformat, width, height, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int width, int height, int border, int format, int type, DoubleBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height)); + nglMultiTexImage2DEXT(texunit, target, level, internalformat, width, height, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int width, int height, int border, int format, int type, FloatBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height)); + nglMultiTexImage2DEXT(texunit, target, level, internalformat, width, height, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int width, int height, int border, int format, int type, IntBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height)); + nglMultiTexImage2DEXT(texunit, target, level, internalformat, width, height, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int width, int height, int border, int format, int type, ShortBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height)); + nglMultiTexImage2DEXT(texunit, target, level, internalformat, width, height, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + static native void nglMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int width, int height, int border, int format, int type, long pixels, long function_pointer); + public static void glMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int width, int height, int border, int format, int type, long pixels_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglMultiTexImage2DEXTBO(texunit, target, level, internalformat, width, height, border, format, type, pixels_buffer_offset, function_pointer); + } + static native void nglMultiTexImage2DEXTBO(int texunit, int target, int level, int internalformat, int width, int height, int border, int format, int type, long pixels_buffer_offset, long function_pointer); + + public static void glMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int width, int format, int type, ByteBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexSubImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, 1, 1)); + nglMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int width, int format, int type, DoubleBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexSubImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, 1, 1)); + nglMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int width, int format, int type, FloatBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexSubImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, 1, 1)); + nglMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int width, int format, int type, IntBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexSubImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, 1, 1)); + nglMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int width, int format, int type, ShortBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexSubImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, 1, 1)); + nglMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + static native void nglMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int width, int format, int type, long pixels, long function_pointer); + public static void glMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int width, int format, int type, long pixels_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexSubImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglMultiTexSubImage1DEXTBO(texunit, target, level, xoffset, width, format, type, pixels_buffer_offset, function_pointer); + } + static native void nglMultiTexSubImage1DEXTBO(int texunit, int target, int level, int xoffset, int width, int format, int type, long pixels_buffer_offset, long function_pointer); + + public static void glMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ByteBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexSubImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, DoubleBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexSubImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, FloatBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexSubImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, IntBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexSubImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ShortBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexSubImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + static native void nglMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, long pixels, long function_pointer); + public static void glMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, long pixels_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexSubImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglMultiTexSubImage2DEXTBO(texunit, target, level, xoffset, yoffset, width, height, format, type, pixels_buffer_offset, function_pointer); + } + static native void nglMultiTexSubImage2DEXTBO(int texunit, int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, long pixels_buffer_offset, long function_pointer); + + public static void glCopyMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int x, int y, int width, int border) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCopyMultiTexImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglCopyMultiTexImage1DEXT(texunit, target, level, internalformat, x, y, width, border, function_pointer); + } + static native void nglCopyMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int x, int y, int width, int border, long function_pointer); + + public static void glCopyMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int x, int y, int width, int height, int border) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCopyMultiTexImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglCopyMultiTexImage2DEXT(texunit, target, level, internalformat, x, y, width, height, border, function_pointer); + } + static native void nglCopyMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int x, int y, int width, int height, int border, long function_pointer); + + public static void glCopyMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int x, int y, int width) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCopyMultiTexSubImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglCopyMultiTexSubImage1DEXT(texunit, target, level, xoffset, x, y, width, function_pointer); + } + static native void nglCopyMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int x, int y, int width, long function_pointer); + + public static void glCopyMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, int x, int y, int width, int height) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCopyMultiTexSubImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglCopyMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, x, y, width, height, function_pointer); + } + static native void nglCopyMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, int x, int y, int width, int height, long function_pointer); + + public static void glGetMultiTexImageEXT(int texunit, int target, int level, int format, int type, ByteBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMultiTexImageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, 1, 1, 1)); + nglGetMultiTexImageEXT(texunit, target, level, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glGetMultiTexImageEXT(int texunit, int target, int level, int format, int type, DoubleBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMultiTexImageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, 1, 1, 1)); + nglGetMultiTexImageEXT(texunit, target, level, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glGetMultiTexImageEXT(int texunit, int target, int level, int format, int type, FloatBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMultiTexImageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, 1, 1, 1)); + nglGetMultiTexImageEXT(texunit, target, level, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glGetMultiTexImageEXT(int texunit, int target, int level, int format, int type, IntBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMultiTexImageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, 1, 1, 1)); + nglGetMultiTexImageEXT(texunit, target, level, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glGetMultiTexImageEXT(int texunit, int target, int level, int format, int type, ShortBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMultiTexImageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, 1, 1, 1)); + nglGetMultiTexImageEXT(texunit, target, level, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + static native void nglGetMultiTexImageEXT(int texunit, int target, int level, int format, int type, long pixels, long function_pointer); + public static void glGetMultiTexImageEXT(int texunit, int target, int level, int format, int type, long pixels_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMultiTexImageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOenabled(caps); + nglGetMultiTexImageEXTBO(texunit, target, level, format, type, pixels_buffer_offset, function_pointer); + } + static native void nglGetMultiTexImageEXTBO(int texunit, int target, int level, int format, int type, long pixels_buffer_offset, long function_pointer); + + public static void glGetMultiTexParameterEXT(int texunit, int target, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMultiTexParameterfvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetMultiTexParameterfvEXT(texunit, target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetMultiTexParameterfvEXT(int texunit, int target, int pname, long params, long function_pointer); + + /** Overloads glGetMultiTexParameterfvEXT. */ + public static float glGetMultiTexParameterfEXT(int texunit, int target, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMultiTexParameterfvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + FloatBuffer params = APIUtil.getBufferFloat(caps); + nglGetMultiTexParameterfvEXT(texunit, target, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetMultiTexParameterEXT(int texunit, int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMultiTexParameterivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetMultiTexParameterivEXT(texunit, target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetMultiTexParameterivEXT(int texunit, int target, int pname, long params, long function_pointer); + + /** Overloads glGetMultiTexParameterivEXT. */ + public static int glGetMultiTexParameteriEXT(int texunit, int target, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMultiTexParameterivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetMultiTexParameterivEXT(texunit, target, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetMultiTexLevelParameterEXT(int texunit, int target, int level, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMultiTexLevelParameterfvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetMultiTexLevelParameterfvEXT(texunit, target, level, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetMultiTexLevelParameterfvEXT(int texunit, int target, int level, int pname, long params, long function_pointer); + + /** Overloads glGetMultiTexLevelParameterfvEXT. */ + public static float glGetMultiTexLevelParameterfEXT(int texunit, int target, int level, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMultiTexLevelParameterfvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + FloatBuffer params = APIUtil.getBufferFloat(caps); + nglGetMultiTexLevelParameterfvEXT(texunit, target, level, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetMultiTexLevelParameterEXT(int texunit, int target, int level, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMultiTexLevelParameterivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetMultiTexLevelParameterivEXT(texunit, target, level, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetMultiTexLevelParameterivEXT(int texunit, int target, int level, int pname, long params, long function_pointer); + + /** Overloads glGetMultiTexLevelParameterivEXT. */ + public static int glGetMultiTexLevelParameteriEXT(int texunit, int target, int level, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMultiTexLevelParameterivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetMultiTexLevelParameterivEXT(texunit, target, level, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glMultiTexImage3DEXT(int texunit, int target, int level, int internalformat, int width, int height, int depth, int border, int format, int type, ByteBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth)); + nglMultiTexImage3DEXT(texunit, target, level, internalformat, width, height, depth, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glMultiTexImage3DEXT(int texunit, int target, int level, int internalformat, int width, int height, int depth, int border, int format, int type, DoubleBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth)); + nglMultiTexImage3DEXT(texunit, target, level, internalformat, width, height, depth, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glMultiTexImage3DEXT(int texunit, int target, int level, int internalformat, int width, int height, int depth, int border, int format, int type, FloatBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth)); + nglMultiTexImage3DEXT(texunit, target, level, internalformat, width, height, depth, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glMultiTexImage3DEXT(int texunit, int target, int level, int internalformat, int width, int height, int depth, int border, int format, int type, IntBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth)); + nglMultiTexImage3DEXT(texunit, target, level, internalformat, width, height, depth, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glMultiTexImage3DEXT(int texunit, int target, int level, int internalformat, int width, int height, int depth, int border, int format, int type, ShortBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth)); + nglMultiTexImage3DEXT(texunit, target, level, internalformat, width, height, depth, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + static native void nglMultiTexImage3DEXT(int texunit, int target, int level, int internalformat, int width, int height, int depth, int border, int format, int type, long pixels, long function_pointer); + public static void glMultiTexImage3DEXT(int texunit, int target, int level, int internalformat, int width, int height, int depth, int border, int format, int type, long pixels_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglMultiTexImage3DEXTBO(texunit, target, level, internalformat, width, height, depth, border, format, type, pixels_buffer_offset, function_pointer); + } + static native void nglMultiTexImage3DEXTBO(int texunit, int target, int level, int internalformat, int width, int height, int depth, int border, int format, int type, long pixels_buffer_offset, long function_pointer); + + public static void glMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, ByteBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexSubImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, depth)); + nglMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, DoubleBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexSubImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, depth)); + nglMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, FloatBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexSubImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, depth)); + nglMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, IntBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexSubImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, depth)); + nglMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, ShortBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexSubImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, depth)); + nglMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + static native void nglMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, long pixels, long function_pointer); + public static void glMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, long pixels_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexSubImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglMultiTexSubImage3DEXTBO(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels_buffer_offset, function_pointer); + } + static native void nglMultiTexSubImage3DEXTBO(int texunit, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, long pixels_buffer_offset, long function_pointer); + + public static void glCopyMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCopyMultiTexSubImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglCopyMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, x, y, width, height, function_pointer); + } + static native void nglCopyMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height, long function_pointer); + + public static void glEnableClientStateIndexedEXT(int array, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEnableClientStateIndexedEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglEnableClientStateIndexedEXT(array, index, function_pointer); + } + static native void nglEnableClientStateIndexedEXT(int array, int index, long function_pointer); + + public static void glDisableClientStateIndexedEXT(int array, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDisableClientStateIndexedEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglDisableClientStateIndexedEXT(array, index, function_pointer); + } + static native void nglDisableClientStateIndexedEXT(int array, int index, long function_pointer); + + public static void glEnableClientStateiEXT(int array, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEnableClientStateiEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglEnableClientStateiEXT(array, index, function_pointer); + } + static native void nglEnableClientStateiEXT(int array, int index, long function_pointer); + + public static void glDisableClientStateiEXT(int array, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDisableClientStateiEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglDisableClientStateiEXT(array, index, function_pointer); + } + static native void nglDisableClientStateiEXT(int array, int index, long function_pointer); + + public static void glGetFloatIndexedEXT(int pname, int index, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetFloatIndexedvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 16); + nglGetFloatIndexedvEXT(pname, index, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetFloatIndexedvEXT(int pname, int index, long params, long function_pointer); + + /** Overloads glGetFloatIndexedvEXT. */ + public static float glGetFloatIndexedEXT(int pname, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetFloatIndexedvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + FloatBuffer params = APIUtil.getBufferFloat(caps); + nglGetFloatIndexedvEXT(pname, index, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetDoubleIndexedEXT(int pname, int index, DoubleBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetDoubleIndexedvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 16); + nglGetDoubleIndexedvEXT(pname, index, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetDoubleIndexedvEXT(int pname, int index, long params, long function_pointer); + + /** Overloads glGetDoubleIndexedvEXT. */ + public static double glGetDoubleIndexedEXT(int pname, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetDoubleIndexedvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + DoubleBuffer params = APIUtil.getBufferDouble(caps); + nglGetDoubleIndexedvEXT(pname, index, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static ByteBuffer glGetPointerIndexedEXT(int pname, int index, long result_size) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPointerIndexedvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + ByteBuffer __result = nglGetPointerIndexedvEXT(pname, index, result_size, function_pointer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + static native ByteBuffer nglGetPointerIndexedvEXT(int pname, int index, long result_size, long function_pointer); + + public static void glGetFloatEXT(int pname, int index, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetFloati_vEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 16); + nglGetFloati_vEXT(pname, index, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetFloati_vEXT(int pname, int index, long params, long function_pointer); + + /** Overloads glGetFloati_vEXT. */ + public static float glGetFloatEXT(int pname, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetFloati_vEXT; + BufferChecks.checkFunctionAddress(function_pointer); + FloatBuffer params = APIUtil.getBufferFloat(caps); + nglGetFloati_vEXT(pname, index, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetDoubleEXT(int pname, int index, DoubleBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetDoublei_vEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 16); + nglGetDoublei_vEXT(pname, index, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetDoublei_vEXT(int pname, int index, long params, long function_pointer); + + /** Overloads glGetDoublei_vEXT. */ + public static double glGetDoubleEXT(int pname, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetDoublei_vEXT; + BufferChecks.checkFunctionAddress(function_pointer); + DoubleBuffer params = APIUtil.getBufferDouble(caps); + nglGetDoublei_vEXT(pname, index, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static ByteBuffer glGetPointerEXT(int pname, int index, long result_size) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPointeri_vEXT; + BufferChecks.checkFunctionAddress(function_pointer); + ByteBuffer __result = nglGetPointeri_vEXT(pname, index, result_size, function_pointer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + static native ByteBuffer nglGetPointeri_vEXT(int pname, int index, long result_size, long function_pointer); + + public static void glEnableIndexedEXT(int cap, int index) { + EXTDrawBuffers2.glEnableIndexedEXT(cap, index); + } + + public static void glDisableIndexedEXT(int cap, int index) { + EXTDrawBuffers2.glDisableIndexedEXT(cap, index); + } + + public static boolean glIsEnabledIndexedEXT(int cap, int index) { + return EXTDrawBuffers2.glIsEnabledIndexedEXT(cap, index); + } + + public static void glGetIntegerIndexedEXT(int pname, int index, IntBuffer params) { + EXTDrawBuffers2.glGetIntegerIndexedEXT(pname, index, params); + } + + /** Overloads glGetIntegerIndexedvEXT. */ + public static int glGetIntegerIndexedEXT(int pname, int index) { + return EXTDrawBuffers2.glGetIntegerIndexedEXT(pname, index); + } + + public static void glGetBooleanIndexedEXT(int pname, int index, ByteBuffer params) { + EXTDrawBuffers2.glGetBooleanIndexedEXT(pname, index, params); + } + + /** Overloads glGetBooleanIndexedvEXT. */ + public static boolean glGetBooleanIndexedEXT(int pname, int index) { + return EXTDrawBuffers2.glGetBooleanIndexedEXT(pname, index); + } + + public static void glNamedProgramStringEXT(int program, int target, int format, ByteBuffer string) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedProgramStringEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(string); + nglNamedProgramStringEXT(program, target, format, string.remaining(), MemoryUtil.getAddress(string), function_pointer); + } + static native void nglNamedProgramStringEXT(int program, int target, int format, int string_len, long string, long function_pointer); + + /** Overloads glNamedProgramStringEXT. */ + public static void glNamedProgramStringEXT(int program, int target, int format, CharSequence string) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedProgramStringEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglNamedProgramStringEXT(program, target, format, string.length(), APIUtil.getBuffer(caps, string), function_pointer); + } + + public static void glNamedProgramLocalParameter4dEXT(int program, int target, int index, double x, double y, double z, double w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedProgramLocalParameter4dEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglNamedProgramLocalParameter4dEXT(program, target, index, x, y, z, w, function_pointer); + } + static native void nglNamedProgramLocalParameter4dEXT(int program, int target, int index, double x, double y, double z, double w, long function_pointer); + + public static void glNamedProgramLocalParameter4EXT(int program, int target, int index, DoubleBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedProgramLocalParameter4dvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglNamedProgramLocalParameter4dvEXT(program, target, index, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglNamedProgramLocalParameter4dvEXT(int program, int target, int index, long params, long function_pointer); + + public static void glNamedProgramLocalParameter4fEXT(int program, int target, int index, float x, float y, float z, float w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedProgramLocalParameter4fEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglNamedProgramLocalParameter4fEXT(program, target, index, x, y, z, w, function_pointer); + } + static native void nglNamedProgramLocalParameter4fEXT(int program, int target, int index, float x, float y, float z, float w, long function_pointer); + + public static void glNamedProgramLocalParameter4EXT(int program, int target, int index, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedProgramLocalParameter4fvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglNamedProgramLocalParameter4fvEXT(program, target, index, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglNamedProgramLocalParameter4fvEXT(int program, int target, int index, long params, long function_pointer); + + public static void glGetNamedProgramLocalParameterEXT(int program, int target, int index, DoubleBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedProgramLocalParameterdvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetNamedProgramLocalParameterdvEXT(program, target, index, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetNamedProgramLocalParameterdvEXT(int program, int target, int index, long params, long function_pointer); + + public static void glGetNamedProgramLocalParameterEXT(int program, int target, int index, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedProgramLocalParameterfvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetNamedProgramLocalParameterfvEXT(program, target, index, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetNamedProgramLocalParameterfvEXT(int program, int target, int index, long params, long function_pointer); + + public static void glGetNamedProgramEXT(int program, int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedProgramivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetNamedProgramivEXT(program, target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetNamedProgramivEXT(int program, int target, int pname, long params, long function_pointer); + + /** Overloads glGetNamedProgramivEXT. */ + public static int glGetNamedProgramEXT(int program, int target, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedProgramivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetNamedProgramivEXT(program, target, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetNamedProgramStringEXT(int program, int target, int pname, ByteBuffer string) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedProgramStringEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(string); + nglGetNamedProgramStringEXT(program, target, pname, MemoryUtil.getAddress(string), function_pointer); + } + static native void nglGetNamedProgramStringEXT(int program, int target, int pname, long string, long function_pointer); + + /** Overloads glGetNamedProgramStringEXT. */ + public static String glGetNamedProgramStringEXT(int program, int target, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedProgramStringEXT; + BufferChecks.checkFunctionAddress(function_pointer); + int programLength = glGetNamedProgramEXT(program, target, ARBProgram.GL_PROGRAM_LENGTH_ARB); + ByteBuffer paramString = APIUtil.getBufferByte(caps, programLength); + nglGetNamedProgramStringEXT(program, target, pname, MemoryUtil.getAddress(paramString), function_pointer); + paramString.limit(programLength); + return APIUtil.getString(caps, paramString); + } + + public static void glCompressedTextureImage3DEXT(int texture, int target, int level, int internalformat, int width, int height, int depth, int border, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTextureImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(data); + nglCompressedTextureImage3DEXT(texture, target, level, internalformat, width, height, depth, border, data.remaining(), MemoryUtil.getAddress(data), function_pointer); + } + static native void nglCompressedTextureImage3DEXT(int texture, int target, int level, int internalformat, int width, int height, int depth, int border, int data_imageSize, long data, long function_pointer); + public static void glCompressedTextureImage3DEXT(int texture, int target, int level, int internalformat, int width, int height, int depth, int border, int data_imageSize, long data_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTextureImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglCompressedTextureImage3DEXTBO(texture, target, level, internalformat, width, height, depth, border, data_imageSize, data_buffer_offset, function_pointer); + } + static native void nglCompressedTextureImage3DEXTBO(int texture, int target, int level, int internalformat, int width, int height, int depth, int border, int data_imageSize, long data_buffer_offset, long function_pointer); + + public static void glCompressedTextureImage2DEXT(int texture, int target, int level, int internalformat, int width, int height, int border, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTextureImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(data); + nglCompressedTextureImage2DEXT(texture, target, level, internalformat, width, height, border, data.remaining(), MemoryUtil.getAddress(data), function_pointer); + } + static native void nglCompressedTextureImage2DEXT(int texture, int target, int level, int internalformat, int width, int height, int border, int data_imageSize, long data, long function_pointer); + public static void glCompressedTextureImage2DEXT(int texture, int target, int level, int internalformat, int width, int height, int border, int data_imageSize, long data_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTextureImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglCompressedTextureImage2DEXTBO(texture, target, level, internalformat, width, height, border, data_imageSize, data_buffer_offset, function_pointer); + } + static native void nglCompressedTextureImage2DEXTBO(int texture, int target, int level, int internalformat, int width, int height, int border, int data_imageSize, long data_buffer_offset, long function_pointer); + + public static void glCompressedTextureImage1DEXT(int texture, int target, int level, int internalformat, int width, int border, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTextureImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(data); + nglCompressedTextureImage1DEXT(texture, target, level, internalformat, width, border, data.remaining(), MemoryUtil.getAddress(data), function_pointer); + } + static native void nglCompressedTextureImage1DEXT(int texture, int target, int level, int internalformat, int width, int border, int data_imageSize, long data, long function_pointer); + public static void glCompressedTextureImage1DEXT(int texture, int target, int level, int internalformat, int width, int border, int data_imageSize, long data_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTextureImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglCompressedTextureImage1DEXTBO(texture, target, level, internalformat, width, border, data_imageSize, data_buffer_offset, function_pointer); + } + static native void nglCompressedTextureImage1DEXTBO(int texture, int target, int level, int internalformat, int width, int border, int data_imageSize, long data_buffer_offset, long function_pointer); + + public static void glCompressedTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTextureSubImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(data); + nglCompressedTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, data.remaining(), MemoryUtil.getAddress(data), function_pointer); + } + static native void nglCompressedTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int data_imageSize, long data, long function_pointer); + public static void glCompressedTextureSubImage3DEXT(int texture, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int data_imageSize, long data_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTextureSubImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglCompressedTextureSubImage3DEXTBO(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, data_imageSize, data_buffer_offset, function_pointer); + } + static native void nglCompressedTextureSubImage3DEXTBO(int texture, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int data_imageSize, long data_buffer_offset, long function_pointer); + + public static void glCompressedTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, int width, int height, int format, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTextureSubImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(data); + nglCompressedTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, data.remaining(), MemoryUtil.getAddress(data), function_pointer); + } + static native void nglCompressedTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, int width, int height, int format, int data_imageSize, long data, long function_pointer); + public static void glCompressedTextureSubImage2DEXT(int texture, int target, int level, int xoffset, int yoffset, int width, int height, int format, int data_imageSize, long data_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTextureSubImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglCompressedTextureSubImage2DEXTBO(texture, target, level, xoffset, yoffset, width, height, format, data_imageSize, data_buffer_offset, function_pointer); + } + static native void nglCompressedTextureSubImage2DEXTBO(int texture, int target, int level, int xoffset, int yoffset, int width, int height, int format, int data_imageSize, long data_buffer_offset, long function_pointer); + + public static void glCompressedTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int width, int format, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTextureSubImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(data); + nglCompressedTextureSubImage1DEXT(texture, target, level, xoffset, width, format, data.remaining(), MemoryUtil.getAddress(data), function_pointer); + } + static native void nglCompressedTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int width, int format, int data_imageSize, long data, long function_pointer); + public static void glCompressedTextureSubImage1DEXT(int texture, int target, int level, int xoffset, int width, int format, int data_imageSize, long data_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTextureSubImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglCompressedTextureSubImage1DEXTBO(texture, target, level, xoffset, width, format, data_imageSize, data_buffer_offset, function_pointer); + } + static native void nglCompressedTextureSubImage1DEXTBO(int texture, int target, int level, int xoffset, int width, int format, int data_imageSize, long data_buffer_offset, long function_pointer); + + public static void glGetCompressedTextureImageEXT(int texture, int target, int level, ByteBuffer img) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetCompressedTextureImageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(img); + nglGetCompressedTextureImageEXT(texture, target, level, MemoryUtil.getAddress(img), function_pointer); + } + public static void glGetCompressedTextureImageEXT(int texture, int target, int level, IntBuffer img) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetCompressedTextureImageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(img); + nglGetCompressedTextureImageEXT(texture, target, level, MemoryUtil.getAddress(img), function_pointer); + } + public static void glGetCompressedTextureImageEXT(int texture, int target, int level, ShortBuffer img) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetCompressedTextureImageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(img); + nglGetCompressedTextureImageEXT(texture, target, level, MemoryUtil.getAddress(img), function_pointer); + } + static native void nglGetCompressedTextureImageEXT(int texture, int target, int level, long img, long function_pointer); + public static void glGetCompressedTextureImageEXT(int texture, int target, int level, long img_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetCompressedTextureImageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOenabled(caps); + nglGetCompressedTextureImageEXTBO(texture, target, level, img_buffer_offset, function_pointer); + } + static native void nglGetCompressedTextureImageEXTBO(int texture, int target, int level, long img_buffer_offset, long function_pointer); + + public static void glCompressedMultiTexImage3DEXT(int texunit, int target, int level, int internalformat, int width, int height, int depth, int border, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedMultiTexImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(data); + nglCompressedMultiTexImage3DEXT(texunit, target, level, internalformat, width, height, depth, border, data.remaining(), MemoryUtil.getAddress(data), function_pointer); + } + static native void nglCompressedMultiTexImage3DEXT(int texunit, int target, int level, int internalformat, int width, int height, int depth, int border, int data_imageSize, long data, long function_pointer); + public static void glCompressedMultiTexImage3DEXT(int texunit, int target, int level, int internalformat, int width, int height, int depth, int border, int data_imageSize, long data_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedMultiTexImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglCompressedMultiTexImage3DEXTBO(texunit, target, level, internalformat, width, height, depth, border, data_imageSize, data_buffer_offset, function_pointer); + } + static native void nglCompressedMultiTexImage3DEXTBO(int texunit, int target, int level, int internalformat, int width, int height, int depth, int border, int data_imageSize, long data_buffer_offset, long function_pointer); + + public static void glCompressedMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int width, int height, int border, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedMultiTexImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(data); + nglCompressedMultiTexImage2DEXT(texunit, target, level, internalformat, width, height, border, data.remaining(), MemoryUtil.getAddress(data), function_pointer); + } + static native void nglCompressedMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int width, int height, int border, int data_imageSize, long data, long function_pointer); + public static void glCompressedMultiTexImage2DEXT(int texunit, int target, int level, int internalformat, int width, int height, int border, int data_imageSize, long data_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedMultiTexImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglCompressedMultiTexImage2DEXTBO(texunit, target, level, internalformat, width, height, border, data_imageSize, data_buffer_offset, function_pointer); + } + static native void nglCompressedMultiTexImage2DEXTBO(int texunit, int target, int level, int internalformat, int width, int height, int border, int data_imageSize, long data_buffer_offset, long function_pointer); + + public static void glCompressedMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int width, int border, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedMultiTexImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(data); + nglCompressedMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, data.remaining(), MemoryUtil.getAddress(data), function_pointer); + } + static native void nglCompressedMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int width, int border, int data_imageSize, long data, long function_pointer); + public static void glCompressedMultiTexImage1DEXT(int texunit, int target, int level, int internalformat, int width, int border, int data_imageSize, long data_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedMultiTexImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglCompressedMultiTexImage1DEXTBO(texunit, target, level, internalformat, width, border, data_imageSize, data_buffer_offset, function_pointer); + } + static native void nglCompressedMultiTexImage1DEXTBO(int texunit, int target, int level, int internalformat, int width, int border, int data_imageSize, long data_buffer_offset, long function_pointer); + + public static void glCompressedMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedMultiTexSubImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(data); + nglCompressedMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, data.remaining(), MemoryUtil.getAddress(data), function_pointer); + } + static native void nglCompressedMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int data_imageSize, long data, long function_pointer); + public static void glCompressedMultiTexSubImage3DEXT(int texunit, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int data_imageSize, long data_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedMultiTexSubImage3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglCompressedMultiTexSubImage3DEXTBO(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, data_imageSize, data_buffer_offset, function_pointer); + } + static native void nglCompressedMultiTexSubImage3DEXTBO(int texunit, int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int data_imageSize, long data_buffer_offset, long function_pointer); + + public static void glCompressedMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, int width, int height, int format, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedMultiTexSubImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(data); + nglCompressedMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, data.remaining(), MemoryUtil.getAddress(data), function_pointer); + } + static native void nglCompressedMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, int width, int height, int format, int data_imageSize, long data, long function_pointer); + public static void glCompressedMultiTexSubImage2DEXT(int texunit, int target, int level, int xoffset, int yoffset, int width, int height, int format, int data_imageSize, long data_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedMultiTexSubImage2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglCompressedMultiTexSubImage2DEXTBO(texunit, target, level, xoffset, yoffset, width, height, format, data_imageSize, data_buffer_offset, function_pointer); + } + static native void nglCompressedMultiTexSubImage2DEXTBO(int texunit, int target, int level, int xoffset, int yoffset, int width, int height, int format, int data_imageSize, long data_buffer_offset, long function_pointer); + + public static void glCompressedMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int width, int format, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedMultiTexSubImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(data); + nglCompressedMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, data.remaining(), MemoryUtil.getAddress(data), function_pointer); + } + static native void nglCompressedMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int width, int format, int data_imageSize, long data, long function_pointer); + public static void glCompressedMultiTexSubImage1DEXT(int texunit, int target, int level, int xoffset, int width, int format, int data_imageSize, long data_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedMultiTexSubImage1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglCompressedMultiTexSubImage1DEXTBO(texunit, target, level, xoffset, width, format, data_imageSize, data_buffer_offset, function_pointer); + } + static native void nglCompressedMultiTexSubImage1DEXTBO(int texunit, int target, int level, int xoffset, int width, int format, int data_imageSize, long data_buffer_offset, long function_pointer); + + public static void glGetCompressedMultiTexImageEXT(int texunit, int target, int level, ByteBuffer img) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetCompressedMultiTexImageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(img); + nglGetCompressedMultiTexImageEXT(texunit, target, level, MemoryUtil.getAddress(img), function_pointer); + } + public static void glGetCompressedMultiTexImageEXT(int texunit, int target, int level, IntBuffer img) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetCompressedMultiTexImageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(img); + nglGetCompressedMultiTexImageEXT(texunit, target, level, MemoryUtil.getAddress(img), function_pointer); + } + public static void glGetCompressedMultiTexImageEXT(int texunit, int target, int level, ShortBuffer img) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetCompressedMultiTexImageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(img); + nglGetCompressedMultiTexImageEXT(texunit, target, level, MemoryUtil.getAddress(img), function_pointer); + } + static native void nglGetCompressedMultiTexImageEXT(int texunit, int target, int level, long img, long function_pointer); + public static void glGetCompressedMultiTexImageEXT(int texunit, int target, int level, long img_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetCompressedMultiTexImageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOenabled(caps); + nglGetCompressedMultiTexImageEXTBO(texunit, target, level, img_buffer_offset, function_pointer); + } + static native void nglGetCompressedMultiTexImageEXTBO(int texunit, int target, int level, long img_buffer_offset, long function_pointer); + + public static void glMatrixLoadTransposeEXT(int matrixMode, FloatBuffer m) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMatrixLoadTransposefEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(m, 16); + nglMatrixLoadTransposefEXT(matrixMode, MemoryUtil.getAddress(m), function_pointer); + } + static native void nglMatrixLoadTransposefEXT(int matrixMode, long m, long function_pointer); + + public static void glMatrixLoadTransposeEXT(int matrixMode, DoubleBuffer m) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMatrixLoadTransposedEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(m, 16); + nglMatrixLoadTransposedEXT(matrixMode, MemoryUtil.getAddress(m), function_pointer); + } + static native void nglMatrixLoadTransposedEXT(int matrixMode, long m, long function_pointer); + + public static void glMatrixMultTransposeEXT(int matrixMode, FloatBuffer m) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMatrixMultTransposefEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(m, 16); + nglMatrixMultTransposefEXT(matrixMode, MemoryUtil.getAddress(m), function_pointer); + } + static native void nglMatrixMultTransposefEXT(int matrixMode, long m, long function_pointer); + + public static void glMatrixMultTransposeEXT(int matrixMode, DoubleBuffer m) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMatrixMultTransposedEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(m, 16); + nglMatrixMultTransposedEXT(matrixMode, MemoryUtil.getAddress(m), function_pointer); + } + static native void nglMatrixMultTransposedEXT(int matrixMode, long m, long function_pointer); + + public static void glNamedBufferDataEXT(int buffer, long data_size, int usage) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedBufferDataEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglNamedBufferDataEXT(buffer, data_size, 0L, usage, function_pointer); + } + public static void glNamedBufferDataEXT(int buffer, ByteBuffer data, int usage) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedBufferDataEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglNamedBufferDataEXT(buffer, data.remaining(), MemoryUtil.getAddress(data), usage, function_pointer); + } + public static void glNamedBufferDataEXT(int buffer, DoubleBuffer data, int usage) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedBufferDataEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglNamedBufferDataEXT(buffer, (data.remaining() << 3), MemoryUtil.getAddress(data), usage, function_pointer); + } + public static void glNamedBufferDataEXT(int buffer, FloatBuffer data, int usage) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedBufferDataEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglNamedBufferDataEXT(buffer, (data.remaining() << 2), MemoryUtil.getAddress(data), usage, function_pointer); + } + public static void glNamedBufferDataEXT(int buffer, IntBuffer data, int usage) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedBufferDataEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglNamedBufferDataEXT(buffer, (data.remaining() << 2), MemoryUtil.getAddress(data), usage, function_pointer); + } + public static void glNamedBufferDataEXT(int buffer, ShortBuffer data, int usage) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedBufferDataEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglNamedBufferDataEXT(buffer, (data.remaining() << 1), MemoryUtil.getAddress(data), usage, function_pointer); + } + static native void nglNamedBufferDataEXT(int buffer, long data_size, long data, int usage, long function_pointer); + + public static void glNamedBufferSubDataEXT(int buffer, long offset, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedBufferSubDataEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglNamedBufferSubDataEXT(buffer, offset, data.remaining(), MemoryUtil.getAddress(data), function_pointer); + } + public static void glNamedBufferSubDataEXT(int buffer, long offset, DoubleBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedBufferSubDataEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglNamedBufferSubDataEXT(buffer, offset, (data.remaining() << 3), MemoryUtil.getAddress(data), function_pointer); + } + public static void glNamedBufferSubDataEXT(int buffer, long offset, FloatBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedBufferSubDataEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglNamedBufferSubDataEXT(buffer, offset, (data.remaining() << 2), MemoryUtil.getAddress(data), function_pointer); + } + public static void glNamedBufferSubDataEXT(int buffer, long offset, IntBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedBufferSubDataEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglNamedBufferSubDataEXT(buffer, offset, (data.remaining() << 2), MemoryUtil.getAddress(data), function_pointer); + } + public static void glNamedBufferSubDataEXT(int buffer, long offset, ShortBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedBufferSubDataEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglNamedBufferSubDataEXT(buffer, offset, (data.remaining() << 1), MemoryUtil.getAddress(data), function_pointer); + } + static native void nglNamedBufferSubDataEXT(int buffer, long offset, long data_size, long data, long function_pointer); + + /** + * glMapNamedBufferEXT maps a GL buffer object to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapNamedBufferEXT like this: + *

+ * ByteBuffer mapped_buffer; mapped_buffer = glMapNamedBufferEXT(..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapNamedBufferEXT(..., ..., mapped_buffer); + *

+ * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + *

+ * The version of this method without an explicit length argument calls glGetNamedBufferParameterEXT internally to + * retrieve the current buffer object size, which may cause a pipeline flush and reduce application performance. + *

+ * The version of this method with an explicit length argument is a fast alternative to the one without. No GL call + * is made to retrieve the buffer object size, so the user is responsible for tracking and using the appropriate length.
+ * Security warning: The length argument should match the buffer object size. Reading from or writing to outside + * the memory region that corresponds to the mapped buffer object will cause native crashes. + *

+ * @param length the length of the mapped memory in bytes. + * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. + *

+ * @return A ByteBuffer representing the mapped buffer memory. + */ + public static ByteBuffer glMapNamedBufferEXT(int buffer, int access, ByteBuffer old_buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMapNamedBufferEXT; + BufferChecks.checkFunctionAddress(function_pointer); + if (old_buffer != null) + BufferChecks.checkDirect(old_buffer); + ByteBuffer __result = nglMapNamedBufferEXT(buffer, access, GLChecks.getNamedBufferObjectSize(caps, buffer), old_buffer, function_pointer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + /** + * glMapNamedBufferEXT maps a GL buffer object to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapNamedBufferEXT like this: + *

+ * ByteBuffer mapped_buffer; mapped_buffer = glMapNamedBufferEXT(..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapNamedBufferEXT(..., ..., mapped_buffer); + *

+ * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + *

+ * The version of this method without an explicit length argument calls glGetNamedBufferParameterEXT internally to + * retrieve the current buffer object size, which may cause a pipeline flush and reduce application performance. + *

+ * The version of this method with an explicit length argument is a fast alternative to the one without. No GL call + * is made to retrieve the buffer object size, so the user is responsible for tracking and using the appropriate length.
+ * Security warning: The length argument should match the buffer object size. Reading from or writing to outside + * the memory region that corresponds to the mapped buffer object will cause native crashes. + *

+ * @param length the length of the mapped memory in bytes. + * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. + *

+ * @return A ByteBuffer representing the mapped buffer memory. + */ + public static ByteBuffer glMapNamedBufferEXT(int buffer, int access, long length, ByteBuffer old_buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMapNamedBufferEXT; + BufferChecks.checkFunctionAddress(function_pointer); + if (old_buffer != null) + BufferChecks.checkDirect(old_buffer); + ByteBuffer __result = nglMapNamedBufferEXT(buffer, access, length, old_buffer, function_pointer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + static native ByteBuffer nglMapNamedBufferEXT(int buffer, int access, long result_size, ByteBuffer old_buffer, long function_pointer); + + public static boolean glUnmapNamedBufferEXT(int buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUnmapNamedBufferEXT; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglUnmapNamedBufferEXT(buffer, function_pointer); + return __result; + } + static native boolean nglUnmapNamedBufferEXT(int buffer, long function_pointer); + + public static void glGetNamedBufferParameterEXT(int buffer, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedBufferParameterivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetNamedBufferParameterivEXT(buffer, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetNamedBufferParameterivEXT(int buffer, int pname, long params, long function_pointer); + + /** Overloads glGetNamedBufferParameterivEXT. */ + public static int glGetNamedBufferParameterEXT(int buffer, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedBufferParameterivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetNamedBufferParameterivEXT(buffer, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static ByteBuffer glGetNamedBufferPointerEXT(int buffer, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedBufferPointervEXT; + BufferChecks.checkFunctionAddress(function_pointer); + ByteBuffer __result = nglGetNamedBufferPointervEXT(buffer, pname, GLChecks.getNamedBufferObjectSize(caps, buffer), function_pointer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + static native ByteBuffer nglGetNamedBufferPointervEXT(int buffer, int pname, long result_size, long function_pointer); + + public static void glGetNamedBufferSubDataEXT(int buffer, long offset, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedBufferSubDataEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglGetNamedBufferSubDataEXT(buffer, offset, data.remaining(), MemoryUtil.getAddress(data), function_pointer); + } + public static void glGetNamedBufferSubDataEXT(int buffer, long offset, DoubleBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedBufferSubDataEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglGetNamedBufferSubDataEXT(buffer, offset, (data.remaining() << 3), MemoryUtil.getAddress(data), function_pointer); + } + public static void glGetNamedBufferSubDataEXT(int buffer, long offset, FloatBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedBufferSubDataEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglGetNamedBufferSubDataEXT(buffer, offset, (data.remaining() << 2), MemoryUtil.getAddress(data), function_pointer); + } + public static void glGetNamedBufferSubDataEXT(int buffer, long offset, IntBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedBufferSubDataEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglGetNamedBufferSubDataEXT(buffer, offset, (data.remaining() << 2), MemoryUtil.getAddress(data), function_pointer); + } + public static void glGetNamedBufferSubDataEXT(int buffer, long offset, ShortBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedBufferSubDataEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglGetNamedBufferSubDataEXT(buffer, offset, (data.remaining() << 1), MemoryUtil.getAddress(data), function_pointer); + } + static native void nglGetNamedBufferSubDataEXT(int buffer, long offset, long data_size, long data, long function_pointer); + + public static void glProgramUniform1fEXT(int program, int location, float v0) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform1fEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform1fEXT(program, location, v0, function_pointer); + } + static native void nglProgramUniform1fEXT(int program, int location, float v0, long function_pointer); + + public static void glProgramUniform2fEXT(int program, int location, float v0, float v1) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform2fEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform2fEXT(program, location, v0, v1, function_pointer); + } + static native void nglProgramUniform2fEXT(int program, int location, float v0, float v1, long function_pointer); + + public static void glProgramUniform3fEXT(int program, int location, float v0, float v1, float v2) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform3fEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform3fEXT(program, location, v0, v1, v2, function_pointer); + } + static native void nglProgramUniform3fEXT(int program, int location, float v0, float v1, float v2, long function_pointer); + + public static void glProgramUniform4fEXT(int program, int location, float v0, float v1, float v2, float v3) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform4fEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform4fEXT(program, location, v0, v1, v2, v3, function_pointer); + } + static native void nglProgramUniform4fEXT(int program, int location, float v0, float v1, float v2, float v3, long function_pointer); + + public static void glProgramUniform1iEXT(int program, int location, int v0) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform1iEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform1iEXT(program, location, v0, function_pointer); + } + static native void nglProgramUniform1iEXT(int program, int location, int v0, long function_pointer); + + public static void glProgramUniform2iEXT(int program, int location, int v0, int v1) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform2iEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform2iEXT(program, location, v0, v1, function_pointer); + } + static native void nglProgramUniform2iEXT(int program, int location, int v0, int v1, long function_pointer); + + public static void glProgramUniform3iEXT(int program, int location, int v0, int v1, int v2) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform3iEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform3iEXT(program, location, v0, v1, v2, function_pointer); + } + static native void nglProgramUniform3iEXT(int program, int location, int v0, int v1, int v2, long function_pointer); + + public static void glProgramUniform4iEXT(int program, int location, int v0, int v1, int v2, int v3) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform4iEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform4iEXT(program, location, v0, v1, v2, v3, function_pointer); + } + static native void nglProgramUniform4iEXT(int program, int location, int v0, int v1, int v2, int v3, long function_pointer); + + public static void glProgramUniform1EXT(int program, int location, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform1fvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform1fvEXT(program, location, value.remaining(), MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform1fvEXT(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform2EXT(int program, int location, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform2fvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform2fvEXT(program, location, value.remaining() >> 1, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform2fvEXT(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform3EXT(int program, int location, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform3fvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform3fvEXT(program, location, value.remaining() / 3, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform3fvEXT(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform4EXT(int program, int location, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform4fvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform4fvEXT(program, location, value.remaining() >> 2, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform4fvEXT(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform1EXT(int program, int location, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform1ivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform1ivEXT(program, location, value.remaining(), MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform1ivEXT(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform2EXT(int program, int location, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform2ivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform2ivEXT(program, location, value.remaining() >> 1, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform2ivEXT(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform3EXT(int program, int location, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform3ivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform3ivEXT(program, location, value.remaining() / 3, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform3ivEXT(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform4EXT(int program, int location, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform4ivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform4ivEXT(program, location, value.remaining() >> 2, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform4ivEXT(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniformMatrix2EXT(int program, int location, boolean transpose, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix2fvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix2fvEXT(program, location, value.remaining() >> 2, transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix2fvEXT(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix3EXT(int program, int location, boolean transpose, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix3fvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix3fvEXT(program, location, value.remaining() / (3 * 3), transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix3fvEXT(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix4EXT(int program, int location, boolean transpose, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix4fvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix4fvEXT(program, location, value.remaining() >> 4, transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix4fvEXT(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix2x3EXT(int program, int location, boolean transpose, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix2x3fvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix2x3fvEXT(program, location, value.remaining() / (2 * 3), transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix2x3fvEXT(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix3x2EXT(int program, int location, boolean transpose, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix3x2fvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix3x2fvEXT(program, location, value.remaining() / (3 * 2), transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix3x2fvEXT(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix2x4EXT(int program, int location, boolean transpose, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix2x4fvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix2x4fvEXT(program, location, value.remaining() >> 3, transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix2x4fvEXT(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix4x2EXT(int program, int location, boolean transpose, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix4x2fvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix4x2fvEXT(program, location, value.remaining() >> 3, transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix4x2fvEXT(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix3x4EXT(int program, int location, boolean transpose, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix3x4fvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix3x4fvEXT(program, location, value.remaining() / (3 * 4), transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix3x4fvEXT(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix4x3EXT(int program, int location, boolean transpose, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix4x3fvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix4x3fvEXT(program, location, value.remaining() / (4 * 3), transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix4x3fvEXT(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glTextureBufferEXT(int texture, int target, int internalformat, int buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureBufferEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglTextureBufferEXT(texture, target, internalformat, buffer, function_pointer); + } + static native void nglTextureBufferEXT(int texture, int target, int internalformat, int buffer, long function_pointer); + + public static void glMultiTexBufferEXT(int texunit, int target, int internalformat, int buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexBufferEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexBufferEXT(texunit, target, internalformat, buffer, function_pointer); + } + static native void nglMultiTexBufferEXT(int texunit, int target, int internalformat, int buffer, long function_pointer); + + public static void glTextureParameterIEXT(int texture, int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureParameterIivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglTextureParameterIivEXT(texture, target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglTextureParameterIivEXT(int texture, int target, int pname, long params, long function_pointer); + + /** Overloads glTextureParameterIivEXT. */ + public static void glTextureParameterIEXT(int texture, int target, int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureParameterIivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglTextureParameterIivEXT(texture, target, pname, APIUtil.getInt(caps, param), function_pointer); + } + + public static void glTextureParameterIuEXT(int texture, int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureParameterIuivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglTextureParameterIuivEXT(texture, target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglTextureParameterIuivEXT(int texture, int target, int pname, long params, long function_pointer); + + /** Overloads glTextureParameterIuivEXT. */ + public static void glTextureParameterIuEXT(int texture, int target, int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureParameterIuivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglTextureParameterIuivEXT(texture, target, pname, APIUtil.getInt(caps, param), function_pointer); + } + + public static void glGetTextureParameterIEXT(int texture, int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTextureParameterIivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetTextureParameterIivEXT(texture, target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetTextureParameterIivEXT(int texture, int target, int pname, long params, long function_pointer); + + /** Overloads glGetTextureParameterIivEXT. */ + public static int glGetTextureParameterIiEXT(int texture, int target, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTextureParameterIivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetTextureParameterIivEXT(texture, target, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetTextureParameterIuEXT(int texture, int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTextureParameterIuivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetTextureParameterIuivEXT(texture, target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetTextureParameterIuivEXT(int texture, int target, int pname, long params, long function_pointer); + + /** Overloads glGetTextureParameterIuivEXT. */ + public static int glGetTextureParameterIuiEXT(int texture, int target, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTextureParameterIuivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetTextureParameterIuivEXT(texture, target, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glMultiTexParameterIEXT(int texunit, int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexParameterIivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglMultiTexParameterIivEXT(texunit, target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglMultiTexParameterIivEXT(int texunit, int target, int pname, long params, long function_pointer); + + /** Overloads glMultiTexParameterIivEXT. */ + public static void glMultiTexParameterIEXT(int texunit, int target, int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexParameterIivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexParameterIivEXT(texunit, target, pname, APIUtil.getInt(caps, param), function_pointer); + } + + public static void glMultiTexParameterIuEXT(int texunit, int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexParameterIuivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglMultiTexParameterIuivEXT(texunit, target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglMultiTexParameterIuivEXT(int texunit, int target, int pname, long params, long function_pointer); + + /** Overloads glMultiTexParameterIuivEXT. */ + public static void glMultiTexParameterIuEXT(int texunit, int target, int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexParameterIuivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexParameterIuivEXT(texunit, target, pname, APIUtil.getInt(caps, param), function_pointer); + } + + public static void glGetMultiTexParameterIEXT(int texunit, int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMultiTexParameterIivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetMultiTexParameterIivEXT(texunit, target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetMultiTexParameterIivEXT(int texunit, int target, int pname, long params, long function_pointer); + + /** Overloads glGetMultiTexParameterIivEXT. */ + public static int glGetMultiTexParameterIiEXT(int texunit, int target, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMultiTexParameterIivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetMultiTexParameterIivEXT(texunit, target, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetMultiTexParameterIuEXT(int texunit, int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMultiTexParameterIuivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetMultiTexParameterIuivEXT(texunit, target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetMultiTexParameterIuivEXT(int texunit, int target, int pname, long params, long function_pointer); + + /** Overloads glGetMultiTexParameterIuivEXT. */ + public static int glGetMultiTexParameterIuiEXT(int texunit, int target, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMultiTexParameterIuivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetMultiTexParameterIuivEXT(texunit, target, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glProgramUniform1uiEXT(int program, int location, int v0) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform1uiEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform1uiEXT(program, location, v0, function_pointer); + } + static native void nglProgramUniform1uiEXT(int program, int location, int v0, long function_pointer); + + public static void glProgramUniform2uiEXT(int program, int location, int v0, int v1) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform2uiEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform2uiEXT(program, location, v0, v1, function_pointer); + } + static native void nglProgramUniform2uiEXT(int program, int location, int v0, int v1, long function_pointer); + + public static void glProgramUniform3uiEXT(int program, int location, int v0, int v1, int v2) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform3uiEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform3uiEXT(program, location, v0, v1, v2, function_pointer); + } + static native void nglProgramUniform3uiEXT(int program, int location, int v0, int v1, int v2, long function_pointer); + + public static void glProgramUniform4uiEXT(int program, int location, int v0, int v1, int v2, int v3) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform4uiEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform4uiEXT(program, location, v0, v1, v2, v3, function_pointer); + } + static native void nglProgramUniform4uiEXT(int program, int location, int v0, int v1, int v2, int v3, long function_pointer); + + public static void glProgramUniform1uEXT(int program, int location, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform1uivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform1uivEXT(program, location, value.remaining(), MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform1uivEXT(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform2uEXT(int program, int location, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform2uivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform2uivEXT(program, location, value.remaining() >> 1, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform2uivEXT(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform3uEXT(int program, int location, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform3uivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform3uivEXT(program, location, value.remaining() / 3, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform3uivEXT(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform4uEXT(int program, int location, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform4uivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform4uivEXT(program, location, value.remaining() >> 2, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform4uivEXT(int program, int location, int value_count, long value, long function_pointer); + + public static void glNamedProgramLocalParameters4EXT(int program, int target, int index, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedProgramLocalParameters4fvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglNamedProgramLocalParameters4fvEXT(program, target, index, params.remaining() >> 2, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglNamedProgramLocalParameters4fvEXT(int program, int target, int index, int params_count, long params, long function_pointer); + + public static void glNamedProgramLocalParameterI4iEXT(int program, int target, int index, int x, int y, int z, int w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedProgramLocalParameterI4iEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglNamedProgramLocalParameterI4iEXT(program, target, index, x, y, z, w, function_pointer); + } + static native void nglNamedProgramLocalParameterI4iEXT(int program, int target, int index, int x, int y, int z, int w, long function_pointer); + + public static void glNamedProgramLocalParameterI4EXT(int program, int target, int index, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedProgramLocalParameterI4ivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglNamedProgramLocalParameterI4ivEXT(program, target, index, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglNamedProgramLocalParameterI4ivEXT(int program, int target, int index, long params, long function_pointer); + + public static void glNamedProgramLocalParametersI4EXT(int program, int target, int index, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedProgramLocalParametersI4ivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglNamedProgramLocalParametersI4ivEXT(program, target, index, params.remaining() >> 2, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglNamedProgramLocalParametersI4ivEXT(int program, int target, int index, int params_count, long params, long function_pointer); + + public static void glNamedProgramLocalParameterI4uiEXT(int program, int target, int index, int x, int y, int z, int w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedProgramLocalParameterI4uiEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglNamedProgramLocalParameterI4uiEXT(program, target, index, x, y, z, w, function_pointer); + } + static native void nglNamedProgramLocalParameterI4uiEXT(int program, int target, int index, int x, int y, int z, int w, long function_pointer); + + public static void glNamedProgramLocalParameterI4uEXT(int program, int target, int index, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedProgramLocalParameterI4uivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglNamedProgramLocalParameterI4uivEXT(program, target, index, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglNamedProgramLocalParameterI4uivEXT(int program, int target, int index, long params, long function_pointer); + + public static void glNamedProgramLocalParametersI4uEXT(int program, int target, int index, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedProgramLocalParametersI4uivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglNamedProgramLocalParametersI4uivEXT(program, target, index, params.remaining() >> 2, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglNamedProgramLocalParametersI4uivEXT(int program, int target, int index, int params_count, long params, long function_pointer); + + public static void glGetNamedProgramLocalParameterIEXT(int program, int target, int index, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedProgramLocalParameterIivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetNamedProgramLocalParameterIivEXT(program, target, index, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetNamedProgramLocalParameterIivEXT(int program, int target, int index, long params, long function_pointer); + + public static void glGetNamedProgramLocalParameterIuEXT(int program, int target, int index, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedProgramLocalParameterIuivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetNamedProgramLocalParameterIuivEXT(program, target, index, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetNamedProgramLocalParameterIuivEXT(int program, int target, int index, long params, long function_pointer); + + public static void glNamedRenderbufferStorageEXT(int renderbuffer, int internalformat, int width, int height) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedRenderbufferStorageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglNamedRenderbufferStorageEXT(renderbuffer, internalformat, width, height, function_pointer); + } + static native void nglNamedRenderbufferStorageEXT(int renderbuffer, int internalformat, int width, int height, long function_pointer); + + public static void glGetNamedRenderbufferParameterEXT(int renderbuffer, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedRenderbufferParameterivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetNamedRenderbufferParameterivEXT(renderbuffer, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetNamedRenderbufferParameterivEXT(int renderbuffer, int pname, long params, long function_pointer); + + /** Overloads glGetNamedRenderbufferParameterivEXT. */ + public static int glGetNamedRenderbufferParameterEXT(int renderbuffer, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedRenderbufferParameterivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetNamedRenderbufferParameterivEXT(renderbuffer, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glNamedRenderbufferStorageMultisampleEXT(int renderbuffer, int samples, int internalformat, int width, int height) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedRenderbufferStorageMultisampleEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglNamedRenderbufferStorageMultisampleEXT(renderbuffer, samples, internalformat, width, height, function_pointer); + } + static native void nglNamedRenderbufferStorageMultisampleEXT(int renderbuffer, int samples, int internalformat, int width, int height, long function_pointer); + + public static void glNamedRenderbufferStorageMultisampleCoverageEXT(int renderbuffer, int coverageSamples, int colorSamples, int internalformat, int width, int height) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedRenderbufferStorageMultisampleCoverageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglNamedRenderbufferStorageMultisampleCoverageEXT(renderbuffer, coverageSamples, colorSamples, internalformat, width, height, function_pointer); + } + static native void nglNamedRenderbufferStorageMultisampleCoverageEXT(int renderbuffer, int coverageSamples, int colorSamples, int internalformat, int width, int height, long function_pointer); + + public static int glCheckNamedFramebufferStatusEXT(int framebuffer, int target) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCheckNamedFramebufferStatusEXT; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglCheckNamedFramebufferStatusEXT(framebuffer, target, function_pointer); + return __result; + } + static native int nglCheckNamedFramebufferStatusEXT(int framebuffer, int target, long function_pointer); + + public static void glNamedFramebufferTexture1DEXT(int framebuffer, int attachment, int textarget, int texture, int level) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedFramebufferTexture1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglNamedFramebufferTexture1DEXT(framebuffer, attachment, textarget, texture, level, function_pointer); + } + static native void nglNamedFramebufferTexture1DEXT(int framebuffer, int attachment, int textarget, int texture, int level, long function_pointer); + + public static void glNamedFramebufferTexture2DEXT(int framebuffer, int attachment, int textarget, int texture, int level) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedFramebufferTexture2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglNamedFramebufferTexture2DEXT(framebuffer, attachment, textarget, texture, level, function_pointer); + } + static native void nglNamedFramebufferTexture2DEXT(int framebuffer, int attachment, int textarget, int texture, int level, long function_pointer); + + public static void glNamedFramebufferTexture3DEXT(int framebuffer, int attachment, int textarget, int texture, int level, int zoffset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedFramebufferTexture3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglNamedFramebufferTexture3DEXT(framebuffer, attachment, textarget, texture, level, zoffset, function_pointer); + } + static native void nglNamedFramebufferTexture3DEXT(int framebuffer, int attachment, int textarget, int texture, int level, int zoffset, long function_pointer); + + public static void glNamedFramebufferRenderbufferEXT(int framebuffer, int attachment, int renderbuffertarget, int renderbuffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedFramebufferRenderbufferEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglNamedFramebufferRenderbufferEXT(framebuffer, attachment, renderbuffertarget, renderbuffer, function_pointer); + } + static native void nglNamedFramebufferRenderbufferEXT(int framebuffer, int attachment, int renderbuffertarget, int renderbuffer, long function_pointer); + + public static void glGetNamedFramebufferAttachmentParameterEXT(int framebuffer, int attachment, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedFramebufferAttachmentParameterivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetNamedFramebufferAttachmentParameterivEXT(framebuffer, attachment, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetNamedFramebufferAttachmentParameterivEXT(int framebuffer, int attachment, int pname, long params, long function_pointer); + + /** Overloads glGetNamedFramebufferAttachmentParameterivEXT. */ + public static int glGetNamedFramebufferAttachmentParameterEXT(int framebuffer, int attachment, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedFramebufferAttachmentParameterivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetNamedFramebufferAttachmentParameterivEXT(framebuffer, attachment, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGenerateTextureMipmapEXT(int texture, int target) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenerateTextureMipmapEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglGenerateTextureMipmapEXT(texture, target, function_pointer); + } + static native void nglGenerateTextureMipmapEXT(int texture, int target, long function_pointer); + + public static void glGenerateMultiTexMipmapEXT(int texunit, int target) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenerateMultiTexMipmapEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglGenerateMultiTexMipmapEXT(texunit, target, function_pointer); + } + static native void nglGenerateMultiTexMipmapEXT(int texunit, int target, long function_pointer); + + public static void glFramebufferDrawBufferEXT(int framebuffer, int mode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFramebufferDrawBufferEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglFramebufferDrawBufferEXT(framebuffer, mode, function_pointer); + } + static native void nglFramebufferDrawBufferEXT(int framebuffer, int mode, long function_pointer); + + public static void glFramebufferDrawBuffersEXT(int framebuffer, IntBuffer bufs) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFramebufferDrawBuffersEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(bufs); + nglFramebufferDrawBuffersEXT(framebuffer, bufs.remaining(), MemoryUtil.getAddress(bufs), function_pointer); + } + static native void nglFramebufferDrawBuffersEXT(int framebuffer, int bufs_n, long bufs, long function_pointer); + + public static void glFramebufferReadBufferEXT(int framebuffer, int mode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFramebufferReadBufferEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglFramebufferReadBufferEXT(framebuffer, mode, function_pointer); + } + static native void nglFramebufferReadBufferEXT(int framebuffer, int mode, long function_pointer); + + public static void glGetFramebufferParameterEXT(int framebuffer, int pname, IntBuffer param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetFramebufferParameterivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(param, 4); + nglGetFramebufferParameterivEXT(framebuffer, pname, MemoryUtil.getAddress(param), function_pointer); + } + static native void nglGetFramebufferParameterivEXT(int framebuffer, int pname, long param, long function_pointer); + + /** Overloads glGetFramebufferParameterivEXT. */ + public static int glGetFramebufferParameterEXT(int framebuffer, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetFramebufferParameterivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer param = APIUtil.getBufferInt(caps); + nglGetFramebufferParameterivEXT(framebuffer, pname, MemoryUtil.getAddress(param), function_pointer); + return param.get(0); + } + + public static void glNamedCopyBufferSubDataEXT(int readBuffer, int writeBuffer, long readoffset, long writeoffset, long size) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedCopyBufferSubDataEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglNamedCopyBufferSubDataEXT(readBuffer, writeBuffer, readoffset, writeoffset, size, function_pointer); + } + static native void nglNamedCopyBufferSubDataEXT(int readBuffer, int writeBuffer, long readoffset, long writeoffset, long size, long function_pointer); + + public static void glNamedFramebufferTextureEXT(int framebuffer, int attachment, int texture, int level) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedFramebufferTextureEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglNamedFramebufferTextureEXT(framebuffer, attachment, texture, level, function_pointer); + } + static native void nglNamedFramebufferTextureEXT(int framebuffer, int attachment, int texture, int level, long function_pointer); + + public static void glNamedFramebufferTextureLayerEXT(int framebuffer, int attachment, int texture, int level, int layer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedFramebufferTextureLayerEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglNamedFramebufferTextureLayerEXT(framebuffer, attachment, texture, level, layer, function_pointer); + } + static native void nglNamedFramebufferTextureLayerEXT(int framebuffer, int attachment, int texture, int level, int layer, long function_pointer); + + public static void glNamedFramebufferTextureFaceEXT(int framebuffer, int attachment, int texture, int level, int face) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNamedFramebufferTextureFaceEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglNamedFramebufferTextureFaceEXT(framebuffer, attachment, texture, level, face, function_pointer); + } + static native void nglNamedFramebufferTextureFaceEXT(int framebuffer, int attachment, int texture, int level, int face, long function_pointer); + + public static void glTextureRenderbufferEXT(int texture, int target, int renderbuffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureRenderbufferEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglTextureRenderbufferEXT(texture, target, renderbuffer, function_pointer); + } + static native void nglTextureRenderbufferEXT(int texture, int target, int renderbuffer, long function_pointer); + + public static void glMultiTexRenderbufferEXT(int texunit, int target, int renderbuffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexRenderbufferEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexRenderbufferEXT(texunit, target, renderbuffer, function_pointer); + } + static native void nglMultiTexRenderbufferEXT(int texunit, int target, int renderbuffer, long function_pointer); + + public static void glVertexArrayVertexOffsetEXT(int vaobj, int buffer, int size, int type, int stride, long offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexArrayVertexOffsetEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexArrayVertexOffsetEXT(vaobj, buffer, size, type, stride, offset, function_pointer); + } + static native void nglVertexArrayVertexOffsetEXT(int vaobj, int buffer, int size, int type, int stride, long offset, long function_pointer); + + public static void glVertexArrayColorOffsetEXT(int vaobj, int buffer, int size, int type, int stride, long offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexArrayColorOffsetEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexArrayColorOffsetEXT(vaobj, buffer, size, type, stride, offset, function_pointer); + } + static native void nglVertexArrayColorOffsetEXT(int vaobj, int buffer, int size, int type, int stride, long offset, long function_pointer); + + public static void glVertexArrayEdgeFlagOffsetEXT(int vaobj, int buffer, int stride, long offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexArrayEdgeFlagOffsetEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexArrayEdgeFlagOffsetEXT(vaobj, buffer, stride, offset, function_pointer); + } + static native void nglVertexArrayEdgeFlagOffsetEXT(int vaobj, int buffer, int stride, long offset, long function_pointer); + + public static void glVertexArrayIndexOffsetEXT(int vaobj, int buffer, int type, int stride, long offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexArrayIndexOffsetEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexArrayIndexOffsetEXT(vaobj, buffer, type, stride, offset, function_pointer); + } + static native void nglVertexArrayIndexOffsetEXT(int vaobj, int buffer, int type, int stride, long offset, long function_pointer); + + public static void glVertexArrayNormalOffsetEXT(int vaobj, int buffer, int type, int stride, long offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexArrayNormalOffsetEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexArrayNormalOffsetEXT(vaobj, buffer, type, stride, offset, function_pointer); + } + static native void nglVertexArrayNormalOffsetEXT(int vaobj, int buffer, int type, int stride, long offset, long function_pointer); + + public static void glVertexArrayTexCoordOffsetEXT(int vaobj, int buffer, int size, int type, int stride, long offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexArrayTexCoordOffsetEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexArrayTexCoordOffsetEXT(vaobj, buffer, size, type, stride, offset, function_pointer); + } + static native void nglVertexArrayTexCoordOffsetEXT(int vaobj, int buffer, int size, int type, int stride, long offset, long function_pointer); + + public static void glVertexArrayMultiTexCoordOffsetEXT(int vaobj, int buffer, int texunit, int size, int type, int stride, long offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexArrayMultiTexCoordOffsetEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexArrayMultiTexCoordOffsetEXT(vaobj, buffer, texunit, size, type, stride, offset, function_pointer); + } + static native void nglVertexArrayMultiTexCoordOffsetEXT(int vaobj, int buffer, int texunit, int size, int type, int stride, long offset, long function_pointer); + + public static void glVertexArrayFogCoordOffsetEXT(int vaobj, int buffer, int type, int stride, long offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexArrayFogCoordOffsetEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexArrayFogCoordOffsetEXT(vaobj, buffer, type, stride, offset, function_pointer); + } + static native void nglVertexArrayFogCoordOffsetEXT(int vaobj, int buffer, int type, int stride, long offset, long function_pointer); + + public static void glVertexArraySecondaryColorOffsetEXT(int vaobj, int buffer, int size, int type, int stride, long offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexArraySecondaryColorOffsetEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexArraySecondaryColorOffsetEXT(vaobj, buffer, size, type, stride, offset, function_pointer); + } + static native void nglVertexArraySecondaryColorOffsetEXT(int vaobj, int buffer, int size, int type, int stride, long offset, long function_pointer); + + public static void glVertexArrayVertexAttribOffsetEXT(int vaobj, int buffer, int index, int size, int type, boolean normalized, int stride, long offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexArrayVertexAttribOffsetEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexArrayVertexAttribOffsetEXT(vaobj, buffer, index, size, type, normalized, stride, offset, function_pointer); + } + static native void nglVertexArrayVertexAttribOffsetEXT(int vaobj, int buffer, int index, int size, int type, boolean normalized, int stride, long offset, long function_pointer); + + public static void glVertexArrayVertexAttribIOffsetEXT(int vaobj, int buffer, int index, int size, int type, int stride, long offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexArrayVertexAttribIOffsetEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexArrayVertexAttribIOffsetEXT(vaobj, buffer, index, size, type, stride, offset, function_pointer); + } + static native void nglVertexArrayVertexAttribIOffsetEXT(int vaobj, int buffer, int index, int size, int type, int stride, long offset, long function_pointer); + + public static void glEnableVertexArrayEXT(int vaobj, int array) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEnableVertexArrayEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglEnableVertexArrayEXT(vaobj, array, function_pointer); + } + static native void nglEnableVertexArrayEXT(int vaobj, int array, long function_pointer); + + public static void glDisableVertexArrayEXT(int vaobj, int array) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDisableVertexArrayEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglDisableVertexArrayEXT(vaobj, array, function_pointer); + } + static native void nglDisableVertexArrayEXT(int vaobj, int array, long function_pointer); + + public static void glEnableVertexArrayAttribEXT(int vaobj, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEnableVertexArrayAttribEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglEnableVertexArrayAttribEXT(vaobj, index, function_pointer); + } + static native void nglEnableVertexArrayAttribEXT(int vaobj, int index, long function_pointer); + + public static void glDisableVertexArrayAttribEXT(int vaobj, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDisableVertexArrayAttribEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglDisableVertexArrayAttribEXT(vaobj, index, function_pointer); + } + static native void nglDisableVertexArrayAttribEXT(int vaobj, int index, long function_pointer); + + public static void glGetVertexArrayIntegerEXT(int vaobj, int pname, IntBuffer param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexArrayIntegervEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(param, 16); + nglGetVertexArrayIntegervEXT(vaobj, pname, MemoryUtil.getAddress(param), function_pointer); + } + static native void nglGetVertexArrayIntegervEXT(int vaobj, int pname, long param, long function_pointer); + + /** Overloads glGetVertexArrayIntegervEXT. */ + public static int glGetVertexArrayIntegerEXT(int vaobj, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexArrayIntegervEXT; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer param = APIUtil.getBufferInt(caps); + nglGetVertexArrayIntegervEXT(vaobj, pname, MemoryUtil.getAddress(param), function_pointer); + return param.get(0); + } + + public static ByteBuffer glGetVertexArrayPointerEXT(int vaobj, int pname, long result_size) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexArrayPointervEXT; + BufferChecks.checkFunctionAddress(function_pointer); + ByteBuffer __result = nglGetVertexArrayPointervEXT(vaobj, pname, result_size, function_pointer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + static native ByteBuffer nglGetVertexArrayPointervEXT(int vaobj, int pname, long result_size, long function_pointer); + + public static void glGetVertexArrayIntegerEXT(int vaobj, int index, int pname, IntBuffer param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexArrayIntegeri_vEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(param, 16); + nglGetVertexArrayIntegeri_vEXT(vaobj, index, pname, MemoryUtil.getAddress(param), function_pointer); + } + static native void nglGetVertexArrayIntegeri_vEXT(int vaobj, int index, int pname, long param, long function_pointer); + + /** Overloads glGetVertexArrayIntegeri_vEXT. */ + public static int glGetVertexArrayIntegeriEXT(int vaobj, int index, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexArrayIntegeri_vEXT; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer param = APIUtil.getBufferInt(caps); + nglGetVertexArrayIntegeri_vEXT(vaobj, index, pname, MemoryUtil.getAddress(param), function_pointer); + return param.get(0); + } + + public static ByteBuffer glGetVertexArrayPointeri_EXT(int vaobj, int index, int pname, long result_size) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexArrayPointeri_vEXT; + BufferChecks.checkFunctionAddress(function_pointer); + ByteBuffer __result = nglGetVertexArrayPointeri_vEXT(vaobj, index, pname, result_size, function_pointer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + static native ByteBuffer nglGetVertexArrayPointeri_vEXT(int vaobj, int index, int pname, long result_size, long function_pointer); + + /** + * glMapNamedBufferRangeEXT maps a GL buffer object range to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapNamedBufferRangeEXT like this: + *

+ * ByteBuffer mapped_buffer; mapped_buffer = glMapNamedBufferRangeEXT(..., ..., ..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapNamedBufferRangeEXT(..., ..., ..., ..., mapped_buffer); + *

+ * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + *

+ * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. + *

+ * @return A ByteBuffer representing the mapped buffer memory. + */ + public static ByteBuffer glMapNamedBufferRangeEXT(int buffer, long offset, long length, int access, ByteBuffer old_buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMapNamedBufferRangeEXT; + BufferChecks.checkFunctionAddress(function_pointer); + if (old_buffer != null) + BufferChecks.checkDirect(old_buffer); + ByteBuffer __result = nglMapNamedBufferRangeEXT(buffer, offset, length, access, old_buffer, function_pointer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + static native ByteBuffer nglMapNamedBufferRangeEXT(int buffer, long offset, long length, int access, ByteBuffer old_buffer, long function_pointer); + + public static void glFlushMappedNamedBufferRangeEXT(int buffer, long offset, long length) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFlushMappedNamedBufferRangeEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglFlushMappedNamedBufferRangeEXT(buffer, offset, length, function_pointer); + } + static native void nglFlushMappedNamedBufferRangeEXT(int buffer, long offset, long length, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTDrawBuffers2.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTDrawBuffers2.java new file mode 100644 index 0000000..ba2b9df --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTDrawBuffers2.java @@ -0,0 +1,82 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTDrawBuffers2 { + + private EXTDrawBuffers2() {} + + public static void glColorMaskIndexedEXT(int buf, boolean r, boolean g, boolean b, boolean a) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorMaskIndexedEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglColorMaskIndexedEXT(buf, r, g, b, a, function_pointer); + } + static native void nglColorMaskIndexedEXT(int buf, boolean r, boolean g, boolean b, boolean a, long function_pointer); + + public static void glGetBooleanIndexedEXT(int value, int index, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetBooleanIndexedvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(data, 4); + nglGetBooleanIndexedvEXT(value, index, MemoryUtil.getAddress(data), function_pointer); + } + static native void nglGetBooleanIndexedvEXT(int value, int index, long data, long function_pointer); + + /** Overloads glGetBooleanIndexedvEXT. */ + public static boolean glGetBooleanIndexedEXT(int value, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetBooleanIndexedvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + ByteBuffer data = APIUtil.getBufferByte(caps, 1); + nglGetBooleanIndexedvEXT(value, index, MemoryUtil.getAddress(data), function_pointer); + return data.get(0) == 1; + } + + public static void glGetIntegerIndexedEXT(int value, int index, IntBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetIntegerIndexedvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(data, 4); + nglGetIntegerIndexedvEXT(value, index, MemoryUtil.getAddress(data), function_pointer); + } + static native void nglGetIntegerIndexedvEXT(int value, int index, long data, long function_pointer); + + /** Overloads glGetIntegerIndexedvEXT. */ + public static int glGetIntegerIndexedEXT(int value, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetIntegerIndexedvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer data = APIUtil.getBufferInt(caps); + nglGetIntegerIndexedvEXT(value, index, MemoryUtil.getAddress(data), function_pointer); + return data.get(0); + } + + public static void glEnableIndexedEXT(int target, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEnableIndexedEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglEnableIndexedEXT(target, index, function_pointer); + } + static native void nglEnableIndexedEXT(int target, int index, long function_pointer); + + public static void glDisableIndexedEXT(int target, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDisableIndexedEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglDisableIndexedEXT(target, index, function_pointer); + } + static native void nglDisableIndexedEXT(int target, int index, long function_pointer); + + public static boolean glIsEnabledIndexedEXT(int target, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsEnabledIndexedEXT; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsEnabledIndexedEXT(target, index, function_pointer); + return __result; + } + static native boolean nglIsEnabledIndexedEXT(int target, int index, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTDrawInstanced.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTDrawInstanced.java new file mode 100644 index 0000000..72e7601 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTDrawInstanced.java @@ -0,0 +1,53 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTDrawInstanced { + + private EXTDrawInstanced() {} + + public static void glDrawArraysInstancedEXT(int mode, int first, int count, int primcount) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawArraysInstancedEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglDrawArraysInstancedEXT(mode, first, count, primcount, function_pointer); + } + static native void nglDrawArraysInstancedEXT(int mode, int first, int count, int primcount, long function_pointer); + + public static void glDrawElementsInstancedEXT(int mode, ByteBuffer indices, int primcount) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsInstancedEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawElementsInstancedEXT(mode, indices.remaining(), GL11.GL_UNSIGNED_BYTE, MemoryUtil.getAddress(indices), primcount, function_pointer); + } + public static void glDrawElementsInstancedEXT(int mode, IntBuffer indices, int primcount) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsInstancedEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawElementsInstancedEXT(mode, indices.remaining(), GL11.GL_UNSIGNED_INT, MemoryUtil.getAddress(indices), primcount, function_pointer); + } + public static void glDrawElementsInstancedEXT(int mode, ShortBuffer indices, int primcount) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsInstancedEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawElementsInstancedEXT(mode, indices.remaining(), GL11.GL_UNSIGNED_SHORT, MemoryUtil.getAddress(indices), primcount, function_pointer); + } + static native void nglDrawElementsInstancedEXT(int mode, int indices_count, int type, long indices, int primcount, long function_pointer); + public static void glDrawElementsInstancedEXT(int mode, int indices_count, int type, long indices_buffer_offset, int primcount) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsInstancedEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOenabled(caps); + nglDrawElementsInstancedEXTBO(mode, indices_count, type, indices_buffer_offset, primcount, function_pointer); + } + static native void nglDrawElementsInstancedEXTBO(int mode, int indices_count, int type, long indices_buffer_offset, int primcount, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTDrawRangeElements.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTDrawRangeElements.java new file mode 100644 index 0000000..4b2d792 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTDrawRangeElements.java @@ -0,0 +1,48 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTDrawRangeElements { + + public static final int GL_MAX_ELEMENTS_VERTICES_EXT = 0x80E8, + GL_MAX_ELEMENTS_INDICES_EXT = 0x80E9; + + private EXTDrawRangeElements() {} + + public static void glDrawRangeElementsEXT(int mode, int start, int end, ByteBuffer pIndices) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawRangeElementsEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(pIndices); + nglDrawRangeElementsEXT(mode, start, end, pIndices.remaining(), GL11.GL_UNSIGNED_BYTE, MemoryUtil.getAddress(pIndices), function_pointer); + } + public static void glDrawRangeElementsEXT(int mode, int start, int end, IntBuffer pIndices) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawRangeElementsEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(pIndices); + nglDrawRangeElementsEXT(mode, start, end, pIndices.remaining(), GL11.GL_UNSIGNED_INT, MemoryUtil.getAddress(pIndices), function_pointer); + } + public static void glDrawRangeElementsEXT(int mode, int start, int end, ShortBuffer pIndices) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawRangeElementsEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(pIndices); + nglDrawRangeElementsEXT(mode, start, end, pIndices.remaining(), GL11.GL_UNSIGNED_SHORT, MemoryUtil.getAddress(pIndices), function_pointer); + } + static native void nglDrawRangeElementsEXT(int mode, int start, int end, int pIndices_count, int type, long pIndices, long function_pointer); + public static void glDrawRangeElementsEXT(int mode, int start, int end, int pIndices_count, int type, long pIndices_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawRangeElementsEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOenabled(caps); + nglDrawRangeElementsEXTBO(mode, start, end, pIndices_count, type, pIndices_buffer_offset, function_pointer); + } + static native void nglDrawRangeElementsEXTBO(int mode, int start, int end, int pIndices_count, int type, long pIndices_buffer_offset, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTFogCoord.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTFogCoord.java new file mode 100644 index 0000000..87bcee4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTFogCoord.java @@ -0,0 +1,64 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTFogCoord { + + public static final int GL_FOG_COORDINATE_SOURCE_EXT = 0x8450, + GL_FOG_COORDINATE_EXT = 0x8451, + GL_FRAGMENT_DEPTH_EXT = 0x8452, + GL_CURRENT_FOG_COORDINATE_EXT = 0x8453, + GL_FOG_COORDINATE_ARRAY_TYPE_EXT = 0x8454, + GL_FOG_COORDINATE_ARRAY_STRIDE_EXT = 0x8455, + GL_FOG_COORDINATE_ARRAY_POINTER_EXT = 0x8456, + GL_FOG_COORDINATE_ARRAY_EXT = 0x8457; + + private EXTFogCoord() {} + + public static void glFogCoordfEXT(float coord) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFogCoordfEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglFogCoordfEXT(coord, function_pointer); + } + static native void nglFogCoordfEXT(float coord, long function_pointer); + + public static void glFogCoorddEXT(double coord) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFogCoorddEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglFogCoorddEXT(coord, function_pointer); + } + static native void nglFogCoorddEXT(double coord, long function_pointer); + + public static void glFogCoordPointerEXT(int stride, DoubleBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFogCoordPointerEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(data); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).EXT_fog_coord_glFogCoordPointerEXT_data = data; + nglFogCoordPointerEXT(GL11.GL_DOUBLE, stride, MemoryUtil.getAddress(data), function_pointer); + } + public static void glFogCoordPointerEXT(int stride, FloatBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFogCoordPointerEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(data); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).EXT_fog_coord_glFogCoordPointerEXT_data = data; + nglFogCoordPointerEXT(GL11.GL_FLOAT, stride, MemoryUtil.getAddress(data), function_pointer); + } + static native void nglFogCoordPointerEXT(int type, int stride, long data, long function_pointer); + public static void glFogCoordPointerEXT(int type, int stride, long data_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFogCoordPointerEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOenabled(caps); + nglFogCoordPointerEXTBO(type, stride, data_buffer_offset, function_pointer); + } + static native void nglFogCoordPointerEXTBO(int type, int stride, long data_buffer_offset, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTFramebufferBlit.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTFramebufferBlit.java new file mode 100644 index 0000000..d7e8e1d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTFramebufferBlit.java @@ -0,0 +1,51 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTFramebufferBlit { + + /** + * Accepted by the <target> parameter of BindFramebufferEXT, + * CheckFramebufferStatusEXT, FramebufferTexture{1D|2D|3D}EXT, + * FramebufferRenderbufferEXT, and + * GetFramebufferAttachmentParameterivEXT. + */ + public static final int GL_READ_FRAMEBUFFER_EXT = 0x8CA8, + GL_DRAW_FRAMEBUFFER_EXT = 0x8CA9; + + /** + * Accepted by the <pname> parameters of GetIntegerv, GetFloatv, and GetDoublev. + */ + public static final int GL_DRAW_FRAMEBUFFER_BINDING_EXT = 0x8CA6, + GL_READ_FRAMEBUFFER_BINDING_EXT = 0x8CAA; + + private EXTFramebufferBlit() {} + + /** + * Transfers a rectangle of pixel values from one + * region of the read framebuffer to another in the draw framebuffer. + * <mask> is the bitwise OR of a number of values indicating which + * buffers are to be copied. The values are COLOR_BUFFER_BIT, + * DEPTH_BUFFER_BIT, and STENCIL_BUFFER_BIT. + * The pixels corresponding to these buffers are + * copied from the source rectangle, bound by the locations (srcX0, + * srcY0) and (srcX1, srcY1) inclusive, to the destination rectangle, + * bound by the locations (dstX0, dstY0) and (dstX1, dstY1) + * inclusive. + * If the source and destination rectangle dimensions do not match, + * the source image is stretched to fit the destination + * rectangle. <filter> must be LINEAR or NEAREST and specifies the + * method of interpolation to be applied if the image is + * stretched. + */ + public static void glBlitFramebufferEXT(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, int mask, int filter) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBlitFramebufferEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglBlitFramebufferEXT(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter, function_pointer); + } + static native void nglBlitFramebufferEXT(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, int mask, int filter, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTFramebufferMultisample.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTFramebufferMultisample.java new file mode 100644 index 0000000..8bb3a29 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTFramebufferMultisample.java @@ -0,0 +1,39 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTFramebufferMultisample { + + /** + * Accepted by the <pname> parameter of GetRenderbufferParameterivEXT. + */ + public static final int GL_RENDERBUFFER_SAMPLES_EXT = 0x8CAB; + + /** + * Returned by CheckFramebufferStatusEXT. + */ + public static final int GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT = 0x8D56; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev. + */ + public static final int GL_MAX_SAMPLES_EXT = 0x8D57; + + private EXTFramebufferMultisample() {} + + /** + * Establishes the data storage, format, dimensions, and number of + * samples of a renderbuffer object's image. + */ + public static void glRenderbufferStorageMultisampleEXT(int target, int samples, int internalformat, int width, int height) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glRenderbufferStorageMultisampleEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglRenderbufferStorageMultisampleEXT(target, samples, internalformat, width, height, function_pointer); + } + static native void nglRenderbufferStorageMultisampleEXT(int target, int samples, int internalformat, int width, int height, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTFramebufferMultisampleBlitScaled.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTFramebufferMultisampleBlitScaled.java new file mode 100644 index 0000000..f742832 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTFramebufferMultisampleBlitScaled.java @@ -0,0 +1,17 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTFramebufferMultisampleBlitScaled { + + /** + * Accepted by the <filter> parameter of BlitFramebuffer: + */ + public static final int GL_SCALED_RESOLVE_FASTEST_EXT = 0x90BA, + GL_SCALED_RESOLVE_NICEST_EXT = 0x90BB; + + private EXTFramebufferMultisampleBlitScaled() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTFramebufferObject.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTFramebufferObject.java new file mode 100644 index 0000000..e3957ce --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTFramebufferObject.java @@ -0,0 +1,327 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTFramebufferObject { + + /** + * Accepted by the <target> parameter of BindFramebufferEXT, + * CheckFramebufferStatusEXT, FramebufferTexture{1D|2D|3D}EXT, and + * FramebufferRenderbufferEXT: + */ + public static final int GL_FRAMEBUFFER_EXT = 0x8D40; + + /** + * Accepted by the <target> parameter of BindRenderbufferEXT, + * RenderbufferStorageEXT, and GetRenderbufferParameterivEXT, and + * returned by GetFramebufferAttachmentParameterivEXT: + */ + public static final int GL_RENDERBUFFER_EXT = 0x8D41; + + /** + * Accepted by the <internalformat> parameter of + * RenderbufferStorageEXT: + */ + public static final int GL_STENCIL_INDEX1_EXT = 0x8D46, + GL_STENCIL_INDEX4_EXT = 0x8D47, + GL_STENCIL_INDEX8_EXT = 0x8D48, + GL_STENCIL_INDEX16_EXT = 0x8D49; + + /** + * Accepted by the <pname> parameter of GetRenderbufferParameterivEXT: + */ + public static final int GL_RENDERBUFFER_WIDTH_EXT = 0x8D42, + GL_RENDERBUFFER_HEIGHT_EXT = 0x8D43, + GL_RENDERBUFFER_INTERNAL_FORMAT_EXT = 0x8D44, + GL_RENDERBUFFER_RED_SIZE_EXT = 0x8D50, + GL_RENDERBUFFER_GREEN_SIZE_EXT = 0x8D51, + GL_RENDERBUFFER_BLUE_SIZE_EXT = 0x8D52, + GL_RENDERBUFFER_ALPHA_SIZE_EXT = 0x8D53, + GL_RENDERBUFFER_DEPTH_SIZE_EXT = 0x8D54, + GL_RENDERBUFFER_STENCIL_SIZE_EXT = 0x8D55; + + /** + * Accepted by the <pname> parameter of + * GetFramebufferAttachmentParameterivEXT: + */ + public static final int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT = 0x8CD0, + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT = 0x8CD1, + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT = 0x8CD2, + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT = 0x8CD3, + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT = 0x8CD4; + + /** + * Accepted by the <attachment> parameter of + * FramebufferTexture{1D|2D|3D}EXT, FramebufferRenderbufferEXT, and + * GetFramebufferAttachmentParameterivEXT + */ + public static final int GL_COLOR_ATTACHMENT0_EXT = 0x8CE0, + GL_COLOR_ATTACHMENT1_EXT = 0x8CE1, + GL_COLOR_ATTACHMENT2_EXT = 0x8CE2, + GL_COLOR_ATTACHMENT3_EXT = 0x8CE3, + GL_COLOR_ATTACHMENT4_EXT = 0x8CE4, + GL_COLOR_ATTACHMENT5_EXT = 0x8CE5, + GL_COLOR_ATTACHMENT6_EXT = 0x8CE6, + GL_COLOR_ATTACHMENT7_EXT = 0x8CE7, + GL_COLOR_ATTACHMENT8_EXT = 0x8CE8, + GL_COLOR_ATTACHMENT9_EXT = 0x8CE9, + GL_COLOR_ATTACHMENT10_EXT = 0x8CEA, + GL_COLOR_ATTACHMENT11_EXT = 0x8CEB, + GL_COLOR_ATTACHMENT12_EXT = 0x8CEC, + GL_COLOR_ATTACHMENT13_EXT = 0x8CED, + GL_COLOR_ATTACHMENT14_EXT = 0x8CEE, + GL_COLOR_ATTACHMENT15_EXT = 0x8CEF, + GL_DEPTH_ATTACHMENT_EXT = 0x8D00, + GL_STENCIL_ATTACHMENT_EXT = 0x8D20; + + /** + * Returned by CheckFramebufferStatusEXT(): + */ + public static final int GL_FRAMEBUFFER_COMPLETE_EXT = 0x8CD5, + GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT = 0x8CD6, + GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT = 0x8CD7, + GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT = 0x8CD9, + GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT = 0x8CDA, + GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT = 0x8CDB, + GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT = 0x8CDC, + GL_FRAMEBUFFER_UNSUPPORTED_EXT = 0x8CDD; + + /** + * Accepted by GetIntegerv(): + */ + public static final int GL_FRAMEBUFFER_BINDING_EXT = 0x8CA6, + GL_RENDERBUFFER_BINDING_EXT = 0x8CA7, + GL_MAX_COLOR_ATTACHMENTS_EXT = 0x8CDF, + GL_MAX_RENDERBUFFER_SIZE_EXT = 0x84E8; + + /** + * Returned by GetError(): + */ + public static final int GL_INVALID_FRAMEBUFFER_OPERATION_EXT = 0x506; + + private EXTFramebufferObject() {} + + public static boolean glIsRenderbufferEXT(int renderbuffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsRenderbufferEXT; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsRenderbufferEXT(renderbuffer, function_pointer); + return __result; + } + static native boolean nglIsRenderbufferEXT(int renderbuffer, long function_pointer); + + public static void glBindRenderbufferEXT(int target, int renderbuffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindRenderbufferEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindRenderbufferEXT(target, renderbuffer, function_pointer); + } + static native void nglBindRenderbufferEXT(int target, int renderbuffer, long function_pointer); + + public static void glDeleteRenderbuffersEXT(IntBuffer renderbuffers) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteRenderbuffersEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(renderbuffers); + nglDeleteRenderbuffersEXT(renderbuffers.remaining(), MemoryUtil.getAddress(renderbuffers), function_pointer); + } + static native void nglDeleteRenderbuffersEXT(int renderbuffers_n, long renderbuffers, long function_pointer); + + /** Overloads glDeleteRenderbuffersEXT. */ + public static void glDeleteRenderbuffersEXT(int renderbuffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteRenderbuffersEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeleteRenderbuffersEXT(1, APIUtil.getInt(caps, renderbuffer), function_pointer); + } + + public static void glGenRenderbuffersEXT(IntBuffer renderbuffers) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenRenderbuffersEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(renderbuffers); + nglGenRenderbuffersEXT(renderbuffers.remaining(), MemoryUtil.getAddress(renderbuffers), function_pointer); + } + static native void nglGenRenderbuffersEXT(int renderbuffers_n, long renderbuffers, long function_pointer); + + /** Overloads glGenRenderbuffersEXT. */ + public static int glGenRenderbuffersEXT() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenRenderbuffersEXT; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer renderbuffers = APIUtil.getBufferInt(caps); + nglGenRenderbuffersEXT(1, MemoryUtil.getAddress(renderbuffers), function_pointer); + return renderbuffers.get(0); + } + + public static void glRenderbufferStorageEXT(int target, int internalformat, int width, int height) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glRenderbufferStorageEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglRenderbufferStorageEXT(target, internalformat, width, height, function_pointer); + } + static native void nglRenderbufferStorageEXT(int target, int internalformat, int width, int height, long function_pointer); + + public static void glGetRenderbufferParameterEXT(int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetRenderbufferParameterivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetRenderbufferParameterivEXT(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetRenderbufferParameterivEXT(int target, int pname, long params, long function_pointer); + + /** + * Overloads glGetRenderbufferParameterivEXT. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetRenderbufferParameteriEXT} instead. + */ + @Deprecated + public static int glGetRenderbufferParameterEXT(int target, int pname) { + return EXTFramebufferObject.glGetRenderbufferParameteriEXT(target, pname); + } + + /** Overloads glGetRenderbufferParameterivEXT. */ + public static int glGetRenderbufferParameteriEXT(int target, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetRenderbufferParameterivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetRenderbufferParameterivEXT(target, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static boolean glIsFramebufferEXT(int framebuffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsFramebufferEXT; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsFramebufferEXT(framebuffer, function_pointer); + return __result; + } + static native boolean nglIsFramebufferEXT(int framebuffer, long function_pointer); + + public static void glBindFramebufferEXT(int target, int framebuffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindFramebufferEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindFramebufferEXT(target, framebuffer, function_pointer); + } + static native void nglBindFramebufferEXT(int target, int framebuffer, long function_pointer); + + public static void glDeleteFramebuffersEXT(IntBuffer framebuffers) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteFramebuffersEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(framebuffers); + nglDeleteFramebuffersEXT(framebuffers.remaining(), MemoryUtil.getAddress(framebuffers), function_pointer); + } + static native void nglDeleteFramebuffersEXT(int framebuffers_n, long framebuffers, long function_pointer); + + /** Overloads glDeleteFramebuffersEXT. */ + public static void glDeleteFramebuffersEXT(int framebuffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteFramebuffersEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeleteFramebuffersEXT(1, APIUtil.getInt(caps, framebuffer), function_pointer); + } + + public static void glGenFramebuffersEXT(IntBuffer framebuffers) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenFramebuffersEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(framebuffers); + nglGenFramebuffersEXT(framebuffers.remaining(), MemoryUtil.getAddress(framebuffers), function_pointer); + } + static native void nglGenFramebuffersEXT(int framebuffers_n, long framebuffers, long function_pointer); + + /** Overloads glGenFramebuffersEXT. */ + public static int glGenFramebuffersEXT() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenFramebuffersEXT; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer framebuffers = APIUtil.getBufferInt(caps); + nglGenFramebuffersEXT(1, MemoryUtil.getAddress(framebuffers), function_pointer); + return framebuffers.get(0); + } + + public static int glCheckFramebufferStatusEXT(int target) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCheckFramebufferStatusEXT; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglCheckFramebufferStatusEXT(target, function_pointer); + return __result; + } + static native int nglCheckFramebufferStatusEXT(int target, long function_pointer); + + public static void glFramebufferTexture1DEXT(int target, int attachment, int textarget, int texture, int level) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFramebufferTexture1DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglFramebufferTexture1DEXT(target, attachment, textarget, texture, level, function_pointer); + } + static native void nglFramebufferTexture1DEXT(int target, int attachment, int textarget, int texture, int level, long function_pointer); + + public static void glFramebufferTexture2DEXT(int target, int attachment, int textarget, int texture, int level) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFramebufferTexture2DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglFramebufferTexture2DEXT(target, attachment, textarget, texture, level, function_pointer); + } + static native void nglFramebufferTexture2DEXT(int target, int attachment, int textarget, int texture, int level, long function_pointer); + + public static void glFramebufferTexture3DEXT(int target, int attachment, int textarget, int texture, int level, int zoffset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFramebufferTexture3DEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglFramebufferTexture3DEXT(target, attachment, textarget, texture, level, zoffset, function_pointer); + } + static native void nglFramebufferTexture3DEXT(int target, int attachment, int textarget, int texture, int level, int zoffset, long function_pointer); + + public static void glFramebufferRenderbufferEXT(int target, int attachment, int renderbuffertarget, int renderbuffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFramebufferRenderbufferEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglFramebufferRenderbufferEXT(target, attachment, renderbuffertarget, renderbuffer, function_pointer); + } + static native void nglFramebufferRenderbufferEXT(int target, int attachment, int renderbuffertarget, int renderbuffer, long function_pointer); + + public static void glGetFramebufferAttachmentParameterEXT(int target, int attachment, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetFramebufferAttachmentParameterivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetFramebufferAttachmentParameterivEXT(target, attachment, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetFramebufferAttachmentParameterivEXT(int target, int attachment, int pname, long params, long function_pointer); + + /** + * Overloads glGetFramebufferAttachmentParameterivEXT. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetFramebufferAttachmentParameteriEXT} instead. + */ + @Deprecated + public static int glGetFramebufferAttachmentParameterEXT(int target, int attachment, int pname) { + return EXTFramebufferObject.glGetFramebufferAttachmentParameteriEXT(target, attachment, pname); + } + + /** Overloads glGetFramebufferAttachmentParameterivEXT. */ + public static int glGetFramebufferAttachmentParameteriEXT(int target, int attachment, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetFramebufferAttachmentParameterivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetFramebufferAttachmentParameterivEXT(target, attachment, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGenerateMipmapEXT(int target) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenerateMipmapEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglGenerateMipmapEXT(target, function_pointer); + } + static native void nglGenerateMipmapEXT(int target, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTFramebufferSRGB.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTFramebufferSRGB.java new file mode 100644 index 0000000..f92b911 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTFramebufferSRGB.java @@ -0,0 +1,37 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTFramebufferSRGB { + + /** + * Accepted by the <attribList> parameter of glXChooseVisual, and by + * the <attrib> parameter of glXGetConfig: + */ + public static final int GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT = 0x20B2; + + /** + * Accepted by the <piAttributes> parameter of + * wglGetPixelFormatAttribivEXT, wglGetPixelFormatAttribfvEXT, and + * the <piAttribIList> and <pfAttribIList> of wglChoosePixelFormatEXT: + */ + public static final int WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT = 0x20A9; + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_FRAMEBUFFER_SRGB_EXT = 0x8DB9; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_FRAMEBUFFER_SRGB_CAPABLE_EXT = 0x8DBA; + + private EXTFramebufferSRGB() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTGeometryShader4.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTGeometryShader4.java new file mode 100644 index 0000000..1cd7f34 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTGeometryShader4.java @@ -0,0 +1,99 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTGeometryShader4 { + + /** + * Accepted by the <type> parameter of CreateShader and returned by the + * <params> parameter of GetShaderiv: + */ + public static final int GL_GEOMETRY_SHADER_EXT = 0x8DD9; + + /** + * Accepted by the <pname> parameter of ProgramParameteriEXT and + * GetProgramiv: + */ + public static final int GL_GEOMETRY_VERTICES_OUT_EXT = 0x8DDA, + GL_GEOMETRY_INPUT_TYPE_EXT = 0x8DDB, + GL_GEOMETRY_OUTPUT_TYPE_EXT = 0x8DDC; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT = 0x8C29, + GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT = 0x8DDD, + GL_MAX_VERTEX_VARYING_COMPONENTS_EXT = 0x8DDE, + GL_MAX_VARYING_COMPONENTS_EXT = 0x8B4B, + GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT = 0x8DDF, + GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT = 0x8DE0, + GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT = 0x8DE1; + + /** + * Accepted by the <mode> parameter of Begin, DrawArrays, + * MultiDrawArrays, DrawElements, MultiDrawElements, and + * DrawRangeElements: + */ + public static final int GL_LINES_ADJACENCY_EXT = 0xA, + GL_LINE_STRIP_ADJACENCY_EXT = 0xB, + GL_TRIANGLES_ADJACENCY_EXT = 0xC, + GL_TRIANGLE_STRIP_ADJACENCY_EXT = 0xD; + + /** + * Returned by CheckFramebufferStatusEXT: + */ + public static final int GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT = 0x8DA8, + GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT = 0x8DA9; + + /** + * Accepted by the <pname> parameter of GetFramebufferAttachment- + * ParameterivEXT: + */ + public static final int GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT = 0x8DA7, + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT = 0x8CD4; + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, + * and by the <pname> parameter of GetIntegerv, GetFloatv, GetDoublev, + * and GetBooleanv: + */ + public static final int GL_PROGRAM_POINT_SIZE_EXT = 0x8642; + + private EXTGeometryShader4() {} + + public static void glProgramParameteriEXT(int program, int pname, int value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramParameteriEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramParameteriEXT(program, pname, value, function_pointer); + } + static native void nglProgramParameteriEXT(int program, int pname, int value, long function_pointer); + + public static void glFramebufferTextureEXT(int target, int attachment, int texture, int level) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFramebufferTextureEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglFramebufferTextureEXT(target, attachment, texture, level, function_pointer); + } + static native void nglFramebufferTextureEXT(int target, int attachment, int texture, int level, long function_pointer); + + public static void glFramebufferTextureLayerEXT(int target, int attachment, int texture, int level, int layer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFramebufferTextureLayerEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglFramebufferTextureLayerEXT(target, attachment, texture, level, layer, function_pointer); + } + static native void nglFramebufferTextureLayerEXT(int target, int attachment, int texture, int level, int layer, long function_pointer); + + public static void glFramebufferTextureFaceEXT(int target, int attachment, int texture, int level, int face) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFramebufferTextureFaceEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglFramebufferTextureFaceEXT(target, attachment, texture, level, face, function_pointer); + } + static native void nglFramebufferTextureFaceEXT(int target, int attachment, int texture, int level, int face, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTGpuProgramParameters.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTGpuProgramParameters.java new file mode 100644 index 0000000..955b8c9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTGpuProgramParameters.java @@ -0,0 +1,29 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTGpuProgramParameters { + + private EXTGpuProgramParameters() {} + + public static void glProgramEnvParameters4EXT(int target, int index, int count, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramEnvParameters4fvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, count << 2); + nglProgramEnvParameters4fvEXT(target, index, count, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglProgramEnvParameters4fvEXT(int target, int index, int count, long params, long function_pointer); + + public static void glProgramLocalParameters4EXT(int target, int index, int count, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramLocalParameters4fvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, count << 2); + nglProgramLocalParameters4fvEXT(target, index, count, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglProgramLocalParameters4fvEXT(int target, int index, int count, long params, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTGpuShader4.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTGpuShader4.java new file mode 100644 index 0000000..cf738a5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTGpuShader4.java @@ -0,0 +1,396 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTGpuShader4 { + + /** + * Accepted by the <pname> parameters of GetVertexAttribdv, + * GetVertexAttribfv, GetVertexAttribiv, GetVertexAttribIivEXT, and + * GetVertexAttribIuivEXT: + */ + public static final int GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT = 0x88FD; + + /** + * Returned by the <type> parameter of GetActiveUniform: + */ + public static final int GL_SAMPLER_1D_ARRAY_EXT = 0x8DC0, + GL_SAMPLER_2D_ARRAY_EXT = 0x8DC1, + GL_SAMPLER_BUFFER_EXT = 0x8DC2, + GL_SAMPLER_1D_ARRAY_SHADOW_EXT = 0x8DC3, + GL_SAMPLER_2D_ARRAY_SHADOW_EXT = 0x8DC4, + GL_SAMPLER_CUBE_SHADOW_EXT = 0x8DC5, + GL_UNSIGNED_INT_VEC2_EXT = 0x8DC6, + GL_UNSIGNED_INT_VEC3_EXT = 0x8DC7, + GL_UNSIGNED_INT_VEC4_EXT = 0x8DC8, + GL_INT_SAMPLER_1D_EXT = 0x8DC9, + GL_INT_SAMPLER_2D_EXT = 0x8DCA, + GL_INT_SAMPLER_3D_EXT = 0x8DCB, + GL_INT_SAMPLER_CUBE_EXT = 0x8DCC, + GL_INT_SAMPLER_2D_RECT_EXT = 0x8DCD, + GL_INT_SAMPLER_1D_ARRAY_EXT = 0x8DCE, + GL_INT_SAMPLER_2D_ARRAY_EXT = 0x8DCF, + GL_INT_SAMPLER_BUFFER_EXT = 0x8DD0, + GL_UNSIGNED_INT_SAMPLER_1D_EXT = 0x8DD1, + GL_UNSIGNED_INT_SAMPLER_2D_EXT = 0x8DD2, + GL_UNSIGNED_INT_SAMPLER_3D_EXT = 0x8DD3, + GL_UNSIGNED_INT_SAMPLER_CUBE_EXT = 0x8DD4, + GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT = 0x8DD5, + GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT = 0x8DD6, + GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT = 0x8DD7, + GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT = 0x8DD8; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_MIN_PROGRAM_TEXEL_OFFSET_EXT = 0x8904, + GL_MAX_PROGRAM_TEXEL_OFFSET_EXT = 0x8905; + + private EXTGpuShader4() {} + + public static void glVertexAttribI1iEXT(int index, int x) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI1iEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribI1iEXT(index, x, function_pointer); + } + static native void nglVertexAttribI1iEXT(int index, int x, long function_pointer); + + public static void glVertexAttribI2iEXT(int index, int x, int y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI2iEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribI2iEXT(index, x, y, function_pointer); + } + static native void nglVertexAttribI2iEXT(int index, int x, int y, long function_pointer); + + public static void glVertexAttribI3iEXT(int index, int x, int y, int z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI3iEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribI3iEXT(index, x, y, z, function_pointer); + } + static native void nglVertexAttribI3iEXT(int index, int x, int y, int z, long function_pointer); + + public static void glVertexAttribI4iEXT(int index, int x, int y, int z, int w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI4iEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribI4iEXT(index, x, y, z, w, function_pointer); + } + static native void nglVertexAttribI4iEXT(int index, int x, int y, int z, int w, long function_pointer); + + public static void glVertexAttribI1uiEXT(int index, int x) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI1uiEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribI1uiEXT(index, x, function_pointer); + } + static native void nglVertexAttribI1uiEXT(int index, int x, long function_pointer); + + public static void glVertexAttribI2uiEXT(int index, int x, int y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI2uiEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribI2uiEXT(index, x, y, function_pointer); + } + static native void nglVertexAttribI2uiEXT(int index, int x, int y, long function_pointer); + + public static void glVertexAttribI3uiEXT(int index, int x, int y, int z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI3uiEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribI3uiEXT(index, x, y, z, function_pointer); + } + static native void nglVertexAttribI3uiEXT(int index, int x, int y, int z, long function_pointer); + + public static void glVertexAttribI4uiEXT(int index, int x, int y, int z, int w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI4uiEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribI4uiEXT(index, x, y, z, w, function_pointer); + } + static native void nglVertexAttribI4uiEXT(int index, int x, int y, int z, int w, long function_pointer); + + public static void glVertexAttribI1EXT(int index, IntBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI1ivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 1); + nglVertexAttribI1ivEXT(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribI1ivEXT(int index, long v, long function_pointer); + + public static void glVertexAttribI2EXT(int index, IntBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI2ivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 2); + nglVertexAttribI2ivEXT(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribI2ivEXT(int index, long v, long function_pointer); + + public static void glVertexAttribI3EXT(int index, IntBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI3ivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 3); + nglVertexAttribI3ivEXT(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribI3ivEXT(int index, long v, long function_pointer); + + public static void glVertexAttribI4EXT(int index, IntBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI4ivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 4); + nglVertexAttribI4ivEXT(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribI4ivEXT(int index, long v, long function_pointer); + + public static void glVertexAttribI1uEXT(int index, IntBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI1uivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 1); + nglVertexAttribI1uivEXT(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribI1uivEXT(int index, long v, long function_pointer); + + public static void glVertexAttribI2uEXT(int index, IntBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI2uivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 2); + nglVertexAttribI2uivEXT(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribI2uivEXT(int index, long v, long function_pointer); + + public static void glVertexAttribI3uEXT(int index, IntBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI3uivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 3); + nglVertexAttribI3uivEXT(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribI3uivEXT(int index, long v, long function_pointer); + + public static void glVertexAttribI4uEXT(int index, IntBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI4uivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 4); + nglVertexAttribI4uivEXT(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribI4uivEXT(int index, long v, long function_pointer); + + public static void glVertexAttribI4EXT(int index, ByteBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI4bvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 4); + nglVertexAttribI4bvEXT(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribI4bvEXT(int index, long v, long function_pointer); + + public static void glVertexAttribI4EXT(int index, ShortBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI4svEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 4); + nglVertexAttribI4svEXT(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribI4svEXT(int index, long v, long function_pointer); + + public static void glVertexAttribI4uEXT(int index, ByteBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI4ubvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 4); + nglVertexAttribI4ubvEXT(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribI4ubvEXT(int index, long v, long function_pointer); + + public static void glVertexAttribI4uEXT(int index, ShortBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI4usvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 4); + nglVertexAttribI4usvEXT(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribI4usvEXT(int index, long v, long function_pointer); + + public static void glVertexAttribIPointerEXT(int index, int size, int type, int stride, ByteBuffer buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribIPointerEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribIPointerEXT(index, size, type, stride, MemoryUtil.getAddress(buffer), function_pointer); + } + public static void glVertexAttribIPointerEXT(int index, int size, int type, int stride, IntBuffer buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribIPointerEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribIPointerEXT(index, size, type, stride, MemoryUtil.getAddress(buffer), function_pointer); + } + public static void glVertexAttribIPointerEXT(int index, int size, int type, int stride, ShortBuffer buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribIPointerEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribIPointerEXT(index, size, type, stride, MemoryUtil.getAddress(buffer), function_pointer); + } + static native void nglVertexAttribIPointerEXT(int index, int size, int type, int stride, long buffer, long function_pointer); + public static void glVertexAttribIPointerEXT(int index, int size, int type, int stride, long buffer_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribIPointerEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOenabled(caps); + nglVertexAttribIPointerEXTBO(index, size, type, stride, buffer_buffer_offset, function_pointer); + } + static native void nglVertexAttribIPointerEXTBO(int index, int size, int type, int stride, long buffer_buffer_offset, long function_pointer); + + public static void glGetVertexAttribIEXT(int index, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexAttribIivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetVertexAttribIivEXT(index, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVertexAttribIivEXT(int index, int pname, long params, long function_pointer); + + public static void glGetVertexAttribIuEXT(int index, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexAttribIuivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetVertexAttribIuivEXT(index, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVertexAttribIuivEXT(int index, int pname, long params, long function_pointer); + + public static void glUniform1uiEXT(int location, int v0) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform1uiEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform1uiEXT(location, v0, function_pointer); + } + static native void nglUniform1uiEXT(int location, int v0, long function_pointer); + + public static void glUniform2uiEXT(int location, int v0, int v1) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform2uiEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform2uiEXT(location, v0, v1, function_pointer); + } + static native void nglUniform2uiEXT(int location, int v0, int v1, long function_pointer); + + public static void glUniform3uiEXT(int location, int v0, int v1, int v2) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform3uiEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform3uiEXT(location, v0, v1, v2, function_pointer); + } + static native void nglUniform3uiEXT(int location, int v0, int v1, int v2, long function_pointer); + + public static void glUniform4uiEXT(int location, int v0, int v1, int v2, int v3) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform4uiEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform4uiEXT(location, v0, v1, v2, v3, function_pointer); + } + static native void nglUniform4uiEXT(int location, int v0, int v1, int v2, int v3, long function_pointer); + + public static void glUniform1uEXT(int location, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform1uivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniform1uivEXT(location, value.remaining(), MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniform1uivEXT(int location, int value_count, long value, long function_pointer); + + public static void glUniform2uEXT(int location, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform2uivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniform2uivEXT(location, value.remaining() >> 1, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniform2uivEXT(int location, int value_count, long value, long function_pointer); + + public static void glUniform3uEXT(int location, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform3uivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniform3uivEXT(location, value.remaining() / 3, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniform3uivEXT(int location, int value_count, long value, long function_pointer); + + public static void glUniform4uEXT(int location, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform4uivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniform4uivEXT(location, value.remaining() >> 2, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniform4uivEXT(int location, int value_count, long value, long function_pointer); + + public static void glGetUniformuEXT(int program, int location, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetUniformuivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglGetUniformuivEXT(program, location, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetUniformuivEXT(int program, int location, long params, long function_pointer); + + public static void glBindFragDataLocationEXT(int program, int colorNumber, ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindFragDataLocationEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(name); + BufferChecks.checkNullTerminated(name); + nglBindFragDataLocationEXT(program, colorNumber, MemoryUtil.getAddress(name), function_pointer); + } + static native void nglBindFragDataLocationEXT(int program, int colorNumber, long name, long function_pointer); + + /** Overloads glBindFragDataLocationEXT. */ + public static void glBindFragDataLocationEXT(int program, int colorNumber, CharSequence name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindFragDataLocationEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindFragDataLocationEXT(program, colorNumber, APIUtil.getBufferNT(caps, name), function_pointer); + } + + public static int glGetFragDataLocationEXT(int program, ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetFragDataLocationEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(name); + BufferChecks.checkNullTerminated(name); + int __result = nglGetFragDataLocationEXT(program, MemoryUtil.getAddress(name), function_pointer); + return __result; + } + static native int nglGetFragDataLocationEXT(int program, long name, long function_pointer); + + /** Overloads glGetFragDataLocationEXT. */ + public static int glGetFragDataLocationEXT(int program, CharSequence name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetFragDataLocationEXT; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglGetFragDataLocationEXT(program, APIUtil.getBufferNT(caps, name), function_pointer); + return __result; + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTMultiDrawArrays.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTMultiDrawArrays.java new file mode 100644 index 0000000..8ce01c0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTMultiDrawArrays.java @@ -0,0 +1,21 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTMultiDrawArrays { + + private EXTMultiDrawArrays() {} + + public static void glMultiDrawArraysEXT(int mode, IntBuffer piFirst, IntBuffer piCount) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiDrawArraysEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(piFirst); + BufferChecks.checkBuffer(piCount, piFirst.remaining()); + nglMultiDrawArraysEXT(mode, MemoryUtil.getAddress(piFirst), MemoryUtil.getAddress(piCount), piFirst.remaining(), function_pointer); + } + static native void nglMultiDrawArraysEXT(int mode, long piFirst, long piCount, int piFirst_primcount, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTPackedDepthStencil.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTPackedDepthStencil.java new file mode 100644 index 0000000..9bfe978 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTPackedDepthStencil.java @@ -0,0 +1,42 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTPackedDepthStencil { + + /** + * Accepted by the <format> parameter of DrawPixels, ReadPixels, + * TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, + * TexSubImage3D, and GetTexImage, by the <type> parameter of + * CopyPixels, by the <internalformat> parameter of TexImage1D, + * TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and + * RenderbufferStorageEXT, and returned in the <data> parameter of + * GetTexLevelParameter and GetRenderbufferParameterivEXT. + */ + public static final int GL_DEPTH_STENCIL_EXT = 0x84F9; + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, + * TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, + * TexSubImage3D, and GetTexImage. + */ + public static final int GL_UNSIGNED_INT_24_8_EXT = 0x84FA; + + /** + * Accepted by the <internalformat> parameter of TexImage1D, + * TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and + * RenderbufferStorageEXT, and returned in the <data> parameter of + * GetTexLevelParameter and GetRenderbufferParameterivEXT. + */ + public static final int GL_DEPTH24_STENCIL8_EXT = 0x88F0; + + /** + * Accepted by the <value> parameter of GetTexLevelParameter. + */ + public static final int GL_TEXTURE_STENCIL_SIZE_EXT = 0x88F1; + + private EXTPackedDepthStencil() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTPackedFloat.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTPackedFloat.java new file mode 100644 index 0000000..7aae012 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTPackedFloat.java @@ -0,0 +1,55 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTPackedFloat { + + /** + * Accepted by the <internalformat> parameter of TexImage1D, + * TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and + * RenderbufferStorageEXT: + */ + public static final int GL_R11F_G11F_B10F_EXT = 0x8C3A; + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, + * TexImage1D, TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, + * TexSubImage2D, TexSubImage3D, GetHistogram, GetMinmax, + * ConvolutionFilter1D, ConvolutionFilter2D, ConvolutionFilter3D, + * GetConvolutionFilter, SeparableFilter2D, GetSeparableFilter, + * ColorTable, ColorSubTable, and GetColorTable: + */ + public static final int GL_UNSIGNED_INT_10F_11F_11F_REV_EXT = 0x8C3B; + + /** + * Accepted by the <pname> parameters of GetIntegerv, GetFloatv, and + * GetDoublev: + */ + public static final int GL_RGBA_SIGNED_COMPONENTS_EXT = 0x8C3C; + + /** + * Accepted as a value in the <piAttribIList> and <pfAttribFList> + * parameter arrays of wglChoosePixelFormatARB, and returned in the + * <piValues> parameter array of wglGetPixelFormatAttribivARB, and the + * <pfValues> parameter array of wglGetPixelFormatAttribfvARB: + */ + public static final int WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT = 0x20A8; + + /** + * Accepted as values of the <render_type> arguments in the + * glXCreateNewContext and glXCreateContext functions + */ + public static final int GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT = 0x20B1; + + /** + * Returned by glXGetFBConfigAttrib (when <attribute> is set to + * GLX_RENDER_TYPE) and accepted by the <attrib_list> parameter of + * glXChooseFBConfig (following the GLX_RENDER_TYPE token): + */ + public static final int GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT = 0x8; + + private EXTPackedFloat() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTPackedPixels.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTPackedPixels.java new file mode 100644 index 0000000..32f06e0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTPackedPixels.java @@ -0,0 +1,17 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTPackedPixels { + + public static final int GL_UNSIGNED_BYTE_3_3_2_EXT = 0x8032, + GL_UNSIGNED_SHORT_4_4_4_4_EXT = 0x8033, + GL_UNSIGNED_SHORT_5_5_5_1_EXT = 0x8034, + GL_UNSIGNED_INT_8_8_8_8_EXT = 0x8035, + GL_UNSIGNED_INT_10_10_10_2_EXT = 0x8036; + + private EXTPackedPixels() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTPalettedTexture.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTPalettedTexture.java new file mode 100644 index 0000000..1a6d712 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTPalettedTexture.java @@ -0,0 +1,169 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTPalettedTexture { + + /** + * Accepted by the internalformat parameter of TexImage1D, TexImage2D and + * TexImage3DEXT: + */ + public static final int GL_COLOR_INDEX1_EXT = 0x80E2, + GL_COLOR_INDEX2_EXT = 0x80E3, + GL_COLOR_INDEX4_EXT = 0x80E4, + GL_COLOR_INDEX8_EXT = 0x80E5, + GL_COLOR_INDEX12_EXT = 0x80E6, + GL_COLOR_INDEX16_EXT = 0x80E7; + + /** + * Accepted by the pname parameter of GetColorTableParameterivEXT and + * GetColorTableParameterfvEXT: + */ + public static final int GL_COLOR_TABLE_FORMAT_EXT = 0x80D8, + GL_COLOR_TABLE_WIDTH_EXT = 0x80D9, + GL_COLOR_TABLE_RED_SIZE_EXT = 0x80DA, + GL_COLOR_TABLE_GREEN_SIZE_EXT = 0x80DB, + GL_COLOR_TABLE_BLUE_SIZE_EXT = 0x80DC, + GL_COLOR_TABLE_ALPHA_SIZE_EXT = 0x80DD, + GL_COLOR_TABLE_LUMINANCE_SIZE_EXT = 0x80DE, + GL_COLOR_TABLE_INTENSITY_SIZE_EXT = 0x80DF; + + /** + * Accepted by the value parameter of GetTexLevelParameter{if}v: + */ + public static final int GL_TEXTURE_INDEX_SIZE_EXT = 0x80ED; + + private EXTPalettedTexture() {} + + public static void glColorTableEXT(int target, int internalFormat, int width, int format, int type, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorTableEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(data, GLChecks.calculateImageStorage(data, format, type, width, 1, 1)); + nglColorTableEXT(target, internalFormat, width, format, type, MemoryUtil.getAddress(data), function_pointer); + } + public static void glColorTableEXT(int target, int internalFormat, int width, int format, int type, DoubleBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorTableEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(data, GLChecks.calculateImageStorage(data, format, type, width, 1, 1)); + nglColorTableEXT(target, internalFormat, width, format, type, MemoryUtil.getAddress(data), function_pointer); + } + public static void glColorTableEXT(int target, int internalFormat, int width, int format, int type, FloatBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorTableEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(data, GLChecks.calculateImageStorage(data, format, type, width, 1, 1)); + nglColorTableEXT(target, internalFormat, width, format, type, MemoryUtil.getAddress(data), function_pointer); + } + public static void glColorTableEXT(int target, int internalFormat, int width, int format, int type, IntBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorTableEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(data, GLChecks.calculateImageStorage(data, format, type, width, 1, 1)); + nglColorTableEXT(target, internalFormat, width, format, type, MemoryUtil.getAddress(data), function_pointer); + } + public static void glColorTableEXT(int target, int internalFormat, int width, int format, int type, ShortBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorTableEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(data, GLChecks.calculateImageStorage(data, format, type, width, 1, 1)); + nglColorTableEXT(target, internalFormat, width, format, type, MemoryUtil.getAddress(data), function_pointer); + } + static native void nglColorTableEXT(int target, int internalFormat, int width, int format, int type, long data, long function_pointer); + + public static void glColorSubTableEXT(int target, int start, int count, int format, int type, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorSubTableEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(data, GLChecks.calculateImageStorage(data, format, type, count, 1, 1)); + nglColorSubTableEXT(target, start, count, format, type, MemoryUtil.getAddress(data), function_pointer); + } + public static void glColorSubTableEXT(int target, int start, int count, int format, int type, DoubleBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorSubTableEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(data, GLChecks.calculateImageStorage(data, format, type, count, 1, 1)); + nglColorSubTableEXT(target, start, count, format, type, MemoryUtil.getAddress(data), function_pointer); + } + public static void glColorSubTableEXT(int target, int start, int count, int format, int type, FloatBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorSubTableEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(data, GLChecks.calculateImageStorage(data, format, type, count, 1, 1)); + nglColorSubTableEXT(target, start, count, format, type, MemoryUtil.getAddress(data), function_pointer); + } + public static void glColorSubTableEXT(int target, int start, int count, int format, int type, IntBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorSubTableEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(data, GLChecks.calculateImageStorage(data, format, type, count, 1, 1)); + nglColorSubTableEXT(target, start, count, format, type, MemoryUtil.getAddress(data), function_pointer); + } + public static void glColorSubTableEXT(int target, int start, int count, int format, int type, ShortBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorSubTableEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(data, GLChecks.calculateImageStorage(data, format, type, count, 1, 1)); + nglColorSubTableEXT(target, start, count, format, type, MemoryUtil.getAddress(data), function_pointer); + } + static native void nglColorSubTableEXT(int target, int start, int count, int format, int type, long data, long function_pointer); + + public static void glGetColorTableEXT(int target, int format, int type, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetColorTableEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglGetColorTableEXT(target, format, type, MemoryUtil.getAddress(data), function_pointer); + } + public static void glGetColorTableEXT(int target, int format, int type, DoubleBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetColorTableEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglGetColorTableEXT(target, format, type, MemoryUtil.getAddress(data), function_pointer); + } + public static void glGetColorTableEXT(int target, int format, int type, FloatBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetColorTableEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglGetColorTableEXT(target, format, type, MemoryUtil.getAddress(data), function_pointer); + } + public static void glGetColorTableEXT(int target, int format, int type, IntBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetColorTableEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglGetColorTableEXT(target, format, type, MemoryUtil.getAddress(data), function_pointer); + } + public static void glGetColorTableEXT(int target, int format, int type, ShortBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetColorTableEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglGetColorTableEXT(target, format, type, MemoryUtil.getAddress(data), function_pointer); + } + static native void nglGetColorTableEXT(int target, int format, int type, long data, long function_pointer); + + public static void glGetColorTableParameterEXT(int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetColorTableParameterivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetColorTableParameterivEXT(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetColorTableParameterivEXT(int target, int pname, long params, long function_pointer); + + public static void glGetColorTableParameterEXT(int target, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetColorTableParameterfvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetColorTableParameterfvEXT(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetColorTableParameterfvEXT(int target, int pname, long params, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTPixelBufferObject.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTPixelBufferObject.java new file mode 100644 index 0000000..0da9472 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTPixelBufferObject.java @@ -0,0 +1,26 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTPixelBufferObject extends ARBBufferObject { + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, + * GetBufferParameteriv, and GetBufferPointerv: + */ + public static final int GL_PIXEL_PACK_BUFFER_EXT = 0x88EB, + GL_PIXEL_UNPACK_BUFFER_EXT = 0x88EC; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_PIXEL_PACK_BUFFER_BINDING_EXT = 0x88ED, + GL_PIXEL_UNPACK_BUFFER_BINDING_EXT = 0x88EF; + + private EXTPixelBufferObject() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTPointParameters.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTPointParameters.java new file mode 100644 index 0000000..0e6cff1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTPointParameters.java @@ -0,0 +1,33 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTPointParameters { + + public static final int GL_POINT_SIZE_MIN_EXT = 0x8126, + GL_POINT_SIZE_MAX_EXT = 0x8127, + GL_POINT_FADE_THRESHOLD_SIZE_EXT = 0x8128, + GL_DISTANCE_ATTENUATION_EXT = 0x8129; + + private EXTPointParameters() {} + + public static void glPointParameterfEXT(int pname, float param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPointParameterfEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglPointParameterfEXT(pname, param, function_pointer); + } + static native void nglPointParameterfEXT(int pname, float param, long function_pointer); + + public static void glPointParameterEXT(int pname, FloatBuffer pfParams) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPointParameterfvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pfParams, 4); + nglPointParameterfvEXT(pname, MemoryUtil.getAddress(pfParams), function_pointer); + } + static native void nglPointParameterfvEXT(int pname, long pfParams, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTProvokingVertex.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTProvokingVertex.java new file mode 100644 index 0000000..efd8e9a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTProvokingVertex.java @@ -0,0 +1,32 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTProvokingVertex { + + /** + * Accepted by the <mode> parameter of ProvokingVertexEXT: + */ + public static final int GL_FIRST_VERTEX_CONVENTION_EXT = 0x8E4D, + GL_LAST_VERTEX_CONVENTION_EXT = 0x8E4E; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_PROVOKING_VERTEX_EXT = 0x8E4F, + GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT = 0x8E4C; + + private EXTProvokingVertex() {} + + public static void glProvokingVertexEXT(int mode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProvokingVertexEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglProvokingVertexEXT(mode, function_pointer); + } + static native void nglProvokingVertexEXT(int mode, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTRescaleNormal.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTRescaleNormal.java new file mode 100644 index 0000000..10fde6c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTRescaleNormal.java @@ -0,0 +1,13 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTRescaleNormal { + + public static final int GL_RESCALE_NORMAL_EXT = 0x803A; + + private EXTRescaleNormal() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTSecondaryColor.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTSecondaryColor.java new file mode 100644 index 0000000..6ad057d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTSecondaryColor.java @@ -0,0 +1,88 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTSecondaryColor { + + public static final int GL_COLOR_SUM_EXT = 0x8458, + GL_CURRENT_SECONDARY_COLOR_EXT = 0x8459, + GL_SECONDARY_COLOR_ARRAY_SIZE_EXT = 0x845A, + GL_SECONDARY_COLOR_ARRAY_TYPE_EXT = 0x845B, + GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT = 0x845C, + GL_SECONDARY_COLOR_ARRAY_POINTER_EXT = 0x845D, + GL_SECONDARY_COLOR_ARRAY_EXT = 0x845E; + + private EXTSecondaryColor() {} + + public static void glSecondaryColor3bEXT(byte red, byte green, byte blue) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSecondaryColor3bEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglSecondaryColor3bEXT(red, green, blue, function_pointer); + } + static native void nglSecondaryColor3bEXT(byte red, byte green, byte blue, long function_pointer); + + public static void glSecondaryColor3fEXT(float red, float green, float blue) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSecondaryColor3fEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglSecondaryColor3fEXT(red, green, blue, function_pointer); + } + static native void nglSecondaryColor3fEXT(float red, float green, float blue, long function_pointer); + + public static void glSecondaryColor3dEXT(double red, double green, double blue) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSecondaryColor3dEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglSecondaryColor3dEXT(red, green, blue, function_pointer); + } + static native void nglSecondaryColor3dEXT(double red, double green, double blue, long function_pointer); + + public static void glSecondaryColor3ubEXT(byte red, byte green, byte blue) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSecondaryColor3ubEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglSecondaryColor3ubEXT(red, green, blue, function_pointer); + } + static native void nglSecondaryColor3ubEXT(byte red, byte green, byte blue, long function_pointer); + + public static void glSecondaryColorPointerEXT(int size, int stride, DoubleBuffer pPointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSecondaryColorPointerEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pPointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).EXT_secondary_color_glSecondaryColorPointerEXT_pPointer = pPointer; + nglSecondaryColorPointerEXT(size, GL11.GL_DOUBLE, stride, MemoryUtil.getAddress(pPointer), function_pointer); + } + public static void glSecondaryColorPointerEXT(int size, int stride, FloatBuffer pPointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSecondaryColorPointerEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pPointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).EXT_secondary_color_glSecondaryColorPointerEXT_pPointer = pPointer; + nglSecondaryColorPointerEXT(size, GL11.GL_FLOAT, stride, MemoryUtil.getAddress(pPointer), function_pointer); + } + public static void glSecondaryColorPointerEXT(int size, boolean unsigned, int stride, ByteBuffer pPointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSecondaryColorPointerEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pPointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).EXT_secondary_color_glSecondaryColorPointerEXT_pPointer = pPointer; + nglSecondaryColorPointerEXT(size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, stride, MemoryUtil.getAddress(pPointer), function_pointer); + } + static native void nglSecondaryColorPointerEXT(int size, int type, int stride, long pPointer, long function_pointer); + public static void glSecondaryColorPointerEXT(int size, int type, int stride, long pPointer_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSecondaryColorPointerEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOenabled(caps); + nglSecondaryColorPointerEXTBO(size, type, stride, pPointer_buffer_offset, function_pointer); + } + static native void nglSecondaryColorPointerEXTBO(int size, int type, int stride, long pPointer_buffer_offset, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTSeparateShaderObjects.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTSeparateShaderObjects.java new file mode 100644 index 0000000..328d1fc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTSeparateShaderObjects.java @@ -0,0 +1,52 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTSeparateShaderObjects { + + /** + * Accepted by <type> parameter to GetIntegerv and GetFloatv: + */ + public static final int GL_ACTIVE_PROGRAM_EXT = 0x8B8D; + + private EXTSeparateShaderObjects() {} + + public static void glUseShaderProgramEXT(int type, int program) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUseShaderProgramEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglUseShaderProgramEXT(type, program, function_pointer); + } + static native void nglUseShaderProgramEXT(int type, int program, long function_pointer); + + public static void glActiveProgramEXT(int program) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glActiveProgramEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglActiveProgramEXT(program, function_pointer); + } + static native void nglActiveProgramEXT(int program, long function_pointer); + + public static int glCreateShaderProgramEXT(int type, ByteBuffer string) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCreateShaderProgramEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(string); + BufferChecks.checkNullTerminated(string); + int __result = nglCreateShaderProgramEXT(type, MemoryUtil.getAddress(string), function_pointer); + return __result; + } + static native int nglCreateShaderProgramEXT(int type, long string, long function_pointer); + + /** Overloads glCreateShaderProgramEXT. */ + public static int glCreateShaderProgramEXT(int type, CharSequence string) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCreateShaderProgramEXT; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglCreateShaderProgramEXT(type, APIUtil.getBufferNT(caps, string), function_pointer); + return __result; + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTSeparateSpecularColor.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTSeparateSpecularColor.java new file mode 100644 index 0000000..a3931b8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTSeparateSpecularColor.java @@ -0,0 +1,15 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTSeparateSpecularColor { + + public static final int GL_SINGLE_COLOR_EXT = 0x81F9, + GL_SEPARATE_SPECULAR_COLOR_EXT = 0x81FA, + GL_LIGHT_MODEL_COLOR_CONTROL_EXT = 0x81F8; + + private EXTSeparateSpecularColor() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTShaderImageLoadStore.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTShaderImageLoadStore.java new file mode 100644 index 0000000..c6ca70c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTShaderImageLoadStore.java @@ -0,0 +1,99 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTShaderImageLoadStore { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_MAX_IMAGE_UNITS_EXT = 0x8F38, + GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT = 0x8F39, + GL_MAX_IMAGE_SAMPLES_EXT = 0x906D; + + /** + * Accepted by the <target> parameter of GetIntegeri_v and GetBooleani_v: + */ + public static final int GL_IMAGE_BINDING_NAME_EXT = 0x8F3A, + GL_IMAGE_BINDING_LEVEL_EXT = 0x8F3B, + GL_IMAGE_BINDING_LAYERED_EXT = 0x8F3C, + GL_IMAGE_BINDING_LAYER_EXT = 0x8F3D, + GL_IMAGE_BINDING_ACCESS_EXT = 0x8F3E, + GL_IMAGE_BINDING_FORMAT_EXT = 0x906E; + + /** + * Accepted by the <barriers> parameter of MemoryBarrierEXT: + */ + public static final int GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT = 0x1, + GL_ELEMENT_ARRAY_BARRIER_BIT_EXT = 0x2, + GL_UNIFORM_BARRIER_BIT_EXT = 0x4, + GL_TEXTURE_FETCH_BARRIER_BIT_EXT = 0x8, + GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT = 0x20, + GL_COMMAND_BARRIER_BIT_EXT = 0x40, + GL_PIXEL_BUFFER_BARRIER_BIT_EXT = 0x80, + GL_TEXTURE_UPDATE_BARRIER_BIT_EXT = 0x100, + GL_BUFFER_UPDATE_BARRIER_BIT_EXT = 0x200, + GL_FRAMEBUFFER_BARRIER_BIT_EXT = 0x400, + GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT = 0x800, + GL_ATOMIC_COUNTER_BARRIER_BIT_EXT = 0x1000, + GL_ALL_BARRIER_BITS_EXT = 0xFFFFFFFF; + + /** + * Returned by the <type> parameter of GetActiveUniform: + */ + public static final int GL_IMAGE_1D_EXT = 0x904C, + GL_IMAGE_2D_EXT = 0x904D, + GL_IMAGE_3D_EXT = 0x904E, + GL_IMAGE_2D_RECT_EXT = 0x904F, + GL_IMAGE_CUBE_EXT = 0x9050, + GL_IMAGE_BUFFER_EXT = 0x9051, + GL_IMAGE_1D_ARRAY_EXT = 0x9052, + GL_IMAGE_2D_ARRAY_EXT = 0x9053, + GL_IMAGE_CUBE_MAP_ARRAY_EXT = 0x9054, + GL_IMAGE_2D_MULTISAMPLE_EXT = 0x9055, + GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT = 0x9056, + GL_INT_IMAGE_1D_EXT = 0x9057, + GL_INT_IMAGE_2D_EXT = 0x9058, + GL_INT_IMAGE_3D_EXT = 0x9059, + GL_INT_IMAGE_2D_RECT_EXT = 0x905A, + GL_INT_IMAGE_CUBE_EXT = 0x905B, + GL_INT_IMAGE_BUFFER_EXT = 0x905C, + GL_INT_IMAGE_1D_ARRAY_EXT = 0x905D, + GL_INT_IMAGE_2D_ARRAY_EXT = 0x905E, + GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT = 0x905F, + GL_INT_IMAGE_2D_MULTISAMPLE_EXT = 0x9060, + GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT = 0x9061, + GL_UNSIGNED_INT_IMAGE_1D_EXT = 0x9062, + GL_UNSIGNED_INT_IMAGE_2D_EXT = 0x9063, + GL_UNSIGNED_INT_IMAGE_3D_EXT = 0x9064, + GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT = 0x9065, + GL_UNSIGNED_INT_IMAGE_CUBE_EXT = 0x9066, + GL_UNSIGNED_INT_IMAGE_BUFFER_EXT = 0x9067, + GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT = 0x9068, + GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT = 0x9069, + GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT = 0x906A, + GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT = 0x906B, + GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT = 0x906C; + + private EXTShaderImageLoadStore() {} + + public static void glBindImageTextureEXT(int index, int texture, int level, boolean layered, int layer, int access, int format) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindImageTextureEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindImageTextureEXT(index, texture, level, layered, layer, access, format, function_pointer); + } + static native void nglBindImageTextureEXT(int index, int texture, int level, boolean layered, int layer, int access, int format, long function_pointer); + + public static void glMemoryBarrierEXT(int barriers) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMemoryBarrierEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglMemoryBarrierEXT(barriers, function_pointer); + } + static native void nglMemoryBarrierEXT(int barriers, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTSharedTexturePalette.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTSharedTexturePalette.java new file mode 100644 index 0000000..94253e4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTSharedTexturePalette.java @@ -0,0 +1,13 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTSharedTexturePalette { + + public static final int GL_SHARED_TEXTURE_PALETTE_EXT = 0x81FB; + + private EXTSharedTexturePalette() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTStencilClearTag.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTStencilClearTag.java new file mode 100644 index 0000000..4f35b59 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTStencilClearTag.java @@ -0,0 +1,31 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTStencilClearTag { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev. + */ + public static final int GL_STENCIL_TAG_BITS_EXT = 0x88F2, + GL_STENCIL_CLEAR_TAG_VALUE_EXT = 0x88F3; + + private EXTStencilClearTag() {} + + /** + * Controls the stencil clear tag state. stencilTagBits is a count of + * the number of most-significant stencil buffer bits involved in the + * stencil clear tag update. + */ + public static void glStencilClearTagEXT(int stencilTagBits, int stencilClearTag) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glStencilClearTagEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglStencilClearTagEXT(stencilTagBits, stencilClearTag, function_pointer); + } + static native void nglStencilClearTagEXT(int stencilTagBits, int stencilClearTag, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTStencilTwoSide.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTStencilTwoSide.java new file mode 100644 index 0000000..f369300 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTStencilTwoSide.java @@ -0,0 +1,22 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTStencilTwoSide { + + public static final int GL_STENCIL_TEST_TWO_SIDE_EXT = 0x8910, + GL_ACTIVE_STENCIL_FACE_EXT = 0x8911; + + private EXTStencilTwoSide() {} + + public static void glActiveStencilFaceEXT(int face) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glActiveStencilFaceEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglActiveStencilFaceEXT(face, function_pointer); + } + static native void nglActiveStencilFaceEXT(int face, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTStencilWrap.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTStencilWrap.java new file mode 100644 index 0000000..d6c2658 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTStencilWrap.java @@ -0,0 +1,14 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTStencilWrap { + + public static final int GL_INCR_WRAP_EXT = 0x8507, + GL_DECR_WRAP_EXT = 0x8508; + + private EXTStencilWrap() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureArray.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureArray.java new file mode 100644 index 0000000..5375283 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureArray.java @@ -0,0 +1,64 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTTextureArray { + + /** + * Accepted by the <target> parameter of TexParameteri, TexParameteriv, + * TexParameterf, TexParameterfv, and BindTexture: + */ + public static final int GL_TEXTURE_1D_ARRAY_EXT = 0x8C18, + GL_TEXTURE_2D_ARRAY_EXT = 0x8C1A; + + /** + * Accepted by the <target> parameter of TexImage3D, TexSubImage3D, + * CopyTexSubImage3D, CompressedTexImage3D, and CompressedTexSubImage3D: + */ + public static final int GL_PROXY_TEXTURE_2D_ARRAY_EXT = 0x8C1B; + + /** + * Accepted by the <target> parameter of TexImage2D, TexSubImage2D, + * CopyTexImage2D, CopyTexSubImage2D, CompressedTexImage2D, and + * CompressedTexSubImage2D: + */ + public static final int GL_PROXY_TEXTURE_1D_ARRAY_EXT = 0x8C19; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv + * and GetFloatv: + */ + public static final int GL_TEXTURE_BINDING_1D_ARRAY_EXT = 0x8C1C, + GL_TEXTURE_BINDING_2D_ARRAY_EXT = 0x8C1D, + GL_MAX_ARRAY_TEXTURE_LAYERS_EXT = 0x88FF; + + /** + * Accepted by the <param> parameter of TexParameterf, TexParameteri, + * TexParameterfv, and TexParameteriv when the <pname> parameter is + * TEXTURE_COMPARE_MODE_ARB: + */ + public static final int GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT = 0x884E; + + /** + * Accepted by the <pname> parameter of + * GetFramebufferAttachmentParameterivEXT: + */ + public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT = 0x8CD4; + + /** + * Returned by the <type> parameter of GetActiveUniform: + */ + public static final int GL_SAMPLER_1D_ARRAY_EXT = 0x8DC0, + GL_SAMPLER_2D_ARRAY_EXT = 0x8DC1, + GL_SAMPLER_1D_ARRAY_SHADOW_EXT = 0x8DC3, + GL_SAMPLER_2D_ARRAY_SHADOW_EXT = 0x8DC4; + + private EXTTextureArray() {} + + public static void glFramebufferTextureLayerEXT(int target, int attachment, int texture, int level, int layer) { + EXTGeometryShader4.glFramebufferTextureLayerEXT(target, attachment, texture, level, layer); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureBufferObject.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureBufferObject.java new file mode 100644 index 0000000..8785e1e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureBufferObject.java @@ -0,0 +1,37 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTTextureBufferObject { + + /** + * Accepted by the <target> parameter of BindBuffer, BufferData, + * BufferSubData, MapBuffer, BindTexture, UnmapBuffer, GetBufferSubData, + * GetBufferParameteriv, GetBufferPointerv, and TexBufferEXT, and + * the <pname> parameter of GetBooleanv, GetDoublev, GetFloatv, and + * GetIntegerv: + */ + public static final int GL_TEXTURE_BUFFER_EXT = 0x8C2A; + + /** + * Accepted by the <pname> parameters of GetBooleanv, GetDoublev, + * GetFloatv, and GetIntegerv: + */ + public static final int GL_MAX_TEXTURE_BUFFER_SIZE_EXT = 0x8C2B, + GL_TEXTURE_BINDING_BUFFER_EXT = 0x8C2C, + GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT = 0x8C2D, + GL_TEXTURE_BUFFER_FORMAT_EXT = 0x8C2E; + + private EXTTextureBufferObject() {} + + public static void glTexBufferEXT(int target, int internalformat, int buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexBufferEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexBufferEXT(target, internalformat, buffer, function_pointer); + } + static native void nglTexBufferEXT(int target, int internalformat, int buffer, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureCompressionLATC.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureCompressionLATC.java new file mode 100644 index 0000000..f908354 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureCompressionLATC.java @@ -0,0 +1,21 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTTextureCompressionLATC { + + /** + * Accepted by the <internalformat> parameter of TexImage2D, + * CopyTexImage2D, and CompressedTexImage2D and the <format> parameter + * of CompressedTexSubImage2D: + */ + public static final int GL_COMPRESSED_LUMINANCE_LATC1_EXT = 0x8C70, + GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT = 0x8C71, + GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT = 0x8C72, + GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT = 0x8C73; + + private EXTTextureCompressionLATC() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureCompressionRGTC.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureCompressionRGTC.java new file mode 100644 index 0000000..994133f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureCompressionRGTC.java @@ -0,0 +1,21 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTTextureCompressionRGTC { + + /** + * Accepted by the <internalformat> parameter of TexImage2D, + * CopyTexImage2D, and CompressedTexImage2D and the <format> parameter + * of CompressedTexSubImage2D: + */ + public static final int GL_COMPRESSED_RED_RGTC1_EXT = 0x8DBB, + GL_COMPRESSED_SIGNED_RED_RGTC1_EXT = 0x8DBC, + GL_COMPRESSED_RED_GREEN_RGTC2_EXT = 0x8DBD, + GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT = 0x8DBE; + + private EXTTextureCompressionRGTC() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureCompressionS3TC.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureCompressionS3TC.java new file mode 100644 index 0000000..cca79d9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureCompressionS3TC.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTTextureCompressionS3TC { + + public static final int GL_COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0, + GL_COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1, + GL_COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2, + GL_COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3; + + private EXTTextureCompressionS3TC() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureEnvCombine.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureEnvCombine.java new file mode 100644 index 0000000..f2401ab --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureEnvCombine.java @@ -0,0 +1,33 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTTextureEnvCombine { + + public static final int GL_COMBINE_EXT = 0x8570, + GL_COMBINE_RGB_EXT = 0x8571, + GL_COMBINE_ALPHA_EXT = 0x8572, + GL_SOURCE0_RGB_EXT = 0x8580, + GL_SOURCE1_RGB_EXT = 0x8581, + GL_SOURCE2_RGB_EXT = 0x8582, + GL_SOURCE0_ALPHA_EXT = 0x8588, + GL_SOURCE1_ALPHA_EXT = 0x8589, + GL_SOURCE2_ALPHA_EXT = 0x858A, + GL_OPERAND0_RGB_EXT = 0x8590, + GL_OPERAND1_RGB_EXT = 0x8591, + GL_OPERAND2_RGB_EXT = 0x8592, + GL_OPERAND0_ALPHA_EXT = 0x8598, + GL_OPERAND1_ALPHA_EXT = 0x8599, + GL_OPERAND2_ALPHA_EXT = 0x859A, + GL_RGB_SCALE_EXT = 0x8573, + GL_ADD_SIGNED_EXT = 0x8574, + GL_INTERPOLATE_EXT = 0x8575, + GL_CONSTANT_EXT = 0x8576, + GL_PRIMARY_COLOR_EXT = 0x8577, + GL_PREVIOUS_EXT = 0x8578; + + private EXTTextureEnvCombine() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureEnvDot3.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureEnvDot3.java new file mode 100644 index 0000000..8a311de --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureEnvDot3.java @@ -0,0 +1,14 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTTextureEnvDot3 { + + public static final int GL_DOT3_RGB_EXT = 0x8740, + GL_DOT3_RGBA_EXT = 0x8741; + + private EXTTextureEnvDot3() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureFilterAnisotropic.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureFilterAnisotropic.java new file mode 100644 index 0000000..8c0ddad --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureFilterAnisotropic.java @@ -0,0 +1,14 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTTextureFilterAnisotropic { + + public static final int GL_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE, + GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF; + + private EXTTextureFilterAnisotropic() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureInteger.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureInteger.java new file mode 100644 index 0000000..1d2a708 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureInteger.java @@ -0,0 +1,162 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTTextureInteger { + + /** + * Accepted by the <pname> parameters of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_RGBA_INTEGER_MODE_EXT = 0x8D9E; + + /** + * Accepted by the <internalFormat> parameter of TexImage1D, + * TexImage2D, and TexImage3D: + */ + public static final int GL_RGBA32UI_EXT = 0x8D70, + GL_RGB32UI_EXT = 0x8D71, + GL_ALPHA32UI_EXT = 0x8D72, + GL_INTENSITY32UI_EXT = 0x8D73, + GL_LUMINANCE32UI_EXT = 0x8D74, + GL_LUMINANCE_ALPHA32UI_EXT = 0x8D75, + GL_RGBA16UI_EXT = 0x8D76, + GL_RGB16UI_EXT = 0x8D77, + GL_ALPHA16UI_EXT = 0x8D78, + GL_INTENSITY16UI_EXT = 0x8D79, + GL_LUMINANCE16UI_EXT = 0x8D7A, + GL_LUMINANCE_ALPHA16UI_EXT = 0x8D7B, + GL_RGBA8UI_EXT = 0x8D7C, + GL_RGB8UI_EXT = 0x8D7D, + GL_ALPHA8UI_EXT = 0x8D7E, + GL_INTENSITY8UI_EXT = 0x8D7F, + GL_LUMINANCE8UI_EXT = 0x8D80, + GL_LUMINANCE_ALPHA8UI_EXT = 0x8D81, + GL_RGBA32I_EXT = 0x8D82, + GL_RGB32I_EXT = 0x8D83, + GL_ALPHA32I_EXT = 0x8D84, + GL_INTENSITY32I_EXT = 0x8D85, + GL_LUMINANCE32I_EXT = 0x8D86, + GL_LUMINANCE_ALPHA32I_EXT = 0x8D87, + GL_RGBA16I_EXT = 0x8D88, + GL_RGB16I_EXT = 0x8D89, + GL_ALPHA16I_EXT = 0x8D8A, + GL_INTENSITY16I_EXT = 0x8D8B, + GL_LUMINANCE16I_EXT = 0x8D8C, + GL_LUMINANCE_ALPHA16I_EXT = 0x8D8D, + GL_RGBA8I_EXT = 0x8D8E, + GL_RGB8I_EXT = 0x8D8F, + GL_ALPHA8I_EXT = 0x8D90, + GL_INTENSITY8I_EXT = 0x8D91, + GL_LUMINANCE8I_EXT = 0x8D92, + GL_LUMINANCE_ALPHA8I_EXT = 0x8D93; + + /** + * Accepted by the <format> parameter of TexImage1D, TexImage2D, + * TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, + * DrawPixels and ReadPixels: + */ + public static final int GL_RED_INTEGER_EXT = 0x8D94, + GL_GREEN_INTEGER_EXT = 0x8D95, + GL_BLUE_INTEGER_EXT = 0x8D96, + GL_ALPHA_INTEGER_EXT = 0x8D97, + GL_RGB_INTEGER_EXT = 0x8D98, + GL_RGBA_INTEGER_EXT = 0x8D99, + GL_BGR_INTEGER_EXT = 0x8D9A, + GL_BGRA_INTEGER_EXT = 0x8D9B, + GL_LUMINANCE_INTEGER_EXT = 0x8D9C, + GL_LUMINANCE_ALPHA_INTEGER_EXT = 0x8D9D; + + private EXTTextureInteger() {} + + public static void glClearColorIiEXT(int r, int g, int b, int a) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClearColorIiEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglClearColorIiEXT(r, g, b, a, function_pointer); + } + static native void nglClearColorIiEXT(int r, int g, int b, int a, long function_pointer); + + public static void glClearColorIuiEXT(int r, int g, int b, int a) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClearColorIuiEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglClearColorIuiEXT(r, g, b, a, function_pointer); + } + static native void nglClearColorIuiEXT(int r, int g, int b, int a, long function_pointer); + + public static void glTexParameterIEXT(int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexParameterIivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglTexParameterIivEXT(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglTexParameterIivEXT(int target, int pname, long params, long function_pointer); + + /** Overloads glTexParameterIivEXT. */ + public static void glTexParameterIiEXT(int target, int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexParameterIivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexParameterIivEXT(target, pname, APIUtil.getInt(caps, param), function_pointer); + } + + public static void glTexParameterIuEXT(int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexParameterIuivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglTexParameterIuivEXT(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglTexParameterIuivEXT(int target, int pname, long params, long function_pointer); + + /** Overloads glTexParameterIuivEXT. */ + public static void glTexParameterIuiEXT(int target, int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexParameterIuivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexParameterIuivEXT(target, pname, APIUtil.getInt(caps, param), function_pointer); + } + + public static void glGetTexParameterIEXT(int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexParameterIivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetTexParameterIivEXT(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetTexParameterIivEXT(int target, int pname, long params, long function_pointer); + + /** Overloads glGetTexParameterIivEXT. */ + public static int glGetTexParameterIiEXT(int target, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexParameterIivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetTexParameterIivEXT(target, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetTexParameterIuEXT(int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexParameterIuivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetTexParameterIuivEXT(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetTexParameterIuivEXT(int target, int pname, long params, long function_pointer); + + /** Overloads glGetTexParameterIuivEXT. */ + public static int glGetTexParameterIuiEXT(int target, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexParameterIuivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetTexParameterIuivEXT(target, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureLODBias.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureLODBias.java new file mode 100644 index 0000000..8be1000 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureLODBias.java @@ -0,0 +1,30 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTTextureLODBias { + + /** + * Accepted by the <target> parameters of GetTexEnvfv, GetTexEnviv, + * TexEnvi, TexEnvf, Texenviv, and TexEnvfv: + */ + public static final int GL_TEXTURE_FILTER_CONTROL_EXT = 0x8500; + + /** + * When the <target> parameter of GetTexEnvfv, GetTexEnviv, TexEnvi, + * TexEnvf, TexEnviv, and TexEnvfv is TEXTURE_FILTER_CONTROL_EXT, then + * the value of <pname> may be: + */ + public static final int GL_TEXTURE_LOD_BIAS_EXT = 0x8501; + + /** + * Accepted by the <pname> parameters of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_MAX_TEXTURE_LOD_BIAS_EXT = 0x84FD; + + private EXTTextureLODBias() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureMirrorClamp.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureMirrorClamp.java new file mode 100644 index 0000000..edbeee3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureMirrorClamp.java @@ -0,0 +1,21 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTTextureMirrorClamp { + + /** + * Accepted by the <param> parameter of TexParameteri and TexParameterf, + * and by the <params> parameter of TexParameteriv and TexParameterfv, + * when their <pname> parameter is TEXTURE_WRAP_S, TEXTURE_WRAP_T, + * or TEXTURE_WRAP_R: + */ + public static final int GL_MIRROR_CLAMP_EXT = 0x8742, + GL_MIRROR_CLAMP_TO_EDGE_EXT = 0x8743, + GL_MIRROR_CLAMP_TO_BORDER_EXT = 0x8912; + + private EXTTextureMirrorClamp() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureRectangle.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureRectangle.java new file mode 100644 index 0000000..b9d8bb8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureRectangle.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTTextureRectangle { + + public static final int GL_TEXTURE_RECTANGLE_EXT = 0x84F5, + GL_TEXTURE_BINDING_RECTANGLE_EXT = 0x84F6, + GL_PROXY_TEXTURE_RECTANGLE_EXT = 0x84F7, + GL_MAX_RECTANGLE_TEXTURE_SIZE_EXT = 0x84F8; + + private EXTTextureRectangle() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureSRGB.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureSRGB.java new file mode 100644 index 0000000..010ce33 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureSRGB.java @@ -0,0 +1,38 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTTextureSRGB { + + /** + * Accepted by the <internalformat> parameter of TexImage1D, TexImage2D, + * TexImage3D, CopyTexImage1D, CopyTexImage2D. + */ + public static final int GL_SRGB_EXT = 0x8C40, + GL_SRGB8_EXT = 0x8C41, + GL_SRGB_ALPHA_EXT = 0x8C42, + GL_SRGB8_ALPHA8_EXT = 0x8C43, + GL_SLUMINANCE_ALPHA_EXT = 0x8C44, + GL_SLUMINANCE8_ALPHA8_EXT = 0x8C45, + GL_SLUMINANCE_EXT = 0x8C46, + GL_SLUMINANCE8_EXT = 0x8C47, + GL_COMPRESSED_SRGB_EXT = 0x8C48, + GL_COMPRESSED_SRGB_ALPHA_EXT = 0x8C49, + GL_COMPRESSED_SLUMINANCE_EXT = 0x8C4A, + GL_COMPRESSED_SLUMINANCE_ALPHA_EXT = 0x8C4B; + + /** + * Accepted by the <internalformat> parameter of TexImage2D, + * CopyTexImage2D, and CompressedTexImage2DARB and the <format> parameter + * of CompressedTexSubImage2DARB. + */ + public static final int GL_COMPRESSED_SRGB_S3TC_DXT1_EXT = 0x8C4C, + GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT = 0x8C4D, + GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT = 0x8C4E, + GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT = 0x8C4F; + + private EXTTextureSRGB() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureSRGBDecode.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureSRGBDecode.java new file mode 100644 index 0000000..4b0c71e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureSRGBDecode.java @@ -0,0 +1,28 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTTextureSRGBDecode { + + /** + * Accepted by the <pname> parameter of TexParameterf, TexParameteri, + * GetTexParameterfv, GetTexParameteriv, SamplerParameteri, + * SamplerParameterf, SamplerParameteriv, SamplerParameterfv, + * SamplerParameterIiv, SamplerParameterIuiv, GetSamplerParameteriv, + * GetSamplerParameterfv, GetSamplerParameterIiv, and GetSamplerParameterIuiv: + */ + public static final int GL_TEXTURE_SRGB_DECODE_EXT = 0x8A48; + + /** + * Accepted by the <enum> parameter of TexParameterf, TexParameteri, + * SamplerParameteri, SamplerParameterf, SamplerParameteriv, SamplerParameterfv, + * SamplerParameterIiv and SamplerParameterIuiv: + */ + public static final int GL_DECODE_EXT = 0x8A49, + GL_SKIP_DECODE_EXT = 0x8A4A; + + private EXTTextureSRGBDecode() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureSharedExponent.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureSharedExponent.java new file mode 100644 index 0000000..a0d23d1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureSharedExponent.java @@ -0,0 +1,34 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTTextureSharedExponent { + + /** + * Accepted by the <internalformat> parameter of TexImage1D, + * TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and + * RenderbufferStorageEXT: + */ + public static final int GL_RGB9_E5_EXT = 0x8C3D; + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, + * TexImage1D, TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, + * TexSubImage2D, TexSubImage3D, GetHistogram, GetMinmax, + * ConvolutionFilter1D, ConvolutionFilter2D, ConvolutionFilter3D, + * GetConvolutionFilter, SeparableFilter2D, GetSeparableFilter, + * ColorTable, ColorSubTable, and GetColorTable: + */ + public static final int GL_UNSIGNED_INT_5_9_9_9_REV_EXT = 0x8C3E; + + /** + * Accepted by the <pname> parameter of GetTexLevelParameterfv and + * GetTexLevelParameteriv: + */ + public static final int GL_TEXTURE_SHARED_SIZE_EXT = 0x8C3F; + + private EXTTextureSharedExponent() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureSnorm.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureSnorm.java new file mode 100644 index 0000000..cc2b769 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureSnorm.java @@ -0,0 +1,45 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTTextureSnorm { + + /** + * Accepted by the <internalFormat> parameter of TexImage1D, + * TexImage2D, and TexImage3D: + */ + public static final int GL_RED_SNORM = 0x8F90, + GL_RG_SNORM = 0x8F91, + GL_RGB_SNORM = 0x8F92, + GL_RGBA_SNORM = 0x8F93, + GL_ALPHA_SNORM = 0x9010, + GL_LUMINANCE_SNORM = 0x9011, + GL_LUMINANCE_ALPHA_SNORM = 0x9012, + GL_INTENSITY_SNORM = 0x9013, + GL_R8_SNORM = 0x8F94, + GL_RG8_SNORM = 0x8F95, + GL_RGB8_SNORM = 0x8F96, + GL_RGBA8_SNORM = 0x8F97, + GL_ALPHA8_SNORM = 0x9014, + GL_LUMINANCE8_SNORM = 0x9015, + GL_LUMINANCE8_ALPHA8_SNORM = 0x9016, + GL_INTENSITY8_SNORM = 0x9017, + GL_R16_SNORM = 0x8F98, + GL_RG16_SNORM = 0x8F99, + GL_RGB16_SNORM = 0x8F9A, + GL_RGBA16_SNORM = 0x8F9B, + GL_ALPHA16_SNORM = 0x9018, + GL_LUMINANCE16_SNORM = 0x9019, + GL_LUMINANCE16_ALPHA16_SNORM = 0x901A, + GL_INTENSITY16_SNORM = 0x901B; + + /** + * Returned by GetTexLevelParmeter + */ + public static final int GL_SIGNED_NORMALIZED = 0x8F9C; + + private EXTTextureSnorm() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureSwizzle.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureSwizzle.java new file mode 100644 index 0000000..509e0b5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTextureSwizzle.java @@ -0,0 +1,27 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTTextureSwizzle { + + /** + * Accepted by the <pname> parameters of TexParameteri, + * TexParameterf, TexParameteriv, TexParameterfv, + * GetTexParameterfv, and GetTexParameteriv: + */ + public static final int GL_TEXTURE_SWIZZLE_R_EXT = 0x8E42, + GL_TEXTURE_SWIZZLE_G_EXT = 0x8E43, + GL_TEXTURE_SWIZZLE_B_EXT = 0x8E44, + GL_TEXTURE_SWIZZLE_A_EXT = 0x8E45; + + /** + * Accepted by the <pname> parameters of TexParameteriv, + * TexParameterfv, GetTexParameterfv, and GetTexParameteriv: + */ + public static final int GL_TEXTURE_SWIZZLE_RGBA_EXT = 0x8E46; + + private EXTTextureSwizzle() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTimerQuery.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTimerQuery.java new file mode 100644 index 0000000..c23883f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTimerQuery.java @@ -0,0 +1,55 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTTimerQuery { + + /** + * Accepted by the <target> parameter of BeginQuery, EndQuery, and + * GetQueryiv: + */ + public static final int GL_TIME_ELAPSED_EXT = 0x88BF; + + private EXTTimerQuery() {} + + public static void glGetQueryObjectEXT(int id, int pname, LongBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetQueryObjecti64vEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetQueryObjecti64vEXT(id, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetQueryObjecti64vEXT(int id, int pname, long params, long function_pointer); + + /** Overloads glGetQueryObjecti64vEXT. */ + public static long glGetQueryObjectEXT(int id, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetQueryObjecti64vEXT; + BufferChecks.checkFunctionAddress(function_pointer); + LongBuffer params = APIUtil.getBufferLong(caps); + nglGetQueryObjecti64vEXT(id, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetQueryObjectuEXT(int id, int pname, LongBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetQueryObjectui64vEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetQueryObjectui64vEXT(id, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetQueryObjectui64vEXT(int id, int pname, long params, long function_pointer); + + /** Overloads glGetQueryObjectui64vEXT. */ + public static long glGetQueryObjectuEXT(int id, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetQueryObjectui64vEXT; + BufferChecks.checkFunctionAddress(function_pointer); + LongBuffer params = APIUtil.getBufferLong(caps); + nglGetQueryObjectui64vEXT(id, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTransformFeedback.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTransformFeedback.java new file mode 100644 index 0000000..a0dfa7a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTTransformFeedback.java @@ -0,0 +1,154 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTTransformFeedback { + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, + * GetBufferPointerv, BindBufferRangeEXT, BindBufferOffsetEXT and + * BindBufferBaseEXT: + */ + public static final int GL_TRANSFORM_FEEDBACK_BUFFER_EXT = 0x8C8E; + + /** + * Accepted by the <param> parameter of GetIntegerIndexedvEXT and + * GetBooleanIndexedvEXT: + */ + public static final int GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT = 0x8C84, + GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT = 0x8C85; + + /** + * Accepted by the <param> parameter of GetIntegerIndexedvEXT and + * GetBooleanIndexedvEXT, and by the <pname> parameter of GetBooleanv, + * GetDoublev, GetIntegerv, and GetFloatv: + */ + public static final int GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT = 0x8C8F; + + /** + * Accepted by the <bufferMode> parameter of TransformFeedbackVaryingsEXT: + */ + public static final int GL_INTERLEAVED_ATTRIBS_EXT = 0x8C8C, + GL_SEPARATE_ATTRIBS_EXT = 0x8C8D; + + /** + * Accepted by the <target> parameter of BeginQuery, EndQuery, and + * GetQueryiv: + */ + public static final int GL_PRIMITIVES_GENERATED_EXT = 0x8C87, + GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT = 0x8C88; + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, and by + * the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev: + */ + public static final int GL_RASTERIZER_DISCARD_EXT = 0x8C89; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv, + * and GetFloatv: + */ + public static final int GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT = 0x8C8A, + GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT = 0x8C8B, + GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT = 0x8C80; + + /** + * Accepted by the <pname> parameter of GetProgramiv: + */ + public static final int GL_TRANSFORM_FEEDBACK_VARYINGS_EXT = 0x8C83, + GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT = 0x8C7F, + GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT = 0x8C76; + + private EXTTransformFeedback() {} + + public static void glBindBufferRangeEXT(int target, int index, int buffer, long offset, long size) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindBufferRangeEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindBufferRangeEXT(target, index, buffer, offset, size, function_pointer); + } + static native void nglBindBufferRangeEXT(int target, int index, int buffer, long offset, long size, long function_pointer); + + public static void glBindBufferOffsetEXT(int target, int index, int buffer, long offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindBufferOffsetEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindBufferOffsetEXT(target, index, buffer, offset, function_pointer); + } + static native void nglBindBufferOffsetEXT(int target, int index, int buffer, long offset, long function_pointer); + + public static void glBindBufferBaseEXT(int target, int index, int buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindBufferBaseEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindBufferBaseEXT(target, index, buffer, function_pointer); + } + static native void nglBindBufferBaseEXT(int target, int index, int buffer, long function_pointer); + + public static void glBeginTransformFeedbackEXT(int primitiveMode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBeginTransformFeedbackEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglBeginTransformFeedbackEXT(primitiveMode, function_pointer); + } + static native void nglBeginTransformFeedbackEXT(int primitiveMode, long function_pointer); + + public static void glEndTransformFeedbackEXT() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEndTransformFeedbackEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglEndTransformFeedbackEXT(function_pointer); + } + static native void nglEndTransformFeedbackEXT(long function_pointer); + + public static void glTransformFeedbackVaryingsEXT(int program, int count, ByteBuffer varyings, int bufferMode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTransformFeedbackVaryingsEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(varyings); + BufferChecks.checkNullTerminated(varyings, count); + nglTransformFeedbackVaryingsEXT(program, count, MemoryUtil.getAddress(varyings), bufferMode, function_pointer); + } + static native void nglTransformFeedbackVaryingsEXT(int program, int count, long varyings, int bufferMode, long function_pointer); + + /** Overloads glTransformFeedbackVaryingsEXT. */ + public static void glTransformFeedbackVaryingsEXT(int program, CharSequence[] varyings, int bufferMode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTransformFeedbackVaryingsEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkArray(varyings); + nglTransformFeedbackVaryingsEXT(program, varyings.length, APIUtil.getBufferNT(caps, varyings), bufferMode, function_pointer); + } + + public static void glGetTransformFeedbackVaryingEXT(int program, int index, IntBuffer length, IntBuffer size, IntBuffer type, ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTransformFeedbackVaryingEXT; + BufferChecks.checkFunctionAddress(function_pointer); + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkBuffer(size, 1); + BufferChecks.checkBuffer(type, 1); + BufferChecks.checkDirect(name); + nglGetTransformFeedbackVaryingEXT(program, index, name.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(size), MemoryUtil.getAddress(type), MemoryUtil.getAddress(name), function_pointer); + } + static native void nglGetTransformFeedbackVaryingEXT(int program, int index, int name_bufSize, long length, long size, long type, long name, long function_pointer); + + /** Overloads glGetTransformFeedbackVaryingEXT. */ + public static String glGetTransformFeedbackVaryingEXT(int program, int index, int bufSize, IntBuffer size, IntBuffer type) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTransformFeedbackVaryingEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(size, 1); + BufferChecks.checkBuffer(type, 1); + IntBuffer name_length = APIUtil.getLengths(caps); + ByteBuffer name = APIUtil.getBufferByte(caps, bufSize); + nglGetTransformFeedbackVaryingEXT(program, index, bufSize, MemoryUtil.getAddress0(name_length), MemoryUtil.getAddress(size), MemoryUtil.getAddress(type), MemoryUtil.getAddress(name), function_pointer); + name.limit(name_length.get(0)); + return APIUtil.getString(caps, name); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTVertexArrayBgra.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTVertexArrayBgra.java new file mode 100644 index 0000000..498b95a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTVertexArrayBgra.java @@ -0,0 +1,17 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTVertexArrayBgra { + + /** + * Accepted by the <size> parameter of ColorPointer, + * SecondaryColorPointer, and VertexAttribPointer: + */ + public static final int GL_BGRA = 0x80E1; + + private EXTVertexArrayBgra() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTVertexAttrib64bit.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTVertexAttrib64bit.java new file mode 100644 index 0000000..080f8e3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTVertexAttrib64bit.java @@ -0,0 +1,127 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTVertexAttrib64bit { + + /** + * Returned in the <type> parameter of GetActiveAttrib: + */ + public static final int GL_DOUBLE_VEC2_EXT = 0x8FFC, + GL_DOUBLE_VEC3_EXT = 0x8FFD, + GL_DOUBLE_VEC4_EXT = 0x8FFE, + GL_DOUBLE_MAT2_EXT = 0x8F46, + GL_DOUBLE_MAT3_EXT = 0x8F47, + GL_DOUBLE_MAT4_EXT = 0x8F48, + GL_DOUBLE_MAT2x3_EXT = 0x8F49, + GL_DOUBLE_MAT2x4_EXT = 0x8F4A, + GL_DOUBLE_MAT3x2_EXT = 0x8F4B, + GL_DOUBLE_MAT3x4_EXT = 0x8F4C, + GL_DOUBLE_MAT4x2_EXT = 0x8F4D, + GL_DOUBLE_MAT4x3_EXT = 0x8F4E; + + private EXTVertexAttrib64bit() {} + + public static void glVertexAttribL1dEXT(int index, double x) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL1dEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribL1dEXT(index, x, function_pointer); + } + static native void nglVertexAttribL1dEXT(int index, double x, long function_pointer); + + public static void glVertexAttribL2dEXT(int index, double x, double y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL2dEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribL2dEXT(index, x, y, function_pointer); + } + static native void nglVertexAttribL2dEXT(int index, double x, double y, long function_pointer); + + public static void glVertexAttribL3dEXT(int index, double x, double y, double z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL3dEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribL3dEXT(index, x, y, z, function_pointer); + } + static native void nglVertexAttribL3dEXT(int index, double x, double y, double z, long function_pointer); + + public static void glVertexAttribL4dEXT(int index, double x, double y, double z, double w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL4dEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribL4dEXT(index, x, y, z, w, function_pointer); + } + static native void nglVertexAttribL4dEXT(int index, double x, double y, double z, double w, long function_pointer); + + public static void glVertexAttribL1EXT(int index, DoubleBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL1dvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 1); + nglVertexAttribL1dvEXT(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribL1dvEXT(int index, long v, long function_pointer); + + public static void glVertexAttribL2EXT(int index, DoubleBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL2dvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 2); + nglVertexAttribL2dvEXT(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribL2dvEXT(int index, long v, long function_pointer); + + public static void glVertexAttribL3EXT(int index, DoubleBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL3dvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 3); + nglVertexAttribL3dvEXT(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribL3dvEXT(int index, long v, long function_pointer); + + public static void glVertexAttribL4EXT(int index, DoubleBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL4dvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 4); + nglVertexAttribL4dvEXT(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribL4dvEXT(int index, long v, long function_pointer); + + public static void glVertexAttribLPointerEXT(int index, int size, int stride, DoubleBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribLPointerEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glVertexAttribPointer_buffer[index] = pointer; + nglVertexAttribLPointerEXT(index, size, GL11.GL_DOUBLE, stride, MemoryUtil.getAddress(pointer), function_pointer); + } + static native void nglVertexAttribLPointerEXT(int index, int size, int type, int stride, long pointer, long function_pointer); + public static void glVertexAttribLPointerEXT(int index, int size, int stride, long pointer_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribLPointerEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOenabled(caps); + nglVertexAttribLPointerEXTBO(index, size, GL11.GL_DOUBLE, stride, pointer_buffer_offset, function_pointer); + } + static native void nglVertexAttribLPointerEXTBO(int index, int size, int type, int stride, long pointer_buffer_offset, long function_pointer); + + public static void glGetVertexAttribLEXT(int index, int pname, DoubleBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexAttribLdvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetVertexAttribLdvEXT(index, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVertexAttribLdvEXT(int index, int pname, long params, long function_pointer); + + public static void glVertexArrayVertexAttribLOffsetEXT(int vaobj, int buffer, int index, int size, int type, int stride, long offset) { + ARBVertexAttrib64bit.glVertexArrayVertexAttribLOffsetEXT(vaobj, buffer, index, size, type, stride, offset); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTVertexShader.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTVertexShader.java new file mode 100644 index 0000000..8a130ba --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTVertexShader.java @@ -0,0 +1,589 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTVertexShader { + + public static final int GL_VERTEX_SHADER_EXT = 0x8780, + GL_VERTEX_SHADER_BINDING_EXT = 0x8781, + GL_OP_INDEX_EXT = 0x8782, + GL_OP_NEGATE_EXT = 0x8783, + GL_OP_DOT3_EXT = 0x8784, + GL_OP_DOT4_EXT = 0x8785, + GL_OP_MUL_EXT = 0x8786, + GL_OP_ADD_EXT = 0x8787, + GL_OP_MADD_EXT = 0x8788, + GL_OP_FRAC_EXT = 0x8789, + GL_OP_MAX_EXT = 0x878A, + GL_OP_MIN_EXT = 0x878B, + GL_OP_SET_GE_EXT = 0x878C, + GL_OP_SET_LT_EXT = 0x878D, + GL_OP_CLAMP_EXT = 0x878E, + GL_OP_FLOOR_EXT = 0x878F, + GL_OP_ROUND_EXT = 0x8790, + GL_OP_EXP_BASE_2_EXT = 0x8791, + GL_OP_LOG_BASE_2_EXT = 0x8792, + GL_OP_POWER_EXT = 0x8793, + GL_OP_RECIP_EXT = 0x8794, + GL_OP_RECIP_SQRT_EXT = 0x8795, + GL_OP_SUB_EXT = 0x8796, + GL_OP_CROSS_PRODUCT_EXT = 0x8797, + GL_OP_MULTIPLY_MATRIX_EXT = 0x8798, + GL_OP_MOV_EXT = 0x8799, + GL_OUTPUT_VERTEX_EXT = 0x879A, + GL_OUTPUT_COLOR0_EXT = 0x879B, + GL_OUTPUT_COLOR1_EXT = 0x879C, + GL_OUTPUT_TEXTURE_COORD0_EXT = 0x879D, + GL_OUTPUT_TEXTURE_COORD1_EXT = 0x879E, + GL_OUTPUT_TEXTURE_COORD2_EXT = 0x879F, + GL_OUTPUT_TEXTURE_COORD3_EXT = 0x87A0, + GL_OUTPUT_TEXTURE_COORD4_EXT = 0x87A1, + GL_OUTPUT_TEXTURE_COORD5_EXT = 0x87A2, + GL_OUTPUT_TEXTURE_COORD6_EXT = 0x87A3, + GL_OUTPUT_TEXTURE_COORD7_EXT = 0x87A4, + GL_OUTPUT_TEXTURE_COORD8_EXT = 0x87A5, + GL_OUTPUT_TEXTURE_COORD9_EXT = 0x87A6, + GL_OUTPUT_TEXTURE_COORD10_EXT = 0x87A7, + GL_OUTPUT_TEXTURE_COORD11_EXT = 0x87A8, + GL_OUTPUT_TEXTURE_COORD12_EXT = 0x87A9, + GL_OUTPUT_TEXTURE_COORD13_EXT = 0x87AA, + GL_OUTPUT_TEXTURE_COORD14_EXT = 0x87AB, + GL_OUTPUT_TEXTURE_COORD15_EXT = 0x87AC, + GL_OUTPUT_TEXTURE_COORD16_EXT = 0x87AD, + GL_OUTPUT_TEXTURE_COORD17_EXT = 0x87AE, + GL_OUTPUT_TEXTURE_COORD18_EXT = 0x87AF, + GL_OUTPUT_TEXTURE_COORD19_EXT = 0x87B0, + GL_OUTPUT_TEXTURE_COORD20_EXT = 0x87B1, + GL_OUTPUT_TEXTURE_COORD21_EXT = 0x87B2, + GL_OUTPUT_TEXTURE_COORD22_EXT = 0x87B3, + GL_OUTPUT_TEXTURE_COORD23_EXT = 0x87B4, + GL_OUTPUT_TEXTURE_COORD24_EXT = 0x87B5, + GL_OUTPUT_TEXTURE_COORD25_EXT = 0x87B6, + GL_OUTPUT_TEXTURE_COORD26_EXT = 0x87B7, + GL_OUTPUT_TEXTURE_COORD27_EXT = 0x87B8, + GL_OUTPUT_TEXTURE_COORD28_EXT = 0x87B9, + GL_OUTPUT_TEXTURE_COORD29_EXT = 0x87BA, + GL_OUTPUT_TEXTURE_COORD30_EXT = 0x87BB, + GL_OUTPUT_TEXTURE_COORD31_EXT = 0x87BC, + GL_OUTPUT_FOG_EXT = 0x87BD, + GL_SCALAR_EXT = 0x87BE, + GL_VECTOR_EXT = 0x87BF, + GL_MATRIX_EXT = 0x87C0, + GL_VARIANT_EXT = 0x87C1, + GL_INVARIANT_EXT = 0x87C2, + GL_LOCAL_CONSTANT_EXT = 0x87C3, + GL_LOCAL_EXT = 0x87C4, + GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT = 0x87C5, + GL_MAX_VERTEX_SHADER_VARIANTS_EXT = 0x87C6, + GL_MAX_VERTEX_SHADER_INVARIANTS_EXT = 0x87C7, + GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = 0x87C8, + GL_MAX_VERTEX_SHADER_LOCALS_EXT = 0x87C9, + GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT = 0x87CA, + GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT = 0x87CB, + GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT = 0x87CC, + GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = 0x87CD, + GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT = 0x87CE, + GL_VERTEX_SHADER_INSTRUCTIONS_EXT = 0x87CF, + GL_VERTEX_SHADER_VARIANTS_EXT = 0x87D0, + GL_VERTEX_SHADER_INVARIANTS_EXT = 0x87D1, + GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = 0x87D2, + GL_VERTEX_SHADER_LOCALS_EXT = 0x87D3, + GL_VERTEX_SHADER_OPTIMIZED_EXT = 0x87D4, + GL_X_EXT = 0x87D5, + GL_Y_EXT = 0x87D6, + GL_Z_EXT = 0x87D7, + GL_W_EXT = 0x87D8, + GL_NEGATIVE_X_EXT = 0x87D9, + GL_NEGATIVE_Y_EXT = 0x87DA, + GL_NEGATIVE_Z_EXT = 0x87DB, + GL_NEGATIVE_W_EXT = 0x87DC, + GL_ZERO_EXT = 0x87DD, + GL_ONE_EXT = 0x87DE, + GL_NEGATIVE_ONE_EXT = 0x87DF, + GL_NORMALIZED_RANGE_EXT = 0x87E0, + GL_FULL_RANGE_EXT = 0x87E1, + GL_CURRENT_VERTEX_EXT = 0x87E2, + GL_MVP_MATRIX_EXT = 0x87E3, + GL_VARIANT_VALUE_EXT = 0x87E4, + GL_VARIANT_DATATYPE_EXT = 0x87E5, + GL_VARIANT_ARRAY_STRIDE_EXT = 0x87E6, + GL_VARIANT_ARRAY_TYPE_EXT = 0x87E7, + GL_VARIANT_ARRAY_EXT = 0x87E8, + GL_VARIANT_ARRAY_POINTER_EXT = 0x87E9, + GL_INVARIANT_VALUE_EXT = 0x87EA, + GL_INVARIANT_DATATYPE_EXT = 0x87EB, + GL_LOCAL_CONSTANT_VALUE_EXT = 0x87EC, + GL_LOCAL_CONSTANT_DATATYPE_EXT = 0x87ED; + + private EXTVertexShader() {} + + public static void glBeginVertexShaderEXT() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBeginVertexShaderEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglBeginVertexShaderEXT(function_pointer); + } + static native void nglBeginVertexShaderEXT(long function_pointer); + + public static void glEndVertexShaderEXT() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEndVertexShaderEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglEndVertexShaderEXT(function_pointer); + } + static native void nglEndVertexShaderEXT(long function_pointer); + + public static void glBindVertexShaderEXT(int id) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindVertexShaderEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindVertexShaderEXT(id, function_pointer); + } + static native void nglBindVertexShaderEXT(int id, long function_pointer); + + public static int glGenVertexShadersEXT(int range) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenVertexShadersEXT; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglGenVertexShadersEXT(range, function_pointer); + return __result; + } + static native int nglGenVertexShadersEXT(int range, long function_pointer); + + public static void glDeleteVertexShaderEXT(int id) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteVertexShaderEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeleteVertexShaderEXT(id, function_pointer); + } + static native void nglDeleteVertexShaderEXT(int id, long function_pointer); + + public static void glShaderOp1EXT(int op, int res, int arg1) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glShaderOp1EXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglShaderOp1EXT(op, res, arg1, function_pointer); + } + static native void nglShaderOp1EXT(int op, int res, int arg1, long function_pointer); + + public static void glShaderOp2EXT(int op, int res, int arg1, int arg2) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glShaderOp2EXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglShaderOp2EXT(op, res, arg1, arg2, function_pointer); + } + static native void nglShaderOp2EXT(int op, int res, int arg1, int arg2, long function_pointer); + + public static void glShaderOp3EXT(int op, int res, int arg1, int arg2, int arg3) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glShaderOp3EXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglShaderOp3EXT(op, res, arg1, arg2, arg3, function_pointer); + } + static native void nglShaderOp3EXT(int op, int res, int arg1, int arg2, int arg3, long function_pointer); + + public static void glSwizzleEXT(int res, int in, int outX, int outY, int outZ, int outW) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSwizzleEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglSwizzleEXT(res, in, outX, outY, outZ, outW, function_pointer); + } + static native void nglSwizzleEXT(int res, int in, int outX, int outY, int outZ, int outW, long function_pointer); + + public static void glWriteMaskEXT(int res, int in, int outX, int outY, int outZ, int outW) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWriteMaskEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglWriteMaskEXT(res, in, outX, outY, outZ, outW, function_pointer); + } + static native void nglWriteMaskEXT(int res, int in, int outX, int outY, int outZ, int outW, long function_pointer); + + public static void glInsertComponentEXT(int res, int src, int num) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glInsertComponentEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglInsertComponentEXT(res, src, num, function_pointer); + } + static native void nglInsertComponentEXT(int res, int src, int num, long function_pointer); + + public static void glExtractComponentEXT(int res, int src, int num) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glExtractComponentEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglExtractComponentEXT(res, src, num, function_pointer); + } + static native void nglExtractComponentEXT(int res, int src, int num, long function_pointer); + + public static int glGenSymbolsEXT(int dataType, int storageType, int range, int components) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenSymbolsEXT; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglGenSymbolsEXT(dataType, storageType, range, components, function_pointer); + return __result; + } + static native int nglGenSymbolsEXT(int dataType, int storageType, int range, int components, long function_pointer); + + public static void glSetInvariantEXT(int id, DoubleBuffer pAddr) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSetInvariantEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pAddr, 4); + nglSetInvariantEXT(id, GL11.GL_DOUBLE, MemoryUtil.getAddress(pAddr), function_pointer); + } + public static void glSetInvariantEXT(int id, FloatBuffer pAddr) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSetInvariantEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pAddr, 4); + nglSetInvariantEXT(id, GL11.GL_FLOAT, MemoryUtil.getAddress(pAddr), function_pointer); + } + public static void glSetInvariantEXT(int id, boolean unsigned, ByteBuffer pAddr) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSetInvariantEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pAddr, 4); + nglSetInvariantEXT(id, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, MemoryUtil.getAddress(pAddr), function_pointer); + } + public static void glSetInvariantEXT(int id, boolean unsigned, IntBuffer pAddr) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSetInvariantEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pAddr, 4); + nglSetInvariantEXT(id, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, MemoryUtil.getAddress(pAddr), function_pointer); + } + public static void glSetInvariantEXT(int id, boolean unsigned, ShortBuffer pAddr) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSetInvariantEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pAddr, 4); + nglSetInvariantEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, MemoryUtil.getAddress(pAddr), function_pointer); + } + static native void nglSetInvariantEXT(int id, int type, long pAddr, long function_pointer); + + public static void glSetLocalConstantEXT(int id, DoubleBuffer pAddr) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSetLocalConstantEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pAddr, 4); + nglSetLocalConstantEXT(id, GL11.GL_DOUBLE, MemoryUtil.getAddress(pAddr), function_pointer); + } + public static void glSetLocalConstantEXT(int id, FloatBuffer pAddr) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSetLocalConstantEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pAddr, 4); + nglSetLocalConstantEXT(id, GL11.GL_FLOAT, MemoryUtil.getAddress(pAddr), function_pointer); + } + public static void glSetLocalConstantEXT(int id, boolean unsigned, ByteBuffer pAddr) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSetLocalConstantEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pAddr, 4); + nglSetLocalConstantEXT(id, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, MemoryUtil.getAddress(pAddr), function_pointer); + } + public static void glSetLocalConstantEXT(int id, boolean unsigned, IntBuffer pAddr) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSetLocalConstantEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pAddr, 4); + nglSetLocalConstantEXT(id, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, MemoryUtil.getAddress(pAddr), function_pointer); + } + public static void glSetLocalConstantEXT(int id, boolean unsigned, ShortBuffer pAddr) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSetLocalConstantEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pAddr, 4); + nglSetLocalConstantEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, MemoryUtil.getAddress(pAddr), function_pointer); + } + static native void nglSetLocalConstantEXT(int id, int type, long pAddr, long function_pointer); + + public static void glVariantEXT(int id, ByteBuffer pAddr) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVariantbvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pAddr, 4); + nglVariantbvEXT(id, MemoryUtil.getAddress(pAddr), function_pointer); + } + static native void nglVariantbvEXT(int id, long pAddr, long function_pointer); + + public static void glVariantEXT(int id, ShortBuffer pAddr) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVariantsvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pAddr, 4); + nglVariantsvEXT(id, MemoryUtil.getAddress(pAddr), function_pointer); + } + static native void nglVariantsvEXT(int id, long pAddr, long function_pointer); + + public static void glVariantEXT(int id, IntBuffer pAddr) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVariantivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pAddr, 4); + nglVariantivEXT(id, MemoryUtil.getAddress(pAddr), function_pointer); + } + static native void nglVariantivEXT(int id, long pAddr, long function_pointer); + + public static void glVariantEXT(int id, FloatBuffer pAddr) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVariantfvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pAddr, 4); + nglVariantfvEXT(id, MemoryUtil.getAddress(pAddr), function_pointer); + } + static native void nglVariantfvEXT(int id, long pAddr, long function_pointer); + + public static void glVariantEXT(int id, DoubleBuffer pAddr) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVariantdvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pAddr, 4); + nglVariantdvEXT(id, MemoryUtil.getAddress(pAddr), function_pointer); + } + static native void nglVariantdvEXT(int id, long pAddr, long function_pointer); + + public static void glVariantuEXT(int id, ByteBuffer pAddr) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVariantubvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pAddr, 4); + nglVariantubvEXT(id, MemoryUtil.getAddress(pAddr), function_pointer); + } + static native void nglVariantubvEXT(int id, long pAddr, long function_pointer); + + public static void glVariantuEXT(int id, ShortBuffer pAddr) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVariantusvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pAddr, 4); + nglVariantusvEXT(id, MemoryUtil.getAddress(pAddr), function_pointer); + } + static native void nglVariantusvEXT(int id, long pAddr, long function_pointer); + + public static void glVariantuEXT(int id, IntBuffer pAddr) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVariantuivEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pAddr, 4); + nglVariantuivEXT(id, MemoryUtil.getAddress(pAddr), function_pointer); + } + static native void nglVariantuivEXT(int id, long pAddr, long function_pointer); + + public static void glVariantPointerEXT(int id, int stride, DoubleBuffer pAddr) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVariantPointerEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pAddr); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).EXT_vertex_shader_glVariantPointerEXT_pAddr = pAddr; + nglVariantPointerEXT(id, GL11.GL_DOUBLE, stride, MemoryUtil.getAddress(pAddr), function_pointer); + } + public static void glVariantPointerEXT(int id, int stride, FloatBuffer pAddr) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVariantPointerEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pAddr); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).EXT_vertex_shader_glVariantPointerEXT_pAddr = pAddr; + nglVariantPointerEXT(id, GL11.GL_FLOAT, stride, MemoryUtil.getAddress(pAddr), function_pointer); + } + public static void glVariantPointerEXT(int id, boolean unsigned, int stride, ByteBuffer pAddr) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVariantPointerEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pAddr); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).EXT_vertex_shader_glVariantPointerEXT_pAddr = pAddr; + nglVariantPointerEXT(id, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, stride, MemoryUtil.getAddress(pAddr), function_pointer); + } + public static void glVariantPointerEXT(int id, boolean unsigned, int stride, IntBuffer pAddr) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVariantPointerEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pAddr); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).EXT_vertex_shader_glVariantPointerEXT_pAddr = pAddr; + nglVariantPointerEXT(id, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, stride, MemoryUtil.getAddress(pAddr), function_pointer); + } + public static void glVariantPointerEXT(int id, boolean unsigned, int stride, ShortBuffer pAddr) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVariantPointerEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pAddr); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).EXT_vertex_shader_glVariantPointerEXT_pAddr = pAddr; + nglVariantPointerEXT(id, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, stride, MemoryUtil.getAddress(pAddr), function_pointer); + } + static native void nglVariantPointerEXT(int id, int type, int stride, long pAddr, long function_pointer); + public static void glVariantPointerEXT(int id, int type, int stride, long pAddr_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVariantPointerEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOenabled(caps); + nglVariantPointerEXTBO(id, type, stride, pAddr_buffer_offset, function_pointer); + } + static native void nglVariantPointerEXTBO(int id, int type, int stride, long pAddr_buffer_offset, long function_pointer); + + public static void glEnableVariantClientStateEXT(int id) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEnableVariantClientStateEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglEnableVariantClientStateEXT(id, function_pointer); + } + static native void nglEnableVariantClientStateEXT(int id, long function_pointer); + + public static void glDisableVariantClientStateEXT(int id) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDisableVariantClientStateEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglDisableVariantClientStateEXT(id, function_pointer); + } + static native void nglDisableVariantClientStateEXT(int id, long function_pointer); + + public static int glBindLightParameterEXT(int light, int value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindLightParameterEXT; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglBindLightParameterEXT(light, value, function_pointer); + return __result; + } + static native int nglBindLightParameterEXT(int light, int value, long function_pointer); + + public static int glBindMaterialParameterEXT(int face, int value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindMaterialParameterEXT; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglBindMaterialParameterEXT(face, value, function_pointer); + return __result; + } + static native int nglBindMaterialParameterEXT(int face, int value, long function_pointer); + + public static int glBindTexGenParameterEXT(int unit, int coord, int value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindTexGenParameterEXT; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglBindTexGenParameterEXT(unit, coord, value, function_pointer); + return __result; + } + static native int nglBindTexGenParameterEXT(int unit, int coord, int value, long function_pointer); + + public static int glBindTextureUnitParameterEXT(int unit, int value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindTextureUnitParameterEXT; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglBindTextureUnitParameterEXT(unit, value, function_pointer); + return __result; + } + static native int nglBindTextureUnitParameterEXT(int unit, int value, long function_pointer); + + public static int glBindParameterEXT(int value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindParameterEXT; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglBindParameterEXT(value, function_pointer); + return __result; + } + static native int nglBindParameterEXT(int value, long function_pointer); + + public static boolean glIsVariantEnabledEXT(int id, int cap) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsVariantEnabledEXT; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsVariantEnabledEXT(id, cap, function_pointer); + return __result; + } + static native boolean nglIsVariantEnabledEXT(int id, int cap, long function_pointer); + + public static void glGetVariantBooleanEXT(int id, int value, ByteBuffer pbData) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVariantBooleanvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pbData, 4); + nglGetVariantBooleanvEXT(id, value, MemoryUtil.getAddress(pbData), function_pointer); + } + static native void nglGetVariantBooleanvEXT(int id, int value, long pbData, long function_pointer); + + public static void glGetVariantIntegerEXT(int id, int value, IntBuffer pbData) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVariantIntegervEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pbData, 4); + nglGetVariantIntegervEXT(id, value, MemoryUtil.getAddress(pbData), function_pointer); + } + static native void nglGetVariantIntegervEXT(int id, int value, long pbData, long function_pointer); + + public static void glGetVariantFloatEXT(int id, int value, FloatBuffer pbData) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVariantFloatvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pbData, 4); + nglGetVariantFloatvEXT(id, value, MemoryUtil.getAddress(pbData), function_pointer); + } + static native void nglGetVariantFloatvEXT(int id, int value, long pbData, long function_pointer); + + public static ByteBuffer glGetVariantPointerEXT(int id, int value, long result_size) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVariantPointervEXT; + BufferChecks.checkFunctionAddress(function_pointer); + ByteBuffer __result = nglGetVariantPointervEXT(id, value, result_size, function_pointer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + static native ByteBuffer nglGetVariantPointervEXT(int id, int value, long result_size, long function_pointer); + + public static void glGetInvariantBooleanEXT(int id, int value, ByteBuffer pbData) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetInvariantBooleanvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pbData, 4); + nglGetInvariantBooleanvEXT(id, value, MemoryUtil.getAddress(pbData), function_pointer); + } + static native void nglGetInvariantBooleanvEXT(int id, int value, long pbData, long function_pointer); + + public static void glGetInvariantIntegerEXT(int id, int value, IntBuffer pbData) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetInvariantIntegervEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pbData, 4); + nglGetInvariantIntegervEXT(id, value, MemoryUtil.getAddress(pbData), function_pointer); + } + static native void nglGetInvariantIntegervEXT(int id, int value, long pbData, long function_pointer); + + public static void glGetInvariantFloatEXT(int id, int value, FloatBuffer pbData) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetInvariantFloatvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pbData, 4); + nglGetInvariantFloatvEXT(id, value, MemoryUtil.getAddress(pbData), function_pointer); + } + static native void nglGetInvariantFloatvEXT(int id, int value, long pbData, long function_pointer); + + public static void glGetLocalConstantBooleanEXT(int id, int value, ByteBuffer pbData) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetLocalConstantBooleanvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pbData, 4); + nglGetLocalConstantBooleanvEXT(id, value, MemoryUtil.getAddress(pbData), function_pointer); + } + static native void nglGetLocalConstantBooleanvEXT(int id, int value, long pbData, long function_pointer); + + public static void glGetLocalConstantIntegerEXT(int id, int value, IntBuffer pbData) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetLocalConstantIntegervEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pbData, 4); + nglGetLocalConstantIntegervEXT(id, value, MemoryUtil.getAddress(pbData), function_pointer); + } + static native void nglGetLocalConstantIntegervEXT(int id, int value, long pbData, long function_pointer); + + public static void glGetLocalConstantFloatEXT(int id, int value, FloatBuffer pbData) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetLocalConstantFloatvEXT; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pbData, 4); + nglGetLocalConstantFloatvEXT(id, value, MemoryUtil.getAddress(pbData), function_pointer); + } + static native void nglGetLocalConstantFloatvEXT(int id, int value, long pbData, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTVertexWeighting.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTVertexWeighting.java new file mode 100644 index 0000000..de226cc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/EXTVertexWeighting.java @@ -0,0 +1,52 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTVertexWeighting { + + public static final int GL_MODELVIEW0_STACK_DEPTH_EXT = 0xBA3, + GL_MODELVIEW1_STACK_DEPTH_EXT = 0x8502, + GL_MODELVIEW0_MATRIX_EXT = 0xBA6, + GL_MODELVIEW1_MATRIX_EXT = 0x8506, + GL_VERTEX_WEIGHTING_EXT = 0x8509, + GL_MODELVIEW0_EXT = 0x1700, + GL_MODELVIEW1_EXT = 0x850A, + GL_CURRENT_VERTEX_WEIGHT_EXT = 0x850B, + GL_VERTEX_WEIGHT_ARRAY_EXT = 0x850C, + GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT = 0x850D, + GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT = 0x850E, + GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT = 0x850F, + GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT = 0x8510; + + private EXTVertexWeighting() {} + + public static void glVertexWeightfEXT(float weight) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexWeightfEXT; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexWeightfEXT(weight, function_pointer); + } + static native void nglVertexWeightfEXT(float weight, long function_pointer); + + public static void glVertexWeightPointerEXT(int size, int stride, FloatBuffer pPointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexWeightPointerEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pPointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).EXT_vertex_weighting_glVertexWeightPointerEXT_pPointer = pPointer; + nglVertexWeightPointerEXT(size, GL11.GL_FLOAT, stride, MemoryUtil.getAddress(pPointer), function_pointer); + } + static native void nglVertexWeightPointerEXT(int size, int type, int stride, long pPointer, long function_pointer); + public static void glVertexWeightPointerEXT(int size, int type, int stride, long pPointer_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexWeightPointerEXT; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOenabled(caps); + nglVertexWeightPointerEXTBO(size, type, stride, pPointer_buffer_offset, function_pointer); + } + static native void nglVertexWeightPointerEXTBO(int size, int type, int stride, long pPointer_buffer_offset, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL11.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL11.java new file mode 100644 index 0000000..6c35f52 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL11.java @@ -0,0 +1,3267 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +/** + * The core OpenGL1.1 API. + *

+ * @author cix_foo + * @version $Revision$ + * $Id$ + */ +public final class GL11 { + + public static final int GL_ACCUM = 0x100, + GL_LOAD = 0x101, + GL_RETURN = 0x102, + GL_MULT = 0x103, + GL_ADD = 0x104, + GL_NEVER = 0x200, + GL_LESS = 0x201, + GL_EQUAL = 0x202, + GL_LEQUAL = 0x203, + GL_GREATER = 0x204, + GL_NOTEQUAL = 0x205, + GL_GEQUAL = 0x206, + GL_ALWAYS = 0x207, + GL_CURRENT_BIT = 0x1, + GL_POINT_BIT = 0x2, + GL_LINE_BIT = 0x4, + GL_POLYGON_BIT = 0x8, + GL_POLYGON_STIPPLE_BIT = 0x10, + GL_PIXEL_MODE_BIT = 0x20, + GL_LIGHTING_BIT = 0x40, + GL_FOG_BIT = 0x80, + GL_DEPTH_BUFFER_BIT = 0x100, + GL_ACCUM_BUFFER_BIT = 0x200, + GL_STENCIL_BUFFER_BIT = 0x400, + GL_VIEWPORT_BIT = 0x800, + GL_TRANSFORM_BIT = 0x1000, + GL_ENABLE_BIT = 0x2000, + GL_COLOR_BUFFER_BIT = 0x4000, + GL_HINT_BIT = 0x8000, + GL_EVAL_BIT = 0x10000, + GL_LIST_BIT = 0x20000, + GL_TEXTURE_BIT = 0x40000, + GL_SCISSOR_BIT = 0x80000, + GL_ALL_ATTRIB_BITS = 0xFFFFF, + GL_POINTS = 0x0, + GL_LINES = 0x1, + GL_LINE_LOOP = 0x2, + GL_LINE_STRIP = 0x3, + GL_TRIANGLES = 0x4, + GL_TRIANGLE_STRIP = 0x5, + GL_TRIANGLE_FAN = 0x6, + GL_QUADS = 0x7, + GL_QUAD_STRIP = 0x8, + GL_POLYGON = 0x9, + GL_ZERO = 0x0, + GL_ONE = 0x1, + GL_SRC_COLOR = 0x300, + GL_ONE_MINUS_SRC_COLOR = 0x301, + GL_SRC_ALPHA = 0x302, + GL_ONE_MINUS_SRC_ALPHA = 0x303, + GL_DST_ALPHA = 0x304, + GL_ONE_MINUS_DST_ALPHA = 0x305, + GL_DST_COLOR = 0x306, + GL_ONE_MINUS_DST_COLOR = 0x307, + GL_SRC_ALPHA_SATURATE = 0x308, + GL_CONSTANT_COLOR = 0x8001, + GL_ONE_MINUS_CONSTANT_COLOR = 0x8002, + GL_CONSTANT_ALPHA = 0x8003, + GL_ONE_MINUS_CONSTANT_ALPHA = 0x8004, + GL_TRUE = 0x1, + GL_FALSE = 0x0, + GL_CLIP_PLANE0 = 0x3000, + GL_CLIP_PLANE1 = 0x3001, + GL_CLIP_PLANE2 = 0x3002, + GL_CLIP_PLANE3 = 0x3003, + GL_CLIP_PLANE4 = 0x3004, + GL_CLIP_PLANE5 = 0x3005, + GL_BYTE = 0x1400, + GL_UNSIGNED_BYTE = 0x1401, + GL_SHORT = 0x1402, + GL_UNSIGNED_SHORT = 0x1403, + GL_INT = 0x1404, + GL_UNSIGNED_INT = 0x1405, + GL_FLOAT = 0x1406, + GL_2_BYTES = 0x1407, + GL_3_BYTES = 0x1408, + GL_4_BYTES = 0x1409, + GL_DOUBLE = 0x140A, + GL_NONE = 0x0, + GL_FRONT_LEFT = 0x400, + GL_FRONT_RIGHT = 0x401, + GL_BACK_LEFT = 0x402, + GL_BACK_RIGHT = 0x403, + GL_FRONT = 0x404, + GL_BACK = 0x405, + GL_LEFT = 0x406, + GL_RIGHT = 0x407, + GL_FRONT_AND_BACK = 0x408, + GL_AUX0 = 0x409, + GL_AUX1 = 0x40A, + GL_AUX2 = 0x40B, + GL_AUX3 = 0x40C, + GL_NO_ERROR = 0x0, + GL_INVALID_ENUM = 0x500, + GL_INVALID_VALUE = 0x501, + GL_INVALID_OPERATION = 0x502, + GL_STACK_OVERFLOW = 0x503, + GL_STACK_UNDERFLOW = 0x504, + GL_OUT_OF_MEMORY = 0x505, + GL_2D = 0x600, + GL_3D = 0x601, + GL_3D_COLOR = 0x602, + GL_3D_COLOR_TEXTURE = 0x603, + GL_4D_COLOR_TEXTURE = 0x604, + GL_PASS_THROUGH_TOKEN = 0x700, + GL_POINT_TOKEN = 0x701, + GL_LINE_TOKEN = 0x702, + GL_POLYGON_TOKEN = 0x703, + GL_BITMAP_TOKEN = 0x704, + GL_DRAW_PIXEL_TOKEN = 0x705, + GL_COPY_PIXEL_TOKEN = 0x706, + GL_LINE_RESET_TOKEN = 0x707, + GL_EXP = 0x800, + GL_EXP2 = 0x801, + GL_CW = 0x900, + GL_CCW = 0x901, + GL_COEFF = 0xA00, + GL_ORDER = 0xA01, + GL_DOMAIN = 0xA02, + GL_CURRENT_COLOR = 0xB00, + GL_CURRENT_INDEX = 0xB01, + GL_CURRENT_NORMAL = 0xB02, + GL_CURRENT_TEXTURE_COORDS = 0xB03, + GL_CURRENT_RASTER_COLOR = 0xB04, + GL_CURRENT_RASTER_INDEX = 0xB05, + GL_CURRENT_RASTER_TEXTURE_COORDS = 0xB06, + GL_CURRENT_RASTER_POSITION = 0xB07, + GL_CURRENT_RASTER_POSITION_VALID = 0xB08, + GL_CURRENT_RASTER_DISTANCE = 0xB09, + GL_POINT_SMOOTH = 0xB10, + GL_POINT_SIZE = 0xB11, + GL_POINT_SIZE_RANGE = 0xB12, + GL_POINT_SIZE_GRANULARITY = 0xB13, + GL_LINE_SMOOTH = 0xB20, + GL_LINE_WIDTH = 0xB21, + GL_LINE_WIDTH_RANGE = 0xB22, + GL_LINE_WIDTH_GRANULARITY = 0xB23, + GL_LINE_STIPPLE = 0xB24, + GL_LINE_STIPPLE_PATTERN = 0xB25, + GL_LINE_STIPPLE_REPEAT = 0xB26, + GL_LIST_MODE = 0xB30, + GL_MAX_LIST_NESTING = 0xB31, + GL_LIST_BASE = 0xB32, + GL_LIST_INDEX = 0xB33, + GL_POLYGON_MODE = 0xB40, + GL_POLYGON_SMOOTH = 0xB41, + GL_POLYGON_STIPPLE = 0xB42, + GL_EDGE_FLAG = 0xB43, + GL_CULL_FACE = 0xB44, + GL_CULL_FACE_MODE = 0xB45, + GL_FRONT_FACE = 0xB46, + GL_LIGHTING = 0xB50, + GL_LIGHT_MODEL_LOCAL_VIEWER = 0xB51, + GL_LIGHT_MODEL_TWO_SIDE = 0xB52, + GL_LIGHT_MODEL_AMBIENT = 0xB53, + GL_SHADE_MODEL = 0xB54, + GL_COLOR_MATERIAL_FACE = 0xB55, + GL_COLOR_MATERIAL_PARAMETER = 0xB56, + GL_COLOR_MATERIAL = 0xB57, + GL_FOG = 0xB60, + GL_FOG_INDEX = 0xB61, + GL_FOG_DENSITY = 0xB62, + GL_FOG_START = 0xB63, + GL_FOG_END = 0xB64, + GL_FOG_MODE = 0xB65, + GL_FOG_COLOR = 0xB66, + GL_DEPTH_RANGE = 0xB70, + GL_DEPTH_TEST = 0xB71, + GL_DEPTH_WRITEMASK = 0xB72, + GL_DEPTH_CLEAR_VALUE = 0xB73, + GL_DEPTH_FUNC = 0xB74, + GL_ACCUM_CLEAR_VALUE = 0xB80, + GL_STENCIL_TEST = 0xB90, + GL_STENCIL_CLEAR_VALUE = 0xB91, + GL_STENCIL_FUNC = 0xB92, + GL_STENCIL_VALUE_MASK = 0xB93, + GL_STENCIL_FAIL = 0xB94, + GL_STENCIL_PASS_DEPTH_FAIL = 0xB95, + GL_STENCIL_PASS_DEPTH_PASS = 0xB96, + GL_STENCIL_REF = 0xB97, + GL_STENCIL_WRITEMASK = 0xB98, + GL_MATRIX_MODE = 0xBA0, + GL_NORMALIZE = 0xBA1, + GL_VIEWPORT = 0xBA2, + GL_MODELVIEW_STACK_DEPTH = 0xBA3, + GL_PROJECTION_STACK_DEPTH = 0xBA4, + GL_TEXTURE_STACK_DEPTH = 0xBA5, + GL_MODELVIEW_MATRIX = 0xBA6, + GL_PROJECTION_MATRIX = 0xBA7, + GL_TEXTURE_MATRIX = 0xBA8, + GL_ATTRIB_STACK_DEPTH = 0xBB0, + GL_CLIENT_ATTRIB_STACK_DEPTH = 0xBB1, + GL_ALPHA_TEST = 0xBC0, + GL_ALPHA_TEST_FUNC = 0xBC1, + GL_ALPHA_TEST_REF = 0xBC2, + GL_DITHER = 0xBD0, + GL_BLEND_DST = 0xBE0, + GL_BLEND_SRC = 0xBE1, + GL_BLEND = 0xBE2, + GL_LOGIC_OP_MODE = 0xBF0, + GL_INDEX_LOGIC_OP = 0xBF1, + GL_COLOR_LOGIC_OP = 0xBF2, + GL_AUX_BUFFERS = 0xC00, + GL_DRAW_BUFFER = 0xC01, + GL_READ_BUFFER = 0xC02, + GL_SCISSOR_BOX = 0xC10, + GL_SCISSOR_TEST = 0xC11, + GL_INDEX_CLEAR_VALUE = 0xC20, + GL_INDEX_WRITEMASK = 0xC21, + GL_COLOR_CLEAR_VALUE = 0xC22, + GL_COLOR_WRITEMASK = 0xC23, + GL_INDEX_MODE = 0xC30, + GL_RGBA_MODE = 0xC31, + GL_DOUBLEBUFFER = 0xC32, + GL_STEREO = 0xC33, + GL_RENDER_MODE = 0xC40, + GL_PERSPECTIVE_CORRECTION_HINT = 0xC50, + GL_POINT_SMOOTH_HINT = 0xC51, + GL_LINE_SMOOTH_HINT = 0xC52, + GL_POLYGON_SMOOTH_HINT = 0xC53, + GL_FOG_HINT = 0xC54, + GL_TEXTURE_GEN_S = 0xC60, + GL_TEXTURE_GEN_T = 0xC61, + GL_TEXTURE_GEN_R = 0xC62, + GL_TEXTURE_GEN_Q = 0xC63, + GL_PIXEL_MAP_I_TO_I = 0xC70, + GL_PIXEL_MAP_S_TO_S = 0xC71, + GL_PIXEL_MAP_I_TO_R = 0xC72, + GL_PIXEL_MAP_I_TO_G = 0xC73, + GL_PIXEL_MAP_I_TO_B = 0xC74, + GL_PIXEL_MAP_I_TO_A = 0xC75, + GL_PIXEL_MAP_R_TO_R = 0xC76, + GL_PIXEL_MAP_G_TO_G = 0xC77, + GL_PIXEL_MAP_B_TO_B = 0xC78, + GL_PIXEL_MAP_A_TO_A = 0xC79, + GL_PIXEL_MAP_I_TO_I_SIZE = 0xCB0, + GL_PIXEL_MAP_S_TO_S_SIZE = 0xCB1, + GL_PIXEL_MAP_I_TO_R_SIZE = 0xCB2, + GL_PIXEL_MAP_I_TO_G_SIZE = 0xCB3, + GL_PIXEL_MAP_I_TO_B_SIZE = 0xCB4, + GL_PIXEL_MAP_I_TO_A_SIZE = 0xCB5, + GL_PIXEL_MAP_R_TO_R_SIZE = 0xCB6, + GL_PIXEL_MAP_G_TO_G_SIZE = 0xCB7, + GL_PIXEL_MAP_B_TO_B_SIZE = 0xCB8, + GL_PIXEL_MAP_A_TO_A_SIZE = 0xCB9, + GL_UNPACK_SWAP_BYTES = 0xCF0, + GL_UNPACK_LSB_FIRST = 0xCF1, + GL_UNPACK_ROW_LENGTH = 0xCF2, + GL_UNPACK_SKIP_ROWS = 0xCF3, + GL_UNPACK_SKIP_PIXELS = 0xCF4, + GL_UNPACK_ALIGNMENT = 0xCF5, + GL_PACK_SWAP_BYTES = 0xD00, + GL_PACK_LSB_FIRST = 0xD01, + GL_PACK_ROW_LENGTH = 0xD02, + GL_PACK_SKIP_ROWS = 0xD03, + GL_PACK_SKIP_PIXELS = 0xD04, + GL_PACK_ALIGNMENT = 0xD05, + GL_MAP_COLOR = 0xD10, + GL_MAP_STENCIL = 0xD11, + GL_INDEX_SHIFT = 0xD12, + GL_INDEX_OFFSET = 0xD13, + GL_RED_SCALE = 0xD14, + GL_RED_BIAS = 0xD15, + GL_ZOOM_X = 0xD16, + GL_ZOOM_Y = 0xD17, + GL_GREEN_SCALE = 0xD18, + GL_GREEN_BIAS = 0xD19, + GL_BLUE_SCALE = 0xD1A, + GL_BLUE_BIAS = 0xD1B, + GL_ALPHA_SCALE = 0xD1C, + GL_ALPHA_BIAS = 0xD1D, + GL_DEPTH_SCALE = 0xD1E, + GL_DEPTH_BIAS = 0xD1F, + GL_MAX_EVAL_ORDER = 0xD30, + GL_MAX_LIGHTS = 0xD31, + GL_MAX_CLIP_PLANES = 0xD32, + GL_MAX_TEXTURE_SIZE = 0xD33, + GL_MAX_PIXEL_MAP_TABLE = 0xD34, + GL_MAX_ATTRIB_STACK_DEPTH = 0xD35, + GL_MAX_MODELVIEW_STACK_DEPTH = 0xD36, + GL_MAX_NAME_STACK_DEPTH = 0xD37, + GL_MAX_PROJECTION_STACK_DEPTH = 0xD38, + GL_MAX_TEXTURE_STACK_DEPTH = 0xD39, + GL_MAX_VIEWPORT_DIMS = 0xD3A, + GL_MAX_CLIENT_ATTRIB_STACK_DEPTH = 0xD3B, + GL_SUBPIXEL_BITS = 0xD50, + GL_INDEX_BITS = 0xD51, + GL_RED_BITS = 0xD52, + GL_GREEN_BITS = 0xD53, + GL_BLUE_BITS = 0xD54, + GL_ALPHA_BITS = 0xD55, + GL_DEPTH_BITS = 0xD56, + GL_STENCIL_BITS = 0xD57, + GL_ACCUM_RED_BITS = 0xD58, + GL_ACCUM_GREEN_BITS = 0xD59, + GL_ACCUM_BLUE_BITS = 0xD5A, + GL_ACCUM_ALPHA_BITS = 0xD5B, + GL_NAME_STACK_DEPTH = 0xD70, + GL_AUTO_NORMAL = 0xD80, + GL_MAP1_COLOR_4 = 0xD90, + GL_MAP1_INDEX = 0xD91, + GL_MAP1_NORMAL = 0xD92, + GL_MAP1_TEXTURE_COORD_1 = 0xD93, + GL_MAP1_TEXTURE_COORD_2 = 0xD94, + GL_MAP1_TEXTURE_COORD_3 = 0xD95, + GL_MAP1_TEXTURE_COORD_4 = 0xD96, + GL_MAP1_VERTEX_3 = 0xD97, + GL_MAP1_VERTEX_4 = 0xD98, + GL_MAP2_COLOR_4 = 0xDB0, + GL_MAP2_INDEX = 0xDB1, + GL_MAP2_NORMAL = 0xDB2, + GL_MAP2_TEXTURE_COORD_1 = 0xDB3, + GL_MAP2_TEXTURE_COORD_2 = 0xDB4, + GL_MAP2_TEXTURE_COORD_3 = 0xDB5, + GL_MAP2_TEXTURE_COORD_4 = 0xDB6, + GL_MAP2_VERTEX_3 = 0xDB7, + GL_MAP2_VERTEX_4 = 0xDB8, + GL_MAP1_GRID_DOMAIN = 0xDD0, + GL_MAP1_GRID_SEGMENTS = 0xDD1, + GL_MAP2_GRID_DOMAIN = 0xDD2, + GL_MAP2_GRID_SEGMENTS = 0xDD3, + GL_TEXTURE_1D = 0xDE0, + GL_TEXTURE_2D = 0xDE1, + GL_FEEDBACK_BUFFER_POINTER = 0xDF0, + GL_FEEDBACK_BUFFER_SIZE = 0xDF1, + GL_FEEDBACK_BUFFER_TYPE = 0xDF2, + GL_SELECTION_BUFFER_POINTER = 0xDF3, + GL_SELECTION_BUFFER_SIZE = 0xDF4, + GL_TEXTURE_WIDTH = 0x1000, + GL_TEXTURE_HEIGHT = 0x1001, + GL_TEXTURE_INTERNAL_FORMAT = 0x1003, + GL_TEXTURE_BORDER_COLOR = 0x1004, + GL_TEXTURE_BORDER = 0x1005, + GL_DONT_CARE = 0x1100, + GL_FASTEST = 0x1101, + GL_NICEST = 0x1102, + GL_LIGHT0 = 0x4000, + GL_LIGHT1 = 0x4001, + GL_LIGHT2 = 0x4002, + GL_LIGHT3 = 0x4003, + GL_LIGHT4 = 0x4004, + GL_LIGHT5 = 0x4005, + GL_LIGHT6 = 0x4006, + GL_LIGHT7 = 0x4007, + GL_AMBIENT = 0x1200, + GL_DIFFUSE = 0x1201, + GL_SPECULAR = 0x1202, + GL_POSITION = 0x1203, + GL_SPOT_DIRECTION = 0x1204, + GL_SPOT_EXPONENT = 0x1205, + GL_SPOT_CUTOFF = 0x1206, + GL_CONSTANT_ATTENUATION = 0x1207, + GL_LINEAR_ATTENUATION = 0x1208, + GL_QUADRATIC_ATTENUATION = 0x1209, + GL_COMPILE = 0x1300, + GL_COMPILE_AND_EXECUTE = 0x1301, + GL_CLEAR = 0x1500, + GL_AND = 0x1501, + GL_AND_REVERSE = 0x1502, + GL_COPY = 0x1503, + GL_AND_INVERTED = 0x1504, + GL_NOOP = 0x1505, + GL_XOR = 0x1506, + GL_OR = 0x1507, + GL_NOR = 0x1508, + GL_EQUIV = 0x1509, + GL_INVERT = 0x150A, + GL_OR_REVERSE = 0x150B, + GL_COPY_INVERTED = 0x150C, + GL_OR_INVERTED = 0x150D, + GL_NAND = 0x150E, + GL_SET = 0x150F, + GL_EMISSION = 0x1600, + GL_SHININESS = 0x1601, + GL_AMBIENT_AND_DIFFUSE = 0x1602, + GL_COLOR_INDEXES = 0x1603, + GL_MODELVIEW = 0x1700, + GL_PROJECTION = 0x1701, + GL_TEXTURE = 0x1702, + GL_COLOR = 0x1800, + GL_DEPTH = 0x1801, + GL_STENCIL = 0x1802, + GL_COLOR_INDEX = 0x1900, + GL_STENCIL_INDEX = 0x1901, + GL_DEPTH_COMPONENT = 0x1902, + GL_RED = 0x1903, + GL_GREEN = 0x1904, + GL_BLUE = 0x1905, + GL_ALPHA = 0x1906, + GL_RGB = 0x1907, + GL_RGBA = 0x1908, + GL_LUMINANCE = 0x1909, + GL_LUMINANCE_ALPHA = 0x190A, + GL_BITMAP = 0x1A00, + GL_POINT = 0x1B00, + GL_LINE = 0x1B01, + GL_FILL = 0x1B02, + GL_RENDER = 0x1C00, + GL_FEEDBACK = 0x1C01, + GL_SELECT = 0x1C02, + GL_FLAT = 0x1D00, + GL_SMOOTH = 0x1D01, + GL_KEEP = 0x1E00, + GL_REPLACE = 0x1E01, + GL_INCR = 0x1E02, + GL_DECR = 0x1E03, + GL_VENDOR = 0x1F00, + GL_RENDERER = 0x1F01, + GL_VERSION = 0x1F02, + GL_EXTENSIONS = 0x1F03, + GL_S = 0x2000, + GL_T = 0x2001, + GL_R = 0x2002, + GL_Q = 0x2003, + GL_MODULATE = 0x2100, + GL_DECAL = 0x2101, + GL_TEXTURE_ENV_MODE = 0x2200, + GL_TEXTURE_ENV_COLOR = 0x2201, + GL_TEXTURE_ENV = 0x2300, + GL_EYE_LINEAR = 0x2400, + GL_OBJECT_LINEAR = 0x2401, + GL_SPHERE_MAP = 0x2402, + GL_TEXTURE_GEN_MODE = 0x2500, + GL_OBJECT_PLANE = 0x2501, + GL_EYE_PLANE = 0x2502, + GL_NEAREST = 0x2600, + GL_LINEAR = 0x2601, + GL_NEAREST_MIPMAP_NEAREST = 0x2700, + GL_LINEAR_MIPMAP_NEAREST = 0x2701, + GL_NEAREST_MIPMAP_LINEAR = 0x2702, + GL_LINEAR_MIPMAP_LINEAR = 0x2703, + GL_TEXTURE_MAG_FILTER = 0x2800, + GL_TEXTURE_MIN_FILTER = 0x2801, + GL_TEXTURE_WRAP_S = 0x2802, + GL_TEXTURE_WRAP_T = 0x2803, + GL_CLAMP = 0x2900, + GL_REPEAT = 0x2901, + GL_CLIENT_PIXEL_STORE_BIT = 0x1, + GL_CLIENT_VERTEX_ARRAY_BIT = 0x2, + GL_ALL_CLIENT_ATTRIB_BITS = 0xFFFFFFFF, + GL_POLYGON_OFFSET_FACTOR = 0x8038, + GL_POLYGON_OFFSET_UNITS = 0x2A00, + GL_POLYGON_OFFSET_POINT = 0x2A01, + GL_POLYGON_OFFSET_LINE = 0x2A02, + GL_POLYGON_OFFSET_FILL = 0x8037, + GL_ALPHA4 = 0x803B, + GL_ALPHA8 = 0x803C, + GL_ALPHA12 = 0x803D, + GL_ALPHA16 = 0x803E, + GL_LUMINANCE4 = 0x803F, + GL_LUMINANCE8 = 0x8040, + GL_LUMINANCE12 = 0x8041, + GL_LUMINANCE16 = 0x8042, + GL_LUMINANCE4_ALPHA4 = 0x8043, + GL_LUMINANCE6_ALPHA2 = 0x8044, + GL_LUMINANCE8_ALPHA8 = 0x8045, + GL_LUMINANCE12_ALPHA4 = 0x8046, + GL_LUMINANCE12_ALPHA12 = 0x8047, + GL_LUMINANCE16_ALPHA16 = 0x8048, + GL_INTENSITY = 0x8049, + GL_INTENSITY4 = 0x804A, + GL_INTENSITY8 = 0x804B, + GL_INTENSITY12 = 0x804C, + GL_INTENSITY16 = 0x804D, + GL_R3_G3_B2 = 0x2A10, + GL_RGB4 = 0x804F, + GL_RGB5 = 0x8050, + GL_RGB8 = 0x8051, + GL_RGB10 = 0x8052, + GL_RGB12 = 0x8053, + GL_RGB16 = 0x8054, + GL_RGBA2 = 0x8055, + GL_RGBA4 = 0x8056, + GL_RGB5_A1 = 0x8057, + GL_RGBA8 = 0x8058, + GL_RGB10_A2 = 0x8059, + GL_RGBA12 = 0x805A, + GL_RGBA16 = 0x805B, + GL_TEXTURE_RED_SIZE = 0x805C, + GL_TEXTURE_GREEN_SIZE = 0x805D, + GL_TEXTURE_BLUE_SIZE = 0x805E, + GL_TEXTURE_ALPHA_SIZE = 0x805F, + GL_TEXTURE_LUMINANCE_SIZE = 0x8060, + GL_TEXTURE_INTENSITY_SIZE = 0x8061, + GL_PROXY_TEXTURE_1D = 0x8063, + GL_PROXY_TEXTURE_2D = 0x8064, + GL_TEXTURE_PRIORITY = 0x8066, + GL_TEXTURE_RESIDENT = 0x8067, + GL_TEXTURE_BINDING_1D = 0x8068, + GL_TEXTURE_BINDING_2D = 0x8069, + GL_VERTEX_ARRAY = 0x8074, + GL_NORMAL_ARRAY = 0x8075, + GL_COLOR_ARRAY = 0x8076, + GL_INDEX_ARRAY = 0x8077, + GL_TEXTURE_COORD_ARRAY = 0x8078, + GL_EDGE_FLAG_ARRAY = 0x8079, + GL_VERTEX_ARRAY_SIZE = 0x807A, + GL_VERTEX_ARRAY_TYPE = 0x807B, + GL_VERTEX_ARRAY_STRIDE = 0x807C, + GL_NORMAL_ARRAY_TYPE = 0x807E, + GL_NORMAL_ARRAY_STRIDE = 0x807F, + GL_COLOR_ARRAY_SIZE = 0x8081, + GL_COLOR_ARRAY_TYPE = 0x8082, + GL_COLOR_ARRAY_STRIDE = 0x8083, + GL_INDEX_ARRAY_TYPE = 0x8085, + GL_INDEX_ARRAY_STRIDE = 0x8086, + GL_TEXTURE_COORD_ARRAY_SIZE = 0x8088, + GL_TEXTURE_COORD_ARRAY_TYPE = 0x8089, + GL_TEXTURE_COORD_ARRAY_STRIDE = 0x808A, + GL_EDGE_FLAG_ARRAY_STRIDE = 0x808C, + GL_VERTEX_ARRAY_POINTER = 0x808E, + GL_NORMAL_ARRAY_POINTER = 0x808F, + GL_COLOR_ARRAY_POINTER = 0x8090, + GL_INDEX_ARRAY_POINTER = 0x8091, + GL_TEXTURE_COORD_ARRAY_POINTER = 0x8092, + GL_EDGE_FLAG_ARRAY_POINTER = 0x8093, + GL_V2F = 0x2A20, + GL_V3F = 0x2A21, + GL_C4UB_V2F = 0x2A22, + GL_C4UB_V3F = 0x2A23, + GL_C3F_V3F = 0x2A24, + GL_N3F_V3F = 0x2A25, + GL_C4F_N3F_V3F = 0x2A26, + GL_T2F_V3F = 0x2A27, + GL_T4F_V4F = 0x2A28, + GL_T2F_C4UB_V3F = 0x2A29, + GL_T2F_C3F_V3F = 0x2A2A, + GL_T2F_N3F_V3F = 0x2A2B, + GL_T2F_C4F_N3F_V3F = 0x2A2C, + GL_T4F_C4F_N3F_V4F = 0x2A2D, + GL_LOGIC_OP = 0xBF1, + GL_TEXTURE_COMPONENTS = 0x1003; + + private GL11() {} + + public static void glAccum(int op, float value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glAccum; + BufferChecks.checkFunctionAddress(function_pointer); + nglAccum(op, value, function_pointer); + } + static native void nglAccum(int op, float value, long function_pointer); + + public static void glAlphaFunc(int func, float ref) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glAlphaFunc; + BufferChecks.checkFunctionAddress(function_pointer); + nglAlphaFunc(func, ref, function_pointer); + } + static native void nglAlphaFunc(int func, float ref, long function_pointer); + + public static void glClearColor(float red, float green, float blue, float alpha) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClearColor; + BufferChecks.checkFunctionAddress(function_pointer); + nglClearColor(red, green, blue, alpha, function_pointer); + } + static native void nglClearColor(float red, float green, float blue, float alpha, long function_pointer); + + public static void glClearAccum(float red, float green, float blue, float alpha) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClearAccum; + BufferChecks.checkFunctionAddress(function_pointer); + nglClearAccum(red, green, blue, alpha, function_pointer); + } + static native void nglClearAccum(float red, float green, float blue, float alpha, long function_pointer); + + public static void glClear(int mask) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClear; + BufferChecks.checkFunctionAddress(function_pointer); + nglClear(mask, function_pointer); + } + static native void nglClear(int mask, long function_pointer); + + public static void glCallLists(ByteBuffer lists) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCallLists; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(lists); + nglCallLists(lists.remaining(), GL11.GL_UNSIGNED_BYTE, MemoryUtil.getAddress(lists), function_pointer); + } + public static void glCallLists(IntBuffer lists) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCallLists; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(lists); + nglCallLists(lists.remaining(), GL11.GL_UNSIGNED_INT, MemoryUtil.getAddress(lists), function_pointer); + } + public static void glCallLists(ShortBuffer lists) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCallLists; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(lists); + nglCallLists(lists.remaining(), GL11.GL_UNSIGNED_SHORT, MemoryUtil.getAddress(lists), function_pointer); + } + static native void nglCallLists(int lists_n, int type, long lists, long function_pointer); + + public static void glCallList(int list) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCallList; + BufferChecks.checkFunctionAddress(function_pointer); + nglCallList(list, function_pointer); + } + static native void nglCallList(int list, long function_pointer); + + public static void glBlendFunc(int sfactor, int dfactor) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBlendFunc; + BufferChecks.checkFunctionAddress(function_pointer); + nglBlendFunc(sfactor, dfactor, function_pointer); + } + static native void nglBlendFunc(int sfactor, int dfactor, long function_pointer); + + public static void glBitmap(int width, int height, float xorig, float yorig, float xmove, float ymove, ByteBuffer bitmap) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBitmap; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (bitmap != null) + BufferChecks.checkBuffer(bitmap, (((width + 7)/8)*height)); + nglBitmap(width, height, xorig, yorig, xmove, ymove, MemoryUtil.getAddressSafe(bitmap), function_pointer); + } + static native void nglBitmap(int width, int height, float xorig, float yorig, float xmove, float ymove, long bitmap, long function_pointer); + public static void glBitmap(int width, int height, float xorig, float yorig, float xmove, float ymove, long bitmap_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBitmap; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglBitmapBO(width, height, xorig, yorig, xmove, ymove, bitmap_buffer_offset, function_pointer); + } + static native void nglBitmapBO(int width, int height, float xorig, float yorig, float xmove, float ymove, long bitmap_buffer_offset, long function_pointer); + + public static void glBindTexture(int target, int texture) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindTexture; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindTexture(target, texture, function_pointer); + } + static native void nglBindTexture(int target, int texture, long function_pointer); + + public static void glPrioritizeTextures(IntBuffer textures, FloatBuffer priorities) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPrioritizeTextures; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(textures); + BufferChecks.checkBuffer(priorities, textures.remaining()); + nglPrioritizeTextures(textures.remaining(), MemoryUtil.getAddress(textures), MemoryUtil.getAddress(priorities), function_pointer); + } + static native void nglPrioritizeTextures(int textures_n, long textures, long priorities, long function_pointer); + + public static boolean glAreTexturesResident(IntBuffer textures, ByteBuffer residences) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glAreTexturesResident; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(textures); + BufferChecks.checkBuffer(residences, textures.remaining()); + boolean __result = nglAreTexturesResident(textures.remaining(), MemoryUtil.getAddress(textures), MemoryUtil.getAddress(residences), function_pointer); + return __result; + } + static native boolean nglAreTexturesResident(int textures_n, long textures, long residences, long function_pointer); + + public static void glBegin(int mode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBegin; + BufferChecks.checkFunctionAddress(function_pointer); + if ( ContextCapabilities.DEBUG ) StateTracker.setBeginEnd(caps, true); + nglBegin(mode, function_pointer); + } + static native void nglBegin(int mode, long function_pointer); + + public static void glEnd() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEnd; + BufferChecks.checkFunctionAddress(function_pointer); + if ( ContextCapabilities.DEBUG ) StateTracker.setBeginEnd(caps, false); + nglEnd(function_pointer); + } + static native void nglEnd(long function_pointer); + + public static void glArrayElement(int i) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glArrayElement; + BufferChecks.checkFunctionAddress(function_pointer); + nglArrayElement(i, function_pointer); + } + static native void nglArrayElement(int i, long function_pointer); + + public static void glClearDepth(double depth) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClearDepth; + BufferChecks.checkFunctionAddress(function_pointer); + nglClearDepth(depth, function_pointer); + } + static native void nglClearDepth(double depth, long function_pointer); + + public static void glDeleteLists(int list, int range) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteLists; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeleteLists(list, range, function_pointer); + } + static native void nglDeleteLists(int list, int range, long function_pointer); + + public static void glDeleteTextures(IntBuffer textures) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteTextures; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(textures); + nglDeleteTextures(textures.remaining(), MemoryUtil.getAddress(textures), function_pointer); + } + static native void nglDeleteTextures(int textures_n, long textures, long function_pointer); + + /** Overloads glDeleteTextures. */ + public static void glDeleteTextures(int texture) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteTextures; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeleteTextures(1, APIUtil.getInt(caps, texture), function_pointer); + } + + public static void glCullFace(int mode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCullFace; + BufferChecks.checkFunctionAddress(function_pointer); + nglCullFace(mode, function_pointer); + } + static native void nglCullFace(int mode, long function_pointer); + + public static void glCopyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y, int width, int height) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCopyTexSubImage2D; + BufferChecks.checkFunctionAddress(function_pointer); + nglCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height, function_pointer); + } + static native void nglCopyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y, int width, int height, long function_pointer); + + public static void glCopyTexSubImage1D(int target, int level, int xoffset, int x, int y, int width) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCopyTexSubImage1D; + BufferChecks.checkFunctionAddress(function_pointer); + nglCopyTexSubImage1D(target, level, xoffset, x, y, width, function_pointer); + } + static native void nglCopyTexSubImage1D(int target, int level, int xoffset, int x, int y, int width, long function_pointer); + + public static void glCopyTexImage2D(int target, int level, int internalFormat, int x, int y, int width, int height, int border) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCopyTexImage2D; + BufferChecks.checkFunctionAddress(function_pointer); + nglCopyTexImage2D(target, level, internalFormat, x, y, width, height, border, function_pointer); + } + static native void nglCopyTexImage2D(int target, int level, int internalFormat, int x, int y, int width, int height, int border, long function_pointer); + + public static void glCopyTexImage1D(int target, int level, int internalFormat, int x, int y, int width, int border) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCopyTexImage1D; + BufferChecks.checkFunctionAddress(function_pointer); + nglCopyTexImage1D(target, level, internalFormat, x, y, width, border, function_pointer); + } + static native void nglCopyTexImage1D(int target, int level, int internalFormat, int x, int y, int width, int border, long function_pointer); + + public static void glCopyPixels(int x, int y, int width, int height, int type) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCopyPixels; + BufferChecks.checkFunctionAddress(function_pointer); + nglCopyPixels(x, y, width, height, type, function_pointer); + } + static native void nglCopyPixels(int x, int y, int width, int height, int type, long function_pointer); + + public static void glColorPointer(int size, int stride, DoubleBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).GL11_glColorPointer_pointer = pointer; + nglColorPointer(size, GL11.GL_DOUBLE, stride, MemoryUtil.getAddress(pointer), function_pointer); + } + public static void glColorPointer(int size, int stride, FloatBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).GL11_glColorPointer_pointer = pointer; + nglColorPointer(size, GL11.GL_FLOAT, stride, MemoryUtil.getAddress(pointer), function_pointer); + } + public static void glColorPointer(int size, boolean unsigned, int stride, ByteBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).GL11_glColorPointer_pointer = pointer; + nglColorPointer(size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, stride, MemoryUtil.getAddress(pointer), function_pointer); + } + static native void nglColorPointer(int size, int type, int stride, long pointer, long function_pointer); + public static void glColorPointer(int size, int type, int stride, long pointer_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOenabled(caps); + nglColorPointerBO(size, type, stride, pointer_buffer_offset, function_pointer); + } + static native void nglColorPointerBO(int size, int type, int stride, long pointer_buffer_offset, long function_pointer); + + /** Overloads glColorPointer. */ + public static void glColorPointer(int size, int type, int stride, ByteBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).GL11_glColorPointer_pointer = pointer; + nglColorPointer(size, type, stride, MemoryUtil.getAddress(pointer), function_pointer); + } + + public static void glColorMaterial(int face, int mode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorMaterial; + BufferChecks.checkFunctionAddress(function_pointer); + nglColorMaterial(face, mode, function_pointer); + } + static native void nglColorMaterial(int face, int mode, long function_pointer); + + public static void glColorMask(boolean red, boolean green, boolean blue, boolean alpha) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorMask; + BufferChecks.checkFunctionAddress(function_pointer); + nglColorMask(red, green, blue, alpha, function_pointer); + } + static native void nglColorMask(boolean red, boolean green, boolean blue, boolean alpha, long function_pointer); + + public static void glColor3b(byte red, byte green, byte blue) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColor3b; + BufferChecks.checkFunctionAddress(function_pointer); + nglColor3b(red, green, blue, function_pointer); + } + static native void nglColor3b(byte red, byte green, byte blue, long function_pointer); + + public static void glColor3f(float red, float green, float blue) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColor3f; + BufferChecks.checkFunctionAddress(function_pointer); + nglColor3f(red, green, blue, function_pointer); + } + static native void nglColor3f(float red, float green, float blue, long function_pointer); + + public static void glColor3d(double red, double green, double blue) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColor3d; + BufferChecks.checkFunctionAddress(function_pointer); + nglColor3d(red, green, blue, function_pointer); + } + static native void nglColor3d(double red, double green, double blue, long function_pointer); + + public static void glColor3ub(byte red, byte green, byte blue) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColor3ub; + BufferChecks.checkFunctionAddress(function_pointer); + nglColor3ub(red, green, blue, function_pointer); + } + static native void nglColor3ub(byte red, byte green, byte blue, long function_pointer); + + public static void glColor4b(byte red, byte green, byte blue, byte alpha) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColor4b; + BufferChecks.checkFunctionAddress(function_pointer); + nglColor4b(red, green, blue, alpha, function_pointer); + } + static native void nglColor4b(byte red, byte green, byte blue, byte alpha, long function_pointer); + + public static void glColor4f(float red, float green, float blue, float alpha) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColor4f; + BufferChecks.checkFunctionAddress(function_pointer); + nglColor4f(red, green, blue, alpha, function_pointer); + } + static native void nglColor4f(float red, float green, float blue, float alpha, long function_pointer); + + public static void glColor4d(double red, double green, double blue, double alpha) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColor4d; + BufferChecks.checkFunctionAddress(function_pointer); + nglColor4d(red, green, blue, alpha, function_pointer); + } + static native void nglColor4d(double red, double green, double blue, double alpha, long function_pointer); + + public static void glColor4ub(byte red, byte green, byte blue, byte alpha) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColor4ub; + BufferChecks.checkFunctionAddress(function_pointer); + nglColor4ub(red, green, blue, alpha, function_pointer); + } + static native void nglColor4ub(byte red, byte green, byte blue, byte alpha, long function_pointer); + + public static void glClipPlane(int plane, DoubleBuffer equation) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClipPlane; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(equation, 4); + nglClipPlane(plane, MemoryUtil.getAddress(equation), function_pointer); + } + static native void nglClipPlane(int plane, long equation, long function_pointer); + + public static void glClearStencil(int s) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClearStencil; + BufferChecks.checkFunctionAddress(function_pointer); + nglClearStencil(s, function_pointer); + } + static native void nglClearStencil(int s, long function_pointer); + + public static void glEvalPoint1(int i) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEvalPoint1; + BufferChecks.checkFunctionAddress(function_pointer); + nglEvalPoint1(i, function_pointer); + } + static native void nglEvalPoint1(int i, long function_pointer); + + public static void glEvalPoint2(int i, int j) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEvalPoint2; + BufferChecks.checkFunctionAddress(function_pointer); + nglEvalPoint2(i, j, function_pointer); + } + static native void nglEvalPoint2(int i, int j, long function_pointer); + + public static void glEvalMesh1(int mode, int i1, int i2) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEvalMesh1; + BufferChecks.checkFunctionAddress(function_pointer); + nglEvalMesh1(mode, i1, i2, function_pointer); + } + static native void nglEvalMesh1(int mode, int i1, int i2, long function_pointer); + + public static void glEvalMesh2(int mode, int i1, int i2, int j1, int j2) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEvalMesh2; + BufferChecks.checkFunctionAddress(function_pointer); + nglEvalMesh2(mode, i1, i2, j1, j2, function_pointer); + } + static native void nglEvalMesh2(int mode, int i1, int i2, int j1, int j2, long function_pointer); + + public static void glEvalCoord1f(float u) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEvalCoord1f; + BufferChecks.checkFunctionAddress(function_pointer); + nglEvalCoord1f(u, function_pointer); + } + static native void nglEvalCoord1f(float u, long function_pointer); + + public static void glEvalCoord1d(double u) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEvalCoord1d; + BufferChecks.checkFunctionAddress(function_pointer); + nglEvalCoord1d(u, function_pointer); + } + static native void nglEvalCoord1d(double u, long function_pointer); + + public static void glEvalCoord2f(float u, float v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEvalCoord2f; + BufferChecks.checkFunctionAddress(function_pointer); + nglEvalCoord2f(u, v, function_pointer); + } + static native void nglEvalCoord2f(float u, float v, long function_pointer); + + public static void glEvalCoord2d(double u, double v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEvalCoord2d; + BufferChecks.checkFunctionAddress(function_pointer); + nglEvalCoord2d(u, v, function_pointer); + } + static native void nglEvalCoord2d(double u, double v, long function_pointer); + + public static void glEnableClientState(int cap) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEnableClientState; + BufferChecks.checkFunctionAddress(function_pointer); + nglEnableClientState(cap, function_pointer); + } + static native void nglEnableClientState(int cap, long function_pointer); + + public static void glDisableClientState(int cap) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDisableClientState; + BufferChecks.checkFunctionAddress(function_pointer); + nglDisableClientState(cap, function_pointer); + } + static native void nglDisableClientState(int cap, long function_pointer); + + public static void glEnable(int cap) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEnable; + BufferChecks.checkFunctionAddress(function_pointer); + nglEnable(cap, function_pointer); + } + static native void nglEnable(int cap, long function_pointer); + + public static void glDisable(int cap) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDisable; + BufferChecks.checkFunctionAddress(function_pointer); + nglDisable(cap, function_pointer); + } + static native void nglDisable(int cap, long function_pointer); + + public static void glEdgeFlagPointer(int stride, ByteBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEdgeFlagPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).GL11_glEdgeFlagPointer_pointer = pointer; + nglEdgeFlagPointer(stride, MemoryUtil.getAddress(pointer), function_pointer); + } + static native void nglEdgeFlagPointer(int stride, long pointer, long function_pointer); + public static void glEdgeFlagPointer(int stride, long pointer_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEdgeFlagPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOenabled(caps); + nglEdgeFlagPointerBO(stride, pointer_buffer_offset, function_pointer); + } + static native void nglEdgeFlagPointerBO(int stride, long pointer_buffer_offset, long function_pointer); + + public static void glEdgeFlag(boolean flag) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEdgeFlag; + BufferChecks.checkFunctionAddress(function_pointer); + nglEdgeFlag(flag, function_pointer); + } + static native void nglEdgeFlag(boolean flag, long function_pointer); + + public static void glDrawPixels(int width, int height, int format, int type, ByteBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawPixels; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglDrawPixels(width, height, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glDrawPixels(int width, int height, int format, int type, IntBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawPixels; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglDrawPixels(width, height, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glDrawPixels(int width, int height, int format, int type, ShortBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawPixels; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglDrawPixels(width, height, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + static native void nglDrawPixels(int width, int height, int format, int type, long pixels, long function_pointer); + public static void glDrawPixels(int width, int height, int format, int type, long pixels_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawPixels; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglDrawPixelsBO(width, height, format, type, pixels_buffer_offset, function_pointer); + } + static native void nglDrawPixelsBO(int width, int height, int format, int type, long pixels_buffer_offset, long function_pointer); + + public static void glDrawElements(int mode, ByteBuffer indices) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElements; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawElements(mode, indices.remaining(), GL11.GL_UNSIGNED_BYTE, MemoryUtil.getAddress(indices), function_pointer); + } + public static void glDrawElements(int mode, IntBuffer indices) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElements; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawElements(mode, indices.remaining(), GL11.GL_UNSIGNED_INT, MemoryUtil.getAddress(indices), function_pointer); + } + public static void glDrawElements(int mode, ShortBuffer indices) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElements; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawElements(mode, indices.remaining(), GL11.GL_UNSIGNED_SHORT, MemoryUtil.getAddress(indices), function_pointer); + } + static native void nglDrawElements(int mode, int indices_count, int type, long indices, long function_pointer); + public static void glDrawElements(int mode, int indices_count, int type, long indices_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElements; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOenabled(caps); + nglDrawElementsBO(mode, indices_count, type, indices_buffer_offset, function_pointer); + } + static native void nglDrawElementsBO(int mode, int indices_count, int type, long indices_buffer_offset, long function_pointer); + + /** Overloads glDrawElements. */ + public static void glDrawElements(int mode, int count, int type, ByteBuffer indices) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElements; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkBuffer(indices, count); + nglDrawElements(mode, count, type, MemoryUtil.getAddress(indices), function_pointer); + } + + public static void glDrawBuffer(int mode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + nglDrawBuffer(mode, function_pointer); + } + static native void nglDrawBuffer(int mode, long function_pointer); + + public static void glDrawArrays(int mode, int first, int count) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawArrays; + BufferChecks.checkFunctionAddress(function_pointer); + nglDrawArrays(mode, first, count, function_pointer); + } + static native void nglDrawArrays(int mode, int first, int count, long function_pointer); + + public static void glDepthRange(double zNear, double zFar) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDepthRange; + BufferChecks.checkFunctionAddress(function_pointer); + nglDepthRange(zNear, zFar, function_pointer); + } + static native void nglDepthRange(double zNear, double zFar, long function_pointer); + + public static void glDepthMask(boolean flag) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDepthMask; + BufferChecks.checkFunctionAddress(function_pointer); + nglDepthMask(flag, function_pointer); + } + static native void nglDepthMask(boolean flag, long function_pointer); + + public static void glDepthFunc(int func) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDepthFunc; + BufferChecks.checkFunctionAddress(function_pointer); + nglDepthFunc(func, function_pointer); + } + static native void nglDepthFunc(int func, long function_pointer); + + public static void glFeedbackBuffer(int type, FloatBuffer buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFeedbackBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(buffer); + nglFeedbackBuffer(buffer.remaining(), type, MemoryUtil.getAddress(buffer), function_pointer); + } + static native void nglFeedbackBuffer(int buffer_size, int type, long buffer, long function_pointer); + + public static void glGetPixelMap(int map, FloatBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPixelMapfv; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(values, 256); + nglGetPixelMapfv(map, MemoryUtil.getAddress(values), function_pointer); + } + static native void nglGetPixelMapfv(int map, long values, long function_pointer); + public static void glGetPixelMapfv(int map, long values_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPixelMapfv; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOenabled(caps); + nglGetPixelMapfvBO(map, values_buffer_offset, function_pointer); + } + static native void nglGetPixelMapfvBO(int map, long values_buffer_offset, long function_pointer); + + public static void glGetPixelMapu(int map, IntBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPixelMapuiv; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(values, 256); + nglGetPixelMapuiv(map, MemoryUtil.getAddress(values), function_pointer); + } + static native void nglGetPixelMapuiv(int map, long values, long function_pointer); + public static void glGetPixelMapuiv(int map, long values_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPixelMapuiv; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOenabled(caps); + nglGetPixelMapuivBO(map, values_buffer_offset, function_pointer); + } + static native void nglGetPixelMapuivBO(int map, long values_buffer_offset, long function_pointer); + + public static void glGetPixelMapu(int map, ShortBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPixelMapusv; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(values, 256); + nglGetPixelMapusv(map, MemoryUtil.getAddress(values), function_pointer); + } + static native void nglGetPixelMapusv(int map, long values, long function_pointer); + public static void glGetPixelMapusv(int map, long values_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPixelMapusv; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOenabled(caps); + nglGetPixelMapusvBO(map, values_buffer_offset, function_pointer); + } + static native void nglGetPixelMapusvBO(int map, long values_buffer_offset, long function_pointer); + + public static void glGetMaterial(int face, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMaterialfv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetMaterialfv(face, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetMaterialfv(int face, int pname, long params, long function_pointer); + + public static void glGetMaterial(int face, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMaterialiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetMaterialiv(face, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetMaterialiv(int face, int pname, long params, long function_pointer); + + public static void glGetMap(int target, int query, FloatBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMapfv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 256); + nglGetMapfv(target, query, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglGetMapfv(int target, int query, long v, long function_pointer); + + public static void glGetMap(int target, int query, DoubleBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMapdv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 256); + nglGetMapdv(target, query, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglGetMapdv(int target, int query, long v, long function_pointer); + + public static void glGetMap(int target, int query, IntBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMapiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 256); + nglGetMapiv(target, query, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglGetMapiv(int target, int query, long v, long function_pointer); + + public static void glGetLight(int light, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetLightfv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetLightfv(light, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetLightfv(int light, int pname, long params, long function_pointer); + + public static void glGetLight(int light, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetLightiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetLightiv(light, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetLightiv(int light, int pname, long params, long function_pointer); + + public static int glGetError() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetError; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglGetError(function_pointer); + return __result; + } + static native int nglGetError(long function_pointer); + + public static void glGetClipPlane(int plane, DoubleBuffer equation) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetClipPlane; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(equation, 4); + nglGetClipPlane(plane, MemoryUtil.getAddress(equation), function_pointer); + } + static native void nglGetClipPlane(int plane, long equation, long function_pointer); + + public static void glGetBoolean(int pname, ByteBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetBooleanv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 16); + nglGetBooleanv(pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetBooleanv(int pname, long params, long function_pointer); + + /** Overloads glGetBooleanv. */ + public static boolean glGetBoolean(int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetBooleanv; + BufferChecks.checkFunctionAddress(function_pointer); + ByteBuffer params = APIUtil.getBufferByte(caps, 1); + nglGetBooleanv(pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0) == 1; + } + + public static void glGetDouble(int pname, DoubleBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetDoublev; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 16); + nglGetDoublev(pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetDoublev(int pname, long params, long function_pointer); + + /** Overloads glGetDoublev. */ + public static double glGetDouble(int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetDoublev; + BufferChecks.checkFunctionAddress(function_pointer); + DoubleBuffer params = APIUtil.getBufferDouble(caps); + nglGetDoublev(pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetFloat(int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetFloatv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 16); + nglGetFloatv(pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetFloatv(int pname, long params, long function_pointer); + + /** Overloads glGetFloatv. */ + public static float glGetFloat(int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetFloatv; + BufferChecks.checkFunctionAddress(function_pointer); + FloatBuffer params = APIUtil.getBufferFloat(caps); + nglGetFloatv(pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetInteger(int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetIntegerv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 16); + nglGetIntegerv(pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetIntegerv(int pname, long params, long function_pointer); + + /** Overloads glGetIntegerv. */ + public static int glGetInteger(int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetIntegerv; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetIntegerv(pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGenTextures(IntBuffer textures) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenTextures; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(textures); + nglGenTextures(textures.remaining(), MemoryUtil.getAddress(textures), function_pointer); + } + static native void nglGenTextures(int textures_n, long textures, long function_pointer); + + /** Overloads glGenTextures. */ + public static int glGenTextures() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenTextures; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer textures = APIUtil.getBufferInt(caps); + nglGenTextures(1, MemoryUtil.getAddress(textures), function_pointer); + return textures.get(0); + } + + public static int glGenLists(int range) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenLists; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglGenLists(range, function_pointer); + return __result; + } + static native int nglGenLists(int range, long function_pointer); + + public static void glFrustum(double left, double right, double bottom, double top, double zNear, double zFar) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFrustum; + BufferChecks.checkFunctionAddress(function_pointer); + nglFrustum(left, right, bottom, top, zNear, zFar, function_pointer); + } + static native void nglFrustum(double left, double right, double bottom, double top, double zNear, double zFar, long function_pointer); + + public static void glFrontFace(int mode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFrontFace; + BufferChecks.checkFunctionAddress(function_pointer); + nglFrontFace(mode, function_pointer); + } + static native void nglFrontFace(int mode, long function_pointer); + + public static void glFogf(int pname, float param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFogf; + BufferChecks.checkFunctionAddress(function_pointer); + nglFogf(pname, param, function_pointer); + } + static native void nglFogf(int pname, float param, long function_pointer); + + public static void glFogi(int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFogi; + BufferChecks.checkFunctionAddress(function_pointer); + nglFogi(pname, param, function_pointer); + } + static native void nglFogi(int pname, int param, long function_pointer); + + public static void glFog(int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFogfv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglFogfv(pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglFogfv(int pname, long params, long function_pointer); + + public static void glFog(int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFogiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglFogiv(pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglFogiv(int pname, long params, long function_pointer); + + public static void glFlush() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFlush; + BufferChecks.checkFunctionAddress(function_pointer); + nglFlush(function_pointer); + } + static native void nglFlush(long function_pointer); + + public static void glFinish() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFinish; + BufferChecks.checkFunctionAddress(function_pointer); + nglFinish(function_pointer); + } + static native void nglFinish(long function_pointer); + + public static ByteBuffer glGetPointer(int pname, long result_size) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPointerv; + BufferChecks.checkFunctionAddress(function_pointer); + ByteBuffer __result = nglGetPointerv(pname, result_size, function_pointer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + static native ByteBuffer nglGetPointerv(int pname, long result_size, long function_pointer); + + public static boolean glIsEnabled(int cap) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsEnabled; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsEnabled(cap, function_pointer); + return __result; + } + static native boolean nglIsEnabled(int cap, long function_pointer); + + public static void glInterleavedArrays(int format, int stride, ByteBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glInterleavedArrays; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pointer); + nglInterleavedArrays(format, stride, MemoryUtil.getAddress(pointer), function_pointer); + } + public static void glInterleavedArrays(int format, int stride, DoubleBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glInterleavedArrays; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pointer); + nglInterleavedArrays(format, stride, MemoryUtil.getAddress(pointer), function_pointer); + } + public static void glInterleavedArrays(int format, int stride, FloatBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glInterleavedArrays; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pointer); + nglInterleavedArrays(format, stride, MemoryUtil.getAddress(pointer), function_pointer); + } + public static void glInterleavedArrays(int format, int stride, IntBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glInterleavedArrays; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pointer); + nglInterleavedArrays(format, stride, MemoryUtil.getAddress(pointer), function_pointer); + } + public static void glInterleavedArrays(int format, int stride, ShortBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glInterleavedArrays; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pointer); + nglInterleavedArrays(format, stride, MemoryUtil.getAddress(pointer), function_pointer); + } + static native void nglInterleavedArrays(int format, int stride, long pointer, long function_pointer); + public static void glInterleavedArrays(int format, int stride, long pointer_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glInterleavedArrays; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOenabled(caps); + nglInterleavedArraysBO(format, stride, pointer_buffer_offset, function_pointer); + } + static native void nglInterleavedArraysBO(int format, int stride, long pointer_buffer_offset, long function_pointer); + + public static void glInitNames() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glInitNames; + BufferChecks.checkFunctionAddress(function_pointer); + nglInitNames(function_pointer); + } + static native void nglInitNames(long function_pointer); + + public static void glHint(int target, int mode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glHint; + BufferChecks.checkFunctionAddress(function_pointer); + nglHint(target, mode, function_pointer); + } + static native void nglHint(int target, int mode, long function_pointer); + + public static void glGetTexParameter(int target, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexParameterfv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetTexParameterfv(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetTexParameterfv(int target, int pname, long params, long function_pointer); + + /** Overloads glGetTexParameterfv. */ + public static float glGetTexParameterf(int target, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexParameterfv; + BufferChecks.checkFunctionAddress(function_pointer); + FloatBuffer params = APIUtil.getBufferFloat(caps); + nglGetTexParameterfv(target, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetTexParameter(int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexParameteriv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetTexParameteriv(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetTexParameteriv(int target, int pname, long params, long function_pointer); + + /** Overloads glGetTexParameteriv. */ + public static int glGetTexParameteri(int target, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexParameteriv; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetTexParameteriv(target, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetTexLevelParameter(int target, int level, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexLevelParameterfv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetTexLevelParameterfv(target, level, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetTexLevelParameterfv(int target, int level, int pname, long params, long function_pointer); + + /** Overloads glGetTexLevelParameterfv. */ + public static float glGetTexLevelParameterf(int target, int level, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexLevelParameterfv; + BufferChecks.checkFunctionAddress(function_pointer); + FloatBuffer params = APIUtil.getBufferFloat(caps); + nglGetTexLevelParameterfv(target, level, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetTexLevelParameter(int target, int level, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexLevelParameteriv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetTexLevelParameteriv(target, level, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetTexLevelParameteriv(int target, int level, int pname, long params, long function_pointer); + + /** Overloads glGetTexLevelParameteriv. */ + public static int glGetTexLevelParameteri(int target, int level, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexLevelParameteriv; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetTexLevelParameteriv(target, level, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetTexImage(int target, int level, int format, int type, ByteBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexImage; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, 1, 1, 1)); + nglGetTexImage(target, level, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glGetTexImage(int target, int level, int format, int type, DoubleBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexImage; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, 1, 1, 1)); + nglGetTexImage(target, level, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glGetTexImage(int target, int level, int format, int type, FloatBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexImage; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, 1, 1, 1)); + nglGetTexImage(target, level, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glGetTexImage(int target, int level, int format, int type, IntBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexImage; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, 1, 1, 1)); + nglGetTexImage(target, level, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glGetTexImage(int target, int level, int format, int type, ShortBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexImage; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, 1, 1, 1)); + nglGetTexImage(target, level, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + static native void nglGetTexImage(int target, int level, int format, int type, long pixels, long function_pointer); + public static void glGetTexImage(int target, int level, int format, int type, long pixels_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexImage; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOenabled(caps); + nglGetTexImageBO(target, level, format, type, pixels_buffer_offset, function_pointer); + } + static native void nglGetTexImageBO(int target, int level, int format, int type, long pixels_buffer_offset, long function_pointer); + + public static void glGetTexGen(int coord, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexGeniv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetTexGeniv(coord, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetTexGeniv(int coord, int pname, long params, long function_pointer); + + /** Overloads glGetTexGeniv. */ + public static int glGetTexGeni(int coord, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexGeniv; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetTexGeniv(coord, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetTexGen(int coord, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexGenfv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetTexGenfv(coord, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetTexGenfv(int coord, int pname, long params, long function_pointer); + + /** Overloads glGetTexGenfv. */ + public static float glGetTexGenf(int coord, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexGenfv; + BufferChecks.checkFunctionAddress(function_pointer); + FloatBuffer params = APIUtil.getBufferFloat(caps); + nglGetTexGenfv(coord, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetTexGen(int coord, int pname, DoubleBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexGendv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetTexGendv(coord, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetTexGendv(int coord, int pname, long params, long function_pointer); + + /** Overloads glGetTexGendv. */ + public static double glGetTexGend(int coord, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexGendv; + BufferChecks.checkFunctionAddress(function_pointer); + DoubleBuffer params = APIUtil.getBufferDouble(caps); + nglGetTexGendv(coord, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetTexEnv(int coord, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexEnviv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetTexEnviv(coord, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetTexEnviv(int coord, int pname, long params, long function_pointer); + + /** Overloads glGetTexEnviv. */ + public static int glGetTexEnvi(int coord, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexEnviv; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetTexEnviv(coord, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetTexEnv(int coord, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexEnvfv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetTexEnvfv(coord, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetTexEnvfv(int coord, int pname, long params, long function_pointer); + + /** Overloads glGetTexEnvfv. */ + public static float glGetTexEnvf(int coord, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexEnvfv; + BufferChecks.checkFunctionAddress(function_pointer); + FloatBuffer params = APIUtil.getBufferFloat(caps); + nglGetTexEnvfv(coord, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static String glGetString(int name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetString; + BufferChecks.checkFunctionAddress(function_pointer); + String __result = nglGetString(name, function_pointer); + return __result; + } + static native String nglGetString(int name, long function_pointer); + + public static void glGetPolygonStipple(ByteBuffer mask) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPolygonStipple; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(mask, 128); + nglGetPolygonStipple(MemoryUtil.getAddress(mask), function_pointer); + } + static native void nglGetPolygonStipple(long mask, long function_pointer); + public static void glGetPolygonStipple(long mask_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPolygonStipple; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOenabled(caps); + nglGetPolygonStippleBO(mask_buffer_offset, function_pointer); + } + static native void nglGetPolygonStippleBO(long mask_buffer_offset, long function_pointer); + + public static boolean glIsList(int list) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsList; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsList(list, function_pointer); + return __result; + } + static native boolean nglIsList(int list, long function_pointer); + + public static void glMaterialf(int face, int pname, float param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMaterialf; + BufferChecks.checkFunctionAddress(function_pointer); + nglMaterialf(face, pname, param, function_pointer); + } + static native void nglMaterialf(int face, int pname, float param, long function_pointer); + + public static void glMateriali(int face, int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMateriali; + BufferChecks.checkFunctionAddress(function_pointer); + nglMateriali(face, pname, param, function_pointer); + } + static native void nglMateriali(int face, int pname, int param, long function_pointer); + + public static void glMaterial(int face, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMaterialfv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglMaterialfv(face, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglMaterialfv(int face, int pname, long params, long function_pointer); + + public static void glMaterial(int face, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMaterialiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglMaterialiv(face, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglMaterialiv(int face, int pname, long params, long function_pointer); + + public static void glMapGrid1f(int un, float u1, float u2) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMapGrid1f; + BufferChecks.checkFunctionAddress(function_pointer); + nglMapGrid1f(un, u1, u2, function_pointer); + } + static native void nglMapGrid1f(int un, float u1, float u2, long function_pointer); + + public static void glMapGrid1d(int un, double u1, double u2) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMapGrid1d; + BufferChecks.checkFunctionAddress(function_pointer); + nglMapGrid1d(un, u1, u2, function_pointer); + } + static native void nglMapGrid1d(int un, double u1, double u2, long function_pointer); + + public static void glMapGrid2f(int un, float u1, float u2, int vn, float v1, float v2) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMapGrid2f; + BufferChecks.checkFunctionAddress(function_pointer); + nglMapGrid2f(un, u1, u2, vn, v1, v2, function_pointer); + } + static native void nglMapGrid2f(int un, float u1, float u2, int vn, float v1, float v2, long function_pointer); + + public static void glMapGrid2d(int un, double u1, double u2, int vn, double v1, double v2) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMapGrid2d; + BufferChecks.checkFunctionAddress(function_pointer); + nglMapGrid2d(un, u1, u2, vn, v1, v2, function_pointer); + } + static native void nglMapGrid2d(int un, double u1, double u2, int vn, double v1, double v2, long function_pointer); + + public static void glMap2f(int target, float u1, float u2, int ustride, int uorder, float v1, float v2, int vstride, int vorder, FloatBuffer points) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMap2f; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(points); + nglMap2f(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, MemoryUtil.getAddress(points), function_pointer); + } + static native void nglMap2f(int target, float u1, float u2, int ustride, int uorder, float v1, float v2, int vstride, int vorder, long points, long function_pointer); + + public static void glMap2d(int target, double u1, double u2, int ustride, int uorder, double v1, double v2, int vstride, int vorder, DoubleBuffer points) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMap2d; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(points); + nglMap2d(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, MemoryUtil.getAddress(points), function_pointer); + } + static native void nglMap2d(int target, double u1, double u2, int ustride, int uorder, double v1, double v2, int vstride, int vorder, long points, long function_pointer); + + public static void glMap1f(int target, float u1, float u2, int stride, int order, FloatBuffer points) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMap1f; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(points); + nglMap1f(target, u1, u2, stride, order, MemoryUtil.getAddress(points), function_pointer); + } + static native void nglMap1f(int target, float u1, float u2, int stride, int order, long points, long function_pointer); + + public static void glMap1d(int target, double u1, double u2, int stride, int order, DoubleBuffer points) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMap1d; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(points); + nglMap1d(target, u1, u2, stride, order, MemoryUtil.getAddress(points), function_pointer); + } + static native void nglMap1d(int target, double u1, double u2, int stride, int order, long points, long function_pointer); + + public static void glLogicOp(int opcode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glLogicOp; + BufferChecks.checkFunctionAddress(function_pointer); + nglLogicOp(opcode, function_pointer); + } + static native void nglLogicOp(int opcode, long function_pointer); + + public static void glLoadName(int name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glLoadName; + BufferChecks.checkFunctionAddress(function_pointer); + nglLoadName(name, function_pointer); + } + static native void nglLoadName(int name, long function_pointer); + + public static void glLoadMatrix(FloatBuffer m) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glLoadMatrixf; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(m, 16); + nglLoadMatrixf(MemoryUtil.getAddress(m), function_pointer); + } + static native void nglLoadMatrixf(long m, long function_pointer); + + public static void glLoadMatrix(DoubleBuffer m) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glLoadMatrixd; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(m, 16); + nglLoadMatrixd(MemoryUtil.getAddress(m), function_pointer); + } + static native void nglLoadMatrixd(long m, long function_pointer); + + public static void glLoadIdentity() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glLoadIdentity; + BufferChecks.checkFunctionAddress(function_pointer); + nglLoadIdentity(function_pointer); + } + static native void nglLoadIdentity(long function_pointer); + + public static void glListBase(int base) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glListBase; + BufferChecks.checkFunctionAddress(function_pointer); + nglListBase(base, function_pointer); + } + static native void nglListBase(int base, long function_pointer); + + public static void glLineWidth(float width) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glLineWidth; + BufferChecks.checkFunctionAddress(function_pointer); + nglLineWidth(width, function_pointer); + } + static native void nglLineWidth(float width, long function_pointer); + + public static void glLineStipple(int factor, short pattern) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glLineStipple; + BufferChecks.checkFunctionAddress(function_pointer); + nglLineStipple(factor, pattern, function_pointer); + } + static native void nglLineStipple(int factor, short pattern, long function_pointer); + + public static void glLightModelf(int pname, float param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glLightModelf; + BufferChecks.checkFunctionAddress(function_pointer); + nglLightModelf(pname, param, function_pointer); + } + static native void nglLightModelf(int pname, float param, long function_pointer); + + public static void glLightModeli(int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glLightModeli; + BufferChecks.checkFunctionAddress(function_pointer); + nglLightModeli(pname, param, function_pointer); + } + static native void nglLightModeli(int pname, int param, long function_pointer); + + public static void glLightModel(int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glLightModelfv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglLightModelfv(pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglLightModelfv(int pname, long params, long function_pointer); + + public static void glLightModel(int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glLightModeliv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglLightModeliv(pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglLightModeliv(int pname, long params, long function_pointer); + + public static void glLightf(int light, int pname, float param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glLightf; + BufferChecks.checkFunctionAddress(function_pointer); + nglLightf(light, pname, param, function_pointer); + } + static native void nglLightf(int light, int pname, float param, long function_pointer); + + public static void glLighti(int light, int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glLighti; + BufferChecks.checkFunctionAddress(function_pointer); + nglLighti(light, pname, param, function_pointer); + } + static native void nglLighti(int light, int pname, int param, long function_pointer); + + public static void glLight(int light, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glLightfv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglLightfv(light, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglLightfv(int light, int pname, long params, long function_pointer); + + public static void glLight(int light, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glLightiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglLightiv(light, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglLightiv(int light, int pname, long params, long function_pointer); + + public static boolean glIsTexture(int texture) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsTexture; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsTexture(texture, function_pointer); + return __result; + } + static native boolean nglIsTexture(int texture, long function_pointer); + + public static void glMatrixMode(int mode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMatrixMode; + BufferChecks.checkFunctionAddress(function_pointer); + nglMatrixMode(mode, function_pointer); + } + static native void nglMatrixMode(int mode, long function_pointer); + + public static void glPolygonStipple(ByteBuffer mask) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPolygonStipple; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(mask, 128); + nglPolygonStipple(MemoryUtil.getAddress(mask), function_pointer); + } + static native void nglPolygonStipple(long mask, long function_pointer); + public static void glPolygonStipple(long mask_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPolygonStipple; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglPolygonStippleBO(mask_buffer_offset, function_pointer); + } + static native void nglPolygonStippleBO(long mask_buffer_offset, long function_pointer); + + public static void glPolygonOffset(float factor, float units) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPolygonOffset; + BufferChecks.checkFunctionAddress(function_pointer); + nglPolygonOffset(factor, units, function_pointer); + } + static native void nglPolygonOffset(float factor, float units, long function_pointer); + + public static void glPolygonMode(int face, int mode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPolygonMode; + BufferChecks.checkFunctionAddress(function_pointer); + nglPolygonMode(face, mode, function_pointer); + } + static native void nglPolygonMode(int face, int mode, long function_pointer); + + public static void glPointSize(float size) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPointSize; + BufferChecks.checkFunctionAddress(function_pointer); + nglPointSize(size, function_pointer); + } + static native void nglPointSize(float size, long function_pointer); + + public static void glPixelZoom(float xfactor, float yfactor) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPixelZoom; + BufferChecks.checkFunctionAddress(function_pointer); + nglPixelZoom(xfactor, yfactor, function_pointer); + } + static native void nglPixelZoom(float xfactor, float yfactor, long function_pointer); + + public static void glPixelTransferf(int pname, float param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPixelTransferf; + BufferChecks.checkFunctionAddress(function_pointer); + nglPixelTransferf(pname, param, function_pointer); + } + static native void nglPixelTransferf(int pname, float param, long function_pointer); + + public static void glPixelTransferi(int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPixelTransferi; + BufferChecks.checkFunctionAddress(function_pointer); + nglPixelTransferi(pname, param, function_pointer); + } + static native void nglPixelTransferi(int pname, int param, long function_pointer); + + public static void glPixelStoref(int pname, float param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPixelStoref; + BufferChecks.checkFunctionAddress(function_pointer); + nglPixelStoref(pname, param, function_pointer); + } + static native void nglPixelStoref(int pname, float param, long function_pointer); + + public static void glPixelStorei(int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPixelStorei; + BufferChecks.checkFunctionAddress(function_pointer); + nglPixelStorei(pname, param, function_pointer); + } + static native void nglPixelStorei(int pname, int param, long function_pointer); + + public static void glPixelMap(int map, FloatBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPixelMapfv; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(values); + nglPixelMapfv(map, values.remaining(), MemoryUtil.getAddress(values), function_pointer); + } + static native void nglPixelMapfv(int map, int values_mapsize, long values, long function_pointer); + public static void glPixelMapfv(int map, int values_mapsize, long values_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPixelMapfv; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglPixelMapfvBO(map, values_mapsize, values_buffer_offset, function_pointer); + } + static native void nglPixelMapfvBO(int map, int values_mapsize, long values_buffer_offset, long function_pointer); + + public static void glPixelMapu(int map, IntBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPixelMapuiv; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(values); + nglPixelMapuiv(map, values.remaining(), MemoryUtil.getAddress(values), function_pointer); + } + static native void nglPixelMapuiv(int map, int values_mapsize, long values, long function_pointer); + public static void glPixelMapuiv(int map, int values_mapsize, long values_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPixelMapuiv; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglPixelMapuivBO(map, values_mapsize, values_buffer_offset, function_pointer); + } + static native void nglPixelMapuivBO(int map, int values_mapsize, long values_buffer_offset, long function_pointer); + + public static void glPixelMapu(int map, ShortBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPixelMapusv; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(values); + nglPixelMapusv(map, values.remaining(), MemoryUtil.getAddress(values), function_pointer); + } + static native void nglPixelMapusv(int map, int values_mapsize, long values, long function_pointer); + public static void glPixelMapusv(int map, int values_mapsize, long values_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPixelMapusv; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglPixelMapusvBO(map, values_mapsize, values_buffer_offset, function_pointer); + } + static native void nglPixelMapusvBO(int map, int values_mapsize, long values_buffer_offset, long function_pointer); + + public static void glPassThrough(float token) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPassThrough; + BufferChecks.checkFunctionAddress(function_pointer); + nglPassThrough(token, function_pointer); + } + static native void nglPassThrough(float token, long function_pointer); + + public static void glOrtho(double left, double right, double bottom, double top, double zNear, double zFar) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glOrtho; + BufferChecks.checkFunctionAddress(function_pointer); + nglOrtho(left, right, bottom, top, zNear, zFar, function_pointer); + } + static native void nglOrtho(double left, double right, double bottom, double top, double zNear, double zFar, long function_pointer); + + public static void glNormalPointer(int stride, ByteBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNormalPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).GL11_glNormalPointer_pointer = pointer; + nglNormalPointer(GL11.GL_BYTE, stride, MemoryUtil.getAddress(pointer), function_pointer); + } + public static void glNormalPointer(int stride, DoubleBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNormalPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).GL11_glNormalPointer_pointer = pointer; + nglNormalPointer(GL11.GL_DOUBLE, stride, MemoryUtil.getAddress(pointer), function_pointer); + } + public static void glNormalPointer(int stride, FloatBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNormalPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).GL11_glNormalPointer_pointer = pointer; + nglNormalPointer(GL11.GL_FLOAT, stride, MemoryUtil.getAddress(pointer), function_pointer); + } + public static void glNormalPointer(int stride, IntBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNormalPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).GL11_glNormalPointer_pointer = pointer; + nglNormalPointer(GL11.GL_INT, stride, MemoryUtil.getAddress(pointer), function_pointer); + } + static native void nglNormalPointer(int type, int stride, long pointer, long function_pointer); + public static void glNormalPointer(int type, int stride, long pointer_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNormalPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOenabled(caps); + nglNormalPointerBO(type, stride, pointer_buffer_offset, function_pointer); + } + static native void nglNormalPointerBO(int type, int stride, long pointer_buffer_offset, long function_pointer); + + /** Overloads glNormalPointer. */ + public static void glNormalPointer(int type, int stride, ByteBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNormalPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).GL11_glNormalPointer_pointer = pointer; + nglNormalPointer(type, stride, MemoryUtil.getAddress(pointer), function_pointer); + } + + public static void glNormal3b(byte nx, byte ny, byte nz) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNormal3b; + BufferChecks.checkFunctionAddress(function_pointer); + nglNormal3b(nx, ny, nz, function_pointer); + } + static native void nglNormal3b(byte nx, byte ny, byte nz, long function_pointer); + + public static void glNormal3f(float nx, float ny, float nz) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNormal3f; + BufferChecks.checkFunctionAddress(function_pointer); + nglNormal3f(nx, ny, nz, function_pointer); + } + static native void nglNormal3f(float nx, float ny, float nz, long function_pointer); + + public static void glNormal3d(double nx, double ny, double nz) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNormal3d; + BufferChecks.checkFunctionAddress(function_pointer); + nglNormal3d(nx, ny, nz, function_pointer); + } + static native void nglNormal3d(double nx, double ny, double nz, long function_pointer); + + public static void glNormal3i(int nx, int ny, int nz) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNormal3i; + BufferChecks.checkFunctionAddress(function_pointer); + nglNormal3i(nx, ny, nz, function_pointer); + } + static native void nglNormal3i(int nx, int ny, int nz, long function_pointer); + + public static void glNewList(int list, int mode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNewList; + BufferChecks.checkFunctionAddress(function_pointer); + nglNewList(list, mode, function_pointer); + } + static native void nglNewList(int list, int mode, long function_pointer); + + public static void glEndList() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEndList; + BufferChecks.checkFunctionAddress(function_pointer); + nglEndList(function_pointer); + } + static native void nglEndList(long function_pointer); + + public static void glMultMatrix(FloatBuffer m) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultMatrixf; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(m, 16); + nglMultMatrixf(MemoryUtil.getAddress(m), function_pointer); + } + static native void nglMultMatrixf(long m, long function_pointer); + + public static void glMultMatrix(DoubleBuffer m) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultMatrixd; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(m, 16); + nglMultMatrixd(MemoryUtil.getAddress(m), function_pointer); + } + static native void nglMultMatrixd(long m, long function_pointer); + + public static void glShadeModel(int mode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glShadeModel; + BufferChecks.checkFunctionAddress(function_pointer); + nglShadeModel(mode, function_pointer); + } + static native void nglShadeModel(int mode, long function_pointer); + + public static void glSelectBuffer(IntBuffer buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSelectBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(buffer); + nglSelectBuffer(buffer.remaining(), MemoryUtil.getAddress(buffer), function_pointer); + } + static native void nglSelectBuffer(int buffer_size, long buffer, long function_pointer); + + public static void glScissor(int x, int y, int width, int height) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glScissor; + BufferChecks.checkFunctionAddress(function_pointer); + nglScissor(x, y, width, height, function_pointer); + } + static native void nglScissor(int x, int y, int width, int height, long function_pointer); + + public static void glScalef(float x, float y, float z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glScalef; + BufferChecks.checkFunctionAddress(function_pointer); + nglScalef(x, y, z, function_pointer); + } + static native void nglScalef(float x, float y, float z, long function_pointer); + + public static void glScaled(double x, double y, double z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glScaled; + BufferChecks.checkFunctionAddress(function_pointer); + nglScaled(x, y, z, function_pointer); + } + static native void nglScaled(double x, double y, double z, long function_pointer); + + public static void glRotatef(float angle, float x, float y, float z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glRotatef; + BufferChecks.checkFunctionAddress(function_pointer); + nglRotatef(angle, x, y, z, function_pointer); + } + static native void nglRotatef(float angle, float x, float y, float z, long function_pointer); + + public static void glRotated(double angle, double x, double y, double z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glRotated; + BufferChecks.checkFunctionAddress(function_pointer); + nglRotated(angle, x, y, z, function_pointer); + } + static native void nglRotated(double angle, double x, double y, double z, long function_pointer); + + public static int glRenderMode(int mode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glRenderMode; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglRenderMode(mode, function_pointer); + return __result; + } + static native int nglRenderMode(int mode, long function_pointer); + + public static void glRectf(float x1, float y1, float x2, float y2) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glRectf; + BufferChecks.checkFunctionAddress(function_pointer); + nglRectf(x1, y1, x2, y2, function_pointer); + } + static native void nglRectf(float x1, float y1, float x2, float y2, long function_pointer); + + public static void glRectd(double x1, double y1, double x2, double y2) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glRectd; + BufferChecks.checkFunctionAddress(function_pointer); + nglRectd(x1, y1, x2, y2, function_pointer); + } + static native void nglRectd(double x1, double y1, double x2, double y2, long function_pointer); + + public static void glRecti(int x1, int y1, int x2, int y2) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glRecti; + BufferChecks.checkFunctionAddress(function_pointer); + nglRecti(x1, y1, x2, y2, function_pointer); + } + static native void nglRecti(int x1, int y1, int x2, int y2, long function_pointer); + + public static void glReadPixels(int x, int y, int width, int height, int format, int type, ByteBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glReadPixels; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglReadPixels(x, y, width, height, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glReadPixels(int x, int y, int width, int height, int format, int type, DoubleBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glReadPixels; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglReadPixels(x, y, width, height, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glReadPixels(int x, int y, int width, int height, int format, int type, FloatBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glReadPixels; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglReadPixels(x, y, width, height, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glReadPixels(int x, int y, int width, int height, int format, int type, IntBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glReadPixels; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglReadPixels(x, y, width, height, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glReadPixels(int x, int y, int width, int height, int format, int type, ShortBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glReadPixels; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglReadPixels(x, y, width, height, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + static native void nglReadPixels(int x, int y, int width, int height, int format, int type, long pixels, long function_pointer); + public static void glReadPixels(int x, int y, int width, int height, int format, int type, long pixels_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glReadPixels; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOenabled(caps); + nglReadPixelsBO(x, y, width, height, format, type, pixels_buffer_offset, function_pointer); + } + static native void nglReadPixelsBO(int x, int y, int width, int height, int format, int type, long pixels_buffer_offset, long function_pointer); + + public static void glReadBuffer(int mode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glReadBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + nglReadBuffer(mode, function_pointer); + } + static native void nglReadBuffer(int mode, long function_pointer); + + public static void glRasterPos2f(float x, float y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glRasterPos2f; + BufferChecks.checkFunctionAddress(function_pointer); + nglRasterPos2f(x, y, function_pointer); + } + static native void nglRasterPos2f(float x, float y, long function_pointer); + + public static void glRasterPos2d(double x, double y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glRasterPos2d; + BufferChecks.checkFunctionAddress(function_pointer); + nglRasterPos2d(x, y, function_pointer); + } + static native void nglRasterPos2d(double x, double y, long function_pointer); + + public static void glRasterPos2i(int x, int y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glRasterPos2i; + BufferChecks.checkFunctionAddress(function_pointer); + nglRasterPos2i(x, y, function_pointer); + } + static native void nglRasterPos2i(int x, int y, long function_pointer); + + public static void glRasterPos3f(float x, float y, float z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glRasterPos3f; + BufferChecks.checkFunctionAddress(function_pointer); + nglRasterPos3f(x, y, z, function_pointer); + } + static native void nglRasterPos3f(float x, float y, float z, long function_pointer); + + public static void glRasterPos3d(double x, double y, double z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glRasterPos3d; + BufferChecks.checkFunctionAddress(function_pointer); + nglRasterPos3d(x, y, z, function_pointer); + } + static native void nglRasterPos3d(double x, double y, double z, long function_pointer); + + public static void glRasterPos3i(int x, int y, int z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glRasterPos3i; + BufferChecks.checkFunctionAddress(function_pointer); + nglRasterPos3i(x, y, z, function_pointer); + } + static native void nglRasterPos3i(int x, int y, int z, long function_pointer); + + public static void glRasterPos4f(float x, float y, float z, float w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glRasterPos4f; + BufferChecks.checkFunctionAddress(function_pointer); + nglRasterPos4f(x, y, z, w, function_pointer); + } + static native void nglRasterPos4f(float x, float y, float z, float w, long function_pointer); + + public static void glRasterPos4d(double x, double y, double z, double w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glRasterPos4d; + BufferChecks.checkFunctionAddress(function_pointer); + nglRasterPos4d(x, y, z, w, function_pointer); + } + static native void nglRasterPos4d(double x, double y, double z, double w, long function_pointer); + + public static void glRasterPos4i(int x, int y, int z, int w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glRasterPos4i; + BufferChecks.checkFunctionAddress(function_pointer); + nglRasterPos4i(x, y, z, w, function_pointer); + } + static native void nglRasterPos4i(int x, int y, int z, int w, long function_pointer); + + public static void glPushName(int name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPushName; + BufferChecks.checkFunctionAddress(function_pointer); + nglPushName(name, function_pointer); + } + static native void nglPushName(int name, long function_pointer); + + public static void glPopName() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPopName; + BufferChecks.checkFunctionAddress(function_pointer); + nglPopName(function_pointer); + } + static native void nglPopName(long function_pointer); + + public static void glPushMatrix() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPushMatrix; + BufferChecks.checkFunctionAddress(function_pointer); + nglPushMatrix(function_pointer); + } + static native void nglPushMatrix(long function_pointer); + + public static void glPopMatrix() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPopMatrix; + BufferChecks.checkFunctionAddress(function_pointer); + nglPopMatrix(function_pointer); + } + static native void nglPopMatrix(long function_pointer); + + public static void glPushClientAttrib(int mask) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPushClientAttrib; + BufferChecks.checkFunctionAddress(function_pointer); + StateTracker.pushAttrib(caps, mask); + nglPushClientAttrib(mask, function_pointer); + } + static native void nglPushClientAttrib(int mask, long function_pointer); + + public static void glPopClientAttrib() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPopClientAttrib; + BufferChecks.checkFunctionAddress(function_pointer); + StateTracker.popAttrib(caps); + nglPopClientAttrib(function_pointer); + } + static native void nglPopClientAttrib(long function_pointer); + + public static void glPushAttrib(int mask) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPushAttrib; + BufferChecks.checkFunctionAddress(function_pointer); + nglPushAttrib(mask, function_pointer); + } + static native void nglPushAttrib(int mask, long function_pointer); + + public static void glPopAttrib() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPopAttrib; + BufferChecks.checkFunctionAddress(function_pointer); + nglPopAttrib(function_pointer); + } + static native void nglPopAttrib(long function_pointer); + + public static void glStencilFunc(int func, int ref, int mask) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glStencilFunc; + BufferChecks.checkFunctionAddress(function_pointer); + nglStencilFunc(func, ref, mask, function_pointer); + } + static native void nglStencilFunc(int func, int ref, int mask, long function_pointer); + + public static void glVertexPointer(int size, int stride, DoubleBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).GL11_glVertexPointer_pointer = pointer; + nglVertexPointer(size, GL11.GL_DOUBLE, stride, MemoryUtil.getAddress(pointer), function_pointer); + } + public static void glVertexPointer(int size, int stride, FloatBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).GL11_glVertexPointer_pointer = pointer; + nglVertexPointer(size, GL11.GL_FLOAT, stride, MemoryUtil.getAddress(pointer), function_pointer); + } + public static void glVertexPointer(int size, int stride, IntBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).GL11_glVertexPointer_pointer = pointer; + nglVertexPointer(size, GL11.GL_INT, stride, MemoryUtil.getAddress(pointer), function_pointer); + } + public static void glVertexPointer(int size, int stride, ShortBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).GL11_glVertexPointer_pointer = pointer; + nglVertexPointer(size, GL11.GL_SHORT, stride, MemoryUtil.getAddress(pointer), function_pointer); + } + static native void nglVertexPointer(int size, int type, int stride, long pointer, long function_pointer); + public static void glVertexPointer(int size, int type, int stride, long pointer_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOenabled(caps); + nglVertexPointerBO(size, type, stride, pointer_buffer_offset, function_pointer); + } + static native void nglVertexPointerBO(int size, int type, int stride, long pointer_buffer_offset, long function_pointer); + + /** Overloads glVertexPointer. */ + public static void glVertexPointer(int size, int type, int stride, ByteBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).GL11_glVertexPointer_pointer = pointer; + nglVertexPointer(size, type, stride, MemoryUtil.getAddress(pointer), function_pointer); + } + + public static void glVertex2f(float x, float y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertex2f; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertex2f(x, y, function_pointer); + } + static native void nglVertex2f(float x, float y, long function_pointer); + + public static void glVertex2d(double x, double y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertex2d; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertex2d(x, y, function_pointer); + } + static native void nglVertex2d(double x, double y, long function_pointer); + + public static void glVertex2i(int x, int y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertex2i; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertex2i(x, y, function_pointer); + } + static native void nglVertex2i(int x, int y, long function_pointer); + + public static void glVertex3f(float x, float y, float z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertex3f; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertex3f(x, y, z, function_pointer); + } + static native void nglVertex3f(float x, float y, float z, long function_pointer); + + public static void glVertex3d(double x, double y, double z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertex3d; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertex3d(x, y, z, function_pointer); + } + static native void nglVertex3d(double x, double y, double z, long function_pointer); + + public static void glVertex3i(int x, int y, int z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertex3i; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertex3i(x, y, z, function_pointer); + } + static native void nglVertex3i(int x, int y, int z, long function_pointer); + + public static void glVertex4f(float x, float y, float z, float w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertex4f; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertex4f(x, y, z, w, function_pointer); + } + static native void nglVertex4f(float x, float y, float z, float w, long function_pointer); + + public static void glVertex4d(double x, double y, double z, double w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertex4d; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertex4d(x, y, z, w, function_pointer); + } + static native void nglVertex4d(double x, double y, double z, double w, long function_pointer); + + public static void glVertex4i(int x, int y, int z, int w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertex4i; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertex4i(x, y, z, w, function_pointer); + } + static native void nglVertex4i(int x, int y, int z, int w, long function_pointer); + + public static void glTranslatef(float x, float y, float z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTranslatef; + BufferChecks.checkFunctionAddress(function_pointer); + nglTranslatef(x, y, z, function_pointer); + } + static native void nglTranslatef(float x, float y, float z, long function_pointer); + + public static void glTranslated(double x, double y, double z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTranslated; + BufferChecks.checkFunctionAddress(function_pointer); + nglTranslated(x, y, z, function_pointer); + } + static native void nglTranslated(double x, double y, double z, long function_pointer); + + public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, ByteBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexImage1D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage1DStorage(pixels, format, type, width)); + nglTexImage1D(target, level, internalformat, width, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, DoubleBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexImage1D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage1DStorage(pixels, format, type, width)); + nglTexImage1D(target, level, internalformat, width, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, FloatBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexImage1D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage1DStorage(pixels, format, type, width)); + nglTexImage1D(target, level, internalformat, width, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, IntBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexImage1D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage1DStorage(pixels, format, type, width)); + nglTexImage1D(target, level, internalformat, width, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, ShortBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexImage1D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage1DStorage(pixels, format, type, width)); + nglTexImage1D(target, level, internalformat, width, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + static native void nglTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, long pixels, long function_pointer); + public static void glTexImage1D(int target, int level, int internalformat, int width, int border, int format, int type, long pixels_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexImage1D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglTexImage1DBO(target, level, internalformat, width, border, format, type, pixels_buffer_offset, function_pointer); + } + static native void nglTexImage1DBO(int target, int level, int internalformat, int width, int border, int format, int type, long pixels_buffer_offset, long function_pointer); + + public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ByteBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexImage2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height)); + nglTexImage2D(target, level, internalformat, width, height, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, DoubleBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexImage2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height)); + nglTexImage2D(target, level, internalformat, width, height, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, FloatBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexImage2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height)); + nglTexImage2D(target, level, internalformat, width, height, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, IntBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexImage2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height)); + nglTexImage2D(target, level, internalformat, width, height, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ShortBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexImage2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height)); + nglTexImage2D(target, level, internalformat, width, height, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + static native void nglTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, long pixels, long function_pointer); + public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, long pixels_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexImage2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglTexImage2DBO(target, level, internalformat, width, height, border, format, type, pixels_buffer_offset, function_pointer); + } + static native void nglTexImage2DBO(int target, int level, int internalformat, int width, int height, int border, int format, int type, long pixels_buffer_offset, long function_pointer); + + public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, ByteBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexSubImage1D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, 1, 1)); + nglTexSubImage1D(target, level, xoffset, width, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, DoubleBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexSubImage1D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, 1, 1)); + nglTexSubImage1D(target, level, xoffset, width, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, FloatBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexSubImage1D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, 1, 1)); + nglTexSubImage1D(target, level, xoffset, width, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, IntBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexSubImage1D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, 1, 1)); + nglTexSubImage1D(target, level, xoffset, width, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, ShortBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexSubImage1D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, 1, 1)); + nglTexSubImage1D(target, level, xoffset, width, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + static native void nglTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, long pixels, long function_pointer); + public static void glTexSubImage1D(int target, int level, int xoffset, int width, int format, int type, long pixels_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexSubImage1D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglTexSubImage1DBO(target, level, xoffset, width, format, type, pixels_buffer_offset, function_pointer); + } + static native void nglTexSubImage1DBO(int target, int level, int xoffset, int width, int format, int type, long pixels_buffer_offset, long function_pointer); + + public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ByteBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexSubImage2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, DoubleBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexSubImage2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, FloatBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexSubImage2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, IntBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexSubImage2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ShortBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexSubImage2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + static native void nglTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, long pixels, long function_pointer); + public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, long pixels_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexSubImage2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglTexSubImage2DBO(target, level, xoffset, yoffset, width, height, format, type, pixels_buffer_offset, function_pointer); + } + static native void nglTexSubImage2DBO(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, long pixels_buffer_offset, long function_pointer); + + public static void glTexParameterf(int target, int pname, float param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexParameterf; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexParameterf(target, pname, param, function_pointer); + } + static native void nglTexParameterf(int target, int pname, float param, long function_pointer); + + public static void glTexParameteri(int target, int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexParameteri; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexParameteri(target, pname, param, function_pointer); + } + static native void nglTexParameteri(int target, int pname, int param, long function_pointer); + + public static void glTexParameter(int target, int pname, FloatBuffer param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexParameterfv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(param, 4); + nglTexParameterfv(target, pname, MemoryUtil.getAddress(param), function_pointer); + } + static native void nglTexParameterfv(int target, int pname, long param, long function_pointer); + + public static void glTexParameter(int target, int pname, IntBuffer param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexParameteriv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(param, 4); + nglTexParameteriv(target, pname, MemoryUtil.getAddress(param), function_pointer); + } + static native void nglTexParameteriv(int target, int pname, long param, long function_pointer); + + public static void glTexGenf(int coord, int pname, float param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexGenf; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexGenf(coord, pname, param, function_pointer); + } + static native void nglTexGenf(int coord, int pname, float param, long function_pointer); + + public static void glTexGend(int coord, int pname, double param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexGend; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexGend(coord, pname, param, function_pointer); + } + static native void nglTexGend(int coord, int pname, double param, long function_pointer); + + public static void glTexGen(int coord, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexGenfv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglTexGenfv(coord, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglTexGenfv(int coord, int pname, long params, long function_pointer); + + public static void glTexGen(int coord, int pname, DoubleBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexGendv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglTexGendv(coord, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglTexGendv(int coord, int pname, long params, long function_pointer); + + public static void glTexGeni(int coord, int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexGeni; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexGeni(coord, pname, param, function_pointer); + } + static native void nglTexGeni(int coord, int pname, int param, long function_pointer); + + public static void glTexGen(int coord, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexGeniv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglTexGeniv(coord, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglTexGeniv(int coord, int pname, long params, long function_pointer); + + public static void glTexEnvf(int target, int pname, float param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexEnvf; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexEnvf(target, pname, param, function_pointer); + } + static native void nglTexEnvf(int target, int pname, float param, long function_pointer); + + public static void glTexEnvi(int target, int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexEnvi; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexEnvi(target, pname, param, function_pointer); + } + static native void nglTexEnvi(int target, int pname, int param, long function_pointer); + + public static void glTexEnv(int target, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexEnvfv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglTexEnvfv(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglTexEnvfv(int target, int pname, long params, long function_pointer); + + public static void glTexEnv(int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexEnviv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglTexEnviv(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglTexEnviv(int target, int pname, long params, long function_pointer); + + public static void glTexCoordPointer(int size, int stride, DoubleBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexCoordPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glTexCoordPointer_buffer[StateTracker.getReferences(caps).glClientActiveTexture] = pointer; + nglTexCoordPointer(size, GL11.GL_DOUBLE, stride, MemoryUtil.getAddress(pointer), function_pointer); + } + public static void glTexCoordPointer(int size, int stride, FloatBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexCoordPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glTexCoordPointer_buffer[StateTracker.getReferences(caps).glClientActiveTexture] = pointer; + nglTexCoordPointer(size, GL11.GL_FLOAT, stride, MemoryUtil.getAddress(pointer), function_pointer); + } + public static void glTexCoordPointer(int size, int stride, IntBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexCoordPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glTexCoordPointer_buffer[StateTracker.getReferences(caps).glClientActiveTexture] = pointer; + nglTexCoordPointer(size, GL11.GL_INT, stride, MemoryUtil.getAddress(pointer), function_pointer); + } + public static void glTexCoordPointer(int size, int stride, ShortBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexCoordPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glTexCoordPointer_buffer[StateTracker.getReferences(caps).glClientActiveTexture] = pointer; + nglTexCoordPointer(size, GL11.GL_SHORT, stride, MemoryUtil.getAddress(pointer), function_pointer); + } + static native void nglTexCoordPointer(int size, int type, int stride, long pointer, long function_pointer); + public static void glTexCoordPointer(int size, int type, int stride, long pointer_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexCoordPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOenabled(caps); + nglTexCoordPointerBO(size, type, stride, pointer_buffer_offset, function_pointer); + } + static native void nglTexCoordPointerBO(int size, int type, int stride, long pointer_buffer_offset, long function_pointer); + + /** Overloads glTexCoordPointer. */ + public static void glTexCoordPointer(int size, int type, int stride, ByteBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexCoordPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glTexCoordPointer_buffer[StateTracker.getReferences(caps).glClientActiveTexture] = pointer; + nglTexCoordPointer(size, type, stride, MemoryUtil.getAddress(pointer), function_pointer); + } + + public static void glTexCoord1f(float s) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexCoord1f; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexCoord1f(s, function_pointer); + } + static native void nglTexCoord1f(float s, long function_pointer); + + public static void glTexCoord1d(double s) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexCoord1d; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexCoord1d(s, function_pointer); + } + static native void nglTexCoord1d(double s, long function_pointer); + + public static void glTexCoord2f(float s, float t) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexCoord2f; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexCoord2f(s, t, function_pointer); + } + static native void nglTexCoord2f(float s, float t, long function_pointer); + + public static void glTexCoord2d(double s, double t) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexCoord2d; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexCoord2d(s, t, function_pointer); + } + static native void nglTexCoord2d(double s, double t, long function_pointer); + + public static void glTexCoord3f(float s, float t, float r) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexCoord3f; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexCoord3f(s, t, r, function_pointer); + } + static native void nglTexCoord3f(float s, float t, float r, long function_pointer); + + public static void glTexCoord3d(double s, double t, double r) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexCoord3d; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexCoord3d(s, t, r, function_pointer); + } + static native void nglTexCoord3d(double s, double t, double r, long function_pointer); + + public static void glTexCoord4f(float s, float t, float r, float q) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexCoord4f; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexCoord4f(s, t, r, q, function_pointer); + } + static native void nglTexCoord4f(float s, float t, float r, float q, long function_pointer); + + public static void glTexCoord4d(double s, double t, double r, double q) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexCoord4d; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexCoord4d(s, t, r, q, function_pointer); + } + static native void nglTexCoord4d(double s, double t, double r, double q, long function_pointer); + + public static void glStencilOp(int fail, int zfail, int zpass) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glStencilOp; + BufferChecks.checkFunctionAddress(function_pointer); + nglStencilOp(fail, zfail, zpass, function_pointer); + } + static native void nglStencilOp(int fail, int zfail, int zpass, long function_pointer); + + public static void glStencilMask(int mask) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glStencilMask; + BufferChecks.checkFunctionAddress(function_pointer); + nglStencilMask(mask, function_pointer); + } + static native void nglStencilMask(int mask, long function_pointer); + + public static void glViewport(int x, int y, int width, int height) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glViewport; + BufferChecks.checkFunctionAddress(function_pointer); + nglViewport(x, y, width, height, function_pointer); + } + static native void nglViewport(int x, int y, int width, int height, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL12.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL12.java new file mode 100644 index 0000000..8798fc4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL12.java @@ -0,0 +1,208 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +/** + *

+ * The core OpenGL1.2.1 API, with the imaging subset. + *

+ * @author cix_foo + * @version $Revision$ + * $Id$ + */ +public final class GL12 { + + public static final int GL_TEXTURE_BINDING_3D = 0x806A, + GL_PACK_SKIP_IMAGES = 0x806B, + GL_PACK_IMAGE_HEIGHT = 0x806C, + GL_UNPACK_SKIP_IMAGES = 0x806D, + GL_UNPACK_IMAGE_HEIGHT = 0x806E, + GL_TEXTURE_3D = 0x806F, + GL_PROXY_TEXTURE_3D = 0x8070, + GL_TEXTURE_DEPTH = 0x8071, + GL_TEXTURE_WRAP_R = 0x8072, + GL_MAX_3D_TEXTURE_SIZE = 0x8073, + GL_BGR = 0x80E0, + GL_BGRA = 0x80E1, + GL_UNSIGNED_BYTE_3_3_2 = 0x8032, + GL_UNSIGNED_BYTE_2_3_3_REV = 0x8362, + GL_UNSIGNED_SHORT_5_6_5 = 0x8363, + GL_UNSIGNED_SHORT_5_6_5_REV = 0x8364, + GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033, + GL_UNSIGNED_SHORT_4_4_4_4_REV = 0x8365, + GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034, + GL_UNSIGNED_SHORT_1_5_5_5_REV = 0x8366, + GL_UNSIGNED_INT_8_8_8_8 = 0x8035, + GL_UNSIGNED_INT_8_8_8_8_REV = 0x8367, + GL_UNSIGNED_INT_10_10_10_2 = 0x8036, + GL_UNSIGNED_INT_2_10_10_10_REV = 0x8368, + GL_RESCALE_NORMAL = 0x803A, + GL_LIGHT_MODEL_COLOR_CONTROL = 0x81F8, + GL_SINGLE_COLOR = 0x81F9, + GL_SEPARATE_SPECULAR_COLOR = 0x81FA, + GL_CLAMP_TO_EDGE = 0x812F, + GL_TEXTURE_MIN_LOD = 0x813A, + GL_TEXTURE_MAX_LOD = 0x813B, + GL_TEXTURE_BASE_LEVEL = 0x813C, + GL_TEXTURE_MAX_LEVEL = 0x813D, + GL_MAX_ELEMENTS_VERTICES = 0x80E8, + GL_MAX_ELEMENTS_INDICES = 0x80E9, + GL_ALIASED_POINT_SIZE_RANGE = 0x846D, + GL_ALIASED_LINE_WIDTH_RANGE = 0x846E, + GL_SMOOTH_POINT_SIZE_RANGE = 0xB12, + GL_SMOOTH_POINT_SIZE_GRANULARITY = 0xB13, + GL_SMOOTH_LINE_WIDTH_RANGE = 0xB22, + GL_SMOOTH_LINE_WIDTH_GRANULARITY = 0xB23; + + private GL12() {} + + public static void glDrawRangeElements(int mode, int start, int end, ByteBuffer indices) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawRangeElements; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawRangeElements(mode, start, end, indices.remaining(), GL11.GL_UNSIGNED_BYTE, MemoryUtil.getAddress(indices), function_pointer); + } + public static void glDrawRangeElements(int mode, int start, int end, IntBuffer indices) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawRangeElements; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawRangeElements(mode, start, end, indices.remaining(), GL11.GL_UNSIGNED_INT, MemoryUtil.getAddress(indices), function_pointer); + } + public static void glDrawRangeElements(int mode, int start, int end, ShortBuffer indices) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawRangeElements; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawRangeElements(mode, start, end, indices.remaining(), GL11.GL_UNSIGNED_SHORT, MemoryUtil.getAddress(indices), function_pointer); + } + static native void nglDrawRangeElements(int mode, int start, int end, int indices_count, int type, long indices, long function_pointer); + public static void glDrawRangeElements(int mode, int start, int end, int indices_count, int type, long indices_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawRangeElements; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOenabled(caps); + nglDrawRangeElementsBO(mode, start, end, indices_count, type, indices_buffer_offset, function_pointer); + } + static native void nglDrawRangeElementsBO(int mode, int start, int end, int indices_count, int type, long indices_buffer_offset, long function_pointer); + + public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, ByteBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexImage3D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth)); + nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, DoubleBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexImage3D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth)); + nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, FloatBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexImage3D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth)); + nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, IntBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexImage3D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth)); + nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, ShortBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexImage3D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth)); + nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, MemoryUtil.getAddressSafe(pixels), function_pointer); + } + static native void nglTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, long pixels, long function_pointer); + public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, long pixels_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexImage3D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglTexImage3DBO(target, level, internalFormat, width, height, depth, border, format, type, pixels_buffer_offset, function_pointer); + } + static native void nglTexImage3DBO(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, long pixels_buffer_offset, long function_pointer); + + public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, ByteBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexSubImage3D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, depth)); + nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, DoubleBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexSubImage3D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, depth)); + nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, FloatBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexSubImage3D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, depth)); + nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, IntBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexSubImage3D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, depth)); + nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, ShortBuffer pixels) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexSubImage3D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, depth)); + nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddress(pixels), function_pointer); + } + static native void nglTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, long pixels, long function_pointer); + public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, long pixels_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexSubImage3D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglTexSubImage3DBO(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels_buffer_offset, function_pointer); + } + static native void nglTexSubImage3DBO(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, long pixels_buffer_offset, long function_pointer); + + public static void glCopyTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCopyTexSubImage3D; + BufferChecks.checkFunctionAddress(function_pointer); + nglCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height, function_pointer); + } + static native void nglCopyTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL13.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL13.java new file mode 100644 index 0000000..1430e63 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL13.java @@ -0,0 +1,383 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +/** + *

+ * The core OpenGL1.3 API. + *

+ * @author cix_foo + * @version $Revision$ + * $Id$ + */ +public final class GL13 { + + public static final int GL_TEXTURE0 = 0x84C0, + GL_TEXTURE1 = 0x84C1, + GL_TEXTURE2 = 0x84C2, + GL_TEXTURE3 = 0x84C3, + GL_TEXTURE4 = 0x84C4, + GL_TEXTURE5 = 0x84C5, + GL_TEXTURE6 = 0x84C6, + GL_TEXTURE7 = 0x84C7, + GL_TEXTURE8 = 0x84C8, + GL_TEXTURE9 = 0x84C9, + GL_TEXTURE10 = 0x84CA, + GL_TEXTURE11 = 0x84CB, + GL_TEXTURE12 = 0x84CC, + GL_TEXTURE13 = 0x84CD, + GL_TEXTURE14 = 0x84CE, + GL_TEXTURE15 = 0x84CF, + GL_TEXTURE16 = 0x84D0, + GL_TEXTURE17 = 0x84D1, + GL_TEXTURE18 = 0x84D2, + GL_TEXTURE19 = 0x84D3, + GL_TEXTURE20 = 0x84D4, + GL_TEXTURE21 = 0x84D5, + GL_TEXTURE22 = 0x84D6, + GL_TEXTURE23 = 0x84D7, + GL_TEXTURE24 = 0x84D8, + GL_TEXTURE25 = 0x84D9, + GL_TEXTURE26 = 0x84DA, + GL_TEXTURE27 = 0x84DB, + GL_TEXTURE28 = 0x84DC, + GL_TEXTURE29 = 0x84DD, + GL_TEXTURE30 = 0x84DE, + GL_TEXTURE31 = 0x84DF, + GL_ACTIVE_TEXTURE = 0x84E0, + GL_CLIENT_ACTIVE_TEXTURE = 0x84E1, + GL_MAX_TEXTURE_UNITS = 0x84E2, + GL_NORMAL_MAP = 0x8511, + GL_REFLECTION_MAP = 0x8512, + GL_TEXTURE_CUBE_MAP = 0x8513, + GL_TEXTURE_BINDING_CUBE_MAP = 0x8514, + GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515, + GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516, + GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517, + GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518, + GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519, + GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A, + GL_PROXY_TEXTURE_CUBE_MAP = 0x851B, + GL_MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C, + GL_COMPRESSED_ALPHA = 0x84E9, + GL_COMPRESSED_LUMINANCE = 0x84EA, + GL_COMPRESSED_LUMINANCE_ALPHA = 0x84EB, + GL_COMPRESSED_INTENSITY = 0x84EC, + GL_COMPRESSED_RGB = 0x84ED, + GL_COMPRESSED_RGBA = 0x84EE, + GL_TEXTURE_COMPRESSION_HINT = 0x84EF, + GL_TEXTURE_COMPRESSED_IMAGE_SIZE = 0x86A0, + GL_TEXTURE_COMPRESSED = 0x86A1, + GL_NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2, + GL_COMPRESSED_TEXTURE_FORMATS = 0x86A3, + GL_MULTISAMPLE = 0x809D, + GL_SAMPLE_ALPHA_TO_COVERAGE = 0x809E, + GL_SAMPLE_ALPHA_TO_ONE = 0x809F, + GL_SAMPLE_COVERAGE = 0x80A0, + GL_SAMPLE_BUFFERS = 0x80A8, + GL_SAMPLES = 0x80A9, + GL_SAMPLE_COVERAGE_VALUE = 0x80AA, + GL_SAMPLE_COVERAGE_INVERT = 0x80AB, + GL_MULTISAMPLE_BIT = 0x20000000, + GL_TRANSPOSE_MODELVIEW_MATRIX = 0x84E3, + GL_TRANSPOSE_PROJECTION_MATRIX = 0x84E4, + GL_TRANSPOSE_TEXTURE_MATRIX = 0x84E5, + GL_TRANSPOSE_COLOR_MATRIX = 0x84E6, + GL_COMBINE = 0x8570, + GL_COMBINE_RGB = 0x8571, + GL_COMBINE_ALPHA = 0x8572, + GL_SOURCE0_RGB = 0x8580, + GL_SOURCE1_RGB = 0x8581, + GL_SOURCE2_RGB = 0x8582, + GL_SOURCE0_ALPHA = 0x8588, + GL_SOURCE1_ALPHA = 0x8589, + GL_SOURCE2_ALPHA = 0x858A, + GL_OPERAND0_RGB = 0x8590, + GL_OPERAND1_RGB = 0x8591, + GL_OPERAND2_RGB = 0x8592, + GL_OPERAND0_ALPHA = 0x8598, + GL_OPERAND1_ALPHA = 0x8599, + GL_OPERAND2_ALPHA = 0x859A, + GL_RGB_SCALE = 0x8573, + GL_ADD_SIGNED = 0x8574, + GL_INTERPOLATE = 0x8575, + GL_SUBTRACT = 0x84E7, + GL_CONSTANT = 0x8576, + GL_PRIMARY_COLOR = 0x8577, + GL_PREVIOUS = 0x8578, + GL_DOT3_RGB = 0x86AE, + GL_DOT3_RGBA = 0x86AF, + GL_CLAMP_TO_BORDER = 0x812D; + + private GL13() {} + + public static void glActiveTexture(int texture) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glActiveTexture; + BufferChecks.checkFunctionAddress(function_pointer); + nglActiveTexture(texture, function_pointer); + } + static native void nglActiveTexture(int texture, long function_pointer); + + public static void glClientActiveTexture(int texture) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClientActiveTexture; + BufferChecks.checkFunctionAddress(function_pointer); + StateTracker.getReferences(caps).glClientActiveTexture = texture - GL_TEXTURE0; + nglClientActiveTexture(texture, function_pointer); + } + static native void nglClientActiveTexture(int texture, long function_pointer); + + public static void glCompressedTexImage1D(int target, int level, int internalformat, int width, int border, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTexImage1D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(data); + nglCompressedTexImage1D(target, level, internalformat, width, border, data.remaining(), MemoryUtil.getAddress(data), function_pointer); + } + static native void nglCompressedTexImage1D(int target, int level, int internalformat, int width, int border, int data_imageSize, long data, long function_pointer); + public static void glCompressedTexImage1D(int target, int level, int internalformat, int width, int border, int data_imageSize, long data_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTexImage1D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglCompressedTexImage1DBO(target, level, internalformat, width, border, data_imageSize, data_buffer_offset, function_pointer); + } + static native void nglCompressedTexImage1DBO(int target, int level, int internalformat, int width, int border, int data_imageSize, long data_buffer_offset, long function_pointer); + + public static void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTexImage2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(data); + nglCompressedTexImage2D(target, level, internalformat, width, height, border, data.remaining(), MemoryUtil.getAddress(data), function_pointer); + } + static native void nglCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int data_imageSize, long data, long function_pointer); + public static void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int data_imageSize, long data_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTexImage2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglCompressedTexImage2DBO(target, level, internalformat, width, height, border, data_imageSize, data_buffer_offset, function_pointer); + } + static native void nglCompressedTexImage2DBO(int target, int level, int internalformat, int width, int height, int border, int data_imageSize, long data_buffer_offset, long function_pointer); + + public static void glCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTexImage3D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(data); + nglCompressedTexImage3D(target, level, internalformat, width, height, depth, border, data.remaining(), MemoryUtil.getAddress(data), function_pointer); + } + static native void nglCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int data_imageSize, long data, long function_pointer); + public static void glCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int data_imageSize, long data_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTexImage3D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglCompressedTexImage3DBO(target, level, internalformat, width, height, depth, border, data_imageSize, data_buffer_offset, function_pointer); + } + static native void nglCompressedTexImage3DBO(int target, int level, int internalformat, int width, int height, int depth, int border, int data_imageSize, long data_buffer_offset, long function_pointer); + + public static void glCompressedTexSubImage1D(int target, int level, int xoffset, int width, int format, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTexSubImage1D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(data); + nglCompressedTexSubImage1D(target, level, xoffset, width, format, data.remaining(), MemoryUtil.getAddress(data), function_pointer); + } + static native void nglCompressedTexSubImage1D(int target, int level, int xoffset, int width, int format, int data_imageSize, long data, long function_pointer); + public static void glCompressedTexSubImage1D(int target, int level, int xoffset, int width, int format, int data_imageSize, long data_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTexSubImage1D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglCompressedTexSubImage1DBO(target, level, xoffset, width, format, data_imageSize, data_buffer_offset, function_pointer); + } + static native void nglCompressedTexSubImage1DBO(int target, int level, int xoffset, int width, int format, int data_imageSize, long data_buffer_offset, long function_pointer); + + public static void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTexSubImage2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(data); + nglCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, data.remaining(), MemoryUtil.getAddress(data), function_pointer); + } + static native void nglCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int data_imageSize, long data, long function_pointer); + public static void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int data_imageSize, long data_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTexSubImage2D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglCompressedTexSubImage2DBO(target, level, xoffset, yoffset, width, height, format, data_imageSize, data_buffer_offset, function_pointer); + } + static native void nglCompressedTexSubImage2DBO(int target, int level, int xoffset, int yoffset, int width, int height, int format, int data_imageSize, long data_buffer_offset, long function_pointer); + + public static void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTexSubImage3D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOdisabled(caps); + BufferChecks.checkDirect(data); + nglCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, data.remaining(), MemoryUtil.getAddress(data), function_pointer); + } + static native void nglCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int data_imageSize, long data, long function_pointer); + public static void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int data_imageSize, long data_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompressedTexSubImage3D; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureUnpackPBOenabled(caps); + nglCompressedTexSubImage3DBO(target, level, xoffset, yoffset, zoffset, width, height, depth, format, data_imageSize, data_buffer_offset, function_pointer); + } + static native void nglCompressedTexSubImage3DBO(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int data_imageSize, long data_buffer_offset, long function_pointer); + + public static void glGetCompressedTexImage(int target, int lod, ByteBuffer img) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetCompressedTexImage; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(img); + nglGetCompressedTexImage(target, lod, MemoryUtil.getAddress(img), function_pointer); + } + public static void glGetCompressedTexImage(int target, int lod, IntBuffer img) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetCompressedTexImage; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(img); + nglGetCompressedTexImage(target, lod, MemoryUtil.getAddress(img), function_pointer); + } + public static void glGetCompressedTexImage(int target, int lod, ShortBuffer img) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetCompressedTexImage; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOdisabled(caps); + BufferChecks.checkDirect(img); + nglGetCompressedTexImage(target, lod, MemoryUtil.getAddress(img), function_pointer); + } + static native void nglGetCompressedTexImage(int target, int lod, long img, long function_pointer); + public static void glGetCompressedTexImage(int target, int lod, long img_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetCompressedTexImage; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensurePackPBOenabled(caps); + nglGetCompressedTexImageBO(target, lod, img_buffer_offset, function_pointer); + } + static native void nglGetCompressedTexImageBO(int target, int lod, long img_buffer_offset, long function_pointer); + + public static void glMultiTexCoord1f(int target, float s) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoord1f; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoord1f(target, s, function_pointer); + } + static native void nglMultiTexCoord1f(int target, float s, long function_pointer); + + public static void glMultiTexCoord1d(int target, double s) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoord1d; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoord1d(target, s, function_pointer); + } + static native void nglMultiTexCoord1d(int target, double s, long function_pointer); + + public static void glMultiTexCoord2f(int target, float s, float t) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoord2f; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoord2f(target, s, t, function_pointer); + } + static native void nglMultiTexCoord2f(int target, float s, float t, long function_pointer); + + public static void glMultiTexCoord2d(int target, double s, double t) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoord2d; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoord2d(target, s, t, function_pointer); + } + static native void nglMultiTexCoord2d(int target, double s, double t, long function_pointer); + + public static void glMultiTexCoord3f(int target, float s, float t, float r) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoord3f; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoord3f(target, s, t, r, function_pointer); + } + static native void nglMultiTexCoord3f(int target, float s, float t, float r, long function_pointer); + + public static void glMultiTexCoord3d(int target, double s, double t, double r) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoord3d; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoord3d(target, s, t, r, function_pointer); + } + static native void nglMultiTexCoord3d(int target, double s, double t, double r, long function_pointer); + + public static void glMultiTexCoord4f(int target, float s, float t, float r, float q) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoord4f; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoord4f(target, s, t, r, q, function_pointer); + } + static native void nglMultiTexCoord4f(int target, float s, float t, float r, float q, long function_pointer); + + public static void glMultiTexCoord4d(int target, double s, double t, double r, double q) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoord4d; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoord4d(target, s, t, r, q, function_pointer); + } + static native void nglMultiTexCoord4d(int target, double s, double t, double r, double q, long function_pointer); + + public static void glLoadTransposeMatrix(FloatBuffer m) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glLoadTransposeMatrixf; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(m, 16); + nglLoadTransposeMatrixf(MemoryUtil.getAddress(m), function_pointer); + } + static native void nglLoadTransposeMatrixf(long m, long function_pointer); + + public static void glLoadTransposeMatrix(DoubleBuffer m) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glLoadTransposeMatrixd; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(m, 16); + nglLoadTransposeMatrixd(MemoryUtil.getAddress(m), function_pointer); + } + static native void nglLoadTransposeMatrixd(long m, long function_pointer); + + public static void glMultTransposeMatrix(FloatBuffer m) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultTransposeMatrixf; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(m, 16); + nglMultTransposeMatrixf(MemoryUtil.getAddress(m), function_pointer); + } + static native void nglMultTransposeMatrixf(long m, long function_pointer); + + public static void glMultTransposeMatrix(DoubleBuffer m) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultTransposeMatrixd; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(m, 16); + nglMultTransposeMatrixd(MemoryUtil.getAddress(m), function_pointer); + } + static native void nglMultTransposeMatrixd(long m, long function_pointer); + + public static void glSampleCoverage(float value, boolean invert) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSampleCoverage; + BufferChecks.checkFunctionAddress(function_pointer); + nglSampleCoverage(value, invert, function_pointer); + } + static native void nglSampleCoverage(float value, boolean invert, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL14.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL14.java new file mode 100644 index 0000000..2ff7c1f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL14.java @@ -0,0 +1,292 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +/** + *

+ * The core OpenGL1.4 API. + *

+ * @author cix_foo + * @version $Revision$ + * $Id$ + */ +public final class GL14 { + + public static final int GL_GENERATE_MIPMAP = 0x8191, + GL_GENERATE_MIPMAP_HINT = 0x8192, + GL_DEPTH_COMPONENT16 = 0x81A5, + GL_DEPTH_COMPONENT24 = 0x81A6, + GL_DEPTH_COMPONENT32 = 0x81A7, + GL_TEXTURE_DEPTH_SIZE = 0x884A, + GL_DEPTH_TEXTURE_MODE = 0x884B, + GL_TEXTURE_COMPARE_MODE = 0x884C, + GL_TEXTURE_COMPARE_FUNC = 0x884D, + GL_COMPARE_R_TO_TEXTURE = 0x884E, + GL_FOG_COORDINATE_SOURCE = 0x8450, + GL_FOG_COORDINATE = 0x8451, + GL_FRAGMENT_DEPTH = 0x8452, + GL_CURRENT_FOG_COORDINATE = 0x8453, + GL_FOG_COORDINATE_ARRAY_TYPE = 0x8454, + GL_FOG_COORDINATE_ARRAY_STRIDE = 0x8455, + GL_FOG_COORDINATE_ARRAY_POINTER = 0x8456, + GL_FOG_COORDINATE_ARRAY = 0x8457, + GL_POINT_SIZE_MIN = 0x8126, + GL_POINT_SIZE_MAX = 0x8127, + GL_POINT_FADE_THRESHOLD_SIZE = 0x8128, + GL_POINT_DISTANCE_ATTENUATION = 0x8129, + GL_COLOR_SUM = 0x8458, + GL_CURRENT_SECONDARY_COLOR = 0x8459, + GL_SECONDARY_COLOR_ARRAY_SIZE = 0x845A, + GL_SECONDARY_COLOR_ARRAY_TYPE = 0x845B, + GL_SECONDARY_COLOR_ARRAY_STRIDE = 0x845C, + GL_SECONDARY_COLOR_ARRAY_POINTER = 0x845D, + GL_SECONDARY_COLOR_ARRAY = 0x845E, + GL_BLEND_DST_RGB = 0x80C8, + GL_BLEND_SRC_RGB = 0x80C9, + GL_BLEND_DST_ALPHA = 0x80CA, + GL_BLEND_SRC_ALPHA = 0x80CB, + GL_INCR_WRAP = 0x8507, + GL_DECR_WRAP = 0x8508, + GL_TEXTURE_FILTER_CONTROL = 0x8500, + GL_TEXTURE_LOD_BIAS = 0x8501, + GL_MAX_TEXTURE_LOD_BIAS = 0x84FD, + GL_MIRRORED_REPEAT = 0x8370, + GL_BLEND_COLOR = 0x8005, + GL_BLEND_EQUATION = 0x8009, + GL_FUNC_ADD = 0x8006, + GL_FUNC_SUBTRACT = 0x800A, + GL_FUNC_REVERSE_SUBTRACT = 0x800B, + GL_MIN = 0x8007, + GL_MAX = 0x8008; + + private GL14() {} + + public static void glBlendEquation(int mode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBlendEquation; + BufferChecks.checkFunctionAddress(function_pointer); + nglBlendEquation(mode, function_pointer); + } + static native void nglBlendEquation(int mode, long function_pointer); + + public static void glBlendColor(float red, float green, float blue, float alpha) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBlendColor; + BufferChecks.checkFunctionAddress(function_pointer); + nglBlendColor(red, green, blue, alpha, function_pointer); + } + static native void nglBlendColor(float red, float green, float blue, float alpha, long function_pointer); + + public static void glFogCoordf(float coord) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFogCoordf; + BufferChecks.checkFunctionAddress(function_pointer); + nglFogCoordf(coord, function_pointer); + } + static native void nglFogCoordf(float coord, long function_pointer); + + public static void glFogCoordd(double coord) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFogCoordd; + BufferChecks.checkFunctionAddress(function_pointer); + nglFogCoordd(coord, function_pointer); + } + static native void nglFogCoordd(double coord, long function_pointer); + + public static void glFogCoordPointer(int stride, DoubleBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFogCoordPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(data); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).GL14_glFogCoordPointer_data = data; + nglFogCoordPointer(GL11.GL_DOUBLE, stride, MemoryUtil.getAddress(data), function_pointer); + } + public static void glFogCoordPointer(int stride, FloatBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFogCoordPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(data); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).GL14_glFogCoordPointer_data = data; + nglFogCoordPointer(GL11.GL_FLOAT, stride, MemoryUtil.getAddress(data), function_pointer); + } + static native void nglFogCoordPointer(int type, int stride, long data, long function_pointer); + public static void glFogCoordPointer(int type, int stride, long data_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFogCoordPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOenabled(caps); + nglFogCoordPointerBO(type, stride, data_buffer_offset, function_pointer); + } + static native void nglFogCoordPointerBO(int type, int stride, long data_buffer_offset, long function_pointer); + + public static void glMultiDrawArrays(int mode, IntBuffer piFirst, IntBuffer piCount) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiDrawArrays; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(piFirst); + BufferChecks.checkBuffer(piCount, piFirst.remaining()); + nglMultiDrawArrays(mode, MemoryUtil.getAddress(piFirst), MemoryUtil.getAddress(piCount), piFirst.remaining(), function_pointer); + } + static native void nglMultiDrawArrays(int mode, long piFirst, long piCount, int piFirst_primcount, long function_pointer); + + public static void glPointParameteri(int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPointParameteri; + BufferChecks.checkFunctionAddress(function_pointer); + nglPointParameteri(pname, param, function_pointer); + } + static native void nglPointParameteri(int pname, int param, long function_pointer); + + public static void glPointParameterf(int pname, float param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPointParameterf; + BufferChecks.checkFunctionAddress(function_pointer); + nglPointParameterf(pname, param, function_pointer); + } + static native void nglPointParameterf(int pname, float param, long function_pointer); + + public static void glPointParameter(int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPointParameteriv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglPointParameteriv(pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglPointParameteriv(int pname, long params, long function_pointer); + + public static void glPointParameter(int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPointParameterfv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglPointParameterfv(pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglPointParameterfv(int pname, long params, long function_pointer); + + public static void glSecondaryColor3b(byte red, byte green, byte blue) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSecondaryColor3b; + BufferChecks.checkFunctionAddress(function_pointer); + nglSecondaryColor3b(red, green, blue, function_pointer); + } + static native void nglSecondaryColor3b(byte red, byte green, byte blue, long function_pointer); + + public static void glSecondaryColor3f(float red, float green, float blue) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSecondaryColor3f; + BufferChecks.checkFunctionAddress(function_pointer); + nglSecondaryColor3f(red, green, blue, function_pointer); + } + static native void nglSecondaryColor3f(float red, float green, float blue, long function_pointer); + + public static void glSecondaryColor3d(double red, double green, double blue) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSecondaryColor3d; + BufferChecks.checkFunctionAddress(function_pointer); + nglSecondaryColor3d(red, green, blue, function_pointer); + } + static native void nglSecondaryColor3d(double red, double green, double blue, long function_pointer); + + public static void glSecondaryColor3ub(byte red, byte green, byte blue) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSecondaryColor3ub; + BufferChecks.checkFunctionAddress(function_pointer); + nglSecondaryColor3ub(red, green, blue, function_pointer); + } + static native void nglSecondaryColor3ub(byte red, byte green, byte blue, long function_pointer); + + public static void glSecondaryColorPointer(int size, int stride, DoubleBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSecondaryColorPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(data); + nglSecondaryColorPointer(size, GL11.GL_DOUBLE, stride, MemoryUtil.getAddress(data), function_pointer); + } + public static void glSecondaryColorPointer(int size, int stride, FloatBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSecondaryColorPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(data); + nglSecondaryColorPointer(size, GL11.GL_FLOAT, stride, MemoryUtil.getAddress(data), function_pointer); + } + public static void glSecondaryColorPointer(int size, boolean unsigned, int stride, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSecondaryColorPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(data); + nglSecondaryColorPointer(size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, stride, MemoryUtil.getAddress(data), function_pointer); + } + static native void nglSecondaryColorPointer(int size, int type, int stride, long data, long function_pointer); + public static void glSecondaryColorPointer(int size, int type, int stride, long data_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSecondaryColorPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOenabled(caps); + nglSecondaryColorPointerBO(size, type, stride, data_buffer_offset, function_pointer); + } + static native void nglSecondaryColorPointerBO(int size, int type, int stride, long data_buffer_offset, long function_pointer); + + public static void glBlendFuncSeparate(int sfactorRGB, int dfactorRGB, int sfactorAlpha, int dfactorAlpha) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBlendFuncSeparate; + BufferChecks.checkFunctionAddress(function_pointer); + nglBlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha, function_pointer); + } + static native void nglBlendFuncSeparate(int sfactorRGB, int dfactorRGB, int sfactorAlpha, int dfactorAlpha, long function_pointer); + + public static void glWindowPos2f(float x, float y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWindowPos2f; + BufferChecks.checkFunctionAddress(function_pointer); + nglWindowPos2f(x, y, function_pointer); + } + static native void nglWindowPos2f(float x, float y, long function_pointer); + + public static void glWindowPos2d(double x, double y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWindowPos2d; + BufferChecks.checkFunctionAddress(function_pointer); + nglWindowPos2d(x, y, function_pointer); + } + static native void nglWindowPos2d(double x, double y, long function_pointer); + + public static void glWindowPos2i(int x, int y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWindowPos2i; + BufferChecks.checkFunctionAddress(function_pointer); + nglWindowPos2i(x, y, function_pointer); + } + static native void nglWindowPos2i(int x, int y, long function_pointer); + + public static void glWindowPos3f(float x, float y, float z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWindowPos3f; + BufferChecks.checkFunctionAddress(function_pointer); + nglWindowPos3f(x, y, z, function_pointer); + } + static native void nglWindowPos3f(float x, float y, float z, long function_pointer); + + public static void glWindowPos3d(double x, double y, double z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWindowPos3d; + BufferChecks.checkFunctionAddress(function_pointer); + nglWindowPos3d(x, y, z, function_pointer); + } + static native void nglWindowPos3d(double x, double y, double z, long function_pointer); + + public static void glWindowPos3i(int x, int y, int z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWindowPos3i; + BufferChecks.checkFunctionAddress(function_pointer); + nglWindowPos3i(x, y, z, function_pointer); + } + static native void nglWindowPos3i(int x, int y, int z, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL15.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL15.java new file mode 100644 index 0000000..5d225fd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL15.java @@ -0,0 +1,486 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class GL15 { + + public static final int GL_ARRAY_BUFFER = 0x8892, + GL_ELEMENT_ARRAY_BUFFER = 0x8893, + GL_ARRAY_BUFFER_BINDING = 0x8894, + GL_ELEMENT_ARRAY_BUFFER_BINDING = 0x8895, + GL_VERTEX_ARRAY_BUFFER_BINDING = 0x8896, + GL_NORMAL_ARRAY_BUFFER_BINDING = 0x8897, + GL_COLOR_ARRAY_BUFFER_BINDING = 0x8898, + GL_INDEX_ARRAY_BUFFER_BINDING = 0x8899, + GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING = 0x889A, + GL_EDGE_FLAG_ARRAY_BUFFER_BINDING = 0x889B, + GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING = 0x889C, + GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING = 0x889D, + GL_WEIGHT_ARRAY_BUFFER_BINDING = 0x889E, + GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F, + GL_STREAM_DRAW = 0x88E0, + GL_STREAM_READ = 0x88E1, + GL_STREAM_COPY = 0x88E2, + GL_STATIC_DRAW = 0x88E4, + GL_STATIC_READ = 0x88E5, + GL_STATIC_COPY = 0x88E6, + GL_DYNAMIC_DRAW = 0x88E8, + GL_DYNAMIC_READ = 0x88E9, + GL_DYNAMIC_COPY = 0x88EA, + GL_READ_ONLY = 0x88B8, + GL_WRITE_ONLY = 0x88B9, + GL_READ_WRITE = 0x88BA, + GL_BUFFER_SIZE = 0x8764, + GL_BUFFER_USAGE = 0x8765, + GL_BUFFER_ACCESS = 0x88BB, + GL_BUFFER_MAPPED = 0x88BC, + GL_BUFFER_MAP_POINTER = 0x88BD, + GL_FOG_COORD_SRC = 0x8450, + GL_FOG_COORD = 0x8451, + GL_CURRENT_FOG_COORD = 0x8453, + GL_FOG_COORD_ARRAY_TYPE = 0x8454, + GL_FOG_COORD_ARRAY_STRIDE = 0x8455, + GL_FOG_COORD_ARRAY_POINTER = 0x8456, + GL_FOG_COORD_ARRAY = 0x8457, + GL_FOG_COORD_ARRAY_BUFFER_BINDING = 0x889D, + GL_SRC0_RGB = 0x8580, + GL_SRC1_RGB = 0x8581, + GL_SRC2_RGB = 0x8582, + GL_SRC0_ALPHA = 0x8588, + GL_SRC1_ALPHA = 0x8589, + GL_SRC2_ALPHA = 0x858A; + + /** + * Accepted by the <target> parameter of BeginQuery, EndQuery, + * and GetQueryiv: + */ + public static final int GL_SAMPLES_PASSED = 0x8914; + + /** + * Accepted by the <pname> parameter of GetQueryiv: + */ + public static final int GL_QUERY_COUNTER_BITS = 0x8864, + GL_CURRENT_QUERY = 0x8865; + + /** + * Accepted by the <pname> parameter of GetQueryObjectiv and + * GetQueryObjectuiv: + */ + public static final int GL_QUERY_RESULT = 0x8866, + GL_QUERY_RESULT_AVAILABLE = 0x8867; + + private GL15() {} + + public static void glBindBuffer(int target, int buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + StateTracker.bindBuffer(caps, target, buffer); + nglBindBuffer(target, buffer, function_pointer); + } + static native void nglBindBuffer(int target, int buffer, long function_pointer); + + public static void glDeleteBuffers(IntBuffer buffers) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteBuffers; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(buffers); + nglDeleteBuffers(buffers.remaining(), MemoryUtil.getAddress(buffers), function_pointer); + } + static native void nglDeleteBuffers(int buffers_n, long buffers, long function_pointer); + + /** Overloads glDeleteBuffers. */ + public static void glDeleteBuffers(int buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteBuffers; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeleteBuffers(1, APIUtil.getInt(caps, buffer), function_pointer); + } + + public static void glGenBuffers(IntBuffer buffers) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenBuffers; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(buffers); + nglGenBuffers(buffers.remaining(), MemoryUtil.getAddress(buffers), function_pointer); + } + static native void nglGenBuffers(int buffers_n, long buffers, long function_pointer); + + /** Overloads glGenBuffers. */ + public static int glGenBuffers() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenBuffers; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer buffers = APIUtil.getBufferInt(caps); + nglGenBuffers(1, MemoryUtil.getAddress(buffers), function_pointer); + return buffers.get(0); + } + + public static boolean glIsBuffer(int buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsBuffer(buffer, function_pointer); + return __result; + } + static native boolean nglIsBuffer(int buffer, long function_pointer); + + public static void glBufferData(int target, long data_size, int usage) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferData; + BufferChecks.checkFunctionAddress(function_pointer); + nglBufferData(target, data_size, 0L, usage, function_pointer); + } + public static void glBufferData(int target, ByteBuffer data, int usage) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferData; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglBufferData(target, data.remaining(), MemoryUtil.getAddress(data), usage, function_pointer); + } + public static void glBufferData(int target, DoubleBuffer data, int usage) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferData; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglBufferData(target, (data.remaining() << 3), MemoryUtil.getAddress(data), usage, function_pointer); + } + public static void glBufferData(int target, FloatBuffer data, int usage) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferData; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglBufferData(target, (data.remaining() << 2), MemoryUtil.getAddress(data), usage, function_pointer); + } + public static void glBufferData(int target, IntBuffer data, int usage) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferData; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglBufferData(target, (data.remaining() << 2), MemoryUtil.getAddress(data), usage, function_pointer); + } + public static void glBufferData(int target, ShortBuffer data, int usage) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferData; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglBufferData(target, (data.remaining() << 1), MemoryUtil.getAddress(data), usage, function_pointer); + } + static native void nglBufferData(int target, long data_size, long data, int usage, long function_pointer); + + public static void glBufferSubData(int target, long offset, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferSubData; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglBufferSubData(target, offset, data.remaining(), MemoryUtil.getAddress(data), function_pointer); + } + public static void glBufferSubData(int target, long offset, DoubleBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferSubData; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglBufferSubData(target, offset, (data.remaining() << 3), MemoryUtil.getAddress(data), function_pointer); + } + public static void glBufferSubData(int target, long offset, FloatBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferSubData; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglBufferSubData(target, offset, (data.remaining() << 2), MemoryUtil.getAddress(data), function_pointer); + } + public static void glBufferSubData(int target, long offset, IntBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferSubData; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglBufferSubData(target, offset, (data.remaining() << 2), MemoryUtil.getAddress(data), function_pointer); + } + public static void glBufferSubData(int target, long offset, ShortBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferSubData; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglBufferSubData(target, offset, (data.remaining() << 1), MemoryUtil.getAddress(data), function_pointer); + } + static native void nglBufferSubData(int target, long offset, long data_size, long data, long function_pointer); + + public static void glGetBufferSubData(int target, long offset, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetBufferSubData; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglGetBufferSubData(target, offset, data.remaining(), MemoryUtil.getAddress(data), function_pointer); + } + public static void glGetBufferSubData(int target, long offset, DoubleBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetBufferSubData; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglGetBufferSubData(target, offset, (data.remaining() << 3), MemoryUtil.getAddress(data), function_pointer); + } + public static void glGetBufferSubData(int target, long offset, FloatBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetBufferSubData; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglGetBufferSubData(target, offset, (data.remaining() << 2), MemoryUtil.getAddress(data), function_pointer); + } + public static void glGetBufferSubData(int target, long offset, IntBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetBufferSubData; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglGetBufferSubData(target, offset, (data.remaining() << 2), MemoryUtil.getAddress(data), function_pointer); + } + public static void glGetBufferSubData(int target, long offset, ShortBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetBufferSubData; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglGetBufferSubData(target, offset, (data.remaining() << 1), MemoryUtil.getAddress(data), function_pointer); + } + static native void nglGetBufferSubData(int target, long offset, long data_size, long data, long function_pointer); + + /** + * glMapBuffer maps a GL buffer object to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapBuffer like this: + *

+ * ByteBuffer mapped_buffer; mapped_buffer = glMapBuffer(..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBuffer(..., ..., mapped_buffer); + *

+ * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + *

+ * The version of this method without an explicit length argument calls glGetBufferParameter internally to + * retrieve the current buffer object size, which may cause a pipeline flush and reduce application performance. + *

+ * The version of this method with an explicit length argument is a fast alternative to the one without. No GL call + * is made to retrieve the buffer object size, so the user is responsible for tracking and using the appropriate length.
+ * Security warning: The length argument should match the buffer object size. Reading from or writing to outside + * the memory region that corresponds to the mapped buffer object will cause native crashes. + *

+ * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. + *

+ * @return A ByteBuffer representing the mapped buffer memory. + */ + public static ByteBuffer glMapBuffer(int target, int access, ByteBuffer old_buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMapBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + if (old_buffer != null) + BufferChecks.checkDirect(old_buffer); + ByteBuffer __result = nglMapBuffer(target, access, GLChecks.getBufferObjectSize(caps, target), old_buffer, function_pointer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + /** + * glMapBuffer maps a GL buffer object to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapBuffer like this: + *

+ * ByteBuffer mapped_buffer; mapped_buffer = glMapBuffer(..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBuffer(..., ..., mapped_buffer); + *

+ * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + *

+ * The version of this method without an explicit length argument calls glGetBufferParameter internally to + * retrieve the current buffer object size, which may cause a pipeline flush and reduce application performance. + *

+ * The version of this method with an explicit length argument is a fast alternative to the one without. No GL call + * is made to retrieve the buffer object size, so the user is responsible for tracking and using the appropriate length.
+ * Security warning: The length argument should match the buffer object size. Reading from or writing to outside + * the memory region that corresponds to the mapped buffer object will cause native crashes. + *

+ * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. + *

+ * @return A ByteBuffer representing the mapped buffer memory. + */ + public static ByteBuffer glMapBuffer(int target, int access, long length, ByteBuffer old_buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMapBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + if (old_buffer != null) + BufferChecks.checkDirect(old_buffer); + ByteBuffer __result = nglMapBuffer(target, access, length, old_buffer, function_pointer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + static native ByteBuffer nglMapBuffer(int target, int access, long result_size, ByteBuffer old_buffer, long function_pointer); + + public static boolean glUnmapBuffer(int target) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUnmapBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglUnmapBuffer(target, function_pointer); + return __result; + } + static native boolean nglUnmapBuffer(int target, long function_pointer); + + public static void glGetBufferParameter(int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetBufferParameteriv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetBufferParameteriv(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetBufferParameteriv(int target, int pname, long params, long function_pointer); + + /** + * Overloads glGetBufferParameteriv. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetBufferParameteri} instead. + */ + @Deprecated + public static int glGetBufferParameter(int target, int pname) { + return GL15.glGetBufferParameteri(target, pname); + } + + /** Overloads glGetBufferParameteriv. */ + public static int glGetBufferParameteri(int target, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetBufferParameteriv; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetBufferParameteriv(target, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static ByteBuffer glGetBufferPointer(int target, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetBufferPointerv; + BufferChecks.checkFunctionAddress(function_pointer); + ByteBuffer __result = nglGetBufferPointerv(target, pname, GLChecks.getBufferObjectSize(caps, target), function_pointer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + static native ByteBuffer nglGetBufferPointerv(int target, int pname, long result_size, long function_pointer); + + public static void glGenQueries(IntBuffer ids) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenQueries; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(ids); + nglGenQueries(ids.remaining(), MemoryUtil.getAddress(ids), function_pointer); + } + static native void nglGenQueries(int ids_n, long ids, long function_pointer); + + /** Overloads glGenQueries. */ + public static int glGenQueries() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenQueries; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer ids = APIUtil.getBufferInt(caps); + nglGenQueries(1, MemoryUtil.getAddress(ids), function_pointer); + return ids.get(0); + } + + public static void glDeleteQueries(IntBuffer ids) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteQueries; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(ids); + nglDeleteQueries(ids.remaining(), MemoryUtil.getAddress(ids), function_pointer); + } + static native void nglDeleteQueries(int ids_n, long ids, long function_pointer); + + /** Overloads glDeleteQueries. */ + public static void glDeleteQueries(int id) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteQueries; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeleteQueries(1, APIUtil.getInt(caps, id), function_pointer); + } + + public static boolean glIsQuery(int id) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsQuery; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsQuery(id, function_pointer); + return __result; + } + static native boolean nglIsQuery(int id, long function_pointer); + + public static void glBeginQuery(int target, int id) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBeginQuery; + BufferChecks.checkFunctionAddress(function_pointer); + nglBeginQuery(target, id, function_pointer); + } + static native void nglBeginQuery(int target, int id, long function_pointer); + + public static void glEndQuery(int target) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEndQuery; + BufferChecks.checkFunctionAddress(function_pointer); + nglEndQuery(target, function_pointer); + } + static native void nglEndQuery(int target, long function_pointer); + + public static void glGetQuery(int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetQueryiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetQueryiv(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetQueryiv(int target, int pname, long params, long function_pointer); + + /** + * Overloads glGetQueryiv. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetQueryi} instead. + */ + @Deprecated + public static int glGetQuery(int target, int pname) { + return GL15.glGetQueryi(target, pname); + } + + /** Overloads glGetQueryiv. */ + public static int glGetQueryi(int target, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetQueryiv; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetQueryiv(target, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetQueryObject(int id, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetQueryObjectiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetQueryObjectiv(id, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetQueryObjectiv(int id, int pname, long params, long function_pointer); + + /** Overloads glGetQueryObjectiv. */ + public static int glGetQueryObjecti(int id, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetQueryObjectiv; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetQueryObjectiv(id, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetQueryObjectu(int id, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetQueryObjectuiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetQueryObjectuiv(id, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetQueryObjectuiv(int id, int pname, long params, long function_pointer); + + /** Overloads glGetQueryObjectuiv. */ + public static int glGetQueryObjectui(int id, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetQueryObjectuiv; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetQueryObjectuiv(id, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL20.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL20.java new file mode 100644 index 0000000..8aa536a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL20.java @@ -0,0 +1,1130 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class GL20 { + + /** + * Accepted by the <name> parameter of GetString: + */ + public static final int GL_SHADING_LANGUAGE_VERSION = 0x8B8C; + + /** + * Accepted by the <pname> argument of GetInteger: + */ + public static final int GL_CURRENT_PROGRAM = 0x8B8D; + + /** + * Accepted by the <pname> parameter of GetObjectParameter{fi}vARB: + */ + public static final int GL_SHADER_TYPE = 0x8B4F, + GL_DELETE_STATUS = 0x8B80, + GL_COMPILE_STATUS = 0x8B81, + GL_LINK_STATUS = 0x8B82, + GL_VALIDATE_STATUS = 0x8B83, + GL_INFO_LOG_LENGTH = 0x8B84, + GL_ATTACHED_SHADERS = 0x8B85, + GL_ACTIVE_UNIFORMS = 0x8B86, + GL_ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87, + GL_ACTIVE_ATTRIBUTES = 0x8B89, + GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A, + GL_SHADER_SOURCE_LENGTH = 0x8B88; + + /** + * Returned by the <params> parameter of GetObjectParameter{fi}vARB: + */ + public static final int GL_SHADER_OBJECT = 0x8B48; + + /** + * Returned by the <type> parameter of GetActiveUniformARB: + */ + public static final int GL_FLOAT_VEC2 = 0x8B50, + GL_FLOAT_VEC3 = 0x8B51, + GL_FLOAT_VEC4 = 0x8B52, + GL_INT_VEC2 = 0x8B53, + GL_INT_VEC3 = 0x8B54, + GL_INT_VEC4 = 0x8B55, + GL_BOOL = 0x8B56, + GL_BOOL_VEC2 = 0x8B57, + GL_BOOL_VEC3 = 0x8B58, + GL_BOOL_VEC4 = 0x8B59, + GL_FLOAT_MAT2 = 0x8B5A, + GL_FLOAT_MAT3 = 0x8B5B, + GL_FLOAT_MAT4 = 0x8B5C, + GL_SAMPLER_1D = 0x8B5D, + GL_SAMPLER_2D = 0x8B5E, + GL_SAMPLER_3D = 0x8B5F, + GL_SAMPLER_CUBE = 0x8B60, + GL_SAMPLER_1D_SHADOW = 0x8B61, + GL_SAMPLER_2D_SHADOW = 0x8B62; + + /** + * Accepted by the <shaderType> argument of CreateShader and + * returned by the <params> parameter of GetShader{if}v: + */ + public static final int GL_VERTEX_SHADER = 0x8B31; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_MAX_VERTEX_UNIFORM_COMPONENTS = 0x8B4A, + GL_MAX_VARYING_FLOATS = 0x8B4B, + GL_MAX_VERTEX_ATTRIBS = 0x8869, + GL_MAX_TEXTURE_IMAGE_UNITS = 0x8872, + GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C, + GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D, + GL_MAX_TEXTURE_COORDS = 0x8871; + + /** + * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, and + * by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev: + */ + public static final int GL_VERTEX_PROGRAM_POINT_SIZE = 0x8642, + GL_VERTEX_PROGRAM_TWO_SIDE = 0x8643; + + /** + * Accepted by the <pname> parameter of GetVertexAttrib{dfi}vARB: + */ + public static final int GL_VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622, + GL_VERTEX_ATTRIB_ARRAY_SIZE = 0x8623, + GL_VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624, + GL_VERTEX_ATTRIB_ARRAY_TYPE = 0x8625, + GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A, + GL_CURRENT_VERTEX_ATTRIB = 0x8626; + + /** + * Accepted by the <pname> parameter of GetVertexAttribPointervARB: + */ + public static final int GL_VERTEX_ATTRIB_ARRAY_POINTER = 0x8645; + + /** + * Accepted by the <shaderType> argument of CreateShader and + * returned by the <params> parameter of GetShader{fi}vARB: + */ + public static final int GL_FRAGMENT_SHADER = 0x8B30; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_MAX_FRAGMENT_UNIFORM_COMPONENTS = 0x8B49; + + /** + * Accepted by the <target> parameter of Hint and the <pname> parameter of + * GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev: + */ + public static final int GL_FRAGMENT_SHADER_DERIVATIVE_HINT = 0x8B8B; + + /** + * Accepted by the <pname> parameters of GetIntegerv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_MAX_DRAW_BUFFERS = 0x8824, + GL_DRAW_BUFFER0 = 0x8825, + GL_DRAW_BUFFER1 = 0x8826, + GL_DRAW_BUFFER2 = 0x8827, + GL_DRAW_BUFFER3 = 0x8828, + GL_DRAW_BUFFER4 = 0x8829, + GL_DRAW_BUFFER5 = 0x882A, + GL_DRAW_BUFFER6 = 0x882B, + GL_DRAW_BUFFER7 = 0x882C, + GL_DRAW_BUFFER8 = 0x882D, + GL_DRAW_BUFFER9 = 0x882E, + GL_DRAW_BUFFER10 = 0x882F, + GL_DRAW_BUFFER11 = 0x8830, + GL_DRAW_BUFFER12 = 0x8831, + GL_DRAW_BUFFER13 = 0x8832, + GL_DRAW_BUFFER14 = 0x8833, + GL_DRAW_BUFFER15 = 0x8834; + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, by + * the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev, and by the <target> parameter of TexEnvi, TexEnviv, + * TexEnvf, TexEnvfv, GetTexEnviv, and GetTexEnvfv: + */ + public static final int GL_POINT_SPRITE = 0x8861; + + /** + * When the <target> parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv, + * GetTexEnvfv, or GetTexEnviv is POINT_SPRITE, then the value of + * <pname> may be: + */ + public static final int GL_COORD_REPLACE = 0x8862; + + /** + * Accepted by the <pname> parameter of PointParameter{if}vARB, and the + * <pname> of Get: + */ + public static final int GL_POINT_SPRITE_COORD_ORIGIN = 0x8CA0; + + /** + * Accepted by the <param> parameter of PointParameter{if}vARB: + */ + public static final int GL_LOWER_LEFT = 0x8CA1, + GL_UPPER_LEFT = 0x8CA2, + GL_STENCIL_BACK_FUNC = 0x8800, + GL_STENCIL_BACK_FAIL = 0x8801, + GL_STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802, + GL_STENCIL_BACK_PASS_DEPTH_PASS = 0x8803, + GL_STENCIL_BACK_REF = 0x8CA3, + GL_STENCIL_BACK_VALUE_MASK = 0x8CA4, + GL_STENCIL_BACK_WRITEMASK = 0x8CA5, + GL_BLEND_EQUATION_RGB = 0x8009, + GL_BLEND_EQUATION_ALPHA = 0x883D; + + private GL20() {} + + /** + * The ARB_shader_objects extension allows multiple, optionally null-terminated, source strings to define a shader program. + *

+ * This method uses just a single string, that should NOT be null-terminated. + *

+ * @param shader + * @param string + */ + public static void glShaderSource(int shader, ByteBuffer string) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glShaderSource; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(string); + nglShaderSource(shader, 1, MemoryUtil.getAddress(string), string.remaining(), function_pointer); + } + static native void nglShaderSource(int shader, int count, long string, int string_length, long function_pointer); + + /** Overloads glShaderSource. */ + public static void glShaderSource(int shader, CharSequence string) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glShaderSource; + BufferChecks.checkFunctionAddress(function_pointer); + nglShaderSource(shader, 1, APIUtil.getBuffer(caps, string), string.length(), function_pointer); + } + + /** Overloads glShaderSource. */ + public static void glShaderSource(int shader, CharSequence[] strings) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glShaderSource; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkArray(strings); + nglShaderSource3(shader, strings.length, APIUtil.getBuffer(caps, strings), APIUtil.getLengths(caps, strings), function_pointer); + } + static native void nglShaderSource3(int shader, int count, long strings, long length, long function_pointer); + + public static int glCreateShader(int type) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCreateShader; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglCreateShader(type, function_pointer); + return __result; + } + static native int nglCreateShader(int type, long function_pointer); + + public static boolean glIsShader(int shader) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsShader; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsShader(shader, function_pointer); + return __result; + } + static native boolean nglIsShader(int shader, long function_pointer); + + public static void glCompileShader(int shader) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCompileShader; + BufferChecks.checkFunctionAddress(function_pointer); + nglCompileShader(shader, function_pointer); + } + static native void nglCompileShader(int shader, long function_pointer); + + public static void glDeleteShader(int shader) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteShader; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeleteShader(shader, function_pointer); + } + static native void nglDeleteShader(int shader, long function_pointer); + + public static int glCreateProgram() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCreateProgram; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglCreateProgram(function_pointer); + return __result; + } + static native int nglCreateProgram(long function_pointer); + + public static boolean glIsProgram(int program) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsProgram; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsProgram(program, function_pointer); + return __result; + } + static native boolean nglIsProgram(int program, long function_pointer); + + public static void glAttachShader(int program, int shader) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glAttachShader; + BufferChecks.checkFunctionAddress(function_pointer); + nglAttachShader(program, shader, function_pointer); + } + static native void nglAttachShader(int program, int shader, long function_pointer); + + public static void glDetachShader(int program, int shader) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDetachShader; + BufferChecks.checkFunctionAddress(function_pointer); + nglDetachShader(program, shader, function_pointer); + } + static native void nglDetachShader(int program, int shader, long function_pointer); + + public static void glLinkProgram(int program) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glLinkProgram; + BufferChecks.checkFunctionAddress(function_pointer); + nglLinkProgram(program, function_pointer); + } + static native void nglLinkProgram(int program, long function_pointer); + + public static void glUseProgram(int program) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUseProgram; + BufferChecks.checkFunctionAddress(function_pointer); + nglUseProgram(program, function_pointer); + } + static native void nglUseProgram(int program, long function_pointer); + + public static void glValidateProgram(int program) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glValidateProgram; + BufferChecks.checkFunctionAddress(function_pointer); + nglValidateProgram(program, function_pointer); + } + static native void nglValidateProgram(int program, long function_pointer); + + public static void glDeleteProgram(int program) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteProgram; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeleteProgram(program, function_pointer); + } + static native void nglDeleteProgram(int program, long function_pointer); + + public static void glUniform1f(int location, float v0) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform1f; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform1f(location, v0, function_pointer); + } + static native void nglUniform1f(int location, float v0, long function_pointer); + + public static void glUniform2f(int location, float v0, float v1) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform2f; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform2f(location, v0, v1, function_pointer); + } + static native void nglUniform2f(int location, float v0, float v1, long function_pointer); + + public static void glUniform3f(int location, float v0, float v1, float v2) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform3f; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform3f(location, v0, v1, v2, function_pointer); + } + static native void nglUniform3f(int location, float v0, float v1, float v2, long function_pointer); + + public static void glUniform4f(int location, float v0, float v1, float v2, float v3) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform4f; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform4f(location, v0, v1, v2, v3, function_pointer); + } + static native void nglUniform4f(int location, float v0, float v1, float v2, float v3, long function_pointer); + + public static void glUniform1i(int location, int v0) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform1i; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform1i(location, v0, function_pointer); + } + static native void nglUniform1i(int location, int v0, long function_pointer); + + public static void glUniform2i(int location, int v0, int v1) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform2i; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform2i(location, v0, v1, function_pointer); + } + static native void nglUniform2i(int location, int v0, int v1, long function_pointer); + + public static void glUniform3i(int location, int v0, int v1, int v2) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform3i; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform3i(location, v0, v1, v2, function_pointer); + } + static native void nglUniform3i(int location, int v0, int v1, int v2, long function_pointer); + + public static void glUniform4i(int location, int v0, int v1, int v2, int v3) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform4i; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform4i(location, v0, v1, v2, v3, function_pointer); + } + static native void nglUniform4i(int location, int v0, int v1, int v2, int v3, long function_pointer); + + public static void glUniform1(int location, FloatBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform1fv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(values); + nglUniform1fv(location, values.remaining(), MemoryUtil.getAddress(values), function_pointer); + } + static native void nglUniform1fv(int location, int values_count, long values, long function_pointer); + + public static void glUniform2(int location, FloatBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform2fv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(values); + nglUniform2fv(location, values.remaining() >> 1, MemoryUtil.getAddress(values), function_pointer); + } + static native void nglUniform2fv(int location, int values_count, long values, long function_pointer); + + public static void glUniform3(int location, FloatBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform3fv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(values); + nglUniform3fv(location, values.remaining() / 3, MemoryUtil.getAddress(values), function_pointer); + } + static native void nglUniform3fv(int location, int values_count, long values, long function_pointer); + + public static void glUniform4(int location, FloatBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform4fv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(values); + nglUniform4fv(location, values.remaining() >> 2, MemoryUtil.getAddress(values), function_pointer); + } + static native void nglUniform4fv(int location, int values_count, long values, long function_pointer); + + public static void glUniform1(int location, IntBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform1iv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(values); + nglUniform1iv(location, values.remaining(), MemoryUtil.getAddress(values), function_pointer); + } + static native void nglUniform1iv(int location, int values_count, long values, long function_pointer); + + public static void glUniform2(int location, IntBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform2iv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(values); + nglUniform2iv(location, values.remaining() >> 1, MemoryUtil.getAddress(values), function_pointer); + } + static native void nglUniform2iv(int location, int values_count, long values, long function_pointer); + + public static void glUniform3(int location, IntBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform3iv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(values); + nglUniform3iv(location, values.remaining() / 3, MemoryUtil.getAddress(values), function_pointer); + } + static native void nglUniform3iv(int location, int values_count, long values, long function_pointer); + + public static void glUniform4(int location, IntBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform4iv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(values); + nglUniform4iv(location, values.remaining() >> 2, MemoryUtil.getAddress(values), function_pointer); + } + static native void nglUniform4iv(int location, int values_count, long values, long function_pointer); + + public static void glUniformMatrix2(int location, boolean transpose, FloatBuffer matrices) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformMatrix2fv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(matrices); + nglUniformMatrix2fv(location, matrices.remaining() >> 2, transpose, MemoryUtil.getAddress(matrices), function_pointer); + } + static native void nglUniformMatrix2fv(int location, int matrices_count, boolean transpose, long matrices, long function_pointer); + + public static void glUniformMatrix3(int location, boolean transpose, FloatBuffer matrices) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformMatrix3fv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(matrices); + nglUniformMatrix3fv(location, matrices.remaining() / (3 * 3), transpose, MemoryUtil.getAddress(matrices), function_pointer); + } + static native void nglUniformMatrix3fv(int location, int matrices_count, boolean transpose, long matrices, long function_pointer); + + public static void glUniformMatrix4(int location, boolean transpose, FloatBuffer matrices) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformMatrix4fv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(matrices); + nglUniformMatrix4fv(location, matrices.remaining() >> 4, transpose, MemoryUtil.getAddress(matrices), function_pointer); + } + static native void nglUniformMatrix4fv(int location, int matrices_count, boolean transpose, long matrices, long function_pointer); + + public static void glGetShader(int shader, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetShaderiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglGetShaderiv(shader, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetShaderiv(int shader, int pname, long params, long function_pointer); + + /** + * Overloads glGetShaderiv. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetShaderi} instead. + */ + @Deprecated + public static int glGetShader(int shader, int pname) { + return GL20.glGetShaderi(shader, pname); + } + + /** Overloads glGetShaderiv. */ + public static int glGetShaderi(int shader, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetShaderiv; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetShaderiv(shader, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetProgram(int program, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglGetProgramiv(program, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetProgramiv(int program, int pname, long params, long function_pointer); + + /** + * Overloads glGetProgramiv. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetProgrami} instead. + */ + @Deprecated + public static int glGetProgram(int program, int pname) { + return GL20.glGetProgrami(program, pname); + } + + /** Overloads glGetProgramiv. */ + public static int glGetProgrami(int program, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramiv; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetProgramiv(program, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetShaderInfoLog(int shader, IntBuffer length, ByteBuffer infoLog) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetShaderInfoLog; + BufferChecks.checkFunctionAddress(function_pointer); + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkDirect(infoLog); + nglGetShaderInfoLog(shader, infoLog.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(infoLog), function_pointer); + } + static native void nglGetShaderInfoLog(int shader, int infoLog_maxLength, long length, long infoLog, long function_pointer); + + /** Overloads glGetShaderInfoLog. */ + public static String glGetShaderInfoLog(int shader, int maxLength) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetShaderInfoLog; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer infoLog_length = APIUtil.getLengths(caps); + ByteBuffer infoLog = APIUtil.getBufferByte(caps, maxLength); + nglGetShaderInfoLog(shader, maxLength, MemoryUtil.getAddress0(infoLog_length), MemoryUtil.getAddress(infoLog), function_pointer); + infoLog.limit(infoLog_length.get(0)); + return APIUtil.getString(caps, infoLog); + } + + public static void glGetProgramInfoLog(int program, IntBuffer length, ByteBuffer infoLog) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramInfoLog; + BufferChecks.checkFunctionAddress(function_pointer); + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkDirect(infoLog); + nglGetProgramInfoLog(program, infoLog.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(infoLog), function_pointer); + } + static native void nglGetProgramInfoLog(int program, int infoLog_maxLength, long length, long infoLog, long function_pointer); + + /** Overloads glGetProgramInfoLog. */ + public static String glGetProgramInfoLog(int program, int maxLength) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramInfoLog; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer infoLog_length = APIUtil.getLengths(caps); + ByteBuffer infoLog = APIUtil.getBufferByte(caps, maxLength); + nglGetProgramInfoLog(program, maxLength, MemoryUtil.getAddress0(infoLog_length), MemoryUtil.getAddress(infoLog), function_pointer); + infoLog.limit(infoLog_length.get(0)); + return APIUtil.getString(caps, infoLog); + } + + public static void glGetAttachedShaders(int program, IntBuffer count, IntBuffer shaders) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetAttachedShaders; + BufferChecks.checkFunctionAddress(function_pointer); + if (count != null) + BufferChecks.checkBuffer(count, 1); + BufferChecks.checkDirect(shaders); + nglGetAttachedShaders(program, shaders.remaining(), MemoryUtil.getAddressSafe(count), MemoryUtil.getAddress(shaders), function_pointer); + } + static native void nglGetAttachedShaders(int program, int shaders_maxCount, long count, long shaders, long function_pointer); + + /** + * Returns the location of the uniform with the specified name. The ByteBuffer should contain the uniform name as a + * null-terminated string. + *

+ * @param program + * @param name + */ + public static int glGetUniformLocation(int program, ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetUniformLocation; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(name, 1); + BufferChecks.checkNullTerminated(name); + int __result = nglGetUniformLocation(program, MemoryUtil.getAddress(name), function_pointer); + return __result; + } + static native int nglGetUniformLocation(int program, long name, long function_pointer); + + /** Overloads glGetUniformLocation. */ + public static int glGetUniformLocation(int program, CharSequence name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetUniformLocation; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglGetUniformLocation(program, APIUtil.getBufferNT(caps, name), function_pointer); + return __result; + } + + public static void glGetActiveUniform(int program, int index, IntBuffer length, IntBuffer size, IntBuffer type, ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveUniform; + BufferChecks.checkFunctionAddress(function_pointer); + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkBuffer(size, 1); + BufferChecks.checkBuffer(type, 1); + BufferChecks.checkDirect(name); + nglGetActiveUniform(program, index, name.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(size), MemoryUtil.getAddress(type), MemoryUtil.getAddress(name), function_pointer); + } + static native void nglGetActiveUniform(int program, int index, int name_maxLength, long length, long size, long type, long name, long function_pointer); + + /** + * Overloads glGetActiveUniform. + *

+ * Overloads glGetActiveUniform. This version returns both size and type in the sizeType buffer (at .position() and .position() + 1). + */ + public static String glGetActiveUniform(int program, int index, int maxLength, IntBuffer sizeType) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveUniform; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(sizeType, 2); + IntBuffer name_length = APIUtil.getLengths(caps); + ByteBuffer name = APIUtil.getBufferByte(caps, maxLength); + nglGetActiveUniform(program, index, maxLength, MemoryUtil.getAddress0(name_length), MemoryUtil.getAddress(sizeType), MemoryUtil.getAddress(sizeType, sizeType.position() + 1), MemoryUtil.getAddress(name), function_pointer); + name.limit(name_length.get(0)); + return APIUtil.getString(caps, name); + } + + /** + * Overloads glGetActiveUniform. + *

+ * Overloads glGetActiveUniformARB. This version returns only the uniform name. + */ + public static String glGetActiveUniform(int program, int index, int maxLength) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveUniform; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer name_length = APIUtil.getLengths(caps); + ByteBuffer name = APIUtil.getBufferByte(caps, maxLength); + nglGetActiveUniform(program, index, maxLength, MemoryUtil.getAddress0(name_length), MemoryUtil.getAddress0(APIUtil.getBufferInt(caps)), MemoryUtil.getAddress(APIUtil.getBufferInt(caps), 1), MemoryUtil.getAddress(name), function_pointer); + name.limit(name_length.get(0)); + return APIUtil.getString(caps, name); + } + + /** + * Overloads glGetActiveUniform. + *

+ * Overloads glGetActiveUniform. This version returns only the uniform size. + */ + public static int glGetActiveUniformSize(int program, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveUniform; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer size = APIUtil.getBufferInt(caps); + nglGetActiveUniform(program, index, 1, 0L, MemoryUtil.getAddress(size), MemoryUtil.getAddress(size, 1), APIUtil.getBufferByte0(caps), function_pointer); + return size.get(0); + } + + /** + * Overloads glGetActiveUniform. + *

+ * Overloads glGetActiveUniform. This version returns only the uniform type. + */ + public static int glGetActiveUniformType(int program, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveUniform; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer type = APIUtil.getBufferInt(caps); + nglGetActiveUniform(program, index, 0, 0L, MemoryUtil.getAddress(type, 1), MemoryUtil.getAddress(type), APIUtil.getBufferByte0(caps), function_pointer); + return type.get(0); + } + + public static void glGetUniform(int program, int location, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetUniformfv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglGetUniformfv(program, location, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetUniformfv(int program, int location, long params, long function_pointer); + + public static void glGetUniform(int program, int location, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetUniformiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglGetUniformiv(program, location, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetUniformiv(int program, int location, long params, long function_pointer); + + public static void glGetShaderSource(int shader, IntBuffer length, ByteBuffer source) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetShaderSource; + BufferChecks.checkFunctionAddress(function_pointer); + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkDirect(source); + nglGetShaderSource(shader, source.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(source), function_pointer); + } + static native void nglGetShaderSource(int shader, int source_maxLength, long length, long source, long function_pointer); + + /** Overloads glGetShaderSource. */ + public static String glGetShaderSource(int shader, int maxLength) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetShaderSource; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer source_length = APIUtil.getLengths(caps); + ByteBuffer source = APIUtil.getBufferByte(caps, maxLength); + nglGetShaderSource(shader, maxLength, MemoryUtil.getAddress0(source_length), MemoryUtil.getAddress(source), function_pointer); + source.limit(source_length.get(0)); + return APIUtil.getString(caps, source); + } + + public static void glVertexAttrib1s(int index, short x) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib1s; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib1s(index, x, function_pointer); + } + static native void nglVertexAttrib1s(int index, short x, long function_pointer); + + public static void glVertexAttrib1f(int index, float x) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib1f; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib1f(index, x, function_pointer); + } + static native void nglVertexAttrib1f(int index, float x, long function_pointer); + + public static void glVertexAttrib1d(int index, double x) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib1d; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib1d(index, x, function_pointer); + } + static native void nglVertexAttrib1d(int index, double x, long function_pointer); + + public static void glVertexAttrib2s(int index, short x, short y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib2s; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib2s(index, x, y, function_pointer); + } + static native void nglVertexAttrib2s(int index, short x, short y, long function_pointer); + + public static void glVertexAttrib2f(int index, float x, float y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib2f; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib2f(index, x, y, function_pointer); + } + static native void nglVertexAttrib2f(int index, float x, float y, long function_pointer); + + public static void glVertexAttrib2d(int index, double x, double y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib2d; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib2d(index, x, y, function_pointer); + } + static native void nglVertexAttrib2d(int index, double x, double y, long function_pointer); + + public static void glVertexAttrib3s(int index, short x, short y, short z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib3s; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib3s(index, x, y, z, function_pointer); + } + static native void nglVertexAttrib3s(int index, short x, short y, short z, long function_pointer); + + public static void glVertexAttrib3f(int index, float x, float y, float z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib3f; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib3f(index, x, y, z, function_pointer); + } + static native void nglVertexAttrib3f(int index, float x, float y, float z, long function_pointer); + + public static void glVertexAttrib3d(int index, double x, double y, double z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib3d; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib3d(index, x, y, z, function_pointer); + } + static native void nglVertexAttrib3d(int index, double x, double y, double z, long function_pointer); + + public static void glVertexAttrib4s(int index, short x, short y, short z, short w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib4s; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib4s(index, x, y, z, w, function_pointer); + } + static native void nglVertexAttrib4s(int index, short x, short y, short z, short w, long function_pointer); + + public static void glVertexAttrib4f(int index, float x, float y, float z, float w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib4f; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib4f(index, x, y, z, w, function_pointer); + } + static native void nglVertexAttrib4f(int index, float x, float y, float z, float w, long function_pointer); + + public static void glVertexAttrib4d(int index, double x, double y, double z, double w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib4d; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib4d(index, x, y, z, w, function_pointer); + } + static native void nglVertexAttrib4d(int index, double x, double y, double z, double w, long function_pointer); + + public static void glVertexAttrib4Nub(int index, byte x, byte y, byte z, byte w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib4Nub; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib4Nub(index, x, y, z, w, function_pointer); + } + static native void nglVertexAttrib4Nub(int index, byte x, byte y, byte z, byte w, long function_pointer); + + public static void glVertexAttribPointer(int index, int size, boolean normalized, int stride, DoubleBuffer buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribPointer(index, size, GL11.GL_DOUBLE, normalized, stride, MemoryUtil.getAddress(buffer), function_pointer); + } + public static void glVertexAttribPointer(int index, int size, boolean normalized, int stride, FloatBuffer buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribPointer(index, size, GL11.GL_FLOAT, normalized, stride, MemoryUtil.getAddress(buffer), function_pointer); + } + public static void glVertexAttribPointer(int index, int size, boolean unsigned, boolean normalized, int stride, ByteBuffer buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribPointer(index, size, unsigned ? GL11.GL_UNSIGNED_BYTE : GL11.GL_BYTE, normalized, stride, MemoryUtil.getAddress(buffer), function_pointer); + } + public static void glVertexAttribPointer(int index, int size, boolean unsigned, boolean normalized, int stride, IntBuffer buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribPointer(index, size, unsigned ? GL11.GL_UNSIGNED_INT : GL11.GL_INT, normalized, stride, MemoryUtil.getAddress(buffer), function_pointer); + } + public static void glVertexAttribPointer(int index, int size, boolean unsigned, boolean normalized, int stride, ShortBuffer buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribPointer(index, size, unsigned ? GL11.GL_UNSIGNED_SHORT : GL11.GL_SHORT, normalized, stride, MemoryUtil.getAddress(buffer), function_pointer); + } + static native void nglVertexAttribPointer(int index, int size, int type, boolean normalized, int stride, long buffer, long function_pointer); + public static void glVertexAttribPointer(int index, int size, int type, boolean normalized, int stride, long buffer_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOenabled(caps); + nglVertexAttribPointerBO(index, size, type, normalized, stride, buffer_buffer_offset, function_pointer); + } + static native void nglVertexAttribPointerBO(int index, int size, int type, boolean normalized, int stride, long buffer_buffer_offset, long function_pointer); + + /** Overloads glVertexAttribPointer. */ + public static void glVertexAttribPointer(int index, int size, int type, boolean normalized, int stride, ByteBuffer buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribPointer(index, size, type, normalized, stride, MemoryUtil.getAddress(buffer), function_pointer); + } + + public static void glEnableVertexAttribArray(int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEnableVertexAttribArray; + BufferChecks.checkFunctionAddress(function_pointer); + nglEnableVertexAttribArray(index, function_pointer); + } + static native void nglEnableVertexAttribArray(int index, long function_pointer); + + public static void glDisableVertexAttribArray(int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDisableVertexAttribArray; + BufferChecks.checkFunctionAddress(function_pointer); + nglDisableVertexAttribArray(index, function_pointer); + } + static native void nglDisableVertexAttribArray(int index, long function_pointer); + + public static void glGetVertexAttrib(int index, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexAttribfv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetVertexAttribfv(index, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVertexAttribfv(int index, int pname, long params, long function_pointer); + + public static void glGetVertexAttrib(int index, int pname, DoubleBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexAttribdv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetVertexAttribdv(index, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVertexAttribdv(int index, int pname, long params, long function_pointer); + + public static void glGetVertexAttrib(int index, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexAttribiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetVertexAttribiv(index, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVertexAttribiv(int index, int pname, long params, long function_pointer); + + public static ByteBuffer glGetVertexAttribPointer(int index, int pname, long result_size) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexAttribPointerv; + BufferChecks.checkFunctionAddress(function_pointer); + ByteBuffer __result = nglGetVertexAttribPointerv(index, pname, result_size, function_pointer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + static native ByteBuffer nglGetVertexAttribPointerv(int index, int pname, long result_size, long function_pointer); + + /** Overloads glGetVertexAttribPointerv. */ + public static void glGetVertexAttribPointer(int index, int pname, ByteBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexAttribPointerv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(pointer, PointerBuffer.getPointerSize()); + nglGetVertexAttribPointerv2(index, pname, MemoryUtil.getAddress(pointer), function_pointer); + } + static native void nglGetVertexAttribPointerv2(int index, int pname, long pointer, long function_pointer); + + public static void glBindAttribLocation(int program, int index, ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindAttribLocation; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(name); + BufferChecks.checkNullTerminated(name); + nglBindAttribLocation(program, index, MemoryUtil.getAddress(name), function_pointer); + } + static native void nglBindAttribLocation(int program, int index, long name, long function_pointer); + + /** Overloads glBindAttribLocation. */ + public static void glBindAttribLocation(int program, int index, CharSequence name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindAttribLocation; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindAttribLocation(program, index, APIUtil.getBufferNT(caps, name), function_pointer); + } + + public static void glGetActiveAttrib(int program, int index, IntBuffer length, IntBuffer size, IntBuffer type, ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveAttrib; + BufferChecks.checkFunctionAddress(function_pointer); + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkBuffer(size, 1); + BufferChecks.checkBuffer(type, 1); + BufferChecks.checkDirect(name); + nglGetActiveAttrib(program, index, name.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(size), MemoryUtil.getAddress(type), MemoryUtil.getAddress(name), function_pointer); + } + static native void nglGetActiveAttrib(int program, int index, int name_maxLength, long length, long size, long type, long name, long function_pointer); + + /** + * Overloads glGetActiveAttrib. + *

+ * Overloads glGetActiveAttrib. This version returns both size and type in the sizeType buffer (at .position() and .position() + 1). + */ + public static String glGetActiveAttrib(int program, int index, int maxLength, IntBuffer sizeType) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveAttrib; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(sizeType, 2); + IntBuffer name_length = APIUtil.getLengths(caps); + ByteBuffer name = APIUtil.getBufferByte(caps, maxLength); + nglGetActiveAttrib(program, index, maxLength, MemoryUtil.getAddress0(name_length), MemoryUtil.getAddress(sizeType), MemoryUtil.getAddress(sizeType, sizeType.position() + 1), MemoryUtil.getAddress(name), function_pointer); + name.limit(name_length.get(0)); + return APIUtil.getString(caps, name); + } + + /** + * Overloads glGetActiveAttrib. + *

+ * Overloads glGetActiveAttrib. This version returns only the attrib name. + */ + public static String glGetActiveAttrib(int program, int index, int maxLength) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveAttrib; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer name_length = APIUtil.getLengths(caps); + ByteBuffer name = APIUtil.getBufferByte(caps, maxLength); + nglGetActiveAttrib(program, index, maxLength, MemoryUtil.getAddress0(name_length), MemoryUtil.getAddress0(APIUtil.getBufferInt(caps)), MemoryUtil.getAddress(APIUtil.getBufferInt(caps), 1), MemoryUtil.getAddress(name), function_pointer); + name.limit(name_length.get(0)); + return APIUtil.getString(caps, name); + } + + /** + * Overloads glGetActiveAttrib. + *

+ * Overloads glGetActiveAttribARB. This version returns only the attrib size. + */ + public static int glGetActiveAttribSize(int program, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveAttrib; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer size = APIUtil.getBufferInt(caps); + nglGetActiveAttrib(program, index, 0, 0L, MemoryUtil.getAddress(size), MemoryUtil.getAddress(size, 1), APIUtil.getBufferByte0(caps), function_pointer); + return size.get(0); + } + + /** + * Overloads glGetActiveAttrib. + *

+ * Overloads glGetActiveAttrib. This version returns only the attrib type. + */ + public static int glGetActiveAttribType(int program, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveAttrib; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer type = APIUtil.getBufferInt(caps); + nglGetActiveAttrib(program, index, 0, 0L, MemoryUtil.getAddress(type, 1), MemoryUtil.getAddress(type), APIUtil.getBufferByte0(caps), function_pointer); + return type.get(0); + } + + public static int glGetAttribLocation(int program, ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetAttribLocation; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(name); + BufferChecks.checkNullTerminated(name); + int __result = nglGetAttribLocation(program, MemoryUtil.getAddress(name), function_pointer); + return __result; + } + static native int nglGetAttribLocation(int program, long name, long function_pointer); + + /** Overloads glGetAttribLocation. */ + public static int glGetAttribLocation(int program, CharSequence name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetAttribLocation; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglGetAttribLocation(program, APIUtil.getBufferNT(caps, name), function_pointer); + return __result; + } + + public static void glDrawBuffers(IntBuffer buffers) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawBuffers; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(buffers); + nglDrawBuffers(buffers.remaining(), MemoryUtil.getAddress(buffers), function_pointer); + } + static native void nglDrawBuffers(int buffers_size, long buffers, long function_pointer); + + /** Overloads glDrawBuffers. */ + public static void glDrawBuffers(int buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawBuffers; + BufferChecks.checkFunctionAddress(function_pointer); + nglDrawBuffers(1, APIUtil.getInt(caps, buffer), function_pointer); + } + + public static void glStencilOpSeparate(int face, int sfail, int dpfail, int dppass) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glStencilOpSeparate; + BufferChecks.checkFunctionAddress(function_pointer); + nglStencilOpSeparate(face, sfail, dpfail, dppass, function_pointer); + } + static native void nglStencilOpSeparate(int face, int sfail, int dpfail, int dppass, long function_pointer); + + public static void glStencilFuncSeparate(int face, int func, int ref, int mask) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glStencilFuncSeparate; + BufferChecks.checkFunctionAddress(function_pointer); + nglStencilFuncSeparate(face, func, ref, mask, function_pointer); + } + static native void nglStencilFuncSeparate(int face, int func, int ref, int mask, long function_pointer); + + public static void glStencilMaskSeparate(int face, int mask) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glStencilMaskSeparate; + BufferChecks.checkFunctionAddress(function_pointer); + nglStencilMaskSeparate(face, mask, function_pointer); + } + static native void nglStencilMaskSeparate(int face, int mask, long function_pointer); + + public static void glBlendEquationSeparate(int modeRGB, int modeAlpha) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBlendEquationSeparate; + BufferChecks.checkFunctionAddress(function_pointer); + nglBlendEquationSeparate(modeRGB, modeAlpha, function_pointer); + } + static native void nglBlendEquationSeparate(int modeRGB, int modeAlpha, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL21.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL21.java new file mode 100644 index 0000000..cdbb9c5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL21.java @@ -0,0 +1,112 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class GL21 { + + /** + * Returned by the <type> parameter of GetActiveAttribARB. + */ + public static final int GL_FLOAT_MAT2x3 = 0x8B65, + GL_FLOAT_MAT2x4 = 0x8B66, + GL_FLOAT_MAT3x2 = 0x8B67, + GL_FLOAT_MAT3x4 = 0x8B68, + GL_FLOAT_MAT4x2 = 0x8B69, + GL_FLOAT_MAT4x3 = 0x8B6A; + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, + * GetBufferParameteriv, and GetBufferPointerv. + */ + public static final int GL_PIXEL_PACK_BUFFER = 0x88EB, + GL_PIXEL_UNPACK_BUFFER = 0x88EC; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev. + */ + public static final int GL_PIXEL_PACK_BUFFER_BINDING = 0x88ED, + GL_PIXEL_UNPACK_BUFFER_BINDING = 0x88EF; + + /** + * Accepted by the <internalformat> parameter of TexImage1D, TexImage2D, + * TexImage3D, CopyTexImage1D, CopyTexImage2D. + */ + public static final int GL_SRGB = 0x8C40, + GL_SRGB8 = 0x8C41, + GL_SRGB_ALPHA = 0x8C42, + GL_SRGB8_ALPHA8 = 0x8C43, + GL_SLUMINANCE_ALPHA = 0x8C44, + GL_SLUMINANCE8_ALPHA8 = 0x8C45, + GL_SLUMINANCE = 0x8C46, + GL_SLUMINANCE8 = 0x8C47, + GL_COMPRESSED_SRGB = 0x8C48, + GL_COMPRESSED_SRGB_ALPHA = 0x8C49, + GL_COMPRESSED_SLUMINANCE = 0x8C4A, + GL_COMPRESSED_SLUMINANCE_ALPHA = 0x8C4B; + + /** + * Accepted by the <pname> parameter of GetIntegerv and GetFloatv. + */ + public static final int GL_CURRENT_RASTER_SECONDARY_COLOR = 0x845F; + + private GL21() {} + + public static void glUniformMatrix2x3(int location, boolean transpose, FloatBuffer matrices) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformMatrix2x3fv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(matrices); + nglUniformMatrix2x3fv(location, matrices.remaining() / (2 * 3), transpose, MemoryUtil.getAddress(matrices), function_pointer); + } + static native void nglUniformMatrix2x3fv(int location, int matrices_count, boolean transpose, long matrices, long function_pointer); + + public static void glUniformMatrix3x2(int location, boolean transpose, FloatBuffer matrices) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformMatrix3x2fv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(matrices); + nglUniformMatrix3x2fv(location, matrices.remaining() / (3 * 2), transpose, MemoryUtil.getAddress(matrices), function_pointer); + } + static native void nglUniformMatrix3x2fv(int location, int matrices_count, boolean transpose, long matrices, long function_pointer); + + public static void glUniformMatrix2x4(int location, boolean transpose, FloatBuffer matrices) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformMatrix2x4fv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(matrices); + nglUniformMatrix2x4fv(location, matrices.remaining() >> 3, transpose, MemoryUtil.getAddress(matrices), function_pointer); + } + static native void nglUniformMatrix2x4fv(int location, int matrices_count, boolean transpose, long matrices, long function_pointer); + + public static void glUniformMatrix4x2(int location, boolean transpose, FloatBuffer matrices) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformMatrix4x2fv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(matrices); + nglUniformMatrix4x2fv(location, matrices.remaining() >> 3, transpose, MemoryUtil.getAddress(matrices), function_pointer); + } + static native void nglUniformMatrix4x2fv(int location, int matrices_count, boolean transpose, long matrices, long function_pointer); + + public static void glUniformMatrix3x4(int location, boolean transpose, FloatBuffer matrices) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformMatrix3x4fv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(matrices); + nglUniformMatrix3x4fv(location, matrices.remaining() / (3 * 4), transpose, MemoryUtil.getAddress(matrices), function_pointer); + } + static native void nglUniformMatrix3x4fv(int location, int matrices_count, boolean transpose, long matrices, long function_pointer); + + public static void glUniformMatrix4x3(int location, boolean transpose, FloatBuffer matrices) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformMatrix4x3fv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(matrices); + nglUniformMatrix4x3fv(location, matrices.remaining() / (4 * 3), transpose, MemoryUtil.getAddress(matrices), function_pointer); + } + static native void nglUniformMatrix4x3fv(int location, int matrices_count, boolean transpose, long matrices, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL30.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL30.java new file mode 100644 index 0000000..5245a53 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL30.java @@ -0,0 +1,1564 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class GL30 { + + public static final int GL_MAJOR_VERSION = 0x821B, + GL_MINOR_VERSION = 0x821C, + GL_NUM_EXTENSIONS = 0x821D, + GL_CONTEXT_FLAGS = 0x821E, + GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT = 0x1, + GL_DEPTH_BUFFER = 0x8223, + GL_STENCIL_BUFFER = 0x8224, + GL_COMPRESSED_RED = 0x8225, + GL_COMPRESSED_RG = 0x8226, + GL_COMPARE_REF_TO_TEXTURE = 0x884E, + GL_CLIP_DISTANCE0 = 0x3000, + GL_CLIP_DISTANCE1 = 0x3001, + GL_CLIP_DISTANCE2 = 0x3002, + GL_CLIP_DISTANCE3 = 0x3003, + GL_CLIP_DISTANCE4 = 0x3004, + GL_CLIP_DISTANCE5 = 0x3005, + GL_CLIP_DISTANCE6 = 0x3006, + GL_CLIP_DISTANCE7 = 0x3007, + GL_MAX_CLIP_DISTANCES = 0xD32, + GL_MAX_VARYING_COMPONENTS = 0x8B4B, + GL_BUFFER_ACCESS_FLAGS = 0x911F, + GL_BUFFER_MAP_LENGTH = 0x9120, + GL_BUFFER_MAP_OFFSET = 0x9121; + + /** + * Accepted by the <pname> parameters of GetVertexAttribdv, + * GetVertexAttribfv, GetVertexAttribiv, GetVertexAttribIiv, and + * GetVertexAttribIuiv: + */ + public static final int GL_VERTEX_ATTRIB_ARRAY_INTEGER = 0x88FD; + + /** + * Returned by the <type> parameter of GetActiveUniform: + */ + public static final int GL_SAMPLER_BUFFER = 0x8DC2, + GL_SAMPLER_CUBE_SHADOW = 0x8DC5, + GL_UNSIGNED_INT_VEC2 = 0x8DC6, + GL_UNSIGNED_INT_VEC3 = 0x8DC7, + GL_UNSIGNED_INT_VEC4 = 0x8DC8, + GL_INT_SAMPLER_1D = 0x8DC9, + GL_INT_SAMPLER_2D = 0x8DCA, + GL_INT_SAMPLER_3D = 0x8DCB, + GL_INT_SAMPLER_CUBE = 0x8DCC, + GL_INT_SAMPLER_2D_RECT = 0x8DCD, + GL_INT_SAMPLER_1D_ARRAY = 0x8DCE, + GL_INT_SAMPLER_2D_ARRAY = 0x8DCF, + GL_INT_SAMPLER_BUFFER = 0x8DD0, + GL_UNSIGNED_INT_SAMPLER_1D = 0x8DD1, + GL_UNSIGNED_INT_SAMPLER_2D = 0x8DD2, + GL_UNSIGNED_INT_SAMPLER_3D = 0x8DD3, + GL_UNSIGNED_INT_SAMPLER_CUBE = 0x8DD4, + GL_UNSIGNED_INT_SAMPLER_2D_RECT = 0x8DD5, + GL_UNSIGNED_INT_SAMPLER_1D_ARRAY = 0x8DD6, + GL_UNSIGNED_INT_SAMPLER_2D_ARRAY = 0x8DD7, + GL_UNSIGNED_INT_SAMPLER_BUFFER = 0x8DD8; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_MIN_PROGRAM_TEXEL_OFFSET = 0x8904, + GL_MAX_PROGRAM_TEXEL_OFFSET = 0x8905; + + /** + * Accepted by the <mode> parameter of BeginConditionalRender: + */ + public static final int GL_QUERY_WAIT = 0x8E13, + GL_QUERY_NO_WAIT = 0x8E14, + GL_QUERY_BY_REGION_WAIT = 0x8E15, + GL_QUERY_BY_REGION_NO_WAIT = 0x8E16; + + /** + * Accepted by the <access> parameter of MapBufferRange: + */ + public static final int GL_MAP_READ_BIT = 0x1, + GL_MAP_WRITE_BIT = 0x2, + GL_MAP_INVALIDATE_RANGE_BIT = 0x4, + GL_MAP_INVALIDATE_BUFFER_BIT = 0x8, + GL_MAP_FLUSH_EXPLICIT_BIT = 0x10, + GL_MAP_UNSYNCHRONIZED_BIT = 0x20; + + /** + * Accepted by the <target> parameter of ClampColor and the <pname> + * parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. + */ + public static final int GL_CLAMP_VERTEX_COLOR = 0x891A, + GL_CLAMP_FRAGMENT_COLOR = 0x891B, + GL_CLAMP_READ_COLOR = 0x891C; + + /** + * Accepted by the <clamp> parameter of ClampColor. + */ + public static final int GL_FIXED_ONLY = 0x891D; + + /** + * Accepted by the <internalformat> parameter of TexImage1D, TexImage2D, + * TexImage3D, CopyTexImage1D, CopyTexImage2D, and RenderbufferStorageEXT, + * and returned in the <data> parameter of GetTexLevelParameter and + * GetRenderbufferParameterivEXT: + */ + public static final int GL_DEPTH_COMPONENT32F = 0x8CAC, + GL_DEPTH32F_STENCIL8 = 0x8CAD; + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, TexImage1D, + * TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, and + * GetTexImage: + */ + public static final int GL_FLOAT_32_UNSIGNED_INT_24_8_REV = 0x8DAD; + + /** + * Accepted by the <value> parameter of GetTexLevelParameter: + */ + public static final int GL_TEXTURE_RED_TYPE = 0x8C10, + GL_TEXTURE_GREEN_TYPE = 0x8C11, + GL_TEXTURE_BLUE_TYPE = 0x8C12, + GL_TEXTURE_ALPHA_TYPE = 0x8C13, + GL_TEXTURE_LUMINANCE_TYPE = 0x8C14, + GL_TEXTURE_INTENSITY_TYPE = 0x8C15, + GL_TEXTURE_DEPTH_TYPE = 0x8C16; + + /** + * Returned by the <params> parameter of GetTexLevelParameter: + */ + public static final int GL_UNSIGNED_NORMALIZED = 0x8C17; + + /** + * Accepted by the <internalFormat> parameter of TexImage1D, + * TexImage2D, and TexImage3D: + */ + public static final int GL_RGBA32F = 0x8814, + GL_RGB32F = 0x8815, + GL_ALPHA32F = 0x8816, + GL_RGBA16F = 0x881A, + GL_RGB16F = 0x881B, + GL_ALPHA16F = 0x881C; + + /** + * Accepted by the <internalformat> parameter of TexImage1D, + * TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and + * RenderbufferStorage: + */ + public static final int GL_R11F_G11F_B10F = 0x8C3A; + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, + * TexImage1D, TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, + * TexSubImage2D, TexSubImage3D, GetHistogram, GetMinmax, + * ConvolutionFilter1D, ConvolutionFilter2D, ConvolutionFilter3D, + * GetConvolutionFilter, SeparableFilter2D, GetSeparableFilter, + * ColorTable, ColorSubTable, and GetColorTable: + */ + public static final int GL_UNSIGNED_INT_10F_11F_11F_REV = 0x8C3B; + + /** + * Accepted by the <internalformat> parameter of TexImage1D, + * TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and + * RenderbufferStorage: + */ + public static final int GL_RGB9_E5 = 0x8C3D; + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, + * TexImage1D, TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, + * TexSubImage2D, TexSubImage3D, GetHistogram, GetMinmax, + * ConvolutionFilter1D, ConvolutionFilter2D, ConvolutionFilter3D, + * GetConvolutionFilter, SeparableFilter2D, GetSeparableFilter, + * ColorTable, ColorSubTable, and GetColorTable: + */ + public static final int GL_UNSIGNED_INT_5_9_9_9_REV = 0x8C3E; + + /** + * Accepted by the <pname> parameter of GetTexLevelParameterfv and + * GetTexLevelParameteriv: + */ + public static final int GL_TEXTURE_SHARED_SIZE = 0x8C3F; + + /** + * Accepted by the <target> parameter of BindFramebuffer, + * CheckFramebufferStatus, FramebufferTexture{1D|2D|3D}, + * FramebufferRenderbuffer, and + * GetFramebufferAttachmentParameteriv: + */ + public static final int GL_FRAMEBUFFER = 0x8D40, + GL_READ_FRAMEBUFFER = 0x8CA8, + GL_DRAW_FRAMEBUFFER = 0x8CA9; + + /** + * Accepted by the <target> parameter of BindRenderbuffer, + * RenderbufferStorage, and GetRenderbufferParameteriv, and + * returned by GetFramebufferAttachmentParameteriv: + */ + public static final int GL_RENDERBUFFER = 0x8D41; + + /** + * Accepted by the <internalformat> parameter of + * RenderbufferStorage: + */ + public static final int GL_STENCIL_INDEX1 = 0x8D46, + GL_STENCIL_INDEX4 = 0x8D47, + GL_STENCIL_INDEX8 = 0x8D48, + GL_STENCIL_INDEX16 = 0x8D49; + + /** + * Accepted by the <pname> parameter of GetRenderbufferParameteriv: + */ + public static final int GL_RENDERBUFFER_WIDTH = 0x8D42, + GL_RENDERBUFFER_HEIGHT = 0x8D43, + GL_RENDERBUFFER_INTERNAL_FORMAT = 0x8D44, + GL_RENDERBUFFER_RED_SIZE = 0x8D50, + GL_RENDERBUFFER_GREEN_SIZE = 0x8D51, + GL_RENDERBUFFER_BLUE_SIZE = 0x8D52, + GL_RENDERBUFFER_ALPHA_SIZE = 0x8D53, + GL_RENDERBUFFER_DEPTH_SIZE = 0x8D54, + GL_RENDERBUFFER_STENCIL_SIZE = 0x8D55; + + /** + * Accepted by the <pname> parameter of + * GetFramebufferAttachmentParameteriv: + */ + public static final int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0, + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1, + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2, + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3, + GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 0x8210, + GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 0x8211, + GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE = 0x8212, + GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 0x8213, + GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 0x8214, + GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 0x8215, + GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 0x8216, + GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 0x8217; + + /** + * Returned in <params> by GetFramebufferAttachmentParameteriv: + */ + public static final int GL_FRAMEBUFFER_DEFAULT = 0x8218, + GL_INDEX = 0x8222; + + /** + * Accepted by the <attachment> parameter of + * FramebufferTexture{1D|2D|3D}, FramebufferRenderbuffer, and + * GetFramebufferAttachmentParameteriv + */ + public static final int GL_COLOR_ATTACHMENT0 = 0x8CE0, + GL_COLOR_ATTACHMENT1 = 0x8CE1, + GL_COLOR_ATTACHMENT2 = 0x8CE2, + GL_COLOR_ATTACHMENT3 = 0x8CE3, + GL_COLOR_ATTACHMENT4 = 0x8CE4, + GL_COLOR_ATTACHMENT5 = 0x8CE5, + GL_COLOR_ATTACHMENT6 = 0x8CE6, + GL_COLOR_ATTACHMENT7 = 0x8CE7, + GL_COLOR_ATTACHMENT8 = 0x8CE8, + GL_COLOR_ATTACHMENT9 = 0x8CE9, + GL_COLOR_ATTACHMENT10 = 0x8CEA, + GL_COLOR_ATTACHMENT11 = 0x8CEB, + GL_COLOR_ATTACHMENT12 = 0x8CEC, + GL_COLOR_ATTACHMENT13 = 0x8CED, + GL_COLOR_ATTACHMENT14 = 0x8CEE, + GL_COLOR_ATTACHMENT15 = 0x8CEF, + GL_DEPTH_ATTACHMENT = 0x8D00, + GL_STENCIL_ATTACHMENT = 0x8D20, + GL_DEPTH_STENCIL_ATTACHMENT = 0x821A; + + /** + * Returned by CheckFramebufferStatus(): + */ + public static final int GL_FRAMEBUFFER_COMPLETE = 0x8CD5, + GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6, + GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7, + GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER = 0x8CDB, + GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER = 0x8CDC, + GL_FRAMEBUFFER_UNSUPPORTED = 0x8CDD, + GL_FRAMEBUFFER_UNDEFINED = 0x8219; + + /** + * Accepted by the <pname> parameters of GetIntegerv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_FRAMEBUFFER_BINDING = 0x8CA6, + GL_RENDERBUFFER_BINDING = 0x8CA7, + GL_MAX_COLOR_ATTACHMENTS = 0x8CDF, + GL_MAX_RENDERBUFFER_SIZE = 0x84E8; + + /** + * Returned by GetError(): + */ + public static final int GL_INVALID_FRAMEBUFFER_OPERATION = 0x506; + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, + * TexImage1D, TexImage2D, TexImage3D, GetTexImage, TexSubImage1D, + * TexSubImage2D, TexSubImage3D, GetHistogram, GetMinmax, + * ConvolutionFilter1D, ConvolutionFilter2D, GetConvolutionFilter, + * SeparableFilter2D, GetSeparableFilter, ColorTable, ColorSubTable, + * and GetColorTable: + *

+ * Accepted by the <type> argument of VertexPointer, NormalPointer, + * ColorPointer, SecondaryColorPointer, FogCoordPointer, TexCoordPointer, + * and VertexAttribPointer: + */ + public static final int GL_HALF_FLOAT = 0x140B; + + /** + * Accepted by the <pname> parameter of GetRenderbufferParameteriv. + */ + public static final int GL_RENDERBUFFER_SAMPLES = 0x8CAB; + + /** + * Returned by CheckFramebufferStatus. + */ + public static final int GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 0x8D56; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev. + */ + public static final int GL_MAX_SAMPLES = 0x8D57; + + /** + * Accepted by the <pname> parameters of GetIntegerv, GetFloatv, and GetDoublev. + */ + public static final int GL_DRAW_FRAMEBUFFER_BINDING = 0x8CA6, + GL_READ_FRAMEBUFFER_BINDING = 0x8CAA; + + /** + * Accepted by the <pname> parameters of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_RGBA_INTEGER_MODE = 0x8D9E; + + /** + * Accepted by the <internalFormat> parameter of TexImage1D, + * TexImage2D, and TexImage3D: + */ + public static final int GL_RGBA32UI = 0x8D70, + GL_RGB32UI = 0x8D71, + GL_ALPHA32UI = 0x8D72, + GL_RGBA16UI = 0x8D76, + GL_RGB16UI = 0x8D77, + GL_ALPHA16UI = 0x8D78, + GL_RGBA8UI = 0x8D7C, + GL_RGB8UI = 0x8D7D, + GL_ALPHA8UI = 0x8D7E, + GL_RGBA32I = 0x8D82, + GL_RGB32I = 0x8D83, + GL_ALPHA32I = 0x8D84, + GL_RGBA16I = 0x8D88, + GL_RGB16I = 0x8D89, + GL_ALPHA16I = 0x8D8A, + GL_RGBA8I = 0x8D8E, + GL_RGB8I = 0x8D8F, + GL_ALPHA8I = 0x8D90; + + /** + * Accepted by the <format> parameter of TexImage1D, TexImage2D, + * TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, + * DrawPixels and ReadPixels: + */ + public static final int GL_RED_INTEGER = 0x8D94, + GL_GREEN_INTEGER = 0x8D95, + GL_BLUE_INTEGER = 0x8D96, + GL_ALPHA_INTEGER = 0x8D97, + GL_RGB_INTEGER = 0x8D98, + GL_RGBA_INTEGER = 0x8D99, + GL_BGR_INTEGER = 0x8D9A, + GL_BGRA_INTEGER = 0x8D9B; + + /** + * Accepted by the <target> parameter of TexParameteri, TexParameteriv, + * TexParameterf, TexParameterfv, and BindTexture: + */ + public static final int GL_TEXTURE_1D_ARRAY = 0x8C18, + GL_TEXTURE_2D_ARRAY = 0x8C1A; + + /** + * Accepted by the <target> parameter of TexImage3D, TexSubImage3D, + * CopyTexSubImage3D, CompressedTexImage3D, and CompressedTexSubImage3D: + */ + public static final int GL_PROXY_TEXTURE_2D_ARRAY = 0x8C1B; + + /** + * Accepted by the <target> parameter of TexImage2D, TexSubImage2D, + * CopyTexImage2D, CopyTexSubImage2D, CompressedTexImage2D, and + * CompressedTexSubImage2D: + */ + public static final int GL_PROXY_TEXTURE_1D_ARRAY = 0x8C19; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv + * and GetFloatv: + */ + public static final int GL_TEXTURE_BINDING_1D_ARRAY = 0x8C1C, + GL_TEXTURE_BINDING_2D_ARRAY = 0x8C1D, + GL_MAX_ARRAY_TEXTURE_LAYERS = 0x88FF; + + /** + * Accepted by the <param> parameter of TexParameterf, TexParameteri, + * TexParameterfv, and TexParameteriv when the <pname> parameter is + * TEXTURE_COMPARE_MODE_ARB: + */ + public static final int GL_COMPARE_REF_DEPTH_TO_TEXTURE = 0x884E; + + /** + * Accepted by the <pname> parameter of + * GetFramebufferAttachmentParameteriv: + */ + public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 0x8CD4; + + /** + * Returned by the <type> parameter of GetActiveUniform: + */ + public static final int GL_SAMPLER_1D_ARRAY = 0x8DC0, + GL_SAMPLER_2D_ARRAY = 0x8DC1, + GL_SAMPLER_1D_ARRAY_SHADOW = 0x8DC3, + GL_SAMPLER_2D_ARRAY_SHADOW = 0x8DC4; + + /** + * Accepted by the <format> parameter of DrawPixels, ReadPixels, + * TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, + * TexSubImage3D, and GetTexImage, by the <type> parameter of + * CopyPixels, by the <internalformat> parameter of TexImage1D, + * TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and + * RenderbufferStorage, and returned in the <data> parameter of + * GetTexLevelParameter and GetRenderbufferParameteriv. + */ + public static final int GL_DEPTH_STENCIL = 0x84F9; + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, + * TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, + * TexSubImage3D, and GetTexImage. + */ + public static final int GL_UNSIGNED_INT_24_8 = 0x84FA; + + /** + * Accepted by the <internalformat> parameter of TexImage1D, + * TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and + * RenderbufferStorage, and returned in the <data> parameter of + * GetTexLevelParameter and GetRenderbufferParameteriv. + */ + public static final int GL_DEPTH24_STENCIL8 = 0x88F0; + + /** + * Accepted by the <value> parameter of GetTexLevelParameter. + */ + public static final int GL_TEXTURE_STENCIL_SIZE = 0x88F1; + + /** + * Accepted by the <internalformat> parameter of TexImage2D, + * CopyTexImage2D, and CompressedTexImage2D and the <format> parameter + * of CompressedTexSubImage2D: + */ + public static final int GL_COMPRESSED_RED_RGTC1 = 0x8DBB, + GL_COMPRESSED_SIGNED_RED_RGTC1 = 0x8DBC, + GL_COMPRESSED_RG_RGTC2 = 0x8DBD, + GL_COMPRESSED_SIGNED_RG_RGTC2 = 0x8DBE; + + /** + * Accepted by the <internalFormat> parameter of TexImage1D, TexImage2D, + * TexImage3D, CopyTexImage1D, and CopyTexImage2D: + */ + public static final int GL_R8 = 0x8229, + GL_R16 = 0x822A, + GL_RG8 = 0x822B, + GL_RG16 = 0x822C, + GL_R16F = 0x822D, + GL_R32F = 0x822E, + GL_RG16F = 0x822F, + GL_RG32F = 0x8230, + GL_R8I = 0x8231, + GL_R8UI = 0x8232, + GL_R16I = 0x8233, + GL_R16UI = 0x8234, + GL_R32I = 0x8235, + GL_R32UI = 0x8236, + GL_RG8I = 0x8237, + GL_RG8UI = 0x8238, + GL_RG16I = 0x8239, + GL_RG16UI = 0x823A, + GL_RG32I = 0x823B, + GL_RG32UI = 0x823C; + + /** + * Accepted by the <format> parameter of TexImage3D, TexImage2D, + * TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, + * DrawPixels and ReadPixels: + */ + public static final int GL_RG = 0x8227, + GL_RG_INTEGER = 0x8228; + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, + * GetBufferPointerv, BindBufferRange, BindBufferOffset and + * BindBufferBase: + */ + public static final int GL_TRANSFORM_FEEDBACK_BUFFER = 0x8C8E; + + /** + * Accepted by the <param> parameter of GetIntegerIndexedv and + * GetBooleanIndexedv: + */ + public static final int GL_TRANSFORM_FEEDBACK_BUFFER_START = 0x8C84, + GL_TRANSFORM_FEEDBACK_BUFFER_SIZE = 0x8C85; + + /** + * Accepted by the <param> parameter of GetIntegerIndexedv and + * GetBooleanIndexedv, and by the <pname> parameter of GetBooleanv, + * GetDoublev, GetIntegerv, and GetFloatv: + */ + public static final int GL_TRANSFORM_FEEDBACK_BUFFER_BINDING = 0x8C8F; + + /** + * Accepted by the <bufferMode> parameter of TransformFeedbackVaryings: + */ + public static final int GL_INTERLEAVED_ATTRIBS = 0x8C8C, + GL_SEPARATE_ATTRIBS = 0x8C8D; + + /** + * Accepted by the <target> parameter of BeginQuery, EndQuery, and + * GetQueryiv: + */ + public static final int GL_PRIMITIVES_GENERATED = 0x8C87, + GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 0x8C88; + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, and by + * the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev: + */ + public static final int GL_RASTERIZER_DISCARD = 0x8C89; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv, + * and GetFloatv: + */ + public static final int GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 0x8C8A, + GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 0x8C8B, + GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 0x8C80; + + /** + * Accepted by the <pname> parameter of GetProgramiv: + */ + public static final int GL_TRANSFORM_FEEDBACK_VARYINGS = 0x8C83, + GL_TRANSFORM_FEEDBACK_BUFFER_MODE = 0x8C7F, + GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH = 0x8C76; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_VERTEX_ARRAY_BINDING = 0x85B5; + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_FRAMEBUFFER_SRGB = 0x8DB9; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_FRAMEBUFFER_SRGB_CAPABLE = 0x8DBA; + + private GL30() {} + + public static String glGetStringi(int name, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetStringi; + BufferChecks.checkFunctionAddress(function_pointer); + String __result = nglGetStringi(name, index, function_pointer); + return __result; + } + static native String nglGetStringi(int name, int index, long function_pointer); + + public static void glClearBuffer(int buffer, int drawbuffer, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClearBufferfv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(value, 4); + nglClearBufferfv(buffer, drawbuffer, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglClearBufferfv(int buffer, int drawbuffer, long value, long function_pointer); + + public static void glClearBuffer(int buffer, int drawbuffer, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClearBufferiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(value, 4); + nglClearBufferiv(buffer, drawbuffer, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglClearBufferiv(int buffer, int drawbuffer, long value, long function_pointer); + + public static void glClearBufferu(int buffer, int drawbuffer, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClearBufferuiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(value, 4); + nglClearBufferuiv(buffer, drawbuffer, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglClearBufferuiv(int buffer, int drawbuffer, long value, long function_pointer); + + public static void glClearBufferfi(int buffer, int drawbuffer, float depth, int stencil) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClearBufferfi; + BufferChecks.checkFunctionAddress(function_pointer); + nglClearBufferfi(buffer, drawbuffer, depth, stencil, function_pointer); + } + static native void nglClearBufferfi(int buffer, int drawbuffer, float depth, int stencil, long function_pointer); + + public static void glVertexAttribI1i(int index, int x) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI1i; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribI1i(index, x, function_pointer); + } + static native void nglVertexAttribI1i(int index, int x, long function_pointer); + + public static void glVertexAttribI2i(int index, int x, int y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI2i; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribI2i(index, x, y, function_pointer); + } + static native void nglVertexAttribI2i(int index, int x, int y, long function_pointer); + + public static void glVertexAttribI3i(int index, int x, int y, int z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI3i; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribI3i(index, x, y, z, function_pointer); + } + static native void nglVertexAttribI3i(int index, int x, int y, int z, long function_pointer); + + public static void glVertexAttribI4i(int index, int x, int y, int z, int w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI4i; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribI4i(index, x, y, z, w, function_pointer); + } + static native void nglVertexAttribI4i(int index, int x, int y, int z, int w, long function_pointer); + + public static void glVertexAttribI1ui(int index, int x) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI1ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribI1ui(index, x, function_pointer); + } + static native void nglVertexAttribI1ui(int index, int x, long function_pointer); + + public static void glVertexAttribI2ui(int index, int x, int y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI2ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribI2ui(index, x, y, function_pointer); + } + static native void nglVertexAttribI2ui(int index, int x, int y, long function_pointer); + + public static void glVertexAttribI3ui(int index, int x, int y, int z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI3ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribI3ui(index, x, y, z, function_pointer); + } + static native void nglVertexAttribI3ui(int index, int x, int y, int z, long function_pointer); + + public static void glVertexAttribI4ui(int index, int x, int y, int z, int w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI4ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribI4ui(index, x, y, z, w, function_pointer); + } + static native void nglVertexAttribI4ui(int index, int x, int y, int z, int w, long function_pointer); + + public static void glVertexAttribI1(int index, IntBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI1iv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 1); + nglVertexAttribI1iv(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribI1iv(int index, long v, long function_pointer); + + public static void glVertexAttribI2(int index, IntBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI2iv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 2); + nglVertexAttribI2iv(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribI2iv(int index, long v, long function_pointer); + + public static void glVertexAttribI3(int index, IntBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI3iv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 3); + nglVertexAttribI3iv(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribI3iv(int index, long v, long function_pointer); + + public static void glVertexAttribI4(int index, IntBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI4iv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 4); + nglVertexAttribI4iv(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribI4iv(int index, long v, long function_pointer); + + public static void glVertexAttribI1u(int index, IntBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI1uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 1); + nglVertexAttribI1uiv(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribI1uiv(int index, long v, long function_pointer); + + public static void glVertexAttribI2u(int index, IntBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI2uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 2); + nglVertexAttribI2uiv(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribI2uiv(int index, long v, long function_pointer); + + public static void glVertexAttribI3u(int index, IntBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI3uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 3); + nglVertexAttribI3uiv(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribI3uiv(int index, long v, long function_pointer); + + public static void glVertexAttribI4u(int index, IntBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI4uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 4); + nglVertexAttribI4uiv(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribI4uiv(int index, long v, long function_pointer); + + public static void glVertexAttribI4(int index, ByteBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI4bv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 4); + nglVertexAttribI4bv(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribI4bv(int index, long v, long function_pointer); + + public static void glVertexAttribI4(int index, ShortBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI4sv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 4); + nglVertexAttribI4sv(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribI4sv(int index, long v, long function_pointer); + + public static void glVertexAttribI4u(int index, ByteBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI4ubv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 4); + nglVertexAttribI4ubv(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribI4ubv(int index, long v, long function_pointer); + + public static void glVertexAttribI4u(int index, ShortBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribI4usv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 4); + nglVertexAttribI4usv(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribI4usv(int index, long v, long function_pointer); + + public static void glVertexAttribIPointer(int index, int size, int type, int stride, ByteBuffer buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribIPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribIPointer(index, size, type, stride, MemoryUtil.getAddress(buffer), function_pointer); + } + public static void glVertexAttribIPointer(int index, int size, int type, int stride, IntBuffer buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribIPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribIPointer(index, size, type, stride, MemoryUtil.getAddress(buffer), function_pointer); + } + public static void glVertexAttribIPointer(int index, int size, int type, int stride, ShortBuffer buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribIPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribIPointer(index, size, type, stride, MemoryUtil.getAddress(buffer), function_pointer); + } + static native void nglVertexAttribIPointer(int index, int size, int type, int stride, long buffer, long function_pointer); + public static void glVertexAttribIPointer(int index, int size, int type, int stride, long buffer_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribIPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOenabled(caps); + nglVertexAttribIPointerBO(index, size, type, stride, buffer_buffer_offset, function_pointer); + } + static native void nglVertexAttribIPointerBO(int index, int size, int type, int stride, long buffer_buffer_offset, long function_pointer); + + public static void glGetVertexAttribI(int index, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexAttribIiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetVertexAttribIiv(index, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVertexAttribIiv(int index, int pname, long params, long function_pointer); + + public static void glGetVertexAttribIu(int index, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexAttribIuiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetVertexAttribIuiv(index, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVertexAttribIuiv(int index, int pname, long params, long function_pointer); + + public static void glUniform1ui(int location, int v0) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform1ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform1ui(location, v0, function_pointer); + } + static native void nglUniform1ui(int location, int v0, long function_pointer); + + public static void glUniform2ui(int location, int v0, int v1) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform2ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform2ui(location, v0, v1, function_pointer); + } + static native void nglUniform2ui(int location, int v0, int v1, long function_pointer); + + public static void glUniform3ui(int location, int v0, int v1, int v2) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform3ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform3ui(location, v0, v1, v2, function_pointer); + } + static native void nglUniform3ui(int location, int v0, int v1, int v2, long function_pointer); + + public static void glUniform4ui(int location, int v0, int v1, int v2, int v3) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform4ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform4ui(location, v0, v1, v2, v3, function_pointer); + } + static native void nglUniform4ui(int location, int v0, int v1, int v2, int v3, long function_pointer); + + public static void glUniform1u(int location, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform1uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniform1uiv(location, value.remaining(), MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniform1uiv(int location, int value_count, long value, long function_pointer); + + public static void glUniform2u(int location, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform2uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniform2uiv(location, value.remaining() >> 1, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniform2uiv(int location, int value_count, long value, long function_pointer); + + public static void glUniform3u(int location, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform3uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniform3uiv(location, value.remaining() / 3, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniform3uiv(int location, int value_count, long value, long function_pointer); + + public static void glUniform4u(int location, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform4uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniform4uiv(location, value.remaining() >> 2, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniform4uiv(int location, int value_count, long value, long function_pointer); + + public static void glGetUniformu(int program, int location, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetUniformuiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglGetUniformuiv(program, location, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetUniformuiv(int program, int location, long params, long function_pointer); + + public static void glBindFragDataLocation(int program, int colorNumber, ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindFragDataLocation; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(name); + BufferChecks.checkNullTerminated(name); + nglBindFragDataLocation(program, colorNumber, MemoryUtil.getAddress(name), function_pointer); + } + static native void nglBindFragDataLocation(int program, int colorNumber, long name, long function_pointer); + + /** Overloads glBindFragDataLocation. */ + public static void glBindFragDataLocation(int program, int colorNumber, CharSequence name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindFragDataLocation; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindFragDataLocation(program, colorNumber, APIUtil.getBufferNT(caps, name), function_pointer); + } + + public static int glGetFragDataLocation(int program, ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetFragDataLocation; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(name); + BufferChecks.checkNullTerminated(name); + int __result = nglGetFragDataLocation(program, MemoryUtil.getAddress(name), function_pointer); + return __result; + } + static native int nglGetFragDataLocation(int program, long name, long function_pointer); + + /** Overloads glGetFragDataLocation. */ + public static int glGetFragDataLocation(int program, CharSequence name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetFragDataLocation; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglGetFragDataLocation(program, APIUtil.getBufferNT(caps, name), function_pointer); + return __result; + } + + public static void glBeginConditionalRender(int id, int mode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBeginConditionalRender; + BufferChecks.checkFunctionAddress(function_pointer); + nglBeginConditionalRender(id, mode, function_pointer); + } + static native void nglBeginConditionalRender(int id, int mode, long function_pointer); + + public static void glEndConditionalRender() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEndConditionalRender; + BufferChecks.checkFunctionAddress(function_pointer); + nglEndConditionalRender(function_pointer); + } + static native void nglEndConditionalRender(long function_pointer); + + /** + * glMapBufferRange maps a GL buffer object range to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapBufferRange like this: + *

+ * ByteBuffer mapped_buffer; mapped_buffer = glMapBufferRange(..., ..., ..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBufferRange(..., ..., ..., ..., mapped_buffer); + *

+ * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + *

+ * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. + *

+ * @return A ByteBuffer representing the mapped buffer memory. + */ + public static ByteBuffer glMapBufferRange(int target, long offset, long length, int access, ByteBuffer old_buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMapBufferRange; + BufferChecks.checkFunctionAddress(function_pointer); + if (old_buffer != null) + BufferChecks.checkDirect(old_buffer); + ByteBuffer __result = nglMapBufferRange(target, offset, length, access, old_buffer, function_pointer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + static native ByteBuffer nglMapBufferRange(int target, long offset, long length, int access, ByteBuffer old_buffer, long function_pointer); + + public static void glFlushMappedBufferRange(int target, long offset, long length) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFlushMappedBufferRange; + BufferChecks.checkFunctionAddress(function_pointer); + nglFlushMappedBufferRange(target, offset, length, function_pointer); + } + static native void nglFlushMappedBufferRange(int target, long offset, long length, long function_pointer); + + public static void glClampColor(int target, int clamp) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClampColor; + BufferChecks.checkFunctionAddress(function_pointer); + nglClampColor(target, clamp, function_pointer); + } + static native void nglClampColor(int target, int clamp, long function_pointer); + + public static boolean glIsRenderbuffer(int renderbuffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsRenderbuffer; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsRenderbuffer(renderbuffer, function_pointer); + return __result; + } + static native boolean nglIsRenderbuffer(int renderbuffer, long function_pointer); + + public static void glBindRenderbuffer(int target, int renderbuffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindRenderbuffer; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindRenderbuffer(target, renderbuffer, function_pointer); + } + static native void nglBindRenderbuffer(int target, int renderbuffer, long function_pointer); + + public static void glDeleteRenderbuffers(IntBuffer renderbuffers) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteRenderbuffers; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(renderbuffers); + nglDeleteRenderbuffers(renderbuffers.remaining(), MemoryUtil.getAddress(renderbuffers), function_pointer); + } + static native void nglDeleteRenderbuffers(int renderbuffers_n, long renderbuffers, long function_pointer); + + /** Overloads glDeleteRenderbuffers. */ + public static void glDeleteRenderbuffers(int renderbuffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteRenderbuffers; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeleteRenderbuffers(1, APIUtil.getInt(caps, renderbuffer), function_pointer); + } + + public static void glGenRenderbuffers(IntBuffer renderbuffers) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenRenderbuffers; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(renderbuffers); + nglGenRenderbuffers(renderbuffers.remaining(), MemoryUtil.getAddress(renderbuffers), function_pointer); + } + static native void nglGenRenderbuffers(int renderbuffers_n, long renderbuffers, long function_pointer); + + /** Overloads glGenRenderbuffers. */ + public static int glGenRenderbuffers() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenRenderbuffers; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer renderbuffers = APIUtil.getBufferInt(caps); + nglGenRenderbuffers(1, MemoryUtil.getAddress(renderbuffers), function_pointer); + return renderbuffers.get(0); + } + + public static void glRenderbufferStorage(int target, int internalformat, int width, int height) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glRenderbufferStorage; + BufferChecks.checkFunctionAddress(function_pointer); + nglRenderbufferStorage(target, internalformat, width, height, function_pointer); + } + static native void nglRenderbufferStorage(int target, int internalformat, int width, int height, long function_pointer); + + public static void glGetRenderbufferParameter(int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetRenderbufferParameteriv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetRenderbufferParameteriv(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetRenderbufferParameteriv(int target, int pname, long params, long function_pointer); + + /** + * Overloads glGetRenderbufferParameteriv. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetRenderbufferParameteri} instead. + */ + @Deprecated + public static int glGetRenderbufferParameter(int target, int pname) { + return GL30.glGetRenderbufferParameteri(target, pname); + } + + /** Overloads glGetRenderbufferParameteriv. */ + public static int glGetRenderbufferParameteri(int target, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetRenderbufferParameteriv; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetRenderbufferParameteriv(target, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static boolean glIsFramebuffer(int framebuffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsFramebuffer; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsFramebuffer(framebuffer, function_pointer); + return __result; + } + static native boolean nglIsFramebuffer(int framebuffer, long function_pointer); + + public static void glBindFramebuffer(int target, int framebuffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindFramebuffer; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindFramebuffer(target, framebuffer, function_pointer); + } + static native void nglBindFramebuffer(int target, int framebuffer, long function_pointer); + + public static void glDeleteFramebuffers(IntBuffer framebuffers) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteFramebuffers; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(framebuffers); + nglDeleteFramebuffers(framebuffers.remaining(), MemoryUtil.getAddress(framebuffers), function_pointer); + } + static native void nglDeleteFramebuffers(int framebuffers_n, long framebuffers, long function_pointer); + + /** Overloads glDeleteFramebuffers. */ + public static void glDeleteFramebuffers(int framebuffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteFramebuffers; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeleteFramebuffers(1, APIUtil.getInt(caps, framebuffer), function_pointer); + } + + public static void glGenFramebuffers(IntBuffer framebuffers) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenFramebuffers; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(framebuffers); + nglGenFramebuffers(framebuffers.remaining(), MemoryUtil.getAddress(framebuffers), function_pointer); + } + static native void nglGenFramebuffers(int framebuffers_n, long framebuffers, long function_pointer); + + /** Overloads glGenFramebuffers. */ + public static int glGenFramebuffers() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenFramebuffers; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer framebuffers = APIUtil.getBufferInt(caps); + nglGenFramebuffers(1, MemoryUtil.getAddress(framebuffers), function_pointer); + return framebuffers.get(0); + } + + public static int glCheckFramebufferStatus(int target) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCheckFramebufferStatus; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglCheckFramebufferStatus(target, function_pointer); + return __result; + } + static native int nglCheckFramebufferStatus(int target, long function_pointer); + + public static void glFramebufferTexture1D(int target, int attachment, int textarget, int texture, int level) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFramebufferTexture1D; + BufferChecks.checkFunctionAddress(function_pointer); + nglFramebufferTexture1D(target, attachment, textarget, texture, level, function_pointer); + } + static native void nglFramebufferTexture1D(int target, int attachment, int textarget, int texture, int level, long function_pointer); + + public static void glFramebufferTexture2D(int target, int attachment, int textarget, int texture, int level) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFramebufferTexture2D; + BufferChecks.checkFunctionAddress(function_pointer); + nglFramebufferTexture2D(target, attachment, textarget, texture, level, function_pointer); + } + static native void nglFramebufferTexture2D(int target, int attachment, int textarget, int texture, int level, long function_pointer); + + public static void glFramebufferTexture3D(int target, int attachment, int textarget, int texture, int level, int zoffset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFramebufferTexture3D; + BufferChecks.checkFunctionAddress(function_pointer); + nglFramebufferTexture3D(target, attachment, textarget, texture, level, zoffset, function_pointer); + } + static native void nglFramebufferTexture3D(int target, int attachment, int textarget, int texture, int level, int zoffset, long function_pointer); + + public static void glFramebufferRenderbuffer(int target, int attachment, int renderbuffertarget, int renderbuffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFramebufferRenderbuffer; + BufferChecks.checkFunctionAddress(function_pointer); + nglFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer, function_pointer); + } + static native void nglFramebufferRenderbuffer(int target, int attachment, int renderbuffertarget, int renderbuffer, long function_pointer); + + public static void glGetFramebufferAttachmentParameter(int target, int attachment, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetFramebufferAttachmentParameteriv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetFramebufferAttachmentParameteriv(target, attachment, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetFramebufferAttachmentParameteriv(int target, int attachment, int pname, long params, long function_pointer); + + /** + * Overloads glGetFramebufferAttachmentParameteriv. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetFramebufferAttachmentParameteri} instead. + */ + @Deprecated + public static int glGetFramebufferAttachmentParameter(int target, int attachment, int pname) { + return GL30.glGetFramebufferAttachmentParameteri(target, attachment, pname); + } + + /** Overloads glGetFramebufferAttachmentParameteriv. */ + public static int glGetFramebufferAttachmentParameteri(int target, int attachment, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetFramebufferAttachmentParameteriv; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetFramebufferAttachmentParameteriv(target, attachment, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGenerateMipmap(int target) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenerateMipmap; + BufferChecks.checkFunctionAddress(function_pointer); + nglGenerateMipmap(target, function_pointer); + } + static native void nglGenerateMipmap(int target, long function_pointer); + + /** + * Establishes the data storage, format, dimensions, and number of + * samples of a renderbuffer object's image. + */ + public static void glRenderbufferStorageMultisample(int target, int samples, int internalformat, int width, int height) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glRenderbufferStorageMultisample; + BufferChecks.checkFunctionAddress(function_pointer); + nglRenderbufferStorageMultisample(target, samples, internalformat, width, height, function_pointer); + } + static native void nglRenderbufferStorageMultisample(int target, int samples, int internalformat, int width, int height, long function_pointer); + + /** + * Transfers a rectangle of pixel values from one + * region of the read framebuffer to another in the draw framebuffer. + * <mask> is the bitwise OR of a number of values indicating which + * buffers are to be copied. The values are COLOR_BUFFER_BIT, + * DEPTH_BUFFER_BIT, and STENCIL_BUFFER_BIT. + * The pixels corresponding to these buffers are + * copied from the source rectangle, bound by the locations (srcX0, + * srcY0) and (srcX1, srcY1) inclusive, to the destination rectangle, + * bound by the locations (dstX0, dstY0) and (dstX1, dstY1) + * inclusive. + * If the source and destination rectangle dimensions do not match, + * the source image is stretched to fit the destination + * rectangle. <filter> must be LINEAR or NEAREST and specifies the + * method of interpolation to be applied if the image is + * stretched. + */ + public static void glBlitFramebuffer(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, int mask, int filter) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBlitFramebuffer; + BufferChecks.checkFunctionAddress(function_pointer); + nglBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter, function_pointer); + } + static native void nglBlitFramebuffer(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, int mask, int filter, long function_pointer); + + public static void glTexParameterI(int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexParameterIiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglTexParameterIiv(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglTexParameterIiv(int target, int pname, long params, long function_pointer); + + /** Overloads glTexParameterIiv. */ + public static void glTexParameterIi(int target, int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexParameterIiv; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexParameterIiv(target, pname, APIUtil.getInt(caps, param), function_pointer); + } + + public static void glTexParameterIu(int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexParameterIuiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglTexParameterIuiv(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglTexParameterIuiv(int target, int pname, long params, long function_pointer); + + /** Overloads glTexParameterIuiv. */ + public static void glTexParameterIui(int target, int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexParameterIuiv; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexParameterIuiv(target, pname, APIUtil.getInt(caps, param), function_pointer); + } + + public static void glGetTexParameterI(int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexParameterIiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetTexParameterIiv(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetTexParameterIiv(int target, int pname, long params, long function_pointer); + + /** Overloads glGetTexParameterIiv. */ + public static int glGetTexParameterIi(int target, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexParameterIiv; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetTexParameterIiv(target, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetTexParameterIu(int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexParameterIuiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetTexParameterIuiv(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetTexParameterIuiv(int target, int pname, long params, long function_pointer); + + /** Overloads glGetTexParameterIuiv. */ + public static int glGetTexParameterIui(int target, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTexParameterIuiv; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetTexParameterIuiv(target, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glFramebufferTextureLayer(int target, int attachment, int texture, int level, int layer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFramebufferTextureLayer; + BufferChecks.checkFunctionAddress(function_pointer); + nglFramebufferTextureLayer(target, attachment, texture, level, layer, function_pointer); + } + static native void nglFramebufferTextureLayer(int target, int attachment, int texture, int level, int layer, long function_pointer); + + public static void glColorMaski(int buf, boolean r, boolean g, boolean b, boolean a) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorMaski; + BufferChecks.checkFunctionAddress(function_pointer); + nglColorMaski(buf, r, g, b, a, function_pointer); + } + static native void nglColorMaski(int buf, boolean r, boolean g, boolean b, boolean a, long function_pointer); + + public static void glGetBoolean(int value, int index, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetBooleani_v; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(data, 4); + nglGetBooleani_v(value, index, MemoryUtil.getAddress(data), function_pointer); + } + static native void nglGetBooleani_v(int value, int index, long data, long function_pointer); + + /** Overloads glGetBooleani_v. */ + public static boolean glGetBoolean(int value, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetBooleani_v; + BufferChecks.checkFunctionAddress(function_pointer); + ByteBuffer data = APIUtil.getBufferByte(caps, 1); + nglGetBooleani_v(value, index, MemoryUtil.getAddress(data), function_pointer); + return data.get(0) == 1; + } + + public static void glGetInteger(int value, int index, IntBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetIntegeri_v; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(data, 4); + nglGetIntegeri_v(value, index, MemoryUtil.getAddress(data), function_pointer); + } + static native void nglGetIntegeri_v(int value, int index, long data, long function_pointer); + + /** Overloads glGetIntegeri_v. */ + public static int glGetInteger(int value, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetIntegeri_v; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer data = APIUtil.getBufferInt(caps); + nglGetIntegeri_v(value, index, MemoryUtil.getAddress(data), function_pointer); + return data.get(0); + } + + public static void glEnablei(int target, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEnablei; + BufferChecks.checkFunctionAddress(function_pointer); + nglEnablei(target, index, function_pointer); + } + static native void nglEnablei(int target, int index, long function_pointer); + + public static void glDisablei(int target, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDisablei; + BufferChecks.checkFunctionAddress(function_pointer); + nglDisablei(target, index, function_pointer); + } + static native void nglDisablei(int target, int index, long function_pointer); + + public static boolean glIsEnabledi(int target, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsEnabledi; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsEnabledi(target, index, function_pointer); + return __result; + } + static native boolean nglIsEnabledi(int target, int index, long function_pointer); + + public static void glBindBufferRange(int target, int index, int buffer, long offset, long size) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindBufferRange; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindBufferRange(target, index, buffer, offset, size, function_pointer); + } + static native void nglBindBufferRange(int target, int index, int buffer, long offset, long size, long function_pointer); + + public static void glBindBufferBase(int target, int index, int buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindBufferBase; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindBufferBase(target, index, buffer, function_pointer); + } + static native void nglBindBufferBase(int target, int index, int buffer, long function_pointer); + + public static void glBeginTransformFeedback(int primitiveMode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBeginTransformFeedback; + BufferChecks.checkFunctionAddress(function_pointer); + nglBeginTransformFeedback(primitiveMode, function_pointer); + } + static native void nglBeginTransformFeedback(int primitiveMode, long function_pointer); + + public static void glEndTransformFeedback() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEndTransformFeedback; + BufferChecks.checkFunctionAddress(function_pointer); + nglEndTransformFeedback(function_pointer); + } + static native void nglEndTransformFeedback(long function_pointer); + + public static void glTransformFeedbackVaryings(int program, int count, ByteBuffer varyings, int bufferMode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTransformFeedbackVaryings; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(varyings); + BufferChecks.checkNullTerminated(varyings, count); + nglTransformFeedbackVaryings(program, count, MemoryUtil.getAddress(varyings), bufferMode, function_pointer); + } + static native void nglTransformFeedbackVaryings(int program, int count, long varyings, int bufferMode, long function_pointer); + + /** Overloads glTransformFeedbackVaryings. */ + public static void glTransformFeedbackVaryings(int program, CharSequence[] varyings, int bufferMode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTransformFeedbackVaryings; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkArray(varyings); + nglTransformFeedbackVaryings(program, varyings.length, APIUtil.getBufferNT(caps, varyings), bufferMode, function_pointer); + } + + public static void glGetTransformFeedbackVarying(int program, int index, IntBuffer length, IntBuffer size, IntBuffer type, ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTransformFeedbackVarying; + BufferChecks.checkFunctionAddress(function_pointer); + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkBuffer(size, 1); + BufferChecks.checkBuffer(type, 1); + BufferChecks.checkDirect(name); + nglGetTransformFeedbackVarying(program, index, name.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(size), MemoryUtil.getAddress(type), MemoryUtil.getAddress(name), function_pointer); + } + static native void nglGetTransformFeedbackVarying(int program, int index, int name_bufSize, long length, long size, long type, long name, long function_pointer); + + /** Overloads glGetTransformFeedbackVarying. */ + public static String glGetTransformFeedbackVarying(int program, int index, int bufSize, IntBuffer size, IntBuffer type) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTransformFeedbackVarying; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(size, 1); + BufferChecks.checkBuffer(type, 1); + IntBuffer name_length = APIUtil.getLengths(caps); + ByteBuffer name = APIUtil.getBufferByte(caps, bufSize); + nglGetTransformFeedbackVarying(program, index, bufSize, MemoryUtil.getAddress0(name_length), MemoryUtil.getAddress(size), MemoryUtil.getAddress(type), MemoryUtil.getAddress(name), function_pointer); + name.limit(name_length.get(0)); + return APIUtil.getString(caps, name); + } + + public static void glBindVertexArray(int array) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindVertexArray; + BufferChecks.checkFunctionAddress(function_pointer); + StateTracker.bindVAO(caps, array); + nglBindVertexArray(array, function_pointer); + } + static native void nglBindVertexArray(int array, long function_pointer); + + public static void glDeleteVertexArrays(IntBuffer arrays) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteVertexArrays; + BufferChecks.checkFunctionAddress(function_pointer); + StateTracker.deleteVAO(caps, arrays); + BufferChecks.checkDirect(arrays); + nglDeleteVertexArrays(arrays.remaining(), MemoryUtil.getAddress(arrays), function_pointer); + } + static native void nglDeleteVertexArrays(int arrays_n, long arrays, long function_pointer); + + /** Overloads glDeleteVertexArrays. */ + public static void glDeleteVertexArrays(int array) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteVertexArrays; + BufferChecks.checkFunctionAddress(function_pointer); + StateTracker.deleteVAO(caps, array); + nglDeleteVertexArrays(1, APIUtil.getInt(caps, array), function_pointer); + } + + public static void glGenVertexArrays(IntBuffer arrays) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenVertexArrays; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(arrays); + nglGenVertexArrays(arrays.remaining(), MemoryUtil.getAddress(arrays), function_pointer); + } + static native void nglGenVertexArrays(int arrays_n, long arrays, long function_pointer); + + /** Overloads glGenVertexArrays. */ + public static int glGenVertexArrays() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenVertexArrays; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer arrays = APIUtil.getBufferInt(caps); + nglGenVertexArrays(1, MemoryUtil.getAddress(arrays), function_pointer); + return arrays.get(0); + } + + public static boolean glIsVertexArray(int array) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsVertexArray; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsVertexArray(array, function_pointer); + return __result; + } + static native boolean nglIsVertexArray(int array, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL31.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL31.java new file mode 100644 index 0000000..d4ddc97 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL31.java @@ -0,0 +1,391 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class GL31 { + + public static final int GL_RED_SNORM = 0x8F90, + GL_RG_SNORM = 0x8F91, + GL_RGB_SNORM = 0x8F92, + GL_RGBA_SNORM = 0x8F93, + GL_R8_SNORM = 0x8F94, + GL_RG8_SNORM = 0x8F95, + GL_RGB8_SNORM = 0x8F96, + GL_RGBA8_SNORM = 0x8F97, + GL_R16_SNORM = 0x8F98, + GL_RG16_SNORM = 0x8F99, + GL_RGB16_SNORM = 0x8F9A, + GL_RGBA16_SNORM = 0x8F9B, + GL_SIGNED_NORMALIZED = 0x8F9C, + GL_COPY_READ_BUFFER_BINDING = 0x8F36, + GL_COPY_WRITE_BUFFER_BINDING = 0x8F37, + GL_COPY_READ_BUFFER = 0x8F36, + GL_COPY_WRITE_BUFFER = 0x8F37; + + /** + * Accepted by the <cap> parameter of IsEnabled, and by + * the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev: + */ + public static final int GL_PRIMITIVE_RESTART = 0x8F9D; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_PRIMITIVE_RESTART_INDEX = 0x8F9E; + + /** + * Accepted by the <target> parameter of BindBuffer, BufferData, + * BufferSubData, MapBuffer, MapBufferRange, BindTexture, UnmapBuffer, + * GetBufferSubData, GetBufferParameteriv, GetBufferPointerv, and TexBuffer, + * and the parameter of GetBooleanv, GetDoublev, GetFloatv, and + * GetIntegerv: + */ + public static final int GL_TEXTURE_BUFFER = 0x8C2A; + + /** + * Accepted by the <pname> parameters of GetBooleanv, GetDoublev, + * GetFloatv, and GetIntegerv: + */ + public static final int GL_MAX_TEXTURE_BUFFER_SIZE = 0x8C2B, + GL_TEXTURE_BINDING_BUFFER = 0x8C2C, + GL_TEXTURE_BUFFER_DATA_STORE_BINDING = 0x8C2D, + GL_TEXTURE_BUFFER_FORMAT = 0x8C2E; + + /** + * Accepted by the <cap> parameter of Enable, Disable and IsEnabled; + * by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv + * and GetDoublev; and by the <target> parameter of BindTexture, + * GetTexParameterfv, GetTexParameteriv, TexParameterf, TexParameteri, + * TexParameterfv and TexParameteriv: + * Accepted by the <target> parameter of GetTexImage, + * GetTexLevelParameteriv, GetTexLevelParameterfv, TexImage2D, + * CopyTexImage2D, TexSubImage2D and CopySubTexImage2D: + */ + public static final int GL_TEXTURE_RECTANGLE = 0x84F5; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv and GetDoublev: + */ + public static final int GL_TEXTURE_BINDING_RECTANGLE = 0x84F6; + + /** + * Accepted by the <target> parameter of GetTexLevelParameteriv, + * GetTexLevelParameterfv, GetTexParameteriv and TexImage2D: + */ + public static final int GL_PROXY_TEXTURE_RECTANGLE = 0x84F7; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, + * GetIntegerv and GetFloatv: + */ + public static final int GL_MAX_RECTANGLE_TEXTURE_SIZE = 0x84F8; + + /** + * Returned by <type> parameter of GetActiveUniform when the location + * <index> for program object <program> is of type sampler2DRect: + */ + public static final int GL_SAMPLER_2D_RECT = 0x8B63; + + /** + * Returned by <type> parameter of GetActiveUniform when the location + * <index> for program object <program> is of type sampler2DRectShadow: + */ + public static final int GL_SAMPLER_2D_RECT_SHADOW = 0x8B64; + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, and + * GetBufferPointerv: + */ + public static final int GL_UNIFORM_BUFFER = 0x8A11; + + /** + * Accepted by the <pname> parameter of GetIntegeri_v, GetBooleanv, + * GetIntegerv, GetFloatv, and GetDoublev: + */ + public static final int GL_UNIFORM_BUFFER_BINDING = 0x8A28; + + /** + * Accepted by the <pname> parameter of GetIntegeri_v: + */ + public static final int GL_UNIFORM_BUFFER_START = 0x8A29, + GL_UNIFORM_BUFFER_SIZE = 0x8A2A; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_MAX_VERTEX_UNIFORM_BLOCKS = 0x8A2B, + GL_MAX_GEOMETRY_UNIFORM_BLOCKS = 0x8A2C, + GL_MAX_FRAGMENT_UNIFORM_BLOCKS = 0x8A2D, + GL_MAX_COMBINED_UNIFORM_BLOCKS = 0x8A2E, + GL_MAX_UNIFORM_BUFFER_BINDINGS = 0x8A2F, + GL_MAX_UNIFORM_BLOCK_SIZE = 0x8A30, + GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 0x8A31, + GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS = 0x8A32, + GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 0x8A33, + GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = 0x8A34; + + /** + * Accepted by the <pname> parameter of GetProgramiv: + */ + public static final int GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = 0x8A35, + GL_ACTIVE_UNIFORM_BLOCKS = 0x8A36; + + /** + * Accepted by the <pname> parameter of GetActiveUniformsiv: + */ + public static final int GL_UNIFORM_TYPE = 0x8A37, + GL_UNIFORM_SIZE = 0x8A38, + GL_UNIFORM_NAME_LENGTH = 0x8A39, + GL_UNIFORM_BLOCK_INDEX = 0x8A3A, + GL_UNIFORM_OFFSET = 0x8A3B, + GL_UNIFORM_ARRAY_STRIDE = 0x8A3C, + GL_UNIFORM_MATRIX_STRIDE = 0x8A3D, + GL_UNIFORM_IS_ROW_MAJOR = 0x8A3E; + + /** + * Accepted by the <pname> parameter of GetActiveUniformBlockiv: + */ + public static final int GL_UNIFORM_BLOCK_BINDING = 0x8A3F, + GL_UNIFORM_BLOCK_DATA_SIZE = 0x8A40, + GL_UNIFORM_BLOCK_NAME_LENGTH = 0x8A41, + GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS = 0x8A42, + GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 0x8A43, + GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 0x8A44, + GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER = 0x8A45, + GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 0x8A46; + + /** + * Returned by GetActiveUniformsiv and GetUniformBlockIndex + */ + public static final int GL_INVALID_INDEX = 0xFFFFFFFF; + + private GL31() {} + + public static void glDrawArraysInstanced(int mode, int first, int count, int primcount) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawArraysInstanced; + BufferChecks.checkFunctionAddress(function_pointer); + nglDrawArraysInstanced(mode, first, count, primcount, function_pointer); + } + static native void nglDrawArraysInstanced(int mode, int first, int count, int primcount, long function_pointer); + + public static void glDrawElementsInstanced(int mode, ByteBuffer indices, int primcount) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsInstanced; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawElementsInstanced(mode, indices.remaining(), GL11.GL_UNSIGNED_BYTE, MemoryUtil.getAddress(indices), primcount, function_pointer); + } + public static void glDrawElementsInstanced(int mode, IntBuffer indices, int primcount) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsInstanced; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawElementsInstanced(mode, indices.remaining(), GL11.GL_UNSIGNED_INT, MemoryUtil.getAddress(indices), primcount, function_pointer); + } + public static void glDrawElementsInstanced(int mode, ShortBuffer indices, int primcount) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsInstanced; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawElementsInstanced(mode, indices.remaining(), GL11.GL_UNSIGNED_SHORT, MemoryUtil.getAddress(indices), primcount, function_pointer); + } + static native void nglDrawElementsInstanced(int mode, int indices_count, int type, long indices, int primcount, long function_pointer); + public static void glDrawElementsInstanced(int mode, int indices_count, int type, long indices_buffer_offset, int primcount) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsInstanced; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOenabled(caps); + nglDrawElementsInstancedBO(mode, indices_count, type, indices_buffer_offset, primcount, function_pointer); + } + static native void nglDrawElementsInstancedBO(int mode, int indices_count, int type, long indices_buffer_offset, int primcount, long function_pointer); + + public static void glCopyBufferSubData(int readtarget, int writetarget, long readoffset, long writeoffset, long size) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCopyBufferSubData; + BufferChecks.checkFunctionAddress(function_pointer); + nglCopyBufferSubData(readtarget, writetarget, readoffset, writeoffset, size, function_pointer); + } + static native void nglCopyBufferSubData(int readtarget, int writetarget, long readoffset, long writeoffset, long size, long function_pointer); + + public static void glPrimitiveRestartIndex(int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPrimitiveRestartIndex; + BufferChecks.checkFunctionAddress(function_pointer); + nglPrimitiveRestartIndex(index, function_pointer); + } + static native void nglPrimitiveRestartIndex(int index, long function_pointer); + + public static void glTexBuffer(int target, int internalformat, int buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexBuffer(target, internalformat, buffer, function_pointer); + } + static native void nglTexBuffer(int target, int internalformat, int buffer, long function_pointer); + + public static void glGetUniformIndices(int program, ByteBuffer uniformNames, IntBuffer uniformIndices) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetUniformIndices; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(uniformNames); + BufferChecks.checkNullTerminated(uniformNames, uniformIndices.remaining()); + BufferChecks.checkDirect(uniformIndices); + nglGetUniformIndices(program, uniformIndices.remaining(), MemoryUtil.getAddress(uniformNames), MemoryUtil.getAddress(uniformIndices), function_pointer); + } + static native void nglGetUniformIndices(int program, int uniformIndices_uniformCount, long uniformNames, long uniformIndices, long function_pointer); + + /** Overloads glGetUniformIndices. */ + public static void glGetUniformIndices(int program, CharSequence[] uniformNames, IntBuffer uniformIndices) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetUniformIndices; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkArray(uniformNames); + BufferChecks.checkBuffer(uniformIndices, uniformNames.length); + nglGetUniformIndices(program, uniformNames.length, APIUtil.getBufferNT(caps, uniformNames), MemoryUtil.getAddress(uniformIndices), function_pointer); + } + + public static void glGetActiveUniforms(int program, IntBuffer uniformIndices, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveUniformsiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(uniformIndices); + BufferChecks.checkBuffer(params, uniformIndices.remaining()); + nglGetActiveUniformsiv(program, uniformIndices.remaining(), MemoryUtil.getAddress(uniformIndices), pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetActiveUniformsiv(int program, int uniformIndices_uniformCount, long uniformIndices, int pname, long params, long function_pointer); + + /** + * Overloads glGetActiveUniformsiv. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetActiveUniformsi} instead. + */ + @Deprecated + public static int glGetActiveUniforms(int program, int uniformIndex, int pname) { + return GL31.glGetActiveUniformsi(program, uniformIndex, pname); + } + + /** Overloads glGetActiveUniformsiv. */ + public static int glGetActiveUniformsi(int program, int uniformIndex, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveUniformsiv; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetActiveUniformsiv(program, 1, MemoryUtil.getAddress(params.put(1, uniformIndex), 1), pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetActiveUniformName(int program, int uniformIndex, IntBuffer length, ByteBuffer uniformName) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveUniformName; + BufferChecks.checkFunctionAddress(function_pointer); + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkDirect(uniformName); + nglGetActiveUniformName(program, uniformIndex, uniformName.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(uniformName), function_pointer); + } + static native void nglGetActiveUniformName(int program, int uniformIndex, int uniformName_bufSize, long length, long uniformName, long function_pointer); + + /** Overloads glGetActiveUniformName. */ + public static String glGetActiveUniformName(int program, int uniformIndex, int bufSize) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveUniformName; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer uniformName_length = APIUtil.getLengths(caps); + ByteBuffer uniformName = APIUtil.getBufferByte(caps, bufSize); + nglGetActiveUniformName(program, uniformIndex, bufSize, MemoryUtil.getAddress0(uniformName_length), MemoryUtil.getAddress(uniformName), function_pointer); + uniformName.limit(uniformName_length.get(0)); + return APIUtil.getString(caps, uniformName); + } + + public static int glGetUniformBlockIndex(int program, ByteBuffer uniformBlockName) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetUniformBlockIndex; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(uniformBlockName); + BufferChecks.checkNullTerminated(uniformBlockName); + int __result = nglGetUniformBlockIndex(program, MemoryUtil.getAddress(uniformBlockName), function_pointer); + return __result; + } + static native int nglGetUniformBlockIndex(int program, long uniformBlockName, long function_pointer); + + /** Overloads glGetUniformBlockIndex. */ + public static int glGetUniformBlockIndex(int program, CharSequence uniformBlockName) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetUniformBlockIndex; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglGetUniformBlockIndex(program, APIUtil.getBufferNT(caps, uniformBlockName), function_pointer); + return __result; + } + + public static void glGetActiveUniformBlock(int program, int uniformBlockIndex, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveUniformBlockiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 16); + nglGetActiveUniformBlockiv(program, uniformBlockIndex, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetActiveUniformBlockiv(int program, int uniformBlockIndex, int pname, long params, long function_pointer); + + /** + * Overloads glGetActiveUniformBlockiv. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetActiveUniformBlocki} instead. + */ + @Deprecated + public static int glGetActiveUniformBlock(int program, int uniformBlockIndex, int pname) { + return GL31.glGetActiveUniformBlocki(program, uniformBlockIndex, pname); + } + + /** Overloads glGetActiveUniformBlockiv. */ + public static int glGetActiveUniformBlocki(int program, int uniformBlockIndex, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveUniformBlockiv; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetActiveUniformBlockiv(program, uniformBlockIndex, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetActiveUniformBlockName(int program, int uniformBlockIndex, IntBuffer length, ByteBuffer uniformBlockName) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveUniformBlockName; + BufferChecks.checkFunctionAddress(function_pointer); + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkDirect(uniformBlockName); + nglGetActiveUniformBlockName(program, uniformBlockIndex, uniformBlockName.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(uniformBlockName), function_pointer); + } + static native void nglGetActiveUniformBlockName(int program, int uniformBlockIndex, int uniformBlockName_bufSize, long length, long uniformBlockName, long function_pointer); + + /** Overloads glGetActiveUniformBlockName. */ + public static String glGetActiveUniformBlockName(int program, int uniformBlockIndex, int bufSize) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveUniformBlockName; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer uniformBlockName_length = APIUtil.getLengths(caps); + ByteBuffer uniformBlockName = APIUtil.getBufferByte(caps, bufSize); + nglGetActiveUniformBlockName(program, uniformBlockIndex, bufSize, MemoryUtil.getAddress0(uniformBlockName_length), MemoryUtil.getAddress(uniformBlockName), function_pointer); + uniformBlockName.limit(uniformBlockName_length.get(0)); + return APIUtil.getString(caps, uniformBlockName); + } + + public static void glUniformBlockBinding(int program, int uniformBlockIndex, int uniformBlockBinding) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformBlockBinding; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding, function_pointer); + } + static native void nglUniformBlockBinding(int program, int uniformBlockIndex, int uniformBlockBinding, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL32.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL32.java new file mode 100644 index 0000000..2450389 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL32.java @@ -0,0 +1,505 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class GL32 { + + public static final int GL_CONTEXT_PROFILE_MASK = 0x9126, + GL_CONTEXT_CORE_PROFILE_BIT = 0x1, + GL_CONTEXT_COMPATIBILITY_PROFILE_BIT = 0x2, + GL_MAX_VERTEX_OUTPUT_COMPONENTS = 0x9122, + GL_MAX_GEOMETRY_INPUT_COMPONENTS = 0x9123, + GL_MAX_GEOMETRY_OUTPUT_COMPONENTS = 0x9124, + GL_MAX_FRAGMENT_INPUT_COMPONENTS = 0x9125; + + /** + * Accepted by the <mode> parameter of ProvokingVertex: + */ + public static final int GL_FIRST_VERTEX_CONVENTION = 0x8E4D, + GL_LAST_VERTEX_CONVENTION = 0x8E4E; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_PROVOKING_VERTEX = 0x8E4F, + GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION = 0x8E4C; + + /** + * Accepted by the <cap> parameter of Enable, Disable and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv + * and GetDoublev: + */ + public static final int GL_TEXTURE_CUBE_MAP_SEAMLESS = 0x884F; + + /** + * Accepted by the <pname> parameter of GetMultisamplefv: + */ + public static final int GL_SAMPLE_POSITION = 0x8E50; + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, and by + * the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev: + */ + public static final int GL_SAMPLE_MASK = 0x8E51; + + /** + * Accepted by the <target> parameter of GetBooleani_v and + * GetIntegeri_v: + */ + public static final int GL_SAMPLE_MASK_VALUE = 0x8E52; + + /** + * Accepted by the <target> parameter of BindTexture and + * TexImage2DMultisample: + */ + public static final int GL_TEXTURE_2D_MULTISAMPLE = 0x9100; + + /** + * Accepted by the <target> parameter of TexImage2DMultisample: + */ + public static final int GL_PROXY_TEXTURE_2D_MULTISAMPLE = 0x9101; + + /** + * Accepted by the <target> parameter of BindTexture and + * TexImage3DMultisample: + */ + public static final int GL_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9102; + + /** + * Accepted by the <target> parameter of TexImage3DMultisample: + */ + public static final int GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9103; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv, + * and GetFloatv: + */ + public static final int GL_MAX_SAMPLE_MASK_WORDS = 0x8E59, + GL_MAX_COLOR_TEXTURE_SAMPLES = 0x910E, + GL_MAX_DEPTH_TEXTURE_SAMPLES = 0x910F, + GL_MAX_INTEGER_SAMPLES = 0x9110, + GL_TEXTURE_BINDING_2D_MULTISAMPLE = 0x9104, + GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY = 0x9105; + + /** + * Accepted by the <pname> parameter of GetTexLevelParameter + */ + public static final int GL_TEXTURE_SAMPLES = 0x9106, + GL_TEXTURE_FIXED_SAMPLE_LOCATIONS = 0x9107; + + /** + * Returned by the <type> parameter of GetActiveUniform: + */ + public static final int GL_SAMPLER_2D_MULTISAMPLE = 0x9108, + GL_INT_SAMPLER_2D_MULTISAMPLE = 0x9109, + GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE = 0x910A, + GL_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910B, + GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910C, + GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910D; + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_DEPTH_CLAMP = 0x864F; + + /** + * Accepted by the <type> parameter of CreateShader and returned by the + * <params> parameter of GetShaderiv: + */ + public static final int GL_GEOMETRY_SHADER = 0x8DD9; + + /** + * Accepted by the <pname> parameter of ProgramParameteriEXT and + * GetProgramiv: + */ + public static final int GL_GEOMETRY_VERTICES_OUT = 0x8DDA, + GL_GEOMETRY_INPUT_TYPE = 0x8DDB, + GL_GEOMETRY_OUTPUT_TYPE = 0x8DDC; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS = 0x8C29, + GL_MAX_VARYING_COMPONENTS = 0x8B4B, + GL_MAX_GEOMETRY_UNIFORM_COMPONENTS = 0x8DDF, + GL_MAX_GEOMETRY_OUTPUT_VERTICES = 0x8DE0, + GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS = 0x8DE1; + + /** + * Accepted by the <mode> parameter of Begin, DrawArrays, + * MultiDrawArrays, DrawElements, MultiDrawElements, and + * DrawRangeElements: + */ + public static final int GL_LINES_ADJACENCY = 0xA, + GL_LINE_STRIP_ADJACENCY = 0xB, + GL_TRIANGLES_ADJACENCY = 0xC, + GL_TRIANGLE_STRIP_ADJACENCY = 0xD; + + /** + * Returned by CheckFramebufferStatusEXT: + */ + public static final int GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS = 0x8DA8; + + /** + * Accepted by the <pname> parameter of GetFramebufferAttachment- + * ParameterivEXT: + */ + public static final int GL_FRAMEBUFFER_ATTACHMENT_LAYERED = 0x8DA7, + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 0x8CD4; + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, + * and by the <pname> parameter of GetIntegerv, GetFloatv, GetDoublev, + * and GetBooleanv: + */ + public static final int GL_PROGRAM_POINT_SIZE = 0x8642; + + /** + * Accepted as the <pname> parameter of GetInteger64v: + */ + public static final int GL_MAX_SERVER_WAIT_TIMEOUT = 0x9111; + + /** + * Accepted as the <pname> parameter of GetSynciv: + */ + public static final int GL_OBJECT_TYPE = 0x9112, + GL_SYNC_CONDITION = 0x9113, + GL_SYNC_STATUS = 0x9114, + GL_SYNC_FLAGS = 0x9115; + + /** + * Returned in <values> for GetSynciv <pname> OBJECT_TYPE: + */ + public static final int GL_SYNC_FENCE = 0x9116; + + /** + * Returned in <values> for GetSynciv <pname> SYNC_CONDITION: + */ + public static final int GL_SYNC_GPU_COMMANDS_COMPLETE = 0x9117; + + /** + * Returned in <values> for GetSynciv <pname> SYNC_STATUS: + */ + public static final int GL_UNSIGNALED = 0x9118, + GL_SIGNALED = 0x9119; + + /** + * Accepted in the <flags> parameter of ClientWaitSync: + */ + public static final int GL_SYNC_FLUSH_COMMANDS_BIT = 0x1; + + /** + * Accepted in the <timeout> parameter of WaitSync: + */ + public static final long GL_TIMEOUT_IGNORED = 0xFFFFFFFFFFFFFFFFL; + + /** + * Returned by ClientWaitSync: + */ + public static final int GL_ALREADY_SIGNALED = 0x911A, + GL_TIMEOUT_EXPIRED = 0x911B, + GL_CONDITION_SATISFIED = 0x911C, + GL_WAIT_FAILED = 0x911D; + + private GL32() {} + + public static void glGetBufferParameter(int target, int pname, LongBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetBufferParameteri64v; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetBufferParameteri64v(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetBufferParameteri64v(int target, int pname, long params, long function_pointer); + + /** + * Overloads glGetBufferParameteri64v. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetBufferParameteri64} instead. + */ + @Deprecated + public static long glGetBufferParameter(int target, int pname) { + return GL32.glGetBufferParameteri64(target, pname); + } + + /** Overloads glGetBufferParameteri64v. */ + public static long glGetBufferParameteri64(int target, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetBufferParameteri64v; + BufferChecks.checkFunctionAddress(function_pointer); + LongBuffer params = APIUtil.getBufferLong(caps); + nglGetBufferParameteri64v(target, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glDrawElementsBaseVertex(int mode, ByteBuffer indices, int basevertex) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsBaseVertex; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawElementsBaseVertex(mode, indices.remaining(), GL11.GL_UNSIGNED_BYTE, MemoryUtil.getAddress(indices), basevertex, function_pointer); + } + public static void glDrawElementsBaseVertex(int mode, IntBuffer indices, int basevertex) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsBaseVertex; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawElementsBaseVertex(mode, indices.remaining(), GL11.GL_UNSIGNED_INT, MemoryUtil.getAddress(indices), basevertex, function_pointer); + } + public static void glDrawElementsBaseVertex(int mode, ShortBuffer indices, int basevertex) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsBaseVertex; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawElementsBaseVertex(mode, indices.remaining(), GL11.GL_UNSIGNED_SHORT, MemoryUtil.getAddress(indices), basevertex, function_pointer); + } + static native void nglDrawElementsBaseVertex(int mode, int indices_count, int type, long indices, int basevertex, long function_pointer); + public static void glDrawElementsBaseVertex(int mode, int indices_count, int type, long indices_buffer_offset, int basevertex) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsBaseVertex; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOenabled(caps); + nglDrawElementsBaseVertexBO(mode, indices_count, type, indices_buffer_offset, basevertex, function_pointer); + } + static native void nglDrawElementsBaseVertexBO(int mode, int indices_count, int type, long indices_buffer_offset, int basevertex, long function_pointer); + + public static void glDrawRangeElementsBaseVertex(int mode, int start, int end, ByteBuffer indices, int basevertex) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawRangeElementsBaseVertex; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawRangeElementsBaseVertex(mode, start, end, indices.remaining(), GL11.GL_UNSIGNED_BYTE, MemoryUtil.getAddress(indices), basevertex, function_pointer); + } + public static void glDrawRangeElementsBaseVertex(int mode, int start, int end, IntBuffer indices, int basevertex) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawRangeElementsBaseVertex; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawRangeElementsBaseVertex(mode, start, end, indices.remaining(), GL11.GL_UNSIGNED_INT, MemoryUtil.getAddress(indices), basevertex, function_pointer); + } + public static void glDrawRangeElementsBaseVertex(int mode, int start, int end, ShortBuffer indices, int basevertex) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawRangeElementsBaseVertex; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawRangeElementsBaseVertex(mode, start, end, indices.remaining(), GL11.GL_UNSIGNED_SHORT, MemoryUtil.getAddress(indices), basevertex, function_pointer); + } + static native void nglDrawRangeElementsBaseVertex(int mode, int start, int end, int indices_count, int type, long indices, int basevertex, long function_pointer); + public static void glDrawRangeElementsBaseVertex(int mode, int start, int end, int indices_count, int type, long indices_buffer_offset, int basevertex) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawRangeElementsBaseVertex; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOenabled(caps); + nglDrawRangeElementsBaseVertexBO(mode, start, end, indices_count, type, indices_buffer_offset, basevertex, function_pointer); + } + static native void nglDrawRangeElementsBaseVertexBO(int mode, int start, int end, int indices_count, int type, long indices_buffer_offset, int basevertex, long function_pointer); + + public static void glDrawElementsInstancedBaseVertex(int mode, ByteBuffer indices, int primcount, int basevertex) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsInstancedBaseVertex; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawElementsInstancedBaseVertex(mode, indices.remaining(), GL11.GL_UNSIGNED_BYTE, MemoryUtil.getAddress(indices), primcount, basevertex, function_pointer); + } + public static void glDrawElementsInstancedBaseVertex(int mode, IntBuffer indices, int primcount, int basevertex) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsInstancedBaseVertex; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawElementsInstancedBaseVertex(mode, indices.remaining(), GL11.GL_UNSIGNED_INT, MemoryUtil.getAddress(indices), primcount, basevertex, function_pointer); + } + public static void glDrawElementsInstancedBaseVertex(int mode, ShortBuffer indices, int primcount, int basevertex) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsInstancedBaseVertex; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawElementsInstancedBaseVertex(mode, indices.remaining(), GL11.GL_UNSIGNED_SHORT, MemoryUtil.getAddress(indices), primcount, basevertex, function_pointer); + } + static native void nglDrawElementsInstancedBaseVertex(int mode, int indices_count, int type, long indices, int primcount, int basevertex, long function_pointer); + public static void glDrawElementsInstancedBaseVertex(int mode, int indices_count, int type, long indices_buffer_offset, int primcount, int basevertex) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsInstancedBaseVertex; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOenabled(caps); + nglDrawElementsInstancedBaseVertexBO(mode, indices_count, type, indices_buffer_offset, primcount, basevertex, function_pointer); + } + static native void nglDrawElementsInstancedBaseVertexBO(int mode, int indices_count, int type, long indices_buffer_offset, int primcount, int basevertex, long function_pointer); + + public static void glProvokingVertex(int mode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProvokingVertex; + BufferChecks.checkFunctionAddress(function_pointer); + nglProvokingVertex(mode, function_pointer); + } + static native void nglProvokingVertex(int mode, long function_pointer); + + public static void glTexImage2DMultisample(int target, int samples, int internalformat, int width, int height, boolean fixedsamplelocations) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexImage2DMultisample; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexImage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations, function_pointer); + } + static native void nglTexImage2DMultisample(int target, int samples, int internalformat, int width, int height, boolean fixedsamplelocations, long function_pointer); + + public static void glTexImage3DMultisample(int target, int samples, int internalformat, int width, int height, int depth, boolean fixedsamplelocations) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexImage3DMultisample; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexImage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations, function_pointer); + } + static native void nglTexImage3DMultisample(int target, int samples, int internalformat, int width, int height, int depth, boolean fixedsamplelocations, long function_pointer); + + public static void glGetMultisample(int pname, int index, FloatBuffer val) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMultisamplefv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(val, 2); + nglGetMultisamplefv(pname, index, MemoryUtil.getAddress(val), function_pointer); + } + static native void nglGetMultisamplefv(int pname, int index, long val, long function_pointer); + + public static void glSampleMaski(int index, int mask) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSampleMaski; + BufferChecks.checkFunctionAddress(function_pointer); + nglSampleMaski(index, mask, function_pointer); + } + static native void nglSampleMaski(int index, int mask, long function_pointer); + + public static void glFramebufferTexture(int target, int attachment, int texture, int level) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFramebufferTexture; + BufferChecks.checkFunctionAddress(function_pointer); + nglFramebufferTexture(target, attachment, texture, level, function_pointer); + } + static native void nglFramebufferTexture(int target, int attachment, int texture, int level, long function_pointer); + + public static GLSync glFenceSync(int condition, int flags) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFenceSync; + BufferChecks.checkFunctionAddress(function_pointer); + GLSync __result = new GLSync(nglFenceSync(condition, flags, function_pointer)); + return __result; + } + static native long nglFenceSync(int condition, int flags, long function_pointer); + + public static boolean glIsSync(GLSync sync) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsSync; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsSync(sync.getPointer(), function_pointer); + return __result; + } + static native boolean nglIsSync(long sync, long function_pointer); + + public static void glDeleteSync(GLSync sync) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteSync; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeleteSync(sync.getPointer(), function_pointer); + } + static native void nglDeleteSync(long sync, long function_pointer); + + public static int glClientWaitSync(GLSync sync, int flags, long timeout) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClientWaitSync; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglClientWaitSync(sync.getPointer(), flags, timeout, function_pointer); + return __result; + } + static native int nglClientWaitSync(long sync, int flags, long timeout, long function_pointer); + + public static void glWaitSync(GLSync sync, int flags, long timeout) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWaitSync; + BufferChecks.checkFunctionAddress(function_pointer); + nglWaitSync(sync.getPointer(), flags, timeout, function_pointer); + } + static native void nglWaitSync(long sync, int flags, long timeout, long function_pointer); + + public static void glGetInteger64(int pname, LongBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetInteger64v; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(data, 1); + nglGetInteger64v(pname, MemoryUtil.getAddress(data), function_pointer); + } + static native void nglGetInteger64v(int pname, long data, long function_pointer); + + /** Overloads glGetInteger64v. */ + public static long glGetInteger64(int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetInteger64v; + BufferChecks.checkFunctionAddress(function_pointer); + LongBuffer data = APIUtil.getBufferLong(caps); + nglGetInteger64v(pname, MemoryUtil.getAddress(data), function_pointer); + return data.get(0); + } + + public static void glGetInteger64(int value, int index, LongBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetInteger64i_v; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(data, 4); + nglGetInteger64i_v(value, index, MemoryUtil.getAddress(data), function_pointer); + } + static native void nglGetInteger64i_v(int value, int index, long data, long function_pointer); + + /** Overloads glGetInteger64i_v. */ + public static long glGetInteger64(int value, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetInteger64i_v; + BufferChecks.checkFunctionAddress(function_pointer); + LongBuffer data = APIUtil.getBufferLong(caps); + nglGetInteger64i_v(value, index, MemoryUtil.getAddress(data), function_pointer); + return data.get(0); + } + + public static void glGetSync(GLSync sync, int pname, IntBuffer length, IntBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSynciv; + BufferChecks.checkFunctionAddress(function_pointer); + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkDirect(values); + nglGetSynciv(sync.getPointer(), pname, values.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(values), function_pointer); + } + static native void nglGetSynciv(long sync, int pname, int values_bufSize, long length, long values, long function_pointer); + + /** + * Overloads glGetSynciv. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetSynci} instead. + */ + @Deprecated + public static int glGetSync(GLSync sync, int pname) { + return GL32.glGetSynci(sync, pname); + } + + /** Overloads glGetSynciv. */ + public static int glGetSynci(GLSync sync, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSynciv; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer values = APIUtil.getBufferInt(caps); + nglGetSynciv(sync.getPointer(), pname, 1, 0L, MemoryUtil.getAddress(values), function_pointer); + return values.get(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL33.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL33.java new file mode 100644 index 0000000..334870e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL33.java @@ -0,0 +1,705 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class GL33 { + + /** + * Accepted by the <src> and <dst> parameters of BlendFunc and + * BlendFunci, and by the <srcRGB>, <dstRGB>, <srcAlpha> and <dstAlpha> + * parameters of BlendFuncSeparate and BlendFuncSeparatei: + */ + public static final int GL_SRC1_COLOR = 0x88F9, + GL_SRC1_ALPHA = 0x8589, + GL_ONE_MINUS_SRC1_COLOR = 0x88FA, + GL_ONE_MINUS_SRC1_ALPHA = 0x88FB; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv + * and GetDoublev: + */ + public static final int GL_MAX_DUAL_SOURCE_DRAW_BUFFERS = 0x88FC; + + /** + * Accepted by the <target> parameter of BeginQuery, EndQuery, + * and GetQueryiv: + */ + public static final int GL_ANY_SAMPLES_PASSED = 0x8C2F; + + /** + * Accepted by the <value> parameter of the GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv and GetDoublev functions: + */ + public static final int GL_SAMPLER_BINDING = 0x8919; + + /** + * Accepted by the <internalFormat> parameter of TexImage1D, TexImage2D, + * TexImage3D, CopyTexImage1D, CopyTexImage2D, RenderbufferStorage and + * RenderbufferStorageMultisample: + */ + public static final int GL_RGB10_A2UI = 0x906F; + + /** + * Accepted by the <pname> parameters of TexParameteri, + * TexParameterf, TexParameteriv, TexParameterfv, + * GetTexParameterfv, and GetTexParameteriv: + */ + public static final int GL_TEXTURE_SWIZZLE_R = 0x8E42, + GL_TEXTURE_SWIZZLE_G = 0x8E43, + GL_TEXTURE_SWIZZLE_B = 0x8E44, + GL_TEXTURE_SWIZZLE_A = 0x8E45; + + /** + * Accepted by the <pname> parameters of TexParameteriv, + * TexParameterfv, GetTexParameterfv, and GetTexParameteriv: + */ + public static final int GL_TEXTURE_SWIZZLE_RGBA = 0x8E46; + + /** + * Accepted by the <target> parameter of BeginQuery, EndQuery, and + * GetQueryiv: + */ + public static final int GL_TIME_ELAPSED = 0x88BF; + + /** + * Accepted by the <target> parameter of GetQueryiv and QueryCounter. + * Accepted by the <value> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + public static final int GL_TIMESTAMP = 0x8E28; + + /** + * Accepted by the <pname> parameters of GetVertexAttribdv, + * GetVertexAttribfv, and GetVertexAttribiv: + */ + public static final int GL_VERTEX_ATTRIB_ARRAY_DIVISOR = 0x88FE; + + /** + * Accepted by the <type> parameter of VertexAttribPointer, VertexPointer, + * NormalPointer, ColorPointer, SecondaryColorPointer, TexCoordPointer, + * VertexAttribP{1234}ui, VertexP*, TexCoordP*, MultiTexCoordP*, NormalP3ui, + * ColorP*, SecondaryColorP* and VertexAttribP* + */ + public static final int GL_INT_2_10_10_10_REV = 0x8D9F; + + private GL33() {} + + public static void glBindFragDataLocationIndexed(int program, int colorNumber, int index, ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindFragDataLocationIndexed; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(name); + BufferChecks.checkNullTerminated(name); + nglBindFragDataLocationIndexed(program, colorNumber, index, MemoryUtil.getAddress(name), function_pointer); + } + static native void nglBindFragDataLocationIndexed(int program, int colorNumber, int index, long name, long function_pointer); + + /** Overloads glBindFragDataLocationIndexed. */ + public static void glBindFragDataLocationIndexed(int program, int colorNumber, int index, CharSequence name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindFragDataLocationIndexed; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindFragDataLocationIndexed(program, colorNumber, index, APIUtil.getBufferNT(caps, name), function_pointer); + } + + public static int glGetFragDataIndex(int program, ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetFragDataIndex; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(name); + BufferChecks.checkNullTerminated(name); + int __result = nglGetFragDataIndex(program, MemoryUtil.getAddress(name), function_pointer); + return __result; + } + static native int nglGetFragDataIndex(int program, long name, long function_pointer); + + /** Overloads glGetFragDataIndex. */ + public static int glGetFragDataIndex(int program, CharSequence name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetFragDataIndex; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglGetFragDataIndex(program, APIUtil.getBufferNT(caps, name), function_pointer); + return __result; + } + + public static void glGenSamplers(IntBuffer samplers) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenSamplers; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(samplers); + nglGenSamplers(samplers.remaining(), MemoryUtil.getAddress(samplers), function_pointer); + } + static native void nglGenSamplers(int samplers_count, long samplers, long function_pointer); + + /** Overloads glGenSamplers. */ + public static int glGenSamplers() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenSamplers; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer samplers = APIUtil.getBufferInt(caps); + nglGenSamplers(1, MemoryUtil.getAddress(samplers), function_pointer); + return samplers.get(0); + } + + public static void glDeleteSamplers(IntBuffer samplers) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteSamplers; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(samplers); + nglDeleteSamplers(samplers.remaining(), MemoryUtil.getAddress(samplers), function_pointer); + } + static native void nglDeleteSamplers(int samplers_count, long samplers, long function_pointer); + + /** Overloads glDeleteSamplers. */ + public static void glDeleteSamplers(int sampler) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteSamplers; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeleteSamplers(1, APIUtil.getInt(caps, sampler), function_pointer); + } + + public static boolean glIsSampler(int sampler) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsSampler; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsSampler(sampler, function_pointer); + return __result; + } + static native boolean nglIsSampler(int sampler, long function_pointer); + + public static void glBindSampler(int unit, int sampler) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindSampler; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindSampler(unit, sampler, function_pointer); + } + static native void nglBindSampler(int unit, int sampler, long function_pointer); + + public static void glSamplerParameteri(int sampler, int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSamplerParameteri; + BufferChecks.checkFunctionAddress(function_pointer); + nglSamplerParameteri(sampler, pname, param, function_pointer); + } + static native void nglSamplerParameteri(int sampler, int pname, int param, long function_pointer); + + public static void glSamplerParameterf(int sampler, int pname, float param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSamplerParameterf; + BufferChecks.checkFunctionAddress(function_pointer); + nglSamplerParameterf(sampler, pname, param, function_pointer); + } + static native void nglSamplerParameterf(int sampler, int pname, float param, long function_pointer); + + public static void glSamplerParameter(int sampler, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSamplerParameteriv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglSamplerParameteriv(sampler, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglSamplerParameteriv(int sampler, int pname, long params, long function_pointer); + + public static void glSamplerParameter(int sampler, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSamplerParameterfv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglSamplerParameterfv(sampler, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglSamplerParameterfv(int sampler, int pname, long params, long function_pointer); + + public static void glSamplerParameterI(int sampler, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSamplerParameterIiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglSamplerParameterIiv(sampler, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglSamplerParameterIiv(int sampler, int pname, long params, long function_pointer); + + public static void glSamplerParameterIu(int sampler, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSamplerParameterIuiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglSamplerParameterIuiv(sampler, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglSamplerParameterIuiv(int sampler, int pname, long params, long function_pointer); + + public static void glGetSamplerParameter(int sampler, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSamplerParameteriv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetSamplerParameteriv(sampler, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetSamplerParameteriv(int sampler, int pname, long params, long function_pointer); + + /** Overloads glGetSamplerParameteriv. */ + public static int glGetSamplerParameteri(int sampler, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSamplerParameteriv; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetSamplerParameteriv(sampler, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetSamplerParameter(int sampler, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSamplerParameterfv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetSamplerParameterfv(sampler, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetSamplerParameterfv(int sampler, int pname, long params, long function_pointer); + + /** Overloads glGetSamplerParameterfv. */ + public static float glGetSamplerParameterf(int sampler, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSamplerParameterfv; + BufferChecks.checkFunctionAddress(function_pointer); + FloatBuffer params = APIUtil.getBufferFloat(caps); + nglGetSamplerParameterfv(sampler, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetSamplerParameterI(int sampler, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSamplerParameterIiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetSamplerParameterIiv(sampler, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetSamplerParameterIiv(int sampler, int pname, long params, long function_pointer); + + /** Overloads glGetSamplerParameterIiv. */ + public static int glGetSamplerParameterIi(int sampler, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSamplerParameterIiv; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetSamplerParameterIiv(sampler, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetSamplerParameterIu(int sampler, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSamplerParameterIuiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetSamplerParameterIuiv(sampler, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetSamplerParameterIuiv(int sampler, int pname, long params, long function_pointer); + + /** Overloads glGetSamplerParameterIuiv. */ + public static int glGetSamplerParameterIui(int sampler, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSamplerParameterIuiv; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetSamplerParameterIuiv(sampler, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glQueryCounter(int id, int target) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glQueryCounter; + BufferChecks.checkFunctionAddress(function_pointer); + nglQueryCounter(id, target, function_pointer); + } + static native void nglQueryCounter(int id, int target, long function_pointer); + + public static void glGetQueryObject(int id, int pname, LongBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetQueryObjecti64v; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetQueryObjecti64v(id, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetQueryObjecti64v(int id, int pname, long params, long function_pointer); + + /** + * Overloads glGetQueryObjecti64v. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetQueryObjecti64} instead. + */ + @Deprecated + public static long glGetQueryObject(int id, int pname) { + return GL33.glGetQueryObjecti64(id, pname); + } + + /** Overloads glGetQueryObjecti64v. */ + public static long glGetQueryObjecti64(int id, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetQueryObjecti64v; + BufferChecks.checkFunctionAddress(function_pointer); + LongBuffer params = APIUtil.getBufferLong(caps); + nglGetQueryObjecti64v(id, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetQueryObjectu(int id, int pname, LongBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetQueryObjectui64v; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetQueryObjectui64v(id, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetQueryObjectui64v(int id, int pname, long params, long function_pointer); + + /** + * Overloads glGetQueryObjectui64v. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetQueryObjectui64} instead. + */ + @Deprecated + public static long glGetQueryObjectu(int id, int pname) { + return GL33.glGetQueryObjectui64(id, pname); + } + + /** Overloads glGetQueryObjectui64v. */ + public static long glGetQueryObjectui64(int id, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetQueryObjectui64v; + BufferChecks.checkFunctionAddress(function_pointer); + LongBuffer params = APIUtil.getBufferLong(caps); + nglGetQueryObjectui64v(id, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glVertexAttribDivisor(int index, int divisor) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribDivisor; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribDivisor(index, divisor, function_pointer); + } + static native void nglVertexAttribDivisor(int index, int divisor, long function_pointer); + + public static void glVertexP2ui(int type, int value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexP2ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexP2ui(type, value, function_pointer); + } + static native void nglVertexP2ui(int type, int value, long function_pointer); + + public static void glVertexP3ui(int type, int value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexP3ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexP3ui(type, value, function_pointer); + } + static native void nglVertexP3ui(int type, int value, long function_pointer); + + public static void glVertexP4ui(int type, int value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexP4ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexP4ui(type, value, function_pointer); + } + static native void nglVertexP4ui(int type, int value, long function_pointer); + + public static void glVertexP2u(int type, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexP2uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(value, 2); + nglVertexP2uiv(type, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglVertexP2uiv(int type, long value, long function_pointer); + + public static void glVertexP3u(int type, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexP3uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(value, 3); + nglVertexP3uiv(type, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglVertexP3uiv(int type, long value, long function_pointer); + + public static void glVertexP4u(int type, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexP4uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(value, 4); + nglVertexP4uiv(type, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglVertexP4uiv(int type, long value, long function_pointer); + + public static void glTexCoordP1ui(int type, int coords) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexCoordP1ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexCoordP1ui(type, coords, function_pointer); + } + static native void nglTexCoordP1ui(int type, int coords, long function_pointer); + + public static void glTexCoordP2ui(int type, int coords) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexCoordP2ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexCoordP2ui(type, coords, function_pointer); + } + static native void nglTexCoordP2ui(int type, int coords, long function_pointer); + + public static void glTexCoordP3ui(int type, int coords) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexCoordP3ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexCoordP3ui(type, coords, function_pointer); + } + static native void nglTexCoordP3ui(int type, int coords, long function_pointer); + + public static void glTexCoordP4ui(int type, int coords) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexCoordP4ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexCoordP4ui(type, coords, function_pointer); + } + static native void nglTexCoordP4ui(int type, int coords, long function_pointer); + + public static void glTexCoordP1u(int type, IntBuffer coords) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexCoordP1uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(coords, 1); + nglTexCoordP1uiv(type, MemoryUtil.getAddress(coords), function_pointer); + } + static native void nglTexCoordP1uiv(int type, long coords, long function_pointer); + + public static void glTexCoordP2u(int type, IntBuffer coords) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexCoordP2uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(coords, 2); + nglTexCoordP2uiv(type, MemoryUtil.getAddress(coords), function_pointer); + } + static native void nglTexCoordP2uiv(int type, long coords, long function_pointer); + + public static void glTexCoordP3u(int type, IntBuffer coords) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexCoordP3uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(coords, 3); + nglTexCoordP3uiv(type, MemoryUtil.getAddress(coords), function_pointer); + } + static native void nglTexCoordP3uiv(int type, long coords, long function_pointer); + + public static void glTexCoordP4u(int type, IntBuffer coords) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexCoordP4uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(coords, 4); + nglTexCoordP4uiv(type, MemoryUtil.getAddress(coords), function_pointer); + } + static native void nglTexCoordP4uiv(int type, long coords, long function_pointer); + + public static void glMultiTexCoordP1ui(int texture, int type, int coords) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoordP1ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoordP1ui(texture, type, coords, function_pointer); + } + static native void nglMultiTexCoordP1ui(int texture, int type, int coords, long function_pointer); + + public static void glMultiTexCoordP2ui(int texture, int type, int coords) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoordP2ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoordP2ui(texture, type, coords, function_pointer); + } + static native void nglMultiTexCoordP2ui(int texture, int type, int coords, long function_pointer); + + public static void glMultiTexCoordP3ui(int texture, int type, int coords) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoordP3ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoordP3ui(texture, type, coords, function_pointer); + } + static native void nglMultiTexCoordP3ui(int texture, int type, int coords, long function_pointer); + + public static void glMultiTexCoordP4ui(int texture, int type, int coords) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoordP4ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoordP4ui(texture, type, coords, function_pointer); + } + static native void nglMultiTexCoordP4ui(int texture, int type, int coords, long function_pointer); + + public static void glMultiTexCoordP1u(int texture, int type, IntBuffer coords) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoordP1uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(coords, 1); + nglMultiTexCoordP1uiv(texture, type, MemoryUtil.getAddress(coords), function_pointer); + } + static native void nglMultiTexCoordP1uiv(int texture, int type, long coords, long function_pointer); + + public static void glMultiTexCoordP2u(int texture, int type, IntBuffer coords) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoordP2uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(coords, 2); + nglMultiTexCoordP2uiv(texture, type, MemoryUtil.getAddress(coords), function_pointer); + } + static native void nglMultiTexCoordP2uiv(int texture, int type, long coords, long function_pointer); + + public static void glMultiTexCoordP3u(int texture, int type, IntBuffer coords) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoordP3uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(coords, 3); + nglMultiTexCoordP3uiv(texture, type, MemoryUtil.getAddress(coords), function_pointer); + } + static native void nglMultiTexCoordP3uiv(int texture, int type, long coords, long function_pointer); + + public static void glMultiTexCoordP4u(int texture, int type, IntBuffer coords) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoordP4uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(coords, 4); + nglMultiTexCoordP4uiv(texture, type, MemoryUtil.getAddress(coords), function_pointer); + } + static native void nglMultiTexCoordP4uiv(int texture, int type, long coords, long function_pointer); + + public static void glNormalP3ui(int type, int coords) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNormalP3ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglNormalP3ui(type, coords, function_pointer); + } + static native void nglNormalP3ui(int type, int coords, long function_pointer); + + public static void glNormalP3u(int type, IntBuffer coords) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNormalP3uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(coords, 3); + nglNormalP3uiv(type, MemoryUtil.getAddress(coords), function_pointer); + } + static native void nglNormalP3uiv(int type, long coords, long function_pointer); + + public static void glColorP3ui(int type, int color) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorP3ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglColorP3ui(type, color, function_pointer); + } + static native void nglColorP3ui(int type, int color, long function_pointer); + + public static void glColorP4ui(int type, int color) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorP4ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglColorP4ui(type, color, function_pointer); + } + static native void nglColorP4ui(int type, int color, long function_pointer); + + public static void glColorP3u(int type, IntBuffer color) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorP3uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(color, 3); + nglColorP3uiv(type, MemoryUtil.getAddress(color), function_pointer); + } + static native void nglColorP3uiv(int type, long color, long function_pointer); + + public static void glColorP4u(int type, IntBuffer color) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorP4uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(color, 4); + nglColorP4uiv(type, MemoryUtil.getAddress(color), function_pointer); + } + static native void nglColorP4uiv(int type, long color, long function_pointer); + + public static void glSecondaryColorP3ui(int type, int color) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSecondaryColorP3ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglSecondaryColorP3ui(type, color, function_pointer); + } + static native void nglSecondaryColorP3ui(int type, int color, long function_pointer); + + public static void glSecondaryColorP3u(int type, IntBuffer color) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSecondaryColorP3uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(color, 3); + nglSecondaryColorP3uiv(type, MemoryUtil.getAddress(color), function_pointer); + } + static native void nglSecondaryColorP3uiv(int type, long color, long function_pointer); + + public static void glVertexAttribP1ui(int index, int type, boolean normalized, int value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribP1ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribP1ui(index, type, normalized, value, function_pointer); + } + static native void nglVertexAttribP1ui(int index, int type, boolean normalized, int value, long function_pointer); + + public static void glVertexAttribP2ui(int index, int type, boolean normalized, int value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribP2ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribP2ui(index, type, normalized, value, function_pointer); + } + static native void nglVertexAttribP2ui(int index, int type, boolean normalized, int value, long function_pointer); + + public static void glVertexAttribP3ui(int index, int type, boolean normalized, int value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribP3ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribP3ui(index, type, normalized, value, function_pointer); + } + static native void nglVertexAttribP3ui(int index, int type, boolean normalized, int value, long function_pointer); + + public static void glVertexAttribP4ui(int index, int type, boolean normalized, int value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribP4ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribP4ui(index, type, normalized, value, function_pointer); + } + static native void nglVertexAttribP4ui(int index, int type, boolean normalized, int value, long function_pointer); + + public static void glVertexAttribP1u(int index, int type, boolean normalized, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribP1uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(value, 1); + nglVertexAttribP1uiv(index, type, normalized, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglVertexAttribP1uiv(int index, int type, boolean normalized, long value, long function_pointer); + + public static void glVertexAttribP2u(int index, int type, boolean normalized, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribP2uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(value, 2); + nglVertexAttribP2uiv(index, type, normalized, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglVertexAttribP2uiv(int index, int type, boolean normalized, long value, long function_pointer); + + public static void glVertexAttribP3u(int index, int type, boolean normalized, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribP3uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(value, 3); + nglVertexAttribP3uiv(index, type, normalized, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglVertexAttribP3uiv(int index, int type, boolean normalized, long value, long function_pointer); + + public static void glVertexAttribP4u(int index, int type, boolean normalized, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribP4uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(value, 4); + nglVertexAttribP4uiv(index, type, normalized, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglVertexAttribP4uiv(int index, int type, boolean normalized, long value, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL40.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL40.java new file mode 100644 index 0000000..710eff6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL40.java @@ -0,0 +1,811 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class GL40 { + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, + * GetBufferPointerv, MapBufferRange, FlushMappedBufferRange, + * GetBufferParameteriv, BindBufferRange, BindBufferBase, and + * CopyBufferSubData: + */ + public static final int GL_DRAW_INDIRECT_BUFFER = 0x8F3F; + + /** + * Accepted by the <value> parameter of GetIntegerv, GetBooleanv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_DRAW_INDIRECT_BUFFER_BINDING = 0x8F43; + + /** + * Accepted by the <pname> parameter of GetProgramiv: + */ + public static final int GL_GEOMETRY_SHADER_INVOCATIONS = 0x887F; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * GetDoublev, and GetInteger64v: + */ + public static final int GL_MAX_GEOMETRY_SHADER_INVOCATIONS = 0x8E5A, + GL_MIN_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5B, + GL_MAX_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5C, + GL_FRAGMENT_INTERPOLATION_OFFSET_BITS = 0x8E5D, + GL_MAX_VERTEX_STREAMS = 0x8E71; + + /** + * Returned in the <type> parameter of GetActiveUniform, and + * GetTransformFeedbackVarying: + */ + public static final int GL_DOUBLE_VEC2 = 0x8FFC, + GL_DOUBLE_VEC3 = 0x8FFD, + GL_DOUBLE_VEC4 = 0x8FFE, + GL_DOUBLE_MAT2 = 0x8F46, + GL_DOUBLE_MAT3 = 0x8F47, + GL_DOUBLE_MAT4 = 0x8F48, + GL_DOUBLE_MAT2x3 = 0x8F49, + GL_DOUBLE_MAT2x4 = 0x8F4A, + GL_DOUBLE_MAT3x2 = 0x8F4B, + GL_DOUBLE_MAT3x4 = 0x8F4C, + GL_DOUBLE_MAT4x2 = 0x8F4D, + GL_DOUBLE_MAT4x3 = 0x8F4E; + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_SAMPLE_SHADING = 0x8C36; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, + * GetIntegerv, and GetFloatv: + */ + public static final int GL_MIN_SAMPLE_SHADING_VALUE = 0x8C37; + + /** + * Accepted by the <pname> parameter of GetProgramStageiv: + */ + public static final int GL_ACTIVE_SUBROUTINES = 0x8DE5, + GL_ACTIVE_SUBROUTINE_UNIFORMS = 0x8DE6, + GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS = 0x8E47, + GL_ACTIVE_SUBROUTINE_MAX_LENGTH = 0x8E48, + GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH = 0x8E49; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, GetDoublev, and GetInteger64v: + */ + public static final int GL_MAX_SUBROUTINES = 0x8DE7, + GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS = 0x8DE8; + + /** + * Accepted by the <pname> parameter of GetActiveSubroutineUniformiv: + */ + public static final int GL_NUM_COMPATIBLE_SUBROUTINES = 0x8E4A, + GL_COMPATIBLE_SUBROUTINES = 0x8E4B, + GL_UNIFORM_SIZE = 0x8A38, + GL_UNIFORM_NAME_LENGTH = 0x8A39; + + /** + * Accepted by the <mode> parameter of Begin and all vertex array functions + * that implicitly call Begin: + */ + public static final int GL_PATCHES = 0xE; + + /** + * Accepted by the <pname> parameter of PatchParameteri, GetBooleanv, + * GetDoublev, GetFloatv, GetIntegerv, and GetInteger64v: + */ + public static final int GL_PATCH_VERTICES = 0x8E72; + + /** + * Accepted by the <pname> parameter of PatchParameterfv, GetBooleanv, + * GetDoublev, GetFloatv, and GetIntegerv, and GetInteger64v: + */ + public static final int GL_PATCH_DEFAULT_INNER_LEVEL = 0x8E73, + GL_PATCH_DEFAULT_OUTER_LEVEL = 0x8E74; + + /** + * Accepted by the <pname> parameter of GetProgramiv: + */ + public static final int GL_TESS_CONTROL_OUTPUT_VERTICES = 0x8E75, + GL_TESS_GEN_MODE = 0x8E76, + GL_TESS_GEN_SPACING = 0x8E77, + GL_TESS_GEN_VERTEX_ORDER = 0x8E78, + GL_TESS_GEN_POINT_MODE = 0x8E79; + + /** + * Returned by GetProgramiv when <pname> is TESS_GEN_MODE: + */ + public static final int GL_ISOLINES = 0x8E7A; + + /** + * Returned by GetProgramiv when <pname> is TESS_GEN_SPACING: + */ + public static final int GL_FRACTIONAL_ODD = 0x8E7B, + GL_FRACTIONAL_EVEN = 0x8E7C; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetFloatv, + * GetIntegerv, and GetInteger64v: + */ + public static final int GL_MAX_PATCH_VERTICES = 0x8E7D, + GL_MAX_TESS_GEN_LEVEL = 0x8E7E, + GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E7F, + GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E80, + GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS = 0x8E81, + GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS = 0x8E82, + GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS = 0x8E83, + GL_MAX_TESS_PATCH_COMPONENTS = 0x8E84, + GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS = 0x8E85, + GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS = 0x8E86, + GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS = 0x8E89, + GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS = 0x8E8A, + GL_MAX_TESS_CONTROL_INPUT_COMPONENTS = 0x886C, + GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS = 0x886D, + GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E1E, + GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E1F; + + /** + * Accepted by the <pname> parameter of GetActiveUniformBlockiv: + */ + public static final int GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER = 0x84F0, + GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x84F1; + + /** + * Accepted by the <type> parameter of CreateShader and returned by the + * <params> parameter of GetShaderiv: + */ + public static final int GL_TESS_EVALUATION_SHADER = 0x8E87, + GL_TESS_CONTROL_SHADER = 0x8E88; + + /** + * Accepted by the <target> parameter of TexParameteri, TexParameteriv, + * TexParameterf, TexParameterfv, BindTexture, and GenerateMipmap: + *

+ * Accepted by the <target> parameter of TexImage3D, TexSubImage3D, + * CompressedTeximage3D, CompressedTexSubImage3D and CopyTexSubImage3D: + *

+ * Accepted by the <tex> parameter of GetTexImage: + */ + public static final int GL_TEXTURE_CUBE_MAP_ARRAY = 0x9009; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, + * GetIntegerv and GetFloatv: + */ + public static final int GL_TEXTURE_BINDING_CUBE_MAP_ARRAY = 0x900A; + + /** + * Accepted by the <target> parameter of TexImage3D, TexSubImage3D, + * CompressedTeximage3D, CompressedTexSubImage3D and CopyTexSubImage3D: + */ + public static final int GL_PROXY_TEXTURE_CUBE_MAP_ARRAY = 0x900B; + + /** + * Returned by the <type> parameter of GetActiveUniform: + */ + public static final int GL_SAMPLER_CUBE_MAP_ARRAY = 0x900C, + GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW = 0x900D, + GL_INT_SAMPLER_CUBE_MAP_ARRAY = 0x900E, + GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY = 0x900F; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = 0x8E5E, + GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = 0x8E5F, + GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB = 0x8F9F; + + /** + * Accepted by the <target> parameter of BindTransformFeedback: + */ + public static final int GL_TRANSFORM_FEEDBACK = 0x8E22; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv, + * and GetFloatv: + */ + public static final int GL_TRANSFORM_FEEDBACK_PAUSED = 0x8E23, + GL_TRANSFORM_FEEDBACK_ACTIVE = 0x8E24, + GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED = 0x8E23, + GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE = 0x8E24, + GL_TRANSFORM_FEEDBACK_BINDING = 0x8E25; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv, + * and GetFloatv: + */ + public static final int GL_MAX_TRANSFORM_FEEDBACK_BUFFERS = 0x8E70; + + private GL40() {} + + public static void glBlendEquationi(int buf, int mode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBlendEquationi; + BufferChecks.checkFunctionAddress(function_pointer); + nglBlendEquationi(buf, mode, function_pointer); + } + static native void nglBlendEquationi(int buf, int mode, long function_pointer); + + public static void glBlendEquationSeparatei(int buf, int modeRGB, int modeAlpha) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBlendEquationSeparatei; + BufferChecks.checkFunctionAddress(function_pointer); + nglBlendEquationSeparatei(buf, modeRGB, modeAlpha, function_pointer); + } + static native void nglBlendEquationSeparatei(int buf, int modeRGB, int modeAlpha, long function_pointer); + + public static void glBlendFunci(int buf, int src, int dst) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBlendFunci; + BufferChecks.checkFunctionAddress(function_pointer); + nglBlendFunci(buf, src, dst, function_pointer); + } + static native void nglBlendFunci(int buf, int src, int dst, long function_pointer); + + public static void glBlendFuncSeparatei(int buf, int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBlendFuncSeparatei; + BufferChecks.checkFunctionAddress(function_pointer); + nglBlendFuncSeparatei(buf, srcRGB, dstRGB, srcAlpha, dstAlpha, function_pointer); + } + static native void nglBlendFuncSeparatei(int buf, int srcRGB, int dstRGB, int srcAlpha, int dstAlpha, long function_pointer); + + public static void glDrawArraysIndirect(int mode, ByteBuffer indirect) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawArraysIndirect; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureIndirectBOdisabled(caps); + BufferChecks.checkBuffer(indirect, 4 * 4); + nglDrawArraysIndirect(mode, MemoryUtil.getAddress(indirect), function_pointer); + } + static native void nglDrawArraysIndirect(int mode, long indirect, long function_pointer); + public static void glDrawArraysIndirect(int mode, long indirect_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawArraysIndirect; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureIndirectBOenabled(caps); + nglDrawArraysIndirectBO(mode, indirect_buffer_offset, function_pointer); + } + static native void nglDrawArraysIndirectBO(int mode, long indirect_buffer_offset, long function_pointer); + + /** Overloads glDrawArraysIndirect. */ + public static void glDrawArraysIndirect(int mode, IntBuffer indirect) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawArraysIndirect; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureIndirectBOdisabled(caps); + BufferChecks.checkBuffer(indirect, 4); + nglDrawArraysIndirect(mode, MemoryUtil.getAddress(indirect), function_pointer); + } + + public static void glDrawElementsIndirect(int mode, int type, ByteBuffer indirect) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsIndirect; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureIndirectBOdisabled(caps); + BufferChecks.checkBuffer(indirect, 5 * 4); + nglDrawElementsIndirect(mode, type, MemoryUtil.getAddress(indirect), function_pointer); + } + static native void nglDrawElementsIndirect(int mode, int type, long indirect, long function_pointer); + public static void glDrawElementsIndirect(int mode, int type, long indirect_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsIndirect; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureIndirectBOenabled(caps); + nglDrawElementsIndirectBO(mode, type, indirect_buffer_offset, function_pointer); + } + static native void nglDrawElementsIndirectBO(int mode, int type, long indirect_buffer_offset, long function_pointer); + + /** Overloads glDrawElementsIndirect. */ + public static void glDrawElementsIndirect(int mode, int type, IntBuffer indirect) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsIndirect; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureIndirectBOdisabled(caps); + BufferChecks.checkBuffer(indirect, 5); + nglDrawElementsIndirect(mode, type, MemoryUtil.getAddress(indirect), function_pointer); + } + + public static void glUniform1d(int location, double x) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform1d; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform1d(location, x, function_pointer); + } + static native void nglUniform1d(int location, double x, long function_pointer); + + public static void glUniform2d(int location, double x, double y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform2d; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform2d(location, x, y, function_pointer); + } + static native void nglUniform2d(int location, double x, double y, long function_pointer); + + public static void glUniform3d(int location, double x, double y, double z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform3d; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform3d(location, x, y, z, function_pointer); + } + static native void nglUniform3d(int location, double x, double y, double z, long function_pointer); + + public static void glUniform4d(int location, double x, double y, double z, double w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform4d; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform4d(location, x, y, z, w, function_pointer); + } + static native void nglUniform4d(int location, double x, double y, double z, double w, long function_pointer); + + public static void glUniform1(int location, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform1dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniform1dv(location, value.remaining(), MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniform1dv(int location, int value_count, long value, long function_pointer); + + public static void glUniform2(int location, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform2dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniform2dv(location, value.remaining() >> 1, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniform2dv(int location, int value_count, long value, long function_pointer); + + public static void glUniform3(int location, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform3dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniform3dv(location, value.remaining() / 3, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniform3dv(int location, int value_count, long value, long function_pointer); + + public static void glUniform4(int location, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform4dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniform4dv(location, value.remaining() >> 2, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniform4dv(int location, int value_count, long value, long function_pointer); + + public static void glUniformMatrix2(int location, boolean transpose, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformMatrix2dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniformMatrix2dv(location, value.remaining() >> 2, transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniformMatrix2dv(int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glUniformMatrix3(int location, boolean transpose, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformMatrix3dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniformMatrix3dv(location, value.remaining() / (3 * 3), transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniformMatrix3dv(int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glUniformMatrix4(int location, boolean transpose, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformMatrix4dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniformMatrix4dv(location, value.remaining() >> 4, transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniformMatrix4dv(int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glUniformMatrix2x3(int location, boolean transpose, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformMatrix2x3dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniformMatrix2x3dv(location, value.remaining() / (2 * 3), transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniformMatrix2x3dv(int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glUniformMatrix2x4(int location, boolean transpose, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformMatrix2x4dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniformMatrix2x4dv(location, value.remaining() >> 3, transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniformMatrix2x4dv(int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glUniformMatrix3x2(int location, boolean transpose, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformMatrix3x2dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniformMatrix3x2dv(location, value.remaining() / (3 * 2), transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniformMatrix3x2dv(int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glUniformMatrix3x4(int location, boolean transpose, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformMatrix3x4dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniformMatrix3x4dv(location, value.remaining() / (3 * 4), transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniformMatrix3x4dv(int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glUniformMatrix4x2(int location, boolean transpose, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformMatrix4x2dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniformMatrix4x2dv(location, value.remaining() >> 3, transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniformMatrix4x2dv(int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glUniformMatrix4x3(int location, boolean transpose, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformMatrix4x3dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniformMatrix4x3dv(location, value.remaining() / (4 * 3), transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniformMatrix4x3dv(int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glGetUniform(int program, int location, DoubleBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetUniformdv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglGetUniformdv(program, location, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetUniformdv(int program, int location, long params, long function_pointer); + + public static void glMinSampleShading(float value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMinSampleShading; + BufferChecks.checkFunctionAddress(function_pointer); + nglMinSampleShading(value, function_pointer); + } + static native void nglMinSampleShading(float value, long function_pointer); + + public static int glGetSubroutineUniformLocation(int program, int shadertype, ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSubroutineUniformLocation; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(name); + BufferChecks.checkNullTerminated(name); + int __result = nglGetSubroutineUniformLocation(program, shadertype, MemoryUtil.getAddress(name), function_pointer); + return __result; + } + static native int nglGetSubroutineUniformLocation(int program, int shadertype, long name, long function_pointer); + + /** Overloads glGetSubroutineUniformLocation. */ + public static int glGetSubroutineUniformLocation(int program, int shadertype, CharSequence name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSubroutineUniformLocation; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglGetSubroutineUniformLocation(program, shadertype, APIUtil.getBufferNT(caps, name), function_pointer); + return __result; + } + + public static int glGetSubroutineIndex(int program, int shadertype, ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSubroutineIndex; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(name); + BufferChecks.checkNullTerminated(name); + int __result = nglGetSubroutineIndex(program, shadertype, MemoryUtil.getAddress(name), function_pointer); + return __result; + } + static native int nglGetSubroutineIndex(int program, int shadertype, long name, long function_pointer); + + /** Overloads glGetSubroutineIndex. */ + public static int glGetSubroutineIndex(int program, int shadertype, CharSequence name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetSubroutineIndex; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglGetSubroutineIndex(program, shadertype, APIUtil.getBufferNT(caps, name), function_pointer); + return __result; + } + + public static void glGetActiveSubroutineUniform(int program, int shadertype, int index, int pname, IntBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveSubroutineUniformiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(values, 1); + nglGetActiveSubroutineUniformiv(program, shadertype, index, pname, MemoryUtil.getAddress(values), function_pointer); + } + static native void nglGetActiveSubroutineUniformiv(int program, int shadertype, int index, int pname, long values, long function_pointer); + + /** + * Overloads glGetActiveSubroutineUniformiv. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetActiveSubroutineUniformi} instead. + */ + @Deprecated + public static int glGetActiveSubroutineUniform(int program, int shadertype, int index, int pname) { + return GL40.glGetActiveSubroutineUniformi(program, shadertype, index, pname); + } + + /** Overloads glGetActiveSubroutineUniformiv. */ + public static int glGetActiveSubroutineUniformi(int program, int shadertype, int index, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveSubroutineUniformiv; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer values = APIUtil.getBufferInt(caps); + nglGetActiveSubroutineUniformiv(program, shadertype, index, pname, MemoryUtil.getAddress(values), function_pointer); + return values.get(0); + } + + public static void glGetActiveSubroutineUniformName(int program, int shadertype, int index, IntBuffer length, ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveSubroutineUniformName; + BufferChecks.checkFunctionAddress(function_pointer); + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkDirect(name); + nglGetActiveSubroutineUniformName(program, shadertype, index, name.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(name), function_pointer); + } + static native void nglGetActiveSubroutineUniformName(int program, int shadertype, int index, int name_bufsize, long length, long name, long function_pointer); + + /** Overloads glGetActiveSubroutineUniformName. */ + public static String glGetActiveSubroutineUniformName(int program, int shadertype, int index, int bufsize) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveSubroutineUniformName; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer name_length = APIUtil.getLengths(caps); + ByteBuffer name = APIUtil.getBufferByte(caps, bufsize); + nglGetActiveSubroutineUniformName(program, shadertype, index, bufsize, MemoryUtil.getAddress0(name_length), MemoryUtil.getAddress(name), function_pointer); + name.limit(name_length.get(0)); + return APIUtil.getString(caps, name); + } + + public static void glGetActiveSubroutineName(int program, int shadertype, int index, IntBuffer length, ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveSubroutineName; + BufferChecks.checkFunctionAddress(function_pointer); + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkDirect(name); + nglGetActiveSubroutineName(program, shadertype, index, name.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(name), function_pointer); + } + static native void nglGetActiveSubroutineName(int program, int shadertype, int index, int name_bufsize, long length, long name, long function_pointer); + + /** Overloads glGetActiveSubroutineName. */ + public static String glGetActiveSubroutineName(int program, int shadertype, int index, int bufsize) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveSubroutineName; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer name_length = APIUtil.getLengths(caps); + ByteBuffer name = APIUtil.getBufferByte(caps, bufsize); + nglGetActiveSubroutineName(program, shadertype, index, bufsize, MemoryUtil.getAddress0(name_length), MemoryUtil.getAddress(name), function_pointer); + name.limit(name_length.get(0)); + return APIUtil.getString(caps, name); + } + + public static void glUniformSubroutinesu(int shadertype, IntBuffer indices) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformSubroutinesuiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(indices); + nglUniformSubroutinesuiv(shadertype, indices.remaining(), MemoryUtil.getAddress(indices), function_pointer); + } + static native void nglUniformSubroutinesuiv(int shadertype, int indices_count, long indices, long function_pointer); + + public static void glGetUniformSubroutineu(int shadertype, int location, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetUniformSubroutineuiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetUniformSubroutineuiv(shadertype, location, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetUniformSubroutineuiv(int shadertype, int location, long params, long function_pointer); + + /** + * Overloads glGetUniformSubroutineuiv. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetUniformSubroutineui} instead. + */ + @Deprecated + public static int glGetUniformSubroutineu(int shadertype, int location) { + return GL40.glGetUniformSubroutineui(shadertype, location); + } + + /** Overloads glGetUniformSubroutineuiv. */ + public static int glGetUniformSubroutineui(int shadertype, int location) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetUniformSubroutineuiv; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetUniformSubroutineuiv(shadertype, location, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetProgramStage(int program, int shadertype, int pname, IntBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramStageiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(values, 1); + nglGetProgramStageiv(program, shadertype, pname, MemoryUtil.getAddress(values), function_pointer); + } + static native void nglGetProgramStageiv(int program, int shadertype, int pname, long values, long function_pointer); + + /** + * Overloads glGetProgramStageiv. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetProgramStagei} instead. + */ + @Deprecated + public static int glGetProgramStage(int program, int shadertype, int pname) { + return GL40.glGetProgramStagei(program, shadertype, pname); + } + + /** Overloads glGetProgramStageiv. */ + public static int glGetProgramStagei(int program, int shadertype, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramStageiv; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer values = APIUtil.getBufferInt(caps); + nglGetProgramStageiv(program, shadertype, pname, MemoryUtil.getAddress(values), function_pointer); + return values.get(0); + } + + public static void glPatchParameteri(int pname, int value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPatchParameteri; + BufferChecks.checkFunctionAddress(function_pointer); + nglPatchParameteri(pname, value, function_pointer); + } + static native void nglPatchParameteri(int pname, int value, long function_pointer); + + public static void glPatchParameter(int pname, FloatBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPatchParameterfv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(values, 4); + nglPatchParameterfv(pname, MemoryUtil.getAddress(values), function_pointer); + } + static native void nglPatchParameterfv(int pname, long values, long function_pointer); + + public static void glBindTransformFeedback(int target, int id) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindTransformFeedback; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindTransformFeedback(target, id, function_pointer); + } + static native void nglBindTransformFeedback(int target, int id, long function_pointer); + + public static void glDeleteTransformFeedbacks(IntBuffer ids) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteTransformFeedbacks; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(ids); + nglDeleteTransformFeedbacks(ids.remaining(), MemoryUtil.getAddress(ids), function_pointer); + } + static native void nglDeleteTransformFeedbacks(int ids_n, long ids, long function_pointer); + + /** Overloads glDeleteTransformFeedbacks. */ + public static void glDeleteTransformFeedbacks(int id) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteTransformFeedbacks; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeleteTransformFeedbacks(1, APIUtil.getInt(caps, id), function_pointer); + } + + public static void glGenTransformFeedbacks(IntBuffer ids) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenTransformFeedbacks; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(ids); + nglGenTransformFeedbacks(ids.remaining(), MemoryUtil.getAddress(ids), function_pointer); + } + static native void nglGenTransformFeedbacks(int ids_n, long ids, long function_pointer); + + /** Overloads glGenTransformFeedbacks. */ + public static int glGenTransformFeedbacks() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenTransformFeedbacks; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer ids = APIUtil.getBufferInt(caps); + nglGenTransformFeedbacks(1, MemoryUtil.getAddress(ids), function_pointer); + return ids.get(0); + } + + public static boolean glIsTransformFeedback(int id) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsTransformFeedback; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsTransformFeedback(id, function_pointer); + return __result; + } + static native boolean nglIsTransformFeedback(int id, long function_pointer); + + public static void glPauseTransformFeedback() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPauseTransformFeedback; + BufferChecks.checkFunctionAddress(function_pointer); + nglPauseTransformFeedback(function_pointer); + } + static native void nglPauseTransformFeedback(long function_pointer); + + public static void glResumeTransformFeedback() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glResumeTransformFeedback; + BufferChecks.checkFunctionAddress(function_pointer); + nglResumeTransformFeedback(function_pointer); + } + static native void nglResumeTransformFeedback(long function_pointer); + + public static void glDrawTransformFeedback(int mode, int id) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawTransformFeedback; + BufferChecks.checkFunctionAddress(function_pointer); + nglDrawTransformFeedback(mode, id, function_pointer); + } + static native void nglDrawTransformFeedback(int mode, int id, long function_pointer); + + public static void glDrawTransformFeedbackStream(int mode, int id, int stream) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawTransformFeedbackStream; + BufferChecks.checkFunctionAddress(function_pointer); + nglDrawTransformFeedbackStream(mode, id, stream, function_pointer); + } + static native void nglDrawTransformFeedbackStream(int mode, int id, int stream, long function_pointer); + + public static void glBeginQueryIndexed(int target, int index, int id) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBeginQueryIndexed; + BufferChecks.checkFunctionAddress(function_pointer); + nglBeginQueryIndexed(target, index, id, function_pointer); + } + static native void nglBeginQueryIndexed(int target, int index, int id, long function_pointer); + + public static void glEndQueryIndexed(int target, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEndQueryIndexed; + BufferChecks.checkFunctionAddress(function_pointer); + nglEndQueryIndexed(target, index, function_pointer); + } + static native void nglEndQueryIndexed(int target, int index, long function_pointer); + + public static void glGetQueryIndexed(int target, int index, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetQueryIndexediv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetQueryIndexediv(target, index, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetQueryIndexediv(int target, int index, int pname, long params, long function_pointer); + + /** + * Overloads glGetQueryIndexediv. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetQueryIndexedi} instead. + */ + @Deprecated + public static int glGetQueryIndexed(int target, int index, int pname) { + return GL40.glGetQueryIndexedi(target, index, pname); + } + + /** Overloads glGetQueryIndexediv. */ + public static int glGetQueryIndexedi(int target, int index, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetQueryIndexediv; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetQueryIndexediv(target, index, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL41.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL41.java new file mode 100644 index 0000000..1a1ffd8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL41.java @@ -0,0 +1,1033 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class GL41 { + + /** + * Accepted by the <value> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + public static final int GL_SHADER_COMPILER = 0x8DFA, + GL_NUM_SHADER_BINARY_FORMATS = 0x8DF9, + GL_MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB, + GL_MAX_VARYING_VECTORS = 0x8DFC, + GL_MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD, + GL_IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A, + GL_IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B; + + /** + * Accepted by the <type> parameter of VertexAttribPointer: + */ + public static final int GL_FIXED = 0x140C; + + /** + * Accepted by the <precisiontype> parameter of + * GetShaderPrecisionFormat: + */ + public static final int GL_LOW_FLOAT = 0x8DF0, + GL_MEDIUM_FLOAT = 0x8DF1, + GL_HIGH_FLOAT = 0x8DF2, + GL_LOW_INT = 0x8DF3, + GL_MEDIUM_INT = 0x8DF4, + GL_HIGH_INT = 0x8DF5; + + /** + * Accepted by the <format> parameter of most commands taking sized internal formats: + */ + public static final int GL_RGB565 = 0x8D62; + + /** + * Accepted by the <pname> parameter of ProgramParameteri and + * GetProgramiv: + */ + public static final int GL_PROGRAM_BINARY_RETRIEVABLE_HINT = 0x8257; + + /** + * Accepted by the <pname> parameter of GetProgramiv: + */ + public static final int GL_PROGRAM_BINARY_LENGTH = 0x8741; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv and GetDoublev: + */ + public static final int GL_NUM_PROGRAM_BINARY_FORMATS = 0x87FE, + GL_PROGRAM_BINARY_FORMATS = 0x87FF; + + /** + * Accepted by <stages> parameter to UseProgramStages: + */ + public static final int GL_VERTEX_SHADER_BIT = 0x1, + GL_FRAGMENT_SHADER_BIT = 0x2, + GL_GEOMETRY_SHADER_BIT = 0x4, + GL_TESS_CONTROL_SHADER_BIT = 0x8, + GL_TESS_EVALUATION_SHADER_BIT = 0x10, + GL_ALL_SHADER_BITS = 0xFFFFFFFF; + + /** + * Accepted by the <pname> parameter of ProgramParameteri and + * GetProgramiv: + */ + public static final int GL_PROGRAM_SEPARABLE = 0x8258; + + /** + * Accepted by <type> parameter to GetProgramPipelineiv: + */ + public static final int GL_ACTIVE_PROGRAM = 0x8259; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + public static final int GL_PROGRAM_PIPELINE_BINDING = 0x825A; + + /** + * Returned in the <type> parameter of GetActiveAttrib: + */ + public static final int GL_DOUBLE_VEC2 = 0x8FFC, + GL_DOUBLE_VEC3 = 0x8FFD, + GL_DOUBLE_VEC4 = 0x8FFE, + GL_DOUBLE_MAT2 = 0x8F46, + GL_DOUBLE_MAT3 = 0x8F47, + GL_DOUBLE_MAT4 = 0x8F48, + GL_DOUBLE_MAT2x3 = 0x8F49, + GL_DOUBLE_MAT2x4 = 0x8F4A, + GL_DOUBLE_MAT3x2 = 0x8F4B, + GL_DOUBLE_MAT3x4 = 0x8F4C, + GL_DOUBLE_MAT4x2 = 0x8F4D, + GL_DOUBLE_MAT4x3 = 0x8F4E; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * GetDoublev and GetInteger64v: + */ + public static final int GL_MAX_VIEWPORTS = 0x825B, + GL_VIEWPORT_SUBPIXEL_BITS = 0x825C, + GL_VIEWPORT_BOUNDS_RANGE = 0x825D, + GL_LAYER_PROVOKING_VERTEX = 0x825E, + GL_VIEWPORT_INDEX_PROVOKING_VERTEX = 0x825F; + + /** + * Accepted by the <pname> parameter of GetIntegeri_v: + */ + public static final int GL_SCISSOR_BOX = 0xC10; + + /** + * Accepted by the <pname> parameter of GetFloati_v: + */ + public static final int GL_VIEWPORT = 0xBA2; + + /** + * Accepted by the <pname> parameter of GetDoublei_v: + */ + public static final int GL_DEPTH_RANGE = 0xB70; + + /** + * Accepted by the <pname> parameter of Enablei, Disablei, and IsEnabledi: + */ + public static final int GL_SCISSOR_TEST = 0xC11; + + /** + * Returned in the <data> parameter from a Get query with a <pname> of + * LAYER_PROVOKING_VERTEX or VIEWPORT_INDEX_PROVOKING_VERTEX: + */ + public static final int GL_FIRST_VERTEX_CONVENTION = 0x8E4D, + GL_LAST_VERTEX_CONVENTION = 0x8E4E, + GL_PROVOKING_VERTEX = 0x8E4F, + GL_UNDEFINED_VERTEX = 0x8260; + + private GL41() {} + + public static void glReleaseShaderCompiler() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glReleaseShaderCompiler; + BufferChecks.checkFunctionAddress(function_pointer); + nglReleaseShaderCompiler(function_pointer); + } + static native void nglReleaseShaderCompiler(long function_pointer); + + public static void glShaderBinary(IntBuffer shaders, int binaryformat, ByteBuffer binary) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glShaderBinary; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(shaders); + BufferChecks.checkDirect(binary); + nglShaderBinary(shaders.remaining(), MemoryUtil.getAddress(shaders), binaryformat, MemoryUtil.getAddress(binary), binary.remaining(), function_pointer); + } + static native void nglShaderBinary(int shaders_count, long shaders, int binaryformat, long binary, int binary_length, long function_pointer); + + public static void glGetShaderPrecisionFormat(int shadertype, int precisiontype, IntBuffer range, IntBuffer precision) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetShaderPrecisionFormat; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(range, 2); + BufferChecks.checkBuffer(precision, 1); + nglGetShaderPrecisionFormat(shadertype, precisiontype, MemoryUtil.getAddress(range), MemoryUtil.getAddress(precision), function_pointer); + } + static native void nglGetShaderPrecisionFormat(int shadertype, int precisiontype, long range, long precision, long function_pointer); + + public static void glDepthRangef(float n, float f) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDepthRangef; + BufferChecks.checkFunctionAddress(function_pointer); + nglDepthRangef(n, f, function_pointer); + } + static native void nglDepthRangef(float n, float f, long function_pointer); + + public static void glClearDepthf(float d) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClearDepthf; + BufferChecks.checkFunctionAddress(function_pointer); + nglClearDepthf(d, function_pointer); + } + static native void nglClearDepthf(float d, long function_pointer); + + public static void glGetProgramBinary(int program, IntBuffer length, IntBuffer binaryFormat, ByteBuffer binary) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramBinary; + BufferChecks.checkFunctionAddress(function_pointer); + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkBuffer(binaryFormat, 1); + BufferChecks.checkDirect(binary); + nglGetProgramBinary(program, binary.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(binaryFormat), MemoryUtil.getAddress(binary), function_pointer); + } + static native void nglGetProgramBinary(int program, int binary_bufSize, long length, long binaryFormat, long binary, long function_pointer); + + public static void glProgramBinary(int program, int binaryFormat, ByteBuffer binary) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramBinary; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(binary); + nglProgramBinary(program, binaryFormat, MemoryUtil.getAddress(binary), binary.remaining(), function_pointer); + } + static native void nglProgramBinary(int program, int binaryFormat, long binary, int binary_length, long function_pointer); + + public static void glProgramParameteri(int program, int pname, int value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramParameteri; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramParameteri(program, pname, value, function_pointer); + } + static native void nglProgramParameteri(int program, int pname, int value, long function_pointer); + + public static void glUseProgramStages(int pipeline, int stages, int program) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUseProgramStages; + BufferChecks.checkFunctionAddress(function_pointer); + nglUseProgramStages(pipeline, stages, program, function_pointer); + } + static native void nglUseProgramStages(int pipeline, int stages, int program, long function_pointer); + + public static void glActiveShaderProgram(int pipeline, int program) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glActiveShaderProgram; + BufferChecks.checkFunctionAddress(function_pointer); + nglActiveShaderProgram(pipeline, program, function_pointer); + } + static native void nglActiveShaderProgram(int pipeline, int program, long function_pointer); + + /** + * Single null-terminated source code string. + */ + public static int glCreateShaderProgram(int type, ByteBuffer string) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCreateShaderProgramv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(string); + BufferChecks.checkNullTerminated(string); + int __result = nglCreateShaderProgramv(type, 1, MemoryUtil.getAddress(string), function_pointer); + return __result; + } + static native int nglCreateShaderProgramv(int type, int count, long string, long function_pointer); + + /** + * Overloads glCreateShaderProgramv. + *

+ * Multiple null-terminated source code strings, one after the other. + */ + public static int glCreateShaderProgram(int type, int count, ByteBuffer strings) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCreateShaderProgramv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(strings); + BufferChecks.checkNullTerminated(strings, count); + int __result = nglCreateShaderProgramv2(type, count, MemoryUtil.getAddress(strings), function_pointer); + return __result; + } + static native int nglCreateShaderProgramv2(int type, int count, long strings, long function_pointer); + + /** Overloads glCreateShaderProgramv. */ + public static int glCreateShaderProgram(int type, ByteBuffer[] strings) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCreateShaderProgramv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkArray(strings, 1); + int __result = nglCreateShaderProgramv3(type, strings.length, strings, function_pointer); + return __result; + } + static native int nglCreateShaderProgramv3(int type, int count, ByteBuffer[] strings, long function_pointer); + + /** Overloads glCreateShaderProgramv. */ + public static int glCreateShaderProgram(int type, CharSequence string) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCreateShaderProgramv; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglCreateShaderProgramv(type, 1, APIUtil.getBufferNT(caps, string), function_pointer); + return __result; + } + + /** Overloads glCreateShaderProgramv. */ + public static int glCreateShaderProgram(int type, CharSequence[] strings) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCreateShaderProgramv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkArray(strings); + int __result = nglCreateShaderProgramv2(type, strings.length, APIUtil.getBufferNT(caps, strings), function_pointer); + return __result; + } + + public static void glBindProgramPipeline(int pipeline) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindProgramPipeline; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindProgramPipeline(pipeline, function_pointer); + } + static native void nglBindProgramPipeline(int pipeline, long function_pointer); + + public static void glDeleteProgramPipelines(IntBuffer pipelines) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteProgramPipelines; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pipelines); + nglDeleteProgramPipelines(pipelines.remaining(), MemoryUtil.getAddress(pipelines), function_pointer); + } + static native void nglDeleteProgramPipelines(int pipelines_n, long pipelines, long function_pointer); + + /** Overloads glDeleteProgramPipelines. */ + public static void glDeleteProgramPipelines(int pipeline) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteProgramPipelines; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeleteProgramPipelines(1, APIUtil.getInt(caps, pipeline), function_pointer); + } + + public static void glGenProgramPipelines(IntBuffer pipelines) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenProgramPipelines; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pipelines); + nglGenProgramPipelines(pipelines.remaining(), MemoryUtil.getAddress(pipelines), function_pointer); + } + static native void nglGenProgramPipelines(int pipelines_n, long pipelines, long function_pointer); + + /** Overloads glGenProgramPipelines. */ + public static int glGenProgramPipelines() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenProgramPipelines; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer pipelines = APIUtil.getBufferInt(caps); + nglGenProgramPipelines(1, MemoryUtil.getAddress(pipelines), function_pointer); + return pipelines.get(0); + } + + public static boolean glIsProgramPipeline(int pipeline) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsProgramPipeline; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsProgramPipeline(pipeline, function_pointer); + return __result; + } + static native boolean nglIsProgramPipeline(int pipeline, long function_pointer); + + public static void glGetProgramPipeline(int pipeline, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramPipelineiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetProgramPipelineiv(pipeline, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetProgramPipelineiv(int pipeline, int pname, long params, long function_pointer); + + /** Overloads glGetProgramPipelineiv. */ + public static int glGetProgramPipelinei(int pipeline, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramPipelineiv; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetProgramPipelineiv(pipeline, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glProgramUniform1i(int program, int location, int v0) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform1i; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform1i(program, location, v0, function_pointer); + } + static native void nglProgramUniform1i(int program, int location, int v0, long function_pointer); + + public static void glProgramUniform2i(int program, int location, int v0, int v1) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform2i; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform2i(program, location, v0, v1, function_pointer); + } + static native void nglProgramUniform2i(int program, int location, int v0, int v1, long function_pointer); + + public static void glProgramUniform3i(int program, int location, int v0, int v1, int v2) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform3i; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform3i(program, location, v0, v1, v2, function_pointer); + } + static native void nglProgramUniform3i(int program, int location, int v0, int v1, int v2, long function_pointer); + + public static void glProgramUniform4i(int program, int location, int v0, int v1, int v2, int v3) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform4i; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform4i(program, location, v0, v1, v2, v3, function_pointer); + } + static native void nglProgramUniform4i(int program, int location, int v0, int v1, int v2, int v3, long function_pointer); + + public static void glProgramUniform1f(int program, int location, float v0) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform1f; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform1f(program, location, v0, function_pointer); + } + static native void nglProgramUniform1f(int program, int location, float v0, long function_pointer); + + public static void glProgramUniform2f(int program, int location, float v0, float v1) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform2f; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform2f(program, location, v0, v1, function_pointer); + } + static native void nglProgramUniform2f(int program, int location, float v0, float v1, long function_pointer); + + public static void glProgramUniform3f(int program, int location, float v0, float v1, float v2) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform3f; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform3f(program, location, v0, v1, v2, function_pointer); + } + static native void nglProgramUniform3f(int program, int location, float v0, float v1, float v2, long function_pointer); + + public static void glProgramUniform4f(int program, int location, float v0, float v1, float v2, float v3) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform4f; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform4f(program, location, v0, v1, v2, v3, function_pointer); + } + static native void nglProgramUniform4f(int program, int location, float v0, float v1, float v2, float v3, long function_pointer); + + public static void glProgramUniform1d(int program, int location, double v0) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform1d; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform1d(program, location, v0, function_pointer); + } + static native void nglProgramUniform1d(int program, int location, double v0, long function_pointer); + + public static void glProgramUniform2d(int program, int location, double v0, double v1) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform2d; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform2d(program, location, v0, v1, function_pointer); + } + static native void nglProgramUniform2d(int program, int location, double v0, double v1, long function_pointer); + + public static void glProgramUniform3d(int program, int location, double v0, double v1, double v2) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform3d; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform3d(program, location, v0, v1, v2, function_pointer); + } + static native void nglProgramUniform3d(int program, int location, double v0, double v1, double v2, long function_pointer); + + public static void glProgramUniform4d(int program, int location, double v0, double v1, double v2, double v3) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform4d; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform4d(program, location, v0, v1, v2, v3, function_pointer); + } + static native void nglProgramUniform4d(int program, int location, double v0, double v1, double v2, double v3, long function_pointer); + + public static void glProgramUniform1(int program, int location, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform1iv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform1iv(program, location, value.remaining(), MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform1iv(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform2(int program, int location, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform2iv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform2iv(program, location, value.remaining() >> 1, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform2iv(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform3(int program, int location, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform3iv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform3iv(program, location, value.remaining() / 3, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform3iv(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform4(int program, int location, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform4iv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform4iv(program, location, value.remaining() >> 2, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform4iv(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform1(int program, int location, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform1fv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform1fv(program, location, value.remaining(), MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform1fv(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform2(int program, int location, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform2fv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform2fv(program, location, value.remaining() >> 1, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform2fv(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform3(int program, int location, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform3fv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform3fv(program, location, value.remaining() / 3, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform3fv(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform4(int program, int location, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform4fv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform4fv(program, location, value.remaining() >> 2, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform4fv(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform1(int program, int location, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform1dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform1dv(program, location, value.remaining(), MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform1dv(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform2(int program, int location, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform2dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform2dv(program, location, value.remaining() >> 1, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform2dv(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform3(int program, int location, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform3dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform3dv(program, location, value.remaining() / 3, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform3dv(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform4(int program, int location, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform4dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform4dv(program, location, value.remaining() >> 2, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform4dv(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform1ui(int program, int location, int v0) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform1ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform1ui(program, location, v0, function_pointer); + } + static native void nglProgramUniform1ui(int program, int location, int v0, long function_pointer); + + public static void glProgramUniform2ui(int program, int location, int v0, int v1) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform2ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform2ui(program, location, v0, v1, function_pointer); + } + static native void nglProgramUniform2ui(int program, int location, int v0, int v1, long function_pointer); + + public static void glProgramUniform3ui(int program, int location, int v0, int v1, int v2) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform3ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform3ui(program, location, v0, v1, v2, function_pointer); + } + static native void nglProgramUniform3ui(int program, int location, int v0, int v1, int v2, long function_pointer); + + public static void glProgramUniform4ui(int program, int location, int v0, int v1, int v2, int v3) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform4ui; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform4ui(program, location, v0, v1, v2, v3, function_pointer); + } + static native void nglProgramUniform4ui(int program, int location, int v0, int v1, int v2, int v3, long function_pointer); + + public static void glProgramUniform1u(int program, int location, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform1uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform1uiv(program, location, value.remaining(), MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform1uiv(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform2u(int program, int location, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform2uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform2uiv(program, location, value.remaining() >> 1, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform2uiv(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform3u(int program, int location, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform3uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform3uiv(program, location, value.remaining() / 3, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform3uiv(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform4u(int program, int location, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform4uiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform4uiv(program, location, value.remaining() >> 2, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform4uiv(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniformMatrix2(int program, int location, boolean transpose, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix2fv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix2fv(program, location, value.remaining() >> 2, transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix2fv(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix3(int program, int location, boolean transpose, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix3fv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix3fv(program, location, value.remaining() / (3 * 3), transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix3fv(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix4(int program, int location, boolean transpose, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix4fv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix4fv(program, location, value.remaining() >> 4, transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix4fv(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix2(int program, int location, boolean transpose, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix2dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix2dv(program, location, value.remaining() >> 2, transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix2dv(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix3(int program, int location, boolean transpose, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix3dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix3dv(program, location, value.remaining() / (3 * 3), transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix3dv(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix4(int program, int location, boolean transpose, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix4dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix4dv(program, location, value.remaining() >> 4, transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix4dv(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix2x3(int program, int location, boolean transpose, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix2x3fv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix2x3fv(program, location, value.remaining() / (2 * 3), transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix2x3fv(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix3x2(int program, int location, boolean transpose, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix3x2fv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix3x2fv(program, location, value.remaining() / (3 * 2), transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix3x2fv(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix2x4(int program, int location, boolean transpose, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix2x4fv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix2x4fv(program, location, value.remaining() >> 3, transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix2x4fv(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix4x2(int program, int location, boolean transpose, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix4x2fv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix4x2fv(program, location, value.remaining() >> 3, transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix4x2fv(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix3x4(int program, int location, boolean transpose, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix3x4fv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix3x4fv(program, location, value.remaining() / (3 * 4), transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix3x4fv(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix4x3(int program, int location, boolean transpose, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix4x3fv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix4x3fv(program, location, value.remaining() / (4 * 3), transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix4x3fv(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix2x3(int program, int location, boolean transpose, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix2x3dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix2x3dv(program, location, value.remaining() / (2 * 3), transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix2x3dv(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix3x2(int program, int location, boolean transpose, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix3x2dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix3x2dv(program, location, value.remaining() / (3 * 2), transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix3x2dv(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix2x4(int program, int location, boolean transpose, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix2x4dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix2x4dv(program, location, value.remaining() >> 3, transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix2x4dv(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix4x2(int program, int location, boolean transpose, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix4x2dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix4x2dv(program, location, value.remaining() >> 3, transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix4x2dv(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix3x4(int program, int location, boolean transpose, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix3x4dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix3x4dv(program, location, value.remaining() / (3 * 4), transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix3x4dv(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glProgramUniformMatrix4x3(int program, int location, boolean transpose, DoubleBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformMatrix4x3dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformMatrix4x3dv(program, location, value.remaining() / (4 * 3), transpose, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformMatrix4x3dv(int program, int location, int value_count, boolean transpose, long value, long function_pointer); + + public static void glValidateProgramPipeline(int pipeline) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glValidateProgramPipeline; + BufferChecks.checkFunctionAddress(function_pointer); + nglValidateProgramPipeline(pipeline, function_pointer); + } + static native void nglValidateProgramPipeline(int pipeline, long function_pointer); + + public static void glGetProgramPipelineInfoLog(int pipeline, IntBuffer length, ByteBuffer infoLog) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramPipelineInfoLog; + BufferChecks.checkFunctionAddress(function_pointer); + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkDirect(infoLog); + nglGetProgramPipelineInfoLog(pipeline, infoLog.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(infoLog), function_pointer); + } + static native void nglGetProgramPipelineInfoLog(int pipeline, int infoLog_bufSize, long length, long infoLog, long function_pointer); + + /** Overloads glGetProgramPipelineInfoLog. */ + public static String glGetProgramPipelineInfoLog(int pipeline, int bufSize) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramPipelineInfoLog; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer infoLog_length = APIUtil.getLengths(caps); + ByteBuffer infoLog = APIUtil.getBufferByte(caps, bufSize); + nglGetProgramPipelineInfoLog(pipeline, bufSize, MemoryUtil.getAddress0(infoLog_length), MemoryUtil.getAddress(infoLog), function_pointer); + infoLog.limit(infoLog_length.get(0)); + return APIUtil.getString(caps, infoLog); + } + + public static void glVertexAttribL1d(int index, double x) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL1d; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribL1d(index, x, function_pointer); + } + static native void nglVertexAttribL1d(int index, double x, long function_pointer); + + public static void glVertexAttribL2d(int index, double x, double y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL2d; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribL2d(index, x, y, function_pointer); + } + static native void nglVertexAttribL2d(int index, double x, double y, long function_pointer); + + public static void glVertexAttribL3d(int index, double x, double y, double z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL3d; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribL3d(index, x, y, z, function_pointer); + } + static native void nglVertexAttribL3d(int index, double x, double y, double z, long function_pointer); + + public static void glVertexAttribL4d(int index, double x, double y, double z, double w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL4d; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribL4d(index, x, y, z, w, function_pointer); + } + static native void nglVertexAttribL4d(int index, double x, double y, double z, double w, long function_pointer); + + public static void glVertexAttribL1(int index, DoubleBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL1dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 1); + nglVertexAttribL1dv(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribL1dv(int index, long v, long function_pointer); + + public static void glVertexAttribL2(int index, DoubleBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL2dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 2); + nglVertexAttribL2dv(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribL2dv(int index, long v, long function_pointer); + + public static void glVertexAttribL3(int index, DoubleBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL3dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 3); + nglVertexAttribL3dv(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribL3dv(int index, long v, long function_pointer); + + public static void glVertexAttribL4(int index, DoubleBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL4dv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 4); + nglVertexAttribL4dv(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribL4dv(int index, long v, long function_pointer); + + public static void glVertexAttribLPointer(int index, int size, int stride, DoubleBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribLPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(pointer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glVertexAttribPointer_buffer[index] = pointer; + nglVertexAttribLPointer(index, size, GL11.GL_DOUBLE, stride, MemoryUtil.getAddress(pointer), function_pointer); + } + static native void nglVertexAttribLPointer(int index, int size, int type, int stride, long pointer, long function_pointer); + public static void glVertexAttribLPointer(int index, int size, int stride, long pointer_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribLPointer; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOenabled(caps); + nglVertexAttribLPointerBO(index, size, GL11.GL_DOUBLE, stride, pointer_buffer_offset, function_pointer); + } + static native void nglVertexAttribLPointerBO(int index, int size, int type, int stride, long pointer_buffer_offset, long function_pointer); + + public static void glGetVertexAttribL(int index, int pname, DoubleBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexAttribLdv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetVertexAttribLdv(index, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVertexAttribLdv(int index, int pname, long params, long function_pointer); + + public static void glViewportArray(int first, FloatBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glViewportArrayv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(v); + nglViewportArrayv(first, v.remaining() >> 2, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglViewportArrayv(int first, int v_count, long v, long function_pointer); + + public static void glViewportIndexedf(int index, float x, float y, float w, float h) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glViewportIndexedf; + BufferChecks.checkFunctionAddress(function_pointer); + nglViewportIndexedf(index, x, y, w, h, function_pointer); + } + static native void nglViewportIndexedf(int index, float x, float y, float w, float h, long function_pointer); + + public static void glViewportIndexed(int index, FloatBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glViewportIndexedfv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 4); + nglViewportIndexedfv(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglViewportIndexedfv(int index, long v, long function_pointer); + + public static void glScissorArray(int first, IntBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glScissorArrayv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(v); + nglScissorArrayv(first, v.remaining() >> 2, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglScissorArrayv(int first, int v_count, long v, long function_pointer); + + public static void glScissorIndexed(int index, int left, int bottom, int width, int height) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glScissorIndexed; + BufferChecks.checkFunctionAddress(function_pointer); + nglScissorIndexed(index, left, bottom, width, height, function_pointer); + } + static native void nglScissorIndexed(int index, int left, int bottom, int width, int height, long function_pointer); + + public static void glScissorIndexed(int index, IntBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glScissorIndexedv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 4); + nglScissorIndexedv(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglScissorIndexedv(int index, long v, long function_pointer); + + public static void glDepthRangeArray(int first, DoubleBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDepthRangeArrayv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(v); + nglDepthRangeArrayv(first, v.remaining() >> 1, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglDepthRangeArrayv(int first, int v_count, long v, long function_pointer); + + public static void glDepthRangeIndexed(int index, double n, double f) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDepthRangeIndexed; + BufferChecks.checkFunctionAddress(function_pointer); + nglDepthRangeIndexed(index, n, f, function_pointer); + } + static native void nglDepthRangeIndexed(int index, double n, double f, long function_pointer); + + public static void glGetFloat(int target, int index, FloatBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetFloati_v; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglGetFloati_v(target, index, MemoryUtil.getAddress(data), function_pointer); + } + static native void nglGetFloati_v(int target, int index, long data, long function_pointer); + + /** Overloads glGetFloati_v. */ + public static float glGetFloat(int target, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetFloati_v; + BufferChecks.checkFunctionAddress(function_pointer); + FloatBuffer data = APIUtil.getBufferFloat(caps); + nglGetFloati_v(target, index, MemoryUtil.getAddress(data), function_pointer); + return data.get(0); + } + + public static void glGetDouble(int target, int index, DoubleBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetDoublei_v; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglGetDoublei_v(target, index, MemoryUtil.getAddress(data), function_pointer); + } + static native void nglGetDoublei_v(int target, int index, long data, long function_pointer); + + /** Overloads glGetDoublei_v. */ + public static double glGetDouble(int target, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetDoublei_v; + BufferChecks.checkFunctionAddress(function_pointer); + DoubleBuffer data = APIUtil.getBufferDouble(caps); + nglGetDoublei_v(target, index, MemoryUtil.getAddress(data), function_pointer); + return data.get(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL42.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL42.java new file mode 100644 index 0000000..6d5c92e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL42.java @@ -0,0 +1,377 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class GL42 { + + /** + * Accepted by the <internalformat> parameter of TexImage2D, TexImage3D, + * CopyTexImage2D, CopyTexImage3D, CompressedTexImage2DARB, and + * CompressedTexImage3DARB and the <format> parameter of + * CompressedTexSubImage2DARB and CompressedTexSubImage3DARB: + */ + public static final int GL_COMPRESSED_RGBA_BPTC_UNORM = 0x8E8C, + GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM = 0x8E8D, + GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT = 0x8E8E, + GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT = 0x8E8F; + + /** + * Accepted by the <pname> parameter of PixelStore[fi], GetBooleanv, + * GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev: + */ + public static final int GL_UNPACK_COMPRESSED_BLOCK_WIDTH = 0x9127, + GL_UNPACK_COMPRESSED_BLOCK_HEIGHT = 0x9128, + GL_UNPACK_COMPRESSED_BLOCK_DEPTH = 0x9129, + GL_UNPACK_COMPRESSED_BLOCK_SIZE = 0x912A, + GL_PACK_COMPRESSED_BLOCK_WIDTH = 0x912B, + GL_PACK_COMPRESSED_BLOCK_HEIGHT = 0x912C, + GL_PACK_COMPRESSED_BLOCK_DEPTH = 0x912D, + GL_PACK_COMPRESSED_BLOCK_SIZE = 0x912E; + + /** + * Accepted by the <target> parameter of BindBufferBase and BindBufferRange: + */ + public static final int GL_ATOMIC_COUNTER_BUFFER = 0x92C0; + + /** + * Accepted by the <pname> parameter of GetBooleani_v, GetIntegeri_v, + * GetFloati_v, GetDoublei_v, GetInteger64i_v, GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, GetDoublev, and GetActiveAtomicCounterBufferiv: + */ + public static final int GL_ATOMIC_COUNTER_BUFFER_BINDING = 0x92C1; + + /** + * Accepted by the <pname> parameter of GetIntegeri_64v: + */ + public static final int GL_ATOMIC_COUNTER_BUFFER_START = 0x92C2, + GL_ATOMIC_COUNTER_BUFFER_SIZE = 0x92C3; + + /** + * Accepted by the <pname> parameter of GetActiveAtomicCounterBufferiv: + */ + public static final int GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE = 0x92C4, + GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS = 0x92C5, + GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES = 0x92C6, + GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER = 0x92C7, + GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER = 0x92C8, + GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x92C9, + GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER = 0x92CA, + GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER = 0x92CB; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + public static final int GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS = 0x92CC, + GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS = 0x92CD, + GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS = 0x92CE, + GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS = 0x92CF, + GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS = 0x92D0, + GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS = 0x92D1, + GL_MAX_VERTEX_ATOMIC_COUNTERS = 0x92D2, + GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS = 0x92D3, + GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS = 0x92D4, + GL_MAX_GEOMETRY_ATOMIC_COUNTERS = 0x92D5, + GL_MAX_FRAGMENT_ATOMIC_COUNTERS = 0x92D6, + GL_MAX_COMBINED_ATOMIC_COUNTERS = 0x92D7, + GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE = 0x92D8, + GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS = 0x92DC; + + /** + * Accepted by the <pname> parameter of GetProgramiv: + */ + public static final int GL_ACTIVE_ATOMIC_COUNTER_BUFFERS = 0x92D9; + + /** + * Accepted by the <pname> parameter of GetActiveUniformsiv: + */ + public static final int GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX = 0x92DA; + + /** + * Returned in <params> by GetActiveUniform and GetActiveUniformsiv: + */ + public static final int GL_UNSIGNED_INT_ATOMIC_COUNTER = 0x92DB; + + /** + * Accepted by the <value> parameter of GetTexParameter{if}v: + */ + public static final int GL_TEXTURE_IMMUTABLE_FORMAT = 0x912F; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, GetDoublev, and GetInteger64v: + */ + public static final int GL_MAX_IMAGE_UNITS = 0x8F38, + GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS = 0x8F39, + GL_MAX_IMAGE_SAMPLES = 0x906D, + GL_MAX_VERTEX_IMAGE_UNIFORMS = 0x90CA, + GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS = 0x90CB, + GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS = 0x90CC, + GL_MAX_GEOMETRY_IMAGE_UNIFORMS = 0x90CD, + GL_MAX_FRAGMENT_IMAGE_UNIFORMS = 0x90CE, + GL_MAX_COMBINED_IMAGE_UNIFORMS = 0x90CF; + + /** + * Accepted by the <target> parameter of GetIntegeri_v and GetBooleani_v: + */ + public static final int GL_IMAGE_BINDING_NAME = 0x8F3A, + GL_IMAGE_BINDING_LEVEL = 0x8F3B, + GL_IMAGE_BINDING_LAYERED = 0x8F3C, + GL_IMAGE_BINDING_LAYER = 0x8F3D, + GL_IMAGE_BINDING_ACCESS = 0x8F3E, + GL_IMAGE_BINDING_FORMAT = 0x906E; + + /** + * Accepted by the <barriers> parameter of MemoryBarrier: + */ + public static final int GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT = 0x1, + GL_ELEMENT_ARRAY_BARRIER_BIT = 0x2, + GL_UNIFORM_BARRIER_BIT = 0x4, + GL_TEXTURE_FETCH_BARRIER_BIT = 0x8, + GL_SHADER_IMAGE_ACCESS_BARRIER_BIT = 0x20, + GL_COMMAND_BARRIER_BIT = 0x40, + GL_PIXEL_BUFFER_BARRIER_BIT = 0x80, + GL_TEXTURE_UPDATE_BARRIER_BIT = 0x100, + GL_BUFFER_UPDATE_BARRIER_BIT = 0x200, + GL_FRAMEBUFFER_BARRIER_BIT = 0x400, + GL_TRANSFORM_FEEDBACK_BARRIER_BIT = 0x800, + GL_ATOMIC_COUNTER_BARRIER_BIT = 0x1000, + GL_ALL_BARRIER_BITS = 0xFFFFFFFF; + + /** + * Returned by the <type> parameter of GetActiveUniform: + */ + public static final int GL_IMAGE_1D = 0x904C, + GL_IMAGE_2D = 0x904D, + GL_IMAGE_3D = 0x904E, + GL_IMAGE_2D_RECT = 0x904F, + GL_IMAGE_CUBE = 0x9050, + GL_IMAGE_BUFFER = 0x9051, + GL_IMAGE_1D_ARRAY = 0x9052, + GL_IMAGE_2D_ARRAY = 0x9053, + GL_IMAGE_CUBE_MAP_ARRAY = 0x9054, + GL_IMAGE_2D_MULTISAMPLE = 0x9055, + GL_IMAGE_2D_MULTISAMPLE_ARRAY = 0x9056, + GL_INT_IMAGE_1D = 0x9057, + GL_INT_IMAGE_2D = 0x9058, + GL_INT_IMAGE_3D = 0x9059, + GL_INT_IMAGE_2D_RECT = 0x905A, + GL_INT_IMAGE_CUBE = 0x905B, + GL_INT_IMAGE_BUFFER = 0x905C, + GL_INT_IMAGE_1D_ARRAY = 0x905D, + GL_INT_IMAGE_2D_ARRAY = 0x905E, + GL_INT_IMAGE_CUBE_MAP_ARRAY = 0x905F, + GL_INT_IMAGE_2D_MULTISAMPLE = 0x9060, + GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY = 0x9061, + GL_UNSIGNED_INT_IMAGE_1D = 0x9062, + GL_UNSIGNED_INT_IMAGE_2D = 0x9063, + GL_UNSIGNED_INT_IMAGE_3D = 0x9064, + GL_UNSIGNED_INT_IMAGE_2D_RECT = 0x9065, + GL_UNSIGNED_INT_IMAGE_CUBE = 0x9066, + GL_UNSIGNED_INT_IMAGE_BUFFER = 0x9067, + GL_UNSIGNED_INT_IMAGE_1D_ARRAY = 0x9068, + GL_UNSIGNED_INT_IMAGE_2D_ARRAY = 0x9069, + GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY = 0x906A, + GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE = 0x906B, + GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY = 0x906C; + + /** + * Accepted by the <value> parameter of GetTexParameteriv, GetTexParameterfv, + * GetTexParameterIiv, and GetTexParameterIuiv: + */ + public static final int GL_IMAGE_FORMAT_COMPATIBILITY_TYPE = 0x90C7; + + /** + * Returned in the <data> parameter of GetTexParameteriv, GetTexParameterfv, + * GetTexParameterIiv, and GetTexParameterIuiv when <value> is + * IMAGE_FORMAT_COMPATIBILITY_TYPE: + */ + public static final int GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE = 0x90C8, + IMAGE_FORMAT_COMPATIBILITY_BY_CLASS = 0x90C9; + + /** + * Accepted by the <pname> parameter of GetInternalformativ: + */ + public static final int GL_NUM_SAMPLE_COUNTS = 0x9380; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + public static final int GL_MIN_MAP_BUFFER_ALIGNMENT = 0x90BC; + + private GL42() {} + + public static void glGetActiveAtomicCounterBuffer(int program, int bufferIndex, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveAtomicCounterBufferiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetActiveAtomicCounterBufferiv(program, bufferIndex, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetActiveAtomicCounterBufferiv(int program, int bufferIndex, int pname, long params, long function_pointer); + + /** Overloads glGetActiveAtomicCounterBufferiv. */ + public static int glGetActiveAtomicCounterBuffer(int program, int bufferIndex, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveAtomicCounterBufferiv; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetActiveAtomicCounterBufferiv(program, bufferIndex, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glTexStorage1D(int target, int levels, int internalformat, int width) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexStorage1D; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexStorage1D(target, levels, internalformat, width, function_pointer); + } + static native void nglTexStorage1D(int target, int levels, int internalformat, int width, long function_pointer); + + public static void glTexStorage2D(int target, int levels, int internalformat, int width, int height) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexStorage2D; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexStorage2D(target, levels, internalformat, width, height, function_pointer); + } + static native void nglTexStorage2D(int target, int levels, int internalformat, int width, int height, long function_pointer); + + public static void glTexStorage3D(int target, int levels, int internalformat, int width, int height, int depth) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexStorage3D; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexStorage3D(target, levels, internalformat, width, height, depth, function_pointer); + } + static native void nglTexStorage3D(int target, int levels, int internalformat, int width, int height, int depth, long function_pointer); + + public static void glDrawTransformFeedbackInstanced(int mode, int id, int primcount) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawTransformFeedbackInstanced; + BufferChecks.checkFunctionAddress(function_pointer); + nglDrawTransformFeedbackInstanced(mode, id, primcount, function_pointer); + } + static native void nglDrawTransformFeedbackInstanced(int mode, int id, int primcount, long function_pointer); + + public static void glDrawTransformFeedbackStreamInstanced(int mode, int id, int stream, int primcount) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawTransformFeedbackStreamInstanced; + BufferChecks.checkFunctionAddress(function_pointer); + nglDrawTransformFeedbackStreamInstanced(mode, id, stream, primcount, function_pointer); + } + static native void nglDrawTransformFeedbackStreamInstanced(int mode, int id, int stream, int primcount, long function_pointer); + + public static void glDrawArraysInstancedBaseInstance(int mode, int first, int count, int primcount, int baseinstance) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawArraysInstancedBaseInstance; + BufferChecks.checkFunctionAddress(function_pointer); + nglDrawArraysInstancedBaseInstance(mode, first, count, primcount, baseinstance, function_pointer); + } + static native void nglDrawArraysInstancedBaseInstance(int mode, int first, int count, int primcount, int baseinstance, long function_pointer); + + public static void glDrawElementsInstancedBaseInstance(int mode, ByteBuffer indices, int primcount, int baseinstance) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsInstancedBaseInstance; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawElementsInstancedBaseInstance(mode, indices.remaining(), GL11.GL_UNSIGNED_BYTE, MemoryUtil.getAddress(indices), primcount, baseinstance, function_pointer); + } + public static void glDrawElementsInstancedBaseInstance(int mode, IntBuffer indices, int primcount, int baseinstance) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsInstancedBaseInstance; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawElementsInstancedBaseInstance(mode, indices.remaining(), GL11.GL_UNSIGNED_INT, MemoryUtil.getAddress(indices), primcount, baseinstance, function_pointer); + } + public static void glDrawElementsInstancedBaseInstance(int mode, ShortBuffer indices, int primcount, int baseinstance) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsInstancedBaseInstance; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawElementsInstancedBaseInstance(mode, indices.remaining(), GL11.GL_UNSIGNED_SHORT, MemoryUtil.getAddress(indices), primcount, baseinstance, function_pointer); + } + static native void nglDrawElementsInstancedBaseInstance(int mode, int indices_count, int type, long indices, int primcount, int baseinstance, long function_pointer); + public static void glDrawElementsInstancedBaseInstance(int mode, int indices_count, int type, long indices_buffer_offset, int primcount, int baseinstance) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsInstancedBaseInstance; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOenabled(caps); + nglDrawElementsInstancedBaseInstanceBO(mode, indices_count, type, indices_buffer_offset, primcount, baseinstance, function_pointer); + } + static native void nglDrawElementsInstancedBaseInstanceBO(int mode, int indices_count, int type, long indices_buffer_offset, int primcount, int baseinstance, long function_pointer); + + public static void glDrawElementsInstancedBaseVertexBaseInstance(int mode, ByteBuffer indices, int primcount, int basevertex, int baseinstance) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsInstancedBaseVertexBaseInstance; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawElementsInstancedBaseVertexBaseInstance(mode, indices.remaining(), GL11.GL_UNSIGNED_BYTE, MemoryUtil.getAddress(indices), primcount, basevertex, baseinstance, function_pointer); + } + public static void glDrawElementsInstancedBaseVertexBaseInstance(int mode, IntBuffer indices, int primcount, int basevertex, int baseinstance) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsInstancedBaseVertexBaseInstance; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawElementsInstancedBaseVertexBaseInstance(mode, indices.remaining(), GL11.GL_UNSIGNED_INT, MemoryUtil.getAddress(indices), primcount, basevertex, baseinstance, function_pointer); + } + public static void glDrawElementsInstancedBaseVertexBaseInstance(int mode, ShortBuffer indices, int primcount, int basevertex, int baseinstance) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsInstancedBaseVertexBaseInstance; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOdisabled(caps); + BufferChecks.checkDirect(indices); + nglDrawElementsInstancedBaseVertexBaseInstance(mode, indices.remaining(), GL11.GL_UNSIGNED_SHORT, MemoryUtil.getAddress(indices), primcount, basevertex, baseinstance, function_pointer); + } + static native void nglDrawElementsInstancedBaseVertexBaseInstance(int mode, int indices_count, int type, long indices, int primcount, int basevertex, int baseinstance, long function_pointer); + public static void glDrawElementsInstancedBaseVertexBaseInstance(int mode, int indices_count, int type, long indices_buffer_offset, int primcount, int basevertex, int baseinstance) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawElementsInstancedBaseVertexBaseInstance; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureElementVBOenabled(caps); + nglDrawElementsInstancedBaseVertexBaseInstanceBO(mode, indices_count, type, indices_buffer_offset, primcount, basevertex, baseinstance, function_pointer); + } + static native void nglDrawElementsInstancedBaseVertexBaseInstanceBO(int mode, int indices_count, int type, long indices_buffer_offset, int primcount, int basevertex, int baseinstance, long function_pointer); + + public static void glBindImageTexture(int unit, int texture, int level, boolean layered, int layer, int access, int format) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindImageTexture; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindImageTexture(unit, texture, level, layered, layer, access, format, function_pointer); + } + static native void nglBindImageTexture(int unit, int texture, int level, boolean layered, int layer, int access, int format, long function_pointer); + + public static void glMemoryBarrier(int barriers) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMemoryBarrier; + BufferChecks.checkFunctionAddress(function_pointer); + nglMemoryBarrier(barriers, function_pointer); + } + static native void nglMemoryBarrier(int barriers, long function_pointer); + + public static void glGetInternalformat(int target, int internalformat, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetInternalformativ; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglGetInternalformativ(target, internalformat, pname, params.remaining(), MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetInternalformativ(int target, int internalformat, int pname, int params_bufSize, long params, long function_pointer); + + /** Overloads glGetInternalformativ. */ + public static int glGetInternalformat(int target, int internalformat, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetInternalformativ; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetInternalformativ(target, internalformat, pname, 1, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL43.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL43.java new file mode 100644 index 0000000..7bd4059 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL43.java @@ -0,0 +1,1082 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class GL43 { + + /** + * No. of supported Shading Language Versions. Accepted by the <pname> parameter of GetIntegerv. + */ + public static final int GL_NUM_SHADING_LANGUAGE_VERSIONS = 0x82E9; + + /** + * Vertex attrib array has unconverted doubles. Accepted by the <pname> parameter of GetVertexAttribiv. + */ + public static final int GL_VERTEX_ATTRIB_ARRAY_LONG = 0x874E; + + /** + * Accepted by the <internalformat> parameter of CompressedTexImage2D + */ + public static final int GL_COMPRESSED_RGB8_ETC2 = 0x9274, + GL_COMPRESSED_SRGB8_ETC2 = 0x9275, + GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9276, + GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277, + GL_COMPRESSED_RGBA8_ETC2_EAC = 0x9278, + GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 0x9279, + GL_COMPRESSED_R11_EAC = 0x9270, + GL_COMPRESSED_SIGNED_R11_EAC = 0x9271, + GL_COMPRESSED_RG11_EAC = 0x9272, + GL_COMPRESSED_SIGNED_RG11_EAC = 0x9273; + + /** + * Accepted by the <target> parameter of Enable and Disable: + */ + public static final int GL_PRIMITIVE_RESTART_FIXED_INDEX = 0x8D69; + + /** + * Accepted by the <target> parameter of BeginQuery, EndQuery, + * GetQueryIndexediv and GetQueryiv: + */ + public static final int GL_ANY_SAMPLES_PASSED_CONSERVATIVE = 0x8D6A; + + /** + * Accepted by the <value> parameter of the GetInteger* functions: + */ + public static final int GL_MAX_ELEMENT_INDEX = 0x8D6B; + + /** + * Accepted by the <type> parameter of CreateShader and returned in the + * <params> parameter by GetShaderiv: + */ + public static final int GL_COMPUTE_SHADER = 0x91B9; + + /** + * Accepted by the <pname> parameter of GetIntegerv, GetBooleanv, GetFloatv, + * GetDoublev and GetInteger64v: + */ + public static final int GL_MAX_COMPUTE_UNIFORM_BLOCKS = 0x91BB, + GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS = 0x91BC, + GL_MAX_COMPUTE_IMAGE_UNIFORMS = 0x91BD, + GL_MAX_COMPUTE_SHARED_MEMORY_SIZE = 0x8262, + GL_MAX_COMPUTE_UNIFORM_COMPONENTS = 0x8263, + GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS = 0x8264, + GL_MAX_COMPUTE_ATOMIC_COUNTERS = 0x8265, + GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS = 0x8266, + GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS = 0x90EB; + + /** + * Accepted by the <pname> parameter of GetIntegeri_v, GetBooleani_v, + * GetFloati_v, GetDoublei_v and GetInteger64i_v: + */ + public static final int GL_MAX_COMPUTE_WORK_GROUP_COUNT = 0x91BE, + GL_MAX_COMPUTE_WORK_GROUP_SIZE = 0x91BF; + + /** + * Accepted by the <pname> parameter of GetProgramiv: + */ + public static final int GL_COMPUTE_WORK_GROUP_SIZE = 0x8267; + + /** + * Accepted by the <pname> parameter of GetActiveUniformBlockiv: + */ + public static final int GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER = 0x90EC; + + /** + * Accepted by the <pname> parameter of GetActiveAtomicCounterBufferiv: + */ + public static final int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER = 0x90ED; + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, and + * GetBufferPointerv: + */ + public static final int GL_DISPATCH_INDIRECT_BUFFER = 0x90EE; + + /** + * Accepted by the <value> parameter of GetIntegerv, GetBooleanv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + public static final int GL_DISPATCH_INDIRECT_BUFFER_BINDING = 0x90EF; + + /** + * Accepted by the <stages> parameter of UseProgramStages: + */ + public static final int GL_COMPUTE_SHADER_BIT = 0x20; + + /** + * Tokens accepted by the <target> parameters of Enable, Disable, and + * IsEnabled: + */ + public static final int GL_DEBUG_OUTPUT = 0x92E0, + GL_DEBUG_OUTPUT_SYNCHRONOUS = 0x8242; + + /** + * Returned by GetIntegerv when <pname> is CONTEXT_FLAGS: + */ + public static final int GL_CONTEXT_FLAG_DEBUG_BIT = 0x2; + + /** + * Tokens accepted by the <value> parameters of GetBooleanv, GetIntegerv, + * GetFloatv, GetDoublev and GetInteger64v: + */ + public static final int GL_MAX_DEBUG_MESSAGE_LENGTH = 0x9143, + GL_MAX_DEBUG_LOGGED_MESSAGES = 0x9144, + GL_DEBUG_LOGGED_MESSAGES = 0x9145, + GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH = 0x8243, + GL_MAX_DEBUG_GROUP_STACK_DEPTH = 0x826C, + GL_DEBUG_GROUP_STACK_DEPTH = 0x826D, + GL_MAX_LABEL_LENGTH = 0x82E8; + + /** + * Tokens accepted by the <pname> parameter of GetPointerv: + */ + public static final int GL_DEBUG_CALLBACK_FUNCTION = 0x8244, + GL_DEBUG_CALLBACK_USER_PARAM = 0x8245; + + /** + * Tokens accepted or provided by the <source> parameters of + * DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <sources> + * parameter of GetDebugMessageLog: + */ + public static final int GL_DEBUG_SOURCE_API = 0x8246, + GL_DEBUG_SOURCE_WINDOW_SYSTEM = 0x8247, + GL_DEBUG_SOURCE_SHADER_COMPILER = 0x8248, + GL_DEBUG_SOURCE_THIRD_PARTY = 0x8249, + GL_DEBUG_SOURCE_APPLICATION = 0x824A, + GL_DEBUG_SOURCE_OTHER = 0x824B; + + /** + * Tokens accepted or provided by the <type> parameters of + * DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <types> + * parameter of GetDebugMessageLog: + */ + public static final int GL_DEBUG_TYPE_ERROR = 0x824C, + GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR = 0x824D, + GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR = 0x824E, + GL_DEBUG_TYPE_PORTABILITY = 0x824F, + GL_DEBUG_TYPE_PERFORMANCE = 0x8250, + GL_DEBUG_TYPE_OTHER = 0x8251, + GL_DEBUG_TYPE_MARKER = 0x8268; + + /** + * Tokens accepted or provided by the <type> parameters of + * DebugMessageControl and DEBUGPROC, and the <types> parameter of + * GetDebugMessageLog: + */ + public static final int GL_DEBUG_TYPE_PUSH_GROUP = 0x8269, + GL_DEBUG_TYPE_POP_GROUP = 0x826A; + + /** + * Tokens accepted or provided by the <severity> parameters of + * DebugMessageControl, DebugMessageInsert and DEBUGPROC callback functions, + * and the <severities> parameter of GetDebugMessageLog: + */ + public static final int GL_DEBUG_SEVERITY_HIGH = 0x9146, + GL_DEBUG_SEVERITY_MEDIUM = 0x9147, + GL_DEBUG_SEVERITY_LOW = 0x9148, + GL_DEBUG_SEVERITY_NOTIFICATION = 0x826B; + + /** + * Returned by GetError: + */ + public static final int GL_STACK_UNDERFLOW = 0x504, + GL_STACK_OVERFLOW = 0x503; + + /** + * Tokens accepted or provided by the <identifier> parameters of + * ObjectLabel and GetObjectLabel: + */ + public static final int GL_BUFFER = 0x82E0, + GL_SHADER = 0x82E1, + GL_PROGRAM = 0x82E2, + GL_QUERY = 0x82E3, + GL_PROGRAM_PIPELINE = 0x82E4, + GL_SAMPLER = 0x82E6, + GL_DISPLAY_LIST = 0x82E7; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, GetDoublev, and GetInteger64v: + */ + public static final int GL_MAX_UNIFORM_LOCATIONS = 0x826E; + + /** + * Accepted by the <pname> parameter of FramebufferParameteri, + * GetFramebufferParameteriv, NamedFramebufferParameteriEXT, and + * GetNamedFramebufferParameterivEXT: + */ + public static final int GL_FRAMEBUFFER_DEFAULT_WIDTH = 0x9310, + GL_FRAMEBUFFER_DEFAULT_HEIGHT = 0x9311, + GL_FRAMEBUFFER_DEFAULT_LAYERS = 0x9312, + GL_FRAMEBUFFER_DEFAULT_SAMPLES = 0x9313, + GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS = 0x9314; + + /** + * Accepted by the <pname> parameter of GetIntegerv, GetBooleanv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + public static final int GL_MAX_FRAMEBUFFER_WIDTH = 0x9315, + GL_MAX_FRAMEBUFFER_HEIGHT = 0x9316, + GL_MAX_FRAMEBUFFER_LAYERS = 0x9317, + GL_MAX_FRAMEBUFFER_SAMPLES = 0x9318; + + /** + * Accepted by the <target> parameter of GetInternalformativ + * and GetInternalformati64v: + */ + public static final int GL_TEXTURE_1D = 0xDE0, + GL_TEXTURE_1D_ARRAY = 0x8C18, + GL_TEXTURE_2D = 0xDE1, + GL_TEXTURE_2D_ARRAY = 0x8C1A, + GL_TEXTURE_3D = 0x806F, + GL_TEXTURE_CUBE_MAP = 0x8513, + GL_TEXTURE_CUBE_MAP_ARRAY = 0x9009, + GL_TEXTURE_RECTANGLE = 0x84F5, + GL_TEXTURE_BUFFER = 0x8C2A, + GL_RENDERBUFFER = 0x8D41, + GL_TEXTURE_2D_MULTISAMPLE = 0x9100, + GL_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9102; + + /** + * Accepted by the <pname> parameter of GetInternalformativ + * and GetInternalformati64v: + */ + public static final int GL_SAMPLES = 0x80A9, + GL_NUM_SAMPLE_COUNTS = 0x9380, + GL_INTERNALFORMAT_SUPPORTED = 0x826F, + GL_INTERNALFORMAT_PREFERRED = 0x8270, + GL_INTERNALFORMAT_RED_SIZE = 0x8271, + GL_INTERNALFORMAT_GREEN_SIZE = 0x8272, + GL_INTERNALFORMAT_BLUE_SIZE = 0x8273, + GL_INTERNALFORMAT_ALPHA_SIZE = 0x8274, + GL_INTERNALFORMAT_DEPTH_SIZE = 0x8275, + GL_INTERNALFORMAT_STENCIL_SIZE = 0x8276, + GL_INTERNALFORMAT_SHARED_SIZE = 0x8277, + GL_INTERNALFORMAT_RED_TYPE = 0x8278, + GL_INTERNALFORMAT_GREEN_TYPE = 0x8279, + GL_INTERNALFORMAT_BLUE_TYPE = 0x827A, + GL_INTERNALFORMAT_ALPHA_TYPE = 0x827B, + GL_INTERNALFORMAT_DEPTH_TYPE = 0x827C, + GL_INTERNALFORMAT_STENCIL_TYPE = 0x827D, + GL_MAX_WIDTH = 0x827E, + GL_MAX_HEIGHT = 0x827F, + GL_MAX_DEPTH = 0x8280, + GL_MAX_LAYERS = 0x8281, + GL_MAX_COMBINED_DIMENSIONS = 0x8282, + GL_COLOR_COMPONENTS = 0x8283, + GL_DEPTH_COMPONENTS = 0x8284, + GL_STENCIL_COMPONENTS = 0x8285, + GL_COLOR_RENDERABLE = 0x8286, + GL_DEPTH_RENDERABLE = 0x8287, + GL_STENCIL_RENDERABLE = 0x8288, + GL_FRAMEBUFFER_RENDERABLE = 0x8289, + GL_FRAMEBUFFER_RENDERABLE_LAYERED = 0x828A, + GL_FRAMEBUFFER_BLEND = 0x828B, + GL_READ_PIXELS = 0x828C, + GL_READ_PIXELS_FORMAT = 0x828D, + GL_READ_PIXELS_TYPE = 0x828E, + GL_TEXTURE_IMAGE_FORMAT = 0x828F, + GL_TEXTURE_IMAGE_TYPE = 0x8290, + GL_GET_TEXTURE_IMAGE_FORMAT = 0x8291, + GL_GET_TEXTURE_IMAGE_TYPE = 0x8292, + GL_MIPMAP = 0x8293, + GL_MANUAL_GENERATE_MIPMAP = 0x8294, + GL_AUTO_GENERATE_MIPMAP = 0x8295, + GL_COLOR_ENCODING = 0x8296, + GL_SRGB_READ = 0x8297, + GL_SRGB_WRITE = 0x8298, + GL_SRGB_DECODE_ARB = 0x8299, + GL_FILTER = 0x829A, + GL_VERTEX_TEXTURE = 0x829B, + GL_TESS_CONTROL_TEXTURE = 0x829C, + GL_TESS_EVALUATION_TEXTURE = 0x829D, + GL_GEOMETRY_TEXTURE = 0x829E, + GL_FRAGMENT_TEXTURE = 0x829F, + GL_COMPUTE_TEXTURE = 0x82A0, + GL_TEXTURE_SHADOW = 0x82A1, + GL_TEXTURE_GATHER = 0x82A2, + GL_TEXTURE_GATHER_SHADOW = 0x82A3, + GL_SHADER_IMAGE_LOAD = 0x82A4, + GL_SHADER_IMAGE_STORE = 0x82A5, + GL_SHADER_IMAGE_ATOMIC = 0x82A6, + GL_IMAGE_TEXEL_SIZE = 0x82A7, + GL_IMAGE_COMPATIBILITY_CLASS = 0x82A8, + GL_IMAGE_PIXEL_FORMAT = 0x82A9, + GL_IMAGE_PIXEL_TYPE = 0x82AA, + GL_IMAGE_FORMAT_COMPATIBILITY_TYPE = 0x90C7, + GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST = 0x82AC, + GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST = 0x82AD, + GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE = 0x82AE, + GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE = 0x82AF, + GL_TEXTURE_COMPRESSED = 0x86A1, + GL_TEXTURE_COMPRESSED_BLOCK_WIDTH = 0x82B1, + GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT = 0x82B2, + GL_TEXTURE_COMPRESSED_BLOCK_SIZE = 0x82B3, + GL_CLEAR_BUFFER = 0x82B4, + GL_TEXTURE_VIEW = 0x82B5, + GL_VIEW_COMPATIBILITY_CLASS = 0x82B6; + + /** + * Returned as possible responses for various <pname> queries + * to GetInternalformativ and GetInternalformati64v + */ + public static final int GL_FULL_SUPPORT = 0x82B7, + GL_CAVEAT_SUPPORT = 0x82B8, + GL_IMAGE_CLASS_4_X_32 = 0x82B9, + GL_IMAGE_CLASS_2_X_32 = 0x82BA, + GL_IMAGE_CLASS_1_X_32 = 0x82BB, + GL_IMAGE_CLASS_4_X_16 = 0x82BC, + GL_IMAGE_CLASS_2_X_16 = 0x82BD, + GL_IMAGE_CLASS_1_X_16 = 0x82BE, + GL_IMAGE_CLASS_4_X_8 = 0x82BF, + GL_IMAGE_CLASS_2_X_8 = 0x82C0, + GL_IMAGE_CLASS_1_X_8 = 0x82C1, + GL_IMAGE_CLASS_11_11_10 = 0x82C2, + GL_IMAGE_CLASS_10_10_10_2 = 0x82C3, + GL_VIEW_CLASS_128_BITS = 0x82C4, + GL_VIEW_CLASS_96_BITS = 0x82C5, + GL_VIEW_CLASS_64_BITS = 0x82C6, + GL_VIEW_CLASS_48_BITS = 0x82C7, + GL_VIEW_CLASS_32_BITS = 0x82C8, + GL_VIEW_CLASS_24_BITS = 0x82C9, + GL_VIEW_CLASS_16_BITS = 0x82CA, + GL_VIEW_CLASS_8_BITS = 0x82CB, + GL_VIEW_CLASS_S3TC_DXT1_RGB = 0x82CC, + GL_VIEW_CLASS_S3TC_DXT1_RGBA = 0x82CD, + GL_VIEW_CLASS_S3TC_DXT3_RGBA = 0x82CE, + GL_VIEW_CLASS_S3TC_DXT5_RGBA = 0x82CF, + GL_VIEW_CLASS_RGTC1_RED = 0x82D0, + GL_VIEW_CLASS_RGTC2_RG = 0x82D1, + GL_VIEW_CLASS_BPTC_UNORM = 0x82D2, + GL_VIEW_CLASS_BPTC_FLOAT = 0x82D3; + + /** + * Accepted by the <programInterface> parameter of GetProgramInterfaceiv, + * GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, + * GetProgramResourceLocation, and GetProgramResourceLocationIndex: + */ + public static final int GL_UNIFORM = 0x92E1, + GL_UNIFORM_BLOCK = 0x92E2, + GL_PROGRAM_INPUT = 0x92E3, + GL_PROGRAM_OUTPUT = 0x92E4, + GL_BUFFER_VARIABLE = 0x92E5, + GL_SHADER_STORAGE_BLOCK = 0x92E6, + GL_VERTEX_SUBROUTINE = 0x92E8, + GL_TESS_CONTROL_SUBROUTINE = 0x92E9, + GL_TESS_EVALUATION_SUBROUTINE = 0x92EA, + GL_GEOMETRY_SUBROUTINE = 0x92EB, + GL_FRAGMENT_SUBROUTINE = 0x92EC, + GL_COMPUTE_SUBROUTINE = 0x92ED, + GL_VERTEX_SUBROUTINE_UNIFORM = 0x92EE, + GL_TESS_CONTROL_SUBROUTINE_UNIFORM = 0x92EF, + GL_TESS_EVALUATION_SUBROUTINE_UNIFORM = 0x92F0, + GL_GEOMETRY_SUBROUTINE_UNIFORM = 0x92F1, + GL_FRAGMENT_SUBROUTINE_UNIFORM = 0x92F2, + GL_COMPUTE_SUBROUTINE_UNIFORM = 0x92F3, + GL_TRANSFORM_FEEDBACK_VARYING = 0x92F4; + + /** + * Accepted by the <pname> parameter of GetProgramInterfaceiv: + */ + public static final int GL_ACTIVE_RESOURCES = 0x92F5, + GL_MAX_NAME_LENGTH = 0x92F6, + GL_MAX_NUM_ACTIVE_VARIABLES = 0x92F7, + GL_MAX_NUM_COMPATIBLE_SUBROUTINES = 0x92F8; + + /** + * Accepted in the <props> array of GetProgramResourceiv: + */ + public static final int GL_NAME_LENGTH = 0x92F9, + GL_TYPE = 0x92FA, + GL_ARRAY_SIZE = 0x92FB, + GL_OFFSET = 0x92FC, + GL_BLOCK_INDEX = 0x92FD, + GL_ARRAY_STRIDE = 0x92FE, + GL_MATRIX_STRIDE = 0x92FF, + GL_IS_ROW_MAJOR = 0x9300, + GL_ATOMIC_COUNTER_BUFFER_INDEX = 0x9301, + GL_BUFFER_BINDING = 0x9302, + GL_BUFFER_DATA_SIZE = 0x9303, + GL_NUM_ACTIVE_VARIABLES = 0x9304, + GL_ACTIVE_VARIABLES = 0x9305, + GL_REFERENCED_BY_VERTEX_SHADER = 0x9306, + GL_REFERENCED_BY_TESS_CONTROL_SHADER = 0x9307, + GL_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x9308, + GL_REFERENCED_BY_GEOMETRY_SHADER = 0x9309, + GL_REFERENCED_BY_FRAGMENT_SHADER = 0x930A, + GL_REFERENCED_BY_COMPUTE_SHADER = 0x930B, + GL_TOP_LEVEL_ARRAY_SIZE = 0x930C, + GL_TOP_LEVEL_ARRAY_STRIDE = 0x930D, + GL_LOCATION = 0x930E, + GL_LOCATION_INDEX = 0x930F, + GL_IS_PER_PATCH = 0x92E7; + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, and + * GetBufferPointerv: + */ + public static final int GL_SHADER_STORAGE_BUFFER = 0x90D2; + + /** + * Accepted by the <pname> parameter of GetIntegerv, GetIntegeri_v, + * GetBooleanv, GetInteger64v, GetFloatv, GetDoublev, GetBooleani_v, + * GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v: + */ + public static final int GL_SHADER_STORAGE_BUFFER_BINDING = 0x90D3; + + /** + * Accepted by the <pname> parameter of GetIntegeri_v, GetBooleani_v, + * GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v: + */ + public static final int GL_SHADER_STORAGE_BUFFER_START = 0x90D4, + GL_SHADER_STORAGE_BUFFER_SIZE = 0x90D5; + + /** + * Accepted by the <pname> parameter of GetIntegerv, GetBooleanv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + public static final int GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS = 0x90D6, + GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS = 0x90D7, + GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS = 0x90D8, + GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS = 0x90D9, + GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS = 0x90DA, + GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS = 0x90DB, + GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS = 0x90DC, + GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS = 0x90DD, + GL_MAX_SHADER_STORAGE_BLOCK_SIZE = 0x90DE, + GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT = 0x90DF; + + /** + * Accepted in the <barriers> bitfield in glMemoryBarrier: + */ + public static final int GL_SHADER_STORAGE_BARRIER_BIT = 0x2000; + + /** + * Alias for the existing token + * MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS: + */ + public static final int GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES = 0x8F39; + + /** + * Accepted by the <pname> parameter of TexParameter* and GetTexParameter*: + */ + public static final int GL_DEPTH_STENCIL_TEXTURE_MODE = 0x90EA; + + /** + * Accepted by the <pname> parameter of GetTexLevelParameter: + */ + public static final int GL_TEXTURE_BUFFER_OFFSET = 0x919D, + GL_TEXTURE_BUFFER_SIZE = 0x919E; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT = 0x919F; + + /** + * Accepted by the <pname> parameters of GetTexParameterfv and + * GetTexParameteriv: + */ + public static final int GL_TEXTURE_VIEW_MIN_LEVEL = 0x82DB, + GL_TEXTURE_VIEW_NUM_LEVELS = 0x82DC, + GL_TEXTURE_VIEW_MIN_LAYER = 0x82DD, + GL_TEXTURE_VIEW_NUM_LAYERS = 0x82DE, + GL_TEXTURE_IMMUTABLE_LEVELS = 0x82DF; + + /** + * Accepted by the <pname> parameter of GetVertexAttrib*v: + */ + public static final int GL_VERTEX_ATTRIB_BINDING = 0x82D4, + GL_VERTEX_ATTRIB_RELATIVE_OFFSET = 0x82D5; + + /** + * Accepted by the <target> parameter of GetBooleani_v, GetIntegeri_v, + * GetFloati_v, GetDoublei_v, and GetInteger64i_v: + */ + public static final int GL_VERTEX_BINDING_DIVISOR = 0x82D6, + GL_VERTEX_BINDING_OFFSET = 0x82D7, + GL_VERTEX_BINDING_STRIDE = 0x82D8; + + /** + * Accepted by the <pname> parameter of GetIntegerv, ... + */ + public static final int GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET = 0x82D9, + GL_MAX_VERTEX_ATTRIB_BINDINGS = 0x82DA; + + private GL43() {} + + public static void glClearBufferData(int target, int internalformat, int format, int type, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClearBufferData; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(data, 1); + nglClearBufferData(target, internalformat, format, type, MemoryUtil.getAddress(data), function_pointer); + } + static native void nglClearBufferData(int target, int internalformat, int format, int type, long data, long function_pointer); + + public static void glClearBufferSubData(int target, int internalformat, long offset, int format, int type, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClearBufferSubData; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglClearBufferSubData(target, internalformat, offset, data.remaining(), format, type, MemoryUtil.getAddress(data), function_pointer); + } + static native void nglClearBufferSubData(int target, int internalformat, long offset, long data_size, int format, int type, long data, long function_pointer); + + public static void glDispatchCompute(int num_groups_x, int num_groups_y, int num_groups_z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDispatchCompute; + BufferChecks.checkFunctionAddress(function_pointer); + nglDispatchCompute(num_groups_x, num_groups_y, num_groups_z, function_pointer); + } + static native void nglDispatchCompute(int num_groups_x, int num_groups_y, int num_groups_z, long function_pointer); + + public static void glDispatchComputeIndirect(long indirect) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDispatchComputeIndirect; + BufferChecks.checkFunctionAddress(function_pointer); + nglDispatchComputeIndirect(indirect, function_pointer); + } + static native void nglDispatchComputeIndirect(long indirect, long function_pointer); + + public static void glCopyImageSubData(int srcName, int srcTarget, int srcLevel, int srcX, int srcY, int srcZ, int dstName, int dstTarget, int dstLevel, int dstX, int dstY, int dstZ, int srcWidth, int srcHeight, int srcDepth) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCopyImageSubData; + BufferChecks.checkFunctionAddress(function_pointer); + nglCopyImageSubData(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth, function_pointer); + } + static native void nglCopyImageSubData(int srcName, int srcTarget, int srcLevel, int srcX, int srcY, int srcZ, int dstName, int dstTarget, int dstLevel, int dstX, int dstY, int dstZ, int srcWidth, int srcHeight, int srcDepth, long function_pointer); + + public static void glDebugMessageControl(int source, int type, int severity, IntBuffer ids, boolean enabled) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDebugMessageControl; + BufferChecks.checkFunctionAddress(function_pointer); + if (ids != null) + BufferChecks.checkDirect(ids); + nglDebugMessageControl(source, type, severity, (ids == null ? 0 : ids.remaining()), MemoryUtil.getAddressSafe(ids), enabled, function_pointer); + } + static native void nglDebugMessageControl(int source, int type, int severity, int ids_count, long ids, boolean enabled, long function_pointer); + + public static void glDebugMessageInsert(int source, int type, int id, int severity, ByteBuffer buf) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDebugMessageInsert; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(buf); + nglDebugMessageInsert(source, type, id, severity, buf.remaining(), MemoryUtil.getAddress(buf), function_pointer); + } + static native void nglDebugMessageInsert(int source, int type, int id, int severity, int buf_length, long buf, long function_pointer); + + /** Overloads glDebugMessageInsert. */ + public static void glDebugMessageInsert(int source, int type, int id, int severity, CharSequence buf) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDebugMessageInsert; + BufferChecks.checkFunctionAddress(function_pointer); + nglDebugMessageInsert(source, type, id, severity, buf.length(), APIUtil.getBuffer(caps, buf), function_pointer); + } + + /** + * The {@code KHRDebugCallback.Handler} implementation passed to this method will be used for + * KHR_debug messages. If callback is null, any previously registered handler for the current + * thread will be unregistered and stop receiving messages. + *

+ * @param callback the callback function to use + */ + public static void glDebugMessageCallback(KHRDebugCallback callback) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDebugMessageCallback; + BufferChecks.checkFunctionAddress(function_pointer); + long userParam = callback == null ? 0 : CallbackUtil.createGlobalRef(callback.getHandler()); + CallbackUtil.registerContextCallbackKHR(userParam); + nglDebugMessageCallback(callback == null ? 0 : callback.getPointer(), userParam, function_pointer); + } + static native void nglDebugMessageCallback(long callback, long userParam, long function_pointer); + + public static int glGetDebugMessageLog(int count, IntBuffer sources, IntBuffer types, IntBuffer ids, IntBuffer severities, IntBuffer lengths, ByteBuffer messageLog) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetDebugMessageLog; + BufferChecks.checkFunctionAddress(function_pointer); + if (sources != null) + BufferChecks.checkBuffer(sources, count); + if (types != null) + BufferChecks.checkBuffer(types, count); + if (ids != null) + BufferChecks.checkBuffer(ids, count); + if (severities != null) + BufferChecks.checkBuffer(severities, count); + if (lengths != null) + BufferChecks.checkBuffer(lengths, count); + if (messageLog != null) + BufferChecks.checkDirect(messageLog); + int __result = nglGetDebugMessageLog(count, (messageLog == null ? 0 : messageLog.remaining()), MemoryUtil.getAddressSafe(sources), MemoryUtil.getAddressSafe(types), MemoryUtil.getAddressSafe(ids), MemoryUtil.getAddressSafe(severities), MemoryUtil.getAddressSafe(lengths), MemoryUtil.getAddressSafe(messageLog), function_pointer); + return __result; + } + static native int nglGetDebugMessageLog(int count, int messageLog_bufsize, long sources, long types, long ids, long severities, long lengths, long messageLog, long function_pointer); + + public static void glPushDebugGroup(int source, int id, ByteBuffer message) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPushDebugGroup; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(message); + nglPushDebugGroup(source, id, message.remaining(), MemoryUtil.getAddress(message), function_pointer); + } + static native void nglPushDebugGroup(int source, int id, int message_length, long message, long function_pointer); + + /** Overloads glPushDebugGroup. */ + public static void glPushDebugGroup(int source, int id, CharSequence message) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPushDebugGroup; + BufferChecks.checkFunctionAddress(function_pointer); + nglPushDebugGroup(source, id, message.length(), APIUtil.getBuffer(caps, message), function_pointer); + } + + public static void glPopDebugGroup() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPopDebugGroup; + BufferChecks.checkFunctionAddress(function_pointer); + nglPopDebugGroup(function_pointer); + } + static native void nglPopDebugGroup(long function_pointer); + + public static void glObjectLabel(int identifier, int name, ByteBuffer label) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glObjectLabel; + BufferChecks.checkFunctionAddress(function_pointer); + if (label != null) + BufferChecks.checkDirect(label); + nglObjectLabel(identifier, name, (label == null ? 0 : label.remaining()), MemoryUtil.getAddressSafe(label), function_pointer); + } + static native void nglObjectLabel(int identifier, int name, int label_length, long label, long function_pointer); + + /** Overloads glObjectLabel. */ + public static void glObjectLabel(int identifier, int name, CharSequence label) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glObjectLabel; + BufferChecks.checkFunctionAddress(function_pointer); + nglObjectLabel(identifier, name, label.length(), APIUtil.getBuffer(caps, label), function_pointer); + } + + public static void glGetObjectLabel(int identifier, int name, IntBuffer length, ByteBuffer label) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetObjectLabel; + BufferChecks.checkFunctionAddress(function_pointer); + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkDirect(label); + nglGetObjectLabel(identifier, name, label.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(label), function_pointer); + } + static native void nglGetObjectLabel(int identifier, int name, int label_bufSize, long length, long label, long function_pointer); + + /** Overloads glGetObjectLabel. */ + public static String glGetObjectLabel(int identifier, int name, int bufSize) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetObjectLabel; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer label_length = APIUtil.getLengths(caps); + ByteBuffer label = APIUtil.getBufferByte(caps, bufSize); + nglGetObjectLabel(identifier, name, bufSize, MemoryUtil.getAddress0(label_length), MemoryUtil.getAddress(label), function_pointer); + label.limit(label_length.get(0)); + return APIUtil.getString(caps, label); + } + + public static void glObjectPtrLabel(PointerWrapper ptr, ByteBuffer label) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glObjectPtrLabel; + BufferChecks.checkFunctionAddress(function_pointer); + if (label != null) + BufferChecks.checkDirect(label); + nglObjectPtrLabel(ptr.getPointer(), (label == null ? 0 : label.remaining()), MemoryUtil.getAddressSafe(label), function_pointer); + } + static native void nglObjectPtrLabel(long ptr, int label_length, long label, long function_pointer); + + /** Overloads glObjectPtrLabel. */ + public static void glObjectPtrLabel(PointerWrapper ptr, CharSequence label) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glObjectPtrLabel; + BufferChecks.checkFunctionAddress(function_pointer); + nglObjectPtrLabel(ptr.getPointer(), label.length(), APIUtil.getBuffer(caps, label), function_pointer); + } + + public static void glGetObjectPtrLabel(PointerWrapper ptr, IntBuffer length, ByteBuffer label) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetObjectPtrLabel; + BufferChecks.checkFunctionAddress(function_pointer); + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkDirect(label); + nglGetObjectPtrLabel(ptr.getPointer(), label.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(label), function_pointer); + } + static native void nglGetObjectPtrLabel(long ptr, int label_bufSize, long length, long label, long function_pointer); + + /** Overloads glGetObjectPtrLabel. */ + public static String glGetObjectPtrLabel(PointerWrapper ptr, int bufSize) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetObjectPtrLabel; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer label_length = APIUtil.getLengths(caps); + ByteBuffer label = APIUtil.getBufferByte(caps, bufSize); + nglGetObjectPtrLabel(ptr.getPointer(), bufSize, MemoryUtil.getAddress0(label_length), MemoryUtil.getAddress(label), function_pointer); + label.limit(label_length.get(0)); + return APIUtil.getString(caps, label); + } + + public static void glFramebufferParameteri(int target, int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFramebufferParameteri; + BufferChecks.checkFunctionAddress(function_pointer); + nglFramebufferParameteri(target, pname, param, function_pointer); + } + static native void nglFramebufferParameteri(int target, int pname, int param, long function_pointer); + + public static void glGetFramebufferParameter(int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetFramebufferParameteriv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetFramebufferParameteriv(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetFramebufferParameteriv(int target, int pname, long params, long function_pointer); + + /** Overloads glGetFramebufferParameteriv. */ + public static int glGetFramebufferParameteri(int target, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetFramebufferParameteriv; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetFramebufferParameteriv(target, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetInternalformat(int target, int internalformat, int pname, LongBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetInternalformati64v; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglGetInternalformati64v(target, internalformat, pname, params.remaining(), MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetInternalformati64v(int target, int internalformat, int pname, int params_bufSize, long params, long function_pointer); + + /** Overloads glGetInternalformati64v. */ + public static long glGetInternalformati64(int target, int internalformat, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetInternalformati64v; + BufferChecks.checkFunctionAddress(function_pointer); + LongBuffer params = APIUtil.getBufferLong(caps); + nglGetInternalformati64v(target, internalformat, pname, 1, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glInvalidateTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glInvalidateTexSubImage; + BufferChecks.checkFunctionAddress(function_pointer); + nglInvalidateTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, function_pointer); + } + static native void nglInvalidateTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, long function_pointer); + + public static void glInvalidateTexImage(int texture, int level) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glInvalidateTexImage; + BufferChecks.checkFunctionAddress(function_pointer); + nglInvalidateTexImage(texture, level, function_pointer); + } + static native void nglInvalidateTexImage(int texture, int level, long function_pointer); + + public static void glInvalidateBufferSubData(int buffer, long offset, long length) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glInvalidateBufferSubData; + BufferChecks.checkFunctionAddress(function_pointer); + nglInvalidateBufferSubData(buffer, offset, length, function_pointer); + } + static native void nglInvalidateBufferSubData(int buffer, long offset, long length, long function_pointer); + + public static void glInvalidateBufferData(int buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glInvalidateBufferData; + BufferChecks.checkFunctionAddress(function_pointer); + nglInvalidateBufferData(buffer, function_pointer); + } + static native void nglInvalidateBufferData(int buffer, long function_pointer); + + public static void glInvalidateFramebuffer(int target, IntBuffer attachments) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glInvalidateFramebuffer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(attachments); + nglInvalidateFramebuffer(target, attachments.remaining(), MemoryUtil.getAddress(attachments), function_pointer); + } + static native void nglInvalidateFramebuffer(int target, int attachments_numAttachments, long attachments, long function_pointer); + + public static void glInvalidateSubFramebuffer(int target, IntBuffer attachments, int x, int y, int width, int height) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glInvalidateSubFramebuffer; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(attachments); + nglInvalidateSubFramebuffer(target, attachments.remaining(), MemoryUtil.getAddress(attachments), x, y, width, height, function_pointer); + } + static native void nglInvalidateSubFramebuffer(int target, int attachments_numAttachments, long attachments, int x, int y, int width, int height, long function_pointer); + + public static void glMultiDrawArraysIndirect(int mode, ByteBuffer indirect, int primcount, int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiDrawArraysIndirect; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureIndirectBOdisabled(caps); + BufferChecks.checkBuffer(indirect, (stride == 0 ? 4 * 4 : stride) * primcount); + nglMultiDrawArraysIndirect(mode, MemoryUtil.getAddress(indirect), primcount, stride, function_pointer); + } + static native void nglMultiDrawArraysIndirect(int mode, long indirect, int primcount, int stride, long function_pointer); + public static void glMultiDrawArraysIndirect(int mode, long indirect_buffer_offset, int primcount, int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiDrawArraysIndirect; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureIndirectBOenabled(caps); + nglMultiDrawArraysIndirectBO(mode, indirect_buffer_offset, primcount, stride, function_pointer); + } + static native void nglMultiDrawArraysIndirectBO(int mode, long indirect_buffer_offset, int primcount, int stride, long function_pointer); + + /** Overloads glMultiDrawArraysIndirect. */ + public static void glMultiDrawArraysIndirect(int mode, IntBuffer indirect, int primcount, int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiDrawArraysIndirect; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureIndirectBOdisabled(caps); + BufferChecks.checkBuffer(indirect, (stride == 0 ? 4 : stride >> 2) * primcount); + nglMultiDrawArraysIndirect(mode, MemoryUtil.getAddress(indirect), primcount, stride, function_pointer); + } + + public static void glMultiDrawElementsIndirect(int mode, int type, ByteBuffer indirect, int primcount, int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiDrawElementsIndirect; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureIndirectBOdisabled(caps); + BufferChecks.checkBuffer(indirect, (stride == 0 ? 5 * 4 : stride) * primcount); + nglMultiDrawElementsIndirect(mode, type, MemoryUtil.getAddress(indirect), primcount, stride, function_pointer); + } + static native void nglMultiDrawElementsIndirect(int mode, int type, long indirect, int primcount, int stride, long function_pointer); + public static void glMultiDrawElementsIndirect(int mode, int type, long indirect_buffer_offset, int primcount, int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiDrawElementsIndirect; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureIndirectBOenabled(caps); + nglMultiDrawElementsIndirectBO(mode, type, indirect_buffer_offset, primcount, stride, function_pointer); + } + static native void nglMultiDrawElementsIndirectBO(int mode, int type, long indirect_buffer_offset, int primcount, int stride, long function_pointer); + + /** Overloads glMultiDrawElementsIndirect. */ + public static void glMultiDrawElementsIndirect(int mode, int type, IntBuffer indirect, int primcount, int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiDrawElementsIndirect; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureIndirectBOdisabled(caps); + BufferChecks.checkBuffer(indirect, (stride == 0 ? 5 : stride >> 2) * primcount); + nglMultiDrawElementsIndirect(mode, type, MemoryUtil.getAddress(indirect), primcount, stride, function_pointer); + } + + public static void glGetProgramInterface(int program, int programInterface, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramInterfaceiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetProgramInterfaceiv(program, programInterface, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetProgramInterfaceiv(int program, int programInterface, int pname, long params, long function_pointer); + + /** Overloads glGetProgramInterfaceiv. */ + public static int glGetProgramInterfacei(int program, int programInterface, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramInterfaceiv; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetProgramInterfaceiv(program, programInterface, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static int glGetProgramResourceIndex(int program, int programInterface, ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramResourceIndex; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(name); + BufferChecks.checkNullTerminated(name); + int __result = nglGetProgramResourceIndex(program, programInterface, MemoryUtil.getAddress(name), function_pointer); + return __result; + } + static native int nglGetProgramResourceIndex(int program, int programInterface, long name, long function_pointer); + + /** Overloads glGetProgramResourceIndex. */ + public static int glGetProgramResourceIndex(int program, int programInterface, CharSequence name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramResourceIndex; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglGetProgramResourceIndex(program, programInterface, APIUtil.getBufferNT(caps, name), function_pointer); + return __result; + } + + public static void glGetProgramResourceName(int program, int programInterface, int index, IntBuffer length, ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramResourceName; + BufferChecks.checkFunctionAddress(function_pointer); + if (length != null) + BufferChecks.checkBuffer(length, 1); + if (name != null) + BufferChecks.checkDirect(name); + nglGetProgramResourceName(program, programInterface, index, (name == null ? 0 : name.remaining()), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddressSafe(name), function_pointer); + } + static native void nglGetProgramResourceName(int program, int programInterface, int index, int name_bufSize, long length, long name, long function_pointer); + + /** Overloads glGetProgramResourceName. */ + public static String glGetProgramResourceName(int program, int programInterface, int index, int bufSize) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramResourceName; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer name_length = APIUtil.getLengths(caps); + ByteBuffer name = APIUtil.getBufferByte(caps, bufSize); + nglGetProgramResourceName(program, programInterface, index, bufSize, MemoryUtil.getAddress0(name_length), MemoryUtil.getAddress(name), function_pointer); + name.limit(name_length.get(0)); + return APIUtil.getString(caps, name); + } + + public static void glGetProgramResource(int program, int programInterface, int index, IntBuffer props, IntBuffer length, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramResourceiv; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(props); + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkDirect(params); + nglGetProgramResourceiv(program, programInterface, index, props.remaining(), MemoryUtil.getAddress(props), params.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetProgramResourceiv(int program, int programInterface, int index, int props_propCount, long props, int params_bufSize, long length, long params, long function_pointer); + + public static int glGetProgramResourceLocation(int program, int programInterface, ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramResourceLocation; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(name); + BufferChecks.checkNullTerminated(name); + int __result = nglGetProgramResourceLocation(program, programInterface, MemoryUtil.getAddress(name), function_pointer); + return __result; + } + static native int nglGetProgramResourceLocation(int program, int programInterface, long name, long function_pointer); + + /** Overloads glGetProgramResourceLocation. */ + public static int glGetProgramResourceLocation(int program, int programInterface, CharSequence name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramResourceLocation; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglGetProgramResourceLocation(program, programInterface, APIUtil.getBufferNT(caps, name), function_pointer); + return __result; + } + + public static int glGetProgramResourceLocationIndex(int program, int programInterface, ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramResourceLocationIndex; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(name); + BufferChecks.checkNullTerminated(name); + int __result = nglGetProgramResourceLocationIndex(program, programInterface, MemoryUtil.getAddress(name), function_pointer); + return __result; + } + static native int nglGetProgramResourceLocationIndex(int program, int programInterface, long name, long function_pointer); + + /** Overloads glGetProgramResourceLocationIndex. */ + public static int glGetProgramResourceLocationIndex(int program, int programInterface, CharSequence name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramResourceLocationIndex; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglGetProgramResourceLocationIndex(program, programInterface, APIUtil.getBufferNT(caps, name), function_pointer); + return __result; + } + + public static void glShaderStorageBlockBinding(int program, int storageBlockIndex, int storageBlockBinding) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glShaderStorageBlockBinding; + BufferChecks.checkFunctionAddress(function_pointer); + nglShaderStorageBlockBinding(program, storageBlockIndex, storageBlockBinding, function_pointer); + } + static native void nglShaderStorageBlockBinding(int program, int storageBlockIndex, int storageBlockBinding, long function_pointer); + + public static void glTexBufferRange(int target, int internalformat, int buffer, long offset, long size) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexBufferRange; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexBufferRange(target, internalformat, buffer, offset, size, function_pointer); + } + static native void nglTexBufferRange(int target, int internalformat, int buffer, long offset, long size, long function_pointer); + + public static void glTexStorage2DMultisample(int target, int samples, int internalformat, int width, int height, boolean fixedsamplelocations) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexStorage2DMultisample; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexStorage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations, function_pointer); + } + static native void nglTexStorage2DMultisample(int target, int samples, int internalformat, int width, int height, boolean fixedsamplelocations, long function_pointer); + + public static void glTexStorage3DMultisample(int target, int samples, int internalformat, int width, int height, int depth, boolean fixedsamplelocations) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexStorage3DMultisample; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexStorage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations, function_pointer); + } + static native void nglTexStorage3DMultisample(int target, int samples, int internalformat, int width, int height, int depth, boolean fixedsamplelocations, long function_pointer); + + public static void glTextureView(int texture, int target, int origtexture, int internalformat, int minlevel, int numlevels, int minlayer, int numlayers) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureView; + BufferChecks.checkFunctionAddress(function_pointer); + nglTextureView(texture, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers, function_pointer); + } + static native void nglTextureView(int texture, int target, int origtexture, int internalformat, int minlevel, int numlevels, int minlayer, int numlayers, long function_pointer); + + public static void glBindVertexBuffer(int bindingindex, int buffer, long offset, int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindVertexBuffer; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindVertexBuffer(bindingindex, buffer, offset, stride, function_pointer); + } + static native void nglBindVertexBuffer(int bindingindex, int buffer, long offset, int stride, long function_pointer); + + public static void glVertexAttribFormat(int attribindex, int size, int type, boolean normalized, int relativeoffset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribFormat; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribFormat(attribindex, size, type, normalized, relativeoffset, function_pointer); + } + static native void nglVertexAttribFormat(int attribindex, int size, int type, boolean normalized, int relativeoffset, long function_pointer); + + public static void glVertexAttribIFormat(int attribindex, int size, int type, int relativeoffset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribIFormat; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribIFormat(attribindex, size, type, relativeoffset, function_pointer); + } + static native void nglVertexAttribIFormat(int attribindex, int size, int type, int relativeoffset, long function_pointer); + + public static void glVertexAttribLFormat(int attribindex, int size, int type, int relativeoffset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribLFormat; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribLFormat(attribindex, size, type, relativeoffset, function_pointer); + } + static native void nglVertexAttribLFormat(int attribindex, int size, int type, int relativeoffset, long function_pointer); + + public static void glVertexAttribBinding(int attribindex, int bindingindex) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribBinding; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribBinding(attribindex, bindingindex, function_pointer); + } + static native void nglVertexAttribBinding(int attribindex, int bindingindex, long function_pointer); + + public static void glVertexBindingDivisor(int bindingindex, int divisor) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexBindingDivisor; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexBindingDivisor(bindingindex, divisor, function_pointer); + } + static native void nglVertexBindingDivisor(int bindingindex, int divisor, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL44.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL44.java new file mode 100644 index 0000000..ab9cbb3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GL44.java @@ -0,0 +1,304 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class GL44 { + + /** + * Implementation-dependent state which constrains the maximum value of stride parameters to vertex array pointer-setting commands. + */ + public static final int GL_MAX_VERTEX_ATTRIB_STRIDE = 0x82E5; + + /** + * Accepted in the <flags> parameter of BufferStorage and + * NamedBufferStorageEXT: + */ + public static final int GL_MAP_PERSISTENT_BIT = 0x40, + GL_MAP_COHERENT_BIT = 0x80, + GL_DYNAMIC_STORAGE_BIT = 0x100, + GL_CLIENT_STORAGE_BIT = 0x200; + + /** + * Accepted by the <pname> parameter of GetBufferParameter{i|i64}v:\ + */ + public static final int GL_BUFFER_IMMUTABLE_STORAGE = 0x821F, + GL_BUFFER_STORAGE_FLAGS = 0x8220; + + /** + * Accepted by the <barriers> parameter of MemoryBarrier: + */ + public static final int GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT = 0x4000; + + /** + * Accepted by the <pname> parameter for GetInternalformativ and + * GetInternalformati64v: + */ + public static final int GL_CLEAR_TEXTURE = 0x9365; + + /** + * Accepted in the <props> array of GetProgramResourceiv: + */ + public static final int GL_LOCATION_COMPONENT = 0x934A, + GL_TRANSFORM_FEEDBACK_BUFFER_INDEX = 0x934B, + GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE = 0x934C; + + /** + * Accepted by the <pname> parameter of GetQueryObjectiv, GetQueryObjectuiv, + * GetQueryObjecti64v and GetQueryObjectui64v: + */ + public static final int GL_QUERY_RESULT_NO_WAIT = 0x9194; + + /** + * Accepted by the <target> parameter of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, MapBufferRange, GetBufferSubData, + * GetBufferParameteriv, GetBufferParameteri64v, GetBufferPointerv, + * ClearBufferSubData, and the <readtarget> and <writetarget> parameters of + * CopyBufferSubData: + */ + public static final int GL_QUERY_BUFFER = 0x9192; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_QUERY_BUFFER_BINDING = 0x9193; + + /** + * Accepted in the <barriers> bitfield in MemoryBarrier: + */ + public static final int GL_QUERY_BUFFER_BARRIER_BIT = 0x8000; + + /** + * Accepted by the <param> parameter of TexParameter{if}, SamplerParameter{if} + * and SamplerParameter{if}v, and by the <params> parameter of + * TexParameter{if}v, TexParameterI{i ui}v and SamplerParameterI{i ui}v when + * their <pname> parameter is TEXTURE_WRAP_S, TEXTURE_WRAP_T, or + * TEXTURE_WRAP_R: + */ + public static final int GL_MIRROR_CLAMP_TO_EDGE = 0x8743; + + private GL44() {} + + public static void glBufferStorage(int target, ByteBuffer data, int flags) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferStorage; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglBufferStorage(target, data.remaining(), MemoryUtil.getAddress(data), flags, function_pointer); + } + public static void glBufferStorage(int target, DoubleBuffer data, int flags) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferStorage; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglBufferStorage(target, (data.remaining() << 3), MemoryUtil.getAddress(data), flags, function_pointer); + } + public static void glBufferStorage(int target, FloatBuffer data, int flags) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferStorage; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglBufferStorage(target, (data.remaining() << 2), MemoryUtil.getAddress(data), flags, function_pointer); + } + public static void glBufferStorage(int target, IntBuffer data, int flags) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferStorage; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglBufferStorage(target, (data.remaining() << 2), MemoryUtil.getAddress(data), flags, function_pointer); + } + public static void glBufferStorage(int target, ShortBuffer data, int flags) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferStorage; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglBufferStorage(target, (data.remaining() << 1), MemoryUtil.getAddress(data), flags, function_pointer); + } + public static void glBufferStorage(int target, LongBuffer data, int flags) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferStorage; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglBufferStorage(target, (data.remaining() << 3), MemoryUtil.getAddress(data), flags, function_pointer); + } + static native void nglBufferStorage(int target, long data_size, long data, int flags, long function_pointer); + + /** Overloads glBufferStorage. */ + public static void glBufferStorage(int target, long size, int flags) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferStorage; + BufferChecks.checkFunctionAddress(function_pointer); + nglBufferStorage(target, size, 0L, flags, function_pointer); + } + + public static void glClearTexImage(int texture, int level, int format, int type, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClearTexImage; + BufferChecks.checkFunctionAddress(function_pointer); + if (data != null) + BufferChecks.checkBuffer(data, 1); + nglClearTexImage(texture, level, format, type, MemoryUtil.getAddressSafe(data), function_pointer); + } + public static void glClearTexImage(int texture, int level, int format, int type, DoubleBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClearTexImage; + BufferChecks.checkFunctionAddress(function_pointer); + if (data != null) + BufferChecks.checkBuffer(data, 1); + nglClearTexImage(texture, level, format, type, MemoryUtil.getAddressSafe(data), function_pointer); + } + public static void glClearTexImage(int texture, int level, int format, int type, FloatBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClearTexImage; + BufferChecks.checkFunctionAddress(function_pointer); + if (data != null) + BufferChecks.checkBuffer(data, 1); + nglClearTexImage(texture, level, format, type, MemoryUtil.getAddressSafe(data), function_pointer); + } + public static void glClearTexImage(int texture, int level, int format, int type, IntBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClearTexImage; + BufferChecks.checkFunctionAddress(function_pointer); + if (data != null) + BufferChecks.checkBuffer(data, 1); + nglClearTexImage(texture, level, format, type, MemoryUtil.getAddressSafe(data), function_pointer); + } + public static void glClearTexImage(int texture, int level, int format, int type, ShortBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClearTexImage; + BufferChecks.checkFunctionAddress(function_pointer); + if (data != null) + BufferChecks.checkBuffer(data, 1); + nglClearTexImage(texture, level, format, type, MemoryUtil.getAddressSafe(data), function_pointer); + } + public static void glClearTexImage(int texture, int level, int format, int type, LongBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClearTexImage; + BufferChecks.checkFunctionAddress(function_pointer); + if (data != null) + BufferChecks.checkBuffer(data, 1); + nglClearTexImage(texture, level, format, type, MemoryUtil.getAddressSafe(data), function_pointer); + } + static native void nglClearTexImage(int texture, int level, int format, int type, long data, long function_pointer); + + public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClearTexSubImage; + BufferChecks.checkFunctionAddress(function_pointer); + if (data != null) + BufferChecks.checkBuffer(data, 1); + nglClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddressSafe(data), function_pointer); + } + public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, DoubleBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClearTexSubImage; + BufferChecks.checkFunctionAddress(function_pointer); + if (data != null) + BufferChecks.checkBuffer(data, 1); + nglClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddressSafe(data), function_pointer); + } + public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, FloatBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClearTexSubImage; + BufferChecks.checkFunctionAddress(function_pointer); + if (data != null) + BufferChecks.checkBuffer(data, 1); + nglClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddressSafe(data), function_pointer); + } + public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, IntBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClearTexSubImage; + BufferChecks.checkFunctionAddress(function_pointer); + if (data != null) + BufferChecks.checkBuffer(data, 1); + nglClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddressSafe(data), function_pointer); + } + public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, ShortBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClearTexSubImage; + BufferChecks.checkFunctionAddress(function_pointer); + if (data != null) + BufferChecks.checkBuffer(data, 1); + nglClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddressSafe(data), function_pointer); + } + public static void glClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, LongBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClearTexSubImage; + BufferChecks.checkFunctionAddress(function_pointer); + if (data != null) + BufferChecks.checkBuffer(data, 1); + nglClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddressSafe(data), function_pointer); + } + static native void nglClearTexSubImage(int texture, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, long data, long function_pointer); + + public static void glBindBuffersBase(int target, int first, int count, IntBuffer buffers) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindBuffersBase; + BufferChecks.checkFunctionAddress(function_pointer); + if (buffers != null) + BufferChecks.checkBuffer(buffers, count); + nglBindBuffersBase(target, first, count, MemoryUtil.getAddressSafe(buffers), function_pointer); + } + static native void nglBindBuffersBase(int target, int first, int count, long buffers, long function_pointer); + + public static void glBindBuffersRange(int target, int first, int count, IntBuffer buffers, PointerBuffer offsets, PointerBuffer sizes) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindBuffersRange; + BufferChecks.checkFunctionAddress(function_pointer); + if (buffers != null) + BufferChecks.checkBuffer(buffers, count); + if (offsets != null) + BufferChecks.checkBuffer(offsets, count); + if (sizes != null) + BufferChecks.checkBuffer(sizes, count); + nglBindBuffersRange(target, first, count, MemoryUtil.getAddressSafe(buffers), MemoryUtil.getAddressSafe(offsets), MemoryUtil.getAddressSafe(sizes), function_pointer); + } + static native void nglBindBuffersRange(int target, int first, int count, long buffers, long offsets, long sizes, long function_pointer); + + public static void glBindTextures(int first, int count, IntBuffer textures) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindTextures; + BufferChecks.checkFunctionAddress(function_pointer); + if (textures != null) + BufferChecks.checkBuffer(textures, count); + nglBindTextures(first, count, MemoryUtil.getAddressSafe(textures), function_pointer); + } + static native void nglBindTextures(int first, int count, long textures, long function_pointer); + + public static void glBindSamplers(int first, int count, IntBuffer samplers) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindSamplers; + BufferChecks.checkFunctionAddress(function_pointer); + if (samplers != null) + BufferChecks.checkBuffer(samplers, count); + nglBindSamplers(first, count, MemoryUtil.getAddressSafe(samplers), function_pointer); + } + static native void nglBindSamplers(int first, int count, long samplers, long function_pointer); + + public static void glBindImageTextures(int first, int count, IntBuffer textures) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindImageTextures; + BufferChecks.checkFunctionAddress(function_pointer); + if (textures != null) + BufferChecks.checkBuffer(textures, count); + nglBindImageTextures(first, count, MemoryUtil.getAddressSafe(textures), function_pointer); + } + static native void nglBindImageTextures(int first, int count, long textures, long function_pointer); + + public static void glBindVertexBuffers(int first, int count, IntBuffer buffers, PointerBuffer offsets, IntBuffer strides) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindVertexBuffers; + BufferChecks.checkFunctionAddress(function_pointer); + if (buffers != null) + BufferChecks.checkBuffer(buffers, count); + if (offsets != null) + BufferChecks.checkBuffer(offsets, count); + if (strides != null) + BufferChecks.checkBuffer(strides, count); + nglBindVertexBuffers(first, count, MemoryUtil.getAddressSafe(buffers), MemoryUtil.getAddressSafe(offsets), MemoryUtil.getAddressSafe(strides), function_pointer); + } + static native void nglBindVertexBuffers(int first, int count, long buffers, long offsets, long strides, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GREMEDYFrameTerminator.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GREMEDYFrameTerminator.java new file mode 100644 index 0000000..32b06d5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GREMEDYFrameTerminator.java @@ -0,0 +1,19 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class GREMEDYFrameTerminator { + + private GREMEDYFrameTerminator() {} + + public static void glFrameTerminatorGREMEDY() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFrameTerminatorGREMEDY; + BufferChecks.checkFunctionAddress(function_pointer); + nglFrameTerminatorGREMEDY(function_pointer); + } + static native void nglFrameTerminatorGREMEDY(long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GREMEDYStringMarker.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GREMEDYStringMarker.java new file mode 100644 index 0000000..9fec105 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/GREMEDYStringMarker.java @@ -0,0 +1,28 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class GREMEDYStringMarker { + + private GREMEDYStringMarker() {} + + public static void glStringMarkerGREMEDY(ByteBuffer string) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glStringMarkerGREMEDY; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(string); + nglStringMarkerGREMEDY(string.remaining(), MemoryUtil.getAddress(string), function_pointer); + } + static native void nglStringMarkerGREMEDY(int string_len, long string, long function_pointer); + + /** Overloads glStringMarkerGREMEDY. */ + public static void glStringMarkerGREMEDY(CharSequence string) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glStringMarkerGREMEDY; + BufferChecks.checkFunctionAddress(function_pointer); + nglStringMarkerGREMEDY(string.length(), APIUtil.getBuffer(caps, string), function_pointer); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/HPOcclusionTest.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/HPOcclusionTest.java new file mode 100644 index 0000000..f56d5f2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/HPOcclusionTest.java @@ -0,0 +1,23 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class HPOcclusionTest { + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, by + * the <pname> of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev : + */ + public static final int GL_OCCLUSION_TEST_HP = 0x8165; + + /** + * Accepted by the <pname> of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev : + */ + public static final int GL_OCCLUSION_TEST_RESULT_HP = 0x8166; + + private HPOcclusionTest() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/IBMRasterposClip.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/IBMRasterposClip.java new file mode 100644 index 0000000..c9a2467 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/IBMRasterposClip.java @@ -0,0 +1,17 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class IBMRasterposClip { + + /** + * Accepted by the <target> parameter of Enable and Disable and the <value> + * parameter of IsEnabled, GetBooleanv, GetIntegerv, GetFloatv, GetDoublev: + */ + public static final int GL_RASTER_POSITION_UNCLIPPED_IBM = 0x19262; + + private IBMRasterposClip() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/INTELMapTexture.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/INTELMapTexture.java new file mode 100644 index 0000000..c1b2521 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/INTELMapTexture.java @@ -0,0 +1,57 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class INTELMapTexture { + + /** + * Accepted by the <pname> parameter of TexParameteri, for target TEXTURE_2D + */ + public static final int GL_TEXTURE_MEMORY_LAYOUT_INTEL = 0x83FF; + + /** + * Accepted by the <params> when <pname> is set to + * <TEXTURE_MEMORY_LAYOUT_INTEL>: + */ + public static final int GL_LAYOUT_DEFAULT_INTEL = 0x0, + GL_LAYOUT_LINEAR_INTEL = 0x1, + GL_LAYOUT_LINEAR_CPU_CACHED_INTEL = 0x2; + + private INTELMapTexture() {} + + /** + * The length parameter does not exist in the native API. It used by LWJGL to return a ByteBuffer + * with a proper capacity. + */ + public static ByteBuffer glMapTexture2DINTEL(int texture, int level, long length, int access, IntBuffer stride, IntBuffer layout, ByteBuffer old_buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMapTexture2DINTEL; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(stride, 1); + BufferChecks.checkBuffer(layout, 1); + if (old_buffer != null) + BufferChecks.checkDirect(old_buffer); + ByteBuffer __result = nglMapTexture2DINTEL(texture, level, length, access, MemoryUtil.getAddress(stride), MemoryUtil.getAddress(layout), old_buffer, function_pointer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + static native ByteBuffer nglMapTexture2DINTEL(int texture, int level, long length, int access, long stride, long layout, ByteBuffer old_buffer, long function_pointer); + + public static void glUnmapTexture2DINTEL(int texture, int level) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUnmapTexture2DINTEL; + BufferChecks.checkFunctionAddress(function_pointer); + nglUnmapTexture2DINTEL(texture, level, function_pointer); + } + static native void nglUnmapTexture2DINTEL(int texture, int level, long function_pointer); + + public static void glSyncTextureINTEL(int texture) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSyncTextureINTEL; + BufferChecks.checkFunctionAddress(function_pointer); + nglSyncTextureINTEL(texture, function_pointer); + } + static native void nglSyncTextureINTEL(int texture, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/KHRDebug.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/KHRDebug.java new file mode 100644 index 0000000..a1cc4a5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/KHRDebug.java @@ -0,0 +1,179 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class KHRDebug { + + /** + * Tokens accepted by the <target> parameters of Enable, Disable, and + * IsEnabled: + */ + public static final int GL_DEBUG_OUTPUT = 0x92E0, + GL_DEBUG_OUTPUT_SYNCHRONOUS = 0x8242; + + /** + * Returned by GetIntegerv when <pname> is CONTEXT_FLAGS: + */ + public static final int GL_CONTEXT_FLAG_DEBUG_BIT = 0x2; + + /** + * Tokens accepted by the <value> parameters of GetBooleanv, GetIntegerv, + * GetFloatv, GetDoublev and GetInteger64v: + */ + public static final int GL_MAX_DEBUG_MESSAGE_LENGTH = 0x9143, + GL_MAX_DEBUG_LOGGED_MESSAGES = 0x9144, + GL_DEBUG_LOGGED_MESSAGES = 0x9145, + GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH = 0x8243, + GL_MAX_DEBUG_GROUP_STACK_DEPTH = 0x826C, + GL_DEBUG_GROUP_STACK_DEPTH = 0x826D, + GL_MAX_LABEL_LENGTH = 0x82E8; + + /** + * Tokens accepted by the <pname> parameter of GetPointerv: + */ + public static final int GL_DEBUG_CALLBACK_FUNCTION = 0x8244, + GL_DEBUG_CALLBACK_USER_PARAM = 0x8245; + + /** + * Tokens accepted or provided by the <source> parameters of + * DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <sources> + * parameter of GetDebugMessageLog: + */ + public static final int GL_DEBUG_SOURCE_API = 0x8246, + GL_DEBUG_SOURCE_WINDOW_SYSTEM = 0x8247, + GL_DEBUG_SOURCE_SHADER_COMPILER = 0x8248, + GL_DEBUG_SOURCE_THIRD_PARTY = 0x8249, + GL_DEBUG_SOURCE_APPLICATION = 0x824A, + GL_DEBUG_SOURCE_OTHER = 0x824B; + + /** + * Tokens accepted or provided by the <type> parameters of + * DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <types> + * parameter of GetDebugMessageLog: + */ + public static final int GL_DEBUG_TYPE_ERROR = 0x824C, + GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR = 0x824D, + GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR = 0x824E, + GL_DEBUG_TYPE_PORTABILITY = 0x824F, + GL_DEBUG_TYPE_PERFORMANCE = 0x8250, + GL_DEBUG_TYPE_OTHER = 0x8251, + GL_DEBUG_TYPE_MARKER = 0x8268; + + /** + * Tokens accepted or provided by the <type> parameters of + * DebugMessageControl and DEBUGPROC, and the <types> parameter of + * GetDebugMessageLog: + */ + public static final int GL_DEBUG_TYPE_PUSH_GROUP = 0x8269, + GL_DEBUG_TYPE_POP_GROUP = 0x826A; + + /** + * Tokens accepted or provided by the <severity> parameters of + * DebugMessageControl, DebugMessageInsert and DEBUGPROC callback functions, + * and the <severities> parameter of GetDebugMessageLog: + */ + public static final int GL_DEBUG_SEVERITY_HIGH = 0x9146, + GL_DEBUG_SEVERITY_MEDIUM = 0x9147, + GL_DEBUG_SEVERITY_LOW = 0x9148, + GL_DEBUG_SEVERITY_NOTIFICATION = 0x826B; + + /** + * Returned by GetError: + */ + public static final int GL_STACK_UNDERFLOW = 0x504, + GL_STACK_OVERFLOW = 0x503; + + /** + * Tokens accepted or provided by the <identifier> parameters of + * ObjectLabel and GetObjectLabel: + */ + public static final int GL_BUFFER = 0x82E0, + GL_SHADER = 0x82E1, + GL_PROGRAM = 0x82E2, + GL_QUERY = 0x82E3, + GL_PROGRAM_PIPELINE = 0x82E4, + GL_SAMPLER = 0x82E6, + GL_DISPLAY_LIST = 0x82E7; + + private KHRDebug() {} + + public static void glDebugMessageControl(int source, int type, int severity, IntBuffer ids, boolean enabled) { + GL43.glDebugMessageControl(source, type, severity, ids, enabled); + } + + public static void glDebugMessageInsert(int source, int type, int id, int severity, ByteBuffer buf) { + GL43.glDebugMessageInsert(source, type, id, severity, buf); + } + + /** Overloads glDebugMessageInsert. */ + public static void glDebugMessageInsert(int source, int type, int id, int severity, CharSequence buf) { + GL43.glDebugMessageInsert(source, type, id, severity, buf); + } + + /** + * The {@code KHRDebugCallback.Handler} implementation passed to this method will be used for + * KHR_debug messages. If callback is null, any previously registered handler for the current + * thread will be unregistered and stop receiving messages. + *

+ * @param callback the callback function to use + */ + public static void glDebugMessageCallback(KHRDebugCallback callback) { + GL43.glDebugMessageCallback(callback); + } + + public static int glGetDebugMessageLog(int count, IntBuffer sources, IntBuffer types, IntBuffer ids, IntBuffer severities, IntBuffer lengths, ByteBuffer messageLog) { + return GL43.glGetDebugMessageLog(count, sources, types, ids, severities, lengths, messageLog); + } + + public static void glPushDebugGroup(int source, int id, ByteBuffer message) { + GL43.glPushDebugGroup(source, id, message); + } + + /** Overloads glPushDebugGroup. */ + public static void glPushDebugGroup(int source, int id, CharSequence message) { + GL43.glPushDebugGroup(source, id, message); + } + + public static void glPopDebugGroup() { + GL43.glPopDebugGroup(); + } + + public static void glObjectLabel(int identifier, int name, ByteBuffer label) { + GL43.glObjectLabel(identifier, name, label); + } + + /** Overloads glObjectLabel. */ + public static void glObjectLabel(int identifier, int name, CharSequence label) { + GL43.glObjectLabel(identifier, name, label); + } + + public static void glGetObjectLabel(int identifier, int name, IntBuffer length, ByteBuffer label) { + GL43.glGetObjectLabel(identifier, name, length, label); + } + + /** Overloads glGetObjectLabel. */ + public static String glGetObjectLabel(int identifier, int name, int bufSize) { + return GL43.glGetObjectLabel(identifier, name, bufSize); + } + + public static void glObjectPtrLabel(PointerWrapper ptr, ByteBuffer label) { + GL43.glObjectPtrLabel(ptr, label); + } + + /** Overloads glObjectPtrLabel. */ + public static void glObjectPtrLabel(PointerWrapper ptr, CharSequence label) { + GL43.glObjectPtrLabel(ptr, label); + } + + public static void glGetObjectPtrLabel(PointerWrapper ptr, IntBuffer length, ByteBuffer label) { + GL43.glGetObjectPtrLabel(ptr, length, label); + } + + /** Overloads glGetObjectPtrLabel. */ + public static String glGetObjectPtrLabel(PointerWrapper ptr, int bufSize) { + return GL43.glGetObjectPtrLabel(ptr, bufSize); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/KHRTextureCompressionAstcLdr.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/KHRTextureCompressionAstcLdr.java new file mode 100644 index 0000000..2645e32 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/KHRTextureCompressionAstcLdr.java @@ -0,0 +1,45 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class KHRTextureCompressionAstcLdr { + + /** + * Accepted by the <internalformat> parameter of CompressedTexImage2D, + * CompressedTexSubImage2D, TexStorage2D, TextureStorage2D, TexStorage3D, + * and TextureStorage3D: + */ + public static final int GL_COMPRESSED_RGBA_ASTC_4x4_KHR = 0x93B0, + GL_COMPRESSED_RGBA_ASTC_5x4_KHR = 0x93B1, + GL_COMPRESSED_RGBA_ASTC_5x5_KHR = 0x93B2, + GL_COMPRESSED_RGBA_ASTC_6x5_KHR = 0x93B3, + GL_COMPRESSED_RGBA_ASTC_6x6_KHR = 0x93B4, + GL_COMPRESSED_RGBA_ASTC_8x5_KHR = 0x93B5, + GL_COMPRESSED_RGBA_ASTC_8x6_KHR = 0x93B6, + GL_COMPRESSED_RGBA_ASTC_8x8_KHR = 0x93B7, + GL_COMPRESSED_RGBA_ASTC_10x5_KHR = 0x93B8, + GL_COMPRESSED_RGBA_ASTC_10x6_KHR = 0x93B9, + GL_COMPRESSED_RGBA_ASTC_10x8_KHR = 0x93BA, + GL_COMPRESSED_RGBA_ASTC_10x10_KHR = 0x93BB, + GL_COMPRESSED_RGBA_ASTC_12x10_KHR = 0x93BC, + GL_COMPRESSED_RGBA_ASTC_12x12_KHR = 0x93BD, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR = 0x93D0, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR = 0x93D1, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR = 0x93D2, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR = 0x93D3, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR = 0x93D4, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR = 0x93D5, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR = 0x93D6, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR = 0x93D7, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR = 0x93D8, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR = 0x93D9, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR = 0x93DA, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR = 0x93DB, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR = 0x93DC, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR = 0x93DD; + + private KHRTextureCompressionAstcLdr() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVBindlessMultiDrawIndirect.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVBindlessMultiDrawIndirect.java new file mode 100644 index 0000000..920fadd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVBindlessMultiDrawIndirect.java @@ -0,0 +1,47 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVBindlessMultiDrawIndirect { + + private NVBindlessMultiDrawIndirect() {} + + public static void glMultiDrawArraysIndirectBindlessNV(int mode, ByteBuffer indirect, int drawCount, int stride, int vertexBufferCount) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiDrawArraysIndirectBindlessNV; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureIndirectBOdisabled(caps); + BufferChecks.checkBuffer(indirect, (stride == 0 ? 20 + 24 * vertexBufferCount : stride) * drawCount); + nglMultiDrawArraysIndirectBindlessNV(mode, MemoryUtil.getAddress(indirect), drawCount, stride, vertexBufferCount, function_pointer); + } + static native void nglMultiDrawArraysIndirectBindlessNV(int mode, long indirect, int drawCount, int stride, int vertexBufferCount, long function_pointer); + public static void glMultiDrawArraysIndirectBindlessNV(int mode, long indirect_buffer_offset, int drawCount, int stride, int vertexBufferCount) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiDrawArraysIndirectBindlessNV; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureIndirectBOenabled(caps); + nglMultiDrawArraysIndirectBindlessNVBO(mode, indirect_buffer_offset, drawCount, stride, vertexBufferCount, function_pointer); + } + static native void nglMultiDrawArraysIndirectBindlessNVBO(int mode, long indirect_buffer_offset, int drawCount, int stride, int vertexBufferCount, long function_pointer); + + public static void glMultiDrawElementsIndirectBindlessNV(int mode, int type, ByteBuffer indirect, int drawCount, int stride, int vertexBufferCount) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiDrawElementsIndirectBindlessNV; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureIndirectBOdisabled(caps); + BufferChecks.checkBuffer(indirect, (stride == 0 ? 48 + 24 * vertexBufferCount : stride) * drawCount); + nglMultiDrawElementsIndirectBindlessNV(mode, type, MemoryUtil.getAddress(indirect), drawCount, stride, vertexBufferCount, function_pointer); + } + static native void nglMultiDrawElementsIndirectBindlessNV(int mode, int type, long indirect, int drawCount, int stride, int vertexBufferCount, long function_pointer); + public static void glMultiDrawElementsIndirectBindlessNV(int mode, int type, long indirect_buffer_offset, int drawCount, int stride, int vertexBufferCount) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiDrawElementsIndirectBindlessNV; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureIndirectBOenabled(caps); + nglMultiDrawElementsIndirectBindlessNVBO(mode, type, indirect_buffer_offset, drawCount, stride, vertexBufferCount, function_pointer); + } + static native void nglMultiDrawElementsIndirectBindlessNVBO(int mode, int type, long indirect_buffer_offset, int drawCount, int stride, int vertexBufferCount, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVBindlessTexture.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVBindlessTexture.java new file mode 100644 index 0000000..e81ae7e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVBindlessTexture.java @@ -0,0 +1,122 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVBindlessTexture { + + private NVBindlessTexture() {} + + public static long glGetTextureHandleNV(int texture) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTextureHandleNV; + BufferChecks.checkFunctionAddress(function_pointer); + long __result = nglGetTextureHandleNV(texture, function_pointer); + return __result; + } + static native long nglGetTextureHandleNV(int texture, long function_pointer); + + public static long glGetTextureSamplerHandleNV(int texture, int sampler) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTextureSamplerHandleNV; + BufferChecks.checkFunctionAddress(function_pointer); + long __result = nglGetTextureSamplerHandleNV(texture, sampler, function_pointer); + return __result; + } + static native long nglGetTextureSamplerHandleNV(int texture, int sampler, long function_pointer); + + public static void glMakeTextureHandleResidentNV(long handle) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMakeTextureHandleResidentNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglMakeTextureHandleResidentNV(handle, function_pointer); + } + static native void nglMakeTextureHandleResidentNV(long handle, long function_pointer); + + public static void glMakeTextureHandleNonResidentNV(long handle) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMakeTextureHandleNonResidentNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglMakeTextureHandleNonResidentNV(handle, function_pointer); + } + static native void nglMakeTextureHandleNonResidentNV(long handle, long function_pointer); + + public static long glGetImageHandleNV(int texture, int level, boolean layered, int layer, int format) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetImageHandleNV; + BufferChecks.checkFunctionAddress(function_pointer); + long __result = nglGetImageHandleNV(texture, level, layered, layer, format, function_pointer); + return __result; + } + static native long nglGetImageHandleNV(int texture, int level, boolean layered, int layer, int format, long function_pointer); + + public static void glMakeImageHandleResidentNV(long handle, int access) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMakeImageHandleResidentNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglMakeImageHandleResidentNV(handle, access, function_pointer); + } + static native void nglMakeImageHandleResidentNV(long handle, int access, long function_pointer); + + public static void glMakeImageHandleNonResidentNV(long handle) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMakeImageHandleNonResidentNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglMakeImageHandleNonResidentNV(handle, function_pointer); + } + static native void nglMakeImageHandleNonResidentNV(long handle, long function_pointer); + + public static void glUniformHandleui64NV(int location, long value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformHandleui64NV; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniformHandleui64NV(location, value, function_pointer); + } + static native void nglUniformHandleui64NV(int location, long value, long function_pointer); + + public static void glUniformHandleuNV(int location, LongBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformHandleui64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniformHandleui64vNV(location, value.remaining(), MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniformHandleui64vNV(int location, int value_count, long value, long function_pointer); + + public static void glProgramUniformHandleui64NV(int program, int location, long value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformHandleui64NV; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniformHandleui64NV(program, location, value, function_pointer); + } + static native void nglProgramUniformHandleui64NV(int program, int location, long value, long function_pointer); + + public static void glProgramUniformHandleuNV(int program, int location, LongBuffer values) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformHandleui64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(values); + nglProgramUniformHandleui64vNV(program, location, values.remaining(), MemoryUtil.getAddress(values), function_pointer); + } + static native void nglProgramUniformHandleui64vNV(int program, int location, int values_count, long values, long function_pointer); + + public static boolean glIsTextureHandleResidentNV(long handle) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsTextureHandleResidentNV; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsTextureHandleResidentNV(handle, function_pointer); + return __result; + } + static native boolean nglIsTextureHandleResidentNV(long handle, long function_pointer); + + public static boolean glIsImageHandleResidentNV(long handle) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsImageHandleResidentNV; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsImageHandleResidentNV(handle, function_pointer); + return __result; + } + static native boolean nglIsImageHandleResidentNV(long handle, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVBlendEquationAdvanced.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVBlendEquationAdvanced.java new file mode 100644 index 0000000..f1a26a5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVBlendEquationAdvanced.java @@ -0,0 +1,93 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVBlendEquationAdvanced { + + /** + * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, and by + * the <pname> parameter of GetIntegerv, GetBooleanv, GetFloatv, GetDoublev + * and GetInteger64v: + */ + public static final int GL_BLEND_ADVANCED_COHERENT_NV = 0x9285; + + /** + * Accepted by the <pname> parameter of BlendParameteriNV, GetBooleanv, + * GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev: + */ + public static final int GL_BLEND_PREMULTIPLIED_SRC_NV = 0x9280, + GL_BLEND_OVERLAP_NV = 0x9281; + + /** + * Accepted by the <value> parameter of BlendParameteriNV when <pname> is + * BLEND_OVERLAP_NV: + */ + public static final int GL_UNCORRELATED_NV = 0x9282, + GL_DISJOINT_NV = 0x9283, + GL_CONJOINT_NV = 0x9284; + + /** + * Accepted by the <mode> parameter of BlendEquation and BlendEquationi: + */ + public static final int GL_SRC_NV = 0x9286, + GL_DST_NV = 0x9287, + GL_SRC_OVER_NV = 0x9288, + GL_DST_OVER_NV = 0x9289, + GL_SRC_IN_NV = 0x928A, + GL_DST_IN_NV = 0x928B, + GL_SRC_OUT_NV = 0x928C, + GL_DST_OUT_NV = 0x928D, + GL_SRC_ATOP_NV = 0x928E, + GL_DST_ATOP_NV = 0x928F, + GL_MULTIPLY_NV = 0x9294, + GL_SCREEN_NV = 0x9295, + GL_OVERLAY_NV = 0x9296, + GL_DARKEN_NV = 0x9297, + GL_LIGHTEN_NV = 0x9298, + GL_COLORDODGE_NV = 0x9299, + GL_COLORBURN_NV = 0x929A, + GL_HARDLIGHT_NV = 0x929B, + GL_SOFTLIGHT_NV = 0x929C, + GL_DIFFERENCE_NV = 0x929E, + GL_EXCLUSION_NV = 0x92A0, + GL_INVERT_RGB_NV = 0x92A3, + GL_LINEARDODGE_NV = 0x92A4, + GL_LINEARBURN_NV = 0x92A5, + GL_VIVIDLIGHT_NV = 0x92A6, + GL_LINEARLIGHT_NV = 0x92A7, + GL_PINLIGHT_NV = 0x92A8, + GL_HARDMIX_NV = 0x92A9, + GL_HSL_HUE_NV = 0x92AD, + GL_HSL_SATURATION_NV = 0x92AE, + GL_HSL_COLOR_NV = 0x92AF, + GL_HSL_LUMINOSITY_NV = 0x92B0, + GL_PLUS_NV = 0x9291, + GL_PLUS_CLAMPED_NV = 0x92B1, + GL_PLUS_CLAMPED_ALPHA_NV = 0x92B2, + GL_PLUS_DARKER_NV = 0x9292, + GL_MINUS_NV = 0x929F, + GL_MINUS_CLAMPED_NV = 0x92B3, + GL_CONTRAST_NV = 0x92A1, + GL_INVERT_OVG_NV = 0x92B4; + + private NVBlendEquationAdvanced() {} + + public static void glBlendParameteriNV(int pname, int value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBlendParameteriNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglBlendParameteriNV(pname, value, function_pointer); + } + static native void nglBlendParameteriNV(int pname, int value, long function_pointer); + + public static void glBlendBarrierNV() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBlendBarrierNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglBlendBarrierNV(function_pointer); + } + static native void nglBlendBarrierNV(long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVComputeProgram5.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVComputeProgram5.java new file mode 100644 index 0000000..e47c4cd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVComputeProgram5.java @@ -0,0 +1,30 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVComputeProgram5 { + + /** + * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, + * by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev, and by the <target> parameter of ProgramStringARB, + * BindProgramARB, ProgramEnvParameter4[df][v]ARB, + * ProgramLocalParameter4[df][v]ARB, GetProgramEnvParameter[df]vARB, + * GetProgramLocalParameter[df]vARB, GetProgramivARB and + * GetProgramStringARB: + */ + public static final int GL_COMPUTE_PROGRAM_NV = 0x90FB; + + /** + * Accepted by the <target> parameter of ProgramBufferParametersfvNV, + * ProgramBufferParametersIivNV, and ProgramBufferParametersIuivNV, + * BindBufferRangeNV, BindBufferOffsetNV, BindBufferBaseNV, and BindBuffer + * and the <value> parameter of GetIntegerIndexedvEXT: + */ + public static final int GL_COMPUTE_PROGRAM_PARAMETER_BUFFER_NV = 0x90FC; + + private NVComputeProgram5() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVConditionalRender.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVConditionalRender.java new file mode 100644 index 0000000..fb1fd41 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVConditionalRender.java @@ -0,0 +1,35 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVConditionalRender { + + /** + * Accepted by the <mode> parameter of BeginConditionalRenderNV: + */ + public static final int GL_QUERY_WAIT_NV = 0x8E13, + GL_QUERY_NO_WAIT_NV = 0x8E14, + GL_QUERY_BY_REGION_WAIT_NV = 0x8E15, + GL_QUERY_BY_REGION_NO_WAIT_NV = 0x8E16; + + private NVConditionalRender() {} + + public static void glBeginConditionalRenderNV(int id, int mode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBeginConditionalRenderNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglBeginConditionalRenderNV(id, mode, function_pointer); + } + static native void nglBeginConditionalRenderNV(int id, int mode, long function_pointer); + + public static void glEndConditionalRenderNV() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEndConditionalRenderNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglEndConditionalRenderNV(function_pointer); + } + static native void nglEndConditionalRenderNV(long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVCopyDepthToColor.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVCopyDepthToColor.java new file mode 100644 index 0000000..2cfb4c8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVCopyDepthToColor.java @@ -0,0 +1,14 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVCopyDepthToColor { + + public static final int GL_DEPTH_STENCIL_TO_RGBA_NV = 0x886E, + GL_DEPTH_STENCIL_TO_BGRA_NV = 0x886F; + + private NVCopyDepthToColor() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVCopyImage.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVCopyImage.java new file mode 100644 index 0000000..8ea9328 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVCopyImage.java @@ -0,0 +1,19 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVCopyImage { + + private NVCopyImage() {} + + public static void glCopyImageSubDataNV(int srcName, int srcTarget, int srcLevel, int srcX, int srcY, int srcZ, int dstName, int dstTarget, int dstLevel, int dstX, int dstY, int dstZ, int width, int height, int depth) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCopyImageSubDataNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglCopyImageSubDataNV(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, width, height, depth, function_pointer); + } + static native void nglCopyImageSubDataNV(int srcName, int srcTarget, int srcLevel, int srcX, int srcY, int srcZ, int dstName, int dstTarget, int dstLevel, int dstX, int dstY, int dstZ, int width, int height, int depth, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVDeepTexture3D.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVDeepTexture3D.java new file mode 100644 index 0000000..9af787c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVDeepTexture3D.java @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVDeepTexture3D { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv + * and GetFloatv: + */ + public static final int GL_MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV = 0x90D0, + GL_MAX_DEEP_3D_TEXTURE_DEPTH_NV = 0x90D1; + + private NVDeepTexture3D() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVDepthBufferFloat.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVDepthBufferFloat.java new file mode 100644 index 0000000..fda6d9d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVDepthBufferFloat.java @@ -0,0 +1,57 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVDepthBufferFloat { + + /** + * Accepted by the <internalformat> parameter of TexImage1D, TexImage2D, + * TexImage3D, CopyTexImage1D, CopyTexImage2D, and RenderbufferStorageEXT, + * and returned in the <data> parameter of GetTexLevelParameter and + * GetRenderbufferParameterivEXT: + */ + public static final int GL_DEPTH_COMPONENT32F_NV = 0x8DAB, + GL_DEPTH32F_STENCIL8_NV = 0x8DAC; + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, TexImage1D, + * TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, and + * GetTexImage: + */ + public static final int GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV = 0x8DAD; + + /** + * Accepted by the <pname> parameters of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_DEPTH_BUFFER_FLOAT_MODE_NV = 0x8DAF; + + private NVDepthBufferFloat() {} + + public static void glDepthRangedNV(double n, double f) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDepthRangedNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglDepthRangedNV(n, f, function_pointer); + } + static native void nglDepthRangedNV(double n, double f, long function_pointer); + + public static void glClearDepthdNV(double d) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glClearDepthdNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglClearDepthdNV(d, function_pointer); + } + static native void nglClearDepthdNV(double d, long function_pointer); + + public static void glDepthBoundsdNV(double zmin, double zmax) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDepthBoundsdNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglDepthBoundsdNV(zmin, zmax, function_pointer); + } + static native void nglDepthBoundsdNV(double zmin, double zmax, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVDepthClamp.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVDepthClamp.java new file mode 100644 index 0000000..5548e32 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVDepthClamp.java @@ -0,0 +1,13 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVDepthClamp { + + public static final int GL_DEPTH_CLAMP_NV = 0x864F; + + private NVDepthClamp() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVDrawTexture.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVDrawTexture.java new file mode 100644 index 0000000..20a6968 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVDrawTexture.java @@ -0,0 +1,19 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVDrawTexture { + + private NVDrawTexture() {} + + public static void glDrawTextureNV(int texture, int sampler, float x0, float y0, float x1, float y1, float z, float s0, float t0, float s1, float t1) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawTextureNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglDrawTextureNV(texture, sampler, x0, y0, x1, y1, z, s0, t0, s1, t1, function_pointer); + } + static native void nglDrawTextureNV(int texture, int sampler, float x0, float y0, float x1, float y1, float z, float s0, float t0, float s1, float t1, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVEvaluators.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVEvaluators.java new file mode 100644 index 0000000..90bbb36 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVEvaluators.java @@ -0,0 +1,116 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVEvaluators { + + public static final int GL_EVAL_2D_NV = 0x86C0, + GL_EVAL_TRIANGULAR_2D_NV = 0x86C1, + GL_MAP_TESSELLATION_NV = 0x86C2, + GL_MAP_ATTRIB_U_ORDER_NV = 0x86C3, + GL_MAP_ATTRIB_V_ORDER_NV = 0x86C4, + GL_EVAL_FRACTIONAL_TESSELLATION_NV = 0x86C5, + GL_EVAL_VERTEX_ATTRIB0_NV = 0x86C6, + GL_EVAL_VERTEX_ATTRIB1_NV = 0x86C7, + GL_EVAL_VERTEX_ATTRIB2_NV = 0x86C8, + GL_EVAL_VERTEX_ATTRIB3_NV = 0x86C9, + GL_EVAL_VERTEX_ATTRIB4_NV = 0x86CA, + GL_EVAL_VERTEX_ATTRIB5_NV = 0x86CB, + GL_EVAL_VERTEX_ATTRIB6_NV = 0x86CC, + GL_EVAL_VERTEX_ATTRIB7_NV = 0x86CD, + GL_EVAL_VERTEX_ATTRIB8_NV = 0x86CE, + GL_EVAL_VERTEX_ATTRIB9_NV = 0x86CF, + GL_EVAL_VERTEX_ATTRIB10_NV = 0x86D0, + GL_EVAL_VERTEX_ATTRIB11_NV = 0x86D1, + GL_EVAL_VERTEX_ATTRIB12_NV = 0x86D2, + GL_EVAL_VERTEX_ATTRIB13_NV = 0x86D3, + GL_EVAL_VERTEX_ATTRIB14_NV = 0x86D4, + GL_EVAL_VERTEX_ATTRIB15_NV = 0x86D5, + GL_MAX_MAP_TESSELLATION_NV = 0x86D6, + GL_MAX_RATIONAL_EVAL_ORDER_NV = 0x86D7; + + private NVEvaluators() {} + + public static void glGetMapControlPointsNV(int target, int index, int type, int ustride, int vstride, boolean packed, FloatBuffer pPoints) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMapControlPointsNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pPoints); + nglGetMapControlPointsNV(target, index, type, ustride, vstride, packed, MemoryUtil.getAddress(pPoints), function_pointer); + } + static native void nglGetMapControlPointsNV(int target, int index, int type, int ustride, int vstride, boolean packed, long pPoints, long function_pointer); + + public static void glMapControlPointsNV(int target, int index, int type, int ustride, int vstride, int uorder, int vorder, boolean packed, FloatBuffer pPoints) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMapControlPointsNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pPoints); + nglMapControlPointsNV(target, index, type, ustride, vstride, uorder, vorder, packed, MemoryUtil.getAddress(pPoints), function_pointer); + } + static native void nglMapControlPointsNV(int target, int index, int type, int ustride, int vstride, int uorder, int vorder, boolean packed, long pPoints, long function_pointer); + + public static void glMapParameterNV(int target, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMapParameterfvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglMapParameterfvNV(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglMapParameterfvNV(int target, int pname, long params, long function_pointer); + + public static void glMapParameterNV(int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMapParameterivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglMapParameterivNV(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglMapParameterivNV(int target, int pname, long params, long function_pointer); + + public static void glGetMapParameterNV(int target, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMapParameterfvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetMapParameterfvNV(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetMapParameterfvNV(int target, int pname, long params, long function_pointer); + + public static void glGetMapParameterNV(int target, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMapParameterivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetMapParameterivNV(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetMapParameterivNV(int target, int pname, long params, long function_pointer); + + public static void glGetMapAttribParameterNV(int target, int index, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMapAttribParameterfvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetMapAttribParameterfvNV(target, index, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetMapAttribParameterfvNV(int target, int index, int pname, long params, long function_pointer); + + public static void glGetMapAttribParameterNV(int target, int index, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMapAttribParameterivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetMapAttribParameterivNV(target, index, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetMapAttribParameterivNV(int target, int index, int pname, long params, long function_pointer); + + public static void glEvalMapsNV(int target, int mode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEvalMapsNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglEvalMapsNV(target, mode, function_pointer); + } + static native void nglEvalMapsNV(int target, int mode, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVExplicitMultisample.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVExplicitMultisample.java new file mode 100644 index 0000000..1cf63c2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVExplicitMultisample.java @@ -0,0 +1,92 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVExplicitMultisample { + + /** + * Accepted by the <pname> parameter of GetMultisamplefvNV: + */ + public static final int GL_SAMPLE_POSITION_NV = 0x8E50; + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, and by + * the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev: + */ + public static final int GL_SAMPLE_MASK_NV = 0x8E51; + + /** + * Accepted by the <pname> parameter of GetBooleanIndexedvEXT and + * GetIntegerIndexedvEXT: + */ + public static final int GL_SAMPLE_MASK_VALUE_NV = 0x8E52; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv, + * and GetFloatv: + */ + public static final int GL_TEXTURE_BINDING_RENDERBUFFER_NV = 0x8E53, + GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV = 0x8E54, + GL_MAX_SAMPLE_MASK_WORDS_NV = 0x8E59; + + /** + * Accepted by the <target> parameter of BindTexture, and TexRenderbufferNV: + */ + public static final int GL_TEXTURE_RENDERBUFFER_NV = 0x8E55; + + /** + * Returned by the <type> parameter of GetActiveUniform: + */ + public static final int GL_SAMPLER_RENDERBUFFER_NV = 0x8E56, + GL_INT_SAMPLER_RENDERBUFFER_NV = 0x8E57, + GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV = 0x8E58; + + private NVExplicitMultisample() {} + + public static void glGetBooleanIndexedEXT(int pname, int index, ByteBuffer data) { + EXTDrawBuffers2.glGetBooleanIndexedEXT(pname, index, data); + } + + /** Overloads glGetBooleanIndexedvEXT. */ + public static boolean glGetBooleanIndexedEXT(int pname, int index) { + return EXTDrawBuffers2.glGetBooleanIndexedEXT(pname, index); + } + + public static void glGetIntegerIndexedEXT(int pname, int index, IntBuffer data) { + EXTDrawBuffers2.glGetIntegerIndexedEXT(pname, index, data); + } + + /** Overloads glGetIntegerIndexedvEXT. */ + public static int glGetIntegerIndexedEXT(int pname, int index) { + return EXTDrawBuffers2.glGetIntegerIndexedEXT(pname, index); + } + + public static void glGetMultisampleNV(int pname, int index, FloatBuffer val) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetMultisamplefvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(val, 2); + nglGetMultisamplefvNV(pname, index, MemoryUtil.getAddress(val), function_pointer); + } + static native void nglGetMultisamplefvNV(int pname, int index, long val, long function_pointer); + + public static void glSampleMaskIndexedNV(int index, int mask) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSampleMaskIndexedNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglSampleMaskIndexedNV(index, mask, function_pointer); + } + static native void nglSampleMaskIndexedNV(int index, int mask, long function_pointer); + + public static void glTexRenderbufferNV(int target, int renderbuffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexRenderbufferNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexRenderbufferNV(target, renderbuffer, function_pointer); + } + static native void nglTexRenderbufferNV(int target, int renderbuffer, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVFence.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVFence.java new file mode 100644 index 0000000..d9b134a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVFence.java @@ -0,0 +1,94 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVFence { + + public static final int GL_ALL_COMPLETED_NV = 0x84F2, + GL_FENCE_STATUS_NV = 0x84F3, + GL_FENCE_CONDITION_NV = 0x84F4; + + private NVFence() {} + + public static void glGenFencesNV(IntBuffer piFences) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenFencesNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(piFences); + nglGenFencesNV(piFences.remaining(), MemoryUtil.getAddress(piFences), function_pointer); + } + static native void nglGenFencesNV(int piFences_n, long piFences, long function_pointer); + + /** Overloads glGenFencesNV. */ + public static int glGenFencesNV() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenFencesNV; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer piFences = APIUtil.getBufferInt(caps); + nglGenFencesNV(1, MemoryUtil.getAddress(piFences), function_pointer); + return piFences.get(0); + } + + public static void glDeleteFencesNV(IntBuffer piFences) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteFencesNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(piFences); + nglDeleteFencesNV(piFences.remaining(), MemoryUtil.getAddress(piFences), function_pointer); + } + static native void nglDeleteFencesNV(int piFences_n, long piFences, long function_pointer); + + /** Overloads glDeleteFencesNV. */ + public static void glDeleteFencesNV(int fence) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteFencesNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeleteFencesNV(1, APIUtil.getInt(caps, fence), function_pointer); + } + + public static void glSetFenceNV(int fence, int condition) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSetFenceNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglSetFenceNV(fence, condition, function_pointer); + } + static native void nglSetFenceNV(int fence, int condition, long function_pointer); + + public static boolean glTestFenceNV(int fence) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTestFenceNV; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglTestFenceNV(fence, function_pointer); + return __result; + } + static native boolean nglTestFenceNV(int fence, long function_pointer); + + public static void glFinishFenceNV(int fence) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFinishFenceNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglFinishFenceNV(fence, function_pointer); + } + static native void nglFinishFenceNV(int fence, long function_pointer); + + public static boolean glIsFenceNV(int fence) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsFenceNV; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsFenceNV(fence, function_pointer); + return __result; + } + static native boolean nglIsFenceNV(int fence, long function_pointer); + + public static void glGetFenceivNV(int fence, int pname, IntBuffer piParams) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetFenceivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(piParams, 4); + nglGetFenceivNV(fence, pname, MemoryUtil.getAddress(piParams), function_pointer); + } + static native void nglGetFenceivNV(int fence, int pname, long piParams, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVFloatBuffer.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVFloatBuffer.java new file mode 100644 index 0000000..b6fbe08 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVFloatBuffer.java @@ -0,0 +1,41 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVFloatBuffer { + + /** + * Accepted by the <internalformat> parameter of TexImage2D and + * CopyTexImage2D: + */ + public static final int GL_FLOAT_R_NV = 0x8880, + GL_FLOAT_RG_NV = 0x8881, + GL_FLOAT_RGB_NV = 0x8882, + GL_FLOAT_RGBA_NV = 0x8883, + GL_FLOAT_R16_NV = 0x8884, + GL_FLOAT_R32_NV = 0x8885, + GL_FLOAT_RG16_NV = 0x8886, + GL_FLOAT_RG32_NV = 0x8887, + GL_FLOAT_RGB16_NV = 0x8888, + GL_FLOAT_RGB32_NV = 0x8889, + GL_FLOAT_RGBA16_NV = 0x888A, + GL_FLOAT_RGBA32_NV = 0x888B; + + /** + * Accepted by the <pname> parameter of GetTexLevelParameterfv and + * GetTexLevelParameteriv: + */ + public static final int GL_TEXTURE_FLOAT_COMPONENTS_NV = 0x888C; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_FLOAT_CLEAR_COLOR_VALUE_NV = 0x888D, + GL_FLOAT_RGBA_MODE_NV = 0x888E; + + private NVFloatBuffer() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVFogDistance.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVFogDistance.java new file mode 100644 index 0000000..57dffc9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVFogDistance.java @@ -0,0 +1,15 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVFogDistance { + + public static final int GL_FOG_DISTANCE_MODE_NV = 0x855A, + GL_EYE_RADIAL_NV = 0x855B, + GL_EYE_PLANE_ABSOLUTE_NV = 0x855C; + + private NVFogDistance() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVFragmentProgram.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVFragmentProgram.java new file mode 100644 index 0000000..0ec5a94 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVFragmentProgram.java @@ -0,0 +1,68 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVFragmentProgram extends NVProgram { + + /** + * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, by the + * <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev, + * and by the <target> parameter of BindProgramNV, LoadProgramNV, + * ProgramLocalParameter4dARB, ProgramLocalParameter4dvARB, + * ProgramLocalParameter4fARB, ProgramLocalParameter4fvARB, + * GetProgramLocalParameterdvARB, and GetProgramLocalParameterfvARB: + */ + public static final int GL_FRAGMENT_PROGRAM_NV = 0x8870; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_MAX_TEXTURE_COORDS_NV = 0x8871, + GL_MAX_TEXTURE_IMAGE_UNITS_NV = 0x8872, + GL_FRAGMENT_PROGRAM_BINDING_NV = 0x8873, + GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV = 0x8868; + + private NVFragmentProgram() {} + + public static void glProgramNamedParameter4fNV(int id, ByteBuffer name, float x, float y, float z, float w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramNamedParameter4fNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(name); + nglProgramNamedParameter4fNV(id, name.remaining(), MemoryUtil.getAddress(name), x, y, z, w, function_pointer); + } + static native void nglProgramNamedParameter4fNV(int id, int name_length, long name, float x, float y, float z, float w, long function_pointer); + + public static void glProgramNamedParameter4dNV(int id, ByteBuffer name, double x, double y, double z, double w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramNamedParameter4dNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(name); + nglProgramNamedParameter4dNV(id, name.remaining(), MemoryUtil.getAddress(name), x, y, z, w, function_pointer); + } + static native void nglProgramNamedParameter4dNV(int id, int name_length, long name, double x, double y, double z, double w, long function_pointer); + + public static void glGetProgramNamedParameterNV(int id, ByteBuffer name, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramNamedParameterfvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(name); + BufferChecks.checkBuffer(params, 4); + nglGetProgramNamedParameterfvNV(id, name.remaining(), MemoryUtil.getAddress(name), MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetProgramNamedParameterfvNV(int id, int name_length, long name, long params, long function_pointer); + + public static void glGetProgramNamedParameterNV(int id, ByteBuffer name, DoubleBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramNamedParameterdvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(name); + BufferChecks.checkBuffer(params, 4); + nglGetProgramNamedParameterdvNV(id, name.remaining(), MemoryUtil.getAddress(name), MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetProgramNamedParameterdvNV(int id, int name_length, long name, long params, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVFragmentProgram2.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVFragmentProgram2.java new file mode 100644 index 0000000..220b11b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVFragmentProgram2.java @@ -0,0 +1,20 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVFragmentProgram2 { + + /** + * Accepted by the <pname> parameter of GetProgramivARB: + */ + public static final int GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV = 0x88F4, + GL_MAX_PROGRAM_CALL_DEPTH_NV = 0x88F5, + GL_MAX_PROGRAM_IF_DEPTH_NV = 0x88F6, + GL_MAX_PROGRAM_LOOP_DEPTH_NV = 0x88F7, + GL_MAX_PROGRAM_LOOP_COUNT_NV = 0x88F8; + + private NVFragmentProgram2() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVFramebufferMultisampleCoverage.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVFramebufferMultisampleCoverage.java new file mode 100644 index 0000000..63333ca --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVFramebufferMultisampleCoverage.java @@ -0,0 +1,31 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVFramebufferMultisampleCoverage { + + /** + * Accepted by the <pname> parameter of GetRenderbufferParameterivEXT. + */ + public static final int GL_RENDERBUFFER_COVERAGE_SAMPLES_NV = 0x8CAB, + GL_RENDERBUFFER_COLOR_SAMPLES_NV = 0x8E10; + + /** + * Accepted by the <pname> parameter of GetIntegerv. + */ + public static final int GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV = 0x8E11, + GL_MULTISAMPLE_COVERAGE_MODES_NV = 0x8E12; + + private NVFramebufferMultisampleCoverage() {} + + public static void glRenderbufferStorageMultisampleCoverageNV(int target, int coverageSamples, int colorSamples, int internalformat, int width, int height) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glRenderbufferStorageMultisampleCoverageNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglRenderbufferStorageMultisampleCoverageNV(target, coverageSamples, colorSamples, internalformat, width, height, function_pointer); + } + static native void nglRenderbufferStorageMultisampleCoverageNV(int target, int coverageSamples, int colorSamples, int internalformat, int width, int height, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVGeometryProgram4.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVGeometryProgram4.java new file mode 100644 index 0000000..255ddb1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVGeometryProgram4.java @@ -0,0 +1,44 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVGeometryProgram4 { + + /** + * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, and by + * the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev: + */ + public static final int GL_GEOMETRY_PROGRAM_NV = 0x8C26; + + /** + * Accepted by the <pname> parameter of GetProgramivARB: + */ + public static final int GL_MAX_PROGRAM_OUTPUT_VERTICES_NV = 0x8C27, + GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV = 0x8C28; + + private NVGeometryProgram4() {} + + public static void glProgramVertexLimitNV(int target, int limit) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramVertexLimitNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramVertexLimitNV(target, limit, function_pointer); + } + static native void nglProgramVertexLimitNV(int target, int limit, long function_pointer); + + public static void glFramebufferTextureEXT(int target, int attachment, int texture, int level) { + EXTGeometryShader4.glFramebufferTextureEXT(target, attachment, texture, level); + } + + public static void glFramebufferTextureLayerEXT(int target, int attachment, int texture, int level, int layer) { + EXTGeometryShader4.glFramebufferTextureLayerEXT(target, attachment, texture, level, layer); + } + + public static void glFramebufferTextureFaceEXT(int target, int attachment, int texture, int level, int face) { + EXTGeometryShader4.glFramebufferTextureFaceEXT(target, attachment, texture, level, face); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVGpuProgram4.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVGpuProgram4.java new file mode 100644 index 0000000..18befcf --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVGpuProgram4.java @@ -0,0 +1,161 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVGpuProgram4 { + + /** + * Accepted by the <pname> parameter of GetProgramivARB: + */ + public static final int GL_PROGRAM_ATTRIB_COMPONENTS_NV = 0x8906, + GL_PROGRAM_RESULT_COMPONENTS_NV = 0x8907, + GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV = 0x8908, + GL_MAX_PROGRAM_RESULT_COMPONENTS_NV = 0x8909, + GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV = 0x8DA5, + GL_MAX_PROGRAM_GENERIC_RESULTS_NV = 0x8DA6; + + private NVGpuProgram4() {} + + public static void glProgramLocalParameterI4iNV(int target, int index, int x, int y, int z, int w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramLocalParameterI4iNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramLocalParameterI4iNV(target, index, x, y, z, w, function_pointer); + } + static native void nglProgramLocalParameterI4iNV(int target, int index, int x, int y, int z, int w, long function_pointer); + + public static void glProgramLocalParameterI4NV(int target, int index, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramLocalParameterI4ivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglProgramLocalParameterI4ivNV(target, index, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglProgramLocalParameterI4ivNV(int target, int index, long params, long function_pointer); + + public static void glProgramLocalParametersI4NV(int target, int index, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramLocalParametersI4ivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglProgramLocalParametersI4ivNV(target, index, params.remaining() >> 2, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglProgramLocalParametersI4ivNV(int target, int index, int params_count, long params, long function_pointer); + + public static void glProgramLocalParameterI4uiNV(int target, int index, int x, int y, int z, int w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramLocalParameterI4uiNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramLocalParameterI4uiNV(target, index, x, y, z, w, function_pointer); + } + static native void nglProgramLocalParameterI4uiNV(int target, int index, int x, int y, int z, int w, long function_pointer); + + public static void glProgramLocalParameterI4uNV(int target, int index, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramLocalParameterI4uivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglProgramLocalParameterI4uivNV(target, index, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglProgramLocalParameterI4uivNV(int target, int index, long params, long function_pointer); + + public static void glProgramLocalParametersI4uNV(int target, int index, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramLocalParametersI4uivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglProgramLocalParametersI4uivNV(target, index, params.remaining() >> 2, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglProgramLocalParametersI4uivNV(int target, int index, int params_count, long params, long function_pointer); + + public static void glProgramEnvParameterI4iNV(int target, int index, int x, int y, int z, int w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramEnvParameterI4iNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramEnvParameterI4iNV(target, index, x, y, z, w, function_pointer); + } + static native void nglProgramEnvParameterI4iNV(int target, int index, int x, int y, int z, int w, long function_pointer); + + public static void glProgramEnvParameterI4NV(int target, int index, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramEnvParameterI4ivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglProgramEnvParameterI4ivNV(target, index, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglProgramEnvParameterI4ivNV(int target, int index, long params, long function_pointer); + + public static void glProgramEnvParametersI4NV(int target, int index, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramEnvParametersI4ivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglProgramEnvParametersI4ivNV(target, index, params.remaining() >> 2, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglProgramEnvParametersI4ivNV(int target, int index, int params_count, long params, long function_pointer); + + public static void glProgramEnvParameterI4uiNV(int target, int index, int x, int y, int z, int w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramEnvParameterI4uiNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramEnvParameterI4uiNV(target, index, x, y, z, w, function_pointer); + } + static native void nglProgramEnvParameterI4uiNV(int target, int index, int x, int y, int z, int w, long function_pointer); + + public static void glProgramEnvParameterI4uNV(int target, int index, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramEnvParameterI4uivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglProgramEnvParameterI4uivNV(target, index, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglProgramEnvParameterI4uivNV(int target, int index, long params, long function_pointer); + + public static void glProgramEnvParametersI4uNV(int target, int index, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramEnvParametersI4uivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglProgramEnvParametersI4uivNV(target, index, params.remaining() >> 2, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglProgramEnvParametersI4uivNV(int target, int index, int params_count, long params, long function_pointer); + + public static void glGetProgramLocalParameterINV(int target, int index, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramLocalParameterIivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetProgramLocalParameterIivNV(target, index, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetProgramLocalParameterIivNV(int target, int index, long params, long function_pointer); + + public static void glGetProgramLocalParameterIuNV(int target, int index, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramLocalParameterIuivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetProgramLocalParameterIuivNV(target, index, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetProgramLocalParameterIuivNV(int target, int index, long params, long function_pointer); + + public static void glGetProgramEnvParameterINV(int target, int index, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramEnvParameterIivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetProgramEnvParameterIivNV(target, index, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetProgramEnvParameterIivNV(int target, int index, long params, long function_pointer); + + public static void glGetProgramEnvParameterIuNV(int target, int index, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramEnvParameterIuivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetProgramEnvParameterIuivNV(target, index, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetProgramEnvParameterIuivNV(int target, int index, long params, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVGpuProgram5.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVGpuProgram5.java new file mode 100644 index 0000000..9b10f3f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVGpuProgram5.java @@ -0,0 +1,20 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVGpuProgram5 { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV = 0x8E5A, + GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV = 0x8E5B, + GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV = 0x8E5C, + GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV = 0x8E5D; + + private NVGpuProgram5() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVGpuShader5.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVGpuShader5.java new file mode 100644 index 0000000..c249d02 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVGpuShader5.java @@ -0,0 +1,339 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVGpuShader5 { + + /** + * Returned by the <type> parameter of GetActiveAttrib, GetActiveUniform, and + * GetTransformFeedbackVarying: + */ + public static final int GL_INT64_NV = 0x140E, + GL_UNSIGNED_INT64_NV = 0x140F, + GL_INT8_NV = 0x8FE0, + GL_INT8_VEC2_NV = 0x8FE1, + GL_INT8_VEC3_NV = 0x8FE2, + GL_INT8_VEC4_NV = 0x8FE3, + GL_INT16_NV = 0x8FE4, + GL_INT16_VEC2_NV = 0x8FE5, + GL_INT16_VEC3_NV = 0x8FE6, + GL_INT16_VEC4_NV = 0x8FE7, + GL_INT64_VEC2_NV = 0x8FE9, + GL_INT64_VEC3_NV = 0x8FEA, + GL_INT64_VEC4_NV = 0x8FEB, + GL_UNSIGNED_INT8_NV = 0x8FEC, + GL_UNSIGNED_INT8_VEC2_NV = 0x8FED, + GL_UNSIGNED_INT8_VEC3_NV = 0x8FEE, + GL_UNSIGNED_INT8_VEC4_NV = 0x8FEF, + GL_UNSIGNED_INT16_NV = 0x8FF0, + GL_UNSIGNED_INT16_VEC2_NV = 0x8FF1, + GL_UNSIGNED_INT16_VEC3_NV = 0x8FF2, + GL_UNSIGNED_INT16_VEC4_NV = 0x8FF3, + GL_UNSIGNED_INT64_VEC2_NV = 0x8FF5, + GL_UNSIGNED_INT64_VEC3_NV = 0x8FF6, + GL_UNSIGNED_INT64_VEC4_NV = 0x8FF7, + GL_FLOAT16_NV = 0x8FF8, + GL_FLOAT16_VEC2_NV = 0x8FF9, + GL_FLOAT16_VEC3_NV = 0x8FFA, + GL_FLOAT16_VEC4_NV = 0x8FFB; + + /** + * Accepted by the <primitiveMode> parameter of BeginTransformFeedback: + */ + public static final int GL_PATCHES = 0xE; + + private NVGpuShader5() {} + + public static void glUniform1i64NV(int location, long x) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform1i64NV; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform1i64NV(location, x, function_pointer); + } + static native void nglUniform1i64NV(int location, long x, long function_pointer); + + public static void glUniform2i64NV(int location, long x, long y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform2i64NV; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform2i64NV(location, x, y, function_pointer); + } + static native void nglUniform2i64NV(int location, long x, long y, long function_pointer); + + public static void glUniform3i64NV(int location, long x, long y, long z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform3i64NV; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform3i64NV(location, x, y, z, function_pointer); + } + static native void nglUniform3i64NV(int location, long x, long y, long z, long function_pointer); + + public static void glUniform4i64NV(int location, long x, long y, long z, long w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform4i64NV; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform4i64NV(location, x, y, z, w, function_pointer); + } + static native void nglUniform4i64NV(int location, long x, long y, long z, long w, long function_pointer); + + public static void glUniform1NV(int location, LongBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform1i64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniform1i64vNV(location, value.remaining(), MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniform1i64vNV(int location, int value_count, long value, long function_pointer); + + public static void glUniform2NV(int location, LongBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform2i64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniform2i64vNV(location, value.remaining() >> 1, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniform2i64vNV(int location, int value_count, long value, long function_pointer); + + public static void glUniform3NV(int location, LongBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform3i64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniform3i64vNV(location, value.remaining() / 3, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniform3i64vNV(int location, int value_count, long value, long function_pointer); + + public static void glUniform4NV(int location, LongBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform4i64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniform4i64vNV(location, value.remaining() >> 2, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniform4i64vNV(int location, int value_count, long value, long function_pointer); + + public static void glUniform1ui64NV(int location, long x) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform1ui64NV; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform1ui64NV(location, x, function_pointer); + } + static native void nglUniform1ui64NV(int location, long x, long function_pointer); + + public static void glUniform2ui64NV(int location, long x, long y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform2ui64NV; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform2ui64NV(location, x, y, function_pointer); + } + static native void nglUniform2ui64NV(int location, long x, long y, long function_pointer); + + public static void glUniform3ui64NV(int location, long x, long y, long z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform3ui64NV; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform3ui64NV(location, x, y, z, function_pointer); + } + static native void nglUniform3ui64NV(int location, long x, long y, long z, long function_pointer); + + public static void glUniform4ui64NV(int location, long x, long y, long z, long w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform4ui64NV; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniform4ui64NV(location, x, y, z, w, function_pointer); + } + static native void nglUniform4ui64NV(int location, long x, long y, long z, long w, long function_pointer); + + public static void glUniform1uNV(int location, LongBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform1ui64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniform1ui64vNV(location, value.remaining(), MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniform1ui64vNV(int location, int value_count, long value, long function_pointer); + + public static void glUniform2uNV(int location, LongBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform2ui64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniform2ui64vNV(location, value.remaining() >> 1, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniform2ui64vNV(int location, int value_count, long value, long function_pointer); + + public static void glUniform3uNV(int location, LongBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform3ui64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniform3ui64vNV(location, value.remaining() / 3, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniform3ui64vNV(int location, int value_count, long value, long function_pointer); + + public static void glUniform4uNV(int location, LongBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniform4ui64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniform4ui64vNV(location, value.remaining() >> 2, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniform4ui64vNV(int location, int value_count, long value, long function_pointer); + + public static void glGetUniformNV(int program, int location, LongBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetUniformi64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetUniformi64vNV(program, location, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetUniformi64vNV(int program, int location, long params, long function_pointer); + + public static void glGetUniformuNV(int program, int location, LongBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetUniformui64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetUniformui64vNV(program, location, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetUniformui64vNV(int program, int location, long params, long function_pointer); + + public static void glProgramUniform1i64NV(int program, int location, long x) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform1i64NV; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform1i64NV(program, location, x, function_pointer); + } + static native void nglProgramUniform1i64NV(int program, int location, long x, long function_pointer); + + public static void glProgramUniform2i64NV(int program, int location, long x, long y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform2i64NV; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform2i64NV(program, location, x, y, function_pointer); + } + static native void nglProgramUniform2i64NV(int program, int location, long x, long y, long function_pointer); + + public static void glProgramUniform3i64NV(int program, int location, long x, long y, long z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform3i64NV; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform3i64NV(program, location, x, y, z, function_pointer); + } + static native void nglProgramUniform3i64NV(int program, int location, long x, long y, long z, long function_pointer); + + public static void glProgramUniform4i64NV(int program, int location, long x, long y, long z, long w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform4i64NV; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform4i64NV(program, location, x, y, z, w, function_pointer); + } + static native void nglProgramUniform4i64NV(int program, int location, long x, long y, long z, long w, long function_pointer); + + public static void glProgramUniform1NV(int program, int location, LongBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform1i64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform1i64vNV(program, location, value.remaining(), MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform1i64vNV(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform2NV(int program, int location, LongBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform2i64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform2i64vNV(program, location, value.remaining() >> 1, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform2i64vNV(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform3NV(int program, int location, LongBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform3i64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform3i64vNV(program, location, value.remaining() / 3, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform3i64vNV(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform4NV(int program, int location, LongBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform4i64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform4i64vNV(program, location, value.remaining() >> 2, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform4i64vNV(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform1ui64NV(int program, int location, long x) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform1ui64NV; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform1ui64NV(program, location, x, function_pointer); + } + static native void nglProgramUniform1ui64NV(int program, int location, long x, long function_pointer); + + public static void glProgramUniform2ui64NV(int program, int location, long x, long y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform2ui64NV; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform2ui64NV(program, location, x, y, function_pointer); + } + static native void nglProgramUniform2ui64NV(int program, int location, long x, long y, long function_pointer); + + public static void glProgramUniform3ui64NV(int program, int location, long x, long y, long z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform3ui64NV; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform3ui64NV(program, location, x, y, z, function_pointer); + } + static native void nglProgramUniform3ui64NV(int program, int location, long x, long y, long z, long function_pointer); + + public static void glProgramUniform4ui64NV(int program, int location, long x, long y, long z, long w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform4ui64NV; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniform4ui64NV(program, location, x, y, z, w, function_pointer); + } + static native void nglProgramUniform4ui64NV(int program, int location, long x, long y, long z, long w, long function_pointer); + + public static void glProgramUniform1uNV(int program, int location, LongBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform1ui64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform1ui64vNV(program, location, value.remaining(), MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform1ui64vNV(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform2uNV(int program, int location, LongBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform2ui64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform2ui64vNV(program, location, value.remaining() >> 1, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform2ui64vNV(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform3uNV(int program, int location, LongBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform3ui64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform3ui64vNV(program, location, value.remaining() / 3, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform3ui64vNV(int program, int location, int value_count, long value, long function_pointer); + + public static void glProgramUniform4uNV(int program, int location, LongBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniform4ui64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniform4ui64vNV(program, location, value.remaining() >> 2, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniform4ui64vNV(int program, int location, int value_count, long value, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVHalfFloat.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVHalfFloat.java new file mode 100644 index 0000000..8054e4e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVHalfFloat.java @@ -0,0 +1,224 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVHalfFloat { + + /** + * Accepted by the <type> argument of VertexPointer, NormalPointer, + * ColorPointer, TexCoordPointer, FogCoordPointerEXT, + * SecondaryColorPointerEXT, VertexWeightPointerEXT, VertexAttribPointerNV, + * DrawPixels, ReadPixels, TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, + * TexSubImage2D, TexSubImage3D, and GetTexImage: + */ + public static final int GL_HALF_FLOAT_NV = 0x140B; + + private NVHalfFloat() {} + + public static void glVertex2hNV(short x, short y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertex2hNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertex2hNV(x, y, function_pointer); + } + static native void nglVertex2hNV(short x, short y, long function_pointer); + + public static void glVertex3hNV(short x, short y, short z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertex3hNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertex3hNV(x, y, z, function_pointer); + } + static native void nglVertex3hNV(short x, short y, short z, long function_pointer); + + public static void glVertex4hNV(short x, short y, short z, short w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertex4hNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertex4hNV(x, y, z, w, function_pointer); + } + static native void nglVertex4hNV(short x, short y, short z, short w, long function_pointer); + + public static void glNormal3hNV(short nx, short ny, short nz) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNormal3hNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglNormal3hNV(nx, ny, nz, function_pointer); + } + static native void nglNormal3hNV(short nx, short ny, short nz, long function_pointer); + + public static void glColor3hNV(short red, short green, short blue) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColor3hNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglColor3hNV(red, green, blue, function_pointer); + } + static native void nglColor3hNV(short red, short green, short blue, long function_pointer); + + public static void glColor4hNV(short red, short green, short blue, short alpha) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColor4hNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglColor4hNV(red, green, blue, alpha, function_pointer); + } + static native void nglColor4hNV(short red, short green, short blue, short alpha, long function_pointer); + + public static void glTexCoord1hNV(short s) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexCoord1hNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexCoord1hNV(s, function_pointer); + } + static native void nglTexCoord1hNV(short s, long function_pointer); + + public static void glTexCoord2hNV(short s, short t) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexCoord2hNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexCoord2hNV(s, t, function_pointer); + } + static native void nglTexCoord2hNV(short s, short t, long function_pointer); + + public static void glTexCoord3hNV(short s, short t, short r) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexCoord3hNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexCoord3hNV(s, t, r, function_pointer); + } + static native void nglTexCoord3hNV(short s, short t, short r, long function_pointer); + + public static void glTexCoord4hNV(short s, short t, short r, short q) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexCoord4hNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexCoord4hNV(s, t, r, q, function_pointer); + } + static native void nglTexCoord4hNV(short s, short t, short r, short q, long function_pointer); + + public static void glMultiTexCoord1hNV(int target, short s) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoord1hNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoord1hNV(target, s, function_pointer); + } + static native void nglMultiTexCoord1hNV(int target, short s, long function_pointer); + + public static void glMultiTexCoord2hNV(int target, short s, short t) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoord2hNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoord2hNV(target, s, t, function_pointer); + } + static native void nglMultiTexCoord2hNV(int target, short s, short t, long function_pointer); + + public static void glMultiTexCoord3hNV(int target, short s, short t, short r) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoord3hNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoord3hNV(target, s, t, r, function_pointer); + } + static native void nglMultiTexCoord3hNV(int target, short s, short t, short r, long function_pointer); + + public static void glMultiTexCoord4hNV(int target, short s, short t, short r, short q) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMultiTexCoord4hNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglMultiTexCoord4hNV(target, s, t, r, q, function_pointer); + } + static native void nglMultiTexCoord4hNV(int target, short s, short t, short r, short q, long function_pointer); + + public static void glFogCoordhNV(short fog) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFogCoordhNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglFogCoordhNV(fog, function_pointer); + } + static native void nglFogCoordhNV(short fog, long function_pointer); + + public static void glSecondaryColor3hNV(short red, short green, short blue) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSecondaryColor3hNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglSecondaryColor3hNV(red, green, blue, function_pointer); + } + static native void nglSecondaryColor3hNV(short red, short green, short blue, long function_pointer); + + public static void glVertexWeighthNV(short weight) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexWeighthNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexWeighthNV(weight, function_pointer); + } + static native void nglVertexWeighthNV(short weight, long function_pointer); + + public static void glVertexAttrib1hNV(int index, short x) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib1hNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib1hNV(index, x, function_pointer); + } + static native void nglVertexAttrib1hNV(int index, short x, long function_pointer); + + public static void glVertexAttrib2hNV(int index, short x, short y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib2hNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib2hNV(index, x, y, function_pointer); + } + static native void nglVertexAttrib2hNV(int index, short x, short y, long function_pointer); + + public static void glVertexAttrib3hNV(int index, short x, short y, short z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib3hNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib3hNV(index, x, y, z, function_pointer); + } + static native void nglVertexAttrib3hNV(int index, short x, short y, short z, long function_pointer); + + public static void glVertexAttrib4hNV(int index, short x, short y, short z, short w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib4hNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib4hNV(index, x, y, z, w, function_pointer); + } + static native void nglVertexAttrib4hNV(int index, short x, short y, short z, short w, long function_pointer); + + public static void glVertexAttribs1NV(int index, ShortBuffer attribs) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribs1hvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(attribs); + nglVertexAttribs1hvNV(index, attribs.remaining(), MemoryUtil.getAddress(attribs), function_pointer); + } + static native void nglVertexAttribs1hvNV(int index, int attribs_n, long attribs, long function_pointer); + + public static void glVertexAttribs2NV(int index, ShortBuffer attribs) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribs2hvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(attribs); + nglVertexAttribs2hvNV(index, attribs.remaining() >> 1, MemoryUtil.getAddress(attribs), function_pointer); + } + static native void nglVertexAttribs2hvNV(int index, int attribs_n, long attribs, long function_pointer); + + public static void glVertexAttribs3NV(int index, ShortBuffer attribs) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribs3hvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(attribs); + nglVertexAttribs3hvNV(index, attribs.remaining() / 3, MemoryUtil.getAddress(attribs), function_pointer); + } + static native void nglVertexAttribs3hvNV(int index, int attribs_n, long attribs, long function_pointer); + + public static void glVertexAttribs4NV(int index, ShortBuffer attribs) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribs4hvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(attribs); + nglVertexAttribs4hvNV(index, attribs.remaining() >> 2, MemoryUtil.getAddress(attribs), function_pointer); + } + static native void nglVertexAttribs4hvNV(int index, int attribs_n, long attribs, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVLightMaxExponent.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVLightMaxExponent.java new file mode 100644 index 0000000..7545370 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVLightMaxExponent.java @@ -0,0 +1,14 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVLightMaxExponent { + + public static final int GL_MAX_SHININESS_NV = 0x8504, + GL_MAX_SPOT_EXPONENT_NV = 0x8505; + + private NVLightMaxExponent() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVMultisampleCoverage.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVMultisampleCoverage.java new file mode 100644 index 0000000..df4fe73 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVMultisampleCoverage.java @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVMultisampleCoverage { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, + * GetIntegerv, and GetFloatv: + */ + public static final int GL_COVERAGE_SAMPLES_NV = 0x80A9, + GL_COLOR_SAMPLES_NV = 0x8E20; + + private NVMultisampleCoverage() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVMultisampleFilterHint.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVMultisampleFilterHint.java new file mode 100644 index 0000000..116dae4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVMultisampleFilterHint.java @@ -0,0 +1,17 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVMultisampleFilterHint { + + /** + * Accepted by the <target> parameter of Hint and by the <pname> + * parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev: + */ + public static final int GL_MULTISAMPLE_FILTER_HINT_NV = 0x8534; + + private NVMultisampleFilterHint() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVOcclusionQuery.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVOcclusionQuery.java new file mode 100644 index 0000000..280dfaa --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVOcclusionQuery.java @@ -0,0 +1,117 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVOcclusionQuery { + + public static final int GL_OCCLUSION_TEST_HP = 0x8165, + GL_OCCLUSION_TEST_RESULT_HP = 0x8166, + GL_PIXEL_COUNTER_BITS_NV = 0x8864, + GL_CURRENT_OCCLUSION_QUERY_ID_NV = 0x8865, + GL_PIXEL_COUNT_NV = 0x8866, + GL_PIXEL_COUNT_AVAILABLE_NV = 0x8867; + + private NVOcclusionQuery() {} + + public static void glGenOcclusionQueriesNV(IntBuffer piIDs) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenOcclusionQueriesNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(piIDs); + nglGenOcclusionQueriesNV(piIDs.remaining(), MemoryUtil.getAddress(piIDs), function_pointer); + } + static native void nglGenOcclusionQueriesNV(int piIDs_n, long piIDs, long function_pointer); + + /** Overloads glGenOcclusionQueriesNV. */ + public static int glGenOcclusionQueriesNV() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenOcclusionQueriesNV; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer piIDs = APIUtil.getBufferInt(caps); + nglGenOcclusionQueriesNV(1, MemoryUtil.getAddress(piIDs), function_pointer); + return piIDs.get(0); + } + + public static void glDeleteOcclusionQueriesNV(IntBuffer piIDs) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteOcclusionQueriesNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(piIDs); + nglDeleteOcclusionQueriesNV(piIDs.remaining(), MemoryUtil.getAddress(piIDs), function_pointer); + } + static native void nglDeleteOcclusionQueriesNV(int piIDs_n, long piIDs, long function_pointer); + + /** Overloads glDeleteOcclusionQueriesNV. */ + public static void glDeleteOcclusionQueriesNV(int piID) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteOcclusionQueriesNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeleteOcclusionQueriesNV(1, APIUtil.getInt(caps, piID), function_pointer); + } + + public static boolean glIsOcclusionQueryNV(int id) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsOcclusionQueryNV; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsOcclusionQueryNV(id, function_pointer); + return __result; + } + static native boolean nglIsOcclusionQueryNV(int id, long function_pointer); + + public static void glBeginOcclusionQueryNV(int id) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBeginOcclusionQueryNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglBeginOcclusionQueryNV(id, function_pointer); + } + static native void nglBeginOcclusionQueryNV(int id, long function_pointer); + + public static void glEndOcclusionQueryNV() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEndOcclusionQueryNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglEndOcclusionQueryNV(function_pointer); + } + static native void nglEndOcclusionQueryNV(long function_pointer); + + public static void glGetOcclusionQueryuNV(int id, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetOcclusionQueryuivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetOcclusionQueryuivNV(id, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetOcclusionQueryuivNV(int id, int pname, long params, long function_pointer); + + /** Overloads glGetOcclusionQueryuivNV. */ + public static int glGetOcclusionQueryuiNV(int id, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetOcclusionQueryuivNV; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetOcclusionQueryuivNV(id, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetOcclusionQueryNV(int id, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetOcclusionQueryivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetOcclusionQueryivNV(id, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetOcclusionQueryivNV(int id, int pname, long params, long function_pointer); + + /** Overloads glGetOcclusionQueryivNV. */ + public static int glGetOcclusionQueryiNV(int id, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetOcclusionQueryivNV; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetOcclusionQueryivNV(id, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVPackedDepthStencil.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVPackedDepthStencil.java new file mode 100644 index 0000000..faac63a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVPackedDepthStencil.java @@ -0,0 +1,14 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVPackedDepthStencil { + + public static final int GL_DEPTH_STENCIL_NV = 0x84F9, + GL_UNSIGNED_INT_24_8_NV = 0x84FA; + + private NVPackedDepthStencil() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVParameterBufferObject.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVParameterBufferObject.java new file mode 100644 index 0000000..0ec1ff9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVParameterBufferObject.java @@ -0,0 +1,54 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVParameterBufferObject { + + /** + * Accepted by the <pname> parameter of GetProgramivARB: + */ + public static final int GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV = 0x8DA0, + GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV = 0x8DA1; + + /** + * Accepted by the <target> parameter of ProgramBufferParametersfvNV, + * ProgramBufferParametersIivNV, and ProgramBufferParametersIuivNV, + * BindBufferRangeNV, BindBufferOffsetNV, BindBufferBaseNV, and BindBuffer + * and the <value> parameter of GetIntegerIndexedvEXT: + */ + public static final int GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV = 0x8DA2, + GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV = 0x8DA3, + GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV = 0x8DA4; + + private NVParameterBufferObject() {} + + public static void glProgramBufferParametersNV(int target, int buffer, int index, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramBufferParametersfvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglProgramBufferParametersfvNV(target, buffer, index, params.remaining() >> 2, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglProgramBufferParametersfvNV(int target, int buffer, int index, int params_count, long params, long function_pointer); + + public static void glProgramBufferParametersINV(int target, int buffer, int index, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramBufferParametersIivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglProgramBufferParametersIivNV(target, buffer, index, params.remaining() >> 2, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglProgramBufferParametersIivNV(int target, int buffer, int index, int params_count, long params, long function_pointer); + + public static void glProgramBufferParametersIuNV(int target, int buffer, int index, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramBufferParametersIuivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglProgramBufferParametersIuivNV(target, buffer, index, params.remaining() >> 2, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglProgramBufferParametersIuivNV(int target, int buffer, int index, int params_count, long params, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVPathRendering.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVPathRendering.java new file mode 100644 index 0000000..6c5e98e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVPathRendering.java @@ -0,0 +1,768 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVPathRendering { + + /** + * Accepted in elements of the <commands> array parameter of + * PathCommandsNV and PathSubCommandsNV: + */ + public static final int GL_CLOSE_PATH_NV = 0x0, + GL_MOVE_TO_NV = 0x2, + GL_RELATIVE_MOVE_TO_NV = 0x3, + GL_LINE_TO_NV = 0x4, + GL_RELATIVE_LINE_TO_NV = 0x5, + GL_HORIZONTAL_LINE_TO_NV = 0x6, + GL_RELATIVE_HORIZONTAL_LINE_TO_NV = 0x7, + GL_VERTICAL_LINE_TO_NV = 0x8, + GL_RELATIVE_VERTICAL_LINE_TO_NV = 0x9, + GL_QUADRATIC_CURVE_TO_NV = 0xA, + GL_RELATIVE_QUADRATIC_CURVE_TO_NV = 0xB, + GL_CUBIC_CURVE_TO_NV = 0xC, + GL_RELATIVE_CUBIC_CURVE_TO_NV = 0xD, + GL_SMOOTH_QUADRATIC_CURVE_TO_NV = 0xE, + GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV = 0xF, + GL_SMOOTH_CUBIC_CURVE_TO_NV = 0x10, + GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV = 0x11, + GL_SMALL_CCW_ARC_TO_NV = 0x12, + GL_RELATIVE_SMALL_CCW_ARC_TO_NV = 0x13, + GL_SMALL_CW_ARC_TO_NV = 0x14, + GL_RELATIVE_SMALL_CW_ARC_TO_NV = 0x15, + GL_LARGE_CCW_ARC_TO_NV = 0x16, + GL_RELATIVE_LARGE_CCW_ARC_TO_NV = 0x17, + GL_LARGE_CW_ARC_TO_NV = 0x18, + GL_RELATIVE_LARGE_CW_ARC_TO_NV = 0x19, + GL_CIRCULAR_CCW_ARC_TO_NV = 0xF8, + GL_CIRCULAR_CW_ARC_TO_NV = 0xFA, + GL_CIRCULAR_TANGENT_ARC_TO_NV = 0xFC, + GL_ARC_TO_NV = 0xFE, + GL_RELATIVE_ARC_TO_NV = 0xFF; + + /** + * Accepted by the <format> parameter of PathStringNV: + */ + public static final int GL_PATH_FORMAT_SVG_NV = 0x9070, + GL_PATH_FORMAT_PS_NV = 0x9071; + + /** + * Accepted by the <fontTarget> parameter of PathGlyphsNV and + * PathGlyphRangeNV: + */ + public static final int GL_STANDARD_FONT_NAME_NV = 0x9072, + GL_SYSTEM_FONT_NAME_NV = 0x9073, + GL_FILE_NAME_NV = 0x9074; + + /** + * Accepted by the <handleMissingGlyph> parameter of PathGlyphsNV and + * PathGlyphRangeNV: + */ + public static final int GL_SKIP_MISSING_GLYPH_NV = 0x90A9, + GL_USE_MISSING_GLYPH_NV = 0x90AA; + + /** + * Accepted by the <pname> parameter of PathParameterfNV, + * PathParameterfvNV, GetPathParameterfvNV, PathParameteriNV, + * PathParameterivNV, and GetPathParameterivNV: + */ + public static final int GL_PATH_STROKE_WIDTH_NV = 0x9075, + GL_PATH_INITIAL_END_CAP_NV = 0x9077, + GL_PATH_TERMINAL_END_CAP_NV = 0x9078, + GL_PATH_JOIN_STYLE_NV = 0x9079, + GL_PATH_MITER_LIMIT_NV = 0x907A, + GL_PATH_INITIAL_DASH_CAP_NV = 0x907C, + GL_PATH_TERMINAL_DASH_CAP_NV = 0x907D, + GL_PATH_DASH_OFFSET_NV = 0x907E, + GL_PATH_CLIENT_LENGTH_NV = 0x907F, + GL_PATH_DASH_OFFSET_RESET_NV = 0x90B4, + GL_PATH_FILL_MODE_NV = 0x9080, + GL_PATH_FILL_MASK_NV = 0x9081, + GL_PATH_FILL_COVER_MODE_NV = 0x9082, + GL_PATH_STROKE_COVER_MODE_NV = 0x9083, + GL_PATH_STROKE_MASK_NV = 0x9084; + + /** + * Accepted by the <pname> parameter of PathParameterfNV and + * PathParameterfvNV: + */ + public static final int GL_PATH_END_CAPS_NV = 0x9076, + GL_PATH_DASH_CAPS_NV = 0x907B; + + /** + * Accepted by the <fillMode> parameter of StencilFillPathNV and + * StencilFillPathInstancedNV: + */ + public static final int GL_COUNT_UP_NV = 0x9088, + GL_COUNT_DOWN_NV = 0x9089; + + /** + * Accepted by the <color> parameter of PathColorGenNV, + * GetPathColorGenivNV, and GetPathColorGenfvNV: + */ + public static final int GL_PRIMARY_COLOR = 0x8577, + GL_PRIMARY_COLOR_NV = 0x852C, + GL_SECONDARY_COLOR_NV = 0x852D; + + /** + * Accepted by the <genMode> parameter of PathColorGenNV and + * PathTexGenNV: + */ + public static final int GL_PATH_OBJECT_BOUNDING_BOX_NV = 0x908A; + + /** + * Accepted by the <coverMode> parameter of CoverFillPathNV and + * CoverFillPathInstancedNV: + */ + public static final int GL_CONVEX_HULL_NV = 0x908B, + GL_BOUNDING_BOX_NV = 0x908D; + + /** + * Accepted by the <transformType> parameter of + * StencilFillPathInstancedNV, StencilStrokePathInstancedNV, + * CoverFillPathInstancedNV, and CoverStrokePathInstancedNV: + */ + public static final int GL_TRANSLATE_X_NV = 0x908E, + GL_TRANSLATE_Y_NV = 0x908F, + GL_TRANSLATE_2D_NV = 0x9090, + GL_TRANSLATE_3D_NV = 0x9091, + GL_AFFINE_2D_NV = 0x9092, + GL_AFFINE_3D_NV = 0x9094, + GL_TRANSPOSE_AFFINE_2D_NV = 0x9096, + GL_TRANSPOSE_AFFINE_3D_NV = 0x9098; + + /** + * Accepted by the <type> or <pathNameType> parameter of CallLists, + * StencilFillPathInstancedNV, StencilStrokePathInstancedNV, + * CoverFillPathInstancedNV, CoverStrokePathInstancedNV, + * GetPathMetricsNV, and GetPathSpacingNV: + */ + public static final int GL_UTF8_NV = 0x909A, + GL_UTF16_NV = 0x909B; + + /** + * Accepted by the <coverMode> parameter of CoverFillPathInstancedNV: + */ + public static final int GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV = 0x909C; + + /** + * Accepted by the <pname> parameter of GetPathParameterfvNV and + * GetPathParameterivNV: + */ + public static final int GL_PATH_COMMAND_COUNT_NV = 0x909D, + GL_PATH_COORD_COUNT_NV = 0x909E, + GL_PATH_DASH_ARRAY_COUNT_NV = 0x909F, + GL_PATH_COMPUTED_LENGTH_NV = 0x90A0, + GL_PATH_FILL_BOUNDING_BOX_NV = 0x90A1, + GL_PATH_STROKE_BOUNDING_BOX_NV = 0x90A2; + + /** + * Accepted by the <value> parameter of PathParameterfNV, + * PathParameterfvNV, PathParameteriNV, and PathParameterivNV + * when <pname> is one of PATH_END_CAPS_NV, PATH_INTIAL_END_CAP_NV, + * PATH_TERMINAL_END_CAP_NV, PATH_DASH_CAPS_NV, PATH_INITIAL_DASH_CAP_NV, + * and PATH_TERMINAL_DASH_CAP_NV: + */ + public static final int GL_SQUARE_NV = 0x90A3, + GL_ROUND_NV = 0x90A4, + GL_TRIANGULAR_NV = 0x90A5; + + /** + * Accepted by the <value> parameter of PathParameterfNV, + * PathParameterfvNV, PathParameteriNV, and PathParameterivNV + * when <pname> is PATH_JOIN_STYLE_NV: + */ + public static final int GL_BEVEL_NV = 0x90A6, + GL_MITER_REVERT_NV = 0x90A7, + GL_MITER_TRUNCATE_NV = 0x90A8; + + /** + * Accepted by the <value> parameter of PathParameterfNV, + * PathParameterfvNV, PathParameteriNV, and PathParameterivNV when + * <pname> is PATH_DASH_OFFSET_RESET_NV + */ + public static final int GL_MOVE_TO_RESETS_NV = 0x90B5, + GL_MOVE_TO_CONTINUES_NV = 0x90B6; + + /** + * Accepted by the <fontStyle> parameter of PathStringNV: + */ + public static final int GL_BOLD_BIT_NV = 0x1, + GL_ITALIC_BIT_NV = 0x2; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + public static final int GL_PATH_ERROR_POSITION_NV = 0x90AB, + GL_PATH_FOG_GEN_MODE_NV = 0x90AC, + GL_PATH_STENCIL_FUNC_NV = 0x90B7, + GL_PATH_STENCIL_REF_NV = 0x90B8, + GL_PATH_STENCIL_VALUE_MASK_NV = 0x90B9, + GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV = 0x90BD, + GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV = 0x90BE, + GL_PATH_COVER_DEPTH_FUNC_NV = 0x90BF; + + /** + * Accepted as a bit within the <metricQueryMask> parameter of + * GetPathMetricRangeNV or GetPathMetricsNV: + */ + public static final int GL_GLYPH_WIDTH_BIT_NV = 0x1, + GL_GLYPH_HEIGHT_BIT_NV = 0x2, + GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV = 0x4, + GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV = 0x8, + GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV = 0x10, + GL_GLYPH_VERTICAL_BEARING_X_BIT_NV = 0x20, + GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV = 0x40, + GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV = 0x80, + GL_GLYPH_HAS_KERNING_NV = 0x100, + GL_FONT_X_MIN_BOUNDS_NV = 0x10000, + GL_FONT_Y_MIN_BOUNDS_NV = 0x20000, + GL_FONT_X_MAX_BOUNDS_NV = 0x40000, + GL_FONT_Y_MAX_BOUNDS_NV = 0x80000, + GL_FONT_UNITS_PER_EM_NV = 0x100000, + GL_FONT_ASCENDER_NV = 0x200000, + GL_FONT_DESCENDER_NV = 0x400000, + GL_FONT_HEIGHT_NV = 0x800000, + GL_FONT_MAX_ADVANCE_WIDTH_NV = 0x1000000, + GL_FONT_MAX_ADVANCE_HEIGHT_NV = 0x2000000, + GL_FONT_UNDERLINE_POSITION_NV = 0x4000000, + GL_FONT_UNDERLINE_THICKNESS_NV = 0x8000000, + GL_FONT_HAS_KERNING_NV = 0x10000000; + + /** + * Accepted by the <pathListMode> parameter of GetPathSpacingNV: + */ + public static final int GL_ACCUM_ADJACENT_PAIRS_NV = 0x90AD, + GL_ADJACENT_PAIRS_NV = 0x90AE, + GL_FIRST_TO_REST_NV = 0x90AF; + + /** + * Accepted by the <pname> parameter of GetPathColorGenivNV, + * GetPathColorGenfvNV, GetPathTexGenivNV and GetPathTexGenfvNV: + */ + public static final int GL_PATH_GEN_MODE_NV = 0x90B0, + GL_PATH_GEN_COEFF_NV = 0x90B1, + GL_PATH_GEN_COLOR_FORMAT_NV = 0x90B2, + GL_PATH_GEN_COMPONENTS_NV = 0x90B3; + + private NVPathRendering() {} + + public static void glPathCommandsNV(int path, ByteBuffer commands, int coordType, ByteBuffer coords) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPathCommandsNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(commands); + BufferChecks.checkDirect(coords); + nglPathCommandsNV(path, commands.remaining(), MemoryUtil.getAddress(commands), coords.remaining(), coordType, MemoryUtil.getAddress(coords), function_pointer); + } + static native void nglPathCommandsNV(int path, int commands_numCommands, long commands, int coords_numCoords, int coordType, long coords, long function_pointer); + + public static void glPathCoordsNV(int path, int coordType, ByteBuffer coords) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPathCoordsNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(coords); + nglPathCoordsNV(path, coords.remaining(), coordType, MemoryUtil.getAddress(coords), function_pointer); + } + static native void nglPathCoordsNV(int path, int coords_numCoords, int coordType, long coords, long function_pointer); + + public static void glPathSubCommandsNV(int path, int commandStart, int commandsToDelete, ByteBuffer commands, int coordType, ByteBuffer coords) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPathSubCommandsNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(commands); + BufferChecks.checkDirect(coords); + nglPathSubCommandsNV(path, commandStart, commandsToDelete, commands.remaining(), MemoryUtil.getAddress(commands), coords.remaining(), coordType, MemoryUtil.getAddress(coords), function_pointer); + } + static native void nglPathSubCommandsNV(int path, int commandStart, int commandsToDelete, int commands_numCommands, long commands, int coords_numCoords, int coordType, long coords, long function_pointer); + + public static void glPathSubCoordsNV(int path, int coordStart, int coordType, ByteBuffer coords) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPathSubCoordsNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(coords); + nglPathSubCoordsNV(path, coordStart, coords.remaining(), coordType, MemoryUtil.getAddress(coords), function_pointer); + } + static native void nglPathSubCoordsNV(int path, int coordStart, int coords_numCoords, int coordType, long coords, long function_pointer); + + public static void glPathStringNV(int path, int format, ByteBuffer pathString) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPathStringNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pathString); + nglPathStringNV(path, format, pathString.remaining(), MemoryUtil.getAddress(pathString), function_pointer); + } + static native void nglPathStringNV(int path, int format, int pathString_length, long pathString, long function_pointer); + + public static void glPathGlyphsNV(int firstPathName, int fontTarget, ByteBuffer fontName, int fontStyle, int type, ByteBuffer charcodes, int handleMissingGlyphs, int pathParameterTemplate, float emScale) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPathGlyphsNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(fontName); + BufferChecks.checkNullTerminated(fontName); + BufferChecks.checkDirect(charcodes); + nglPathGlyphsNV(firstPathName, fontTarget, MemoryUtil.getAddress(fontName), fontStyle, charcodes.remaining() / GLChecks.calculateBytesPerCharCode(type), type, MemoryUtil.getAddress(charcodes), handleMissingGlyphs, pathParameterTemplate, emScale, function_pointer); + } + static native void nglPathGlyphsNV(int firstPathName, int fontTarget, long fontName, int fontStyle, int charcodes_numGlyphs, int type, long charcodes, int handleMissingGlyphs, int pathParameterTemplate, float emScale, long function_pointer); + + public static void glPathGlyphRangeNV(int firstPathName, int fontTarget, ByteBuffer fontName, int fontStyle, int firstGlyph, int numGlyphs, int handleMissingGlyphs, int pathParameterTemplate, float emScale) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPathGlyphRangeNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(fontName); + BufferChecks.checkNullTerminated(fontName); + nglPathGlyphRangeNV(firstPathName, fontTarget, MemoryUtil.getAddress(fontName), fontStyle, firstGlyph, numGlyphs, handleMissingGlyphs, pathParameterTemplate, emScale, function_pointer); + } + static native void nglPathGlyphRangeNV(int firstPathName, int fontTarget, long fontName, int fontStyle, int firstGlyph, int numGlyphs, int handleMissingGlyphs, int pathParameterTemplate, float emScale, long function_pointer); + + public static void glWeightPathsNV(int resultPath, IntBuffer paths, FloatBuffer weights) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glWeightPathsNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(paths); + BufferChecks.checkBuffer(weights, paths.remaining()); + nglWeightPathsNV(resultPath, paths.remaining(), MemoryUtil.getAddress(paths), MemoryUtil.getAddress(weights), function_pointer); + } + static native void nglWeightPathsNV(int resultPath, int paths_numPaths, long paths, long weights, long function_pointer); + + public static void glCopyPathNV(int resultPath, int srcPath) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCopyPathNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglCopyPathNV(resultPath, srcPath, function_pointer); + } + static native void nglCopyPathNV(int resultPath, int srcPath, long function_pointer); + + public static void glInterpolatePathsNV(int resultPath, int pathA, int pathB, float weight) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glInterpolatePathsNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglInterpolatePathsNV(resultPath, pathA, pathB, weight, function_pointer); + } + static native void nglInterpolatePathsNV(int resultPath, int pathA, int pathB, float weight, long function_pointer); + + public static void glTransformPathNV(int resultPath, int srcPath, int transformType, FloatBuffer transformValues) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTransformPathNV; + BufferChecks.checkFunctionAddress(function_pointer); + if (transformValues != null) + BufferChecks.checkBuffer(transformValues, GLChecks.calculateTransformPathValues(transformType)); + nglTransformPathNV(resultPath, srcPath, transformType, MemoryUtil.getAddressSafe(transformValues), function_pointer); + } + static native void nglTransformPathNV(int resultPath, int srcPath, int transformType, long transformValues, long function_pointer); + + public static void glPathParameterNV(int path, int pname, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPathParameterivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(value, 4); + nglPathParameterivNV(path, pname, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglPathParameterivNV(int path, int pname, long value, long function_pointer); + + public static void glPathParameteriNV(int path, int pname, int value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPathParameteriNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglPathParameteriNV(path, pname, value, function_pointer); + } + static native void nglPathParameteriNV(int path, int pname, int value, long function_pointer); + + public static void glPathParameterfNV(int path, int pname, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPathParameterfvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(value, 4); + nglPathParameterfvNV(path, pname, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglPathParameterfvNV(int path, int pname, long value, long function_pointer); + + public static void glPathParameterfNV(int path, int pname, float value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPathParameterfNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglPathParameterfNV(path, pname, value, function_pointer); + } + static native void nglPathParameterfNV(int path, int pname, float value, long function_pointer); + + public static void glPathDashArrayNV(int path, FloatBuffer dashArray) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPathDashArrayNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(dashArray); + nglPathDashArrayNV(path, dashArray.remaining(), MemoryUtil.getAddress(dashArray), function_pointer); + } + static native void nglPathDashArrayNV(int path, int dashArray_dashCount, long dashArray, long function_pointer); + + public static int glGenPathsNV(int range) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenPathsNV; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglGenPathsNV(range, function_pointer); + return __result; + } + static native int nglGenPathsNV(int range, long function_pointer); + + public static void glDeletePathsNV(int path, int range) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeletePathsNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeletePathsNV(path, range, function_pointer); + } + static native void nglDeletePathsNV(int path, int range, long function_pointer); + + public static boolean glIsPathNV(int path) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsPathNV; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsPathNV(path, function_pointer); + return __result; + } + static native boolean nglIsPathNV(int path, long function_pointer); + + public static void glPathStencilFuncNV(int func, int ref, int mask) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPathStencilFuncNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglPathStencilFuncNV(func, ref, mask, function_pointer); + } + static native void nglPathStencilFuncNV(int func, int ref, int mask, long function_pointer); + + public static void glPathStencilDepthOffsetNV(float factor, int units) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPathStencilDepthOffsetNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglPathStencilDepthOffsetNV(factor, units, function_pointer); + } + static native void nglPathStencilDepthOffsetNV(float factor, int units, long function_pointer); + + public static void glStencilFillPathNV(int path, int fillMode, int mask) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glStencilFillPathNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglStencilFillPathNV(path, fillMode, mask, function_pointer); + } + static native void nglStencilFillPathNV(int path, int fillMode, int mask, long function_pointer); + + public static void glStencilStrokePathNV(int path, int reference, int mask) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glStencilStrokePathNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglStencilStrokePathNV(path, reference, mask, function_pointer); + } + static native void nglStencilStrokePathNV(int path, int reference, int mask, long function_pointer); + + public static void glStencilFillPathInstancedNV(int pathNameType, ByteBuffer paths, int pathBase, int fillMode, int mask, int transformType, FloatBuffer transformValues) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glStencilFillPathInstancedNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(paths); + if (transformValues != null) + BufferChecks.checkBuffer(transformValues, GLChecks.calculateTransformPathValues(transformType)); + nglStencilFillPathInstancedNV(paths.remaining() / GLChecks.calculateBytesPerPathName(pathNameType), pathNameType, MemoryUtil.getAddress(paths), pathBase, fillMode, mask, transformType, MemoryUtil.getAddressSafe(transformValues), function_pointer); + } + static native void nglStencilFillPathInstancedNV(int paths_numPaths, int pathNameType, long paths, int pathBase, int fillMode, int mask, int transformType, long transformValues, long function_pointer); + + public static void glStencilStrokePathInstancedNV(int pathNameType, ByteBuffer paths, int pathBase, int reference, int mask, int transformType, FloatBuffer transformValues) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glStencilStrokePathInstancedNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(paths); + if (transformValues != null) + BufferChecks.checkBuffer(transformValues, GLChecks.calculateTransformPathValues(transformType)); + nglStencilStrokePathInstancedNV(paths.remaining() / GLChecks.calculateBytesPerPathName(pathNameType), pathNameType, MemoryUtil.getAddress(paths), pathBase, reference, mask, transformType, MemoryUtil.getAddressSafe(transformValues), function_pointer); + } + static native void nglStencilStrokePathInstancedNV(int paths_numPaths, int pathNameType, long paths, int pathBase, int reference, int mask, int transformType, long transformValues, long function_pointer); + + public static void glPathCoverDepthFuncNV(int zfunc) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPathCoverDepthFuncNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglPathCoverDepthFuncNV(zfunc, function_pointer); + } + static native void nglPathCoverDepthFuncNV(int zfunc, long function_pointer); + + public static void glPathColorGenNV(int color, int genMode, int colorFormat, FloatBuffer coeffs) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPathColorGenNV; + BufferChecks.checkFunctionAddress(function_pointer); + if (coeffs != null) + BufferChecks.checkBuffer(coeffs, GLChecks.calculatePathColorGenCoeffsCount(genMode, colorFormat)); + nglPathColorGenNV(color, genMode, colorFormat, MemoryUtil.getAddressSafe(coeffs), function_pointer); + } + static native void nglPathColorGenNV(int color, int genMode, int colorFormat, long coeffs, long function_pointer); + + public static void glPathTexGenNV(int texCoordSet, int genMode, FloatBuffer coeffs) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPathTexGenNV; + BufferChecks.checkFunctionAddress(function_pointer); + if (coeffs != null) + BufferChecks.checkDirect(coeffs); + nglPathTexGenNV(texCoordSet, genMode, GLChecks.calculatePathTextGenCoeffsPerComponent(coeffs, genMode), MemoryUtil.getAddressSafe(coeffs), function_pointer); + } + static native void nglPathTexGenNV(int texCoordSet, int genMode, int coeffs_components, long coeffs, long function_pointer); + + public static void glPathFogGenNV(int genMode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPathFogGenNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglPathFogGenNV(genMode, function_pointer); + } + static native void nglPathFogGenNV(int genMode, long function_pointer); + + public static void glCoverFillPathNV(int path, int coverMode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCoverFillPathNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglCoverFillPathNV(path, coverMode, function_pointer); + } + static native void nglCoverFillPathNV(int path, int coverMode, long function_pointer); + + public static void glCoverStrokePathNV(int name, int coverMode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCoverStrokePathNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglCoverStrokePathNV(name, coverMode, function_pointer); + } + static native void nglCoverStrokePathNV(int name, int coverMode, long function_pointer); + + public static void glCoverFillPathInstancedNV(int pathNameType, ByteBuffer paths, int pathBase, int coverMode, int transformType, FloatBuffer transformValues) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCoverFillPathInstancedNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(paths); + if (transformValues != null) + BufferChecks.checkBuffer(transformValues, GLChecks.calculateTransformPathValues(transformType)); + nglCoverFillPathInstancedNV(paths.remaining() / GLChecks.calculateBytesPerPathName(pathNameType), pathNameType, MemoryUtil.getAddress(paths), pathBase, coverMode, transformType, MemoryUtil.getAddressSafe(transformValues), function_pointer); + } + static native void nglCoverFillPathInstancedNV(int paths_numPaths, int pathNameType, long paths, int pathBase, int coverMode, int transformType, long transformValues, long function_pointer); + + public static void glCoverStrokePathInstancedNV(int pathNameType, ByteBuffer paths, int pathBase, int coverMode, int transformType, FloatBuffer transformValues) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCoverStrokePathInstancedNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(paths); + if (transformValues != null) + BufferChecks.checkBuffer(transformValues, GLChecks.calculateTransformPathValues(transformType)); + nglCoverStrokePathInstancedNV(paths.remaining() / GLChecks.calculateBytesPerPathName(pathNameType), pathNameType, MemoryUtil.getAddress(paths), pathBase, coverMode, transformType, MemoryUtil.getAddressSafe(transformValues), function_pointer); + } + static native void nglCoverStrokePathInstancedNV(int paths_numPaths, int pathNameType, long paths, int pathBase, int coverMode, int transformType, long transformValues, long function_pointer); + + public static void glGetPathParameterNV(int name, int param, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPathParameterivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(value, 4); + nglGetPathParameterivNV(name, param, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglGetPathParameterivNV(int name, int param, long value, long function_pointer); + + /** Overloads glGetPathParameterivNV. */ + public static int glGetPathParameteriNV(int name, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPathParameterivNV; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer value = APIUtil.getBufferInt(caps); + nglGetPathParameterivNV(name, param, MemoryUtil.getAddress(value), function_pointer); + return value.get(0); + } + + public static void glGetPathParameterfvNV(int name, int param, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPathParameterfvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(value, 4); + nglGetPathParameterfvNV(name, param, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglGetPathParameterfvNV(int name, int param, long value, long function_pointer); + + /** Overloads glGetPathParameterfvNV. */ + public static float glGetPathParameterfNV(int name, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPathParameterfvNV; + BufferChecks.checkFunctionAddress(function_pointer); + FloatBuffer value = APIUtil.getBufferFloat(caps); + nglGetPathParameterfvNV(name, param, MemoryUtil.getAddress(value), function_pointer); + return value.get(0); + } + + public static void glGetPathCommandsNV(int name, ByteBuffer commands) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPathCommandsNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(commands); + nglGetPathCommandsNV(name, MemoryUtil.getAddress(commands), function_pointer); + } + static native void nglGetPathCommandsNV(int name, long commands, long function_pointer); + + public static void glGetPathCoordsNV(int name, FloatBuffer coords) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPathCoordsNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(coords); + nglGetPathCoordsNV(name, MemoryUtil.getAddress(coords), function_pointer); + } + static native void nglGetPathCoordsNV(int name, long coords, long function_pointer); + + public static void glGetPathDashArrayNV(int name, FloatBuffer dashArray) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPathDashArrayNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(dashArray); + nglGetPathDashArrayNV(name, MemoryUtil.getAddress(dashArray), function_pointer); + } + static native void nglGetPathDashArrayNV(int name, long dashArray, long function_pointer); + + public static void glGetPathMetricsNV(int metricQueryMask, int pathNameType, ByteBuffer paths, int pathBase, int stride, FloatBuffer metrics) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPathMetricsNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(paths); + BufferChecks.checkBuffer(metrics, GLChecks.calculateMetricsSize(metricQueryMask, stride)); + nglGetPathMetricsNV(metricQueryMask, paths.remaining() / GLChecks.calculateBytesPerPathName(pathNameType), pathNameType, MemoryUtil.getAddress(paths), pathBase, stride, MemoryUtil.getAddress(metrics), function_pointer); + } + static native void nglGetPathMetricsNV(int metricQueryMask, int paths_numPaths, int pathNameType, long paths, int pathBase, int stride, long metrics, long function_pointer); + + public static void glGetPathMetricRangeNV(int metricQueryMask, int fistPathName, int numPaths, int stride, FloatBuffer metrics) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPathMetricRangeNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(metrics, GLChecks.calculateMetricsSize(metricQueryMask, stride)); + nglGetPathMetricRangeNV(metricQueryMask, fistPathName, numPaths, stride, MemoryUtil.getAddress(metrics), function_pointer); + } + static native void nglGetPathMetricRangeNV(int metricQueryMask, int fistPathName, int numPaths, int stride, long metrics, long function_pointer); + + public static void glGetPathSpacingNV(int pathListMode, int pathNameType, ByteBuffer paths, int pathBase, float advanceScale, float kerningScale, int transformType, FloatBuffer returnedSpacing) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPathSpacingNV; + BufferChecks.checkFunctionAddress(function_pointer); + int numPaths = paths.remaining() / GLChecks.calculateBytesPerPathName(pathNameType); + BufferChecks.checkDirect(paths); + BufferChecks.checkBuffer(returnedSpacing, numPaths - 1); + nglGetPathSpacingNV(pathListMode, numPaths, pathNameType, MemoryUtil.getAddress(paths), pathBase, advanceScale, kerningScale, transformType, MemoryUtil.getAddress(returnedSpacing), function_pointer); + } + static native void nglGetPathSpacingNV(int pathListMode, int paths_numPaths, int pathNameType, long paths, int pathBase, float advanceScale, float kerningScale, int transformType, long returnedSpacing, long function_pointer); + + public static void glGetPathColorGenNV(int color, int pname, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPathColorGenivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(value, 16); + nglGetPathColorGenivNV(color, pname, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglGetPathColorGenivNV(int color, int pname, long value, long function_pointer); + + /** Overloads glGetPathColorGenivNV. */ + public static int glGetPathColorGeniNV(int color, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPathColorGenivNV; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer value = APIUtil.getBufferInt(caps); + nglGetPathColorGenivNV(color, pname, MemoryUtil.getAddress(value), function_pointer); + return value.get(0); + } + + public static void glGetPathColorGenNV(int color, int pname, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPathColorGenfvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(value, 16); + nglGetPathColorGenfvNV(color, pname, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglGetPathColorGenfvNV(int color, int pname, long value, long function_pointer); + + /** Overloads glGetPathColorGenfvNV. */ + public static float glGetPathColorGenfNV(int color, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPathColorGenfvNV; + BufferChecks.checkFunctionAddress(function_pointer); + FloatBuffer value = APIUtil.getBufferFloat(caps); + nglGetPathColorGenfvNV(color, pname, MemoryUtil.getAddress(value), function_pointer); + return value.get(0); + } + + public static void glGetPathTexGenNV(int texCoordSet, int pname, IntBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPathTexGenivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(value, 16); + nglGetPathTexGenivNV(texCoordSet, pname, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglGetPathTexGenivNV(int texCoordSet, int pname, long value, long function_pointer); + + /** Overloads glGetPathTexGenivNV. */ + public static int glGetPathTexGeniNV(int texCoordSet, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPathTexGenivNV; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer value = APIUtil.getBufferInt(caps); + nglGetPathTexGenivNV(texCoordSet, pname, MemoryUtil.getAddress(value), function_pointer); + return value.get(0); + } + + public static void glGetPathTexGenNV(int texCoordSet, int pname, FloatBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPathTexGenfvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(value, 16); + nglGetPathTexGenfvNV(texCoordSet, pname, MemoryUtil.getAddress(value), function_pointer); + } + static native void nglGetPathTexGenfvNV(int texCoordSet, int pname, long value, long function_pointer); + + /** Overloads glGetPathTexGenfvNV. */ + public static float glGetPathTexGenfNV(int texCoordSet, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPathTexGenfvNV; + BufferChecks.checkFunctionAddress(function_pointer); + FloatBuffer value = APIUtil.getBufferFloat(caps); + nglGetPathTexGenfvNV(texCoordSet, pname, MemoryUtil.getAddress(value), function_pointer); + return value.get(0); + } + + public static boolean glIsPointInFillPathNV(int path, int mask, float x, float y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsPointInFillPathNV; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsPointInFillPathNV(path, mask, x, y, function_pointer); + return __result; + } + static native boolean nglIsPointInFillPathNV(int path, int mask, float x, float y, long function_pointer); + + public static boolean glIsPointInStrokePathNV(int path, float x, float y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsPointInStrokePathNV; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsPointInStrokePathNV(path, x, y, function_pointer); + return __result; + } + static native boolean nglIsPointInStrokePathNV(int path, float x, float y, long function_pointer); + + public static float glGetPathLengthNV(int path, int startSegment, int numSegments) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetPathLengthNV; + BufferChecks.checkFunctionAddress(function_pointer); + float __result = nglGetPathLengthNV(path, startSegment, numSegments, function_pointer); + return __result; + } + static native float nglGetPathLengthNV(int path, int startSegment, int numSegments, long function_pointer); + + public static boolean glPointAlongPathNV(int path, int startSegment, int numSegments, float distance, FloatBuffer x, FloatBuffer y, FloatBuffer tangentX, FloatBuffer tangentY) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPointAlongPathNV; + BufferChecks.checkFunctionAddress(function_pointer); + if (x != null) + BufferChecks.checkBuffer(x, 1); + if (y != null) + BufferChecks.checkBuffer(y, 1); + if (tangentX != null) + BufferChecks.checkBuffer(tangentX, 1); + if (tangentY != null) + BufferChecks.checkBuffer(tangentY, 1); + boolean __result = nglPointAlongPathNV(path, startSegment, numSegments, distance, MemoryUtil.getAddressSafe(x), MemoryUtil.getAddressSafe(y), MemoryUtil.getAddressSafe(tangentX), MemoryUtil.getAddressSafe(tangentY), function_pointer); + return __result; + } + static native boolean nglPointAlongPathNV(int path, int startSegment, int numSegments, float distance, long x, long y, long tangentX, long tangentY, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVPixelDataRange.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVPixelDataRange.java new file mode 100644 index 0000000..e48ab94 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVPixelDataRange.java @@ -0,0 +1,77 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVPixelDataRange { + + /** + * Accepted by the <target> parameter of PixelDataRangeNV and + * FlushPixelDataRangeNV, and by the <cap> parameter of + * EnableClientState, DisableClientState, and IsEnabled: + */ + public static final int GL_WRITE_PIXEL_DATA_RANGE_NV = 0x8878, + GL_READ_PIXEL_DATA_RANGE_NV = 0x8879; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV = 0x887A, + GL_READ_PIXEL_DATA_RANGE_LENGTH_NV = 0x887B; + + /** + * Accepted by the <pname> parameter of GetPointerv: + */ + public static final int GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV = 0x887C, + GL_READ_PIXEL_DATA_RANGE_POINTER_NV = 0x887D; + + private NVPixelDataRange() {} + + public static void glPixelDataRangeNV(int target, ByteBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPixelDataRangeNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglPixelDataRangeNV(target, data.remaining(), MemoryUtil.getAddress(data), function_pointer); + } + public static void glPixelDataRangeNV(int target, DoubleBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPixelDataRangeNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglPixelDataRangeNV(target, (data.remaining() << 3), MemoryUtil.getAddress(data), function_pointer); + } + public static void glPixelDataRangeNV(int target, FloatBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPixelDataRangeNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglPixelDataRangeNV(target, (data.remaining() << 2), MemoryUtil.getAddress(data), function_pointer); + } + public static void glPixelDataRangeNV(int target, IntBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPixelDataRangeNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglPixelDataRangeNV(target, (data.remaining() << 2), MemoryUtil.getAddress(data), function_pointer); + } + public static void glPixelDataRangeNV(int target, ShortBuffer data) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPixelDataRangeNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(data); + nglPixelDataRangeNV(target, (data.remaining() << 1), MemoryUtil.getAddress(data), function_pointer); + } + static native void nglPixelDataRangeNV(int target, int data_length, long data, long function_pointer); + + public static void glFlushPixelDataRangeNV(int target) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFlushPixelDataRangeNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglFlushPixelDataRangeNV(target, function_pointer); + } + static native void nglFlushPixelDataRangeNV(int target, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVPointSprite.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVPointSprite.java new file mode 100644 index 0000000..8602d80 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVPointSprite.java @@ -0,0 +1,32 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVPointSprite { + + public static final int GL_POINT_SPRITE_NV = 0x8861, + GL_COORD_REPLACE_NV = 0x8862, + GL_POINT_SPRITE_R_MODE_NV = 0x8863; + + private NVPointSprite() {} + + public static void glPointParameteriNV(int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPointParameteriNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglPointParameteriNV(pname, param, function_pointer); + } + static native void nglPointParameteriNV(int pname, int param, long function_pointer); + + public static void glPointParameterNV(int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPointParameterivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglPointParameterivNV(pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglPointParameterivNV(int pname, long params, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVPresentVideo.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVPresentVideo.java new file mode 100644 index 0000000..8f5a171 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVPresentVideo.java @@ -0,0 +1,128 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVPresentVideo { + + /** + * Accepted by the <type> parameter of PresentFrameKeyedNV and + * PresentFrameDualFillNV: + */ + public static final int GL_FRAME_NV = 0x8E26, + FIELDS_NV = 0x8E27; + + /** + * Accepted by the <pname> parameter of GetVideoivNV, GetVideouivNV, + * GetVideoi64vNV, GetVideoui64vNV: + */ + public static final int GL_CURRENT_TIME_NV = 0x8E28, + GL_NUM_FILL_STREAMS_NV = 0x8E29; + + /** + * Accepted by the <target> parameter of GetQueryiv: + */ + public static final int GL_PRESENT_TIME_NV = 0x8E2A, + GL_PRESENT_DURATION_NV = 0x8E2B; + + /** + * Accepted by the <attribute> parameter of NVPresentVideoUtil.glQueryContextNV: + */ + public static final int GL_NUM_VIDEO_SLOTS_NV = 0x20F0; + + private NVPresentVideo() {} + + public static void glPresentFrameKeyedNV(int video_slot, long minPresentTime, int beginPresentTimeId, int presentDurationId, int type, int target0, int fill0, int key0, int target1, int fill1, int key1) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPresentFrameKeyedNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglPresentFrameKeyedNV(video_slot, minPresentTime, beginPresentTimeId, presentDurationId, type, target0, fill0, key0, target1, fill1, key1, function_pointer); + } + static native void nglPresentFrameKeyedNV(int video_slot, long minPresentTime, int beginPresentTimeId, int presentDurationId, int type, int target0, int fill0, int key0, int target1, int fill1, int key1, long function_pointer); + + public static void glPresentFrameDualFillNV(int video_slot, long minPresentTime, int beginPresentTimeId, int presentDurationId, int type, int target0, int fill0, int target1, int fill1, int target2, int fill2, int target3, int fill3) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPresentFrameDualFillNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglPresentFrameDualFillNV(video_slot, minPresentTime, beginPresentTimeId, presentDurationId, type, target0, fill0, target1, fill1, target2, fill2, target3, fill3, function_pointer); + } + static native void nglPresentFrameDualFillNV(int video_slot, long minPresentTime, int beginPresentTimeId, int presentDurationId, int type, int target0, int fill0, int target1, int fill1, int target2, int fill2, int target3, int fill3, long function_pointer); + + public static void glGetVideoNV(int video_slot, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVideoivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetVideoivNV(video_slot, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVideoivNV(int video_slot, int pname, long params, long function_pointer); + + /** Overloads glGetVideoivNV. */ + public static int glGetVideoiNV(int video_slot, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVideoivNV; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetVideoivNV(video_slot, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetVideouNV(int video_slot, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVideouivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetVideouivNV(video_slot, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVideouivNV(int video_slot, int pname, long params, long function_pointer); + + /** Overloads glGetVideouivNV. */ + public static int glGetVideouiNV(int video_slot, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVideouivNV; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetVideouivNV(video_slot, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetVideoNV(int video_slot, int pname, LongBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVideoi64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetVideoi64vNV(video_slot, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVideoi64vNV(int video_slot, int pname, long params, long function_pointer); + + /** Overloads glGetVideoi64vNV. */ + public static long glGetVideoi64NV(int video_slot, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVideoi64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + LongBuffer params = APIUtil.getBufferLong(caps); + nglGetVideoi64vNV(video_slot, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetVideouNV(int video_slot, int pname, LongBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVideoui64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetVideoui64vNV(video_slot, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVideoui64vNV(int video_slot, int pname, long params, long function_pointer); + + /** Overloads glGetVideoui64vNV. */ + public static long glGetVideoui64NV(int video_slot, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVideoui64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + LongBuffer params = APIUtil.getBufferLong(caps); + nglGetVideoui64vNV(video_slot, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVPrimitiveRestart.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVPrimitiveRestart.java new file mode 100644 index 0000000..9dd77e3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVPrimitiveRestart.java @@ -0,0 +1,41 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVPrimitiveRestart { + + /** + * Accepted by the <array> parameter of EnableClientState and + * DisableClientState, by the <cap> parameter of IsEnabled, and by + * the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev: + */ + public static final int GL_PRIMITIVE_RESTART_NV = 0x8558; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_PRIMITIVE_RESTART_INDEX_NV = 0x8559; + + private NVPrimitiveRestart() {} + + public static void glPrimitiveRestartNV() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPrimitiveRestartNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglPrimitiveRestartNV(function_pointer); + } + static native void nglPrimitiveRestartNV(long function_pointer); + + public static void glPrimitiveRestartIndexNV(int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPrimitiveRestartIndexNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglPrimitiveRestartIndexNV(index, function_pointer); + } + static native void nglPrimitiveRestartIndexNV(int index, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVProgram.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVProgram.java new file mode 100644 index 0000000..dfaf574 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVProgram.java @@ -0,0 +1,181 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public class NVProgram { + + /** + * Accepted by the <pname> parameter of GetProgramivNV: + */ + public static final int GL_PROGRAM_TARGET_NV = 0x8646, + GL_PROGRAM_LENGTH_NV = 0x8627, + GL_PROGRAM_RESIDENT_NV = 0x8647; + + /** + * Accepted by the <pname> parameter of GetProgramStringNV: + */ + public static final int GL_PROGRAM_STRING_NV = 0x8628; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_PROGRAM_ERROR_POSITION_NV = 0x864B; + + /** + * Accepted by the <name> parameter of GetString: + */ + public static final int GL_PROGRAM_ERROR_STRING_NV = 0x8874; + + + public static void glLoadProgramNV(int target, int programID, ByteBuffer string) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glLoadProgramNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(string); + nglLoadProgramNV(target, programID, string.remaining(), MemoryUtil.getAddress(string), function_pointer); + } + static native void nglLoadProgramNV(int target, int programID, int string_length, long string, long function_pointer); + + /** Overloads glLoadProgramNV. */ + public static void glLoadProgramNV(int target, int programID, CharSequence string) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glLoadProgramNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglLoadProgramNV(target, programID, string.length(), APIUtil.getBuffer(caps, string), function_pointer); + } + + public static void glBindProgramNV(int target, int programID) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindProgramNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindProgramNV(target, programID, function_pointer); + } + static native void nglBindProgramNV(int target, int programID, long function_pointer); + + public static void glDeleteProgramsNV(IntBuffer programs) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteProgramsNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(programs); + nglDeleteProgramsNV(programs.remaining(), MemoryUtil.getAddress(programs), function_pointer); + } + static native void nglDeleteProgramsNV(int programs_n, long programs, long function_pointer); + + /** Overloads glDeleteProgramsNV. */ + public static void glDeleteProgramsNV(int program) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteProgramsNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeleteProgramsNV(1, APIUtil.getInt(caps, program), function_pointer); + } + + public static void glGenProgramsNV(IntBuffer programs) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenProgramsNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(programs); + nglGenProgramsNV(programs.remaining(), MemoryUtil.getAddress(programs), function_pointer); + } + static native void nglGenProgramsNV(int programs_n, long programs, long function_pointer); + + /** Overloads glGenProgramsNV. */ + public static int glGenProgramsNV() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenProgramsNV; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer programs = APIUtil.getBufferInt(caps); + nglGenProgramsNV(1, MemoryUtil.getAddress(programs), function_pointer); + return programs.get(0); + } + + public static void glGetProgramNV(int programID, int parameterName, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglGetProgramivNV(programID, parameterName, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetProgramivNV(int programID, int parameterName, long params, long function_pointer); + + /** + * Overloads glGetProgramivNV. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetProgramiNV} instead. + */ + @Deprecated + public static int glGetProgramNV(int programID, int parameterName) { + return NVProgram.glGetProgramiNV(programID, parameterName); + } + + /** Overloads glGetProgramivNV. */ + public static int glGetProgramiNV(int programID, int parameterName) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramivNV; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetProgramivNV(programID, parameterName, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetProgramStringNV(int programID, int parameterName, ByteBuffer paramString) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramStringNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(paramString); + nglGetProgramStringNV(programID, parameterName, MemoryUtil.getAddress(paramString), function_pointer); + } + static native void nglGetProgramStringNV(int programID, int parameterName, long paramString, long function_pointer); + + /** Overloads glGetProgramStringNV. */ + public static String glGetProgramStringNV(int programID, int parameterName) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramStringNV; + BufferChecks.checkFunctionAddress(function_pointer); + int programLength = glGetProgramiNV(programID, GL_PROGRAM_LENGTH_NV); + ByteBuffer paramString = APIUtil.getBufferByte(caps, programLength); + nglGetProgramStringNV(programID, parameterName, MemoryUtil.getAddress(paramString), function_pointer); + paramString.limit(programLength); + return APIUtil.getString(caps, paramString); + } + + public static boolean glIsProgramNV(int programID) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsProgramNV; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsProgramNV(programID, function_pointer); + return __result; + } + static native boolean nglIsProgramNV(int programID, long function_pointer); + + public static boolean glAreProgramsResidentNV(IntBuffer programIDs, ByteBuffer programResidences) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glAreProgramsResidentNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(programIDs); + BufferChecks.checkBuffer(programResidences, programIDs.remaining()); + boolean __result = nglAreProgramsResidentNV(programIDs.remaining(), MemoryUtil.getAddress(programIDs), MemoryUtil.getAddress(programResidences), function_pointer); + return __result; + } + static native boolean nglAreProgramsResidentNV(int programIDs_n, long programIDs, long programResidences, long function_pointer); + + public static void glRequestResidentProgramsNV(IntBuffer programIDs) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glRequestResidentProgramsNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(programIDs); + nglRequestResidentProgramsNV(programIDs.remaining(), MemoryUtil.getAddress(programIDs), function_pointer); + } + static native void nglRequestResidentProgramsNV(int programIDs_n, long programIDs, long function_pointer); + + /** Overloads glRequestResidentProgramsNV. */ + public static void glRequestResidentProgramsNV(int programID) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glRequestResidentProgramsNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglRequestResidentProgramsNV(1, APIUtil.getInt(caps, programID), function_pointer); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVRegisterCombiners.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVRegisterCombiners.java new file mode 100644 index 0000000..ac64128 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVRegisterCombiners.java @@ -0,0 +1,235 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVRegisterCombiners { + + public static final int GL_REGISTER_COMBINERS_NV = 0x8522, + GL_COMBINER0_NV = 0x8550, + GL_COMBINER1_NV = 0x8551, + GL_COMBINER2_NV = 0x8552, + GL_COMBINER3_NV = 0x8553, + GL_COMBINER4_NV = 0x8554, + GL_COMBINER5_NV = 0x8555, + GL_COMBINER6_NV = 0x8556, + GL_COMBINER7_NV = 0x8557, + GL_VARIABLE_A_NV = 0x8523, + GL_VARIABLE_B_NV = 0x8524, + GL_VARIABLE_C_NV = 0x8525, + GL_VARIABLE_D_NV = 0x8526, + GL_VARIABLE_E_NV = 0x8527, + GL_VARIABLE_F_NV = 0x8528, + GL_VARIABLE_G_NV = 0x8529, + GL_CONSTANT_COLOR0_NV = 0x852A, + GL_CONSTANT_COLOR1_NV = 0x852B, + GL_PRIMARY_COLOR_NV = 0x852C, + GL_SECONDARY_COLOR_NV = 0x852D, + GL_SPARE0_NV = 0x852E, + GL_SPARE1_NV = 0x852F, + GL_UNSIGNED_IDENTITY_NV = 0x8536, + GL_UNSIGNED_INVERT_NV = 0x8537, + GL_EXPAND_NORMAL_NV = 0x8538, + GL_EXPAND_NEGATE_NV = 0x8539, + GL_HALF_BIAS_NORMAL_NV = 0x853A, + GL_HALF_BIAS_NEGATE_NV = 0x853B, + GL_SIGNED_IDENTITY_NV = 0x853C, + GL_SIGNED_NEGATE_NV = 0x853D, + GL_E_TIMES_F_NV = 0x8531, + GL_SPARE0_PLUS_SECONDARY_COLOR_NV = 0x8532, + GL_SCALE_BY_TWO_NV = 0x853E, + GL_SCALE_BY_FOUR_NV = 0x853F, + GL_SCALE_BY_ONE_HALF_NV = 0x8540, + GL_BIAS_BY_NEGATIVE_ONE_HALF_NV = 0x8541, + GL_DISCARD_NV = 0x8530, + GL_COMBINER_INPUT_NV = 0x8542, + GL_COMBINER_MAPPING_NV = 0x8543, + GL_COMBINER_COMPONENT_USAGE_NV = 0x8544, + GL_COMBINER_AB_DOT_PRODUCT_NV = 0x8545, + GL_COMBINER_CD_DOT_PRODUCT_NV = 0x8546, + GL_COMBINER_MUX_SUM_NV = 0x8547, + GL_COMBINER_SCALE_NV = 0x8548, + GL_COMBINER_BIAS_NV = 0x8549, + GL_COMBINER_AB_OUTPUT_NV = 0x854A, + GL_COMBINER_CD_OUTPUT_NV = 0x854B, + GL_COMBINER_SUM_OUTPUT_NV = 0x854C, + GL_NUM_GENERAL_COMBINERS_NV = 0x854E, + GL_COLOR_SUM_CLAMP_NV = 0x854F, + GL_MAX_GENERAL_COMBINERS_NV = 0x854D; + + private NVRegisterCombiners() {} + + public static void glCombinerParameterfNV(int pname, float param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCombinerParameterfNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglCombinerParameterfNV(pname, param, function_pointer); + } + static native void nglCombinerParameterfNV(int pname, float param, long function_pointer); + + public static void glCombinerParameterNV(int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCombinerParameterfvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglCombinerParameterfvNV(pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglCombinerParameterfvNV(int pname, long params, long function_pointer); + + public static void glCombinerParameteriNV(int pname, int param) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCombinerParameteriNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglCombinerParameteriNV(pname, param, function_pointer); + } + static native void nglCombinerParameteriNV(int pname, int param, long function_pointer); + + public static void glCombinerParameterNV(int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCombinerParameterivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglCombinerParameterivNV(pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglCombinerParameterivNV(int pname, long params, long function_pointer); + + public static void glCombinerInputNV(int stage, int portion, int variable, int input, int mapping, int componentUsage) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCombinerInputNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglCombinerInputNV(stage, portion, variable, input, mapping, componentUsage, function_pointer); + } + static native void nglCombinerInputNV(int stage, int portion, int variable, int input, int mapping, int componentUsage, long function_pointer); + + public static void glCombinerOutputNV(int stage, int portion, int abOutput, int cdOutput, int sumOutput, int scale, int bias, boolean abDotProduct, boolean cdDotProduct, boolean muxSum) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCombinerOutputNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglCombinerOutputNV(stage, portion, abOutput, cdOutput, sumOutput, scale, bias, abDotProduct, cdDotProduct, muxSum, function_pointer); + } + static native void nglCombinerOutputNV(int stage, int portion, int abOutput, int cdOutput, int sumOutput, int scale, int bias, boolean abDotProduct, boolean cdDotProduct, boolean muxSum, long function_pointer); + + public static void glFinalCombinerInputNV(int variable, int input, int mapping, int componentUsage) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFinalCombinerInputNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglFinalCombinerInputNV(variable, input, mapping, componentUsage, function_pointer); + } + static native void nglFinalCombinerInputNV(int variable, int input, int mapping, int componentUsage, long function_pointer); + + public static void glGetCombinerInputParameterNV(int stage, int portion, int variable, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetCombinerInputParameterfvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetCombinerInputParameterfvNV(stage, portion, variable, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetCombinerInputParameterfvNV(int stage, int portion, int variable, int pname, long params, long function_pointer); + + /** Overloads glGetCombinerInputParameterfvNV. */ + public static float glGetCombinerInputParameterfNV(int stage, int portion, int variable, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetCombinerInputParameterfvNV; + BufferChecks.checkFunctionAddress(function_pointer); + FloatBuffer params = APIUtil.getBufferFloat(caps); + nglGetCombinerInputParameterfvNV(stage, portion, variable, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetCombinerInputParameterNV(int stage, int portion, int variable, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetCombinerInputParameterivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetCombinerInputParameterivNV(stage, portion, variable, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetCombinerInputParameterivNV(int stage, int portion, int variable, int pname, long params, long function_pointer); + + /** Overloads glGetCombinerInputParameterivNV. */ + public static int glGetCombinerInputParameteriNV(int stage, int portion, int variable, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetCombinerInputParameterivNV; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetCombinerInputParameterivNV(stage, portion, variable, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetCombinerOutputParameterNV(int stage, int portion, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetCombinerOutputParameterfvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetCombinerOutputParameterfvNV(stage, portion, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetCombinerOutputParameterfvNV(int stage, int portion, int pname, long params, long function_pointer); + + /** Overloads glGetCombinerOutputParameterfvNV. */ + public static float glGetCombinerOutputParameterfNV(int stage, int portion, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetCombinerOutputParameterfvNV; + BufferChecks.checkFunctionAddress(function_pointer); + FloatBuffer params = APIUtil.getBufferFloat(caps); + nglGetCombinerOutputParameterfvNV(stage, portion, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetCombinerOutputParameterNV(int stage, int portion, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetCombinerOutputParameterivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetCombinerOutputParameterivNV(stage, portion, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetCombinerOutputParameterivNV(int stage, int portion, int pname, long params, long function_pointer); + + /** Overloads glGetCombinerOutputParameterivNV. */ + public static int glGetCombinerOutputParameteriNV(int stage, int portion, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetCombinerOutputParameterivNV; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetCombinerOutputParameterivNV(stage, portion, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetFinalCombinerInputParameterNV(int variable, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetFinalCombinerInputParameterfvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetFinalCombinerInputParameterfvNV(variable, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetFinalCombinerInputParameterfvNV(int variable, int pname, long params, long function_pointer); + + /** Overloads glGetFinalCombinerInputParameterfvNV. */ + public static float glGetFinalCombinerInputParameterfNV(int variable, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetFinalCombinerInputParameterfvNV; + BufferChecks.checkFunctionAddress(function_pointer); + FloatBuffer params = APIUtil.getBufferFloat(caps); + nglGetFinalCombinerInputParameterfvNV(variable, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetFinalCombinerInputParameterNV(int variable, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetFinalCombinerInputParameterivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetFinalCombinerInputParameterivNV(variable, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetFinalCombinerInputParameterivNV(int variable, int pname, long params, long function_pointer); + + /** Overloads glGetFinalCombinerInputParameterivNV. */ + public static int glGetFinalCombinerInputParameteriNV(int variable, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetFinalCombinerInputParameterivNV; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetFinalCombinerInputParameterivNV(variable, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVRegisterCombiners2.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVRegisterCombiners2.java new file mode 100644 index 0000000..0e0d130 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVRegisterCombiners2.java @@ -0,0 +1,31 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVRegisterCombiners2 { + + public static final int GL_PER_STAGE_CONSTANTS_NV = 0x8535; + + private NVRegisterCombiners2() {} + + public static void glCombinerStageParameterNV(int stage, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glCombinerStageParameterfvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglCombinerStageParameterfvNV(stage, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglCombinerStageParameterfvNV(int stage, int pname, long params, long function_pointer); + + public static void glGetCombinerStageParameterNV(int stage, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetCombinerStageParameterfvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetCombinerStageParameterfvNV(stage, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetCombinerStageParameterfvNV(int stage, int pname, long params, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVShaderBufferLoad.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVShaderBufferLoad.java new file mode 100644 index 0000000..fe75551 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVShaderBufferLoad.java @@ -0,0 +1,172 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVShaderBufferLoad { + + /** + * Accepted by the <pname> parameter of GetBufferParameterui64vNV, + * GetNamedBufferParameterui64vNV: + */ + public static final int GL_BUFFER_GPU_ADDRESS_NV = 0x8F1D; + + /** + * Returned by the <type> parameter of GetActiveUniform: + */ + public static final int GL_GPU_ADDRESS_NV = 0x8F34; + + /** + * Accepted by the <value> parameter of GetIntegerui64vNV: + */ + public static final int GL_MAX_SHADER_BUFFER_ADDRESS_NV = 0x8F35; + + private NVShaderBufferLoad() {} + + public static void glMakeBufferResidentNV(int target, int access) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMakeBufferResidentNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglMakeBufferResidentNV(target, access, function_pointer); + } + static native void nglMakeBufferResidentNV(int target, int access, long function_pointer); + + public static void glMakeBufferNonResidentNV(int target) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMakeBufferNonResidentNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglMakeBufferNonResidentNV(target, function_pointer); + } + static native void nglMakeBufferNonResidentNV(int target, long function_pointer); + + public static boolean glIsBufferResidentNV(int target) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsBufferResidentNV; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsBufferResidentNV(target, function_pointer); + return __result; + } + static native boolean nglIsBufferResidentNV(int target, long function_pointer); + + public static void glMakeNamedBufferResidentNV(int buffer, int access) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMakeNamedBufferResidentNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglMakeNamedBufferResidentNV(buffer, access, function_pointer); + } + static native void nglMakeNamedBufferResidentNV(int buffer, int access, long function_pointer); + + public static void glMakeNamedBufferNonResidentNV(int buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glMakeNamedBufferNonResidentNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglMakeNamedBufferNonResidentNV(buffer, function_pointer); + } + static native void nglMakeNamedBufferNonResidentNV(int buffer, long function_pointer); + + public static boolean glIsNamedBufferResidentNV(int buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsNamedBufferResidentNV; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsNamedBufferResidentNV(buffer, function_pointer); + return __result; + } + static native boolean nglIsNamedBufferResidentNV(int buffer, long function_pointer); + + public static void glGetBufferParameteruNV(int target, int pname, LongBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetBufferParameterui64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetBufferParameterui64vNV(target, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetBufferParameterui64vNV(int target, int pname, long params, long function_pointer); + + /** Overloads glGetBufferParameterui64vNV. */ + public static long glGetBufferParameterui64NV(int target, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetBufferParameterui64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + LongBuffer params = APIUtil.getBufferLong(caps); + nglGetBufferParameterui64vNV(target, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetNamedBufferParameteruNV(int buffer, int pname, LongBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedBufferParameterui64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetNamedBufferParameterui64vNV(buffer, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetNamedBufferParameterui64vNV(int buffer, int pname, long params, long function_pointer); + + /** Overloads glGetNamedBufferParameterui64vNV. */ + public static long glGetNamedBufferParameterui64NV(int buffer, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetNamedBufferParameterui64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + LongBuffer params = APIUtil.getBufferLong(caps); + nglGetNamedBufferParameterui64vNV(buffer, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetIntegeruNV(int value, LongBuffer result) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetIntegerui64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(result, 1); + nglGetIntegerui64vNV(value, MemoryUtil.getAddress(result), function_pointer); + } + static native void nglGetIntegerui64vNV(int value, long result, long function_pointer); + + /** Overloads glGetIntegerui64vNV. */ + public static long glGetIntegerui64NV(int value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetIntegerui64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + LongBuffer result = APIUtil.getBufferLong(caps); + nglGetIntegerui64vNV(value, MemoryUtil.getAddress(result), function_pointer); + return result.get(0); + } + + public static void glUniformui64NV(int location, long value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformui64NV; + BufferChecks.checkFunctionAddress(function_pointer); + nglUniformui64NV(location, value, function_pointer); + } + static native void nglUniformui64NV(int location, long value, long function_pointer); + + public static void glUniformuNV(int location, LongBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glUniformui64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglUniformui64vNV(location, value.remaining(), MemoryUtil.getAddress(value), function_pointer); + } + static native void nglUniformui64vNV(int location, int value_count, long value, long function_pointer); + + public static void glGetUniformuNV(int program, int location, LongBuffer params) { + NVGpuShader5.glGetUniformuNV(program, location, params); + } + + public static void glProgramUniformui64NV(int program, int location, long value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformui64NV; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramUniformui64NV(program, location, value, function_pointer); + } + static native void nglProgramUniformui64NV(int program, int location, long value, long function_pointer); + + public static void glProgramUniformuNV(int program, int location, LongBuffer value) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramUniformui64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(value); + nglProgramUniformui64vNV(program, location, value.remaining(), MemoryUtil.getAddress(value), function_pointer); + } + static native void nglProgramUniformui64vNV(int program, int location, int value_count, long value, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVShaderBufferStore.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVShaderBufferStore.java new file mode 100644 index 0000000..b088f11 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVShaderBufferStore.java @@ -0,0 +1,22 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVShaderBufferStore { + + /** + * Accepted by the <barriers> parameter of MemoryBarrierNV: + */ + public static final int GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV = 0x10; + + /** + * Accepted by the <access> parameter of MakeBufferResidentNV: + */ + public static final int GL_READ_WRITE = 0x88BA, + GL_WRITE_ONLY = 0x88B9; + + private NVShaderBufferStore() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTessellationProgram5.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTessellationProgram5.java new file mode 100644 index 0000000..40577ed --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTessellationProgram5.java @@ -0,0 +1,37 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVTessellationProgram5 { + + /** + * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, + * by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev, and by the <target> parameter of ProgramStringARB, + * BindProgramARB, ProgramEnvParameter4[df][v]ARB, + * ProgramLocalParameter4[df][v]ARB, GetProgramEnvParameter[df]vARB, + * GetProgramLocalParameter[df]vARB, GetProgramivARB and + * GetProgramStringARB: + */ + public static final int GL_TESS_CONTROL_PROGRAM_NV = 0x891E, + GL_TESS_EVALUATION_PROGRAM_NV = 0x891F; + + /** + * Accepted by the <target> parameter of ProgramBufferParametersfvNV, + * ProgramBufferParametersIivNV, and ProgramBufferParametersIuivNV, + * BindBufferRangeNV, BindBufferOffsetNV, BindBufferBaseNV, and BindBuffer + * and the <value> parameter of GetIntegerIndexedvEXT: + */ + public static final int GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV = 0x8C74, + GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV = 0x8C75; + + /** + * Accepted by the <pname> parameter of GetProgramivARB: + */ + public static final int GL_MAX_PROGRAM_PATCH_ATTRIBS_NV = 0x86D8; + + private NVTessellationProgram5() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTexgenReflection.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTexgenReflection.java new file mode 100644 index 0000000..7afcc5e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTexgenReflection.java @@ -0,0 +1,14 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVTexgenReflection { + + public static final int GL_NORMAL_MAP_NV = 0x8511, + GL_REFLECTION_MAP_NV = 0x8512; + + private NVTexgenReflection() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTextureBarrier.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTextureBarrier.java new file mode 100644 index 0000000..af1f707 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTextureBarrier.java @@ -0,0 +1,19 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVTextureBarrier { + + private NVTextureBarrier() {} + + public static void glTextureBarrierNV() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureBarrierNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglTextureBarrierNV(function_pointer); + } + static native void nglTextureBarrierNV(long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTextureCompressionVTC.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTextureCompressionVTC.java new file mode 100644 index 0000000..61f2f7a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTextureCompressionVTC.java @@ -0,0 +1,21 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVTextureCompressionVTC { + + /** + * Accepted by the <internalformat> parameter of TexImage3D and + * CompressedTexImage3DARB and the <format> parameter of + * CompressedTexSubImage2DARB: + */ + public static final int GL_COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0, + GL_COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1, + GL_COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2, + GL_COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3; + + private NVTextureCompressionVTC() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTextureEnvCombine4.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTextureEnvCombine4.java new file mode 100644 index 0000000..01395f4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTextureEnvCombine4.java @@ -0,0 +1,17 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVTextureEnvCombine4 { + + public static final int GL_COMBINE4_NV = 0x8503, + GL_SOURCE3_RGB_NV = 0x8583, + GL_SOURCE3_ALPHA_NV = 0x858B, + GL_OPERAND3_RGB_NV = 0x8593, + GL_OPERAND3_ALPHA_NV = 0x859B; + + private NVTextureEnvCombine4() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTextureExpandNormal.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTextureExpandNormal.java new file mode 100644 index 0000000..23cc3c3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTextureExpandNormal.java @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVTextureExpandNormal { + + /** + * Accepted by the <pname> parameters of TexParameteri, + * TexParameteriv, TexParameterf, TexParameterfv, GetTexParameteri, + * and GetTexParameteriv: + */ + public static final int GL_TEXTURE_UNSIGNED_REMAP_MODE_NV = 0x888F; + + private NVTextureExpandNormal() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTextureMultisample.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTextureMultisample.java new file mode 100644 index 0000000..a8d03a1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTextureMultisample.java @@ -0,0 +1,65 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVTextureMultisample { + + /** + * Accepted by the <pname> parameter of GetTexLevelParameter: + */ + public static final int GL_TEXTURE_COVERAGE_SAMPLES_NV = 0x9045, + GL_TEXTURE_COLOR_SAMPLES_NV = 0x9046; + + private NVTextureMultisample() {} + + public static void glTexImage2DMultisampleCoverageNV(int target, int coverageSamples, int colorSamples, int internalFormat, int width, int height, boolean fixedSampleLocations) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexImage2DMultisampleCoverageNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexImage2DMultisampleCoverageNV(target, coverageSamples, colorSamples, internalFormat, width, height, fixedSampleLocations, function_pointer); + } + static native void nglTexImage2DMultisampleCoverageNV(int target, int coverageSamples, int colorSamples, int internalFormat, int width, int height, boolean fixedSampleLocations, long function_pointer); + + public static void glTexImage3DMultisampleCoverageNV(int target, int coverageSamples, int colorSamples, int internalFormat, int width, int height, int depth, boolean fixedSampleLocations) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexImage3DMultisampleCoverageNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexImage3DMultisampleCoverageNV(target, coverageSamples, colorSamples, internalFormat, width, height, depth, fixedSampleLocations, function_pointer); + } + static native void nglTexImage3DMultisampleCoverageNV(int target, int coverageSamples, int colorSamples, int internalFormat, int width, int height, int depth, boolean fixedSampleLocations, long function_pointer); + + public static void glTextureImage2DMultisampleNV(int texture, int target, int samples, int internalFormat, int width, int height, boolean fixedSampleLocations) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureImage2DMultisampleNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglTextureImage2DMultisampleNV(texture, target, samples, internalFormat, width, height, fixedSampleLocations, function_pointer); + } + static native void nglTextureImage2DMultisampleNV(int texture, int target, int samples, int internalFormat, int width, int height, boolean fixedSampleLocations, long function_pointer); + + public static void glTextureImage3DMultisampleNV(int texture, int target, int samples, int internalFormat, int width, int height, int depth, boolean fixedSampleLocations) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureImage3DMultisampleNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglTextureImage3DMultisampleNV(texture, target, samples, internalFormat, width, height, depth, fixedSampleLocations, function_pointer); + } + static native void nglTextureImage3DMultisampleNV(int texture, int target, int samples, int internalFormat, int width, int height, int depth, boolean fixedSampleLocations, long function_pointer); + + public static void glTextureImage2DMultisampleCoverageNV(int texture, int target, int coverageSamples, int colorSamples, int internalFormat, int width, int height, boolean fixedSampleLocations) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureImage2DMultisampleCoverageNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglTextureImage2DMultisampleCoverageNV(texture, target, coverageSamples, colorSamples, internalFormat, width, height, fixedSampleLocations, function_pointer); + } + static native void nglTextureImage2DMultisampleCoverageNV(int texture, int target, int coverageSamples, int colorSamples, int internalFormat, int width, int height, boolean fixedSampleLocations, long function_pointer); + + public static void glTextureImage3DMultisampleCoverageNV(int texture, int target, int coverageSamples, int colorSamples, int internalFormat, int width, int height, int depth, boolean fixedSampleLocations) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTextureImage3DMultisampleCoverageNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglTextureImage3DMultisampleCoverageNV(texture, target, coverageSamples, colorSamples, internalFormat, width, height, depth, fixedSampleLocations, function_pointer); + } + static native void nglTextureImage3DMultisampleCoverageNV(int texture, int target, int coverageSamples, int colorSamples, int internalFormat, int width, int height, int depth, boolean fixedSampleLocations, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTextureRectangle.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTextureRectangle.java new file mode 100644 index 0000000..06dac6a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTextureRectangle.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVTextureRectangle { + + public static final int GL_TEXTURE_RECTANGLE_NV = 0x84F5, + GL_TEXTURE_BINDING_RECTANGLE_NV = 0x84F6, + GL_PROXY_TEXTURE_RECTANGLE_NV = 0x84F7, + GL_MAX_RECTANGLE_TEXTURE_SIZE_NV = 0x84F8; + + private NVTextureRectangle() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTextureShader.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTextureShader.java new file mode 100644 index 0000000..51d0672 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTextureShader.java @@ -0,0 +1,149 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVTextureShader { + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev, and by the <target> parameter of TexEnvf, TexEnvfv, + * TexEnvi, TexEnviv, GetTexEnvfv, and GetTexEnviv. + */ + public static final int GL_TEXTURE_SHADER_NV = 0x86DE; + + /** + * When the <target> parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv, + * GetTexEnvfv, and GetTexEnviv is TEXTURE_SHADER_NV, then the value + * of <pname> may be: + */ + public static final int GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV = 0x86D9, + GL_SHADER_OPERATION_NV = 0x86DF, + GL_OFFSET_TEXTURE_SCALE_NV = 0x86E2, + GL_OFFSET_TEXTURE_BIAS_NV = 0x86E3, + GL_OFFSET_TEXTURE_2D_SCALE_NV = 0x86E2, + GL_OFFSET_TEXTURE_2D_BIAS_NV = 0x86E3, + GL_PREVIOUS_TEXTURE_INPUT_NV = 0x86E4; + + /** + * When the <target> parameter of TexEnvfv, TexEnviv, GetTexEnvfv, and + * GetTexEnviv is TEXTURE_SHADER_NV, then the value of <pname> may be: + */ + public static final int GL_CULL_MODES_NV = 0x86E0, + GL_OFFSET_TEXTURE_MATRIX_NV = 0x86E1, + GL_OFFSET_TEXTURE_2D_MATRIX_NV = 0x86E1, + GL_CONST_EYE_NV = 0x86E5; + + /** + * When the <target> parameter GetTexEnvfv and GetTexEnviv is + * TEXTURE_SHADER_NV, then the value of <pname> may be: + */ + public static final int GL_SHADER_CONSISTENT_NV = 0x86DD; + + /** + * When the <target> and <pname> parameters of TexEnvf, TexEnvfv, + * TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV + * respectively, then the value of <param> or the value pointed to by + * <params> may be: + */ + public static final int GL_PASS_THROUGH_NV = 0x86E6, + GL_CULL_FRAGMENT_NV = 0x86E7, + GL_OFFSET_TEXTURE_2D_NV = 0x86E8, + GL_OFFSET_TEXTURE_RECTANGLE_NV = 0x864C, + GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV = 0x864D, + GL_DEPENDENT_AR_TEXTURE_2D_NV = 0x86E9, + GL_DEPENDENT_GB_TEXTURE_2D_NV = 0x86EA, + GL_DOT_PRODUCT_NV = 0x86EC, + GL_DOT_PRODUCT_DEPTH_REPLACE_NV = 0x86ED, + GL_DOT_PRODUCT_TEXTURE_2D_NV = 0x86EE, + GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV = 0x864E, + GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV = 0x86F0, + GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV = 0x86F1, + GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV = 0x86F2, + GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV = 0x86F3; + + /** + * Accepted by the <format> parameter of GetTexImage, TexImage1D, + * TexImage2D, TexSubImage1D, and TexSubImage2D. + */ + public static final int GL_HILO_NV = 0x86F4, + GL_DSDT_NV = 0x86F5, + GL_DSDT_MAG_NV = 0x86F6, + GL_DSDT_MAG_VIB_NV = 0x86F7; + + /** + * Accepted by the <type> parameter of GetTexImage, TexImage1D, + * TexImage2D, TexSubImage1D, and TexSubImage2D. + */ + public static final int GL_UNSIGNED_INT_S8_S8_8_8_NV = 0x86DA, + GL_UNSIGNED_INT_8_8_S8_S8_REV_NV = 0x86DB; + + /** + * Accepted by the <internalformat> parameter of CopyTexImage1D, + * CopyTexImage2D, TexImage1D, and TexImage2D. + */ + public static final int GL_SIGNED_RGBA_NV = 0x86FB, + GL_SIGNED_RGBA8_NV = 0x86FC, + GL_SIGNED_RGB_NV = 0x86FE, + GL_SIGNED_RGB8_NV = 0x86FF, + GL_SIGNED_LUMINANCE_NV = 0x8701, + GL_SIGNED_LUMINANCE8_NV = 0x8702, + GL_SIGNED_LUMINANCE_ALPHA_NV = 0x8703, + GL_SIGNED_LUMINANCE8_ALPHA8_NV = 0x8704, + GL_SIGNED_ALPHA_NV = 0x8705, + GL_SIGNED_ALPHA8_NV = 0x8706, + GL_SIGNED_INTENSITY_NV = 0x8707, + GL_SIGNED_INTENSITY8_NV = 0x8708, + GL_SIGNED_RGB_UNSIGNED_ALPHA_NV = 0x870C, + GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV = 0x870D; + + /** + * Accepted by the <internalformat> parameter of TexImage1D and + * TexImage2D. + */ + public static final int GL_HILO16_NV = 0x86F8, + GL_SIGNED_HILO_NV = 0x86F9, + GL_SIGNED_HILO16_NV = 0x86FA, + GL_DSDT8_NV = 0x8709, + GL_DSDT8_MAG8_NV = 0x870A, + GL_DSDT_MAG_INTENSITY_NV = 0x86DC, + GL_DSDT8_MAG8_INTENSITY8_NV = 0x870B; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi. + */ + public static final int GL_HI_SCALE_NV = 0x870E, + GL_LO_SCALE_NV = 0x870F, + GL_DS_SCALE_NV = 0x8710, + GL_DT_SCALE_NV = 0x8711, + GL_MAGNITUDE_SCALE_NV = 0x8712, + GL_VIBRANCE_SCALE_NV = 0x8713, + GL_HI_BIAS_NV = 0x8714, + GL_LO_BIAS_NV = 0x8715, + GL_DS_BIAS_NV = 0x8716, + GL_DT_BIAS_NV = 0x8717, + GL_MAGNITUDE_BIAS_NV = 0x8718, + GL_VIBRANCE_BIAS_NV = 0x8719; + + /** + * Accepted by the <pname> parameter of TexParameteriv, TexParameterfv, + * GetTexParameterfv and GetTexParameteriv. + */ + public static final int GL_TEXTURE_BORDER_VALUES_NV = 0x871A; + + /** + * Accepted by the <pname> parameter of GetTexLevelParameterfv and + * GetTexLevelParameteriv. + */ + public static final int GL_TEXTURE_HI_SIZE_NV = 0x871B, + GL_TEXTURE_LO_SIZE_NV = 0x871C, + GL_TEXTURE_DS_SIZE_NV = 0x871D, + GL_TEXTURE_DT_SIZE_NV = 0x871E, + GL_TEXTURE_MAG_SIZE_NV = 0x871F; + + private NVTextureShader() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTextureShader2.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTextureShader2.java new file mode 100644 index 0000000..0051a86 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTextureShader2.java @@ -0,0 +1,40 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVTextureShader2 { + + public static final int GL_DOT_PRODUCT_TEXTURE_3D_NV = 0x86EF, + GL_HILO_NV = 0x86F4, + GL_DSDT_NV = 0x86F5, + GL_DSDT_MAG_NV = 0x86F6, + GL_DSDT_MAG_VIB_NV = 0x86F7, + GL_UNSIGNED_INT_S8_S8_8_8_NV = 0x86DA, + GL_UNSIGNED_INT_8_8_S8_S8_REV_NV = 0x86DB, + GL_SIGNED_RGBA_NV = 0x86FB, + GL_SIGNED_RGBA8_NV = 0x86FC, + GL_SIGNED_RGB_NV = 0x86FE, + GL_SIGNED_RGB8_NV = 0x86FF, + GL_SIGNED_LUMINANCE_NV = 0x8701, + GL_SIGNED_LUMINANCE8_NV = 0x8702, + GL_SIGNED_LUMINANCE_ALPHA_NV = 0x8703, + GL_SIGNED_LUMINANCE8_ALPHA8_NV = 0x8704, + GL_SIGNED_ALPHA_NV = 0x8705, + GL_SIGNED_ALPHA8_NV = 0x8706, + GL_SIGNED_INTENSITY_NV = 0x8707, + GL_SIGNED_INTENSITY8_NV = 0x8708, + GL_SIGNED_RGB_UNSIGNED_ALPHA_NV = 0x870C, + GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV = 0x870D, + GL_HILO16_NV = 0x86F8, + GL_SIGNED_HILO_NV = 0x86F9, + GL_SIGNED_HILO16_NV = 0x86FA, + GL_DSDT8_NV = 0x8709, + GL_DSDT8_MAG8_NV = 0x870A, + GL_DSDT_MAG_INTENSITY_NV = 0x86DC, + GL_DSDT8_MAG8_INTENSITY8_NV = 0x870B; + + private NVTextureShader2() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTextureShader3.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTextureShader3.java new file mode 100644 index 0000000..ad9bab2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTextureShader3.java @@ -0,0 +1,29 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVTextureShader3 { + + public static final int GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV = 0x8850, + GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV = 0x8851, + GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV = 0x8852, + GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV = 0x8853, + GL_OFFSET_HILO_TEXTURE_2D_NV = 0x8854, + GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV = 0x8855, + GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV = 0x8856, + GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV = 0x8857, + GL_DEPENDENT_HILO_TEXTURE_2D_NV = 0x8858, + GL_DEPENDENT_RGB_TEXTURE_3D_NV = 0x8859, + GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV = 0x885A, + GL_DOT_PRODUCT_PASS_THROUGH_NV = 0x885B, + GL_DOT_PRODUCT_TEXTURE_1D_NV = 0x885C, + GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV = 0x885D, + GL_HILO8_NV = 0x885E, + GL_SIGNED_HILO8_NV = 0x885F, + GL_FORCE_BLUE_TO_ONE_NV = 0x8860; + + private NVTextureShader3() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTransformFeedback.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTransformFeedback.java new file mode 100644 index 0000000..8464436 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTransformFeedback.java @@ -0,0 +1,278 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVTransformFeedback { + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, + * GetBufferPointerv, BindBufferRangeNV, BindBufferOffsetNV and + * BindBufferBaseNV: + */ + public static final int GL_TRANSFORM_FEEDBACK_BUFFER_NV = 0x8C8E; + + /** + * Accepted by the <param> parameter of GetIntegerIndexedvEXT and + * GetBooleanIndexedvEXT: + */ + public static final int GL_TRANSFORM_FEEDBACK_BUFFER_START_NV = 0x8C84, + GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV = 0x8C85, + GL_TRANSFORM_FEEDBACK_RECORD_NV = 0x8C86; + + /** + * Accepted by the <param> parameter of GetIntegerIndexedvEXT and + * GetBooleanIndexedvEXT, and by the <pname> parameter of GetBooleanv, + * GetDoublev, GetIntegerv, and GetFloatv: + */ + public static final int GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV = 0x8C8F; + + /** + * Accepted by the <bufferMode> parameter of TransformFeedbackAttribsNV and + * TransformFeedbackVaryingsNV: + */ + public static final int GL_INTERLEAVED_ATTRIBS_NV = 0x8C8C, + GL_SEPARATE_ATTRIBS_NV = 0x8C8D; + + /** + * Accepted by the <target> parameter of BeginQuery, EndQuery, and + * GetQueryiv: + */ + public static final int GL_PRIMITIVES_GENERATED_NV = 0x8C87, + GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV = 0x8C88; + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, and by + * the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev: + */ + public static final int GL_RASTERIZER_DISCARD_NV = 0x8C89; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv, + * and GetFloatv: + */ + public static final int GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV = 0x8C8A, + GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV = 0x8C8B, + GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV = 0x8C80, + GL_TRANSFORM_FEEDBACK_ATTRIBS_NV = 0x8C7E; + + /** + * Accepted by the <pname> parameter of GetProgramiv: + */ + public static final int GL_ACTIVE_VARYINGS_NV = 0x8C81, + GL_ACTIVE_VARYING_MAX_LENGTH_NV = 0x8C82, + GL_TRANSFORM_FEEDBACK_VARYINGS_NV = 0x8C83; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv, + * GetFloatv, and GetProgramiv: + */ + public static final int GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV = 0x8C7F; + + /** + * Accepted by the <attribs> parameter of TransformFeedbackAttribsNV: + */ + public static final int GL_BACK_PRIMARY_COLOR_NV = 0x8C77, + GL_BACK_SECONDARY_COLOR_NV = 0x8C78, + GL_TEXTURE_COORD_NV = 0x8C79, + GL_CLIP_DISTANCE_NV = 0x8C7A, + GL_VERTEX_ID_NV = 0x8C7B, + GL_PRIMITIVE_ID_NV = 0x8C7C, + GL_GENERIC_ATTRIB_NV = 0x8C7D, + GL_LAYER_NV = 0x8DAA; + + private NVTransformFeedback() {} + + public static void glBindBufferRangeNV(int target, int index, int buffer, long offset, long size) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindBufferRangeNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindBufferRangeNV(target, index, buffer, offset, size, function_pointer); + } + static native void nglBindBufferRangeNV(int target, int index, int buffer, long offset, long size, long function_pointer); + + public static void glBindBufferOffsetNV(int target, int index, int buffer, long offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindBufferOffsetNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindBufferOffsetNV(target, index, buffer, offset, function_pointer); + } + static native void nglBindBufferOffsetNV(int target, int index, int buffer, long offset, long function_pointer); + + public static void glBindBufferBaseNV(int target, int index, int buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindBufferBaseNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindBufferBaseNV(target, index, buffer, function_pointer); + } + static native void nglBindBufferBaseNV(int target, int index, int buffer, long function_pointer); + + public static void glTransformFeedbackAttribsNV(IntBuffer attribs, int bufferMode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTransformFeedbackAttribsNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(attribs, 3); + nglTransformFeedbackAttribsNV(attribs.remaining() / 3, MemoryUtil.getAddress(attribs), bufferMode, function_pointer); + } + static native void nglTransformFeedbackAttribsNV(int count, long attribs, int bufferMode, long function_pointer); + + public static void glTransformFeedbackVaryingsNV(int program, IntBuffer locations, int bufferMode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTransformFeedbackVaryingsNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(locations); + nglTransformFeedbackVaryingsNV(program, locations.remaining(), MemoryUtil.getAddress(locations), bufferMode, function_pointer); + } + static native void nglTransformFeedbackVaryingsNV(int program, int locations_count, long locations, int bufferMode, long function_pointer); + + public static void glBeginTransformFeedbackNV(int primitiveMode) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBeginTransformFeedbackNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglBeginTransformFeedbackNV(primitiveMode, function_pointer); + } + static native void nglBeginTransformFeedbackNV(int primitiveMode, long function_pointer); + + public static void glEndTransformFeedbackNV() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEndTransformFeedbackNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglEndTransformFeedbackNV(function_pointer); + } + static native void nglEndTransformFeedbackNV(long function_pointer); + + public static int glGetVaryingLocationNV(int program, ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVaryingLocationNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(name); + BufferChecks.checkNullTerminated(name); + int __result = nglGetVaryingLocationNV(program, MemoryUtil.getAddress(name), function_pointer); + return __result; + } + static native int nglGetVaryingLocationNV(int program, long name, long function_pointer); + + /** Overloads glGetVaryingLocationNV. */ + public static int glGetVaryingLocationNV(int program, CharSequence name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVaryingLocationNV; + BufferChecks.checkFunctionAddress(function_pointer); + int __result = nglGetVaryingLocationNV(program, APIUtil.getBufferNT(caps, name), function_pointer); + return __result; + } + + public static void glGetActiveVaryingNV(int program, int index, IntBuffer length, IntBuffer size, IntBuffer type, ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveVaryingNV; + BufferChecks.checkFunctionAddress(function_pointer); + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkBuffer(size, 1); + BufferChecks.checkBuffer(type, 1); + BufferChecks.checkDirect(name); + nglGetActiveVaryingNV(program, index, name.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(size), MemoryUtil.getAddress(type), MemoryUtil.getAddress(name), function_pointer); + } + static native void nglGetActiveVaryingNV(int program, int index, int name_bufSize, long length, long size, long type, long name, long function_pointer); + + /** + * Overloads glGetActiveVaryingNV. + *

+ * Overloads glGetActiveVaryingNV. This version returns both size and type in the sizeType buffer (at .position() and .position() + 1). + */ + public static String glGetActiveVaryingNV(int program, int index, int bufSize, IntBuffer sizeType) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveVaryingNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(sizeType, 2); + IntBuffer name_length = APIUtil.getLengths(caps); + ByteBuffer name = APIUtil.getBufferByte(caps, bufSize); + nglGetActiveVaryingNV(program, index, bufSize, MemoryUtil.getAddress0(name_length), MemoryUtil.getAddress(sizeType), MemoryUtil.getAddress(sizeType, sizeType.position() + 1), MemoryUtil.getAddress(name), function_pointer); + name.limit(name_length.get(0)); + return APIUtil.getString(caps, name); + } + + /** + * Overloads glGetActiveVaryingNV. + *

+ * Overloads glGetActiveVaryingNV. This version returns only the varying name. + */ + public static String glGetActiveVaryingNV(int program, int index, int bufSize) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveVaryingNV; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer name_length = APIUtil.getLengths(caps); + ByteBuffer name = APIUtil.getBufferByte(caps, bufSize); + nglGetActiveVaryingNV(program, index, bufSize, MemoryUtil.getAddress0(name_length), MemoryUtil.getAddress0(APIUtil.getBufferInt(caps)), MemoryUtil.getAddress(APIUtil.getBufferInt(caps), 1), MemoryUtil.getAddress(name), function_pointer); + name.limit(name_length.get(0)); + return APIUtil.getString(caps, name); + } + + /** + * Overloads glGetActiveVaryingNV. + *

+ * Overloads glGetActiveVaryingNV. This version returns only the varying size. + */ + public static int glGetActiveVaryingSizeNV(int program, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveVaryingNV; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer size = APIUtil.getBufferInt(caps); + nglGetActiveVaryingNV(program, index, 0, 0L, MemoryUtil.getAddress(size), MemoryUtil.getAddress(size, 1), APIUtil.getBufferByte0(caps), function_pointer); + return size.get(0); + } + + /** + * Overloads glGetActiveVaryingNV. + *

+ * Overloads glGetActiveVaryingNV. This version returns only the varying type. + */ + public static int glGetActiveVaryingTypeNV(int program, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetActiveVaryingNV; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer type = APIUtil.getBufferInt(caps); + nglGetActiveVaryingNV(program, index, 0, 0L, MemoryUtil.getAddress(type, 1), MemoryUtil.getAddress(type), APIUtil.getBufferByte0(caps), function_pointer); + return type.get(0); + } + + public static void glActiveVaryingNV(int program, ByteBuffer name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glActiveVaryingNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(name); + BufferChecks.checkNullTerminated(name); + nglActiveVaryingNV(program, MemoryUtil.getAddress(name), function_pointer); + } + static native void nglActiveVaryingNV(int program, long name, long function_pointer); + + /** Overloads glActiveVaryingNV. */ + public static void glActiveVaryingNV(int program, CharSequence name) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glActiveVaryingNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglActiveVaryingNV(program, APIUtil.getBufferNT(caps, name), function_pointer); + } + + public static void glGetTransformFeedbackVaryingNV(int program, int index, IntBuffer location) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTransformFeedbackVaryingNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(location, 1); + nglGetTransformFeedbackVaryingNV(program, index, MemoryUtil.getAddress(location), function_pointer); + } + static native void nglGetTransformFeedbackVaryingNV(int program, int index, long location, long function_pointer); + + /** Overloads glGetTransformFeedbackVaryingNV. */ + public static int glGetTransformFeedbackVaryingNV(int program, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTransformFeedbackVaryingNV; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer location = APIUtil.getBufferInt(caps); + nglGetTransformFeedbackVaryingNV(program, index, MemoryUtil.getAddress(location), function_pointer); + return location.get(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTransformFeedback2.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTransformFeedback2.java new file mode 100644 index 0000000..4ab4be4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVTransformFeedback2.java @@ -0,0 +1,101 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVTransformFeedback2 { + + /** + * Accepted by the <target> parameter of BindTransformFeedbackNV: + */ + public static final int GL_TRANSFORM_FEEDBACK_NV = 0x8E22; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv, + * and GetFloatv: + */ + public static final int GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV = 0x8E23, + GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV = 0x8E24, + GL_TRANSFORM_FEEDBACK_BINDING_NV = 0x8E25; + + private NVTransformFeedback2() {} + + public static void glBindTransformFeedbackNV(int target, int id) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindTransformFeedbackNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindTransformFeedbackNV(target, id, function_pointer); + } + static native void nglBindTransformFeedbackNV(int target, int id, long function_pointer); + + public static void glDeleteTransformFeedbacksNV(IntBuffer ids) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteTransformFeedbacksNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(ids); + nglDeleteTransformFeedbacksNV(ids.remaining(), MemoryUtil.getAddress(ids), function_pointer); + } + static native void nglDeleteTransformFeedbacksNV(int ids_n, long ids, long function_pointer); + + /** Overloads glDeleteTransformFeedbacksNV. */ + public static void glDeleteTransformFeedbacksNV(int id) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDeleteTransformFeedbacksNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglDeleteTransformFeedbacksNV(1, APIUtil.getInt(caps, id), function_pointer); + } + + public static void glGenTransformFeedbacksNV(IntBuffer ids) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenTransformFeedbacksNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(ids); + nglGenTransformFeedbacksNV(ids.remaining(), MemoryUtil.getAddress(ids), function_pointer); + } + static native void nglGenTransformFeedbacksNV(int ids_n, long ids, long function_pointer); + + /** Overloads glGenTransformFeedbacksNV. */ + public static int glGenTransformFeedbacksNV() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGenTransformFeedbacksNV; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer ids = APIUtil.getBufferInt(caps); + nglGenTransformFeedbacksNV(1, MemoryUtil.getAddress(ids), function_pointer); + return ids.get(0); + } + + public static boolean glIsTransformFeedbackNV(int id) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIsTransformFeedbackNV; + BufferChecks.checkFunctionAddress(function_pointer); + boolean __result = nglIsTransformFeedbackNV(id, function_pointer); + return __result; + } + static native boolean nglIsTransformFeedbackNV(int id, long function_pointer); + + public static void glPauseTransformFeedbackNV() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glPauseTransformFeedbackNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglPauseTransformFeedbackNV(function_pointer); + } + static native void nglPauseTransformFeedbackNV(long function_pointer); + + public static void glResumeTransformFeedbackNV() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glResumeTransformFeedbackNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglResumeTransformFeedbackNV(function_pointer); + } + static native void nglResumeTransformFeedbackNV(long function_pointer); + + public static void glDrawTransformFeedbackNV(int mode, int id) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glDrawTransformFeedbackNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglDrawTransformFeedbackNV(mode, id, function_pointer); + } + static native void nglDrawTransformFeedbackNV(int mode, int id, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVVertexArrayRange.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVVertexArrayRange.java new file mode 100644 index 0000000..e8cd568 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVVertexArrayRange.java @@ -0,0 +1,80 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVVertexArrayRange { + + public static final int GL_VERTEX_ARRAY_RANGE_NV = 0x851D, + GL_VERTEX_ARRAY_RANGE_LENGTH_NV = 0x851E, + GL_VERTEX_ARRAY_RANGE_VALID_NV = 0x851F, + GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV = 0x8520, + GL_VERTEX_ARRAY_RANGE_POINTER_NV = 0x8521; + + private NVVertexArrayRange() {} + + public static void glVertexArrayRangeNV(ByteBuffer pPointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexArrayRangeNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pPointer); + nglVertexArrayRangeNV(pPointer.remaining(), MemoryUtil.getAddress(pPointer), function_pointer); + } + public static void glVertexArrayRangeNV(DoubleBuffer pPointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexArrayRangeNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pPointer); + nglVertexArrayRangeNV((pPointer.remaining() << 3), MemoryUtil.getAddress(pPointer), function_pointer); + } + public static void glVertexArrayRangeNV(FloatBuffer pPointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexArrayRangeNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pPointer); + nglVertexArrayRangeNV((pPointer.remaining() << 2), MemoryUtil.getAddress(pPointer), function_pointer); + } + public static void glVertexArrayRangeNV(IntBuffer pPointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexArrayRangeNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pPointer); + nglVertexArrayRangeNV((pPointer.remaining() << 2), MemoryUtil.getAddress(pPointer), function_pointer); + } + public static void glVertexArrayRangeNV(ShortBuffer pPointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexArrayRangeNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pPointer); + nglVertexArrayRangeNV((pPointer.remaining() << 1), MemoryUtil.getAddress(pPointer), function_pointer); + } + static native void nglVertexArrayRangeNV(int pPointer_size, long pPointer, long function_pointer); + + public static void glFlushVertexArrayRangeNV() { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFlushVertexArrayRangeNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglFlushVertexArrayRangeNV(function_pointer); + } + static native void nglFlushVertexArrayRangeNV(long function_pointer); + + public static ByteBuffer glAllocateMemoryNV(int size, float readFrequency, float writeFrequency, float priority) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glAllocateMemoryNV; + BufferChecks.checkFunctionAddress(function_pointer); + ByteBuffer __result = nglAllocateMemoryNV(size, readFrequency, writeFrequency, priority, size, function_pointer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + static native ByteBuffer nglAllocateMemoryNV(int size, float readFrequency, float writeFrequency, float priority, long result_size, long function_pointer); + + public static void glFreeMemoryNV(ByteBuffer pointer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFreeMemoryNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(pointer); + nglFreeMemoryNV(MemoryUtil.getAddress(pointer), function_pointer); + } + static native void nglFreeMemoryNV(long pointer, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVVertexArrayRange2.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVVertexArrayRange2.java new file mode 100644 index 0000000..fa59e59 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVVertexArrayRange2.java @@ -0,0 +1,13 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVVertexArrayRange2 { + + public static final int GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV = 0x8533; + + private NVVertexArrayRange2() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVVertexAttribInteger64bit.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVVertexAttribInteger64bit.java new file mode 100644 index 0000000..aa15fa9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVVertexAttribInteger64bit.java @@ -0,0 +1,180 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVVertexAttribInteger64bit { + + /** + * Accepted by the <type> parameter of VertexAttribLPointerEXT, + * VertexArrayVertexAttribLOffsetEXT, and VertexAttribLFormatNV: + */ + public static final int GL_INT64_NV = 0x140E, + GL_UNSIGNED_INT64_NV = 0x140F; + + private NVVertexAttribInteger64bit() {} + + public static void glVertexAttribL1i64NV(int index, long x) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL1i64NV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribL1i64NV(index, x, function_pointer); + } + static native void nglVertexAttribL1i64NV(int index, long x, long function_pointer); + + public static void glVertexAttribL2i64NV(int index, long x, long y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL2i64NV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribL2i64NV(index, x, y, function_pointer); + } + static native void nglVertexAttribL2i64NV(int index, long x, long y, long function_pointer); + + public static void glVertexAttribL3i64NV(int index, long x, long y, long z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL3i64NV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribL3i64NV(index, x, y, z, function_pointer); + } + static native void nglVertexAttribL3i64NV(int index, long x, long y, long z, long function_pointer); + + public static void glVertexAttribL4i64NV(int index, long x, long y, long z, long w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL4i64NV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribL4i64NV(index, x, y, z, w, function_pointer); + } + static native void nglVertexAttribL4i64NV(int index, long x, long y, long z, long w, long function_pointer); + + public static void glVertexAttribL1NV(int index, LongBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL1i64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 1); + nglVertexAttribL1i64vNV(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribL1i64vNV(int index, long v, long function_pointer); + + public static void glVertexAttribL2NV(int index, LongBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL2i64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 2); + nglVertexAttribL2i64vNV(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribL2i64vNV(int index, long v, long function_pointer); + + public static void glVertexAttribL3NV(int index, LongBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL3i64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 3); + nglVertexAttribL3i64vNV(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribL3i64vNV(int index, long v, long function_pointer); + + public static void glVertexAttribL4NV(int index, LongBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL4i64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 4); + nglVertexAttribL4i64vNV(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribL4i64vNV(int index, long v, long function_pointer); + + public static void glVertexAttribL1ui64NV(int index, long x) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL1ui64NV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribL1ui64NV(index, x, function_pointer); + } + static native void nglVertexAttribL1ui64NV(int index, long x, long function_pointer); + + public static void glVertexAttribL2ui64NV(int index, long x, long y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL2ui64NV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribL2ui64NV(index, x, y, function_pointer); + } + static native void nglVertexAttribL2ui64NV(int index, long x, long y, long function_pointer); + + public static void glVertexAttribL3ui64NV(int index, long x, long y, long z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL3ui64NV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribL3ui64NV(index, x, y, z, function_pointer); + } + static native void nglVertexAttribL3ui64NV(int index, long x, long y, long z, long function_pointer); + + public static void glVertexAttribL4ui64NV(int index, long x, long y, long z, long w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL4ui64NV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribL4ui64NV(index, x, y, z, w, function_pointer); + } + static native void nglVertexAttribL4ui64NV(int index, long x, long y, long z, long w, long function_pointer); + + public static void glVertexAttribL1uNV(int index, LongBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL1ui64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 1); + nglVertexAttribL1ui64vNV(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribL1ui64vNV(int index, long v, long function_pointer); + + public static void glVertexAttribL2uNV(int index, LongBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL2ui64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 2); + nglVertexAttribL2ui64vNV(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribL2ui64vNV(int index, long v, long function_pointer); + + public static void glVertexAttribL3uNV(int index, LongBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL3ui64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 3); + nglVertexAttribL3ui64vNV(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribL3ui64vNV(int index, long v, long function_pointer); + + public static void glVertexAttribL4uNV(int index, LongBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribL4ui64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(v, 4); + nglVertexAttribL4ui64vNV(index, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribL4ui64vNV(int index, long v, long function_pointer); + + public static void glGetVertexAttribLNV(int index, int pname, LongBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexAttribLi64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetVertexAttribLi64vNV(index, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVertexAttribLi64vNV(int index, int pname, long params, long function_pointer); + + public static void glGetVertexAttribLuNV(int index, int pname, LongBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexAttribLui64vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetVertexAttribLui64vNV(index, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVertexAttribLui64vNV(int index, int pname, long params, long function_pointer); + + public static void glVertexAttribLFormatNV(int index, int size, int type, int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribLFormatNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribLFormatNV(index, size, type, stride, function_pointer); + } + static native void nglVertexAttribLFormatNV(int index, int size, int type, int stride, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVVertexBufferUnifiedMemory.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVVertexBufferUnifiedMemory.java new file mode 100644 index 0000000..9225374 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVVertexBufferUnifiedMemory.java @@ -0,0 +1,163 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVVertexBufferUnifiedMemory { + + /** + * Accepted by the <cap> parameter of DisableClientState, + * EnableClientState, IsEnabled: + */ + public static final int GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV = 0x8F1E, + GL_ELEMENT_ARRAY_UNIFIED_NV = 0x8F1F; + + /** + * Accepted by the <pname> parameter of BufferAddressRangeNV + * and the <value> parameter of GetIntegerui64i_vNV: + */ + public static final int GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV = 0x8F20, + GL_TEXTURE_COORD_ARRAY_ADDRESS_NV = 0x8F25; + + /** + * Accepted by the <pname> parameter of BufferAddressRangeNV + * and the <value> parameter of GetIntegerui64vNV: + */ + public static final int GL_VERTEX_ARRAY_ADDRESS_NV = 0x8F21, + GL_NORMAL_ARRAY_ADDRESS_NV = 0x8F22, + GL_COLOR_ARRAY_ADDRESS_NV = 0x8F23, + GL_INDEX_ARRAY_ADDRESS_NV = 0x8F24, + GL_EDGE_FLAG_ARRAY_ADDRESS_NV = 0x8F26, + GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV = 0x8F27, + GL_FOG_COORD_ARRAY_ADDRESS_NV = 0x8F28, + GL_ELEMENT_ARRAY_ADDRESS_NV = 0x8F29; + + /** + * Accepted by the <target> parameter of GetIntegeri_vNV: + */ + public static final int GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV = 0x8F2A, + GL_TEXTURE_COORD_ARRAY_LENGTH_NV = 0x8F2F; + + /** + * Accepted by the <value> parameter of GetIntegerv: + */ + public static final int GL_VERTEX_ARRAY_LENGTH_NV = 0x8F2B, + GL_NORMAL_ARRAY_LENGTH_NV = 0x8F2C, + GL_COLOR_ARRAY_LENGTH_NV = 0x8F2D, + GL_INDEX_ARRAY_LENGTH_NV = 0x8F2E, + GL_EDGE_FLAG_ARRAY_LENGTH_NV = 0x8F30, + GL_SECONDARY_COLOR_ARRAY_LENGTH_NV = 0x8F31, + GL_FOG_COORD_ARRAY_LENGTH_NV = 0x8F32, + GL_ELEMENT_ARRAY_LENGTH_NV = 0x8F33; + + private NVVertexBufferUnifiedMemory() {} + + public static void glBufferAddressRangeNV(int pname, int index, long address, long length) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBufferAddressRangeNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglBufferAddressRangeNV(pname, index, address, length, function_pointer); + } + static native void nglBufferAddressRangeNV(int pname, int index, long address, long length, long function_pointer); + + public static void glVertexFormatNV(int size, int type, int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexFormatNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexFormatNV(size, type, stride, function_pointer); + } + static native void nglVertexFormatNV(int size, int type, int stride, long function_pointer); + + public static void glNormalFormatNV(int type, int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glNormalFormatNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglNormalFormatNV(type, stride, function_pointer); + } + static native void nglNormalFormatNV(int type, int stride, long function_pointer); + + public static void glColorFormatNV(int size, int type, int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glColorFormatNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglColorFormatNV(size, type, stride, function_pointer); + } + static native void nglColorFormatNV(int size, int type, int stride, long function_pointer); + + public static void glIndexFormatNV(int type, int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glIndexFormatNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglIndexFormatNV(type, stride, function_pointer); + } + static native void nglIndexFormatNV(int type, int stride, long function_pointer); + + public static void glTexCoordFormatNV(int size, int type, int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTexCoordFormatNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglTexCoordFormatNV(size, type, stride, function_pointer); + } + static native void nglTexCoordFormatNV(int size, int type, int stride, long function_pointer); + + public static void glEdgeFlagFormatNV(int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEdgeFlagFormatNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglEdgeFlagFormatNV(stride, function_pointer); + } + static native void nglEdgeFlagFormatNV(int stride, long function_pointer); + + public static void glSecondaryColorFormatNV(int size, int type, int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glSecondaryColorFormatNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglSecondaryColorFormatNV(size, type, stride, function_pointer); + } + static native void nglSecondaryColorFormatNV(int size, int type, int stride, long function_pointer); + + public static void glFogCoordFormatNV(int type, int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glFogCoordFormatNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglFogCoordFormatNV(type, stride, function_pointer); + } + static native void nglFogCoordFormatNV(int type, int stride, long function_pointer); + + public static void glVertexAttribFormatNV(int index, int size, int type, boolean normalized, int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribFormatNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribFormatNV(index, size, type, normalized, stride, function_pointer); + } + static native void nglVertexAttribFormatNV(int index, int size, int type, boolean normalized, int stride, long function_pointer); + + public static void glVertexAttribIFormatNV(int index, int size, int type, int stride) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribIFormatNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttribIFormatNV(index, size, type, stride, function_pointer); + } + static native void nglVertexAttribIFormatNV(int index, int size, int type, int stride, long function_pointer); + + public static void glGetIntegeruNV(int value, int index, LongBuffer result) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetIntegerui64i_vNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(result, 1); + nglGetIntegerui64i_vNV(value, index, MemoryUtil.getAddress(result), function_pointer); + } + static native void nglGetIntegerui64i_vNV(int value, int index, long result, long function_pointer); + + /** Overloads glGetIntegerui64i_vNV. */ + public static long glGetIntegerui64NV(int value, int index) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetIntegerui64i_vNV; + BufferChecks.checkFunctionAddress(function_pointer); + LongBuffer result = APIUtil.getBufferLong(caps); + nglGetIntegerui64i_vNV(value, index, MemoryUtil.getAddress(result), function_pointer); + return result.get(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVVertexProgram.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVVertexProgram.java new file mode 100644 index 0000000..6860a38 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVVertexProgram.java @@ -0,0 +1,545 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVVertexProgram extends NVProgram { + + /** + * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev, and by the <target> parameter of BindProgramNV, + * ExecuteProgramNV, GetProgramParameter[df]vNV, GetTrackMatrixivNV, + * LoadProgramNV, ProgramParameter[s]4[df][v]NV, and TrackMatrixNV: + */ + public static final int GL_VERTEX_PROGRAM_NV = 0x8620; + + /** + * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_VERTEX_PROGRAM_POINT_SIZE_NV = 0x8642, + GL_VERTEX_PROGRAM_TWO_SIDE_NV = 0x8643; + + /** + * Accepted by the <target> parameter of ExecuteProgramNV and + * LoadProgramNV: + */ + public static final int GL_VERTEX_STATE_PROGRAM_NV = 0x8621; + + /** + * Accepted by the <pname> parameter of GetVertexAttrib[dfi]vNV: + */ + public static final int GL_ATTRIB_ARRAY_SIZE_NV = 0x8623, + GL_ATTRIB_ARRAY_STRIDE_NV = 0x8624, + GL_ATTRIB_ARRAY_TYPE_NV = 0x8625, + GL_CURRENT_ATTRIB_NV = 0x8626; + + /** + * Accepted by the <pname> parameter of GetProgramParameterfvNV + * and GetProgramParameterdvNV: + */ + public static final int GL_PROGRAM_PARAMETER_NV = 0x8644; + + /** + * Accepted by the <pname> parameter of GetVertexAttribPointervNV: + */ + public static final int GL_ATTRIB_ARRAY_POINTER_NV = 0x8645; + + /** + * Accepted by the <pname> parameter of GetTrackMatrixivNV: + */ + public static final int GL_TRACK_MATRIX_NV = 0x8648, + GL_TRACK_MATRIX_TRANSFORM_NV = 0x8649; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV = 0x862E, + GL_MAX_TRACK_MATRICES_NV = 0x862F, + GL_CURRENT_MATRIX_STACK_DEPTH_NV = 0x8640, + GL_CURRENT_MATRIX_NV = 0x8641, + GL_VERTEX_PROGRAM_BINDING_NV = 0x864A; + + /** + * Accepted by the <matrix> parameter of TrackMatrixNV: + */ + public static final int GL_MODELVIEW_PROJECTION_NV = 0x8629; + + /** + * Accepted by the <matrix> parameter of TrackMatrixNV and by the + * <mode> parameter of MatrixMode: + */ + public static final int GL_MATRIX0_NV = 0x8630, + GL_MATRIX1_NV = 0x8631, + GL_MATRIX2_NV = 0x8632, + GL_MATRIX3_NV = 0x8633, + GL_MATRIX4_NV = 0x8634, + GL_MATRIX5_NV = 0x8635, + GL_MATRIX6_NV = 0x8636, + GL_MATRIX7_NV = 0x8637; + + /** + * Accepted by the <transform> parameter of TrackMatrixNV: + */ + public static final int GL_IDENTITY_NV = 0x862A, + GL_INVERSE_NV = 0x862B, + GL_TRANSPOSE_NV = 0x862C, + GL_INVERSE_TRANSPOSE_NV = 0x862D; + + /** + * Accepted by the <array> parameter of EnableClientState and + * DisableClientState, by the <cap> parameter of IsEnabled, and by + * the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev: + */ + public static final int GL_VERTEX_ATTRIB_ARRAY0_NV = 0x8650, + GL_VERTEX_ATTRIB_ARRAY1_NV = 0x8651, + GL_VERTEX_ATTRIB_ARRAY2_NV = 0x8652, + GL_VERTEX_ATTRIB_ARRAY3_NV = 0x8653, + GL_VERTEX_ATTRIB_ARRAY4_NV = 0x8654, + GL_VERTEX_ATTRIB_ARRAY5_NV = 0x8655, + GL_VERTEX_ATTRIB_ARRAY6_NV = 0x8656, + GL_VERTEX_ATTRIB_ARRAY7_NV = 0x8657, + GL_VERTEX_ATTRIB_ARRAY8_NV = 0x8658, + GL_VERTEX_ATTRIB_ARRAY9_NV = 0x8659, + GL_VERTEX_ATTRIB_ARRAY10_NV = 0x865A, + GL_VERTEX_ATTRIB_ARRAY11_NV = 0x865B, + GL_VERTEX_ATTRIB_ARRAY12_NV = 0x865C, + GL_VERTEX_ATTRIB_ARRAY13_NV = 0x865D, + GL_VERTEX_ATTRIB_ARRAY14_NV = 0x865E, + GL_VERTEX_ATTRIB_ARRAY15_NV = 0x865F; + + /** + * Accepted by the <target> parameter of GetMapdv, GetMapfv, GetMapiv, + * Map1d and Map1f and by the <cap> parameter of Enable, Disable, and + * IsEnabled, and by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_MAP1_VERTEX_ATTRIB0_4_NV = 0x8660, + GL_MAP1_VERTEX_ATTRIB1_4_NV = 0x8661, + GL_MAP1_VERTEX_ATTRIB2_4_NV = 0x8662, + GL_MAP1_VERTEX_ATTRIB3_4_NV = 0x8663, + GL_MAP1_VERTEX_ATTRIB4_4_NV = 0x8664, + GL_MAP1_VERTEX_ATTRIB5_4_NV = 0x8665, + GL_MAP1_VERTEX_ATTRIB6_4_NV = 0x8666, + GL_MAP1_VERTEX_ATTRIB7_4_NV = 0x8667, + GL_MAP1_VERTEX_ATTRIB8_4_NV = 0x8668, + GL_MAP1_VERTEX_ATTRIB9_4_NV = 0x8669, + GL_MAP1_VERTEX_ATTRIB10_4_NV = 0x866A, + GL_MAP1_VERTEX_ATTRIB11_4_NV = 0x866B, + GL_MAP1_VERTEX_ATTRIB12_4_NV = 0x866C, + GL_MAP1_VERTEX_ATTRIB13_4_NV = 0x866D, + GL_MAP1_VERTEX_ATTRIB14_4_NV = 0x866E, + GL_MAP1_VERTEX_ATTRIB15_4_NV = 0x866F; + + /** + * Accepted by the <target> parameter of GetMapdv, GetMapfv, GetMapiv, + * Map2d and Map2f and by the <cap> parameter of Enable, Disable, and + * IsEnabled, and by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_MAP2_VERTEX_ATTRIB0_4_NV = 0x8670, + GL_MAP2_VERTEX_ATTRIB1_4_NV = 0x8671, + GL_MAP2_VERTEX_ATTRIB2_4_NV = 0x8672, + GL_MAP2_VERTEX_ATTRIB3_4_NV = 0x8673, + GL_MAP2_VERTEX_ATTRIB4_4_NV = 0x8674, + GL_MAP2_VERTEX_ATTRIB5_4_NV = 0x8675, + GL_MAP2_VERTEX_ATTRIB6_4_NV = 0x8676, + GL_MAP2_VERTEX_ATTRIB7_4_NV = 0x8677, + GL_MAP2_VERTEX_ATTRIB8_4_NV = 0x8678, + GL_MAP2_VERTEX_ATTRIB9_4_NV = 0x8679, + GL_MAP2_VERTEX_ATTRIB10_4_NV = 0x867A, + GL_MAP2_VERTEX_ATTRIB11_4_NV = 0x867B, + GL_MAP2_VERTEX_ATTRIB12_4_NV = 0x867C, + GL_MAP2_VERTEX_ATTRIB13_4_NV = 0x867D, + GL_MAP2_VERTEX_ATTRIB14_4_NV = 0x867E, + GL_MAP2_VERTEX_ATTRIB15_4_NV = 0x867F; + + private NVVertexProgram() {} + + public static void glExecuteProgramNV(int target, int id, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glExecuteProgramNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglExecuteProgramNV(target, id, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglExecuteProgramNV(int target, int id, long params, long function_pointer); + + public static void glGetProgramParameterNV(int target, int index, int parameterName, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramParameterfvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetProgramParameterfvNV(target, index, parameterName, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetProgramParameterfvNV(int target, int index, int parameterName, long params, long function_pointer); + + public static void glGetProgramParameterNV(int target, int index, int parameterName, DoubleBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetProgramParameterdvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetProgramParameterdvNV(target, index, parameterName, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetProgramParameterdvNV(int target, int index, int parameterName, long params, long function_pointer); + + public static void glGetTrackMatrixNV(int target, int address, int parameterName, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetTrackMatrixivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetTrackMatrixivNV(target, address, parameterName, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetTrackMatrixivNV(int target, int address, int parameterName, long params, long function_pointer); + + public static void glGetVertexAttribNV(int index, int parameterName, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexAttribfvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetVertexAttribfvNV(index, parameterName, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVertexAttribfvNV(int index, int parameterName, long params, long function_pointer); + + public static void glGetVertexAttribNV(int index, int parameterName, DoubleBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexAttribdvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetVertexAttribdvNV(index, parameterName, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVertexAttribdvNV(int index, int parameterName, long params, long function_pointer); + + public static void glGetVertexAttribNV(int index, int parameterName, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexAttribivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 4); + nglGetVertexAttribivNV(index, parameterName, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVertexAttribivNV(int index, int parameterName, long params, long function_pointer); + + public static ByteBuffer glGetVertexAttribPointerNV(int index, int parameterName, long result_size) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVertexAttribPointervNV; + BufferChecks.checkFunctionAddress(function_pointer); + ByteBuffer __result = nglGetVertexAttribPointervNV(index, parameterName, result_size, function_pointer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + static native ByteBuffer nglGetVertexAttribPointervNV(int index, int parameterName, long result_size, long function_pointer); + + public static void glProgramParameter4fNV(int target, int index, float x, float y, float z, float w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramParameter4fNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramParameter4fNV(target, index, x, y, z, w, function_pointer); + } + static native void nglProgramParameter4fNV(int target, int index, float x, float y, float z, float w, long function_pointer); + + public static void glProgramParameter4dNV(int target, int index, double x, double y, double z, double w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramParameter4dNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglProgramParameter4dNV(target, index, x, y, z, w, function_pointer); + } + static native void nglProgramParameter4dNV(int target, int index, double x, double y, double z, double w, long function_pointer); + + public static void glProgramParameters4NV(int target, int index, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramParameters4fvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglProgramParameters4fvNV(target, index, params.remaining() >> 2, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglProgramParameters4fvNV(int target, int index, int params_count, long params, long function_pointer); + + public static void glProgramParameters4NV(int target, int index, DoubleBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glProgramParameters4dvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(params); + nglProgramParameters4dvNV(target, index, params.remaining() >> 2, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglProgramParameters4dvNV(int target, int index, int params_count, long params, long function_pointer); + + public static void glTrackMatrixNV(int target, int address, int matrix, int transform) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glTrackMatrixNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglTrackMatrixNV(target, address, matrix, transform, function_pointer); + } + static native void nglTrackMatrixNV(int target, int address, int matrix, int transform, long function_pointer); + + public static void glVertexAttribPointerNV(int index, int size, int type, int stride, DoubleBuffer buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribPointerNV; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribPointerNV(index, size, type, stride, MemoryUtil.getAddress(buffer), function_pointer); + } + public static void glVertexAttribPointerNV(int index, int size, int type, int stride, FloatBuffer buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribPointerNV; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribPointerNV(index, size, type, stride, MemoryUtil.getAddress(buffer), function_pointer); + } + public static void glVertexAttribPointerNV(int index, int size, int type, int stride, ByteBuffer buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribPointerNV; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribPointerNV(index, size, type, stride, MemoryUtil.getAddress(buffer), function_pointer); + } + public static void glVertexAttribPointerNV(int index, int size, int type, int stride, IntBuffer buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribPointerNV; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribPointerNV(index, size, type, stride, MemoryUtil.getAddress(buffer), function_pointer); + } + public static void glVertexAttribPointerNV(int index, int size, int type, int stride, ShortBuffer buffer) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribPointerNV; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOdisabled(caps); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getReferences(caps).glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribPointerNV(index, size, type, stride, MemoryUtil.getAddress(buffer), function_pointer); + } + static native void nglVertexAttribPointerNV(int index, int size, int type, int stride, long buffer, long function_pointer); + public static void glVertexAttribPointerNV(int index, int size, int type, int stride, long buffer_buffer_offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribPointerNV; + BufferChecks.checkFunctionAddress(function_pointer); + GLChecks.ensureArrayVBOenabled(caps); + nglVertexAttribPointerNVBO(index, size, type, stride, buffer_buffer_offset, function_pointer); + } + static native void nglVertexAttribPointerNVBO(int index, int size, int type, int stride, long buffer_buffer_offset, long function_pointer); + + public static void glVertexAttrib1sNV(int index, short x) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib1sNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib1sNV(index, x, function_pointer); + } + static native void nglVertexAttrib1sNV(int index, short x, long function_pointer); + + public static void glVertexAttrib1fNV(int index, float x) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib1fNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib1fNV(index, x, function_pointer); + } + static native void nglVertexAttrib1fNV(int index, float x, long function_pointer); + + public static void glVertexAttrib1dNV(int index, double x) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib1dNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib1dNV(index, x, function_pointer); + } + static native void nglVertexAttrib1dNV(int index, double x, long function_pointer); + + public static void glVertexAttrib2sNV(int index, short x, short y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib2sNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib2sNV(index, x, y, function_pointer); + } + static native void nglVertexAttrib2sNV(int index, short x, short y, long function_pointer); + + public static void glVertexAttrib2fNV(int index, float x, float y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib2fNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib2fNV(index, x, y, function_pointer); + } + static native void nglVertexAttrib2fNV(int index, float x, float y, long function_pointer); + + public static void glVertexAttrib2dNV(int index, double x, double y) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib2dNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib2dNV(index, x, y, function_pointer); + } + static native void nglVertexAttrib2dNV(int index, double x, double y, long function_pointer); + + public static void glVertexAttrib3sNV(int index, short x, short y, short z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib3sNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib3sNV(index, x, y, z, function_pointer); + } + static native void nglVertexAttrib3sNV(int index, short x, short y, short z, long function_pointer); + + public static void glVertexAttrib3fNV(int index, float x, float y, float z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib3fNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib3fNV(index, x, y, z, function_pointer); + } + static native void nglVertexAttrib3fNV(int index, float x, float y, float z, long function_pointer); + + public static void glVertexAttrib3dNV(int index, double x, double y, double z) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib3dNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib3dNV(index, x, y, z, function_pointer); + } + static native void nglVertexAttrib3dNV(int index, double x, double y, double z, long function_pointer); + + public static void glVertexAttrib4sNV(int index, short x, short y, short z, short w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib4sNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib4sNV(index, x, y, z, w, function_pointer); + } + static native void nglVertexAttrib4sNV(int index, short x, short y, short z, short w, long function_pointer); + + public static void glVertexAttrib4fNV(int index, float x, float y, float z, float w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib4fNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib4fNV(index, x, y, z, w, function_pointer); + } + static native void nglVertexAttrib4fNV(int index, float x, float y, float z, float w, long function_pointer); + + public static void glVertexAttrib4dNV(int index, double x, double y, double z, double w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib4dNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib4dNV(index, x, y, z, w, function_pointer); + } + static native void nglVertexAttrib4dNV(int index, double x, double y, double z, double w, long function_pointer); + + public static void glVertexAttrib4ubNV(int index, byte x, byte y, byte z, byte w) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttrib4ubNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglVertexAttrib4ubNV(index, x, y, z, w, function_pointer); + } + static native void nglVertexAttrib4ubNV(int index, byte x, byte y, byte z, byte w, long function_pointer); + + public static void glVertexAttribs1NV(int index, ShortBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribs1svNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(v); + nglVertexAttribs1svNV(index, v.remaining(), MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribs1svNV(int index, int v_n, long v, long function_pointer); + + public static void glVertexAttribs1NV(int index, FloatBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribs1fvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(v); + nglVertexAttribs1fvNV(index, v.remaining(), MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribs1fvNV(int index, int v_n, long v, long function_pointer); + + public static void glVertexAttribs1NV(int index, DoubleBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribs1dvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(v); + nglVertexAttribs1dvNV(index, v.remaining(), MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribs1dvNV(int index, int v_n, long v, long function_pointer); + + public static void glVertexAttribs2NV(int index, ShortBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribs2svNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(v); + nglVertexAttribs2svNV(index, v.remaining() >> 1, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribs2svNV(int index, int v_n, long v, long function_pointer); + + public static void glVertexAttribs2NV(int index, FloatBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribs2fvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(v); + nglVertexAttribs2fvNV(index, v.remaining() >> 1, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribs2fvNV(int index, int v_n, long v, long function_pointer); + + public static void glVertexAttribs2NV(int index, DoubleBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribs2dvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(v); + nglVertexAttribs2dvNV(index, v.remaining() >> 1, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribs2dvNV(int index, int v_n, long v, long function_pointer); + + public static void glVertexAttribs3NV(int index, ShortBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribs3svNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(v); + nglVertexAttribs3svNV(index, v.remaining() / 3, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribs3svNV(int index, int v_n, long v, long function_pointer); + + public static void glVertexAttribs3NV(int index, FloatBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribs3fvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(v); + nglVertexAttribs3fvNV(index, v.remaining() / 3, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribs3fvNV(int index, int v_n, long v, long function_pointer); + + public static void glVertexAttribs3NV(int index, DoubleBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribs3dvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(v); + nglVertexAttribs3dvNV(index, v.remaining() / 3, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribs3dvNV(int index, int v_n, long v, long function_pointer); + + public static void glVertexAttribs4NV(int index, ShortBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribs4svNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(v); + nglVertexAttribs4svNV(index, v.remaining() >> 2, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribs4svNV(int index, int v_n, long v, long function_pointer); + + public static void glVertexAttribs4NV(int index, FloatBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribs4fvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(v); + nglVertexAttribs4fvNV(index, v.remaining() >> 2, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribs4fvNV(int index, int v_n, long v, long function_pointer); + + public static void glVertexAttribs4NV(int index, DoubleBuffer v) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVertexAttribs4dvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkDirect(v); + nglVertexAttribs4dvNV(index, v.remaining() >> 2, MemoryUtil.getAddress(v), function_pointer); + } + static native void nglVertexAttribs4dvNV(int index, int v_n, long v, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVVertexProgram2Option.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVVertexProgram2Option.java new file mode 100644 index 0000000..a14c512 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVVertexProgram2Option.java @@ -0,0 +1,17 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVVertexProgram2Option { + + /** + * Accepted by the <pname> parameter of GetProgramivARB: + */ + public static final int GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV = 0x88F4, + GL_MAX_PROGRAM_CALL_DEPTH_NV = 0x88F5; + + private NVVertexProgram2Option() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVVertexProgram3.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVVertexProgram3.java new file mode 100644 index 0000000..756074b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVVertexProgram3.java @@ -0,0 +1,17 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVVertexProgram3 { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB = 0x8B4C; + + private NVVertexProgram3() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVVideoCapture.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVVideoCapture.java new file mode 100644 index 0000000..e166562 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVVideoCapture.java @@ -0,0 +1,245 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVVideoCapture { + + /** + * Accepted by the <target> parameters of BindBufferARB, BufferDataARB, + * BufferSubDataARB, MapBufferARB, UnmapBufferARB, GetBufferSubDataARB, + * GetBufferParameterivARB, and GetBufferPointervARB: + */ + public static final int GL_VIDEO_BUFFER_NV = 0x9020; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_VIDEO_BUFFER_BINDING_NV = 0x9021; + + /** + * Accepted by the <frame_region> parameter of + * BindVideoCaptureStreamBufferNV, and BindVideoCaptureStreamTextureNV: + */ + public static final int GL_FIELD_UPPER_NV = 0x9022, + GL_FIELD_LOWER_NV = 0x9023; + + /** + * Accepted by the <pname> parameter of GetVideoCaptureivNV: + */ + public static final int GL_NUM_VIDEO_CAPTURE_STREAMS_NV = 0x9024, + GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV = 0x9025; + + /** + * Accepted by the <pname> parameter of + * GetVideoCaptureStream{i,f,d}vNV: + */ + public static final int GL_LAST_VIDEO_CAPTURE_STATUS_NV = 0x9027, + GL_VIDEO_BUFFER_PITCH_NV = 0x9028, + GL_VIDEO_CAPTURE_FRAME_WIDTH_NV = 0x9038, + GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV = 0x9039, + GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV = 0x903A, + GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV = 0x903B, + GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV = 0x9026; + + /** + * Accepted by the <pname> parameter of + * GetVideoCaptureStream{i,f,d}vNV and as the <pname> parameter of + * VideoCaptureStreamParameter{i,f,d}vNV: + */ + public static final int GL_VIDEO_COLOR_CONVERSION_MATRIX_NV = 0x9029, + GL_VIDEO_COLOR_CONVERSION_MAX_NV = 0x902A, + GL_VIDEO_COLOR_CONVERSION_MIN_NV = 0x902B, + GL_VIDEO_COLOR_CONVERSION_OFFSET_NV = 0x902C, + GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV = 0x902D, + GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV = 0x903C; + + /** + * Returned by VideoCaptureNV: + */ + public static final int GL_PARTIAL_SUCCESS_NV = 0x902E; + + /** + * Returned by VideoCaptureNV and GetVideoCaptureStream{i,f,d}vNV + * when <pname> is LAST_VIDEO_CAPTURE_STATUS_NV: + */ + public static final int GL_SUCCESS_NV = 0x902F, + GL_FAILURE_NV = 0x9030; + + /** + * Accepted in the <params> parameter of + * VideoCaptureStreamParameter{i,f,d}vNV when <pname> is + * VIDEO_BUFFER_INTERNAL_FORMAT_NV and returned by + * GetVideoCaptureStream{i,f,d}vNV when <pname> is + * VIDEO_BUFFER_INTERNAL_FORMAT_NV: + */ + public static final int GL_YCBYCR8_422_NV = 0x9031, + GL_YCBAYCR8A_4224_NV = 0x9032, + GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV = 0x9033, + GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV = 0x9034, + GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV = 0x9035, + GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV = 0x9036, + GL_Z4Y12Z4CB12Z4CR12_444_NV = 0x9037; + + /** + * Accepted by the <attribute> parameter of NVPresentVideoUtil.glQueryContextNV: + */ + public static final int GL_NUM_VIDEO_CAPTURE_SLOTS_NV = 0x20CF; + + /** + * Accepted by the <attribute> parameter of + * glQueryVideoCaptureDeviceNV: + */ + public static final int GL_UNIQUE_ID_NV = 0x20CE; + + private NVVideoCapture() {} + + public static void glBeginVideoCaptureNV(int video_capture_slot) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBeginVideoCaptureNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglBeginVideoCaptureNV(video_capture_slot, function_pointer); + } + static native void nglBeginVideoCaptureNV(int video_capture_slot, long function_pointer); + + public static void glBindVideoCaptureStreamBufferNV(int video_capture_slot, int stream, int frame_region, long offset) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindVideoCaptureStreamBufferNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindVideoCaptureStreamBufferNV(video_capture_slot, stream, frame_region, offset, function_pointer); + } + static native void nglBindVideoCaptureStreamBufferNV(int video_capture_slot, int stream, int frame_region, long offset, long function_pointer); + + public static void glBindVideoCaptureStreamTextureNV(int video_capture_slot, int stream, int frame_region, int target, int texture) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glBindVideoCaptureStreamTextureNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglBindVideoCaptureStreamTextureNV(video_capture_slot, stream, frame_region, target, texture, function_pointer); + } + static native void nglBindVideoCaptureStreamTextureNV(int video_capture_slot, int stream, int frame_region, int target, int texture, long function_pointer); + + public static void glEndVideoCaptureNV(int video_capture_slot) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glEndVideoCaptureNV; + BufferChecks.checkFunctionAddress(function_pointer); + nglEndVideoCaptureNV(video_capture_slot, function_pointer); + } + static native void nglEndVideoCaptureNV(int video_capture_slot, long function_pointer); + + public static void glGetVideoCaptureNV(int video_capture_slot, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVideoCaptureivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetVideoCaptureivNV(video_capture_slot, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVideoCaptureivNV(int video_capture_slot, int pname, long params, long function_pointer); + + /** Overloads glGetVideoCaptureivNV. */ + public static int glGetVideoCaptureiNV(int video_capture_slot, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVideoCaptureivNV; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetVideoCaptureivNV(video_capture_slot, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetVideoCaptureStreamNV(int video_capture_slot, int stream, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVideoCaptureStreamivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetVideoCaptureStreamivNV(video_capture_slot, stream, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVideoCaptureStreamivNV(int video_capture_slot, int stream, int pname, long params, long function_pointer); + + /** Overloads glGetVideoCaptureStreamivNV. */ + public static int glGetVideoCaptureStreamiNV(int video_capture_slot, int stream, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVideoCaptureStreamivNV; + BufferChecks.checkFunctionAddress(function_pointer); + IntBuffer params = APIUtil.getBufferInt(caps); + nglGetVideoCaptureStreamivNV(video_capture_slot, stream, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetVideoCaptureStreamNV(int video_capture_slot, int stream, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVideoCaptureStreamfvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetVideoCaptureStreamfvNV(video_capture_slot, stream, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVideoCaptureStreamfvNV(int video_capture_slot, int stream, int pname, long params, long function_pointer); + + /** Overloads glGetVideoCaptureStreamfvNV. */ + public static float glGetVideoCaptureStreamfNV(int video_capture_slot, int stream, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVideoCaptureStreamfvNV; + BufferChecks.checkFunctionAddress(function_pointer); + FloatBuffer params = APIUtil.getBufferFloat(caps); + nglGetVideoCaptureStreamfvNV(video_capture_slot, stream, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static void glGetVideoCaptureStreamNV(int video_capture_slot, int stream, int pname, DoubleBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVideoCaptureStreamdvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 1); + nglGetVideoCaptureStreamdvNV(video_capture_slot, stream, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglGetVideoCaptureStreamdvNV(int video_capture_slot, int stream, int pname, long params, long function_pointer); + + /** Overloads glGetVideoCaptureStreamdvNV. */ + public static double glGetVideoCaptureStreamdNV(int video_capture_slot, int stream, int pname) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glGetVideoCaptureStreamdvNV; + BufferChecks.checkFunctionAddress(function_pointer); + DoubleBuffer params = APIUtil.getBufferDouble(caps); + nglGetVideoCaptureStreamdvNV(video_capture_slot, stream, pname, MemoryUtil.getAddress(params), function_pointer); + return params.get(0); + } + + public static int glVideoCaptureNV(int video_capture_slot, IntBuffer sequence_num, LongBuffer capture_time) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVideoCaptureNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(sequence_num, 1); + BufferChecks.checkBuffer(capture_time, 1); + int __result = nglVideoCaptureNV(video_capture_slot, MemoryUtil.getAddress(sequence_num), MemoryUtil.getAddress(capture_time), function_pointer); + return __result; + } + static native int nglVideoCaptureNV(int video_capture_slot, long sequence_num, long capture_time, long function_pointer); + + public static void glVideoCaptureStreamParameterNV(int video_capture_slot, int stream, int pname, IntBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVideoCaptureStreamParameterivNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 16); + nglVideoCaptureStreamParameterivNV(video_capture_slot, stream, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglVideoCaptureStreamParameterivNV(int video_capture_slot, int stream, int pname, long params, long function_pointer); + + public static void glVideoCaptureStreamParameterNV(int video_capture_slot, int stream, int pname, FloatBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVideoCaptureStreamParameterfvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 16); + nglVideoCaptureStreamParameterfvNV(video_capture_slot, stream, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglVideoCaptureStreamParameterfvNV(int video_capture_slot, int stream, int pname, long params, long function_pointer); + + public static void glVideoCaptureStreamParameterNV(int video_capture_slot, int stream, int pname, DoubleBuffer params) { + ContextCapabilities caps = GLContext.getCapabilities(); + long function_pointer = caps.glVideoCaptureStreamParameterdvNV; + BufferChecks.checkFunctionAddress(function_pointer); + BufferChecks.checkBuffer(params, 16); + nglVideoCaptureStreamParameterdvNV(video_capture_slot, stream, pname, MemoryUtil.getAddress(params), function_pointer); + } + static native void nglVideoCaptureStreamParameterdvNV(int video_capture_slot, int stream, int pname, long params, long function_pointer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVXGpuMemoryInfo.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVXGpuMemoryInfo.java new file mode 100644 index 0000000..0f5169b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/NVXGpuMemoryInfo.java @@ -0,0 +1,23 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +/** + * Experimental extension, may be removed/changed in the future. + */ +public final class NVXGpuMemoryInfo { + + /** + * Accepted by the <pname> parameter of GetIntegerv: + */ + public static final int GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX = 0x9047, + GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX = 0x9048, + GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX = 0x9049, + GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX = 0x904A, + GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX = 0x904B; + + private NVXGpuMemoryInfo() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/References.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/References.java new file mode 100644 index 0000000..56f936a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/References.java @@ -0,0 +1,51 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +class References extends BaseReferences { + References(ContextCapabilities caps) { + super(caps); + } + java.nio.Buffer ARB_matrix_palette_glMatrixIndexPointerARB_pPointer; + java.nio.Buffer ARB_vertex_blend_glWeightPointerARB_pPointer; + java.nio.Buffer EXT_fog_coord_glFogCoordPointerEXT_data; + java.nio.Buffer EXT_secondary_color_glSecondaryColorPointerEXT_pPointer; + java.nio.Buffer EXT_vertex_shader_glVariantPointerEXT_pAddr; + java.nio.Buffer EXT_vertex_weighting_glVertexWeightPointerEXT_pPointer; + java.nio.Buffer GL11_glColorPointer_pointer; + java.nio.Buffer GL11_glEdgeFlagPointer_pointer; + java.nio.Buffer GL11_glNormalPointer_pointer; + java.nio.Buffer GL11_glVertexPointer_pointer; + java.nio.Buffer GL14_glFogCoordPointer_data; + + void copy(References references, int mask) { + super.copy(references, mask); + if ( (mask & GL11.GL_CLIENT_VERTEX_ARRAY_BIT) != 0 ) { + this.ARB_matrix_palette_glMatrixIndexPointerARB_pPointer = references.ARB_matrix_palette_glMatrixIndexPointerARB_pPointer; + this.ARB_vertex_blend_glWeightPointerARB_pPointer = references.ARB_vertex_blend_glWeightPointerARB_pPointer; + this.EXT_fog_coord_glFogCoordPointerEXT_data = references.EXT_fog_coord_glFogCoordPointerEXT_data; + this.EXT_secondary_color_glSecondaryColorPointerEXT_pPointer = references.EXT_secondary_color_glSecondaryColorPointerEXT_pPointer; + this.EXT_vertex_shader_glVariantPointerEXT_pAddr = references.EXT_vertex_shader_glVariantPointerEXT_pAddr; + this.EXT_vertex_weighting_glVertexWeightPointerEXT_pPointer = references.EXT_vertex_weighting_glVertexWeightPointerEXT_pPointer; + this.GL11_glColorPointer_pointer = references.GL11_glColorPointer_pointer; + this.GL11_glEdgeFlagPointer_pointer = references.GL11_glEdgeFlagPointer_pointer; + this.GL11_glNormalPointer_pointer = references.GL11_glNormalPointer_pointer; + this.GL11_glVertexPointer_pointer = references.GL11_glVertexPointer_pointer; + this.GL14_glFogCoordPointer_data = references.GL14_glFogCoordPointer_data; + } + } + void clear() { + super.clear(); + this.ARB_matrix_palette_glMatrixIndexPointerARB_pPointer = null; + this.ARB_vertex_blend_glWeightPointerARB_pPointer = null; + this.EXT_fog_coord_glFogCoordPointerEXT_data = null; + this.EXT_secondary_color_glSecondaryColorPointerEXT_pPointer = null; + this.EXT_vertex_shader_glVariantPointerEXT_pAddr = null; + this.EXT_vertex_weighting_glVertexWeightPointerEXT_pPointer = null; + this.GL11_glColorPointer_pointer = null; + this.GL11_glEdgeFlagPointer_pointer = null; + this.GL11_glNormalPointer_pointer = null; + this.GL11_glVertexPointer_pointer = null; + this.GL14_glFogCoordPointer_data = null; + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/SGISGenerateMipmap.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/SGISGenerateMipmap.java new file mode 100644 index 0000000..e1f13c8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/SGISGenerateMipmap.java @@ -0,0 +1,23 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class SGISGenerateMipmap { + + /** + * Accepted by the <pname> parameter of TexParameteri, TexParameterf, + * TexParameteriv, TexParameterfv, GetTexParameteriv, and GetTexParameterfv. + */ + public static final int GL_GENERATE_MIPMAP_SGIS = 0x8191; + + /** + * Accepted by the <target> parameter of Hint, and by the + * parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. + */ + public static final int GL_GENERATE_MIPMAP_HINT_SGIS = 0x8192; + + private SGISGenerateMipmap() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/SGISTextureLOD.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/SGISTextureLOD.java new file mode 100644 index 0000000..72efc25 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/SGISTextureLOD.java @@ -0,0 +1,20 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class SGISTextureLOD { + + /** + * Accepted by the <pname> parameter of TexParameteri, TexParameterf, + * TexParameteriv, TexParameterfv, GetTexParameteriv, and GetTexParameterfv. + */ + public static final int GL_TEXTURE_MIN_LOD_SGIS = 0x813A, + GL_TEXTURE_MAX_LOD_SGIS = 0x813B, + GL_TEXTURE_BASE_LEVEL_SGIS = 0x813C, + GL_TEXTURE_MAX_LEVEL_SGIS = 0x813D; + + private SGISTextureLOD() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/SUNSliceAccum.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/SUNSliceAccum.java new file mode 100644 index 0000000..aa039e9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengl/SUNSliceAccum.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengl; + +import org.lwjgl.*; +import java.nio.*; + +public final class SUNSliceAccum { + + /** + * Accepted by the <op> parameter of Accum, + */ + public static final int GL_SLICE_ACCUM_SUN = 0x85CC; + + private SUNSliceAccum() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/AMDCompressed3DCTexture.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/AMDCompressed3DCTexture.java new file mode 100644 index 0000000..7823eaa --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/AMDCompressed3DCTexture.java @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class AMDCompressed3DCTexture { + + /** + * Accepted by the <internalFormat> parameter of CompressedTexImage2D and + * CompressedTexImage3DOES: + */ + public static final int GL_3DC_X_AMD = 0x87F9, + GL_3DC_XY_AMD = 0x87FA; + + private AMDCompressed3DCTexture() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/AMDCompressedATCTexture.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/AMDCompressedATCTexture.java new file mode 100644 index 0000000..a99f92f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/AMDCompressedATCTexture.java @@ -0,0 +1,19 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class AMDCompressedATCTexture { + + /** + * Accepted by the <internalformat> parameter of CompressedTexImage2D and + * CompressedTexImage3DOES. + */ + public static final int GL_ATC_RGB_AMD = 0x8C92, + GL_ATC_RGBA_EXPLICIT_ALPHA_AMD = 0x8C93, + GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD = 0x87EE; + + private AMDCompressedATCTexture() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/AMDPerformanceMonitor.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/AMDPerformanceMonitor.java new file mode 100644 index 0000000..80cea55 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/AMDPerformanceMonitor.java @@ -0,0 +1,149 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class AMDPerformanceMonitor { + + /** + * Accepted by the <pame> parameter of GetPerfMonitorCounterInfoAMD + */ + public static final int GL_COUNTER_TYPE_AMD = 0x8BC0, + GL_COUNTER_RANGE_AMD = 0x8BC1; + + /** + * Returned as a valid value in <data> parameter of + * GetPerfMonitorCounterInfoAMD if <pname> = COUNTER_TYPE_AMD + */ + public static final int GL_UNSIGNED_INT64_AMD = 0x8BC2, + GL_PERCENTAGE_AMD = 0x8BC3; + + /** + * Accepted by the <pname> parameter of GetPerfMonitorCounterDataAMD + */ + public static final int GL_PERFMON_RESULT_AVAILABLE_AMD = 0x8BC4, + GL_PERFMON_RESULT_SIZE_AMD = 0x8BC5, + GL_PERFMON_RESULT_AMD = 0x8BC6; + + private AMDPerformanceMonitor() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glGetPerfMonitorGroupsAMD(IntBuffer numGroups, IntBuffer groups) { + if (numGroups != null) + BufferChecks.checkBuffer(numGroups, 1); + BufferChecks.checkDirect(groups); + nglGetPerfMonitorGroupsAMD(MemoryUtil.getAddressSafe(numGroups), groups.remaining(), MemoryUtil.getAddress(groups)); + } + static native void nglGetPerfMonitorGroupsAMD(long numGroups, int groups_groupsSize, long groups); + + public static void glGetPerfMonitorCountersAMD(int group, IntBuffer numCounters, IntBuffer maxActiveCounters, IntBuffer counters) { + BufferChecks.checkBuffer(numCounters, 1); + BufferChecks.checkBuffer(maxActiveCounters, 1); + BufferChecks.checkDirect(counters); + nglGetPerfMonitorCountersAMD(group, MemoryUtil.getAddress(numCounters), MemoryUtil.getAddress(maxActiveCounters), counters.remaining(), MemoryUtil.getAddress(counters)); + } + static native void nglGetPerfMonitorCountersAMD(int group, long numCounters, long maxActiveCounters, int counters_countersSize, long counters); + + public static void glGetPerfMonitorGroupStringAMD(int group, IntBuffer length, ByteBuffer groupString) { + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkDirect(groupString); + nglGetPerfMonitorGroupStringAMD(group, groupString.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(groupString)); + } + static native void nglGetPerfMonitorGroupStringAMD(int group, int groupString_bufSize, long length, long groupString); + + /** Overloads glGetPerfMonitorGroupStringAMD. */ + public static String glGetPerfMonitorGroupStringAMD(int group, int bufSize) { + IntBuffer groupString_length = APIUtil.getLengths(); + ByteBuffer groupString = APIUtil.getBufferByte(bufSize); + nglGetPerfMonitorGroupStringAMD(group, bufSize, MemoryUtil.getAddress0(groupString_length), MemoryUtil.getAddress(groupString)); + groupString.limit(groupString_length.get(0)); + return APIUtil.getString(groupString); + } + + public static void glGetPerfMonitorCounterStringAMD(int group, int counter, IntBuffer length, ByteBuffer counterString) { + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkDirect(counterString); + nglGetPerfMonitorCounterStringAMD(group, counter, counterString.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(counterString)); + } + static native void nglGetPerfMonitorCounterStringAMD(int group, int counter, int counterString_bufSize, long length, long counterString); + + /** Overloads glGetPerfMonitorCounterStringAMD. */ + public static String glGetPerfMonitorCounterStringAMD(int group, int counter, int bufSize) { + IntBuffer counterString_length = APIUtil.getLengths(); + ByteBuffer counterString = APIUtil.getBufferByte(bufSize); + nglGetPerfMonitorCounterStringAMD(group, counter, bufSize, MemoryUtil.getAddress0(counterString_length), MemoryUtil.getAddress(counterString)); + counterString.limit(counterString_length.get(0)); + return APIUtil.getString(counterString); + } + + public static void glGetPerfMonitorCounterInfoAMD(int group, int counter, int pname, ByteBuffer data) { + BufferChecks.checkBuffer(data, 16); + nglGetPerfMonitorCounterInfoAMD(group, counter, pname, MemoryUtil.getAddress(data)); + } + static native void nglGetPerfMonitorCounterInfoAMD(int group, int counter, int pname, long data); + + public static void glGenPerfMonitorsAMD(IntBuffer monitors) { + BufferChecks.checkDirect(monitors); + nglGenPerfMonitorsAMD(monitors.remaining(), MemoryUtil.getAddress(monitors)); + } + static native void nglGenPerfMonitorsAMD(int monitors_n, long monitors); + + /** Overloads glGenPerfMonitorsAMD. */ + public static int glGenPerfMonitorsAMD() { + IntBuffer monitors = APIUtil.getBufferInt(); + nglGenPerfMonitorsAMD(1, MemoryUtil.getAddress(monitors)); + return monitors.get(0); + } + + public static void glDeletePerfMonitorsAMD(IntBuffer monitors) { + BufferChecks.checkDirect(monitors); + nglDeletePerfMonitorsAMD(monitors.remaining(), MemoryUtil.getAddress(monitors)); + } + static native void nglDeletePerfMonitorsAMD(int monitors_n, long monitors); + + /** Overloads glDeletePerfMonitorsAMD. */ + public static void glDeletePerfMonitorsAMD(int monitor) { + nglDeletePerfMonitorsAMD(1, APIUtil.getInt(monitor)); + } + + public static void glSelectPerfMonitorCountersAMD(int monitor, boolean enable, int group, IntBuffer counterList) { + BufferChecks.checkDirect(counterList); + nglSelectPerfMonitorCountersAMD(monitor, enable, group, counterList.remaining(), MemoryUtil.getAddress(counterList)); + } + static native void nglSelectPerfMonitorCountersAMD(int monitor, boolean enable, int group, int counterList_numCounters, long counterList); + + /** Overloads glSelectPerfMonitorCountersAMD. */ + public static void glSelectPerfMonitorCountersAMD(int monitor, boolean enable, int group, int counter) { + nglSelectPerfMonitorCountersAMD(monitor, enable, group, 1, APIUtil.getInt(counter)); + } + + public static void glBeginPerfMonitorAMD(int monitor) { + nglBeginPerfMonitorAMD(monitor); + } + static native void nglBeginPerfMonitorAMD(int monitor); + + public static void glEndPerfMonitorAMD(int monitor) { + nglEndPerfMonitorAMD(monitor); + } + static native void nglEndPerfMonitorAMD(int monitor); + + public static void glGetPerfMonitorCounterDataAMD(int monitor, int pname, IntBuffer data, IntBuffer bytesWritten) { + BufferChecks.checkDirect(data); + if (bytesWritten != null) + BufferChecks.checkBuffer(bytesWritten, 1); + nglGetPerfMonitorCounterDataAMD(monitor, pname, data.remaining(), MemoryUtil.getAddress(data), MemoryUtil.getAddressSafe(bytesWritten)); + } + static native void nglGetPerfMonitorCounterDataAMD(int monitor, int pname, int data_dataSize, long data, long bytesWritten); + + /** Overloads glGetPerfMonitorCounterDataAMD. */ + public static int glGetPerfMonitorCounterDataAMD(int monitor, int pname) { + IntBuffer data = APIUtil.getBufferInt(); + nglGetPerfMonitorCounterDataAMD(monitor, pname, 4, MemoryUtil.getAddress(data), 0L); + return data.get(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/AMDProgramBinaryZ400.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/AMDProgramBinaryZ400.java new file mode 100644 index 0000000..c047eca --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/AMDProgramBinaryZ400.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class AMDProgramBinaryZ400 { + + /** + * Accepted by the <binaryFormat> parameter of ProgramBinaryOES: + */ + public static final int GL_Z400_BINARY_AMD = 0x8740; + + private AMDProgramBinaryZ400() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/ANGLEFramebufferBlit.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/ANGLEFramebufferBlit.java new file mode 100644 index 0000000..98e984e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/ANGLEFramebufferBlit.java @@ -0,0 +1,33 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class ANGLEFramebufferBlit { + + /** + * Accepted by the <target> parameter of BindFramebuffer, + * CheckFramebufferStatus, FramebufferTexture2D, FramebufferTexture3DOES, + * FramebufferRenderbuffer, and + * GetFramebufferAttachmentParameteriv: + */ + public static final int GL_READ_FRAMEBUFFER_ANGLE = 0x8CA8, + GL_DRAW_FRAMEBUFFER_ANGLE = 0x8CA9; + + /** + * Accepted by the <pname> parameters of GetIntegerv and GetFloatv: + */ + public static final int GL_DRAW_FRAMEBUFFER_BINDING_ANGLE = 0x8CA6, + GL_READ_FRAMEBUFFER_BINDING_ANGLE = 0x8CAA; + + private ANGLEFramebufferBlit() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glBlitFramebufferANGLE(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, int mask, int filter) { + nglBlitFramebufferANGLE(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); + } + static native void nglBlitFramebufferANGLE(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, int mask, int filter); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/ANGLEFramebufferMultisample.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/ANGLEFramebufferMultisample.java new file mode 100644 index 0000000..ed214a9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/ANGLEFramebufferMultisample.java @@ -0,0 +1,34 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class ANGLEFramebufferMultisample { + + /** + * Accepted by the <pname> parameter of GetRenderbufferParameteriv: + */ + public static final int GL_RENDERBUFFER_SAMPLES_ANGLE = 0x8CAB; + + /** + * Returned by CheckFramebufferStatus: + */ + public static final int GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE = 0x8D56; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * and GetFloatv: + */ + public static final int GL_MAX_SAMPLES_ANGLE = 0x8D57; + + private ANGLEFramebufferMultisample() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glRenderbufferStorageMultisampleANGLE(int target, int samples, int internalformat, int width, int height) { + nglRenderbufferStorageMultisampleANGLE(target, samples, internalformat, width, height); + } + static native void nglRenderbufferStorageMultisampleANGLE(int target, int samples, int internalformat, int width, int height); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/APPLEFramebufferMultisample.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/APPLEFramebufferMultisample.java new file mode 100644 index 0000000..7b19cf3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/APPLEFramebufferMultisample.java @@ -0,0 +1,54 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class APPLEFramebufferMultisample { + + /** + * Accepted by the <pname> parameter of GetRenderbufferParameteriv: + */ + public static final int GL_RENDERBUFFER_SAMPLES_APPLE = 0x8CAB; + + /** + * Returned by CheckFramebufferStatus: + */ + public static final int GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE = 0x8D56; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, and + * GetFloatv: + */ + public static final int GL_MAX_SAMPLES_APPLE = 0x8D57; + + /** + * Accepted by the <target> parameter of BindFramebuffer, + * CheckFramebufferStatus, FramebufferTexture2D, FramebufferRenderbuffer, and + * GetFramebufferAttachmentParameteriv: + */ + public static final int GL_READ_FRAMEBUFFER_APPLE = 0x8CA8, + GL_DRAW_FRAMEBUFFER_APPLE = 0x8CA9; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, and + * GetFloatv: + */ + public static final int GL_DRAW_FRAMEBUFFER_BINDING_APPLE = 0x8CA6, + GL_READ_FRAMEBUFFER_BINDING_APPLE = 0x8CAA; + + private APPLEFramebufferMultisample() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glRenderbufferStorageMultisampleAPPLE(int target, int samples, int internalformat, int width, int height) { + nglRenderbufferStorageMultisampleAPPLE(target, samples, internalformat, width, height); + } + static native void nglRenderbufferStorageMultisampleAPPLE(int target, int samples, int internalformat, int width, int height); + + public static void glResolveMultisampleFramebufferAPPLE() { + nglResolveMultisampleFramebufferAPPLE(); + } + static native void nglResolveMultisampleFramebufferAPPLE(); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/APPLERgb422.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/APPLERgb422.java new file mode 100644 index 0000000..4b54b99 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/APPLERgb422.java @@ -0,0 +1,30 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class APPLERgb422 { + + /** + * Accepted by the <format> parameter of DrawPixels, ReadPixels, TexImage1D, + * TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, TexSubImage2D, + * TexSubImage3D, GetHistogram, GetMinmax, ConvolutionFilter1D, + * ConvolutionFilter2D, GetConvolutionFilter, SeparableFilter2D, + * GetSeparableFilter, ColorTable, GetColorTable: + */ + public static final int GL_RGB_422_APPLE = 0x8A1F; + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, TexImage1D, + * TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, TexSubImage2D, + * TexSubImage3D, GetHistogram, GetMinmax, ConvolutionFilter1D, + * ConvolutionFilter2D, GetConvolutionFilter, SeparableFilter2D, + * GetSeparableFilter, ColorTable, GetColorTable: + */ + public static final int GL_UNSIGNED_SHORT_8_8_APPLE = 0x85BA, + GL_UNSIGNED_SHORT_8_8_REV_APPLE = 0x85BB; + + private APPLERgb422() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/APPLESync.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/APPLESync.java new file mode 100644 index 0000000..494ecf4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/APPLESync.java @@ -0,0 +1,122 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class APPLESync { + + /** + * Accepted as the <pname> parameter of GetInteger64vAPPLE: + */ + public static final int GL_MAX_SERVER_WAIT_TIMEOUT_APPLE = 0x9111; + + /** + * Accepted as the <pname> parameter of GetSyncivAPPLE: + */ + public static final int GL_OBJECT_TYPE_APPLE = 0x9112, + SYNC_CONDITION_APPLE = 0x9113, + SYNC_STATUS_APPLE = 0x9114, + SYNC_FLAGS_APPLE = 0x9115; + + /** + * Returned in <values> for GetSynciv <pname> OBJECT_TYPE_APPLE: + */ + public static final int GL_SYNC_FENCE_APPLE = 0x9116; + + /** + * Returned in <values> for GetSyncivAPPLE <pname> SYNC_CONDITION_APPLE: + */ + public static final int GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE = 0x9117; + + /** + * Returned in <values> for GetSyncivAPPLE <pname> SYNC_STATUS_APPLE: + */ + public static final int GL_UNSIGNALED_APPLE = 0x9118, + SIGNALED_APPLE = 0x9119; + + /** + * Accepted in the <flags> parameter of ClientWaitSyncAPPLE: + */ + public static final int GL_SYNC_FLUSH_COMMANDS_BIT_APPLE = 0x1; + + /** + * Accepted in the <timeout> parameter of WaitSyncAPPLE: + */ + public static final long GL_TIMEOUT_IGNORED_APPLE = 0xFFFFFFFFFFFFFFFFL; + + /** + * Returned by ClientWaitSyncAPPLE: + */ + public static final int GL_ALREADY_SIGNALED_APPLE = 0x911A, + TIMEOUT_EXPIRED_APPLE = 0x911B, + CONDITION_SATISFIED_APPLE = 0x911C, + WAIT_FAILED_APPLE = 0x911D; + + /** + * Accepted by the <type> parameter of LabelObjectEXT and + * GetObjectLabelEXT: + */ + public static final int GL_SYNC_OBJECT_APPLE = 0x8A53; + + private APPLESync() {} + + static native void initNativeStubs() throws LWJGLException; + + public static GLSync glFenceSyncAPPLE(int condition, int flags) { + GLSync __result = new GLSync(nglFenceSyncAPPLE(condition, flags)); + return __result; + } + static native long nglFenceSyncAPPLE(int condition, int flags); + + public static boolean glIsSyncAPPLE(GLSync sync) { + boolean __result = nglIsSyncAPPLE(sync.getPointer()); + return __result; + } + static native boolean nglIsSyncAPPLE(long sync); + + public static void glDeleteSyncAPPLE(GLSync sync) { + nglDeleteSyncAPPLE(sync.getPointer()); + } + static native void nglDeleteSyncAPPLE(long sync); + + public static int glClientWaitSyncAPPLE(GLSync sync, int flags, long timeout) { + int __result = nglClientWaitSyncAPPLE(sync.getPointer(), flags, timeout); + return __result; + } + static native int nglClientWaitSyncAPPLE(long sync, int flags, long timeout); + + public static void glWaitSyncAPPLE(GLSync sync, int flags, long timeout) { + nglWaitSyncAPPLE(sync.getPointer(), flags, timeout); + } + static native void nglWaitSyncAPPLE(long sync, int flags, long timeout); + + public static void glGetInteger64APPLE(int pname, LongBuffer params) { + BufferChecks.checkBuffer(params, 1); + nglGetInteger64vAPPLE(pname, MemoryUtil.getAddress(params)); + } + static native void nglGetInteger64vAPPLE(int pname, long params); + + /** Overloads glGetInteger64vAPPLE. */ + public static long glGetInteger64APPLE(int pname) { + LongBuffer params = APIUtil.getBufferLong(); + nglGetInteger64vAPPLE(pname, MemoryUtil.getAddress(params)); + return params.get(0); + } + + public static void glGetSyncAPPLE(GLSync sync, int pname, IntBuffer length, IntBuffer values) { + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkDirect(values); + nglGetSyncivAPPLE(sync.getPointer(), pname, values.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(values)); + } + static native void nglGetSyncivAPPLE(long sync, int pname, int values_bufSize, long length, long values); + + /** Overloads glGetSyncivAPPLE. */ + public static int glGetSynciAPPLE(GLSync sync, int pname) { + IntBuffer values = APIUtil.getBufferInt(); + nglGetSyncivAPPLE(sync.getPointer(), pname, 1, 0L, MemoryUtil.getAddress(values)); + return values.get(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/APPLETextureFormatBGRA8888.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/APPLETextureFormatBGRA8888.java new file mode 100644 index 0000000..0366de6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/APPLETextureFormatBGRA8888.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class APPLETextureFormatBGRA8888 { + + /** + * Accepted by the <format> parameters of TexImage2D and TexSubImage2D: + */ + public static final int GL_BGRA_EXT = 0x80E1; + + private APPLETextureFormatBGRA8888() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/APPLETextureMaxLevel.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/APPLETextureMaxLevel.java new file mode 100644 index 0000000..24f8bf9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/APPLETextureMaxLevel.java @@ -0,0 +1,17 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class APPLETextureMaxLevel { + + /** + * Accepted by the <pname> parameter of TexParameteri, TexParameterf, + * TexParameteriv, TexParameterfv, GetTexParameteriv, and GetTexParameterfv: + */ + public static final int GL_TEXTURE_MAX_LEVEL_APPLE = 0x813D; + + private APPLETextureMaxLevel() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/ARBDrawBuffers.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/ARBDrawBuffers.java new file mode 100644 index 0000000..629f612 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/ARBDrawBuffers.java @@ -0,0 +1,45 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBDrawBuffers { + + /** + * Accepted by the <pname> parameters of GetIntegerv, GetFloatv: + */ + public static final int GL_MAX_DRAW_BUFFERS_ARB = 0x8824, + GL_DRAW_BUFFER0_ARB = 0x8825, + GL_DRAW_BUFFER1_ARB = 0x8826, + GL_DRAW_BUFFER2_ARB = 0x8827, + GL_DRAW_BUFFER3_ARB = 0x8828, + GL_DRAW_BUFFER4_ARB = 0x8829, + GL_DRAW_BUFFER5_ARB = 0x882A, + GL_DRAW_BUFFER6_ARB = 0x882B, + GL_DRAW_BUFFER7_ARB = 0x882C, + GL_DRAW_BUFFER8_ARB = 0x882D, + GL_DRAW_BUFFER9_ARB = 0x882E, + GL_DRAW_BUFFER10_ARB = 0x882F, + GL_DRAW_BUFFER11_ARB = 0x8830, + GL_DRAW_BUFFER12_ARB = 0x8831, + GL_DRAW_BUFFER13_ARB = 0x8832, + GL_DRAW_BUFFER14_ARB = 0x8833, + GL_DRAW_BUFFER15_ARB = 0x8834; + + private ARBDrawBuffers() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glDrawBuffersARB(IntBuffer buffers) { + BufferChecks.checkDirect(buffers); + nglDrawBuffersARB(buffers.remaining(), MemoryUtil.getAddress(buffers)); + } + static native void nglDrawBuffersARB(int buffers_size, long buffers); + + /** Overloads glDrawBuffersARB. */ + public static void glDrawBuffersARB(int buffer) { + nglDrawBuffersARB(1, APIUtil.getInt(buffer)); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/ARBHalfFloatPixel.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/ARBHalfFloatPixel.java new file mode 100644 index 0000000..fcc2868 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/ARBHalfFloatPixel.java @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBHalfFloatPixel { + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, + * TexImage1D, TexImage2D, TexImage3D, GetTexImage, TexSubImage1D, + * TexSubImage2D, TexSubImage3D: + */ + public static final int GL_HALF_FLOAT_ARB = 0x140B; + + private ARBHalfFloatPixel() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/ARBTextureRectangle.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/ARBTextureRectangle.java new file mode 100644 index 0000000..d0a84a9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/ARBTextureRectangle.java @@ -0,0 +1,53 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARBTextureRectangle { + + /** + * Accepted by the <cap> parameter of Enable, Disable and IsEnabled; + * by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv + * and GetDoublev; and by the <target> parameter of BindTexture, + * GetTexParameterfv, GetTexParameteriv, TexParameterf, TexParameteri, + * TexParameterfv and TexParameteriv: + * Accepted by the <target> parameter of GetTexImage, + * GetTexLevelParameteriv, GetTexLevelParameterfv, TexImage2D, + * CopyTexImage2D, TexSubImage2D and CopySubTexImage2D: + */ + public static final int GL_TEXTURE_RECTANGLE_ARB = 0x84F5; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv and GetDoublev: + */ + public static final int GL_TEXTURE_BINDING_RECTANGLE_ARB = 0x84F6; + + /** + * Accepted by the <target> parameter of GetTexLevelParameteriv, + * GetTexLevelParameterfv, GetTexParameteriv and TexImage2D: + */ + public static final int GL_PROXY_TEXTURE_RECTANGLE_ARB = 0x84F7; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, + * GetIntegerv and GetFloatv: + */ + public static final int GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB = 0x84F8; + + /** + * Returned by <type> parameter of GetActiveUniform when the location + * <index> for program object <program> is of type sampler2DRect: + */ + public static final int GL_SAMPLER_2D_RECT_ARB = 0x8B63; + + /** + * Returned by <type> parameter of GetActiveUniform when the location + * <index> for program object <program> is of type sampler2DRectShadow: + */ + public static final int GL_SAMPLER_2D_RECT_SHADOW_ARB = 0x8B64; + + private ARBTextureRectangle() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/ARMMaliShaderBinary.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/ARMMaliShaderBinary.java new file mode 100644 index 0000000..4437657 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/ARMMaliShaderBinary.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARMMaliShaderBinary { + + /** + * Accepted by the <binaryFormat> parameter of ShaderBinary: + */ + public static final int GL_MALI_SHADER_BINARY_ARM = 0x8F60; + + private ARMMaliShaderBinary() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/ARMRgba8.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/ARMRgba8.java new file mode 100644 index 0000000..c2f36a2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/ARMRgba8.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class ARMRgba8 { + + /** + * Accepted by the <internalformat> parameter of RenderbufferStorage: + */ + public static final int GL_RGBA8_OES = 0x8058; + + private ARMRgba8() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/ContextCapabilities.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/ContextCapabilities.java new file mode 100644 index 0000000..75f7ad5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/ContextCapabilities.java @@ -0,0 +1,361 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; +import java.util.Set; +import java.util.HashSet; + +public class ContextCapabilities { + static final boolean DEBUG = false; + + private static boolean loaded_stubs; + public final boolean GL_AMD_compressed_3DC_texture; + public final boolean GL_AMD_compressed_ATC_texture; + public final boolean GL_AMD_performance_monitor; + public final boolean GL_AMD_program_binary_Z400; + public final boolean GL_ANGLE_framebuffer_blit; + public final boolean GL_ANGLE_framebuffer_multisample; + public final boolean GL_APPLE_framebuffer_multisample; + public final boolean GL_APPLE_rgb_422; + public final boolean GL_APPLE_sync; + public final boolean GL_APPLE_texture_format_BGRA8888; + public final boolean GL_APPLE_texture_max_level; + public final boolean GL_ARB_draw_buffers; + public final boolean GL_ARB_half_float_pixel; + public final boolean GL_ARB_texture_rectangle; + public final boolean GL_ARM_mali_shader_binary; + public final boolean GL_ARM_rgba8; + public final boolean GL_DMP_shader_binary; + public final boolean GL_EXT_Cg_shader; + public final boolean GL_EXT_bgra; + public final boolean GL_EXT_blend_minmax; + public final boolean GL_EXT_color_buffer_half_float; + public final boolean GL_EXT_copy_texture_levels; + public final boolean GL_EXT_debug_label; + public final boolean GL_EXT_debug_marker; + public final boolean GL_EXT_discard_framebuffer; + public final boolean GL_EXT_frag_depth; + public final boolean GL_EXT_map_buffer_range; + public final boolean GL_EXT_multi_draw_arrays; + public final boolean GL_EXT_multisampled_render_to_texture; + public final boolean GL_EXT_multiview_draw_buffers; + public final boolean GL_EXT_occlusion_query_boolean; + public final boolean GL_EXT_packed_float; + public final boolean GL_EXT_read_format_bgra; + public final boolean GL_EXT_robustness; + public final boolean GL_EXT_sRGB; + public final boolean GL_EXT_separate_shader_objects; + public final boolean GL_EXT_shader_framebuffer_fetch; + public final boolean GL_EXT_shader_texture_lod; + public final boolean GL_EXT_shadow_samplers; + public final boolean GL_EXT_texture_array; + public final boolean GL_EXT_texture_compression_dxt1; + public final boolean GL_EXT_texture_compression_latc; + public final boolean GL_EXT_texture_compression_s3tc; + public final boolean GL_EXT_texture_filter_anisotropic; + public final boolean GL_EXT_texture_format_BGRA8888; + public final boolean GL_EXT_texture_lod_bias; + public final boolean GL_EXT_texture_rg; + public final boolean GL_EXT_texture_storage; + public final boolean GL_EXT_texture_type_2_10_10_10_REV; + public final boolean GL_EXT_unpack_subimage; + public final boolean OpenGLES20; + public final boolean OpenGLES30; + public final boolean GL_IMG_multisampled_render_to_texture; + public final boolean GL_IMG_program_binary; + public final boolean GL_IMG_read_format; + public final boolean GL_IMG_shader_binary; + public final boolean GL_IMG_texture_compression_pvrtc; + public final boolean GL_KHR_debug; + public final boolean GL_KHR_texture_compression_astc_ldr; + public final boolean GL_NV_EGL_stream_consumer_external; + public final boolean GL_NV_coverage_sample; + public final boolean GL_NV_depth_nonlinear; + public final boolean GL_NV_draw_buffers; + public final boolean GL_NV_draw_path; + public final boolean GL_NV_draw_texture; + public final boolean GL_NV_fbo_color_attachments; + public final boolean GL_NV_fence; + public final boolean GL_NV_framebuffer_vertex_attrib_array; + public final boolean GL_NV_get_tex_image; + public final boolean GL_NV_platform_binary; + public final boolean GL_NV_read_buffer; + public final boolean GL_NV_read_depth_stencil; + public final boolean GL_NV_shader_framebuffer_fetch; + public final boolean GL_NV_system_time; + public final boolean GL_NV_texture_compression_s3tc_update; + public final boolean GL_NV_texture_npot_2D_mipmap; + public final boolean GL_OES_EGL_image; + public final boolean GL_OES_EGL_image_external; + public final boolean GL_OES_EGL_sync; + public final boolean GL_OES_blend_equation_separate; + public final boolean GL_OES_blend_func_separate; + public final boolean GL_OES_blend_subtract; + public final boolean GL_OES_compressed_ETC1_RGB8_texture; + public final boolean GL_OES_compressed_paletted_texture; + public final boolean GL_OES_depth24; + public final boolean GL_OES_depth32; + public final boolean GL_OES_depth_texture; + public final boolean GL_OES_element_index_uint; + public final boolean GL_OES_fbo_render_mipmap; + public final boolean GL_OES_framebuffer_object; + public final boolean GL_OES_get_program_binary; + public final boolean GL_OES_mapbuffer; + public final boolean GL_OES_packed_depth_stencil; + public final boolean GL_OES_required_internalformat; + public final boolean GL_OES_rgb8_rgba8; + public final boolean GL_OES_standard_derivatives; + public final boolean GL_OES_stencil1; + public final boolean GL_OES_stencil4; + public final boolean GL_OES_stencil8; + public final boolean GL_OES_surfaceless_context; + public final boolean GL_OES_texture_3D; + public final boolean GL_OES_texture_float; + public final boolean GL_OES_texture_float_linear; + public final boolean GL_OES_texture_half_float; + public final boolean GL_OES_texture_half_float_linear; + public final boolean GL_OES_texture_npot; + public final boolean GL_OES_vertex_array_object; + public final boolean GL_OES_vertex_half_float; + public final boolean GL_OES_vertex_type_10_10_10_2; + public final boolean GL_QCOM_binning_control; + public final boolean GL_QCOM_driver_control; + public final boolean GL_QCOM_extended_get; + public final boolean GL_QCOM_extended_get2; + public final boolean GL_QCOM_performance_monitor_global_mode; + public final boolean GL_QCOM_tiled_rendering; + public final boolean GL_QCOM_writeonly_rendering; + public final boolean GL_VIV_shader_binary; + + private Set initAllStubs() throws LWJGLException { + GLContext.setCapabilities(this); + Set supported_extensions = new HashSet(256); + GLContext.doInitNativeStubs(GLES20.class); + GLContext.getSupportedExtensions(supported_extensions); + if (loaded_stubs) + return supported_extensions; + GLContext.initNativeStubs(AMDPerformanceMonitor.class, supported_extensions, "GL_AMD_performance_monitor"); + GLContext.initNativeStubs(ANGLEFramebufferBlit.class, supported_extensions, "GL_ANGLE_framebuffer_blit"); + GLContext.initNativeStubs(ANGLEFramebufferMultisample.class, supported_extensions, "GL_ANGLE_framebuffer_multisample"); + GLContext.initNativeStubs(APPLEFramebufferMultisample.class, supported_extensions, "GL_APPLE_framebuffer_multisample"); + GLContext.initNativeStubs(APPLESync.class, supported_extensions, "GL_APPLE_sync"); + GLContext.initNativeStubs(ARBDrawBuffers.class, supported_extensions, "GL_ARB_draw_buffers"); + GLContext.initNativeStubs(EXTBlendMinmax.class, supported_extensions, "GL_EXT_blend_minmax"); + GLContext.initNativeStubs(EXTCopyTextureLevels.class, supported_extensions, "GL_EXT_copy_texture_levels"); + GLContext.initNativeStubs(EXTDebugLabel.class, supported_extensions, "GL_EXT_debug_label"); + GLContext.initNativeStubs(EXTDebugMarker.class, supported_extensions, "GL_EXT_debug_marker"); + GLContext.initNativeStubs(EXTDiscardFramebuffer.class, supported_extensions, "GL_EXT_discard_framebuffer"); + GLContext.initNativeStubs(EXTMapBufferRange.class, supported_extensions, "GL_EXT_map_buffer_range"); + GLContext.initNativeStubs(EXTMultiDrawArrays.class, supported_extensions, "GL_EXT_multi_draw_arrays"); + GLContext.initNativeStubs(EXTMultisampledRenderToTexture.class, supported_extensions, "GL_EXT_multisampled_render_to_texture"); + GLContext.initNativeStubs(EXTMultiviewDrawBuffers.class, supported_extensions, "GL_EXT_multiview_draw_buffers"); + GLContext.initNativeStubs(EXTOcclusionQueryBoolean.class, supported_extensions, "GL_EXT_occlusion_query_boolean"); + GLContext.initNativeStubs(EXTRobustness.class, supported_extensions, "GL_EXT_robustness"); + GLContext.initNativeStubs(EXTSeparateShaderObjects.class, supported_extensions, "GL_EXT_separate_shader_objects"); + GLContext.initNativeStubs(EXTTextureArray.class, supported_extensions, "GL_EXT_texture_array"); + GLContext.initNativeStubs(EXTTextureStorage.class, supported_extensions, "GL_EXT_texture_storage"); + GLContext.initNativeStubs(GLES30.class, supported_extensions, "OpenGLES30"); + GLContext.initNativeStubs(IMGMultisampledRenderToTexture.class, supported_extensions, "GL_IMG_multisampled_render_to_texture"); + GLContext.initNativeStubs(KHRDebug.class, supported_extensions, "GL_KHR_debug"); + GLContext.initNativeStubs(NVCoverageSample.class, supported_extensions, "GL_NV_coverage_sample"); + GLContext.initNativeStubs(NVDrawBuffers.class, supported_extensions, "GL_NV_draw_buffers"); + GLContext.initNativeStubs(NVDrawPath.class, supported_extensions, "GL_NV_draw_path"); + GLContext.initNativeStubs(NVDrawTexture.class, supported_extensions, "GL_NV_draw_texture"); + GLContext.initNativeStubs(NVFence.class, supported_extensions, "GL_NV_fence"); + GLContext.initNativeStubs(NVFramebufferVertexAttribArray.class, supported_extensions, "GL_NV_framebuffer_vertex_attrib_array"); + GLContext.initNativeStubs(NVGetTexImage.class, supported_extensions, "GL_NV_get_tex_image"); + GLContext.initNativeStubs(NVReadBuffer.class, supported_extensions, "GL_NV_read_buffer"); + GLContext.initNativeStubs(NVSystemTime.class, supported_extensions, "GL_NV_system_time"); + GLContext.initNativeStubs(OESEGLImage.class, supported_extensions, "GL_OES_EGL_image"); + GLContext.initNativeStubs(OESEGLImageExternal.class, supported_extensions, "GL_OES_EGL_image_external"); + GLContext.initNativeStubs(OESBlendEquationSeparate.class, supported_extensions, "GL_OES_blend_equation_separate"); + GLContext.initNativeStubs(OESBlendFuncSeparate.class, supported_extensions, "GL_OES_blend_func_separate"); + GLContext.initNativeStubs(OESBlendSubtract.class, supported_extensions, "GL_OES_blend_subtract"); + GLContext.initNativeStubs(OESFramebufferObject.class, supported_extensions, "GL_OES_framebuffer_object"); + GLContext.initNativeStubs(OESGetProgramBinary.class, supported_extensions, "GL_OES_get_program_binary"); + GLContext.initNativeStubs(OESMapbuffer.class, supported_extensions, "GL_OES_mapbuffer"); + GLContext.initNativeStubs(OESTexture3D.class, supported_extensions, "GL_OES_texture_3D"); + GLContext.initNativeStubs(OESVertexArrayObject.class, supported_extensions, "GL_OES_vertex_array_object"); + GLContext.initNativeStubs(QCOMDriverControl.class, supported_extensions, "GL_QCOM_driver_control"); + GLContext.initNativeStubs(QCOMExtendedGet.class, supported_extensions, "GL_QCOM_extended_get"); + GLContext.initNativeStubs(QCOMExtendedGet2.class, supported_extensions, "GL_QCOM_extended_get2"); + GLContext.initNativeStubs(QCOMTiledRendering.class, supported_extensions, "GL_QCOM_tiled_rendering"); + loaded_stubs = true; + return supported_extensions; + } + + static void unloadAllStubs() { + if (!loaded_stubs) + return; + GLContext.resetNativeStubs(AMDPerformanceMonitor.class); + GLContext.resetNativeStubs(ANGLEFramebufferBlit.class); + GLContext.resetNativeStubs(ANGLEFramebufferMultisample.class); + GLContext.resetNativeStubs(APPLEFramebufferMultisample.class); + GLContext.resetNativeStubs(APPLESync.class); + GLContext.resetNativeStubs(ARBDrawBuffers.class); + GLContext.resetNativeStubs(EXTBlendMinmax.class); + GLContext.resetNativeStubs(EXTCopyTextureLevels.class); + GLContext.resetNativeStubs(EXTDebugLabel.class); + GLContext.resetNativeStubs(EXTDebugMarker.class); + GLContext.resetNativeStubs(EXTDiscardFramebuffer.class); + GLContext.resetNativeStubs(EXTMapBufferRange.class); + GLContext.resetNativeStubs(EXTMultiDrawArrays.class); + GLContext.resetNativeStubs(EXTMultisampledRenderToTexture.class); + GLContext.resetNativeStubs(EXTMultiviewDrawBuffers.class); + GLContext.resetNativeStubs(EXTOcclusionQueryBoolean.class); + GLContext.resetNativeStubs(EXTRobustness.class); + GLContext.resetNativeStubs(EXTSeparateShaderObjects.class); + GLContext.resetNativeStubs(EXTTextureArray.class); + GLContext.resetNativeStubs(EXTTextureStorage.class); + GLContext.resetNativeStubs(IMGMultisampledRenderToTexture.class); + GLContext.resetNativeStubs(KHRDebug.class); + GLContext.resetNativeStubs(NVCoverageSample.class); + GLContext.resetNativeStubs(NVDrawBuffers.class); + GLContext.resetNativeStubs(NVDrawPath.class); + GLContext.resetNativeStubs(NVDrawTexture.class); + GLContext.resetNativeStubs(NVFence.class); + GLContext.resetNativeStubs(NVFramebufferVertexAttribArray.class); + GLContext.resetNativeStubs(NVGetTexImage.class); + GLContext.resetNativeStubs(NVReadBuffer.class); + GLContext.resetNativeStubs(NVSystemTime.class); + GLContext.resetNativeStubs(OESEGLImage.class); + GLContext.resetNativeStubs(OESEGLImageExternal.class); + GLContext.resetNativeStubs(OESBlendEquationSeparate.class); + GLContext.resetNativeStubs(OESBlendFuncSeparate.class); + GLContext.resetNativeStubs(OESBlendSubtract.class); + GLContext.resetNativeStubs(OESFramebufferObject.class); + GLContext.resetNativeStubs(OESGetProgramBinary.class); + GLContext.resetNativeStubs(OESMapbuffer.class); + GLContext.resetNativeStubs(OESTexture3D.class); + GLContext.resetNativeStubs(OESVertexArrayObject.class); + GLContext.resetNativeStubs(QCOMDriverControl.class); + GLContext.resetNativeStubs(QCOMExtendedGet.class); + GLContext.resetNativeStubs(QCOMExtendedGet2.class); + GLContext.resetNativeStubs(QCOMTiledRendering.class); + loaded_stubs = false; + } + + ContextCapabilities() throws LWJGLException { + Set supported_extensions = initAllStubs(); + this.GL_AMD_compressed_3DC_texture = supported_extensions.contains("GL_AMD_compressed_3DC_texture"); + this.GL_AMD_compressed_ATC_texture = supported_extensions.contains("GL_AMD_compressed_ATC_texture"); + this.GL_AMD_performance_monitor = supported_extensions.contains("GL_AMD_performance_monitor"); + this.GL_AMD_program_binary_Z400 = supported_extensions.contains("GL_AMD_program_binary_Z400"); + this.GL_ANGLE_framebuffer_blit = supported_extensions.contains("GL_ANGLE_framebuffer_blit"); + this.GL_ANGLE_framebuffer_multisample = supported_extensions.contains("GL_ANGLE_framebuffer_multisample"); + this.GL_APPLE_framebuffer_multisample = supported_extensions.contains("GL_APPLE_framebuffer_multisample"); + this.GL_APPLE_rgb_422 = supported_extensions.contains("GL_APPLE_rgb_422"); + this.GL_APPLE_sync = supported_extensions.contains("GL_APPLE_sync"); + this.GL_APPLE_texture_format_BGRA8888 = supported_extensions.contains("GL_APPLE_texture_format_BGRA8888"); + this.GL_APPLE_texture_max_level = supported_extensions.contains("GL_APPLE_texture_max_level"); + this.GL_ARB_draw_buffers = supported_extensions.contains("GL_ARB_draw_buffers"); + this.GL_ARB_half_float_pixel = supported_extensions.contains("GL_ARB_half_float_pixel"); + this.GL_ARB_texture_rectangle = supported_extensions.contains("GL_ARB_texture_rectangle"); + this.GL_ARM_mali_shader_binary = supported_extensions.contains("GL_ARM_mali_shader_binary"); + this.GL_ARM_rgba8 = supported_extensions.contains("GL_ARM_rgba8"); + this.GL_DMP_shader_binary = supported_extensions.contains("GL_DMP_shader_binary"); + this.GL_EXT_Cg_shader = supported_extensions.contains("GL_EXT_Cg_shader"); + this.GL_EXT_bgra = supported_extensions.contains("GL_EXT_bgra"); + this.GL_EXT_blend_minmax = supported_extensions.contains("GL_EXT_blend_minmax"); + this.GL_EXT_color_buffer_half_float = supported_extensions.contains("GL_EXT_color_buffer_half_float"); + this.GL_EXT_copy_texture_levels = supported_extensions.contains("GL_EXT_copy_texture_levels"); + this.GL_EXT_debug_label = supported_extensions.contains("GL_EXT_debug_label"); + this.GL_EXT_debug_marker = supported_extensions.contains("GL_EXT_debug_marker"); + this.GL_EXT_discard_framebuffer = supported_extensions.contains("GL_EXT_discard_framebuffer"); + this.GL_EXT_frag_depth = supported_extensions.contains("GL_EXT_frag_depth"); + this.GL_EXT_map_buffer_range = supported_extensions.contains("GL_EXT_map_buffer_range"); + this.GL_EXT_multi_draw_arrays = supported_extensions.contains("GL_EXT_multi_draw_arrays"); + this.GL_EXT_multisampled_render_to_texture = supported_extensions.contains("GL_EXT_multisampled_render_to_texture"); + this.GL_EXT_multiview_draw_buffers = supported_extensions.contains("GL_EXT_multiview_draw_buffers"); + this.GL_EXT_occlusion_query_boolean = supported_extensions.contains("GL_EXT_occlusion_query_boolean"); + this.GL_EXT_packed_float = supported_extensions.contains("GL_EXT_packed_float"); + this.GL_EXT_read_format_bgra = supported_extensions.contains("GL_EXT_read_format_bgra"); + this.GL_EXT_robustness = supported_extensions.contains("GL_EXT_robustness"); + this.GL_EXT_sRGB = supported_extensions.contains("GL_EXT_sRGB"); + this.GL_EXT_separate_shader_objects = supported_extensions.contains("GL_EXT_separate_shader_objects"); + this.GL_EXT_shader_framebuffer_fetch = supported_extensions.contains("GL_EXT_shader_framebuffer_fetch"); + this.GL_EXT_shader_texture_lod = supported_extensions.contains("GL_EXT_shader_texture_lod"); + this.GL_EXT_shadow_samplers = supported_extensions.contains("GL_EXT_shadow_samplers"); + this.GL_EXT_texture_array = supported_extensions.contains("GL_EXT_texture_array"); + this.GL_EXT_texture_compression_dxt1 = supported_extensions.contains("GL_EXT_texture_compression_dxt1"); + this.GL_EXT_texture_compression_latc = supported_extensions.contains("GL_EXT_texture_compression_latc"); + this.GL_EXT_texture_compression_s3tc = supported_extensions.contains("GL_EXT_texture_compression_s3tc"); + this.GL_EXT_texture_filter_anisotropic = supported_extensions.contains("GL_EXT_texture_filter_anisotropic"); + this.GL_EXT_texture_format_BGRA8888 = supported_extensions.contains("GL_EXT_texture_format_BGRA8888"); + this.GL_EXT_texture_lod_bias = supported_extensions.contains("GL_EXT_texture_lod_bias"); + this.GL_EXT_texture_rg = supported_extensions.contains("GL_EXT_texture_rg"); + this.GL_EXT_texture_storage = supported_extensions.contains("GL_EXT_texture_storage"); + this.GL_EXT_texture_type_2_10_10_10_REV = supported_extensions.contains("GL_EXT_texture_type_2_10_10_10_REV"); + this.GL_EXT_unpack_subimage = supported_extensions.contains("GL_EXT_unpack_subimage"); + this.OpenGLES20 = supported_extensions.contains("OpenGLES20"); + this.OpenGLES30 = supported_extensions.contains("OpenGLES30"); + this.GL_IMG_multisampled_render_to_texture = supported_extensions.contains("GL_IMG_multisampled_render_to_texture"); + this.GL_IMG_program_binary = supported_extensions.contains("GL_IMG_program_binary"); + this.GL_IMG_read_format = supported_extensions.contains("GL_IMG_read_format"); + this.GL_IMG_shader_binary = supported_extensions.contains("GL_IMG_shader_binary"); + this.GL_IMG_texture_compression_pvrtc = supported_extensions.contains("GL_IMG_texture_compression_pvrtc"); + this.GL_KHR_debug = supported_extensions.contains("GL_KHR_debug"); + this.GL_KHR_texture_compression_astc_ldr = supported_extensions.contains("GL_KHR_texture_compression_astc_ldr"); + this.GL_NV_EGL_stream_consumer_external = supported_extensions.contains("GL_NV_EGL_stream_consumer_external"); + this.GL_NV_coverage_sample = supported_extensions.contains("GL_NV_coverage_sample"); + this.GL_NV_depth_nonlinear = supported_extensions.contains("GL_NV_depth_nonlinear"); + this.GL_NV_draw_buffers = supported_extensions.contains("GL_NV_draw_buffers"); + this.GL_NV_draw_path = supported_extensions.contains("GL_NV_draw_path"); + this.GL_NV_draw_texture = supported_extensions.contains("GL_NV_draw_texture"); + this.GL_NV_fbo_color_attachments = supported_extensions.contains("GL_NV_fbo_color_attachments"); + this.GL_NV_fence = supported_extensions.contains("GL_NV_fence"); + this.GL_NV_framebuffer_vertex_attrib_array = supported_extensions.contains("GL_NV_framebuffer_vertex_attrib_array"); + this.GL_NV_get_tex_image = supported_extensions.contains("GL_NV_get_tex_image"); + this.GL_NV_platform_binary = supported_extensions.contains("GL_NV_platform_binary"); + this.GL_NV_read_buffer = supported_extensions.contains("GL_NV_read_buffer"); + this.GL_NV_read_depth_stencil = supported_extensions.contains("GL_NV_read_depth_stencil"); + this.GL_NV_shader_framebuffer_fetch = supported_extensions.contains("GL_NV_shader_framebuffer_fetch"); + this.GL_NV_system_time = supported_extensions.contains("GL_NV_system_time"); + this.GL_NV_texture_compression_s3tc_update = supported_extensions.contains("GL_NV_texture_compression_s3tc_update"); + this.GL_NV_texture_npot_2D_mipmap = supported_extensions.contains("GL_NV_texture_npot_2D_mipmap"); + this.GL_OES_EGL_image = supported_extensions.contains("GL_OES_EGL_image"); + this.GL_OES_EGL_image_external = supported_extensions.contains("GL_OES_EGL_image_external"); + this.GL_OES_EGL_sync = supported_extensions.contains("GL_OES_EGL_sync") + || supported_extensions.contains("GL_OES_egl_sync"); + this.GL_OES_blend_equation_separate = supported_extensions.contains("GL_OES_blend_equation_separate"); + this.GL_OES_blend_func_separate = supported_extensions.contains("GL_OES_blend_func_separate"); + this.GL_OES_blend_subtract = supported_extensions.contains("GL_OES_blend_subtract"); + this.GL_OES_compressed_ETC1_RGB8_texture = supported_extensions.contains("GL_OES_compressed_ETC1_RGB8_texture"); + this.GL_OES_compressed_paletted_texture = supported_extensions.contains("GL_OES_compressed_paletted_texture"); + this.GL_OES_depth24 = supported_extensions.contains("GL_OES_depth24"); + this.GL_OES_depth32 = supported_extensions.contains("GL_OES_depth32"); + this.GL_OES_depth_texture = supported_extensions.contains("GL_OES_depth_texture"); + this.GL_OES_element_index_uint = supported_extensions.contains("GL_OES_element_index_uint"); + this.GL_OES_fbo_render_mipmap = supported_extensions.contains("GL_OES_fbo_render_mipmap"); + this.GL_OES_framebuffer_object = supported_extensions.contains("GL_OES_framebuffer_object"); + this.GL_OES_get_program_binary = supported_extensions.contains("GL_OES_get_program_binary"); + this.GL_OES_mapbuffer = supported_extensions.contains("GL_OES_mapbuffer"); + this.GL_OES_packed_depth_stencil = supported_extensions.contains("GL_OES_packed_depth_stencil"); + this.GL_OES_required_internalformat = supported_extensions.contains("GL_OES_required_internalformat"); + this.GL_OES_rgb8_rgba8 = supported_extensions.contains("GL_OES_rgb8_rgba8"); + this.GL_OES_standard_derivatives = supported_extensions.contains("GL_OES_standard_derivatives"); + this.GL_OES_stencil1 = supported_extensions.contains("GL_OES_stencil1"); + this.GL_OES_stencil4 = supported_extensions.contains("GL_OES_stencil4"); + this.GL_OES_stencil8 = supported_extensions.contains("GL_OES_stencil8"); + this.GL_OES_surfaceless_context = supported_extensions.contains("GL_OES_surfaceless_context"); + this.GL_OES_texture_3D = supported_extensions.contains("GL_OES_texture_3D"); + this.GL_OES_texture_float = supported_extensions.contains("GL_OES_texture_float"); + this.GL_OES_texture_float_linear = supported_extensions.contains("GL_OES_texture_float_linear"); + this.GL_OES_texture_half_float = supported_extensions.contains("GL_OES_texture_half_float"); + this.GL_OES_texture_half_float_linear = supported_extensions.contains("GL_OES_texture_half_float_linear"); + this.GL_OES_texture_npot = supported_extensions.contains("GL_OES_texture_npot"); + this.GL_OES_vertex_array_object = supported_extensions.contains("GL_OES_vertex_array_object"); + this.GL_OES_vertex_half_float = supported_extensions.contains("GL_OES_vertex_half_float"); + this.GL_OES_vertex_type_10_10_10_2 = supported_extensions.contains("GL_OES_vertex_type_10_10_10_2"); + this.GL_QCOM_binning_control = supported_extensions.contains("GL_QCOM_binning_control"); + this.GL_QCOM_driver_control = supported_extensions.contains("GL_QCOM_driver_control"); + this.GL_QCOM_extended_get = supported_extensions.contains("GL_QCOM_extended_get"); + this.GL_QCOM_extended_get2 = supported_extensions.contains("GL_QCOM_extended_get2"); + this.GL_QCOM_performance_monitor_global_mode = supported_extensions.contains("GL_QCOM_performance_monitor_global_mode"); + this.GL_QCOM_tiled_rendering = supported_extensions.contains("GL_QCOM_tiled_rendering"); + this.GL_QCOM_writeonly_rendering = supported_extensions.contains("GL_QCOM_writeonly_rendering"); + this.GL_VIV_shader_binary = supported_extensions.contains("GL_VIV_shader_binary"); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/DMPShaderBinary.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/DMPShaderBinary.java new file mode 100644 index 0000000..6d84858 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/DMPShaderBinary.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class DMPShaderBinary { + + /** + * Accepted by the <binaryformat> parameter of ShaderBinary: + */ + public static final int GL_SHADER_BINARY_DMP = 0x9250; + + private DMPShaderBinary() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTBgra.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTBgra.java new file mode 100644 index 0000000..ecae565 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTBgra.java @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTBgra { + + /** + * Accepted by the <format> parameter of DrawPixels, GetTexImage, + * ReadPixels, TexImage1D, and TexImage2D: + */ + public static final int GL_BGR_EXT = 0x80E0, + GL_BGRA_EXT = 0x80E1; + + private EXTBgra() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTBlendMinmax.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTBlendMinmax.java new file mode 100644 index 0000000..8b2596e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTBlendMinmax.java @@ -0,0 +1,25 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTBlendMinmax { + + /** + * Accepted by the <mode> parameter of BlendEquationEXT: + */ + public static final int GL_FUNC_ADD_EXT = 0x8006, + GL_MIN_EXT = 0x8007, + GL_MAX_EXT = 0x8008; + + private EXTBlendMinmax() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glBlendEquationEXT(int mode) { + nglBlendEquationEXT(mode); + } + static native void nglBlendEquationEXT(int mode); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTCgShader.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTCgShader.java new file mode 100644 index 0000000..88ec842 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTCgShader.java @@ -0,0 +1,20 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTCgShader { + + /** + * You can pass GL_CG_VERTEX_SHADER_EXT to glCreateShader instead of GL_VERTEX_SHADER to create a vertex shader + * that will parse and compile its shader source with the Cg compiler front-end rather than the GLSL front-end. Likewise, you + * can pass GL_CG_FRAGMENT_SHADER_EXT to glCreateShader instead of GL_FRAGMENT_SHADER to create a fragment shader object + * that will parse and compile its shader source with the Cg front-end rather than the GLSL front-end. + */ + public static final int GL_CG_VERTEX_SHADER_EXT = 0x890E, + GL_CG_FRAGMENT_SHADER_EXT = 0x890F; + + private EXTCgShader() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTColorBufferHalfFloat.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTColorBufferHalfFloat.java new file mode 100644 index 0000000..abf9a64 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTColorBufferHalfFloat.java @@ -0,0 +1,30 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTColorBufferHalfFloat { + + /** + * Accepted by the <internalformat> parameter of RenderbufferStorage and + * RenderbufferStorageMultisampleAPPLE: + */ + public static final int GL_RGBA16F_EXT = 0x881A, + GL_RGB16F_EXT = 0x881B, + GL_RG16F_EXT = 0x822F, + GL_R16F_EXT = 0x822D; + + /** + * Accepted by the <pname> parameter of GetFramebufferAttachmentParameteriv: + */ + public static final int GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211; + + /** + * Returned in <params> by GetFramebufferAttachmentParameteriv: + */ + public static final int GL_UNSIGNED_NORMALIZED_EXT = 0x8C17; + + private EXTColorBufferHalfFloat() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTCopyTextureLevels.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTCopyTextureLevels.java new file mode 100644 index 0000000..65f4131 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTCopyTextureLevels.java @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTCopyTextureLevels { + + private EXTCopyTextureLevels() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glCopyTextureLevelsAPPLE(int destinationTexture, int sourceTexture, int sourceBaseLevel, int sourceLevelCount) { + nglCopyTextureLevelsAPPLE(destinationTexture, sourceTexture, sourceBaseLevel, sourceLevelCount); + } + static native void nglCopyTextureLevelsAPPLE(int destinationTexture, int sourceTexture, int sourceBaseLevel, int sourceLevelCount); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTDebugLabel.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTDebugLabel.java new file mode 100644 index 0000000..7cc3c4d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTDebugLabel.java @@ -0,0 +1,53 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTDebugLabel { + + /** + * Accepted by the <type> parameter of LabelObjectEXT and + * GetObjectLabelEXT: + */ + public static final int GL_BUFFER_OBJECT_EXT = 0x9151, + GL_SHADER_OBJECT_EXT = 0x8B48, + GL_PROGRAM_OBJECT_EXT = 0x8B40, + GL_VERTEX_ARRAY_OBJECT_EXT = 0x9154, + GL_QUERY_OBJECT_EXT = 0x9153, + GL_PROGRAM_PIPELINE_OBJECT_EXT = 0x8A4F; + + private EXTDebugLabel() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glLabelObjectEXT(int type, int object, ByteBuffer label) { + BufferChecks.checkDirect(label); + nglLabelObjectEXT(type, object, label.remaining(), MemoryUtil.getAddress(label)); + } + static native void nglLabelObjectEXT(int type, int object, int label_length, long label); + + /** Overloads glLabelObjectEXT. */ + public static void glLabelObjectEXT(int type, int object, CharSequence label) { + nglLabelObjectEXT(type, object, label.length(), APIUtil.getBuffer(label)); + } + + public static void glGetObjectLabelEXT(int type, int object, IntBuffer length, ByteBuffer label) { + if (length != null) + BufferChecks.checkBuffer(length, 1); + if (label != null) + BufferChecks.checkDirect(label); + nglGetObjectLabelEXT(type, object, (label == null ? 0 : label.remaining()), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddressSafe(label)); + } + static native void nglGetObjectLabelEXT(int type, int object, int label_bufSize, long length, long label); + + /** Overloads glGetObjectLabelEXT. */ + public static String glGetObjectLabelEXT(int type, int object, int bufSize) { + IntBuffer label_length = APIUtil.getLengths(); + ByteBuffer label = APIUtil.getBufferByte(bufSize); + nglGetObjectLabelEXT(type, object, bufSize, MemoryUtil.getAddress0(label_length), MemoryUtil.getAddress(label)); + label.limit(label_length.get(0)); + return APIUtil.getString(label); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTDebugMarker.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTDebugMarker.java new file mode 100644 index 0000000..3405368 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTDebugMarker.java @@ -0,0 +1,40 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTDebugMarker { + + private EXTDebugMarker() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glInsertEventMarkerEXT(ByteBuffer marker) { + BufferChecks.checkDirect(marker); + nglInsertEventMarkerEXT(marker.remaining(), MemoryUtil.getAddress(marker)); + } + static native void nglInsertEventMarkerEXT(int marker_length, long marker); + + /** Overloads glInsertEventMarkerEXT. */ + public static void glInsertEventMarkerEXT(CharSequence marker) { + nglInsertEventMarkerEXT(marker.length(), APIUtil.getBuffer(marker)); + } + + public static void glPushGroupMarkerEXT(ByteBuffer marker) { + BufferChecks.checkDirect(marker); + nglPushGroupMarkerEXT(marker.remaining(), MemoryUtil.getAddress(marker)); + } + static native void nglPushGroupMarkerEXT(int marker_length, long marker); + + /** Overloads glPushGroupMarkerEXT. */ + public static void glPushGroupMarkerEXT(CharSequence marker) { + nglPushGroupMarkerEXT(marker.length(), APIUtil.getBuffer(marker)); + } + + public static void glPopGroupMarkerEXT() { + nglPopGroupMarkerEXT(); + } + static native void nglPopGroupMarkerEXT(); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTDiscardFramebuffer.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTDiscardFramebuffer.java new file mode 100644 index 0000000..60c0d1e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTDiscardFramebuffer.java @@ -0,0 +1,27 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTDiscardFramebuffer { + + /** + * Accepted in the <attachments> parameter of DiscardFramebufferEXT when the + * default framebuffer is bound to <target>: + */ + public static final int GL_COLOR_EXT = 0x1800, + GL_DEPTH_EXT = 0x1801, + GL_STENCIL_EXT = 0x1802; + + private EXTDiscardFramebuffer() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glDiscardFramebufferEXT(int target, IntBuffer attachments) { + BufferChecks.checkDirect(attachments); + nglDiscardFramebufferEXT(target, attachments.remaining(), MemoryUtil.getAddress(attachments)); + } + static native void nglDiscardFramebufferEXT(int target, int attachments_numAttachments, long attachments); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTMapBufferRange.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTMapBufferRange.java new file mode 100644 index 0000000..4e80153 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTMapBufferRange.java @@ -0,0 +1,50 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTMapBufferRange { + + /** + * Accepted by the <access> parameter of MapBufferRangeEXT: + */ + public static final int GL_MAP_READ_BIT_EXT = 0x1, + GL_MAP_WRITE_BIT_EXT = 0x2, + GL_MAP_INVALIDATE_RANGE_BIT_EXT = 0x4, + GL_MAP_INVALIDATE_BUFFER_BIT_EXT = 0x8, + GL_MAP_FLUSH_EXPLICIT_BIT_EXT = 0x10, + GL_MAP_UNSYNCHRONIZED_BIT_EXT = 0x20; + + private EXTMapBufferRange() {} + + static native void initNativeStubs() throws LWJGLException; + + /** + * glMapBufferRange maps a GL buffer object range to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapBufferRange like this: + *

+ * ByteBuffer mapped_buffer; mapped_buffer = glMapBufferRange(..., ..., ..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBufferRange(..., ..., ..., ..., mapped_buffer); + *

+ * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + *

+ * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. + *

+ * @return A ByteBuffer representing the mapped buffer memory. + */ + public static ByteBuffer glMapBufferRangeEXT(int target, long offset, long length, int access, ByteBuffer old_buffer) { + if (old_buffer != null) + BufferChecks.checkDirect(old_buffer); + ByteBuffer __result = nglMapBufferRangeEXT(target, offset, length, access, old_buffer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + static native ByteBuffer nglMapBufferRangeEXT(int target, long offset, long length, int access, ByteBuffer old_buffer); + + public static void glFlushMappedBufferRangeEXT(int target, long offset, long length) { + nglFlushMappedBufferRangeEXT(target, offset, length); + } + static native void nglFlushMappedBufferRangeEXT(int target, long offset, long length); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTMultiDrawArrays.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTMultiDrawArrays.java new file mode 100644 index 0000000..3eae168 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTMultiDrawArrays.java @@ -0,0 +1,20 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTMultiDrawArrays { + + private EXTMultiDrawArrays() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glMultiDrawArraysEXT(int mode, IntBuffer first, IntBuffer count) { + BufferChecks.checkDirect(first); + BufferChecks.checkBuffer(count, first.remaining()); + nglMultiDrawArraysEXT(mode, MemoryUtil.getAddress(first), MemoryUtil.getAddress(count), first.remaining()); + } + static native void nglMultiDrawArraysEXT(int mode, long first, long count, int first_primcount); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTMultisampledRenderToTexture.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTMultisampledRenderToTexture.java new file mode 100644 index 0000000..ec6c99d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTMultisampledRenderToTexture.java @@ -0,0 +1,44 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTMultisampledRenderToTexture { + + /** + * Accepted by the <pname> parameter of GetRenderbufferParameteriv: + */ + public static final int GL_RENDERBUFFER_SAMPLES_EXT = 0x9133; + + /** + * Returned by CheckFramebufferStatus: + */ + public static final int GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT = 0x9134; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * and GetFloatv: + */ + public static final int GL_MAX_SAMPLES_EXT = 0x9135; + + /** + * Accepted by the <pname> parameter of GetFramebufferAttachmentParameteriv: + */ + public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT = 0x8D6C; + + private EXTMultisampledRenderToTexture() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glRenderbufferStorageMultisampleEXT(int target, int samples, int internalformat, int width, int height) { + nglRenderbufferStorageMultisampleEXT(target, samples, internalformat, width, height); + } + static native void nglRenderbufferStorageMultisampleEXT(int target, int samples, int internalformat, int width, int height); + + public static void glFramebufferTexture2DMultisampleEXT(int target, int attachment, int textarget, int texture, int level, int samples) { + nglFramebufferTexture2DMultisampleEXT(target, attachment, textarget, texture, level, samples); + } + static native void nglFramebufferTexture2DMultisampleEXT(int target, int attachment, int textarget, int texture, int level, int samples); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTMultiviewDrawBuffers.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTMultiviewDrawBuffers.java new file mode 100644 index 0000000..bbaadbd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTMultiviewDrawBuffers.java @@ -0,0 +1,55 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTMultiviewDrawBuffers { + + /** + * Accepted by the <location> parameter of DrawBuffersIndexedEXT: + */ + public static final int GL_COLOR_ATTACHMENT_EXT = 0x90F0, + GL_MULTIVIEW_EXT = 0x90F1; + + /** + * Accepted by the <target> parameter of GetIntegeri_EXT: + */ + public static final int GL_DRAW_BUFFER_EXT = 0xC01, + GL_READ_BUFFER_EXT = 0xC02; + + /** + * Accepted by the <target> parameter of GetInteger: + */ + public static final int GL_MAX_MULTIVIEW_BUFFERS_EXT = 0x90F2; + + private EXTMultiviewDrawBuffers() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glReadBufferIndexedEXT(int src, int index) { + nglReadBufferIndexedEXT(src, index); + } + static native void nglReadBufferIndexedEXT(int src, int index); + + public static void glDrawBuffersIndexedEXT(IntBuffer location, IntBuffer indices) { + BufferChecks.checkBuffer(location, indices.remaining()); + BufferChecks.checkDirect(indices); + nglDrawBuffersIndexedEXT(indices.remaining(), MemoryUtil.getAddress(location), MemoryUtil.getAddress(indices)); + } + static native void nglDrawBuffersIndexedEXT(int indices_n, long location, long indices); + + public static void glGetIntegerEXT(int target, int index, IntBuffer data) { + BufferChecks.checkBuffer(data, 4); + nglGetIntegeri_vEXT(target, index, MemoryUtil.getAddress(data)); + } + static native void nglGetIntegeri_vEXT(int target, int index, long data); + + /** Overloads glGetIntegeri_vEXT. */ + public static int glGetIntegerEXT(int value, int index) { + IntBuffer data = APIUtil.getBufferInt(); + nglGetIntegeri_vEXT(value, index, MemoryUtil.getAddress(data)); + return data.get(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTOcclusionQueryBoolean.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTOcclusionQueryBoolean.java new file mode 100644 index 0000000..b2c3c4c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTOcclusionQueryBoolean.java @@ -0,0 +1,98 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTOcclusionQueryBoolean { + + /** + * Accepted by the <target> parameter of BeginQueryEXT, EndQueryEXT, + * and GetQueryivEXT: + */ + public static final int GL_ANY_SAMPLES_PASSED_EXT = 0x8C2F, + GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT = 0x8D6A; + + /** + * Accepted by the <pname> parameter of GetQueryivEXT: + */ + public static final int GL_CURRENT_QUERY_EXT = 0x8865; + + /** + * Accepted by the <pname> parameter of GetQueryObjectivEXT and + * GetQueryObjectuivEXT: + */ + public static final int GL_QUERY_RESULT_EXT = 0x8866, + GL_QUERY_RESULT_AVAILABLE_EXT = 0x8867; + + private EXTOcclusionQueryBoolean() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glGenQueriesEXT(IntBuffer ids) { + BufferChecks.checkDirect(ids); + nglGenQueriesEXT(ids.remaining(), MemoryUtil.getAddress(ids)); + } + static native void nglGenQueriesEXT(int ids_n, long ids); + + /** Overloads glGenQueriesEXT. */ + public static int glGenQueriesEXT() { + IntBuffer ids = APIUtil.getBufferInt(); + nglGenQueriesEXT(1, MemoryUtil.getAddress(ids)); + return ids.get(0); + } + + public static void glDeleteQueriesEXT(IntBuffer ids) { + BufferChecks.checkDirect(ids); + nglDeleteQueriesEXT(ids.remaining(), MemoryUtil.getAddress(ids)); + } + static native void nglDeleteQueriesEXT(int ids_n, long ids); + + /** Overloads glDeleteQueriesEXT. */ + public static void glDeleteQueriesEXT(int id) { + nglDeleteQueriesEXT(1, APIUtil.getInt(id)); + } + + public static boolean glIsQueryEXT(int id) { + boolean __result = nglIsQueryEXT(id); + return __result; + } + static native boolean nglIsQueryEXT(int id); + + public static void glBeginQueryEXT(int target, int id) { + nglBeginQueryEXT(target, id); + } + static native void nglBeginQueryEXT(int target, int id); + + public static void glEndQueryEXT(int target) { + nglEndQueryEXT(target); + } + static native void nglEndQueryEXT(int target); + + public static void glGetQueryEXT(int target, int pname, IntBuffer params) { + BufferChecks.checkBuffer(params, 1); + nglGetQueryivEXT(target, pname, MemoryUtil.getAddress(params)); + } + static native void nglGetQueryivEXT(int target, int pname, long params); + + /** Overloads glGetQueryivEXT. */ + public static int glGetQueryiEXT(int target, int pname) { + IntBuffer params = APIUtil.getBufferInt(); + nglGetQueryivEXT(target, pname, MemoryUtil.getAddress(params)); + return params.get(0); + } + + public static void glGetQueryObjectuEXT(int id, int pname, IntBuffer params) { + BufferChecks.checkBuffer(params, 1); + nglGetQueryObjectuivEXT(id, pname, MemoryUtil.getAddress(params)); + } + static native void nglGetQueryObjectuivEXT(int id, int pname, long params); + + /** Overloads glGetQueryObjectuivEXT. */ + public static int glGetQueryObjectuiEXT(int id, int pname) { + IntBuffer params = APIUtil.getBufferInt(); + nglGetQueryObjectuivEXT(id, pname, MemoryUtil.getAddress(params)); + return params.get(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTPackedFloat.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTPackedFloat.java new file mode 100644 index 0000000..8a9a98d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTPackedFloat.java @@ -0,0 +1,30 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTPackedFloat { + + /** + * Accepted by the <internalformat> parameter of TexImage1D, + * TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and + * RenderbufferStorage: + */ + public static final int GL_R11F_G11F_B10F_EXT = 0x8C3A; + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, + * TexImage1D, TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, + * TexSubImage2D, TexSubImage3D: + */ + public static final int GL_UNSIGNED_INT_10F_11F_11F_REV_EXT = 0x8C3B; + + /** + * Accepted by the <pname> parameters of GetIntegerv and GetFloatv: + */ + public static final int GL_RGBA_SIGNED_COMPONENTS_EXT = 0x8C3C; + + private EXTPackedFloat() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTReadFormatBgra.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTReadFormatBgra.java new file mode 100644 index 0000000..e950ddd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTReadFormatBgra.java @@ -0,0 +1,22 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTReadFormatBgra { + + /** + * Accepted by the <format> parameter of ReadPixels: + */ + public static final int GL_BGRA_EXT = 0x80E1; + + /** + * Accepted by the <type> parameter of ReadPixels: + */ + public static final int GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT = 0x8365, + GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT = 0x8366; + + private EXTReadFormatBgra() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTRobustness.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTRobustness.java new file mode 100644 index 0000000..e046899 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTRobustness.java @@ -0,0 +1,71 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTRobustness { + + /** + * Returned by GetGraphicsResetStatusEXT: + */ + public static final int GL_NO_ERROR = 0x0, + GL_GUILTY_CONTEXT_RESET_EXT = 0x8253, + GL_INNOCENT_CONTEXT_RESET_EXT = 0x8254, + GL_UNKNOWN_CONTEXT_RESET_EXT = 0x8255; + + /** + * Accepted by the <value> parameter of GetBooleanv, GetIntegerv, + * and GetFloatv: + */ + public static final int GL_CONTEXT_ROBUST_ACCESS_EXT = 0x90F3, + GL_RESET_NOTIFICATION_STRATEGY_EXT = 0x8256; + + /** + * Returned by GetIntegerv and related simple queries when <value> is + * RESET_NOTIFICATION_STRATEGY_EXT : + */ + public static final int GL_LOSE_CONTEXT_ON_RESET_EXT = 0x8252, + GL_NO_RESET_NOTIFICATION_EXT = 0x8261; + + private EXTRobustness() {} + + static native void initNativeStubs() throws LWJGLException; + + public static int glGetGraphicsResetStatusEXT() { + int __result = nglGetGraphicsResetStatusEXT(); + return __result; + } + static native int nglGetGraphicsResetStatusEXT(); + + public static void glReadnPixelsEXT(int x, int y, int width, int height, int format, int type, ByteBuffer data) { + BufferChecks.checkDirect(data); + nglReadnPixelsEXT(x, y, width, height, format, type, data.remaining(), MemoryUtil.getAddress(data)); + } + public static void glReadnPixelsEXT(int x, int y, int width, int height, int format, int type, FloatBuffer data) { + BufferChecks.checkDirect(data); + nglReadnPixelsEXT(x, y, width, height, format, type, (data.remaining() << 2), MemoryUtil.getAddress(data)); + } + public static void glReadnPixelsEXT(int x, int y, int width, int height, int format, int type, IntBuffer data) { + BufferChecks.checkDirect(data); + nglReadnPixelsEXT(x, y, width, height, format, type, (data.remaining() << 2), MemoryUtil.getAddress(data)); + } + public static void glReadnPixelsEXT(int x, int y, int width, int height, int format, int type, ShortBuffer data) { + BufferChecks.checkDirect(data); + nglReadnPixelsEXT(x, y, width, height, format, type, (data.remaining() << 1), MemoryUtil.getAddress(data)); + } + static native void nglReadnPixelsEXT(int x, int y, int width, int height, int format, int type, int data_bufSize, long data); + + public static void glGetnUniformEXT(int program, int location, FloatBuffer params) { + BufferChecks.checkDirect(params); + nglGetnUniformfvEXT(program, location, params.remaining(), MemoryUtil.getAddress(params)); + } + static native void nglGetnUniformfvEXT(int program, int location, int params_bufSize, long params); + + public static void glGetnUniformEXT(int program, int location, IntBuffer params) { + BufferChecks.checkDirect(params); + nglGetnUniformivEXT(program, location, params.remaining(), MemoryUtil.getAddress(params)); + } + static native void nglGetnUniformivEXT(int program, int location, int params_bufSize, long params); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTSRGB.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTSRGB.java new file mode 100644 index 0000000..726c9e8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTSRGB.java @@ -0,0 +1,29 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTSRGB { + + /** + * Accepted by the <format> and <internalformat> parameter of TexImage2D, and + * TexImage3DOES. These are also accepted by <format> parameter of + * TexSubImage2D and TexSubImage3DOES: + */ + public static final int GL_SRGB_EXT = 0x8C40, + GL_SRGB_ALPHA_EXT = 0x8C42; + + /** + * Accepted by the <internalformat> parameter of RenderbufferStorage: + */ + public static final int GL_SRGB8_ALPHA8_EXT = 0x8C43; + + /** + * Accepted by the <pname> parameter of GetFramebufferAttachmentParameteriv: + */ + public static final int GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT = 0x8210; + + private EXTSRGB() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTSeparateShaderObjects.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTSeparateShaderObjects.java new file mode 100644 index 0000000..cae87cc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTSeparateShaderObjects.java @@ -0,0 +1,273 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTSeparateShaderObjects { + + /** + * Accepted by <stages> parameter to UseProgramStagesEXT: + */ + public static final int GL_VERTEX_SHADER_BIT_EXT = 0x1, + GL_FRAGMENT_SHADER_BIT_EXT = 0x2, + GL_ALL_SHADER_BITS_EXT = 0xFFFFFFFF; + + /** + * Accepted by the <pname> parameter of ProgramParameteriEXT and + * GetProgramiv: + */ + public static final int GL_PROGRAM_SEPARABLE_EXT = 0x8258; + + /** + * Accepted by <type> parameter to GetProgramPipelineivEXT: + */ + public static final int GL_ACTIVE_PROGRAM_EXT = 0x8259; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, and + * GetFloatv: + */ + public static final int GL_PROGRAM_PIPELINE_BINDING_EXT = 0x825A; + + private EXTSeparateShaderObjects() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glUseProgramStagesEXT(int pipeline, int stages, int program) { + nglUseProgramStagesEXT(pipeline, stages, program); + } + static native void nglUseProgramStagesEXT(int pipeline, int stages, int program); + + public static void glActiveShaderProgramEXT(int pipeline, int program) { + nglActiveShaderProgramEXT(pipeline, program); + } + static native void nglActiveShaderProgramEXT(int pipeline, int program); + + /** + * Single null-terminated source code string. + */ + public static int glCreateShaderProgramEXT(int type, ByteBuffer string) { + BufferChecks.checkDirect(string); + BufferChecks.checkNullTerminated(string); + int __result = nglCreateShaderProgramvEXT(type, 1, MemoryUtil.getAddress(string)); + return __result; + } + static native int nglCreateShaderProgramvEXT(int type, int count, long string); + + /** + * Overloads glCreateShaderProgramvEXT. + *

+ * Multiple null-terminated source code strings, one after the other. + */ + public static int glCreateShaderProgramEXT(int type, int count, ByteBuffer strings) { + BufferChecks.checkDirect(strings); + BufferChecks.checkNullTerminated(strings, count); + int __result = nglCreateShaderProgramvEXT2(type, count, MemoryUtil.getAddress(strings)); + return __result; + } + static native int nglCreateShaderProgramvEXT2(int type, int count, long strings); + + /** Overloads glCreateShaderProgramvEXT. */ + public static int glCreateShaderProgramEXT(int type, ByteBuffer[] strings) { + BufferChecks.checkArray(strings, 1); + int __result = nglCreateShaderProgramvEXT3(type, strings.length, strings); + return __result; + } + static native int nglCreateShaderProgramvEXT3(int type, int count, ByteBuffer[] strings); + + /** Overloads glCreateShaderProgramvEXT. */ + public static int glCreateShaderProgramEXT(int type, CharSequence string) { + int __result = nglCreateShaderProgramvEXT(type, 1, APIUtil.getBufferNT(string)); + return __result; + } + + /** Overloads glCreateShaderProgramvEXT. */ + public static int glCreateShaderProgramEXT(int type, CharSequence[] strings) { + BufferChecks.checkArray(strings); + int __result = nglCreateShaderProgramvEXT2(type, strings.length, APIUtil.getBufferNT(strings)); + return __result; + } + + public static void glBindProgramPipelineEXT(int pipeline) { + nglBindProgramPipelineEXT(pipeline); + } + static native void nglBindProgramPipelineEXT(int pipeline); + + public static void glDeleteProgramPipelinesEXT(IntBuffer pipelines) { + BufferChecks.checkDirect(pipelines); + nglDeleteProgramPipelinesEXT(pipelines.remaining(), MemoryUtil.getAddress(pipelines)); + } + static native void nglDeleteProgramPipelinesEXT(int pipelines_n, long pipelines); + + /** Overloads glDeleteProgramPipelinesEXT. */ + public static void glDeleteProgramPipelinesEXT(int pipeline) { + nglDeleteProgramPipelinesEXT(1, APIUtil.getInt(pipeline)); + } + + public static void glGenProgramPipelinesEXT(IntBuffer pipelines) { + BufferChecks.checkDirect(pipelines); + nglGenProgramPipelinesEXT(pipelines.remaining(), MemoryUtil.getAddress(pipelines)); + } + static native void nglGenProgramPipelinesEXT(int pipelines_n, long pipelines); + + /** Overloads glGenProgramPipelinesEXT. */ + public static int glGenProgramPipelinesEXT() { + IntBuffer pipelines = APIUtil.getBufferInt(); + nglGenProgramPipelinesEXT(1, MemoryUtil.getAddress(pipelines)); + return pipelines.get(0); + } + + public static boolean glIsProgramPipelineEXT(int pipeline) { + boolean __result = nglIsProgramPipelineEXT(pipeline); + return __result; + } + static native boolean nglIsProgramPipelineEXT(int pipeline); + + public static void glProgramParameteriEXT(int program, int pname, int value) { + nglProgramParameteriEXT(program, pname, value); + } + static native void nglProgramParameteriEXT(int program, int pname, int value); + + public static void glGetProgramPipelineEXT(int pipeline, int pname, IntBuffer params) { + BufferChecks.checkBuffer(params, 1); + nglGetProgramPipelineivEXT(pipeline, pname, MemoryUtil.getAddress(params)); + } + static native void nglGetProgramPipelineivEXT(int pipeline, int pname, long params); + + /** Overloads glGetProgramPipelineivEXT. */ + public static int glGetProgramPipelineiEXT(int pipeline, int pname) { + IntBuffer params = APIUtil.getBufferInt(); + nglGetProgramPipelineivEXT(pipeline, pname, MemoryUtil.getAddress(params)); + return params.get(0); + } + + public static void glProgramUniform1iEXT(int program, int location, int v0) { + nglProgramUniform1iEXT(program, location, v0); + } + static native void nglProgramUniform1iEXT(int program, int location, int v0); + + public static void glProgramUniform2iEXT(int program, int location, int v0, int v1) { + nglProgramUniform2iEXT(program, location, v0, v1); + } + static native void nglProgramUniform2iEXT(int program, int location, int v0, int v1); + + public static void glProgramUniform3iEXT(int program, int location, int v0, int v1, int v2) { + nglProgramUniform3iEXT(program, location, v0, v1, v2); + } + static native void nglProgramUniform3iEXT(int program, int location, int v0, int v1, int v2); + + public static void glProgramUniform4iEXT(int program, int location, int v0, int v1, int v2, int v3) { + nglProgramUniform4iEXT(program, location, v0, v1, v2, v3); + } + static native void nglProgramUniform4iEXT(int program, int location, int v0, int v1, int v2, int v3); + + public static void glProgramUniform1fEXT(int program, int location, float v0) { + nglProgramUniform1fEXT(program, location, v0); + } + static native void nglProgramUniform1fEXT(int program, int location, float v0); + + public static void glProgramUniform2fEXT(int program, int location, float v0, float v1) { + nglProgramUniform2fEXT(program, location, v0, v1); + } + static native void nglProgramUniform2fEXT(int program, int location, float v0, float v1); + + public static void glProgramUniform3fEXT(int program, int location, float v0, float v1, float v2) { + nglProgramUniform3fEXT(program, location, v0, v1, v2); + } + static native void nglProgramUniform3fEXT(int program, int location, float v0, float v1, float v2); + + public static void glProgramUniform4fEXT(int program, int location, float v0, float v1, float v2, float v3) { + nglProgramUniform4fEXT(program, location, v0, v1, v2, v3); + } + static native void nglProgramUniform4fEXT(int program, int location, float v0, float v1, float v2, float v3); + + public static void glProgramUniform1EXT(int program, int location, IntBuffer value) { + BufferChecks.checkDirect(value); + nglProgramUniform1ivEXT(program, location, value.remaining(), MemoryUtil.getAddress(value)); + } + static native void nglProgramUniform1ivEXT(int program, int location, int value_count, long value); + + public static void glProgramUniform2EXT(int program, int location, IntBuffer value) { + BufferChecks.checkDirect(value); + nglProgramUniform2ivEXT(program, location, value.remaining() >> 1, MemoryUtil.getAddress(value)); + } + static native void nglProgramUniform2ivEXT(int program, int location, int value_count, long value); + + public static void glProgramUniform3EXT(int program, int location, IntBuffer value) { + BufferChecks.checkDirect(value); + nglProgramUniform3ivEXT(program, location, value.remaining() / 3, MemoryUtil.getAddress(value)); + } + static native void nglProgramUniform3ivEXT(int program, int location, int value_count, long value); + + public static void glProgramUniform4EXT(int program, int location, IntBuffer value) { + BufferChecks.checkDirect(value); + nglProgramUniform4ivEXT(program, location, value.remaining() >> 2, MemoryUtil.getAddress(value)); + } + static native void nglProgramUniform4ivEXT(int program, int location, int value_count, long value); + + public static void glProgramUniform1EXT(int program, int location, FloatBuffer value) { + BufferChecks.checkDirect(value); + nglProgramUniform1fvEXT(program, location, value.remaining(), MemoryUtil.getAddress(value)); + } + static native void nglProgramUniform1fvEXT(int program, int location, int value_count, long value); + + public static void glProgramUniform2EXT(int program, int location, FloatBuffer value) { + BufferChecks.checkDirect(value); + nglProgramUniform2fvEXT(program, location, value.remaining() >> 1, MemoryUtil.getAddress(value)); + } + static native void nglProgramUniform2fvEXT(int program, int location, int value_count, long value); + + public static void glProgramUniform3EXT(int program, int location, FloatBuffer value) { + BufferChecks.checkDirect(value); + nglProgramUniform3fvEXT(program, location, value.remaining() / 3, MemoryUtil.getAddress(value)); + } + static native void nglProgramUniform3fvEXT(int program, int location, int value_count, long value); + + public static void glProgramUniform4EXT(int program, int location, FloatBuffer value) { + BufferChecks.checkDirect(value); + nglProgramUniform4fvEXT(program, location, value.remaining() >> 2, MemoryUtil.getAddress(value)); + } + static native void nglProgramUniform4fvEXT(int program, int location, int value_count, long value); + + public static void glProgramUniformMatrix2EXT(int program, int location, boolean transpose, FloatBuffer value) { + BufferChecks.checkDirect(value); + nglProgramUniformMatrix2fvEXT(program, location, value.remaining() >> 2, transpose, MemoryUtil.getAddress(value)); + } + static native void nglProgramUniformMatrix2fvEXT(int program, int location, int value_count, boolean transpose, long value); + + public static void glProgramUniformMatrix3EXT(int program, int location, boolean transpose, FloatBuffer value) { + BufferChecks.checkDirect(value); + nglProgramUniformMatrix3fvEXT(program, location, value.remaining() / (3 * 3), transpose, MemoryUtil.getAddress(value)); + } + static native void nglProgramUniformMatrix3fvEXT(int program, int location, int value_count, boolean transpose, long value); + + public static void glProgramUniformMatrix4EXT(int program, int location, boolean transpose, FloatBuffer value) { + BufferChecks.checkDirect(value); + nglProgramUniformMatrix4fvEXT(program, location, value.remaining() >> 4, transpose, MemoryUtil.getAddress(value)); + } + static native void nglProgramUniformMatrix4fvEXT(int program, int location, int value_count, boolean transpose, long value); + + public static void glValidateProgramPipelineEXT(int pipeline) { + nglValidateProgramPipelineEXT(pipeline); + } + static native void nglValidateProgramPipelineEXT(int pipeline); + + public static void glGetProgramPipelineInfoLogEXT(int pipeline, IntBuffer length, ByteBuffer infoLog) { + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkDirect(infoLog); + nglGetProgramPipelineInfoLogEXT(pipeline, infoLog.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(infoLog)); + } + static native void nglGetProgramPipelineInfoLogEXT(int pipeline, int infoLog_bufSize, long length, long infoLog); + + /** Overloads glGetProgramPipelineInfoLogEXT. */ + public static String glGetProgramPipelineInfoLogEXT(int pipeline, int bufSize) { + IntBuffer infoLog_length = APIUtil.getLengths(); + ByteBuffer infoLog = APIUtil.getBufferByte(bufSize); + nglGetProgramPipelineInfoLogEXT(pipeline, bufSize, MemoryUtil.getAddress0(infoLog_length), MemoryUtil.getAddress(infoLog)); + infoLog.limit(infoLog_length.get(0)); + return APIUtil.getString(infoLog); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTShaderFramebufferFetch.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTShaderFramebufferFetch.java new file mode 100644 index 0000000..256c072 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTShaderFramebufferFetch.java @@ -0,0 +1,17 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTShaderFramebufferFetch { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT = 0x8A52; + + private EXTShaderFramebufferFetch() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTShadowSamplers.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTShadowSamplers.java new file mode 100644 index 0000000..06be7de --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTShadowSamplers.java @@ -0,0 +1,25 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTShadowSamplers { + + /** + * Accepted by the <pname> parameter of TexParameterf, TexParameteri, + * TexParameterfv, TexParameteriv, GetTexParameterfv, and GetTexParameteriv: + */ + public static final int GL_TEXTURE_COMPARE_MODE_EXT = 0x884C, + GL_TEXTURE_COMPARE_FUNC_EXT = 0x884D; + + /** + * Accepted by the <param> parameter of TexParameterf, TexParameteri, + * TexParameterfv, and TexParameteriv when the <pname> parameter is + * TEXTURE_COMPARE_MODE_EXT: + */ + public static final int GL_COMPARE_REF_TO_TEXTURE_EXT = 0x884E; + + private EXTShadowSamplers() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureArray.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureArray.java new file mode 100644 index 0000000..75808ee --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureArray.java @@ -0,0 +1,58 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTTextureArray { + + /** + * Accepted by the <target> parameter of TexParameteri, TexParameteriv, + * TexParameterf, TexParameterfv, and BindTexture: + */ + public static final int GL_TEXTURE_1D_ARRAY_EXT = 0x8C18, + GL_TEXTURE_2D_ARRAY_EXT = 0x8C1A; + + /** + * Accepted by the <target> parameter of TexImage3D, TexSubImage3D, + * CopyTexSubImage3D, CompressedTexImage3D, and CompressedTexSubImage3D: + */ + public static final int GL_PROXY_TEXTURE_2D_ARRAY_EXT = 0x8C1B; + + /** + * Accepted by the <target> parameter of TexImage2D, TexSubImage2D, + * CopyTexImage2D, CopyTexSubImage2D, CompressedTexImage2D, and + * CompressedTexSubImage2D: + */ + public static final int GL_PROXY_TEXTURE_1D_ARRAY_EXT = 0x8C19; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv + * and GetFloatv: + */ + public static final int GL_TEXTURE_BINDING_1D_ARRAY_EXT = 0x8C1C, + GL_TEXTURE_BINDING_2D_ARRAY_EXT = 0x8C1D, + GL_MAX_ARRAY_TEXTURE_LAYERS_EXT = 0x88FF; + + /** + * Accepted by the <pname> parameter of + * GetFramebufferAttachmentParameterivEXT: + */ + public static final int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT = 0x8CD4; + + /** + * Returned by the <type> parameter of GetActiveUniform: + */ + public static final int GL_SAMPLER_1D_ARRAY_EXT = 0x8DC0, + GL_SAMPLER_2D_ARRAY_EXT = 0x8DC1; + + private EXTTextureArray() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glFramebufferTextureLayerEXT(int target, int attachment, int texture, int level, int layer) { + nglFramebufferTextureLayerEXT(target, attachment, texture, level, layer); + } + static native void nglFramebufferTextureLayerEXT(int target, int attachment, int texture, int level, int layer); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureCompressionDXT1.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureCompressionDXT1.java new file mode 100644 index 0000000..c151d0b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureCompressionDXT1.java @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTTextureCompressionDXT1 { + + /** + * Accepted by the <internalformat> parameter of CompressedTexImage2D + * and the <format> parameter of CompressedTexSubImage2D: + */ + public static final int GL_COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0, + GL_COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1; + + private EXTTextureCompressionDXT1() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureCompressionLATC.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureCompressionLATC.java new file mode 100644 index 0000000..4494197 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureCompressionLATC.java @@ -0,0 +1,21 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTTextureCompressionLATC { + + /** + * Accepted by the <internalformat> parameter of TexImage2D, + * CopyTexImage2D, and CompressedTexImage2D and the <format> parameter + * of CompressedTexSubImage2D: + */ + public static final int GL_COMPRESSED_LUMINANCE_LATC1_EXT = 0x8C70, + GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT = 0x8C71, + GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT = 0x8C72, + GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT = 0x8C73; + + private EXTTextureCompressionLATC() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureCompressionS3TC.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureCompressionS3TC.java new file mode 100644 index 0000000..43fcb33 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureCompressionS3TC.java @@ -0,0 +1,21 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTTextureCompressionS3TC { + + /** + * Accepted by the <internalformat> parameter of TexImage2D, CopyTexImage2D, + * and CompressedTexImage2D and the <format> parameter of + * CompressedTexSubImage2D: + */ + public static final int GL_COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0, + GL_COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1, + GL_COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2, + GL_COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3; + + private EXTTextureCompressionS3TC() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureFilterAnisotropic.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureFilterAnisotropic.java new file mode 100644 index 0000000..5003993 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureFilterAnisotropic.java @@ -0,0 +1,24 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTTextureFilterAnisotropic { + + /** + * Accepted by the <pname> parameters of GetTexParameterfv, + * GetTexParameteriv, TexParameterf, TexParameterfv, TexParameteri, + * and TexParameteriv: + */ + public static final int GL_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE; + + /** + * Accepted by the <pname> parameters of GetBooleanv, + * GetFloatv, and GetIntegerv: + */ + public static final int GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF; + + private EXTTextureFilterAnisotropic() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureFormatBGRA8888.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureFormatBGRA8888.java new file mode 100644 index 0000000..90e5fab --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureFormatBGRA8888.java @@ -0,0 +1,17 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTTextureFormatBGRA8888 { + + /** + * Accepted by the <format> and <internalformat> parameters of TexImage2D + * and the <format> parameter of TexSubImage2D: + */ + public static final int GL_BGRA_EXT = 0x80E1; + + private EXTTextureFormatBGRA8888() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureLODBias.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureLODBias.java new file mode 100644 index 0000000..127e326 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureLODBias.java @@ -0,0 +1,30 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTTextureLODBias { + + /** + * Accepted by the <target> parameters of GetTexEnvfv, GetTexEnviv, + * TexEnvi, TexEnvf, Texenviv, and TexEnvfv: + */ + public static final int GL_TEXTURE_FILTER_CONTROL_EXT = 0x8500; + + /** + * When the <target> parameter of GetTexEnvfv, GetTexEnviv, TexEnvi, + * TexEnvf, TexEnviv, and TexEnvfv is TEXTURE_FILTER_CONTROL_EXT, then + * the value of <pname> may be: + */ + public static final int GL_TEXTURE_LOD_BIAS_EXT = 0x8501; + + /** + * Accepted by the <pname> parameters of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_MAX_TEXTURE_LOD_BIAS_EXT = 0x84FD; + + private EXTTextureLODBias() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureRg.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureRg.java new file mode 100644 index 0000000..80c0dfe --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureRg.java @@ -0,0 +1,25 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTTextureRg { + + /** + * Accepted by the <internalformat> parameter of TexImage2D and CopyTexImage2D, + * and the <format> parameter of TexImage2D, TexSubImage2D, and ReadPixels: + */ + public static final int GL_RED_EXT = 0x1903, + GL_RG_EXT = 0x8227; + + /** + * Accepted by the <internalformat> parameter of RenderbufferStorage and + * RenderbufferStorageMultisampleAPPLE: + */ + public static final int GL_R8_EXT = 0x8229, + GL_RG8_EXT = 0x822B; + + private EXTTextureRg() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureStorage.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureStorage.java new file mode 100644 index 0000000..98d0e31 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureStorage.java @@ -0,0 +1,69 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTTextureStorage { + + /** + * Accepted by the <value> parameter of GetTexParameter{if}v: + */ + public static final int GL_TEXTURE_IMMUTABLE_FORMAT_EXT = 0x912F; + + /** + * Accepted by the <internalformat> parameter of TexStorage* when + * implemented on OpenGL ES: + */ + public static final int GL_ALPHA8_EXT = 0x803C, + GL_LUMINANCE8_EXT = 0x8040, + GL_LUMINANCE8_ALPHA8_EXT = 0x8045, + GL_RGBA32F_EXT = 0x8814, + GL_RGB32F_EXT = 0x8815, + GL_ALPHA32F_EXT = 0x8816, + GL_LUMINANCE32F_EXT = 0x8818, + GL_LUMINANCE_ALPHA32F_EXT = 0x8819, + GL_RGBA16F_EXT = 0x881A, + GL_RGB16F_EXT = 0x881B, + GL_ALPHA16F_EXT = 0x881C, + GL_LUMINANCE16F_EXT = 0x881E, + GL_LUMINANCE_ALPHA16F_EXT = 0x881F, + GL_RGB10_A2_EXT = 0x8059, + GL_RGB10_EXT = 0x8052, + GL_BGRA8_EXT = 0x93A1; + + private EXTTextureStorage() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glTexStorage1DEXT(int target, int levels, int internalformat, int width) { + nglTexStorage1DEXT(target, levels, internalformat, width); + } + static native void nglTexStorage1DEXT(int target, int levels, int internalformat, int width); + + public static void glTexStorage2DEXT(int target, int levels, int internalformat, int width, int height) { + nglTexStorage2DEXT(target, levels, internalformat, width, height); + } + static native void nglTexStorage2DEXT(int target, int levels, int internalformat, int width, int height); + + public static void glTexStorage3DEXT(int target, int levels, int internalformat, int width, int height, int depth) { + nglTexStorage3DEXT(target, levels, internalformat, width, height, depth); + } + static native void nglTexStorage3DEXT(int target, int levels, int internalformat, int width, int height, int depth); + + public static void glTextureStorage1DEXT(int texture, int target, int levels, int internalformat, int width) { + nglTextureStorage1DEXT(texture, target, levels, internalformat, width); + } + static native void nglTextureStorage1DEXT(int texture, int target, int levels, int internalformat, int width); + + public static void glTextureStorage2DEXT(int texture, int target, int levels, int internalformat, int width, int height) { + nglTextureStorage2DEXT(texture, target, levels, internalformat, width, height); + } + static native void nglTextureStorage2DEXT(int texture, int target, int levels, int internalformat, int width, int height); + + public static void glTextureStorage3DEXT(int texture, int target, int levels, int internalformat, int width, int height, int depth) { + nglTextureStorage3DEXT(texture, target, levels, internalformat, width, height, depth); + } + static native void nglTextureStorage3DEXT(int texture, int target, int levels, int internalformat, int width, int height, int depth); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureType2101010REV.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureType2101010REV.java new file mode 100644 index 0000000..1c34c05 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTTextureType2101010REV.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTTextureType2101010REV { + + /** + * Accepted by the <type> parameter of TexImage2D and TexImage3D: + */ + public static final int GL_UNSIGNED_INT_2_10_10_10_REV_EXT = 0x8368; + + private EXTTextureType2101010REV() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTUnpackSubimage.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTUnpackSubimage.java new file mode 100644 index 0000000..0192127 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/EXTUnpackSubimage.java @@ -0,0 +1,19 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class EXTUnpackSubimage { + + /** + * Accepted by the <pname> parameters of PixelStorei, GetIntegerv, and + * GetFloatv: + */ + public static final int GL_UNPACK_ROW_LENGTH = 0xCF2, + GL_UNPACK_SKIP_ROWS = 0xCF3, + GL_UNPACK_SKIP_PIXELS = 0xCF4; + + private EXTUnpackSubimage() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/GLES20.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/GLES20.java new file mode 100644 index 0000000..876bdca --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/GLES20.java @@ -0,0 +1,1715 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class GLES20 { + + /** + * ClearBufferMask + */ + public static final int GL_DEPTH_BUFFER_BIT = 0x100, + GL_STENCIL_BUFFER_BIT = 0x400, + GL_COLOR_BUFFER_BIT = 0x4000; + + /** + * Boolean + */ + public static final int GL_FALSE = 0x0, + GL_TRUE = 0x1; + + /** + * BeginMode + */ + public static final int GL_POINTS = 0x0, + GL_LINES = 0x1, + GL_LINE_LOOP = 0x2, + GL_LINE_STRIP = 0x3, + GL_TRIANGLES = 0x4, + GL_TRIANGLE_STRIP = 0x5, + GL_TRIANGLE_FAN = 0x6; + + /** + * BlendingFactorDest + */ + public static final int GL_ZERO = 0x0, + GL_ONE = 0x1, + GL_SRC_COLOR = 0x300, + GL_ONE_MINUS_SRC_COLOR = 0x301, + GL_SRC_ALPHA = 0x302, + GL_ONE_MINUS_SRC_ALPHA = 0x303, + GL_DST_ALPHA = 0x304, + GL_ONE_MINUS_DST_ALPHA = 0x305; + + /** + * BlendingFactorSrc + */ + public static final int GL_DST_COLOR = 0x306, + GL_ONE_MINUS_DST_COLOR = 0x307, + GL_SRC_ALPHA_SATURATE = 0x308; + + /** + * BlendEquationSeparate + */ + public static final int GL_FUNC_ADD = 0x8006, + GL_BLEND_EQUATION = 0x8009, + GL_BLEND_EQUATION_RGB = 0x8009, + GL_BLEND_EQUATION_ALPHA = 0x883D; + + /** + * BlendSubtract + */ + public static final int GL_FUNC_SUBTRACT = 0x800A, + GL_FUNC_REVERSE_SUBTRACT = 0x800B; + + /** + * Separate Blend Functions + */ + public static final int GL_BLEND_DST_RGB = 0x80C8, + GL_BLEND_SRC_RGB = 0x80C9, + GL_BLEND_DST_ALPHA = 0x80CA, + GL_BLEND_SRC_ALPHA = 0x80CB, + GL_CONSTANT_COLOR = 0x8001, + GL_ONE_MINUS_CONSTANT_COLOR = 0x8002, + GL_CONSTANT_ALPHA = 0x8003, + GL_ONE_MINUS_CONSTANT_ALPHA = 0x8004, + GL_BLEND_COLOR = 0x8005; + + /** + * Buffer Objects + */ + public static final int GL_ARRAY_BUFFER = 0x8892, + GL_ELEMENT_ARRAY_BUFFER = 0x8893, + GL_ARRAY_BUFFER_BINDING = 0x8894, + GL_ELEMENT_ARRAY_BUFFER_BINDING = 0x8895, + GL_STREAM_DRAW = 0x88E0, + GL_STATIC_DRAW = 0x88E4, + GL_DYNAMIC_DRAW = 0x88E8, + GL_BUFFER_SIZE = 0x8764, + GL_BUFFER_USAGE = 0x8765, + GL_CURRENT_VERTEX_ATTRIB = 0x8626; + + /** + * CullFaceMode + */ + public static final int GL_FRONT = 0x404, + GL_BACK = 0x405, + GL_FRONT_AND_BACK = 0x408; + + /** + * EnableCap + */ + public static final int GL_TEXTURE_2D = 0xDE1, + GL_CULL_FACE = 0xB44, + GL_BLEND = 0xBE2, + GL_DITHER = 0xBD0, + GL_STENCIL_TEST = 0xB90, + GL_DEPTH_TEST = 0xB71, + GL_SCISSOR_TEST = 0xC11, + GL_POLYGON_OFFSET_FILL = 0x8037, + GL_SAMPLE_ALPHA_TO_COVERAGE = 0x809E, + GL_SAMPLE_COVERAGE = 0x80A0; + + /** + * ErrorCode + */ + public static final int GL_NO_ERROR = 0x0, + GL_INVALID_ENUM = 0x500, + GL_INVALID_VALUE = 0x501, + GL_INVALID_OPERATION = 0x502, + GL_OUT_OF_MEMORY = 0x505; + + /** + * FrontFaceDirection + */ + public static final int GL_CW = 0x900, + GL_CCW = 0x901; + + /** + * GetPName + */ + public static final int GL_LINE_WIDTH = 0xB21, + GL_ALIASED_POINT_SIZE_RANGE = 0x846D, + GL_ALIASED_LINE_WIDTH_RANGE = 0x846E, + GL_CULL_FACE_MODE = 0xB45, + GL_FRONT_FACE = 0xB46, + GL_DEPTH_RANGE = 0xB70, + GL_DEPTH_WRITEMASK = 0xB72, + GL_DEPTH_CLEAR_VALUE = 0xB73, + GL_DEPTH_FUNC = 0xB74, + GL_STENCIL_CLEAR_VALUE = 0xB91, + GL_STENCIL_FUNC = 0xB92, + GL_STENCIL_FAIL = 0xB94, + GL_STENCIL_PASS_DEPTH_FAIL = 0xB95, + GL_STENCIL_PASS_DEPTH_PASS = 0xB96, + GL_STENCIL_REF = 0xB97, + GL_STENCIL_VALUE_MASK = 0xB93, + GL_STENCIL_WRITEMASK = 0xB98, + GL_STENCIL_BACK_FUNC = 0x8800, + GL_STENCIL_BACK_FAIL = 0x8801, + GL_STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802, + GL_STENCIL_BACK_PASS_DEPTH_PASS = 0x8803, + GL_STENCIL_BACK_REF = 0x8CA3, + GL_STENCIL_BACK_VALUE_MASK = 0x8CA4, + GL_STENCIL_BACK_WRITEMASK = 0x8CA5, + GL_VIEWPORT = 0xBA2, + GL_SCISSOR_BOX = 0xC10, + GL_COLOR_CLEAR_VALUE = 0xC22, + GL_COLOR_WRITEMASK = 0xC23, + GL_UNPACK_ALIGNMENT = 0xCF5, + GL_PACK_ALIGNMENT = 0xD05, + GL_MAX_TEXTURE_SIZE = 0xD33, + GL_MAX_VIEWPORT_DIMS = 0xD3A, + GL_SUBPIXEL_BITS = 0xD50, + GL_RED_BITS = 0xD52, + GL_GREEN_BITS = 0xD53, + GL_BLUE_BITS = 0xD54, + GL_ALPHA_BITS = 0xD55, + GL_DEPTH_BITS = 0xD56, + GL_STENCIL_BITS = 0xD57, + GL_POLYGON_OFFSET_UNITS = 0x2A00, + GL_POLYGON_OFFSET_FACTOR = 0x8038, + GL_TEXTURE_BINDING_2D = 0x8069, + GL_SAMPLE_BUFFERS = 0x80A8, + GL_SAMPLES = 0x80A9, + GL_SAMPLE_COVERAGE_VALUE = 0x80AA, + GL_SAMPLE_COVERAGE_INVERT = 0x80AB; + + /** + * GetTextureParameter + */ + public static final int GL_NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2, + GL_COMPRESSED_TEXTURE_FORMATS = 0x86A3; + + /** + * HintMode + */ + public static final int GL_DONT_CARE = 0x1100, + GL_FASTEST = 0x1101, + GL_NICEST = 0x1102; + + /** + * HintTarget + */ + public static final int GL_GENERATE_MIPMAP_HINT = 0x8192; + + /** + * DataType + */ + public static final int GL_BYTE = 0x1400, + GL_UNSIGNED_BYTE = 0x1401, + GL_SHORT = 0x1402, + GL_UNSIGNED_SHORT = 0x1403, + GL_INT = 0x1404, + GL_UNSIGNED_INT = 0x1405, + GL_FLOAT = 0x1406, + GL_FIXED = 0x140C; + + /** + * PixelFormat + */ + public static final int GL_DEPTH_COMPONENT = 0x1902, + GL_ALPHA = 0x1906, + GL_RGB = 0x1907, + GL_RGBA = 0x1908, + GL_LUMINANCE = 0x1909, + GL_LUMINANCE_ALPHA = 0x190A; + + /** + * PixelType + */ + public static final int GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033, + GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034, + GL_UNSIGNED_SHORT_5_6_5 = 0x8363; + + /** + * Shaders + */ + public static final int GL_FRAGMENT_SHADER = 0x8B30, + GL_VERTEX_SHADER = 0x8B31, + GL_MAX_VERTEX_ATTRIBS = 0x8869, + GL_MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB, + GL_MAX_VARYING_VECTORS = 0x8DFC, + GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D, + GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C, + GL_MAX_TEXTURE_IMAGE_UNITS = 0x8872, + GL_MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD, + GL_SHADER_TYPE = 0x8B4F, + GL_DELETE_STATUS = 0x8B80, + GL_LINK_STATUS = 0x8B82, + GL_VALIDATE_STATUS = 0x8B83, + GL_ATTACHED_SHADERS = 0x8B85, + GL_ACTIVE_UNIFORMS = 0x8B86, + GL_ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87, + GL_ACTIVE_ATTRIBUTES = 0x8B89, + GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A, + GL_SHADING_LANGUAGE_VERSION = 0x8B8C, + GL_CURRENT_PROGRAM = 0x8B8D; + + /** + * StencilFunction + */ + public static final int GL_NEVER = 0x200, + GL_LESS = 0x201, + GL_EQUAL = 0x202, + GL_LEQUAL = 0x203, + GL_GREATER = 0x204, + GL_NOTEQUAL = 0x205, + GL_GEQUAL = 0x206, + GL_ALWAYS = 0x207; + + /** + * StencilOp + */ + public static final int GL_KEEP = 0x1E00, + GL_REPLACE = 0x1E01, + GL_INCR = 0x1E02, + GL_DECR = 0x1E03, + GL_INVERT = 0x150A, + GL_INCR_WRAP = 0x8507, + GL_DECR_WRAP = 0x8508; + + /** + * StringName + */ + public static final int GL_VENDOR = 0x1F00, + GL_RENDERER = 0x1F01, + GL_VERSION = 0x1F02, + GL_EXTENSIONS = 0x1F03; + + /** + * TextureMagFilter + */ + public static final int GL_NEAREST = 0x2600, + GL_LINEAR = 0x2601; + + /** + * TextureMinFilter + */ + public static final int GL_NEAREST_MIPMAP_NEAREST = 0x2700, + GL_LINEAR_MIPMAP_NEAREST = 0x2701, + GL_NEAREST_MIPMAP_LINEAR = 0x2702, + GL_LINEAR_MIPMAP_LINEAR = 0x2703; + + /** + * TextureParameterName + */ + public static final int GL_TEXTURE_MAG_FILTER = 0x2800, + GL_TEXTURE_MIN_FILTER = 0x2801, + GL_TEXTURE_WRAP_S = 0x2802, + GL_TEXTURE_WRAP_T = 0x2803; + + /** + * TextureTarget + */ + public static final int GL_TEXTURE = 0x1702, + GL_TEXTURE_CUBE_MAP = 0x8513, + GL_TEXTURE_BINDING_CUBE_MAP = 0x8514, + GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515, + GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516, + GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517, + GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518, + GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519, + GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A, + GL_MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C; + + /** + * TextureUnit + */ + public static final int GL_TEXTURE0 = 0x84C0, + GL_TEXTURE1 = 0x84C1, + GL_TEXTURE2 = 0x84C2, + GL_TEXTURE3 = 0x84C3, + GL_TEXTURE4 = 0x84C4, + GL_TEXTURE5 = 0x84C5, + GL_TEXTURE6 = 0x84C6, + GL_TEXTURE7 = 0x84C7, + GL_TEXTURE8 = 0x84C8, + GL_TEXTURE9 = 0x84C9, + GL_TEXTURE10 = 0x84CA, + GL_TEXTURE11 = 0x84CB, + GL_TEXTURE12 = 0x84CC, + GL_TEXTURE13 = 0x84CD, + GL_TEXTURE14 = 0x84CE, + GL_TEXTURE15 = 0x84CF, + GL_TEXTURE16 = 0x84D0, + GL_TEXTURE17 = 0x84D1, + GL_TEXTURE18 = 0x84D2, + GL_TEXTURE19 = 0x84D3, + GL_TEXTURE20 = 0x84D4, + GL_TEXTURE21 = 0x84D5, + GL_TEXTURE22 = 0x84D6, + GL_TEXTURE23 = 0x84D7, + GL_TEXTURE24 = 0x84D8, + GL_TEXTURE25 = 0x84D9, + GL_TEXTURE26 = 0x84DA, + GL_TEXTURE27 = 0x84DB, + GL_TEXTURE28 = 0x84DC, + GL_TEXTURE29 = 0x84DD, + GL_TEXTURE30 = 0x84DE, + GL_TEXTURE31 = 0x84DF, + GL_ACTIVE_TEXTURE = 0x84E0; + + /** + * TextureWrapMode + */ + public static final int GL_REPEAT = 0x2901, + GL_CLAMP_TO_EDGE = 0x812F, + GL_MIRRORED_REPEAT = 0x8370; + + /** + * Uniform Types + */ + public static final int GL_FLOAT_VEC2 = 0x8B50, + GL_FLOAT_VEC3 = 0x8B51, + GL_FLOAT_VEC4 = 0x8B52, + GL_INT_VEC2 = 0x8B53, + GL_INT_VEC3 = 0x8B54, + GL_INT_VEC4 = 0x8B55, + GL_BOOL = 0x8B56, + GL_BOOL_VEC2 = 0x8B57, + GL_BOOL_VEC3 = 0x8B58, + GL_BOOL_VEC4 = 0x8B59, + GL_FLOAT_MAT2 = 0x8B5A, + GL_FLOAT_MAT3 = 0x8B5B, + GL_FLOAT_MAT4 = 0x8B5C, + GL_SAMPLER_2D = 0x8B5E, + GL_SAMPLER_CUBE = 0x8B60; + + /** + * Vertex Arrays + */ + public static final int GL_VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622, + GL_VERTEX_ATTRIB_ARRAY_SIZE = 0x8623, + GL_VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624, + GL_VERTEX_ATTRIB_ARRAY_TYPE = 0x8625, + GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A, + GL_VERTEX_ATTRIB_ARRAY_POINTER = 0x8645, + GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F; + + /** + * Read Format + */ + public static final int GL_IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A, + GL_IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B; + + /** + * Shader Source + */ + public static final int GL_COMPILE_STATUS = 0x8B81, + GL_INFO_LOG_LENGTH = 0x8B84, + GL_SHADER_SOURCE_LENGTH = 0x8B88, + GL_SHADER_COMPILER = 0x8DFA; + + /** + * Shader Binary + */ + public static final int GL_SHADER_BINARY_FORMATS = 0x8DF8, + GL_NUM_SHADER_BINARY_FORMATS = 0x8DF9; + + /** + * Shader Precision-Specified Types + */ + public static final int GL_LOW_FLOAT = 0x8DF0, + GL_MEDIUM_FLOAT = 0x8DF1, + GL_HIGH_FLOAT = 0x8DF2, + GL_LOW_INT = 0x8DF3, + GL_MEDIUM_INT = 0x8DF4, + GL_HIGH_INT = 0x8DF5; + + /** + * Framebuffer Object. + */ + public static final int GL_FRAMEBUFFER = 0x8D40, + GL_RENDERBUFFER = 0x8D41, + GL_RGBA4 = 0x8056, + GL_RGB5_A1 = 0x8057, + GL_RGB565 = 0x8D62, + GL_DEPTH_COMPONENT16 = 0x81A5, + GL_STENCIL_INDEX = 0x1901, + GL_STENCIL_INDEX8 = 0x8D48, + GL_RENDERBUFFER_WIDTH = 0x8D42, + GL_RENDERBUFFER_HEIGHT = 0x8D43, + GL_RENDERBUFFER_INTERNAL_FORMAT = 0x8D44, + GL_RENDERBUFFER_RED_SIZE = 0x8D50, + GL_RENDERBUFFER_GREEN_SIZE = 0x8D51, + GL_RENDERBUFFER_BLUE_SIZE = 0x8D52, + GL_RENDERBUFFER_ALPHA_SIZE = 0x8D53, + GL_RENDERBUFFER_DEPTH_SIZE = 0x8D54, + GL_RENDERBUFFER_STENCIL_SIZE = 0x8D55, + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0, + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1, + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2, + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3, + GL_COLOR_ATTACHMENT0 = 0x8CE0, + GL_DEPTH_ATTACHMENT = 0x8D00, + GL_STENCIL_ATTACHMENT = 0x8D20, + GL_NONE = 0x0, + GL_FRAMEBUFFER_COMPLETE = 0x8CD5, + GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6, + GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7, + GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8CD9, + GL_FRAMEBUFFER_UNSUPPORTED = 0x8CDD, + GL_FRAMEBUFFER_BINDING = 0x8CA6, + GL_RENDERBUFFER_BINDING = 0x8CA7, + GL_MAX_RENDERBUFFER_SIZE = 0x84E8, + GL_INVALID_FRAMEBUFFER_OPERATION = 0x506; + + private GLES20() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glActiveTexture(int texture) { + nglActiveTexture(texture); + } + static native void nglActiveTexture(int texture); + + public static void glAttachShader(int program, int shader) { + nglAttachShader(program, shader); + } + static native void nglAttachShader(int program, int shader); + + public static void glBindAttribLocation(int program, int index, ByteBuffer name) { + BufferChecks.checkDirect(name); + BufferChecks.checkNullTerminated(name); + nglBindAttribLocation(program, index, MemoryUtil.getAddress(name)); + } + static native void nglBindAttribLocation(int program, int index, long name); + + /** Overloads glBindAttribLocation. */ + public static void glBindAttribLocation(int program, int index, CharSequence name) { + nglBindAttribLocation(program, index, APIUtil.getBufferNT(name)); + } + + public static void glBindBuffer(int target, int buffer) { + StateTracker.bindBuffer(target, buffer); + nglBindBuffer(target, buffer); + } + static native void nglBindBuffer(int target, int buffer); + + public static void glBindFramebuffer(int target, int framebuffer) { + nglBindFramebuffer(target, framebuffer); + } + static native void nglBindFramebuffer(int target, int framebuffer); + + public static void glBindRenderbuffer(int target, int renderbuffer) { + nglBindRenderbuffer(target, renderbuffer); + } + static native void nglBindRenderbuffer(int target, int renderbuffer); + + public static void glBindTexture(int target, int texture) { + nglBindTexture(target, texture); + } + static native void nglBindTexture(int target, int texture); + + public static void glBlendColor(float red, float green, float blue, float alpha) { + nglBlendColor(red, green, blue, alpha); + } + static native void nglBlendColor(float red, float green, float blue, float alpha); + + public static void glBlendEquation(int mode) { + nglBlendEquation(mode); + } + static native void nglBlendEquation(int mode); + + public static void glBlendEquationSeparate(int modeRGB, int modeAlpha) { + nglBlendEquationSeparate(modeRGB, modeAlpha); + } + static native void nglBlendEquationSeparate(int modeRGB, int modeAlpha); + + public static void glBlendFunc(int sfactor, int dfactor) { + nglBlendFunc(sfactor, dfactor); + } + static native void nglBlendFunc(int sfactor, int dfactor); + + public static void glBlendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) { + nglBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); + } + static native void nglBlendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha); + + public static void glBufferData(int target, long data_size, int usage) { + nglBufferData(target, data_size, 0L, usage); + } + public static void glBufferData(int target, ByteBuffer data, int usage) { + BufferChecks.checkDirect(data); + nglBufferData(target, data.remaining(), MemoryUtil.getAddress(data), usage); + } + public static void glBufferData(int target, FloatBuffer data, int usage) { + BufferChecks.checkDirect(data); + nglBufferData(target, (data.remaining() << 2), MemoryUtil.getAddress(data), usage); + } + public static void glBufferData(int target, IntBuffer data, int usage) { + BufferChecks.checkDirect(data); + nglBufferData(target, (data.remaining() << 2), MemoryUtil.getAddress(data), usage); + } + public static void glBufferData(int target, ShortBuffer data, int usage) { + BufferChecks.checkDirect(data); + nglBufferData(target, (data.remaining() << 1), MemoryUtil.getAddress(data), usage); + } + static native void nglBufferData(int target, long data_size, long data, int usage); + + public static void glBufferSubData(int target, long offset, ByteBuffer data) { + BufferChecks.checkDirect(data); + nglBufferSubData(target, offset, data.remaining(), MemoryUtil.getAddress(data)); + } + public static void glBufferSubData(int target, long offset, FloatBuffer data) { + BufferChecks.checkDirect(data); + nglBufferSubData(target, offset, (data.remaining() << 2), MemoryUtil.getAddress(data)); + } + public static void glBufferSubData(int target, long offset, IntBuffer data) { + BufferChecks.checkDirect(data); + nglBufferSubData(target, offset, (data.remaining() << 2), MemoryUtil.getAddress(data)); + } + public static void glBufferSubData(int target, long offset, ShortBuffer data) { + BufferChecks.checkDirect(data); + nglBufferSubData(target, offset, (data.remaining() << 1), MemoryUtil.getAddress(data)); + } + static native void nglBufferSubData(int target, long offset, long data_size, long data); + + public static int glCheckFramebufferStatus(int target) { + int __result = nglCheckFramebufferStatus(target); + return __result; + } + static native int nglCheckFramebufferStatus(int target); + + public static void glClear(int mask) { + nglClear(mask); + } + static native void nglClear(int mask); + + public static void glClearColor(float red, float green, float blue, float alpha) { + nglClearColor(red, green, blue, alpha); + } + static native void nglClearColor(float red, float green, float blue, float alpha); + + public static void glClearDepthf(float depth) { + nglClearDepthf(depth); + } + static native void nglClearDepthf(float depth); + + public static void glClearStencil(int s) { + nglClearStencil(s); + } + static native void nglClearStencil(int s); + + public static void glColorMask(boolean red, boolean green, boolean blue, boolean alpha) { + nglColorMask(red, green, blue, alpha); + } + static native void nglColorMask(boolean red, boolean green, boolean blue, boolean alpha); + + public static void glCompileShader(int shader) { + nglCompileShader(shader); + } + static native void nglCompileShader(int shader); + + public static void glCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, ByteBuffer data) { + BufferChecks.checkDirect(data); + nglCompressedTexImage2D(target, level, internalformat, width, height, border, data.remaining(), MemoryUtil.getAddress(data)); + } + static native void nglCompressedTexImage2D(int target, int level, int internalformat, int width, int height, int border, int data_imageSize, long data); + + public static void glCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, ByteBuffer data) { + BufferChecks.checkDirect(data); + nglCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, data.remaining(), MemoryUtil.getAddress(data)); + } + static native void nglCompressedTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int data_imageSize, long data); + + public static void glCopyTexImage2D(int target, int level, int internalformat, int x, int y, int width, int height, int border) { + nglCopyTexImage2D(target, level, internalformat, x, y, width, height, border); + } + static native void nglCopyTexImage2D(int target, int level, int internalformat, int x, int y, int width, int height, int border); + + public static void glCopyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y, int width, int height) { + nglCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); + } + static native void nglCopyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y, int width, int height); + + public static int glCreateProgram() { + int __result = nglCreateProgram(); + return __result; + } + static native int nglCreateProgram(); + + public static int glCreateShader(int type) { + int __result = nglCreateShader(type); + return __result; + } + static native int nglCreateShader(int type); + + public static void glCullFace(int mode) { + nglCullFace(mode); + } + static native void nglCullFace(int mode); + + public static void glDeleteBuffers(IntBuffer buffers) { + BufferChecks.checkDirect(buffers); + nglDeleteBuffers(buffers.remaining(), MemoryUtil.getAddress(buffers)); + } + static native void nglDeleteBuffers(int buffers_n, long buffers); + + /** Overloads glDeleteBuffers. */ + public static void glDeleteBuffers(int buffer) { + nglDeleteBuffers(1, APIUtil.getInt(buffer)); + } + + public static void glDeleteFramebuffers(IntBuffer framebuffers) { + BufferChecks.checkDirect(framebuffers); + nglDeleteFramebuffers(framebuffers.remaining(), MemoryUtil.getAddress(framebuffers)); + } + static native void nglDeleteFramebuffers(int framebuffers_n, long framebuffers); + + /** Overloads glDeleteFramebuffers. */ + public static void glDeleteFramebuffers(int framebuffer) { + nglDeleteFramebuffers(1, APIUtil.getInt(framebuffer)); + } + + public static void glDeleteProgram(int program) { + nglDeleteProgram(program); + } + static native void nglDeleteProgram(int program); + + public static void glDeleteRenderbuffers(IntBuffer renderbuffers) { + BufferChecks.checkDirect(renderbuffers); + nglDeleteRenderbuffers(renderbuffers.remaining(), MemoryUtil.getAddress(renderbuffers)); + } + static native void nglDeleteRenderbuffers(int renderbuffers_n, long renderbuffers); + + /** Overloads glDeleteRenderbuffers. */ + public static void glDeleteRenderbuffers(int renderbuffer) { + nglDeleteRenderbuffers(1, APIUtil.getInt(renderbuffer)); + } + + public static void glDeleteShader(int shader) { + nglDeleteShader(shader); + } + static native void nglDeleteShader(int shader); + + public static void glDeleteTextures(IntBuffer textures) { + BufferChecks.checkDirect(textures); + nglDeleteTextures(textures.remaining(), MemoryUtil.getAddress(textures)); + } + static native void nglDeleteTextures(int textures_n, long textures); + + /** Overloads glDeleteTextures. */ + public static void glDeleteTextures(int texture) { + nglDeleteTextures(1, APIUtil.getInt(texture)); + } + + public static void glDepthFunc(int func) { + nglDepthFunc(func); + } + static native void nglDepthFunc(int func); + + public static void glDepthMask(boolean flag) { + nglDepthMask(flag); + } + static native void nglDepthMask(boolean flag); + + public static void glDepthRangef(float zNear, float zFar) { + nglDepthRangef(zNear, zFar); + } + static native void nglDepthRangef(float zNear, float zFar); + + public static void glDetachShader(int program, int shader) { + nglDetachShader(program, shader); + } + static native void nglDetachShader(int program, int shader); + + public static void glDisable(int cap) { + nglDisable(cap); + } + static native void nglDisable(int cap); + + public static void glDisableVertexAttribArray(int index) { + nglDisableVertexAttribArray(index); + } + static native void nglDisableVertexAttribArray(int index); + + public static void glDrawArrays(int mode, int first, int count) { + nglDrawArrays(mode, first, count); + } + static native void nglDrawArrays(int mode, int first, int count); + + public static void glDrawElements(int mode, ByteBuffer indices) { + GLChecks.ensureElementVBOdisabled(); + BufferChecks.checkDirect(indices); + nglDrawElements(mode, indices.remaining(), GLES20.GL_UNSIGNED_BYTE, MemoryUtil.getAddress(indices)); + } + public static void glDrawElements(int mode, IntBuffer indices) { + GLChecks.ensureElementVBOdisabled(); + BufferChecks.checkDirect(indices); + nglDrawElements(mode, indices.remaining(), GLES20.GL_UNSIGNED_INT, MemoryUtil.getAddress(indices)); + } + public static void glDrawElements(int mode, ShortBuffer indices) { + GLChecks.ensureElementVBOdisabled(); + BufferChecks.checkDirect(indices); + nglDrawElements(mode, indices.remaining(), GLES20.GL_UNSIGNED_SHORT, MemoryUtil.getAddress(indices)); + } + static native void nglDrawElements(int mode, int indices_count, int type, long indices); + public static void glDrawElements(int mode, int indices_count, int type, long indices_buffer_offset) { + GLChecks.ensureElementVBOenabled(); + nglDrawElementsBO(mode, indices_count, type, indices_buffer_offset); + } + static native void nglDrawElementsBO(int mode, int indices_count, int type, long indices_buffer_offset); + + public static void glEnable(int cap) { + nglEnable(cap); + } + static native void nglEnable(int cap); + + public static void glEnableVertexAttribArray(int index) { + nglEnableVertexAttribArray(index); + } + static native void nglEnableVertexAttribArray(int index); + + public static void glFinish() { + nglFinish(); + } + static native void nglFinish(); + + public static void glFlush() { + nglFlush(); + } + static native void nglFlush(); + + public static void glFramebufferRenderbuffer(int target, int attachment, int renderbuffertarget, int renderbuffer) { + nglFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); + } + static native void nglFramebufferRenderbuffer(int target, int attachment, int renderbuffertarget, int renderbuffer); + + public static void glFramebufferTexture2D(int target, int attachment, int textarget, int texture, int level) { + nglFramebufferTexture2D(target, attachment, textarget, texture, level); + } + static native void nglFramebufferTexture2D(int target, int attachment, int textarget, int texture, int level); + + public static void glFrontFace(int mode) { + nglFrontFace(mode); + } + static native void nglFrontFace(int mode); + + public static void glGenBuffers(IntBuffer buffers) { + BufferChecks.checkDirect(buffers); + nglGenBuffers(buffers.remaining(), MemoryUtil.getAddress(buffers)); + } + static native void nglGenBuffers(int buffers_n, long buffers); + + /** Overloads glGenBuffers. */ + public static int glGenBuffers() { + IntBuffer buffers = APIUtil.getBufferInt(); + nglGenBuffers(1, MemoryUtil.getAddress(buffers)); + return buffers.get(0); + } + + public static void glGenerateMipmap(int target) { + nglGenerateMipmap(target); + } + static native void nglGenerateMipmap(int target); + + public static void glGenFramebuffers(IntBuffer framebuffers) { + BufferChecks.checkDirect(framebuffers); + nglGenFramebuffers(framebuffers.remaining(), MemoryUtil.getAddress(framebuffers)); + } + static native void nglGenFramebuffers(int framebuffers_n, long framebuffers); + + /** Overloads glGenFramebuffers. */ + public static int glGenFramebuffers() { + IntBuffer framebuffers = APIUtil.getBufferInt(); + nglGenFramebuffers(1, MemoryUtil.getAddress(framebuffers)); + return framebuffers.get(0); + } + + public static void glGenRenderbuffers(IntBuffer renderbuffers) { + BufferChecks.checkDirect(renderbuffers); + nglGenRenderbuffers(renderbuffers.remaining(), MemoryUtil.getAddress(renderbuffers)); + } + static native void nglGenRenderbuffers(int renderbuffers_n, long renderbuffers); + + /** Overloads glGenRenderbuffers. */ + public static int glGenRenderbuffers() { + IntBuffer renderbuffers = APIUtil.getBufferInt(); + nglGenRenderbuffers(1, MemoryUtil.getAddress(renderbuffers)); + return renderbuffers.get(0); + } + + public static void glGenTextures(IntBuffer textures) { + BufferChecks.checkDirect(textures); + nglGenTextures(textures.remaining(), MemoryUtil.getAddress(textures)); + } + static native void nglGenTextures(int textures_n, long textures); + + /** Overloads glGenTextures. */ + public static int glGenTextures() { + IntBuffer textures = APIUtil.getBufferInt(); + nglGenTextures(1, MemoryUtil.getAddress(textures)); + return textures.get(0); + } + + public static void glGetActiveAttrib(int program, int index, IntBuffer length, IntBuffer size, IntBuffer type, ByteBuffer name) { + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkBuffer(size, 1); + BufferChecks.checkBuffer(type, 1); + BufferChecks.checkDirect(name); + nglGetActiveAttrib(program, index, name.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(size), MemoryUtil.getAddress(type), MemoryUtil.getAddress(name)); + } + static native void nglGetActiveAttrib(int program, int index, int name_bufsize, long length, long size, long type, long name); + + /** + * Overloads glGetActiveAttrib. + *

+ * Overloads glGetActiveAttrib. This version returns both size and type in the sizeType buffer (at .position() and .position() + 1). + */ + public static String glGetActiveAttrib(int program, int index, int bufsize, IntBuffer sizeType) { + BufferChecks.checkBuffer(sizeType, 2); + IntBuffer name_length = APIUtil.getLengths(); + ByteBuffer name = APIUtil.getBufferByte(bufsize); + nglGetActiveAttrib(program, index, bufsize, MemoryUtil.getAddress0(name_length), MemoryUtil.getAddress(sizeType), MemoryUtil.getAddress(sizeType, sizeType.position() + 1), MemoryUtil.getAddress(name)); + name.limit(name_length.get(0)); + return APIUtil.getString(name); + } + + /** + * Overloads glGetActiveAttrib. + *

+ * Overloads glGetActiveAttrib. This version returns only the attrib name. + */ + public static String glGetActiveAttrib(int program, int index, int bufsize) { + IntBuffer name_length = APIUtil.getLengths(); + ByteBuffer name = APIUtil.getBufferByte(bufsize); + nglGetActiveAttrib(program, index, bufsize, MemoryUtil.getAddress0(name_length), MemoryUtil.getAddress0(APIUtil.getBufferInt()), MemoryUtil.getAddress(APIUtil.getBufferInt(), 1), MemoryUtil.getAddress(name)); + name.limit(name_length.get(0)); + return APIUtil.getString(name); + } + + /** + * Overloads glGetActiveAttrib. + *

+ * Overloads glGetActiveAttrib. This version returns only the attrib size. + */ + public static int glGetActiveAttribSize(int program, int index) { + IntBuffer size = APIUtil.getBufferInt(); + nglGetActiveAttrib(program, index, 0, 0L, MemoryUtil.getAddress(size), MemoryUtil.getAddress(size, 1), APIUtil.getBufferByte0()); + return size.get(0); + } + + /** + * Overloads glGetActiveAttrib. + *

+ * Overloads glGetActiveAttrib. This version returns only the attrib type. + */ + public static int glGetActiveAttribType(int program, int index) { + IntBuffer type = APIUtil.getBufferInt(); + nglGetActiveAttrib(program, index, 0, 0L, MemoryUtil.getAddress(type, 1), MemoryUtil.getAddress(type), APIUtil.getBufferByte0()); + return type.get(0); + } + + public static void glGetActiveUniform(int program, int index, IntBuffer length, IntBuffer size, IntBuffer type, ByteBuffer name) { + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkBuffer(size, 1); + BufferChecks.checkBuffer(type, 1); + BufferChecks.checkDirect(name); + nglGetActiveUniform(program, index, name.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(size), MemoryUtil.getAddress(type), MemoryUtil.getAddress(name)); + } + static native void nglGetActiveUniform(int program, int index, int name_bufsize, long length, long size, long type, long name); + + /** + * Overloads glGetActiveUniform. + *

+ * Overloads glGetActiveUniform. This version returns both size and type in the sizeType buffer (at .position() and .position() + 1). + */ + public static String glGetActiveUniform(int program, int index, int bufsize, IntBuffer sizeType) { + BufferChecks.checkBuffer(sizeType, 2); + IntBuffer name_length = APIUtil.getLengths(); + ByteBuffer name = APIUtil.getBufferByte(bufsize); + nglGetActiveUniform(program, index, bufsize, MemoryUtil.getAddress0(name_length), MemoryUtil.getAddress(sizeType), MemoryUtil.getAddress(sizeType, sizeType.position() + 1), MemoryUtil.getAddress(name)); + name.limit(name_length.get(0)); + return APIUtil.getString(name); + } + + /** + * Overloads glGetActiveUniform. + *

+ * Overloads glGetActiveUniformARB. This version returns only the uniform name. + */ + public static String glGetActiveUniform(int program, int index, int bufsize) { + IntBuffer name_length = APIUtil.getLengths(); + ByteBuffer name = APIUtil.getBufferByte(bufsize); + nglGetActiveUniform(program, index, bufsize, MemoryUtil.getAddress0(name_length), MemoryUtil.getAddress0(APIUtil.getBufferInt()), MemoryUtil.getAddress(APIUtil.getBufferInt(), 1), MemoryUtil.getAddress(name)); + name.limit(name_length.get(0)); + return APIUtil.getString(name); + } + + /** + * Overloads glGetActiveUniform. + *

+ * Overloads glGetActiveUniform. This version returns only the uniform size. + */ + public static int glGetActiveUniformSize(int program, int index) { + IntBuffer size = APIUtil.getBufferInt(); + nglGetActiveUniform(program, index, 0, 0L, MemoryUtil.getAddress(size), MemoryUtil.getAddress(size, 1), APIUtil.getBufferByte0()); + return size.get(0); + } + + /** + * Overloads glGetActiveUniform. + *

+ * Overloads glGetActiveUniform. This version returns only the uniform type. + */ + public static int glGetActiveUniformType(int program, int index) { + IntBuffer type = APIUtil.getBufferInt(); + nglGetActiveUniform(program, index, 0, 0L, MemoryUtil.getAddress(type, 1), MemoryUtil.getAddress(type), APIUtil.getBufferByte0()); + return type.get(0); + } + + public static void glGetAttachedShaders(int program, IntBuffer count, IntBuffer shaders) { + if (count != null) + BufferChecks.checkBuffer(count, 1); + BufferChecks.checkDirect(shaders); + nglGetAttachedShaders(program, shaders.remaining(), MemoryUtil.getAddressSafe(count), MemoryUtil.getAddress(shaders)); + } + static native void nglGetAttachedShaders(int program, int shaders_maxCount, long count, long shaders); + + public static int glGetAttribLocation(int program, ByteBuffer name) { + BufferChecks.checkDirect(name); + BufferChecks.checkNullTerminated(name); + int __result = nglGetAttribLocation(program, MemoryUtil.getAddress(name)); + return __result; + } + static native int nglGetAttribLocation(int program, long name); + + /** Overloads glGetAttribLocation. */ + public static int glGetAttribLocation(int program, CharSequence name) { + int __result = nglGetAttribLocation(program, APIUtil.getBufferNT(name)); + return __result; + } + + public static void glGetBoolean(int pname, ByteBuffer params) { + BufferChecks.checkBuffer(params, 1); + nglGetBooleanv(pname, MemoryUtil.getAddress(params)); + } + static native void nglGetBooleanv(int pname, long params); + + /** Overloads glGetBooleanv. */ + public static boolean glGetBoolean(int pname) { + ByteBuffer params = APIUtil.getBufferByte(1); + nglGetBooleanv(pname, MemoryUtil.getAddress(params)); + return params.get(0) == 1; + } + + public static void glGetBufferParameter(int target, int pname, IntBuffer params) { + BufferChecks.checkBuffer(params, 1); + nglGetBufferParameteriv(target, pname, MemoryUtil.getAddress(params)); + } + static native void nglGetBufferParameteriv(int target, int pname, long params); + + /** + * Overloads glGetBufferParameteriv. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetBufferParameteri} instead. + */ + @Deprecated + public static int glGetBufferParameter(int target, int pname) { + return GLES20.glGetBufferParameteri(target, pname); + } + + /** Overloads glGetBufferParameteriv. */ + public static int glGetBufferParameteri(int target, int pname) { + IntBuffer params = APIUtil.getBufferInt(); + nglGetBufferParameteriv(target, pname, MemoryUtil.getAddress(params)); + return params.get(0); + } + + public static int glGetError() { + int __result = nglGetError(); + return __result; + } + static native int nglGetError(); + + public static void glGetFloat(int pname, FloatBuffer params) { + BufferChecks.checkBuffer(params, 1); + nglGetFloatv(pname, MemoryUtil.getAddress(params)); + } + static native void nglGetFloatv(int pname, long params); + + /** Overloads glGetFloatv. */ + public static float glGetFloat(int pname) { + FloatBuffer params = APIUtil.getBufferFloat(); + nglGetFloatv(pname, MemoryUtil.getAddress(params)); + return params.get(0); + } + + public static void glGetFramebufferAttachmentParameter(int target, int attachment, int pname, IntBuffer params) { + BufferChecks.checkBuffer(params, 1); + nglGetFramebufferAttachmentParameteriv(target, attachment, pname, MemoryUtil.getAddress(params)); + } + static native void nglGetFramebufferAttachmentParameteriv(int target, int attachment, int pname, long params); + + /** + * Overloads glGetFramebufferAttachmentParameteriv. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetFramebufferAttachmentParameteri} instead. + */ + @Deprecated + public static int glGetFramebufferAttachmentParameter(int target, int attachment, int pname) { + return GLES20.glGetFramebufferAttachmentParameteri(target, attachment, pname); + } + + /** Overloads glGetFramebufferAttachmentParameteriv. */ + public static int glGetFramebufferAttachmentParameteri(int target, int attachment, int pname) { + IntBuffer params = APIUtil.getBufferInt(); + nglGetFramebufferAttachmentParameteriv(target, attachment, pname, MemoryUtil.getAddress(params)); + return params.get(0); + } + + public static void glGetInteger(int pname, IntBuffer params) { + BufferChecks.checkBuffer(params, 1); + nglGetIntegerv(pname, MemoryUtil.getAddress(params)); + } + static native void nglGetIntegerv(int pname, long params); + + /** Overloads glGetIntegerv. */ + public static int glGetInteger(int pname) { + IntBuffer params = APIUtil.getBufferInt(); + nglGetIntegerv(pname, MemoryUtil.getAddress(params)); + return params.get(0); + } + + public static void glGetProgram(int program, int pname, IntBuffer params) { + BufferChecks.checkBuffer(params, 1); + nglGetProgramiv(program, pname, MemoryUtil.getAddress(params)); + } + static native void nglGetProgramiv(int program, int pname, long params); + + /** + * Overloads glGetProgramiv. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetProgrami} instead. + */ + @Deprecated + public static int glGetProgram(int program, int pname) { + return GLES20.glGetProgrami(program, pname); + } + + /** Overloads glGetProgramiv. */ + public static int glGetProgrami(int program, int pname) { + IntBuffer params = APIUtil.getBufferInt(); + nglGetProgramiv(program, pname, MemoryUtil.getAddress(params)); + return params.get(0); + } + + public static void glGetProgramInfoLog(int program, IntBuffer length, ByteBuffer infoLog) { + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkDirect(infoLog); + nglGetProgramInfoLog(program, infoLog.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(infoLog)); + } + static native void nglGetProgramInfoLog(int program, int infoLog_bufsize, long length, long infoLog); + + /** Overloads glGetProgramInfoLog. */ + public static String glGetProgramInfoLog(int program, int bufsize) { + IntBuffer infoLog_length = APIUtil.getLengths(); + ByteBuffer infoLog = APIUtil.getBufferByte(bufsize); + nglGetProgramInfoLog(program, bufsize, MemoryUtil.getAddress0(infoLog_length), MemoryUtil.getAddress(infoLog)); + infoLog.limit(infoLog_length.get(0)); + return APIUtil.getString(infoLog); + } + + public static void glGetRenderbufferParameter(int target, int pname, IntBuffer params) { + BufferChecks.checkBuffer(params, 1); + nglGetRenderbufferParameteriv(target, pname, MemoryUtil.getAddress(params)); + } + static native void nglGetRenderbufferParameteriv(int target, int pname, long params); + + /** + * Overloads glGetRenderbufferParameteriv. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetRenderbufferParameteri} instead. + */ + @Deprecated + public static int glGetRenderbufferParameter(int target, int pname) { + return GLES20.glGetRenderbufferParameteri(target, pname); + } + + /** Overloads glGetRenderbufferParameteriv. */ + public static int glGetRenderbufferParameteri(int target, int pname) { + IntBuffer params = APIUtil.getBufferInt(); + nglGetRenderbufferParameteriv(target, pname, MemoryUtil.getAddress(params)); + return params.get(0); + } + + public static void glGetShader(int shader, int pname, IntBuffer params) { + BufferChecks.checkBuffer(params, 1); + nglGetShaderiv(shader, pname, MemoryUtil.getAddress(params)); + } + static native void nglGetShaderiv(int shader, int pname, long params); + + /** + * Overloads glGetShaderiv. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetShaderi} instead. + */ + @Deprecated + public static int glGetShader(int shader, int pname) { + return GLES20.glGetShaderi(shader, pname); + } + + /** Overloads glGetShaderiv. */ + public static int glGetShaderi(int shader, int pname) { + IntBuffer params = APIUtil.getBufferInt(); + nglGetShaderiv(shader, pname, MemoryUtil.getAddress(params)); + return params.get(0); + } + + public static void glGetShaderInfoLog(int shader, IntBuffer length, ByteBuffer infoLog) { + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkDirect(infoLog); + nglGetShaderInfoLog(shader, infoLog.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(infoLog)); + } + static native void nglGetShaderInfoLog(int shader, int infoLog_bufsize, long length, long infoLog); + + /** Overloads glGetShaderInfoLog. */ + public static String glGetShaderInfoLog(int shader, int bufsize) { + IntBuffer infoLog_length = APIUtil.getLengths(); + ByteBuffer infoLog = APIUtil.getBufferByte(bufsize); + nglGetShaderInfoLog(shader, bufsize, MemoryUtil.getAddress0(infoLog_length), MemoryUtil.getAddress(infoLog)); + infoLog.limit(infoLog_length.get(0)); + return APIUtil.getString(infoLog); + } + + public static void glGetShaderPrecisionFormat(int shadertype, int precisiontype, IntBuffer range, IntBuffer precision) { + BufferChecks.checkBuffer(range, 2); + BufferChecks.checkBuffer(precision, 1); + nglGetShaderPrecisionFormat(shadertype, precisiontype, MemoryUtil.getAddress(range), MemoryUtil.getAddress(precision)); + } + static native void nglGetShaderPrecisionFormat(int shadertype, int precisiontype, long range, long precision); + + public static void glGetShaderSource(int shader, IntBuffer length, ByteBuffer source) { + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkDirect(source); + nglGetShaderSource(shader, source.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(source)); + } + static native void nglGetShaderSource(int shader, int source_bufsize, long length, long source); + + /** Overloads glGetShaderSource. */ + public static String glGetShaderSource(int shader, int bufsize) { + IntBuffer source_length = APIUtil.getLengths(); + ByteBuffer source = APIUtil.getBufferByte(bufsize); + nglGetShaderSource(shader, bufsize, MemoryUtil.getAddress0(source_length), MemoryUtil.getAddress(source)); + source.limit(source_length.get(0)); + return APIUtil.getString(source); + } + + public static String glGetString(int name) { + String __result = nglGetString(name); + return __result; + } + static native String nglGetString(int name); + + public static void glGetTexParameter(int target, int pname, FloatBuffer params) { + BufferChecks.checkBuffer(params, 1); + nglGetTexParameterfv(target, pname, MemoryUtil.getAddress(params)); + } + static native void nglGetTexParameterfv(int target, int pname, long params); + + /** Overloads glGetTexParameterfv. */ + public static float glGetTexParameterf(int target, int pname) { + FloatBuffer params = APIUtil.getBufferFloat(); + nglGetTexParameterfv(target, pname, MemoryUtil.getAddress(params)); + return params.get(0); + } + + public static void glGetTexParameter(int target, int pname, IntBuffer params) { + BufferChecks.checkBuffer(params, 1); + nglGetTexParameteriv(target, pname, MemoryUtil.getAddress(params)); + } + static native void nglGetTexParameteriv(int target, int pname, long params); + + /** Overloads glGetTexParameteriv. */ + public static int glGetTexParameteri(int target, int pname) { + IntBuffer params = APIUtil.getBufferInt(); + nglGetTexParameteriv(target, pname, MemoryUtil.getAddress(params)); + return params.get(0); + } + + public static void glGetUniform(int program, int location, FloatBuffer params) { + BufferChecks.checkBuffer(params, 1); + nglGetUniformfv(program, location, MemoryUtil.getAddress(params)); + } + static native void nglGetUniformfv(int program, int location, long params); + + public static void glGetUniform(int program, int location, IntBuffer params) { + BufferChecks.checkBuffer(params, 1); + nglGetUniformiv(program, location, MemoryUtil.getAddress(params)); + } + static native void nglGetUniformiv(int program, int location, long params); + + /** + * Returns the location of the uniform with the specified name. The ByteBuffer should contain the uniform name as a + * null-terminated string. + *

+ * @param program + * @param name + */ + public static int glGetUniformLocation(int program, ByteBuffer name) { + BufferChecks.checkBuffer(name, 1); + BufferChecks.checkNullTerminated(name); + int __result = nglGetUniformLocation(program, MemoryUtil.getAddress(name)); + return __result; + } + static native int nglGetUniformLocation(int program, long name); + + /** Overloads glGetUniformLocation. */ + public static int glGetUniformLocation(int program, CharSequence name) { + int __result = nglGetUniformLocation(program, APIUtil.getBufferNT(name)); + return __result; + } + + public static void glGetVertexAttrib(int index, int pname, FloatBuffer params) { + BufferChecks.checkBuffer(params, 4); + nglGetVertexAttribfv(index, pname, MemoryUtil.getAddress(params)); + } + static native void nglGetVertexAttribfv(int index, int pname, long params); + + public static void glGetVertexAttrib(int index, int pname, IntBuffer params) { + BufferChecks.checkBuffer(params, 4); + nglGetVertexAttribiv(index, pname, MemoryUtil.getAddress(params)); + } + static native void nglGetVertexAttribiv(int index, int pname, long params); + + public static ByteBuffer glGetVertexAttribPointer(int index, int pname, long result_size) { + ByteBuffer __result = nglGetVertexAttribPointerv(index, pname, result_size); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + static native ByteBuffer nglGetVertexAttribPointerv(int index, int pname, long result_size); + + public static void glHint(int target, int mode) { + nglHint(target, mode); + } + static native void nglHint(int target, int mode); + + public static boolean glIsBuffer(int buffer) { + boolean __result = nglIsBuffer(buffer); + return __result; + } + static native boolean nglIsBuffer(int buffer); + + public static boolean glIsEnabled(int cap) { + boolean __result = nglIsEnabled(cap); + return __result; + } + static native boolean nglIsEnabled(int cap); + + public static boolean glIsFramebuffer(int framebuffer) { + boolean __result = nglIsFramebuffer(framebuffer); + return __result; + } + static native boolean nglIsFramebuffer(int framebuffer); + + public static boolean glIsProgram(int program) { + boolean __result = nglIsProgram(program); + return __result; + } + static native boolean nglIsProgram(int program); + + public static boolean glIsRenderbuffer(int renderbuffer) { + boolean __result = nglIsRenderbuffer(renderbuffer); + return __result; + } + static native boolean nglIsRenderbuffer(int renderbuffer); + + public static boolean glIsShader(int shader) { + boolean __result = nglIsShader(shader); + return __result; + } + static native boolean nglIsShader(int shader); + + public static boolean glIsTexture(int texture) { + boolean __result = nglIsTexture(texture); + return __result; + } + static native boolean nglIsTexture(int texture); + + public static void glLineWidth(float width) { + nglLineWidth(width); + } + static native void nglLineWidth(float width); + + public static void glLinkProgram(int program) { + nglLinkProgram(program); + } + static native void nglLinkProgram(int program); + + public static void glPixelStorei(int pname, int param) { + nglPixelStorei(pname, param); + } + static native void nglPixelStorei(int pname, int param); + + public static void glPolygonOffset(float factor, float units) { + nglPolygonOffset(factor, units); + } + static native void nglPolygonOffset(float factor, float units); + + public static void glReadPixels(int x, int y, int width, int height, int format, int type, ByteBuffer pixels) { + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglReadPixels(x, y, width, height, format, type, MemoryUtil.getAddress(pixels)); + } + public static void glReadPixels(int x, int y, int width, int height, int format, int type, FloatBuffer pixels) { + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglReadPixels(x, y, width, height, format, type, MemoryUtil.getAddress(pixels)); + } + public static void glReadPixels(int x, int y, int width, int height, int format, int type, IntBuffer pixels) { + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglReadPixels(x, y, width, height, format, type, MemoryUtil.getAddress(pixels)); + } + public static void glReadPixels(int x, int y, int width, int height, int format, int type, ShortBuffer pixels) { + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglReadPixels(x, y, width, height, format, type, MemoryUtil.getAddress(pixels)); + } + static native void nglReadPixels(int x, int y, int width, int height, int format, int type, long pixels); + + public static void glReleaseShaderCompiler() { + nglReleaseShaderCompiler(); + } + static native void nglReleaseShaderCompiler(); + + public static void glRenderbufferStorage(int target, int internalformat, int width, int height) { + nglRenderbufferStorage(target, internalformat, width, height); + } + static native void nglRenderbufferStorage(int target, int internalformat, int width, int height); + + public static void glSampleCoverage(float value, boolean invert) { + nglSampleCoverage(value, invert); + } + static native void nglSampleCoverage(float value, boolean invert); + + public static void glScissor(int x, int y, int width, int height) { + nglScissor(x, y, width, height); + } + static native void nglScissor(int x, int y, int width, int height); + + public static void glShaderBinary(IntBuffer shaders, int binaryformat, ByteBuffer binary) { + BufferChecks.checkDirect(shaders); + BufferChecks.checkDirect(binary); + nglShaderBinary(shaders.remaining(), MemoryUtil.getAddress(shaders), binaryformat, MemoryUtil.getAddress(binary), binary.remaining()); + } + static native void nglShaderBinary(int shaders_n, long shaders, int binaryformat, long binary, int binary_length); + + /** + * glShaderSource allows multiple, optionally null-terminated, source strings to define a shader program. + *

+ * This method uses just a single string, that should NOT be null-terminated. + *

+ * @param shader + * @param string + */ + public static void glShaderSource(int shader, ByteBuffer string) { + BufferChecks.checkDirect(string); + nglShaderSource(shader, 1, MemoryUtil.getAddress(string), string.remaining()); + } + static native void nglShaderSource(int shader, int count, long string, int string_length); + + /** Overloads glShaderSource. */ + public static void glShaderSource(int shader, CharSequence string) { + nglShaderSource(shader, 1, APIUtil.getBuffer(string), string.length()); + } + + /** Overloads glShaderSource. */ + public static void glShaderSource(int shader, CharSequence[] strings) { + BufferChecks.checkArray(strings); + nglShaderSource3(shader, strings.length, APIUtil.getBuffer(strings), APIUtil.getLengths(strings)); + } + static native void nglShaderSource3(int shader, int count, long strings, long length); + + public static void glStencilFunc(int func, int ref, int mask) { + nglStencilFunc(func, ref, mask); + } + static native void nglStencilFunc(int func, int ref, int mask); + + public static void glStencilFuncSeparate(int face, int func, int ref, int mask) { + nglStencilFuncSeparate(face, func, ref, mask); + } + static native void nglStencilFuncSeparate(int face, int func, int ref, int mask); + + public static void glStencilMask(int mask) { + nglStencilMask(mask); + } + static native void nglStencilMask(int mask); + + public static void glStencilMaskSeparate(int face, int mask) { + nglStencilMaskSeparate(face, mask); + } + static native void nglStencilMaskSeparate(int face, int mask); + + public static void glStencilOp(int fail, int zfail, int zpass) { + nglStencilOp(fail, zfail, zpass); + } + static native void nglStencilOp(int fail, int zfail, int zpass); + + public static void glStencilOpSeparate(int face, int fail, int zfail, int zpass) { + nglStencilOpSeparate(face, fail, zfail, zpass); + } + static native void nglStencilOpSeparate(int face, int fail, int zfail, int zpass); + + public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ByteBuffer pixels) { + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height)); + nglTexImage2D(target, level, internalformat, width, height, border, format, type, MemoryUtil.getAddressSafe(pixels)); + } + public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, FloatBuffer pixels) { + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height)); + nglTexImage2D(target, level, internalformat, width, height, border, format, type, MemoryUtil.getAddressSafe(pixels)); + } + public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, IntBuffer pixels) { + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height)); + nglTexImage2D(target, level, internalformat, width, height, border, format, type, MemoryUtil.getAddressSafe(pixels)); + } + public static void glTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, ShortBuffer pixels) { + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height)); + nglTexImage2D(target, level, internalformat, width, height, border, format, type, MemoryUtil.getAddressSafe(pixels)); + } + static native void nglTexImage2D(int target, int level, int internalformat, int width, int height, int border, int format, int type, long pixels); + + public static void glTexParameterf(int target, int pname, float param) { + nglTexParameterf(target, pname, param); + } + static native void nglTexParameterf(int target, int pname, float param); + + public static void glTexParameter(int target, int pname, FloatBuffer param) { + BufferChecks.checkBuffer(param, 4); + nglTexParameterfv(target, pname, MemoryUtil.getAddress(param)); + } + static native void nglTexParameterfv(int target, int pname, long param); + + public static void glTexParameteri(int target, int pname, int param) { + nglTexParameteri(target, pname, param); + } + static native void nglTexParameteri(int target, int pname, int param); + + public static void glTexParameter(int target, int pname, IntBuffer param) { + BufferChecks.checkBuffer(param, 4); + nglTexParameteriv(target, pname, MemoryUtil.getAddress(param)); + } + static native void nglTexParameteriv(int target, int pname, long param); + + public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ByteBuffer pixels) { + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, MemoryUtil.getAddress(pixels)); + } + public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, FloatBuffer pixels) { + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, MemoryUtil.getAddress(pixels)); + } + public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, IntBuffer pixels) { + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, MemoryUtil.getAddress(pixels)); + } + public static void glTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ShortBuffer pixels) { + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)); + nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, MemoryUtil.getAddress(pixels)); + } + static native void nglTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, long pixels); + + public static void glUniform1f(int location, float x) { + nglUniform1f(location, x); + } + static native void nglUniform1f(int location, float x); + + public static void glUniform1(int location, FloatBuffer v) { + BufferChecks.checkDirect(v); + nglUniform1fv(location, v.remaining(), MemoryUtil.getAddress(v)); + } + static native void nglUniform1fv(int location, int v_count, long v); + + public static void glUniform1i(int location, int x) { + nglUniform1i(location, x); + } + static native void nglUniform1i(int location, int x); + + public static void glUniform1(int location, IntBuffer v) { + BufferChecks.checkDirect(v); + nglUniform1iv(location, v.remaining(), MemoryUtil.getAddress(v)); + } + static native void nglUniform1iv(int location, int v_count, long v); + + public static void glUniform2f(int location, float x, float y) { + nglUniform2f(location, x, y); + } + static native void nglUniform2f(int location, float x, float y); + + public static void glUniform2(int location, FloatBuffer v) { + BufferChecks.checkDirect(v); + nglUniform2fv(location, v.remaining() >> 1, MemoryUtil.getAddress(v)); + } + static native void nglUniform2fv(int location, int v_count, long v); + + public static void glUniform2i(int location, int x, int y) { + nglUniform2i(location, x, y); + } + static native void nglUniform2i(int location, int x, int y); + + public static void glUniform2(int location, IntBuffer v) { + BufferChecks.checkDirect(v); + nglUniform2iv(location, v.remaining() >> 1, MemoryUtil.getAddress(v)); + } + static native void nglUniform2iv(int location, int v_count, long v); + + public static void glUniform3f(int location, float x, float y, float z) { + nglUniform3f(location, x, y, z); + } + static native void nglUniform3f(int location, float x, float y, float z); + + public static void glUniform3(int location, FloatBuffer v) { + BufferChecks.checkDirect(v); + nglUniform3fv(location, v.remaining() / 3, MemoryUtil.getAddress(v)); + } + static native void nglUniform3fv(int location, int v_count, long v); + + public static void glUniform3i(int location, int x, int y, int z) { + nglUniform3i(location, x, y, z); + } + static native void nglUniform3i(int location, int x, int y, int z); + + public static void glUniform3(int location, IntBuffer v) { + BufferChecks.checkDirect(v); + nglUniform3iv(location, v.remaining() / 3, MemoryUtil.getAddress(v)); + } + static native void nglUniform3iv(int location, int v_count, long v); + + public static void glUniform4f(int location, float x, float y, float z, float w) { + nglUniform4f(location, x, y, z, w); + } + static native void nglUniform4f(int location, float x, float y, float z, float w); + + public static void glUniform4(int location, FloatBuffer v) { + BufferChecks.checkDirect(v); + nglUniform4fv(location, v.remaining() >> 2, MemoryUtil.getAddress(v)); + } + static native void nglUniform4fv(int location, int v_count, long v); + + public static void glUniform4i(int location, int x, int y, int z, int w) { + nglUniform4i(location, x, y, z, w); + } + static native void nglUniform4i(int location, int x, int y, int z, int w); + + public static void glUniform4(int location, IntBuffer v) { + BufferChecks.checkDirect(v); + nglUniform4iv(location, v.remaining() >> 2, MemoryUtil.getAddress(v)); + } + static native void nglUniform4iv(int location, int v_count, long v); + + public static void glUniformMatrix2(int location, boolean transpose, FloatBuffer matrices) { + BufferChecks.checkDirect(matrices); + nglUniformMatrix2fv(location, matrices.remaining() >> 2, transpose, MemoryUtil.getAddress(matrices)); + } + static native void nglUniformMatrix2fv(int location, int matrices_count, boolean transpose, long matrices); + + public static void glUniformMatrix3(int location, boolean transpose, FloatBuffer matrices) { + BufferChecks.checkDirect(matrices); + nglUniformMatrix3fv(location, matrices.remaining() / (3 * 3), transpose, MemoryUtil.getAddress(matrices)); + } + static native void nglUniformMatrix3fv(int location, int matrices_count, boolean transpose, long matrices); + + public static void glUniformMatrix4(int location, boolean transpose, FloatBuffer matrices) { + BufferChecks.checkDirect(matrices); + nglUniformMatrix4fv(location, matrices.remaining() >> 4, transpose, MemoryUtil.getAddress(matrices)); + } + static native void nglUniformMatrix4fv(int location, int matrices_count, boolean transpose, long matrices); + + public static void glUseProgram(int program) { + nglUseProgram(program); + } + static native void nglUseProgram(int program); + + public static void glValidateProgram(int program) { + nglValidateProgram(program); + } + static native void nglValidateProgram(int program); + + public static void glVertexAttrib1f(int indx, float x) { + nglVertexAttrib1f(indx, x); + } + static native void nglVertexAttrib1f(int indx, float x); + + public static void glVertexAttrib1(int indx, FloatBuffer values) { + BufferChecks.checkBuffer(values, 1); + nglVertexAttrib1fv(indx, MemoryUtil.getAddress(values)); + } + static native void nglVertexAttrib1fv(int indx, long values); + + public static void glVertexAttrib2f(int indx, float x, float y) { + nglVertexAttrib2f(indx, x, y); + } + static native void nglVertexAttrib2f(int indx, float x, float y); + + public static void glVertexAttrib2(int indx, FloatBuffer values) { + BufferChecks.checkBuffer(values, 2); + nglVertexAttrib2fv(indx, MemoryUtil.getAddress(values)); + } + static native void nglVertexAttrib2fv(int indx, long values); + + public static void glVertexAttrib3f(int indx, float x, float y, float z) { + nglVertexAttrib3f(indx, x, y, z); + } + static native void nglVertexAttrib3f(int indx, float x, float y, float z); + + public static void glVertexAttrib3(int indx, FloatBuffer values) { + BufferChecks.checkBuffer(values, 3); + nglVertexAttrib3fv(indx, MemoryUtil.getAddress(values)); + } + static native void nglVertexAttrib3fv(int indx, long values); + + public static void glVertexAttrib4f(int indx, float x, float y, float z, float w) { + nglVertexAttrib4f(indx, x, y, z, w); + } + static native void nglVertexAttrib4f(int indx, float x, float y, float z, float w); + + public static void glVertexAttrib4(int indx, FloatBuffer values) { + BufferChecks.checkBuffer(values, 4); + nglVertexAttrib4fv(indx, MemoryUtil.getAddress(values)); + } + static native void nglVertexAttrib4fv(int indx, long values); + + public static void glVertexAttribPointer(int index, int size, boolean normalized, int stride, FloatBuffer buffer) { + GLChecks.ensureArrayVBOdisabled(); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getTracker().glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribPointer(index, size, GLES20.GL_FLOAT, normalized, stride, MemoryUtil.getAddress(buffer)); + } + public static void glVertexAttribPointer(int index, int size, boolean unsigned, boolean normalized, int stride, ByteBuffer buffer) { + GLChecks.ensureArrayVBOdisabled(); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getTracker().glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribPointer(index, size, unsigned ? GLES20.GL_UNSIGNED_BYTE : GLES20.GL_BYTE, normalized, stride, MemoryUtil.getAddress(buffer)); + } + public static void glVertexAttribPointer(int index, int size, boolean unsigned, boolean normalized, int stride, IntBuffer buffer) { + GLChecks.ensureArrayVBOdisabled(); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getTracker().glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribPointer(index, size, unsigned ? GLES20.GL_UNSIGNED_INT : GLES20.GL_INT, normalized, stride, MemoryUtil.getAddress(buffer)); + } + public static void glVertexAttribPointer(int index, int size, boolean unsigned, boolean normalized, int stride, ShortBuffer buffer) { + GLChecks.ensureArrayVBOdisabled(); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getTracker().glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribPointer(index, size, unsigned ? GLES20.GL_UNSIGNED_SHORT : GLES20.GL_SHORT, normalized, stride, MemoryUtil.getAddress(buffer)); + } + static native void nglVertexAttribPointer(int index, int size, int type, boolean normalized, int stride, long buffer); + public static void glVertexAttribPointer(int index, int size, int type, boolean normalized, int stride, long buffer_buffer_offset) { + GLChecks.ensureArrayVBOenabled(); + nglVertexAttribPointerBO(index, size, type, normalized, stride, buffer_buffer_offset); + } + static native void nglVertexAttribPointerBO(int index, int size, int type, boolean normalized, int stride, long buffer_buffer_offset); + + public static void glViewport(int x, int y, int width, int height) { + nglViewport(x, y, width, height); + } + static native void nglViewport(int x, int y, int width, int height); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/GLES30.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/GLES30.java new file mode 100644 index 0000000..6a3be0b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/GLES30.java @@ -0,0 +1,1261 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class GLES30 { + + public static final int GL_READ_BUFFER = 0xC02, + GL_UNPACK_ROW_LENGTH = 0xCF2, + GL_UNPACK_SKIP_ROWS = 0xCF3, + GL_UNPACK_SKIP_PIXELS = 0xCF4, + GL_PACK_ROW_LENGTH = 0xD02, + GL_PACK_SKIP_ROWS = 0xD03, + GL_PACK_SKIP_PIXELS = 0xD04, + GL_COLOR = 0x1800, + GL_DEPTH = 0x1801, + GL_STENCIL = 0x1802, + GL_RED = 0x1903, + GL_RGB8 = 0x8051, + GL_RGBA8 = 0x8058, + GL_RGB10_A2 = 0x8059, + GL_TEXTURE_BINDING_3D = 0x806A, + GL_PACK_SKIP_IMAGES = 0x806B, + GL_PACK_IMAGE_HEIGHT = 0x806C, + GL_UNPACK_SKIP_IMAGES = 0x806D, + GL_UNPACK_IMAGE_HEIGHT = 0x806E, + GL_TEXTURE_3D = 0x806F, + GL_TEXTURE_WRAP_R = 0x8072, + GL_MAX_3D_TEXTURE_SIZE = 0x8073, + GL_UNSIGNED_INT_2_10_10_10_REV = 0x8368, + GL_MAX_ELEMENTS_VERTICES = 0x80E8, + GL_MAX_ELEMENTS_INDICES = 0x80E9, + GL_TEXTURE_MIN_LOD = 0x813A, + GL_TEXTURE_MAX_LOD = 0x813B, + GL_TEXTURE_BASE_LEVEL = 0x813C, + GL_TEXTURE_MAX_LEVEL = 0x813D, + GL_MIN = 0x8007, + GL_MAX = 0x8008, + GL_DEPTH_COMPONENT24 = 0x81A6, + GL_MAX_TEXTURE_LOD_BIAS = 0x84FD, + GL_TEXTURE_COMPARE_MODE = 0x884C, + GL_TEXTURE_COMPARE_FUNC = 0x884D, + GL_CURRENT_QUERY = 0x8865, + GL_QUERY_RESULT = 0x8866, + GL_QUERY_RESULT_AVAILABLE = 0x8867, + GL_BUFFER_MAPPED = 0x88BC, + GL_BUFFER_MAP_POINTER = 0x88BD, + GL_STREAM_READ = 0x88E1, + GL_STREAM_COPY = 0x88E2, + GL_STATIC_READ = 0x88E5, + GL_STATIC_COPY = 0x88E6, + GL_DYNAMIC_READ = 0x88E9, + GL_DYNAMIC_COPY = 0x88EA, + GL_MAX_DRAW_BUFFERS = 0x8824, + GL_DRAW_BUFFER0 = 0x8825, + GL_DRAW_BUFFER1 = 0x8826, + GL_DRAW_BUFFER2 = 0x8827, + GL_DRAW_BUFFER3 = 0x8828, + GL_DRAW_BUFFER4 = 0x8829, + GL_DRAW_BUFFER5 = 0x882A, + GL_DRAW_BUFFER6 = 0x882B, + GL_DRAW_BUFFER7 = 0x882C, + GL_DRAW_BUFFER8 = 0x882D, + GL_DRAW_BUFFER9 = 0x882E, + GL_DRAW_BUFFER10 = 0x882F, + GL_DRAW_BUFFER11 = 0x8830, + GL_DRAW_BUFFER12 = 0x8831, + GL_DRAW_BUFFER13 = 0x8832, + GL_DRAW_BUFFER14 = 0x8833, + GL_DRAW_BUFFER15 = 0x8834, + GL_MAX_FRAGMENT_UNIFORM_COMPONENTS = 0x8B49, + GL_MAX_VERTEX_UNIFORM_COMPONENTS = 0x8B4A, + GL_SAMPLER_3D = 0x8B5F, + GL_SAMPLER_2D_SHADOW = 0x8B62, + GL_FRAGMENT_SHADER_DERIVATIVE_HINT = 0x8B8B, + GL_PIXEL_PACK_BUFFER = 0x88EB, + GL_PIXEL_UNPACK_BUFFER = 0x88EC, + GL_PIXEL_PACK_BUFFER_BINDING = 0x88ED, + GL_PIXEL_UNPACK_BUFFER_BINDING = 0x88EF, + GL_FLOAT_MAT2x3 = 0x8B65, + GL_FLOAT_MAT2x4 = 0x8B66, + GL_FLOAT_MAT3x2 = 0x8B67, + GL_FLOAT_MAT3x4 = 0x8B68, + GL_FLOAT_MAT4x2 = 0x8B69, + GL_FLOAT_MAT4x3 = 0x8B6A, + GL_SRGB = 0x8C40, + GL_SRGB8 = 0x8C41, + GL_SRGB8_ALPHA8 = 0x8C43, + GL_COMPARE_REF_TO_TEXTURE = 0x884E, + GL_MAJOR_VERSION = 0x821B, + GL_MINOR_VERSION = 0x821C, + GL_NUM_EXTENSIONS = 0x821D, + GL_RGBA32F = 0x8814, + GL_RGB32F = 0x8815, + GL_RGBA16F = 0x881A, + GL_RGB16F = 0x881B, + GL_VERTEX_ATTRIB_ARRAY_INTEGER = 0x88FD, + GL_MAX_ARRAY_TEXTURE_LAYERS = 0x88FF, + GL_MIN_PROGRAM_TEXEL_OFFSET = 0x8904, + GL_MAX_PROGRAM_TEXEL_OFFSET = 0x8905, + GL_MAX_VARYING_COMPONENTS = 0x8B4B, + GL_TEXTURE_2D_ARRAY = 0x8C1A, + GL_TEXTURE_BINDING_2D_ARRAY = 0x8C1D, + GL_R11F_G11F_B10F = 0x8C3A, + GL_UNSIGNED_INT_10F_11F_11F_REV = 0x8C3B, + GL_RGB9_E5 = 0x8C3D, + GL_UNSIGNED_INT_5_9_9_9_REV = 0x8C3E, + GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH = 0x8C76, + GL_TRANSFORM_FEEDBACK_BUFFER_MODE = 0x8C7F, + GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 0x8C80, + GL_TRANSFORM_FEEDBACK_VARYINGS = 0x8C83, + GL_TRANSFORM_FEEDBACK_BUFFER_START = 0x8C84, + GL_TRANSFORM_FEEDBACK_BUFFER_SIZE = 0x8C85, + GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 0x8C88, + GL_RASTERIZER_DISCARD = 0x8C89, + GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 0x8C8A, + GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 0x8C8B, + GL_INTERLEAVED_ATTRIBS = 0x8C8C, + GL_SEPARATE_ATTRIBS = 0x8C8D, + GL_TRANSFORM_FEEDBACK_BUFFER = 0x8C8E, + GL_TRANSFORM_FEEDBACK_BUFFER_BINDING = 0x8C8F, + GL_RGBA32UI = 0x8D70, + GL_RGB32UI = 0x8D71, + GL_RGBA16UI = 0x8D76, + GL_RGB16UI = 0x8D77, + GL_RGBA8UI = 0x8D7C, + GL_RGB8UI = 0x8D7D, + GL_RGBA32I = 0x8D82, + GL_RGB32I = 0x8D83, + GL_RGBA16I = 0x8D88, + GL_RGB16I = 0x8D89, + GL_RGBA8I = 0x8D8E, + GL_RGB8I = 0x8D8F, + GL_RED_INTEGER = 0x8D94, + GL_RGB_INTEGER = 0x8D98, + GL_RGBA_INTEGER = 0x8D99, + GL_SAMPLER_2D_ARRAY = 0x8DC1, + GL_SAMPLER_2D_ARRAY_SHADOW = 0x8DC4, + GL_SAMPLER_CUBE_SHADOW = 0x8DC5, + GL_UNSIGNED_INT_VEC2 = 0x8DC6, + GL_UNSIGNED_INT_VEC3 = 0x8DC7, + GL_UNSIGNED_INT_VEC4 = 0x8DC8, + GL_INT_SAMPLER_2D = 0x8DCA, + GL_INT_SAMPLER_3D = 0x8DCB, + GL_INT_SAMPLER_CUBE = 0x8DCC, + GL_INT_SAMPLER_2D_ARRAY = 0x8DCF, + GL_UNSIGNED_INT_SAMPLER_2D = 0x8DD2, + GL_UNSIGNED_INT_SAMPLER_3D = 0x8DD3, + GL_UNSIGNED_INT_SAMPLER_CUBE = 0x8DD4, + GL_UNSIGNED_INT_SAMPLER_2D_ARRAY = 0x8DD7, + GL_BUFFER_ACCESS_FLAGS = 0x911F, + GL_BUFFER_MAP_LENGTH = 0x9120, + GL_BUFFER_MAP_OFFSET = 0x9121, + GL_DEPTH_COMPONENT32F = 0x8CAC, + GL_DEPTH32F_STENCIL8 = 0x8CAD, + GL_FLOAT_32_UNSIGNED_INT_24_8_REV = 0x8DAD, + GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 0x8210, + GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 0x8211, + GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE = 0x8212, + GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 0x8213, + GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 0x8214, + GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 0x8215, + GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 0x8216, + GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 0x8217, + GL_FRAMEBUFFER_DEFAULT = 0x8218, + GL_FRAMEBUFFER_UNDEFINED = 0x8219, + GL_DEPTH_STENCIL_ATTACHMENT = 0x821A, + GL_DEPTH_STENCIL = 0x84F9, + GL_UNSIGNED_INT_24_8 = 0x84FA, + GL_DEPTH24_STENCIL8 = 0x88F0, + GL_UNSIGNED_NORMALIZED = 0x8C17, + GL_DRAW_FRAMEBUFFER_BINDING = 0x8CA6, + GL_READ_FRAMEBUFFER = 0x8CA8, + GL_DRAW_FRAMEBUFFER = 0x8CA9, + GL_READ_FRAMEBUFFER_BINDING = 0x8CAA, + GL_RENDERBUFFER_SAMPLES = 0x8CAB, + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 0x8CD4, + GL_MAX_COLOR_ATTACHMENTS = 0x8CDF, + GL_COLOR_ATTACHMENT1 = 0x8CE1, + GL_COLOR_ATTACHMENT2 = 0x8CE2, + GL_COLOR_ATTACHMENT3 = 0x8CE3, + GL_COLOR_ATTACHMENT4 = 0x8CE4, + GL_COLOR_ATTACHMENT5 = 0x8CE5, + GL_COLOR_ATTACHMENT6 = 0x8CE6, + GL_COLOR_ATTACHMENT7 = 0x8CE7, + GL_COLOR_ATTACHMENT8 = 0x8CE8, + GL_COLOR_ATTACHMENT9 = 0x8CE9, + GL_COLOR_ATTACHMENT10 = 0x8CEA, + GL_COLOR_ATTACHMENT11 = 0x8CEB, + GL_COLOR_ATTACHMENT12 = 0x8CEC, + GL_COLOR_ATTACHMENT13 = 0x8CED, + GL_COLOR_ATTACHMENT14 = 0x8CEE, + GL_COLOR_ATTACHMENT15 = 0x8CEF, + GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 0x8D56, + GL_MAX_SAMPLES = 0x8D57, + GL_HALF_FLOAT = 0x140B, + GL_MAP_READ_BIT = 0x1, + GL_MAP_WRITE_BIT = 0x2, + GL_MAP_INVALIDATE_RANGE_BIT = 0x4, + GL_MAP_INVALIDATE_BUFFER_BIT = 0x8, + GL_MAP_FLUSH_EXPLICIT_BIT = 0x10, + GL_MAP_UNSYNCHRONIZED_BIT = 0x20, + GL_RG = 0x8227, + GL_RG_INTEGER = 0x8228, + GL_R8 = 0x8229, + GL_RG8 = 0x822B, + GL_R16F = 0x822D, + GL_R32F = 0x822E, + GL_RG16F = 0x822F, + GL_RG32F = 0x8230, + GL_R8I = 0x8231, + GL_R8UI = 0x8232, + GL_R16I = 0x8233, + GL_R16UI = 0x8234, + GL_R32I = 0x8235, + GL_R32UI = 0x8236, + GL_RG8I = 0x8237, + GL_RG8UI = 0x8238, + GL_RG16I = 0x8239, + GL_RG16UI = 0x823A, + GL_RG32I = 0x823B, + GL_RG32UI = 0x823C, + GL_VERTEX_ARRAY_BINDING = 0x85B5, + GL_R8_SNORM = 0x8F94, + GL_RG8_SNORM = 0x8F95, + GL_RGB8_SNORM = 0x8F96, + GL_RGBA8_SNORM = 0x8F97, + GL_SIGNED_NORMALIZED = 0x8F9C, + GL_PRIMITIVE_RESTART_FIXED_INDEX = 0x8D69, + GL_COPY_READ_BUFFER = 0x8F36, + GL_COPY_WRITE_BUFFER = 0x8F37, + GL_COPY_READ_BUFFER_BINDING = 0x8F36, + GL_COPY_WRITE_BUFFER_BINDING = 0x8F37, + GL_UNIFORM_BUFFER = 0x8A11, + GL_UNIFORM_BUFFER_BINDING = 0x8A28, + GL_UNIFORM_BUFFER_START = 0x8A29, + GL_UNIFORM_BUFFER_SIZE = 0x8A2A, + GL_MAX_VERTEX_UNIFORM_BLOCKS = 0x8A2B, + GL_MAX_FRAGMENT_UNIFORM_BLOCKS = 0x8A2D, + GL_MAX_COMBINED_UNIFORM_BLOCKS = 0x8A2E, + GL_MAX_UNIFORM_BUFFER_BINDINGS = 0x8A2F, + GL_MAX_UNIFORM_BLOCK_SIZE = 0x8A30, + GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 0x8A31, + GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 0x8A33, + GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = 0x8A34, + GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = 0x8A35, + GL_ACTIVE_UNIFORM_BLOCKS = 0x8A36, + GL_UNIFORM_TYPE = 0x8A37, + GL_UNIFORM_SIZE = 0x8A38, + GL_UNIFORM_NAME_LENGTH = 0x8A39, + GL_UNIFORM_BLOCK_INDEX = 0x8A3A, + GL_UNIFORM_OFFSET = 0x8A3B, + GL_UNIFORM_ARRAY_STRIDE = 0x8A3C, + GL_UNIFORM_MATRIX_STRIDE = 0x8A3D, + GL_UNIFORM_IS_ROW_MAJOR = 0x8A3E, + GL_UNIFORM_BLOCK_BINDING = 0x8A3F, + GL_UNIFORM_BLOCK_DATA_SIZE = 0x8A40, + GL_UNIFORM_BLOCK_NAME_LENGTH = 0x8A41, + GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS = 0x8A42, + GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 0x8A43, + GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 0x8A44, + GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 0x8A46, + GL_INVALID_INDEX = 0xFFFFFFFF, + GL_MAX_VERTEX_OUTPUT_COMPONENTS = 0x9122, + GL_MAX_FRAGMENT_INPUT_COMPONENTS = 0x9125, + GL_MAX_SERVER_WAIT_TIMEOUT = 0x9111, + GL_OBJECT_TYPE = 0x9112, + GL_SYNC_CONDITION = 0x9113, + GL_SYNC_STATUS = 0x9114, + GL_SYNC_FLAGS = 0x9115, + GL_SYNC_FENCE = 0x9116, + GL_SYNC_GPU_COMMANDS_COMPLETE = 0x9117, + GL_UNSIGNALED = 0x9118, + GL_SIGNALED = 0x9119, + GL_ALREADY_SIGNALED = 0x911A, + GL_TIMEOUT_EXPIRED = 0x911B, + GL_CONDITION_SATISFIED = 0x911C, + GL_WAIT_FAILED = 0x911D, + GL_SYNC_FLUSH_COMMANDS_BIT = 0x1; + + public static final long GL_TIMEOUT_IGNORED = 0xFFFFFFFFFFFFFFFFL; + + public static final int GL_VERTEX_ATTRIB_ARRAY_DIVISOR = 0x88FE, + GL_ANY_SAMPLES_PASSED = 0x8C2F, + GL_ANY_SAMPLES_PASSED_CONSERVATIVE = 0x8D6A, + GL_SAMPLER_BINDING = 0x8919, + GL_RGB10_A2UI = 0x906F, + GL_TEXTURE_SWIZZLE_R = 0x8E42, + GL_TEXTURE_SWIZZLE_G = 0x8E43, + GL_TEXTURE_SWIZZLE_B = 0x8E44, + GL_TEXTURE_SWIZZLE_A = 0x8E45, + GL_GREEN = 0x1904, + GL_BLUE = 0x1905, + GL_INT_2_10_10_10_REV = 0x8D9F, + GL_TRANSFORM_FEEDBACK = 0x8E22, + GL_TRANSFORM_FEEDBACK_PAUSED = 0x8E23, + GL_TRANSFORM_FEEDBACK_ACTIVE = 0x8E24, + GL_TRANSFORM_FEEDBACK_BINDING = 0x8E25, + GL_PROGRAM_BINARY_RETRIEVABLE_HINT = 0x8257, + GL_PROGRAM_BINARY_LENGTH = 0x8741, + GL_NUM_PROGRAM_BINARY_FORMATS = 0x87FE, + GL_PROGRAM_BINARY_FORMATS = 0x87FF, + GL_COMPRESSED_R11_EAC = 0x9270, + GL_COMPRESSED_SIGNED_R11_EAC = 0x9271, + GL_COMPRESSED_RG11_EAC = 0x9272, + GL_COMPRESSED_SIGNED_RG11_EAC = 0x9273, + GL_COMPRESSED_RGB8_ETC2 = 0x9274, + GL_COMPRESSED_SRGB8_ETC2 = 0x9275, + GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9276, + GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277, + GL_COMPRESSED_RGBA8_ETC2_EAC = 0x9278, + GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 0x9279, + GL_TEXTURE_IMMUTABLE_FORMAT = 0x912F, + GL_MAX_ELEMENT_INDEX = 0x8D6B, + GL_NUM_SAMPLE_COUNTS = 0x9380; + + private GLES30() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glReadBuffer(int mode) { + nglReadBuffer(mode); + } + static native void nglReadBuffer(int mode); + + public static void glDrawRangeElements(int mode, int start, int end, ByteBuffer indices) { + GLChecks.ensureElementVBOdisabled(); + BufferChecks.checkDirect(indices); + nglDrawRangeElements(mode, start, end, indices.remaining(), GLES20.GL_UNSIGNED_BYTE, MemoryUtil.getAddress(indices)); + } + public static void glDrawRangeElements(int mode, int start, int end, IntBuffer indices) { + GLChecks.ensureElementVBOdisabled(); + BufferChecks.checkDirect(indices); + nglDrawRangeElements(mode, start, end, indices.remaining(), GLES20.GL_UNSIGNED_INT, MemoryUtil.getAddress(indices)); + } + public static void glDrawRangeElements(int mode, int start, int end, ShortBuffer indices) { + GLChecks.ensureElementVBOdisabled(); + BufferChecks.checkDirect(indices); + nglDrawRangeElements(mode, start, end, indices.remaining(), GLES20.GL_UNSIGNED_SHORT, MemoryUtil.getAddress(indices)); + } + static native void nglDrawRangeElements(int mode, int start, int end, int indices_count, int type, long indices); + public static void glDrawRangeElements(int mode, int start, int end, int indices_count, int type, long indices_buffer_offset) { + GLChecks.ensureElementVBOenabled(); + nglDrawRangeElementsBO(mode, start, end, indices_count, type, indices_buffer_offset); + } + static native void nglDrawRangeElementsBO(int mode, int start, int end, int indices_count, int type, long indices_buffer_offset); + + public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, ByteBuffer pixels) { + GLChecks.ensureUnpackPBOdisabled(); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth)); + nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, MemoryUtil.getAddressSafe(pixels)); + } + public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, FloatBuffer pixels) { + GLChecks.ensureUnpackPBOdisabled(); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth)); + nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, MemoryUtil.getAddressSafe(pixels)); + } + public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, IntBuffer pixels) { + GLChecks.ensureUnpackPBOdisabled(); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth)); + nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, MemoryUtil.getAddressSafe(pixels)); + } + public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, ShortBuffer pixels) { + GLChecks.ensureUnpackPBOdisabled(); + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth)); + nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, MemoryUtil.getAddressSafe(pixels)); + } + static native void nglTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, long pixels); + public static void glTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, long pixels_buffer_offset) { + GLChecks.ensureUnpackPBOenabled(); + nglTexImage3DBO(target, level, internalFormat, width, height, depth, border, format, type, pixels_buffer_offset); + } + static native void nglTexImage3DBO(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, long pixels_buffer_offset); + + public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, ByteBuffer pixels) { + GLChecks.ensureUnpackPBOdisabled(); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, depth)); + nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddress(pixels)); + } + public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, FloatBuffer pixels) { + GLChecks.ensureUnpackPBOdisabled(); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, depth)); + nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddress(pixels)); + } + public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, IntBuffer pixels) { + GLChecks.ensureUnpackPBOdisabled(); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, depth)); + nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddress(pixels)); + } + public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, ShortBuffer pixels) { + GLChecks.ensureUnpackPBOdisabled(); + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, depth)); + nglTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddress(pixels)); + } + static native void nglTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, long pixels); + public static void glTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, long pixels_buffer_offset) { + GLChecks.ensureUnpackPBOenabled(); + nglTexSubImage3DBO(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels_buffer_offset); + } + static native void nglTexSubImage3DBO(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, long pixels_buffer_offset); + + public static void glCopyTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height) { + nglCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height); + } + static native void nglCopyTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height); + + public static void glCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, ByteBuffer data) { + GLChecks.ensureUnpackPBOdisabled(); + BufferChecks.checkDirect(data); + nglCompressedTexImage3D(target, level, internalformat, width, height, depth, border, data.remaining(), MemoryUtil.getAddress(data)); + } + static native void nglCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int data_imageSize, long data); + public static void glCompressedTexImage3D(int target, int level, int internalformat, int width, int height, int depth, int border, int data_imageSize, long data_buffer_offset) { + GLChecks.ensureUnpackPBOenabled(); + nglCompressedTexImage3DBO(target, level, internalformat, width, height, depth, border, data_imageSize, data_buffer_offset); + } + static native void nglCompressedTexImage3DBO(int target, int level, int internalformat, int width, int height, int depth, int border, int data_imageSize, long data_buffer_offset); + + public static void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, ByteBuffer data) { + GLChecks.ensureUnpackPBOdisabled(); + BufferChecks.checkDirect(data); + nglCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, data.remaining(), MemoryUtil.getAddress(data)); + } + static native void nglCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int data_imageSize, long data); + public static void glCompressedTexSubImage3D(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int data_imageSize, long data_buffer_offset) { + GLChecks.ensureUnpackPBOenabled(); + nglCompressedTexSubImage3DBO(target, level, xoffset, yoffset, zoffset, width, height, depth, format, data_imageSize, data_buffer_offset); + } + static native void nglCompressedTexSubImage3DBO(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int data_imageSize, long data_buffer_offset); + + public static void glGenQueries(IntBuffer ids) { + BufferChecks.checkDirect(ids); + nglGenQueries(ids.remaining(), MemoryUtil.getAddress(ids)); + } + static native void nglGenQueries(int ids_n, long ids); + + /** Overloads glGenQueries. */ + public static int glGenQueries() { + IntBuffer ids = APIUtil.getBufferInt(); + nglGenQueries(1, MemoryUtil.getAddress(ids)); + return ids.get(0); + } + + public static void glDeleteQueries(IntBuffer ids) { + BufferChecks.checkDirect(ids); + nglDeleteQueries(ids.remaining(), MemoryUtil.getAddress(ids)); + } + static native void nglDeleteQueries(int ids_n, long ids); + + /** Overloads glDeleteQueries. */ + public static void glDeleteQueries(int id) { + nglDeleteQueries(1, APIUtil.getInt(id)); + } + + public static boolean glIsQuery(int id) { + boolean __result = nglIsQuery(id); + return __result; + } + static native boolean nglIsQuery(int id); + + public static void glBeginQuery(int target, int id) { + nglBeginQuery(target, id); + } + static native void nglBeginQuery(int target, int id); + + public static void glEndQuery(int target) { + nglEndQuery(target); + } + static native void nglEndQuery(int target); + + public static void glGetQuery(int target, int pname, IntBuffer params) { + BufferChecks.checkBuffer(params, 1); + nglGetQueryiv(target, pname, MemoryUtil.getAddress(params)); + } + static native void nglGetQueryiv(int target, int pname, long params); + + /** Overloads glGetQueryiv. */ + public static int glGetQueryi(int target, int pname) { + IntBuffer params = APIUtil.getBufferInt(); + nglGetQueryiv(target, pname, MemoryUtil.getAddress(params)); + return params.get(0); + } + + public static void glGetQueryObjectu(int id, int pname, IntBuffer params) { + BufferChecks.checkBuffer(params, 1); + nglGetQueryObjectuiv(id, pname, MemoryUtil.getAddress(params)); + } + static native void nglGetQueryObjectuiv(int id, int pname, long params); + + /** Overloads glGetQueryObjectuiv. */ + public static int glGetQueryObjectui(int id, int pname) { + IntBuffer params = APIUtil.getBufferInt(); + nglGetQueryObjectuiv(id, pname, MemoryUtil.getAddress(params)); + return params.get(0); + } + + public static boolean glUnmapBuffer(int target) { + boolean __result = nglUnmapBuffer(target); + return __result; + } + static native boolean nglUnmapBuffer(int target); + + public static ByteBuffer glGetBufferPointer(int target, int pname) { + ByteBuffer __result = nglGetBufferPointerv(target, pname, GLChecks.getBufferObjectSize(target)); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + static native ByteBuffer nglGetBufferPointerv(int target, int pname, long result_size); + + public static void glDrawBuffers(IntBuffer buffers) { + BufferChecks.checkDirect(buffers); + nglDrawBuffers(buffers.remaining(), MemoryUtil.getAddress(buffers)); + } + static native void nglDrawBuffers(int buffers_size, long buffers); + + /** Overloads glDrawBuffers. */ + public static void glDrawBuffers(int buffer) { + nglDrawBuffers(1, APIUtil.getInt(buffer)); + } + + public static void glUniformMatrix2x3(int location, boolean transpose, FloatBuffer matrices) { + BufferChecks.checkDirect(matrices); + nglUniformMatrix2x3fv(location, matrices.remaining() / (2 * 3), transpose, MemoryUtil.getAddress(matrices)); + } + static native void nglUniformMatrix2x3fv(int location, int matrices_count, boolean transpose, long matrices); + + public static void glUniformMatrix3x2(int location, boolean transpose, FloatBuffer matrices) { + BufferChecks.checkDirect(matrices); + nglUniformMatrix3x2fv(location, matrices.remaining() / (3 * 2), transpose, MemoryUtil.getAddress(matrices)); + } + static native void nglUniformMatrix3x2fv(int location, int matrices_count, boolean transpose, long matrices); + + public static void glUniformMatrix2x4(int location, boolean transpose, FloatBuffer matrices) { + BufferChecks.checkDirect(matrices); + nglUniformMatrix2x4fv(location, matrices.remaining() >> 3, transpose, MemoryUtil.getAddress(matrices)); + } + static native void nglUniformMatrix2x4fv(int location, int matrices_count, boolean transpose, long matrices); + + public static void glUniformMatrix4x2(int location, boolean transpose, FloatBuffer matrices) { + BufferChecks.checkDirect(matrices); + nglUniformMatrix4x2fv(location, matrices.remaining() >> 3, transpose, MemoryUtil.getAddress(matrices)); + } + static native void nglUniformMatrix4x2fv(int location, int matrices_count, boolean transpose, long matrices); + + public static void glUniformMatrix3x4(int location, boolean transpose, FloatBuffer matrices) { + BufferChecks.checkDirect(matrices); + nglUniformMatrix3x4fv(location, matrices.remaining() / (3 * 4), transpose, MemoryUtil.getAddress(matrices)); + } + static native void nglUniformMatrix3x4fv(int location, int matrices_count, boolean transpose, long matrices); + + public static void glUniformMatrix4x3(int location, boolean transpose, FloatBuffer matrices) { + BufferChecks.checkDirect(matrices); + nglUniformMatrix4x3fv(location, matrices.remaining() / (4 * 3), transpose, MemoryUtil.getAddress(matrices)); + } + static native void nglUniformMatrix4x3fv(int location, int matrices_count, boolean transpose, long matrices); + + /** + * Transfers a rectangle of pixel values from one + * region of the read framebuffer to another in the draw framebuffer. + * <mask> is the bitwise OR of a number of values indicating which + * buffers are to be copied. The values are COLOR_BUFFER_BIT, + * DEPTH_BUFFER_BIT, and STENCIL_BUFFER_BIT. + * The pixels corresponding to these buffers are + * copied from the source rectangle, bound by the locations (srcX0, + * srcY0) and (srcX1, srcY1) inclusive, to the destination rectangle, + * bound by the locations (dstX0, dstY0) and (dstX1, dstY1) + * inclusive. + * If the source and destination rectangle dimensions do not match, + * the source image is stretched to fit the destination + * rectangle. <filter> must be LINEAR or NEAREST and specifies the + * method of interpolation to be applied if the image is + * stretched. + */ + public static void glBlitFramebuffer(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, int mask, int filter) { + nglBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); + } + static native void nglBlitFramebuffer(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, int mask, int filter); + + /** + * Establishes the data storage, format, dimensions, and number of + * samples of a renderbuffer object's image. + */ + public static void glRenderbufferStorageMultisample(int target, int samples, int internalformat, int width, int height) { + nglRenderbufferStorageMultisample(target, samples, internalformat, width, height); + } + static native void nglRenderbufferStorageMultisample(int target, int samples, int internalformat, int width, int height); + + public static void glFramebufferTextureLayer(int target, int attachment, int texture, int level, int layer) { + nglFramebufferTextureLayer(target, attachment, texture, level, layer); + } + static native void nglFramebufferTextureLayer(int target, int attachment, int texture, int level, int layer); + + /** + * glMapBufferRange maps a GL buffer object range to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapBufferRange like this: + *

+ * ByteBuffer mapped_buffer; mapped_buffer = glMapBufferRange(..., ..., ..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBufferRange(..., ..., ..., ..., mapped_buffer); + *

+ * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + *

+ * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. + *

+ * @return A ByteBuffer representing the mapped buffer memory. + */ + public static ByteBuffer glMapBufferRange(int target, long offset, long length, int access, ByteBuffer old_buffer) { + if (old_buffer != null) + BufferChecks.checkDirect(old_buffer); + ByteBuffer __result = nglMapBufferRange(target, offset, length, access, old_buffer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + static native ByteBuffer nglMapBufferRange(int target, long offset, long length, int access, ByteBuffer old_buffer); + + public static void glFlushMappedBufferRange(int target, long offset, long length) { + nglFlushMappedBufferRange(target, offset, length); + } + static native void nglFlushMappedBufferRange(int target, long offset, long length); + + public static void glBindVertexArray(int array) { + StateTracker.bindVAO(array); + nglBindVertexArray(array); + } + static native void nglBindVertexArray(int array); + + public static void glDeleteVertexArrays(IntBuffer arrays) { + StateTracker.deleteVAO(arrays); + BufferChecks.checkDirect(arrays); + nglDeleteVertexArrays(arrays.remaining(), MemoryUtil.getAddress(arrays)); + } + static native void nglDeleteVertexArrays(int arrays_n, long arrays); + + /** Overloads glDeleteVertexArrays. */ + public static void glDeleteVertexArrays(int array) { + StateTracker.deleteVAO(array); + nglDeleteVertexArrays(1, APIUtil.getInt(array)); + } + + public static void glGenVertexArrays(IntBuffer arrays) { + BufferChecks.checkDirect(arrays); + nglGenVertexArrays(arrays.remaining(), MemoryUtil.getAddress(arrays)); + } + static native void nglGenVertexArrays(int arrays_n, long arrays); + + /** Overloads glGenVertexArrays. */ + public static int glGenVertexArrays() { + IntBuffer arrays = APIUtil.getBufferInt(); + nglGenVertexArrays(1, MemoryUtil.getAddress(arrays)); + return arrays.get(0); + } + + public static boolean glIsVertexArray(int array) { + boolean __result = nglIsVertexArray(array); + return __result; + } + static native boolean nglIsVertexArray(int array); + + public static void glGetInteger(int value, int index, IntBuffer data) { + BufferChecks.checkBuffer(data, 4); + nglGetIntegeri_v(value, index, MemoryUtil.getAddress(data)); + } + static native void nglGetIntegeri_v(int value, int index, long data); + + /** Overloads glGetIntegeri_v. */ + public static int glGetInteger(int value, int index) { + IntBuffer data = APIUtil.getBufferInt(); + nglGetIntegeri_v(value, index, MemoryUtil.getAddress(data)); + return data.get(0); + } + + public static void glBeginTransformFeedback(int primitiveMode) { + nglBeginTransformFeedback(primitiveMode); + } + static native void nglBeginTransformFeedback(int primitiveMode); + + public static void glEndTransformFeedback() { + nglEndTransformFeedback(); + } + static native void nglEndTransformFeedback(); + + public static void glBindBufferRange(int target, int index, int buffer, long offset, long size) { + nglBindBufferRange(target, index, buffer, offset, size); + } + static native void nglBindBufferRange(int target, int index, int buffer, long offset, long size); + + public static void glBindBufferBase(int target, int index, int buffer) { + nglBindBufferBase(target, index, buffer); + } + static native void nglBindBufferBase(int target, int index, int buffer); + + public static void glTransformFeedbackVaryings(int program, int count, ByteBuffer varyings, int bufferMode) { + BufferChecks.checkDirect(varyings); + BufferChecks.checkNullTerminated(varyings, count); + nglTransformFeedbackVaryings(program, count, MemoryUtil.getAddress(varyings), bufferMode); + } + static native void nglTransformFeedbackVaryings(int program, int count, long varyings, int bufferMode); + + /** Overloads glTransformFeedbackVaryings. */ + public static void glTransformFeedbackVaryings(int program, CharSequence[] varyings, int bufferMode) { + BufferChecks.checkArray(varyings); + nglTransformFeedbackVaryings(program, varyings.length, APIUtil.getBufferNT(varyings), bufferMode); + } + + public static void glGetTransformFeedbackVarying(int program, int index, IntBuffer length, IntBuffer size, IntBuffer type, ByteBuffer name) { + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkBuffer(size, 1); + BufferChecks.checkBuffer(type, 1); + BufferChecks.checkDirect(name); + nglGetTransformFeedbackVarying(program, index, name.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(size), MemoryUtil.getAddress(type), MemoryUtil.getAddress(name)); + } + static native void nglGetTransformFeedbackVarying(int program, int index, int name_bufSize, long length, long size, long type, long name); + + /** Overloads glGetTransformFeedbackVarying. */ + public static String glGetTransformFeedbackVarying(int program, int index, int bufSize, IntBuffer size, IntBuffer type) { + BufferChecks.checkBuffer(size, 1); + BufferChecks.checkBuffer(type, 1); + IntBuffer name_length = APIUtil.getLengths(); + ByteBuffer name = APIUtil.getBufferByte(bufSize); + nglGetTransformFeedbackVarying(program, index, bufSize, MemoryUtil.getAddress0(name_length), MemoryUtil.getAddress(size), MemoryUtil.getAddress(type), MemoryUtil.getAddress(name)); + name.limit(name_length.get(0)); + return APIUtil.getString(name); + } + + public static void glVertexAttribIPointer(int index, int size, int type, int stride, ByteBuffer buffer) { + GLChecks.ensureArrayVBOdisabled(); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getTracker().glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribIPointer(index, size, type, stride, MemoryUtil.getAddress(buffer)); + } + public static void glVertexAttribIPointer(int index, int size, int type, int stride, IntBuffer buffer) { + GLChecks.ensureArrayVBOdisabled(); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getTracker().glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribIPointer(index, size, type, stride, MemoryUtil.getAddress(buffer)); + } + public static void glVertexAttribIPointer(int index, int size, int type, int stride, ShortBuffer buffer) { + GLChecks.ensureArrayVBOdisabled(); + BufferChecks.checkDirect(buffer); + if ( LWJGLUtil.CHECKS ) StateTracker.getTracker().glVertexAttribPointer_buffer[index] = buffer; + nglVertexAttribIPointer(index, size, type, stride, MemoryUtil.getAddress(buffer)); + } + static native void nglVertexAttribIPointer(int index, int size, int type, int stride, long buffer); + public static void glVertexAttribIPointer(int index, int size, int type, int stride, long buffer_buffer_offset) { + GLChecks.ensureArrayVBOenabled(); + nglVertexAttribIPointerBO(index, size, type, stride, buffer_buffer_offset); + } + static native void nglVertexAttribIPointerBO(int index, int size, int type, int stride, long buffer_buffer_offset); + + public static void glGetVertexAttribI(int index, int pname, IntBuffer params) { + BufferChecks.checkBuffer(params, 4); + nglGetVertexAttribIiv(index, pname, MemoryUtil.getAddress(params)); + } + static native void nglGetVertexAttribIiv(int index, int pname, long params); + + public static void glGetVertexAttribIu(int index, int pname, IntBuffer params) { + BufferChecks.checkBuffer(params, 4); + nglGetVertexAttribIuiv(index, pname, MemoryUtil.getAddress(params)); + } + static native void nglGetVertexAttribIuiv(int index, int pname, long params); + + public static void glVertexAttribI4i(int index, int x, int y, int z, int w) { + nglVertexAttribI4i(index, x, y, z, w); + } + static native void nglVertexAttribI4i(int index, int x, int y, int z, int w); + + public static void glVertexAttribI4ui(int index, int x, int y, int z, int w) { + nglVertexAttribI4ui(index, x, y, z, w); + } + static native void nglVertexAttribI4ui(int index, int x, int y, int z, int w); + + public static void glVertexAttribI4(int index, IntBuffer v) { + BufferChecks.checkBuffer(v, 4); + nglVertexAttribI4iv(index, MemoryUtil.getAddress(v)); + } + static native void nglVertexAttribI4iv(int index, long v); + + public static void glVertexAttribI4u(int index, IntBuffer v) { + BufferChecks.checkBuffer(v, 4); + nglVertexAttribI4uiv(index, MemoryUtil.getAddress(v)); + } + static native void nglVertexAttribI4uiv(int index, long v); + + public static void glGetUniformu(int program, int location, IntBuffer params) { + BufferChecks.checkDirect(params); + nglGetUniformuiv(program, location, MemoryUtil.getAddress(params)); + } + static native void nglGetUniformuiv(int program, int location, long params); + + public static int glGetFragDataLocation(int program, ByteBuffer name) { + BufferChecks.checkDirect(name); + BufferChecks.checkNullTerminated(name); + int __result = nglGetFragDataLocation(program, MemoryUtil.getAddress(name)); + return __result; + } + static native int nglGetFragDataLocation(int program, long name); + + /** Overloads glGetFragDataLocation. */ + public static int glGetFragDataLocation(int program, CharSequence name) { + int __result = nglGetFragDataLocation(program, APIUtil.getBufferNT(name)); + return __result; + } + + public static void glUniform1ui(int location, int v0) { + nglUniform1ui(location, v0); + } + static native void nglUniform1ui(int location, int v0); + + public static void glUniform2ui(int location, int v0, int v1) { + nglUniform2ui(location, v0, v1); + } + static native void nglUniform2ui(int location, int v0, int v1); + + public static void glUniform3ui(int location, int v0, int v1, int v2) { + nglUniform3ui(location, v0, v1, v2); + } + static native void nglUniform3ui(int location, int v0, int v1, int v2); + + public static void glUniform4ui(int location, int v0, int v1, int v2, int v3) { + nglUniform4ui(location, v0, v1, v2, v3); + } + static native void nglUniform4ui(int location, int v0, int v1, int v2, int v3); + + public static void glUniform1u(int location, IntBuffer value) { + BufferChecks.checkDirect(value); + nglUniform1uiv(location, value.remaining(), MemoryUtil.getAddress(value)); + } + static native void nglUniform1uiv(int location, int value_count, long value); + + public static void glUniform2u(int location, IntBuffer value) { + BufferChecks.checkDirect(value); + nglUniform2uiv(location, value.remaining() >> 1, MemoryUtil.getAddress(value)); + } + static native void nglUniform2uiv(int location, int value_count, long value); + + public static void glUniform3u(int location, IntBuffer value) { + BufferChecks.checkDirect(value); + nglUniform3uiv(location, value.remaining() / 3, MemoryUtil.getAddress(value)); + } + static native void nglUniform3uiv(int location, int value_count, long value); + + public static void glUniform4u(int location, IntBuffer value) { + BufferChecks.checkDirect(value); + nglUniform4uiv(location, value.remaining() >> 2, MemoryUtil.getAddress(value)); + } + static native void nglUniform4uiv(int location, int value_count, long value); + + public static void glClearBuffer(int buffer, int drawbuffer, FloatBuffer value) { + BufferChecks.checkBuffer(value, 4); + nglClearBufferfv(buffer, drawbuffer, MemoryUtil.getAddress(value)); + } + static native void nglClearBufferfv(int buffer, int drawbuffer, long value); + + public static void glClearBuffer(int buffer, int drawbuffer, IntBuffer value) { + BufferChecks.checkBuffer(value, 4); + nglClearBufferiv(buffer, drawbuffer, MemoryUtil.getAddress(value)); + } + static native void nglClearBufferiv(int buffer, int drawbuffer, long value); + + public static void glClearBufferu(int buffer, int drawbuffer, IntBuffer value) { + BufferChecks.checkBuffer(value, 4); + nglClearBufferuiv(buffer, drawbuffer, MemoryUtil.getAddress(value)); + } + static native void nglClearBufferuiv(int buffer, int drawbuffer, long value); + + public static void glClearBufferfi(int buffer, int drawbuffer, float depth, int stencil) { + nglClearBufferfi(buffer, drawbuffer, depth, stencil); + } + static native void nglClearBufferfi(int buffer, int drawbuffer, float depth, int stencil); + + public static String glGetStringi(int name, int index) { + String __result = nglGetStringi(name, index); + return __result; + } + static native String nglGetStringi(int name, int index); + + public static void glCopyBufferSubData(int readtarget, int writetarget, long readoffset, long writeoffset, long size) { + nglCopyBufferSubData(readtarget, writetarget, readoffset, writeoffset, size); + } + static native void nglCopyBufferSubData(int readtarget, int writetarget, long readoffset, long writeoffset, long size); + + public static void glGetUniformIndices(int program, ByteBuffer uniformNames, IntBuffer uniformIndices) { + BufferChecks.checkDirect(uniformNames); + BufferChecks.checkNullTerminated(uniformNames, uniformIndices.remaining()); + BufferChecks.checkDirect(uniformIndices); + nglGetUniformIndices(program, uniformIndices.remaining(), MemoryUtil.getAddress(uniformNames), MemoryUtil.getAddress(uniformIndices)); + } + static native void nglGetUniformIndices(int program, int uniformIndices_uniformCount, long uniformNames, long uniformIndices); + + /** Overloads glGetUniformIndices. */ + public static void glGetUniformIndices(int program, CharSequence[] uniformNames, IntBuffer uniformIndices) { + BufferChecks.checkArray(uniformNames); + BufferChecks.checkBuffer(uniformIndices, uniformNames.length); + nglGetUniformIndices(program, uniformNames.length, APIUtil.getBufferNT(uniformNames), MemoryUtil.getAddress(uniformIndices)); + } + + public static void glGetActiveUniforms(int program, IntBuffer uniformIndices, int pname, IntBuffer params) { + BufferChecks.checkDirect(uniformIndices); + BufferChecks.checkBuffer(params, uniformIndices.remaining()); + nglGetActiveUniformsiv(program, uniformIndices.remaining(), MemoryUtil.getAddress(uniformIndices), pname, MemoryUtil.getAddress(params)); + } + static native void nglGetActiveUniformsiv(int program, int uniformIndices_uniformCount, long uniformIndices, int pname, long params); + + /** Overloads glGetActiveUniformsiv. */ + public static int glGetActiveUniformsi(int program, int uniformIndex, int pname) { + IntBuffer params = APIUtil.getBufferInt(); + nglGetActiveUniformsiv(program, 1, MemoryUtil.getAddress(params.put(1, uniformIndex), 1), pname, MemoryUtil.getAddress(params)); + return params.get(0); + } + + public static int glGetUniformBlockIndex(int program, ByteBuffer uniformBlockName) { + BufferChecks.checkDirect(uniformBlockName); + BufferChecks.checkNullTerminated(uniformBlockName); + int __result = nglGetUniformBlockIndex(program, MemoryUtil.getAddress(uniformBlockName)); + return __result; + } + static native int nglGetUniformBlockIndex(int program, long uniformBlockName); + + /** Overloads glGetUniformBlockIndex. */ + public static int glGetUniformBlockIndex(int program, CharSequence uniformBlockName) { + int __result = nglGetUniformBlockIndex(program, APIUtil.getBufferNT(uniformBlockName)); + return __result; + } + + public static void glGetActiveUniformBlock(int program, int uniformBlockIndex, int pname, IntBuffer params) { + BufferChecks.checkBuffer(params, 16); + nglGetActiveUniformBlockiv(program, uniformBlockIndex, pname, MemoryUtil.getAddress(params)); + } + static native void nglGetActiveUniformBlockiv(int program, int uniformBlockIndex, int pname, long params); + + /** Overloads glGetActiveUniformBlockiv. */ + public static int glGetActiveUniformBlocki(int program, int uniformBlockIndex, int pname) { + IntBuffer params = APIUtil.getBufferInt(); + nglGetActiveUniformBlockiv(program, uniformBlockIndex, pname, MemoryUtil.getAddress(params)); + return params.get(0); + } + + public static void glGetActiveUniformBlockName(int program, int uniformBlockIndex, IntBuffer length, ByteBuffer uniformBlockName) { + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkDirect(uniformBlockName); + nglGetActiveUniformBlockName(program, uniformBlockIndex, uniformBlockName.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(uniformBlockName)); + } + static native void nglGetActiveUniformBlockName(int program, int uniformBlockIndex, int uniformBlockName_bufSize, long length, long uniformBlockName); + + /** Overloads glGetActiveUniformBlockName. */ + public static String glGetActiveUniformBlockName(int program, int uniformBlockIndex, int bufSize) { + IntBuffer uniformBlockName_length = APIUtil.getLengths(); + ByteBuffer uniformBlockName = APIUtil.getBufferByte(bufSize); + nglGetActiveUniformBlockName(program, uniformBlockIndex, bufSize, MemoryUtil.getAddress0(uniformBlockName_length), MemoryUtil.getAddress(uniformBlockName)); + uniformBlockName.limit(uniformBlockName_length.get(0)); + return APIUtil.getString(uniformBlockName); + } + + public static void glUniformBlockBinding(int program, int uniformBlockIndex, int uniformBlockBinding) { + nglUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding); + } + static native void nglUniformBlockBinding(int program, int uniformBlockIndex, int uniformBlockBinding); + + public static void glDrawArraysInstanced(int mode, int first, int count, int primcount) { + nglDrawArraysInstanced(mode, first, count, primcount); + } + static native void nglDrawArraysInstanced(int mode, int first, int count, int primcount); + + public static void glDrawElementsInstanced(int mode, ByteBuffer indices, int primcount) { + GLChecks.ensureElementVBOdisabled(); + BufferChecks.checkDirect(indices); + nglDrawElementsInstanced(mode, indices.remaining(), GLES20.GL_UNSIGNED_BYTE, MemoryUtil.getAddress(indices), primcount); + } + public static void glDrawElementsInstanced(int mode, IntBuffer indices, int primcount) { + GLChecks.ensureElementVBOdisabled(); + BufferChecks.checkDirect(indices); + nglDrawElementsInstanced(mode, indices.remaining(), GLES20.GL_UNSIGNED_INT, MemoryUtil.getAddress(indices), primcount); + } + public static void glDrawElementsInstanced(int mode, ShortBuffer indices, int primcount) { + GLChecks.ensureElementVBOdisabled(); + BufferChecks.checkDirect(indices); + nglDrawElementsInstanced(mode, indices.remaining(), GLES20.GL_UNSIGNED_SHORT, MemoryUtil.getAddress(indices), primcount); + } + static native void nglDrawElementsInstanced(int mode, int indices_count, int type, long indices, int primcount); + public static void glDrawElementsInstanced(int mode, int indices_count, int type, long indices_buffer_offset, int primcount) { + GLChecks.ensureElementVBOenabled(); + nglDrawElementsInstancedBO(mode, indices_count, type, indices_buffer_offset, primcount); + } + static native void nglDrawElementsInstancedBO(int mode, int indices_count, int type, long indices_buffer_offset, int primcount); + + public static GLSync glFenceSync(int condition, int flags) { + GLSync __result = new GLSync(nglFenceSync(condition, flags)); + return __result; + } + static native long nglFenceSync(int condition, int flags); + + public static boolean glIsSync(GLSync sync) { + boolean __result = nglIsSync(sync.getPointer()); + return __result; + } + static native boolean nglIsSync(long sync); + + public static void glDeleteSync(GLSync sync) { + nglDeleteSync(sync.getPointer()); + } + static native void nglDeleteSync(long sync); + + public static int glClientWaitSync(GLSync sync, int flags, long timeout) { + int __result = nglClientWaitSync(sync.getPointer(), flags, timeout); + return __result; + } + static native int nglClientWaitSync(long sync, int flags, long timeout); + + public static void glWaitSync(GLSync sync, int flags, long timeout) { + nglWaitSync(sync.getPointer(), flags, timeout); + } + static native void nglWaitSync(long sync, int flags, long timeout); + + public static void glGetInteger64(int pname, LongBuffer data) { + BufferChecks.checkBuffer(data, 1); + nglGetInteger64v(pname, MemoryUtil.getAddress(data)); + } + static native void nglGetInteger64v(int pname, long data); + + /** Overloads glGetInteger64v. */ + public static long glGetInteger64(int pname) { + LongBuffer data = APIUtil.getBufferLong(); + nglGetInteger64v(pname, MemoryUtil.getAddress(data)); + return data.get(0); + } + + public static void glGetInteger64(int value, int index, LongBuffer data) { + BufferChecks.checkBuffer(data, 4); + nglGetInteger64i_v(value, index, MemoryUtil.getAddress(data)); + } + static native void nglGetInteger64i_v(int value, int index, long data); + + /** Overloads glGetInteger64i_v. */ + public static long glGetInteger64(int value, int index) { + LongBuffer data = APIUtil.getBufferLong(); + nglGetInteger64i_v(value, index, MemoryUtil.getAddress(data)); + return data.get(0); + } + + public static void glGetSync(GLSync sync, int pname, IntBuffer length, IntBuffer values) { + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkDirect(values); + nglGetSynciv(sync.getPointer(), pname, values.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(values)); + } + static native void nglGetSynciv(long sync, int pname, int values_bufSize, long length, long values); + + /** Overloads glGetSynciv. */ + public static int glGetSynci(GLSync sync, int pname) { + IntBuffer values = APIUtil.getBufferInt(); + nglGetSynciv(sync.getPointer(), pname, 1, 0L, MemoryUtil.getAddress(values)); + return values.get(0); + } + + public static void glGetBufferParameter(int target, int pname, LongBuffer params) { + BufferChecks.checkBuffer(params, 4); + nglGetBufferParameteri64v(target, pname, MemoryUtil.getAddress(params)); + } + static native void nglGetBufferParameteri64v(int target, int pname, long params); + + /** Overloads glGetBufferParameteri64v. */ + public static long glGetBufferParameteri64(int target, int pname) { + LongBuffer params = APIUtil.getBufferLong(); + nglGetBufferParameteri64v(target, pname, MemoryUtil.getAddress(params)); + return params.get(0); + } + + public static void glGenSamplers(IntBuffer samplers) { + BufferChecks.checkDirect(samplers); + nglGenSamplers(samplers.remaining(), MemoryUtil.getAddress(samplers)); + } + static native void nglGenSamplers(int samplers_count, long samplers); + + /** Overloads glGenSamplers. */ + public static int glGenSamplers() { + IntBuffer samplers = APIUtil.getBufferInt(); + nglGenSamplers(1, MemoryUtil.getAddress(samplers)); + return samplers.get(0); + } + + public static void glDeleteSamplers(IntBuffer samplers) { + BufferChecks.checkDirect(samplers); + nglDeleteSamplers(samplers.remaining(), MemoryUtil.getAddress(samplers)); + } + static native void nglDeleteSamplers(int samplers_count, long samplers); + + /** Overloads glDeleteSamplers. */ + public static void glDeleteSamplers(int sampler) { + nglDeleteSamplers(1, APIUtil.getInt(sampler)); + } + + public static boolean glIsSampler(int sampler) { + boolean __result = nglIsSampler(sampler); + return __result; + } + static native boolean nglIsSampler(int sampler); + + public static void glBindSampler(int unit, int sampler) { + nglBindSampler(unit, sampler); + } + static native void nglBindSampler(int unit, int sampler); + + public static void glSamplerParameteri(int sampler, int pname, int param) { + nglSamplerParameteri(sampler, pname, param); + } + static native void nglSamplerParameteri(int sampler, int pname, int param); + + public static void glSamplerParameterf(int sampler, int pname, float param) { + nglSamplerParameterf(sampler, pname, param); + } + static native void nglSamplerParameterf(int sampler, int pname, float param); + + public static void glSamplerParameter(int sampler, int pname, IntBuffer params) { + BufferChecks.checkBuffer(params, 4); + nglSamplerParameteriv(sampler, pname, MemoryUtil.getAddress(params)); + } + static native void nglSamplerParameteriv(int sampler, int pname, long params); + + public static void glSamplerParameter(int sampler, int pname, FloatBuffer params) { + BufferChecks.checkBuffer(params, 4); + nglSamplerParameterfv(sampler, pname, MemoryUtil.getAddress(params)); + } + static native void nglSamplerParameterfv(int sampler, int pname, long params); + + public static void glGetSamplerParameter(int sampler, int pname, IntBuffer params) { + BufferChecks.checkBuffer(params, 4); + nglGetSamplerParameteriv(sampler, pname, MemoryUtil.getAddress(params)); + } + static native void nglGetSamplerParameteriv(int sampler, int pname, long params); + + /** Overloads glGetSamplerParameteriv. */ + public static int glGetSamplerParameteri(int sampler, int pname) { + IntBuffer params = APIUtil.getBufferInt(); + nglGetSamplerParameteriv(sampler, pname, MemoryUtil.getAddress(params)); + return params.get(0); + } + + public static void glGetSamplerParameter(int sampler, int pname, FloatBuffer params) { + BufferChecks.checkBuffer(params, 4); + nglGetSamplerParameterfv(sampler, pname, MemoryUtil.getAddress(params)); + } + static native void nglGetSamplerParameterfv(int sampler, int pname, long params); + + /** Overloads glGetSamplerParameterfv. */ + public static float glGetSamplerParameterf(int sampler, int pname) { + FloatBuffer params = APIUtil.getBufferFloat(); + nglGetSamplerParameterfv(sampler, pname, MemoryUtil.getAddress(params)); + return params.get(0); + } + + public static void glVertexAttribDivisor(int index, int divisor) { + nglVertexAttribDivisor(index, divisor); + } + static native void nglVertexAttribDivisor(int index, int divisor); + + public static void glBindTransformFeedback(int target, int id) { + nglBindTransformFeedback(target, id); + } + static native void nglBindTransformFeedback(int target, int id); + + public static void glDeleteTransformFeedbacks(IntBuffer ids) { + BufferChecks.checkDirect(ids); + nglDeleteTransformFeedbacks(ids.remaining(), MemoryUtil.getAddress(ids)); + } + static native void nglDeleteTransformFeedbacks(int ids_n, long ids); + + /** Overloads glDeleteTransformFeedbacks. */ + public static void glDeleteTransformFeedbacks(int id) { + nglDeleteTransformFeedbacks(1, APIUtil.getInt(id)); + } + + public static void glGenTransformFeedbacks(IntBuffer ids) { + BufferChecks.checkDirect(ids); + nglGenTransformFeedbacks(ids.remaining(), MemoryUtil.getAddress(ids)); + } + static native void nglGenTransformFeedbacks(int ids_n, long ids); + + /** Overloads glGenTransformFeedbacks. */ + public static int glGenTransformFeedbacks() { + IntBuffer ids = APIUtil.getBufferInt(); + nglGenTransformFeedbacks(1, MemoryUtil.getAddress(ids)); + return ids.get(0); + } + + public static boolean glIsTransformFeedback(int id) { + boolean __result = nglIsTransformFeedback(id); + return __result; + } + static native boolean nglIsTransformFeedback(int id); + + public static void glPauseTransformFeedback() { + nglPauseTransformFeedback(); + } + static native void nglPauseTransformFeedback(); + + public static void glResumeTransformFeedback() { + nglResumeTransformFeedback(); + } + static native void nglResumeTransformFeedback(); + + public static void glGetProgramBinary(int program, IntBuffer length, IntBuffer binaryFormat, ByteBuffer binary) { + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkBuffer(binaryFormat, 1); + BufferChecks.checkDirect(binary); + nglGetProgramBinary(program, binary.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(binaryFormat), MemoryUtil.getAddress(binary)); + } + static native void nglGetProgramBinary(int program, int binary_bufSize, long length, long binaryFormat, long binary); + + public static void glProgramBinary(int program, int binaryFormat, ByteBuffer binary) { + BufferChecks.checkDirect(binary); + nglProgramBinary(program, binaryFormat, MemoryUtil.getAddress(binary), binary.remaining()); + } + static native void nglProgramBinary(int program, int binaryFormat, long binary, int binary_length); + + public static void glProgramParameteri(int program, int pname, int value) { + nglProgramParameteri(program, pname, value); + } + static native void nglProgramParameteri(int program, int pname, int value); + + public static void glInvalidateFramebuffer(int target, IntBuffer attachments) { + BufferChecks.checkDirect(attachments); + nglInvalidateFramebuffer(target, attachments.remaining(), MemoryUtil.getAddress(attachments)); + } + static native void nglInvalidateFramebuffer(int target, int attachments_numAttachments, long attachments); + + public static void glInvalidateSubFramebuffer(int target, IntBuffer attachments, int x, int y, int width, int height) { + BufferChecks.checkDirect(attachments); + nglInvalidateSubFramebuffer(target, attachments.remaining(), MemoryUtil.getAddress(attachments), x, y, width, height); + } + static native void nglInvalidateSubFramebuffer(int target, int attachments_numAttachments, long attachments, int x, int y, int width, int height); + + public static void glTexStorage2D(int target, int levels, int internalformat, int width, int height) { + nglTexStorage2D(target, levels, internalformat, width, height); + } + static native void nglTexStorage2D(int target, int levels, int internalformat, int width, int height); + + public static void glTexStorage3D(int target, int levels, int internalformat, int width, int height, int depth) { + nglTexStorage3D(target, levels, internalformat, width, height, depth); + } + static native void nglTexStorage3D(int target, int levels, int internalformat, int width, int height, int depth); + + public static void glGetInternalformat(int target, int internalformat, int pname, IntBuffer params) { + BufferChecks.checkDirect(params); + nglGetInternalformativ(target, internalformat, pname, params.remaining(), MemoryUtil.getAddress(params)); + } + static native void nglGetInternalformativ(int target, int internalformat, int pname, int params_bufSize, long params); + + /** Overloads glGetInternalformativ. */ + public static int glGetInternalformat(int target, int internalformat, int pname) { + IntBuffer params = APIUtil.getBufferInt(); + nglGetInternalformativ(target, internalformat, pname, 1, MemoryUtil.getAddress(params)); + return params.get(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/IMGMultisampledRenderToTexture.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/IMGMultisampledRenderToTexture.java new file mode 100644 index 0000000..5bb9378 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/IMGMultisampledRenderToTexture.java @@ -0,0 +1,44 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class IMGMultisampledRenderToTexture { + + /** + * Accepted by the <pname> parameter of GetRenderbufferParameteriv: + */ + public static final int GL_RENDERBUFFER_SAMPLES_IMG = 0x9133; + + /** + * Returned by CheckFramebufferStatus: + */ + public static final int GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG = 0x9134; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + public static final int GL_MAX_SAMPLES_IMG = 0x9135; + + /** + * Accepted by the <pname> parameter of GetFramebufferAttachmentParameteriv: + */ + public static final int GL_TEXTURE_SAMPLES_IMG = 0x9136; + + private IMGMultisampledRenderToTexture() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glRenderbufferStorageMultisampleIMG(int target, int samples, int internalformat, int width, int height) { + nglRenderbufferStorageMultisampleIMG(target, samples, internalformat, width, height); + } + static native void nglRenderbufferStorageMultisampleIMG(int target, int samples, int internalformat, int width, int height); + + public static void glFramebufferTexture2DMultisampleIMG(int target, int attachment, int textarget, int texture, int level, int samples) { + nglFramebufferTexture2DMultisampleIMG(target, attachment, textarget, texture, level, samples); + } + static native void nglFramebufferTexture2DMultisampleIMG(int target, int attachment, int textarget, int texture, int level, int samples); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/IMGProgramBinary.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/IMGProgramBinary.java new file mode 100644 index 0000000..7bd6e4f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/IMGProgramBinary.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class IMGProgramBinary { + + /** + * Accepted by the <binaryFormat> parameter of ProgramBinaryOES: + */ + public static final int GL_SGX_PROGRAM_BINARY_IMG = 0x9130; + + private IMGProgramBinary() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/IMGReadFormat.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/IMGReadFormat.java new file mode 100644 index 0000000..e77670a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/IMGReadFormat.java @@ -0,0 +1,17 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class IMGReadFormat { + + /** + * Accepted by the <format> parameter of ReadPixels: + */ + public static final int GL_BGRA_IMG = 0x80E1, + GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG = 0x8365; + + private IMGReadFormat() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/IMGShaderBinary.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/IMGShaderBinary.java new file mode 100644 index 0000000..112e1c8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/IMGShaderBinary.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class IMGShaderBinary { + + /** + * Accepted by the <binaryformat> parameter of ShaderBinary: + */ + public static final int GL_SGX_BINARY_IMG = 0x8C0A; + + private IMGShaderBinary() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/IMGTextureCompressionPvrtc.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/IMGTextureCompressionPvrtc.java new file mode 100644 index 0000000..1bbcd4f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/IMGTextureCompressionPvrtc.java @@ -0,0 +1,20 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class IMGTextureCompressionPvrtc { + + /** + * Accepted by the <internalformat> parameter of CompressedTexImage2DARB + * and the <format> parameter of CompressedTexSubImage2DARB: + */ + public static final int GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG = 0x8C00, + GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG = 0x8C01, + GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 0x8C02, + GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG = 0x8C03; + + private IMGTextureCompressionPvrtc() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/KHRDebug.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/KHRDebug.java new file mode 100644 index 0000000..5a346b1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/KHRDebug.java @@ -0,0 +1,228 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class KHRDebug { + + /** + * Tokens accepted by the <target> parameters of Enable, Disable, and + * IsEnabled: + */ + public static final int GL_DEBUG_OUTPUT = 0x92E0, + GL_DEBUG_OUTPUT_SYNCHRONOUS = 0x8242; + + /** + * Returned by GetIntegerv when <pname> is CONTEXT_FLAGS: + */ + public static final int GL_CONTEXT_FLAG_DEBUG_BIT = 0x2; + + /** + * Tokens accepted by the <value> parameters of GetBooleanv, GetIntegerv, + * GetFloatv, GetDoublev and GetInteger64v: + */ + public static final int GL_MAX_DEBUG_MESSAGE_LENGTH = 0x9143, + GL_MAX_DEBUG_LOGGED_MESSAGES = 0x9144, + GL_DEBUG_LOGGED_MESSAGES = 0x9145, + GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH = 0x8243, + GL_MAX_DEBUG_GROUP_STACK_DEPTH = 0x826C, + GL_DEBUG_GROUP_STACK_DEPTH = 0x826D, + GL_MAX_LABEL_LENGTH = 0x82E8; + + /** + * Tokens accepted by the <pname> parameter of GetPointerv: + */ + public static final int GL_DEBUG_CALLBACK_FUNCTION = 0x8244, + GL_DEBUG_CALLBACK_USER_PARAM = 0x8245; + + /** + * Tokens accepted or provided by the <source> parameters of + * DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <sources> + * parameter of GetDebugMessageLog: + */ + public static final int GL_DEBUG_SOURCE_API = 0x8246, + GL_DEBUG_SOURCE_WINDOW_SYSTEM = 0x8247, + GL_DEBUG_SOURCE_SHADER_COMPILER = 0x8248, + GL_DEBUG_SOURCE_THIRD_PARTY = 0x8249, + GL_DEBUG_SOURCE_APPLICATION = 0x824A, + GL_DEBUG_SOURCE_OTHER = 0x824B; + + /** + * Tokens accepted or provided by the <type> parameters of + * DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <types> + * parameter of GetDebugMessageLog: + */ + public static final int GL_DEBUG_TYPE_ERROR = 0x824C, + GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR = 0x824D, + GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR = 0x824E, + GL_DEBUG_TYPE_PORTABILITY = 0x824F, + GL_DEBUG_TYPE_PERFORMANCE = 0x8250, + GL_DEBUG_TYPE_OTHER = 0x8251, + GL_DEBUG_TYPE_MARKER = 0x8268; + + /** + * Tokens accepted or provided by the <type> parameters of + * DebugMessageControl and DEBUGPROC, and the <types> parameter of + * GetDebugMessageLog: + */ + public static final int GL_DEBUG_TYPE_PUSH_GROUP = 0x8269, + GL_DEBUG_TYPE_POP_GROUP = 0x826A; + + /** + * Tokens accepted or provided by the <severity> parameters of + * DebugMessageControl, DebugMessageInsert and DEBUGPROC callback functions, + * and the <severities> parameter of GetDebugMessageLog: + */ + public static final int GL_DEBUG_SEVERITY_HIGH = 0x9146, + GL_DEBUG_SEVERITY_MEDIUM = 0x9147, + GL_DEBUG_SEVERITY_LOW = 0x9148, + GL_DEBUG_SEVERITY_NOTIFICATION = 0x826B; + + /** + * Returned by GetError: + */ + public static final int GL_STACK_UNDERFLOW = 0x504, + GL_STACK_OVERFLOW = 0x503; + + /** + * Tokens accepted or provided by the <identifier> parameters of + * ObjectLabel and GetObjectLabel: + */ + public static final int GL_BUFFER = 0x82E0, + GL_SHADER = 0x82E1, + GL_PROGRAM = 0x82E2, + GL_QUERY = 0x82E3, + GL_PROGRAM_PIPELINE = 0x82E4, + GL_SAMPLER = 0x82E6, + GL_DISPLAY_LIST = 0x82E7; + + private KHRDebug() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glDebugMessageControl(int source, int type, int severity, IntBuffer ids, boolean enabled) { + if (ids != null) + BufferChecks.checkDirect(ids); + nglDebugMessageControl(source, type, severity, (ids == null ? 0 : ids.remaining()), MemoryUtil.getAddressSafe(ids), enabled); + } + static native void nglDebugMessageControl(int source, int type, int severity, int ids_count, long ids, boolean enabled); + + public static void glDebugMessageInsert(int source, int type, int id, int severity, ByteBuffer buf) { + BufferChecks.checkDirect(buf); + nglDebugMessageInsert(source, type, id, severity, buf.remaining(), MemoryUtil.getAddress(buf)); + } + static native void nglDebugMessageInsert(int source, int type, int id, int severity, int buf_length, long buf); + + /** Overloads glDebugMessageInsert. */ + public static void glDebugMessageInsert(int source, int type, int id, int severity, CharSequence buf) { + nglDebugMessageInsert(source, type, id, severity, buf.length(), APIUtil.getBuffer(buf)); + } + + /** + * The {@code KHRDebugCallback.Handler} implementation passed to this method will be used for + * KHR_debug messages. If callback is null, any previously registered handler for the current + * thread will be unregistered and stop receiving messages. + *

+ * @param callback the callback function to use + */ + public static void glDebugMessageCallback(KHRDebugCallback callback) { + long userParam = callback == null ? 0 : CallbackUtil.createGlobalRef(callback.getHandler()); + CallbackUtil.registerContextCallbackKHR(userParam); + nglDebugMessageCallback(callback == null ? 0 : callback.getPointer(), userParam); + } + static native void nglDebugMessageCallback(long callback, long userParam); + + public static int glGetDebugMessageLog(int count, IntBuffer sources, IntBuffer types, IntBuffer ids, IntBuffer severities, IntBuffer lengths, ByteBuffer messageLog) { + if (sources != null) + BufferChecks.checkBuffer(sources, count); + if (types != null) + BufferChecks.checkBuffer(types, count); + if (ids != null) + BufferChecks.checkBuffer(ids, count); + if (severities != null) + BufferChecks.checkBuffer(severities, count); + if (lengths != null) + BufferChecks.checkBuffer(lengths, count); + if (messageLog != null) + BufferChecks.checkDirect(messageLog); + int __result = nglGetDebugMessageLog(count, (messageLog == null ? 0 : messageLog.remaining()), MemoryUtil.getAddressSafe(sources), MemoryUtil.getAddressSafe(types), MemoryUtil.getAddressSafe(ids), MemoryUtil.getAddressSafe(severities), MemoryUtil.getAddressSafe(lengths), MemoryUtil.getAddressSafe(messageLog)); + return __result; + } + static native int nglGetDebugMessageLog(int count, int messageLog_bufsize, long sources, long types, long ids, long severities, long lengths, long messageLog); + + public static void glPushDebugGroup(int source, int id, ByteBuffer message) { + BufferChecks.checkDirect(message); + nglPushDebugGroup(source, id, message.remaining(), MemoryUtil.getAddress(message)); + } + static native void nglPushDebugGroup(int source, int id, int message_length, long message); + + /** Overloads glPushDebugGroup. */ + public static void glPushDebugGroup(int source, int id, CharSequence message) { + nglPushDebugGroup(source, id, message.length(), APIUtil.getBuffer(message)); + } + + public static void glPopDebugGroup() { + nglPopDebugGroup(); + } + static native void nglPopDebugGroup(); + + public static void glObjectLabel(int identifier, int name, ByteBuffer label) { + if (label != null) + BufferChecks.checkDirect(label); + nglObjectLabel(identifier, name, (label == null ? 0 : label.remaining()), MemoryUtil.getAddressSafe(label)); + } + static native void nglObjectLabel(int identifier, int name, int label_length, long label); + + /** Overloads glObjectLabel. */ + public static void glObjectLabel(int identifier, int name, CharSequence label) { + nglObjectLabel(identifier, name, label.length(), APIUtil.getBuffer(label)); + } + + public static void glGetObjectLabel(int identifier, int name, IntBuffer length, ByteBuffer label) { + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkDirect(label); + nglGetObjectLabel(identifier, name, label.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(label)); + } + static native void nglGetObjectLabel(int identifier, int name, int label_bufSize, long length, long label); + + /** Overloads glGetObjectLabel. */ + public static String glGetObjectLabel(int identifier, int name, int bufSize) { + IntBuffer label_length = APIUtil.getLengths(); + ByteBuffer label = APIUtil.getBufferByte(bufSize); + nglGetObjectLabel(identifier, name, bufSize, MemoryUtil.getAddress0(label_length), MemoryUtil.getAddress(label)); + label.limit(label_length.get(0)); + return APIUtil.getString(label); + } + + public static void glObjectPtrLabel(PointerWrapper ptr, ByteBuffer label) { + if (label != null) + BufferChecks.checkDirect(label); + nglObjectPtrLabel(ptr.getPointer(), (label == null ? 0 : label.remaining()), MemoryUtil.getAddressSafe(label)); + } + static native void nglObjectPtrLabel(long ptr, int label_length, long label); + + /** Overloads glObjectPtrLabel. */ + public static void glObjectPtrLabel(PointerWrapper ptr, CharSequence label) { + nglObjectPtrLabel(ptr.getPointer(), label.length(), APIUtil.getBuffer(label)); + } + + public static void glGetObjectPtrLabel(PointerWrapper ptr, IntBuffer length, ByteBuffer label) { + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkDirect(label); + nglGetObjectPtrLabel(ptr.getPointer(), label.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(label)); + } + static native void nglGetObjectPtrLabel(long ptr, int label_bufSize, long length, long label); + + /** Overloads glGetObjectPtrLabel. */ + public static String glGetObjectPtrLabel(PointerWrapper ptr, int bufSize) { + IntBuffer label_length = APIUtil.getLengths(); + ByteBuffer label = APIUtil.getBufferByte(bufSize); + nglGetObjectPtrLabel(ptr.getPointer(), bufSize, MemoryUtil.getAddress0(label_length), MemoryUtil.getAddress(label)); + label.limit(label_length.get(0)); + return APIUtil.getString(label); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/KHRTextureCompressionAstcLdr.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/KHRTextureCompressionAstcLdr.java new file mode 100644 index 0000000..8ff1eed --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/KHRTextureCompressionAstcLdr.java @@ -0,0 +1,45 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class KHRTextureCompressionAstcLdr { + + /** + * Accepted by the <internalformat> parameter of CompressedTexImage2D, + * CompressedTexSubImage2D, TexStorage2D, TextureStorage2D, TexStorage3D, + * and TextureStorage3D: + */ + public static final int GL_COMPRESSED_RGBA_ASTC_4x4_KHR = 0x93B0, + GL_COMPRESSED_RGBA_ASTC_5x4_KHR = 0x93B1, + GL_COMPRESSED_RGBA_ASTC_5x5_KHR = 0x93B2, + GL_COMPRESSED_RGBA_ASTC_6x5_KHR = 0x93B3, + GL_COMPRESSED_RGBA_ASTC_6x6_KHR = 0x93B4, + GL_COMPRESSED_RGBA_ASTC_8x5_KHR = 0x93B5, + GL_COMPRESSED_RGBA_ASTC_8x6_KHR = 0x93B6, + GL_COMPRESSED_RGBA_ASTC_8x8_KHR = 0x93B7, + GL_COMPRESSED_RGBA_ASTC_10x5_KHR = 0x93B8, + GL_COMPRESSED_RGBA_ASTC_10x6_KHR = 0x93B9, + GL_COMPRESSED_RGBA_ASTC_10x8_KHR = 0x93BA, + GL_COMPRESSED_RGBA_ASTC_10x10_KHR = 0x93BB, + GL_COMPRESSED_RGBA_ASTC_12x10_KHR = 0x93BC, + GL_COMPRESSED_RGBA_ASTC_12x12_KHR = 0x93BD, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR = 0x93D0, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR = 0x93D1, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR = 0x93D2, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR = 0x93D3, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR = 0x93D4, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR = 0x93D5, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR = 0x93D6, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR = 0x93D7, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR = 0x93D8, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR = 0x93D9, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR = 0x93DA, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR = 0x93DB, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR = 0x93DC, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR = 0x93DD; + + private KHRTextureCompressionAstcLdr() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVCoverageSample.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVCoverageSample.java new file mode 100644 index 0000000..f64d802 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVCoverageSample.java @@ -0,0 +1,67 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVCoverageSample { + + /** + * Accepted by the <attrib_list> parameter of eglChooseConfig + * and eglCreatePbufferSurface, and by the <attribute> + * parameter of eglGetConfigAttrib: + */ + public static final int EGL_COVERAGE_BUFFERS_NV = 0x30E0, + EGL_COVERAGE_SAMPLES_NV = 0x30E1; + + /** + * Accepted by the <internalformat> parameter of + * RenderbufferStorageEXT and the <format> parameter of ReadPixels: + */ + public static final int GL_COVERAGE_COMPONENT_NV = 0x8522; + + /** + * Accepted by the <internalformat> parameter of + * RenderbufferStorageEXT: + */ + public static final int GL_COVERAGE_COMPONENT4_NV = 0x8523; + + /** + * Accepted by the <operation> parameter of CoverageOperationNV: + */ + public static final int GL_COVERAGE_ALL_FRAGMENTS_NV = 0x8524, + GL_COVERAGE_EDGE_FRAGMENTS_NV = 0x8525, + GL_COVERAGE_AUTOMATIC_NV = 0x8526; + + /** + * Accepted by the <attachment> parameter of + * FramebufferRenderbuffer, and GetFramebufferAttachmentParameteriv: + */ + public static final int GL_COVERAGE_ATTACHMENT_NV = 0x8527; + + /** + * Accepted by the <buf> parameter of Clear: + */ + public static final int GL_COVERAGE_BUFFER_BIT_NV = 0x8000; + + /** + * Accepted by the <pname> parameter of GetIntegerv: + */ + public static final int GL_COVERAGE_BUFFERS_NV = 0x8528, + GL_COVERAGE_SAMPLES_NV = 0x8529; + + private NVCoverageSample() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glCoverageMaskNV(boolean mask) { + nglCoverageMaskNV(mask); + } + static native void nglCoverageMaskNV(boolean mask); + + public static void glCoverageOperationNV(int operation) { + nglCoverageOperationNV(operation); + } + static native void nglCoverageOperationNV(int operation); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVDepthNonlinear.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVDepthNonlinear.java new file mode 100644 index 0000000..5b07f66 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVDepthNonlinear.java @@ -0,0 +1,31 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVDepthNonlinear { + + /** + * Accepted as a valid sized internal format by all functions accepting + * sized internal formats with a base format of DEPTH_COMPONENT: + */ + public static final int GL_DEPTH_COMPONENT16_NONLINEAR_NV = 0x8553; + + /** + * Accepted by the <attrib_list> parameter of eglChooseConfig, + * and by the <attribute> parameter of eglGetConfigAttrib: + */ + public static final int EGL_DEPTH_ENCODING_NV = 0x30E2; + + /** + * Accepted as a value in the <attrib_list> parameter of eglChooseConfig + * and eglCreatePbufferSurface, and returned in the <value> parameter + * of eglGetConfigAttrib: + */ + public static final int EGL_DEPTH_ENCODING_NONE_NV = 0x0, + EGL_DEPTH_ENCODING_NONLINEAR_NV = 0x30E3; + + private NVDepthNonlinear() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVDrawBuffers.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVDrawBuffers.java new file mode 100644 index 0000000..d9cbaa7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVDrawBuffers.java @@ -0,0 +1,66 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVDrawBuffers { + + /** + * Accepted by the <pname> parameters of GetIntegerv, GetFloatv, + * and GetDoublev: + */ + public static final int GL_MAX_DRAW_BUFFERS_NV = 0x8824, + GL_DRAW_BUFFER0_NV = 0x8825, + GL_DRAW_BUFFER1_NV = 0x8826, + GL_DRAW_BUFFER2_NV = 0x8827, + GL_DRAW_BUFFER3_NV = 0x8828, + GL_DRAW_BUFFER4_NV = 0x8829, + GL_DRAW_BUFFER5_NV = 0x882A, + GL_DRAW_BUFFER6_NV = 0x882B, + GL_DRAW_BUFFER7_NV = 0x882C, + GL_DRAW_BUFFER8_NV = 0x882D, + GL_DRAW_BUFFER9_NV = 0x882E, + GL_DRAW_BUFFER10_NV = 0x882F, + GL_DRAW_BUFFER11_NV = 0x8830, + GL_DRAW_BUFFER12_NV = 0x8831, + GL_DRAW_BUFFER13_NV = 0x8832, + GL_DRAW_BUFFER14_NV = 0x8833, + GL_DRAW_BUFFER15_NV = 0x8834; + + /** + * Accepted by the <bufs> parameter of DrawBuffersNV: + */ + public static final int GL_COLOR_ATTACHMENT0_NV = 0x8CE0, + GL_COLOR_ATTACHMENT1_NV = 0x8CE1, + GL_COLOR_ATTACHMENT2_NV = 0x8CE2, + GL_COLOR_ATTACHMENT3_NV = 0x8CE3, + GL_COLOR_ATTACHMENT4_NV = 0x8CE4, + GL_COLOR_ATTACHMENT5_NV = 0x8CE5, + GL_COLOR_ATTACHMENT6_NV = 0x8CE6, + GL_COLOR_ATTACHMENT7_NV = 0x8CE7, + GL_COLOR_ATTACHMENT8_NV = 0x8CE8, + GL_COLOR_ATTACHMENT9_NV = 0x8CE9, + GL_COLOR_ATTACHMENT10_NV = 0x8CEA, + GL_COLOR_ATTACHMENT11_NV = 0x8CEB, + GL_COLOR_ATTACHMENT12_NV = 0x8CEC, + GL_COLOR_ATTACHMENT13_NV = 0x8CED, + GL_COLOR_ATTACHMENT14_NV = 0x8CEE, + GL_COLOR_ATTACHMENT15_NV = 0x8CEF; + + private NVDrawBuffers() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glDrawBuffersNV(IntBuffer bufs) { + BufferChecks.checkDirect(bufs); + nglDrawBuffersNV(bufs.remaining(), MemoryUtil.getAddress(bufs)); + } + static native void nglDrawBuffersNV(int bufs_n, long bufs); + + /** Overloads glDrawBuffersNV. */ + public static void glDrawBuffersNV(int buf) { + nglDrawBuffersNV(1, APIUtil.getInt(buf)); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVDrawPath.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVDrawPath.java new file mode 100644 index 0000000..0f9aa3d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVDrawPath.java @@ -0,0 +1,148 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVDrawPath { + + /** + * Accepted as the <paramType> parameter of PathParameterNV: + */ + public static final int GL_PATH_QUALITY_NV = 0x8ED8, + GL_FILL_RULE_NV = 0x8ED9, + GL_STROKE_CAP0_STYLE_NV = 0x8EE0, + GL_STROKE_CAP1_STYLE_NV = 0x8EE1, + GL_STROKE_CAP2_STYLE_NV = 0x8EE2, + GL_STROKE_CAP3_STYLE_NV = 0x8EE3, + GL_STROKE_JOIN_STYLE_NV = 0x8EE8, + GL_STROKE_MITER_LIMIT_NV = 0x8EE9; + + /** + * Values for the ILL_RULE_NV path parameter: + */ + public static final int GL_EVEN_ODD_NV = 0x8EF0, + GL_NON_ZERO_NV = 0x8EF1; + + /** + * Values for the CAP[0-3]_STYLE_NV path parameter: + */ + public static final int GL_CAP_BUTT_NV = 0x8EF4, + GL_CAP_ROUND_NV = 0x8EF5, + GL_CAP_SQUARE_NV = 0x8EF6, + GL_CAP_TRIANGLE_NV = 0x8EF7; + + /** + * Values for the JOIN_STYLE_NV path parameter: + */ + public static final int GL_JOIN_MITER_NV = 0x8EFC, + GL_JOIN_ROUND_NV = 0x8EFD, + GL_JOIN_BEVEL_NV = 0x8EFE, + GL_JOIN_CLIPPED_MITER_NV = 0x8EFF; + + /** + * Accepted as the <target> parameter of PathMatrixNV: + */ + public static final int GL_MATRIX_PATH_TO_CLIP_NV = 0x8F04, + GL_MATRIX_STROKE_TO_PATH_NV = 0x8F05, + GL_MATRIX_PATH_COORD0_NV = 0x8F08, + GL_MATRIX_PATH_COORD1_NV = 0x8F09, + GL_MATRIX_PATH_COORD2_NV = 0x8F0A, + GL_MATRIX_PATH_COORD3_NV = 0x8F0B; + + /** + * Accepted as the <mode> parameter of DrawPathbufferNV: + */ + public static final int GL_FILL_PATH_NV = 0x8F18, + GL_STROKE_PATH_NV = 0x8F19; + + /** + * Accepted as path commands by CreatePathNV: + */ + public static final byte GL_MOVE_TO_NV = 0x0, + GL_LINE_TO_NV = 0x1, + GL_QUADRATIC_BEZIER_TO_NV = 0x2, + GL_CUBIC_BEZIER_TO_NV = 0x3, + GL_START_MARKER_NV = 0x20, + GL_CLOSE_NV = 0x21, + GL_STROKE_CAP0_NV = 0x40, + GL_STROKE_CAP1_NV = 0x41, + GL_STROKE_CAP2_NV = 0x42, + GL_STROKE_CAP3_NV = 0x43; + + private NVDrawPath() {} + + static native void initNativeStubs() throws LWJGLException; + + public static int glCreatePathNV(int datatype, ByteBuffer commands) { + BufferChecks.checkDirect(commands); + int __result = nglCreatePathNV(datatype, commands.remaining(), MemoryUtil.getAddress(commands)); + return __result; + } + static native int nglCreatePathNV(int datatype, int commands_numCommands, long commands); + + public static void glDeletePathNV(int path) { + nglDeletePathNV(path); + } + static native void nglDeletePathNV(int path); + + public static void glPathVerticesNV(int path, ByteBuffer vertices) { + BufferChecks.checkDirect(vertices); + nglPathVerticesNV(path, MemoryUtil.getAddress(vertices)); + } + static native void nglPathVerticesNV(int path, long vertices); + + public static void glPathParameterfNV(int path, int paramType, float param) { + nglPathParameterfNV(path, paramType, param); + } + static native void nglPathParameterfNV(int path, int paramType, float param); + + public static void glPathParameteriNV(int path, int paramType, int param) { + nglPathParameteriNV(path, paramType, param); + } + static native void nglPathParameteriNV(int path, int paramType, int param); + + public static int glCreatePathProgramNV() { + int __result = nglCreatePathProgramNV(); + return __result; + } + static native int nglCreatePathProgramNV(); + + public static void glPathMatrixNV(int target, FloatBuffer value) { + BufferChecks.checkBuffer(value, 16); + nglPathMatrixNV(target, MemoryUtil.getAddress(value)); + } + static native void nglPathMatrixNV(int target, long value); + + public static void glDrawPathNV(int path, int mode) { + nglDrawPathNV(path, mode); + } + static native void nglDrawPathNV(int path, int mode); + + public static int glCreatePathbufferNV(int capacity) { + int __result = nglCreatePathbufferNV(capacity); + return __result; + } + static native int nglCreatePathbufferNV(int capacity); + + public static void glDeletePathbufferNV(int buffer) { + nglDeletePathbufferNV(buffer); + } + static native void nglDeletePathbufferNV(int buffer); + + public static void glPathbufferPathNV(int buffer, int index, int path) { + nglPathbufferPathNV(buffer, index, path); + } + static native void nglPathbufferPathNV(int buffer, int index, int path); + + public static void glPathbufferPositionNV(int buffer, int index, float x, float y) { + nglPathbufferPositionNV(buffer, index, x, y); + } + static native void nglPathbufferPositionNV(int buffer, int index, float x, float y); + + public static void glDrawPathbufferNV(int buffer, int mode) { + nglDrawPathbufferNV(buffer, mode); + } + static native void nglDrawPathbufferNV(int buffer, int mode); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVDrawTexture.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVDrawTexture.java new file mode 100644 index 0000000..7272898 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVDrawTexture.java @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVDrawTexture { + + private NVDrawTexture() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glDrawTextureNV(int texture, int sampler, float x0, float y0, float x1, float y1, float z, float s0, float t0, float s1, float t1) { + nglDrawTextureNV(texture, sampler, x0, y0, x1, y1, z, s0, t0, s1, t1); + } + static native void nglDrawTextureNV(int texture, int sampler, float x0, float y0, float x1, float y1, float z, float s0, float t0, float s1, float t1); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVEGLStreamConsumerExternal.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVEGLStreamConsumerExternal.java new file mode 100644 index 0000000..f59bfe5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVEGLStreamConsumerExternal.java @@ -0,0 +1,31 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVEGLStreamConsumerExternal { + + /** + * Accepted as a target in the <target> parameter of BindTexture: + */ + public static final int GL_TEXTURE_EXTERNAL_OES = 0x8D65; + + /** + * Returned in the <type> parameter of GetActiveUniform: + */ + public static final int GL_SAMPLER_EXTERNAL_OES = 0x8D66; + + /** + * Accepted as <value> in GetIntegerv() and GetFloatv() queries: + */ + public static final int GL_TEXTURE_BINDING_EXTERNAL_OES = 0x8D67; + + /** + * Accepted as <value> in GetTexParameter*() queries: + */ + public static final int GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES = 0x8D68; + + private NVEGLStreamConsumerExternal() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVFboColorAttachments.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVFboColorAttachments.java new file mode 100644 index 0000000..e3e89c8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVFboColorAttachments.java @@ -0,0 +1,29 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVFboColorAttachments { + + public static final int GL_MAX_COLOR_ATTACHMENTS_NV = 0x8CDF, + GL_COLOR_ATTACHMENT0_NV = 0x8CE0, + GL_COLOR_ATTACHMENT1_NV = 0x8CE1, + GL_COLOR_ATTACHMENT2_NV = 0x8CE2, + GL_COLOR_ATTACHMENT3_NV = 0x8CE3, + GL_COLOR_ATTACHMENT4_NV = 0x8CE4, + GL_COLOR_ATTACHMENT5_NV = 0x8CE5, + GL_COLOR_ATTACHMENT6_NV = 0x8CE6, + GL_COLOR_ATTACHMENT7_NV = 0x8CE7, + GL_COLOR_ATTACHMENT8_NV = 0x8CE8, + GL_COLOR_ATTACHMENT9_NV = 0x8CE9, + GL_COLOR_ATTACHMENT10_NV = 0x8CEA, + GL_COLOR_ATTACHMENT11_NV = 0x8CEB, + GL_COLOR_ATTACHMENT12_NV = 0x8CEC, + GL_COLOR_ATTACHMENT13_NV = 0x8CED, + GL_COLOR_ATTACHMENT14_NV = 0x8CEE, + GL_COLOR_ATTACHMENT15_NV = 0x8CEF; + + private NVFboColorAttachments() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVFence.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVFence.java new file mode 100644 index 0000000..d2595e2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVFence.java @@ -0,0 +1,76 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVFence { + + /** + * Accepted by the <condition> parameter of SetFenceNV: + */ + public static final int GL_ALL_COMPLETED_NV = 0x84F2; + + /** + * Accepted by the <pname> parameter of GetFenceivNV: + */ + public static final int GL_FENCE_STATUS_NV = 0x84F3, + GL_FENCE_CONDITION_NV = 0x84F4; + + private NVFence() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glGenFencesNV(IntBuffer fences) { + BufferChecks.checkDirect(fences); + nglGenFencesNV(fences.remaining(), MemoryUtil.getAddress(fences)); + } + static native void nglGenFencesNV(int fences_n, long fences); + + /** Overloads glGenFencesNV. */ + public static int glGenFencesNV() { + IntBuffer fences = APIUtil.getBufferInt(); + nglGenFencesNV(1, MemoryUtil.getAddress(fences)); + return fences.get(0); + } + + public static void glDeleteFencesNV(IntBuffer fences) { + BufferChecks.checkDirect(fences); + nglDeleteFencesNV(fences.remaining(), MemoryUtil.getAddress(fences)); + } + static native void nglDeleteFencesNV(int fences_n, long fences); + + /** Overloads glDeleteFencesNV. */ + public static void glDeleteFencesNV(int fence) { + nglDeleteFencesNV(1, APIUtil.getInt(fence)); + } + + public static void glSetFenceNV(int fence, int condition) { + nglSetFenceNV(fence, condition); + } + static native void nglSetFenceNV(int fence, int condition); + + public static boolean glTestFenceNV(int fence) { + boolean __result = nglTestFenceNV(fence); + return __result; + } + static native boolean nglTestFenceNV(int fence); + + public static void glFinishFenceNV(int fence) { + nglFinishFenceNV(fence); + } + static native void nglFinishFenceNV(int fence); + + public static boolean glIsFenceNV(int fence) { + boolean __result = nglIsFenceNV(fence); + return __result; + } + static native boolean nglIsFenceNV(int fence); + + public static void glGetFenceivNV(int fence, int pname, IntBuffer params) { + BufferChecks.checkBuffer(params, 1); + nglGetFenceivNV(fence, pname, MemoryUtil.getAddress(params)); + } + static native void nglGetFenceivNV(int fence, int pname, long params); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVFramebufferVertexAttribArray.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVFramebufferVertexAttribArray.java new file mode 100644 index 0000000..795cdf4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVFramebufferVertexAttribArray.java @@ -0,0 +1,28 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVFramebufferVertexAttribArray { + + public static final int GL_FRAMEBUFFER_ATTACHABLE_NV = 0x852A, + GL_VERTEX_ATTRIB_ARRAY_NV = 0x852B, + GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_SIZE_NV = 0x852C, + GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_TYPE_NV = 0x852D, + GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_NORMALIZED_NV = 0x852E, + GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_OFFSET_NV = 0x852F, + GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_WIDTH_NV = 0x8530, + GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_STRIDE_NV = 0x8531, + GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_HEIGHT_NV = 0x8532; + + private NVFramebufferVertexAttribArray() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glFramebufferVertexAttribArrayNV(int target, int attachment, int buffertarget, int bufferobject, int size, int type, boolean normalized, long offset, long width, long height, int stride) { + nglFramebufferVertexAttribArrayNV(target, attachment, buffertarget, bufferobject, size, type, normalized, offset, width, height, stride); + } + static native void nglFramebufferVertexAttribArrayNV(int target, int attachment, int buffertarget, int bufferobject, int size, int type, boolean normalized, long offset, long width, long height, int stride); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVGetTexImage.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVGetTexImage.java new file mode 100644 index 0000000..7f8cf93 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVGetTexImage.java @@ -0,0 +1,79 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVGetTexImage { + + public static final int GL_TEXTURE_WIDTH_NV = 0x1000, + GL_TEXTURE_HEIGHT_NV = 0x1001, + GL_TEXTURE_INTERNAL_FORMAT_NV = 0x1003, + GL_TEXTURE_COMPONENTS_NV = 0x1003, + GL_TEXTURE_BORDER_NV = 0x1005, + GL_TEXTURE_RED_SIZE_NV = 0x805C, + GL_TEXTURE_GREEN_SIZE_NV = 0x805D, + GL_TEXTURE_BLUE_SIZE_NV = 0x805E, + GL_TEXTURE_ALPHA_SIZE_NV = 0x805F, + GL_TEXTURE_LUMINANCE_SIZE_NV = 0x8060, + GL_TEXTURE_INTENSITY_SIZE_NV = 0x8061, + GL_TEXTURE_DEPTH_NV = 0x8071, + GL_TEXTURE_COMPRESSED_IMAGE_SIZE_NV = 0x86A0, + GL_TEXTURE_COMPRESSED_NV = 0x86A1, + GL_TEXTURE_DEPTH_SIZE_NV = 0x884A; + + private NVGetTexImage() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glGetTexImageNV(int target, int level, int format, int type, ByteBuffer img) { + BufferChecks.checkBuffer(img, GLChecks.calculateImageStorage(img, format, type, 1, 1, 1)); + nglGetTexImageNV(target, level, format, type, MemoryUtil.getAddress(img)); + } + public static void glGetTexImageNV(int target, int level, int format, int type, FloatBuffer img) { + BufferChecks.checkBuffer(img, GLChecks.calculateImageStorage(img, format, type, 1, 1, 1)); + nglGetTexImageNV(target, level, format, type, MemoryUtil.getAddress(img)); + } + public static void glGetTexImageNV(int target, int level, int format, int type, IntBuffer img) { + BufferChecks.checkBuffer(img, GLChecks.calculateImageStorage(img, format, type, 1, 1, 1)); + nglGetTexImageNV(target, level, format, type, MemoryUtil.getAddress(img)); + } + public static void glGetTexImageNV(int target, int level, int format, int type, ShortBuffer img) { + BufferChecks.checkBuffer(img, GLChecks.calculateImageStorage(img, format, type, 1, 1, 1)); + nglGetTexImageNV(target, level, format, type, MemoryUtil.getAddress(img)); + } + static native void nglGetTexImageNV(int target, int level, int format, int type, long img); + + public static void glGetCompressedTexImageNV(int target, int level, ByteBuffer img) { + BufferChecks.checkDirect(img); + nglGetCompressedTexImageNV(target, level, MemoryUtil.getAddress(img)); + } + static native void nglGetCompressedTexImageNV(int target, int level, long img); + + public static void glGetTexLevelParameterNV(int target, int level, int pname, FloatBuffer params) { + BufferChecks.checkBuffer(params, 1); + nglGetTexLevelParameterfvNV(target, level, pname, MemoryUtil.getAddress(params)); + } + static native void nglGetTexLevelParameterfvNV(int target, int level, int pname, long params); + + /** Overloads glGetTexLevelParameterfvNV. */ + public static float glGetTexLevelParameterfNV(int target, int level, int pname) { + FloatBuffer params = APIUtil.getBufferFloat(); + nglGetTexLevelParameterfvNV(target, level, pname, MemoryUtil.getAddress(params)); + return params.get(0); + } + + public static void glGetTexLevelParameterNV(int target, int level, int pname, IntBuffer params) { + BufferChecks.checkBuffer(params, 1); + nglGetTexLevelParameterivNV(target, level, pname, MemoryUtil.getAddress(params)); + } + static native void nglGetTexLevelParameterivNV(int target, int level, int pname, long params); + + /** Overloads glGetTexLevelParameterivNV. */ + public static int glGetTexLevelParameteriNV(int target, int level, int pname) { + IntBuffer params = APIUtil.getBufferInt(); + nglGetTexLevelParameterivNV(target, level, pname, MemoryUtil.getAddress(params)); + return params.get(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVPlatformBinary.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVPlatformBinary.java new file mode 100644 index 0000000..e592093 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVPlatformBinary.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVPlatformBinary { + + /** + * Accepted by the <binaryformat> parameter of ShaderBinary: + */ + public static final int GL_NVIDIA_PLATFORM_BINARY_NV = 0x890B; + + private NVPlatformBinary() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVReadBuffer.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVReadBuffer.java new file mode 100644 index 0000000..bb20ca4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVReadBuffer.java @@ -0,0 +1,21 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVReadBuffer { + + public static final int GL_READ_BUFFER_NV = 0xC02, + GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_NV = 0x8CDC; + + private NVReadBuffer() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glReadBufferNV(int mode) { + nglReadBufferNV(mode); + } + static native void nglReadBufferNV(int mode); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVSystemTime.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVSystemTime.java new file mode 100644 index 0000000..60db574 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/NVSystemTime.java @@ -0,0 +1,25 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class NVSystemTime { + + private NVSystemTime() {} + + static native void initNativeStubs() throws LWJGLException; + + public static long glGetSystemTimeFrequencyNV() { + long __result = nglGetSystemTimeFrequencyNV(); + return __result; + } + static native long nglGetSystemTimeFrequencyNV(); + + public static long glGetSystemTimeNV() { + long __result = nglGetSystemTimeNV(); + return __result; + } + static native long nglGetSystemTimeNV(); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESBlendEquationSeparate.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESBlendEquationSeparate.java new file mode 100644 index 0000000..9ba11da --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESBlendEquationSeparate.java @@ -0,0 +1,25 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class OESBlendEquationSeparate { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, and + * GetFloatv: + */ + public static final int GL_BLEND_EQUATION_RGB_OES = 0x8009, + GL_BLEND_EQUATION_ALPHA_OES = 0x883D; + + private OESBlendEquationSeparate() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glBlendEquationSeparateOES(int modeRGB, int modeAlpha) { + nglBlendEquationSeparateOES(modeRGB, modeAlpha); + } + static native void nglBlendEquationSeparateOES(int modeRGB, int modeAlpha); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESBlendFuncSeparate.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESBlendFuncSeparate.java new file mode 100644 index 0000000..acb15a2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESBlendFuncSeparate.java @@ -0,0 +1,27 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class OESBlendFuncSeparate { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, and + * GetFloatv: + */ + public static final int GL_BLEND_DST_RGB_OES = 0x80C8, + BLEND_SRC_RGB_OES = 0x80C9, + BLEND_DST_ALPHA_OES = 0x80CA, + BLEND_SRC_ALPHA_OES = 0x80CB; + + private OESBlendFuncSeparate() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glBlendFuncSeparateOES(int sfactorRGB, int dfactorRGB, int sfactorAlpha, int dfactorAlpha) { + nglBlendFuncSeparateOES(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); + } + static native void nglBlendFuncSeparateOES(int sfactorRGB, int dfactorRGB, int sfactorAlpha, int dfactorAlpha); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESBlendSubtract.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESBlendSubtract.java new file mode 100644 index 0000000..bb29e0c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESBlendSubtract.java @@ -0,0 +1,31 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class OESBlendSubtract { + + /** + * Accepted by the <mode> parameter of BlendEquationOES: + */ + public static final int GL_FUNC_ADD_OES = 0x8006, + GL_FUNC_SUBTRACT_OES = 0x800A, + GL_FUNC_REVERSE_SUBTRACT_OES = 0x800B; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * and GetFloatv: + */ + public static final int GL_BLEND_EQUATION_OES = 0x8009; + + private OESBlendSubtract() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glBlendEquationOES(int mode) { + nglBlendEquationOES(mode); + } + static native void nglBlendEquationOES(int mode); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESCompressedETC1RGB8Texture.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESCompressedETC1RGB8Texture.java new file mode 100644 index 0000000..7edd8b6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESCompressedETC1RGB8Texture.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class OESCompressedETC1RGB8Texture { + + /** + * Accepted by the <internalformat> parameter of CompressedTexImage2D: + */ + public static final int GL_ETC1_RGB8_OES = 0x8D64; + + private OESCompressedETC1RGB8Texture() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESCompressedPalettedTexture.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESCompressedPalettedTexture.java new file mode 100644 index 0000000..17c9573 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESCompressedPalettedTexture.java @@ -0,0 +1,25 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class OESCompressedPalettedTexture { + + /** + * Accepted by the <internalformat> paramter of CompressedTexImage2D + */ + public static final int GL_PALETTE4_RGB8_OES = 0x8B90, + GL_PALETTE4_RGBA8_OES = 0x8B91, + GL_PALETTE4_R5_G6_B5_OES = 0x8B92, + GL_PALETTE4_RGBA4_OES = 0x8B93, + GL_PALETTE4_RGB5_A1_OES = 0x8B94, + GL_PALETTE8_RGB8_OES = 0x8B95, + GL_PALETTE8_RGBA8_OES = 0x8B96, + GL_PALETTE8_R5_G6_B5_OES = 0x8B97, + GL_PALETTE8_RGBA4_OES = 0x8B98, + GL_PALETTE8_RGB5_A1_OES = 0x8B99; + + private OESCompressedPalettedTexture() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESDepth24.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESDepth24.java new file mode 100644 index 0000000..3f323f4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESDepth24.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class OESDepth24 { + + /** + * Accepted by the <internalformat> parameter of RenderbufferStorageOES: + */ + public static final int GL_DEPTH_COMPONENT24_OES = 0x81A6; + + private OESDepth24() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESDepth32.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESDepth32.java new file mode 100644 index 0000000..d4067ab --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESDepth32.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class OESDepth32 { + + /** + * Accepted by the <internalformat> parameter of RenderbufferStorageOES: + */ + public static final int GL_DEPTH_COMPONENT32_OES = 0x81A7; + + private OESDepth32() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESDepthTexture.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESDepthTexture.java new file mode 100644 index 0000000..144dc8b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESDepthTexture.java @@ -0,0 +1,23 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class OESDepthTexture { + + /** + * Accepted by the <format> parameter of TexImage2D and TexSubImage2D and + * <internalFormat> parameter of TexImage2D: + */ + public static final int GL_DEPTH_COMPONENT = 0x1902; + + /** + * Accepted by the <type> parameter of TexImage2D, TexSubImage2D: + */ + public static final int GL_UNSIGNED_SHORT = 0x1403, + GL_UNSIGNED_INT = 0x1405; + + private OESDepthTexture() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESEGLImage.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESEGLImage.java new file mode 100644 index 0000000..084f9e7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESEGLImage.java @@ -0,0 +1,23 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class OESEGLImage { + + private OESEGLImage() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glEGLImageTargetTexture2DOES(int target, EGLImageOES image) { + nglEGLImageTargetTexture2DOES(target, image.getPointer()); + } + static native void nglEGLImageTargetTexture2DOES(int target, long image); + + public static void glEGLImageTargetRenderbufferStorageOES(int target, EGLImageOES image) { + nglEGLImageTargetRenderbufferStorageOES(target, image.getPointer()); + } + static native void nglEGLImageTargetRenderbufferStorageOES(int target, long image); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESEGLImageExternal.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESEGLImageExternal.java new file mode 100644 index 0000000..b4e0b96 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESEGLImageExternal.java @@ -0,0 +1,39 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class OESEGLImageExternal { + + /** + * Accepted as a target in the <target> parameter of BindTexture and + * EGLImageTargetTexture2DOES: + */ + public static final int GL_TEXTURE_EXTERNAL_OES = 0x8D65; + + /** + * Returned in the <type> parameter of GetActiveUniform: + */ + public static final int GL_SAMPLER_EXTERNAL_OES = 0x8D66; + + /** + * Accepted as <value> in GetIntegerv() and GetFloatv() queries: + */ + public static final int GL_TEXTURE_BINDING_EXTERNAL_OES = 0x8D67; + + /** + * Accepted as <value> in GetTexParameter*() queries: + */ + public static final int GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES = 0x8D68; + + private OESEGLImageExternal() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glEGLImageTargetTexture2DOES(int target, EGLImageOES image) { + nglEGLImageTargetTexture2DOES(target, image.getPointer()); + } + static native void nglEGLImageTargetTexture2DOES(int target, long image); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESElementIndexUint.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESElementIndexUint.java new file mode 100644 index 0000000..a683fc0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESElementIndexUint.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class OESElementIndexUint { + + /** + * Accepted by the <type> parameter of DrawElements: + */ + public static final int GL_UNSIGNED_INT = 0x1405; + + private OESElementIndexUint() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESFramebufferObject.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESFramebufferObject.java new file mode 100644 index 0000000..4f0d355 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESFramebufferObject.java @@ -0,0 +1,244 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class OESFramebufferObject { + + /** + * Accepted by the <target> parameter of BindFramebufferOES, + * CheckFramebufferStatusOES, FramebufferTexture{2D|3D}OES, + * FramebufferRenderbufferOES, and + * GetFramebufferAttachmentParameterivOES: + */ + public static final int GL_FRAMEBUFFER_OES = 0x8D40; + + /** + * Accepted by the <target> parameter of BindRenderbufferOES, + * RenderbufferStorageOES, and GetRenderbufferParameterivOES, and + * returned by GetFramebufferAttachmentParameterivOES: + */ + public static final int GL_RENDERBUFFER_OES = 0x8D41; + + /** + * Accepted by the <internalformat> parameter of + * RenderbufferStorageOES: + */ + public static final int GL_DEPTH_COMPONENT16_OES = 0x81A5, + GL_RGBA4_OES = 0x8056, + GL_RGB5_A1_OES = 0x8057, + GL_RGB565_OES = 0x8D62, + GL_STENCIL_INDEX1_OES = 0x8D46, + GL_STENCIL_INDEX4_OES = 0x8D47, + GL_STENCIL_INDEX8_OES = 0x8D48; + + /** + * Accepted by the <pname> parameter of GetRenderbufferParameterivOES: + */ + public static final int GL_RENDERBUFFER_WIDTH_OES = 0x8D42, + GL_RENDERBUFFER_HEIGHT_OES = 0x8D43, + GL_RENDERBUFFER_INTERNAL_FORMAT_OES = 0x8D44, + GL_RENDERBUFFER_RED_SIZE_OES = 0x8D50, + GL_RENDERBUFFER_GREEN_SIZE_OES = 0x8D51, + GL_RENDERBUFFER_BLUE_SIZE_OES = 0x8D52, + GL_RENDERBUFFER_ALPHA_SIZE_OES = 0x8D53, + GL_RENDERBUFFER_DEPTH_SIZE_OES = 0x8D54, + GL_RENDERBUFFER_STENCIL_SIZE_OES = 0x8D55; + + /** + * Accepted by the <pname> parameter of + * GetFramebufferAttachmentParameterivOES: + */ + public static final int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES = 0x8CD0, + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES = 0x8CD1, + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES = 0x8CD2, + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES = 0x8CD3, + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES = 0x8CD4; + + /** + * Accepted by the <attachment> parameter of + * FramebufferTexture{2D|3D}OES, FramebufferRenderbufferOES, and + * GetFramebufferAttachmentParameterivOES + */ + public static final int GL_COLOR_ATTACHMENT0_OES = 0x8CE0, + GL_DEPTH_ATTACHMENT_OES = 0x8D00, + GL_STENCIL_ATTACHMENT_OES = 0x8D20; + + /** + * Returned by GetFramebufferAttachmentParameterivOES when the + * <pname> parameter is FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES: + */ + public static final int GL_NONE_OES = 0x0; + + /** + * Returned by CheckFramebufferStatusOES(): + */ + public static final int GL_FRAMEBUFFER_COMPLETE_OES = 0x8CD5, + GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES = 0x8CD6, + GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES = 0x8CD7, + GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES = 0x8CD9, + GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES = 0x8CDA, + GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_OES = 0x8CDB, + GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_OES = 0x8CDC, + GL_FRAMEBUFFER_UNSUPPORTED_OES = 0x8CDD; + + /** + * Accepted by GetIntegerv(): + */ + public static final int GL_FRAMEBUFFER_BINDING_OES = 0x8CA6, + GL_RENDERBUFFER_BINDING_OES = 0x8CA7, + GL_MAX_RENDERBUFFER_SIZE_OES = 0x84E8; + + /** + * Returned by GetError(): + */ + public static final int GL_INVALID_FRAMEBUFFER_OPERATION_OES = 0x506; + + private OESFramebufferObject() {} + + static native void initNativeStubs() throws LWJGLException; + + public static boolean glIsRenderbufferOES(int renderbuffer) { + boolean __result = nglIsRenderbufferOES(renderbuffer); + return __result; + } + static native boolean nglIsRenderbufferOES(int renderbuffer); + + public static void glBindRenderbufferOES(int target, int renderbuffer) { + nglBindRenderbufferOES(target, renderbuffer); + } + static native void nglBindRenderbufferOES(int target, int renderbuffer); + + public static void glDeleteRenderbuffersOES(IntBuffer renderbuffers) { + BufferChecks.checkDirect(renderbuffers); + nglDeleteRenderbuffersOES(renderbuffers.remaining(), MemoryUtil.getAddress(renderbuffers)); + } + static native void nglDeleteRenderbuffersOES(int renderbuffers_n, long renderbuffers); + + /** Overloads glDeleteRenderbuffersOES. */ + public static void glDeleteRenderbuffersOES(int renderbuffer) { + nglDeleteRenderbuffersOES(1, APIUtil.getInt(renderbuffer)); + } + + public static void glGenRenderbuffersOES(IntBuffer renderbuffers) { + BufferChecks.checkDirect(renderbuffers); + nglGenRenderbuffersOES(renderbuffers.remaining(), MemoryUtil.getAddress(renderbuffers)); + } + static native void nglGenRenderbuffersOES(int renderbuffers_n, long renderbuffers); + + /** Overloads glGenRenderbuffersOES. */ + public static int glGenRenderbuffersOES() { + IntBuffer renderbuffers = APIUtil.getBufferInt(); + nglGenRenderbuffersOES(1, MemoryUtil.getAddress(renderbuffers)); + return renderbuffers.get(0); + } + + public static void glRenderbufferStorageOES(int target, int internalformat, int width, int height) { + nglRenderbufferStorageOES(target, internalformat, width, height); + } + static native void nglRenderbufferStorageOES(int target, int internalformat, int width, int height); + + public static void glGetRenderbufferParameterOES(int target, int pname, IntBuffer params) { + BufferChecks.checkBuffer(params, 1); + nglGetRenderbufferParameterivOES(target, pname, MemoryUtil.getAddress(params)); + } + static native void nglGetRenderbufferParameterivOES(int target, int pname, long params); + + /** + * Overloads glGetRenderbufferParameterivOES. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetRenderbufferParameteriOES} instead. + */ + @Deprecated + public static int glGetRenderbufferParameterOES(int target, int pname) { + return OESFramebufferObject.glGetRenderbufferParameteriOES(target, pname); + } + + /** Overloads glGetRenderbufferParameterivOES. */ + public static int glGetRenderbufferParameteriOES(int target, int pname) { + IntBuffer params = APIUtil.getBufferInt(); + nglGetRenderbufferParameterivOES(target, pname, MemoryUtil.getAddress(params)); + return params.get(0); + } + + public static boolean glIsFramebufferOES(int framebuffer) { + boolean __result = nglIsFramebufferOES(framebuffer); + return __result; + } + static native boolean nglIsFramebufferOES(int framebuffer); + + public static void glBindFramebufferOES(int target, int framebuffer) { + nglBindFramebufferOES(target, framebuffer); + } + static native void nglBindFramebufferOES(int target, int framebuffer); + + public static void glDeleteFramebuffersOES(IntBuffer framebuffers) { + BufferChecks.checkDirect(framebuffers); + nglDeleteFramebuffersOES(framebuffers.remaining(), MemoryUtil.getAddress(framebuffers)); + } + static native void nglDeleteFramebuffersOES(int framebuffers_n, long framebuffers); + + /** Overloads glDeleteFramebuffersOES. */ + public static void glDeleteFramebuffersOES(int framebuffer) { + nglDeleteFramebuffersOES(1, APIUtil.getInt(framebuffer)); + } + + public static void glGenFramebuffersOES(IntBuffer framebuffers) { + BufferChecks.checkDirect(framebuffers); + nglGenFramebuffersOES(framebuffers.remaining(), MemoryUtil.getAddress(framebuffers)); + } + static native void nglGenFramebuffersOES(int framebuffers_n, long framebuffers); + + /** Overloads glGenFramebuffersOES. */ + public static int glGenFramebuffersOES() { + IntBuffer framebuffers = APIUtil.getBufferInt(); + nglGenFramebuffersOES(1, MemoryUtil.getAddress(framebuffers)); + return framebuffers.get(0); + } + + public static int glCheckFramebufferStatusOES(int target) { + int __result = nglCheckFramebufferStatusOES(target); + return __result; + } + static native int nglCheckFramebufferStatusOES(int target); + + public static void glFramebufferTexture2DOES(int target, int attachment, int textarget, int texture, int level) { + nglFramebufferTexture2DOES(target, attachment, textarget, texture, level); + } + static native void nglFramebufferTexture2DOES(int target, int attachment, int textarget, int texture, int level); + + public static void glFramebufferRenderbufferOES(int target, int attachment, int renderbuffertarget, int renderbuffer) { + nglFramebufferRenderbufferOES(target, attachment, renderbuffertarget, renderbuffer); + } + static native void nglFramebufferRenderbufferOES(int target, int attachment, int renderbuffertarget, int renderbuffer); + + public static void glGetFramebufferAttachmentParameterOES(int target, int attachment, int pname, IntBuffer params) { + BufferChecks.checkBuffer(params, 1); + nglGetFramebufferAttachmentParameterivOES(target, attachment, pname, MemoryUtil.getAddress(params)); + } + static native void nglGetFramebufferAttachmentParameterivOES(int target, int attachment, int pname, long params); + + /** + * Overloads glGetFramebufferAttachmentParameterivOES. + *

+ * @deprecated Will be removed in 3.0. Use {@link #glGetFramebufferAttachmentParameteriOES} instead. + */ + @Deprecated + public static int glGetFramebufferAttachmentParameterOES(int target, int attachment, int pname) { + return OESFramebufferObject.glGetFramebufferAttachmentParameteriOES(target, attachment, pname); + } + + /** Overloads glGetFramebufferAttachmentParameterivOES. */ + public static int glGetFramebufferAttachmentParameteriOES(int target, int attachment, int pname) { + IntBuffer params = APIUtil.getBufferInt(); + nglGetFramebufferAttachmentParameterivOES(target, attachment, pname, MemoryUtil.getAddress(params)); + return params.get(0); + } + + public static void glGenerateMipmapOES(int target) { + nglGenerateMipmapOES(target); + } + static native void nglGenerateMipmapOES(int target); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESGetProgramBinary.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESGetProgramBinary.java new file mode 100644 index 0000000..5b3904c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESGetProgramBinary.java @@ -0,0 +1,40 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class OESGetProgramBinary { + + /** + * Accepted by the <pname> parameter of GetProgramiv: + */ + public static final int GL_PROGRAM_BINARY_LENGTH_OES = 0x8741; + + /** + * Accepted by the <pname< parameter of GetBooleanv, GetIntegerv, and + * GetFloatv: + */ + public static final int GL_NUM_PROGRAM_BINARY_FORMATS_OES = 0x87FE, + GL_PROGRAM_BINARY_FORMATS_OES = 0x87FF; + + private OESGetProgramBinary() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glGetProgramBinaryOES(int program, IntBuffer length, IntBuffer binaryFormat, ByteBuffer binary) { + if (length != null) + BufferChecks.checkBuffer(length, 1); + BufferChecks.checkBuffer(binaryFormat, 1); + BufferChecks.checkDirect(binary); + nglGetProgramBinaryOES(program, binary.remaining(), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddress(binaryFormat), MemoryUtil.getAddress(binary)); + } + static native void nglGetProgramBinaryOES(int program, int binary_bufSize, long length, long binaryFormat, long binary); + + public static void glProgramBinaryOES(int program, int binaryFormat, ByteBuffer binary) { + BufferChecks.checkDirect(binary); + nglProgramBinaryOES(program, binaryFormat, MemoryUtil.getAddress(binary), binary.remaining()); + } + static native void nglProgramBinaryOES(int program, int binaryFormat, long binary, int binary_length); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESMapbuffer.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESMapbuffer.java new file mode 100644 index 0000000..d9321aa --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESMapbuffer.java @@ -0,0 +1,107 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class OESMapbuffer { + + /** + * Accepted by the <access> parameter of MapBufferOES: + */ + public static final int GL_WRITE_ONLY_OES = 0x88B9; + + /** + * Accepted by the <value> parameter of GetBufferParameteriv: + */ + public static final int GL_BUFFER_ACCESS_OES = 0x88BB, + GL_BUFFER_MAPPED_OES = 0x88BC; + + /** + * Accepted by the <pname> parameter of GetBufferPointervOES: + */ + public static final int GL_BUFFER_MAP_POINTER_OES = 0x88BD; + + private OESMapbuffer() {} + + static native void initNativeStubs() throws LWJGLException; + + public static ByteBuffer glGetBufferPointerOES(int target, int pname, ByteBuffer old_buffer) { + if (old_buffer != null) + BufferChecks.checkDirect(old_buffer); + ByteBuffer __result = nglGetBufferPointervOES(target, pname, GLChecks.getBufferObjectSize(target), old_buffer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + public static ByteBuffer glGetBufferPointervOES(int target, int pname, long length, ByteBuffer old_buffer) { + if (old_buffer != null) + BufferChecks.checkDirect(old_buffer); + ByteBuffer __result = nglGetBufferPointervOES(target, pname, length, old_buffer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + static native ByteBuffer nglGetBufferPointervOES(int target, int pname, long result_size, ByteBuffer old_buffer); + + /** + * glMapBufferOES maps a GL buffer object to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapBuffer like this: + *

+ * ByteBuffer mapped_buffer; mapped_buffer = glMapBufferOES(..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBufferOES(..., ..., mapped_buffer); + *

+ * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + *

+ * The version of this method without an explicit length argument calls glGetBufferParameter internally to + * retrieve the current buffer object size, which may cause a pipeline flush and reduce application performance. + *

+ * The version of this method with an explicit length argument is a fast alternative to the one without. No GL call + * is made to retrieve the buffer object size, so the user is responsible for tracking and using the appropriate length.
+ * Security warning: The length argument should match the buffer object size. Reading from or writing to outside + * the memory region that corresponds to the mapped buffer object will cause native crashes. + *

+ * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. + *

+ * @return A ByteBuffer representing the mapped buffer memory. + */ + public static ByteBuffer glMapBufferOES(int target, int access, ByteBuffer old_buffer) { + if (old_buffer != null) + BufferChecks.checkDirect(old_buffer); + ByteBuffer __result = nglMapBufferOES(target, access, GLChecks.getBufferObjectSize(target), old_buffer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + /** + * glMapBufferOES maps a GL buffer object to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapBuffer like this: + *

+ * ByteBuffer mapped_buffer; mapped_buffer = glMapBufferOES(..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBufferOES(..., ..., mapped_buffer); + *

+ * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + *

+ * The version of this method without an explicit length argument calls glGetBufferParameter internally to + * retrieve the current buffer object size, which may cause a pipeline flush and reduce application performance. + *

+ * The version of this method with an explicit length argument is a fast alternative to the one without. No GL call + * is made to retrieve the buffer object size, so the user is responsible for tracking and using the appropriate length.
+ * Security warning: The length argument should match the buffer object size. Reading from or writing to outside + * the memory region that corresponds to the mapped buffer object will cause native crashes. + *

+ * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. + *

+ * @return A ByteBuffer representing the mapped buffer memory. + */ + public static ByteBuffer glMapBufferOES(int target, int access, long length, ByteBuffer old_buffer) { + if (old_buffer != null) + BufferChecks.checkDirect(old_buffer); + ByteBuffer __result = nglMapBufferOES(target, access, length, old_buffer); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + static native ByteBuffer nglMapBufferOES(int target, int access, long result_size, ByteBuffer old_buffer); + + public static boolean glUnmapBufferOES(int target) { + boolean __result = nglUnmapBufferOES(target); + return __result; + } + static native boolean nglUnmapBufferOES(int target); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESPackedDepthStencil.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESPackedDepthStencil.java new file mode 100644 index 0000000..37eef33 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESPackedDepthStencil.java @@ -0,0 +1,29 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class OESPackedDepthStencil { + + /** + * Accepted by the <format> parameter of TexImage2D and TexSubImage2D and by the + * <internalformat> parameter of TexImage2D: + */ + public static final int GL_DEPTH_STENCIL_OES = 0x84F9; + + /** + * Accepted by the <type> parameter of TexImage2D and TexSubImage2D: + */ + public static final int GL_UNSIGNED_INT_24_8_OES = 0x84FA; + + /** + * Accepted by the <internalformat> parameter of RenderbufferStorage, and + * returned in the <params> parameter of GetRenderbufferParameteriv when + * <pname> is RENDERBUFFER_INTERNAL_FORMAT: + */ + public static final int GL_DEPTH24_STENCIL8_OES = 0x88F0; + + private OESPackedDepthStencil() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESRGB8RGBA8.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESRGB8RGBA8.java new file mode 100644 index 0000000..2a295d5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESRGB8RGBA8.java @@ -0,0 +1,17 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class OESRGB8RGBA8 { + + /** + * Accepted by the <internalformat> parameter of RenderbufferStorageOES: + */ + public static final int GL_RGB8_OES = 0x8051, + GL_RGBA8_OES = 0x8058; + + private OESRGB8RGBA8() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESStandardDerivatives.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESStandardDerivatives.java new file mode 100644 index 0000000..49fd4cf --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESStandardDerivatives.java @@ -0,0 +1,17 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class OESStandardDerivatives { + + /** + * Accepted by the <target> parameter of Hint and by the <pname> parameter of + * GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev: + */ + public static final int GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 0x8B8B; + + private OESStandardDerivatives() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESStencil1.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESStencil1.java new file mode 100644 index 0000000..2f499f4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESStencil1.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class OESStencil1 { + + /** + * Accepted by the <internalformat> parameter of RenderbufferStorageOES: + */ + public static final int GL_STENCIL_INDEX1_OES = 0x8D46; + + private OESStencil1() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESStencil4.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESStencil4.java new file mode 100644 index 0000000..8e69635 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESStencil4.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class OESStencil4 { + + /** + * Accepted by the <internalformat> parameter of RenderbufferStorageOES: + */ + public static final int GL_STENCIL_INDEX4_OES = 0x8D47; + + private OESStencil4() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESStencil8.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESStencil8.java new file mode 100644 index 0000000..c442bd1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESStencil8.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class OESStencil8 { + + /** + * Accepted by the <internalformat> parameter of RenderbufferStorageOES: + */ + public static final int GL_STENCIL_INDEX8_OES = 0x8D48; + + private OESStencil8() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESSurfacelessContext.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESSurfacelessContext.java new file mode 100644 index 0000000..05e7eee --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESSurfacelessContext.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class OESSurfacelessContext { + + /** + * Returned by glCheckFramebufferStatusOES and glCheckFramebufferStatus: + */ + public static final int GL_FRAMEBUFFER_UNDEFINED_OES = 0x8219; + + private OESSurfacelessContext() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESTexture3D.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESTexture3D.java new file mode 100644 index 0000000..73a7c6f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESTexture3D.java @@ -0,0 +1,95 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class OESTexture3D { + + /** + * Accepted by the <target> parameter of TexImage3DOES, TexSubImage3DOES, + * CopyTexSubImage3DOES, CompressedTexImage3DOES and + * CompressedTexSubImage3DOES, GetTexParameteriv, and GetTexParameterfv: + */ + public static final int GL_TEXTURE_3D_OES = 0x806F; + + /** + * Accepted by the <pname> parameter of TexParameteriv, TexParameterfv, + * GetTexParameteriv, and GetTexParameterfv: + */ + public static final int GL_TEXTURE_WRAP_R_OES = 0x8072; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, and + * GetFloatv: + */ + public static final int GL_MAX_3D_TEXTURE_SIZE_OES = 0x8073, + GL_TEXTURE_BINDING_3D_OES = 0x806A; + + private OESTexture3D() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glTexImage3DOES(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, ByteBuffer pixels) { + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth)); + nglTexImage3DOES(target, level, internalFormat, width, height, depth, border, format, type, MemoryUtil.getAddressSafe(pixels)); + } + public static void glTexImage3DOES(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, FloatBuffer pixels) { + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth)); + nglTexImage3DOES(target, level, internalFormat, width, height, depth, border, format, type, MemoryUtil.getAddressSafe(pixels)); + } + public static void glTexImage3DOES(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, IntBuffer pixels) { + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth)); + nglTexImage3DOES(target, level, internalFormat, width, height, depth, border, format, type, MemoryUtil.getAddressSafe(pixels)); + } + public static void glTexImage3DOES(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, ShortBuffer pixels) { + if (pixels != null) + BufferChecks.checkBuffer(pixels, GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth)); + nglTexImage3DOES(target, level, internalFormat, width, height, depth, border, format, type, MemoryUtil.getAddressSafe(pixels)); + } + static native void nglTexImage3DOES(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, long pixels); + + public static void glTexSubImage3DOES(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, ByteBuffer pixels) { + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, depth)); + nglTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddress(pixels)); + } + public static void glTexSubImage3DOES(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, FloatBuffer pixels) { + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, depth)); + nglTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddress(pixels)); + } + public static void glTexSubImage3DOES(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, IntBuffer pixels) { + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, depth)); + nglTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddress(pixels)); + } + public static void glTexSubImage3DOES(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, ShortBuffer pixels) { + BufferChecks.checkBuffer(pixels, GLChecks.calculateImageStorage(pixels, format, type, width, height, depth)); + nglTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddress(pixels)); + } + static native void nglTexSubImage3DOES(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, long pixels); + + public static void glCopyTexSubImage3DOES(int target, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height) { + nglCopyTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, x, y, width, height); + } + static native void nglCopyTexSubImage3DOES(int target, int level, int xoffset, int yoffset, int zoffset, int x, int y, int width, int height); + + public static void glCompressedTexImage3DOES(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, ByteBuffer data) { + BufferChecks.checkDirect(data); + nglCompressedTexImage3DOES(target, level, internalformat, width, height, depth, border, imageSize, MemoryUtil.getAddress(data)); + } + static native void nglCompressedTexImage3DOES(int target, int level, int internalformat, int width, int height, int depth, int border, int imageSize, long data); + + public static void glCompressedTexSubImage3DOES(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, ByteBuffer data) { + BufferChecks.checkDirect(data); + nglCompressedTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, MemoryUtil.getAddress(data)); + } + static native void nglCompressedTexSubImage3DOES(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int imageSize, long data); + + public static void glFramebufferTexture3DOES(int target, int attachment, int textarget, int texture, int level, int zoffset) { + nglFramebufferTexture3DOES(target, attachment, textarget, texture, level, zoffset); + } + static native void nglFramebufferTexture3DOES(int target, int attachment, int textarget, int texture, int level, int zoffset); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESTextureHalfFloat.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESTextureHalfFloat.java new file mode 100644 index 0000000..e81a5c8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESTextureHalfFloat.java @@ -0,0 +1,17 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class OESTextureHalfFloat { + + /** + * Accepted by the <type> parameter of TexImage2D, TexSubImage2D, + * TexImage3D, and TexSubImage3D: + */ + public static final int GL_HALF_FLOAT_OES = 0x8D61; + + private OESTextureHalfFloat() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESVertexArrayObject.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESVertexArrayObject.java new file mode 100644 index 0000000..efed36d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESVertexArrayObject.java @@ -0,0 +1,53 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class OESVertexArrayObject { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv: + */ + public static final int GL_VERTEX_ARRAY_BINDING_OES = 0x85B5; + + private OESVertexArrayObject() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glBindVertexArrayOES(int array) { + nglBindVertexArrayOES(array); + } + static native void nglBindVertexArrayOES(int array); + + public static void glDeleteVertexArraysOES(IntBuffer arrays) { + BufferChecks.checkDirect(arrays); + nglDeleteVertexArraysOES(arrays.remaining(), MemoryUtil.getAddress(arrays)); + } + static native void nglDeleteVertexArraysOES(int arrays_n, long arrays); + + /** Overloads glDeleteVertexArraysOES. */ + public static void glDeleteVertexArraysOES(int array) { + nglDeleteVertexArraysOES(1, APIUtil.getInt(array)); + } + + public static void glGenVertexArraysOES(IntBuffer arrays) { + BufferChecks.checkDirect(arrays); + nglGenVertexArraysOES(arrays.remaining(), MemoryUtil.getAddress(arrays)); + } + static native void nglGenVertexArraysOES(int arrays_n, long arrays); + + /** Overloads glGenVertexArraysOES. */ + public static int glGenVertexArraysOES() { + IntBuffer arrays = APIUtil.getBufferInt(); + nglGenVertexArraysOES(1, MemoryUtil.getAddress(arrays)); + return arrays.get(0); + } + + public static boolean glIsVertexArrayOES(int array) { + boolean __result = nglIsVertexArrayOES(array); + return __result; + } + static native boolean nglIsVertexArrayOES(int array); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESVertexHalfFloat.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESVertexHalfFloat.java new file mode 100644 index 0000000..f8cc639 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESVertexHalfFloat.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class OESVertexHalfFloat { + + /** + * Accepted by the <type> parameter of VertexAttribPointer: + */ + public static final int GL_HALF_FLOAT_OES = 0x8D61; + + private OESVertexHalfFloat() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESVertexType1010102.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESVertexType1010102.java new file mode 100644 index 0000000..2956ee5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/OESVertexType1010102.java @@ -0,0 +1,17 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class OESVertexType1010102 { + + /** + * Accepted by the <type> parameter of VertexAttribPointer + */ + public static final int GL_UNSIGNED_INT_10_10_10_2_OES = 0x8DF6, + GL_INT_10_10_10_2_OES = 0x8DF7; + + private OESVertexType1010102() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/QCOMBinningControl.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/QCOMBinningControl.java new file mode 100644 index 0000000..fd32372 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/QCOMBinningControl.java @@ -0,0 +1,24 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class QCOMBinningControl { + + /** + * Accepted by the <target> parameter of Hint: + */ + public static final int GL_BINNING_CONTROL_HINT_QCOM = 0x8FB0; + + /** + * Accepted by the <hint> parameter of Hint: + */ + public static final int GL_CPU_OPTIMIZED_QCOM = 0x8FB1, + GL_GPU_OPTIMIZED_QCOM = 0x8FB2, + GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM = 0x8FB3, + GL_DONT_CARE = 0x1100; + + private QCOMBinningControl() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/QCOMDriverControl.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/QCOMDriverControl.java new file mode 100644 index 0000000..2264276 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/QCOMDriverControl.java @@ -0,0 +1,50 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class QCOMDriverControl { + + private QCOMDriverControl() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glGetDriverControlsQCOM(IntBuffer num, IntBuffer driverControls) { + if (num != null) + BufferChecks.checkBuffer(num, 1); + if (driverControls != null) + BufferChecks.checkDirect(driverControls); + nglGetDriverControlsQCOM(MemoryUtil.getAddressSafe(num), (driverControls == null ? 0 : driverControls.remaining()), MemoryUtil.getAddressSafe(driverControls)); + } + static native void nglGetDriverControlsQCOM(long num, int driverControls_size, long driverControls); + + public static void glGetDriverControlStringQCOM(int driverControl, IntBuffer length, ByteBuffer driverControlString) { + if (length != null) + BufferChecks.checkBuffer(length, 1); + if (driverControlString != null) + BufferChecks.checkDirect(driverControlString); + nglGetDriverControlStringQCOM(driverControl, (driverControlString == null ? 0 : driverControlString.remaining()), MemoryUtil.getAddressSafe(length), MemoryUtil.getAddressSafe(driverControlString)); + } + static native void nglGetDriverControlStringQCOM(int driverControl, int driverControlString_bufSize, long length, long driverControlString); + + /** Overloads glGetDriverControlStringQCOM. */ + public static String glGetDriverControlStringQCOM(int driverControl, int bufSize) { + IntBuffer driverControlString_length = APIUtil.getLengths(); + ByteBuffer driverControlString = APIUtil.getBufferByte(bufSize); + nglGetDriverControlStringQCOM(driverControl, bufSize, MemoryUtil.getAddress0(driverControlString_length), MemoryUtil.getAddress(driverControlString)); + driverControlString.limit(driverControlString_length.get(0)); + return APIUtil.getString(driverControlString); + } + + public static void glEnableDriverControlQCOM(int driverControl) { + nglEnableDriverControlQCOM(driverControl); + } + static native void nglEnableDriverControlQCOM(int driverControl); + + public static void glDisableDriverControlQCOM(int driverControl) { + nglDisableDriverControlQCOM(driverControl); + } + static native void nglDisableDriverControlQCOM(int driverControl); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/QCOMExtendedGet.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/QCOMExtendedGet.java new file mode 100644 index 0000000..95c5565 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/QCOMExtendedGet.java @@ -0,0 +1,95 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class QCOMExtendedGet { + + /** + * Accepted by the <pname> parameter of ExtGetTexLevelParameterivQCOM + */ + public static final int GL_TEXTURE_WIDTH_QCOM = 0x8BD2, + GL_TEXTURE_HEIGHT_QCOM = 0x8BD3, + GL_TEXTURE_DEPTH_QCOM = 0x8BD4, + GL_TEXTURE_INTERNAL_FORMAT_QCOM = 0x8BD5, + GL_TEXTURE_FORMAT_QCOM = 0x8BD6, + GL_TEXTURE_TYPE_QCOM = 0x8BD7, + GL_TEXTURE_IMAGE_VALID_QCOM = 0x8BD8, + GL_TEXTURE_NUM_LEVELS_QCOM = 0x8BD9, + GL_TEXTURE_TARGET_QCOM = 0x8BDA, + GL_TEXTURE_OBJECT_VALID_QCOM = 0x8BDB; + + /** + * Accepted by the <pname> parameter of ExtTexObjectStateOverrideiQCOM + */ + public static final int GL_STATE_RESTORE = 0x8BDC; + + private QCOMExtendedGet() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glExtGetTexturesQCOM(IntBuffer textures, IntBuffer numTextures) { + BufferChecks.checkBuffer(textures, 1); + BufferChecks.checkBuffer(numTextures, 1); + nglExtGetTexturesQCOM(MemoryUtil.getAddress(textures), textures.remaining(), MemoryUtil.getAddress(numTextures)); + } + static native void nglExtGetTexturesQCOM(long textures, int textures_maxTextures, long numTextures); + + public static void glExtGetBuffersQCOM(IntBuffer buffers, IntBuffer numBuffers) { + BufferChecks.checkBuffer(buffers, 1); + BufferChecks.checkBuffer(numBuffers, 1); + nglExtGetBuffersQCOM(MemoryUtil.getAddress(buffers), buffers.remaining(), MemoryUtil.getAddress(numBuffers)); + } + static native void nglExtGetBuffersQCOM(long buffers, int buffers_maxBuffers, long numBuffers); + + public static void glExtGetRenderbuffersQCOM(IntBuffer renderbuffers, IntBuffer numRenderbuffers) { + BufferChecks.checkBuffer(renderbuffers, 1); + BufferChecks.checkBuffer(numRenderbuffers, 1); + nglExtGetRenderbuffersQCOM(MemoryUtil.getAddress(renderbuffers), renderbuffers.remaining(), MemoryUtil.getAddress(numRenderbuffers)); + } + static native void nglExtGetRenderbuffersQCOM(long renderbuffers, int renderbuffers_maxRenderbuffers, long numRenderbuffers); + + public static void glExtGetFramebuffersQCOM(IntBuffer framebuffers, IntBuffer numFramebuffers) { + BufferChecks.checkBuffer(framebuffers, 1); + BufferChecks.checkBuffer(numFramebuffers, 1); + nglExtGetFramebuffersQCOM(MemoryUtil.getAddress(framebuffers), framebuffers.remaining(), MemoryUtil.getAddress(numFramebuffers)); + } + static native void nglExtGetFramebuffersQCOM(long framebuffers, int framebuffers_maxFramebuffers, long numFramebuffers); + + public static void glExtGetTexLevelParameterivQCOM(int texture, int face, int level, int pname, IntBuffer params) { + BufferChecks.checkBuffer(params, 1); + nglExtGetTexLevelParameterivQCOM(texture, face, level, pname, MemoryUtil.getAddress(params)); + } + static native void nglExtGetTexLevelParameterivQCOM(int texture, int face, int level, int pname, long params); + + public static void glExtTexObjectStateOverrideiQCOM(int target, int pname, int param) { + nglExtTexObjectStateOverrideiQCOM(target, pname, param); + } + static native void nglExtTexObjectStateOverrideiQCOM(int target, int pname, int param); + + public static void glExtGetTexSubImageQCOM(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, ByteBuffer texels) { + BufferChecks.checkBuffer(texels, GLChecks.calculateImageStorage(texels, format, type, width, height, depth)); + nglExtGetTexSubImageQCOM(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddress(texels)); + } + public static void glExtGetTexSubImageQCOM(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, FloatBuffer texels) { + BufferChecks.checkBuffer(texels, GLChecks.calculateImageStorage(texels, format, type, width, height, depth)); + nglExtGetTexSubImageQCOM(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddress(texels)); + } + public static void glExtGetTexSubImageQCOM(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, IntBuffer texels) { + BufferChecks.checkBuffer(texels, GLChecks.calculateImageStorage(texels, format, type, width, height, depth)); + nglExtGetTexSubImageQCOM(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddress(texels)); + } + public static void glExtGetTexSubImageQCOM(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, ShortBuffer texels) { + BufferChecks.checkBuffer(texels, GLChecks.calculateImageStorage(texels, format, type, width, height, depth)); + nglExtGetTexSubImageQCOM(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, MemoryUtil.getAddress(texels)); + } + static native void nglExtGetTexSubImageQCOM(int target, int level, int xoffset, int yoffset, int zoffset, int width, int height, int depth, int format, int type, long texels); + + public static ByteBuffer glExtGetBufferPointervQCOM(int target, long result_size) { + ByteBuffer __result = nglExtGetBufferPointervQCOM(target, result_size); + return LWJGLUtil.CHECKS && __result == null ? null : __result.order(ByteOrder.nativeOrder()); + } + static native ByteBuffer nglExtGetBufferPointervQCOM(int target, long result_size); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/QCOMExtendedGet2.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/QCOMExtendedGet2.java new file mode 100644 index 0000000..d688dfe --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/QCOMExtendedGet2.java @@ -0,0 +1,40 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class QCOMExtendedGet2 { + + private QCOMExtendedGet2() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glExtGetShadersQCOM(IntBuffer shaders, IntBuffer numShaders) { + BufferChecks.checkBuffer(shaders, 1); + BufferChecks.checkBuffer(numShaders, 1); + nglExtGetShadersQCOM(MemoryUtil.getAddress(shaders), shaders.remaining(), MemoryUtil.getAddress(numShaders)); + } + static native void nglExtGetShadersQCOM(long shaders, int shaders_maxShaders, long numShaders); + + public static void glExtGetProgramsQCOM(IntBuffer programs, IntBuffer numPrograms) { + BufferChecks.checkBuffer(programs, 1); + BufferChecks.checkBuffer(numPrograms, 1); + nglExtGetProgramsQCOM(MemoryUtil.getAddress(programs), programs.remaining(), MemoryUtil.getAddress(numPrograms)); + } + static native void nglExtGetProgramsQCOM(long programs, int programs_maxPrograms, long numPrograms); + + public static boolean glExtIsProgramBinaryQCOM(int program) { + boolean __result = nglExtIsProgramBinaryQCOM(program); + return __result; + } + static native boolean nglExtIsProgramBinaryQCOM(int program); + + public static void glExtGetProgramBinarySourceQCOM(int program, int shadertype, ByteBuffer source, IntBuffer length) { + BufferChecks.checkDirect(source); + BufferChecks.checkBuffer(length, 1); + nglExtGetProgramBinarySourceQCOM(program, shadertype, MemoryUtil.getAddress(source), MemoryUtil.getAddress(length)); + } + static native void nglExtGetProgramBinarySourceQCOM(int program, int shadertype, long source, long length); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/QCOMPerformanceMonitorGlobalMode.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/QCOMPerformanceMonitorGlobalMode.java new file mode 100644 index 0000000..fc0e459 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/QCOMPerformanceMonitorGlobalMode.java @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class QCOMPerformanceMonitorGlobalMode { + + /** + * Accepted by the <cap> parameter of Enable and Disable, and + * IsEnabled, and by the <pname> parameter of GetBooleanv, GetIntegerv, + * and GetFloatv: + */ + public static final int GL_PERFMON_GLOBAL_MODE_QCOM = 0x8FA0; + + private QCOMPerformanceMonitorGlobalMode() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/QCOMTiledRendering.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/QCOMTiledRendering.java new file mode 100644 index 0000000..fc87335 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/QCOMTiledRendering.java @@ -0,0 +1,60 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class QCOMTiledRendering { + + /** + * Accepted by the <preserveMask> parameter of StartTilingQCOM and + * EndTilingQCOM + */ + public static final int GL_COLOR_BUFFER_BIT0_QCOM = 0x1, + GL_COLOR_BUFFER_BIT1_QCOM = 0x2, + GL_COLOR_BUFFER_BIT2_QCOM = 0x4, + GL_COLOR_BUFFER_BIT3_QCOM = 0x8, + GL_COLOR_BUFFER_BIT4_QCOM = 0x10, + GL_COLOR_BUFFER_BIT5_QCOM = 0x20, + GL_COLOR_BUFFER_BIT6_QCOM = 0x40, + GL_COLOR_BUFFER_BIT7_QCOM = 0x80, + GL_DEPTH_BUFFER_BIT0_QCOM = 0x100, + GL_DEPTH_BUFFER_BIT1_QCOM = 0x200, + GL_DEPTH_BUFFER_BIT2_QCOM = 0x400, + GL_DEPTH_BUFFER_BIT3_QCOM = 0x800, + GL_DEPTH_BUFFER_BIT4_QCOM = 0x1000, + GL_DEPTH_BUFFER_BIT5_QCOM = 0x2000, + GL_DEPTH_BUFFER_BIT6_QCOM = 0x4000, + GL_DEPTH_BUFFER_BIT7_QCOM = 0x8000, + GL_STENCIL_BUFFER_BIT0_QCOM = 0x10000, + GL_STENCIL_BUFFER_BIT1_QCOM = 0x20000, + GL_STENCIL_BUFFER_BIT2_QCOM = 0x40000, + GL_STENCIL_BUFFER_BIT3_QCOM = 0x80000, + GL_STENCIL_BUFFER_BIT4_QCOM = 0x100000, + GL_STENCIL_BUFFER_BIT5_QCOM = 0x200000, + GL_STENCIL_BUFFER_BIT6_QCOM = 0x400000, + GL_STENCIL_BUFFER_BIT7_QCOM = 0x800000, + GL_MULTISAMPLE_BUFFER_BIT0_QCOM = 0x1000000, + GL_MULTISAMPLE_BUFFER_BIT1_QCOM = 0x2000000, + GL_MULTISAMPLE_BUFFER_BIT2_QCOM = 0x4000000, + GL_MULTISAMPLE_BUFFER_BIT3_QCOM = 0x8000000, + GL_MULTISAMPLE_BUFFER_BIT4_QCOM = 0x10000000, + GL_MULTISAMPLE_BUFFER_BIT5_QCOM = 0x20000000, + GL_MULTISAMPLE_BUFFER_BIT6_QCOM = 0x40000000, + GL_MULTISAMPLE_BUFFER_BIT7_QCOM = 0x80000000; + + private QCOMTiledRendering() {} + + static native void initNativeStubs() throws LWJGLException; + + public static void glStartTilingQCOM(int x, int y, int width, int height, int preserveMask) { + nglStartTilingQCOM(x, y, width, height, preserveMask); + } + static native void nglStartTilingQCOM(int x, int y, int width, int height, int preserveMask); + + public static void glEndTilingQCOM(int preserveMask) { + nglEndTilingQCOM(preserveMask); + } + static native void nglEndTilingQCOM(int preserveMask); +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/QCOMWriteonlyRendering.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/QCOMWriteonlyRendering.java new file mode 100644 index 0000000..ed43e2f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/QCOMWriteonlyRendering.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class QCOMWriteonlyRendering { + + /** + * Accepted by the <cap> parameter of Enable, Disable. + */ + public static final int GL_WRITEONLY_RENDERING_QCOM = 0x8823; + + private QCOMWriteonlyRendering() {} +} diff --git a/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/VIVShaderBinary.java b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/VIVShaderBinary.java new file mode 100644 index 0000000..82083a1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/generated/org/lwjgl/opengles/VIVShaderBinary.java @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +package org.lwjgl.opengles; + +import org.lwjgl.*; +import java.nio.*; + +public final class VIVShaderBinary { + + /** + * Accepted by the <binaryformat> parameter of ShaderBinary: + */ + public static final int GL_SHADER_BINARY_VIV = 0x8FC4; + + private VIVShaderBinary() {} +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/BufferChecks.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/BufferChecks.java new file mode 100644 index 0000000..df3c0cd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/BufferChecks.java @@ -0,0 +1,286 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl; + +import java.nio.*; + +/** + *

A class to check buffer boundaries in general. If there is unsufficient space + * in the buffer when the call is made then a buffer overflow would otherwise + * occur and cause unexpected behaviour, a crash, or worse, a security risk. + * + * Internal class, don't use. + *

+ * @author cix_foo + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +public class BufferChecks { + /** Static methods only! */ + private BufferChecks() { + } + + /** + * Helper methods to ensure a function pointer is not-null (0) + */ + public static void checkFunctionAddress(long pointer) { + if (LWJGLUtil.CHECKS && pointer == 0) { + throw new IllegalStateException("Function is not supported"); + } + } + + /** + * Helper methods to ensure a ByteBuffer is null-terminated + */ + public static void checkNullTerminated(ByteBuffer buf) { + if ( LWJGLUtil.CHECKS && buf.get(buf.limit() - 1) != 0) { + throw new IllegalArgumentException("Missing null termination"); + } + } + + public static void checkNullTerminated(ByteBuffer buf, int count) { + if ( LWJGLUtil.CHECKS ) { + int nullFound = 0; + for ( int i = buf.position(); i < buf.limit(); i++ ) { + if ( buf.get(i) == 0 ) + nullFound++; + } + + if ( nullFound < count ) + throw new IllegalArgumentException("Missing null termination"); + } + } + + /** Helper method to ensure an IntBuffer is null-terminated */ + public static void checkNullTerminated(IntBuffer buf) { + if ( LWJGLUtil.CHECKS && buf.get(buf.limit() - 1) != 0 ) { + throw new IllegalArgumentException("Missing null termination"); + } + } + + /** Helper method to ensure a LongBuffer is null-terminated */ + public static void checkNullTerminated(LongBuffer buf) { + if ( LWJGLUtil.CHECKS && buf.get(buf.limit() - 1) != 0 ) { + throw new IllegalArgumentException("Missing null termination"); + } + } + + /** Helper method to ensure a PointerBuffer is null-terminated */ + public static void checkNullTerminated(PointerBuffer buf) { + if ( LWJGLUtil.CHECKS && buf.get(buf.limit() - 1) != 0 ) { + throw new IllegalArgumentException("Missing null termination"); + } + } + + public static void checkNotNull(Object o) { + if ( LWJGLUtil.CHECKS && o == null) + throw new IllegalArgumentException("Null argument"); + } + + /** + * Helper methods to ensure a buffer is direct (and, implicitly, non-null). + */ + public static void checkDirect(ByteBuffer buf) { + if ( LWJGLUtil.CHECKS && !buf.isDirect()) { + throw new IllegalArgumentException("ByteBuffer is not direct"); + } + } + + public static void checkDirect(ShortBuffer buf) { + if ( LWJGLUtil.CHECKS && !buf.isDirect()) { + throw new IllegalArgumentException("ShortBuffer is not direct"); + } + } + + public static void checkDirect(IntBuffer buf) { + if ( LWJGLUtil.CHECKS && !buf.isDirect()) { + throw new IllegalArgumentException("IntBuffer is not direct"); + } + } + + public static void checkDirect(LongBuffer buf) { + if ( LWJGLUtil.CHECKS && !buf.isDirect()) { + throw new IllegalArgumentException("LongBuffer is not direct"); + } + } + + public static void checkDirect(FloatBuffer buf) { + if ( LWJGLUtil.CHECKS && !buf.isDirect()) { + throw new IllegalArgumentException("FloatBuffer is not direct"); + } + } + + public static void checkDirect(DoubleBuffer buf) { + if ( LWJGLUtil.CHECKS && !buf.isDirect()) { + throw new IllegalArgumentException("DoubleBuffer is not direct"); + } + } + + public static void checkDirect(PointerBuffer buf) { + // NO-OP, PointerBuffer is always direct. + } + + public static void checkArray(Object[] array) { + if ( LWJGLUtil.CHECKS && (array == null || array.length == 0) ) + throw new IllegalArgumentException("Invalid array"); + } + + /** + * This is a separate call to help inline checkBufferSize. + */ + private static void throwBufferSizeException(Buffer buf, int size) { + throw new IllegalArgumentException("Number of remaining buffer elements is " + buf.remaining() + ", must be at least " + size + ". Because at most " + size + " elements can be returned, a buffer with at least " + size + " elements is required, regardless of actual returned element count"); + } + + private static void throwBufferSizeException(PointerBuffer buf, int size) { + throw new IllegalArgumentException("Number of remaining pointer buffer elements is " + buf.remaining() + ", must be at least " + size); + } + + private static void throwArraySizeException(Object[] array, int size) { + throw new IllegalArgumentException("Number of array elements is " + array.length + ", must be at least " + size); + } + + private static void throwArraySizeException(long[] array, int size) { + throw new IllegalArgumentException("Number of array elements is " + array.length + ", must be at least " + size); + } + + /** + * Helper method to ensure a buffer is big enough to receive data from a + * glGet* operation. + * + * @param buf + * The buffer to check + * @param size + * The minimum buffer size + * @throws IllegalArgumentException + */ + public static void checkBufferSize(Buffer buf, int size) { + if ( LWJGLUtil.CHECKS && buf.remaining() < size) { + throwBufferSizeException(buf, size); + } + } + + /** + * Detects the buffer type and performs the corresponding check + * and also returns the buffer position in bytes. + * + * @param buffer the buffer to check + * @param size the size to check + * + * @return the buffer position in bytes + */ + public static int checkBuffer(final Buffer buffer, final int size) { + final int posShift; + if ( buffer instanceof ByteBuffer ) { + BufferChecks.checkBuffer((ByteBuffer)buffer, size); + posShift = 0; + } else if ( buffer instanceof ShortBuffer ) { + BufferChecks.checkBuffer((ShortBuffer)buffer, size); + posShift = 1; + } else if ( buffer instanceof IntBuffer ) { + BufferChecks.checkBuffer((IntBuffer)buffer, size); + posShift = 2; + } else if ( buffer instanceof LongBuffer ) { + BufferChecks.checkBuffer((LongBuffer)buffer, size); + posShift = 4; + } else if ( buffer instanceof FloatBuffer ) { + BufferChecks.checkBuffer((FloatBuffer)buffer, size); + posShift = 2; + } else if ( buffer instanceof DoubleBuffer ) { + BufferChecks.checkBuffer((DoubleBuffer)buffer, size); + posShift = 4; + } else + throw new IllegalArgumentException("Unsupported Buffer type specified: " + buffer.getClass()); + + return buffer.position() << posShift; + } + + public static void checkBuffer(ByteBuffer buf, int size) { + if ( LWJGLUtil.CHECKS ) { + checkBufferSize(buf, size); + checkDirect(buf); + } + } + + public static void checkBuffer(ShortBuffer buf, int size) { + if ( LWJGLUtil.CHECKS ) { + checkBufferSize(buf, size); + checkDirect(buf); + } + } + + public static void checkBuffer(IntBuffer buf, int size) { + if ( LWJGLUtil.CHECKS ) { + checkBufferSize(buf, size); + checkDirect(buf); + } + } + + public static void checkBuffer(LongBuffer buf, int size) { + if ( LWJGLUtil.CHECKS ) { + checkBufferSize(buf, size); + checkDirect(buf); + } + } + + public static void checkBuffer(FloatBuffer buf, int size) { + if ( LWJGLUtil.CHECKS ) { + checkBufferSize(buf, size); + checkDirect(buf); + } + } + + public static void checkBuffer(DoubleBuffer buf, int size) { + if ( LWJGLUtil.CHECKS ) { + checkBufferSize(buf, size); + checkDirect(buf); + } + } + + public static void checkBuffer(PointerBuffer buf, int size) { + if ( LWJGLUtil.CHECKS && buf.remaining() < size ) { + throwBufferSizeException(buf, size); + } + } + + public static void checkArray(Object[] array, int size) { + if ( LWJGLUtil.CHECKS && array.length < size ) + throwArraySizeException(array, size); + } + + public static void checkArray(long[] array, int size) { + if ( LWJGLUtil.CHECKS && array.length < size ) + throwArraySizeException(array, size); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/BufferUtils.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/BufferUtils.java new file mode 100644 index 0000000..537ced3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/BufferUtils.java @@ -0,0 +1,205 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl; + +import java.nio.Buffer; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.CharBuffer; +import java.nio.DoubleBuffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; +import java.nio.LongBuffer; +import java.nio.ShortBuffer; + +/** + * Some often-used Buffer code for creating native buffers of the appropriate size. + * + * @author $Author$ + * @version $Revision$ + * $Id$ + */ + +public final class BufferUtils { + + /** + * Construct a direct native-ordered bytebuffer with the specified size. + * @param size The size, in bytes + * @return a ByteBuffer + */ + public static ByteBuffer createByteBuffer(int size) { + return ByteBuffer.allocateDirect(size).order(ByteOrder.nativeOrder()); + } + + /** + * Construct a direct native-order shortbuffer with the specified number + * of elements. + * @param size The size, in shorts + * @return a ShortBuffer + */ + public static ShortBuffer createShortBuffer(int size) { + return createByteBuffer(size << 1).asShortBuffer(); + } + + /** + * Construct a direct native-order charbuffer with the specified number + * of elements. + * @param size The size, in chars + * @return an CharBuffer + */ + public static CharBuffer createCharBuffer(int size) { + return createByteBuffer(size << 1).asCharBuffer(); + } + + /** + * Construct a direct native-order intbuffer with the specified number + * of elements. + * @param size The size, in ints + * @return an IntBuffer + */ + public static IntBuffer createIntBuffer(int size) { + return createByteBuffer(size << 2).asIntBuffer(); + } + + /** + * Construct a direct native-order longbuffer with the specified number + * of elements. + * @param size The size, in longs + * @return an LongBuffer + */ + public static LongBuffer createLongBuffer(int size) { + return createByteBuffer(size << 3).asLongBuffer(); + } + + /** + * Construct a direct native-order floatbuffer with the specified number + * of elements. + * @param size The size, in floats + * @return a FloatBuffer + */ + public static FloatBuffer createFloatBuffer(int size) { + return createByteBuffer(size << 2).asFloatBuffer(); + } + + /** + * Construct a direct native-order doublebuffer with the specified number + * of elements. + * @param size The size, in floats + * @return a FloatBuffer + */ + public static DoubleBuffer createDoubleBuffer(int size) { + return createByteBuffer(size << 3).asDoubleBuffer(); + } + + /** + * Construct a PointerBuffer with the specified number + * of elements. + * @param size The size, in memory addresses + * @return a PointerBuffer + */ + public static PointerBuffer createPointerBuffer(int size) { + return PointerBuffer.allocateDirect(size); + } + + /** + * @return n, where buffer_element_size=2^n. + */ + public static int getElementSizeExponent(Buffer buf) { + if (buf instanceof ByteBuffer) + return 0; + else if (buf instanceof ShortBuffer || buf instanceof CharBuffer) + return 1; + else if (buf instanceof FloatBuffer || buf instanceof IntBuffer) + return 2; + else if (buf instanceof LongBuffer || buf instanceof DoubleBuffer) + return 3; + else + throw new IllegalStateException("Unsupported buffer type: " + buf); + } + + /** + * A helper function which is used to get the byte offset in an arbitrary buffer + * based on its position + * @return the position of the buffer, in BYTES + */ + public static int getOffset(Buffer buffer) { + return buffer.position() << getElementSizeExponent(buffer); + } + + /** Fill buffer with zeros from position to remaining */ + public static void zeroBuffer(ByteBuffer b) { + zeroBuffer0(b, b.position(), b.remaining()); + } + + /** Fill buffer with zeros from position to remaining */ + public static void zeroBuffer(ShortBuffer b) { + zeroBuffer0(b, b.position()*2L, b.remaining()*2L); + } + + /** Fill buffer with zeros from position to remaining */ + public static void zeroBuffer(CharBuffer b) { + zeroBuffer0(b, b.position()*2L, b.remaining()*2L); + } + + /** Fill buffer with zeros from position to remaining */ + public static void zeroBuffer(IntBuffer b) { + zeroBuffer0(b, b.position()*4L, b.remaining()*4L); + } + + /** Fill buffer with zeros from position to remaining */ + public static void zeroBuffer(FloatBuffer b) { + zeroBuffer0(b, b.position()*4L, b.remaining()*4L); + } + + /** Fill buffer with zeros from position to remaining */ + public static void zeroBuffer(LongBuffer b) { + zeroBuffer0(b, b.position()*8L, b.remaining()*8L); + } + + /** Fill buffer with zeros from position to remaining */ + public static void zeroBuffer(DoubleBuffer b) { + zeroBuffer0(b, b.position()*8L, b.remaining()*8L); + } + + /** Fill buffer with zeros from position to remaining */ + private static native void zeroBuffer0(Buffer b, long off, long size); + + /** + * Returns the memory address of the specified buffer. + * + * @param buffer the buffer + * + * @return the memory address + */ + static native long getBufferAddress(Buffer buffer); + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/DefaultSysImplementation.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/DefaultSysImplementation.java new file mode 100644 index 0000000..a903a48 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/DefaultSysImplementation.java @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl; + + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +abstract class DefaultSysImplementation implements SysImplementation { + public native int getJNIVersion(); + public native int getPointerSize(); + public native void setDebug(boolean debug); + + public long getTimerResolution() { + return 1000; + } + + public boolean has64Bit() { + return false; + } + + public abstract long getTime(); + public abstract void alert(String title, String message); + public abstract String getClipboard(); +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/J2SESysImplementation.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/J2SESysImplementation.java new file mode 100644 index 0000000..2564e10 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/J2SESysImplementation.java @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl; + +import javax.swing.JOptionPane; +import javax.swing.UIManager; + +/** + * A SysImplementation which delegates as much as it can to J2SE. + *

+ * @author $Author$ + * @version $Revision$ + * $Id$ + */ +abstract class J2SESysImplementation extends DefaultSysImplementation { + + public long getTime() { + return System.currentTimeMillis(); + } + + public void alert(String title, String message) { + try { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch(Exception e) { + LWJGLUtil.log("Caught exception while setting LAF: " + e); + } + JOptionPane.showMessageDialog(null, message, title, JOptionPane.WARNING_MESSAGE); + } + + public String getClipboard() { + try { + java.awt.datatransfer.Clipboard clipboard = java.awt.Toolkit.getDefaultToolkit().getSystemClipboard(); + java.awt.datatransfer.Transferable transferable = clipboard.getContents(null); + if (transferable.isDataFlavorSupported(java.awt.datatransfer.DataFlavor.stringFlavor)) { + return (String)transferable.getTransferData(java.awt.datatransfer.DataFlavor.stringFlavor); + } + } catch (Exception e) { + LWJGLUtil.log("Exception while getting clipboard: " + e); + } + return null; + } + + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/LWJGLException.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/LWJGLException.java new file mode 100644 index 0000000..981c170 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/LWJGLException.java @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl; + +/** + *

+ * This exception is supplied to make exception handling more generic for LWJGL + * specific exceptions + *

+ * + * @author Brian Matzon + * @version $Revision$ + * $Id$ + */ +public class LWJGLException extends Exception { + + private static final long serialVersionUID = 1L; + + /** + * Plain c'tor + */ + public LWJGLException() { + super(); + } + + /** + * Creates a new LWJGLException + * + * @param msg + * String identifier for exception + */ + public LWJGLException(String msg) { + super(msg); + } + + /** + * @param message + * @param cause + */ + public LWJGLException(String message, Throwable cause) { + super(message, cause); + } + + /** + * @param cause + */ + public LWJGLException(Throwable cause) { + super(cause); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/LWJGLUtil.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/LWJGLUtil.java new file mode 100644 index 0000000..dd0729b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/LWJGLUtil.java @@ -0,0 +1,614 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl; + +import java.io.File; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.nio.ByteBuffer; +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.security.PrivilegedActionException; +import java.security.PrivilegedExceptionAction; +import java.util.*; + +/** + *

+ * Internal library methods + *

+ * + * @author Brian Matzon + * @version $Revision$ + * $Id$ + */ +public class LWJGLUtil { + public static final int PLATFORM_LINUX = 1; + public static final int PLATFORM_MACOSX = 2; + public static final int PLATFORM_WINDOWS = 3; + public static final String PLATFORM_LINUX_NAME = "linux"; + public static final String PLATFORM_MACOSX_NAME = "macosx"; + public static final String PLATFORM_WINDOWS_NAME = "windows"; + + private static final String LWJGL_ICON_DATA_16x16 = + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\376\377\377\377\302\327\350\377" + + "\164\244\313\377\120\213\275\377\124\216\277\377\206\257\322\377" + + "\347\357\366\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\365\365\365\377\215\217\221\377\166\202\215\377" + + "\175\215\233\377\204\231\252\377\224\267\325\377\072\175\265\377" + + "\110\206\272\377\332\347\361\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\364\370\373\377\234\236\240\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\344\344\344\377\204\255\320\377" + + "\072\175\265\377\133\222\301\377\374\375\376\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\221\266\325\377\137\137\137\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\042\042\042\377\377\377\377\377\350\360\366\377" + + "\071\174\265\377\072\175\265\377\304\330\351\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\306\331\351\377" + + "\201\253\316\377\035\035\035\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\146\146\146\377\377\377\377\377\320\340\355\377" + + "\072\175\265\377\072\175\265\377\215\264\324\377\377\377\377\377" + + "\362\362\362\377\245\245\245\377\337\337\337\377\242\301\334\377" + + "\260\305\326\377\012\012\012\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\250\250\250\377\377\377\377\377\227\272\330\377" + + "\072\175\265\377\072\175\265\377\161\241\312\377\377\377\377\377" + + "\241\241\241\377\000\000\000\377\001\001\001\377\043\043\043\377" + + "\314\314\314\377\320\320\320\377\245\245\245\377\204\204\204\377" + + "\134\134\134\377\357\357\357\377\377\377\377\377\140\226\303\377" + + "\072\175\265\377\072\175\265\377\155\236\310\377\377\377\377\377" + + "\136\136\136\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\317\317\317\377\037\037\037\377\003\003\003\377\053\053\053\377" + + "\154\154\154\377\306\306\306\377\372\374\375\377\236\277\332\377" + + "\167\245\314\377\114\211\274\377\174\250\316\377\377\377\377\377" + + "\033\033\033\377\000\000\000\377\000\000\000\377\027\027\027\377" + + "\326\326\326\377\001\001\001\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\122\122\122\377\345\345\345\377\075\075\075\377" + + "\150\150\150\377\246\246\247\377\332\336\341\377\377\377\377\377" + + "\164\164\164\377\016\016\016\377\000\000\000\377\131\131\131\377" + + "\225\225\225\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\221\221\221\377\233\233\233\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\002\002\002\377\103\103\103\377" + + "\377\377\377\377\356\356\356\377\214\214\214\377\277\277\277\377" + + "\126\126\126\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\323\323\323\377\130\130\130\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\063\063\063\377" + + "\377\377\377\377\377\377\377\377\374\375\376\377\377\377\377\377" + + "\300\300\300\377\100\100\100\377\002\002\002\377\000\000\000\377" + + "\033\033\033\377\373\373\373\377\027\027\027\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\170\170\170\377" + + "\377\377\377\377\377\377\377\377\322\341\356\377\176\251\316\377" + + "\340\352\363\377\377\377\377\377\324\324\324\377\155\155\155\377" + + "\204\204\204\377\323\323\323\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\275\275\275\377" + + "\377\377\377\377\377\377\377\377\376\376\376\377\146\232\305\377" + + "\075\177\266\377\202\254\320\377\344\355\365\377\377\377\377\377" + + "\377\377\377\377\345\345\345\377\055\055\055\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\014\014\014\377\366\366\366\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\342\354\364\377" + + "\115\211\274\377\072\175\265\377\076\200\266\377\207\260\322\377" + + "\347\357\366\377\377\377\377\377\376\376\376\377\274\274\274\377" + + "\117\117\117\377\003\003\003\377\112\112\112\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\353\362\370\377\214\263\324\377\126\220\300\377\120\214\275\377" + + "\167\245\314\377\355\363\370\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\337\337\337\377\346\346\346\377\377\377\377\377"; + + private static final String LWJGL_ICON_DATA_32x32 = + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\374\375\377" + + "\313\335\354\377\223\267\326\377\157\240\311\377\134\223\302\377\140\226\303\377\172\247\315\377\254\310\340\377\355\363\370\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\374\375\376\377\265\316\343\377\132\222\301\377" + + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\105\205\271\377" + + "\241\301\334\377\374\375\376\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\374\374\374\377\342\352\361\377\270\317\343\377\256\311\340\377" + + "\243\302\334\377\230\272\330\377\214\263\323\377\201\254\317\377\156\237\310\377\075\177\266\377\072\175\265\377\072\175\265\377" + + "\072\175\265\377\162\242\312\377\365\370\373\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\330\330\330\377\061\061\061\377\044\044\044\377\061\061\061\377\100\100\100\377" + + "\122\122\122\377\145\145\145\377\164\164\164\377\217\217\217\377\367\370\370\377\254\310\337\377\073\175\265\377\072\175\265\377" + + "\072\175\265\377\072\175\265\377\171\247\315\377\374\375\376\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\376\376\376\377\150\150\150\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\266\266\266\377\376\376\376\377\206\256\321\377\072\175\265\377" + + "\072\175\265\377\072\175\265\377\072\175\265\377\256\312\341\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\323\342\356\377\341\352\362\377\050\050\050\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\002\002\002\377\336\336\336\377\377\377\377\377\365\370\373\377\133\222\301\377" + + "\072\175\265\377\072\175\265\377\072\175\265\377\110\206\272\377\364\370\373\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\354\363\370\377\144\231\305\377\327\331\333\377\005\005\005\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\044\044\044\377\376\376\376\377\377\377\377\377\377\377\377\377\300\325\347\377" + + "\071\174\265\377\072\175\265\377\072\175\265\377\072\175\265\377\253\310\340\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\376\377\377\377" + + "\170\246\314\377\173\247\315\377\236\236\236\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\145\145\145\377\377\377\377\377\377\377\377\377\377\377\377\377\342\354\364\377" + + "\067\173\264\377\072\175\265\377\072\175\265\377\072\175\265\377\146\232\305\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\303\327\350\377" + + "\071\175\265\377\262\314\341\377\130\130\130\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\251\251\251\377\377\377\377\377\377\377\377\377\377\377\377\377\274\322\345\377" + + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\100\201\267\377\356\364\371\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\374\375\377\132\222\301\377" + + "\075\177\266\377\335\345\355\377\034\034\034\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\007\007\007\377\347\347\347\377\377\377\377\377\377\377\377\377\377\377\377\377\205\256\321\377" + + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\071\175\265\377\314\336\354\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\376\376\376\377\377\377\377\377\377\377\377\377\377\377\377\377\272\322\345\377\072\175\265\377" + + "\127\220\277\377\320\321\321\377\003\003\003\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\063\063\063\377\375\375\375\377\377\377\377\377\377\377\377\377\373\374\375\377\120\213\275\377" + + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\071\175\265\377\261\314\342\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\312\312\312\377\067\067\067\377\141\141\141\377\242\242\242\377\335\335\335\377\344\354\363\377\261\313\341\377" + + "\264\315\342\377\346\346\346\377\043\043\043\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\162\162\162\377\377\377\377\377\377\377\377\377\377\377\377\377\330\345\360\377\072\175\265\377" + + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\240\300\333\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\146\146\146\377\000\000\000\377\000\000\000\377\000\000\000\377\006\006\006\377\047\047\047\377\146\146\146\377" + + "\324\324\324\377\377\377\377\377\366\366\366\377\320\320\320\377\227\227\227\377\136\136\136\377\047\047\047\377\004\004\004\377" + + "\000\000\000\377\003\003\003\377\300\300\300\377\377\377\377\377\377\377\377\377\377\377\377\377\242\301\333\377\072\175\265\377" + + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\236\277\332\377\377\377\377\377\377\377\377\377" + + "\373\373\373\377\045\045\045\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\134\134\134\377\377\377\377\377\352\352\352\377\217\217\217\377\265\265\265\377\351\351\351\377\375\375\375\377\347\347\347\377" + + "\262\262\262\377\275\275\275\377\376\376\376\377\377\377\377\377\377\377\377\377\377\377\377\377\153\235\307\377\072\175\265\377" + + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\241\301\334\377\377\377\377\377\377\377\377\377" + + "\333\333\333\377\003\003\003\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\203\203\203\377\377\377\377\377\137\137\137\377\000\000\000\377\000\000\000\377\013\013\013\377\067\067\067\377\166\166\166\377" + + "\267\267\267\377\360\360\360\377\377\377\377\377\377\377\377\377\377\377\377\377\360\365\371\377\113\210\273\377\075\177\266\377" + + "\071\174\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\262\314\342\377\377\377\377\377\377\377\377\377" + + "\232\232\232\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\305\305\305\377\367\367\367\377\035\035\035\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\007\007\007\377\074\074\074\377\337\337\337\377\377\377\377\377\373\374\375\377\374\375\376\377\363\367\372\377" + + "\314\335\353\377\236\276\332\377\162\241\311\377\114\211\273\377\072\175\265\377\311\334\353\377\377\377\377\377\377\377\377\377" + + "\126\126\126\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\017\017\017\377" + + "\371\371\371\377\321\321\321\377\003\003\003\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\216\216\216\377\377\377\377\377\371\371\371\377\204\204\204\377\160\160\160\377" + + "\260\260\260\377\352\352\352\377\377\377\377\377\371\373\374\377\334\350\362\377\366\371\374\377\377\377\377\377\377\377\377\377" + + "\025\025\025\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\116\116\116\377" + + "\377\377\377\377\221\221\221\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\273\273\273\377\377\377\377\377\236\236\236\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\004\004\004\377\057\057\057\377\160\160\160\377\260\260\260\377\346\346\346\377\376\376\376\377\377\377\377\377" + + "\071\071\071\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\220\220\220\377" + + "\377\377\377\377\115\115\115\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\020\020\020\377\360\360\360\377\377\377\377\377\132\132\132\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\011\011\011\377\062\062\062\377\261\261\261\377" + + "\366\366\366\377\241\241\241\377\065\065\065\377\002\002\002\377\000\000\000\377\000\000\000\377\002\002\002\377\321\321\321\377" + + "\365\365\365\377\023\023\023\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\105\105\105\377\376\376\376\377\370\370\370\377\035\035\035\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\053\053\053\377" + + "\377\377\377\377\377\377\377\377\374\374\374\377\276\276\276\377\120\120\120\377\005\005\005\377\045\045\045\377\371\371\371\377" + + "\302\302\302\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\206\206\206\377\377\377\377\377\322\322\322\377\001\001\001\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\103\103\103\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\376\376\376\377\334\334\334\377\340\340\340\377\377\377\377\377" + + "\225\225\225\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\001\001\001\377\310\310\310\377\377\377\377\377\216\216\216\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\210\210\210\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\337\337\337\377\051\051\051\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\030\030\030\377\365\365\365\377\377\377\377\377\112\112\112\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\317\317\317\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\361\366\372\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\371\371\371\377\265\265\265\377\113\113\113\377\006\006\006\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\122\122\122\377\377\377\377\377\370\370\370\377\020\020\020\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\034\034\034\377\370\370\370\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\206\257\321\377\220\265\325\377\352\361\367\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\333\333\333\377\170\170\170\377\033\033\033\377\000\000\000\377" + + "\000\000\000\377\226\226\226\377\377\377\377\377\306\306\306\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\132\132\132\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\303\330\351\377\072\175\265\377\103\203\270\377" + + "\224\270\326\377\355\363\370\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\364\364\364\377\247\247\247\377" + + "\205\205\205\377\364\364\364\377\377\377\377\377\206\206\206\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\235\235\235\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\373\375\377\135\224\302\377\072\175\265\377" + + "\072\175\265\377\106\205\271\377\230\273\330\377\357\364\371\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\233\233\233\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\005\005\005\377\335\335\335\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\305\331\351\377\073\176\266\377" + + "\072\175\265\377\072\175\265\377\072\175\265\377\110\206\272\377\236\276\332\377\362\366\372\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\373\373\373\377\216\216\216\377\045\045\045\377\001\001\001\377\000\000\000\377" + + "\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\054\054\054\377\374\374\374\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\217\265\325\377" + + "\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\112\207\273\377\243\302\334\377\363\367\372\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\372\372\372\377\260\260\260\377\105\105\105\377" + + "\004\004\004\377\000\000\000\377\000\000\000\377\000\000\000\377\000\000\000\377\156\156\156\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\374\375\376\377" + + "\205\257\321\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\115\211\274\377" + + "\250\305\336\377\366\371\374\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\376\376\376\377" + + "\322\322\322\377\150\150\150\377\016\016\016\377\000\000\000\377\001\001\001\377\270\270\270\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\376\376\377\377\261\313\342\377\114\211\274\377\071\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377\072\175\265\377" + + "\072\175\265\377\115\211\274\377\277\324\347\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\354\354\354\377\223\223\223\377\233\233\233\377\375\375\375\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\363\367\372\377\265\316\343\377\201\254\320\377\145\231\305\377\141\227\304\377\154\236\310\377" + + "\217\265\325\377\305\331\351\377\367\372\374\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377" + + "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"; + + /** LWJGL Logo - 16 by 16 pixels */ + public static final ByteBuffer LWJGLIcon16x16 = loadIcon(LWJGL_ICON_DATA_16x16); + + /** LWJGL Logo - 32 by 32 pixels */ + public static final ByteBuffer LWJGLIcon32x32 = loadIcon(LWJGL_ICON_DATA_32x32); + + /** Debug flag. */ + public static final boolean DEBUG = getPrivilegedBoolean("org.lwjgl.util.Debug"); + + public static final boolean CHECKS = !getPrivilegedBoolean("org.lwjgl.util.NoChecks"); + + private static final int PLATFORM; + + static { + final String osName = getPrivilegedProperty("os.name"); + if ( osName.startsWith("Windows") ) + PLATFORM = PLATFORM_WINDOWS; + else if ( osName.startsWith("Linux") || osName.startsWith("FreeBSD") || osName.startsWith("SunOS") || osName.startsWith("Unix") ) + PLATFORM = PLATFORM_LINUX; + else if ( osName.startsWith("Mac OS X") || osName.startsWith("Darwin") ) + PLATFORM = PLATFORM_MACOSX; + else + throw new LinkageError("Unknown platform: " + osName); + } + + private static ByteBuffer loadIcon(String data) { + int len = data.length(); + ByteBuffer bb = BufferUtils.createByteBuffer(len); + for(int i=0 ; i possible_paths = new ArrayList(); + + String classloader_path = getPathFromClassLoader(libname, classloader); + if (classloader_path != null) { + log("getPathFromClassLoader: Path found: " + classloader_path); + possible_paths.add(classloader_path); + } + + for ( String platform_lib_name : platform_lib_names ) { + String lwjgl_classloader_path = getPathFromClassLoader("lwjgl", classloader); + if ( lwjgl_classloader_path != null ) { + log("getPathFromClassLoader: Path found: " + lwjgl_classloader_path); + possible_paths.add(lwjgl_classloader_path.substring(0, lwjgl_classloader_path.lastIndexOf(File.separator)) + + File.separator + platform_lib_name); + } + + // add Installer path + String alternative_path = getPrivilegedProperty("org.lwjgl.librarypath"); + if ( alternative_path != null ) { + possible_paths.add(alternative_path + File.separator + platform_lib_name); + } + + // Add all possible paths from java.library.path + String java_library_path = getPrivilegedProperty("java.library.path"); + + StringTokenizer st = new StringTokenizer(java_library_path, File.pathSeparator); + while ( st.hasMoreTokens() ) { + String path = st.nextToken(); + possible_paths.add(path + File.separator + platform_lib_name); + } + + //add current path + String current_dir = getPrivilegedProperty("user.dir"); + possible_paths.add(current_dir + File.separator + platform_lib_name); + + //add pure library (no path, let OS search) + possible_paths.add(platform_lib_name); + } + + //create needed string array + return possible_paths.toArray(new String[possible_paths.size()]); + } + + static void execPrivileged(final String[] cmd_array) throws Exception { + try { + Process process = AccessController.doPrivileged(new PrivilegedExceptionAction() { + public Process run() throws Exception { + return Runtime.getRuntime().exec(cmd_array); + } + }); + // Close unused streams to make sure the child process won't hang + process.getInputStream().close(); + process.getOutputStream().close(); + process.getErrorStream().close(); + } catch (PrivilegedActionException e) { + throw (Exception)e.getCause(); + } + } + + private static String getPrivilegedProperty(final String property_name) { + return AccessController.doPrivileged(new PrivilegedAction() { + public String run() { + return System.getProperty(property_name); + } + }); + } + + /** + * Tries to locate named library from the current ClassLoader + * This method exists because native libraries are loaded from native code, and as such + * is exempt from ClassLoader library loading rutines. It therefore always fails. + * We therefore invoke the protected method of the ClassLoader to see if it can + * locate it. + * + * @param libname Name of library to search for + * @param classloader Classloader to use + * @return Absolute path to library if found, otherwise null + */ + private static String getPathFromClassLoader(final String libname, final ClassLoader classloader) { + Class c = null; + + try { + log("getPathFromClassLoader: searching for: " + libname); + c = classloader.getClass(); + while (c != null) { + final Class clazz = c; + try { + return AccessController.doPrivileged(new PrivilegedExceptionAction() { + public String run() throws Exception { + Method findLibrary = clazz.getDeclaredMethod("findLibrary", String.class); + findLibrary.setAccessible(true); + String path = (String)findLibrary.invoke(classloader, libname); + return path; + } + }); + } catch (PrivilegedActionException e) { + log("Failed to locate findLibrary method: " + e.getCause()); + c = c.getSuperclass(); + } + } + } catch (Exception e) { + log("Failure locating " + e + " using classloader:" + c); + } + return null; + } + + /** + * Gets a boolean property as a privileged action. + */ + public static boolean getPrivilegedBoolean(final String property_name) { + return AccessController.doPrivileged(new PrivilegedAction() { + public Boolean run() { + return Boolean.getBoolean(property_name); + } + }); + } + + /** + * Gets an integer property as a privileged action. + * + * @param property_name the integer property name + * + * @return the property value + */ + public static Integer getPrivilegedInteger(final String property_name) { + return AccessController.doPrivileged(new PrivilegedAction() { + public Integer run() { + return Integer.getInteger(property_name); + } + }); + } + + /** + * Gets an integer property as a privileged action. + * + * @param property_name the integer property name + * @param default_val the default value to use if the property is not defined + * + * @return the property value + */ + public static Integer getPrivilegedInteger(final String property_name, final int default_val) { + return AccessController.doPrivileged(new PrivilegedAction() { + public Integer run() { + return Integer.getInteger(property_name, default_val); + } + }); + } + + /** + * Prints the given message to System.err if DEBUG is true. + * + * @param msg Message to print + */ + public static void log(CharSequence msg) { + if (DEBUG) { + System.err.println("[LWJGL] " + msg); + } + } + + /** + * Method to determine if the current system is running a version of + * Mac OS X better than the given version. This is only useful for Mac OS X + * specific code and will not work for any other platform. + */ + public static boolean isMacOSXEqualsOrBetterThan(int major_required, int minor_required) { + String os_version = getPrivilegedProperty("os.version"); + StringTokenizer version_tokenizer = new StringTokenizer(os_version, "."); + int major; + int minor; + try { + String major_str = version_tokenizer.nextToken(); + String minor_str = version_tokenizer.nextToken(); + major = Integer.parseInt(major_str); + minor = Integer.parseInt(minor_str); + } catch (Exception e) { + LWJGLUtil.log("Exception occurred while trying to determine OS version: " + e); + // Best guess, no + return false; + } + return major > major_required || (major == major_required && minor >= minor_required); + } + + /** + * Returns a map of public static final integer fields in the specified classes, to their String representations. + * An optional filter can be specified to only include specific fields. The target map may be null, in which + * case a new map is allocated and returned. + *

+ * This method is useful when debugging to quickly identify values returned from the AL/GL/CL APIs. + * + * @param filter the filter to use (optional) + * @param target the target map (optional) + * @param tokenClasses an array of classes to get tokens from + * + * @return the token map + */ + + public static Map getClassTokens(final TokenFilter filter, final Map target, final Class ... tokenClasses) { + return getClassTokens(filter, target, Arrays.asList(tokenClasses)); + } + + /** + * Returns a map of public static final integer fields in the specified classes, to their String representations. + * An optional filter can be specified to only include specific fields. The target map may be null, in which + * case a new map is allocated and returned. + *

+ * This method is useful when debugging to quickly identify values returned from the AL/GL/CL APIs. + * + * @param filter the filter to use (optional) + * @param target the target map (optional) + * @param tokenClasses the classes to get tokens from + * + * @return the token map + */ + public static Map getClassTokens(final TokenFilter filter, Map target, final Iterable tokenClasses) { + if ( target == null ) + target = new HashMap(); + + final int TOKEN_MODIFIERS = Modifier.PUBLIC | Modifier.STATIC | Modifier.FINAL; + + for ( final Class tokenClass : tokenClasses ) { + for ( final Field field : tokenClass.getDeclaredFields() ) { + // Get only fields. + if ( (field.getModifiers() & TOKEN_MODIFIERS) == TOKEN_MODIFIERS && field.getType() == int.class ) { + try { + final int value = field.getInt(null); + if ( filter != null && !filter.accept(field, value) ) + continue; + + if ( target.containsKey(value) ) // Print colliding tokens in their hex representation. + target.put(value, toHexString(value)); + else + target.put(value, field.getName()); + } catch (IllegalAccessException e) { + // Ignore + } + } + } + } + + return target; + } + + /** + * Returns a string representation of the integer argument as an + * unsigned integer in base 16. The string will be uppercase + * and will have a leading '0x'. + * + * @param value the integer value + * + * @return the hex string representation + */ + public static String toHexString(final int value) { + return "0x" + Integer.toHexString(value).toUpperCase(); + } + + /** Simple interface for Field filtering. */ + public interface TokenFilter { + + /** + * Should return true if the specified Field passes the filter. + * + * @param field the Field to test + * @param value the integer value of the field + * + * @result true if the Field is accepted + */ + boolean accept(Field field, int value); + + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/LinuxSysImplementation.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/LinuxSysImplementation.java new file mode 100644 index 0000000..33ad031 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/LinuxSysImplementation.java @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl; + +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.security.PrivilegedExceptionAction; +import java.lang.UnsatisfiedLinkError; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +final class LinuxSysImplementation extends J2SESysImplementation { + private static final int JNI_VERSION = 19; + + static { + // Load libawt.so and libmawt.so, needed for libjawt.so + java.awt.Toolkit.getDefaultToolkit(); + + // manually load libjawt.so into vm, needed since Java 7 + AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + try { + System.loadLibrary("jawt"); + } catch (UnsatisfiedLinkError e) { + // catch and ignore an already loaded in another classloader + // exception, as vm already has it loaded + } + return null; + } + }); + } + + public int getRequiredJNIVersion() { + return JNI_VERSION; + } + + public boolean openURL(final String url) { + // Linux may as well resort to pure Java hackery, as there's no Linux native way of doing it + // right anyway. + + String[] browsers = {"sensible-browser", "xdg-open", "google-chrome", "chromium", "firefox", "iceweasel", "mozilla", "opera", "konqueror", "nautilus", "galeon", "netscape"}; + + for ( final String browser : browsers ) { + try { + LWJGLUtil.execPrivileged(new String[] { browser, url }); + return true; + } catch (Exception e) { + // Ignore + e.printStackTrace(System.err); + } + } + + // Seems to have failed + return false; + } + + public boolean has64Bit() { + return true; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/MacOSXSysImplementation.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/MacOSXSysImplementation.java new file mode 100644 index 0000000..4ba8d55 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/MacOSXSysImplementation.java @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl; + +import com.apple.eio.FileManager; +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.security.PrivilegedExceptionAction; +import java.lang.UnsatisfiedLinkError; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +final class MacOSXSysImplementation extends J2SESysImplementation { + private static final int JNI_VERSION = 25; + + static { + // Manually start the AWT Application Loop + java.awt.Toolkit.getDefaultToolkit(); + } + + public int getRequiredJNIVersion() { + return JNI_VERSION; + } + + public boolean openURL(String url) { + try { + FileManager.openURL(url); + return true; + } catch (Exception e) { + LWJGLUtil.log("Exception occurred while trying to invoke browser: " + e); + return false; + } + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/MemoryUtil.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/MemoryUtil.java new file mode 100644 index 0000000..6dda563 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/MemoryUtil.java @@ -0,0 +1,430 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl; + +import java.lang.reflect.Field; +import java.nio.*; +import java.nio.charset.*; + +/** + * [INTERNAL USE ONLY] + *

+ * This class provides utility methods for passing buffers to JNI API calls. + * + * @author Spasi + */ +public final class MemoryUtil { + + private static final Charset ascii; + private static final Charset utf8; + private static final Charset utf16; + + static { + ascii = Charset.forName("ISO-8859-1"); + utf8 = Charset.forName("UTF-8"); + utf16 = Charset.forName("UTF-16LE"); + } + + private static final Accessor memUtil; + + static { + Accessor util; + try { + // Depends on java.nio.Buffer#address and sun.misc.Unsafe + util = loadAccessor("org.lwjgl.MemoryUtilSun$AccessorUnsafe"); + } catch (Exception e0) { + try { + // Depends on java.nio.Buffer#address and sun.reflect.FieldAccessor + util = loadAccessor("org.lwjgl.MemoryUtilSun$AccessorReflectFast"); + } catch (Exception e1) { + try { + // Depends on java.nio.Buffer#address + util = new AccessorReflect(); + } catch (Exception e2) { + LWJGLUtil.log("Unsupported JVM detected, this will likely result in low performance. Please inform LWJGL developers."); + util = new AccessorJNI(); + } + } + } + + LWJGLUtil.log("MemoryUtil Accessor: " + util.getClass().getSimpleName()); + memUtil = util; + + /* + BENCHMARK RESULTS - Oracle Server VM: + + Unsafe: 4ns + ReflectFast: 8ns + Reflect: 10ns + JNI: 82ns + + BENCHMARK RESULTS - Oracle Client VM: + + Unsafe: 5ns + ReflectFast: 81ns + Reflect: 85ns + JNI: 87ns + + On non-Oracle VMs, Unsafe should be the fastest implementation as well. In the absence + of Unsafe, performance will depend on how reflection and JNI are implemented. For now + we'll go with what we see on the Oracle VM (that is, we'll prefer reflection over JNI). + */ + } + + private MemoryUtil() { + } + + /** + * Returns the memory address of the specified buffer. [INTERNAL USE ONLY] + * + * @param buffer the buffer + * + * @return the memory address + */ + public static long getAddress0(Buffer buffer) { return memUtil.getAddress(buffer); } + + public static long getAddress0Safe(Buffer buffer) { return buffer == null ? 0L : memUtil.getAddress(buffer); } + + public static long getAddress0(PointerBuffer buffer) { return memUtil.getAddress(buffer.getBuffer()); } + + public static long getAddress0Safe(PointerBuffer buffer) { return buffer == null ? 0L : memUtil.getAddress(buffer.getBuffer()); } + + // --- [ API utilities ] --- + + public static long getAddress(ByteBuffer buffer) { return getAddress(buffer, buffer.position()); } + + public static long getAddress(ByteBuffer buffer, int position) { return getAddress0(buffer) + position; } + + public static long getAddress(ShortBuffer buffer) { return getAddress(buffer, buffer.position()); } + + public static long getAddress(ShortBuffer buffer, int position) { return getAddress0(buffer) + (position << 1); } + + public static long getAddress(CharBuffer buffer) { return getAddress(buffer, buffer.position()); } + + public static long getAddress(CharBuffer buffer, int position) { return getAddress0(buffer) + (position << 1); } + + public static long getAddress(IntBuffer buffer) { return getAddress(buffer, buffer.position()); } + + public static long getAddress(IntBuffer buffer, int position) { return getAddress0(buffer) + (position << 2); } + + public static long getAddress(FloatBuffer buffer) { return getAddress(buffer, buffer.position()); } + + public static long getAddress(FloatBuffer buffer, int position) { return getAddress0(buffer) + (position << 2); } + + public static long getAddress(LongBuffer buffer) { return getAddress(buffer, buffer.position()); } + + public static long getAddress(LongBuffer buffer, int position) { return getAddress0(buffer) + (position << 3); } + + public static long getAddress(DoubleBuffer buffer) { return getAddress(buffer, buffer.position()); } + + public static long getAddress(DoubleBuffer buffer, int position) { return getAddress0(buffer) + (position << 3); } + + public static long getAddress(PointerBuffer buffer) { return getAddress(buffer, buffer.position()); } + + public static long getAddress(PointerBuffer buffer, int position) { return getAddress0(buffer) + (position * PointerBuffer.getPointerSize()); } + + // --- [ API utilities - Safe ] --- + + public static long getAddressSafe(ByteBuffer buffer) { return buffer == null ? 0L : getAddress(buffer); } + + public static long getAddressSafe(ByteBuffer buffer, int position) { return buffer == null ? 0L : getAddress(buffer, position); } + + public static long getAddressSafe(ShortBuffer buffer) { return buffer == null ? 0L : getAddress(buffer); } + + public static long getAddressSafe(ShortBuffer buffer, int position) { return buffer == null ? 0L : getAddress(buffer, position); } + + public static long getAddressSafe(CharBuffer buffer) { return buffer == null ? 0L : getAddress(buffer); } + + public static long getAddressSafe(CharBuffer buffer, int position) { return buffer == null ? 0L : getAddress(buffer, position); } + + public static long getAddressSafe(IntBuffer buffer) { return buffer == null ? 0L : getAddress(buffer); } + + public static long getAddressSafe(IntBuffer buffer, int position) { return buffer == null ? 0L : getAddress(buffer, position); } + + public static long getAddressSafe(FloatBuffer buffer) { return buffer == null ? 0L : getAddress(buffer); } + + public static long getAddressSafe(FloatBuffer buffer, int position) { return buffer == null ? 0L : getAddress(buffer, position); } + + public static long getAddressSafe(LongBuffer buffer) { return buffer == null ? 0L : getAddress(buffer); } + + public static long getAddressSafe(LongBuffer buffer, int position) { return buffer == null ? 0L : getAddress(buffer, position); } + + public static long getAddressSafe(DoubleBuffer buffer) { return buffer == null ? 0L : getAddress(buffer); } + + public static long getAddressSafe(DoubleBuffer buffer, int position) { return buffer == null ? 0L : getAddress(buffer, position); } + + public static long getAddressSafe(PointerBuffer buffer) { return buffer == null ? 0L : getAddress(buffer); } + + public static long getAddressSafe(PointerBuffer buffer, int position) { return buffer == null ? 0L : getAddress(buffer, position); } + + // --- [ String utilities ] --- + + /** + * Returns a ByteBuffer containing the specified text ASCII encoded and null-terminated. + * If text is null, null is returned. + * + * @param text the text to encode + * + * @return the encoded text or null + * + * @see String#getBytes() + */ + public static ByteBuffer encodeASCII(final CharSequence text) { + return encode(text, ascii); + } + + /** + * Returns a ByteBuffer containing the specified text UTF-8 encoded and null-terminated. + * If text is null, null is returned. + * + * @param text the text to encode + * + * @return the encoded text or null + * + * @see String#getBytes() + */ + public static ByteBuffer encodeUTF8(final CharSequence text) { + return encode(text, utf8); + } + + /** + * Returns a ByteBuffer containing the specified text UTF-16LE encoded and null-terminated. + * If text is null, null is returned. + * + * @param text the text to encode + * + * @return the encoded text + */ + public static ByteBuffer encodeUTF16(final CharSequence text) { + return encode(text, utf16); + } + + /** + * Wraps the specified text in a null-terminated CharBuffer and encodes it using the specified Charset. + * + * @param text the text to encode + * @param charset the charset to use for encoding + * + * @return the encoded text + */ + private static ByteBuffer encode(final CharSequence text, final Charset charset) { + if ( text == null ) + return null; + + return encode(CharBuffer.wrap(new CharSequenceNT(text)), charset); + } + + /** + * A {@link CharsetEncoder#encode(java.nio.CharBuffer)} implementation that uses {@link BufferUtils#createByteBuffer(int)} + * instead of {@link ByteBuffer#allocate(int)}. + * + * @see CharsetEncoder#encode(java.nio.CharBuffer) + */ + private static ByteBuffer encode(final CharBuffer in, final Charset charset) { + final CharsetEncoder encoder = charset.newEncoder(); // encoders are not thread-safe, create a new one on every call + + int n = (int)(in.remaining() * encoder.averageBytesPerChar()); + ByteBuffer out = BufferUtils.createByteBuffer(n); + + if ( n == 0 && in.remaining() == 0 ) + return out; + + encoder.reset(); + while ( true ) { + CoderResult cr = in.hasRemaining() ? encoder.encode(in, out, true) : CoderResult.UNDERFLOW; + if ( cr.isUnderflow() ) + cr = encoder.flush(out); + + if ( cr.isUnderflow() ) + break; + + if ( cr.isOverflow() ) { + n = 2 * n + 1; // Ensure progress; n might be 0! + ByteBuffer o = BufferUtils.createByteBuffer(n); + out.flip(); + o.put(out); + out = o; + continue; + } + + try { + cr.throwException(); + } catch (CharacterCodingException e) { + throw new RuntimeException(e); + } + } + out.flip(); + return out; + } + + public static String decodeASCII(final ByteBuffer buffer) { + return decode(buffer, ascii); + } + + public static String decodeUTF8(final ByteBuffer buffer) { + return decode(buffer, utf8); + } + + public static String decodeUTF16(final ByteBuffer buffer) { + return decode(buffer, utf16); + } + + private static String decode(final ByteBuffer buffer, final Charset charset) { + if ( buffer == null ) + return null; + + return decodeImpl(buffer, charset); + } + + private static String decodeImpl(final ByteBuffer in, final Charset charset) { + final CharsetDecoder decoder = charset.newDecoder(); // decoders are not thread-safe, create a new one on every call + + int n = (int)(in.remaining() * decoder.averageCharsPerByte()); + CharBuffer out = BufferUtils.createCharBuffer(n); + + if ( (n == 0) && (in.remaining() == 0) ) + return ""; + + decoder.reset(); + for (; ; ) { + CoderResult cr = in.hasRemaining() ? decoder.decode(in, out, true) : CoderResult.UNDERFLOW; + if ( cr.isUnderflow() ) + cr = decoder.flush(out); + + if ( cr.isUnderflow() ) + break; + if ( cr.isOverflow() ) { + n = 2 * n + 1; // Ensure progress; n might be 0! + CharBuffer o = BufferUtils.createCharBuffer(n); + out.flip(); + o.put(out); + out = o; + continue; + } + try { + cr.throwException(); + } catch (CharacterCodingException e) { + throw new RuntimeException(e); + } + } + out.flip(); + return out.toString(); + } + + /** A null-terminated CharSequence. */ + private static class CharSequenceNT implements CharSequence { + + final CharSequence source; + + CharSequenceNT(CharSequence source) { + this.source = source; + } + + public int length() { + return source.length() + 1; + + } + + public char charAt(final int index) { + return index == source.length() ? '\0' : source.charAt(index); + + } + + public CharSequence subSequence(final int start, final int end) { + return new CharSequenceNT(source.subSequence(start, Math.min(end, source.length()))); + } + + } + + interface Accessor { + + long getAddress(Buffer buffer); + + } + + private static Accessor loadAccessor(final String className) throws Exception { + return (Accessor)Class.forName(className).newInstance(); + } + + /** Default implementation. */ + private static class AccessorJNI implements Accessor { + + public long getAddress(final Buffer buffer) { + return BufferUtils.getBufferAddress(buffer); + } + + } + + /** Implementation using reflection on ByteBuffer. */ + private static class AccessorReflect implements Accessor { + + private final Field address; + + AccessorReflect() { + try { + address = getAddressField(); + } catch (NoSuchFieldException e) { + throw new UnsupportedOperationException(e); + } + address.setAccessible(true); + } + + public long getAddress(final Buffer buffer) { + try { + return address.getLong(buffer); + } catch (IllegalAccessException e) { + // cannot happen + return 0L; + } + } + + } + + static Field getAddressField() throws NoSuchFieldException { + return getDeclaredFieldRecursive(ByteBuffer.class, "address"); + } + + private static Field getDeclaredFieldRecursive(final Class root, final String fieldName) throws NoSuchFieldException { + Class type = root; + + do { + try { + return type.getDeclaredField(fieldName); + } catch (NoSuchFieldException e) { + type = type.getSuperclass(); + } + } while ( type != null ); + + throw new NoSuchFieldException(fieldName + " does not exist in " + root.getSimpleName() + " or any of its superclasses."); + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/MemoryUtilSun.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/MemoryUtilSun.java new file mode 100644 index 0000000..3a1cd31 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/MemoryUtilSun.java @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl; + +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.nio.Buffer; + +import sun.misc.Unsafe; +import sun.reflect.FieldAccessor; + +/** + * MemoryUtil.Accessor implementations that depend on sun.misc. + * We use reflection to grab these, so that we can compile on JDKs + * that do not support sun.misc. + * + * @author Spasi + */ +final class MemoryUtilSun { + + private MemoryUtilSun() { + } + + /** Implementation using sun.misc.Unsafe. */ + private static class AccessorUnsafe implements MemoryUtil.Accessor { + + private final Unsafe unsafe; + private final long address; + + AccessorUnsafe() { + try { + unsafe = getUnsafeInstance(); + address = unsafe.objectFieldOffset(MemoryUtil.getAddressField()); + } catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + + public long getAddress(final Buffer buffer) { + return unsafe.getLong(buffer, address); + } + + private static Unsafe getUnsafeInstance() { + final Field[] fields = Unsafe.class.getDeclaredFields(); + + /* + Different runtimes use different names for the Unsafe singleton, + so we cannot use .getDeclaredField and we scan instead. For example: + + Oracle: theUnsafe + PERC : m_unsafe_instance + Android: THE_ONE + */ + for ( Field field : fields ) { + if ( !field.getType().equals(Unsafe.class) ) + continue; + + final int modifiers = field.getModifiers(); + if ( !(Modifier.isStatic(modifiers) && Modifier.isFinal(modifiers)) ) + continue; + + field.setAccessible(true); + try { + return (Unsafe)field.get(null); + } catch (IllegalAccessException e) { + // ignore + } + break; + } + + throw new UnsupportedOperationException(); + } + + } + + /** Implementation using reflection on ByteBuffer, FieldAccessor is used directly. */ + private static class AccessorReflectFast implements MemoryUtil.Accessor { + + private final FieldAccessor addressAccessor; + + AccessorReflectFast() { + Field address; + try { + address = MemoryUtil.getAddressField(); + } catch (NoSuchFieldException e) { + throw new UnsupportedOperationException(e); + } + address.setAccessible(true); + + try { + Method m = Field.class.getDeclaredMethod("acquireFieldAccessor", boolean.class); + m.setAccessible(true); + addressAccessor = (FieldAccessor)m.invoke(address, true); + } catch (Exception e) { + throw new UnsupportedOperationException(e); + } + } + + public long getAddress(final Buffer buffer) { + return addressAccessor.getLong(buffer); + } + + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/PointerBuffer.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/PointerBuffer.java new file mode 100644 index 0000000..2989114 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/PointerBuffer.java @@ -0,0 +1,960 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl; + +import java.lang.reflect.Method; +import java.nio.*; + +/** + * This class is a container for architecture independent pointer data. + * The interface mirrors the NIO LongBuffer API for convenience. + * + * @author Spasi + */ +public class PointerBuffer implements Comparable { + + private static final boolean is64Bit; + + static { + // Use reflection so that we can compile this class for the Generator. + boolean is64 = false; + try { + Method m = Class.forName("org.lwjgl.Sys").getDeclaredMethod("is64Bit", (Class[])null); + is64 = (Boolean)m.invoke(null, (Object[])null); + } catch (Throwable t) { + // ignore + } finally { + is64Bit = is64; + } + } + + protected final ByteBuffer pointers; + + protected final Buffer view; + protected final IntBuffer view32; + protected final LongBuffer view64; + + /** + * Creates a new PointerBuffer with the specified capacity. + * + * @param capacity the PointerBuffer size, in number of pointers + */ + public PointerBuffer(final int capacity) { + this(BufferUtils.createByteBuffer(capacity * getPointerSize())); + } + + /** + * Creates a new PointerBuffer using the specified ByteBuffer as its pointer + * data source. This is useful for users that do their own memory management + * over a big ByteBuffer, instead of allocating many small ones. + * + * @param source the source buffer + */ + public PointerBuffer(final ByteBuffer source) { + if ( LWJGLUtil.CHECKS ) + checkSource(source); + + pointers = source.slice().order(source.order()); + + if ( is64Bit ) { + view32 = null; + view = view64 = pointers.asLongBuffer(); + } else { + view = view32 = pointers.asIntBuffer(); + view64 = null; + } + } + + private static void checkSource(final ByteBuffer source) { + if ( !source.isDirect() ) + throw new IllegalArgumentException("The source buffer is not direct."); + + final int alignment = is64Bit ? 8 : 4; + if ( (MemoryUtil.getAddress0(source) + source.position()) % alignment != 0 || source.remaining() % alignment != 0 ) + throw new IllegalArgumentException("The source buffer is not aligned to " + alignment + " bytes."); + } + + /** + * Returns the ByteBuffer that backs this PointerBuffer. + * + * @return the pointer ByteBuffer + */ + public ByteBuffer getBuffer() { + return pointers; + } + + /** Returns true if the underlying architecture is 64bit. */ + public static boolean is64Bit() { + return is64Bit; + } + + /** + * Returns the pointer size in bytes, based on the underlying architecture. + * + * @return The pointer size in bytes + */ + public static int getPointerSize() { + return is64Bit ? 8 : 4; + } + + /** + * Returns this buffer's capacity.

+ * + * @return The capacity of this buffer + */ + public final int capacity() { + return view.capacity(); + } + + /** + * Returns this buffer's position.

+ * + * @return The position of this buffer + */ + public final int position() { + return view.position(); + } + + /** + * Returns this buffer's position, in bytes.

+ * + * @return The position of this buffer in bytes. + */ + public final int positionByte() { + return position() * getPointerSize(); + } + + /** + * Sets this buffer's position. If the mark is defined and larger than the + * new position then it is discarded.

+ * + * @param newPosition The new position value; must be non-negative + * and no larger than the current limit + * + * @return This buffer + * + * @throws IllegalArgumentException If the preconditions on newPosition do not hold + */ + public final PointerBuffer position(int newPosition) { + view.position(newPosition); + return this; + } + + /** + * Returns this buffer's limit.

+ * + * @return The limit of this buffer + */ + public final int limit() { + return view.limit(); + } + + /** + * Sets this buffer's limit. If the position is larger than the new limit + * then it is set to the new limit. If the mark is defined and larger than + * the new limit then it is discarded.

+ * + * @param newLimit The new limit value; must be non-negative + * and no larger than this buffer's capacity + * + * @return This buffer + * + * @throws IllegalArgumentException If the preconditions on newLimit do not hold + */ + public final PointerBuffer limit(int newLimit) { + view.limit(newLimit); + return this; + } + + /** + * Sets this buffer's mark at its position.

+ * + * @return This buffer + */ + public final PointerBuffer mark() { + view.mark(); + return this; + } + + /** + * Resets this buffer's position to the previously-marked position. + *

+ *

Invoking this method neither changes nor discards the mark's + * value.

+ * + * @return This buffer + * + * @throws java.nio.InvalidMarkException If the mark has not been set + */ + public final PointerBuffer reset() { + view.reset(); + return this; + } + + /** + * Clears this buffer. The position is set to zero, the limit is set to + * the capacity, and the mark is discarded. + *

+ *

Invoke this method before using a sequence of channel-read or + * put operations to fill this buffer. For example: + *

+ *

+	 * buf.clear();     // Prepare buffer for reading
+	 * in.read(buf);    // Read data
+ *

+ *

This method does not actually erase the data in the buffer, but it + * is named as if it did because it will most often be used in situations + * in which that might as well be the case.

+ * + * @return This buffer + */ + public final PointerBuffer clear() { + view.clear(); + return this; + } + + /** + * Flips this buffer. The limit is set to the current position and then + * the position is set to zero. If the mark is defined then it is + * discarded. + *

+ *

After a sequence of channel-read or put operations, invoke + * this method to prepare for a sequence of channel-write or relative + * get operations. For example: + *

+ *

+	 * buf.put(magic);    // Prepend header
+	 * in.read(buf);      // Read data into rest of buffer
+	 * buf.flip();        // Flip buffer
+	 * out.write(buf);    // Write header + data to channel
+ *

+ *

This method is often used in conjunction with the {@link + * java.nio.ByteBuffer#compact compact} method when transferring data from + * one place to another.

+ * + * @return This buffer + */ + public final PointerBuffer flip() { + view.flip(); + return this; + } + + /** + * Rewinds this buffer. The position is set to zero and the mark is + * discarded. + *

+ *

Invoke this method before a sequence of channel-write or get + * operations, assuming that the limit has already been set + * appropriately. For example: + *

+ *

+	 * out.write(buf);    // Write remaining data
+	 * buf.rewind();      // Rewind buffer
+	 * buf.get(array);    // Copy data into array
+ * + * @return This buffer + */ + public final PointerBuffer rewind() { + view.rewind(); + return this; + } + + /** + * Returns the number of elements between the current position and the + * limit.

+ * + * @return The number of elements remaining in this buffer + */ + public final int remaining() { + return view.remaining(); + } + + /** + * Returns the number of bytes between the current position and the + * limit.

+ * + * @return The number of bytes remaining in this buffer + */ + public final int remainingByte() { + return remaining() * getPointerSize(); + } + + /** + * Tells whether there are any elements between the current position and + * the limit.

+ * + * @return true if, and only if, there is at least one element + * remaining in this buffer + */ + public final boolean hasRemaining() { + return view.hasRemaining(); + } + + /** + * Allocates a new pointer buffer. + *

+ *

The new buffer's position will be zero, its limit will be its + * capacity, and its mark will be undefined.

+ * + * @param capacity The new buffer's capacity, in pointers + * + * @return The new pointer buffer + * + * @throws IllegalArgumentException If the capacity is a negative integer + */ + public static PointerBuffer allocateDirect(int capacity) { + return new PointerBuffer(capacity); + } + + /** + * This method is used in slice and duplicate instead of normal object construction, + * so that subclasses can return themselves. + * + * @param source + * + * @return A new PointerBuffer instance + */ + protected PointerBuffer newInstance(final ByteBuffer source) { + return new PointerBuffer(source); + } + + /** + * Creates a new pointer buffer whose content is a shared subsequence of + * this buffer's content. + *

+ *

The content of the new buffer will start at this buffer's current + * position. Changes to this buffer's content will be visible in the new + * buffer, and vice versa; the two buffers' position, limit, and mark + * values will be independent. + *

+ *

The new buffer's position will be zero, its capacity and its limit + * will be the number of longs remaining in this buffer, and its mark + * will be undefined. The new buffer will be direct if, and only if, this + * buffer is direct, and it will be read-only if, and only if, this buffer + * is read-only.

+ * + * @return The new pointer buffer + */ + public PointerBuffer slice() { + final int pointerSize = getPointerSize(); + + pointers.position(view.position() * pointerSize); + pointers.limit(view.limit() * pointerSize); + + try { + // We're slicing in the constructor. + return newInstance(pointers); + } finally { + pointers.clear(); + } + } + + /** + * Creates a new pointer buffer that shares this buffer's content. + *

+ *

The content of the new buffer will be that of this buffer. Changes + * to this buffer's content will be visible in the new buffer, and vice + * versa; the two buffers' position, limit, and mark values will be + * independent. + *

+ *

The new buffer's capacity, limit and position will be + * identical to those of this buffer. The new buffer will be direct if, + * and only if, this buffer is direct, and it will be read-only if, and + * only if, this buffer is read-only.

+ * + * @return The new pointer buffer + */ + public PointerBuffer duplicate() { + final PointerBuffer buffer = newInstance(pointers); + + buffer.position(view.position()); + buffer.limit(view.limit()); + + return buffer; + } + + /** + * Creates a new, read-only pointer buffer that shares this buffer's + * content. + *

+ *

The content of the new buffer will be that of this buffer. Changes + * to this buffer's content will be visible in the new buffer; the new + * buffer itself, however, will be read-only and will not allow the shared + * content to be modified. The two buffers' position, limit, and mark + * values will be independent. + *

+ *

The new buffer's capacity, limit and position will be + * identical to those of this buffer. + *

+ *

If this buffer is itself read-only then this method behaves in + * exactly the same way as the {@link #duplicate duplicate} method.

+ * + * @return The new, read-only pointer buffer + */ + public PointerBuffer asReadOnlyBuffer() { + final PointerBuffer buffer = new PointerBufferR(pointers); + + buffer.position(view.position()); + buffer.limit(view.limit()); + + return buffer; + } + + public boolean isReadOnly() { + return false; + } + + /** + * Relative get method. Reads the long at this buffer's + * current position, and then increments the position.

+ * + * @return The long at the buffer's current position + * + * @throws BufferUnderflowException If the buffer's current position is not smaller than its limit + */ + public long get() { + if ( is64Bit ) + return view64.get(); + else + return view32.get() & 0x00000000FFFFFFFFL; + } + + /** + * Relative put method  (optional operation). + *

+ *

Writes the given long into this buffer at the current + * position, and then increments the position.

+ * + * @param l The long to be written + * + * @return This buffer + * + * @throws BufferOverflowException If this buffer's current position is not smaller than its limit + * @throws ReadOnlyBufferException If this buffer is read-only + */ + public PointerBuffer put(long l) { + if ( is64Bit ) + view64.put(l); + else + view32.put((int)l); + return this; + } + + /** + * Convenience put that accepts PointerWrapper objects. + * + * @see #put(long) + */ + public PointerBuffer put(final PointerWrapper pointer) { + return put(pointer.getPointer()); + } + + /** + * Convenience put on a target ByteBuffer. + * + * @param target the target ByteBuffer + * @param l the long value to be written + */ + public static void put(final ByteBuffer target, long l) { + if ( is64Bit ) + target.putLong(l); + else + target.putInt((int)l); + } + + /** + * Absolute get method. Reads the long at the given + * index.

+ * + * @param index The index from which the long will be read + * + * @return The long at the given index + * + * @throws IndexOutOfBoundsException If index is negative + * or not smaller than the buffer's limit + */ + public long get(int index) { + if ( is64Bit ) + return view64.get(index); + else + return view32.get(index) & 0x00000000FFFFFFFFL; + } + + /** + * Absolute put method  (optional operation). + *

+ *

Writes the given long into this buffer at the given + * index.

+ * + * @param index The index at which the long will be written + * @param l The long value to be written + * + * @return This buffer + * + * @throws IndexOutOfBoundsException If index is negative + * or not smaller than the buffer's limit + * @throws ReadOnlyBufferException If this buffer is read-only + */ + public PointerBuffer put(int index, long l) { + if ( is64Bit ) + view64.put(index, l); + else + view32.put(index, (int)l); + return this; + } + + /** + * Convenience put that accepts PointerWrapper objects. + * + * @see #put(int, long) + */ + public PointerBuffer put(int index, PointerWrapper pointer) { + return put(index, pointer.getPointer()); + } + + /** + * Convenience put on a target ByteBuffer. + * + * @param target the target ByteBuffer + * @param index the index at which the long will be written + * @param l the long value to be written + */ + public static void put(final ByteBuffer target, int index, long l) { + if ( is64Bit ) + target.putLong(index, l); + else + target.putInt(index, (int)l); + } + + // -- Bulk get operations -- + + /** + * Relative bulk get method. + *

+ *

This method transfers longs from this buffer into the given + * destination array. If there are fewer longs remaining in the + * buffer than are required to satisfy the request, that is, if + * length > remaining(), then no + * longs are transferred and a {@link BufferUnderflowException} is + * thrown. + *

+ *

Otherwise, this method copies length longs from this + * buffer into the given array, starting at the current position of this + * buffer and at the given offset in the array. The position of this + * buffer is then incremented by length. + *

+ *

In other words, an invocation of this method of the form + * src.get(dst, off, len) has exactly the same effect as + * the loop + *

+ *

+	 *     for (int i = off; i < off + len; i++)
+	 *         dst[i] = src.get(); 
+ *

+ * except that it first checks that there are sufficient longs in + * this buffer and it is potentially much more efficient.

+ * + * @param dst The array into which longs are to be written + * @param offset The offset within the array of the first long to be + * written; must be non-negative and no larger than + * dst.length + * @param length The maximum number of longs to be written to the given + * array; must be non-negative and no larger than + * dst.length - offset + * + * @return This buffer + * + * @throws BufferUnderflowException If there are fewer than length longs + * remaining in this buffer + * @throws IndexOutOfBoundsException If the preconditions on the offset and length + * parameters do not hold + */ + public PointerBuffer get(long[] dst, int offset, int length) { + if ( is64Bit ) + view64.get(dst, offset, length); + else { + checkBounds(offset, length, dst.length); + if ( length > view32.remaining() ) + throw new BufferUnderflowException(); + int end = offset + length; + for ( int i = offset; i < end; i++ ) + dst[i] = view32.get() & 0x00000000FFFFFFFFL; + } + + return this; + } + + /** + * Relative bulk get method. + *

+ *

This method transfers longs from this buffer into the given + * destination array. An invocation of this method of the form + * src.get(a) behaves in exactly the same way as the invocation + *

+ *

+	 *     src.get(a, 0, a.length) 
+ * + * @return This buffer + * + * @throws BufferUnderflowException If there are fewer than length longs + * remaining in this buffer + */ + public PointerBuffer get(long[] dst) { + return get(dst, 0, dst.length); + } + + /** + * Relative bulk put method  (optional operation). + *

+ *

This method transfers the longs remaining in the given source + * buffer into this buffer. If there are more longs remaining in the + * source buffer than in this buffer, that is, if + * src.remaining() > remaining(), + * then no longs are transferred and a {@link + * BufferOverflowException} is thrown. + *

+ *

Otherwise, this method copies + * n = src.remaining() longs from the given + * buffer into this buffer, starting at each buffer's current position. + * The positions of both buffers are then incremented by n. + *

+ *

In other words, an invocation of this method of the form + * dst.put(src) has exactly the same effect as the loop + *

+ *

+	 *     while (src.hasRemaining())
+	 *         dst.put(src.get()); 
+ *

+ * except that it first checks that there is sufficient space in this + * buffer and it is potentially much more efficient.

+ * + * @param src The source buffer from which longs are to be read; + * must not be this buffer + * + * @return This buffer + * + * @throws BufferOverflowException If there is insufficient space in this buffer + * for the remaining longs in the source buffer + * @throws IllegalArgumentException If the source buffer is this buffer + * @throws ReadOnlyBufferException If this buffer is read-only + */ + public PointerBuffer put(PointerBuffer src) { + if ( is64Bit ) + view64.put(src.view64); + else + view32.put(src.view32); + return this; + } + + /** + * Relative bulk put method  (optional operation). + *

+ *

This method transfers longs into this buffer from the given + * source array. If there are more longs to be copied from the array + * than remain in this buffer, that is, if + * length > remaining(), then no + * longs are transferred and a {@link BufferOverflowException} is + * thrown. + *

+ *

Otherwise, this method copies length longs from the + * given array into this buffer, starting at the given offset in the array + * and at the current position of this buffer. The position of this buffer + * is then incremented by length. + *

+ *

In other words, an invocation of this method of the form + * dst.put(src, off, len) has exactly the same effect as + * the loop + *

+ *

+	 *     for (int i = off; i < off + len; i++)
+	 *         dst.put(a[i]); 
+ *

+ * except that it first checks that there is sufficient space in this + * buffer and it is potentially much more efficient.

+ * + * @param src The array from which longs are to be read + * @param offset The offset within the array of the first long to be read; + * must be non-negative and no larger than array.length + * @param length The number of longs to be read from the given array; + * must be non-negative and no larger than + * array.length - offset + * + * @return This buffer + * + * @throws BufferOverflowException If there is insufficient space in this buffer + * @throws IndexOutOfBoundsException If the preconditions on the offset and length + * parameters do not hold + * @throws ReadOnlyBufferException If this buffer is read-only + */ + public PointerBuffer put(long[] src, int offset, int length) { + if ( is64Bit ) + view64.put(src, offset, length); + else { + checkBounds(offset, length, src.length); + if ( length > view32.remaining() ) + throw new BufferOverflowException(); + int end = offset + length; + for ( int i = offset; i < end; i++ ) + view32.put((int)src[i]); + } + + return this; + } + + /** + * Relative bulk put method  (optional operation). + *

+ *

This method transfers the entire content of the given source + * long array into this buffer. An invocation of this method of the + * form dst.put(a) behaves in exactly the same way as the + * invocation + *

+ *

+	 *     dst.put(a, 0, a.length) 
+ * + * @return This buffer + * + * @throws BufferOverflowException If there is insufficient space in this buffer + * @throws ReadOnlyBufferException If this buffer is read-only + */ + public final PointerBuffer put(long[] src) { + return put(src, 0, src.length); + } + + /** + * Compacts this buffer  (optional operation). + *

+ *

The longs between the buffer's current position and its limit, + * if any, are copied to the beginning of the buffer. That is, the + * long at index p = position() is copied + * to index zero, the long at index p + 1 is copied + * to index one, and so forth until the long at index + * limit() - 1 is copied to index + * n = limit() - 1 - p. + * The buffer's position is then set to n+1 and its limit is set to + * its capacity. The mark, if defined, is discarded. + *

+ *

The buffer's position is set to the number of longs copied, + * rather than to zero, so that an invocation of this method can be + * followed immediately by an invocation of another relative put + * method.

+ * + * @return This buffer + * + * @throws ReadOnlyBufferException If this buffer is read-only + */ + public PointerBuffer compact() { + if ( is64Bit ) + view64.compact(); + else + view32.compact(); + return this; + } + + /** + * Retrieves this buffer's byte order. + *

+ *

The byte order of a pointer buffer created by allocation or by + * wrapping an existing long array is the {@link + * ByteOrder#nativeOrder native order} of the underlying + * hardware. The byte order of a pointer buffer created as a view of a byte buffer is that of the + * byte buffer at the moment that the view is created.

+ * + * @return This buffer's byte order + */ + public ByteOrder order() { + if ( is64Bit ) + return view64.order(); + else + return view32.order(); + } + + /** + * Returns a string summarizing the state of this buffer.

+ * + * @return A summary string + */ + public String toString() { + StringBuilder sb = new StringBuilder(48); + sb.append(getClass().getName()); + sb.append("[pos="); + sb.append(position()); + sb.append(" lim="); + sb.append(limit()); + sb.append(" cap="); + sb.append(capacity()); + sb.append("]"); + return sb.toString(); + } + + /** + * Returns the current hash code of this buffer. + *

+ *

The hash code of a pointer buffer depends only upon its remaining + * elements; that is, upon the elements from position() up to, and + * including, the element at limit() - 1. + *

+ *

Because buffer hash codes are content-dependent, it is inadvisable + * to use buffers as keys in hash maps or similar data structures unless it + * is known that their contents will not change.

+ * + * @return The current hash code of this buffer + */ + public int hashCode() { + int h = 1; + int p = position(); + for ( int i = limit() - 1; i >= p; i-- ) + h = 31 * h + (int)get(i); + return h; + } + + /** + * Tells whether or not this buffer is equal to another object. + *

+ *

Two pointer buffers are equal if, and only if, + *

+ *

    + *

    + *

  1. They have the same element type,

  2. + *

    + *

  3. They have the same number of remaining elements, and + *

  4. + *

    + *

  5. The two sequences of remaining elements, considered + * independently of their starting positions, are pointwise equal. + *

  6. + *

    + *

+ *

+ *

A pointer buffer is not equal to any other type of object.

+ * + * @param ob The object to which this buffer is to be compared + * + * @return true if, and only if, this buffer is equal to the + * given object + */ + public boolean equals(Object ob) { + if ( !(ob instanceof PointerBuffer) ) + return false; + PointerBuffer that = (PointerBuffer)ob; + if ( this.remaining() != that.remaining() ) + return false; + int p = this.position(); + for ( int i = this.limit() - 1, j = that.limit() - 1; i >= p; i--, j-- ) { + long v1 = this.get(i); + long v2 = that.get(j); + if ( v1 != v2 ) { + return false; + } + } + return true; + } + + /** + * Compares this buffer to another. + *

+ *

Two pointer buffers are compared by comparing their sequences of + * remaining elements lexicographically, without regard to the starting + * position of each sequence within its corresponding buffer. + *

+ *

A pointer buffer is not comparable to any other type of object. + * + * @return A negative integer, zero, or a positive integer as this buffer + * is less than, equal to, or greater than the given buffer + */ + public int compareTo(Object o) { + final PointerBuffer that = (PointerBuffer)o; + int n = this.position() + Math.min(this.remaining(), that.remaining()); + for ( int i = this.position(), j = that.position(); i < n; i++, j++ ) { + long v1 = this.get(i); + long v2 = that.get(j); + if ( v1 == v2 ) + continue; + if ( v1 < v2 ) + return -1; + return +1; + } + return this.remaining() - that.remaining(); + } + + private static void checkBounds(int off, int len, int size) { + if ( (off | len | (off + len) | (size - (off + len))) < 0 ) + throw new IndexOutOfBoundsException(); + } + + /** + * Read-only version of PointerBuffer. + * + * @author Spasi + */ + private static final class PointerBufferR extends PointerBuffer { + + PointerBufferR(final ByteBuffer source) { + super(source); + } + + public boolean isReadOnly() { + return true; + } + + protected PointerBuffer newInstance(final ByteBuffer source) { + return new PointerBufferR(source); + } + + public PointerBuffer asReadOnlyBuffer() { + return duplicate(); + } + + public PointerBuffer put(final long l) { + throw new ReadOnlyBufferException(); + } + + public PointerBuffer put(final int index, final long l) { + throw new ReadOnlyBufferException(); + } + + public PointerBuffer put(final PointerBuffer src) { + throw new ReadOnlyBufferException(); + } + + public PointerBuffer put(final long[] src, final int offset, final int length) { + throw new ReadOnlyBufferException(); + } + + public PointerBuffer compact() { + throw new ReadOnlyBufferException(); + } + + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/PointerWrapper.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/PointerWrapper.java new file mode 100644 index 0000000..26b7f19 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/PointerWrapper.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl; + +/** + * A common interface for classes that wrap pointer addresses. + * + * @author Spasi + */ +public interface PointerWrapper { + + long getPointer(); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/PointerWrapperAbstract.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/PointerWrapperAbstract.java new file mode 100644 index 0000000..5a0591d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/PointerWrapperAbstract.java @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl; + +/** + * Base PointerWrapper implementation. + * + * @author Spasi + */ +public abstract class PointerWrapperAbstract implements PointerWrapper { + + protected final long pointer; + + protected PointerWrapperAbstract(final long pointer) { + this.pointer = pointer; + } + + /** + * Returns true if this object represents a valid pointer. + * The pointer might be invalid because it is NULL or because + * some other action has deleted the object that this pointer + * represents. + * + * @return true if the pointer is valid + */ + public boolean isValid() { + return pointer != 0; + } + + /** + * Checks if the pointer is valid and throws an IllegalStateException if + * it is not. This method is a NO-OP, unless the org.lwjgl.util.Debug + * property has been set to true. + */ + public final void checkValid() { + if ( LWJGLUtil.DEBUG && !isValid() ) + throw new IllegalStateException("This " + getClass().getSimpleName() + " pointer is not valid."); + } + + public final long getPointer() { + checkValid(); + return pointer; + } + + public boolean equals(final Object o) { + if ( this == o ) return true; + if ( !(o instanceof PointerWrapperAbstract) ) return false; + + final PointerWrapperAbstract that = (PointerWrapperAbstract)o; + + if ( pointer != that.pointer ) return false; + + return true; + } + + public int hashCode() { + return (int)(pointer ^ (pointer >>> 32)); + } + + public String toString() { + return getClass().getSimpleName() + " pointer (0x" + Long.toHexString(pointer).toUpperCase() + ")"; + } +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/Sys.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/Sys.java new file mode 100644 index 0000000..6e6b09a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/Sys.java @@ -0,0 +1,267 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl; + +import java.io.File; +import java.lang.reflect.Method; +import java.net.MalformedURLException; +import java.net.URL; +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.security.PrivilegedExceptionAction; + +import org.lwjgl.input.Mouse; + +/** + *

+ * System class (named Sys so as not to conflict with java.lang.System) + *

+ * @author cix_foo + * @version $Revision$ + * $Id$ + */ +public final class Sys { + /** The native library name */ + private static final String JNI_LIBRARY_NAME = "lwjgl"; + + /** Current version of library */ + private static final String VERSION = "2.9.1"; + + private static final String POSTFIX64BIT = "64"; + + /** The implementation instance to delegate platform specific behavior to */ + private static final SysImplementation implementation; + private static final boolean is64Bit; + + private static void doLoadLibrary(final String lib_name) { + AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + String library_path = System.getProperty("org.lwjgl.librarypath"); + if (library_path != null) { + System.load(library_path + File.separator + + System.mapLibraryName(lib_name)); + } else { + System.loadLibrary(lib_name); + } + return null; + } + }); + } + + private static void loadLibrary(final String lib_name) { + // actively try to load 64bit libs on 64bit architectures first + String osArch = System.getProperty("os.arch"); + boolean is64bit = "amd64".equals(osArch) || "x86_64".equals(osArch); + if(is64bit) { + try { + doLoadLibrary(lib_name + POSTFIX64BIT); + return; + } catch (UnsatisfiedLinkError e) { + LWJGLUtil.log("Failed to load 64 bit library: " + e.getMessage()); + } + } + + // fallback to loading the "old way" + try { + doLoadLibrary(lib_name); + } catch (UnsatisfiedLinkError e) { + if (implementation.has64Bit()) { + try { + doLoadLibrary(lib_name + POSTFIX64BIT); + return; + } catch (UnsatisfiedLinkError e2) { + LWJGLUtil.log("Failed to load 64 bit library: " + e2.getMessage()); + } + } + // Throw original error + throw e; + } + } + + static { + implementation = createImplementation(); + loadLibrary(JNI_LIBRARY_NAME); + is64Bit = implementation.getPointerSize() == 8; + + int native_jni_version = implementation.getJNIVersion(); + int required_version = implementation.getRequiredJNIVersion(); + if (native_jni_version != required_version) + throw new LinkageError("Version mismatch: jar version is '" + required_version + + "', native library version is '" + native_jni_version + "'"); + implementation.setDebug(LWJGLUtil.DEBUG); + } + + private static SysImplementation createImplementation() { + switch (LWJGLUtil.getPlatform()) { + case LWJGLUtil.PLATFORM_LINUX: + return new LinuxSysImplementation(); + case LWJGLUtil.PLATFORM_WINDOWS: + return new WindowsSysImplementation(); + case LWJGLUtil.PLATFORM_MACOSX: + return new MacOSXSysImplementation(); + default: + throw new IllegalStateException("Unsupported platform"); + } + } + + /** + * No constructor for Sys. + */ + private Sys() { + } + + /** + * Return the version of the core LWJGL libraries as a String. + */ + public static String getVersion() { + return VERSION; + } + + /** + * Initialization. This is just a dummy method to trigger the static constructor. + */ + public static void initialize() { + } + + /** Returns true if a 64bit implementation was loaded. */ + public static boolean is64Bit() { + return is64Bit; + } + + /** + * Obtains the number of ticks that the hires timer does in a second. This method is fast; + * it should be called as frequently as possible, as it recalibrates the timer. + * + * @return timer resolution in ticks per second or 0 if no timer is present. + */ + public static long getTimerResolution() { + return implementation.getTimerResolution(); + } + + /** + * Gets the current value of the hires timer, in ticks. When the Sys class is first loaded + * the hires timer is reset to 0. If no hires timer is present then this method will always + * return 0.

NOTEZ BIEN that the hires timer WILL wrap around. + * + * @return the current hires time, in ticks (always >= 0) + */ + public static long getTime() { + return implementation.getTime() & 0x7FFFFFFFFFFFFFFFL; + } + + /** + * Attempt to display a modal alert to the user. This method should be used + * when a game fails to initialize properly or crashes out losing its display + * in the process. It is provided because AWT may not be available on the target + * platform, although on Mac and Linux and other platforms supporting AWT we + * delegate the task to AWT instead of doing it ourselves. + *

+ * The alert should display the title and the message and then the current + * thread should block until the user dismisses the alert - typically with an + * OK button click. + *

+ * It may be that the user's system has no windowing system installed for some + * reason, in which case this method may do nothing at all, or attempt to provide + * some console output. + * + * @param title The title of the alert. We suggest using the title of your game. + * @param message The message text for the alert. + */ + public static void alert(String title, String message) { + boolean grabbed = Mouse.isGrabbed(); + if (grabbed) { + Mouse.setGrabbed(false); + } + if (title == null) + title = ""; + if (message == null) + message = ""; + implementation.alert(title, message); + if (grabbed) { + Mouse.setGrabbed(true); + } + } + + /** + * Open the system web browser and point it at the specified URL. It is recommended + * that this not be called whilst your game is running, but on application exit in + * a shutdown hook, as the screen resolution will not be reset when the browser is + * brought into view. + *

+ * There is no guarantee that this will work, nor that we can detect if it has + * failed - hence we don't return success code or throw an Exception. This is just a + * best attempt at opening the URL given - don't rely on it to work! + *

+ * @param url The URL. Ensure that the URL is properly encoded. + * @return false if we are CERTAIN the call has failed + */ + public static boolean openURL(String url) { + // Attempt to use Webstart if we have it available + try { + // Lookup the javax.jnlp.BasicService object + final Class serviceManagerClass = Class.forName("javax.jnlp.ServiceManager"); + Method lookupMethod = AccessController.doPrivileged(new PrivilegedExceptionAction() { + public Method run() throws Exception { + return serviceManagerClass.getMethod("lookup", String.class); + } + }); + Object basicService = lookupMethod.invoke(serviceManagerClass, new Object[] {"javax.jnlp.BasicService"}); + final Class basicServiceClass = Class.forName("javax.jnlp.BasicService"); + Method showDocumentMethod = AccessController.doPrivileged(new PrivilegedExceptionAction() { + public Method run() throws Exception { + return basicServiceClass.getMethod("showDocument", URL.class); + } + }); + try { + Boolean ret = (Boolean)showDocumentMethod.invoke(basicService, new URL(url)); + return ret; + } catch (MalformedURLException e) { + e.printStackTrace(System.err); + return false; + } + } catch (Exception ue) { + return implementation.openURL(url); + } + } + + /** + * Get the contents of the system clipboard. The system might not have a + * clipboard (particularly if it doesn't even have a keyboard) in which case + * we return null. Otherwise we return a String, which may be the empty + * string "". + * + * @return a String, or null if there is no system clipboard. + */ + public static String getClipboard() { + return implementation.getClipboard(); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/SysImplementation.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/SysImplementation.java new file mode 100644 index 0000000..3526675 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/SysImplementation.java @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl; + +/** + * + * System class platform specific method interface + * + * @author cix_foo + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +interface SysImplementation { + /** + * Return the required version of the native library + */ + int getRequiredJNIVersion(); + + /** + * Return the version of the native library + */ + int getJNIVersion(); + + /** + * Returns the platform's pointer size in bytes + */ + int getPointerSize(); + + void setDebug(boolean debug); + + /** + * Obtains the number of ticks that the hires timer does in a second. + * + * @return timer resolution in ticks per second or 0 if no timer is present. + */ + long getTimerResolution(); + + long getTime(); + + void alert(String title, String message); + + boolean openURL(String url); + + String getClipboard(); + + /** + * Returns true there exists a separate 64 bit library + * on the platform + */ + boolean has64Bit(); +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/WindowsSysImplementation.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/WindowsSysImplementation.java new file mode 100644 index 0000000..b8ca9f3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/WindowsSysImplementation.java @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl; + +import java.nio.ByteBuffer; +import java.security.PrivilegedExceptionAction; +import java.security.PrivilegedActionException; +import java.security.AccessController; +import java.lang.reflect.Method; + +import org.lwjgl.opengl.Display; + +/** + *

+ * @author $Author$ + * @version $Revision$ + * $Id$ + */ +final class WindowsSysImplementation extends DefaultSysImplementation { + private static final int JNI_VERSION = 24; + + static { + Sys.initialize(); + } + + public int getRequiredJNIVersion() { + return JNI_VERSION; + } + + public long getTimerResolution() { + return 1000; + } + + public long getTime() { + return nGetTime(); + } + private static native long nGetTime(); + + public boolean has64Bit() { + return true; + } + + private static long getHwnd() { + if (!Display.isCreated()) + return 0; + /* Use reflection since we can't make Display.getImplementation + * public + */ + try { + return AccessController.doPrivileged(new PrivilegedExceptionAction() { + public Long run() throws Exception { + Method getImplementation_method = Display.class.getDeclaredMethod("getImplementation"); + getImplementation_method.setAccessible(true); + Object display_impl = getImplementation_method.invoke(null); + Class WindowsDisplay_class = Class.forName("org.lwjgl.opengl.WindowsDisplay"); + Method getHwnd_method = WindowsDisplay_class.getDeclaredMethod("getHwnd"); + getHwnd_method.setAccessible(true); + return (Long)getHwnd_method.invoke(display_impl); + } + }); + } catch (PrivilegedActionException e) { + throw new Error(e); + } + } + + public void alert(String title, String message) { + if(!Display.isCreated()) { + initCommonControls(); + } + + LWJGLUtil.log(String.format("*** Alert *** %s\n%s\n", title, message)); + + final ByteBuffer titleText = MemoryUtil.encodeUTF16(title); + final ByteBuffer messageText = MemoryUtil.encodeUTF16(message); + nAlert(getHwnd(), MemoryUtil.getAddress(titleText), MemoryUtil.getAddress(messageText)); + } + private static native void nAlert(long parent_hwnd, long title, long message); + private static native void initCommonControls(); + + public boolean openURL(final String url) { + try { + LWJGLUtil.execPrivileged(new String[]{"rundll32", "url.dll,FileProtocolHandler", url}); + return true; + } catch (Exception e) { + LWJGLUtil.log("Failed to open url (" + url + "): " + e.getMessage()); + return false; + } + } + + public String getClipboard() { + return nGetClipboard(); + } + private static native String nGetClipboard(); +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/Game.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/Game.java new file mode 100644 index 0000000..1840699 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/Game.java @@ -0,0 +1,194 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.examples; + +import org.lwjgl.Sys; +import org.lwjgl.input.Keyboard; +import org.lwjgl.openal.AL; +import org.lwjgl.opengl.Display; + +import static org.lwjgl.opengl.GL11.*; + +/** + * + * This is a very basic skeleton to init a game and run it. + * + * @author $Author$ + * @version $Revision$ + * $Id$ + */ +public class Game { + + /** Game title */ + public static final String GAME_TITLE = "My Game"; + + /** Desired frame time */ + private static final int FRAMERATE = 60; + + /** Exit the game */ + private static boolean finished; + + /** A rotating square! */ + private static float angle; + + /** + * No constructor needed - this class is static + */ + private Game() {} + + /** + * Application init + * @param args Commandline args + */ + public static void main(String[] args) { + try { + init(); + run(); + } catch (Exception e) { + e.printStackTrace(System.err); + Sys.alert(GAME_TITLE, "An error occured and the game will exit."); + } finally { + cleanup(); + } + + System.exit(0); + } + + /** + * Initialise the game + * @throws Exception if init fails + */ + private static void init() throws Exception { + // Create a fullscreen window with 1:1 orthographic 2D projection, and with + // mouse, keyboard, and gamepad inputs. + Display.setTitle(GAME_TITLE); + Display.setFullscreen(true); + + // Enable vsync if we can + Display.setVSyncEnabled(true); + + Display.create(); + + // Start up the sound system + AL.create(); + + // TODO: Load in your textures etc here + + // Put the window into orthographic projection mode with 1:1 pixel ratio. + // We haven't used GLU here to do this to avoid an unnecessary dependency. + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(0.0, Display.getDisplayMode().getWidth(), 0.0, Display.getDisplayMode().getHeight(), -1.0, 1.0); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glViewport(0, 0, Display.getDisplayMode().getWidth(), Display.getDisplayMode().getHeight()); + + } + + /** + * Runs the game (the "main loop") + */ + private static void run() { + while (!finished) { + // Always call Window.update(), all the time + Display.update(); + + if (Display.isCloseRequested()) { + // Check for O/S close requests + finished = true; + } else if (Display.isActive()) { + // The window is in the foreground, so we should play the game + logic(); + render(); + Display.sync(FRAMERATE); + } else { + // The window is not in the foreground, so we can allow other stuff to run and + // infrequently update + try { + Thread.sleep(100); + } catch (InterruptedException e) { + } + logic(); + if (Display.isVisible() || Display.isDirty()) { + // Only bother rendering if the window is visible or dirty + render(); + } + } + } + } + + /** + * Do any game-specific cleanup + */ + private static void cleanup() { + // TODO: save anything you want to disk here + + // Stop the sound + AL.destroy(); + + // Close the window + Display.destroy(); + } + + /** + * Do all calculations, handle input, etc. + */ + private static void logic() { + // Example input handler: we'll check for the ESC key and finish the game instantly when it's pressed + if (Keyboard.isKeyDown(Keyboard.KEY_ESCAPE)) { + finished = true; + } + + // TODO: all your game logic goes here. + angle += 2.0f % 360; + } + + /** + * Render the current frame + */ + private static void render() { + glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); + + // TODO: all your rendering goes here + glClear(GL_COLOR_BUFFER_BIT); + glPushMatrix(); + glTranslatef(Display.getDisplayMode().getWidth() / 2, Display.getDisplayMode().getHeight() / 2, 0.0f); + glRotatef(angle, 0, 0, 1.0f); + glBegin(GL_QUADS); + glVertex2i(-50, -50); + glVertex2i(50, -50); + glVertex2i(50, 50); + glVertex2i(-50, 50); + glEnd(); + glPopMatrix(); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/AlienEntity.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/AlienEntity.java new file mode 100644 index 0000000..f1db4b7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/AlienEntity.java @@ -0,0 +1,157 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.examples.spaceinvaders; + +/** + * An entity which represents one of our space invader aliens. + * + * @author Kevin Glass + * @author Brian Matzon + */ +public class AlienEntity extends Entity { + + /** Movement made downwards when a border is hit */ + private static final int DOWNWARD_MOVEMENT = 10; + + /** Border at which player dies */ + private static final int BOTTOM_BORDER = 570; + + /** Right border at which to shift direction */ + private static final int RIGHT_BORDER = 750; + + /** Left border at which to shift direction */ + private static final int LEFT_BORDER = 10; + + /** The speed at which the alient moves horizontally */ + private float moveSpeed = 75; + + /** The game in which the entity exists */ + private Game game; + + /** The animation frames */ + private Sprite[] frames = new Sprite[4]; + + /** The time since the last frame change took place */ + private long lastFrameChange; + + /** The frame duration in milliseconds, i.e. how long any given frame of animation lasts */ + private long frameDuration = 250; + + /** The current frame of animation being displayed */ + private int frameNumber; + + /** + * Create a new alien entity + * + * @param game The game in which this entity is being created + * @param x The intial x location of this alien + * @param y The intial y location of this alient + */ + public AlienEntity(Game game, int x, int y) { + super(game.getSprite("alien.gif"), x, y); + + // setup the animatin frames + frames[0] = sprite; + frames[1] = game.getSprite("alien2.gif"); + frames[2] = sprite; + frames[3] = game.getSprite("alien3.gif"); + + this.game = game; + dx = -moveSpeed; + } + + /** + * Request that this alien moved based on time elapsed + * + * @param delta The time that has elapsed since last move + */ + public void move(long delta) { + // since the move tells us how much time has passed + // by we can use it to drive the animation, however + // its the not the prettiest solution + lastFrameChange += delta; + + // if we need to change the frame, update the frame number + // and flip over the sprite in use + if (lastFrameChange > frameDuration) { + // reset our frame change time counter + lastFrameChange = 0; + + // update the frame + frameNumber++; + if (frameNumber >= frames.length) { + frameNumber = 0; + } + + sprite = frames[frameNumber]; + } + + // if we have reached the left hand side of the screen and + // are moving left then request a logic update + if ((dx < 0) && (x < LEFT_BORDER)) { + game.updateLogic(); + } + // and vice vesa, if we have reached the right hand side of + // the screen and are moving right, request a logic update + if ((dx > 0) && (x > RIGHT_BORDER)) { + game.updateLogic(); + } + + // proceed with normal move + super.move(delta); + } + + /** + * Update the game logic related to aliens + */ + public void doLogic() { + // swap over horizontal movement and move down the + // screen a bit + dx = -dx; + y += DOWNWARD_MOVEMENT; + + // if we've reached the bottom of the screen then the player + // dies + if (y > BOTTOM_BORDER) { + game.notifyDeath(); + } + } + + /** + * Notification that this alien has collided with another entity + * + * @param other The other entity + */ + public void collidedWith(Entity other) { + // collisions with aliens are handled elsewhere + } +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/Entity.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/Entity.java new file mode 100644 index 0000000..19f3231 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/Entity.java @@ -0,0 +1,184 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.examples.spaceinvaders; + +import java.awt.Rectangle; + +/** + * An entity represents any element that appears in the game. The + * entity is responsible for resolving collisions and movement + * based on a set of properties defined either by subclass or externally. + * + * Note that doubles are used for positions. This may seem strange + * given that pixels locations are integers. However, using double means + * that an entity can move a partial pixel. It doesn't of course mean that + * they will be display half way through a pixel but allows us not lose + * accuracy as we move. + * + * @author Kevin Glass + */ +public abstract class Entity { + + /** The current x location of this entity */ + protected float x; + + /** The current y location of this entity */ + protected float y; + + /** The sprite that represents this entity */ + protected Sprite sprite; + + /** The current speed of this entity horizontally (pixels/sec) */ + protected float dx; + + /** The current speed of this entity vertically (pixels/sec) */ + protected float dy; + + /** The rectangle used for this entity during collisions resolution */ + private Rectangle me = new Rectangle(); + + /** The rectangle used for other entities during collision resolution */ + private Rectangle him = new Rectangle(); + + /** + * Construct a entity based on a sprite image and a location. + * + * @param sprite The reference to the image to be displayed for this entity + * @param x The initial x location of this entity + * @param y The initial y location of this entity + */ + protected Entity(Sprite sprite, int x, int y) { + this.sprite = sprite; + this.x = x; + this.y = y; + } + + /** + * Request that this entity move itself based on a certain ammount + * of time passing. + * + * @param delta The ammount of time that has passed in milliseconds + */ + public void move(long delta) { + // update the location of the entity based on move speeds + x += (delta * dx) / 1000; + y += (delta * dy) / 1000; + } + + /** + * Set the horizontal speed of this entity + * + * @param dx The horizontal speed of this entity (pixels/sec) + */ + public void setHorizontalMovement(float dx) { + this.dx = dx; + } + + /** + * Set the vertical speed of this entity + * + * @param dy The vertical speed of this entity (pixels/sec) + */ + public void setVerticalMovement(float dy) { + this.dy = dy; + } + + /** + * Get the horizontal speed of this entity + * + * @return The horizontal speed of this entity (pixels/sec) + */ + public float getHorizontalMovement() { + return dx; + } + + /** + * Get the vertical speed of this entity + * + * @return The vertical speed of this entity (pixels/sec) + */ + public float getVerticalMovement() { + return dy; + } + + /** + * Draw this entity to the graphics context provided + */ + public void draw() { + sprite.draw((int) x, (int) y); + } + + /** + * Do the logic associated with this entity. This method + * will be called periodically based on game events + */ + public void doLogic() { + } + + /** + * Get the x location of this entity + * + * @return The x location of this entity + */ + public int getX() { + return (int) x; + } + + /** + * Get the y location of this entity + * + * @return The y location of this entity + */ + public int getY() { + return (int) y; + } + + /** + * Check if this entity collised with another. + * + * @param other The other entity to check collision against + * @return True if the entities collide with each other + */ + public boolean collidesWith(Entity other) { + me.setBounds((int) x, (int) y, sprite.getWidth(), sprite.getHeight()); + him.setBounds((int) other.x, (int) other.y, other.sprite.getWidth(), other.sprite.getHeight()); + + return me.intersects(him); + } + + /** + * Notification that this entity collided with another. + * + * @param other The entity with which this entity collided. + */ + public abstract void collidedWith(Entity other); +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/Game.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/Game.java new file mode 100644 index 0000000..11aceb2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/Game.java @@ -0,0 +1,609 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.examples.spaceinvaders; + +import java.util.ArrayList; + +import org.lwjgl.LWJGLException; +import org.lwjgl.Sys; +import org.lwjgl.input.Keyboard; +import org.lwjgl.input.Mouse; +import org.lwjgl.opengl.Display; +import org.lwjgl.opengl.DisplayMode; + +import static org.lwjgl.opengl.GL11.*; + +/** + * The main hook of our game. This class with both act as a manager + * for the display and central mediator for the game logic. + * + * Display management will consist of a loop that cycles round all + * entities in the game asking them to move and then drawing them + * in the appropriate place. With the help of an inner class it + * will also allow the player to control the main ship. + * + * As a mediator it will be informed when entities within our game + * detect events (e.g. alient killed, played died) and will take + * appropriate game actions. + * + *

+ * NOTE:
+ * This game is a LWJGLized implementation of the Space Invaders game by Kevin + * Glass. The original implementation is renderer agnostic and supports other + * OpenGL implementations as well as Java2D. This version has been made specific + * for LWJGL, and has added input control as well as sound (which the original doesn't, + * at the time of writing). + * You can find the original article here:
+ * http://www.cokeandcode.com + *

+ * + * @author Kevin Glass + * @author Brian Matzon + */ +public class Game { + + /** The normal title of the window */ + private String WINDOW_TITLE = "Space Invaders 104 (for LWJGL)"; + + /** The width of the game display area */ + private int width = 800; + + /** The height of the game display area */ + private int height = 600; + + /** The loader responsible for converting images into OpenGL textures */ + private TextureLoader textureLoader; + + /** The list of all the entities that exist in our game */ + private ArrayList entities = new ArrayList(); + + /** The list of entities that need to be removed from the game this loop */ + private ArrayList removeList = new ArrayList(); + + /** The entity representing the player */ + private ShipEntity ship; + + /** List of shots */ + private ShotEntity[] shots; + + /** The message to display which waiting for a key press */ + private Sprite message; + + /** The sprite containing the "Press Any Key" message */ + private Sprite pressAnyKey; + + /** The sprite containing the "You win!" message */ + private Sprite youWin; + + /** The sprite containing the "You lose!" message */ + private Sprite gotYou; + + /** Last shot index */ + private int shotIndex; + + /** The speed at which the player's ship should move (pixels/sec) */ + private float moveSpeed = 300; + + /** The time at which last fired a shot */ + private long lastFire; + + /** The interval between our players shot (ms) */ + private long firingInterval = 500; + + /** The number of aliens left on the screen */ + private int alienCount; + + /** True if we're holding up game play until a key has been pressed */ + private boolean waitingForKeyPress = true; + + /** True if game logic needs to be applied this loop, normally as a result of a game event */ + private boolean logicRequiredThisLoop; + + /** The time at which the last rendering looped started from the point of view of the game logic */ + private long lastLoopTime = getTime(); + + /** True if the fire key has been released */ + private boolean fireHasBeenReleased; + + /** The time since the last record of fps */ + private long lastFpsTime; + + /** The recorded fps */ + private int fps; + + private static long timerTicksPerSecond = Sys.getTimerResolution(); + + /** True if the game is currently "running", i.e. the game loop is looping */ + public static boolean gameRunning = true; + + /** SoundManager to make sound with */ + private SoundManager soundManager; + + /** Whether we're running in fullscreen mode */ + private boolean fullscreen; + + /** ID of shot effect */ + private int SOUND_SHOT; + + /** ID of hit effect */ + private int SOUND_HIT; + + /** ID of start sound */ + private int SOUND_START; + + /** ID of win sound */ + private int SOUND_WIN; + + /** ID of loose sound */ + private int SOUND_LOOSE; + + /** Mouse movement on x axis */ + private int mouseX; + + /** Is this an application or applet */ + private static boolean isApplication; + + /** + * Construct our game and set it running. + * @param fullscreen + * + */ + public Game(boolean fullscreen) { + this.fullscreen = fullscreen; + initialize(); + } + + /** + * Get the high resolution time in milliseconds + * + * @return The high resolution time in milliseconds + */ + public static long getTime() { + // we get the "timer ticks" from the high resolution timer + // multiply by 1000 so our end result is in milliseconds + // then divide by the number of ticks in a second giving + // us a nice clear time in milliseconds + return (Sys.getTime() * 1000) / timerTicksPerSecond; + } + + /** + * Sleep for a fixed number of milliseconds. + * + * @param duration The amount of time in milliseconds to sleep for + */ + public static void sleep(long duration) { + try { + Thread.sleep((duration * timerTicksPerSecond) / 1000); + } catch (InterruptedException inte) { + } + } + + /** + * Intialise the common elements for the game + */ + public void initialize() { + // initialize the window beforehand + try { + setDisplayMode(); + Display.setTitle(WINDOW_TITLE); + Display.setFullscreen(fullscreen); + Display.create(); + + // grab the mouse, dont want that hideous cursor when we're playing! + if (isApplication) { + Mouse.setGrabbed(true); + } + + // enable textures since we're going to use these for our sprites + glEnable(GL_TEXTURE_2D); + + // disable the OpenGL depth test since we're rendering 2D graphics + glDisable(GL_DEPTH_TEST); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + + glOrtho(0, width, height, 0, -1, 1); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glViewport(0, 0, width, height); + + textureLoader = new TextureLoader(); + + // create our sound manager, and initialize it with 7 channels + // 1 channel for sounds, 6 for effects - this should be enough + // since we have a most 4 shots on screen at any one time, which leaves + // us with 2 channels for explosions. + soundManager = new SoundManager(); + soundManager.initialize(8); + + // load our sound data + SOUND_SHOT = soundManager.addSound("shot.wav"); + SOUND_HIT = soundManager.addSound("hit.wav"); + SOUND_START = soundManager.addSound("start.wav"); + SOUND_WIN = soundManager.addSound("win.wav"); + SOUND_LOOSE = soundManager.addSound("loose.wav"); + } catch (LWJGLException le) { + System.out.println("Game exiting - exception in initialization:"); + le.printStackTrace(); + Game.gameRunning = false; + return; + } + + // get our sprites + gotYou = getSprite("gotyou.gif"); + pressAnyKey = getSprite("pressanykey.gif"); + youWin = getSprite("youwin.gif"); + + message = pressAnyKey; + + // setup 5 shots + shots = new ShotEntity[5]; + for (int i = 0; i < shots.length; i++) { + shots[i] = new ShotEntity(this, "shot.gif", 0, 0); + } + + // setup the initial game state + startGame(); + } + + /** + * Sets the display mode for fullscreen mode + */ + private boolean setDisplayMode() { + try { + // get modes + DisplayMode[] dm = org.lwjgl.util.Display.getAvailableDisplayModes(width, height, -1, -1, -1, -1, 60, 60); + + org.lwjgl.util.Display.setDisplayMode(dm, new String[] { + "width=" + width, + "height=" + height, + "freq=" + 60, + "bpp=" + org.lwjgl.opengl.Display.getDisplayMode().getBitsPerPixel() + }); + return true; + } catch (Exception e) { + e.printStackTrace(); + System.out.println("Unable to enter fullscreen, continuing in windowed mode"); + } + + return false; + } + + /** + * Start a fresh game, this should clear out any old data and + * create a new set. + */ + private void startGame() { + // clear out any existing entities and intialise a new set + entities.clear(); + initEntities(); + } + + /** + * Initialise the starting state of the entities (ship and aliens). Each + * entitiy will be added to the overall list of entities in the game. + */ + private void initEntities() { + // create the player ship and place it roughly in the center of the screen + ship = new ShipEntity(this, "ship.gif", 370, 550); + entities.add(ship); + + // create a block of aliens (5 rows, by 12 aliens, spaced evenly) + alienCount = 0; + for (int row = 0; row < 5; row++) { + for (int x = 0; x < 12; x++) { + Entity alien = new AlienEntity(this, 100 + (x * 50), (50) + row * 30); + entities.add(alien); + alienCount++; + } + } + } + + /** + * Notification from a game entity that the logic of the game + * should be run at the next opportunity (normally as a result of some + * game event) + */ + public void updateLogic() { + logicRequiredThisLoop = true; + } + + /** + * Remove an entity from the game. The entity removed will + * no longer move or be drawn. + * + * @param entity The entity that should be removed + */ + public void removeEntity(Entity entity) { + removeList.add(entity); + } + + /** + * Notification that the player has died. + */ + public void notifyDeath() { + if (!waitingForKeyPress) { + soundManager.playSound(SOUND_LOOSE); + } + message = gotYou; + waitingForKeyPress = true; + } + + /** + * Notification that the player has won since all the aliens + * are dead. + */ + public void notifyWin() { + message = youWin; + waitingForKeyPress = true; + soundManager.playSound(SOUND_WIN); + } + + /** + * Notification that an alien has been killed + */ + public void notifyAlienKilled() { + // reduce the alient count, if there are none left, the player has won! + alienCount--; + + if (alienCount == 0) { + notifyWin(); + } + + // if there are still some aliens left then they all need to get faster, so + // speed up all the existing aliens + for ( Entity entity : entities ) { + if ( entity instanceof AlienEntity ) { + // speed up by 2% + entity.setHorizontalMovement(entity.getHorizontalMovement() * 1.02f); + } + } + + soundManager.playEffect(SOUND_HIT); + } + + /** + * Attempt to fire a shot from the player. Its called "try" + * since we must first check that the player can fire at this + * point, i.e. has he/she waited long enough between shots + */ + public void tryToFire() { + // check that we have waiting long enough to fire + if (System.currentTimeMillis() - lastFire < firingInterval) { + return; + } + + // if we waited long enough, create the shot entity, and record the time. + lastFire = System.currentTimeMillis(); + ShotEntity shot = shots[shotIndex++ % shots.length]; + shot.reinitialize(ship.getX() + 10, ship.getY() - 30); + entities.add(shot); + + soundManager.playEffect(SOUND_SHOT); + } + + /** + * Run the main game loop. This method keeps rendering the scene + * and requesting that the callback update its screen. + */ + private void gameLoop() { + while (Game.gameRunning) { + // clear screen + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + + // let subsystem paint + frameRendering(); + + // update window contents + Display.update(); + } + + // clean up + soundManager.destroy(); + Display.destroy(); + } + + /** + * Notification that a frame is being rendered. Responsible for + * running game logic and rendering the scene. + */ + public void frameRendering() { + //SystemTimer.sleep(lastLoopTime+10-SystemTimer.getTime()); + Display.sync(60); + + // work out how long its been since the last update, this + // will be used to calculate how far the entities should + // move this loop + long delta = getTime() - lastLoopTime; + lastLoopTime = getTime(); + lastFpsTime += delta; + fps++; + + // update our FPS counter if a second has passed + if (lastFpsTime >= 1000) { + Display.setTitle(WINDOW_TITLE + " (FPS: " + fps + ")"); + lastFpsTime = 0; + fps = 0; + } + + // cycle round asking each entity to move itself + if (!waitingForKeyPress && !soundManager.isPlayingSound()) { + for ( Entity entity : entities ) { + entity.move(delta); + } + } + + // cycle round drawing all the entities we have in the game + for ( Entity entity : entities ) { + entity.draw(); + } + + // brute force collisions, compare every entity against + // every other entity. If any of them collide notify + // both entities that the collision has occured + for (int p = 0; p < entities.size(); p++) { + for (int s = p + 1; s < entities.size(); s++) { + Entity me = entities.get(p); + Entity him = entities.get(s); + + if (me.collidesWith(him)) { + me.collidedWith(him); + him.collidedWith(me); + } + } + } + + // remove any entity that has been marked for clear up + entities.removeAll(removeList); + removeList.clear(); + + // if a game event has indicated that game logic should + // be resolved, cycle round every entity requesting that + // their personal logic should be considered. + if (logicRequiredThisLoop) { + for ( Entity entity : entities ) { + entity.doLogic(); + } + + logicRequiredThisLoop = false; + } + + // if we're waiting for an "any key" press then draw the + // current message + if (waitingForKeyPress) { + message.draw(325, 250); + } + + // resolve the movemfent of the ship. First assume the ship + // isn't moving. If either cursor key is pressed then + // update the movement appropraitely + ship.setHorizontalMovement(0); + + // get mouse movement on x axis. We need to get it now, since + // we can only call getDX ONCE! - secondary calls will yield 0, since + // there haven't been any movement since last call. + mouseX = Mouse.getDX(); + + // we delegate input checking to submethod since we want to check + // for keyboard, mouse & controller + boolean leftPressed = hasInput(Keyboard.KEY_LEFT); + boolean rightPressed = hasInput(Keyboard.KEY_RIGHT); + boolean firePressed = hasInput(Keyboard.KEY_SPACE); + + if (!waitingForKeyPress && !soundManager.isPlayingSound()) { + if ((leftPressed) && (!rightPressed)) { + ship.setHorizontalMovement(-moveSpeed); + } else if ((rightPressed) && (!leftPressed)) { + ship.setHorizontalMovement(moveSpeed); + } + + // if we're pressing fire, attempt to fire + if (firePressed) { + tryToFire(); + } + } else { + if (!firePressed) { + fireHasBeenReleased = true; + } + if ((firePressed) && (fireHasBeenReleased) && !soundManager.isPlayingSound()) { + waitingForKeyPress = false; + fireHasBeenReleased = false; + startGame(); + soundManager.playSound(SOUND_START); + } + } + + // if escape has been pressed, stop the game + if ((Display.isCloseRequested() || Keyboard.isKeyDown(Keyboard.KEY_ESCAPE)) && isApplication) { + Game.gameRunning = false; + } + } + + /** + * @param direction + * @return + */ + private boolean hasInput(int direction) { + switch(direction) { + case Keyboard.KEY_LEFT: + return + Keyboard.isKeyDown(Keyboard.KEY_LEFT) || + mouseX < 0; + + case Keyboard.KEY_RIGHT: + return + Keyboard.isKeyDown(Keyboard.KEY_RIGHT) || + mouseX > 0; + + case Keyboard.KEY_SPACE: + return + Keyboard.isKeyDown(Keyboard.KEY_SPACE) || + Mouse.isButtonDown(0); + } + return false; + } + + /** + * The entry point into the game. We'll simply create an + * instance of class which will start the display and game + * loop. + * + * @param argv The arguments that are passed into our game + */ + public static void main(String argv[]) { + isApplication = true; + System.out.println("Use -fullscreen for fullscreen mode"); + new Game((argv.length > 0 && "-fullscreen".equalsIgnoreCase(argv[0]))).execute(); + System.exit(0); + } + + /** + * + */ + public void execute() { + gameLoop(); + } + + /** + * Create or get a sprite which displays the image that is pointed + * to in the classpath by "ref" + * + * @param ref A reference to the image to load + * @return A sprite that can be drawn onto the current graphics context. + */ + public Sprite getSprite(String ref) { + return new Sprite(textureLoader, ref); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/GameApplet.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/GameApplet.java new file mode 100644 index 0000000..0e2d016 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/GameApplet.java @@ -0,0 +1,104 @@ +package org.lwjgl.examples.spaceinvaders; + + +import java.applet.Applet; +import java.awt.BorderLayout; +import java.awt.Canvas; +import org.lwjgl.LWJGLException; +import org.lwjgl.opengl.Display; + +public class GameApplet extends Applet { + + /** The Canvas where the LWJGL Display is added */ + Canvas display_parent; + + /** Thread which runs the main game loop */ + Thread gameThread; + + /** The Game instance */ + Game game; + + /** + * Once the Canvas is created its add notify method will call this method to + * start the LWJGL Display and game loop in another thread. + */ + public void startLWJGL() { + gameThread = new Thread() { + public void run() { + + try { + Display.setParent(display_parent); + + } catch (LWJGLException e) { + e.printStackTrace(); + } + // start game + game = new Game(false); + game.execute(); + } + }; + gameThread.start(); + } + + + /** + * Tell game loop to stop running, after which the LWJGL Display will be destoryed. + * The main thread will wait for the Display.destroy() to complete + */ + private void stopLWJGL() { + Game.gameRunning = false; + try { + gameThread.join(); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + public void start() { + + } + + public void stop() { + + } + + /** + * Applet Destroy method will remove the canvas, before canvas is destroyed it will notify + * stopLWJGL() to stop main game loop and to destroy the Display + */ + public void destroy() { + remove(display_parent); + super.destroy(); + System.out.println("Clear up"); + } + + /** + * initialise applet by adding a canvas to it, this canvas will start the LWJGL Display and game loop + * in another thread. It will also stop the game loop and destroy the display on canvas removal when + * applet is destroyed. + */ + public void init() { + setLayout(new BorderLayout()); + try { + display_parent = new Canvas() { + public void addNotify() { + super.addNotify(); + startLWJGL(); + } + public void removeNotify() { + stopLWJGL(); + super.removeNotify(); + } + }; + display_parent.setSize(getWidth(),getHeight()); + add(display_parent); + display_parent.setFocusable(true); + display_parent.requestFocus(); + display_parent.setIgnoreRepaint(true); + setVisible(true); + } catch (Exception e) { + System.err.println(e); + throw new RuntimeException("Unable to create display"); + } + } +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/ShipEntity.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/ShipEntity.java new file mode 100644 index 0000000..0e33a3b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/ShipEntity.java @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.examples.spaceinvaders; + +/** + * The entity that represents the players ship + * + * @author Kevin Glass + * @author Brian Matzon + */ +public class ShipEntity extends Entity { + + /** Right border at which to disallow further movement */ + private static final int RIGHT_BORDER = 750; + + /** Left border at which to disallow further movement */ + private static final int LEFT_BORDER = 10; + + /** The game in which the ship exists */ + private Game game; + + /** + * Create a new entity to represent the players ship + * + * @param game The game in which the ship is being created + * @param ref The reference to the sprite to show for the ship + * @param x The initial x location of the player's ship + * @param y The initial y location of the player's ship + */ + public ShipEntity(Game game,String ref,int x,int y) { + super(game.getSprite(ref), x, y); + + this.game = game; + } + + /** + * Request that the ship move itself based on an elapsed ammount of + * time + * + * @param delta The time that has elapsed since last move (ms) + */ + public void move(long delta) { + // if we're moving left and have reached the left hand side + // of the screen, don't move + if ((dx < 0) && (x < LEFT_BORDER)) { + return; + } + // if we're moving right and have reached the right hand side + // of the screen, don't move + if ((dx > 0) && (x > RIGHT_BORDER)) { + return; + } + + super.move(delta); + } + + /** + * Notification that the player's ship has collided with something + * + * @param other The entity with which the ship has collided + */ + public void collidedWith(Entity other) { + // if its an alien, notify the game that the player + // is dead + if (other instanceof AlienEntity) { + game.notifyDeath(); + } + } +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/ShotEntity.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/ShotEntity.java new file mode 100644 index 0000000..efff69e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/ShotEntity.java @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.examples.spaceinvaders; + +/** + * An entity representing a shot fired by the player's ship + * + * @author Kevin Glass + * @author Brian Matzon + */ +public class ShotEntity extends Entity { + + /** Top border at which shots are outside */ + private static final int TOP_BORDER = -100; + + /** The vertical speed at which the players shot moves */ + private float moveSpeed = -300; + + /** The game in which this entity exists */ + private Game game; + + /** True if this shot has been "used", i.e. its hit something */ + private boolean used; + + /** + * Create a new shot from the player + * + * @param game The game in which the shot has been created + * @param sprite The sprite representing this shot + * @param x The initial x location of the shot + * @param y The initial y location of the shot + */ + public ShotEntity(Game game, String sprite, int x, int y) { + super(game.getSprite(sprite), x, y); + + this.game = game; + dy = moveSpeed; + } + + /** + * Reinitializes this entity, for reuse + * + * @param x new x coordinate + * @param y new y coordinate + */ + public void reinitialize(int x, int y) { + this.x = x; + this.y = y; + used = false; + } + + /** + * Request that this shot moved based on time elapsed + * + * @param delta The time that has elapsed since last move + */ + public void move(long delta) { + // proceed with normal move + super.move(delta); + + // if we shot off the screen, remove ourselfs + if (y < TOP_BORDER) { + game.removeEntity(this); + } + } + + /** + * Notification that this shot has collided with another + * entity + * + * @param other The other entity with which we've collided + */ + public void collidedWith(Entity other) { + // prevents double kills, if we've already hit something, + // don't collide + if (used) { + return; + } + + // if we've hit an alien, kill it! + if (other instanceof AlienEntity) { + // remove the affected entities + game.removeEntity(this); + game.removeEntity(other); + + // notify the game that the alien has been killed + game.notifyAlienKilled(); + used = true; + } + } +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/SoundManager.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/SoundManager.java new file mode 100644 index 0000000..04d309b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/SoundManager.java @@ -0,0 +1,189 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.examples.spaceinvaders; + +import java.nio.IntBuffer; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.openal.AL; +import org.lwjgl.openal.AL10; +import org.lwjgl.util.WaveData; + + +/** + *

+ * Simple sound manager for OpenAL using n sources accessed in + * a round robin schedule. Source n is reserved for a single buffer and checking for + * whether it's playing. + *

+ * @author Brian Matzon + * @version $Revision$ + * $Id$ + */ +public class SoundManager { + + /** We support at most 256 buffers*/ + private int[] buffers = new int[256]; + + /** Number of sources is limited tby user (and hardware) */ + private int[] sources; + + /** Our internal scratch buffer */ + private IntBuffer scratchBuffer = BufferUtils.createIntBuffer(256); + + /** Whether we're running in no sound mode */ + private boolean soundOutput; + + /** Current index in our buffers */ + private int bufferIndex; + + /** Current index in our source list */ + private int sourceIndex; + + /** + * Creates a new SoundManager + */ + public SoundManager() { + } + + /** + * Plays a sound effect + * @param buffer Buffer index to play gotten from addSound + */ + public void playEffect(int buffer) { + if(soundOutput) { + // make sure we never choose last channel, since it is used for special sounds + int channel = sources[(sourceIndex++ % (sources.length-1))]; + + // link buffer and source, and play it + AL10.alSourcei(channel, AL10.AL_BUFFER, buffers[buffer]); + AL10.alSourcePlay(channel); + } + } + + /** + * Plays a sound on last source + * @param buffer Buffer index to play gotten from addSound + */ + public void playSound(int buffer) { + if(soundOutput) { + AL10.alSourcei(sources[sources.length-1], AL10.AL_BUFFER, buffers[buffer]); + AL10.alSourcePlay(sources[sources.length-1]); + } + } + + /** + * Whether a sound is playing on last source + * @return true if a source is playing right now on source n + */ + public boolean isPlayingSound() { + return AL10.alGetSourcei(sources[sources.length-1], AL10.AL_SOURCE_STATE) == AL10.AL_PLAYING; + } + + /** + * Initializes the SoundManager + * + * @param channels Number of channels to create + */ + public void initialize(int channels) { + try { + AL.create(); + + // allocate sources + scratchBuffer.limit(channels); + AL10.alGenSources(scratchBuffer); + scratchBuffer.rewind(); + scratchBuffer.get(sources = new int[channels]); + + // could we allocate all channels? + if(AL10.alGetError() != AL10.AL_NO_ERROR) { + throw new LWJGLException("Unable to allocate " + channels + " sources"); + } + + // we have sound + soundOutput = true; + } catch (LWJGLException le) { + le.printStackTrace(); + System.out.println("Sound disabled"); + } + } + + /** + * Adds a sound to the Sound Managers pool + * + * @param path Path to file to load + * @return index into SoundManagers buffer list + */ + public int addSound(String path) { + // Generate 1 buffer entry + scratchBuffer.rewind().position(0).limit(1); + AL10.alGenBuffers(scratchBuffer); + buffers[bufferIndex] = scratchBuffer.get(0); + + // load wave data from buffer + WaveData wavefile = WaveData.create("spaceinvaders/" + path); + + // copy to buffers + AL10.alBufferData(buffers[bufferIndex], wavefile.format, wavefile.data, wavefile.samplerate); + + // unload file again + wavefile.dispose(); + + // return index for this sound + return bufferIndex++; + } + + /** + * Destroy this SoundManager + */ + public void destroy() { + if(soundOutput) { + + // stop playing sounds + scratchBuffer.position(0).limit(sources.length); + scratchBuffer.put(sources).flip(); + AL10.alSourceStop(scratchBuffer); + + // destroy sources + AL10.alDeleteSources(scratchBuffer); + + // destroy buffers + scratchBuffer.position(0).limit(bufferIndex); + scratchBuffer.put(buffers, 0, bufferIndex).flip(); + AL10.alDeleteBuffers(scratchBuffer); + + // destory OpenAL + AL.destroy(); + } + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/Sprite.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/Sprite.java new file mode 100644 index 0000000..823d6aa --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/Sprite.java @@ -0,0 +1,127 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.examples.spaceinvaders; + +import java.io.IOException; + +import static org.lwjgl.opengl.GL11.*; + +/** + * Implementation of sprite that uses an OpenGL quad and a texture + * to render a given image to the screen. + * + * @author Kevin Glass + * @author Brian Matzon + */ +public class Sprite { + + /** The texture that stores the image for this sprite */ + private Texture texture; + + /** The width in pixels of this sprite */ + private int width; + + /** The height in pixels of this sprite */ + private int height; + + /** + * Create a new sprite from a specified image. + * + * @param loader the texture loader to use + * @param ref A reference to the image on which this sprite should be based + */ + public Sprite(TextureLoader loader, String ref) { + try { + texture = loader.getTexture("spaceinvaders/" + ref); + width = texture.getImageWidth(); + height = texture.getImageHeight(); + } catch (IOException ioe) { + ioe.printStackTrace(); + System.exit(-1); + } + } + + /** + * Get the width of this sprite in pixels + * + * @return The width of this sprite in pixels + */ + public int getWidth() { + return texture.getImageWidth(); + } + + /** + * Get the height of this sprite in pixels + * + * @return The height of this sprite in pixels + */ + public int getHeight() { + return texture.getImageHeight(); + } + + /** + * Draw the sprite at the specified location + * + * @param x The x location at which to draw this sprite + * @param y The y location at which to draw this sprite + */ + public void draw(int x, int y) { + // store the current model matrix + glPushMatrix(); + + // bind to the appropriate texture for this sprite + texture.bind(); + + // translate to the right location and prepare to draw + glTranslatef(x, y, 0); + + // draw a quad textured to match the sprite + glBegin(GL_QUADS); + { + glTexCoord2f(0, 0); + glVertex2f(0, 0); + + glTexCoord2f(0, texture.getHeight()); + glVertex2f(0, height); + + glTexCoord2f(texture.getWidth(), texture.getHeight()); + glVertex2f(width, height); + + glTexCoord2f(texture.getWidth(), 0); + glVertex2f(width, 0); + } + glEnd(); + + // restore the model view matrix to prevent contamination + glPopMatrix(); + } +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/Texture.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/Texture.java new file mode 100644 index 0000000..6a3b42b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/Texture.java @@ -0,0 +1,188 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.examples.spaceinvaders; + +import static org.lwjgl.opengl.GL11.*; + +/** + * A texture to be bound within OpenGL. This object is responsible for + * keeping track of a given OpenGL texture and for calculating the + * texturing mapping coordinates of the full image. + * + * Since textures need to be powers of 2 the actual texture may be + * considerably bigged that the source image and hence the texture + * mapping coordinates need to be adjusted to matchup drawing the + * sprite against the texture. + * + * @author Kevin Glass + * @author Brian Matzon + */ +public class Texture { + + /** The GL target type */ + private int target; + + /** The GL texture ID */ + private int textureID; + + /** The height of the image */ + private int height; + + /** The width of the image */ + private int width; + + /** The width of the texture */ + private int texWidth; + + /** The height of the texture */ + private int texHeight; + + /** The ratio of the width of the image to the texture */ + private float widthRatio; + + /** The ratio of the height of the image to the texture */ + private float heightRatio; + + /** + * Create a new texture + * + * @param target The GL target + * @param textureID The GL texture ID + */ + public Texture(int target, int textureID) { + this.target = target; + this.textureID = textureID; + } + + /** + * Bind the specified GL context to a texture + */ + public void bind() { + glBindTexture(target, textureID); + } + + /** + * Set the height of the image + * + * @param height The height of the image + */ + public void setHeight(int height) { + this.height = height; + setHeight(); + } + + /** + * Set the width of the image + * + * @param width The width of the image + */ + public void setWidth(int width) { + this.width = width; + setWidth(); + } + + /** + * Get the height of the original image + * + * @return The height of the original image + */ + public int getImageHeight() { + return height; + } + + /** + * Get the width of the original image + * + * @return The width of the original image + */ + public int getImageWidth() { + return width; + } + + /** + * Get the height of the physical texture + * + * @return The height of physical texture + */ + public float getHeight() { + return heightRatio; + } + + /** + * Get the width of the physical texture + * + * @return The width of physical texture + */ + public float getWidth() { + return widthRatio; + } + + /** + * Set the height of this texture + * + * @param texHeight The height of the texture + */ + public void setTextureHeight(int texHeight) { + this.texHeight = texHeight; + setHeight(); + } + + /** + * Set the width of this texture + * + * @param texWidth The width of the texture + */ + public void setTextureWidth(int texWidth) { + this.texWidth = texWidth; + setWidth(); + } + + /** + * Set the height of the texture. This will update the + * ratio also. + */ + private void setHeight() { + if (texHeight != 0) { + heightRatio = ((float) height) / texHeight; + } + } + + /** + * Set the width of the texture. This will update the + * ratio also. + */ + private void setWidth() { + if (texWidth != 0) { + widthRatio = ((float) width) / texWidth; + } + } +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/TextureLoader.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/TextureLoader.java new file mode 100644 index 0000000..51e9148 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/examples/spaceinvaders/TextureLoader.java @@ -0,0 +1,291 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.examples.spaceinvaders; + +import java.awt.Color; +import java.awt.Graphics; +import java.awt.Image; +import java.awt.color.ColorSpace; +import java.awt.image.BufferedImage; +import java.awt.image.ColorModel; +import java.awt.image.ComponentColorModel; +import java.awt.image.DataBuffer; +import java.awt.image.DataBufferByte; +import java.awt.image.Raster; +import java.awt.image.WritableRaster; +import java.io.IOException; +import java.net.URL; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.IntBuffer; +import java.util.HashMap; +import java.util.Hashtable; + +import javax.swing.ImageIcon; + +import org.lwjgl.BufferUtils; + +import static org.lwjgl.opengl.GL11.*; + +/** + * A utility class to load textures for OpenGL. This source is based + * on a texture that can be found in the Java Gaming (www.javagaming.org) + * Wiki. It has been simplified slightly for explicit 2D graphics use. + * + * OpenGL uses a particular image format. Since the images that are + * loaded from disk may not match this format this loader introduces + * a intermediate image which the source image is copied into. In turn, + * this image is used as source for the OpenGL texture. + * + * @author Kevin Glass + * @author Brian Matzon + */ +public class TextureLoader { + /** The table of textures that have been loaded in this loader */ + private HashMap table = new HashMap(); + + /** The colour model including alpha for the GL image */ + private ColorModel glAlphaColorModel; + + /** The colour model for the GL image */ + private ColorModel glColorModel; + + /** Scratch buffer for texture ID's */ + private IntBuffer textureIDBuffer = BufferUtils.createIntBuffer(1); + + /** + * Create a new texture loader based on the game panel + */ + public TextureLoader() { + glAlphaColorModel = new ComponentColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), + new int[] {8,8,8,8}, + true, + false, + ComponentColorModel.TRANSLUCENT, + DataBuffer.TYPE_BYTE); + + glColorModel = new ComponentColorModel(ColorSpace.getInstance(ColorSpace.CS_sRGB), + new int[] {8,8,8,0}, + false, + false, + ComponentColorModel.OPAQUE, + DataBuffer.TYPE_BYTE); + } + + /** + * Create a new texture ID + * + * @return A new texture ID + */ + private int createTextureID() { + glGenTextures(textureIDBuffer); + return textureIDBuffer.get(0); + } + + /** + * Load a texture + * + * @param resourceName The location of the resource to load + * @return The loaded texture + * @throws IOException Indicates a failure to access the resource + */ + public Texture getTexture(String resourceName) throws IOException { + Texture tex = table.get(resourceName); + + if (tex != null) { + return tex; + } + + tex = getTexture(resourceName, + GL_TEXTURE_2D, // target + GL_RGBA, // dst pixel format + GL_LINEAR, // min filter (unused) + GL_LINEAR); + + table.put(resourceName,tex); + + return tex; + } + + /** + * Load a texture into OpenGL from a image reference on + * disk. + * + * @param resourceName The location of the resource to load + * @param target The GL target to load the texture against + * @param dstPixelFormat The pixel format of the screen + * @param minFilter The minimising filter + * @param magFilter The magnification filter + * @return The loaded texture + * @throws IOException Indicates a failure to access the resource + */ + public Texture getTexture(String resourceName, + int target, + int dstPixelFormat, + int minFilter, + int magFilter) throws IOException { + int srcPixelFormat; + + // create the texture ID for this texture + int textureID = createTextureID(); + Texture texture = new Texture(target,textureID); + + // bind this texture + glBindTexture(target, textureID); + + BufferedImage bufferedImage = loadImage(resourceName); + texture.setWidth(bufferedImage.getWidth()); + texture.setHeight(bufferedImage.getHeight()); + + if (bufferedImage.getColorModel().hasAlpha()) { + srcPixelFormat = GL_RGBA; + } else { + srcPixelFormat = GL_RGB; + } + + // convert that image into a byte buffer of texture data + ByteBuffer textureBuffer = convertImageData(bufferedImage,texture); + + if (target == GL_TEXTURE_2D) { + glTexParameteri(target, GL_TEXTURE_MIN_FILTER, minFilter); + glTexParameteri(target, GL_TEXTURE_MAG_FILTER, magFilter); + } + + // produce a texture from the byte buffer + glTexImage2D(target, + 0, + dstPixelFormat, + get2Fold(bufferedImage.getWidth()), + get2Fold(bufferedImage.getHeight()), + 0, + srcPixelFormat, + GL_UNSIGNED_BYTE, + textureBuffer ); + + return texture; + } + + /** + * Get the closest greater power of 2 to the fold number + * + * @param fold The target number + * @return The power of 2 + */ + private static int get2Fold(int fold) { + int ret = 2; + while (ret < fold) { + ret *= 2; + } + return ret; + } + + /** + * Convert the buffered image to a texture + * + * @param bufferedImage The image to convert to a texture + * @param texture The texture to store the data into + * @return A buffer containing the data + */ + private ByteBuffer convertImageData(BufferedImage bufferedImage,Texture texture) { + ByteBuffer imageBuffer; + WritableRaster raster; + BufferedImage texImage; + + int texWidth = 2; + int texHeight = 2; + + // find the closest power of 2 for the width and height + // of the produced texture + while (texWidth < bufferedImage.getWidth()) { + texWidth *= 2; + } + while (texHeight < bufferedImage.getHeight()) { + texHeight *= 2; + } + + texture.setTextureHeight(texHeight); + texture.setTextureWidth(texWidth); + + // create a raster that can be used by OpenGL as a source + // for a texture + if (bufferedImage.getColorModel().hasAlpha()) { + raster = Raster.createInterleavedRaster(DataBuffer.TYPE_BYTE,texWidth,texHeight,4,null); + texImage = new BufferedImage(glAlphaColorModel,raster,false,new Hashtable()); + } else { + raster = Raster.createInterleavedRaster(DataBuffer.TYPE_BYTE,texWidth,texHeight,3,null); + texImage = new BufferedImage(glColorModel,raster,false,new Hashtable()); + } + + // copy the source image into the produced image + Graphics g = texImage.getGraphics(); + g.setColor(new Color(0f,0f,0f,0f)); + g.fillRect(0,0,texWidth,texHeight); + g.drawImage(bufferedImage,0,0,null); + + // build a byte buffer from the temporary image + // that be used by OpenGL to produce a texture. + byte[] data = ((DataBufferByte) texImage.getRaster().getDataBuffer()).getData(); + + imageBuffer = ByteBuffer.allocateDirect(data.length); + imageBuffer.order(ByteOrder.nativeOrder()); + imageBuffer.put(data, 0, data.length); + imageBuffer.flip(); + + return imageBuffer; + } + + /** + * Load a given resource as a buffered image + * + * @param ref The location of the resource to load + * @return The loaded buffered image + * @throws IOException Indicates a failure to find a resource + */ + private BufferedImage loadImage(String ref) throws IOException { + URL url = TextureLoader.class.getClassLoader().getResource(ref); + + if (url == null) { + throw new IOException("Cannot find: " + ref); + } + + // due to an issue with ImageIO and mixed signed code + // we are now using good oldfashioned ImageIcon to load + // images and the paint it on top of a new BufferedImage + Image img = new ImageIcon(url).getImage(); + BufferedImage bufferedImage = new BufferedImage(img.getWidth(null), img.getHeight(null), BufferedImage.TYPE_INT_RGB); + Graphics g = bufferedImage.getGraphics(); + g.drawImage(img, 0, 0, null); + g.dispose(); + + return bufferedImage; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/input/Controller.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/input/Controller.java new file mode 100644 index 0000000..8135f85 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/input/Controller.java @@ -0,0 +1,290 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.input; + +/** + * A game controller of some sort that will provide input. The controller + * presents buttons and axes. Buttons are either pressed or not pressed. Axis + * provide analogue values. + * + * @author Kevin Glass + */ +public interface Controller { + /** + * Get the name assigned to this controller. + * + * @return The name assigned to this controller + */ + String getName(); + + /** + * Get the index of this controller in the collection + * + * @return The index of this controller in the collection + */ + int getIndex(); + + /** + * Retrieve the number of buttons available on this controller + * + * @return The number of butotns available on this controller + */ + int getButtonCount(); + + /** + * Get the name of the specified button. Be warned, often this is + * as exciting as "Button X" + * + * @param index The index of the button whose name should be retrieved + * @return The name of the button requested + */ + String getButtonName(int index); + + /** + * Check if a button is currently pressed + * + * @param index The button to check + * @return True if the button is currently pressed + */ + boolean isButtonPressed(int index); + + /** + * Poll the controller for new data. This will also update + * events + */ + void poll(); + + /** + * Get the X-Axis value of the POV on this controller + * + * @return The X-Axis value of the POV on this controller + */ + float getPovX(); + + /** + * Get the Y-Axis value of the POV on this controller + * + * @return The Y-Axis value of the POV on this controller + */ + float getPovY(); + + /** + * Get the dead zone for a specified axis + * + * @param index The index of the axis for which to retrieve the dead zone + * @return The dead zone for the specified axis + */ + float getDeadZone(int index); + + /** + * Set the dead zone for the specified axis + * + * @param index The index of hte axis for which to set the dead zone + * @param zone The dead zone to use for the specified axis + */ + void setDeadZone(int index,float zone); + + /** + * Retrieve the number of axes available on this controller. + * + * @return The number of axes available on this controller. + */ + int getAxisCount(); + + /** + * Get the name that's given to the specified axis + * + * @param index The index of the axis whose name should be retrieved + * @return The name of the specified axis. + */ + String getAxisName(int index); + + /** + * Retrieve the value thats currently available on a specified axis. The + * value will always be between 1.0 and -1.0 and will calibrate as values + * are passed read. It may be useful to get the player to wiggle the joystick + * from side to side to get the calibration right. + * + * @param index The index of axis to be read + * @return The value from the specified axis. + */ + float getAxisValue(int index); + + /** + * Get the value from the X axis if there is one. If no X axis is + * defined a zero value will be returned. + * + * @return The value from the X axis + */ + float getXAxisValue(); + + /** + * Get the dead zone for the X axis. + * + * @return The dead zone for the X axis + */ + float getXAxisDeadZone(); + + /** + * Set the dead zone for the X axis + * + * @param zone The dead zone to use for the X axis + */ + void setXAxisDeadZone(float zone); + + /** + * Get the value from the Y axis if there is one. If no Y axis is + * defined a zero value will be returned. + * + * @return The value from the Y axis + */ + float getYAxisValue(); + + /** + * Get the dead zone for the Y axis. + * + * @return The dead zone for the Y axis + */ + float getYAxisDeadZone(); + + /** + * Set the dead zone for the Y axis + * + * @param zone The dead zone to use for the Y axis + */ + void setYAxisDeadZone(float zone); + + /** + * Get the value from the Z axis if there is one. If no Z axis is + * defined a zero value will be returned. + * + * @return The value from the Z axis + */ + float getZAxisValue(); + + /** + * Get the dead zone for the Z axis. + * + * @return The dead zone for the Z axis + */ + float getZAxisDeadZone(); + + /** + * Set the dead zone for the Z axis + * + * @param zone The dead zone to use for the Z axis + */ + void setZAxisDeadZone(float zone); + + /** + * Get the value from the RX axis if there is one. If no RX axis is + * defined a zero value will be returned. + * + * @return The value from the RX axis + */ + float getRXAxisValue(); + + /** + * Get the dead zone for the RX axis. + * + * @return The dead zone for the RX axis + */ + float getRXAxisDeadZone(); + + /** + * Set the dead zone for the RX axis + * + * @param zone The dead zone to use for the RX axis + */ + void setRXAxisDeadZone(float zone); + + /** + * Get the value from the RY axis if there is one. If no RY axis is + * defined a zero value will be returned. + * + * @return The value from the RY axis + */ + float getRYAxisValue(); + + /** + * Get the dead zone for the RY axis. + * + * @return The dead zone for the RY axis + */ + float getRYAxisDeadZone(); + + /** + * Set the dead zone for the RY axis + * + * @param zone The dead zone to use for the RY axis + */ + void setRYAxisDeadZone(float zone); + + /** + * Get the value from the RZ axis if there is one. If no RZ axis is + * defined a zero value will be returned. + * + * @return The value from the RZ axis + */ + float getRZAxisValue(); + + /** + * Get the dead zone for the RZ axis. + * + * @return The dead zone for the RZ axis + */ + float getRZAxisDeadZone(); + + /** + * Set the dead zone for the RZ axis + * + * @param zone The dead zone to use for the RZ axis + */ + void setRZAxisDeadZone(float zone); + + + /** Returns the number of rumblers this controller supports */ + int getRumblerCount(); + + /** Returns the name of the specified rumbler + * + * @param index The rumbler index + */ + String getRumblerName(int index); + + /** Sets the vibration strength of the specified rumbler + * + * @param index The index of the rumbler + * @param strength The strength to vibrate at + */ + void setRumblerStrength(int index, float strength); +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/input/ControllerEvent.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/input/ControllerEvent.java new file mode 100644 index 0000000..35ed82c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/input/ControllerEvent.java @@ -0,0 +1,222 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.input; + +/** + * An event occuring on a controller. + * + * @author Kevin Glass + */ +class ControllerEvent { + /** Indicates the event was caused by a button */ + public static final int BUTTON = 1; + /** Indicates the event was caused by a axis */ + public static final int AXIS = 2; + /** Indicates the event was caused by a pov X */ + public static final int POVX = 3; + /** Indicates the event was caused by a pov Y */ + public static final int POVY = 4; + + /** The controller generating the event */ + private Controller source; + /** The index of the input (axis or button) that generated the event */ + private int index; + /** Type of control that generated the event */ + private int type; + /** True when a button is pressed, if this event was caused by the button */ + private boolean buttonState; + /** True if this event was caused by the x axis */ + private boolean xaxis; + /** True if this event was caused by the y axis */ + private boolean yaxis; + /** The time stamp of this event */ + private long timeStamp; + /** The value on a specified axis, if this event was caused by the x-axis */ + private float xaxisValue; + /** The value on a specified axis, if this event was caused by the y-axis */ + private float yaxisValue; + + /** + * Create a new event + * + * @param source The source of the event + * @param timeStamp The time stamp given for this event + * @param type The type of control generating this event + * @param index The index of the input that generated the event + * @param xaxis True if this event was caused by the x-axis + * @param yaxis True if this event was caused by the y-axis + */ + ControllerEvent(Controller source,long timeStamp, int type,int index,boolean xaxis,boolean yaxis) { + this(source, timeStamp, type, index, false, xaxis, yaxis, 0, 0); + } + + /** + * Create a new event + * + * @param source The source of the event + * @param timeStamp The time stamp given for this event + * @param type The type of control generating this event + * @param index The index of the input that generated the event + * @param buttonState True when a button is pressed, if this event was caused by the button + * @param xaxis True if this event was caused by the x-axis + * @param yaxis True if this event was caused by the y-axis + * @param xaxisValue The value on a specified axis, if this event was caused by the x-axis + * @param yaxisValue The value on a specified axis, if this event was caused by the y-axis + */ + ControllerEvent(Controller source,long timeStamp, int type,int index,boolean buttonState,boolean xaxis,boolean yaxis,float xaxisValue,float yaxisValue) { + this.source = source; + this.timeStamp = timeStamp; + this.type = type; + this.index = index; + this.buttonState = buttonState; + this.xaxis = xaxis; + this.yaxis = yaxis; + this.xaxisValue = xaxisValue; + this.yaxisValue = yaxisValue; + } + + /** + * Get the time stamp given for this event. As with nanoTime() + * this value means nothing other than giving ordering + * + * @return The time stamp given for this event + */ + public long getTimeStamp() { + return timeStamp; + } + + /** + * Get the controller that generated this event + * + * @return The controller that generated this event + */ + public Controller getSource() { + return source; + } + + /** + * Get the index of the control generating this event + * + * @return The index of the control generating this event + */ + public int getControlIndex() { + return index; + } + + /** + * Check if this event was generated by a button + * + * @return True if this event was generated by a button + */ + public boolean isButton() { + return type == BUTTON; + } + + /** + * Check the button is pressed or not, when this event was caused + * + * @return True when a button is pressed, if this event was caused by the button + */ + public boolean getButtonState() { + return buttonState; + } + + /** + * Check if this event was generated by a axis + * + * @return True if this event was generated by a axis + */ + public boolean isAxis() { + return type == AXIS; + } + + /** + * Check if this event was generated by a pov + * + * @return True if this event was generated by a pov + */ + public boolean isPovY() { + return type == POVY; + } + /** + * + * Check if this event was generated by a pov + * + * @return True if this event was generated by a pov + */ + public boolean isPovX() { + return type == POVX; + } + + /** + * Check if this event was caused by the X axis + * + * @return True if this event was caused by the X axis + */ + public boolean isXAxis() { + return xaxis; + } + + /** + * Check if this event was caused by the Y axis + * + * @return True if this event was caused by the Y axis + */ + public boolean isYAxis() { + return yaxis; + } + + /** + * Get the value on an X axis when this event was caused + * + * @return The value on a specified axis, if this event was caused by the x-axis + */ + public float getXAxisValue() { + return xaxisValue; + } + + /** + * Get the value on an Y axis when this event was caused + * + * @return The value on a specified axis, if this event was caused by the y-axis + */ + public float getYAxisValue() { + return yaxisValue; + } + + /* + * @see java.lang.Object#toString() + */ + public String toString() { + return "["+source+" type="+type+" xaxis="+xaxis+" yaxis="+yaxis+"]"; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/input/Controllers.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/input/Controllers.java new file mode 100644 index 0000000..db0a5c5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/input/Controllers.java @@ -0,0 +1,308 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.input; + +import java.util.ArrayList; + +import net.java.games.input.ControllerEnvironment; + +import org.lwjgl.LWJGLException; + +/** + * The collection of controllers currently connected. + * + * @author Kevin Glass + */ +public class Controllers { + /** The controllers available */ + private static ArrayList controllers = new ArrayList(); + /** The number of controllers */ + private static int controllerCount; + + /** The current list of events */ + private static ArrayList events = new ArrayList(); + /** The current event */ + private static ControllerEvent event; + + /** Whether controllers were created */ + private static boolean created; + + /** + * Initialise the controllers collection + * + * @throws LWJGLException Indicates a failure to initialise the controller library. + */ + public static void create() throws LWJGLException { + if (created) + return; + + try { + ControllerEnvironment env = ControllerEnvironment.getDefaultEnvironment(); + + net.java.games.input.Controller[] found = env.getControllers(); + ArrayList lollers = new ArrayList(); + for ( net.java.games.input.Controller c : found ) { + if ( (!c.getType().equals(net.java.games.input.Controller.Type.KEYBOARD)) && + (!c.getType().equals(net.java.games.input.Controller.Type.MOUSE)) ) { + lollers.add(c); + } + } + + for ( net.java.games.input.Controller c : lollers ) { + createController(c); + } + + created = true; + } catch (Throwable e) { + throw new LWJGLException("Failed to initialise controllers",e); + } + } + + /** + * Utility to create a controller based on its potential sub-controllers + * + * @param c The controller to add + */ + private static void createController(net.java.games.input.Controller c) { + net.java.games.input.Controller[] subControllers = c.getControllers(); + if (subControllers.length == 0) { + JInputController controller = new JInputController(controllerCount,c); + + controllers.add(controller); + controllerCount++; + } else { + for ( net.java.games.input.Controller sub : subControllers ) { + createController(sub); + } + } + } + + /** + * Get a controller from the collection + * + * @param index The index of the controller to retrieve + * @return The controller requested + */ + public static Controller getController(int index) { + return controllers.get(index); + } + + /** + * Retrieve a count of the number of controllers + * + * @return The number of controllers available + */ + public static int getControllerCount() { + return controllers.size(); + } + + /** + * Poll the controllers available. This will both update their state + * and generate events that must be cleared. + */ + public static void poll() { + for (int i=0;i + * @version $Revision$ + * $Id$ + */ + +public class Cursor { + /** 1 bit transparency for native cursor */ + public static final int CURSOR_ONE_BIT_TRANSPARENCY = 1; + + /** 8 bit alhpa native cursor */ + public static final int CURSOR_8_BIT_ALPHA = 2; + + /** animation native cursor */ + public static final int CURSOR_ANIMATION = 4; + + /** First element to display */ + private final CursorElement[] cursors; + + /** Index into list of cursors */ + private int index; + + private boolean destroyed; + + /** + * Constructs a new Cursor, with the given parameters. Mouse must have been created before you can create + * Cursor objects. Cursor images are in ARGB format, but only one bit transparancy is guaranteed to be supported. + * So to maximize portability, lwjgl applications should only create cursor images with 0x00 or 0xff as alpha values. + * The constructor will copy the images and delays, so there's no need to keep them around. + * + * @param width cursor image width + * @param height cursor image height + * @param xHotspot the x coordinate of the cursor hotspot + * @param yHotspot the y coordinate of the cursor hotspot + * @param numImages number of cursor images specified. Must be 1 if animations are not supported. + * @param images A buffer containing the images. The origin is at the lower left corner, like OpenGL. + * @param delays An int buffer of animation frame delays, if numImages is greater than 1, else null + * @throws LWJGLException if the cursor could not be created for any reason + */ + public Cursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLException { + synchronized (OpenGLPackageAccess.global_lock) { + if ((getCapabilities() & CURSOR_ONE_BIT_TRANSPARENCY) == 0) + throw new LWJGLException("Native cursors not supported"); + BufferChecks.checkBufferSize(images, width*height*numImages); + if (delays != null) + BufferChecks.checkBufferSize(delays, numImages); + if (!Mouse.isCreated()) + throw new IllegalStateException("Mouse must be created before creating cursor objects"); + if (width*height*numImages > images.remaining()) + throw new IllegalArgumentException("width*height*numImages > images.remaining()"); + if (xHotspot >= width || xHotspot < 0) + throw new IllegalArgumentException("xHotspot > width || xHotspot < 0"); + if (yHotspot >= height || yHotspot < 0) + throw new IllegalArgumentException("yHotspot > height || yHotspot < 0"); + + Sys.initialize(); + + // Hmm + yHotspot = height - 1 - yHotspot; + + // create cursor (or cursors if multiple images supplied) + cursors = createCursors(width, height, xHotspot, yHotspot, numImages, images, delays); + } + } + + /** + * Gets the minimum size of a native cursor. Can only be called if + * The Mouse is created and cursor caps includes at least + * CURSOR_ONE_BIT_TRANSPARANCY. + * + * @return the maximum size of a native cursor + */ + public static int getMinCursorSize() { + synchronized (OpenGLPackageAccess.global_lock) { + if (!Mouse.isCreated()) + throw new IllegalStateException("Mouse must be created."); + return Mouse.getImplementation().getMinCursorSize(); + } + } + + /** + * Gets the maximum size of a native cursor. Can only be called if + * The Mouse is created and cursor caps includes at least + * CURSOR_ONE_BIT_TRANSPARANCY. + * + * @return the maximum size of a native cursor + */ + public static int getMaxCursorSize() { + synchronized (OpenGLPackageAccess.global_lock) { + if (!Mouse.isCreated()) + throw new IllegalStateException("Mouse must be created."); + return Mouse.getImplementation().getMaxCursorSize(); + } + } + + /** + * Get the capabilities of the native cursor. Return a bit mask of the native cursor capabilities. + * The CURSOR_ONE_BIT_TRANSPARANCY indicates support for cursors with one bit transparancy, + * the CURSOR_8_BIT_ALPHA indicates support for 8 bit alpha and CURSOR_ANIMATION indicates + * support for cursor animations. + * + * @return A bit mask with native cursor capabilities. + */ + public static int getCapabilities() { + synchronized (OpenGLPackageAccess.global_lock) { + if (Mouse.getImplementation() != null) + return Mouse.getImplementation().getNativeCursorCapabilities(); + else + return OpenGLPackageAccess.createImplementation().getNativeCursorCapabilities(); + } + } + + /** + * Creates the actual cursor, using a platform specific class + */ + private static CursorElement[] createCursors(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLException { + // create copy and flip images to match ogl + IntBuffer images_copy = BufferUtils.createIntBuffer(images.remaining()); + flipImages(width, height, numImages, images, images_copy); + + // Mac and Windows doesn't (afaik) allow for animation based cursors, except in the .ani + // format on Windows, which we don't support. + // The cursor animation was therefor developed using java side time tracking. + // unfortunately X flickers when changing cursor. We therefore check for either + // Windows, Mac or X and do accordingly. + // we might want to split it into a X/Win/Mac cursor if it gets too cluttered + + CursorElement[] cursors; + switch (LWJGLUtil.getPlatform()) { + case LWJGLUtil.PLATFORM_MACOSX: + + // OS X requires the image format to be in ABGR format + convertARGBtoABGR(images_copy); + + // create our cursor elements + cursors = new CursorElement[numImages]; + for(int i=0; i> 24 & 0xff; + if(alpha != 0xff) { + images_copy.put(index, 0); + } + } + + Object handle = Mouse.getImplementation().createCursor(width, height, xHotspot, yHotspot, 1, images_copy, null); + long delay = (delays != null) ? delays.get(i) : 0; + long timeout = System.currentTimeMillis(); + cursors[i] = new CursorElement(handle, delay, timeout); + + // offset to next image + images_copy.position(width*height*(i+1)); + } + break; + case LWJGLUtil.PLATFORM_LINUX: + // create our cursor elements + Object handle = Mouse.getImplementation().createCursor(width, height, xHotspot, yHotspot, numImages, images_copy, delays); + CursorElement cursor_element = new CursorElement(handle, -1, -1); + cursors = new CursorElement[]{cursor_element}; + break; + default: + throw new RuntimeException("Unknown OS"); + } + return cursors; + } + + /** + * Convert an IntBuffer image of ARGB format into ABGR + * + * @param imageBuffer image to convert + */ + private static void convertARGBtoABGR(IntBuffer imageBuffer) { + for (int i = 0; i < imageBuffer.limit(); i++) { + int argbColor = imageBuffer.get(i); + + byte alpha = (byte)(argbColor >>> 24); + byte blue = (byte)(argbColor >>> 16); + byte green = (byte)(argbColor >>> 8); + byte red = (byte)argbColor; + + int abgrColor = ((alpha & 0xff) << 24 ) + ((red & 0xff) << 16 ) + ((green & 0xff) << 8 ) + ((blue & 0xff) ); + + imageBuffer.put(i, abgrColor); + } + } + + /** + * Flips the images so they're oriented according to opengl + * + * @param width Width of image + * @param height Height of images + * @param numImages How many images to flip + * @param images Source images + * @param images_copy Destination images + */ + private static void flipImages(int width, int height, int numImages, IntBuffer images, IntBuffer images_copy) { + for (int i = 0; i < numImages; i++) { + int start_index = i*width*height; + flipImage(width, height, start_index, images, images_copy); + } + } + + /** + * @param width Width of image + * @param height Height of images + * @param start_index index into source buffer to copy to + * @param images Source images + * @param images_copy Destination images + */ + private static void flipImage(int width, int height, int start_index, IntBuffer images, IntBuffer images_copy) { + for (int y = 0; y < height>>1; y++) { + int index_y_1 = y*width + start_index; + int index_y_2 = (height - y - 1)*width + start_index; + for (int x = 0; x < width; x++) { + int index1 = index_y_1 + x; + int index2 = index_y_2 + x; + int temp_pixel = images.get(index1 + images.position()); + images_copy.put(index1, images.get(index2 + images.position())); + images_copy.put(index2, temp_pixel); + } + } + } + + /** + * Gets the native handle associated with the cursor object. + */ + Object getHandle() { + checkValid(); + return cursors[index].cursorHandle; + } + + private void checkValid() { + if (destroyed) + throw new IllegalStateException("The cursor is destroyed"); + } + + /** + * Destroy the native cursor. If the cursor is current, + * the current native cursor is set to null (the default + * OS cursor) + */ + public void destroy() { + synchronized (OpenGLPackageAccess.global_lock) { + if (destroyed) + return; + if (Mouse.getNativeCursor() == this) { + try { + Mouse.setNativeCursor(null); + } catch (LWJGLException e) { + // ignore + } + } + for ( CursorElement cursor : cursors ) { + Mouse.getImplementation().destroyCursor(cursor.cursorHandle); + } + destroyed = true; + } + } + + /** + * Sets the timout property to the time it should be changed + */ + protected void setTimeout() { + checkValid(); + cursors[index].timeout = System.currentTimeMillis() + cursors[index].delay; + } + + /** + * Determines whether this cursor has timed out + * @return true if the this cursor has timed out, false if not + */ + protected boolean hasTimedOut() { + checkValid(); + return cursors.length > 1 && cursors[index].timeout < System.currentTimeMillis(); + } + + /** + * Changes to the next cursor + */ + protected void nextCursor() { + checkValid(); + index = ++index % cursors.length; + } + + /** + * A single cursor element, used when animating + */ + private static class CursorElement { + /** Handle to cursor */ + final Object cursorHandle; + + /** How long a delay this element should have */ + final long delay; + + /** Absolute time this element times out */ + long timeout; + + CursorElement(Object cursorHandle, long delay, long timeout) { + this.cursorHandle = cursorHandle; + this.delay = delay; + this.timeout = timeout; + } + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/input/JInputController.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/input/JInputController.java new file mode 100644 index 0000000..71f2997 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/input/JInputController.java @@ -0,0 +1,537 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.input; + +import java.util.ArrayList; + +import net.java.games.input.Component; +import net.java.games.input.Component.Identifier.Axis; +import net.java.games.input.Component.Identifier.Button; +import net.java.games.input.Event; +import net.java.games.input.EventQueue; +import net.java.games.input.Rumbler; + +/** + * A wrapper round a JInput controller that attempts to make the interface + * more useable. + * + * @author Kevin Glass + */ +class JInputController implements Controller { + /** The JInput controller this class is wrapping */ + private net.java.games.input.Controller target; + /** The index that has been assigned to this controller */ + private int index; + /** The Buttons that have been detected on the JInput controller */ + private ArrayList buttons = new ArrayList(); + /** The Axes that have been detected on the JInput controller */ + private ArrayList axes = new ArrayList(); + /** The POVs that have been detected on the JInput controller */ + private ArrayList pov = new ArrayList(); + /** The rumblers exposed by the controller */ + private Rumbler[] rumblers; + /** The state of the buttons last check */ + private boolean[] buttonState; + /** The values that were read from the pov last check */ + private float[] povValues; + /** The values that were read from the axes last check */ + private float[] axesValue; + /** The maximum values read for each axis */ + private float[] axesMax; + /** The dead zones for each axis */ + private float[] deadZones; + /** The index of the X axis or -1 if no X axis is defined */ + private int xaxis = -1; + /** The index of the Y axis or -1 if no Y axis is defined */ + private int yaxis = -1; + /** The index of the X axis or -1 if no Z axis is defined */ + private int zaxis = -1; + /** The index of the RX axis or -1 if no RX axis is defined */ + private int rxaxis = -1; + /** The index of the RY axis or -1 if no RY axis is defined */ + private int ryaxis = -1; + /** The index of the RZ axis or -1 if no RZ axis is defined */ + private int rzaxis = -1; + + /** + * Create a new controller that wraps round a JInput controller and hopefully + * makes it easier to use. + * + * @param index The index this controller has been assigned to + * @param target The target JInput controller this class is wrapping + */ + JInputController(int index, net.java.games.input.Controller target) { + this.target = target; + this.index = index; + + Component[] sourceAxes = target.getComponents(); + + for ( Component sourceAxis : sourceAxes ) { + if ( sourceAxis.getIdentifier() instanceof Button ) { + buttons.add(sourceAxis); + } else if ( sourceAxis.getIdentifier().equals(Axis.POV) ) { + pov.add(sourceAxis); + } else { + axes.add(sourceAxis); + } + } + + buttonState = new boolean[buttons.size()]; + povValues = new float[pov.size()]; + axesValue = new float[axes.size()]; + int buttonsCount = 0; + int axesCount = 0; + + // initialise the state + for ( Component sourceAxis : sourceAxes ) { + if ( sourceAxis.getIdentifier() instanceof Button ) { + buttonState[buttonsCount] = sourceAxis.getPollData() != 0; + buttonsCount++; + } else if ( sourceAxis.getIdentifier().equals(Axis.POV) ) { + // no account for POV yet + // pov.add(sourceAxes[i]); + } else { + axesValue[axesCount] = sourceAxis.getPollData(); + if ( sourceAxis.getIdentifier().equals(Axis.X) ) { + xaxis = axesCount; + } + if ( sourceAxis.getIdentifier().equals(Axis.Y) ) { + yaxis = axesCount; + } + if ( sourceAxis.getIdentifier().equals(Axis.Z) ) { + zaxis = axesCount; + } + if ( sourceAxis.getIdentifier().equals(Axis.RX) ) { + rxaxis = axesCount; + } + if ( sourceAxis.getIdentifier().equals(Axis.RY) ) { + ryaxis = axesCount; + } + if ( sourceAxis.getIdentifier().equals(Axis.RZ) ) { + rzaxis = axesCount; + } + + axesCount++; + } + } + + axesMax = new float[axes.size()]; + deadZones = new float[axes.size()]; + + for (int i=0;i axesMax[axisIndex]) { + axesMax[axisIndex] = Math.abs(value); + } + + // normalize the value based on maximum value read in the past + value /= axesMax[axisIndex]; + + if (axisIndex == xaxis) { + xaxisValue = value; + } + if (axisIndex == yaxis) { + yaxisValue = value; + } + + // fire event + Controllers.addEvent(new ControllerEvent(this,event.getNanos(),ControllerEvent.AXIS,axisIndex,false, + axisIndex == xaxis,axisIndex == yaxis,xaxisValue,yaxisValue)); + axesValue[axisIndex] = value; + } + } + } + + /* + * @see org.lwjgl.input.Controller#getAxisCount() + */ + public int getAxisCount() { + return axes.size(); + } + + /* + * @see org.lwjgl.input.Controller#getAxisName(int) + */ + public String getAxisName(int index) { + return axes.get(index).getName(); + } + + /* + * @see org.lwjgl.input.Controller#getAxisValue(int) + */ + public float getAxisValue(int index) { + return axesValue[index]; + } + + /* + * @see org.lwjgl.input.Controller#getXAxisValue() + */ + public float getXAxisValue() { + if (xaxis == -1) { + return 0; + } + + return getAxisValue(xaxis); + } + + /* + * @see org.lwjgl.input.Controller#getYAxisValue() + */ + public float getYAxisValue() { + if (yaxis == -1) { + return 0; + } + + return getAxisValue(yaxis); + } + + /* + * @see org.lwjgl.input.Controller#getXAxisDeadZone() + */ + public float getXAxisDeadZone() { + if (xaxis == -1) { + return 0; + } + + return getDeadZone(xaxis); + } + + /* + * @see org.lwjgl.input.Controller#getYAxisDeadZone() + */ + public float getYAxisDeadZone() { + if (yaxis == -1) { + return 0; + } + + return getDeadZone(yaxis); + } + + /* + * @see org.lwjgl.input.Controller#setXAxisDeadZone(float) + */ + public void setXAxisDeadZone(float zone) { + setDeadZone(xaxis,zone); + } + + /* + * @see org.lwjgl.input.Controller#setYAxisDeadZone(float) + */ + public void setYAxisDeadZone(float zone) { + setDeadZone(yaxis,zone); + } + + /* + * @see org.lwjgl.input.Controller#getDeadZone(int) + */ + public float getDeadZone(int index) { + return deadZones[index]; + } + + /* + * @see org.lwjgl.input.Controller#setDeadZone(int, float) + */ + public void setDeadZone(int index, float zone) { + deadZones[index] = zone; + } + + /* + * @see org.lwjgl.input.Controller#getZAxisValue() + */ + public float getZAxisValue() { + if (zaxis == -1) { + return 0; + } + + return getAxisValue(zaxis); + } + + /* + * @see org.lwjgl.input.Controller#getZAxisDeadZone() + */ + public float getZAxisDeadZone() { + if (zaxis == -1) { + return 0; + } + + return getDeadZone(zaxis); + } + + /* + * @see org.lwjgl.input.Controller#setZAxisDeadZone(float) + */ + public void setZAxisDeadZone(float zone) { + setDeadZone(zaxis,zone); + } + + /* + * @see org.lwjgl.input.Controller#getRXAxisValue() + */ + public float getRXAxisValue() { + if (rxaxis == -1) { + return 0; + } + + return getAxisValue(rxaxis); + } + + /* + * @see org.lwjgl.input.Controller#getRXAxisDeadZone() + */ + public float getRXAxisDeadZone() { + if (rxaxis == -1) { + return 0; + } + + return getDeadZone(rxaxis); + } + + /* + * @see org.lwjgl.input.Controller#setRXAxisDeadZone(float) + */ + public void setRXAxisDeadZone(float zone) { + setDeadZone(rxaxis,zone); + } + + /* + * @see org.lwjgl.input.Controller#getRYAxisValue() + */ + public float getRYAxisValue() { + if (ryaxis == -1) { + return 0; + } + + return getAxisValue(ryaxis); + } + + /* + * @see org.lwjgl.input.Controller#getRYAxisDeadZone() + */ + public float getRYAxisDeadZone() { + if (ryaxis == -1) { + return 0; + } + + return getDeadZone(ryaxis); + } + + /* + * @see org.lwjgl.input.Controller#setRYAxisDeadZone(float) + */ + public void setRYAxisDeadZone(float zone) { + setDeadZone(ryaxis,zone); + } + + /* + * @see org.lwjgl.input.Controller#getRZAxisValue() + */ + public float getRZAxisValue() { + if (rzaxis == -1) { + return 0; + } + + return getAxisValue(rzaxis); + } + + /* + * @see org.lwjgl.input.Controller#getRZAxisDeadZone() + */ + public float getRZAxisDeadZone() { + if (rzaxis == -1) { + return 0; + } + + return getDeadZone(rzaxis); + } + + /* + * @see org.lwjgl.input.Controller#setRZAxisDeadZone(float) + */ + public void setRZAxisDeadZone(float zone) { + setDeadZone(rzaxis,zone); + } + + /* + * @see org.lwjgl.input.Controller#getPovX() + */ + public float getPovX() { + if (pov.size() == 0) { + return 0; + } + + float value = povValues[0]; + + if ((value == Component.POV.DOWN_LEFT) || + (value == Component.POV.UP_LEFT) || + (value == Component.POV.LEFT)) { + return -1; + } + if ((value == Component.POV.DOWN_RIGHT) || + (value == Component.POV.UP_RIGHT) || + (value == Component.POV.RIGHT)) { + return 1; + } + + return 0; + } + + /* + * @see org.lwjgl.input.Controller#getPovY() + */ + public float getPovY() { + if (pov.size() == 0) { + return 0; + } + + float value = povValues[0]; + + if ((value == Component.POV.DOWN_LEFT) || + (value == Component.POV.DOWN_RIGHT) || + (value == Component.POV.DOWN)) { + return 1; + } + if ((value == Component.POV.UP_LEFT) || + (value == Component.POV.UP_RIGHT) || + (value == Component.POV.UP)) { + return -1; + } + + return 0; + } + + public int getRumblerCount() { + return rumblers.length; + } + + public String getRumblerName(int index) { + return rumblers[index].getAxisName(); + } + + public void setRumblerStrength(int index, float strength) { + rumblers[index].rumble(strength); + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/input/Keyboard.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/input/Keyboard.java new file mode 100644 index 0000000..054a718 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/input/Keyboard.java @@ -0,0 +1,610 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.input; + +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; +import java.nio.ByteBuffer; +import java.util.HashMap; +import java.util.Map; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.Sys; +import org.lwjgl.opengl.Display; +import org.lwjgl.opengl.InputImplementation; + +/** + *
+ * A raw Keyboard interface. This can be used to poll the current state of the + * keys, or read all the keyboard presses / releases since the last read. + * + * @author cix_foo + * @author elias_naur + * @author Brian Matzon + * @version $Revision$ + * $Id$ + */ +public class Keyboard { + /** Internal use - event size in bytes */ + public static final int EVENT_SIZE = 4 + 1 + 4 + 8 + 1; + + /** + * The special character meaning that no + * character was translated for the event. + */ + public static final int CHAR_NONE = '\0'; + + /** + * The special keycode meaning that only the + * translated character is valid. + */ + public static final int KEY_NONE = 0x00; + + public static final int KEY_ESCAPE = 0x01; + public static final int KEY_1 = 0x02; + public static final int KEY_2 = 0x03; + public static final int KEY_3 = 0x04; + public static final int KEY_4 = 0x05; + public static final int KEY_5 = 0x06; + public static final int KEY_6 = 0x07; + public static final int KEY_7 = 0x08; + public static final int KEY_8 = 0x09; + public static final int KEY_9 = 0x0A; + public static final int KEY_0 = 0x0B; + public static final int KEY_MINUS = 0x0C; /* - on main keyboard */ + public static final int KEY_EQUALS = 0x0D; + public static final int KEY_BACK = 0x0E; /* backspace */ + public static final int KEY_TAB = 0x0F; + public static final int KEY_Q = 0x10; + public static final int KEY_W = 0x11; + public static final int KEY_E = 0x12; + public static final int KEY_R = 0x13; + public static final int KEY_T = 0x14; + public static final int KEY_Y = 0x15; + public static final int KEY_U = 0x16; + public static final int KEY_I = 0x17; + public static final int KEY_O = 0x18; + public static final int KEY_P = 0x19; + public static final int KEY_LBRACKET = 0x1A; + public static final int KEY_RBRACKET = 0x1B; + public static final int KEY_RETURN = 0x1C; /* Enter on main keyboard */ + public static final int KEY_LCONTROL = 0x1D; + public static final int KEY_A = 0x1E; + public static final int KEY_S = 0x1F; + public static final int KEY_D = 0x20; + public static final int KEY_F = 0x21; + public static final int KEY_G = 0x22; + public static final int KEY_H = 0x23; + public static final int KEY_J = 0x24; + public static final int KEY_K = 0x25; + public static final int KEY_L = 0x26; + public static final int KEY_SEMICOLON = 0x27; + public static final int KEY_APOSTROPHE = 0x28; + public static final int KEY_GRAVE = 0x29; /* accent grave */ + public static final int KEY_LSHIFT = 0x2A; + public static final int KEY_BACKSLASH = 0x2B; + public static final int KEY_Z = 0x2C; + public static final int KEY_X = 0x2D; + public static final int KEY_C = 0x2E; + public static final int KEY_V = 0x2F; + public static final int KEY_B = 0x30; + public static final int KEY_N = 0x31; + public static final int KEY_M = 0x32; + public static final int KEY_COMMA = 0x33; + public static final int KEY_PERIOD = 0x34; /* . on main keyboard */ + public static final int KEY_SLASH = 0x35; /* / on main keyboard */ + public static final int KEY_RSHIFT = 0x36; + public static final int KEY_MULTIPLY = 0x37; /* * on numeric keypad */ + public static final int KEY_LMENU = 0x38; /* left Alt */ + public static final int KEY_SPACE = 0x39; + public static final int KEY_CAPITAL = 0x3A; + public static final int KEY_F1 = 0x3B; + public static final int KEY_F2 = 0x3C; + public static final int KEY_F3 = 0x3D; + public static final int KEY_F4 = 0x3E; + public static final int KEY_F5 = 0x3F; + public static final int KEY_F6 = 0x40; + public static final int KEY_F7 = 0x41; + public static final int KEY_F8 = 0x42; + public static final int KEY_F9 = 0x43; + public static final int KEY_F10 = 0x44; + public static final int KEY_NUMLOCK = 0x45; + public static final int KEY_SCROLL = 0x46; /* Scroll Lock */ + public static final int KEY_NUMPAD7 = 0x47; + public static final int KEY_NUMPAD8 = 0x48; + public static final int KEY_NUMPAD9 = 0x49; + public static final int KEY_SUBTRACT = 0x4A; /* - on numeric keypad */ + public static final int KEY_NUMPAD4 = 0x4B; + public static final int KEY_NUMPAD5 = 0x4C; + public static final int KEY_NUMPAD6 = 0x4D; + public static final int KEY_ADD = 0x4E; /* + on numeric keypad */ + public static final int KEY_NUMPAD1 = 0x4F; + public static final int KEY_NUMPAD2 = 0x50; + public static final int KEY_NUMPAD3 = 0x51; + public static final int KEY_NUMPAD0 = 0x52; + public static final int KEY_DECIMAL = 0x53; /* . on numeric keypad */ + public static final int KEY_F11 = 0x57; + public static final int KEY_F12 = 0x58; + public static final int KEY_F13 = 0x64; /* (NEC PC98) */ + public static final int KEY_F14 = 0x65; /* (NEC PC98) */ + public static final int KEY_F15 = 0x66; /* (NEC PC98) */ + public static final int KEY_F16 = 0x67; /* Extended Function keys - (Mac) */ + public static final int KEY_F17 = 0x68; + public static final int KEY_F18 = 0x69; + public static final int KEY_KANA = 0x70; /* (Japanese keyboard) */ + public static final int KEY_F19 = 0x71; /* Extended Function keys - (Mac) */ + public static final int KEY_CONVERT = 0x79; /* (Japanese keyboard) */ + public static final int KEY_NOCONVERT = 0x7B; /* (Japanese keyboard) */ + public static final int KEY_YEN = 0x7D; /* (Japanese keyboard) */ + public static final int KEY_NUMPADEQUALS = 0x8D; /* = on numeric keypad (NEC PC98) */ + public static final int KEY_CIRCUMFLEX = 0x90; /* (Japanese keyboard) */ + public static final int KEY_AT = 0x91; /* (NEC PC98) */ + public static final int KEY_COLON = 0x92; /* (NEC PC98) */ + public static final int KEY_UNDERLINE = 0x93; /* (NEC PC98) */ + public static final int KEY_KANJI = 0x94; /* (Japanese keyboard) */ + public static final int KEY_STOP = 0x95; /* (NEC PC98) */ + public static final int KEY_AX = 0x96; /* (Japan AX) */ + public static final int KEY_UNLABELED = 0x97; /* (J3100) */ + public static final int KEY_NUMPADENTER = 0x9C; /* Enter on numeric keypad */ + public static final int KEY_RCONTROL = 0x9D; + public static final int KEY_SECTION = 0xA7; /* Section symbol (Mac) */ + public static final int KEY_NUMPADCOMMA = 0xB3; /* , on numeric keypad (NEC PC98) */ + public static final int KEY_DIVIDE = 0xB5; /* / on numeric keypad */ + public static final int KEY_SYSRQ = 0xB7; + public static final int KEY_RMENU = 0xB8; /* right Alt */ + public static final int KEY_FUNCTION = 0xC4; /* Function (Mac) */ + public static final int KEY_PAUSE = 0xC5; /* Pause */ + public static final int KEY_HOME = 0xC7; /* Home on arrow keypad */ + public static final int KEY_UP = 0xC8; /* UpArrow on arrow keypad */ + public static final int KEY_PRIOR = 0xC9; /* PgUp on arrow keypad */ + public static final int KEY_LEFT = 0xCB; /* LeftArrow on arrow keypad */ + public static final int KEY_RIGHT = 0xCD; /* RightArrow on arrow keypad */ + public static final int KEY_END = 0xCF; /* End on arrow keypad */ + public static final int KEY_DOWN = 0xD0; /* DownArrow on arrow keypad */ + public static final int KEY_NEXT = 0xD1; /* PgDn on arrow keypad */ + public static final int KEY_INSERT = 0xD2; /* Insert on arrow keypad */ + public static final int KEY_DELETE = 0xD3; /* Delete on arrow keypad */ + public static final int KEY_CLEAR = 0xDA; /* Clear key (Mac) */ + public static final int KEY_LMETA = 0xDB; /* Left Windows/Option key */ + /** + * The left windows key, mapped to KEY_LMETA + * + * @deprecated Use KEY_LMETA instead + */ + public static final int KEY_LWIN = KEY_LMETA; /* Left Windows key */ + public static final int KEY_RMETA = 0xDC; /* Right Windows/Option key */ + /** + * The right windows key, mapped to KEY_RMETA + * + * @deprecated Use KEY_RMETA instead + */ + public static final int KEY_RWIN = KEY_RMETA; /* Right Windows key */ + public static final int KEY_APPS = 0xDD; /* AppMenu key */ + public static final int KEY_POWER = 0xDE; + public static final int KEY_SLEEP = 0xDF; + +/* public static final int STATE_ON = 0; + public static final int STATE_OFF = 1; + public static final int STATE_UNKNOWN = 2; +*/ + public static final int KEYBOARD_SIZE = 256; + + /** Buffer size in events */ + private static final int BUFFER_SIZE = 50; + + /** Key names */ + private static final String[] keyName = new String[KEYBOARD_SIZE]; + private static final Map keyMap = new HashMap(253); + private static int counter; + + static { + // Use reflection to find out key names + Field[] fields = Keyboard.class.getFields(); + try { + for ( Field field : fields ) { + if ( Modifier.isStatic(field.getModifiers()) + && Modifier.isPublic(field.getModifiers()) + && Modifier.isFinal(field.getModifiers()) + && field.getType().equals(int.class) + && field.getName().startsWith("KEY_") + && !field.getName().endsWith("WIN") ) { /* Don't use deprecated names */ + + int key = field.getInt(null); + String name = field.getName().substring(4); + keyName[key] = name; + keyMap.put(name, key); + counter++; + } + + } + } catch (Exception e) { + } + + } + + /** The number of keys supported */ + private static final int keyCount = counter; + + /** Has the keyboard been created? */ + private static boolean created; + + /** Are repeat events enabled? */ + private static boolean repeat_enabled; + + /** The keys status from the last poll */ + private static final ByteBuffer keyDownBuffer = BufferUtils.createByteBuffer(KEYBOARD_SIZE); + + /** + * The key events from the last read: a sequence of pairs of key number, + * followed by state. The state is followed by + * a 4 byte code point representing the translated character. + */ + private static ByteBuffer readBuffer; + + /** current event */ + private static KeyEvent current_event = new KeyEvent(); + + /** scratch event */ + private static KeyEvent tmp_event = new KeyEvent(); + + /** One time initialization */ + private static boolean initialized; + + private static InputImplementation implementation; + + /** + * Keyboard cannot be constructed. + */ + private Keyboard() { + } + + /** + * Static initialization + */ + private static void initialize() { + if (initialized) + return; + Sys.initialize(); + initialized = true; + } + + /** + * "Create" the keyboard with the given implementation. This is used + * reflectively from AWTInputAdapter. + * + * @throws LWJGLException if the keyboard could not be created for any reason + */ + private static void create(InputImplementation impl) throws LWJGLException { + if (created) + return; + if (!initialized) + initialize(); + implementation = impl; + implementation.createKeyboard(); + created = true; + readBuffer = ByteBuffer.allocate(EVENT_SIZE*BUFFER_SIZE); + reset(); + } + + /** + * "Create" the keyboard. The display must first have been created. The + * reason for this is so the keyboard has a window to "focus" in. + * + * @throws LWJGLException if the keyboard could not be created for any reason + */ + public static void create() throws LWJGLException { + synchronized (OpenGLPackageAccess.global_lock) { + if (!Display.isCreated()) throw new IllegalStateException("Display must be created."); + + create(OpenGLPackageAccess.createImplementation()); + } + } + + private static void reset() { + readBuffer.limit(0); + for (int i = 0; i < keyDownBuffer.remaining(); i++) + keyDownBuffer.put(i, (byte)0); + current_event.reset(); + } + + /** + * @return true if the keyboard has been created + */ + public static boolean isCreated() { + synchronized (OpenGLPackageAccess.global_lock) { + return created; + } + } + + /** + * "Destroy" the keyboard + */ + public static void destroy() { + synchronized (OpenGLPackageAccess.global_lock) { + if (!created) + return; + created = false; + implementation.destroyKeyboard(); + reset(); + } + } + + /** + * Polls the keyboard for its current state. Access the polled values using the + * isKeyDown method. + * By using this method, it is possible to "miss" keyboard keys if you don't + * poll fast enough. + * + * To use buffered values, you have to call next for each event you + * want to read. You can query which key caused the event by using + * getEventKey. To get the state of that key, for that event, use + * getEventKeyState - finally use getEventCharacter to get the + * character for that event. + * + * NOTE: This method does not query the operating system for new events. To do that, + * Display.processMessages() (or Display.update()) must be called first. + * + * @see org.lwjgl.input.Keyboard#isKeyDown(int key) + * @see org.lwjgl.input.Keyboard#next() + * @see org.lwjgl.input.Keyboard#getEventKey() + * @see org.lwjgl.input.Keyboard#getEventKeyState() + * @see org.lwjgl.input.Keyboard#getEventCharacter() + */ + public static void poll() { + synchronized (OpenGLPackageAccess.global_lock) { + if (!created) + throw new IllegalStateException("Keyboard must be created before you can poll the device"); + implementation.pollKeyboard(keyDownBuffer); + read(); + } + } + + private static void read() { + readBuffer.compact(); + implementation.readKeyboard(readBuffer); + readBuffer.flip(); + } + + /** + * Checks to see if a key is down. + * @param key Keycode to check + * @return true if the key is down according to the last poll() + */ + public static boolean isKeyDown(int key) { + synchronized (OpenGLPackageAccess.global_lock) { + if (!created) + throw new IllegalStateException("Keyboard must be created before you can query key state"); + return keyDownBuffer.get(key) != 0; + } + } + + /** + * Checks whether one of the state keys are "active" + * + * @param key State key to test (KEY_CAPITAL | KEY_NUMLOCK | KEY_SYSRQ) + * @return STATE_ON if on, STATE_OFF if off and STATE_UNKNOWN if the state is unknown + */ +/* public static int isStateKeySet(int key) { + if (!created) + throw new IllegalStateException("Keyboard must be created before you can query key state"); + return implementation.isStateKeySet(key); + } +*/ + /** + * Gets a key's name + * @param key The key + * @return a String with the key's human readable name in it or null if the key is unnamed + */ + public static synchronized String getKeyName(int key) { + return keyName[key]; + } + + /** + * Get's a key's index. If the key is unrecognised then KEY_NONE is returned. + * @param keyName The key name + */ + public static synchronized int getKeyIndex(String keyName) { + Integer ret = keyMap.get(keyName); + if (ret == null) + return KEY_NONE; + else + return ret; + } + + /** + * Gets the number of keyboard events waiting after doing a buffer enabled poll(). + * @return the number of keyboard events + */ + public static int getNumKeyboardEvents() { + synchronized (OpenGLPackageAccess.global_lock) { + if (!created) + throw new IllegalStateException("Keyboard must be created before you can read events"); + int old_position = readBuffer.position(); + int num_events = 0; + while (readNext(tmp_event) && (!tmp_event.repeat || repeat_enabled)) + num_events++; + readBuffer.position(old_position); + return num_events; + } + } + + /** + * Gets the next keyboard event. You can query which key caused the event by using + * getEventKey. To get the state of that key, for that event, use + * getEventKeyState - finally use getEventCharacter to get the + * character for that event. + * + * @see org.lwjgl.input.Keyboard#getEventKey() + * @see org.lwjgl.input.Keyboard#getEventKeyState() + * @see org.lwjgl.input.Keyboard#getEventCharacter() + * @return true if a keyboard event was read, false otherwise + */ + public static boolean next() { + synchronized (OpenGLPackageAccess.global_lock) { + if (!created) + throw new IllegalStateException("Keyboard must be created before you can read events"); + + boolean result; + while ((result = readNext(current_event)) && current_event.repeat && !repeat_enabled) + ; + return result; + } + } + + /** + * Controls whether repeat events are reported or not. If repeat events + * are enabled, key down events are reported when a key is pressed and held for + * a OS dependent amount of time. To distinguish a repeat event from a normal event, + * use isRepeatEvent(). + * + * @see org.lwjgl.input.Keyboard#getEventKey() + */ + public static void enableRepeatEvents(boolean enable) { + synchronized (OpenGLPackageAccess.global_lock) { + repeat_enabled = enable; + } + } + + /** + * Check whether repeat events are currently reported or not. + * + * @return true is repeat events are reported, false if not. + * @see org.lwjgl.input.Keyboard#getEventKey() + */ + public static boolean areRepeatEventsEnabled() { + synchronized (OpenGLPackageAccess.global_lock) { + return repeat_enabled; + } + } + + private static boolean readNext(KeyEvent event) { + if (readBuffer.hasRemaining()) { + event.key = readBuffer.getInt() & 0xFF; + event.state = readBuffer.get() != 0; + event.character = readBuffer.getInt(); + event.nanos = readBuffer.getLong(); + event.repeat = readBuffer.get() == 1; + return true; + } else + return false; + } + + /** + * @return Number of keys on this keyboard + */ + public static int getKeyCount() { + return keyCount; + } + + /** + * @return The character from the current event + */ + public static char getEventCharacter() { + synchronized (OpenGLPackageAccess.global_lock) { + return (char)current_event.character; + } + } + + /** + * Please note that the key code returned is NOT valid against the + * current keyboard layout. To get the actual character pressed call + * getEventCharacter + * + * @return The key from the current event + */ + public static int getEventKey() { + synchronized (OpenGLPackageAccess.global_lock) { + return current_event.key; + } + } + + /** + * Gets the state of the key that generated the + * current event + * + * @return True if key was down, or false if released + */ + public static boolean getEventKeyState() { + synchronized (OpenGLPackageAccess.global_lock) { + return current_event.state; + } + } + + /** + * Gets the time in nanoseconds of the current event. + * Only useful for relative comparisons with other + * Keyboard events, as the absolute time has no defined + * origin. + * @return The time in nanoseconds of the current event + */ + public static long getEventNanoseconds() { + synchronized (OpenGLPackageAccess.global_lock) { + return current_event.nanos; + } + } + + /** + * @see org.lwjgl.input.Keyboard#enableRepeatEvents(boolean) + * @return true if the current event is a repeat event, false if + * the current event is not a repeat even or if repeat events are disabled. + */ + public static boolean isRepeatEvent() { + synchronized (OpenGLPackageAccess.global_lock) { + return current_event.repeat; + } + } + + private static final class KeyEvent { + /** The current keyboard character being examined */ + private int character; + + /** The current keyboard event key being examined */ + private int key; + + /** The current state of the key being examined in the event queue */ + private boolean state; + + /** The current event time */ + private long nanos; + + /** Is the current event a repeated event? */ + private boolean repeat; + + private void reset() { + character = 0; + key = 0; + state = false; + repeat = false; + } + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/input/Mouse.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/input/Mouse.java new file mode 100644 index 0000000..b256346 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/input/Mouse.java @@ -0,0 +1,712 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.input; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.util.HashMap; +import java.util.Map; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; +import org.lwjgl.Sys; +import org.lwjgl.opengl.Display; +import org.lwjgl.opengl.InputImplementation; + + +/** + *
+ * A raw Mouse interface. This can be used to poll the current state of the + * mouse buttons, and determine the mouse movement delta since the last poll. + * + * n buttons supported, n being a native limit. A scrolly wheel is also + * supported, if one such is available. Movement is reported as delta from + * last position or as an absolute position. If the window has been created + * the absolute position will be clamped to 0 - width | height. + * + * @author cix_foo + * @author elias_naur + * @author Brian Matzon + * @version $Revision$ + * $Id$ + */ +public class Mouse { + /** Internal use - event size in bytes */ + public static final int EVENT_SIZE = 1 + 1 + 4 + 4 + 4 + 8; + + /** Has the mouse been created? */ + private static boolean created; + + /** The mouse buttons status from the last poll */ + private static ByteBuffer buttons; + + /** Mouse absolute X position in pixels */ + private static int x; + + /** Mouse absolute Y position in pixels */ + private static int y; + + /** Mouse absolute X position in pixels without any clipping */ + private static int absolute_x; + + /** Mouse absolute Y position in pixels without any clipping */ + private static int absolute_y; + + /** Buffer to hold the deltas dx, dy and dwheel */ + private static IntBuffer coord_buffer; + + /** Delta X */ + private static int dx; + + /** Delta Y */ + private static int dy; + + /** Delta Z */ + private static int dwheel; + + /** Number of buttons supported by the mouse */ + private static int buttonCount = -1; + + /** Does this mouse support a scroll wheel */ + private static boolean hasWheel; + + /** The current native cursor, if any */ + private static Cursor currentCursor; + + /** Button names. These are set upon create(), to names like BUTTON0, BUTTON1, etc. */ + private static String[] buttonName; + + /** hashmap of button names, for fast lookup */ + private static final Map buttonMap = new HashMap(16); + + /** Lazy initialization */ + private static boolean initialized; + + /** The mouse button events from the last read */ + private static ByteBuffer readBuffer; + + /** The current mouse event button being examined */ + private static int eventButton; + + /** The current state of the button being examined in the event queue */ + private static boolean eventState; + + /** The current delta of the mouse in the event queue */ + private static int event_dx; + private static int event_dy; + private static int event_dwheel; + /** The current absolute position of the mouse in the event queue */ + private static int event_x; + private static int event_y; + private static long event_nanos; + /** The position of the mouse it was grabbed at */ + private static int grab_x; + private static int grab_y; + /** The last absolute mouse event position (before clipping) for delta computation */ + private static int last_event_raw_x; + private static int last_event_raw_y; + + /** Buffer size in events */ + private static final int BUFFER_SIZE = 50; + + private static boolean isGrabbed; + + private static InputImplementation implementation; + + /** Whether we need cursor animation emulation */ + private static final boolean emulateCursorAnimation = LWJGLUtil.getPlatform() == LWJGLUtil.PLATFORM_WINDOWS || + LWJGLUtil.getPlatform() == LWJGLUtil.PLATFORM_MACOSX; + + private static boolean clipMouseCoordinatesToWindow = !getPrivilegedBoolean("org.lwjgl.input.Mouse.allowNegativeMouseCoords"); + + /** + * Mouse cannot be constructed. + */ + private Mouse() { + } + + /** + * Gets the currently bound native cursor, if any. + * + * @return the currently bound native cursor, if any. + */ + public static Cursor getNativeCursor() { + synchronized (OpenGLPackageAccess.global_lock) { + return currentCursor; + } + } + + /** + * Binds a native cursor. If the cursor argument is null, any + * currently bound native cursor is disabled, and the cursor reverts + * to the default operating system supplied cursor. + * + * NOTE: The native cursor is not constrained to the window, but + * relative events will not be generated if the cursor is outside. + * + * @param cursor the native cursor object to bind. May be null. + * @return The previous Cursor object set, or null. + * @throws LWJGLException if the cursor could not be set for any reason + */ + public static Cursor setNativeCursor(Cursor cursor) throws LWJGLException { + synchronized (OpenGLPackageAccess.global_lock) { + if ((Cursor.getCapabilities() & Cursor.CURSOR_ONE_BIT_TRANSPARENCY) == 0) + throw new IllegalStateException("Mouse doesn't support native cursors"); + Cursor oldCursor = currentCursor; + currentCursor = cursor; + if (isCreated()) { + if (currentCursor != null) { + implementation.setNativeCursor(currentCursor.getHandle()); + currentCursor.setTimeout(); + } else { + implementation.setNativeCursor(null); + } + } + return oldCursor; + } + } + + public static boolean isClipMouseCoordinatesToWindow() { + return clipMouseCoordinatesToWindow; + } + + public static void setClipMouseCoordinatesToWindow(boolean clip) { + clipMouseCoordinatesToWindow = clip; + } + + /** + * Set the position of the cursor. If the cursor is not grabbed, + * the native cursor is moved to the new position. + * + * @param new_x The x coordinate of the new cursor position in OpenGL coordinates relative + * to the window origin. + * @param new_y The y coordinate of the new cursor position in OpenGL coordinates relative + * to the window origin. + */ + public static void setCursorPosition(int new_x, int new_y) { + synchronized (OpenGLPackageAccess.global_lock) { + if (!isCreated()) + throw new IllegalStateException("Mouse is not created"); + x = event_x = new_x; + y = event_y = new_y; + if (!isGrabbed() && (Cursor.getCapabilities() & Cursor.CURSOR_ONE_BIT_TRANSPARENCY) != 0) { + implementation.setCursorPosition(x, y); + } + else { + grab_x = new_x; + grab_y = new_y; + } + } + } + + /** + * Static initialization + */ + private static void initialize() { + Sys.initialize(); + + // Assign names to all the buttons + buttonName = new String[16]; + for (int i = 0; i < 16; i++) { + buttonName[i] = "BUTTON" + i; + buttonMap.put(buttonName[i], i); + } + + initialized = true; + } + + private static void resetMouse() { + dx = dy = dwheel = 0; + readBuffer.position(readBuffer.limit()); + } + + static InputImplementation getImplementation() { + return implementation; + } + + /** + * "Create" the mouse with the given custom implementation. This is used + * reflectively by AWTInputAdapter. + * + * @throws LWJGLException if the mouse could not be created for any reason + */ + private static void create(InputImplementation impl) throws LWJGLException { + if (created) + return; + if (!initialized) + initialize(); + implementation = impl; + implementation.createMouse(); + hasWheel = implementation.hasWheel(); + created = true; + + // set mouse buttons + buttonCount = implementation.getButtonCount(); + buttons = BufferUtils.createByteBuffer(buttonCount); + coord_buffer = BufferUtils.createIntBuffer(3); + if (currentCursor != null && implementation.getNativeCursorCapabilities() != 0) + setNativeCursor(currentCursor); + readBuffer = ByteBuffer.allocate(EVENT_SIZE * BUFFER_SIZE); + readBuffer.limit(0); + setGrabbed(isGrabbed); + } + + /** + * "Create" the mouse. The display must first have been created. + * Initially, the mouse is not grabbed and the delta values are reported + * with respect to the center of the display. + * + * @throws LWJGLException if the mouse could not be created for any reason + */ + public static void create() throws LWJGLException { + synchronized (OpenGLPackageAccess.global_lock) { + if (!Display.isCreated()) throw new IllegalStateException("Display must be created."); + + create(OpenGLPackageAccess.createImplementation()); + } + } + + /** + * @return true if the mouse has been created + */ + public static boolean isCreated() { + synchronized (OpenGLPackageAccess.global_lock) { + return created; + } + } + + /** + * "Destroy" the mouse. + */ + public static void destroy() { + synchronized (OpenGLPackageAccess.global_lock) { + if (!created) return; + created = false; + buttons = null; + coord_buffer = null; + + implementation.destroyMouse(); + } + } + + /** + * Polls the mouse for its current state. Access the polled values using the + * get methods. + * By using this method, it is possible to "miss" mouse click events if you don't + * poll fast enough. + * + * To use buffered values, you have to call next for each event you + * want to read. You can query which button caused the event by using + * getEventButton. To get the state of that button, for that event, use + * getEventButtonState. + * + * NOTE: This method does not query the operating system for new events. To do that, + * Display.processMessages() (or Display.update()) must be called first. + * + * @see org.lwjgl.input.Mouse#next() + * @see org.lwjgl.input.Mouse#getEventButton() + * @see org.lwjgl.input.Mouse#getEventButtonState() + * @see org.lwjgl.input.Mouse#isButtonDown(int button) + * @see org.lwjgl.input.Mouse#getX() + * @see org.lwjgl.input.Mouse#getY() + * @see org.lwjgl.input.Mouse#getDX() + * @see org.lwjgl.input.Mouse#getDY() + * @see org.lwjgl.input.Mouse#getDWheel() + */ + public static void poll() { + synchronized (OpenGLPackageAccess.global_lock) { + if (!created) throw new IllegalStateException("Mouse must be created before you can poll it"); + implementation.pollMouse(coord_buffer, buttons); + + /* If we're grabbed, poll returns mouse deltas, if not it returns absolute coordinates */ + int poll_coord1 = coord_buffer.get(0); + int poll_coord2 = coord_buffer.get(1); + /* The wheel is always relative */ + int poll_dwheel = coord_buffer.get(2); + + if (isGrabbed()) { + dx += poll_coord1; + dy += poll_coord2; + x += poll_coord1; + y += poll_coord2; + absolute_x += poll_coord1; + absolute_y += poll_coord2; + } else { + dx = poll_coord1 - absolute_x; + dy = poll_coord2 - absolute_y; + absolute_x = x = poll_coord1; + absolute_y = y = poll_coord2; + } + + if(clipMouseCoordinatesToWindow) { + x = Math.min(Display.getWidth() - 1, Math.max(0, x)); + y = Math.min(Display.getHeight() - 1, Math.max(0, y)); + } + + dwheel += poll_dwheel; + read(); + } + } + + private static void read() { + readBuffer.compact(); + implementation.readMouse(readBuffer); + readBuffer.flip(); + } + + /** + * See if a particular mouse button is down. + * + * @param button The index of the button you wish to test (0..getButtonCount-1) + * @return true if the specified button is down + */ + public static boolean isButtonDown(int button) { + synchronized (OpenGLPackageAccess.global_lock) { + if (!created) throw new IllegalStateException("Mouse must be created before you can poll the button state"); + if (button >= buttonCount || button < 0) + return false; + else + return buttons.get(button) == 1; + } + } + + /** + * Gets a button's name + * @param button The button + * @return a String with the button's human readable name in it or null if the button is unnamed + */ + public static String getButtonName(int button) { + synchronized (OpenGLPackageAccess.global_lock) { + if (button >= buttonName.length || button < 0) + return null; + else + return buttonName[button]; + } + } + + /** + * Get's a button's index. If the button is unrecognised then -1 is returned. + * @param buttonName The button name + */ + public static int getButtonIndex(String buttonName) { + synchronized (OpenGLPackageAccess.global_lock) { + Integer ret = buttonMap.get(buttonName); + if (ret == null) + return -1; + else + return ret; + } + } + + /** + * Gets the next mouse event. You can query which button caused the event by using + * getEventButton() (if any). To get the state of that key, for that event, use + * getEventButtonState. To get the current mouse delta values use getEventDX() + * and getEventDY(). + * @see org.lwjgl.input.Mouse#getEventButton() + * @see org.lwjgl.input.Mouse#getEventButtonState() + * @return true if a mouse event was read, false otherwise + */ + public static boolean next() { + synchronized (OpenGLPackageAccess.global_lock) { + if (!created) throw new IllegalStateException("Mouse must be created before you can read events"); + if (readBuffer.hasRemaining()) { + eventButton = readBuffer.get(); + eventState = readBuffer.get() != 0; + if (isGrabbed()) { + event_dx = readBuffer.getInt(); + event_dy = readBuffer.getInt(); + event_x += event_dx; + event_y += event_dy; + last_event_raw_x = event_x; + last_event_raw_y = event_y; + } else { + int new_event_x = readBuffer.getInt(); + int new_event_y = readBuffer.getInt(); + event_dx = new_event_x - last_event_raw_x; + event_dy = new_event_y - last_event_raw_y; + event_x = new_event_x; + event_y = new_event_y; + last_event_raw_x = new_event_x; + last_event_raw_y = new_event_y; + } + if(clipMouseCoordinatesToWindow) { + event_x = Math.min(Display.getWidth() - 1, Math.max(0, event_x)); + event_y = Math.min(Display.getHeight() - 1, Math.max(0, event_y)); + } + event_dwheel = readBuffer.getInt(); + event_nanos = readBuffer.getLong(); + return true; + } else + return false; + } + } + + /** + * @return Current events button. Returns -1 if no button state was changed + */ + public static int getEventButton() { + synchronized (OpenGLPackageAccess.global_lock) { + return eventButton; + } + } + + /** + * Get the current events button state. + * @return Current events button state. + */ + public static boolean getEventButtonState() { + synchronized (OpenGLPackageAccess.global_lock) { + return eventState; + } + } + + /** + * @return Current events delta x. + */ + public static int getEventDX() { + synchronized (OpenGLPackageAccess.global_lock) { + return event_dx; + } + } + + /** + * @return Current events delta y. + */ + public static int getEventDY() { + synchronized (OpenGLPackageAccess.global_lock) { + return event_dy; + } + } + + /** + * @return Current events absolute x. + */ + public static int getEventX() { + synchronized (OpenGLPackageAccess.global_lock) { + return event_x; + } + } + + /** + * @return Current events absolute y. + */ + public static int getEventY() { + synchronized (OpenGLPackageAccess.global_lock) { + return event_y; + } + } + + /** + * @return Current events delta z + */ + public static int getEventDWheel() { + synchronized (OpenGLPackageAccess.global_lock) { + return event_dwheel; + } + } + + /** + * Gets the time in nanoseconds of the current event. + * Only useful for relative comparisons with other + * Mouse events, as the absolute time has no defined + * origin. + * + * @return The time in nanoseconds of the current event + */ + public static long getEventNanoseconds() { + synchronized (OpenGLPackageAccess.global_lock) { + return event_nanos; + } + } + + /** + * Retrieves the absolute position. It will be clamped to + * 0...width-1. + * + * @return Absolute x axis position of mouse + */ + public static int getX() { + synchronized (OpenGLPackageAccess.global_lock) { + return x; + } + } + + /** + * Retrieves the absolute position. It will be clamped to + * 0...height-1. + * + * @return Absolute y axis position of mouse + */ + public static int getY() { + synchronized (OpenGLPackageAccess.global_lock) { + return y; + } + } + + /** + * @return Movement on the x axis since last time getDX() was called. + */ + public static int getDX() { + synchronized (OpenGLPackageAccess.global_lock) { + int result = dx; + dx = 0; + return result; + } + } + + /** + * @return Movement on the y axis since last time getDY() was called. + */ + public static int getDY() { + synchronized (OpenGLPackageAccess.global_lock) { + int result = dy; + dy = 0; + return result; + } + } + + /** + * @return Movement of the wheel since last time getDWheel() was called + */ + public static int getDWheel() { + synchronized (OpenGLPackageAccess.global_lock) { + int result = dwheel; + dwheel = 0; + return result; + } + } + + /** + * @return Number of buttons on this mouse + */ + public static int getButtonCount() { + synchronized (OpenGLPackageAccess.global_lock) { + return buttonCount; + } + } + + /** + * @return Whether or not this mouse has wheel support + */ + public static boolean hasWheel() { + synchronized (OpenGLPackageAccess.global_lock) { + return hasWheel; + } + } + + /** + * @return whether or not the mouse has grabbed the cursor + */ + public static boolean isGrabbed() { + synchronized (OpenGLPackageAccess.global_lock) { + return isGrabbed; + } + } + + /** + * Sets whether or not the mouse has grabbed the cursor + * (and thus hidden). If grab is false, the getX() and getY() + * will return delta movement in pixels clamped to the display + * dimensions, from the center of the display. + * + * @param grab whether the mouse should be grabbed + */ + public static void setGrabbed(boolean grab) { + synchronized (OpenGLPackageAccess.global_lock) { + boolean grabbed = isGrabbed; + isGrabbed = grab; + if (isCreated()) { + if (grab && !grabbed) { + // store location mouse was grabbed + grab_x = x; + grab_y = y; + } + else if (!grab && grabbed) { + // move mouse back to location it was grabbed before ungrabbing + if ((Cursor.getCapabilities() & Cursor.CURSOR_ONE_BIT_TRANSPARENCY) != 0) + implementation.setCursorPosition(grab_x, grab_y); + } + + implementation.grabMouse(grab); + // Get latest values from native side + poll(); + event_x = x; + event_y = y; + last_event_raw_x = x; + last_event_raw_y = y; + resetMouse(); + } + } + } + + /** + * Updates the cursor, so that animation can be changed if needed. + * This method is called automatically by the window on its update, and + * shouldn't be called otherwise + */ + public static void updateCursor() { + synchronized (OpenGLPackageAccess.global_lock) { + if (emulateCursorAnimation && currentCursor != null && currentCursor.hasTimedOut() && Mouse.isInsideWindow()) { + currentCursor.nextCursor(); + try { + setNativeCursor(currentCursor); + } catch (LWJGLException e) { + if (LWJGLUtil.DEBUG) e.printStackTrace(); + } + } + } + } + + /** Gets a boolean property as a privileged action. */ + static boolean getPrivilegedBoolean(final String property_name) { + Boolean value = AccessController.doPrivileged(new PrivilegedAction() { + public Boolean run() { + return Boolean.getBoolean(property_name); + } + }); + return value; + } + + /** + * Retrieves whether or not the mouse cursor is within the bounds of the window. + * If the mouse cursor was moved outside the display during a drag, then the result of calling + * this method will be true until the button is released. + * @return true if mouse is inside display, false otherwise. + */ + public static boolean isInsideWindow() { + return implementation.isInsideWindow(); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/input/OpenGLPackageAccess.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/input/OpenGLPackageAccess.java new file mode 100644 index 0000000..9f1b442 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/input/OpenGLPackageAccess.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.input; + +import org.lwjgl.opengl.InputImplementation; +import org.lwjgl.opengl.Display; + +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.security.AccessController; +import java.security.PrivilegedExceptionAction; +import java.security.PrivilegedActionException; + +/** + * This class contains utilities for accessing the org.lwjgl.opengl + * package through (privileged) reflection. + */ +final class OpenGLPackageAccess { + static final Object global_lock; + + static { + try { + global_lock = AccessController.doPrivileged(new PrivilegedExceptionAction() { + public Object run() throws Exception { + Field lock_field = Class.forName("org.lwjgl.opengl.GlobalLock").getDeclaredField("lock"); + lock_field.setAccessible(true); + return lock_field.get(null); + } + }); + } catch (PrivilegedActionException e) { + throw new Error(e); + } + } + + static InputImplementation createImplementation() { + /* Use reflection since we can't make Display.getImplementation + * public + */ + try { + return AccessController.doPrivileged(new PrivilegedExceptionAction() { + public InputImplementation run() throws Exception { + Method getImplementation_method = Display.class.getDeclaredMethod("getImplementation"); + getImplementation_method.setAccessible(true); + return (InputImplementation)getImplementation_method.invoke(null); + } + }); + } catch (PrivilegedActionException e) { + throw new Error(e); + } + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/openal/AL.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/openal/AL.java new file mode 100644 index 0000000..3e997b6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/openal/AL.java @@ -0,0 +1,243 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.openal; + +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; +import org.lwjgl.Sys; + +/** + *

+ * The AL class implements the actual creation code for linking to the native library + * OpenAL. + *

+ * + * @author Brian Matzon + * @version $Revision$ + * $Id$ + */ +public final class AL { + /** ALCdevice instance. */ + static ALCdevice device; + + /** Current ALCcontext. */ + static ALCcontext context; + + /** Have we been created? */ + private static boolean created; + + static { + Sys.initialize(); + } + + private AL() { + } + + /** + * Native method to create AL instance + * + * @param oalPath Path to search for OpenAL library + */ + private static native void nCreate(String oalPath) throws LWJGLException; + + /** + * Native method to create AL instance from the Mac OS X 10.4 OpenAL framework. + * It is only defined in the Mac OS X native library. + */ + private static native void nCreateDefault() throws LWJGLException; + + /** + * Native method the destroy the AL + */ + private static native void nDestroy(); + + /** + * @return true if AL has been created + */ + public static boolean isCreated() { + return created; + } + + /** + * Creates an OpenAL instance. Using this constructor will cause OpenAL to + * open the device using supplied device argument, and create a context using the context values + * supplied. + * + * @param deviceArguments Arguments supplied to native device + * @param contextFrequency Frequency for mixing output buffer, in units of Hz (Common values include 11025, 22050, and 44100). + * @param contextRefresh Refresh intervalls, in units of Hz. + * @param contextSynchronized Flag, indicating a synchronous context.* + */ + public static void create(String deviceArguments, int contextFrequency, int contextRefresh, boolean contextSynchronized) + throws LWJGLException { + create(deviceArguments, contextFrequency, contextRefresh, contextSynchronized, true); + } + + /** + * @param openDevice Whether to automatically open the device + * @see #create(String, int, int, boolean) + */ + public static void create(String deviceArguments, int contextFrequency, int contextRefresh, boolean contextSynchronized, boolean openDevice) + throws LWJGLException { + + if (created) + throw new IllegalStateException("Only one OpenAL context may be instantiated at any one time."); + String libname; + String[] library_names; + switch (LWJGLUtil.getPlatform()) { + case LWJGLUtil.PLATFORM_WINDOWS: + libname = "OpenAL32"; + library_names = new String[]{"OpenAL64.dll", "OpenAL32.dll"}; + break; + case LWJGLUtil.PLATFORM_LINUX: + libname = "openal"; + library_names = new String[]{"libopenal64.so", "libopenal.so", "libopenal.so.0"}; + break; + case LWJGLUtil.PLATFORM_MACOSX: + libname = "openal"; + library_names = new String[]{"openal.dylib"}; + break; + default: + throw new LWJGLException("Unknown platform: " + LWJGLUtil.getPlatform()); + } + String[] oalPaths = LWJGLUtil.getLibraryPaths(libname, library_names, AL.class.getClassLoader()); + LWJGLUtil.log("Found " + oalPaths.length + " OpenAL paths"); + for ( String oalPath : oalPaths ) { + try { + nCreate(oalPath); + created = true; + init(deviceArguments, contextFrequency, contextRefresh, contextSynchronized, openDevice); + break; + } catch (LWJGLException e) { + LWJGLUtil.log("Failed to load " + oalPath + ": " + e.getMessage()); + } + } + if (!created && LWJGLUtil.getPlatform() == LWJGLUtil.PLATFORM_MACOSX) { + // Try to load OpenAL from the framework instead + nCreateDefault(); + created = true; + init(deviceArguments, contextFrequency, contextRefresh, contextSynchronized, openDevice); + } + if (!created) + throw new LWJGLException("Could not locate OpenAL library."); + } + + private static void init(String deviceArguments, int contextFrequency, int contextRefresh, boolean contextSynchronized, boolean openDevice) throws LWJGLException { + try { + AL10.initNativeStubs(); + ALC10.initNativeStubs(); + + if(openDevice) { + device = ALC10.alcOpenDevice(deviceArguments); + if (device == null) { + throw new LWJGLException("Could not open ALC device"); + } + + if (contextFrequency == -1) { + context = ALC10.alcCreateContext(device, null); + } else { + context = ALC10.alcCreateContext(device, + ALCcontext.createAttributeList(contextFrequency, contextRefresh, + contextSynchronized ? ALC10.ALC_TRUE : ALC10.ALC_FALSE)); + } + ALC10.alcMakeContextCurrent(context); + } + } catch (LWJGLException e) { + destroy(); + throw e; + } + + ALC11.initialize(); + + // Load EFX10 native stubs if ALC_EXT_EFX is supported. + // Is there any situation where the current device supports ALC_EXT_EFX and one + // later created by the user does not? + // Do we have to call resetNativeStubs(EFX10.class); somewhere? Not done for AL11 + // either. + // This can either be here or in ALC11, since ALC_EXT_EFX indirectly requires AL 1.1 + // for functions like alSource3i. + if (ALC10.alcIsExtensionPresent(device, EFX10.ALC_EXT_EFX_NAME)){ + EFX10.initNativeStubs(); + } + } + + /** + * Creates an OpenAL instance. The empty create will cause OpenAL to + * open the default device, and create a context using default values. + * This method used to use default values that the OpenAL implementation + * chose but this produces unexpected results on some systems; so now + * it defaults to 44100Hz mixing @ 60Hz refresh. + */ + public static void create() throws LWJGLException { + create(null, 44100, 60, false); + } + + /** + * Exit cleanly by calling destroy. + */ + public static void destroy() { + if (context != null) { + ALC10.alcMakeContextCurrent(null); + ALC10.alcDestroyContext(context); + context = null; + } + if (device != null) { + boolean result = ALC10.alcCloseDevice(device); + device = null; + } + resetNativeStubs(AL10.class); + resetNativeStubs(AL11.class); + resetNativeStubs(ALC10.class); + resetNativeStubs(ALC11.class); + resetNativeStubs(EFX10.class); + + if (created) + nDestroy(); + created = false; + } + + private static native void resetNativeStubs(Class clazz); + + /** + * @return handle to the default AL context. + */ + public static ALCcontext getContext() { + return context; + } + + /** + * @return handle to the default AL device. + */ + public static ALCdevice getDevice() { + return device; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/openal/ALC10.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/openal/ALC10.java new file mode 100644 index 0000000..bd6f5dd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/openal/ALC10.java @@ -0,0 +1,439 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.openal; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; +import java.util.HashMap; + +import org.lwjgl.BufferChecks; +import org.lwjgl.LWJGLException; +import org.lwjgl.MemoryUtil; + +/** + * + *

+ * ALC introduces the notion of a Device. A Device can be, depending on the + * implementation, a hardware device, or a daemon/OS service/actual server. This + * mechanism also permits different drivers (and hardware) to coexist within the same + * system, as well as allowing several applications to share system resources for audio, + * including a single hardware output device. The details are left to the + * implementation, which has to map the available backends to unique device + * specifiers (represented as strings). + *

+ * + * @author Brian Matzon + * @version $Revision: 2286 $ + * $Id: ALC.java 2286 2006-03-23 19:32:21 +0000 (to, 23 mar 2006) matzon $ + */ +public final class ALC10 { + + /** List of active contexts */ + static final HashMap contexts = new HashMap(); + + /** List of active devices */ + static final HashMap devices = new HashMap(); + + /** Bad value */ + public static final int ALC_INVALID = 0; + + /** Boolean False */ + public static final int ALC_FALSE = 0; + + /** Boolean True */ + public static final int ALC_TRUE = 1; + + /** Errors: No Error */ + public static final int ALC_NO_ERROR = ALC_FALSE; + + /** Major version query. */ + public static final int ALC_MAJOR_VERSION = 0x1000; + + /** Minor version query. */ + public static final int ALC_MINOR_VERSION = 0x1001; + + /** + * The size required for the zero-terminated attributes list, for the current context. + **/ + public static final int ALC_ATTRIBUTES_SIZE = 0x1002; + + /** + * Expects a destination of ALC_CURRENT_ATTRIBUTES_SIZE, + * and provides the attribute list for the current context of the specified device. + */ + public static final int ALC_ALL_ATTRIBUTES = 0x1003; + + /** The specifier string for the default device */ + public static final int ALC_DEFAULT_DEVICE_SPECIFIER = 0x1004; + + /** The specifier string for the device */ + public static final int ALC_DEVICE_SPECIFIER = 0x1005; + + /** The extensions string for diagnostics and printing */ + public static final int ALC_EXTENSIONS = 0x1006; + + /** Frequency for mixing output buffer, in units of Hz. */ + public static final int ALC_FREQUENCY = 0x1007; + + /** Refresh intervalls, in units of Hz. */ + public static final int ALC_REFRESH = 0x1008; + + /** Flag, indicating a synchronous context. */ + public static final int ALC_SYNC = 0x1009; + + /** The device argument does not name a valid device */ + public static final int ALC_INVALID_DEVICE = 0xA001; + + /** The context argument does not name a valid context */ + public static final int ALC_INVALID_CONTEXT = 0xA002; + + /** + * A function was called at inappropriate time, or in an inappropriate way, + * causing an illegal state. This can be an incompatible ALenum, object ID, + * and/or function. + */ + public static final int ALC_INVALID_ENUM = 0xA003; + + /** + * Illegal value passed as an argument to an AL call. + * Applies to parameter values, but not to enumerations. + */ + public static final int ALC_INVALID_VALUE = 0xA004; + + /** + * A function could not be completed, because there is not enough + * memory available. + */ + public static final int ALC_OUT_OF_MEMORY = 0xA005; + + static native void initNativeStubs() throws LWJGLException; + + /** + * The application can obtain certain strings from ALC. + * + * ALC_DEFAULT_DEVICE_SPECIFIER - The specifer string for the default device + * ALC_DEVICE_SPECIFIER - The specifer string for the device + * ALC_EXTENSIONS - The extensions string for diagnostics and printing. + * + * In addition, printable error message strings are provided for all valid error tokens, + * including ALC_NO_ERROR,ALC_INVALID_DEVICE, ALC_INVALID_CONTEXT, + * ALC_INVALID_ENUM, ALC_INVALID_VALUE. + * + * @param pname Property to get + * @return String property from device + */ + public static String alcGetString(ALCdevice device, int pname) { + ByteBuffer buffer = nalcGetString(getDevice(device), pname); + Util.checkALCError(device); + return MemoryUtil.decodeUTF8(buffer); + } + static native ByteBuffer nalcGetString(long device, int pname); + + /** + * The application can query ALC for information using an integer query function. + * For some tokens, null is a legal deviceHandle. In other cases, specifying a null + * device will generate an ALC_INVALID_DEVICE error. The application has to + * specify the size of the destination buffer provided. A null destination or a zero + * size parameter will cause ALC to ignore the query. + * + * ALC_MAJOR_VERSION - Major version query. + * ALC_MINOR_VERSION - Minor version query. + * ALC_ATTRIBUTES_SIZE - The size required for the zero-terminated attributes list, + * for the current context. null is an invalid device. null (no current context + * for the specified device) is legal. + * ALC_ALL_ATTRIBUTES - Expects a destination of ALC_CURRENT_ATTRIBUTES_SIZE, + * and provides the attribute list for the current context of the specified device. + * null is an invalid device. null (no current context for the specified device) + * will return the default attributes defined by the specified device. + * + * @param pname Property to get + * @param integerdata ByteBuffer to write integers to + */ + public static void alcGetInteger(ALCdevice device, int pname, IntBuffer integerdata) { + BufferChecks.checkDirect(integerdata); + nalcGetIntegerv(getDevice(device), pname, integerdata.remaining(), MemoryUtil.getAddress(integerdata)); + Util.checkALCError(device); + } + static native void nalcGetIntegerv(long device, int pname, int size, long integerdata); + + /** + * The alcOpenDevice function allows the application (i.e. the client program) to + * connect to a device (i.e. the server). + * + * If the function returns null, then no sound driver/device has been found. The + * argument is a null terminated string that requests a certain device or device + * configuration. If null is specified, the implementation will provide an + * implementation specific default. + * + * @param devicename name of device to open + * @return opened device, or null + */ + public static ALCdevice alcOpenDevice(String devicename) { + ByteBuffer buffer = MemoryUtil.encodeUTF8(devicename); + long device_address = nalcOpenDevice(MemoryUtil.getAddressSafe(buffer)); + if(device_address != 0) { + ALCdevice device = new ALCdevice(device_address); + synchronized (ALC10.devices) { + devices.put(device_address, device); + } + return device; + } + return null; + } + static native long nalcOpenDevice(long devicename); + + /** + * The alcCloseDevice function allows the application (i.e. the client program) to + * disconnect from a device (i.e. the server). + * + * If deviceHandle is null or invalid, an ALC_INVALID_DEVICE error will be + * generated. Once closed, a deviceHandle is invalid. + * + * @param device address of native device to close + */ + public static boolean alcCloseDevice(ALCdevice device) { + boolean result = nalcCloseDevice(getDevice(device)); + synchronized (devices) { + device.setInvalid(); + devices.remove(new Long(device.device)); + } + return result; + + } + static native boolean nalcCloseDevice(long device); + + /** + * A context is created using alcCreateContext. The device parameter has to be a valid + * device. The attribute list can be null, or a zero terminated list of integer pairs + * composed of valid ALC attribute tokens and requested values. + * + * Context creation will fail if the application requests attributes that, by themselves, + * can not be provided. Context creation will fail if the combination of specified + * attributes can not be provided. Context creation will fail if a specified attribute, or + * the combination of attributes, does not match the default values for unspecified + * attributes. + * + * @param device address of device to associate context to + * @param attrList Buffer to read attributes from + * @return New context, or null if creation failed + */ + public static ALCcontext alcCreateContext(ALCdevice device, IntBuffer attrList) { + long context_address = nalcCreateContext(getDevice(device), MemoryUtil.getAddressSafe(attrList)); + Util.checkALCError(device); + + if(context_address != 0) { + ALCcontext context = new ALCcontext(context_address); + synchronized (ALC10.contexts) { + contexts.put(context_address, context); + device.addContext(context); + } + return context; + } + return null; + } + static native long nalcCreateContext(long device, long attrList); + + /** + * To make a Context current with respect to AL Operation (state changes by issueing + * commands), alcMakeContextCurrent is used. The context parameter can be null + * or a valid context pointer. The operation will apply to the device that the context + * was created for. + * + * For each OS process (usually this means for each application), only one context can + * be current at any given time. All AL commands apply to the current context. + * Commands that affect objects shared among contexts (e.g. buffers) have side effects + * on other contexts. + * + * @param context address of context to make current + * @return true if successfull, false if not + */ + public static int alcMakeContextCurrent(ALCcontext context) { + return nalcMakeContextCurrent(getContext(context)); + } + static native int nalcMakeContextCurrent(long context); + + /** + * The current context is the only context accessible to state changes by AL commands + * (aside from state changes affecting shared objects). However, multiple contexts can + * be processed at the same time. To indicate that a context should be processed (i.e. + * that internal execution state like offset increments are supposed to be performed), + * the application has to use alcProcessContext. + * + * Repeated calls to alcProcessContext are legal, and do not affect a context that is + * already marked as processing. The default state of a context created by + * alcCreateContext is that it is not marked as processing. + */ + public static void alcProcessContext(ALCcontext context) { + nalcProcessContext(getContext(context)); + } + static native void nalcProcessContext(long context); + + /** + * The application can query for, and obtain an handle to, the current context for the + * application. If there is no current context, null is returned. + * + * @return Current ALCcontext + */ + public static ALCcontext alcGetCurrentContext() { + ALCcontext context = null; + long context_address = nalcGetCurrentContext(); + if(context_address != 0) { + synchronized (ALC10.contexts) { + context = ALC10.contexts.get(context_address); + } + } + return context; + } + static native long nalcGetCurrentContext(); + + /** + * The application can query for, and obtain an handle to, the device of a given context. + * + * @param context address of context to get device for + */ + public static ALCdevice alcGetContextsDevice(ALCcontext context) { + ALCdevice device = null; + long device_address = nalcGetContextsDevice(getContext(context)); + if (device_address != 0) { + synchronized (ALC10.devices) { + device = ALC10.devices.get(device_address); + } + } + return device; + } + static native long nalcGetContextsDevice(long context); + + /** + * The application can suspend any context from processing (including the current + * one). To indicate that a context should be suspended from processing (i.e. that + * internal execution state like offset increments is not supposed to be changed), the + * application has to use alcSuspendContext. + * + * Repeated calls to alcSuspendContext are legal, and do not affect a context that is + * already marked as suspended. The default state of a context created by + * alcCreateContext is that it is marked as suspended. + * + * @param context address of context to suspend + */ + public static void alcSuspendContext(ALCcontext context) { + nalcSuspendContext(getContext(context)); + } + static native void nalcSuspendContext(long context); + + /** + * The correct way to destroy a context is to first release it using alcMakeCurrent and + * null. Applications should not attempt to destroy a current context. + * + * @param context address of context to Destroy + */ + public static void alcDestroyContext(ALCcontext context) { + synchronized(ALC10.contexts) { + ALCdevice device = alcGetContextsDevice(context); + nalcDestroyContext(getContext(context)); + device.removeContext(context); + context.setInvalid(); + } + } + static native void nalcDestroyContext(long context); + + /** + * ALC uses the same conventions and mechanisms as AL for error handling. In + * particular, ALC does not use conventions derived from X11 (GLX) or Windows + * (WGL). The alcGetError function can be used to query ALC errors. + * + * Error conditions are specific to the device. + * + * ALC_NO_ERROR - The device handle or specifier does name an accessible driver/server. + * ALC_INVALID_DEVICE - The Context argument does not name a valid context. + * ALC_INVALID_CONTEXT - The Context argument does not name a valid context. + * ALC_INVALID_ENUM - A token used is not valid, or not applicable. + * ALC_INVALID_VALUE - An value (e.g. attribute) is not valid, or not applicable. + * + * @return Errorcode from ALC statemachine + */ + public static int alcGetError(ALCdevice device) { + return nalcGetError(getDevice(device)); + } + static native int nalcGetError(long device); + + /** + * Verify that a given extension is available for the current context and the device it + * is associated with. + * A null name argument returns ALC_FALSE, as do invalid and unsupported string + * tokens. + * + * @param extName name of extension to find + * @return true if extension is available, false if not + */ + public static boolean alcIsExtensionPresent(ALCdevice device, String extName) { + ByteBuffer buffer = MemoryUtil.encodeASCII(extName); + boolean result = nalcIsExtensionPresent(getDevice(device), MemoryUtil.getAddress(buffer)); + Util.checkALCError(device); + return result; + } + private static native boolean nalcIsExtensionPresent(long device, long extName); + + /** + * Enumeration/token values are device independend, but tokens defined for + * extensions might not be present for a given device. But only the tokens defined + * by the AL core are guaranteed. Availability of extension tokens dependends on the ALC extension. + * + * Specifying a null name parameter will cause an ALC_INVALID_VALUE error. + * + * @param enumName name of enum to find + * @return value of enumeration + */ + public static int alcGetEnumValue(ALCdevice device, String enumName) { + ByteBuffer buffer = MemoryUtil.encodeASCII(enumName); + int result = nalcGetEnumValue(getDevice(device), MemoryUtil.getAddress(buffer)); + Util.checkALCError(device); + return result; + } + private static native int nalcGetEnumValue(long device, long enumName); + + static long getDevice(ALCdevice device) { + if(device != null) { + Util.checkALCValidDevice(device); + return device.device; + } + return 0L; + } + + static long getContext(ALCcontext context) { + if(context != null) { + Util.checkALCValidContext(context); + return context.context; + } + return 0L; + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/openal/ALC11.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/openal/ALC11.java new file mode 100644 index 0000000..ae849a9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/openal/ALC11.java @@ -0,0 +1,201 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.openal; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; +import org.lwjgl.MemoryUtil; + +/** + *

+ * The ALC11 class implements features in OpenAL 1.1, specifically + * ALC methods and properties. + *

+ * + * @author Brian Matzon + * @see ALC10 + * @version $Revision: 2286 $ + * $Id: ALC.java 2286 2006-03-23 19:32:21 +0000 (to, 23 mar 2006) matzon $ + */ +public final class ALC11 { + + public static final int ALC_DEFAULT_ALL_DEVICES_SPECIFIER = 0x1012; + public static final int ALC_ALL_DEVICES_SPECIFIER = 0x1013; + + public static final int ALC_CAPTURE_DEVICE_SPECIFIER = 0x310; + public static final int ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER = 0x311; + public static final int ALC_CAPTURE_SAMPLES = 0x312; + + public static final int ALC_MONO_SOURCES = 0x1010; + public static final int ALC_STEREO_SOURCES = 0x1011; + + /** + * The alcCaptureOpenDevice function allows the application to connect to a capture + * device. To obtain a list of all available capture devices, use getCaptureDevices a list of all + * capture devices will be returned. Retrieving ALC_CAPTURE_DEVICE_SPECIFIER with a valid capture device specified will result + * in the name of that device being returned as a single string. + * + * If the function returns null, then no sound driver/device has been found, or the + * requested format could not be fulfilled. + * The "deviceName" argument is a string that requests a certain device or + * device configuration. If null is specified, the implementation will provide an + * implementation specific default. The "frequency" and "format" arguments specify the format that + * audio data will be presented to the application, and match the values that can be passed to + * alBufferData. The implementation is expected to convert and resample to this format on + * behalf of the application. The "buffersize" argument specifies the number of sample frames + * to buffer in the AL, for example, requesting a format of AL_FORMAT_STEREO16 and + * a buffer size of 1024 would require the AL to store up to 1024 * 4 bytes of audio data. + * Note that the implementation may use a larger buffer than requested if it needs to, but the + * implementation will set up a buffer of at least the requested size. + * Specifying a compressed or extension-supplied format may result in failure, even if the + * extension is supplied for rendering. + * + * LWJGL SPECIFIC: the actual created device is managed internally in lwjgl + * + * @param devicename Name of device to open for capture + * @param frequency Frequency of samples to capture + * @param format Format of samples to capture + * @param buffersize Size of buffer to capture to + * @return ALCdevice if it was possible to open a device + */ + public static ALCdevice alcCaptureOpenDevice(String devicename, int frequency, int format, int buffersize) { + ByteBuffer buffer = MemoryUtil.encodeASCII(devicename); + long device_address = nalcCaptureOpenDevice(MemoryUtil.getAddressSafe(buffer), frequency, format, buffersize); + if(device_address != 0) { + ALCdevice device = new ALCdevice(device_address); + synchronized (ALC10.devices) { + ALC10.devices.put(device_address, device); + } + return device; + } + return null; + } + private static native long nalcCaptureOpenDevice(long devicename, int frequency, int format, int buffersize); + + /** + * The alcCaptureCloseDevice function allows the application to disconnect from a capture + * device. + * + * The return code will be true or false, indicating success or failure. If + * the device is null or invalid, an ALC_INVALID_DEVICE error will be generated. + * Once closed, a capture device is invalid. + * @return true if device was successfully closed + */ + public static boolean alcCaptureCloseDevice(ALCdevice device) { + boolean result = nalcCaptureCloseDevice(ALC10.getDevice(device)); + synchronized (ALC10.devices) { + device.setInvalid(); + ALC10.devices.remove(new Long(device.device)); + } + return result; + } + static native boolean nalcCaptureCloseDevice(long device); + + /** + * Once a capture device has been opened via alcCaptureOpenDevice, it is made to start + * recording audio via the alcCaptureStart entry point: + * + * Once started, the device will record audio to an internal ring buffer, the size of which was + * specified when opening the device. + * The application may query the capture device to discover how much data is currently + * available via the alcGetInteger with the ALC_CAPTURE_SAMPLES token. This will + * report the number of sample frames currently available. + */ + public static void alcCaptureStart(ALCdevice device) { + nalcCaptureStart(ALC10.getDevice(device)); + } + static native void nalcCaptureStart(long device); + + /** + * If the application doesn't need to capture more audio for an amount of time, they can halt + * the device without closing it via the alcCaptureStop entry point. + * The implementation is encouraged to optimize for this case. The amount of audio + * samples available after restarting a stopped capture device is reset to zero. The + * application does not need to stop the capture device to read from it. + */ + public static void alcCaptureStop(ALCdevice device) { + nalcCaptureStop(ALC10.getDevice(device)); + } + static native void nalcCaptureStop(long device); + + /** + * When the application feels there are enough samples available to process, it can obtain + * them from the AL via the alcCaptureSamples entry point. + * + * The "buffer" argument specifies an application-allocated buffer that can contain at least + * "samples" sample frames. The implementation may defer conversion and resampling until + * this point. Requesting more sample frames than are currently available is an error. + * + * @param buffer Buffer to store samples in + * @param samples Number of samples to request + */ + public static void alcCaptureSamples(ALCdevice device, ByteBuffer buffer, int samples ) { + nalcCaptureSamples(ALC10.getDevice(device), MemoryUtil.getAddress(buffer), samples); + } + static native void nalcCaptureSamples(long device, long buffer, int samples ); + + static native void initNativeStubs() throws LWJGLException; + + /** + * Initializes ALC11, including any extensions + * @return true if initialization was successfull + */ + static boolean initialize() { + try { + IntBuffer ib = BufferUtils.createIntBuffer(2); + ALC10.alcGetInteger(AL.getDevice(), ALC10.ALC_MAJOR_VERSION, ib); + ib.position(1); + ALC10.alcGetInteger(AL.getDevice(), ALC10.ALC_MINOR_VERSION, ib); + + int major = ib.get(0); + int minor = ib.get(1); + + // checking for version 1.x+ + if(major >= 1) { + + // checking for version 1.1+ + if(major > 1 || minor >= 1) { + ALC11.initNativeStubs(); + AL11.initNativeStubs(); + } + } + } catch (LWJGLException le) { + LWJGLUtil.log("failed to initialize ALC11: " + le); + return false; + } + return true; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/openal/ALCcontext.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/openal/ALCcontext.java new file mode 100644 index 0000000..2122b5b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/openal/ALCcontext.java @@ -0,0 +1,115 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.openal; + +import java.nio.IntBuffer; + +import org.lwjgl.BufferUtils; + +/** + * The ALCcontext class represents a context opened in OpenAL space. + * + * All operations of the AL core API affect a current AL context. Within the scope of AL, + * the ALC is implied - it is not visible as a handle or function parameter. Only one AL + * Context per process can be current at a time. Applications maintaining multiple AL + * Contexts, whether threaded or not, have to set the current context accordingly. + * Applications can have multiple threads that share one more or contexts. In other words, + * AL and ALC are threadsafe. + * + * @author Brian Matzon + * @version $Revision$ + * $Id$ + */ +public final class ALCcontext { + + /** Address of actual context */ + final long context; + + /** Whether this context is valid */ + private boolean valid; + + /** + * Creates a new instance of ALCcontext + * + * @param context address of actual context + */ + ALCcontext(long context) { + this.context = context; + this.valid = true; + } + + /* + * @see java.lang.Object#equals(java.lang.Object) + */ + public boolean equals(Object context) { + if(context instanceof ALCcontext) { + return ((ALCcontext)context).context == this.context; + } + return super.equals(context); + } + + /** + * Creates an attribute list in a ByteBuffer + * @param contextFrequency Frequency to add + * @param contextRefresh Refresh rate to add + * @param contextSynchronized Whether to synchronize the context + * @return + */ + static IntBuffer createAttributeList(int contextFrequency, int contextRefresh, int contextSynchronized) { + IntBuffer attribList = BufferUtils.createIntBuffer(7); + + attribList.put(ALC10.ALC_FREQUENCY); + attribList.put(contextFrequency); + attribList.put(ALC10.ALC_REFRESH); + attribList.put(contextRefresh); + attribList.put(ALC10.ALC_SYNC); + attribList.put(contextSynchronized); + attribList.put(0); //terminating int + + return attribList; + } + + /** + * Marks this context as invalid + * + */ + void setInvalid() { + valid = false; + } + + /** + * @return true if this context is still valid + */ + public boolean isValid() { + return valid; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/openal/ALCdevice.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/openal/ALCdevice.java new file mode 100644 index 0000000..1c3c1c7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/openal/ALCdevice.java @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.openal; + +import java.util.HashMap; +import java.util.Iterator; + +/** + * The ALCdevice class represents a device opened in OpenAL space. + * + * ALC introduces the notion of a Device. A Device can be, depending on the + * implementation, a hardware device, or a daemon/OS service/actual server. This + * mechanism also permits different drivers (and hardware) to coexist within the same + * system, as well as allowing several applications to share system resources for audio, + * including a single hardware output device. The details are left to the implementation, + * which has to map the available backends to unique device specifiers. + * + * @author Brian Matzon + * @version $Revision$ + * $Id$ + */ +public final class ALCdevice { + + /** Address of actual device */ + final long device; + + /** Whether this device is valid */ + private boolean valid; + + /** List of contexts belonging to the device */ + private final HashMap contexts = new HashMap(); + + /** + * Creates a new instance of ALCdevice + * + * @param device address of actual device + */ + ALCdevice(long device) { + this.device = device; + this.valid = true; + } + + /* + * @see java.lang.Object#equals(java.lang.Object) + */ + public boolean equals(Object device) { + if(device instanceof ALCdevice) { + return ((ALCdevice)device).device == this.device; + } + return super.equals(device); + } + + /** + * Adds a context to the device + * + * @param context context to add to the list of contexts for this device + */ + void addContext(ALCcontext context) { + synchronized (contexts) { + contexts.put(context.context, context); + } + } + + /** + * Remove context associated with device + * + * @param context Context to disassociate with device + */ + void removeContext(ALCcontext context) { + synchronized (contexts) { + contexts.remove(context.context); + } + } + + /** + * Marks this device and all of its contexts invalid + */ + void setInvalid() { + valid = false; + synchronized (contexts) { + for ( ALCcontext context : contexts.values() ) + context.setInvalid(); + } + contexts.clear(); + } + + /** + * @return true if this device is still valid + */ + public boolean isValid() { + return valid; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/openal/EFXUtil.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/openal/EFXUtil.java new file mode 100644 index 0000000..bf1c23b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/openal/EFXUtil.java @@ -0,0 +1,228 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.openal; + +import static org.lwjgl.openal.AL10.*; +import static org.lwjgl.openal.EFX10.*; + +/** + * Utility class for the OpenAL extension ALC_EXT_EFX. Provides functions to check for the extension + * and support of various effects and filters. + *

+ * Currently supports ALC_EXT_EFX version 1.0 effects and filters. + * + * @author Ciardhubh + * @version $Revision$ + * $Id$ + */ +public final class EFXUtil { + + /** Constant for testSupportGeneric to check an effect. */ + private static final int EFFECT = 1111; + /** Constant for testSupportGeneric to check a filter. */ + private static final int FILTER = 2222; + + /** Utility class, hidden contructor. */ + private EFXUtil() { + } + + /** + * Checks if OpenAL implementation is loaded and supports ALC_EXT_EFX. + * + * @return True if ALC_EXT_EFX is supported, false if not. + * @throws OpenALException If OpenAL has not been created yet. + */ + public static boolean isEfxSupported() { + if (!AL.isCreated()) { + throw new OpenALException("OpenAL has not been created."); + } + return ALC10.alcIsExtensionPresent(AL.getDevice(), ALC_EXT_EFX_NAME); + } + + /** + * Tests OpenAL to see whether the given effect type is supported. This is done by creating an + * effect of the given type. If creation succeeds the effect is supported. + * + * @param effectType Type of effect whose support is to be tested, e.g. AL_EFFECT_REVERB. + * @return True if it is supported, false if not. + * @throws OpenALException If the request fails due to an AL_OUT_OF_MEMORY error or OpenAL has + * not been created yet. + * @throws IllegalArgumentException effectType is not a valid effect type. + */ + public static boolean isEffectSupported(final int effectType) { + // Make sure type is a real effect. + switch (effectType) { + case AL_EFFECT_NULL: + case AL_EFFECT_EAXREVERB: + case AL_EFFECT_REVERB: + case AL_EFFECT_CHORUS: + case AL_EFFECT_DISTORTION: + case AL_EFFECT_ECHO: + case AL_EFFECT_FLANGER: + case AL_EFFECT_FREQUENCY_SHIFTER: + case AL_EFFECT_VOCAL_MORPHER: + case AL_EFFECT_PITCH_SHIFTER: + case AL_EFFECT_RING_MODULATOR: + case AL_EFFECT_AUTOWAH: + case AL_EFFECT_COMPRESSOR: + case AL_EFFECT_EQUALIZER: + break; + default: + throw new IllegalArgumentException("Unknown or invalid effect type: " + effectType); + } + + return testSupportGeneric(EFFECT, effectType); + } + + /** + * Tests OpenAL to see whether the given filter type is supported. This is done by creating a + * filter of the given type. If creation succeeds the filter is supported. + * + * @param filterType Type of filter whose support is to be tested, e.g. AL_FILTER_LOWPASS. + * @return True if it is supported, false if not. + * @throws OpenALException If the request fails due to an AL_OUT_OF_MEMORY error or OpenAL has + * not been created yet. + * @throws IllegalArgumentException filterType is not a valid filter type. + */ + public static boolean isFilterSupported(final int filterType) { + // Make sure type is a real filter. + switch (filterType) { + case AL_FILTER_NULL: + case AL_FILTER_LOWPASS: + case AL_FILTER_HIGHPASS: + case AL_FILTER_BANDPASS: + break; + default: + throw new IllegalArgumentException("Unknown or invalid filter type: " + filterType); + } + + return testSupportGeneric(FILTER, filterType); + } + + /** + * Generic test function to see if an EFX object supports a given kind of type. Works for + * effects and filters. + * + * @param objectType Type of object to test. Must be either EFXUtil.EFFECT or EFXUtil.FILTER. + * @param typeValue OpenAL type the object should be tested for support, e.g. AL_FILTER_LOWPASS + * or AL_EFFECT_REVERB. + * @return True if object supports typeValue, false else. + */ + private static boolean testSupportGeneric(final int objectType, final int typeValue) { + // Check for supported objectType. + switch (objectType) { + case EFFECT: + case FILTER: + break; + default: + throw new IllegalArgumentException("Invalid objectType: " + objectType); + } + + boolean supported = false; + if (isEfxSupported()) { + + // Try to create object in order to check AL's response. + alGetError(); + int genError; + int testObject = 0; + try { + switch (objectType) { // Create object based on type + case EFFECT: + testObject = alGenEffects(); + break; + case FILTER: + testObject = alGenFilters(); + break; + default: + throw new IllegalArgumentException("Invalid objectType: " + objectType); + } + genError = alGetError(); + } catch (final OpenALException debugBuildException) { + // Hack because OpenALException hides the original error code (short of parsing the + // error message String which would break if it gets changed). + if (debugBuildException.getMessage().contains("AL_OUT_OF_MEMORY")) { + genError = AL_OUT_OF_MEMORY; + } else { + genError = AL_INVALID_OPERATION; + } + } + + if (genError == AL_NO_ERROR) { + // Successfully created, now try to set type. + alGetError(); + int setError; + try { + switch (objectType) { // Set based on object type + case EFFECT: + alEffecti(testObject, AL_EFFECT_TYPE, typeValue); + break; + case FILTER: + alFilteri(testObject, AL_FILTER_TYPE, typeValue); + break; + default: + throw new IllegalArgumentException("Invalid objectType: " + objectType); + } + setError = alGetError(); + } catch (final OpenALException debugBuildException) { + // Hack because OpenALException hides the original error code (short of parsing + // the error message String which would break when it gets changed). + setError = AL_INVALID_VALUE; + } + + if (setError == AL_NO_ERROR) { + supported = true; + } + + // Cleanup + try { + switch (objectType) { // Set based on object type + case EFFECT: + alDeleteEffects(testObject); + break; + case FILTER: + alDeleteFilters(testObject); + break; + default: + throw new IllegalArgumentException("Invalid objectType: " + objectType); + } + } catch (final OpenALException debugBuildException) { + // Don't care about cleanup errors. + } + + } else if (genError == AL_OUT_OF_MEMORY) { + throw new OpenALException(genError); + } + } + + return supported; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/openal/OpenALException.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/openal/OpenALException.java new file mode 100644 index 0000000..504fc62 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/openal/OpenALException.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.openal; + +/** + *
+ * Thrown by the debug build library of the LWJGL if any OpenAL operation + * causes an error. + * + * @author Brian Matzon + * @version $Revision$ + * $Id$ + */ +public class OpenALException extends RuntimeException { + + private static final long serialVersionUID = 1L; + + /** + * Constructor for OpenALException. + */ + public OpenALException() { + super(); + } + + /** + * Constructor that takes an AL error number + */ + public OpenALException(int error_code) { + super("OpenAL error: " + AL10.alGetString(error_code) + " (" + error_code + ")"); + } + + /** + * Constructor for OpenALException. + * @param message + */ + public OpenALException(String message) { + super(message); + } + + /** + * Constructor for OpenALException. + * @param message + * @param cause + */ + public OpenALException(String message, Throwable cause) { + super(message, cause); + } + + /** + * Constructor for OpenALException. + * @param cause + */ + public OpenALException(Throwable cause) { + super(cause); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/openal/Util.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/openal/Util.java new file mode 100644 index 0000000..c23c588 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/openal/Util.java @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.openal; + + +/** + * Simple utility class for checking AL/ALC errors + * + * @author cix_foo + * @author Brian Matzon + * @version $Revision$ + */ + +public final class Util { + /** No c'tor */ + private Util() { + } + + /** + * Checks for any ALC errors and throws an unchecked exception on errors + * @param device Device for which to check ALC errors + */ + public static void checkALCError(ALCdevice device) { + int err = ALC10.alcGetError(device); + if (err != ALC10.ALC_NO_ERROR) + throw new OpenALException(ALC10.alcGetString(AL.getDevice(), err)); + } + + /** + * Checks for any AL errors and throws an unchecked exception on errors + */ + public static void checkALError() { + int err = AL10.alGetError(); + if (err != AL10.AL_NO_ERROR) + throw new OpenALException(err); + } + + /** + * Checks for a valid device + * @param device ALCdevice to check the validity of + */ + public static void checkALCValidDevice(ALCdevice device) { + if(!device.isValid()) { + throw new OpenALException("Invalid device: " + device); + } + } + + /** + * Checks for a valid context + * @param context ALCcontext to check the validity of + */ + public static void checkALCValidContext(ALCcontext context) { + if(!context.isValid()) { + throw new OpenALException("Invalid context: " + context); + } + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/APIUtil.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/APIUtil.java new file mode 100644 index 0000000..426581f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/APIUtil.java @@ -0,0 +1,550 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.*; +import org.lwjgl.opencl.FastLongMap.Entry; + +import java.nio.*; +import java.util.HashSet; +import java.util.Set; +import java.util.StringTokenizer; + +import static org.lwjgl.opencl.APPLEGLSharing.*; +import static org.lwjgl.opencl.CL10.*; +import static org.lwjgl.opencl.EXTDeviceFission.*; +import static org.lwjgl.opencl.KHRGLSharing.*; + +/** + * Utility class for OpenCL API calls. + * + * @author spasi + */ +final class APIUtil { + + private static final int INITIAL_BUFFER_SIZE = 256; + private static final int INITIAL_LENGTHS_SIZE = 4; + + private static final int BUFFERS_SIZE = 32; + + private static final ThreadLocal arrayTL = new ThreadLocal() { + protected char[] initialValue() { return new char[INITIAL_BUFFER_SIZE]; } + }; + + private static final ThreadLocal bufferByteTL = new ThreadLocal() { + protected ByteBuffer initialValue() { return BufferUtils.createByteBuffer(INITIAL_BUFFER_SIZE); } + }; + + private static final ThreadLocal bufferPointerTL = new ThreadLocal() { + protected PointerBuffer initialValue() { return BufferUtils.createPointerBuffer(INITIAL_BUFFER_SIZE); } + }; + + private static final ThreadLocal lengthsTL = new ThreadLocal() { + protected PointerBuffer initialValue() { return BufferUtils.createPointerBuffer(INITIAL_LENGTHS_SIZE); } + }; + + private static final ThreadLocal buffersTL = new ThreadLocal() { + protected Buffers initialValue() { return new Buffers(); } + }; + + private APIUtil() { + } + + private static char[] getArray(final int size) { + char[] array = arrayTL.get(); + + if ( array.length < size ) { + int sizeNew = array.length << 1; + while ( sizeNew < size ) + sizeNew <<= 1; + + array = new char[size]; + arrayTL.set(array); + } + + return array; + } + + static ByteBuffer getBufferByte(final int size) { + ByteBuffer buffer = bufferByteTL.get(); + + if ( buffer.capacity() < size ) { + int sizeNew = buffer.capacity() << 1; + while ( sizeNew < size ) + sizeNew <<= 1; + + buffer = BufferUtils.createByteBuffer(size); + bufferByteTL.set(buffer); + } else + buffer.clear(); + + return buffer; + } + + private static ByteBuffer getBufferByteOffset(final int size) { + ByteBuffer buffer = bufferByteTL.get(); + + if ( buffer.capacity() < size ) { + int sizeNew = buffer.capacity() << 1; + while ( sizeNew < size ) + sizeNew <<= 1; + + final ByteBuffer bufferNew = BufferUtils.createByteBuffer(size); + bufferNew.put(buffer); + bufferByteTL.set(buffer = bufferNew); + } else { + buffer.position(buffer.limit()); + buffer.limit(buffer.capacity()); + } + + return buffer; + } + + static PointerBuffer getBufferPointer(final int size) { + PointerBuffer buffer = bufferPointerTL.get(); + + if ( buffer.capacity() < size ) { + int sizeNew = buffer.capacity() << 1; + while ( sizeNew < size ) + sizeNew <<= 1; + + buffer = BufferUtils.createPointerBuffer(size); + bufferPointerTL.set(buffer); + } else + buffer.clear(); + + return buffer; + } + + static ShortBuffer getBufferShort() { return buffersTL.get().shorts; } + + static IntBuffer getBufferInt() { return buffersTL.get().ints; } + + static IntBuffer getBufferIntDebug() { return buffersTL.get().intsDebug; } + + static LongBuffer getBufferLong() { return buffersTL.get().longs; } + + static FloatBuffer getBufferFloat() { return buffersTL.get().floats; } + + static DoubleBuffer getBufferDouble() { return buffersTL.get().doubles; } + + static PointerBuffer getBufferPointer() { return buffersTL.get().pointers; } + + static PointerBuffer getLengths() { + return getLengths(1); + } + + static PointerBuffer getLengths(final int size) { + PointerBuffer lengths = lengthsTL.get(); + + if ( lengths.capacity() < size ) { + int sizeNew = lengths.capacity(); + while ( sizeNew < size ) + sizeNew <<= 1; + + lengths = BufferUtils.createPointerBuffer(size); + lengthsTL.set(lengths); + } else + lengths.clear(); + + return lengths; + } + + /** + * Simple ASCII encoding. + * + * @param buffer The target buffer + * @param string The source string + */ + private static ByteBuffer encode(final ByteBuffer buffer, final CharSequence string) { + for ( int i = 0; i < string.length(); i++ ) { + final char c = string.charAt(i); + if ( LWJGLUtil.DEBUG && 0x80 <= c ) // Silently ignore and map to 0x1A. + buffer.put((byte)0x1A); + else + buffer.put((byte)c); + } + + return buffer; + } + + /** + * Reads a byte string from the specified buffer. + * + * @param buffer + * + * @return the buffer as a String. + */ + static String getString(final ByteBuffer buffer) { + final int length = buffer.remaining(); + final char[] charArray = getArray(length); + + for ( int i = buffer.position(); i < buffer.limit(); i++ ) + charArray[i - buffer.position()] = (char)buffer.get(i); + + return new String(charArray, 0, length); + } + + /** + * Returns a buffer containing the specified string as bytes. + * + * @param string + * + * @return the String as a ByteBuffer + */ + static long getBuffer(final CharSequence string) { + final ByteBuffer buffer = encode(getBufferByte(string.length()), string); + buffer.flip(); + return MemoryUtil.getAddress0(buffer); + } + + /** + * Returns a buffer containing the specified string as bytes, starting at the specified offset. + * + * @param string + * + * @return the String as a ByteBuffer + */ + static long getBuffer(final CharSequence string, final int offset) { + final ByteBuffer buffer = encode(getBufferByteOffset(offset + string.length()), string); + buffer.flip(); + return MemoryUtil.getAddress(buffer); + } + + /** + * Returns a buffer containing the specified string as bytes, including null-termination. + * + * @param string + * + * @return the String as a ByteBuffer + */ + static long getBufferNT(final CharSequence string) { + final ByteBuffer buffer = encode(getBufferByte(string.length() + 1), string); + buffer.put((byte)0); + buffer.flip(); + return MemoryUtil.getAddress0(buffer); + } + + static int getTotalLength(final CharSequence[] strings) { + int length = 0; + for ( CharSequence string : strings ) + length += string.length(); + + return length; + } + + /** + * Returns a buffer containing the specified strings as bytes. + * + * @param strings + * + * @return the Strings as a ByteBuffer + */ + static long getBuffer(final CharSequence[] strings) { + final ByteBuffer buffer = getBufferByte(getTotalLength(strings)); + + for ( CharSequence string : strings ) + encode(buffer, string); + + buffer.flip(); + return MemoryUtil.getAddress0(buffer); + } + + /** + * Returns a buffer containing the specified strings as bytes, including null-termination. + * + * @param strings + * + * @return the Strings as a ByteBuffer + */ + static long getBufferNT(final CharSequence[] strings) { + final ByteBuffer buffer = getBufferByte(getTotalLength(strings) + strings.length); + + for ( CharSequence string : strings ) { + encode(buffer, string); + buffer.put((byte)0); + } + + buffer.flip(); + return MemoryUtil.getAddress0(buffer); + } + + /** + * Returns a buffer containing the lengths of the specified strings. + * + * @param strings + * + * @return the String lengths in a PointerBuffer + */ + static long getLengths(final CharSequence[] strings) { + PointerBuffer buffer = getLengths(strings.length); + + for ( CharSequence string : strings ) + buffer.put(string.length()); + + buffer.flip(); + return MemoryUtil.getAddress0(buffer); + } + + /** + * Returns a buffer containing the lengths of the specified buffers. + * + * @param buffers the buffer array + * + * @return the buffer lengths in a PointerBuffer + */ + static long getLengths(final ByteBuffer[] buffers) { + PointerBuffer lengths = getLengths(buffers.length); + + for ( ByteBuffer buffer : buffers ) + lengths.put(buffer.remaining()); + + lengths.flip(); + return MemoryUtil.getAddress0(lengths); + } + + static int getSize(final PointerBuffer lengths) { + long size = 0; + for ( int i = lengths.position(); i < lengths.limit(); i++ ) + size += lengths.get(i); + + return (int)size; + } + + static long getPointer(final PointerWrapper pointer) { + return MemoryUtil.getAddress0(getBufferPointer().put(0, pointer)); + } + + static long getPointerSafe(final PointerWrapper pointer) { + return MemoryUtil.getAddress0(getBufferPointer().put(0, pointer == null ? 0L : pointer.getPointer())); + } + + private static class Buffers { + + final ShortBuffer shorts; + final IntBuffer ints; + final IntBuffer intsDebug; + final LongBuffer longs; + + final FloatBuffer floats; + final DoubleBuffer doubles; + + final PointerBuffer pointers; + + Buffers() { + shorts = BufferUtils.createShortBuffer(BUFFERS_SIZE); + ints = BufferUtils.createIntBuffer(BUFFERS_SIZE); + intsDebug = BufferUtils.createIntBuffer(1); + longs = BufferUtils.createLongBuffer(BUFFERS_SIZE); + + floats = BufferUtils.createFloatBuffer(BUFFERS_SIZE); + doubles = BufferUtils.createDoubleBuffer(BUFFERS_SIZE); + + pointers = BufferUtils.createPointerBuffer(BUFFERS_SIZE); + } + + } + + /* ------------------------------------------------------------------------ + --------------------------------------------------------------------------- + OPENCL API UTILITIES BELOW + --------------------------------------------------------------------------- + ------------------------------------------------------------------------ */ + + static Set getExtensions(final String extensionList) { + final Set extensions = new HashSet(); + + if ( extensionList != null ) { + final StringTokenizer tokenizer = new StringTokenizer(extensionList); + while ( tokenizer.hasMoreTokens() ) + extensions.add(tokenizer.nextToken()); + } + + return extensions; + } + + static boolean isDevicesParam(final int param_name) { + switch ( param_name ) { + case CL_CONTEXT_DEVICES: + case CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR: + case CL_DEVICES_FOR_GL_CONTEXT_KHR: + case CL_CGL_DEVICE_FOR_CURRENT_VIRTUAL_SCREEN_APPLE: + case CL_CGL_DEVICES_FOR_SUPPORTED_VIRTUAL_SCREENS_APPLE: + return true; + } + + return false; + } + + static CLPlatform getCLPlatform(final PointerBuffer properties) { + long platformID = 0; + + final int keys = properties.remaining() / 2; + for ( int k = 0; k < keys; k++ ) { + final long key = properties.get(k << 1); + if ( key == 0 ) + break; + + if ( key == CL_CONTEXT_PLATFORM ) { + platformID = properties.get((k << 1) + 1); + break; + } + } + + if ( platformID == 0 ) + throw new IllegalArgumentException("Could not find CL_CONTEXT_PLATFORM in cl_context_properties."); + + final CLPlatform platform = CLPlatform.getCLPlatform(platformID); + if ( platform == null ) + throw new IllegalStateException("Could not find a valid CLPlatform. Make sure clGetPlatformIDs has been used before."); + + return platform; + } + + static ByteBuffer getNativeKernelArgs(final long user_func_ref, final CLMem[] clMems, final long[] sizes) { + final ByteBuffer args = getBufferByte(8 + 4 + (clMems == null ? 0 : clMems.length * (4 + PointerBuffer.getPointerSize()))); + + args.putLong(0, user_func_ref); + if ( clMems == null ) + args.putInt(8, 0); + else { + args.putInt(8, clMems.length); + int byteIndex = 12; + for ( int i = 0; i < clMems.length; i++ ) { + if ( LWJGLUtil.DEBUG && !clMems[i].isValid() ) + throw new IllegalArgumentException("An invalid CLMem object was specified."); + args.putInt(byteIndex, (int)sizes[i]); // CLMem size + byteIndex += (4 + PointerBuffer.getPointerSize()); // Skip size and make room for the pointer + } + } + + return args; + } + + // ------------------------------------------------------------------------------------ + + /** + * Releases all sub-devices created from the specified CLDevice. + * + * @param device the CLDevice to clear + */ + static void releaseObjects(final CLDevice device) { + // Release objects only if we're about to hit 0. + if ( !device.isValid() || device.getReferenceCount() > 1 ) + return; + + releaseObjects(device.getSubCLDeviceRegistry(), DESTRUCTOR_CLSubDevice); + } + + /** + * Releases all objects contained in the specified CLContext. + * + * @param context the CLContext to clear + */ + static void releaseObjects(final CLContext context) { + // Release objects only if we're about to hit 0. + if ( !context.isValid() || context.getReferenceCount() > 1 ) + return; + + releaseObjects(context.getCLEventRegistry(), DESTRUCTOR_CLEvent); + releaseObjects(context.getCLProgramRegistry(), DESTRUCTOR_CLProgram); + releaseObjects(context.getCLSamplerRegistry(), DESTRUCTOR_CLSampler); + releaseObjects(context.getCLMemRegistry(), DESTRUCTOR_CLMem); + releaseObjects(context.getCLCommandQueueRegistry(), DESTRUCTOR_CLCommandQueue); + } + + /** + * Releases all objects contained in the specified CLProgram. + * + * @param program the CLProgram to clear + */ + static void releaseObjects(final CLProgram program) { + // Release objects only if we're about to hit 0. + if ( !program.isValid() || program.getReferenceCount() > 1 ) + return; + + releaseObjects(program.getCLKernelRegistry(), DESTRUCTOR_CLKernel); + } + + /** + * Releases all objects contained in the specified CLCommandQueue. + * + * @param queue the CLCommandQueue to clear + */ + static void releaseObjects(final CLCommandQueue queue) { + // Release objects only if we're about to hit 0. + if ( !queue.isValid() || queue.getReferenceCount() > 1 ) + return; + + releaseObjects(queue.getCLEventRegistry(), DESTRUCTOR_CLEvent); + } + + private static void releaseObjects(final CLObjectRegistry registry, final ObjectDestructor destructor) { + if ( registry.isEmpty() ) + return; + + for ( Entry entry : registry.getAll() ) { + final T object = entry.value; + while ( object.isValid() ) + destructor.release(object); + } + } + + private static final ObjectDestructor DESTRUCTOR_CLSubDevice = new ObjectDestructor() { + public void release(final CLDevice object) { clReleaseDeviceEXT(object); } + }; + private static final ObjectDestructor DESTRUCTOR_CLMem = new ObjectDestructor() { + public void release(final CLMem object) { clReleaseMemObject(object); } + }; + private static final ObjectDestructor DESTRUCTOR_CLCommandQueue = new ObjectDestructor() { + public void release(final CLCommandQueue object) { clReleaseCommandQueue(object); } + }; + private static final ObjectDestructor DESTRUCTOR_CLSampler = new ObjectDestructor() { + public void release(final CLSampler object) { clReleaseSampler(object); } + }; + private static final ObjectDestructor DESTRUCTOR_CLProgram = new ObjectDestructor() { + public void release(final CLProgram object) { clReleaseProgram(object); } + }; + private static final ObjectDestructor DESTRUCTOR_CLKernel = new ObjectDestructor() { + public void release(final CLKernel object) { clReleaseKernel(object); } + }; + private static final ObjectDestructor DESTRUCTOR_CLEvent = new ObjectDestructor() { + public void release(final CLEvent object) { clReleaseEvent(object); } + }; + + private interface ObjectDestructor { + + void release(T object); + + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/APPLEContextLoggingUtil.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/APPLEContextLoggingUtil.java new file mode 100644 index 0000000..c2d9b28 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/APPLEContextLoggingUtil.java @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import java.nio.ByteBuffer; + +/** + * Utility class that provides CLContextCallback implementations that use + * the APPLE_ContextLoggingFunctions callback functions. + *

+ * TODO: Test this class + * + * @author Spasi + */ +public final class APPLEContextLoggingUtil { + + /** Sends all log messages to the Apple System Logger. */ + public static final CLContextCallback SYSTEM_LOG_CALLBACK; + + /** Sends all log messages to the file descriptor stdout. */ + public static final CLContextCallback STD_OUT_CALLBACK; + + /** Sends all log messages to the file descriptor stderr. */ + public static final CLContextCallback STD_ERR_CALLBACK; + + static { + if ( CLCapabilities.CL_APPLE_ContextLoggingFunctions ) { + SYSTEM_LOG_CALLBACK = new CLContextCallback(CallbackUtil.getLogMessageToSystemLogAPPLE()) { + protected void handleMessage(final String errinfo, final ByteBuffer private_info) { throw new UnsupportedOperationException(); } + }; + + STD_OUT_CALLBACK = new CLContextCallback(CallbackUtil.getLogMessageToStdoutAPPLE()) { + protected void handleMessage(final String errinfo, final ByteBuffer private_info) { throw new UnsupportedOperationException(); } + }; + + STD_ERR_CALLBACK = new CLContextCallback(CallbackUtil.getLogMessageToStderrAPPLE()) { + protected void handleMessage(final String errinfo, final ByteBuffer private_info) { throw new UnsupportedOperationException(); } + }; + } else { + SYSTEM_LOG_CALLBACK = null; + STD_OUT_CALLBACK = null; + STD_ERR_CALLBACK = null; + } + } + + private APPLEContextLoggingUtil() {} + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CL.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CL.java new file mode 100644 index 0000000..169ae8a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CL.java @@ -0,0 +1,158 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; +import org.lwjgl.MemoryUtil; +import org.lwjgl.Sys; + +import java.nio.ByteBuffer; + +/** + * LWJGL users must use this class to initialize OpenCL + * before using any other class in the org.lwjgl.opencl package. + * + * @author Spasi + */ +public final class CL { + + private static boolean created; + + static { + Sys.initialize(); + } + + private CL() { + } + + /** + * Native method to create CL instance + * + * @param oclPaths Array of strings containing paths to search for OpenCL library + */ + private static native void nCreate(String oclPaths) throws LWJGLException; + + /** + * Native method to create CL instance from the Mac OS X 10.4 OpenCL framework. + * It is only defined in the Mac OS X native library. + */ + private static native void nCreateDefault() throws LWJGLException; + + /** Native method the destroy the CL */ + private static native void nDestroy(); + + /** @return true if CL has been created */ + public static boolean isCreated() { + return created; + } + + public static void create() throws LWJGLException { + if ( created ) + return; + //throw new IllegalStateException("OpenCL has already been created."); + + final String libname; + final String[] library_names; + switch ( LWJGLUtil.getPlatform() ) { + case LWJGLUtil.PLATFORM_WINDOWS: + libname = "OpenCL"; + library_names = new String[] { "OpenCL.dll" }; + break; + case LWJGLUtil.PLATFORM_LINUX: + libname = "OpenCL"; + library_names = new String[] { "libOpenCL64.so", "libOpenCL.so" }; // TODO: Fix this + break; + case LWJGLUtil.PLATFORM_MACOSX: + libname = "OpenCL"; + library_names = new String[] { "OpenCL.dylib" }; // TODO: Fix this + break; + default: + throw new LWJGLException("Unknown platform: " + LWJGLUtil.getPlatform()); + } + + final String[] oclPaths = LWJGLUtil.getLibraryPaths(libname, library_names, CL.class.getClassLoader()); + LWJGLUtil.log("Found " + oclPaths.length + " OpenCL paths"); + for ( String oclPath : oclPaths ) { + try { + nCreate(oclPath); + created = true; + break; + } catch (LWJGLException e) { + LWJGLUtil.log("Failed to load " + oclPath + ": " + e.getMessage()); + } + } + + if ( !created && LWJGLUtil.getPlatform() == LWJGLUtil.PLATFORM_MACOSX ) { + // Try to load OpenCL from the framework instead + nCreateDefault(); + created = true; + } + + if ( !created ) + throw new LWJGLException("Could not locate OpenCL library."); + + if ( !CLCapabilities.OpenCL10 ) + throw new RuntimeException("OpenCL 1.0 not supported."); + } + + public static void destroy() { + } + + /** + * Helper method to get a pointer to a named function with aliases in the OpenCL library. + * + * @param aliases the function name aliases. + * + * @return the function pointer address + */ + static long getFunctionAddress(String[] aliases) { + for ( String aliase : aliases ) { + long address = getFunctionAddress(aliase); + if ( address != 0 ) + return address; + } + return 0; + } + + /** Helper method to get a pointer to a named function in the OpenCL library. */ + static long getFunctionAddress(String name) { + ByteBuffer buffer = MemoryUtil.encodeASCII(name); + return ngetFunctionAddress(MemoryUtil.getAddress(buffer)); + } + private static native long ngetFunctionAddress(long name); + + static native ByteBuffer getHostBuffer(final long address, final int size); + + private static native void resetNativeStubs(Class clazz); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLBuildProgramCallback.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLBuildProgramCallback.java new file mode 100644 index 0000000..c1d3a76 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLBuildProgramCallback.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +/** + * Instances of this class can be used to receive OpenCL program build notifications. + * A single CLBuildProgramCallback instance should only be used with programs created + * in the same CLContext. + * + * @author Spasi + */ +public abstract class CLBuildProgramCallback extends CLProgramCallback { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLChecks.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLChecks.java new file mode 100644 index 0000000..0a5b079 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLChecks.java @@ -0,0 +1,268 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.LWJGLUtil; +import org.lwjgl.PointerBuffer; + +import java.nio.ByteBuffer; + +import static org.lwjgl.opencl.CL10.*; +import static org.lwjgl.opencl.CL11.*; + +/** + * Utility class that provides runtime checks for OpenCL method calls. + * TODO: Revisit this when Java 7.0 is released, there will be new Buffer API with 64bit indices/sizes. + * + * @author Spasi + */ +final class CLChecks { + + private CLChecks() { + } + + /** + * Calculates the number of bytes in the specified cl_mem buffer rectangle region. + * + * @param offset the host offset + * @param region the rectangle region + * @param row_pitch the host row pitch + * @param slice_pitch the host slice pitch + * + * @return the region size in bytes + */ + static int calculateBufferRectSize(final PointerBuffer offset, final PointerBuffer region, long row_pitch, long slice_pitch) { + if ( !LWJGLUtil.CHECKS ) + return 0; + + final long x = offset.get(0); + final long y = offset.get(1); + final long z = offset.get(2); + + if ( LWJGLUtil.DEBUG && (x < 0 || y < 0 || z < 0) ) + throw new IllegalArgumentException("Invalid cl_mem host offset: " + x + ", " + y + ", " + z); + + final long w = region.get(0); + final long h = region.get(1); + final long d = region.get(2); + + if ( LWJGLUtil.DEBUG && (w < 1 || h < 1 || d < 1) ) + throw new IllegalArgumentException("Invalid cl_mem rectangle region dimensions: " + w + " x " + h + " x " + d); + + if ( row_pitch == 0 ) + row_pitch = w; + else if ( LWJGLUtil.DEBUG && row_pitch < w ) + throw new IllegalArgumentException("Invalid host row pitch specified: " + row_pitch); + + if ( slice_pitch == 0 ) + slice_pitch = row_pitch * h; + else if ( LWJGLUtil.DEBUG && slice_pitch < (row_pitch * h) ) + throw new IllegalArgumentException("Invalid host slice pitch specified: " + slice_pitch); + + return (int)((z * slice_pitch + y * row_pitch + x) + (w * h * d)); + } + + /** + * Calculates the number of bytes in the specified cl_mem image region. + * This implementation assumes 1 byte per element, because we cannot the + * image type. + * + * @param region the image region + * @param row_pitch the row pitch + * @param slice_pitch the slice pitch + * + * @return the region size in bytes + */ + static int calculateImageSize(final PointerBuffer region, long row_pitch, long slice_pitch) { + if ( !LWJGLUtil.CHECKS ) + return 0; + + final long w = region.get(0); + final long h = region.get(1); + final long d = region.get(2); + + if ( LWJGLUtil.DEBUG && (w < 1 || h < 1 || d < 1) ) + throw new IllegalArgumentException("Invalid cl_mem image region dimensions: " + w + " x " + h + " x " + d); + + if ( row_pitch == 0 ) + row_pitch = w; + else if ( LWJGLUtil.DEBUG && row_pitch < w ) + throw new IllegalArgumentException("Invalid row pitch specified: " + row_pitch); + + if ( slice_pitch == 0 ) + slice_pitch = row_pitch * h; + else if ( LWJGLUtil.DEBUG && slice_pitch < (row_pitch * h) ) + throw new IllegalArgumentException("Invalid slice pitch specified: " + slice_pitch); + + return (int)(slice_pitch * d); + + } + + /** + * Calculates the number of bytes in the specified 2D image. + * + * @param format the cl_image_format struct + * @param w the image width + * @param h the image height + * @param row_pitch the image row pitch + * + * @return the 2D image size in bytes + */ + static int calculateImage2DSize(final ByteBuffer format, final long w, final long h, long row_pitch) { + if ( !LWJGLUtil.CHECKS ) + return 0; + + if ( LWJGLUtil.DEBUG && (w < 1 || h < 1) ) + throw new IllegalArgumentException("Invalid 2D image dimensions: " + w + " x " + h); + + final int elementSize = getElementSize(format); + + if ( row_pitch == 0 ) + row_pitch = w * elementSize; + else if ( LWJGLUtil.DEBUG && ((row_pitch < w * elementSize) || (row_pitch % elementSize != 0)) ) + throw new IllegalArgumentException("Invalid image_row_pitch specified: " + row_pitch); + + return (int)(row_pitch * h); + } + + /** + * Calculates the number of bytes in the specified 3D image. + * + * @param format the cl_image_format struct + * @param w the image width + * @param h the image height + * @param d the image depth + * @param row_pitch the image row pitch + * @param slice_pitch the image slice pitch + * + * @return the 3D image size in bytes + */ + static int calculateImage3DSize(final ByteBuffer format, final long w, final long h, final long d, long row_pitch, long slice_pitch) { + if ( !LWJGLUtil.CHECKS ) + return 0; + + if ( LWJGLUtil.DEBUG && (w < 1 || h < 1 || d < 2) ) + throw new IllegalArgumentException("Invalid 3D image dimensions: " + w + " x " + h + " x " + d); + + final int elementSize = getElementSize(format); + + if ( row_pitch == 0 ) + row_pitch = w * elementSize; + else if ( LWJGLUtil.DEBUG && ((row_pitch < w * elementSize) || (row_pitch % elementSize != 0)) ) + throw new IllegalArgumentException("Invalid image_row_pitch specified: " + row_pitch); + + if ( slice_pitch == 0 ) + slice_pitch = row_pitch * h; + else if ( LWJGLUtil.DEBUG && ((row_pitch < row_pitch * h) || (slice_pitch % row_pitch != 0)) ) + throw new IllegalArgumentException("Invalid image_slice_pitch specified: " + row_pitch); + + return (int)(slice_pitch * d); + } + + /** + * Returns the number of bytes per element for the specified image format. + * + * @param format a cl_image_format struct. + * + * @return the number of bytes per image element + */ + private static int getElementSize(final ByteBuffer format) { + final int channelOrder = format.getInt(format.position() + 0); + final int channelType = format.getInt(format.position() + 4); + + return getChannelCount(channelOrder) * getChannelSize(channelType); + } + + /** + * Returns the number of channels in the specified cl_channel_order. + * + * @param channelOrder the cl_channel_order + * + * @return the number of channels + */ + private static int getChannelCount(final int channelOrder) { + switch ( channelOrder ) { + case CL_R: + case CL_A: + case CL_INTENSITY: + case CL_LUMINANCE: + case CL_Rx: + return 1; + case CL_RG: + case CL_RA: + case CL_RGx: + return 2; + case CL_RGB: + case CL_RGBx: + return 3; + case CL_RGBA: + case CL_BGRA: + case CL_ARGB: + return 4; + default: + throw new IllegalArgumentException("Invalid cl_channel_order specified: " + LWJGLUtil.toHexString(channelOrder)); + } + } + + /** + * Returns the number of bytes in the specified cl_channel_type. + * + * @param channelType the cl_channel_type + * + * @return the number of bytes + */ + private static int getChannelSize(final int channelType) { + switch ( channelType ) { + case CL_SNORM_INT8: + case CL_UNORM_INT8: + case CL_SIGNED_INT8: + case CL_UNSIGNED_INT8: + return 1; + case CL_SNORM_INT16: + case CL_UNORM_INT16: + case CL_UNORM_SHORT_565: + case CL_UNORM_SHORT_555: + case CL_SIGNED_INT16: + case CL_UNSIGNED_INT16: + case CL_HALF_FLOAT: + return 2; + case CL_UNORM_INT_101010: + case CL_SIGNED_INT32: + case CL_UNSIGNED_INT32: + case CL_FLOAT: + return 4; + default: + throw new IllegalArgumentException("Invalid cl_channel_type specified: " + LWJGLUtil.toHexString(channelType)); + } + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLCommandQueue.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLCommandQueue.java new file mode 100644 index 0000000..4aa4427 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLCommandQueue.java @@ -0,0 +1,112 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.PointerBuffer; + +/** + * This class is a wrapper around a cl_command_queue pointer. + * + * @author Spasi + */ +public final class CLCommandQueue extends CLObjectChild { + + private static final InfoUtil util = CLPlatform.getInfoUtilInstance(CLCommandQueue.class, "CL_COMMAND_QUEUE_UTIL"); + + private final CLDevice device; + + private final CLObjectRegistry clEvents; + + CLCommandQueue(final long pointer, final CLContext context, final CLDevice device) { + super(pointer, context); + if ( isValid() ) { + this.device = device; + this.clEvents = new CLObjectRegistry(); + context.getCLCommandQueueRegistry().registerObject(this); + } else { + this.device = null; + this.clEvents = null; + } + } + + public CLDevice getCLDevice() { + return device; + } + + /** + * Returns a CLEvent associated with this command-queue. + * + * @param id the event object id + * + * @return the CLEvent object + */ + public CLEvent getCLEvent(final long id) { + return clEvents.getObject(id); + } + + // ---------------[ UTILITY METHODS ]--------------- + + /** + * Returns the integer value of the specified parameter. + * + * @param param_name the parameter + * + * @return the parameter value + */ + public int getInfoInt(int param_name) { + return util.getInfoInt(this, param_name); + } + + // -------[ IMPLEMENTATION STUFF BELOW ]------- + + CLObjectRegistry getCLEventRegistry() { return clEvents; } + + /** + * Called from OpenCL methods that generate CLEvents. + * + * @param event a buffer containing a CLEvent pointer. + */ + void registerCLEvent(final PointerBuffer event) { + if ( event != null ) + new CLEvent(event.get(event.position()), this); + } + + int release() { + try { + return super.release(); + } finally { + if ( !isValid() ) + getParent().getCLCommandQueueRegistry().unregisterObject(this); + } + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLCompileProgramCallback.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLCompileProgramCallback.java new file mode 100644 index 0000000..d8a534d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLCompileProgramCallback.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +/** + * Instances of this class can be used to receive OpenCL program compilation notifications. + * A single CLCompileProgramCallback instance should only be used with programs created + * in the same CLContext. + * + * @author Spasi + */ +public abstract class CLCompileProgramCallback extends CLProgramCallback { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLContext.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLContext.java new file mode 100644 index 0000000..ff85cde --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLContext.java @@ -0,0 +1,322 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.LWJGLException; +import org.lwjgl.opencl.api.CLImageFormat; +import org.lwjgl.opencl.api.Filter; +import org.lwjgl.opengl.Drawable; + +import java.nio.IntBuffer; +import java.util.List; + +/** + * This class is a wrapper around a cl_context pointer. + * + * @author Spasi + */ +public final class CLContext extends CLObjectChild { + + private static final CLContextUtil util = (CLContextUtil)CLPlatform.getInfoUtilInstance(CLContext.class, "CL_CONTEXT_UTIL"); + + private final CLObjectRegistry clCommandQueues; + private final CLObjectRegistry clMems; + private final CLObjectRegistry clSamplers; + private final CLObjectRegistry clPrograms; + private final CLObjectRegistry clEvents; + + private long + contextCallback, + printfCallback; + + CLContext(final long pointer, final CLPlatform platform) { + super(pointer, platform); + + // We do not need to register the context with the platform, + // there is no API that returns cl_context, except clCreateContext. + + if ( isValid() ) { + clCommandQueues = new CLObjectRegistry(); + clMems = new CLObjectRegistry(); + clSamplers = new CLObjectRegistry(); + clPrograms = new CLObjectRegistry(); + clEvents = new CLObjectRegistry(); + } else { + clCommandQueues = null; + clMems = null; + clSamplers = null; + clPrograms = null; + clEvents = null; + } + } + + /** + * Returns a CLCommandQueue associated with this context. + * + * @param id the command queue object id + * + * @return the CLCommandQueue object + */ + public CLCommandQueue getCLCommandQueue(final long id) { return clCommandQueues.getObject(id); } + + /** + * Returns a CLMem associated with this context. + * + * @param id the memory object id + * + * @return the CLMem object + */ + public CLMem getCLMem(final long id) { return clMems.getObject(id); } + + /** + * Returns a CLSampler associated with this context. + * + * @param id the sampler object id + * + * @return the CLSampler object + */ + public CLSampler getCLSampler(final long id) { return clSamplers.getObject(id); } + + /** + * Returns a CLProgram associated with this context. + * + * @param id the program object id + * + * @return the CLProgram object + */ + public CLProgram getCLProgram(final long id) { return clPrograms.getObject(id); } + + /** + * Returns a user CLEvent associated with this context. + * + * @param id the event object id + * + * @return the CLEvent object + */ + public CLEvent getCLEvent(final long id) { return clEvents.getObject(id); } + + // ---------------[ UTILITY METHODS ]--------------- + + /** + * Creates a new CLContext. + * + * @param platform the platform to use + * @param devices the devices to use + * @param errcode_ret the error code result + * + * @return the new CLContext + * + * @throws LWJGLException if an exception occurs while creating the context + */ + public static CLContext create(final CLPlatform platform, final List devices, final IntBuffer errcode_ret) throws LWJGLException { + return create(platform, devices, null, null, errcode_ret); + } + + /** + * Creates a new CLContext. + * + * @param platform the platform to use + * @param devices the devices to use + * @param pfn_notify the context callback function + * @param errcode_ret the error code result + * + * @return the new CLContext + * + * @throws LWJGLException if an exception occurs while creating the context + */ + public static CLContext create(final CLPlatform platform, final List devices, final CLContextCallback pfn_notify, final IntBuffer errcode_ret) throws LWJGLException { + return create(platform, devices, pfn_notify, null, errcode_ret); + } + + /** + * Creates a new CLContext. + * + * @param platform the platform to use + * @param devices the devices to use + * @param share_drawable the OpenGL drawable to share objects with + * @param errcode_ret the error code result + * + * @return the new CLContext + * + * @throws LWJGLException if an exception occurs while creating the context + */ + public static CLContext create(final CLPlatform platform, final List devices, final CLContextCallback pfn_notify, final Drawable share_drawable, final IntBuffer errcode_ret) throws LWJGLException { + return util.create(platform, devices, pfn_notify, share_drawable, errcode_ret); + } + + /** + * Creates a new CLContext. + * + * @param platform the platform to use + * @param device_type the device type to use + * @param errcode_ret the error code result + * + * @return the new CLContext + * + * @throws LWJGLException if an exception occurs while creating the context + */ + public static CLContext createFromType(final CLPlatform platform, final long device_type, final IntBuffer errcode_ret) throws LWJGLException { + return util.createFromType(platform, device_type, null, null, errcode_ret); + } + + /** + * Creates a new CLContext. + * + * @param platform the platform to use + * @param device_type the device type to use + * @param pfn_notify the context callback function + * @param errcode_ret the error code result + * + * @return the new CLContext + * + * @throws LWJGLException if an exception occurs while creating the context + */ + public static CLContext createFromType(final CLPlatform platform, final long device_type, final CLContextCallback pfn_notify, final IntBuffer errcode_ret) throws LWJGLException { + return util.createFromType(platform, device_type, pfn_notify, null, errcode_ret); + } + + /** + * Creates a new CLContext. + * + * @param platform the platform to use + * @param device_type the device type to use + * @param share_drawable the OpenGL drawable to share objects with + * @param errcode_ret the error code result + * + * @return the new CLContext + * + * @throws LWJGLException if an exception occurs while creating the context + */ + public static CLContext createFromType(final CLPlatform platform, final long device_type, final CLContextCallback pfn_notify, final Drawable share_drawable, final IntBuffer errcode_ret) throws LWJGLException { + return util.createFromType(platform, device_type, pfn_notify, share_drawable, errcode_ret); + } + + /** + * Returns the integer value of the specified parameter. + * + * @param param_name the parameter + * + * @return the parameter value + */ + public int getInfoInt(int param_name) { + return util.getInfoInt(this, param_name); + } + + /** + * Returns the list of devices in context. + * + * @return the list of devices + */ + public List getInfoDevices() { + return util.getInfoDevices(this); + } + + public List getSupportedImageFormats(final long flags, final int image_type) { + return getSupportedImageFormats(flags, image_type, null); + } + + public List getSupportedImageFormats(final long flags, final int image_type, final Filter filter) { + return util.getSupportedImageFormats(this, flags, image_type, filter); + } + + /** CLContext utility methods interface. */ + interface CLContextUtil extends InfoUtil { + + List getInfoDevices(CLContext context); + + CLContext create(CLPlatform platform, List devices, CLContextCallback pfn_notify, Drawable share_drawable, IntBuffer errcode_ret) throws LWJGLException; + + CLContext createFromType(CLPlatform platform, long device_type, CLContextCallback pfn_notify, Drawable share_drawable, IntBuffer errcode_ret) throws LWJGLException; + + List getSupportedImageFormats(CLContext context, final long flags, final int image_type, Filter filter); + + } + + // -------[ IMPLEMENTATION STUFF BELOW ]------- + + CLObjectRegistry getCLCommandQueueRegistry() { return clCommandQueues; } + + CLObjectRegistry getCLMemRegistry() { return clMems; } + + CLObjectRegistry getCLSamplerRegistry() { return clSamplers; } + + CLObjectRegistry getCLProgramRegistry() { return clPrograms; } + + CLObjectRegistry getCLEventRegistry() { return clEvents; } + + private boolean checkCallback(final long callback, final int result) { + if ( result == 0 && (callback == 0 || isValid()) ) + return true; + + if ( callback != 0 ) + CallbackUtil.deleteGlobalRef(callback); + return false; + } + + /** + * Associates this context with the specified context callback reference. If the context + * is invalid, the callback reference is deleted. NO-OP if user_data is 0. + * + * @param callback the context callback pointer + */ + void setContextCallback(final long callback) { + if ( checkCallback(callback, 0) ) + this.contextCallback = callback; + } + + /** + * Associates this context with the specified printf callback reference. If the context + * is invalid, the callback reference is deleted. NO-OP if user_data is 0. + * + * @param callback the printf callback pointer + */ + void setPrintfCallback(final long callback, final int result) { + if ( checkCallback(callback, result) ) + this.printfCallback = callback; + } + + /** + * Decrements the context's reference count. If the reference + * count hits zero, it also deletes + * any callback objects associated with it. + */ + void releaseImpl() { + if ( release() > 0 ) + return; + + if ( contextCallback != 0 ) + CallbackUtil.deleteGlobalRef(contextCallback); + if ( printfCallback != 0 ) + CallbackUtil.deleteGlobalRef(printfCallback); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLContextCallback.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLContextCallback.java new file mode 100644 index 0000000..4893a97 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLContextCallback.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.PointerWrapperAbstract; + +import java.nio.ByteBuffer; + +/** + * Instances of this class can be used to receive OpenCL context error notifications. + * + * @author Spasi + */ +public abstract class CLContextCallback extends PointerWrapperAbstract { + + private final boolean custom; + + protected CLContextCallback() { + super(CallbackUtil.getContextCallback()); + custom = false; + } + + /** + * This constructor allows non-LWJGL implementations. + * + * @param pointer + */ + protected CLContextCallback(final long pointer) { + super(pointer); + + if ( pointer == 0 ) + throw new RuntimeException("Invalid callback function pointer specified."); + + custom = true; + } + + final boolean isCustom() { + return custom; + } + + /** + * The callback method. + * + * @param errinfo the error description + * @param private_info optional error data (may be null) + */ + protected abstract void handleMessage(String errinfo, ByteBuffer private_info); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLDevice.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLDevice.java new file mode 100644 index 0000000..72535e7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLDevice.java @@ -0,0 +1,206 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.PointerBuffer; + +/** + * This class is a wrapper around a cl_device_id pointer. + * + * @author Spasi + */ +public final class CLDevice extends CLObjectChild { + + private static final InfoUtil util = CLPlatform.getInfoUtilInstance(CLDevice.class, "CL_DEVICE_UTIL"); + + private final CLPlatform platform; + private final CLObjectRegistry subCLDevices; + + private Object caps; + + CLDevice(final long pointer, final CLPlatform platform) { + this(pointer, null, platform); + } + + /** + * EXT_device_fission constructor. + * + * @param pointer the sub-device pointer + * @param parent the parent CLDevice + */ + CLDevice(final long pointer, final CLDevice parent) { + this(pointer, parent, parent.getPlatform()); + } + + CLDevice(final long pointer, final CLDevice parent, final CLPlatform platform) { + super(pointer, parent); + + if ( isValid() ) { + this.platform = platform; + platform.getCLDeviceRegistry().registerObject(this); + + this.subCLDevices = new CLObjectRegistry(); + if ( parent != null ) + parent.subCLDevices.registerObject(this); + } else { + this.platform = null; + this.subCLDevices = null; + } + } + + public CLPlatform getPlatform() { + return platform; + } + + /** + * Returns a sub-device of this device. + * + * @param id the sub-device object id + * + * @return the CLDevice object + */ + public CLDevice getSubCLDevice(final long id) { return subCLDevices.getObject(id); } + + // ---------------[ UTILITY METHODS ]--------------- + + /** + * Returns the value of the specified String parameter. + * + * @param param_name the parameter + * + * @return the parameter value + */ + public String getInfoString(int param_name) { + return util.getInfoString(this, param_name); + } + + /** + * Returns the integer value of the specified parameter. + * + * @param param_name the parameter + * + * @return the parameter value + */ + public int getInfoInt(int param_name) { + return util.getInfoInt(this, param_name); + } + + /** + * Returns the boolean value of the specified parameter. + * + * @param param_name the parameter + * + * @return the parameter value + */ + public boolean getInfoBoolean(int param_name) { + return util.getInfoInt(this, param_name) != 0; + } + + /** + * Returns the size_t value of the specified parameter. + * + * @param param_name the parameter + * + * @return the parameter value + */ + public long getInfoSize(int param_name) { + return util.getInfoSize(this, param_name); + } + + /** + * Returns an array of size_t values of the specified parameter. + * + * @param param_name the parameter + * + * @return the parameter values + */ + public long[] getInfoSizeArray(int param_name) { + return util.getInfoSizeArray(this, param_name); + } + + /** + * Returns the long value of the specified parameter. Can be used + * for both cl_ulong and cl_bitfield parameters. + * + * @param param_name the parameter + * + * @return the parameter value + */ + public long getInfoLong(int param_name) { + return util.getInfoLong(this, param_name); + } + + // -------[ IMPLEMENTATION STUFF BELOW ]------- + + void setCapabilities(final Object caps) { + this.caps = caps; + } + + Object getCapabilities() { + return caps; + } + + int retain() { + if ( getParent() == null ) + return getReferenceCount(); // NO-OP, root devices cannot be retained + + return super.retain(); + } + + int release() { + if ( getParent() == null ) + return getReferenceCount(); // NO-OP, root devices cannot be released + + try { + return super.release(); + } finally { + if ( !isValid() ) + getParent().subCLDevices.unregisterObject(this); + } + } + + CLObjectRegistry getSubCLDeviceRegistry() { return subCLDevices; } + + /** + * Called from clCreateSubDevicesEXT to register new sub-devices. + * + * @param devices a buffer containing CLDevice pointers. + */ + void registerSubCLDevices(final PointerBuffer devices) { + for ( int i = devices.position(); i < devices.limit(); i++ ) { + final long pointer = devices.get(i); + if ( pointer != 0 ) + new CLDevice(pointer, this); + } + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLEvent.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLEvent.java new file mode 100644 index 0000000..3bcfeb9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLEvent.java @@ -0,0 +1,131 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +/** + * This class is a wrapper around a cl_mem pointer. + * + * @author Spasi + */ +public final class CLEvent extends CLObjectChild { + + private static final CLEventUtil util = (CLEventUtil)CLPlatform.getInfoUtilInstance(CLEvent.class, "CL_EVENT_UTIL"); + + private final CLCommandQueue queue; + + CLEvent(final long pointer, final CLContext context) { + this(pointer, context, null); + } + + CLEvent(final long pointer, final CLCommandQueue queue) { + this(pointer, queue.getParent(), queue); + } + + CLEvent(final long pointer, final CLContext context, final CLCommandQueue queue) { + super(pointer, context); + if ( isValid() ) { + this.queue = queue; + if ( queue == null ) + context.getCLEventRegistry().registerObject(this); + else + queue.getCLEventRegistry().registerObject(this); + } else + this.queue = null; + } + + /** + * Returns the command-queue associated with this event. For + * user events this method returns null. + * + * @return the command-queue or null if this is a user event + */ + public CLCommandQueue getCLCommandQueue() { + return queue; + } + + // ---------------[ UTILITY METHODS ]--------------- + + /** + * Returns the integer value of the specified parameter. + * + * @param param_name the parameter + * + * @return the parameter value + */ + public int getInfoInt(final int param_name) { + return util.getInfoInt(this, param_name); + } + + // clGetEventProfilingInfo methods + + /** + * Returns the long value of the specified parameter. Can be used + * for both cl_ulong and cl_bitfield parameters. + * + * @param param_name the parameter + * + * @return the parameter value + */ + public long getProfilingInfoLong(int param_name) { + return util.getProfilingInfoLong(this, param_name); + } + + /** CLEvent utility methods interface. */ + interface CLEventUtil extends InfoUtil { + + long getProfilingInfoLong(CLEvent event, int param_name); + + } + + // -------[ IMPLEMENTATION STUFF BELOW ]------- + + CLObjectRegistry getParentRegistry() { + if ( queue == null ) + return getParent().getCLEventRegistry(); + else + return queue.getCLEventRegistry(); + } + + int release() { + try { + return super.release(); + } finally { + if ( !isValid() ) { + if ( queue == null ) + getParent().getCLEventRegistry().unregisterObject(this); + else + queue.getCLEventRegistry().unregisterObject(this); + } + } + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLEventCallback.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLEventCallback.java new file mode 100644 index 0000000..3734606 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLEventCallback.java @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.PointerWrapperAbstract; + +/** + * Instances of this class can be used to handle OpenCL event callbacks. A single + * CLEventCallback instance should only be used on events generated from the same + * CLCommandQueue or on user events associated with the same CLContext. + * + * @author Spasi + */ +public abstract class CLEventCallback extends PointerWrapperAbstract { + + private CLObjectRegistry eventRegistry; + + protected CLEventCallback() { + super(CallbackUtil.getEventCallback()); + } + + /** + * Sets the eventRegistry that contains the CLEvents to which we're registered. + * + * @param eventRegistry the CLEvent object registry + */ + void setRegistry(final CLObjectRegistry eventRegistry) { + this.eventRegistry = eventRegistry; + } + + /** + * Called from native code. + * + * @param event_address the CLEvent object pointer + */ + private void handleMessage(long event_address, int event_command_exec_status) { + handleMessage(eventRegistry.getObject(event_address), event_command_exec_status); + } + + /** + * The callback method. + * + * @param event the CLEvent object + * @param event_command_exec_status the execution status + */ + protected abstract void handleMessage(CLEvent event, int event_command_exec_status); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLFunctionAddress.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLFunctionAddress.java new file mode 100644 index 0000000..1b4976a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLFunctionAddress.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.PointerWrapperAbstract; + +/** + * This class is a wrapper around an OpenCL extension function pointer. + * + * @author Spasi + */ +final class CLFunctionAddress extends PointerWrapperAbstract { + + CLFunctionAddress(final long pointer) { + super(pointer); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLKernel.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLKernel.java new file mode 100644 index 0000000..18eecc0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLKernel.java @@ -0,0 +1,262 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +/** + * This class is a wrapper around a cl_kernel pointer. + * + * @author Spasi + */ +public final class CLKernel extends CLObjectChild { + + private static final CLKernelUtil util = (CLKernelUtil)CLPlatform.getInfoUtilInstance(CLKernel.class, "CL_KERNEL_UTIL"); + + CLKernel(final long pointer, final CLProgram program) { + super(pointer, program); + if ( isValid() ) + program.getCLKernelRegistry().registerObject(this); + } + + // ---------------[ UTILITY METHODS ]--------------- + + // clSetKernelArg methods + + /** + * Sets a kernel argument at the specified index to the specified + * byte value. + * + * @param index the argument index + * @param value the argument value + * + * @return this CLKernel object + */ + public CLKernel setArg(final int index, final byte value) { + util.setArg(this, index, value); + return this; + } + + /** + * Sets a kernel argument at the specified index to the specified + * byte value. + * + * @param index the argument index + * @param value the argument value + * + * @return this CLKernel object + */ + public CLKernel setArg(final int index, final short value) { + util.setArg(this, index, value); + return this; + } + + /** + * Sets a kernel argument at the specified index to the specified + * int value. + * + * @param index the argument index + * @param value the argument value + * + * @return this CLKernel object + */ + public CLKernel setArg(final int index, final int value) { + util.setArg(this, index, value); + return this; + } + + /** + * Sets a kernel argument at the specified index to the specified + * long value. + * + * @param index the argument index + * @param value the argument value + * + * @return this CLKernel object + */ + public CLKernel setArg(final int index, final long value) { + util.setArg(this, index, value); + return this; + } + + /** + * Sets a kernel argument at the specified index to the specified + * float value. + * + * @param index the argument index + * @param value the argument value + * + * @return this CLKernel object + */ + public CLKernel setArg(final int index, final float value) { + util.setArg(this, index, value); + return this; + } + + /** + * Sets a kernel argument at the specified index to the specified + * double value. + * + * @param index the argument index + * @param value the argument value + * + * @return this CLKernel object + */ + public CLKernel setArg(final int index, final double value) { + util.setArg(this, index, value); + return this; + } + + /** + * Sets a kernel argument at the specified index to the specified + * pointer value. + * + * @param index the argument index + * @param value the argument value + * + * @return this CLKernel object + */ + public CLKernel setArg(final int index, final CLObject value) { + util.setArg(this, index, value); + return this; + } + + /** + * Sets the size of a __local kernel argument at the specified index. + * + * @param index the argument index + * @param size the argument size + * + * @return this CLKernel object + */ + public CLKernel setArgSize(final int index, final long size) { + util.setArgSize(this, index, size); + return this; + } + + // clGetKernelInfo methods + + /** + * Returns the String value of the specified parameter. + * + * @param param_name the parameter + * + * @return the parameter value + */ + public String getInfoString(final int param_name) { + return util.getInfoString(this, param_name); + } + + /** + * Returns the integer value of the specified parameter. + * + * @param param_name the parameter + * + * @return the parameter value + */ + public int getInfoInt(final int param_name) { + return util.getInfoInt(this, param_name); + } + + // clGetKernelWorkGroupInfo methods + + /** + * Returns the size_t value of the specified parameter. + * + * @param param_name the parameter + * + * @return the parameter value + */ + public long getWorkGroupInfoSize(final CLDevice device, int param_name) { + return util.getWorkGroupInfoSize(this, device, param_name); + } + + /** + * Returns an array of size_t values of the specified parameter. + * + * @param param_name the parameter + * + * @return the parameter values + */ + public long[] getWorkGroupInfoSizeArray(final CLDevice device, int param_name) { + return util.getWorkGroupInfoSizeArray(this, device, param_name); + } + + /** + * Returns the long value of the specified parameter. Can be used + * for both cl_ulong and cl_bitfield parameters. + * + * @param param_name the parameter + * + * @return the parameter value + */ + public long getWorkGroupInfoLong(final CLDevice device, int param_name) { + return util.getWorkGroupInfoLong(this, device, param_name); + } + + /** CLKernel utility methods interface. */ + interface CLKernelUtil extends InfoUtil { + + void setArg(CLKernel kernel, int index, byte value); + + void setArg(CLKernel kernel, int index, short value); + + void setArg(CLKernel kernel, int index, int value); + + void setArg(CLKernel kernel, int index, long value); + + void setArg(CLKernel kernel, int index, float value); + + void setArg(CLKernel kernel, int index, double value); + + void setArg(CLKernel kernel, int index, CLObject pointer); + + void setArgSize(CLKernel kernel, int index, long size); + + long getWorkGroupInfoSize(CLKernel kernel, CLDevice device, int param_name); + + long[] getWorkGroupInfoSizeArray(CLKernel kernel, CLDevice device, int param_name); + + long getWorkGroupInfoLong(CLKernel kernel, CLDevice device, int param_name); + + } + + // -------[ IMPLEMENTATION STUFF BELOW ]------- + + int release() { + try { + return super.release(); + } finally { + if ( !isValid() ) + getParent().getCLKernelRegistry().unregisterObject(this); + } + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLLinkProgramCallback.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLLinkProgramCallback.java new file mode 100644 index 0000000..ea30657 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLLinkProgramCallback.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +/** + * Instances of this class can be used to receive OpenCL program linkage notifications. + * A single CLLinkProgramCallback instance should only be used with programs created + * in the same CLContext. + * + * @author Spasi + */ +public abstract class CLLinkProgramCallback extends CLProgramCallback { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLMem.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLMem.java new file mode 100644 index 0000000..9275b0f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLMem.java @@ -0,0 +1,279 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.opencl.api.CLBufferRegion; +import org.lwjgl.opencl.api.CLImageFormat; + +import java.nio.Buffer; +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +/** + * This class is a wrapper around a cl_mem pointer. + * + * @author Spasi + */ +public final class CLMem extends CLObjectChild { + + private static final CLMemUtil util = (CLMemUtil)CLPlatform.getInfoUtilInstance(CLMem.class, "CL_MEM_UTIL"); + + CLMem(final long pointer, final CLContext context) { + super(pointer, context); + if ( isValid() ) + context.getCLMemRegistry().registerObject(this); + } + + // ---------------[ UTILITY METHODS ]--------------- + + /** + * Creates a new 2D image object. + * + * @param context the context on which to create the image object + * @param flags the memory object flags + * @param image_format the image format + * @param image_width the image width + * @param image_height the image height + * @param image_row_pitch the image row pitch + * @param host_ptr the host buffer from which to read image data (optional) + * @param errcode_ret the error code result + * + * @return the new CLMem object + */ + public static CLMem createImage2D(final CLContext context, final long flags, final CLImageFormat image_format, + final long image_width, final long image_height, final long image_row_pitch, + final Buffer host_ptr, final IntBuffer errcode_ret) { + return util.createImage2D(context, flags, image_format, image_width, image_height, image_row_pitch, host_ptr, errcode_ret); + } + + /** + * Creates a new 3D image object. + * + * @param context the context on which to create the image object + * @param flags the memory object flags + * @param image_format the image format + * @param image_width the image width + * @param image_height the image height + * @param image_depth the image depth + * @param image_row_pitch the image row pitch + * @param image_slice_pitch the image slice pitch + * @param host_ptr the host buffer from which to read image data (optional) + * @param errcode_ret the error code result + * + * @return the new CLMem object + */ + public static CLMem createImage3D(final CLContext context, final long flags, final CLImageFormat image_format, + final long image_width, final long image_height, final long image_depth, final long image_row_pitch, final long image_slice_pitch, + final Buffer host_ptr, final IntBuffer errcode_ret) { + return util.createImage3D(context, flags, image_format, image_width, image_height, image_depth, image_row_pitch, image_slice_pitch, host_ptr, errcode_ret); + } + + public CLMem createSubBuffer(final long flags, final int buffer_create_type, final CLBufferRegion buffer_create_info, final IntBuffer errcode_ret) { + return util.createSubBuffer(this, flags, buffer_create_type, buffer_create_info, errcode_ret); + } + + /** + * Returns the integer value of the specified parameter. + * + * @param param_name the parameter + * + * @return the parameter value + */ + public int getInfoInt(int param_name) { + return util.getInfoInt(this, param_name); + } + + /** + * Returns the size_t value of the specified parameter. + * + * @param param_name the parameter + * + * @return the parameter value + */ + public long getInfoSize(int param_name) { + return util.getInfoSize(this, param_name); + } + + /** + * Returns the long value of the specified parameter. Can be used + * for both cl_ulong and cl_bitfield parameters. + * + * @param param_name the parameter + * + * @return the parameter value + */ + public long getInfoLong(int param_name) { + return util.getInfoLong(this, param_name); + } + + /** + * Returns a direct ByteBuffer instance that points to the host + * memory that backs this CLMem object. Applicable only to CLMem + * objects that were created with the CL_MEM_USE_HOST_PTR flag. + * + * @return the host memory ByteBuffer + */ + public ByteBuffer getInfoHostBuffer() { + return util.getInfoHostBuffer(this); + } + + // clGetImageInfo methods + + /** + * Returns the size_t value of the specified parameter. Applicable to image objects only. + * + * @param param_name the parameter + * + * @return the parameter value + */ + public long getImageInfoSize(int param_name) { + return util.getImageInfoSize(this, param_name); + } + + /** + * Returns the image format. Applicable to image objects only. + * + * @return the parameter value + */ + public CLImageFormat getImageFormat() { + return util.getImageInfoFormat(this); + } + + /** + * Returns the image channel order. Applicable to image objects only. + * + * @return the parameter value + */ + public int getImageChannelOrder() { + return util.getImageInfoFormat(this, 0); + } + + /** + * Returns the image channel type. Applicable to image objects only. + * + * @return the parameter value + */ + public int getImageChannelType() { + return util.getImageInfoFormat(this, 1); + } + + // clGetGLObjectInfo methods + + /** + * Returns the GL object type. Applicable to CLMem objects + * that have been created GL objects only. + * + * @return the parameter value + */ + public int getGLObjectType() { + return util.getGLObjectType(this); + } + + /** + * Returns the GL object name. Applicable to CLMem objects + * that have been created GL objects only. + * + * @return the parameter value + */ + public int getGLObjectName() { + return util.getGLObjectName(this); + } + + // clGetGLTextureInfo methods + + /** + * Returns the int value of the specified parameter. Applicable to CLMem objects + * that have been created by GL textures only. + * + * @param param_name the parameter + * + * @return the parameter value + */ + public int getGLTextureInfoInt(int param_name) { + return util.getGLTextureInfoInt(this, param_name); + } + + /** CLMem utility methods interface. */ + interface CLMemUtil extends InfoUtil { + + CLMem createImage2D(CLContext context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_row_pitch, Buffer host_ptr, IntBuffer errcode_ret); + + CLMem createImage3D(CLContext context, long flags, CLImageFormat image_format, long image_width, long image_height, long image_depth, long image_row_pitch, long image_slice_pitch, Buffer host_ptr, IntBuffer errcode_ret); + + CLMem createSubBuffer(CLMem mem, long flags, int buffer_create_type, CLBufferRegion buffer_create_info, IntBuffer errcode_ret); + + ByteBuffer getInfoHostBuffer(CLMem mem); + + long getImageInfoSize(CLMem mem, int param_name); + + CLImageFormat getImageInfoFormat(CLMem mem); + + int getImageInfoFormat(CLMem mem, int index); + + int getGLObjectType(CLMem mem); + + int getGLObjectName(CLMem mem); + + int getGLTextureInfoInt(CLMem mem, int param_name); + + } + + // -------[ IMPLEMENTATION STUFF BELOW ]------- + + /** + * Sub-buffer factory. clCreateSubBuffer may return an existing CLMem. + * + * @param pointer the sub-buffer id + * @param context the context in which the sub-buffer was created + * + * @return the CLMem that represents the sub-buffer + */ + static CLMem create(final long pointer, final CLContext context) { + CLMem clMem = context.getCLMemRegistry().getObject(pointer); + if ( clMem == null ) + clMem = new CLMem(pointer, context); + else + clMem.retain(); + + return clMem; + } + + int release() { + try { + return super.release(); + } finally { + if ( !isValid() ) + getParent().getCLMemRegistry().unregisterObject(this); + } + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLMemObjectDestructorCallback.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLMemObjectDestructorCallback.java new file mode 100644 index 0000000..944fdcf --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLMemObjectDestructorCallback.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.PointerWrapperAbstract; + +/** + * Instances of this class can be used to receive OpenCL memory object destruction notifications. + * + * @author Spasi + */ +public abstract class CLMemObjectDestructorCallback extends PointerWrapperAbstract { + + protected CLMemObjectDestructorCallback() { + super(CallbackUtil.getMemObjectDestructorCallback()); + } + + /** + * The callback method. + * + * @param memobj id of the CLMem object that was destroyed + */ + protected abstract void handleMessage(long memobj); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLNativeKernel.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLNativeKernel.java new file mode 100644 index 0000000..ed853c4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLNativeKernel.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.PointerWrapperAbstract; + +import java.nio.ByteBuffer; + +/** + * Instances of this class can be used to execute native kernels. clEnqueueNativeKernel will build + * the its arguments automatically, in a way that allows execute to receive an array + * of ByteBuffers, pointing to cl_mem objects in global memory. The ByteBuffer objects should not + * be used outside the handleMessage method. + * + * @author Spasi + * @see CL10#clEnqueueNativeKernel + * @see #execute(java.nio.ByteBuffer[]) + */ +public abstract class CLNativeKernel extends PointerWrapperAbstract { + + protected CLNativeKernel() { + super(CallbackUtil.getNativeKernelCallback()); + } + + /** + * Implement this method to execute an action on cl_mem objects in global memory. + * + * @param memobjs an array of ByteBuffers pointing to cl_mem global memory. + */ + protected abstract void execute(ByteBuffer[] memobjs); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLObject.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLObject.java new file mode 100644 index 0000000..8efd386 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLObject.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.PointerWrapperAbstract; + +/** + * Base class for all OpenCL objects. + * + * @author Spasi + */ +abstract class CLObject extends PointerWrapperAbstract { + + protected CLObject(final long pointer) { + super(pointer); + } + + final long getPointerUnsafe() { + return pointer; + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLObjectChild.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLObjectChild.java new file mode 100644 index 0000000..452566e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLObjectChild.java @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.LWJGLUtil; + +/** + * Base class for all CLObjects that are associated with a parent CLObject. + * + * @author Spasi + */ +abstract class CLObjectChild

extends CLObjectRetainable { + + private final P parent; + + protected CLObjectChild(final long pointer, final P parent) { + super(pointer); + + if ( LWJGLUtil.DEBUG && parent != null && !parent.isValid() ) + throw new IllegalStateException("The parent specified is not a valid CL object."); + + this.parent = parent; + } + + public P getParent() { + return parent; + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLObjectRegistry.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLObjectRegistry.java new file mode 100644 index 0000000..39272a2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLObjectRegistry.java @@ -0,0 +1,54 @@ +package org.lwjgl.opencl; + +import org.lwjgl.LWJGLUtil; + +/** + * A CLObjectChild container. + * + * @author Spasi + */ +class CLObjectRegistry { + + private FastLongMap registry; + + CLObjectRegistry() { + } + + final boolean isEmpty() { + return registry == null || registry.isEmpty(); + } + + final T getObject(final long id) { + return registry == null ? null : registry.get(id); + } + + final boolean hasObject(final long id) { + return registry != null && registry.containsKey(id); + } + + final Iterable> getAll() { + return registry; + } + + void registerObject(final T object) { + final FastLongMap map = getMap(); + final Long key = object.getPointer(); + + if ( LWJGLUtil.DEBUG && map.containsKey(key) ) + throw new IllegalStateException("Duplicate object found: " + object.getClass() + " - " + key); + + getMap().put(object.getPointer(), object); + } + + void unregisterObject(final T object) { + getMap().remove(object.getPointerUnsafe()); + } + + private FastLongMap getMap() { + if ( registry == null ) + registry = new FastLongMap(); + + return registry; + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLObjectRetainable.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLObjectRetainable.java new file mode 100644 index 0000000..c6ebe7b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLObjectRetainable.java @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +/** + * Base class for all retainable OpenCL objects. + * + * @author Spasi + */ +abstract class CLObjectRetainable extends CLObject { + + private int refCount; + + protected CLObjectRetainable(final long pointer) { + super(pointer); + + if ( super.isValid() ) + this.refCount = 1; + } + + public final int getReferenceCount() { + return refCount; + } + + public final boolean isValid() { + return refCount > 0; + } + + int retain() { + checkValid(); + //System.out.println(getClass().getSimpleName() + " REF COUNT: " + pointer + " - " + (refCount + 1)); + return ++refCount; + } + + int release() { + checkValid(); + //System.out.println(getClass().getSimpleName() + " REF COUNT: " + pointer + " - " + (refCount - 1)); + return --refCount; + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLPlatform.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLPlatform.java new file mode 100644 index 0000000..2082052 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLPlatform.java @@ -0,0 +1,226 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.PointerBuffer; +import org.lwjgl.opencl.api.Filter; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; +import java.util.List; + +import static java.lang.Math.*; + +/** + * This class is a wrapper around a cl_platform_id pointer. + * + * @author Spasi + */ +public final class CLPlatform extends CLObject { + + private static final CLPlatformUtil util = (CLPlatformUtil)getInfoUtilInstance(CLPlatform.class, "CL_PLATFORM_UTIL"); + + private static final FastLongMap clPlatforms = new FastLongMap(); + + private final CLObjectRegistry clDevices; + + private Object caps; + + CLPlatform(final long pointer) { + super(pointer); + + if ( isValid() ) { + clPlatforms.put(pointer, this); + clDevices = new CLObjectRegistry(); + } else + clDevices = null; + } + + /** + * Returns a CLPlatform with the specified id. + * + * @param id the platform object id + * + * @return the CLPlatform object + */ + public static CLPlatform getCLPlatform(final long id) { return clPlatforms.get(id); } + + /** + * Returns a CLDevice that is available on this platform. + * + * @param id the device object id + * + * @return the CLDevice object + */ + public CLDevice getCLDevice(final long id) { return clDevices.getObject(id); } + + // ---------------[ UTILITY METHODS ]--------------- + + @SuppressWarnings("unchecked") + static InfoUtil getInfoUtilInstance(final Class clazz, final String fieldName) { + InfoUtil instance = null; + try { + final Class infoUtil = Class.forName("org.lwjgl.opencl.InfoUtilFactory"); + instance = (InfoUtil)infoUtil.getDeclaredField(fieldName).get(null); + } catch (Exception e) { + // Ignore + } + return instance; + } + + /** + * Returns a list of all the available platforms. + * + * @return the available platforms + */ + public static List getPlatforms() { + return getPlatforms(null); + } + + /** + * Returns a list of the available platforms, filtered by the specified filter. + * + * @param filter the platform filter + * + * @return the available platforms + */ + public static List getPlatforms(final Filter filter) { + return util.getPlatforms(filter); + } + + /** + * Returns the String value of the specified parameter. + * + * @param param_name the parameter + * + * @return the parameter value + */ + public String getInfoString(int param_name) { + return util.getInfoString(this, param_name); + } + + /** + * Returns a list of the available devices on this platform that + * match the specified type. + * + * @param device_type the device type + * + * @return the available devices + */ + public List getDevices(final int device_type) { + return getDevices(device_type, null); + } + + /** + * Returns a list of the available devices on this platform that + * match the specified type, filtered by the specified filter. + * + * @param device_type the device type + * @param filter the device filter + * + * @return the available devices + */ + public List getDevices(final int device_type, final Filter filter) { + return util.getDevices(this, device_type, filter); + } + + /** CLPlatform utility methods interface. */ + interface CLPlatformUtil extends InfoUtil { + + List getPlatforms(Filter filter); + + List getDevices(CLPlatform platform, int device_type, final Filter filter); + + } + + // -------[ IMPLEMENTATION STUFF BELOW ]------- + + void setCapabilities(final Object caps) { + this.caps = caps; + } + + Object getCapabilities() { + return caps; + } + + /** + * Called from clGetPlatformIDs to register new platforms. + * + * @param platforms a buffer containing CLPlatform pointers. + */ + static void registerCLPlatforms(final PointerBuffer platforms, final IntBuffer num_platforms) { + if ( platforms == null ) + return; + + final int pos = platforms.position(); + final int count = min(num_platforms.get(0), platforms.remaining()); // We can't depend on .remaining() + for ( int i = 0; i < count; i++ ) { + final long id = platforms.get(pos + i); + if ( !clPlatforms.containsKey(id) ) + new CLPlatform(id); + } + } + + CLObjectRegistry getCLDeviceRegistry() { return clDevices; } + + /** + * Called from clGetDeviceIDs to register new devices. + * + * @param devices a buffer containing CLDevice pointers. + */ + void registerCLDevices(final PointerBuffer devices, final IntBuffer num_devices) { + final int pos = devices.position(); + final int count = min(num_devices.get(num_devices.position()), devices.remaining()); // We can't depend on .remaining() + for ( int i = 0; i < count; i++ ) { + final long id = devices.get(pos + i); + if ( !clDevices.hasObject(id) ) + new CLDevice(id, this); + } + } + + /** + * Called from clGetContextInfo to register new devices. + * + * @param devices a buffer containing CLDevice pointers. + */ + void registerCLDevices(final ByteBuffer devices, final PointerBuffer num_devices) { + final int pos = devices.position(); + final int count = min((int)num_devices.get(num_devices.position()), devices.remaining()) / PointerBuffer.getPointerSize(); // We can't depend on .remaining() + for ( int i = 0; i < count; i++ ) { + final int offset = pos + (i * PointerBuffer.getPointerSize()); + final long id = PointerBuffer.is64Bit() ? devices.getLong(offset) : devices.getInt(offset); + if ( !clDevices.hasObject(id) ) + new CLDevice(id, this); + } + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLPrintfCallback.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLPrintfCallback.java new file mode 100644 index 0000000..9355f30 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLPrintfCallback.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.PointerWrapperAbstract; + +/** + * Instances of this class can be used to receive OpenCL printf messages. + * Different CLContexts should use different CLPrintfCallback instances. + * + * @author Spasi + */ +public abstract class CLPrintfCallback extends PointerWrapperAbstract { + + protected CLPrintfCallback() { + super(CallbackUtil.getPrintfCallback()); + } + + /** The callback method. */ + protected abstract void handleMessage(String data); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLProgram.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLProgram.java new file mode 100644 index 0000000..1c651ed --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLProgram.java @@ -0,0 +1,220 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.PointerBuffer; + +import java.nio.ByteBuffer; + +/** + * This class is a wrapper around a cl_program pointer. + * + * @author Spasi + */ +public final class CLProgram extends CLObjectChild { + + private static final CLProgramUtil util = (CLProgramUtil)CLPlatform.getInfoUtilInstance(CLProgram.class, "CL_PROGRAM_UTIL"); + + private final CLObjectRegistry clKernels; + + CLProgram(final long pointer, final CLContext context) { + super(pointer, context); + + if ( isValid() ) { + context.getCLProgramRegistry().registerObject(this); + clKernels = new CLObjectRegistry(); + } else + clKernels = null; + } + + /** + * Returns a CLKernel associated with this program. + * + * @param id the kernel id + * + * @return the CLKernel object + */ + public CLKernel getCLKernel(final long id) { + return clKernels.getObject(id); + } + + // ---------------[ UTILITY METHODS ]--------------- + + /** + * Creates kernel objects for all kernels functions in this program. + * + * @return a CLKernel array + */ + public CLKernel[] createKernelsInProgram() { + return util.createKernelsInProgram(this); + } + + /** + * Returns the String value of the specified parameter. + * + * @param param_name the parameter + * + * @return the parameter value + */ + public String getInfoString(final int param_name) { + return util.getInfoString(this, param_name); + } + + /** + * Returns the integer value of the specified parameter. + * + * @param param_name the parameter + * + * @return the parameter value + */ + public int getInfoInt(final int param_name) { + return util.getInfoInt(this, param_name); + } + + /** + * Returns an array of size_t values of the specified parameter. + * + * @param param_name the parameter + * + * @return the parameter values + */ + public long[] getInfoSizeArray(final int param_name) { + return util.getInfoSizeArray(this, param_name); + } + + /** + * Returns an array of CLDevices associated with this program. + * + * @return the array of devices + */ + public CLDevice[] getInfoDevices() { + return util.getInfoDevices(this); + } + + /** + * Returns the program binaries for all devices associated with program, + * written sequentially in the target ByteBuffer. If the target + * parameter is null, a new ByteBuffer will be allocated. If not, the + * target ByteBuffer must be big enough to hold the program binaries, as + * returned by CL_PROGRAM_BINARY_SIZES. + * + * @param target the target ByteBuffer array. + * + * @return the array of devices + */ + public ByteBuffer getInfoBinaries(final ByteBuffer target) { + return util.getInfoBinaries(this, target); + } + + /** + * Returns the program binaries for all devices associated with program, + * as a ByteBuffer array. If the target parameter is null, + * a new ByteBuffer array will be allocated. If not, the target ByteBuffers + * must be big enough to hold the program binaries, as returned by + * CL_PROGRAM_BINARY_SIZES. + * + * @param target the target ByteBuffer array. + * + * @return the array of devices + */ + public ByteBuffer[] getInfoBinaries(final ByteBuffer[] target) { + return util.getInfoBinaries(this, target); + } + + // clGetProgramBuildInfo methods + + /** + * Returns the String value of the specified parameter. + * + * @param param_name the parameter + * + * @return the parameter value + */ + public String getBuildInfoString(final CLDevice device, final int param_name) { + return util.getBuildInfoString(this, device, param_name); + } + + /** + * Returns the integer value of the specified parameter. + * + * @param param_name the parameter + * + * @return the parameter value + */ + public int getBuildInfoInt(final CLDevice device, final int param_name) { + return util.getBuildInfoInt(this, device, param_name); + } + + /** CLProgram utility methods interface. */ + interface CLProgramUtil extends InfoUtil { + + CLKernel[] createKernelsInProgram(CLProgram program); + + CLDevice[] getInfoDevices(CLProgram program); + + ByteBuffer getInfoBinaries(CLProgram program, ByteBuffer target); + + ByteBuffer[] getInfoBinaries(CLProgram program, ByteBuffer[] target); + + String getBuildInfoString(CLProgram program, final CLDevice device, int param_name); + + int getBuildInfoInt(CLProgram program, final CLDevice device, int param_name); + + } + + // -------[ IMPLEMENTATION STUFF BELOW ]------- + + CLObjectRegistry getCLKernelRegistry() { return clKernels; } + + /** + * Called from clCreateKernelsInProgram to register new CLKernels. + * + * @param kernels a buffer containing CLKernel pointers. + */ + void registerCLKernels(final PointerBuffer kernels) { + for ( int i = kernels.position(); i < kernels.limit(); i++ ) { + final long pointer = kernels.get(i); + if ( pointer != 0 ) + new CLKernel(pointer, this); + } + } + + int release() { + try { + return super.release(); + } finally { + if ( !isValid() ) + getParent().getCLProgramRegistry().unregisterObject(this); + } + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLProgramCallback.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLProgramCallback.java new file mode 100644 index 0000000..675eafc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLProgramCallback.java @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.PointerWrapperAbstract; + +/** + * Base class for OpenCL program action notifications. + * + * @author Spasi + */ +abstract class CLProgramCallback extends PointerWrapperAbstract { + + private CLContext context; + + protected CLProgramCallback() { + super(CallbackUtil.getProgramCallback()); + } + + /** + * Sets the context that contains the CLPrograms to which we're registered. + * + * @param context the CLContext object + */ + final void setContext(final CLContext context) { + this.context = context; + } + + /** + * Called from native code. + * + * @param program_address the CLProgram object pointer + */ + private void handleMessage(long program_address) { + handleMessage(context.getCLProgram(program_address)); + } + + /** + * The callback method. + * + * @param program the CLProgram object affected + */ + protected abstract void handleMessage(CLProgram program); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLSampler.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLSampler.java new file mode 100644 index 0000000..eeba203 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CLSampler.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +/** + * This class is a wrapper around a cl_sampler pointer. + * + * @author Spasi + */ +public final class CLSampler extends CLObjectChild { + + private static final InfoUtil util = CLPlatform.getInfoUtilInstance(CLSampler.class, "CL_SAMPLER_UTIL"); + + CLSampler(final long pointer, final CLContext context) { + super(pointer, context); + if ( isValid() ) + context.getCLSamplerRegistry().registerObject(this); + } + + // ---------------[ UTILITY METHODS ]--------------- + + /** + * Returns the integer value of the specified parameter. + * + * @param param_name the parameter + * + * @return the parameter value + */ + public int getInfoInt(int param_name) { + return util.getInfoInt(this, param_name); + } + + /** + * Returns the long value of the specified parameter. Can be used + * for both cl_ulong and cl_bitfield parameters. + * + * @param param_name the parameter + * + * @return the parameter value + */ + public long getInfoLong(int param_name) { + return util.getInfoLong(this, param_name); + } + + // -------[ IMPLEMENTATION STUFF BELOW ]------- + + int release() { + try { + return super.release(); + } finally { + if ( !isValid() ) + getParent().getCLSamplerRegistry().unregisterObject(this); + } + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CallbackUtil.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CallbackUtil.java new file mode 100644 index 0000000..6fb6f09 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/CallbackUtil.java @@ -0,0 +1,172 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import java.util.HashMap; +import java.util.Map; + +/** + * Utility class that handles OpenCL API callbacks. + * + * @author Spasi + */ +final class CallbackUtil { + + private static final Map contextUserData = new HashMap(); + + private CallbackUtil() {} + + /** + * Creates a new global reference to the specified Object. + * + * @param obj the Object + * + * @return the GlobalRef memory address or 0 if the Object is null. + */ + static long createGlobalRef(final Object obj) { + return obj == null ? 0 : ncreateGlobalRef(obj); + } + + /** + * Creates a new global reference to the specified Object. + * + * @param obj the Object + * + * @return the GlobalRef memory address. + */ + private static native long ncreateGlobalRef(Object obj); + + /** + * Deletes a global reference. + * + * @param ref the GlobalRef memory address. + */ + static native void deleteGlobalRef(long ref); + + /** + * Deletes the global reference represented by user_data if an OpenCL error occured. + * + * @param errcode the error code + * @param user_data the GlobalRef memory address + */ + static void checkCallback(final int errcode, final long user_data) { + if ( errcode != 0x0 && user_data != 0 ) + deleteGlobalRef(user_data); + } + + /* [ Context callback functionality ] + This is a little weird, so here's an explanation of what's happening for future reference: + Before making the clCreateContext call we create a global reference to the CLContextCallback object (using JNI's NewGlobalRef function). + We pass that global reference to the user_data parameter of clCreateContext. If clCreateContext returns anything but CL_SUCCESS, we + immediately destroy the global reference to avoid the memory leak. If the new context was created successfully, we associate the context + with the global reference in the contextUserData HashMap. On a future call to clReleaseContext, we clear that association and destroy the + global reference (if the reference count is 0). + */ + + /** + * Returns the memory address of the native function we pass to clCreateContext(FromType). + * + * @return the callback function address + */ + static native long getContextCallback(); + + /* [ Other callback functionality ] + The other callbacks are simpler. We create the GlobalRef before passing the callback, + we delete it when we receive the callback call. + */ + + /** + * Returns the memory address of the native function we pass to clSetMemObjectDestructorCallback. + * + * @return the callback function address + */ + static native long getMemObjectDestructorCallback(); + + /** + * Returns the memory address of the native function we pass to clBuildProgram. + * + * @return the callback function address + */ + static native long getProgramCallback(); + + /** + * Returns the memory address of the native function we pass to clEnqueueNativeKernel. + * + * @return the callback function address + */ + static native long getNativeKernelCallback(); + + /** + * Returns the memory address of the native function we pass to clSetEventCallback. + * + * @return the callback function address + */ + static native long getEventCallback(); + + /** + * Returns the memory address of the native function we pass to clSetPrintfCallback. + * + * @return the callback function address + */ + static native long getPrintfCallback(); + + /** + * Returns the memory address of the native function we pass to clCreateContext(FromType), + * when APPLEContextLoggingUtil.SYSTEM_LOG_CALLBACK is used. + * + * @return the callback function address + * + * @see APPLEContextLoggingUtil#SYSTEM_LOG_CALLBACK + */ + static native long getLogMessageToSystemLogAPPLE(); + + /** + * Returns the memory address of the native function we pass to clCreateContext(FromType), + * when APPLEContextLoggingUtil.STD_OUT_CALLBACK is used. + * + * @return the callback function address + * + * @see APPLEContextLoggingUtil#STD_OUT_CALLBACK + */ + static native long getLogMessageToStdoutAPPLE(); + + /** + * Returns the memory address of the native function we pass to clCreateContext(FromType), + * when APPLEContextLoggingUtil.STD_ERR_CALLBACK is used. + * + * @return the callback function address + * + * @see APPLEContextLoggingUtil#STD_ERR_CALLBACK + */ + static native long getLogMessageToStderrAPPLE(); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/FastLongMap.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/FastLongMap.java new file mode 100644 index 0000000..c1c6aab --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/FastLongMap.java @@ -0,0 +1,239 @@ +/* + * Copyright 2002-2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" + * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ +package org.lwjgl.opencl; + +import java.util.Iterator; + +/** + * A hash map using primitive longs as keys rather than objects. + * + * @author Justin Couch + * @author Alex Chaffee (alex@apache.org) + * @author Stephen Colebourne + * @author Nathan Sweet + */ +final class FastLongMap implements Iterable> { + + private Entry[] table; + private int size, mask, capacity, threshold; + + /** Same as: FastLongMap(16, 0.75f); */ + FastLongMap() { + this(16, 0.75f); + } + + /** Same as: FastLongMap(initialCapacity, 0.75f); */ + FastLongMap(int initialCapacity) { + this(initialCapacity, 0.75f); + } + + FastLongMap(int initialCapacity, float loadFactor) { + if ( initialCapacity > 1 << 30 ) throw new IllegalArgumentException("initialCapacity is too large."); + if ( initialCapacity < 0 ) throw new IllegalArgumentException("initialCapacity must be greater than zero."); + if ( loadFactor <= 0 ) throw new IllegalArgumentException("initialCapacity must be greater than zero."); + capacity = 1; + while ( capacity < initialCapacity ) + capacity <<= 1; + this.threshold = (int)(capacity * loadFactor); + this.table = new Entry[capacity]; + this.mask = capacity - 1; + } + + private int index(final long key) { + return index(key, mask); + } + + private static int index(final long key, final int mask) { + final int hash = (int)(key ^ (key >>> 32)); + return hash & mask; + } + + public V put(long key, V value) { + final Entry[] table = this.table; + int index = index(key); + + // Check if key already exists. + for ( Entry e = table[index]; e != null; e = e.next ) { + if ( e.key != key ) continue; + V oldValue = e.value; + e.value = value; + return oldValue; + } + + table[index] = new Entry(key, value, table[index]); + + if ( size++ >= threshold ) + rehash(table); + + return null; + } + + private void rehash(final Entry[] table) { + final int newCapacity = 2 * capacity; + final int newMask = newCapacity - 1; + + final Entry[] newTable = new Entry[newCapacity]; + + for ( int i = 0, index; i < table.length; i++ ) { + Entry e = table[i]; + if ( e == null ) continue; + do { + final Entry next = e.next; + index = index(e.key, newMask); + e.next = newTable[index]; + newTable[index] = e; + e = next; + } while ( e != null ); + } + + this.table = newTable; + capacity = newCapacity; + mask = newMask; + threshold *= 2; + } + + public V get(long key) { + final int index = index(key); + for ( Entry e = table[index]; e != null; e = e.next ) + if ( e.key == key ) return e.value; + return null; + } + + public boolean containsValue(Object value) { + final Entry[] table = this.table; + for ( int i = table.length - 1; i >= 0; i-- ) + for ( Entry e = table[i]; e != null; e = e.next ) + if ( e.value.equals(value) ) return true; + return false; + } + + public boolean containsKey(long key) { + final int index = index(key); + for ( Entry e = table[index]; e != null; e = e.next ) + if ( e.key == key ) return true; + return false; + } + + public V remove(long key) { + final int index = index(key); + + Entry prev = table[index]; + Entry e = prev; + while ( e != null ) { + Entry next = e.next; + if ( e.key == key ) { + size--; + if ( prev == e ) + table[index] = next; + else + prev.next = next; + return e.value; + } + prev = e; + e = next; + } + return null; + } + + public int size() { + return size; + } + + public boolean isEmpty() { + return size == 0; + } + + public void clear() { + final Entry[] table = this.table; + for ( int index = table.length - 1; index >= 0; index-- ) + table[index] = null; + size = 0; + } + + public EntryIterator iterator() { + return new EntryIterator(); + } + + public class EntryIterator implements Iterator> { + + private int nextIndex; + private Entry current; + + EntryIterator() { + reset(); + } + + public void reset() { + current = null; + // Find first bucket. + final Entry[] table = FastLongMap.this.table; + int i; + for ( i = table.length - 1; i >= 0; i-- ) + if ( table[i] != null ) break; + nextIndex = i; + } + + public boolean hasNext() { + if ( nextIndex >= 0 ) return true; + Entry e = current; + return e != null && e.next != null; + } + + public Entry next() { + // Next entry in current bucket. + Entry e = current; + if ( e != null ) { + e = e.next; + if ( e != null ) { + current = e; + return e; + } + } + // Use the bucket at nextIndex and find the next nextIndex. + final Entry[] table = FastLongMap.this.table; + int i = nextIndex; + e = current = table[i]; + while ( --i >= 0 ) + if ( table[i] != null ) break; + nextIndex = i; + return e; + } + + public void remove() { + FastLongMap.this.remove(current.key); + } + } + + static final class Entry { + + final long key; + T value; + Entry next; + + Entry(long key, T value, Entry next) { + this.key = key; + this.value = value; + this.next = next; + } + + public long getKey() { + return key; + } + + public T getValue() { + return value; + } + + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/InfoUtil.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/InfoUtil.java new file mode 100644 index 0000000..c94b59a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/InfoUtil.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +/** + * Base interface for information utility classes. + * + * @author Spasi + */ +interface InfoUtil { + + int getInfoInt(final T object, final int param_name); + + long getInfoSize(final T object, final int param_name); + + long[] getInfoSizeArray(final T object, final int param_name); + + long getInfoLong(final T object, final int param_name); + + String getInfoString(final T object, final int param_name); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/InfoUtilAbstract.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/InfoUtilAbstract.java new file mode 100644 index 0000000..44d9f90 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/InfoUtilAbstract.java @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.LWJGLUtil; +import org.lwjgl.PointerBuffer; + +import java.nio.ByteBuffer; + +import static org.lwjgl.opencl.CL10.*; + +/** + * Base implementation of information utility classes. + * + * @author Spasi + */ +abstract class InfoUtilAbstract implements InfoUtil { + + protected InfoUtilAbstract() { + } + + protected abstract int getInfo(T object, int param_name, ByteBuffer param_value, PointerBuffer param_value_size_ret); + + // Optional + + protected int getInfoSizeArraySize(final T object, final int param_name) { + throw new UnsupportedOperationException(); + } + + protected PointerBuffer getSizesBuffer(final T object, final int param_name) { + final int size = getInfoSizeArraySize(object, param_name); + + final PointerBuffer buffer = APIUtil.getBufferPointer(size); + buffer.limit(size); + + getInfo(object, param_name, buffer.getBuffer(), null); + + return buffer; + } + + public int getInfoInt(final T object, final int param_name) { + object.checkValid(); + + final ByteBuffer buffer = APIUtil.getBufferByte(4); + getInfo(object, param_name, buffer, null); + + return buffer.getInt(0); + } + + public long getInfoSize(final T object, final int param_name) { + object.checkValid(); + + final PointerBuffer buffer = APIUtil.getBufferPointer(); + getInfo(object, param_name, buffer.getBuffer(), null); + + return buffer.get(0); + } + + public long[] getInfoSizeArray(final T object, final int param_name) { + object.checkValid(); + + final int size = getInfoSizeArraySize(object, param_name); + final PointerBuffer buffer = APIUtil.getBufferPointer(size); + + getInfo(object, param_name, buffer.getBuffer(), null); + + final long[] array = new long[size]; + for ( int i = 0; i < size; i++ ) + array[i] = buffer.get(i); + + return array; + } + + public long getInfoLong(final T object, final int param_name) { + object.checkValid(); + + final ByteBuffer buffer = APIUtil.getBufferByte(8); + getInfo(object, param_name, buffer, null); + + return buffer.getLong(0); + } + + public String getInfoString(final T object, final int param_name) { + object.checkValid(); + + final int bytes = getSizeRet(object, param_name); + if ( bytes <= 1 ) + return null; + + final ByteBuffer buffer = APIUtil.getBufferByte(bytes); + getInfo(object, param_name, buffer, null); + + buffer.limit(bytes - 1); // Exclude null-termination + return APIUtil.getString(buffer); + } + + protected final int getSizeRet(final T object, final int param_name) { + final PointerBuffer bytes = APIUtil.getBufferPointer(); + final int errcode = getInfo(object, param_name, null, bytes); + if ( errcode != CL_SUCCESS ) + throw new IllegalArgumentException("Invalid parameter specified: " + LWJGLUtil.toHexString(param_name)); + + return (int)bytes.get(0); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/InfoUtilFactory.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/InfoUtilFactory.java new file mode 100644 index 0000000..66bacde --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/InfoUtilFactory.java @@ -0,0 +1,606 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.*; +import org.lwjgl.opencl.api.CLBufferRegion; +import org.lwjgl.opencl.api.CLImageFormat; +import org.lwjgl.opencl.api.Filter; +import org.lwjgl.opengl.Drawable; + +import java.nio.Buffer; +import java.nio.ByteBuffer; +import java.nio.IntBuffer; +import java.util.ArrayList; +import java.util.List; + +import static org.lwjgl.opencl.CL10.*; +import static org.lwjgl.opencl.CL10GL.*; +import static org.lwjgl.opencl.CL11.*; + +/** + * This class contains concrete InfoUtil implementations for our CLObject + * class. The public CLObject classes are grabbing these via reflection, + * so that they can be compiled for the generator. + * + * @author Spasi + */ +final class InfoUtilFactory { + + private InfoUtilFactory() {} + + static final InfoUtil CL_COMMAND_QUEUE_UTIL = new InfoUtilAbstract() { + protected int getInfo(final CLCommandQueue object, final int param_name, final ByteBuffer param_value, final PointerBuffer param_value_size_ret) { + return clGetCommandQueueInfo(object, param_name, param_value, null); + } + }; + + static final CLContext.CLContextUtil CL_CONTEXT_UTIL = new CLContextUtil(); + private static final class CLContextUtil extends InfoUtilAbstract implements CLContext.CLContextUtil { + + protected int getInfo(final CLContext context, final int param_name, final ByteBuffer param_value, final PointerBuffer param_value_size_ret) { + return clGetContextInfo(context, param_name, param_value, param_value_size_ret); + } + + public List getInfoDevices(final CLContext context) { + context.checkValid(); + + final int num_devices; + + if ( CLCapabilities.getPlatformCapabilities(context.getParent()).OpenCL11 ) + num_devices = getInfoInt(context, CL_CONTEXT_NUM_DEVICES); + else { + final PointerBuffer size_ret = APIUtil.getBufferPointer(); + clGetContextInfo(context, CL_CONTEXT_DEVICES, null, size_ret); + num_devices = (int)(size_ret.get(0) / PointerBuffer.getPointerSize()); + } + + final PointerBuffer deviceIDs = APIUtil.getBufferPointer(num_devices); + clGetContextInfo(context, CL_CONTEXT_DEVICES, deviceIDs.getBuffer(), null); + + final List devices = new ArrayList(num_devices); + for ( int i = 0; i < num_devices; i++ ) + devices.add(context.getParent().getCLDevice(deviceIDs.get(i))); + + return devices.size() == 0 ? null : devices; + + } + + /** Custom clCreateContext implementation (reuses APIUtil.getBufferPointer) */ + public CLContext create(final CLPlatform platform, final List devices, final CLContextCallback pfn_notify, final Drawable share_drawable, IntBuffer errcode_ret) throws LWJGLException { + final int propertyCount = 2 + (share_drawable == null ? 0 : 4) + 1; + + final PointerBuffer properties = APIUtil.getBufferPointer(propertyCount + devices.size()); + properties.put(CL_CONTEXT_PLATFORM).put(platform); + if ( share_drawable != null ) + share_drawable.setCLSharingProperties(properties); + properties.put(0); + + properties.position(propertyCount); // Make sure we're at the right offset, setCLSharingProperties might not use all 4 positions. + for ( CLDevice device : devices ) + properties.put(device); + + final long function_pointer = CLCapabilities.clCreateContext; + BufferChecks.checkFunctionAddress(function_pointer); + if ( errcode_ret != null ) + BufferChecks.checkBuffer(errcode_ret, 1); + else if ( LWJGLUtil.DEBUG ) + errcode_ret = APIUtil.getBufferInt(); + final long user_data = pfn_notify == null || pfn_notify.isCustom() ? 0 : CallbackUtil.createGlobalRef(pfn_notify); + CLContext __result = null; + try { + __result = new CLContext(nclCreateContext(MemoryUtil.getAddress0(properties.getBuffer()), devices.size(), MemoryUtil.getAddress(properties, propertyCount), pfn_notify == null ? 0 : pfn_notify.getPointer(), user_data, MemoryUtil.getAddressSafe(errcode_ret), function_pointer), platform); + if ( LWJGLUtil.DEBUG ) + Util.checkCLError(errcode_ret.get(0)); + return __result; + } finally { + if ( __result != null ) __result.setContextCallback(user_data); + } + } + + public CLContext createFromType(final CLPlatform platform, final long device_type, final CLContextCallback pfn_notify, final Drawable share_drawable, final IntBuffer errcode_ret) throws LWJGLException { + final int propertyCount = 2 + (share_drawable == null ? 0 : 4) + 1; + + final PointerBuffer properties = APIUtil.getBufferPointer(propertyCount); + properties.put(CL_CONTEXT_PLATFORM).put(platform); + if ( share_drawable != null ) + share_drawable.setCLSharingProperties(properties); + properties.put(0); + properties.flip(); + + return clCreateContextFromType(properties, device_type, pfn_notify, errcode_ret); + } + + public List getSupportedImageFormats(final CLContext context, final long flags, final int image_type, final Filter filter) { + final IntBuffer numBuffer = APIUtil.getBufferInt(); + clGetSupportedImageFormats(context, flags, image_type, null, numBuffer); + + final int num_image_formats = numBuffer.get(0); + if ( num_image_formats == 0 ) + return null; + + final ByteBuffer formatBuffer = BufferUtils.createByteBuffer(num_image_formats * CLImageFormat.STRUCT_SIZE); + clGetSupportedImageFormats(context, flags, image_type, formatBuffer, null); + + final List formats = new ArrayList(num_image_formats); + for ( int i = 0; i < num_image_formats; i++ ) { + final int offset = num_image_formats * CLImageFormat.STRUCT_SIZE; + final CLImageFormat format = new CLImageFormat( + formatBuffer.getInt(offset), + formatBuffer.getInt(offset + 4) + ); + if ( filter == null || filter.accept(format) ) + formats.add(format); + } + + return formats.size() == 0 ? null : formats; + } + + } + + static final InfoUtil CL_DEVICE_UTIL = new CLDeviceUtil(); + private static final class CLDeviceUtil extends InfoUtilAbstract { + + protected int getInfo(final CLDevice device, final int param_name, final ByteBuffer param_value, final PointerBuffer param_value_size_ret) { + return clGetDeviceInfo(device, param_name, param_value, param_value_size_ret); + } + + protected int getInfoSizeArraySize(final CLDevice device, final int param_name) { + switch ( param_name ) { + case CL_DEVICE_MAX_WORK_ITEM_SIZES: + return getInfoInt(device, CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS); + default: + throw new IllegalArgumentException("Unsupported parameter: " + LWJGLUtil.toHexString(param_name)); + } + } + + } + + static final CLEvent.CLEventUtil CL_EVENT_UTIL = new CLEventUtil(); + private static final class CLEventUtil extends InfoUtilAbstract implements CLEvent.CLEventUtil { + + protected int getInfo(final CLEvent event, final int param_name, final ByteBuffer param_value, final PointerBuffer param_value_size_ret) { + return clGetEventInfo(event, param_name, param_value, param_value_size_ret); + } + + public long getProfilingInfoLong(final CLEvent event, final int param_name) { + event.checkValid(); + + final ByteBuffer buffer = APIUtil.getBufferByte(8); + clGetEventProfilingInfo(event, param_name, buffer, null); + + return buffer.getLong(0); + } + + } + + static final CLKernel.CLKernelUtil CL_KERNEL_UTIL = new CLKernelUtil(); + private static final class CLKernelUtil extends InfoUtilAbstract implements CLKernel.CLKernelUtil { + + public void setArg(final CLKernel kernel, final int index, final byte value) { + clSetKernelArg(kernel, index, 1, APIUtil.getBufferByte(1).put(0, value)); + } + + public void setArg(final CLKernel kernel, final int index, final short value) { + clSetKernelArg(kernel, index, 2, APIUtil.getBufferShort().put(0, value)); + } + + public void setArg(final CLKernel kernel, final int index, final int value) { + clSetKernelArg(kernel, index, 4, APIUtil.getBufferInt().put(0, value)); + } + + public void setArg(final CLKernel kernel, final int index, final long value) { + clSetKernelArg(kernel, index, 8, APIUtil.getBufferLong().put(0, value)); + } + + public void setArg(final CLKernel kernel, final int index, final float value) { + clSetKernelArg(kernel, index, 4, APIUtil.getBufferFloat().put(0, value)); + } + + public void setArg(final CLKernel kernel, final int index, final double value) { + clSetKernelArg(kernel, index, 8, APIUtil.getBufferDouble().put(0, value)); + } + + public void setArg(final CLKernel kernel, final int index, final CLObject value) { + clSetKernelArg(kernel, index, value); + } + + public void setArgSize(final CLKernel kernel, final int index, final long size) { + clSetKernelArg(kernel, index, size); + } + + protected int getInfo(final CLKernel kernel, final int param_name, final ByteBuffer param_value, final PointerBuffer param_value_size_ret) { + return clGetKernelInfo(kernel, param_name, param_value, param_value_size_ret); + } + + public long getWorkGroupInfoSize(final CLKernel kernel, final CLDevice device, final int param_name) { + device.checkValid(); + + final PointerBuffer buffer = APIUtil.getBufferPointer(); + clGetKernelWorkGroupInfo(kernel, device, param_name, buffer.getBuffer(), null); + + return buffer.get(0); + } + + public long[] getWorkGroupInfoSizeArray(final CLKernel kernel, final CLDevice device, final int param_name) { + device.checkValid(); + + final int size; + switch ( param_name ) { + case CL_KERNEL_COMPILE_WORK_GROUP_SIZE: + size = 3; + break; + default: + throw new IllegalArgumentException("Unsupported parameter: " + LWJGLUtil.toHexString(param_name)); + } + + final PointerBuffer buffer = APIUtil.getBufferPointer(size); + + clGetKernelWorkGroupInfo(kernel, device, param_name, buffer.getBuffer(), null); + + final long[] array = new long[size]; + for ( int i = 0; i < size; i++ ) + array[i] = buffer.get(i); + + return array; + } + + public long getWorkGroupInfoLong(final CLKernel kernel, final CLDevice device, final int param_name) { + device.checkValid(); + + final ByteBuffer buffer = APIUtil.getBufferByte(8); + clGetKernelWorkGroupInfo(kernel, device, param_name, buffer, null); + + return buffer.getLong(0); + } + + } + + static final CLMem.CLMemUtil CL_MEM_UTIL = new CLMemUtil(); + private static final class CLMemUtil extends InfoUtilAbstract implements CLMem.CLMemUtil { + + protected int getInfo(final CLMem mem, final int param_name, final ByteBuffer param_value, final PointerBuffer param_value_size_ret) { + return clGetMemObjectInfo(mem, param_name, param_value, param_value_size_ret); + } + + public CLMem createImage2D(final CLContext context, final long flags, final CLImageFormat image_format, final long image_width, final long image_height, final long image_row_pitch, final Buffer host_ptr, IntBuffer errcode_ret) { + final ByteBuffer formatBuffer = APIUtil.getBufferByte(2 * 4); + formatBuffer.putInt(0, image_format.getChannelOrder()); + formatBuffer.putInt(4, image_format.getChannelType()); + + final long function_pointer = CLCapabilities.clCreateImage2D; + BufferChecks.checkFunctionAddress(function_pointer); + if ( errcode_ret != null ) + BufferChecks.checkBuffer(errcode_ret, 1); + else if ( LWJGLUtil.DEBUG ) + errcode_ret = APIUtil.getBufferInt(); + + CLMem __result = new CLMem(nclCreateImage2D(context.getPointer(), flags, MemoryUtil.getAddress(formatBuffer, 0), image_width, image_height, image_row_pitch, MemoryUtil.getAddress0Safe(host_ptr) + + (host_ptr != null ? BufferChecks.checkBuffer(host_ptr, CLChecks.calculateImage2DSize(formatBuffer, image_width, image_height, image_row_pitch)) : 0), + MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + if ( LWJGLUtil.DEBUG ) + Util.checkCLError(errcode_ret.get(0)); + return __result; + } + + public CLMem createImage3D(final CLContext context, final long flags, final CLImageFormat image_format, final long image_width, final long image_height, final long image_depth, final long image_row_pitch, final long image_slice_pitch, final Buffer host_ptr, IntBuffer errcode_ret) { + final ByteBuffer formatBuffer = APIUtil.getBufferByte(2 * 4); + formatBuffer.putInt(0, image_format.getChannelOrder()); + formatBuffer.putInt(4, image_format.getChannelType()); + + final long function_pointer = CLCapabilities.clCreateImage3D; + BufferChecks.checkFunctionAddress(function_pointer); + if ( errcode_ret != null ) + BufferChecks.checkBuffer(errcode_ret, 1); + else if ( LWJGLUtil.DEBUG ) + errcode_ret = APIUtil.getBufferInt(); + + CLMem __result = new CLMem(nclCreateImage3D(context.getPointer(), flags, MemoryUtil.getAddress(formatBuffer, 0), image_width, image_height, image_depth, image_row_pitch, image_slice_pitch, MemoryUtil.getAddress0Safe(host_ptr) + + (host_ptr != null ? BufferChecks.checkBuffer(host_ptr, CLChecks.calculateImage3DSize(formatBuffer, image_width, image_height, image_depth, image_row_pitch, image_slice_pitch)) : 0), + MemoryUtil.getAddressSafe(errcode_ret), function_pointer), context); + if ( LWJGLUtil.DEBUG ) + Util.checkCLError(errcode_ret.get(0)); + return __result; + } + + public CLMem createSubBuffer(final CLMem mem, final long flags, final int buffer_create_type, final CLBufferRegion buffer_create_info, final IntBuffer errcode_ret) { + final PointerBuffer infoBuffer = APIUtil.getBufferPointer(2); + + infoBuffer.put(buffer_create_info.getOrigin()); + infoBuffer.put(buffer_create_info.getSize()); + + return clCreateSubBuffer(mem, flags, buffer_create_type, infoBuffer.getBuffer(), errcode_ret); + } + + public ByteBuffer getInfoHostBuffer(final CLMem mem) { + mem.checkValid(); + + if ( LWJGLUtil.DEBUG ) { + final long mem_flags = getInfoLong(mem, CL_MEM_FLAGS); + if ( (mem_flags & CL_MEM_USE_HOST_PTR) != CL_MEM_USE_HOST_PTR ) + throw new IllegalArgumentException("The specified CLMem object does not use host memory."); + } + + final long size = getInfoSize(mem, CL_MEM_SIZE); + if ( size == 0 ) + return null; + + final long address = getInfoSize(mem, CL_MEM_HOST_PTR); + + return CL.getHostBuffer(address, (int)size); + } + + public long getImageInfoSize(final CLMem mem, final int param_name) { + mem.checkValid(); + + final PointerBuffer buffer = APIUtil.getBufferPointer(); + clGetImageInfo(mem, param_name, buffer.getBuffer(), null); + + return buffer.get(0); + } + + public CLImageFormat getImageInfoFormat(final CLMem mem) { + mem.checkValid(); + + final ByteBuffer format = APIUtil.getBufferByte(2 * 4); + + clGetImageInfo(mem, CL_IMAGE_FORMAT, format, null); + + return new CLImageFormat(format.getInt(0), format.getInt(4)); + } + + public int getImageInfoFormat(final CLMem mem, final int index) { + mem.checkValid(); + + final ByteBuffer format = APIUtil.getBufferByte(2 * 4); + + clGetImageInfo(mem, CL_IMAGE_FORMAT, format, null); + + return format.getInt(index << 2); + } + + public int getGLObjectType(final CLMem mem) { + mem.checkValid(); + + final IntBuffer buffer = APIUtil.getBufferInt(); + clGetGLObjectInfo(mem, buffer, null); + + return buffer.get(0); + } + + public int getGLObjectName(final CLMem mem) { + mem.checkValid(); + + final IntBuffer buffer = APIUtil.getBufferInt(); + clGetGLObjectInfo(mem, null, buffer); + + return buffer.get(0); + } + + public int getGLTextureInfoInt(final CLMem mem, final int param_name) { + mem.checkValid(); + + final ByteBuffer buffer = APIUtil.getBufferByte(4); + clGetGLTextureInfo(mem, param_name, buffer, null); + + return buffer.getInt(0); + } + + } + + static final CLPlatform.CLPlatformUtil CL_PLATFORM_UTIL = new CLPlatformUtil(); + private static final class CLPlatformUtil extends InfoUtilAbstract implements CLPlatform.CLPlatformUtil { + + protected int getInfo(final CLPlatform platform, final int param_name, final ByteBuffer param_value, final PointerBuffer param_value_size_ret) { + return clGetPlatformInfo(platform, param_name, param_value, param_value_size_ret); + } + + public List getPlatforms(final Filter filter) { + final IntBuffer numBuffer = APIUtil.getBufferInt(); + clGetPlatformIDs(null, numBuffer); + + final int num_platforms = numBuffer.get(0); + if ( num_platforms == 0 ) + return null; + + final PointerBuffer platformIDs = APIUtil.getBufferPointer(num_platforms); + clGetPlatformIDs(platformIDs, null); + + final List platforms = new ArrayList(num_platforms); + for ( int i = 0; i < num_platforms; i++ ) { + final CLPlatform platform = CLPlatform.getCLPlatform(platformIDs.get(i)); + if ( filter == null || filter.accept(platform) ) + platforms.add(platform); + } + + return platforms.size() == 0 ? null : platforms; + } + + public List getDevices(final CLPlatform platform, final int device_type, final Filter filter) { + platform.checkValid(); + + final IntBuffer numBuffer = APIUtil.getBufferInt(); + clGetDeviceIDs(platform, device_type, null, numBuffer); + + final int num_devices = numBuffer.get(0); + if ( num_devices == 0 ) + return null; + + final PointerBuffer deviceIDs = APIUtil.getBufferPointer(num_devices); + clGetDeviceIDs(platform, device_type, deviceIDs, null); + + final List devices = new ArrayList(num_devices); + for ( int i = 0; i < num_devices; i++ ) { + final CLDevice device = platform.getCLDevice(deviceIDs.get(i)); + if ( filter == null || filter.accept(device) ) + devices.add(device); + } + + return devices.size() == 0 ? null : devices; + } + + } + + static final CLProgram.CLProgramUtil CL_PROGRAM_UTIL = new CLProgramUtil(); + private static final class CLProgramUtil extends InfoUtilAbstract implements CLProgram.CLProgramUtil { + + protected int getInfo(final CLProgram program, final int param_name, final ByteBuffer param_value, final PointerBuffer param_value_size_ret) { + return clGetProgramInfo(program, param_name, param_value, param_value_size_ret); + } + + protected int getInfoSizeArraySize(final CLProgram program, final int param_name) { + switch ( param_name ) { + case CL_PROGRAM_BINARY_SIZES: + return getInfoInt(program, CL_PROGRAM_NUM_DEVICES); + default: + throw new IllegalArgumentException("Unsupported parameter: " + LWJGLUtil.toHexString(param_name)); + } + } + + public CLKernel[] createKernelsInProgram(final CLProgram program) { + final IntBuffer numBuffer = APIUtil.getBufferInt(); + clCreateKernelsInProgram(program, null, numBuffer); + + final int num_kernels = numBuffer.get(0); + if ( num_kernels == 0 ) + return null; + + final PointerBuffer kernelIDs = APIUtil.getBufferPointer(num_kernels); + clCreateKernelsInProgram(program, kernelIDs, null); + + final CLKernel[] kernels = new CLKernel[num_kernels]; + for ( int i = 0; i < num_kernels; i++ ) + kernels[i] = program.getCLKernel(kernelIDs.get(i)); + + return kernels; + } + + public CLDevice[] getInfoDevices(final CLProgram program) { + program.checkValid(); + + final int size = getInfoInt(program, CL_PROGRAM_NUM_DEVICES); + final PointerBuffer buffer = APIUtil.getBufferPointer(size); + + clGetProgramInfo(program, CL_PROGRAM_DEVICES, buffer.getBuffer(), null); + + final CLPlatform platform = program.getParent().getParent(); + final CLDevice[] array = new CLDevice[size]; + for ( int i = 0; i < size; i++ ) + array[i] = platform.getCLDevice(buffer.get(i)); + + return array; + } + + public ByteBuffer getInfoBinaries(final CLProgram program, ByteBuffer target) { + program.checkValid(); + + final PointerBuffer sizes = getSizesBuffer(program, CL_PROGRAM_BINARY_SIZES); + + int totalSize = 0; + for ( int i = 0; i < sizes.limit(); i++ ) + totalSize += sizes.get(i); + + if ( target == null ) + target = BufferUtils.createByteBuffer(totalSize); + else if ( LWJGLUtil.DEBUG ) + BufferChecks.checkBuffer(target, totalSize); + + clGetProgramInfo(program, sizes, target, null); + + return target; + } + + public ByteBuffer[] getInfoBinaries(final CLProgram program, ByteBuffer[] target) { + program.checkValid(); + + if ( target == null ) { + final PointerBuffer sizes = getSizesBuffer(program, CL_PROGRAM_BINARY_SIZES); + + target = new ByteBuffer[sizes.remaining()]; + for ( int i = 0; i < sizes.remaining(); i++ ) + target[i] = BufferUtils.createByteBuffer((int)sizes.get(i)); + } else if ( LWJGLUtil.DEBUG ) { + final PointerBuffer sizes = getSizesBuffer(program, CL_PROGRAM_BINARY_SIZES); + + if ( target.length < sizes.remaining() ) + throw new IllegalArgumentException("The target array is not big enough: " + sizes.remaining() + " buffers are required."); + + for ( int i = 0; i < target.length; i++ ) + BufferChecks.checkBuffer(target[i], (int)sizes.get(i)); + } + + clGetProgramInfo(program, target, null); + + return target; + } + + public String getBuildInfoString(final CLProgram program, final CLDevice device, final int param_name) { + program.checkValid(); + + final int bytes = getBuildSizeRet(program, device, param_name); + if ( bytes <= 1 ) + return null; + + final ByteBuffer buffer = APIUtil.getBufferByte(bytes); + clGetProgramBuildInfo(program, device, param_name, buffer, null); + + buffer.limit(bytes - 1); // Exclude null-termination + return APIUtil.getString(buffer); + } + + public int getBuildInfoInt(final CLProgram program, final CLDevice device, final int param_name) { + program.checkValid(); + + final ByteBuffer buffer = APIUtil.getBufferByte(4); + clGetProgramBuildInfo(program, device, param_name, buffer, null); + + return buffer.getInt(0); + } + + private static int getBuildSizeRet(final CLProgram program, final CLDevice device, final int param_name) { + final PointerBuffer bytes = APIUtil.getBufferPointer(); + final int errcode = clGetProgramBuildInfo(program, device, param_name, null, bytes); + if ( errcode != CL_SUCCESS ) + throw new IllegalArgumentException("Invalid parameter specified: " + LWJGLUtil.toHexString(param_name)); + + return (int)bytes.get(0); + } + + } + + static final InfoUtil CL_SAMPLER_UTIL = new InfoUtilAbstract() { + protected int getInfo(final CLSampler sampler, final int param_name, final ByteBuffer param_value, final PointerBuffer param_value_size_ret) { + return clGetSamplerInfo(sampler, param_name, param_value, param_value_size_ret); + } + }; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/OpenCLException.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/OpenCLException.java new file mode 100644 index 0000000..fe1e903 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/OpenCLException.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +public class OpenCLException extends RuntimeException { + + private static final long serialVersionUID = 1L; + + public OpenCLException() { + super(); + } + + public OpenCLException(final String message) { + super(message); + } + + public OpenCLException(final String message, final Throwable cause) { + super(message, cause); + } + + public OpenCLException(final Throwable cause) { + super(cause); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/Util.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/Util.java new file mode 100644 index 0000000..acb0380 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/Util.java @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.LWJGLUtil; + +import java.lang.reflect.Field; +import java.util.Map; + +/** + * Utility methods for OpenCL + * + * @author Spasi + */ +public final class Util { + + /** Maps OpenCL error token values to their String representations. */ + private static final Map CL_ERROR_TOKENS = LWJGLUtil.getClassTokens(new LWJGLUtil.TokenFilter() { + public boolean accept(final Field field, final int value) { + return value < 0; // Currently, all OpenCL errors have negative values. + } + }, null, CL10.class, CL11.class, KHRGLSharing.class, KHRICD.class, APPLEGLSharing.class, EXTDeviceFission.class); + + private Util() { + } + + public static void checkCLError(final int errcode) { + if ( errcode != CL10.CL_SUCCESS ) + throwCLError(errcode); + } + + private static void throwCLError(final int errcode) { + String errname = CL_ERROR_TOKENS.get(errcode); + if ( errname == null ) + errname = "UNKNOWN"; + throw new OpenCLException("Error Code: " + errname + " (" + LWJGLUtil.toHexString(errcode) + ")"); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/api/CLBufferRegion.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/api/CLBufferRegion.java new file mode 100644 index 0000000..39ca4ec --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/api/CLBufferRegion.java @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl.api; + +import org.lwjgl.PointerBuffer; + +/** + * Simple container for cl_buffer_region struct values. + * + * @author Spasi + */ +public final class CLBufferRegion { + + /** The cl_buffer_region struct size in bytes. */ + public static final int STRUCT_SIZE = 2 * PointerBuffer.getPointerSize(); + + private final int origin; + private final int size; + + public CLBufferRegion(final int origin, final int size) { + this.origin = origin; + this.size = size; + } + + public int getOrigin() { + return origin; + } + + public int getSize() { + return size; + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/api/CLImageFormat.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/api/CLImageFormat.java new file mode 100644 index 0000000..eded198 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/api/CLImageFormat.java @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl.api; + +/** + * Simple container for cl_image_format struct values. + * + * @author Spasi + */ +public final class CLImageFormat { + + /** The cl_image_format struct size in bytes. */ + public static final int STRUCT_SIZE = 2 * 4; + + private final int channelOrder; + private final int channelType; + + public CLImageFormat(final int channelOrder, final int channelType) { + this.channelOrder = channelOrder; + this.channelType = channelType; + } + + public int getChannelOrder() { + return channelOrder; + } + + public int getChannelType() { + return channelType; + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/api/Filter.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/api/Filter.java new file mode 100644 index 0000000..e27b0f6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opencl/api/Filter.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.opencl.api; + +/** + * Simple filter interface. + * + * @author Spasi + */ +public interface Filter { + + /** + * Returns true if the specified object passes the filter. + * + * @param object the object to test + * + * @return true if the object is accepted + */ + boolean accept(T object); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/AMDDebugOutputCallback.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/AMDDebugOutputCallback.java new file mode 100644 index 0000000..0237d63 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/AMDDebugOutputCallback.java @@ -0,0 +1,173 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.PointerWrapperAbstract; + +/** + * Instances of this class are needed to use the callback functionality of the AMD_debug_output extension. + * A debug context must be current before creating instances of this class. Users of this class may provide + * implementations of the {@code Handler} interface to receive notifications. The same {@code Handler} + * instance may be used by different contexts but it is not recommended. Handler notifications are synchronized. + * + * @author Spasi + */ +public final class AMDDebugOutputCallback extends PointerWrapperAbstract { + + /** Severity levels. */ + private static final int GL_DEBUG_SEVERITY_HIGH_AMD = 0x9146, + GL_DEBUG_SEVERITY_MEDIUM_AMD = 0x9147, + GL_DEBUG_SEVERITY_LOW_AMD = 0x9148; + + /** Categories */ + private static final int GL_DEBUG_CATEGORY_API_ERROR_AMD = 0x9149, + GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD = 0x914A, + GL_DEBUG_CATEGORY_DEPRECATION_AMD = 0x914B, + GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD = 0x914C, + GL_DEBUG_CATEGORY_PERFORMANCE_AMD = 0x914D, + GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD = 0x914E, + GL_DEBUG_CATEGORY_APPLICATION_AMD = 0x914F, + GL_DEBUG_CATEGORY_OTHER_AMD = 0x9150; + + private static final long CALLBACK_POINTER; + + static { + long pointer = 0; + try { + // Call reflectively so that we can compile this class for the Generator. + pointer = (Long)Class.forName("org.lwjgl.opengl.CallbackUtil").getDeclaredMethod("getDebugOutputCallbackAMD").invoke(null); + } catch (Exception e) { + // ignore + } + CALLBACK_POINTER = pointer; + } + + private final Handler handler; + + /** + * Creates an AMDDebugOutputCallback with a default callback handler. + * The default handler will simply print the message on System.err. + */ + public AMDDebugOutputCallback() { + this(new Handler() { + public void handleMessage(final int id, final int category, final int severity, final String message) { + System.err.println("[LWJGL] AMD_debug_output message"); + System.err.println("\tID: " + id); + + String description; + switch ( category ) { + case GL_DEBUG_CATEGORY_API_ERROR_AMD: + description = "API ERROR"; + break; + case GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD: + description = "WINDOW SYSTEM"; + break; + case GL_DEBUG_CATEGORY_DEPRECATION_AMD: + description = "DEPRECATION"; + break; + case GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD: + description = "UNDEFINED BEHAVIOR"; + break; + case GL_DEBUG_CATEGORY_PERFORMANCE_AMD: + description = "PERFORMANCE"; + break; + case GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD: + description = "SHADER COMPILER"; + break; + case GL_DEBUG_CATEGORY_APPLICATION_AMD: + description = "APPLICATION"; + break; + case GL_DEBUG_CATEGORY_OTHER_AMD: + description = "OTHER"; + break; + default: + description = printUnknownToken(category); + } + System.err.println("\tCategory: " + description); + + switch ( severity ) { + case GL_DEBUG_SEVERITY_HIGH_AMD: + description = "HIGH"; + break; + case GL_DEBUG_SEVERITY_MEDIUM_AMD: + description = "MEDIUM"; + break; + case GL_DEBUG_SEVERITY_LOW_AMD: + description = "LOW"; + break; + default: + description = printUnknownToken(severity); + } + System.err.println("\tSeverity: " + description); + + System.err.println("\tMessage: " + message); + } + + private String printUnknownToken(final int token) { + return "Unknown (0x" + Integer.toHexString(token).toUpperCase() + ")"; + } + }); + } + + /** + * Creates an AMDDebugOutputCallback with the specified callback handler. + * The handler's {@code handleMessage} method will be called whenever + * debug output is generated by the GL. + * + * @param handler the callback handler + */ + public AMDDebugOutputCallback(final Handler handler) { + super(CALLBACK_POINTER); + + this.handler = handler; + } + + Handler getHandler() { + return handler; + } + + /** Implementations of this interface can be used to receive AMD_debug_output notifications. */ + public interface Handler { + + /** + * This method will be called when an AMD_debug_output message is generated. + * + * @param id the message ID + * @param category the message category + * @param severity the message severity + * @param message the string representation of the message. + */ + void handleMessage(int id, int category, int severity, String message); + + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/APIUtil.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/APIUtil.java new file mode 100644 index 0000000..5687fc6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/APIUtil.java @@ -0,0 +1,296 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLUtil; +import org.lwjgl.MemoryUtil; + +import java.nio.*; + +/** + * Utility class for OpenGL API calls. Instances of APIUtil are created in ContextCapabilities, + * so we have an instance per OpenGL context. + * + * @author spasi + */ +final class APIUtil { + + private static final int INITIAL_BUFFER_SIZE = 256; + private static final int INITIAL_LENGTHS_SIZE = 4; + + private static final int BUFFERS_SIZE = 32; + + private char[] array; + private ByteBuffer buffer; + private IntBuffer lengths; + + private final IntBuffer ints; + private final LongBuffer longs; + private final FloatBuffer floats; + private final DoubleBuffer doubles; + + APIUtil() { + array = new char[INITIAL_BUFFER_SIZE]; + buffer = BufferUtils.createByteBuffer(INITIAL_BUFFER_SIZE); + lengths = BufferUtils.createIntBuffer(INITIAL_LENGTHS_SIZE); + + ints = BufferUtils.createIntBuffer(BUFFERS_SIZE); + longs = BufferUtils.createLongBuffer(BUFFERS_SIZE); + + floats = BufferUtils.createFloatBuffer(BUFFERS_SIZE); + doubles = BufferUtils.createDoubleBuffer(BUFFERS_SIZE); + } + + private static char[] getArray(final ContextCapabilities caps, final int size) { + char[] array = caps.util.array; + + if ( array.length < size ) { + int sizeNew = array.length << 1; + while ( sizeNew < size ) + sizeNew <<= 1; + + array = new char[size]; + caps.util.array = array; + } + + return array; + } + + static ByteBuffer getBufferByte(final ContextCapabilities caps, final int size) { + ByteBuffer buffer = caps.util.buffer; + + if ( buffer.capacity() < size ) { + int sizeNew = buffer.capacity() << 1; + while ( sizeNew < size ) + sizeNew <<= 1; + + buffer = BufferUtils.createByteBuffer(size); + caps.util.buffer = buffer; + } else + buffer.clear(); + + return buffer; + } + + private static ByteBuffer getBufferByteOffset(final ContextCapabilities caps, final int size) { + ByteBuffer buffer = caps.util.buffer; + + if ( buffer.capacity() < size ) { + int sizeNew = buffer.capacity() << 1; + while ( sizeNew < size ) + sizeNew <<= 1; + + final ByteBuffer bufferNew = BufferUtils.createByteBuffer(size); + bufferNew.put(buffer); + caps.util.buffer = (buffer = bufferNew); + } else { + buffer.position(buffer.limit()); + buffer.limit(buffer.capacity()); + } + + return buffer; + } + + static IntBuffer getBufferInt(final ContextCapabilities caps) { return caps.util.ints; } + + static LongBuffer getBufferLong(final ContextCapabilities caps) { return caps.util.longs; } + + static FloatBuffer getBufferFloat(final ContextCapabilities caps) { return caps.util.floats; } + + static DoubleBuffer getBufferDouble(final ContextCapabilities caps) { return caps.util.doubles; } + + static IntBuffer getLengths(final ContextCapabilities caps) { + return getLengths(caps, 1); + } + + static IntBuffer getLengths(final ContextCapabilities caps, final int size) { + IntBuffer lengths = caps.util.lengths; + + if ( lengths.capacity() < size ) { + int sizeNew = lengths.capacity(); + while ( sizeNew < size ) + sizeNew <<= 1; + + lengths = BufferUtils.createIntBuffer(size); + caps.util.lengths = lengths; + } else + lengths.clear(); + + return lengths; + } + + /** + * Simple ASCII encoding. + * + * @param buffer The target buffer + * @param string The source string + */ + private static ByteBuffer encode(final ByteBuffer buffer, final CharSequence string) { + for ( int i = 0; i < string.length(); i++ ) { + final char c = string.charAt(i); + if ( LWJGLUtil.DEBUG && 0x80 <= c ) // Silently ignore and map to 0x1A. + buffer.put((byte)0x1A); + else + buffer.put((byte)c); + } + + return buffer; + } + + /** + * Reads a byte string from the specified buffer. + * + * @param buffer + * + * @return the buffer as a String. + */ + static String getString(final ContextCapabilities caps, final ByteBuffer buffer) { + final int length = buffer.remaining(); + final char[] charArray = getArray(caps, length); + + for ( int i = buffer.position(); i < buffer.limit(); i++ ) + charArray[i - buffer.position()] = (char)buffer.get(i); + + return new String(charArray, 0, length); + } + + /** + * Returns a buffer containing the specified string as bytes. + * + * @param string + * + * @return the String as a ByteBuffer + */ + static long getBuffer(final ContextCapabilities caps, final CharSequence string) { + final ByteBuffer buffer = encode(getBufferByte(caps, string.length()), string); + buffer.flip(); + return MemoryUtil.getAddress0(buffer); + } + + /** + * Returns a buffer containing the specified string as bytes, starting at the specified offset. + * + * @param string + * + * @return the String as a ByteBuffer + */ + static long getBuffer(final ContextCapabilities caps, final CharSequence string, final int offset) { + final ByteBuffer buffer = encode(getBufferByteOffset(caps, offset + string.length()), string); + buffer.flip(); + return MemoryUtil.getAddress(buffer); + } + + /** + * Returns a buffer containing the specified string as bytes, including null-termination. + * + * @param string + * + * @return the String as a ByteBuffer + */ + static long getBufferNT(final ContextCapabilities caps, final CharSequence string) { + final ByteBuffer buffer = encode(getBufferByte(caps, string.length() + 1), string); + buffer.put((byte)0); + buffer.flip(); + return MemoryUtil.getAddress0(buffer); + } + + static int getTotalLength(final CharSequence[] strings) { + int length = 0; + for ( CharSequence string : strings ) + length += string.length(); + + return length; + } + + /** + * Returns a buffer containing the specified strings as bytes. + * + * @param strings + * + * @return the Strings as a ByteBuffer + */ + static long getBuffer(final ContextCapabilities caps, final CharSequence[] strings) { + final ByteBuffer buffer = getBufferByte(caps, getTotalLength(strings)); + + for ( CharSequence string : strings ) + encode(buffer, string); + + buffer.flip(); + return MemoryUtil.getAddress0(buffer); + } + + /** + * Returns a buffer containing the specified strings as bytes, including null-termination. + * + * @param strings + * + * @return the Strings as a ByteBuffer + */ + static long getBufferNT(final ContextCapabilities caps, final CharSequence[] strings) { + final ByteBuffer buffer = getBufferByte(caps, getTotalLength(strings) + strings.length); + + for ( CharSequence string : strings ) { + encode(buffer, string); + buffer.put((byte)0); + } + + buffer.flip(); + return MemoryUtil.getAddress0(buffer); + } + + /** + * Returns a buffer containing the lengths of the specified strings. + * + * @param strings + * + * @return the String lengths in an IntBuffer + */ + static long getLengths(final ContextCapabilities caps, final CharSequence[] strings) { + IntBuffer buffer = getLengths(caps, strings.length); + + for ( CharSequence string : strings ) + buffer.put(string.length()); + + buffer.flip(); + return MemoryUtil.getAddress0(buffer); + } + + static long getInt(final ContextCapabilities caps, final int value) { + return MemoryUtil.getAddress0(getBufferInt(caps).put(0, value)); + } + + static long getBufferByte0(final ContextCapabilities caps) { + return MemoryUtil.getAddress0(getBufferByte(caps, 0)); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/ARBDebugOutputCallback.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/ARBDebugOutputCallback.java new file mode 100644 index 0000000..68ca8ea --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/ARBDebugOutputCallback.java @@ -0,0 +1,201 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.PointerWrapperAbstract; + +/** + * Instances of this class are needed to use the callback functionality of the ARB_debug_output extension. + * A debug context must be current before creating instances of this class. Users of this class may provide + * implementations of the {@code Handler} interface to receive notifications. The same {@code Handler} + * instance may be used by different contexts but it is not recommended. Handler notifications are synchronized. + * + * @author Spasi + */ +public final class ARBDebugOutputCallback extends PointerWrapperAbstract { + + /** Severity levels. */ + private static final int + GL_DEBUG_SEVERITY_HIGH_ARB = 0x9146, + GL_DEBUG_SEVERITY_MEDIUM_ARB = 0x9147, + GL_DEBUG_SEVERITY_LOW_ARB = 0x9148; + + /** Sources. */ + private static final int + GL_DEBUG_SOURCE_API_ARB = 0x8246, + GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB = 0x8247, + GL_DEBUG_SOURCE_SHADER_COMPILER_ARB = 0x8248, + GL_DEBUG_SOURCE_THIRD_PARTY_ARB = 0x8249, + GL_DEBUG_SOURCE_APPLICATION_ARB = 0x824A, + GL_DEBUG_SOURCE_OTHER_ARB = 0x824B; + + /** Types. */ + private static final int + GL_DEBUG_TYPE_ERROR_ARB = 0x824C, + GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB = 0x824D, + GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB = 0x824E, + GL_DEBUG_TYPE_PORTABILITY_ARB = 0x824F, + GL_DEBUG_TYPE_PERFORMANCE_ARB = 0x8250, + GL_DEBUG_TYPE_OTHER_ARB = 0x8251; + + private static final long CALLBACK_POINTER; + + static { + long pointer = 0; + try { + // Call reflectively so that we can compile this class for the Generator. + pointer = (Long)Class.forName("org.lwjgl.opengl.CallbackUtil").getDeclaredMethod("getDebugOutputCallbackARB").invoke(null); + } catch (Exception e) { + // ignore + } + CALLBACK_POINTER = pointer; + } + + private final Handler handler; + + /** + * Creates an ARBDebugOutputCallback with a default callback handler. + * The default handler will simply print the message on System.err. + */ + public ARBDebugOutputCallback() { + this(new Handler() { + public void handleMessage(final int source, final int type, final int id, final int severity, final String message) { + System.err.println("[LWJGL] ARB_debug_output message"); + System.err.println("\tID: " + id); + + String description; + switch ( source ) { + case GL_DEBUG_SOURCE_API_ARB: + description = "API"; + break; + case GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB: + description = "WINDOW SYSTEM"; + break; + case GL_DEBUG_SOURCE_SHADER_COMPILER_ARB: + description = "SHADER COMPILER"; + break; + case GL_DEBUG_SOURCE_THIRD_PARTY_ARB: + description = "THIRD PARTY"; + break; + case GL_DEBUG_SOURCE_APPLICATION_ARB: + description = "APPLICATION"; + break; + case GL_DEBUG_SOURCE_OTHER_ARB: + description = "OTHER"; + break; + default: + description = printUnknownToken(source); + } + System.err.println("\tSource: " + description); + + switch ( type ) { + case GL_DEBUG_TYPE_ERROR_ARB: + description = "ERROR"; + break; + case GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB: + description = "DEPRECATED BEHAVIOR"; + break; + case GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB: + description = "UNDEFINED BEHAVIOR"; + break; + case GL_DEBUG_TYPE_PORTABILITY_ARB: + description = "PORTABILITY"; + break; + case GL_DEBUG_TYPE_PERFORMANCE_ARB: + description = "PERFORMANCE"; + break; + case GL_DEBUG_TYPE_OTHER_ARB: + description = "OTHER"; + break; + default: + description = printUnknownToken(type); + } + System.err.println("\tType: " + description); + + switch ( severity ) { + case GL_DEBUG_SEVERITY_HIGH_ARB: + description = "HIGH"; + break; + case GL_DEBUG_SEVERITY_MEDIUM_ARB: + description = "MEDIUM"; + break; + case GL_DEBUG_SEVERITY_LOW_ARB: + description = "LOW"; + break; + default: + description = printUnknownToken(severity); + } + System.err.println("\tSeverity: " + description); + + System.err.println("\tMessage: " + message); + } + + private String printUnknownToken(final int token) { + return "Unknown (0x" + Integer.toHexString(token).toUpperCase() + ")"; + } + }); + } + + /** + * Creates an ARBDebugOutputCallback with the specified callback handler. + * The handler's {@code handleMessage} method will be called whenever + * debug output is generated by the GL. + * + * @param handler the callback handler + */ + public ARBDebugOutputCallback(final Handler handler) { + super(CALLBACK_POINTER); + + this.handler = handler; + } + + Handler getHandler() { + return handler; + } + + /** Implementations of this interface can be used to receive ARB_debug_output notifications. */ + public interface Handler { + + /** + * This method will be called when an ARB_debug_output message is generated. + * + * @param source the message source + * @param type the message type + * @param id the message ID + * @param severity the message severity + * @param message the string representation of the message. + */ + void handleMessage(int source, int type, int id, int severity, String message); + + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/AWTCanvasImplementation.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/AWTCanvasImplementation.java new file mode 100644 index 0000000..accd947 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/AWTCanvasImplementation.java @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import java.awt.GraphicsConfiguration; +import java.awt.GraphicsDevice; +import java.awt.Canvas; + +import org.lwjgl.LWJGLException; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +interface AWTCanvasImplementation { + /** + * Return an opaque handle to the canvas peer information required to create a context from it. + */ + PeerInfo createPeerInfo(Canvas component, PixelFormat pixel_format, ContextAttribs attribs) throws LWJGLException; + + /** + * Find a proper GraphicsConfiguration from the given GraphicsDevice and PixelFormat. + * + * @return A GraphicsConfiguration matching the given GraphicsConfiguration and PixelFormat. + * @throws LWJGLException if no suitable configuration could be found. + */ + GraphicsConfiguration findConfiguration(GraphicsDevice device, PixelFormat pixel_format) throws LWJGLException; +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/AWTGLCanvas.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/AWTGLCanvas.java new file mode 100644 index 0000000..110a85f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/AWTGLCanvas.java @@ -0,0 +1,414 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; +import org.lwjgl.PointerBuffer; +import org.lwjgl.Sys; + +import java.awt.*; +import java.awt.event.ComponentEvent; +import java.awt.event.ComponentListener; +import java.awt.event.HierarchyEvent; +import java.awt.event.HierarchyListener; + +import static org.lwjgl.opengl.GL11.*; + +/** + *

+ * An AWT rendering context. + *

+ * + * @author $Author$ + * $Id$ + * @version $Revision$ + */ +public class AWTGLCanvas extends Canvas implements DrawableLWJGL, ComponentListener, HierarchyListener { + + private static final long serialVersionUID = 1L; + + private static final AWTCanvasImplementation implementation; + private boolean update_context; + private Object SYNC_LOCK = new Object(); + + /** The requested pixel format */ + private final PixelFormat pixel_format; + + /** The drawable to share context with */ + private final Drawable drawable; + + /** The ContextAttribs to use when creating the context */ + private final ContextAttribs attribs; + + /** Context handle */ + private PeerInfo peer_info; + private ContextGL context; + + /** + * re-entry counter for support for re-entrant + * redrawing in paint(). It happens when using dialog boxes. + */ + private int reentry_count; + + /** Tracks whether initGL() needs to be called */ + private boolean first_run; + + static { + Sys.initialize(); + implementation = createImplementation(); + } + + static AWTCanvasImplementation createImplementation() { + switch ( LWJGLUtil.getPlatform() ) { + case LWJGLUtil.PLATFORM_LINUX: + return new LinuxCanvasImplementation(); + case LWJGLUtil.PLATFORM_WINDOWS: + return new WindowsCanvasImplementation(); + case LWJGLUtil.PLATFORM_MACOSX: + return new MacOSXCanvasImplementation(); + default: + throw new IllegalStateException("Unsupported platform"); + } + } + + private void setUpdate() { + synchronized ( SYNC_LOCK ) { + update_context = true; + } + } + + public void setPixelFormat(final PixelFormatLWJGL pf) throws LWJGLException { + throw new UnsupportedOperationException(); + } + + public void setPixelFormat(final PixelFormatLWJGL pf, final ContextAttribs attribs) throws LWJGLException { + throw new UnsupportedOperationException(); + } + + public PixelFormatLWJGL getPixelFormat() { + return pixel_format; + } + + /** This method should only be called internally. */ + public ContextGL getContext() { + return context; + } + + /** This method should only be called internally. */ + public ContextGL createSharedContext() throws LWJGLException { + synchronized ( SYNC_LOCK ) { + if ( context == null ) throw new IllegalStateException("Canvas not yet displayable"); + + return new ContextGL(peer_info, context.getContextAttribs(), context); + } + } + + public void checkGLError() { + Util.checkGLError(); + } + + public void initContext(final float r, final float g, final float b) { + // set background clear color + glClearColor(r, g, b, 0.0f); + // Clear window to avoid the desktop "showing through" + glClear(GL_COLOR_BUFFER_BIT); + } + + /** Constructor using the default PixelFormat. */ + public AWTGLCanvas() throws LWJGLException { + this(new PixelFormat()); + } + + /** + * Create an AWTGLCanvas with the requested PixelFormat on the default GraphicsDevice. + * + * @param pixel_format The desired pixel format. May not be null + */ + public AWTGLCanvas(PixelFormat pixel_format) throws LWJGLException { + this(GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice(), pixel_format); + } + + /** + * Create an AWTGLCanvas with the requested PixelFormat on the default GraphicsDevice. + * + * @param device the device to create the canvas on. + * @param pixel_format The desired pixel format. May not be null + */ + public AWTGLCanvas(GraphicsDevice device, PixelFormat pixel_format) throws LWJGLException { + this(device, pixel_format, null); + } + + /** + * Create an AWTGLCanvas with the requested PixelFormat on the specified GraphicsDevice. + * + * @param device the device to create the canvas on. + * @param pixel_format The desired pixel format. May not be null + * @param drawable The Drawable to share context with + */ + public AWTGLCanvas(GraphicsDevice device, PixelFormat pixel_format, Drawable drawable) throws LWJGLException { + this(device, pixel_format, drawable, null); + } + + /** + * Create an AWTGLCanvas with the requested PixelFormat on the specified GraphicsDevice. + * + * @param device the device to create the canvas on. + * @param pixel_format The desired pixel format. May not be null + * @param drawable The Drawable to share context with + * @param attribs The ContextAttribs to use when creating the context. (optional, may be null) + */ + public AWTGLCanvas(GraphicsDevice device, PixelFormat pixel_format, Drawable drawable, ContextAttribs attribs) throws LWJGLException { + super(implementation.findConfiguration(device, pixel_format)); + if ( pixel_format == null ) + throw new NullPointerException("Pixel format must be non-null"); + addHierarchyListener(this); + addComponentListener(this); + this.drawable = drawable; + this.pixel_format = pixel_format; + this.attribs = attribs; + } + + /* (non-Javadoc) + * @see java.awt.Canvas#addNotify() + */ + public void addNotify() { + super.addNotify(); + } + + /* (non-Javadoc) + * @see java.awt.Component#removeNotify() + */ + public void removeNotify() { + synchronized ( SYNC_LOCK ) { + destroy(); + super.removeNotify(); + } + } + + /** Set swap interval. */ + public void setSwapInterval(int swap_interval) { + synchronized ( SYNC_LOCK ) { + if ( context == null ) + throw new IllegalStateException("Canvas not yet displayable"); + ContextGL.setSwapInterval(swap_interval); + } + } + + /** Enable vsync */ + public void setVSyncEnabled(boolean enabled) { + setSwapInterval(enabled ? 1 : 0); + } + + /** Swap the canvas' buffer */ + public void swapBuffers() throws LWJGLException { + synchronized ( SYNC_LOCK ) { + if ( context == null ) + throw new IllegalStateException("Canvas not yet displayable"); + ContextGL.swapBuffers(); + } + } + + public boolean isCurrent() throws LWJGLException { + synchronized ( SYNC_LOCK ) { + if ( context == null ) throw new IllegalStateException("Canvas not yet displayable"); + + return context.isCurrent(); + } + } + + /** + * Make the canvas' context current. It is highly recommended that the context + * is only made current inside the AWT thread (for example in an overridden paintGL()). + */ + public void makeCurrent() throws LWJGLException { + synchronized ( SYNC_LOCK ) { + if ( context == null ) + throw new IllegalStateException("Canvas not yet displayable"); + context.makeCurrent(); + } + } + + public void releaseContext() throws LWJGLException { + synchronized ( SYNC_LOCK ) { + if ( context == null ) + throw new IllegalStateException("Canvas not yet displayable"); + if ( context.isCurrent() ) + context.releaseCurrent(); + } + } + + /** Destroy the OpenGL context. This happens when the component becomes undisplayable */ + public final void destroy() { + synchronized ( SYNC_LOCK ) { + try { + if ( context != null ) { + context.forceDestroy(); + context = null; + reentry_count = 0; + peer_info.destroy(); + peer_info = null; + } + } catch (LWJGLException e) { + throw new RuntimeException(e); + } + } + } + + public final void setCLSharingProperties(final PointerBuffer properties) throws LWJGLException { + synchronized ( SYNC_LOCK ) { + if ( context == null ) + throw new IllegalStateException("Canvas not yet displayable"); + context.setCLSharingProperties(properties); + } + } + + /** + * Override this to do initialising of the context. + * It will be called once from paint(), immediately after + * the context is created and made current. + */ + protected void initGL() { + } + + /** Override this to do painting */ + protected void paintGL() { + } + + /** + * The default paint() operation makes the context current and calls paintGL() which should + * be overridden to do GL operations. + */ + public final void paint(Graphics g) { + LWJGLException exception = null; + synchronized ( SYNC_LOCK ) { + if ( !isDisplayable() ) + return; + try { + if ( peer_info == null ) { + this.peer_info = implementation.createPeerInfo(this, pixel_format, attribs); + } + peer_info.lockAndGetHandle(); + try { + if ( context == null ) { + this.context = new ContextGL(peer_info, attribs, drawable != null ? (ContextGL)((DrawableLWJGL)drawable).getContext() : null); + first_run = true; + } + + if ( reentry_count == 0 ) + context.makeCurrent(); + reentry_count++; + try { + if ( update_context ) { + context.update(); + update_context = false; + } + if ( first_run ) { + first_run = false; + initGL(); + } + paintGL(); + } finally { + reentry_count--; + if ( reentry_count == 0 ) + context.releaseCurrent(); + } + } finally { + peer_info.unlock(); + } + } catch (LWJGLException e) { + exception = e; + } + } + if ( exception != null ) + exceptionOccurred(exception); + } + + /** + * This method will be called if an unhandled LWJGLException occurs in paint(). + * Override this method to be notified of this. + * + * @param exception The exception that occurred. + */ + protected void exceptionOccurred(LWJGLException exception) { + LWJGLUtil.log("Unhandled exception occurred, skipping paint(): " + exception); + } + + /** override update to avoid clearing */ + public void update(Graphics g) { + paint(g); + } + + public void componentShown(ComponentEvent e) { + } + + public void componentHidden(ComponentEvent e) { + } + + public void componentResized(ComponentEvent e) { + setUpdate(); + } + + public void componentMoved(ComponentEvent e) { + setUpdate(); + } + + public void setLocation(int x, int y) { + super.setLocation(x, y); + setUpdate(); + } + + public void setLocation(Point p) { + super.setLocation(p); + setUpdate(); + } + + public void setSize(Dimension d) { + super.setSize(d); + setUpdate(); + } + + public void setSize(int width, int height) { + super.setSize(width, height); + setUpdate(); + } + + public void setBounds(int x, int y, int width, int height) { + super.setBounds(x, y, width, height); + setUpdate(); + } + + public void hierarchyChanged(HierarchyEvent e) { + setUpdate(); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/AWTSurfaceLock.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/AWTSurfaceLock.java new file mode 100644 index 0000000..3e45554 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/AWTSurfaceLock.java @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import java.awt.Canvas; +import java.awt.Component; +import java.applet.Applet; +import java.nio.ByteBuffer; +import java.security.AccessController; +import java.security.PrivilegedActionException; +import java.security.PrivilegedExceptionAction; + +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +final class AWTSurfaceLock { + + private static final int WAIT_DELAY_MILLIS = 100; + + private final ByteBuffer lock_buffer; + + private boolean firstLockSucceeded; + + AWTSurfaceLock() { + lock_buffer = createHandle(); + } + + private static native ByteBuffer createHandle(); + + public ByteBuffer lockAndGetHandle(Canvas component) throws LWJGLException { + while (!privilegedLockAndInitHandle(component)) { + LWJGLUtil.log("Could not get drawing surface info, retrying..."); + try { + Thread.sleep(WAIT_DELAY_MILLIS); + } catch (InterruptedException e) { + LWJGLUtil.log("Interrupted while retrying: " + e); + } + } + + return lock_buffer; + } + + private boolean privilegedLockAndInitHandle(final Canvas component) throws LWJGLException { + // Workaround for Sun JDK bug 4796548 which still exists in java for OS X + // We need to elevate privileges because of an AWT bug. Please see + // http://192.18.37.44/forums/index.php?topic=10572 for a discussion. + // It is only needed on first call, so we avoid it on all subsequent calls + // due to performance.. + + if (firstLockSucceeded) + return lockAndInitHandle(lock_buffer, component); + else + try { + firstLockSucceeded = AccessController.doPrivileged(new PrivilegedExceptionAction() { + public Boolean run() throws LWJGLException { + return lockAndInitHandle(lock_buffer, component); + } + }); + return firstLockSucceeded; + } catch (PrivilegedActionException e) { + throw (LWJGLException) e.getException(); + } + } + + private static native boolean lockAndInitHandle(ByteBuffer lock_buffer, Canvas component) throws LWJGLException; + + void unlock() throws LWJGLException { + nUnlock(lock_buffer); + } + + private static native void nUnlock(ByteBuffer lock_buffer) throws LWJGLException; +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/AWTUtil.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/AWTUtil.java new file mode 100644 index 0000000..c1eee83 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/AWTUtil.java @@ -0,0 +1,185 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + * @author elias_naur + */ + +import java.awt.Component; +import java.awt.Cursor; +import java.awt.Dimension; +import java.awt.GraphicsConfiguration; +import java.awt.GraphicsDevice; +import java.awt.IllegalComponentStateException; +import java.awt.MouseInfo; +import java.awt.Point; +import java.awt.PointerInfo; +import java.awt.Robot; +import java.awt.Toolkit; +import java.awt.image.BufferedImage; +import java.nio.IntBuffer; +import java.security.AccessController; +import java.security.PrivilegedActionException; +import java.security.PrivilegedExceptionAction; + +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; + +final class AWTUtil { + public static boolean hasWheel() { + return true; + } + + public static int getButtonCount() { + return MouseEventQueue.NUM_BUTTONS; + } + + public static int getNativeCursorCapabilities() { + if (LWJGLUtil.getPlatform() != LWJGLUtil.PLATFORM_MACOSX || LWJGLUtil.isMacOSXEqualsOrBetterThan(10, 4)) { + int cursor_colors = Toolkit.getDefaultToolkit().getMaximumCursorColors(); + boolean supported = cursor_colors >= Short.MAX_VALUE && getMaxCursorSize() > 0; + int caps = supported ? org.lwjgl.input.Cursor.CURSOR_8_BIT_ALPHA | org.lwjgl.input.Cursor.CURSOR_ONE_BIT_TRANSPARENCY: 0 | org.lwjgl.input.Cursor.CURSOR_ANIMATION; + return caps; + } else { + /* Return no capability in Mac OS X 10.3 and earlier , as there are two unsolved bugs (both reported to apple along with + minimal test case): + 1. When a custom cursor (or some standard) java.awt.Cursor is assigned to a + Componennt, it is reset to the default pointer cursor when the window is de- + activated and the re-activated. The Cursor can not be reset to the custom cursor, + with another setCursor. + 2. When the cursor is moving in the top pixel row (y = 0 in AWT coordinates) in fullscreen + mode, no mouse moved events are reported, even though mouse pressed/released and dragged + events are reported + */ + return 0; + } + } + + public static Robot createRobot(final Component component) { + try { + return AccessController.doPrivileged(new PrivilegedExceptionAction() { + public Robot run() throws Exception { + return new Robot(component.getGraphicsConfiguration().getDevice()); + } + }); + } catch (PrivilegedActionException e) { + LWJGLUtil.log("Got exception while creating robot: " + e.getCause()); + return null; + } + } + + private static int transformY(Component component, int y) { + return component.getHeight() - 1 - y; + } + + /** + * Use reflection to access the JDK 1.5 pointer location, if possible and + * only if the given component is on the same screen as the cursor. Return + * null otherwise. + */ + private static Point getPointerLocation(final Component component) { + try { + final GraphicsConfiguration config = component.getGraphicsConfiguration(); + if (config != null) { + PointerInfo pointer_info = AccessController.doPrivileged(new PrivilegedExceptionAction() { + public PointerInfo run() throws Exception { + return MouseInfo.getPointerInfo(); + } + }); + GraphicsDevice device = pointer_info.getDevice(); + if (device == config.getDevice()) { + return pointer_info.getLocation(); + } + return null; + } + } catch (Exception e) { + LWJGLUtil.log("Failed to query pointer location: " + e.getCause()); + } + return null; + } + + /** + * Use the 1.5 API to get the cursor position relative to the component. Return null + * if it fails (JDK <= 1.4). + */ + public static Point getCursorPosition(Component component) { + try { + Point pointer_location = getPointerLocation(component); + if (pointer_location != null) { + Point location = component.getLocationOnScreen(); + pointer_location.translate(-location.x, -location.y); + pointer_location.move(pointer_location.x, transformY(component, pointer_location.y)); + return pointer_location; + } + } catch (IllegalComponentStateException e) { + LWJGLUtil.log("Failed to set cursor position: " + e); + } catch (NoClassDefFoundError e) { // Not JDK 1.5 + LWJGLUtil.log("Failed to query cursor position: " + e); + } + return null; + } + + public static void setCursorPosition(Component component, Robot robot, int x, int y) { + if (robot != null) { + try { + Point location = component.getLocationOnScreen(); + int transformed_x = location.x + x; + int transformed_y = location.y + transformY(component, y); + robot.mouseMove(transformed_x, transformed_y); + } catch (IllegalComponentStateException e) { + LWJGLUtil.log("Failed to set cursor position: " + e); + } + } + } + + public static int getMinCursorSize() { + Dimension min_size = Toolkit.getDefaultToolkit().getBestCursorSize(0, 0); + return Math.max(min_size.width, min_size.height); + } + + public static int getMaxCursorSize() { + Dimension max_size = Toolkit.getDefaultToolkit().getBestCursorSize(10000, 10000); + return Math.min(max_size.width, max_size.height); + } + + /** Native cursor handles */ + public static Cursor createCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLException { + BufferedImage cursor_image = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); + int[] pixels = new int[images.remaining()]; + int old_position = images.position(); + images.get(pixels); + images.position(old_position); + cursor_image.setRGB(0, 0, width, height, pixels, 0, width); + return Toolkit.getDefaultToolkit().createCustomCursor(cursor_image, new Point(xHotspot, yHotspot), "LWJGL Custom cursor"); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/BaseReferences.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/BaseReferences.java new file mode 100644 index 0000000..8f862fe --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/BaseReferences.java @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import java.nio.Buffer; +import java.util.Arrays; + +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.opengl.GL13.*; +import static org.lwjgl.opengl.GL20.*; + +class BaseReferences { + + int elementArrayBuffer; + int arrayBuffer; + final Buffer[] glVertexAttribPointer_buffer; + final Buffer[] glTexCoordPointer_buffer; + int glClientActiveTexture; + + int vertexArrayObject; + + int pixelPackBuffer; + int pixelUnpackBuffer; + + int indirectBuffer; + + BaseReferences(ContextCapabilities caps) { + int max_vertex_attribs; + if ( caps.OpenGL20 || caps.GL_ARB_vertex_shader ) + max_vertex_attribs = glGetInteger(GL_MAX_VERTEX_ATTRIBS); + else + max_vertex_attribs = 0; + glVertexAttribPointer_buffer = new Buffer[max_vertex_attribs]; + + int max_texture_units; + if ( caps.OpenGL20 ) + max_texture_units = glGetInteger(GL_MAX_TEXTURE_IMAGE_UNITS); + else if ( caps.OpenGL13 || caps.GL_ARB_multitexture ) + max_texture_units = glGetInteger(GL_MAX_TEXTURE_UNITS); + else + max_texture_units = 1; + glTexCoordPointer_buffer = new Buffer[max_texture_units]; + } + + void clear() { + this.elementArrayBuffer = 0; + this.arrayBuffer = 0; + this.glClientActiveTexture = 0; + Arrays.fill(glVertexAttribPointer_buffer, null); + Arrays.fill(glTexCoordPointer_buffer, null); + + this.vertexArrayObject = 0; + + this.pixelPackBuffer = 0; + this.pixelUnpackBuffer = 0; + + this.indirectBuffer = 0; + } + + void copy(BaseReferences references, int mask) { + if ( (mask & GL_CLIENT_VERTEX_ARRAY_BIT) != 0 ) { + this.elementArrayBuffer = references.elementArrayBuffer; + this.arrayBuffer = references.arrayBuffer; + this.glClientActiveTexture = references.glClientActiveTexture; + System.arraycopy(references.glVertexAttribPointer_buffer, 0, glVertexAttribPointer_buffer, 0, glVertexAttribPointer_buffer.length); + System.arraycopy(references.glTexCoordPointer_buffer, 0, glTexCoordPointer_buffer, 0, glTexCoordPointer_buffer.length); + + this.vertexArrayObject = references.vertexArrayObject; + + this.indirectBuffer = references.indirectBuffer; + } + + if ( (mask & GL_CLIENT_PIXEL_STORE_BIT) != 0 ) { + this.pixelPackBuffer = references.pixelPackBuffer; + this.pixelUnpackBuffer = references.pixelUnpackBuffer; + } + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/CallbackUtil.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/CallbackUtil.java new file mode 100644 index 0000000..afbbd69 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/CallbackUtil.java @@ -0,0 +1,186 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import java.util.HashMap; +import java.util.Map; + +/** + * Utility class that handles OpenGL API callbacks. + * + * @author Spasi + */ +final class CallbackUtil { + + /** Context -> Long */ + private static final Map contextUserParamsARB = new HashMap(); + /** Context -> Long */ + private static final Map contextUserParamsAMD = new HashMap(); + /** Context -> Long */ + private static final Map contextUserParamsKHR = new HashMap(); + + private CallbackUtil() {} + + /** + * Creates a new global reference to the specified Object. + * + * @param obj the Object + * + * @return the GlobalRef memory address or 0 if the Object is null. + */ + static long createGlobalRef(final Object obj) { + return obj == null ? 0 : ncreateGlobalRef(obj); + } + + /** + * Creates a new global reference to the specified Object. + * + * @param obj the Object + * + * @return the GlobalRef memory address. + */ + private static native long ncreateGlobalRef(Object obj); + + /** + * Deletes a global reference. + * + * @param ref the GlobalRef memory address. + */ + private static native void deleteGlobalRef(long ref); + + // --------- [ XXX_debug_output ] --------- + + /** + * Associates the current OpenGL context with the specified global reference. If there + * is no context current, the global reference is deleted and an exception is thrown. + * Any previous callback registrations will be cleared. + * + * @param userParam the global reference pointer + */ + private static void registerContextCallback(final long userParam, final Map contextUserData) { + ContextCapabilities caps = GLContext.getCapabilities(); + if ( caps == null ) { + deleteGlobalRef(userParam); + throw new IllegalStateException("No context is current."); + } + + final Long userParam_old = contextUserData.remove(caps); + if ( userParam_old != null ) + deleteGlobalRef(userParam_old); + + if ( userParam != 0 ) + contextUserData.put(caps, userParam); + } + + /** + * Releases references to any callbacks associated with the specified GL context. + * + * @param context the Context to unregister + */ + static void unregisterCallbacks(final Object context) { + // TODO: This is never called for custom contexts. Need to fix for LWJGL 3.0 + final ContextCapabilities caps = GLContext.getCapabilities(context); + + Long userParam = contextUserParamsARB.remove(caps); + if ( userParam != null ) + deleteGlobalRef(userParam); + + userParam = contextUserParamsAMD.remove(caps); + if ( userParam != null ) + deleteGlobalRef(userParam); + + userParam = contextUserParamsKHR.remove(caps); + if ( userParam != null ) + deleteGlobalRef(userParam); + } + + // --------- [ ARB_debug_output ] --------- + + /** + * Returns the memory address of the native function we pass to glDebugMessageCallbackARB. + * + * @return the callback function address + */ + static native long getDebugOutputCallbackARB(); + + /** + * Associates the current OpenGL context with the specified global reference. If there + * is no context current, the global reference is deleted and an exception is thrown. + * Any previous callback registrations will be cleared. + * + * @param userParam the global reference pointer + */ + static void registerContextCallbackARB(final long userParam) { + registerContextCallback(userParam, contextUserParamsARB); + } + + // --------- [ AMD_debug_output ] --------- + + /** + * Returns the memory address of the native function we pass to glDebugMessageCallbackAMD. + * + * @return the callback function address + */ + static native long getDebugOutputCallbackAMD(); + + /** + * Associates the current OpenGL context with the specified global reference. If there + * is no context current, the global reference is deleted and an exception is thrown. + * Any previous callback registrations will be cleared. + * + * @param userParam the global reference pointer + */ + static void registerContextCallbackAMD(final long userParam) { + registerContextCallback(userParam, contextUserParamsAMD); + } + + // --------- [ KHR_debug ] --------- + + /** + * Returns the memory address of the native function we pass to glDebugMessageCallback. + * + * @return the callback function address + */ + static native long getDebugCallbackKHR(); + + /** + * Associates the current OpenGL context with the specified global reference. If there + * is no context current, the global reference is deleted and an exception is thrown. + * Any previous callback registrations will be cleared. + * + * @param userParam the global reference pointer + */ + static void registerContextCallbackKHR(final long userParam) { + registerContextCallback(userParam, contextUserParamsKHR); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/Context.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/Context.java new file mode 100644 index 0000000..4379ae8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/Context.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.LWJGLException; + +/** + * @author Spasi + * @since 14/5/2011 + */ +interface Context { + + boolean isCurrent() throws LWJGLException; + + void makeCurrent() throws LWJGLException; + + void releaseCurrent() throws LWJGLException; + + void releaseDrawable() throws LWJGLException; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/ContextAttribs.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/ContextAttribs.java new file mode 100644 index 0000000..b385251 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/ContextAttribs.java @@ -0,0 +1,350 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLUtil; + +import java.nio.IntBuffer; + +/** + * This class represents the context attributes passed to CreateContextAttribs of the ARB_create_context and + * ARB_create_context_profile extensions. + * These attributes can be used to indicate at context creation which OpenGL interface will be used. This includes the + * OpenGL version, the layer plane on which rendering takes place and also optional debug and forward combatibility modes. + * (read the ARB_create_context spec for details) + *

+ * Use of this class is optional. If an OpenGL context is created without passing an instance of this class + * (or ARB_create_context is not supported), the old context creation code will be used. Support for debug and forward + * compatible mobes is not guaranteed by the OpenGL implementation. Developers may encounter debug contexts being the same + * as non-debug contexts or forward compatible contexts having support for deprecated functionality. + *

+ * If the forwardCompatible + * attribute is used, LWJGL will not load the deprecated functionality (as defined in the OpenGL 3.0 specification). This + * means that developers can start working on cleaning up their applications without an OpenGL 3.0 complaint driver. + *

+ * This extension is not supported on MacOS X. However, in order to enable the GL 3.2 context on MacOS X 10.7 or newer, an + * instance of this class must be passed to LWJGL. The only valid configuration is new ContextAttribs(3, 2).withProfileCore(), + * anything else will be ignored. + * + * @author spasi + */ +public final class ContextAttribs { + + // Same values for GLX & WGL + private static final int CONTEXT_ES2_PROFILE_BIT_EXT = 0x00000004; + + private static final int CONTEXT_ROBUST_ACCESS_BIT_ARB = 0x00000004; + private static final int CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB = 0x8256; + private static final int + NO_RESET_NOTIFICATION_ARB = 0x8261, + LOSE_CONTEXT_ON_RESET_ARB = 0x8252; + + private static final int CONTEXT_RESET_ISOLATION_BIT_ARB = 0x00000008; + + private int majorVersion; + private int minorVersion; + + private int layerPlane; + + private boolean debug; + private boolean forwardCompatible; + private boolean robustAccess; + + private boolean profileCore; + private boolean profileCompatibility; + private boolean profileES; + + private boolean loseContextOnReset; + private boolean contextResetIsolation; + + public ContextAttribs() { + this(1, 0); + } + + public ContextAttribs(final int majorVersion, final int minorVersion) { + if ( majorVersion < 0 || 4 < majorVersion || + minorVersion < 0 || + (majorVersion == 4 && 4 < minorVersion) || + (majorVersion == 3 && 3 < minorVersion) || + (majorVersion == 2 && 1 < minorVersion) || + (majorVersion == 1 && 5 < minorVersion) ) + throw new IllegalArgumentException("Invalid OpenGL version specified: " + majorVersion + '.' + minorVersion); + + this.majorVersion = majorVersion; + this.minorVersion = minorVersion; + } + + private ContextAttribs(final ContextAttribs attribs) { + this.majorVersion = attribs.majorVersion; + this.minorVersion = attribs.minorVersion; + + this.layerPlane = attribs.layerPlane; + + this.debug = attribs.debug; + this.forwardCompatible = attribs.forwardCompatible; + this.robustAccess = attribs.robustAccess; + + this.profileCore = attribs.profileCore; + this.profileCompatibility = attribs.profileCompatibility; + this.profileES = attribs.profileES; + + this.loseContextOnReset = attribs.loseContextOnReset; + } + + public int getMajorVersion() { + return majorVersion; + } + + public int getMinorVersion() { + return minorVersion; + } + + public int getLayerPlane() { + return layerPlane; + } + + public boolean isDebug() { + return debug; + } + + public boolean isForwardCompatible() { + return forwardCompatible; + } + + public boolean isProfileCore() { + return profileCore; + } + + public boolean isProfileCompatibility() { + return profileCompatibility; + } + + public boolean isProfileES() { + return profileES; + } + + public ContextAttribs withLayer(final int layerPlane) { + if ( layerPlane < 0 ) + throw new IllegalArgumentException("Invalid layer plane specified: " + layerPlane); + + if ( layerPlane == this.layerPlane ) + return this; + + final ContextAttribs attribs = new ContextAttribs(this); + attribs.layerPlane = layerPlane; + return attribs; + } + + public ContextAttribs withDebug(final boolean debug) { + if ( debug == this.debug ) + return this; + + final ContextAttribs attribs = new ContextAttribs(this); + attribs.debug = debug; + return attribs; + } + + public ContextAttribs withForwardCompatible(final boolean forwardCompatible) { + if ( forwardCompatible == this.forwardCompatible ) + return this; + + final ContextAttribs attribs = new ContextAttribs(this); + attribs.forwardCompatible = forwardCompatible; + return attribs; + } + + public ContextAttribs withProfileCore(final boolean profileCore) { + if ( majorVersion < 3 || (majorVersion == 3 && minorVersion < 2) ) + throw new IllegalArgumentException("Profiles are only supported on OpenGL version 3.2 or higher."); + + if ( profileCore == this.profileCore ) + return this; + + final ContextAttribs attribs = new ContextAttribs(this); + attribs.profileCore = profileCore; + if ( profileCore ) + attribs.profileCompatibility = false; + + return attribs; + } + + public ContextAttribs withProfileCompatibility(final boolean profileCompatibility) { + if ( majorVersion < 3 || (majorVersion == 3 && minorVersion < 2) ) + throw new IllegalArgumentException("Profiles are only supported on OpenGL version 3.2 or higher."); + + if ( profileCompatibility == this.profileCompatibility ) + return this; + + final ContextAttribs attribs = new ContextAttribs(this); + attribs.profileCompatibility = profileCompatibility; + if ( profileCompatibility ) + attribs.profileCore = false; + + return attribs; + } + + public ContextAttribs withProfileES(final boolean profileES) { + if ( !(majorVersion == 2 && minorVersion == 0) ) + throw new IllegalArgumentException("The OpenGL ES profiles is only supported for OpenGL version 2.0."); + + if ( profileES == this.profileES ) + return this; + + final ContextAttribs attribs = new ContextAttribs(this); + attribs.profileES = profileES; + + return attribs; + } + + /** + * Returns a ContextAttribs instance with CONTEXT_RESET_NOTIFICATION_STRATEGY set + * to LOSE_CONTEXT_ON_RESET if the parameter is true or to NO_RESET_NOTIFICATION + * if the parameter is false. + * + * @param loseContextOnReset + * + * @return the new ContextAttribs + */ + public ContextAttribs withLoseContextOnReset(final boolean loseContextOnReset) { + if ( loseContextOnReset == this.loseContextOnReset ) + return this; + + final ContextAttribs attribs = new ContextAttribs(this); + attribs.loseContextOnReset = loseContextOnReset; + return attribs; + } + + public ContextAttribs withContextResetIsolation(final boolean contextResetIsolation) { + if ( contextResetIsolation == this.contextResetIsolation ) + return this; + + final ContextAttribs attribs = new ContextAttribs(this); + attribs.contextResetIsolation = contextResetIsolation; + return attribs; + } + + private static ContextAttribsImplementation getImplementation() { + switch ( LWJGLUtil.getPlatform() ) { + case LWJGLUtil.PLATFORM_LINUX: + return new LinuxContextAttribs(); + case LWJGLUtil.PLATFORM_WINDOWS: + return new WindowsContextAttribs(); + default: + throw new IllegalStateException("Unsupported platform"); + } + } + + IntBuffer getAttribList() { + if ( LWJGLUtil.getPlatform() == LWJGLUtil.PLATFORM_MACOSX ) + return null; + + ContextAttribsImplementation implementation = getImplementation(); + + int attribCount = 0; + + if ( !(majorVersion == 1 && minorVersion == 0) ) + attribCount += 2; + if ( 0 < layerPlane ) + attribCount++; + + int flags = 0; + if ( debug ) + flags |= implementation.getDebugBit(); + if ( forwardCompatible ) + flags |= implementation.getForwardCompatibleBit(); + if ( robustAccess ) + flags |= CONTEXT_ROBUST_ACCESS_BIT_ARB; + if ( contextResetIsolation ) + flags |= CONTEXT_RESET_ISOLATION_BIT_ARB; + if ( 0 < flags ) + attribCount++; + + int profileMask = 0; + if ( profileCore ) + profileMask |= implementation.getProfileCoreBit(); + else if ( profileCompatibility ) + profileMask |= implementation.getProfileCompatibilityBit(); + else if ( profileES ) + profileMask |= CONTEXT_ES2_PROFILE_BIT_EXT; + if ( 0 < profileMask ) + attribCount++; + + if ( loseContextOnReset ) + attribCount++; + + if ( attribCount == 0 ) + return null; + + final IntBuffer attribs = BufferUtils.createIntBuffer((attribCount * 2) + 1); + + if ( !(majorVersion == 1 && minorVersion == 0) ) { + attribs.put(implementation.getMajorVersionAttrib()).put(majorVersion); + attribs.put(implementation.getMinorVersionAttrib()).put(minorVersion); + } + if ( 0 < layerPlane ) + attribs.put(implementation.getLayerPlaneAttrib()).put(layerPlane); + if ( 0 < flags ) + attribs.put(implementation.getFlagsAttrib()).put(flags); + if ( 0 < profileMask ) + attribs.put(implementation.getProfileMaskAttrib()).put(profileMask); + if ( loseContextOnReset ) + attribs.put(CONTEXT_RESET_NOTIFICATION_STRATEGY_ARB).put(LOSE_CONTEXT_ON_RESET_ARB); + + attribs.put(0); + attribs.rewind(); + return attribs; + } + + public String toString() { + StringBuilder sb = new StringBuilder(32); + + sb.append("ContextAttribs:"); + sb.append(" Version=").append(majorVersion).append('.').append(minorVersion); + sb.append(" - Layer=").append(layerPlane); + sb.append(" - Debug=").append(debug); + sb.append(" - ForwardCompatible=").append(forwardCompatible); + sb.append(" - RobustAccess=").append(robustAccess); + if ( robustAccess ) + sb.append(" (").append(loseContextOnReset ? "LOSE_CONTEXT_ON_RESET" : "NO_RESET_NOTIFICATION"); + sb.append(" - Profile="); + if ( profileCore ) + sb.append("Core"); + else if ( profileCompatibility ) + sb.append("Compatibility"); + else + sb.append("None"); + + return sb.toString(); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/ContextAttribsImplementation.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/ContextAttribsImplementation.java new file mode 100644 index 0000000..d47a423 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/ContextAttribsImplementation.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.opengl; + +/** @author spasi */ +interface ContextAttribsImplementation { + + int getMajorVersionAttrib(); + + int getMinorVersionAttrib(); + + int getLayerPlaneAttrib(); + + int getFlagsAttrib(); + + int getDebugBit(); + + int getForwardCompatibleBit(); + + int getProfileMaskAttrib(); + + int getProfileCoreBit(); + + int getProfileCompatibilityBit(); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/ContextGL.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/ContextGL.java new file mode 100644 index 0000000..8822f5f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/ContextGL.java @@ -0,0 +1,295 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; +import org.lwjgl.PointerBuffer; +import org.lwjgl.Sys; +import org.lwjgl.opencl.KHRGLSharing; +import org.lwjgl.opencl.APPLEGLSharing; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +import static org.lwjgl.opengl.GL11.*; + +/** + *

+ * Context encapsulates an OpenGL context. + *

+ *

+ * This class is thread-safe. + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +final class ContextGL implements Context { + + /** The platform specific implementation of context methods */ + private static final ContextImplementation implementation; + + /** The current Context */ + private static final ThreadLocal current_context_local = new ThreadLocal(); + + /** Handle to the native GL rendering context */ + private final ByteBuffer handle; + private final PeerInfo peer_info; + + private final ContextAttribs contextAttribs; + private final boolean forwardCompatible; + + /** Whether the context has been destroyed */ + private boolean destroyed; + + private boolean destroy_requested; + + /** The thread that has this context current, or null. */ + private Thread thread; + + static { + Sys.initialize(); + implementation = createImplementation(); + } + + private static ContextImplementation createImplementation() { + switch ( LWJGLUtil.getPlatform() ) { + case LWJGLUtil.PLATFORM_LINUX: + return new LinuxContextImplementation(); + case LWJGLUtil.PLATFORM_WINDOWS: + return new WindowsContextImplementation(); + case LWJGLUtil.PLATFORM_MACOSX: + return new MacOSXContextImplementation(); + default: + throw new IllegalStateException("Unsupported platform"); + } + } + + PeerInfo getPeerInfo() { + return peer_info; + } + + ContextAttribs getContextAttribs() { + return contextAttribs; + } + + static ContextGL getCurrentContext() { + return current_context_local.get(); + } + + /** Create a context with the specified peer info and shared context */ + ContextGL(PeerInfo peer_info, ContextAttribs attribs, ContextGL shared_context) throws LWJGLException { + ContextGL context_lock = shared_context != null ? shared_context : this; + // If shared_context is not null, synchronize on it to make sure it is not deleted + // while this context is created. Otherwise, simply synchronize on ourself to avoid NPE + synchronized ( context_lock ) { + if ( shared_context != null && shared_context.destroyed ) + throw new IllegalArgumentException("Shared context is destroyed"); + GLContext.loadOpenGLLibrary(); + try { + this.peer_info = peer_info; + this.contextAttribs = attribs; + + IntBuffer attribList; + if ( attribs != null ) { + attribList = attribs.getAttribList(); + forwardCompatible = attribs.isForwardCompatible(); + } else { + attribList = null; + forwardCompatible = false; + } + + this.handle = implementation.create(peer_info, attribList, shared_context != null ? shared_context.handle : null); + } catch (LWJGLException e) { + GLContext.unloadOpenGLLibrary(); + throw e; + } + } + } + + /** Release the current context (if any). After this call, no context is current. */ + public void releaseCurrent() throws LWJGLException { + ContextGL current_context = getCurrentContext(); + if ( current_context != null ) { + implementation.releaseCurrentContext(); + GLContext.useContext(null); + current_context_local.set(null); + synchronized ( current_context ) { + current_context.thread = null; + current_context.checkDestroy(); + } + } + } + + /** + * Release the context from its drawable. This is necessary on some platforms, + * like Mac OS X, where binding the context to a drawable and binding the context + * for rendering are two distinct actions and where calling releaseDrawable + * on every releaseCurrentContext results in artifacts. + */ + public synchronized void releaseDrawable() throws LWJGLException { + if ( destroyed ) + throw new IllegalStateException("Context is destroyed"); + implementation.releaseDrawable(getHandle()); + } + + /** Update the context. Should be called whenever it's drawable is moved or resized */ + public synchronized void update() { + if ( destroyed ) + throw new IllegalStateException("Context is destroyed"); + implementation.update(getHandle()); + } + + /** Swap the buffers on the current context. Only valid for double-buffered contexts */ + public static void swapBuffers() throws LWJGLException { + implementation.swapBuffers(); + } + + private boolean canAccess() { + return thread == null || Thread.currentThread() == thread; + } + + private void checkAccess() { + if ( !canAccess() ) + throw new IllegalStateException("From thread " + Thread.currentThread() + ": " + thread + " already has the context current"); + } + + /** Make the context current */ + public synchronized void makeCurrent() throws LWJGLException { + checkAccess(); + if ( destroyed ) + throw new IllegalStateException("Context is destroyed"); + thread = Thread.currentThread(); + current_context_local.set(this); + implementation.makeCurrent(peer_info, handle); + GLContext.useContext(this, forwardCompatible); + } + + ByteBuffer getHandle() { + return handle; + } + + /** Query whether the context is current */ + public synchronized boolean isCurrent() throws LWJGLException { + if ( destroyed ) + throw new IllegalStateException("Context is destroyed"); + return implementation.isCurrent(handle); + } + + private void checkDestroy() { + if ( !destroyed && destroy_requested ) { + try { + releaseDrawable(); + implementation.destroy(peer_info, handle); + CallbackUtil.unregisterCallbacks(this); + destroyed = true; + thread = null; + GLContext.unloadOpenGLLibrary(); + } catch (LWJGLException e) { + LWJGLUtil.log("Exception occurred while destroying context: " + e); + } + } + } + + /** + * Set the buffer swap interval. This call is a best-attempt at changing + * the monitor swap interval, which is the minimum periodicity of color buffer swaps, + * measured in video frame periods, and is not guaranteed to be successful. + *

+ * A video frame period is the time required to display a full frame of video data. + */ + public static void setSwapInterval(int value) { + implementation.setSwapInterval(value); + } + + /** + * Destroy the context. This method behaves the same as destroy() with the extra + * requirement that the context must be either current to the current thread or not + * current at all. + */ + public synchronized void forceDestroy() throws LWJGLException { + checkAccess(); + destroy(); + } + + /** + * Request destruction of the Context. If the context is current, no context will be current after this call. + * The context is destroyed when no thread has it current. + */ + public synchronized void destroy() throws LWJGLException { + if ( destroyed ) + return; + destroy_requested = true; + boolean was_current = isCurrent(); + int error = GL_NO_ERROR; + if ( was_current ) { + if ( GLContext.getCapabilities() != null && GLContext.getCapabilities().OpenGL11 ) + error = glGetError(); + releaseCurrent(); + } + checkDestroy(); + if ( was_current && error != GL_NO_ERROR ) + throw new OpenGLException(error); + } + + public synchronized void setCLSharingProperties(final PointerBuffer properties) throws LWJGLException { + final ByteBuffer peer_handle = peer_info.lockAndGetHandle(); + try { + switch ( LWJGLUtil.getPlatform() ) { + case LWJGLUtil.PLATFORM_WINDOWS: + final WindowsContextImplementation implWindows = (WindowsContextImplementation)implementation; + properties.put(KHRGLSharing.CL_GL_CONTEXT_KHR).put(implWindows.getHGLRC(handle)); + properties.put(KHRGLSharing.CL_WGL_HDC_KHR).put(implWindows.getHDC(peer_handle)); + break; + case LWJGLUtil.PLATFORM_LINUX: + final LinuxContextImplementation implLinux = (LinuxContextImplementation)implementation; + properties.put(KHRGLSharing.CL_GL_CONTEXT_KHR).put(implLinux.getGLXContext(handle)); + properties.put(KHRGLSharing.CL_GLX_DISPLAY_KHR).put(implLinux.getDisplay(peer_handle)); + break; + case LWJGLUtil.PLATFORM_MACOSX: + if (LWJGLUtil.isMacOSXEqualsOrBetterThan(10, 6)) { // only supported on OS X 10.6+ + // http://oscarbg.blogspot.com/2009/10/about-opencl-opengl-interop.html + final MacOSXContextImplementation implMacOSX = (MacOSXContextImplementation)implementation; + final long CGLShareGroup = implMacOSX.getCGLShareGroup(handle); + properties.put(APPLEGLSharing.CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE).put(CGLShareGroup); + break; + } + default: + throw new UnsupportedOperationException("CL/GL context sharing is not supported on this platform."); + } + } finally { + peer_info.unlock(); + } + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/ContextGLES.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/ContextGLES.java new file mode 100644 index 0000000..ed1cb20 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/ContextGLES.java @@ -0,0 +1,224 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; +import org.lwjgl.Sys; +import org.lwjgl.opengles.EGLContext; +import org.lwjgl.opengles.GLContext; +import org.lwjgl.opengles.GLES20; +import org.lwjgl.opengles.PowerManagementEventException; + +import static org.lwjgl.opengles.EGL.*; + +/** + *

+ * Context encapsulates an OpenGL ES context. + *

+ *

+ * This class is thread-safe. + * + * @author elias_naur + * @version $Revision: 3332 $ + * $Id: Context.java 3332 2010-04-20 18:21:05Z spasi $ + */ +final class ContextGLES implements org.lwjgl.opengl.Context { + + /** The current Context */ + private static final ThreadLocal current_context_local = new ThreadLocal(); + + /** Handle to the native GL rendering context */ + private final DrawableGLES drawable; + private final EGLContext eglContext; + + private final org.lwjgl.opengles.ContextAttribs contextAttribs; + + /** Whether the context has been destroyed */ + private boolean destroyed; + + private boolean destroy_requested; + + /** The thread that has this context current, or null. */ + private Thread thread; + + static { + Sys.initialize(); + } + + public EGLContext getEGLContext() { + return eglContext; + } + + org.lwjgl.opengles.ContextAttribs getContextAttribs() { + return contextAttribs; + } + + static ContextGLES getCurrentContext() { + return current_context_local.get(); + } + + /** Create a context with the specified peer info and shared context */ + ContextGLES(DrawableGLES drawable, org.lwjgl.opengles.ContextAttribs attribs, ContextGLES shared_context) throws LWJGLException { + if ( drawable == null ) + throw new IllegalArgumentException(); + + ContextGLES context_lock = shared_context != null ? shared_context : this; + // If shared_context is not null, synchronize on it to make sure it is not deleted + // while this context is created. Otherwise, simply synchronize on ourself to avoid NPE + synchronized ( context_lock ) { + if ( shared_context != null && shared_context.destroyed ) + throw new IllegalArgumentException("Shared context is destroyed"); + + this.drawable = drawable; + this.contextAttribs = attribs; + this.eglContext = drawable.getEGLDisplay().createContext(drawable.getEGLConfig(), + shared_context == null ? null : shared_context.eglContext, + attribs == null ? new org.lwjgl.opengles.ContextAttribs(2).getAttribList() : attribs.getAttribList()); + } + } + + /** Release the current context (if any). After this call, no context is current. */ + public void releaseCurrent() throws LWJGLException, PowerManagementEventException { + eglReleaseCurrent(drawable.getEGLDisplay()); + org.lwjgl.opengles.GLContext.useContext(null); + current_context_local.set(null); + + synchronized ( this ) { + thread = null; + checkDestroy(); + } + } + + /** Swap the buffers on the current context. Only valid for double-buffered contexts */ + public static void swapBuffers() throws LWJGLException, PowerManagementEventException { + ContextGLES current_context = getCurrentContext(); + if ( current_context != null ) + current_context.drawable.getEGLSurface().swapBuffers(); + } + + private boolean canAccess() { + return thread == null || Thread.currentThread() == thread; + } + + private void checkAccess() { + if ( !canAccess() ) + throw new IllegalStateException("From thread " + Thread.currentThread() + ": " + thread + " already has the context current"); + } + + /** Make the context current */ + public synchronized void makeCurrent() throws LWJGLException, PowerManagementEventException { + checkAccess(); + if ( destroyed ) + throw new IllegalStateException("Context is destroyed"); + thread = Thread.currentThread(); + current_context_local.set(this); + eglContext.makeCurrent(drawable.getEGLSurface()); + org.lwjgl.opengles.GLContext.useContext(this); + } + + /** Query whether the context is current */ + public synchronized boolean isCurrent() throws LWJGLException { + if ( destroyed ) + throw new IllegalStateException("Context is destroyed"); + return eglIsCurrentContext(eglContext); + } + + private void checkDestroy() { + if ( !destroyed && destroy_requested ) { + try { + eglContext.destroy(); + destroyed = true; + thread = null; + } catch (LWJGLException e) { + LWJGLUtil.log("Exception occurred while destroying context: " + e); + } + } + } + + /** + * Set the buffer swap interval. This call is a best-attempt at changing + * the monitor swap interval, which is the minimum periodicity of color buffer swaps, + * measured in video frame periods, and is not guaranteed to be successful. + *

+ * A video frame period is the time required to display a full frame of video data. + */ + public static void setSwapInterval(int value) { + ContextGLES current_context = getCurrentContext(); + if ( current_context != null ) { + try { + current_context.drawable.getEGLDisplay().setSwapInterval(value); + } catch (LWJGLException e) { + LWJGLUtil.log("Failed to set swap interval. Reason: " + e.getMessage()); + } + } + } + + /** + * Destroy the context. This method behaves the same as destroy() with the extra + * requirement that the context must be either current to the current thread or not + * current at all. + */ + public synchronized void forceDestroy() throws LWJGLException { + checkAccess(); + destroy(); + } + + /** + * Request destruction of the Context. If the context is current, no context will be current after this call. + * The context is destroyed when no thread has it current. + */ + public synchronized void destroy() throws LWJGLException { + if ( destroyed ) + return; + destroy_requested = true; + boolean was_current = isCurrent(); + int error = GLES20.GL_NO_ERROR; + if ( was_current ) { + if ( org.lwjgl.opengles.GLContext.getCapabilities() != null && GLContext.getCapabilities().OpenGLES20 ) + error = GLES20.glGetError(); + + try { + releaseCurrent(); + } catch (PowerManagementEventException e) { + // Ignore + } + } + checkDestroy(); + if ( was_current && error != GLES20.GL_NO_ERROR ) + throw new OpenGLException(error); + } + + public void releaseDrawable() throws LWJGLException { + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/ContextImplementation.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/ContextImplementation.java new file mode 100644 index 0000000..0a5a42a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/ContextImplementation.java @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +import org.lwjgl.LWJGLException; + +/** + *

+ * Context implementation interface. + *

+ * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +interface ContextImplementation { + /** + * Create a context. + */ + ByteBuffer create(PeerInfo peer_info, IntBuffer attribs, ByteBuffer shared_context_handle) throws LWJGLException; + + /** + * Swap the buffers of the current context. Only valid for double-buffered contexts. + */ + void swapBuffers() throws LWJGLException; + + /** + * Release the context from its drawable, if any. + */ + void releaseDrawable(ByteBuffer context_handle) throws LWJGLException; + + /** + * Release the current context (if any). After this call, no context is current. + */ + void releaseCurrentContext() throws LWJGLException; + + /** + * Update the context. Should be called whenever it's drawable is moved or resized + */ + void update(ByteBuffer context_handle); + + /** + * Query whether the context is current + */ + void makeCurrent(PeerInfo peer_info, ByteBuffer handle) throws LWJGLException; + + /** + * Query whether the context is current + */ + boolean isCurrent(ByteBuffer handle) throws LWJGLException; + + void setSwapInterval(int value); + + /** + * Destroys the Context. + */ + void destroy(PeerInfo peer_info, ByteBuffer handle) throws LWJGLException; +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/Display.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/Display.java new file mode 100644 index 0000000..7d5686b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/Display.java @@ -0,0 +1,1375 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + * This is the abstract class for a Display in LWJGL. LWJGL displays have some + * peculiar characteristics: + * + * - the display may be closeable by the user or operating system, and may be minimized + * by the user or operating system + * - only one display may ever be open at once + * - the operating system may or may not be able to do fullscreen or windowed displays. + * + * @author foo + */ + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; +import org.lwjgl.Sys; +import org.lwjgl.input.Controllers; +import org.lwjgl.input.Keyboard; +import org.lwjgl.input.Mouse; + +import java.awt.*; +import java.awt.event.ComponentAdapter; +import java.awt.event.ComponentEvent; +import java.awt.event.ComponentListener; +import java.nio.ByteBuffer; +import java.nio.FloatBuffer; +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.util.Arrays; +import java.util.HashSet; + +public final class Display { + + private static final Thread shutdown_hook = new Thread() { + public void run() { + reset(); + } + }; + + /** The display implementor */ + private static final DisplayImplementation display_impl; + + /** The initial display mode */ + private static final DisplayMode initial_mode; + + /** The parent, if any */ + private static Canvas parent; + + /** The current display mode, if created */ + private static DisplayMode current_mode; + + /** X coordinate of the window */ + private static int x = -1; + + /** Cached window icons, for when Display is recreated */ + private static ByteBuffer[] cached_icons; + + /** + * Y coordinate of the window. Y in window coordinates is from the top of the display down, + * unlike GL, where it is typically at the bottom of the display. + */ + private static int y = -1; + + /** the width of the Display window */ + private static int width = 0; + + /** the height of the Display window */ + private static int height = 0; + + /** Title of the window (never null) */ + private static String title = "Game"; + + /** Fullscreen */ + private static boolean fullscreen; + + /** Swap interval */ + private static int swap_interval; + + /** The Drawable instance that tracks the current Display context */ + private static DrawableLWJGL drawable; + + private static boolean window_created; + + private static boolean parent_resized; + + private static boolean window_resized; + + private static boolean window_resizable; + + /** Initial Background Color of Display */ + private static float r, g, b; + + private static final ComponentListener component_listener = new ComponentAdapter() { + public void componentResized(ComponentEvent e) { + synchronized ( GlobalLock.lock ) { + parent_resized = true; + } + } + }; + + static { + Sys.initialize(); + display_impl = createDisplayImplementation(); + try { + current_mode = initial_mode = display_impl.init(); + LWJGLUtil.log("Initial mode: " + initial_mode); + } catch (LWJGLException e) { + throw new RuntimeException(e); + }; + } + + /** + * Fetch the Drawable from the Display. + * + * @return the Drawable corresponding to the Display context + */ + public static Drawable getDrawable() { + return drawable; + } + + private static DisplayImplementation createDisplayImplementation() { + switch ( LWJGLUtil.getPlatform() ) { + case LWJGLUtil.PLATFORM_LINUX: + return new LinuxDisplay(); + case LWJGLUtil.PLATFORM_WINDOWS: + return new WindowsDisplay(); + case LWJGLUtil.PLATFORM_MACOSX: + return new MacOSXDisplay(); + default: + throw new IllegalStateException("Unsupported platform"); + } + } + + /** Only constructed by ourselves */ + private Display() { + } + + /** + * Returns the entire list of possible fullscreen display modes as an array, in no + * particular order. Although best attempts to filter out invalid modes are done, any + * given mode is not guaranteed to be available nor is it guaranteed to be within the + * current monitor specs (this is especially a problem with the frequency parameter). + * Furthermore, it is not guaranteed that create() will detect an illegal display mode. + *

+ * The only certain way to check + * is to call create() and make sure it works. + * Only non-palette-indexed modes are returned (ie. bpp will be 16, 24, or 32). + * Only DisplayModes from this call can be used when the Display is in fullscreen + * mode. + * + * @return an array of all display modes the system reckons it can handle. + */ + public static DisplayMode[] getAvailableDisplayModes() throws LWJGLException { + synchronized ( GlobalLock.lock ) { + DisplayMode[] unfilteredModes = display_impl.getAvailableDisplayModes(); + + if ( unfilteredModes == null ) { + return new DisplayMode[0]; + } + + // We'll use a HashSet to filter out the duplicated modes + HashSet modes = new HashSet(unfilteredModes.length); + + modes.addAll(Arrays.asList(unfilteredModes)); + DisplayMode[] filteredModes = new DisplayMode[modes.size()]; + modes.toArray(filteredModes); + + LWJGLUtil.log("Removed " + (unfilteredModes.length - filteredModes.length) + " duplicate displaymodes"); + + return filteredModes; + } + } + + /** + * Return the initial desktop display mode. + * + * @return The desktop display mode + */ + public static DisplayMode getDesktopDisplayMode() { + return initial_mode; + } + + /** + * Return the current display mode, as set by setDisplayMode(). + * + * @return The current display mode + */ + public static DisplayMode getDisplayMode() { + return current_mode; + } + + /** + * Set the current display mode. If no OpenGL context has been created, the given mode will apply to + * the context when create() is called, and no immediate mode switching will happen. If there is a + * context already, it will be resized according to the given mode. If the context is also a + * fullscreen context, the mode will also be switched immediately. The native cursor position + * is also reset. + * + * @param mode The new display mode to set + * + * @throws LWJGLException if the display mode could not be set + */ + public static void setDisplayMode(DisplayMode mode) throws LWJGLException { + synchronized ( GlobalLock.lock ) { + if ( mode == null ) + throw new NullPointerException("mode must be non-null"); + boolean was_fullscreen = isFullscreen(); + current_mode = mode; + if ( isCreated() ) { + destroyWindow(); + // If mode is not fullscreen capable, make sure we are in windowed mode + try { + if ( was_fullscreen && !isFullscreen() ) + display_impl.resetDisplayMode(); + else if ( isFullscreen() ) + switchDisplayMode(); + createWindow(); + makeCurrentAndSetSwapInterval(); + } catch (LWJGLException e) { + drawable.destroy(); + display_impl.resetDisplayMode(); + throw e; + } + } + } + } + + private static DisplayMode getEffectiveMode() { + return !isFullscreen() && parent != null ? new DisplayMode(parent.getWidth(), parent.getHeight()) : current_mode; + } + + private static int getWindowX() { + if ( !isFullscreen() && parent == null ) { + // if no display location set, center window + if ( x == -1 ) { + return Math.max(0, (initial_mode.getWidth() - current_mode.getWidth()) / 2); + } else { + return x; + } + } else { + return 0; + } + } + + private static int getWindowY() { + if ( !isFullscreen() && parent == null ) { + // if no display location set, center window + if ( y == -1 ) { + return Math.max(0, (initial_mode.getHeight() - current_mode.getHeight()) / 2); + } else { + return y; + } + } else { + return 0; + } + } + + /** + * Create the native window peer from the given mode and fullscreen flag. + * A native context must exist, and it will be attached to the window. + */ + private static void createWindow() throws LWJGLException { + if ( window_created ) { + return; + } + Canvas tmp_parent = isFullscreen() ? null : parent; + if ( tmp_parent != null && !tmp_parent.isDisplayable() ) // Only a best effort check, since the parent can turn undisplayable hereafter + throw new LWJGLException("Parent.isDisplayable() must be true"); + if ( tmp_parent != null ) { + tmp_parent.addComponentListener(component_listener); + } + DisplayMode mode = getEffectiveMode(); + display_impl.createWindow(drawable, mode, tmp_parent, getWindowX(), getWindowY()); + window_created = true; + + width = Display.getDisplayMode().getWidth(); + height = Display.getDisplayMode().getHeight(); + + setTitle(title); + initControls(); + + // set cached window icon if exists + if ( cached_icons != null ) { + setIcon(cached_icons); + } else { + setIcon(new ByteBuffer[] { LWJGLUtil.LWJGLIcon32x32, LWJGLUtil.LWJGLIcon16x16 }); + } + } + + private static void releaseDrawable() { + try { + Context context = drawable.getContext(); + if ( context != null && context.isCurrent() ) { + context.releaseCurrent(); + context.releaseDrawable(); + } + } catch (LWJGLException e) { + LWJGLUtil.log("Exception occurred while trying to release context: " + e); + } + } + + private static void destroyWindow() { + if ( !window_created ) { + return; + } + if ( parent != null ) { + parent.removeComponentListener(component_listener); + } + releaseDrawable(); + + // Automatically destroy keyboard & mouse + if ( Mouse.isCreated() ) { + Mouse.destroy(); + } + if ( Keyboard.isCreated() ) { + Keyboard.destroy(); + } + display_impl.destroyWindow(); + window_created = false; + } + + private static void switchDisplayMode() throws LWJGLException { + if ( !current_mode.isFullscreenCapable() ) { + throw new IllegalStateException("Only modes acquired from getAvailableDisplayModes() can be used for fullscreen display"); + } + display_impl.switchDisplayMode(current_mode); + } + + /** + * Set the display configuration to the specified gamma, brightness and contrast. + * The configuration changes will be reset when destroy() is called. + * + * @param gamma The gamma value + * @param brightness The brightness value between -1.0 and 1.0, inclusive + * @param contrast The contrast, larger than 0.0. + */ + public static void setDisplayConfiguration(float gamma, float brightness, float contrast) throws LWJGLException { + synchronized ( GlobalLock.lock ) { + if ( !isCreated() ) { + throw new LWJGLException("Display not yet created."); + } + if ( brightness < -1.0f || brightness > 1.0f ) + throw new IllegalArgumentException("Invalid brightness value"); + if ( contrast < 0.0f ) + throw new IllegalArgumentException("Invalid contrast value"); + int rampSize = display_impl.getGammaRampLength(); + if ( rampSize == 0 ) { + throw new LWJGLException("Display configuration not supported"); + } + FloatBuffer gammaRamp = BufferUtils.createFloatBuffer(rampSize); + for ( int i = 0; i < rampSize; i++ ) { + float intensity = (float)i / (rampSize - 1); + // apply gamma + float rampEntry = (float)java.lang.Math.pow(intensity, gamma); + // apply brightness + rampEntry += brightness; + // apply contrast + rampEntry = (rampEntry - 0.5f) * contrast + 0.5f; + // Clamp entry to [0, 1] + if ( rampEntry > 1.0f ) + rampEntry = 1.0f; + else if ( rampEntry < 0.0f ) + rampEntry = 0.0f; + gammaRamp.put(i, rampEntry); + } + display_impl.setGammaRamp(gammaRamp); + LWJGLUtil.log("Gamma set, gamma = " + gamma + ", brightness = " + brightness + ", contrast = " + contrast); + } + } + + /** + * An accurate sync method that will attempt to run at a constant frame rate. + * It should be called once every frame. + * + * @param fps - the desired frame rate, in frames per second + */ + public static void sync(int fps) { + Sync.sync(fps); + } + + /** @return the title of the window */ + public static String getTitle() { + synchronized ( GlobalLock.lock ) { + return title; + } + } + + /** Return the last parent set with setParent(). */ + public static Canvas getParent() { + synchronized ( GlobalLock.lock ) { + return parent; + } + } + + /** + * Set the parent of the Display. If parent is null, the Display will appear as a top level window. + * If parent is not null, the Display is made a child of the parent. A parent's isDisplayable() must be true when + * setParent() is called and remain true until setParent() is called again with + * null or a different parent. This generally means that the parent component must remain added to it's parent container.

+ * It is not advisable to call this method from an AWT thread, since the context will be made current on the thread + * and it is difficult to predict which AWT thread will process any given AWT event.

+ * While the Display is in fullscreen mode, the current parent will be ignored. Additionally, when a non null parent is specified, + * the Dispaly will inherit the size of the parent, disregarding the currently set display mode.

+ */ + public static void setParent(Canvas parent) throws LWJGLException { + synchronized ( GlobalLock.lock ) { + if ( Display.parent != parent ) { + Display.parent = parent; + if ( !isCreated() ) + return; + destroyWindow(); + try { + if ( isFullscreen() ) { + switchDisplayMode(); + } else { + display_impl.resetDisplayMode(); + } + createWindow(); + makeCurrentAndSetSwapInterval(); + } catch (LWJGLException e) { + drawable.destroy(); + display_impl.resetDisplayMode(); + throw e; + } + } + } + } + + /** + * Set the fullscreen mode of the context. If no context has been created through create(), + * the mode will apply when create() is called. If fullscreen is true, the context will become + * a fullscreen context and the display mode is switched to the mode given by getDisplayMode(). If + * fullscreen is false, the context will become a windowed context with the dimensions given in the + * mode returned by getDisplayMode(). The native cursor position is also reset. + * + * @param fullscreen Specify the fullscreen mode of the context. + * + * @throws LWJGLException If fullscreen is true, and the current DisplayMode instance is not + * from getAvailableDisplayModes() or if the mode switch fails. + */ + public static void setFullscreen(boolean fullscreen) throws LWJGLException { + setDisplayModeAndFullscreenInternal(fullscreen, current_mode); + } + + /** + * Set the mode of the context. If no context has been created through create(), + * the mode will apply when create() is called. If mode.isFullscreenCapable() is true, the context will become + * a fullscreen context and the display mode is switched to the mode given by getDisplayMode(). If + * mode.isFullscreenCapable() is false, the context will become a windowed context with the dimensions given in the + * mode returned by getDisplayMode(). The native cursor position is also reset. + * + * @param mode The new display mode to set. Must be non-null. + * + * @throws LWJGLException If the mode switch fails. + */ + public static void setDisplayModeAndFullscreen(DisplayMode mode) throws LWJGLException { + setDisplayModeAndFullscreenInternal(mode.isFullscreenCapable(), mode); + } + + private static void setDisplayModeAndFullscreenInternal(boolean fullscreen, DisplayMode mode) throws LWJGLException { + synchronized ( GlobalLock.lock ) { + if ( mode == null ) + throw new NullPointerException("mode must be non-null"); + DisplayMode old_mode = current_mode; + current_mode = mode; + boolean was_fullscreen = isFullscreen(); + Display.fullscreen = fullscreen; + if ( was_fullscreen != isFullscreen() || !mode.equals(old_mode) ) { + if ( !isCreated() ) + return; + destroyWindow(); + try { + if ( isFullscreen() ) { + switchDisplayMode(); + } else { + display_impl.resetDisplayMode(); + } + createWindow(); + makeCurrentAndSetSwapInterval(); + } catch (LWJGLException e) { + drawable.destroy(); + display_impl.resetDisplayMode(); + throw e; + } + } + } + } + + /** @return whether the Display is in fullscreen mode */ + public static boolean isFullscreen() { + synchronized ( GlobalLock.lock ) { + return fullscreen && current_mode.isFullscreenCapable(); + } + } + + /** + * Set the title of the window. This may be ignored by the underlying OS. + * + * @param newTitle The new window title + */ + public static void setTitle(String newTitle) { + synchronized ( GlobalLock.lock ) { + if ( newTitle == null ) { + newTitle = ""; + } + title = newTitle; + if ( isCreated() ) + display_impl.setTitle(title); + } + } + + /** @return true if the user or operating system has asked the window to close */ + public static boolean isCloseRequested() { + synchronized ( GlobalLock.lock ) { + if ( !isCreated() ) + throw new IllegalStateException("Cannot determine close requested state of uncreated window"); + return display_impl.isCloseRequested(); + } + } + + /** @return true if the window is visible, false if not */ + public static boolean isVisible() { + synchronized ( GlobalLock.lock ) { + if ( !isCreated() ) + throw new IllegalStateException("Cannot determine minimized state of uncreated window"); + return display_impl.isVisible(); + } + } + + /** @return true if window is active, that is, the foreground display of the operating system. */ + public static boolean isActive() { + synchronized ( GlobalLock.lock ) { + if ( !isCreated() ) + throw new IllegalStateException("Cannot determine focused state of uncreated window"); + return display_impl.isActive(); + } + } + + /** + * Determine if the window's contents have been damaged by external events. + * If you are writing a straightforward game rendering loop and simply paint + * every frame regardless, you can ignore this flag altogether. If you are + * trying to be kind to other processes you can check this flag and only + * redraw when it returns true. The flag is cleared when update() or isDirty() is called. + * + * @return true if the window has been damaged by external changes + * and needs to repaint itself + */ + public static boolean isDirty() { + synchronized ( GlobalLock.lock ) { + if ( !isCreated() ) + throw new IllegalStateException("Cannot determine dirty state of uncreated window"); + return display_impl.isDirty(); + } + } + + /** + * Process operating system events. Call this to update the Display's state and to receive new + * input device events. This method is called from update(), so it is not necessary to call + * this method if update() is called periodically. + */ + public static void processMessages() { + synchronized ( GlobalLock.lock ) { + if ( !isCreated() ) + throw new IllegalStateException("Display not created"); + + display_impl.update(); + } + pollDevices(); + } + + /** + * Swap the display buffers. This method is called from update(), and should normally not be called by + * the application. + * + * @throws OpenGLException if an OpenGL error has occured since the last call to glGetError() + */ + public static void swapBuffers() throws LWJGLException { + synchronized ( GlobalLock.lock ) { + if ( !isCreated() ) + throw new IllegalStateException("Display not created"); + + if ( LWJGLUtil.DEBUG ) + drawable.checkGLError(); + drawable.swapBuffers(); + } + } + + /** + * Update the window. If the window is visible clears + * the dirty flag and calls swapBuffers() and finally + * polls the input devices. + */ + public static void update() { + update(true); + } + + /** + * Update the window. If the window is visible clears + * the dirty flag and calls swapBuffers() and finally + * polls the input devices if processMessages is true. + * + * @param processMessages Poll input devices if true + */ + public static void update(boolean processMessages) { + synchronized ( GlobalLock.lock ) { + if ( !isCreated() ) + throw new IllegalStateException("Display not created"); + + // We paint only when the window is visible or dirty + if ( display_impl.isVisible() || display_impl.isDirty() ) { + try { + swapBuffers(); + } catch (LWJGLException e) { + throw new RuntimeException(e); + } + } + + window_resized = !isFullscreen() && parent == null && display_impl.wasResized(); + + if ( window_resized ) { + width = display_impl.getWidth(); + height = display_impl.getHeight(); + } + + if ( parent_resized ) { + reshape(); + parent_resized = false; + window_resized = true; + } + + if ( processMessages ) + processMessages(); + } + } + + static void pollDevices() { + // Poll the input devices while we're here + if ( Mouse.isCreated() ) { + Mouse.poll(); + Mouse.updateCursor(); + } + + if ( Keyboard.isCreated() ) { + Keyboard.poll(); + } + + if ( Controllers.isCreated() ) { + Controllers.poll(); + } + } + + /** + * Release the Display context. + * + * @throws LWJGLException If the context could not be released + */ + public static void releaseContext() throws LWJGLException { + drawable.releaseContext(); + } + + /** Returns true if the Display's context is current in the current thread. */ + public static boolean isCurrent() throws LWJGLException { + return drawable.isCurrent(); + } + + /** + * Make the Display the current rendering context for GL calls. + * + * @throws LWJGLException If the context could not be made current + */ + public static void makeCurrent() throws LWJGLException { + drawable.makeCurrent(); + } + + private static void removeShutdownHook() { + AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + Runtime.getRuntime().removeShutdownHook(shutdown_hook); + return null; + } + }); + } + + private static void registerShutdownHook() { + AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + Runtime.getRuntime().addShutdownHook(shutdown_hook); + return null; + } + }); + } + + /** + * Create the OpenGL context. If isFullscreen() is true or if windowed + * context are not supported on the platform, the display mode will be switched to the mode returned by + * getDisplayMode(), and a fullscreen context will be created. If isFullscreen() is false, a windowed context + * will be created with the dimensions given in the mode returned by getDisplayMode(). If a context can't be + * created with the given parameters, a LWJGLException will be thrown. + *

+ *

The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. + * + * @throws LWJGLException + */ + public static void create() throws LWJGLException { + create(new PixelFormat()); + } + + /** + * Create the OpenGL context with the given minimum parameters. If isFullscreen() is true or if windowed + * context are not supported on the platform, the display mode will be switched to the mode returned by + * getDisplayMode(), and a fullscreen context will be created. If isFullscreen() is false, a windowed context + * will be created with the dimensions given in the mode returned by getDisplayMode(). If a context can't be + * created with the given parameters, a LWJGLException will be thrown. + *

+ *

The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. + * + * @param pixel_format Describes the minimum specifications the context must fulfill. + * + * @throws LWJGLException + */ + public static void create(PixelFormat pixel_format) throws LWJGLException { + synchronized ( GlobalLock.lock ) { + create(pixel_format, null, (ContextAttribs)null); + } + } + + /** + * Create the OpenGL context with the given minimum parameters. If isFullscreen() is true or if windowed + * context are not supported on the platform, the display mode will be switched to the mode returned by + * getDisplayMode(), and a fullscreen context will be created. If isFullscreen() is false, a windowed context + * will be created with the dimensions given in the mode returned by getDisplayMode(). If a context can't be + * created with the given parameters, a LWJGLException will be thrown. + *

+ *

The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. + * + * @param pixel_format Describes the minimum specifications the context must fulfill. + * @param shared_drawable The Drawable to share context with. (optional, may be null) + * + * @throws LWJGLException + */ + public static void create(PixelFormat pixel_format, Drawable shared_drawable) throws LWJGLException { + synchronized ( GlobalLock.lock ) { + create(pixel_format, shared_drawable, (ContextAttribs)null); + } + } + + /** + * Create the OpenGL context with the given minimum parameters. If isFullscreen() is true or if windowed + * context are not supported on the platform, the display mode will be switched to the mode returned by + * getDisplayMode(), and a fullscreen context will be created. If isFullscreen() is false, a windowed context + * will be created with the dimensions given in the mode returned by getDisplayMode(). If a context can't be + * created with the given parameters, a LWJGLException will be thrown. + *

+ *

The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. + * + * @param pixel_format Describes the minimum specifications the context must fulfill. + * @param attribs The ContextAttribs to use when creating the context. (optional, may be null) + * + * @throws LWJGLException + */ + public static void create(PixelFormat pixel_format, ContextAttribs attribs) throws LWJGLException { + synchronized ( GlobalLock.lock ) { + create(pixel_format, null, attribs); + } + } + + /** + * Create the OpenGL context with the given minimum parameters. If isFullscreen() is true or if windowed + * context are not supported on the platform, the display mode will be switched to the mode returned by + * getDisplayMode(), and a fullscreen context will be created. If isFullscreen() is false, a windowed context + * will be created with the dimensions given in the mode returned by getDisplayMode(). If a context can't be + * created with the given parameters, a LWJGLException will be thrown. + *

+ *

The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. + * + * @param pixel_format Describes the minimum specifications the context must fulfill. + * @param shared_drawable The Drawable to share context with. (optional, may be null) + * @param attribs The ContextAttribs to use when creating the context. (optional, may be null) + * + * @throws LWJGLException + */ + public static void create(PixelFormat pixel_format, Drawable shared_drawable, ContextAttribs attribs) throws LWJGLException { + synchronized ( GlobalLock.lock ) { + if ( isCreated() ) + throw new IllegalStateException("Only one LWJGL context may be instantiated at any one time."); + if ( pixel_format == null ) + throw new NullPointerException("pixel_format cannot be null"); + removeShutdownHook(); + registerShutdownHook(); + if ( isFullscreen() ) + switchDisplayMode(); + + final DrawableGL drawable = new DrawableGL() { + public void destroy() { + synchronized ( GlobalLock.lock ) { + if ( !isCreated() ) + return; + + releaseDrawable(); + super.destroy(); + destroyWindow(); + x = y = -1; + cached_icons = null; + reset(); + removeShutdownHook(); + } + } + }; + Display.drawable = drawable; + + try { + drawable.setPixelFormat(pixel_format, attribs); + try { + createWindow(); + try { + drawable.context = new ContextGL(drawable.peer_info, attribs, shared_drawable != null ? ((DrawableGL)shared_drawable).getContext() : null); + try { + makeCurrentAndSetSwapInterval(); + initContext(); + } catch (LWJGLException e) { + drawable.destroy(); + throw e; + } + } catch (LWJGLException e) { + destroyWindow(); + throw e; + } + } catch (LWJGLException e) { + drawable.destroy(); + throw e; + } + } catch (LWJGLException e) { + display_impl.resetDisplayMode(); + throw e; + } + } + } + + /** + * Create the OpenGL ES context with the given minimum parameters. If isFullscreen() is true or if windowed + * context are not supported on the platform, the display mode will be switched to the mode returned by + * getDisplayMode(), and a fullscreen context will be created. If isFullscreen() is false, a windowed context + * will be created with the dimensions given in the mode returned by getDisplayMode(). If a context can't be + * created with the given parameters, a LWJGLException will be thrown. + *

+ *

The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. + * + * @param pixel_format Describes the minimum specifications the context must fulfill. Must be an instance of org.lwjgl.opengles.PixelFormat. + * + * @throws LWJGLException + */ + + public static void create(PixelFormatLWJGL pixel_format) throws LWJGLException { + synchronized ( GlobalLock.lock ) { + create(pixel_format, null, null); + } + } + + /** + * Create the OpenGL ES context with the given minimum parameters. If isFullscreen() is true or if windowed + * context are not supported on the platform, the display mode will be switched to the mode returned by + * getDisplayMode(), and a fullscreen context will be created. If isFullscreen() is false, a windowed context + * will be created with the dimensions given in the mode returned by getDisplayMode(). If a context can't be + * created with the given parameters, a LWJGLException will be thrown. + *

+ *

The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. + * + * @param pixel_format Describes the minimum specifications the context must fulfill. Must be an instance of org.lwjgl.opengles.PixelFormat. + * @param shared_drawable The Drawable to share context with. (optional, may be null) + * + * @throws LWJGLException + */ + public static void create(PixelFormatLWJGL pixel_format, Drawable shared_drawable) throws LWJGLException { + synchronized ( GlobalLock.lock ) { + create(pixel_format, shared_drawable, null); + } + } + + /** + * Create the OpenGL ES context with the given minimum parameters. If isFullscreen() is true or if windowed + * context are not supported on the platform, the display mode will be switched to the mode returned by + * getDisplayMode(), and a fullscreen context will be created. If isFullscreen() is false, a windowed context + * will be created with the dimensions given in the mode returned by getDisplayMode(). If a context can't be + * created with the given parameters, a LWJGLException will be thrown. + *

+ *

The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. + * + * @param pixel_format Describes the minimum specifications the context must fulfill. Must be an instance of org.lwjgl.opengles.PixelFormat. + * @param attribs The ContextAttribs to use when creating the context. (optional, may be null) + * + * @throws LWJGLException + */ + public static void create(PixelFormatLWJGL pixel_format, org.lwjgl.opengles.ContextAttribs attribs) throws LWJGLException { + synchronized ( GlobalLock.lock ) { + create(pixel_format, null, attribs); + } + } + + /** + * Create the OpenGL ES context with the given minimum parameters. If isFullscreen() is true or if windowed + * context are not supported on the platform, the display mode will be switched to the mode returned by + * getDisplayMode(), and a fullscreen context will be created. If isFullscreen() is false, a windowed context + * will be created with the dimensions given in the mode returned by getDisplayMode(). If a context can't be + * created with the given parameters, a LWJGLException will be thrown. + *

+ *

The window created will be set up in orthographic 2D projection, with 1:1 pixel ratio with GL coordinates. + * + * @param pixel_format Describes the minimum specifications the context must fulfill. Must be an instance of org.lwjgl.opengles.PixelFormat. + * @param shared_drawable The Drawable to share context with. (optional, may be null) + * @param attribs The ContextAttribs to use when creating the context. (optional, may be null) + * + * @throws LWJGLException + */ + public static void create(PixelFormatLWJGL pixel_format, Drawable shared_drawable, org.lwjgl.opengles.ContextAttribs attribs) throws LWJGLException { + synchronized ( GlobalLock.lock ) { + if ( isCreated() ) + throw new IllegalStateException("Only one LWJGL context may be instantiated at any one time."); + if ( pixel_format == null ) + throw new NullPointerException("pixel_format cannot be null"); + removeShutdownHook(); + registerShutdownHook(); + if ( isFullscreen() ) + switchDisplayMode(); + + final DrawableGLES drawable = new DrawableGLES() { + + public void setPixelFormat(final PixelFormatLWJGL pf, final ContextAttribs attribs) throws LWJGLException { + throw new UnsupportedOperationException(); + } + + public void destroy() { + synchronized ( GlobalLock.lock ) { + if ( !isCreated() ) + return; + + releaseDrawable(); + super.destroy(); + destroyWindow(); + x = y = -1; + cached_icons = null; + reset(); + removeShutdownHook(); + } + } + }; + Display.drawable = drawable; + + try { + drawable.setPixelFormat(pixel_format); + try { + createWindow(); + try { + drawable.createContext(attribs, shared_drawable); + try { + makeCurrentAndSetSwapInterval(); + initContext(); + } catch (LWJGLException e) { + drawable.destroy(); + throw e; + } + } catch (LWJGLException e) { + destroyWindow(); + throw e; + } + } catch (LWJGLException e) { + drawable.destroy(); + throw e; + } + } catch (LWJGLException e) { + display_impl.resetDisplayMode(); + throw e; + } + } + } + + /** + * Set the initial color of the Display. This method is called before the Display is created and will set the + * background color to the one specified in this method. + * + * @param red - color value between 0 - 1 + * @param green - color value between 0 - 1 + * @param blue - color value between 0 - 1 + */ + public static void setInitialBackground(float red, float green, float blue) { + r = red; + g = green; + b = blue; + } + + private static void makeCurrentAndSetSwapInterval() throws LWJGLException { + makeCurrent(); + try { + drawable.checkGLError(); + } catch (OpenGLException e) { + LWJGLUtil.log("OpenGL error during context creation: " + e.getMessage()); + } + setSwapInterval(swap_interval); + } + + private static void initContext() { + drawable.initContext(r, g, b); + update(); + } + + static DisplayImplementation getImplementation() { + return display_impl; + } + + /** Gets a boolean property as a privileged action. */ + static boolean getPrivilegedBoolean(final String property_name) { + return AccessController.doPrivileged(new PrivilegedAction() { + public Boolean run() { + return Boolean.getBoolean(property_name); + } + }); + } + + /** Gets a string property as a privileged action. */ + static String getPrivilegedString(final String property_name) { + return AccessController.doPrivileged(new PrivilegedAction() { + public String run() { + return System.getProperty(property_name); + } + }); + } + + private static void initControls() { + // Automatically create mouse, keyboard and controller + if ( !getPrivilegedBoolean("org.lwjgl.opengl.Display.noinput") ) { + if ( !Mouse.isCreated() && !getPrivilegedBoolean("org.lwjgl.opengl.Display.nomouse") ) { + try { + Mouse.create(); + } catch (LWJGLException e) { + if ( LWJGLUtil.DEBUG ) { + e.printStackTrace(System.err); + } else { + LWJGLUtil.log("Failed to create Mouse: " + e); + } + } + } + if ( !Keyboard.isCreated() && !getPrivilegedBoolean("org.lwjgl.opengl.Display.nokeyboard") ) { + try { + Keyboard.create(); + } catch (LWJGLException e) { + if ( LWJGLUtil.DEBUG ) { + e.printStackTrace(System.err); + } else { + LWJGLUtil.log("Failed to create Keyboard: " + e); + } + } + } + } + } + + /** + * Destroy the Display. After this call, there will be no current GL rendering context, + * regardless of whether the Display was the current rendering context. + */ + public static void destroy() { + if(isCreated()) { + drawable.destroy(); + } + } + + /* + * Reset display mode if fullscreen. This method is also called from the shutdown hook added + * in the static constructor + */ + + private static void reset() { + display_impl.resetDisplayMode(); + current_mode = initial_mode; + } + + /** @return true if the window's native peer has been created */ + public static boolean isCreated() { + synchronized ( GlobalLock.lock ) { + return window_created; + } + } + + /** + * Set the buffer swap interval. This call is a best-attempt at changing + * the monitor swap interval, which is the minimum periodicity of color buffer swaps, + * measured in video frame periods, and is not guaranteed to be successful. + *

+ * A video frame period is the time required to display a full frame of video data. + * + * @param value The swap interval in frames, 0 to disable + */ + public static void setSwapInterval(int value) { + synchronized ( GlobalLock.lock ) { + swap_interval = value; + if ( isCreated() ) + drawable.setSwapInterval(swap_interval); + + } + } + + /** + * Enable or disable vertical monitor synchronization. This call is a best-attempt at changing + * the vertical refresh synchronization of the monitor, and is not guaranteed to be successful. + * + * @param sync true to synchronize; false to ignore synchronization + */ + public static void setVSyncEnabled(boolean sync) { + synchronized ( GlobalLock.lock ) { + setSwapInterval(sync ? 1 : 0); + } + } + + /** + * Set the window's location. This is a no-op on fullscreen windows or when getParent() != null. + * The window is clamped to remain entirely on the screen. If you attempt + * to position the window such that it would extend off the screen, the window + * is simply placed as close to the edge as possible. + *
noteIf no location has been specified (or x == y == -1) the window will be centered + * + * @param new_x The new window location on the x axis + * @param new_y The new window location on the y axis + */ + public static void setLocation(int new_x, int new_y) { + synchronized ( GlobalLock.lock ) { + // cache position + x = new_x; + y = new_y; + + // offset if already created + if ( isCreated() && !isFullscreen() ) { + reshape(); + } + } + } + + private static void reshape() { + DisplayMode mode = getEffectiveMode(); + display_impl.reshape(getWindowX(), getWindowY(), mode.getWidth(), mode.getHeight()); + } + + /** + * Get the driver adapter string. This is a unique string describing the actual card's hardware, eg. "Geforce2", "PS2", + * "Radeon9700". If the adapter cannot be determined, this function returns null. + * + * @return a String + */ + public static String getAdapter() { + synchronized ( GlobalLock.lock ) { + return display_impl.getAdapter(); + } + } + + /** + * Get the driver version. This is a vendor/adapter specific version string. If the version cannot be determined, + * this function returns null. + * + * @return a String + */ + public static String getVersion() { + synchronized ( GlobalLock.lock ) { + return display_impl.getVersion(); + } + } + + /** + * Sets one or more icons for the Display. + *

    + *
  • On Windows you should supply at least one 16x16 icon and one 32x32.
  • + *
  • Linux (and similar platforms) expect one 32x32 icon.
  • + *
  • Mac OS X should be supplied one 128x128 icon
  • + *
+ * The implementation will use the supplied ByteBuffers with image data in RGBA (size must be a power of two) and perform any conversions nescesarry for the specific platform. + *

+ * NOTE: The display will make a deep copy of the supplied byte buffer array, for the purpose + * of recreating the icons when you go back and forth fullscreen mode. You therefore only need to + * set the icon once per instance. + * + * @param icons Array of icons in RGBA mode. Pass the icons in order of preference. + * + * @return number of icons used, or 0 if display hasn't been created + */ + public static int setIcon(ByteBuffer[] icons) { + synchronized ( GlobalLock.lock ) { + // make deep copy so we dont rely on the supplied buffers later on + // don't recache! + if ( cached_icons != icons ) { + cached_icons = new ByteBuffer[icons.length]; + for ( int i = 0; i < icons.length; i++ ) { + cached_icons[i] = BufferUtils.createByteBuffer(icons[i].capacity()); + int old_position = icons[i].position(); + cached_icons[i].put(icons[i]); + icons[i].position(old_position); + cached_icons[i].flip(); + } + } + + if ( Display.isCreated() && parent == null ) { + return display_impl.setIcon(cached_icons); + } else { + return 0; + } + } + } + + /** + * Enable or disable the Display window to be resized. + * + * @param resizable set to true to make the Display window resizable; + * false to disable resizing on the Display window. + */ + public static void setResizable(boolean resizable) { + window_resizable = resizable; + if ( isCreated() ) { + display_impl.setResizable(resizable); + } + } + + /** + * @return true if the Display window is resizable. + */ + public static boolean isResizable() { + return window_resizable; + } + + /** + * @return true if the Display window has been resized. + * This value will be updated after a call to Display.update(). + * + * This will return false if running in fullscreen or with Display.setParent(Canvas parent) + */ + public static boolean wasResized() { + return window_resized; + } + + /** + * @return this method will return the x position (top-left) of the Display window. + * + * If running in fullscreen mode it will return 0. + * If Display.setParent(Canvas parent) is being used, the x position of + * the parent will be returned. + */ + public static int getX() { + + if (Display.isFullscreen()) { + return 0; + } + + if (parent != null) { + return parent.getX(); + } + + return display_impl.getX(); + } + + /** + * @return this method will return the y position (top-left) of the Display window. + * + * If running in fullscreen mode it will return 0. + * If Display.setParent(Canvas parent) is being used, the y position of + * the parent will be returned. + */ + public static int getY() { + + if (Display.isFullscreen()) { + return 0; + } + + if (parent != null) { + return parent.getY(); + } + + return display_impl.getY(); + } + + /** + * @return this method will return the width of the Display window. + * + * If running in fullscreen mode it will return the width of the current set DisplayMode. + * If Display.setParent(Canvas parent) is being used, the width of the parent + * will be returned. + * + * This value will be updated after a call to Display.update(). + */ + public static int getWidth() { + + if (Display.isFullscreen()) { + return Display.getDisplayMode().getWidth(); + } + + if (parent != null) { + return parent.getWidth(); + } + + return width; + } + + /** + * @return this method will return the height of the Display window. + * + * If running in fullscreen mode it will return the height of the current set DisplayMode. + * If Display.setParent(Canvas parent) is being used, the height of the parent + * will be returned. + * + * This value will be updated after a call to Display.update(). + */ + public static int getHeight() { + + if (Display.isFullscreen()) { + return Display.getDisplayMode().getHeight(); + } + + if (parent != null) { + return parent.getHeight(); + } + + return height; + } + + /** + * @return this method will return the pixel scale factor of the Display window. + * + * This method should be used when running in high DPI mode. In such modes Operating + * Systems will scale the Display window to avoid the window shrinking due to high + * resolutions. The OpenGL frame buffer will however use the higher resolution and + * not be scaled to match the Display window size. + * + * OpenGL methods that require pixel dependent values e.g. glViewport, glTexImage2D, + * glReadPixels, glScissor, glLineWidth, glRenderbufferStorage, etc can convert the + * scaled Display and Mouse coordinates to the correct high resolution value by + * multiplying them by the pixel scale factor. + * + * e.g. Display.getWidth() * Display.getPixelScaleFactor() will return the high DPI + * width of the OpenGL frame buffer. Whereas Display.getWidth() will be the same as + * the OpenGL frame buffer in non high DPI mode. + * + * Where high DPI mode is not available this method will just return 1.0f therefore + * not have any effect on values that are multiplied by it. + */ + public static float getPixelScaleFactor() { + return display_impl.getPixelScaleFactor(); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/DisplayImplementation.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/DisplayImplementation.java new file mode 100644 index 0000000..816f995 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/DisplayImplementation.java @@ -0,0 +1,200 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + * This is the Display implementation interface. Display delegates + * to implementors of this interface. There is one DisplayImplementation + * for each supported platform. + * @author elias_naur + */ + +import java.nio.ByteBuffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; +import java.awt.Canvas; + +import org.lwjgl.LWJGLException; + +interface DisplayImplementation extends InputImplementation { + + void createWindow(DrawableLWJGL drawable, DisplayMode mode, Canvas parent, int x, int y) throws LWJGLException; + + void destroyWindow(); + + void switchDisplayMode(DisplayMode mode) throws LWJGLException; + + /** + * Reset the display mode to whatever it was when LWJGL was initialized. + * Fails silently. + */ + void resetDisplayMode(); + + /** + * Return the length of the gamma ramp arrays. Returns 0 if gamma settings are + * unsupported. + * + * @return the length of each gamma ramp array, or 0 if gamma settings are unsupported. + */ + int getGammaRampLength(); + + /** + * Method to set the gamma ramp. + */ + void setGammaRamp(FloatBuffer gammaRamp) throws LWJGLException; + + /** + * Get the driver adapter string. This is a unique string describing the actual card's hardware, eg. "Geforce2", "PS2", + * "Radeon9700". If the adapter cannot be determined, this function returns null. + * @return a String + */ + String getAdapter(); + + /** + * Get the driver version. This is a vendor/adapter specific version string. If the version cannot be determined, + * this function returns null. + * @return a String + */ + String getVersion(); + + /** + * Initialize and return the current display mode. + */ + DisplayMode init() throws LWJGLException; + + /** + * Implementation of setTitle(). This will read the window's title member + * and stash it in the native title of the window. + */ + void setTitle(String title); + + boolean isCloseRequested(); + + boolean isVisible(); + boolean isActive(); + + boolean isDirty(); + + /** + * Create the native PeerInfo. + * @throws LWJGLException + */ + PeerInfo createPeerInfo(PixelFormat pixel_format, ContextAttribs attribs) throws LWJGLException; + +// void destroyPeerInfo(); + + /** + * Updates the windows internal state. This must be called at least once per video frame + * to handle window close requests, moves, paints, etc. + */ + void update(); + + void reshape(int x, int y, int width, int height); + + /** + * Method for getting displaymodes + */ + DisplayMode[] getAvailableDisplayModes() throws LWJGLException; + + /* Pbuffer */ + int getPbufferCapabilities(); + + /** + * Method to test for buffer integrity + */ + boolean isBufferLost(PeerInfo handle); + + /** + * Method to create a Pbuffer + */ + PeerInfo createPbuffer(int width, int height, PixelFormat pixel_format, ContextAttribs attribs, + IntBuffer pixelFormatCaps, + IntBuffer pBufferAttribs) throws LWJGLException; + + void setPbufferAttrib(PeerInfo handle, int attrib, int value); + + void bindTexImageToPbuffer(PeerInfo handle, int buffer); + + void releaseTexImageFromPbuffer(PeerInfo handle, int buffer); + + /** + * Sets one or more icons for the Display. + *

    + *
  • On Windows you should supply at least one 16x16 icon and one 32x32.
  • + *
  • Linux (and similar platforms) expect one 32x32 icon.
  • + *
  • Mac OS X should be supplied one 128x128 icon
  • + *
+ * The implementation will use the supplied ByteBuffers with image data in RGBA and perform any conversions nescesarry for the specific platform. + * + * @param icons Array of icons in RGBA mode + * @return number of icons used. + */ + int setIcon(ByteBuffer[] icons); + + /** + * Enable or disable the Display window to be resized. + * + * @param resizable set to true to make the Display window resizable; + * false to disable resizing on the Display window. + */ + void setResizable(boolean resizable); + + /** + * @return true if the Display window has been resized since this method was last called. + */ + boolean wasResized(); + + /** + * @return this method will return the width of the Display window. + */ + int getWidth(); + + /** + * @return this method will return the height of the Display window. + */ + int getHeight(); + + /** + * @return this method will return the top-left x position of the Display window. + */ + int getX(); + + /** + * @return this method will return the top-left y position of the Display window. + */ + int getY(); + + /** + * @return this method will return the pixel scale factor of the Display window useful for high resolution modes. + */ + float getPixelScaleFactor(); +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/DisplayMode.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/DisplayMode.java new file mode 100644 index 0000000..4e51175 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/DisplayMode.java @@ -0,0 +1,142 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + * + * This class encapsulates the properties for a given display mode. + * This class is not instantiable, and is aquired from the Display. + * getAvailableDisplayModes() method. + * + * @author cix_foo + * @version $Revision$ + * $Id$ + */ + +public final class DisplayMode { + + /** properties of the display mode */ + private final int width, height, bpp, freq; + /** If true, this instance can be used for fullscreen modes */ + private final boolean fullscreen; + + /** + * Construct a display mode. DisplayModes constructed through the + * public constructor can only be used to specify the dimensions of + * the Display in windowed mode. To get the available DisplayModes for + * fullscreen modes, use Display.getAvailableDisplayModes(). + * + * @param width The Display width. + * @param height The Display height. + * @see Display + */ + public DisplayMode(int width, int height) { + this(width, height, 0, 0, false); + } + + DisplayMode(int width, int height, int bpp, int freq) { + this(width, height, bpp, freq, true); + } + + private DisplayMode(int width, int height, int bpp, int freq, boolean fullscreen) { + this.width = width; + this.height = height; + this.bpp = bpp; + this.freq = freq; + this.fullscreen = fullscreen; + } + + /** True iff this instance can be used for fullscreen modes */ + public boolean isFullscreenCapable() { + return fullscreen; + } + + public int getWidth() { + return width; + } + + public int getHeight() { + return height; + } + + public int getBitsPerPixel() { + return bpp; + } + + public int getFrequency() { + return freq; + } + + /** + * Tests for DisplayMode equality + * + * @see java.lang.Object#equals(Object) + */ + public boolean equals(Object obj) { + if (obj == null || !(obj instanceof DisplayMode)) { + return false; + } + + DisplayMode dm = (DisplayMode) obj; + return dm.width == width + && dm.height == height + && dm.bpp == bpp + && dm.freq == freq; + } + + /** + * Retrieves the hashcode for this object + * + * @see java.lang.Object#hashCode() + */ + public int hashCode() { + return width ^ height ^ freq ^ bpp; + } + + /** + * Retrieves a String representation of this DisplayMode + * + * @see java.lang.Object#toString() + */ + public String toString() { + StringBuilder sb = new StringBuilder(32); + sb.append(width); + sb.append(" x "); + sb.append(height); + sb.append(" x "); + sb.append(bpp); + sb.append(" @"); + sb.append(freq); + sb.append("Hz"); + return sb.toString(); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/Drawable.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/Drawable.java new file mode 100644 index 0000000..c93a236 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/Drawable.java @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.LWJGLException; +import org.lwjgl.PointerBuffer; + +/** + * The Drawable interface describes an OpenGL drawable with an associated + * Context. + * + * @author elias_naur + */ + +public interface Drawable { + + /** Returns true if the Drawable's context is current in the current thread. */ + boolean isCurrent() throws LWJGLException; + + /** + * Makes the Drawable's context current in the current thread. + * + * @throws LWJGLException + */ + void makeCurrent() throws LWJGLException; + + /** + * If the Drawable's context is current in the current thread, no context will be current after a call to this method. + * + * @throws LWJGLException + */ + void releaseContext() throws LWJGLException; + + /** Destroys the Drawable. */ + void destroy(); + + /** + * Sets the appropriate khr_gl_sharing properties in the target PointerBuffer, + * so that if it is used in a clCreateContext(FromType) call, the created CL + * context will be sharing objects with this Drawable's GL context. After a + * call to this method, the target buffer position will have advanced by 2 to 4 positions, + * depending on the implementation. + * + * @param properties The target properties buffer. It must have at least 4 positions remaining. + */ + void setCLSharingProperties(PointerBuffer properties) throws LWJGLException; + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/DrawableGL.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/DrawableGL.java new file mode 100644 index 0000000..5fbd85e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/DrawableGL.java @@ -0,0 +1,155 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; +import org.lwjgl.PointerBuffer; + +import static org.lwjgl.opengl.GL11.*; + +/** @author Spasi */ +abstract class DrawableGL implements DrawableLWJGL { + + /** The PixelFormat used to create the drawable. */ + protected PixelFormat pixel_format; + + /** Handle to the native GL rendering context */ + protected PeerInfo peer_info; + + /** The OpenGL Context. */ + protected ContextGL context; + + protected DrawableGL() { + } + + public void setPixelFormat(final PixelFormatLWJGL pf) throws LWJGLException { + throw new UnsupportedOperationException(); + } + + public void setPixelFormat(final PixelFormatLWJGL pf, final ContextAttribs attribs) throws LWJGLException { + this.pixel_format = (PixelFormat)pf; + this.peer_info = Display.getImplementation().createPeerInfo(pixel_format, attribs); + } + + public PixelFormatLWJGL getPixelFormat() { + return pixel_format; + } + + public ContextGL getContext() { + synchronized ( GlobalLock.lock ) { + return context; + } + } + + public ContextGL createSharedContext() throws LWJGLException { + synchronized ( GlobalLock.lock ) { + checkDestroyed(); + return new ContextGL(peer_info, context.getContextAttribs(), context); + } + } + + public void checkGLError() { + Util.checkGLError(); + } + + public void setSwapInterval(final int swap_interval) { + ContextGL.setSwapInterval(swap_interval); + } + + public void swapBuffers() throws LWJGLException { + ContextGL.swapBuffers(); + } + + public void initContext(final float r, final float g, final float b) { + // set background clear color + glClearColor(r, g, b, 0.0f); + // Clear window to avoid the desktop "showing through" + glClear(GL_COLOR_BUFFER_BIT); + } + + public boolean isCurrent() throws LWJGLException { + synchronized ( GlobalLock.lock ) { + checkDestroyed(); + return context.isCurrent(); + } + } + + public void makeCurrent() throws LWJGLException { + synchronized ( GlobalLock.lock ) { + checkDestroyed(); + context.makeCurrent(); + } + } + + public void releaseContext() throws LWJGLException { + synchronized ( GlobalLock.lock ) { + checkDestroyed(); + if ( context.isCurrent() ) + context.releaseCurrent(); + } + } + + public void destroy() { + synchronized ( GlobalLock.lock ) { + if ( context == null ) + return; + + try { + releaseContext(); + + context.forceDestroy(); + context = null; + + if ( peer_info != null ) { + peer_info.destroy(); + peer_info = null; + } + } catch (LWJGLException e) { + LWJGLUtil.log("Exception occurred while destroying Drawable: " + e); + } + } + } + + public void setCLSharingProperties(final PointerBuffer properties) throws LWJGLException { + synchronized ( GlobalLock.lock ) { + checkDestroyed(); + context.setCLSharingProperties(properties); + } + } + + protected final void checkDestroyed() { + if ( context == null ) + throw new IllegalStateException("The Drawable has no context available."); + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/DrawableGLES.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/DrawableGLES.java new file mode 100644 index 0000000..c5b1fca --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/DrawableGLES.java @@ -0,0 +1,243 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; +import org.lwjgl.PointerBuffer; +import org.lwjgl.opengles.ContextAttribs; +import org.lwjgl.opengles.*; +import org.lwjgl.opengles.Util; + +import static org.lwjgl.opengles.EGL.*; +import static org.lwjgl.opengles.GLES20.*; + +/** + * @author Spasi + * @since 14/5/2011 + */ +abstract class DrawableGLES implements DrawableLWJGL { + + /** The PixelFormat used to create the EGLDisplay. */ + protected org.lwjgl.opengles.PixelFormat pixel_format; + + protected EGLDisplay eglDisplay; + protected EGLConfig eglConfig; + protected EGLSurface eglSurface; + + /** The OpenGL Context. */ + protected ContextGLES context; + + /** The Drawable that shares objects with this Drawable. */ + protected Drawable shared_drawable; + + protected DrawableGLES() { + } + + public void setPixelFormat(final PixelFormatLWJGL pf) throws LWJGLException { + synchronized ( GlobalLock.lock ) { + this.pixel_format = (org.lwjgl.opengles.PixelFormat)pf; + } + } + + public PixelFormatLWJGL getPixelFormat() { + synchronized ( GlobalLock.lock ) { + return pixel_format; + } + } + + public void initialize(final long window, final long display_id, final int eglSurfaceType, final org.lwjgl.opengles.PixelFormat pf) throws LWJGLException { + synchronized ( GlobalLock.lock ) { + if ( eglSurface != null ) { + eglSurface.destroy(); + eglSurface = null; + } + + if ( eglDisplay != null ) { + eglDisplay.terminate(); + eglDisplay = null; + } + + final EGLDisplay eglDisplay = eglGetDisplay((int)display_id); + + int[] attribs = { + EGL_LEVEL, 0, + EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, + EGL_NATIVE_RENDERABLE, EGL_FALSE, + }; + + final EGLConfig[] configs = eglDisplay.chooseConfig(pf.getAttribBuffer(eglDisplay, eglSurfaceType, attribs), null, BufferUtils.createIntBuffer(1)); + if ( configs.length == 0 ) + throw new LWJGLException("No EGLConfigs found for the specified PixelFormat."); + + final EGLConfig eglConfig = pf.getBestMatch(configs); + final EGLSurface eglSurface = eglDisplay.createWindowSurface(eglConfig, window, null); + pf.setSurfaceAttribs(eglSurface); + + this.eglDisplay = eglDisplay; + this.eglConfig = eglConfig; + this.eglSurface = eglSurface; + + // This can happen when switching in and out of full-screen mode. + if ( context != null ) + context.getEGLContext().setDisplay(eglDisplay); + } + } + + public void createContext(final ContextAttribs attribs, final Drawable shared_drawable) throws LWJGLException { + synchronized ( GlobalLock.lock ) { + this.context = new ContextGLES(this, attribs, shared_drawable != null ? ((DrawableGLES)shared_drawable).getContext() : null); + this.shared_drawable = shared_drawable; + } + } + + Drawable getSharedDrawable() { + synchronized ( GlobalLock.lock ) { + return shared_drawable; + } + } + + public EGLDisplay getEGLDisplay() { + synchronized ( GlobalLock.lock ) { + return eglDisplay; + } + } + + public EGLConfig getEGLConfig() { + synchronized ( GlobalLock.lock ) { + return eglConfig; + } + } + + public EGLSurface getEGLSurface() { + synchronized ( GlobalLock.lock ) { + return eglSurface; + } + } + + public ContextGLES getContext() { + synchronized ( GlobalLock.lock ) { + return context; + } + } + + public org.lwjgl.opengl.Context createSharedContext() throws LWJGLException { + synchronized ( GlobalLock.lock ) { + checkDestroyed(); + return new ContextGLES(this, context.getContextAttribs(), context); + } + } + + public void checkGLError() { + Util.checkGLError(); + } + + public void setSwapInterval(final int swap_interval) { + ContextGLES.setSwapInterval(swap_interval); + } + + public void swapBuffers() throws LWJGLException { + ContextGLES.swapBuffers(); + } + + public void initContext(final float r, final float g, final float b) { + // set background clear color + glClearColor(r, g, b, 0.0f); + // Clear window to avoid the desktop "showing through" + glClear(GL_COLOR_BUFFER_BIT); + } + + public boolean isCurrent() throws LWJGLException { + synchronized ( GlobalLock.lock ) { + checkDestroyed(); + return context.isCurrent(); + } + } + + public void makeCurrent() throws LWJGLException, PowerManagementEventException { + synchronized ( GlobalLock.lock ) { + checkDestroyed(); + context.makeCurrent(); + } + } + + public void releaseContext() throws LWJGLException, PowerManagementEventException { + synchronized ( GlobalLock.lock ) { + checkDestroyed(); + if ( context.isCurrent() ) + context.releaseCurrent(); + } + } + + public void destroy() { + synchronized ( GlobalLock.lock ) { + try { + if ( context != null ) { + try { + releaseContext(); + } catch (PowerManagementEventException e) { + // Ignore + } + + context.forceDestroy(); + context = null; + } + + if ( eglSurface != null ) { + eglSurface.destroy(); + eglSurface = null; + } + + if ( eglDisplay != null ) { + eglDisplay.terminate(); + eglDisplay = null; + } + + pixel_format = null; + shared_drawable = null; + } catch (LWJGLException e) { + LWJGLUtil.log("Exception occurred while destroying Drawable: " + e); + } + } + } + + protected void checkDestroyed() { + if ( context == null ) + throw new IllegalStateException("The Drawable has no context available."); + } + + public void setCLSharingProperties(final PointerBuffer properties) throws LWJGLException { + throw new UnsupportedOperationException(); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/DrawableLWJGL.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/DrawableLWJGL.java new file mode 100644 index 0000000..d87a916 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/DrawableLWJGL.java @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.LWJGLException; + +/** + * [INTERNAL USE ONLY] + * + * @author Spasi + */ +interface DrawableLWJGL extends Drawable { + + void setPixelFormat(PixelFormatLWJGL pf) throws LWJGLException; + + void setPixelFormat(PixelFormatLWJGL pf, ContextAttribs attribs) throws LWJGLException; + + PixelFormatLWJGL getPixelFormat(); + + /** + * [INTERNAL USE ONLY] Returns the Drawable's Context. + * + * @return the Drawable's Context + */ + Context getContext(); + + /** + * [INTERNAL USE ONLY] Creates a new Context that is shared with the Drawable's Context. + * + * @return a Context shared with the Drawable's Context. + */ + Context createSharedContext() throws LWJGLException; + + void checkGLError(); + + void setSwapInterval(int swap_interval); + + void swapBuffers() throws LWJGLException; + + void initContext(final float r, final float g, final float b); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/EventQueue.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/EventQueue.java new file mode 100644 index 0000000..60ec1f2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/EventQueue.java @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + * A java implementation of a LWJGL compatible event queue. + * @author elias_naur + */ + +import java.nio.ByteBuffer; + +class EventQueue { + private static final int QUEUE_SIZE = 200; + + private final int event_size; + + private final ByteBuffer queue; + + protected EventQueue(int event_size) { + this.event_size = event_size; + this.queue = ByteBuffer.allocate(QUEUE_SIZE*event_size); + } + + protected synchronized void clearEvents() { + queue.clear(); + } + + /** + * Copy available events into the specified buffer. + */ + public synchronized void copyEvents(ByteBuffer dest) { + queue.flip(); + int old_limit = queue.limit(); + if (dest.remaining() < queue.remaining()) + queue.limit(dest.remaining() + queue.position()); + dest.put(queue); + queue.limit(old_limit); + queue.compact(); + } + + /** + * Put an event into the queue. + * @return true if the event fitted into the queue, false otherwise + */ + public synchronized boolean putEvent(ByteBuffer event) { + if (event.remaining() != event_size) + throw new IllegalArgumentException("Internal error: event size " + event_size + " does not equal the given event size " + event.remaining()); + if (queue.remaining() >= event.remaining()) { + queue.put(event); + return true; + } else + return false; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/FastIntMap.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/FastIntMap.java new file mode 100644 index 0000000..6ce6c9b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/FastIntMap.java @@ -0,0 +1,238 @@ +/* + * Copyright 2002-2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" + * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ +package org.lwjgl.opengl; + +import java.util.Iterator; + +/** + * A hash map using primitive ints as keys rather than objects. + * + * @author Justin Couch + * @author Alex Chaffee (alex@apache.org) + * @author Stephen Colebourne + * @author Nathan Sweet + */ +final class FastIntMap implements Iterable> { + + private Entry[] table; + private int size, mask, capacity, threshold; + + /** Same as: FastIntMap(16, 0.75f); */ + FastIntMap() { + this(16, 0.75f); + } + + /** Same as: FastIntMap(initialCapacity, 0.75f); */ + FastIntMap(int initialCapacity) { + this(initialCapacity, 0.75f); + } + + FastIntMap(int initialCapacity, float loadFactor) { + if ( initialCapacity > 1 << 30 ) throw new IllegalArgumentException("initialCapacity is too large."); + if ( initialCapacity < 0 ) throw new IllegalArgumentException("initialCapacity must be greater than zero."); + if ( loadFactor <= 0 ) throw new IllegalArgumentException("initialCapacity must be greater than zero."); + capacity = 1; + while ( capacity < initialCapacity ) + capacity <<= 1; + this.threshold = (int)(capacity * loadFactor); + this.table = new Entry[capacity]; + this.mask = capacity - 1; + } + + private int index(final int key) { + return index(key, mask); + } + + private static int index(final int key, final int mask) { + return key & mask; + } + + public V put(int key, V value) { + final Entry[] table = this.table; + int index = index(key); + + // Check if key already exists. + for ( Entry e = table[index]; e != null; e = e.next ) { + if ( e.key != key ) continue; + V oldValue = e.value; + e.value = value; + return oldValue; + } + + table[index] = new Entry(key, value, table[index]); + + if ( size++ >= threshold ) + rehash(table); + + return null; + } + + private void rehash(final Entry[] table) { + final int newCapacity = 2 * capacity; + final int newMask = newCapacity - 1; + + final Entry[] newTable = new Entry[newCapacity]; + + for ( int i = 0, index; i < table.length; i++ ) { + Entry e = table[i]; + if ( e == null ) continue; + do { + final Entry next = e.next; + index = index(e.key, newMask); + e.next = newTable[index]; + newTable[index] = e; + e = next; + } while ( e != null ); + } + + this.table = newTable; + capacity = newCapacity; + mask = newMask; + threshold *= 2; + } + + public V get(int key) { + final int index = index(key); + for ( Entry e = table[index]; e != null; e = e.next ) + if ( e.key == key ) return e.value; + return null; + } + + public boolean containsValue(Object value) { + final Entry[] table = this.table; + for ( int i = table.length - 1; i >= 0; i-- ) + for ( Entry e = table[i]; e != null; e = e.next ) + if ( e.value.equals(value) ) return true; + return false; + } + + public boolean containsKey(int key) { + final int index = index(key); + for ( Entry e = table[index]; e != null; e = e.next ) + if ( e.key == key ) return true; + return false; + } + + public V remove(int key) { + final int index = index(key); + + Entry prev = table[index]; + Entry e = prev; + while ( e != null ) { + Entry next = e.next; + if ( e.key == key ) { + size--; + if ( prev == e ) + table[index] = next; + else + prev.next = next; + return e.value; + } + prev = e; + e = next; + } + return null; + } + + public int size() { + return size; + } + + public boolean isEmpty() { + return size == 0; + } + + public void clear() { + final Entry[] table = this.table; + for ( int index = table.length - 1; index >= 0; index-- ) + table[index] = null; + size = 0; + } + + public EntryIterator iterator() { + return new EntryIterator(); + } + + public class EntryIterator implements Iterator> { + + private int nextIndex; + private Entry current; + + EntryIterator() { + reset(); + } + + public void reset() { + current = null; + // Find first bucket. + final Entry[] table = FastIntMap.this.table; + int i; + for ( i = table.length - 1; i >= 0; i-- ) + if ( table[i] != null ) break; + nextIndex = i; + } + + public boolean hasNext() { + if ( nextIndex >= 0 ) return true; + Entry e = current; + return e != null && e.next != null; + } + + public Entry next() { + // Next entry in current bucket. + Entry e = current; + if ( e != null ) { + e = e.next; + if ( e != null ) { + current = e; + return e; + } + } + // Use the bucket at nextIndex and find the next nextIndex. + final Entry[] table = FastIntMap.this.table; + int i = nextIndex; + e = current = table[i]; + while ( --i >= 0 ) + if ( table[i] != null ) break; + nextIndex = i; + return e; + } + + public void remove() { + FastIntMap.this.remove(current.key); + } + } + + static final class Entry { + + final int key; + T value; + Entry next; + + Entry(int key, T value, Entry next) { + this.key = key; + this.value = value; + this.next = next; + } + + public int getKey() { + return key; + } + + public T getValue() { + return value; + } + + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/GLChecks.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/GLChecks.java new file mode 100644 index 0000000..8bce078 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/GLChecks.java @@ -0,0 +1,359 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLUtil; + +import java.nio.Buffer; +import java.nio.FloatBuffer; + +import static org.lwjgl.opengl.ARBBufferObject.*; +import static org.lwjgl.opengl.ATIVertexArrayObject.*; +import static org.lwjgl.opengl.EXTAbgr.*; +import static org.lwjgl.opengl.EXTBgra.*; +import static org.lwjgl.opengl.EXTDirectStateAccess.*; +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.opengl.GL15.*; +import static org.lwjgl.opengl.NVPathRendering.*; + +/** + * A class to check buffer boundaries in GL methods. Many GL + * methods read data from the GL into a native Buffer at its current position. If there is unsufficient space in the buffer when + * the call is made then a buffer overflow would otherwise occur and cause unexpected behaviour, a crash, or worse, a security + * risk. Therefore in those methods where GL reads data back into a buffer, we will call a bounds check method from this class + * to ensure that there is sufficient space in the buffer. + *

+ * Thrown by the debug build library of the LWJGL if any OpenGL operation causes an error. + * + * @author cix_foo + * @version $Revision$ + * $Id$ + */ +class GLChecks { + + /** Static methods only! */ + private GLChecks() { + } + + static int getBufferObjectSize(ContextCapabilities caps, int buffer_enum) { + return glGetBufferParameteri(buffer_enum, GL_BUFFER_SIZE); + } + + static int getBufferObjectSizeARB(ContextCapabilities caps, int buffer_enum) { + return glGetBufferParameteriARB(buffer_enum, GL_BUFFER_SIZE_ARB); + } + + static int getBufferObjectSizeATI(ContextCapabilities caps, int buffer) { + return glGetObjectBufferiATI(buffer, GL_OBJECT_BUFFER_SIZE_ATI); + } + + static int getNamedBufferObjectSize(ContextCapabilities caps, int buffer) { + return glGetNamedBufferParameterEXT(buffer, GL_BUFFER_SIZE); + } + + /** Helper method to ensure that array buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */ + static void ensureArrayVBOdisabled(ContextCapabilities caps) { + if ( LWJGLUtil.CHECKS && StateTracker.getReferences(caps).arrayBuffer != 0 ) + throw new OpenGLException("Cannot use Buffers when Array Buffer Object is enabled"); + } + + /** Helper method to ensure that array buffer objects are enabled. If they are disabled, we'll throw an OpenGLException */ + static void ensureArrayVBOenabled(ContextCapabilities caps) { + if ( LWJGLUtil.CHECKS && StateTracker.getReferences(caps).arrayBuffer == 0 ) + throw new OpenGLException("Cannot use offsets when Array Buffer Object is disabled"); + } + + /** Helper method to ensure that element array buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */ + static void ensureElementVBOdisabled(ContextCapabilities caps) { + if ( LWJGLUtil.CHECKS && StateTracker.getElementArrayBufferBound(caps) != 0 ) + throw new OpenGLException("Cannot use Buffers when Element Array Buffer Object is enabled"); + } + + /** Helper method to ensure that element array buffer objects are enabled. If they are disabled, we'll throw an OpenGLException */ + static void ensureElementVBOenabled(ContextCapabilities caps) { + if ( LWJGLUtil.CHECKS && StateTracker.getElementArrayBufferBound(caps) == 0 ) + throw new OpenGLException("Cannot use offsets when Element Array Buffer Object is disabled"); + } + + /** Helper method to ensure that array buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */ + static void ensureIndirectBOdisabled(ContextCapabilities caps) { + if ( LWJGLUtil.CHECKS && StateTracker.getReferences(caps).indirectBuffer != 0 ) + throw new OpenGLException("Cannot use Buffers when Draw Indirect Object is enabled"); + } + + /** Helper method to ensure that array buffer objects are enabled. If they are disabled, we'll throw an OpenGLException */ + static void ensureIndirectBOenabled(ContextCapabilities caps) { + if ( LWJGLUtil.CHECKS && StateTracker.getReferences(caps).indirectBuffer == 0 ) + throw new OpenGLException("Cannot use offsets when Draw Indirect Object is disabled"); + } + + /** Helper method to ensure that pixel pack buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */ + static void ensurePackPBOdisabled(ContextCapabilities caps) { + if ( LWJGLUtil.CHECKS && StateTracker.getReferences(caps).pixelPackBuffer != 0 ) + throw new OpenGLException("Cannot use Buffers when Pixel Pack Buffer Object is enabled"); + } + + /** Helper method to ensure that pixel pack buffer objects are enabled. If they are disabled, we'll throw an OpenGLException */ + static void ensurePackPBOenabled(ContextCapabilities caps) { + if ( LWJGLUtil.CHECKS && StateTracker.getReferences(caps).pixelPackBuffer == 0 ) + throw new OpenGLException("Cannot use offsets when Pixel Pack Buffer Object is disabled"); + } + + /** Helper method to ensure that pixel unpack buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */ + static void ensureUnpackPBOdisabled(ContextCapabilities caps) { + if ( LWJGLUtil.CHECKS && StateTracker.getReferences(caps).pixelUnpackBuffer != 0 ) + throw new OpenGLException("Cannot use Buffers when Pixel Unpack Buffer Object is enabled"); + } + + /** Helper method to ensure that pixel unpack buffer objects are enabled. If they are disabled, we'll throw an OpenGLException */ + static void ensureUnpackPBOenabled(ContextCapabilities caps) { + if ( LWJGLUtil.CHECKS && StateTracker.getReferences(caps).pixelUnpackBuffer == 0 ) + throw new OpenGLException("Cannot use offsets when Pixel Unpack Buffer Object is disabled"); + } + + /** + * Calculate the storage required for an image in elements + * + * @param format The format of the image (example: GL_RGBA) + * @param type The type of the image elements (example: GL_UNSIGNED_BYTE) + * @param width The width of the image + * @param height The height of the image (1 for 1D images) + * @param depth The depth of the image (1 for 2D images) + * + * @return the size, in elements, of the image + */ + static int calculateImageStorage(Buffer buffer, int format, int type, int width, int height, int depth) { + return LWJGLUtil.CHECKS ? calculateImageStorage(format, type, width, height, depth) >> BufferUtils.getElementSizeExponent(buffer) : 0; + } + + static int calculateTexImage1DStorage(Buffer buffer, int format, int type, int width) { + return LWJGLUtil.CHECKS ? calculateTexImage1DStorage(format, type, width) >> BufferUtils.getElementSizeExponent(buffer) : 0; + } + + static int calculateTexImage2DStorage(Buffer buffer, int format, int type, int width, int height) { + return LWJGLUtil.CHECKS ? calculateTexImage2DStorage(format, type, width, height) >> BufferUtils.getElementSizeExponent(buffer) : 0; + } + + static int calculateTexImage3DStorage(Buffer buffer, int format, int type, int width, int height, int depth) { + return LWJGLUtil.CHECKS ? calculateTexImage3DStorage(format, type, width, height, depth) >> BufferUtils.getElementSizeExponent(buffer) : 0; + } + + /** + * Calculate the storage required for an image in bytes. + * + * @param format The format of the image (example: GL_RGBA) + * @param type The type of the image elements (example: GL_UNSIGNED_BYTE) + * @param width The width of the image + * @param height The height of the image (1 for 1D images) + * @param depth The depth of the image (1 for 2D images) + * + * @return the size, in bytes, of the image + */ + private static int calculateImageStorage(int format, int type, int width, int height, int depth) { + return calculateBytesPerPixel(format, type) * width * height * depth; + } + + private static int calculateTexImage1DStorage(int format, int type, int width) { + return calculateBytesPerPixel(format, type) * width; + } + + private static int calculateTexImage2DStorage(int format, int type, int width, int height) { + return calculateTexImage1DStorage(format, type, width) * height; + } + + private static int calculateTexImage3DStorage(int format, int type, int width, int height, int depth) { + return calculateTexImage2DStorage(format, type, width, height) * depth; + } + + private static int calculateBytesPerPixel(int format, int type) { + int bpe; + switch ( type ) { + case GL_UNSIGNED_BYTE: + case GL_BYTE: + bpe = 1; + break; + case GL_UNSIGNED_SHORT: + case GL_SHORT: + bpe = 2; + break; + case GL_UNSIGNED_INT: + case GL_INT: + case GL_FLOAT: + bpe = 4; + break; + default: + // TODO: Add more types (like the GL12 types GL_UNSIGNED_INT_8_8_8_8 + return 0; + // throw new IllegalArgumentException("Unknown type " + type); + } + int epp; + switch ( format ) { + case GL_LUMINANCE: + case GL_ALPHA: + epp = 1; + break; + + case GL_LUMINANCE_ALPHA: + epp = 2; + break; + case GL_RGB: + case GL_BGR_EXT: + epp = 3; + break; + case GL_RGBA: + case GL_ABGR_EXT: + case GL_BGRA_EXT: + epp = 4; + break; + default: + // TODO: Add more formats. Assuming 4 is too wasteful on buffer sizes where e.g. 1 is enough (like GL_DEPTH_COMPONENT) + return 0; +/* // Assume 4 elements per pixel + epp = 4;*/ + } + + return bpe * epp; + } + + // NV_path_rendering checks + + static int calculateBytesPerCharCode(int type) { + switch ( type ) { + case GL_UNSIGNED_BYTE: + case GL_UTF8_NV: + return 1; + case GL_UNSIGNED_SHORT: + case GL_2_BYTES: + case GL_UTF16_NV: + return 2; + case GL_3_BYTES: + return 3; + case GL_4_BYTES: + return 4; + default: + throw new IllegalArgumentException("Unsupported charcode type: " + type); + } + } + + static int calculateBytesPerPathName(int pathNameType) { + switch ( pathNameType ) { + case GL_BYTE: + case GL_UNSIGNED_BYTE: + case GL_UTF8_NV: + return 1; + case GL_SHORT: + case GL_UNSIGNED_SHORT: + case GL_2_BYTES: + case GL_UTF16_NV: + return 2; + case GL_3_BYTES: + return 3; + case GL_INT: + case GL_UNSIGNED_INT: + case GL_FLOAT: + case GL_4_BYTES: + return 4; + default: + throw new IllegalArgumentException("Unsupported path name type: " + pathNameType); + } + } + + static int calculateTransformPathValues(int transformType) { + switch ( transformType ) { + case GL_NONE: + return 0; + case GL_TRANSLATE_X_NV: + case GL_TRANSLATE_Y_NV: + return 1; + case GL_TRANSLATE_2D_NV: + return 2; + case GL_TRANSLATE_3D_NV: + return 3; + case GL_AFFINE_2D_NV: + case GL_TRANSPOSE_AFFINE_2D_NV: + return 6; + case GL_AFFINE_3D_NV: + case GL_TRANSPOSE_AFFINE_3D_NV: + return 12; + default: + throw new IllegalArgumentException("Unsupported transform type: " + transformType); + } + } + + static int calculatePathColorGenCoeffsCount(int genMode, int colorFormat) { + final int coeffsPerComponent = calculatePathGenCoeffsPerComponent(genMode); + + switch ( colorFormat ) { + case GL_RGB: + return 3 * coeffsPerComponent; + case GL_RGBA: + return 4 * coeffsPerComponent; + default: + return coeffsPerComponent; + } + } + + static int calculatePathTextGenCoeffsPerComponent(FloatBuffer coeffs, int genMode) { + if ( genMode == GL_NONE ) + return 0; + + return coeffs.remaining() / calculatePathGenCoeffsPerComponent(genMode); + } + + private static int calculatePathGenCoeffsPerComponent(int genMode) { + switch ( genMode ) { + case GL_NONE: + return 0; + case GL_OBJECT_LINEAR: + case GL_PATH_OBJECT_BOUNDING_BOX_NV: + return 3; + case GL_EYE_LINEAR: + return 4; + default: + throw new IllegalArgumentException("Unsupported gen mode: " + genMode); + } + } + + static int calculateMetricsSize(int metricQueryMask, int stride) { + if ( LWJGLUtil.DEBUG && (stride < 0 || (stride % 4) != 0) ) + throw new IllegalArgumentException("Invalid stride value: " + stride); + + final int metrics = Integer.bitCount(metricQueryMask); + + if ( LWJGLUtil.DEBUG && (stride >> 2) < metrics ) + throw new IllegalArgumentException("The queried metrics do not fit in the specified stride: " + stride); + + return stride == 0 ? metrics : (stride >> 2); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/GLContext.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/GLContext.java new file mode 100644 index 0000000..91728bf --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/GLContext.java @@ -0,0 +1,415 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; +import org.lwjgl.MemoryUtil; +import org.lwjgl.Sys; + +import java.lang.reflect.Method; +import java.nio.ByteBuffer; +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.security.PrivilegedExceptionAction; +import java.util.*; + +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.opengl.GL30.*; +import static org.lwjgl.opengl.GL32.*; + +/** + *

+ * Manages GL contexts. Before any rendering is done by a LWJGL system, a call should be made to GLContext.useContext() with a + * context. This will ensure that GLContext has an accurate reflection of the current context's capabilities and function + * pointers. + *

+ * This class is thread-safe in the sense that multiple threads can safely call all public methods. The class is also + * thread-aware in the sense that it tracks a per-thread current context (including capabilities and function pointers). + * That way, multiple threads can have multiple contexts current and render to them concurrently. + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +public final class GLContext { + + /** Maps threads to their current context's ContextCapabilities, if any */ + private static final ThreadLocal current_capabilities = new ThreadLocal(); + + /** + * The getCapabilities() method is a potential hot spot in any LWJGL application, since + * it is needed for context capability discovery (e.g. is OpenGL 2.0 supported?), and + * for the function pointers of gl functions. However, the 'current_capabilities' ThreadLocal + * is (relatively) expensive to look up, and since most OpenGL applications use are single threaded + * rendering, the following two is an optimization for this case. + *

+ * ThreadLocals can be thought of as a mapping between threads and values, so the idea + * is to use a lock-less cache of mappings between threads and the current ContextCapabilities. The cache + * could be any size, but in our case, we want a single sized cache for optimal performance + * in the single threaded case. + *

+ * 'fast_path_cache' is the most recent ContextCapabilities (potentially null) and its owner. By + * recent I mean the last thread setting the value in setCapabilities(). When getCapabilities() + * is called, a check to see if the current is the owner of the ContextCapabilities instance in + * fast_path_cache. If so, the instance is returned, if not, some thread has since taken ownership + * of the cache entry and the slower current_capabilities ThreadLocal is queried instead. + *

+ * No locks are needed in get/setCapabilities, because even though fast_path_cache can be accessed + * from multiple threads at once, we are guaranteed by the JVM spec that its value is always valid. + * Furthermore, if the ownership test in getCapabilities() succeeds, the cache entry can only contain + * the correct ContextCapabilites (that is, the one from getThreadLocalCapabilites()), + * since no other thread can set the owner to anyone else than itself. + */ + private static CapabilitiesCacheEntry fast_path_cache = new CapabilitiesCacheEntry(); + + /** + * Simple lock-free cache of CapabilitesEntryCache to avoid allocating more than one + * cache entry per thread + */ + private static final ThreadLocal thread_cache_entries = new ThreadLocal(); + + /** + * The weak mapping from context Object instances to ContextCapabilities. Used + * to avoid recreating a ContextCapabilities every time a context is made current. + */ + private static final Map capability_cache = new WeakHashMap(); + + /** Reference count of the native opengl implementation library */ + private static int gl_ref_count; + private static boolean did_auto_load; + + static { + Sys.initialize(); + } + + /** + * Get the current capabilities instance. It contains the flags used + * to test for support of a particular extension. + * + * @return The current capabilities instance. + */ + public static ContextCapabilities getCapabilities() { + ContextCapabilities caps = getCapabilitiesImpl(); + if ( caps == null ) + throw new RuntimeException("No OpenGL context found in the current thread."); + + return caps; + } + + private static ContextCapabilities getCapabilitiesImpl() { + CapabilitiesCacheEntry recent_cache_entry = fast_path_cache; + // Check owner of cache entry + if ( recent_cache_entry.owner == Thread.currentThread() ) { + /* The owner ship test succeeded, so the cache must contain the current ContextCapabilities instance + * assert recent_cache_entry.capabilities == getThreadLocalCapabilities(); + */ + return recent_cache_entry.capabilities; + } else // Some other thread has written to the cache since, and we fall back to the slower path + return getThreadLocalCapabilities(); + } + + /** + * Returns the capabilities instance associated with the specified context object. + * + * @param context the context object + * + * @return the capabilities instance + */ + static ContextCapabilities getCapabilities(Object context) { + return capability_cache.get(context); + } + + private static ContextCapabilities getThreadLocalCapabilities() { + return current_capabilities.get(); + } + + /** + * Set the current capabilities instance. It contains the flags used + * to test for support of a particular extension. + * + * @return The current capabilities instance. + */ + static void setCapabilities(ContextCapabilities capabilities) { + current_capabilities.set(capabilities); + + CapabilitiesCacheEntry thread_cache_entry = thread_cache_entries.get(); + if ( thread_cache_entry == null ) { + thread_cache_entry = new CapabilitiesCacheEntry(); + thread_cache_entries.set(thread_cache_entry); + } + thread_cache_entry.owner = Thread.currentThread(); + thread_cache_entry.capabilities = capabilities; + + fast_path_cache = thread_cache_entry; + } + + /** + * Helper method to get a pointer to a named function in the OpenGL library + * with a name dependent on the current platform + */ + static long getPlatformSpecificFunctionAddress(String function_prefix, String[] os_prefixes, String[] os_function_prefixes, String function) { + String os_name = AccessController.doPrivileged(new PrivilegedAction() { + public String run() { + return System.getProperty("os.name"); + } + }); + for ( int i = 0; i < os_prefixes.length; i++ ) + if ( os_name.startsWith(os_prefixes[i]) ) { + String platform_function_name = function.replaceFirst(function_prefix, os_function_prefixes[i]); + long address = getFunctionAddress(platform_function_name); + return address; + } + return 0; + } + + /** + * Helper method to get a pointer to a named function with aliases in the OpenGL library. + * + * @param aliases the function name aliases. + * + * @return the function pointer address + */ + static long getFunctionAddress(String[] aliases) { + for ( String alias : aliases ) { + long address = getFunctionAddress(alias); + if ( address != 0 ) + return address; + } + return 0; + } + + /** Helper method to get a pointer to a named function in the OpenGL library. */ + static long getFunctionAddress(String name) { + ByteBuffer buffer = MemoryUtil.encodeASCII(name); + return ngetFunctionAddress(MemoryUtil.getAddress(buffer)); + } + private static native long ngetFunctionAddress(long name); + + /** + * Determine which extensions are available and returns the context profile mask. Helper method to ContextCapabilities. + * + * @param supported_extensions the Set to fill with the available extension names + * + * @return the context profile mask, will be 0 for any version < 3.2 + */ + static int getSupportedExtensions(final Set supported_extensions) { + // Detect OpenGL version first + + final String version = glGetString(GL_VERSION); + if ( version == null ) + throw new IllegalStateException("glGetString(GL_VERSION) returned null - possibly caused by missing current context."); + + final StringTokenizer version_tokenizer = new StringTokenizer(version, ". "); + final String major_string = version_tokenizer.nextToken(); + final String minor_string = version_tokenizer.nextToken(); + + int majorVersion = 0; + int minorVersion = 0; + try { + majorVersion = Integer.parseInt(major_string); + minorVersion = Integer.parseInt(minor_string); + } catch (NumberFormatException e) { + LWJGLUtil.log("The major and/or minor OpenGL version is malformed: " + e.getMessage()); + } + + final int[][] GL_VERSIONS = { + { 1, 2, 3, 4, 5 }, // OpenGL 1 + { 0, 1 }, // OpenGL 2 + { 0, 1, 2, 3 }, // OpenGL 3 + { 0, 1, 2, 3, 4 }, // OpenGL 4 + }; + + for ( int major = 1; major <= GL_VERSIONS.length; major++ ) { + int[] minors = GL_VERSIONS[major - 1]; + for ( int minor : minors ) { + if ( major < majorVersion || (major == majorVersion && minor <= minorVersion) ) + supported_extensions.add("OpenGL" + Integer.toString(major) + Integer.toString(minor)); + } + } + + int profileMask = 0; + + if ( majorVersion < 3 ) { + // Parse EXTENSIONS string + final String extensions_string = glGetString(GL_EXTENSIONS); + if ( extensions_string == null ) + throw new IllegalStateException("glGetString(GL_EXTENSIONS) returned null - is there a context current?"); + + final StringTokenizer tokenizer = new StringTokenizer(extensions_string); + while ( tokenizer.hasMoreTokens() ) + supported_extensions.add(tokenizer.nextToken()); + } else { + // Use forward compatible indexed EXTENSIONS + final int extensionCount = glGetInteger(GL_NUM_EXTENSIONS); + + for ( int i = 0; i < extensionCount; i++ ) + supported_extensions.add(glGetStringi(GL_EXTENSIONS, i)); + + // Get the context profile mask for versions >= 3.2 + if ( 3 < majorVersion || 2 <= minorVersion ) { + Util.checkGLError(); // Make sure we have no errors up to this point + + try { + profileMask = glGetInteger(GL_CONTEXT_PROFILE_MASK); + // Retrieving GL_CONTEXT_PROFILE_MASK may generate an INVALID_OPERATION error on certain implementations, ignore. + // Happens on pre10.1 ATI drivers, when ContextAttribs.withProfileCompatibility is not used + Util.checkGLError(); + } catch (OpenGLException e) { + LWJGLUtil.log("Failed to retrieve CONTEXT_PROFILE_MASK"); + } + } + } + + return profileMask; + } + + /** + * Helper method to ContextCapabilities. It will try to initialize the native stubs, + * and remove the given extension name from the extension set if the initialization fails. + */ + static void initNativeStubs(final Class extension_class, Set supported_extensions, String ext_name) { + resetNativeStubs(extension_class); + if ( supported_extensions.contains(ext_name) ) { + try { + AccessController.doPrivileged(new PrivilegedExceptionAction() { + public Object run() throws Exception { + Method init_stubs_method = extension_class.getDeclaredMethod("initNativeStubs"); + init_stubs_method.invoke(null); + return null; + } + }); + } catch (Exception e) { + LWJGLUtil.log("Failed to initialize extension " + extension_class + " - exception: " + e); + supported_extensions.remove(ext_name); + } + } + } + + /** + * Makes a GL context the current LWJGL context by loading GL function pointers. The context must be current before a call to + * this method! Instead it simply ensures that the current context is reflected accurately by GLContext's extension caps and + * function pointers. Use useContext(null) when no context is active.

If the context is the same as last time, then this is + * a no-op.

If the context has not been encountered before it will be fully initialized from scratch. Otherwise a cached set + * of caps and function pointers will be used.

The reference to the context is held in a weak reference; therefore if no + * strong reference exists to the GL context it will automatically be forgotten by the VM at an indeterminate point in the + * future, freeing up a little RAM. + * + * @param context The context object, which uniquely identifies a GL context. If context is null, the native stubs are + * unloaded. + * + * @throws LWJGLException if context non-null, and the gl library can't be loaded or the basic GL11 functions can't be loaded + */ + public static synchronized void useContext(Object context) throws LWJGLException { + useContext(context, false); + } + + /** + * Makes a GL context the current LWJGL context by loading GL function pointers. The context must be current before a call to + * this method! Instead it simply ensures that the current context is reflected accurately by GLContext's extension caps and + * function pointers. Use useContext(null) when no context is active.

If the context is the same as last time, then this is + * a no-op.

If the context has not been encountered before it will be fully initialized from scratch. Otherwise a cached set + * of caps and function pointers will be used.

The reference to the context is held in a weak reference; therefore if no + * strong reference exists to the GL context it will automatically be forgotten by the VM at an indeterminate point in the + * future, freeing up a little RAM. + *

If forwardCompatible is true, function pointers of deprecated GL11-GL21 functionality will not be loaded. Calling a deprecated + * function using the specified context will result in an IllegalStateException. + * + * @param context The context object, which uniquely identifies a GL context. If context is null, the native stubs are + * unloaded. + * @param forwardCompatible If the context is a forward compatible context (does not expose deprecated functionality, see XGL_ARB_create_context) + * + * @throws LWJGLException if context non-null, and the gl library can't be loaded or the basic GL11 functions can't be loaded + */ + public static synchronized void useContext(Object context, boolean forwardCompatible) throws LWJGLException { + if ( context == null ) { + ContextCapabilities.unloadAllStubs(); + setCapabilities(null); + if ( did_auto_load ) + unloadOpenGLLibrary(); + return; + } + if ( gl_ref_count == 0 ) { + loadOpenGLLibrary(); + did_auto_load = true; + } + try { + ContextCapabilities capabilities = capability_cache.get(context); + if ( capabilities == null ) { + /* + * The capabilities object registers itself as current. This behaviour is caused + * by a chicken-and-egg situation where the constructor needs to call GL functions + * as part of its capability discovery, but GL functions cannot be called before + * a capabilities object has been set. + */ + new ContextCapabilities(forwardCompatible); + capability_cache.put(context, getCapabilities()); + } else + setCapabilities(capabilities); + } catch (LWJGLException e) { + if ( did_auto_load ) + unloadOpenGLLibrary(); + throw e; + } + } + + /** If the OpenGL reference count is 0, the library is loaded. The reference count is then incremented. */ + public static synchronized void loadOpenGLLibrary() throws LWJGLException { + if ( gl_ref_count == 0 ) + nLoadOpenGLLibrary(); + gl_ref_count++; + } + + private static native void nLoadOpenGLLibrary() throws LWJGLException; + + /** The OpenGL library reference count is decremented, and if it reaches 0, the library is unloaded. */ + public static synchronized void unloadOpenGLLibrary() { + gl_ref_count--; + /* + * Unload the native OpenGL library unless we're on linux, since + * some drivers (NVIDIA proprietary) crash on exit when unloading the library. + */ + if ( gl_ref_count == 0 && LWJGLUtil.getPlatform() != LWJGLUtil.PLATFORM_LINUX ) + nUnloadOpenGLLibrary(); + } + + private static native void nUnloadOpenGLLibrary(); + + /** Native method to clear native stub bindings */ + static native void resetNativeStubs(Class clazz); + + private static final class CapabilitiesCacheEntry { + + Thread owner; + ContextCapabilities capabilities; + } +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/GLSync.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/GLSync.java new file mode 100644 index 0000000..cda0f2f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/GLSync.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.PointerWrapperAbstract; + +/** + * This class is a wrapper around a GLsync pointer. + * + * @author spasi + */ +public final class GLSync extends PointerWrapperAbstract { + + GLSync(final long sync) { + super(sync); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/GLUConstants.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/GLUConstants.java new file mode 100644 index 0000000..e3ae535 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/GLUConstants.java @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import static org.lwjgl.opengl.GL11.*; + +/** + *

+ * GLU constants. + * + * @author cix_foo + * @version $Revision$ + * $Id$ + */ +public interface GLUConstants { + + /* Errors: (return value 0 = no error) */ + int GLU_INVALID_ENUM = 100900; + int GLU_INVALID_VALUE = 100901; + int GLU_OUT_OF_MEMORY = 100902; + int GLU_INCOMPATIBLE_GL_VERSION = 100903; + + /* StringName */ + int GLU_VERSION = 100800; + int GLU_EXTENSIONS = 100801; + + /* Boolean */ + int GLU_TRUE = GL_TRUE; + int GLU_FALSE = GL_FALSE; + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/GlobalLock.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/GlobalLock.java new file mode 100644 index 0000000..4f2a83d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/GlobalLock.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + * This class contains the global lock that LWJGL will use to + * synchronize access to Display. + */ +final class GlobalLock { + static final Object lock = new Object(); +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/InputImplementation.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/InputImplementation.java new file mode 100644 index 0000000..cf680a5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/InputImplementation.java @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + * This is the input implementation interface. Mouse and Keyboard delegates + * to implementors of this interface. There is one InputImplementation + * for each supported platform. + * @author elias_naur + */ + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +import org.lwjgl.LWJGLException; + +public interface InputImplementation { + /* + * Mouse methods + */ + /** Query of wheel support */ + boolean hasWheel(); + + /** Query of button count */ + int getButtonCount(); + + /** + * Method to create the mouse. + */ + void createMouse() throws LWJGLException; + + /** + * Method the destroy the mouse + */ + void destroyMouse(); + + /** + * Method to poll the mouse + */ + void pollMouse(IntBuffer coord_buffer, ByteBuffer buttons); + + /** + * Method to read the keyboard buffer + */ + void readMouse(ByteBuffer buffer); + + void grabMouse(boolean grab); + + /** + * Function to determine native cursor support + */ + int getNativeCursorCapabilities(); + + /** Method to set the native cursor position */ + void setCursorPosition(int x, int y); + + /** Method to set the native cursor */ + void setNativeCursor(Object handle) throws LWJGLException; + + /** Method returning the minimum cursor size */ + int getMinCursorSize(); + + /** Method returning the maximum cursor size */ + int getMaxCursorSize(); + + /* + * Keyboard methods + */ + + /** + * Method to create the keyboard + */ + void createKeyboard() throws LWJGLException; + + /** + * Method to destroy the keyboard + */ + void destroyKeyboard(); + + /** + * Method to poll the keyboard. + * + * @param keyDownBuffer the address of a 256-byte buffer to place + * key states in. + */ + void pollKeyboard(ByteBuffer keyDownBuffer); + + /** + * Method to read the keyboard buffer + */ + void readKeyboard(ByteBuffer buffer); + +// int isStateKeySet(int key); + + /** Native cursor handles */ + Object createCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLException; + + void destroyCursor(Object cursor_handle); + + int getWidth(); + + int getHeight(); + + boolean isInsideWindow(); +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/KHRDebugCallback.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/KHRDebugCallback.java new file mode 100644 index 0000000..223df59 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/KHRDebugCallback.java @@ -0,0 +1,209 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.PointerWrapperAbstract; + +/** + * Instances of this class are needed to use the callback functionality of the KHR_debug extension. + * Users of this class may provide implementations of the {@code Handler} interface to receive notifications. + * The same {@code Handler} instance may be used by different contexts but it is not recommended. + * Handler notifications are synchronized. + * + * @author Spasi + */ +public final class KHRDebugCallback extends PointerWrapperAbstract { + + /** Severity levels. */ + private static final int + GL_DEBUG_SEVERITY_HIGH = 0x9146, + GL_DEBUG_SEVERITY_MEDIUM = 0x9147, + GL_DEBUG_SEVERITY_LOW = 0x9148, + GL_DEBUG_SEVERITY_NOTIFICATION = 0x826B; + + /** Sources. */ + private static final int + GL_DEBUG_SOURCE_API = 0x8246, + GL_DEBUG_SOURCE_WINDOW_SYSTEM = 0x8247, + GL_DEBUG_SOURCE_SHADER_COMPILER = 0x8248, + GL_DEBUG_SOURCE_THIRD_PARTY = 0x8249, + GL_DEBUG_SOURCE_APPLICATION = 0x824A, + GL_DEBUG_SOURCE_OTHER = 0x824B; + + /** Types. */ + private static final int + GL_DEBUG_TYPE_ERROR = 0x824C, + GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR = 0x824D, + GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR = 0x824E, + GL_DEBUG_TYPE_PORTABILITY = 0x824F, + GL_DEBUG_TYPE_PERFORMANCE = 0x8250, + GL_DEBUG_TYPE_OTHER = 0x8251, + GL_DEBUG_TYPE_MARKER = 0x8268; + + private static final long CALLBACK_POINTER; + + static { + long pointer = 0; + try { + // Call reflectively so that we can compile this class for the Generator. + pointer = (Long)Class.forName("org.lwjgl.opengl.CallbackUtil").getDeclaredMethod("getDebugCallbackKHR").invoke(null); + } catch (Exception e) { + // ignore + } + CALLBACK_POINTER = pointer; + } + + private final Handler handler; + + /** + * Creates an KHRebugCallback with a default callback handler. + * The default handler will simply print the message on System.err. + */ + public KHRDebugCallback() { + this(new Handler() { + public void handleMessage(final int source, final int type, final int id, final int severity, final String message) { + System.err.println("[LWJGL] KHR_debug message"); + System.err.println("\tID: " + id); + + String description; + switch ( source ) { + case GL_DEBUG_SOURCE_API: + description = "API"; + break; + case GL_DEBUG_SOURCE_WINDOW_SYSTEM: + description = "WINDOW SYSTEM"; + break; + case GL_DEBUG_SOURCE_SHADER_COMPILER: + description = "SHADER COMPILER"; + break; + case GL_DEBUG_SOURCE_THIRD_PARTY: + description = "THIRD PARTY"; + break; + case GL_DEBUG_SOURCE_APPLICATION: + description = "APPLICATION"; + break; + case GL_DEBUG_SOURCE_OTHER: + description = "OTHER"; + break; + default: + description = printUnknownToken(source); + } + System.err.println("\tSource: " + description); + + switch ( type ) { + case GL_DEBUG_TYPE_ERROR: + description = "ERROR"; + break; + case GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR: + description = "DEPRECATED BEHAVIOR"; + break; + case GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR: + description = "UNDEFINED BEHAVIOR"; + break; + case GL_DEBUG_TYPE_PORTABILITY: + description = "PORTABILITY"; + break; + case GL_DEBUG_TYPE_PERFORMANCE: + description = "PERFORMANCE"; + break; + case GL_DEBUG_TYPE_OTHER: + description = "OTHER"; + break; + case GL_DEBUG_TYPE_MARKER: + description = "MARKER"; + break; + default: + description = printUnknownToken(type); + } + System.err.println("\tType: " + description); + + switch ( severity ) { + case GL_DEBUG_SEVERITY_HIGH: + description = "HIGH"; + break; + case GL_DEBUG_SEVERITY_MEDIUM: + description = "MEDIUM"; + break; + case GL_DEBUG_SEVERITY_LOW: + description = "LOW"; + break; + case GL_DEBUG_SEVERITY_NOTIFICATION: + description = "NOTIFICATION"; + break; + default: + description = printUnknownToken(severity); + } + System.err.println("\tSeverity: " + description); + + System.err.println("\tMessage: " + message); + } + + private String printUnknownToken(final int token) { + return "Unknown (0x" + Integer.toHexString(token).toUpperCase() + ")"; + } + }); + } + + /** + * Creates an ARBDebugOutputCallback with the specified callback handler. + * The handler's {@code handleMessage} method will be called whenever + * debug output is generated by the GL. + * + * @param handler the callback handler + */ + public KHRDebugCallback(final Handler handler) { + super(CALLBACK_POINTER); + + this.handler = handler; + } + + Handler getHandler() { + return handler; + } + + /** Implementations of this interface can be used to receive ARB_debug_output notifications. */ + public interface Handler { + + /** + * This method will be called when an ARB_debug_output message is generated. + * + * @param source the message source + * @param type the message type + * @param id the message ID + * @param severity the message severity + * @param message the string representation of the message. + */ + void handleMessage(int source, int type, int id, int severity, String message); + + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/KeyboardEventQueue.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/KeyboardEventQueue.java new file mode 100644 index 0000000..12a2a5c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/KeyboardEventQueue.java @@ -0,0 +1,366 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + * An AWT implementation of a LWJGL compatible Keyboard event queue. + * @author elias_naur + */ + +import java.awt.event.KeyEvent; +import java.awt.event.KeyListener; +import java.awt.Component; +import java.nio.ByteBuffer; + +import org.lwjgl.input.Keyboard; + +final class KeyboardEventQueue extends EventQueue implements KeyListener { + private static final int[] KEY_MAP = new int[0xffff]; + + private final byte[] key_states = new byte[Keyboard.KEYBOARD_SIZE]; + + /** Event scratch array */ + private final ByteBuffer event = ByteBuffer.allocate(Keyboard.EVENT_SIZE); + + private final Component component; + + private boolean has_deferred_event; + private long deferred_nanos; + private int deferred_key_code; + private int deferred_key_location; + private byte deferred_key_state; + private int deferred_character; + + static { + KEY_MAP[KeyEvent.VK_0] = Keyboard.KEY_0; + KEY_MAP[KeyEvent.VK_1] = Keyboard.KEY_1; + KEY_MAP[KeyEvent.VK_2] = Keyboard.KEY_2; + KEY_MAP[KeyEvent.VK_3] = Keyboard.KEY_3; + KEY_MAP[KeyEvent.VK_4] = Keyboard.KEY_4; + KEY_MAP[KeyEvent.VK_5] = Keyboard.KEY_5; + KEY_MAP[KeyEvent.VK_6] = Keyboard.KEY_6; + KEY_MAP[KeyEvent.VK_7] = Keyboard.KEY_7; + KEY_MAP[KeyEvent.VK_8] = Keyboard.KEY_8; + KEY_MAP[KeyEvent.VK_9] = Keyboard.KEY_9; + KEY_MAP[KeyEvent.VK_A] = Keyboard.KEY_A; +// KEY_MAP[KeyEvent.VK_ACCEPT] = Keyboard.KEY_ACCEPT; + KEY_MAP[KeyEvent.VK_ADD] = Keyboard.KEY_ADD; +// KEY_MAP[KeyEvent.VK_AGAIN] = Keyboard.KEY_AGAIN; +// KEY_MAP[KeyEvent.VK_ALL_CANDIDATES] = Keyboard.KEY_ALL_CANDIDATES; +// KEY_MAP[KeyEvent.VK_ALPHANUMERIC] = Keyboard.KEY_ALPHANUMERIC; +// KEY_MAP[KeyEvent.VK_ALT] = Keyboard.KEY_LMENU; manually mapped + KEY_MAP[KeyEvent.VK_ALT_GRAPH] = Keyboard.KEY_RMENU; +// KEY_MAP[KeyEvent.VK_AMPERSAND] = Keyboard.KEY_AMPERSAND; +// KEY_MAP[KeyEvent.VK_ASTERISK] = Keyboard.KEY_ASTERISK; + KEY_MAP[KeyEvent.VK_AT] = Keyboard.KEY_AT; + KEY_MAP[KeyEvent.VK_B] = Keyboard.KEY_B; +// KEY_MAP[KeyEvent.VK_BACK_QUOTE] = Keyboard.KEY_BACK_QUOTE; + KEY_MAP[KeyEvent.VK_BACK_SLASH] = Keyboard.KEY_BACKSLASH; + KEY_MAP[KeyEvent.VK_BACK_SPACE] = Keyboard.KEY_BACK; +// KEY_MAP[KeyEvent.VK_BRACELEFT] = Keyboard.KEY_BRACELEFT; +// KEY_MAP[KeyEvent.VK_BRACERIGHT] = Keyboard.KEY_BRACERIGHT; + KEY_MAP[KeyEvent.VK_C] = Keyboard.KEY_C; +// KEY_MAP[KeyEvent.VK_CANCEL] = Keyboard.KEY_CANCEL; + KEY_MAP[KeyEvent.VK_CAPS_LOCK] = Keyboard.KEY_CAPITAL; + KEY_MAP[KeyEvent.VK_CIRCUMFLEX] = Keyboard.KEY_CIRCUMFLEX; +// KEY_MAP[KeyEvent.VK_CLEAR] = Keyboard.KEY_CLEAR; + KEY_MAP[KeyEvent.VK_CLOSE_BRACKET] = Keyboard.KEY_RBRACKET; +// KEY_MAP[KeyEvent.VK_CODE_INPUT] = Keyboard.KEY_CODE_INPUT; + KEY_MAP[KeyEvent.VK_COLON] = Keyboard.KEY_COLON; + KEY_MAP[KeyEvent.VK_COMMA] = Keyboard.KEY_COMMA; +// KEY_MAP[KeyEvent.VK_COMPOSE] = Keyboard.KEY_COMPOSE; +// KEY_MAP[KeyEvent.VK_CONTROL] = Keyboard.KEY_LCONTROL; manually mapped + KEY_MAP[KeyEvent.VK_CONVERT] = Keyboard.KEY_CONVERT; +// KEY_MAP[KeyEvent.VK_COPY] = Keyboard.KEY_COPY; +// KEY_MAP[KeyEvent.VK_CUT] = Keyboard.KEY_CUT; + KEY_MAP[KeyEvent.VK_D] = Keyboard.KEY_D; +// KEY_MAP[KeyEvent.VK_DEAD_ABOVEDOT] = Keyboard.KEY_DEAD_ABOVEDOT; +// KEY_MAP[KeyEvent.VK_DEAD_ABOVERING] = Keyboard.KEY_DEAD_ABOVERING; +// KEY_MAP[KeyEvent.VK_DEAD_ACUTE] = Keyboard.KEY_DEAD_ACUTE; +// KEY_MAP[KeyEvent.VK_DEAD_BREVE] = Keyboard.KEY_DEAD_BREVE; +// KEY_MAP[KeyEvent.VK_DEAD_CARON] = Keyboard.KEY_DEAD_CARON; +// KEY_MAP[KeyEvent.VK_DEAD_CEDILLA] = Keyboard.KEY_DEAD_CEDILLA; +// KEY_MAP[KeyEvent.VK_DEAD_CIRCUMFLEX] = Keyboard.KEY_DEAD_CIRCUMFLEX; +// KEY_MAP[KeyEvent.VK_DEAD_DIAERESIS] = Keyboard.KEY_DEAD_DIAERESIS; +// KEY_MAP[KeyEvent.VK_DEAD_DOUBLEACUTE] = Keyboard.KEY_DEAD_DOUBLEACUTE; +// KEY_MAP[KeyEvent.VK_DEAD_GRAVE] = Keyboard.KEY_DEAD_GRAVE; +// KEY_MAP[KeyEvent.VK_DEAD_IOTA] = Keyboard.KEY_DEAD_IOTA; +// KEY_MAP[KeyEvent.VK_DEAD_MACRON] = Keyboard.KEY_DEAD_MACRON; +// KEY_MAP[KeyEvent.VK_DEAD_OGONEK] = Keyboard.KEY_DEAD_OGONEK; +// KEY_MAP[KeyEvent.VK_DEAD_SEMIVOICED_SOUND] = Keyboard.KEY_DEAD_SEMIVOICED_SOUND; +// KEY_MAP[KeyEvent.VK_DEAD_TILDE] = Keyboard.KEY_DEAD_TILDE; +// KEY_MAP[KeyEvent.VK_DEAD_VOICED_SOUND] = Keyboard.KEY_DEAD_VOICED_SOUND; + KEY_MAP[KeyEvent.VK_DECIMAL] = Keyboard.KEY_DECIMAL; + KEY_MAP[KeyEvent.VK_DELETE] = Keyboard.KEY_DELETE; + KEY_MAP[KeyEvent.VK_DIVIDE] = Keyboard.KEY_DIVIDE; +// KEY_MAP[KeyEvent.VK_DOLLAR] = Keyboard.KEY_DOLLAR; + KEY_MAP[KeyEvent.VK_DOWN] = Keyboard.KEY_DOWN; + KEY_MAP[KeyEvent.VK_E] = Keyboard.KEY_E; + KEY_MAP[KeyEvent.VK_END] = Keyboard.KEY_END; + KEY_MAP[KeyEvent.VK_ENTER] = Keyboard.KEY_RETURN; + KEY_MAP[KeyEvent.VK_EQUALS] = Keyboard.KEY_EQUALS; + KEY_MAP[KeyEvent.VK_ESCAPE] = Keyboard.KEY_ESCAPE; +// KEY_MAP[KeyEvent.VK_EURO_SIGN] = Keyboard.KEY_EURO_SIGN; +// KEY_MAP[KeyEvent.VK_EXCLAMATION_MARK] = Keyboard.KEY_EXCLAMATION_MARK; + KEY_MAP[KeyEvent.VK_F] = Keyboard.KEY_F; + KEY_MAP[KeyEvent.VK_F1] = Keyboard.KEY_F1; + KEY_MAP[KeyEvent.VK_F10] = Keyboard.KEY_F10; + KEY_MAP[KeyEvent.VK_F11] = Keyboard.KEY_F11; + KEY_MAP[KeyEvent.VK_F12] = Keyboard.KEY_F12; + KEY_MAP[KeyEvent.VK_F13] = Keyboard.KEY_F13; + KEY_MAP[KeyEvent.VK_F14] = Keyboard.KEY_F14; + KEY_MAP[KeyEvent.VK_F15] = Keyboard.KEY_F15; +// KEY_MAP[KeyEvent.VK_F16] = Keyboard.KEY_F16; +// KEY_MAP[KeyEvent.VK_F17] = Keyboard.KEY_F17; +// KEY_MAP[KeyEvent.VK_F18] = Keyboard.KEY_F18; +// KEY_MAP[KeyEvent.VK_F19] = Keyboard.KEY_F19; + KEY_MAP[KeyEvent.VK_F2] = Keyboard.KEY_F2; +// KEY_MAP[KeyEvent.VK_F20] = Keyboard.KEY_F20; +// KEY_MAP[KeyEvent.VK_F21] = Keyboard.KEY_F21; +// KEY_MAP[KeyEvent.VK_F22] = Keyboard.KEY_F22; +// KEY_MAP[KeyEvent.VK_F23] = Keyboard.KEY_F23; +// KEY_MAP[KeyEvent.VK_F24] = Keyboard.KEY_F24; + KEY_MAP[KeyEvent.VK_F3] = Keyboard.KEY_F3; + KEY_MAP[KeyEvent.VK_F4] = Keyboard.KEY_F4; + KEY_MAP[KeyEvent.VK_F5] = Keyboard.KEY_F5; + KEY_MAP[KeyEvent.VK_F6] = Keyboard.KEY_F6; + KEY_MAP[KeyEvent.VK_F7] = Keyboard.KEY_F7; + KEY_MAP[KeyEvent.VK_F8] = Keyboard.KEY_F8; + KEY_MAP[KeyEvent.VK_F9] = Keyboard.KEY_F9; +// KEY_MAP[KeyEvent.VK_FINAL] = Keyboard.KEY_FINAL; +// KEY_MAP[KeyEvent.VK_FIND] = Keyboard.KEY_FIND; +// KEY_MAP[KeyEvent.VK_FULL_WIDTH] = Keyboard.KEY_FULL_WIDTH; + KEY_MAP[KeyEvent.VK_G] = Keyboard.KEY_G; +// KEY_MAP[KeyEvent.VK_GREATER] = Keyboard.KEY_GREATER; + KEY_MAP[KeyEvent.VK_H] = Keyboard.KEY_H; +// KEY_MAP[KeyEvent.VK_HALF_WIDTH] = Keyboard.KEY_HALF_WIDTH; +// KEY_MAP[KeyEvent.VK_HELP] = Keyboard.KEY_HELP; +// KEY_MAP[KeyEvent.VK_HIRAGANA] = Keyboard.KEY_HIRAGANA; + KEY_MAP[KeyEvent.VK_HOME] = Keyboard.KEY_HOME; + KEY_MAP[KeyEvent.VK_I] = Keyboard.KEY_I; +// KEY_MAP[KeyEvent.VK_INPUT_METHOD_ON_OFF] = Keyboard.KEY_INPUT_METHOD_ON_OFF; + KEY_MAP[KeyEvent.VK_INSERT] = Keyboard.KEY_INSERT; +// KEY_MAP[KeyEvent.VK_INVERTED_EXCLAMATION_MARK] = Keyboard.KEY_INVERTED_EXCLAMATION_MARK; + KEY_MAP[KeyEvent.VK_J] = Keyboard.KEY_J; +// KEY_MAP[KeyEvent.VK_JAPANESE_HIRAGANA] = Keyboard.KEY_JAPANESE_HIRAGANA; +// KEY_MAP[KeyEvent.VK_JAPANESE_KATAKANA] = Keyboard.KEY_JAPANESE_KATAKANA; +// KEY_MAP[KeyEvent.VK_JAPANESE_ROMAN] = Keyboard.KEY_JAPANESE_ROMAN; + KEY_MAP[KeyEvent.VK_K] = Keyboard.KEY_K; + KEY_MAP[KeyEvent.VK_KANA] = Keyboard.KEY_KANA; +// KEY_MAP[KeyEvent.VK_KANA_LOCK] = Keyboard.KEY_KANA_LOCK; + KEY_MAP[KeyEvent.VK_KANJI] = Keyboard.KEY_KANJI; +// KEY_MAP[KeyEvent.VK_KATAKANA] = Keyboard.KEY_KATAKANA; +// KEY_MAP[KeyEvent.VK_KP_DOWN] = Keyboard.KEY_KP_DOWN; +// KEY_MAP[KeyEvent.VK_KP_LEFT] = Keyboard.KEY_KP_LEFT; +// KEY_MAP[KeyEvent.VK_KP_RIGHT] = Keyboard.KEY_KP_RIGHT; +// KEY_MAP[KeyEvent.VK_KP_UP] = Keyboard.KEY_KP_UP; + KEY_MAP[KeyEvent.VK_L] = Keyboard.KEY_L; + KEY_MAP[KeyEvent.VK_LEFT] = Keyboard.KEY_LEFT; +// KEY_MAP[KeyEvent.VK_LEFT_PARENTHESIS] = Keyboard.KEY_LEFT_PARENTHESIS; +// KEY_MAP[KeyEvent.VK_LESS] = Keyboard.KEY_LESS; + KEY_MAP[KeyEvent.VK_M] = Keyboard.KEY_M; +// KEY_MAP[KeyEvent.VK_META] = Keyboard.KEY_LMENU; manually mapped + KEY_MAP[KeyEvent.VK_MINUS] = Keyboard.KEY_MINUS; +// KEY_MAP[KeyEvent.VK_MODECHANGE] = Keyboard.KEY_MODECHANGE; + KEY_MAP[KeyEvent.VK_MULTIPLY] = Keyboard.KEY_MULTIPLY; + KEY_MAP[KeyEvent.VK_N] = Keyboard.KEY_N; +// KEY_MAP[KeyEvent.VK_NONCONVERT] = Keyboard.KEY_NONCONVERT; + KEY_MAP[KeyEvent.VK_NUM_LOCK] = Keyboard.KEY_NUMLOCK; +// KEY_MAP[KeyEvent.VK_NUMBER_SIGN] = Keyboard.KEY_NUMBER_SIGN; + KEY_MAP[KeyEvent.VK_NUMPAD0] = Keyboard.KEY_NUMPAD0; + KEY_MAP[KeyEvent.VK_NUMPAD1] = Keyboard.KEY_NUMPAD1; + KEY_MAP[KeyEvent.VK_NUMPAD2] = Keyboard.KEY_NUMPAD2; + KEY_MAP[KeyEvent.VK_NUMPAD3] = Keyboard.KEY_NUMPAD3; + KEY_MAP[KeyEvent.VK_NUMPAD4] = Keyboard.KEY_NUMPAD4; + KEY_MAP[KeyEvent.VK_NUMPAD5] = Keyboard.KEY_NUMPAD5; + KEY_MAP[KeyEvent.VK_NUMPAD6] = Keyboard.KEY_NUMPAD6; + KEY_MAP[KeyEvent.VK_NUMPAD7] = Keyboard.KEY_NUMPAD7; + KEY_MAP[KeyEvent.VK_NUMPAD8] = Keyboard.KEY_NUMPAD8; + KEY_MAP[KeyEvent.VK_NUMPAD9] = Keyboard.KEY_NUMPAD9; + KEY_MAP[KeyEvent.VK_O] = Keyboard.KEY_O; + KEY_MAP[KeyEvent.VK_OPEN_BRACKET] = Keyboard.KEY_LBRACKET; + KEY_MAP[KeyEvent.VK_P] = Keyboard.KEY_P; + KEY_MAP[KeyEvent.VK_PAGE_DOWN] = Keyboard.KEY_NEXT; + KEY_MAP[KeyEvent.VK_PAGE_UP] = Keyboard.KEY_PRIOR; +// KEY_MAP[KeyEvent.VK_PASTE] = Keyboard.KEY_PASTE; + KEY_MAP[KeyEvent.VK_PAUSE] = Keyboard.KEY_PAUSE; + KEY_MAP[KeyEvent.VK_PERIOD] = Keyboard.KEY_PERIOD; +// KEY_MAP[KeyEvent.VK_PLUS] = Keyboard.KEY_PLUS; +// KEY_MAP[KeyEvent.VK_PREVIOUS_CANDIDATE] = Keyboard.KEY_PREVIOUS_CANDIDATE; +// KEY_MAP[KeyEvent.VK_PRINTSCREEN] = Keyboard.KEY_PRINTSCREEN; +// KEY_MAP[KeyEvent.VK_PROPS] = Keyboard.KEY_PROPS; + KEY_MAP[KeyEvent.VK_Q] = Keyboard.KEY_Q; +// KEY_MAP[KeyEvent.VK_QUOTE] = Keyboard.KEY_QUOTE; +// KEY_MAP[KeyEvent.VK_QUOTEDBL] = Keyboard.KEY_QUOTEDBL; + KEY_MAP[KeyEvent.VK_R] = Keyboard.KEY_R; + KEY_MAP[KeyEvent.VK_RIGHT] = Keyboard.KEY_RIGHT; +// KEY_MAP[KeyEvent.VK_RIGHT_PARENTHESIS] = Keyboard.KEY_RIGHT_PARENTHESIS; +// KEY_MAP[KeyEvent.VK_ROMAN_CHARACTERS] = Keyboard.KEY_ROMAN_CHARACTERS; + KEY_MAP[KeyEvent.VK_S] = Keyboard.KEY_S; + KEY_MAP[KeyEvent.VK_SCROLL_LOCK] = Keyboard.KEY_SCROLL; + KEY_MAP[KeyEvent.VK_SEMICOLON] = Keyboard.KEY_SEMICOLON; + KEY_MAP[KeyEvent.VK_SEPARATOR] = Keyboard.KEY_DECIMAL; +// KEY_MAP[KeyEvent.VK_SHIFT] = Keyboard.KEY_LSHIFT; manually mapped + KEY_MAP[KeyEvent.VK_SLASH] = Keyboard.KEY_SLASH; + KEY_MAP[KeyEvent.VK_SPACE] = Keyboard.KEY_SPACE; + KEY_MAP[KeyEvent.VK_STOP] = Keyboard.KEY_STOP; + KEY_MAP[KeyEvent.VK_SUBTRACT] = Keyboard.KEY_SUBTRACT; + KEY_MAP[KeyEvent.VK_T] = Keyboard.KEY_T; + KEY_MAP[KeyEvent.VK_TAB] = Keyboard.KEY_TAB; + KEY_MAP[KeyEvent.VK_U] = Keyboard.KEY_U; +// KEY_MAP[KeyEvent.VK_UNDERSCORE] = Keyboard.KEY_UNDERSCORE; +// KEY_MAP[KeyEvent.VK_UNDO] = Keyboard.KEY_UNDO; + KEY_MAP[KeyEvent.VK_UP] = Keyboard.KEY_UP; + KEY_MAP[KeyEvent.VK_V] = Keyboard.KEY_V; + KEY_MAP[KeyEvent.VK_W] = Keyboard.KEY_W; + KEY_MAP[KeyEvent.VK_X] = Keyboard.KEY_X; + KEY_MAP[KeyEvent.VK_Y] = Keyboard.KEY_Y; + KEY_MAP[KeyEvent.VK_Z] = Keyboard.KEY_Z; + } + + KeyboardEventQueue(Component component) { + super(Keyboard.EVENT_SIZE); + this.component = component; + } + + public void register() { + component.addKeyListener(this); + } + + public void unregister() { + /* + * This line is commented out to work around AWT bug 4867453: + * http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4867453 + */ + //component.removeKeyListener(this); + } + + private void putKeyboardEvent(int key_code, byte state, int character, long nanos, boolean repeat) { + event.clear(); + event.putInt(key_code).put(state).putInt(character).putLong(nanos).put(repeat ? (byte)1 : (byte)0); + event.flip(); + putEvent(event); + } + + public synchronized void poll(ByteBuffer key_down_buffer) { + flushDeferredEvent(); + int old_position = key_down_buffer.position(); + key_down_buffer.put(key_states); + key_down_buffer.position(old_position); + } + + public synchronized void copyEvents(ByteBuffer dest) { + flushDeferredEvent(); + super.copyEvents(dest); + } + + private synchronized void handleKey(int key_code, int key_location, byte state, int character, long nanos) { + if (character == KeyEvent.CHAR_UNDEFINED) + character = Keyboard.CHAR_NONE; + if (state == 1) { + boolean repeat = false; + if (has_deferred_event) { + if ((nanos == deferred_nanos && deferred_key_code == key_code && + deferred_key_location == key_location)) { + has_deferred_event = false; + repeat = true; // Repeat event + } else + flushDeferredEvent(); + } + putKeyEvent(key_code, key_location, state, character, nanos, repeat); + } else { + flushDeferredEvent(); + has_deferred_event = true; + deferred_nanos = nanos; + deferred_key_code = key_code; + deferred_key_location = key_location; + deferred_key_state = state; + deferred_character = character; + } + } + + private void flushDeferredEvent() { + if (has_deferred_event) { + putKeyEvent(deferred_key_code, deferred_key_location, deferred_key_state, deferred_character, deferred_nanos, false); + has_deferred_event = false; + } + } + + private void putKeyEvent(int key_code, int key_location, byte state, int character, long nanos, boolean repeat) { + int key_code_mapped = getMappedKeyCode(key_code, key_location); + /* Ignore repeating presses */ + if ( key_states[key_code_mapped] == state ) + repeat = true; + key_states[key_code_mapped] = state; + int key_int_char = character & 0xffff; + putKeyboardEvent(key_code_mapped, state, key_int_char, nanos, repeat); + } + + private int getMappedKeyCode(int key_code, int position) { + // manually map positioned keys + switch (key_code) { + case KeyEvent.VK_ALT: // fall through + if (position == KeyEvent.KEY_LOCATION_RIGHT) + return Keyboard.KEY_RMENU; + else + return Keyboard.KEY_LMENU; + case KeyEvent.VK_META: + if (position == KeyEvent.KEY_LOCATION_RIGHT) + return Keyboard.KEY_RMETA; + else + return Keyboard.KEY_LMETA; + case KeyEvent.VK_SHIFT: + if (position == KeyEvent.KEY_LOCATION_RIGHT) + return Keyboard.KEY_RSHIFT; + else + return Keyboard.KEY_LSHIFT; + case KeyEvent.VK_CONTROL: + if (position == KeyEvent.KEY_LOCATION_RIGHT) + return Keyboard.KEY_RCONTROL; + else + return Keyboard.KEY_LCONTROL; + default: + return KEY_MAP[key_code]; + } + } + + public void keyPressed(KeyEvent e) { + handleKey(e.getKeyCode(), e.getKeyLocation(), (byte)1, e.getKeyChar(), e.getWhen()*1000000); + } + + public void keyReleased(KeyEvent e) { + handleKey(e.getKeyCode(), e.getKeyLocation(), (byte)0, Keyboard.CHAR_NONE, e.getWhen()*1000000); + } + + public void keyTyped(KeyEvent e) { + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxAWTGLCanvasPeerInfo.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxAWTGLCanvasPeerInfo.java new file mode 100644 index 0000000..61e545b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxAWTGLCanvasPeerInfo.java @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import java.nio.ByteBuffer; + +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; +import java.awt.Canvas; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +final class LinuxAWTGLCanvasPeerInfo extends LinuxPeerInfo { + private final Canvas component; + private final AWTSurfaceLock awt_surface = new AWTSurfaceLock(); + private int screen = -1; + + LinuxAWTGLCanvasPeerInfo(Canvas component) { + this.component = component; + } + + protected void doLockAndInitHandle() throws LWJGLException { + ByteBuffer surface_handle = awt_surface.lockAndGetHandle(component); + if (screen == -1) { + try { + screen = getScreenFromSurfaceInfo(surface_handle); + } catch (LWJGLException e) { + LWJGLUtil.log("Got exception while trying to determine screen: " + e); + screen = 0; + } + } + nInitHandle(screen, surface_handle, getHandle()); + } + private static native int getScreenFromSurfaceInfo(ByteBuffer surface_handle) throws LWJGLException; + private static native void nInitHandle(int screen, ByteBuffer surface_buffer, ByteBuffer peer_info_handle) throws LWJGLException; + + protected void doUnlock() throws LWJGLException { + awt_surface.unlock(); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxCanvasImplementation.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxCanvasImplementation.java new file mode 100644 index 0000000..0514bf2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxCanvasImplementation.java @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import java.awt.GraphicsConfiguration; +import java.awt.GraphicsDevice; +import java.awt.Canvas; +import java.lang.reflect.Method; +import java.security.AccessController; +import java.security.PrivilegedExceptionAction; + +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +final class LinuxCanvasImplementation implements AWTCanvasImplementation { + static int getScreenFromDevice(final GraphicsDevice device) throws LWJGLException { + try { + Method getScreen_method = AccessController.doPrivileged(new PrivilegedExceptionAction() { + public Method run() throws Exception { + return device.getClass().getMethod("getScreen"); + } + }); + Integer screen = (Integer)getScreen_method.invoke(device); + return screen; + } catch (Exception e) { + throw new LWJGLException(e); + } + } + + private static int getVisualIDFromConfiguration(final GraphicsConfiguration configuration) throws LWJGLException { + try { + Method getVisual_method = AccessController.doPrivileged(new PrivilegedExceptionAction() { + public Method run() throws Exception { + return configuration.getClass().getMethod("getVisual"); + } + }); + Integer visual = (Integer)getVisual_method.invoke(configuration); + return visual; + } catch (Exception e) { + throw new LWJGLException(e); + } + } + + public PeerInfo createPeerInfo(Canvas component, PixelFormat pixel_format, ContextAttribs attribs) throws LWJGLException { + return new LinuxAWTGLCanvasPeerInfo(component); + } + + /** + * Find a proper GraphicsConfiguration from the given GraphicsDevice and PixelFormat. + * + * @return The GraphicsConfiguration corresponding to a visual that matches the pixel format. + */ + public GraphicsConfiguration findConfiguration(GraphicsDevice device, PixelFormat pixel_format) throws LWJGLException { + try { + int screen = getScreenFromDevice(device); + int visual_id_matching_format = findVisualIDFromFormat(screen, pixel_format); + GraphicsConfiguration[] configurations = device.getConfigurations(); + for ( GraphicsConfiguration configuration : configurations ) { + int visual_id = getVisualIDFromConfiguration(configuration); + if ( visual_id == visual_id_matching_format ) + return configuration; + } + } catch (LWJGLException e) { + LWJGLUtil.log("Got exception while trying to determine configuration: " + e); + } + return null; // In case we failed to locate the visual, or if we're not on a SUN JDK + } + + private static int findVisualIDFromFormat(int screen, PixelFormat pixel_format) throws LWJGLException { + try { + LinuxDisplay.lockAWT(); + try { + GLContext.loadOpenGLLibrary(); + try { + LinuxDisplay.incDisplay(); + return nFindVisualIDFromFormat(LinuxDisplay.getDisplay(), screen, pixel_format); + } finally { + LinuxDisplay.decDisplay(); + } + } finally { + GLContext.unloadOpenGLLibrary(); + } + } finally { + LinuxDisplay.unlockAWT(); + } + } + private static native int nFindVisualIDFromFormat(long display, int screen, PixelFormat pixel_format) throws LWJGLException; +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxContextAttribs.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxContextAttribs.java new file mode 100644 index 0000000..af3b8ef --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxContextAttribs.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + * An implementation of ContextAttribs using GLX_create_context. + * + * @author spasi + */ +final class LinuxContextAttribs implements ContextAttribsImplementation { + + private static final int GLX_CONTEXT_MAJOR_VERSION_ARB = 0x2091; + private static final int GLX_CONTEXT_MINOR_VERSION_ARB = 0x2092; + private static final int GLX_CONTEXT_FLAGS_ARB = 0x2094; + private static final int GLX_CONTEXT_PROFILE_MASK_ARB = 0x9126; + + private static final int GLX_CONTEXT_DEBUG_BIT_ARB = 0x0001; + private static final int GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB = 0x0002; + + private static final int GLX_CONTEXT_CORE_PROFILE_BIT_ARB = 0x00000001; + private static final int GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB = 0x00000002; + + LinuxContextAttribs() { + } + + public int getMajorVersionAttrib() { + return GLX_CONTEXT_MAJOR_VERSION_ARB; + } + + public int getMinorVersionAttrib() { + return GLX_CONTEXT_MINOR_VERSION_ARB; + } + + public int getLayerPlaneAttrib() { + throw new UnsupportedOperationException(); + } + + public int getFlagsAttrib() { + return GLX_CONTEXT_FLAGS_ARB; + } + + public int getDebugBit() { + return GLX_CONTEXT_DEBUG_BIT_ARB; + } + + public int getForwardCompatibleBit() { + return GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB; + } + + public int getProfileMaskAttrib() { + return GLX_CONTEXT_PROFILE_MASK_ARB; + } + + public int getProfileCoreBit() { + return GLX_CONTEXT_CORE_PROFILE_BIT_ARB; + } + + public int getProfileCompatibilityBit() { + return GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB; + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxContextImplementation.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxContextImplementation.java new file mode 100644 index 0000000..4f1f9a6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxContextImplementation.java @@ -0,0 +1,185 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.LWJGLException; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +/** + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +final class LinuxContextImplementation implements ContextImplementation { + + public ByteBuffer create(PeerInfo peer_info, IntBuffer attribs, ByteBuffer shared_context_handle) throws LWJGLException { + LinuxDisplay.lockAWT(); + try { + ByteBuffer peer_handle = peer_info.lockAndGetHandle(); + try { + return nCreate(peer_handle, attribs, shared_context_handle); + } finally { + peer_info.unlock(); + } + } finally { + LinuxDisplay.unlockAWT(); + } + } + + private static native ByteBuffer nCreate(ByteBuffer peer_handle, IntBuffer attribs, ByteBuffer shared_context_handle) throws LWJGLException; + + native long getGLXContext(ByteBuffer context_handle); + + native long getDisplay(ByteBuffer peer_info_handle); + + public void releaseDrawable(ByteBuffer context_handle) throws LWJGLException { + } + + public void swapBuffers() throws LWJGLException { + ContextGL current_context = ContextGL.getCurrentContext(); + if ( current_context == null ) + throw new IllegalStateException("No context is current"); + synchronized ( current_context ) { + PeerInfo current_peer_info = current_context.getPeerInfo(); + LinuxDisplay.lockAWT(); + try { + ByteBuffer peer_handle = current_peer_info.lockAndGetHandle(); + try { + nSwapBuffers(peer_handle); + } finally { + current_peer_info.unlock(); + } + } finally { + LinuxDisplay.unlockAWT(); + } + } + } + + private static native void nSwapBuffers(ByteBuffer peer_info_handle) throws LWJGLException; + + public void releaseCurrentContext() throws LWJGLException { + ContextGL current_context = ContextGL.getCurrentContext(); + if ( current_context == null ) + throw new IllegalStateException("No context is current"); + synchronized ( current_context ) { + PeerInfo current_peer_info = current_context.getPeerInfo(); + LinuxDisplay.lockAWT(); + try { + ByteBuffer peer_handle = current_peer_info.lockAndGetHandle(); + try { + nReleaseCurrentContext(peer_handle); + } finally { + current_peer_info.unlock(); + } + } finally { + LinuxDisplay.unlockAWT(); + } + } + } + + private static native void nReleaseCurrentContext(ByteBuffer peer_info_handle) throws LWJGLException; + + public void update(ByteBuffer context_handle) { + } + + public void makeCurrent(PeerInfo peer_info, ByteBuffer handle) throws LWJGLException { + LinuxDisplay.lockAWT(); + try { + ByteBuffer peer_handle = peer_info.lockAndGetHandle(); + try { + nMakeCurrent(peer_handle, handle); + } finally { + peer_info.unlock(); + } + } finally { + LinuxDisplay.unlockAWT(); + } + } + + private static native void nMakeCurrent(ByteBuffer peer_handle, ByteBuffer context_handle) throws LWJGLException; + + public boolean isCurrent(ByteBuffer handle) throws LWJGLException { + LinuxDisplay.lockAWT(); + try { + boolean result = nIsCurrent(handle); + return result; + } finally { + LinuxDisplay.unlockAWT(); + } + } + + private static native boolean nIsCurrent(ByteBuffer context_handle) throws LWJGLException; + + public void setSwapInterval(int value) { + ContextGL current_context = ContextGL.getCurrentContext(); + PeerInfo peer_info = current_context.getPeerInfo(); + + if ( current_context == null ) + throw new IllegalStateException("No context is current"); + synchronized ( current_context ) { + LinuxDisplay.lockAWT(); + try { + ByteBuffer peer_handle = peer_info.lockAndGetHandle(); + try { + nSetSwapInterval(peer_handle, current_context.getHandle(), value); + } finally { + peer_info.unlock(); + } + } catch (LWJGLException e) { + // API CHANGE - this methods should throw LWJGLException + e.printStackTrace(); + } finally { + LinuxDisplay.unlockAWT(); + } + } + } + + private static native void nSetSwapInterval(ByteBuffer peer_handle, ByteBuffer context_handle, int value); + + public void destroy(PeerInfo peer_info, ByteBuffer handle) throws LWJGLException { + LinuxDisplay.lockAWT(); + try { + ByteBuffer peer_handle = peer_info.lockAndGetHandle(); + try { + nDestroy(peer_handle, handle); + } finally { + peer_info.unlock(); + } + } finally { + LinuxDisplay.unlockAWT(); + } + } + + private static native void nDestroy(ByteBuffer peer_handle, ByteBuffer context_handle) throws LWJGLException; +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxDisplay.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxDisplay.java new file mode 100644 index 0000000..a5b6a58 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxDisplay.java @@ -0,0 +1,1653 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + * This is the Display implementation interface. Display delegates + * to implementors of this interface. There is one DisplayImplementation + * for each supported platform. + * @author elias_naur + */ + +import java.awt.Canvas; +import java.awt.event.FocusListener; +import java.awt.event.FocusEvent; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.nio.ByteOrder; +import java.nio.ByteBuffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; +import java.lang.reflect.InvocationTargetException; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; +import org.lwjgl.MemoryUtil; +import org.lwjgl.opengl.XRandR.Screen; +import org.lwjgl.opengles.EGL; + +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.util.ArrayList; +import java.util.List; + +final class LinuxDisplay implements DisplayImplementation { + /* X11 constants */ + public static final int CurrentTime = 0; + public static final int GrabSuccess = 0; + public static final int AutoRepeatModeOff = 0; + public static final int AutoRepeatModeOn = 1; + public static final int AutoRepeatModeDefault = 2; + public static final int None = 0; + + private static final int KeyPressMask = 1 << 0; + private static final int KeyReleaseMask = 1 << 1; + private static final int ButtonPressMask = 1 << 2; + private static final int ButtonReleaseMask = 1 << 3; + + private static final int NotifyAncestor = 0; + private static final int NotifyNonlinear = 3; + private static final int NotifyPointer = 5; + private static final int NotifyPointerRoot = 6; + private static final int NotifyDetailNone = 7; + + private static final int SetModeInsert = 0; + private static final int SaveSetRoot = 1; + private static final int SaveSetUnmap = 1; + + private static final int X_SetInputFocus = 42; + + /** Window mode enum */ + private static final int FULLSCREEN_LEGACY = 1; + private static final int FULLSCREEN_NETWM = 2; + private static final int WINDOWED = 3; + + /** Current window mode */ + private static int current_window_mode = WINDOWED; + + /** Display mode switching API */ + private static final int XRANDR = 10; + private static final int XF86VIDMODE = 11; + private static final int NONE = 12; + + /** Current X11 Display pointer */ + private static long display; + private static long current_window; + private static long saved_error_handler; + + private static int display_connection_usage_count; + + /** Event buffer */ + private final LinuxEvent event_buffer = new LinuxEvent(); + private final LinuxEvent tmp_event_buffer = new LinuxEvent(); + + /** Current mode swithcing API */ + private int current_displaymode_extension = NONE; + + /** Atom used for the pointer warp messages */ + private long delete_atom; + + private PeerInfo peer_info; + + /** Saved gamma used to restore display settings */ + private ByteBuffer saved_gamma; + private ByteBuffer current_gamma; + + /** Saved mode to restore with */ + private DisplayMode saved_mode; + private DisplayMode current_mode; + + private Screen[] savedXrandrConfig; + + private boolean keyboard_grabbed; + private boolean pointer_grabbed; + private boolean input_released; + private boolean grab; + private boolean focused; + private boolean minimized; + private boolean dirty; + private boolean close_requested; + private long current_cursor; + private long blank_cursor; + private boolean mouseInside = true; + private boolean resizable; + private boolean resized; + + private int window_x; + private int window_y; + private int window_width; + private int window_height; + + private Canvas parent; + private long parent_window; + private static boolean xembedded; + private long parent_proxy_focus_window; + private boolean parent_focused; + private boolean parent_focus_changed; + private long last_window_focus = 0; + + private LinuxKeyboard keyboard; + private LinuxMouse mouse; + + private String wm_class; + + private final FocusListener focus_listener = new FocusListener() { + public void focusGained(FocusEvent e) { + synchronized (GlobalLock.lock) { + parent_focused = true; + parent_focus_changed = true; + } + } + public void focusLost(FocusEvent e) { + synchronized (GlobalLock.lock) { + parent_focused = false; + parent_focus_changed = true; + } + } + }; + + private static ByteBuffer getCurrentGammaRamp() throws LWJGLException { + lockAWT(); + try { + incDisplay(); + try { + if (isXF86VidModeSupported()) + return nGetCurrentGammaRamp(getDisplay(), getDefaultScreen()); + else + return null; + } finally { + decDisplay(); + } + } finally { + unlockAWT(); + } + } + private static native ByteBuffer nGetCurrentGammaRamp(long display, int screen) throws LWJGLException; + + private static int getBestDisplayModeExtension() { + int result; + if (isXrandrSupported()) { + LWJGLUtil.log("Using Xrandr for display mode switching"); + result = XRANDR; + } else if (isXF86VidModeSupported()) { + LWJGLUtil.log("Using XF86VidMode for display mode switching"); + result = XF86VIDMODE; + } else { + LWJGLUtil.log("No display mode extensions available"); + result = NONE; + } + return result; + } + + private static boolean isXrandrSupported() { + if (Display.getPrivilegedBoolean("LWJGL_DISABLE_XRANDR")) + return false; + lockAWT(); + try { + incDisplay(); + try { + return nIsXrandrSupported(getDisplay()); + } finally { + decDisplay(); + } + } catch (LWJGLException e) { + LWJGLUtil.log("Got exception while querying Xrandr support: " + e); + return false; + } finally { + unlockAWT(); + } + } + private static native boolean nIsXrandrSupported(long display) throws LWJGLException; + + private static boolean isXF86VidModeSupported() { + lockAWT(); + try { + incDisplay(); + try { + return nIsXF86VidModeSupported(getDisplay()); + } finally { + decDisplay(); + } + } catch (LWJGLException e) { + LWJGLUtil.log("Got exception while querying XF86VM support: " + e); + return false; + } finally { + unlockAWT(); + } + } + private static native boolean nIsXF86VidModeSupported(long display) throws LWJGLException; + + private static boolean isNetWMFullscreenSupported() throws LWJGLException { + if (Display.getPrivilegedBoolean("LWJGL_DISABLE_NETWM")) + return false; + lockAWT(); + try { + incDisplay(); + try { + return nIsNetWMFullscreenSupported(getDisplay(), getDefaultScreen()); + } finally { + decDisplay(); + } + } catch (LWJGLException e) { + LWJGLUtil.log("Got exception while querying NetWM support: " + e); + return false; + } finally { + unlockAWT(); + } + } + private static native boolean nIsNetWMFullscreenSupported(long display, int screen) throws LWJGLException; + + /* Since Xlib is not guaranteed to be thread safe, we need a way to synchronize LWJGL + * Xlib calls with AWT Xlib calls. Fortunately, JAWT implements Lock()/Unlock() to + * do just that. + */ + static void lockAWT() { + try { + nLockAWT(); + } catch (LWJGLException e) { + LWJGLUtil.log("Caught exception while locking AWT: " + e); + } + } + private static native void nLockAWT() throws LWJGLException; + + static void unlockAWT() { + try { + nUnlockAWT(); + } catch (LWJGLException e) { + LWJGLUtil.log("Caught exception while unlocking AWT: " + e); + } + } + private static native void nUnlockAWT() throws LWJGLException; + + /** + * increment and decrement display usage. + */ + static void incDisplay() throws LWJGLException { + if (display_connection_usage_count == 0) { + try { + // TODO: Can we know if we're on desktop or ES? + GLContext.loadOpenGLLibrary(); + org.lwjgl.opengles.GLContext.loadOpenGLLibrary(); + } catch (Throwable t) { + } + saved_error_handler = setErrorHandler(); + display = openDisplay(); +// synchronize(display, true); + } + display_connection_usage_count++; + } + private static native int callErrorHandler(long handler, long display, long error_ptr); + private static native long setErrorHandler(); + private static native long resetErrorHandler(long handler); + private static native void synchronize(long display, boolean synchronize); + + private static int globalErrorHandler(long display, long event_ptr, long error_display, long serial, long error_code, long request_code, long minor_code) throws LWJGLException { + if (xembedded && request_code == X_SetInputFocus) return 0; // ignore X error in xembeded mode to fix a browser issue when dragging or switching tabs + + if (display == getDisplay()) { + String error_msg = getErrorText(display, error_code); + throw new LWJGLException("X Error - disp: 0x" + Long.toHexString(error_display) + " serial: " + serial + " error: " + error_msg + " request_code: " + request_code + " minor_code: " + minor_code); + } else if (saved_error_handler != 0) + return callErrorHandler(saved_error_handler, display, event_ptr); + return 0; + } + private static native String getErrorText(long display, long error_code); + + static void decDisplay() { + /* + * Some drivers (at least some versions of the radeon dri driver) + * don't like it when the display is closed and later re-opened, + * so we'll just let the singleton display connection leak. + */ +/* display_connection_usage_count--; + if (display_connection_usage_count < 0) + throw new InternalError("display_connection_usage_count < 0: " + display_connection_usage_count); + if (display_connection_usage_count == 0) { + closeDisplay(display); + resetErrorHandler(saved_error_handler); + display = 0; + GLContext.unloadOpenGLLibrary(); + }*/ + } + + static native long openDisplay() throws LWJGLException; + static native void closeDisplay(long display); + + private int getWindowMode(boolean fullscreen) throws LWJGLException { + if (fullscreen) { + if (current_displaymode_extension == XRANDR && isNetWMFullscreenSupported()) { + LWJGLUtil.log("Using NetWM for fullscreen window"); + return FULLSCREEN_NETWM; + } else { + LWJGLUtil.log("Using legacy mode for fullscreen window"); + return FULLSCREEN_LEGACY; + } + } else + return WINDOWED; + } + + static long getDisplay() { + if (display_connection_usage_count <= 0) + throw new InternalError("display_connection_usage_count = " + display_connection_usage_count); + return display; + } + + static int getDefaultScreen() { + return nGetDefaultScreen(getDisplay()); + } + static native int nGetDefaultScreen(long display); + + static long getWindow() { + return current_window; + } + + private void ungrabKeyboard() { + if (keyboard_grabbed) { + nUngrabKeyboard(getDisplay()); + keyboard_grabbed = false; + } + } + static native int nUngrabKeyboard(long display); + + private void grabKeyboard() { + if (!keyboard_grabbed) { + int res = nGrabKeyboard(getDisplay(), getWindow()); + if (res == GrabSuccess) + keyboard_grabbed = true; + } + } + static native int nGrabKeyboard(long display, long window); + + private void grabPointer() { + if (!pointer_grabbed) { + int result = nGrabPointer(getDisplay(), getWindow(), None); + if (result == GrabSuccess) { + pointer_grabbed = true; + // make sure we have a centered window + if (isLegacyFullscreen()) { + nSetViewPort(getDisplay(), getWindow(), getDefaultScreen()); + } + } + } + } + static native int nGrabPointer(long display, long window, long cursor); + private static native void nSetViewPort(long display, long window, int screen); + + private void ungrabPointer() { + if (pointer_grabbed) { + pointer_grabbed = false; + nUngrabPointer(getDisplay()); + } + } + static native int nUngrabPointer(long display); + + private static boolean isFullscreen() { + return current_window_mode == FULLSCREEN_LEGACY || current_window_mode == FULLSCREEN_NETWM; + } + + private boolean shouldGrab() { + return !input_released && grab && mouse != null; + } + + private void updatePointerGrab() { + if (isFullscreen() || shouldGrab()) { + grabPointer(); + } else { + ungrabPointer(); + } + updateCursor(); + } + + private void updateCursor() { + long cursor; + if (shouldGrab()) { + cursor = blank_cursor; + } else { + cursor = current_cursor; + } + nDefineCursor(getDisplay(), getWindow(), cursor); + } + private static native void nDefineCursor(long display, long window, long cursor_handle); + + private static boolean isLegacyFullscreen() { + return current_window_mode == FULLSCREEN_LEGACY; + } + + private void updateKeyboardGrab() { + if (isLegacyFullscreen()) + grabKeyboard(); + else + ungrabKeyboard(); + } + + public void createWindow(final DrawableLWJGL drawable, DisplayMode mode, Canvas parent, int x, int y) throws LWJGLException { + lockAWT(); + try { + incDisplay(); + try { + if ( drawable instanceof DrawableGLES ) + peer_info = new LinuxDisplayPeerInfo(); + + ByteBuffer handle = peer_info.lockAndGetHandle(); + try { + current_window_mode = getWindowMode(Display.isFullscreen()); + + // Try to enable Lecagy FullScreen Support in Compiz, else + // we may have trouble with stuff overlapping our fullscreen window. + if ( current_window_mode != WINDOWED ) + Compiz.setLegacyFullscreenSupport(true); + + // Setting _MOTIF_WM_HINTS in fullscreen mode is problematic for certain window + // managers. We do not set MWM_HINTS_DECORATIONS in fullscreen mode anymore, + // unless org.lwjgl.opengl.Window.undecorated_fs has been specified. + // See native/linux/org_lwjgl_opengl_Display.c, createWindow function. + boolean undecorated = Display.getPrivilegedBoolean("org.lwjgl.opengl.Window.undecorated") || (current_window_mode != WINDOWED && Display.getPrivilegedBoolean("org.lwjgl.opengl.Window.undecorated_fs")); + + this.parent = parent; + parent_window = parent != null ? getHandle(parent) : getRootWindow(getDisplay(), getDefaultScreen()); + resizable = Display.isResizable(); + resized = false; + window_x = x; + window_y = y; + window_width = mode.getWidth(); + window_height = mode.getHeight(); + + current_window = nCreateWindow(getDisplay(), getDefaultScreen(), handle, mode, current_window_mode, x, y, undecorated, parent_window, resizable); + + // Set the WM_CLASS hint which is needed by some WM's e.g. Gnome Shell + wm_class = Display.getPrivilegedString("LWJGL_WM_CLASS"); + if (wm_class == null) wm_class = Display.getTitle(); + setClassHint(Display.getTitle(), wm_class); + + mapRaised(getDisplay(), current_window); + xembedded = parent != null && isAncestorXEmbedded(parent_window); + blank_cursor = createBlankCursor(); + current_cursor = None; + focused = false; + input_released = false; + pointer_grabbed = false; + keyboard_grabbed = false; + close_requested = false; + grab = false; + minimized = false; + dirty = true; + + if ( drawable instanceof DrawableGLES ) + ((DrawableGLES)drawable).initialize(current_window, getDisplay(), EGL.EGL_WINDOW_BIT, (org.lwjgl.opengles.PixelFormat)drawable.getPixelFormat()); + + if (parent != null) { + parent.addFocusListener(focus_listener); + parent_focused = parent.isFocusOwner(); + parent_focus_changed = true; + } + } finally { + peer_info.unlock(); + } + } catch (LWJGLException e) { + decDisplay(); + throw e; + } + } finally { + unlockAWT(); + } + } + private static native long nCreateWindow(long display, int screen, ByteBuffer peer_info_handle, DisplayMode mode, int window_mode, int x, int y, boolean undecorated, long parent_handle, boolean resizable) throws LWJGLException; + private static native long getRootWindow(long display, int screen); + private static native boolean hasProperty(long display, long window, long property); + private static native long getParentWindow(long display, long window) throws LWJGLException; + private static native int getChildCount(long display, long window) throws LWJGLException; + private static native void mapRaised(long display, long window); + private static native void reparentWindow(long display, long window, long parent, int x, int y); + private static native long nGetInputFocus(long display) throws LWJGLException; + private static native void nSetInputFocus(long display, long window, long time); + private static native void nSetWindowSize(long display, long window, int width, int height, boolean resizable); + private static native int nGetX(long display, long window); + private static native int nGetY(long display, long window); + private static native int nGetWidth(long display, long window); + private static native int nGetHeight(long display, long window); + + private static boolean isAncestorXEmbedded(long window) throws LWJGLException { + long xembed_atom = internAtom("_XEMBED_INFO", true); + if (xembed_atom != None) { + long w = window; + while (w != None) { + if (hasProperty(getDisplay(), w, xembed_atom)) + return true; + w = getParentWindow(getDisplay(), w); + } + } + return false; + } + + private static long getHandle(Canvas parent) throws LWJGLException { + AWTCanvasImplementation awt_impl = AWTGLCanvas.createImplementation(); + LinuxPeerInfo parent_peer_info = (LinuxPeerInfo)awt_impl.createPeerInfo(parent, null, null); + ByteBuffer parent_peer_info_handle = parent_peer_info.lockAndGetHandle(); + try { + return parent_peer_info.getDrawable(); + } finally { + parent_peer_info.unlock(); + } + } + + private void updateInputGrab() { + updatePointerGrab(); + updateKeyboardGrab(); + } + + public void destroyWindow() { + lockAWT(); + try { + if (parent != null) { + parent.removeFocusListener(focus_listener); + } + try { + setNativeCursor(null); + } catch (LWJGLException e) { + LWJGLUtil.log("Failed to reset cursor: " + e.getMessage()); + } + nDestroyCursor(getDisplay(), blank_cursor); + blank_cursor = None; + ungrabKeyboard(); + nDestroyWindow(getDisplay(), getWindow()); + decDisplay(); + + if ( current_window_mode != WINDOWED ) + Compiz.setLegacyFullscreenSupport(false); + } finally { + unlockAWT(); + } + } + static native void nDestroyWindow(long display, long window); + + public void switchDisplayMode(DisplayMode mode) throws LWJGLException { + lockAWT(); + try { + switchDisplayModeOnTmpDisplay(mode); + current_mode = mode; + } finally { + unlockAWT(); + } + } + + private void switchDisplayModeOnTmpDisplay(DisplayMode mode) throws LWJGLException { + incDisplay(); + try { + nSwitchDisplayMode(getDisplay(), getDefaultScreen(), current_displaymode_extension, mode); + } finally { + decDisplay(); + } + } + private static native void nSwitchDisplayMode(long display, int screen, int extension, DisplayMode mode) throws LWJGLException; + + private static long internAtom(String atom_name, boolean only_if_exists) throws LWJGLException { + incDisplay(); + try { + return nInternAtom(getDisplay(), atom_name, only_if_exists); + } finally { + decDisplay(); + } + } + static native long nInternAtom(long display, String atom_name, boolean only_if_exists); + + public void resetDisplayMode() { + lockAWT(); + try { + if( current_displaymode_extension == XRANDR && savedXrandrConfig.length > 0 ) + { + AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + XRandR.setConfiguration( savedXrandrConfig ); + return null; + } + }); + } + else + { + switchDisplayMode(saved_mode); + } + if (isXF86VidModeSupported()) + doSetGamma(saved_gamma); + + Compiz.setLegacyFullscreenSupport(false); + } catch (LWJGLException e) { + LWJGLUtil.log("Caught exception while resetting mode: " + e); + } finally { + unlockAWT(); + } + } + + public int getGammaRampLength() { + if (!isXF86VidModeSupported()) + return 0; + lockAWT(); + try { + try { + incDisplay(); + try { + return nGetGammaRampLength(getDisplay(), getDefaultScreen()); + } catch (LWJGLException e) { + LWJGLUtil.log("Got exception while querying gamma length: " + e); + return 0; + } finally { + decDisplay(); + } + } catch (LWJGLException e) { + LWJGLUtil.log("Failed to get gamma ramp length: " + e); + return 0; + } + } finally { + unlockAWT(); + } + } + private static native int nGetGammaRampLength(long display, int screen) throws LWJGLException; + + public void setGammaRamp(FloatBuffer gammaRamp) throws LWJGLException { + if (!isXF86VidModeSupported()) + throw new LWJGLException("No gamma ramp support (Missing XF86VM extension)"); + doSetGamma(convertToNativeRamp(gammaRamp)); + } + + private void doSetGamma(ByteBuffer native_gamma) throws LWJGLException { + lockAWT(); + try { + setGammaRampOnTmpDisplay(native_gamma); + current_gamma = native_gamma; + } finally { + unlockAWT(); + } + } + + private static void setGammaRampOnTmpDisplay(ByteBuffer native_gamma) throws LWJGLException { + incDisplay(); + try { + nSetGammaRamp(getDisplay(), getDefaultScreen(), native_gamma); + } finally { + decDisplay(); + } + } + private static native void nSetGammaRamp(long display, int screen, ByteBuffer gammaRamp) throws LWJGLException; + + private static ByteBuffer convertToNativeRamp(FloatBuffer ramp) throws LWJGLException { + return nConvertToNativeRamp(ramp, ramp.position(), ramp.remaining()); + } + private static native ByteBuffer nConvertToNativeRamp(FloatBuffer ramp, int offset, int length) throws LWJGLException; + + public String getAdapter() { + return null; + } + + public String getVersion() { + return null; + } + + public DisplayMode init() throws LWJGLException { + lockAWT(); + try { + Compiz.init(); + + delete_atom = internAtom("WM_DELETE_WINDOW", false); + current_displaymode_extension = getBestDisplayModeExtension(); + if (current_displaymode_extension == NONE) + throw new LWJGLException("No display mode extension is available"); + DisplayMode[] modes = getAvailableDisplayModes(); + if (modes == null || modes.length == 0) + throw new LWJGLException("No modes available"); + switch (current_displaymode_extension) { + case XRANDR: + savedXrandrConfig = AccessController.doPrivileged(new PrivilegedAction() { + public Screen[] run() { + return XRandR.getConfiguration(); + } + }); + saved_mode = getCurrentXRandrMode(); + break; + case XF86VIDMODE: + saved_mode = modes[0]; + break; + default: + throw new LWJGLException("Unknown display mode extension: " + current_displaymode_extension); + } + current_mode = saved_mode; + saved_gamma = getCurrentGammaRamp(); + current_gamma = saved_gamma; + return saved_mode; + } finally { + unlockAWT(); + } + } + + private static DisplayMode getCurrentXRandrMode() throws LWJGLException { + lockAWT(); + try { + incDisplay(); + try { + return nGetCurrentXRandrMode(getDisplay(), getDefaultScreen()); + } finally { + decDisplay(); + } + } finally { + unlockAWT(); + } + } + + /** Assumes extension == XRANDR */ + private static native DisplayMode nGetCurrentXRandrMode(long display, int screen) throws LWJGLException; + + public void setTitle(String title) { + lockAWT(); + try { + final ByteBuffer titleText = MemoryUtil.encodeUTF8(title); + nSetTitle(getDisplay(), getWindow(), MemoryUtil.getAddress(titleText), titleText.remaining() - 1); + } finally { + unlockAWT(); + } + + // also update the class hint value as some WM's use it for the window title + if (Display.isCreated()) setClassHint(title, wm_class); + } + private static native void nSetTitle(long display, long window, long title, int len); + + /** the WM_CLASS hint is needed by some WM's e.g. gnome shell */ + private void setClassHint(String wm_name, String wm_class) { + lockAWT(); + try { + final ByteBuffer nameText = MemoryUtil.encodeUTF8(wm_name); + final ByteBuffer classText = MemoryUtil.encodeUTF8(wm_class); + + nSetClassHint(getDisplay(), getWindow(), MemoryUtil.getAddress(nameText), MemoryUtil.getAddress(classText)); + } finally { + unlockAWT(); + } + } + private static native void nSetClassHint(long display, long window, long wm_name, long wm_class); + + public boolean isCloseRequested() { + boolean result = close_requested; + close_requested = false; + return result; + } + + public boolean isVisible() { + return !minimized; + } + + public boolean isActive() { + return focused || isLegacyFullscreen(); + } + + public boolean isDirty() { + boolean result = dirty; + dirty = false; + return result; + } + + public PeerInfo createPeerInfo(PixelFormat pixel_format, ContextAttribs attribs) throws LWJGLException { + peer_info = new LinuxDisplayPeerInfo(pixel_format); + return peer_info; + } + + private void relayEventToParent(LinuxEvent event_buffer, int event_mask) { + tmp_event_buffer.copyFrom(event_buffer); + tmp_event_buffer.setWindow(parent_window); + tmp_event_buffer.sendEvent(getDisplay(), parent_window, true, event_mask); + } + + private void relayEventToParent(LinuxEvent event_buffer) { + if (parent == null) + return; + switch (event_buffer.getType()) { + case LinuxEvent.KeyPress: + relayEventToParent(event_buffer, KeyPressMask); + break; + case LinuxEvent.KeyRelease: + relayEventToParent(event_buffer, KeyPressMask); + break; + case LinuxEvent.ButtonPress: + if (xembedded || !focused) relayEventToParent(event_buffer, KeyPressMask); + break; + case LinuxEvent.ButtonRelease: + if (xembedded || !focused) relayEventToParent(event_buffer, KeyPressMask); + break; + default: + break; + } + } + + private void processEvents() { + while (LinuxEvent.getPending(getDisplay()) > 0) { + event_buffer.nextEvent(getDisplay()); + long event_window = event_buffer.getWindow(); + relayEventToParent(event_buffer); + if (event_window != getWindow() || event_buffer.filterEvent(event_window) || + (mouse != null && mouse.filterEvent(grab, shouldWarpPointer(), event_buffer)) || + (keyboard != null && keyboard.filterEvent(event_buffer))) + continue; + switch (event_buffer.getType()) { + case LinuxEvent.FocusIn: + setFocused(true, event_buffer.getFocusDetail()); + break; + case LinuxEvent.FocusOut: + setFocused(false, event_buffer.getFocusDetail()); + break; + case LinuxEvent.ClientMessage: + if ((event_buffer.getClientFormat() == 32) && (event_buffer.getClientData(0) == delete_atom)) + close_requested = true; + break; + case LinuxEvent.MapNotify: + dirty = true; + minimized = false; + break; + case LinuxEvent.UnmapNotify: + dirty = true; + minimized = true; + break; + case LinuxEvent.Expose: + dirty = true; + break; + case LinuxEvent.ConfigureNotify: + int x = nGetX(getDisplay(), getWindow()); + int y = nGetY(getDisplay(), getWindow()); + + int width = nGetWidth(getDisplay(), getWindow()); + int height = nGetHeight(getDisplay(), getWindow()); + + window_x = x; + window_y = y; + + if (window_width != width || window_height != height) { + resized = true; + window_width = width; + window_height = height; + } + + break; + case LinuxEvent.EnterNotify: + mouseInside = true; + break; + case LinuxEvent.LeaveNotify: + mouseInside = false; + break; + default: + break; + } + } + } + + public void update() { + lockAWT(); + try { + processEvents(); + checkInput(); + } finally { + unlockAWT(); + } + } + + public void reshape(int x, int y, int width, int height) { + lockAWT(); + try { + nReshape(getDisplay(), getWindow(), x, y, width, height); + } finally { + unlockAWT(); + } + } + private static native void nReshape(long display, long window, int x, int y, int width, int height); + + public DisplayMode[] getAvailableDisplayModes() throws LWJGLException { + lockAWT(); + try { + incDisplay(); + try { + DisplayMode[] modes = nGetAvailableDisplayModes(getDisplay(), getDefaultScreen(), current_displaymode_extension); + return modes; + } finally { + decDisplay(); + } + } finally { + unlockAWT(); + } + } + private static native DisplayMode[] nGetAvailableDisplayModes(long display, int screen, int extension) throws LWJGLException; + + /* Mouse */ + public boolean hasWheel() { + return true; + } + + public int getButtonCount() { + return mouse.getButtonCount(); + } + + public void createMouse() throws LWJGLException { + lockAWT(); + try { + mouse = new LinuxMouse(getDisplay(), getWindow(), getWindow()); + } finally { + unlockAWT(); + } + } + + public void destroyMouse() { + mouse = null; + updateInputGrab(); + } + + public void pollMouse(IntBuffer coord_buffer, ByteBuffer buttons) { + lockAWT(); + try { + mouse.poll(grab, coord_buffer, buttons); + } finally { + unlockAWT(); + } + } + + public void readMouse(ByteBuffer buffer) { + lockAWT(); + try { + mouse.read(buffer); + } finally { + unlockAWT(); + } + } + + public void setCursorPosition(int x, int y) { + lockAWT(); + try { + mouse.setCursorPosition(x, y); + } finally { + unlockAWT(); + } + } + + private void checkInput() { + if (parent == null) return; + + if (xembedded) { + long current_focus_window = 0; + + if (last_window_focus != current_focus_window || parent_focused != focused) { + if (isParentWindowActive(current_focus_window)) { + if (parent_focused) { + nSetInputFocus(getDisplay(), current_window, CurrentTime); + last_window_focus = current_window; + focused = true; + } + else { + // return focus to the parent proxy focus window + nSetInputFocus(getDisplay(), parent_proxy_focus_window, CurrentTime); + last_window_focus = parent_proxy_focus_window; + focused = false; + } + } + else { + last_window_focus = current_focus_window; + focused = false; + } + } + } + else { + if (parent_focus_changed && parent_focused) { + setInputFocusUnsafe(getWindow()); + parent_focus_changed = false; + } + } + } + + private void setInputFocusUnsafe(long window) { + try { + nSetInputFocus(getDisplay(), window, CurrentTime); + nSync(getDisplay(), false); + } catch (LWJGLException e) { + // Since we don't have any event timings for XSetInputFocus, a race condition might give a BadMatch, which we'll catch and ignore + LWJGLUtil.log("Got exception while trying to focus: " + e); + } + } + + private static native void nSync(long display, boolean throw_away_events) throws LWJGLException; + + /** + * This method will check if the parent window is active when running + * in xembed mode. Every xembed embedder window has a focus proxy + * window that recieves all the input. This method will test whether + * the provided window handle is the focus proxy, if so it will get its + * parent window and then test whether this is an ancestor to our + * current_window. If so then parent window is active. + * + * @param window - the window handle to test + */ + private boolean isParentWindowActive(long window) { + try { + // parent window already active as window is current_window + if (window == current_window) return true; + + // xembed focus proxy will have no children + if (getChildCount(getDisplay(), window) != 0) return false; + + // get parent, will be xembed embedder window and ancestor of current_window + long parent_window = getParentWindow(getDisplay(), window); + + // parent must not be None + if (parent_window == None) return false; + + // scroll current_window's ancestors to find parent_window + long w = current_window; + + while (w != None) { + w = getParentWindow(getDisplay(), w); + if (w == parent_window) { + parent_proxy_focus_window = window; // save focus proxy window + return true; + } + } + } catch (LWJGLException e) { + LWJGLUtil.log("Failed to detect if parent window is active: " + e.getMessage()); + return true; // on failure assume still active + } + + return false; // failed to find an active parent window + } + + private void setFocused(boolean got_focus, int focus_detail) { + if (focused == got_focus || focus_detail == NotifyDetailNone || focus_detail == NotifyPointer || focus_detail == NotifyPointerRoot || xembedded) + return; + focused = got_focus; + + if (focused) { + acquireInput(); + } + else { + releaseInput(); + } + } + + private void releaseInput() { + if (isLegacyFullscreen() || input_released) + return; + input_released = true; + updateInputGrab(); + if (current_window_mode == FULLSCREEN_NETWM) { + nIconifyWindow(getDisplay(), getWindow(), getDefaultScreen()); + try { + if( current_displaymode_extension == XRANDR && savedXrandrConfig.length > 0 ) + { + AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + XRandR.setConfiguration( savedXrandrConfig ); + return null; + } + }); + } + else + { + switchDisplayModeOnTmpDisplay(saved_mode); + } + setGammaRampOnTmpDisplay(saved_gamma); + } catch (LWJGLException e) { + LWJGLUtil.log("Failed to restore saved mode: " + e.getMessage()); + } + } + } + private static native void nIconifyWindow(long display, long window, int screen); + + private void acquireInput() { + if (isLegacyFullscreen() || !input_released) + return; + input_released = false; + updateInputGrab(); + if (current_window_mode == FULLSCREEN_NETWM) { + try { + switchDisplayModeOnTmpDisplay(current_mode); + setGammaRampOnTmpDisplay(current_gamma); + } catch (LWJGLException e) { + LWJGLUtil.log("Failed to restore mode: " + e.getMessage()); + } + } + } + + public void grabMouse(boolean new_grab) { + lockAWT(); + try { + if (new_grab != grab) { + grab = new_grab; + updateInputGrab(); + mouse.changeGrabbed(grab, shouldWarpPointer()); + } + } finally { + unlockAWT(); + } + } + + private boolean shouldWarpPointer() { + return pointer_grabbed && shouldGrab(); + } + + public int getNativeCursorCapabilities() { + lockAWT(); + try { + incDisplay(); + try { + return nGetNativeCursorCapabilities(getDisplay()); + } finally { + decDisplay(); + } + } catch (LWJGLException e) { + throw new RuntimeException(e); + } finally { + unlockAWT(); + } + } + private static native int nGetNativeCursorCapabilities(long display) throws LWJGLException; + + public void setNativeCursor(Object handle) throws LWJGLException { + current_cursor = getCursorHandle(handle); + lockAWT(); + try { + updateCursor(); + } finally { + unlockAWT(); + } + } + + public int getMinCursorSize() { + lockAWT(); + try { + incDisplay(); + try { + return nGetMinCursorSize(getDisplay(), getWindow()); + } finally { + decDisplay(); + } + } catch (LWJGLException e) { + LWJGLUtil.log("Exception occurred in getMinCursorSize: " + e); + return 0; + } finally { + unlockAWT(); + } + } + private static native int nGetMinCursorSize(long display, long window); + + public int getMaxCursorSize() { + lockAWT(); + try { + incDisplay(); + try { + return nGetMaxCursorSize(getDisplay(), getWindow()); + } finally { + decDisplay(); + } + } catch (LWJGLException e) { + LWJGLUtil.log("Exception occurred in getMaxCursorSize: " + e); + return 0; + } finally { + unlockAWT(); + } + } + private static native int nGetMaxCursorSize(long display, long window); + + /* Keyboard */ + public void createKeyboard() throws LWJGLException { + lockAWT(); + try { + keyboard = new LinuxKeyboard(getDisplay(), getWindow()); + } finally { + unlockAWT(); + } + } + + public void destroyKeyboard() { + lockAWT(); + try { + keyboard.destroy(getDisplay()); + keyboard = null; + } finally { + unlockAWT(); + } + } + + public void pollKeyboard(ByteBuffer keyDownBuffer) { + lockAWT(); + try { + keyboard.poll(keyDownBuffer); + } finally { + unlockAWT(); + } + } + + public void readKeyboard(ByteBuffer buffer) { + lockAWT(); + try { + keyboard.read(buffer); + } finally { + unlockAWT(); + } + } + + private static native long nCreateCursor(long display, int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, int images_offset, IntBuffer delays, int delays_offset) throws LWJGLException; + + private static long createBlankCursor() { + return nCreateBlankCursor(getDisplay(), getWindow()); + } + static native long nCreateBlankCursor(long display, long window); + + public Object createCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLException { + lockAWT(); + try { + incDisplay(); + try { + long cursor = nCreateCursor(getDisplay(), width, height, xHotspot, yHotspot, numImages, images, images.position(), delays, delays != null ? delays.position() : -1); + return cursor; + } catch (LWJGLException e) { + decDisplay(); + throw e; + } + } finally { + unlockAWT(); + } + } + + private static long getCursorHandle(Object cursor_handle) { + return cursor_handle != null ? (Long)cursor_handle : None; + } + + public void destroyCursor(Object cursorHandle) { + lockAWT(); + try { + nDestroyCursor(getDisplay(), getCursorHandle(cursorHandle)); + decDisplay(); + } finally { + unlockAWT(); + } + } + static native void nDestroyCursor(long display, long cursorHandle); + + public int getPbufferCapabilities() { + lockAWT(); + try { + incDisplay(); + try { + return nGetPbufferCapabilities(getDisplay(), getDefaultScreen()); + } finally { + decDisplay(); + } + } catch (LWJGLException e) { + LWJGLUtil.log("Exception occurred in getPbufferCapabilities: " + e); + return 0; + } finally { + unlockAWT(); + } + } + private static native int nGetPbufferCapabilities(long display, int screen); + + public boolean isBufferLost(PeerInfo handle) { + return false; + } + + public PeerInfo createPbuffer(int width, int height, PixelFormat pixel_format, ContextAttribs attribs, + IntBuffer pixelFormatCaps, + IntBuffer pBufferAttribs) throws LWJGLException { + return new LinuxPbufferPeerInfo(width, height, pixel_format); + } + + public void setPbufferAttrib(PeerInfo handle, int attrib, int value) { + throw new UnsupportedOperationException(); + } + + public void bindTexImageToPbuffer(PeerInfo handle, int buffer) { + throw new UnsupportedOperationException(); + } + + public void releaseTexImageFromPbuffer(PeerInfo handle, int buffer) { + throw new UnsupportedOperationException(); + } + + /** + * This method will convert icon bytebuffers into a single bytebuffer + * as the icon format required by _NET_WM_ICON should be in a cardinal + * 32 bit ARGB format i.e. all icons in a single buffer the data starting + * with 32 bit width & height followed by the color data as 32bit ARGB. + * + * @param icons Array of icons in RGBA format + */ + private static ByteBuffer convertIcons(ByteBuffer[] icons) { + + int bufferSize = 0; + + // calculate size of bytebuffer + for ( ByteBuffer icon : icons ) { + int size = icon.limit() / 4; + int dimension = (int)Math.sqrt(size); + if ( dimension > 0 ) { + bufferSize += 2 * 4; // add 32 bit width & height, 4 bytes each + bufferSize += dimension * dimension * 4; + } + } + + if (bufferSize == 0) return null; + + ByteBuffer icon_argb = BufferUtils.createByteBuffer(bufferSize);//icon.capacity()+(2*4)); + icon_argb.order(ByteOrder.BIG_ENDIAN); + + for ( ByteBuffer icon : icons ) { + int size = icon.limit() / 4; + int dimension = (int)Math.sqrt(size); + + icon_argb.putInt(dimension); // width + icon_argb.putInt(dimension); // height + + for (int y = 0; y < dimension; y++) { + for (int x = 0; x < dimension; x++) { + + byte r = icon.get((x*4)+(y*dimension*4)); + byte g = icon.get((x*4)+(y*dimension*4)+1); + byte b = icon.get((x*4)+(y*dimension*4)+2); + byte a = icon.get((x*4)+(y*dimension*4)+3); + + icon_argb.put(a); + icon_argb.put(r); + icon_argb.put(g); + icon_argb.put(b); + } + } + } + + return icon_argb; + } + + /** + * Sets one or more icons for the Display. + *
    + *
  • On Windows you should supply at least one 16x16 icon and one 32x32.
  • + *
  • Linux (and similar platforms) expect one 32x32 icon.
  • + *
  • Mac OS X should be supplied one 128x128 icon
  • + *
+ * The implementation will use the supplied ByteBuffers with image data in RGBA and perform any conversions necessary for the specific platform. + * + * @param icons Array of icons in RGBA mode + * @return number of icons used. + */ + public int setIcon(ByteBuffer[] icons) { + lockAWT(); + try { + incDisplay(); + try { + // get icons as cardinal ARGB format + ByteBuffer icons_data = convertIcons(icons); + if (icons_data == null) return 0; + nSetWindowIcon(getDisplay(), getWindow(), icons_data, icons_data.capacity());//, icon_mask, icon_mask.capacity(), dimension, dimension); + return icons.length; + } finally { + decDisplay(); + } + } catch (LWJGLException e) { + LWJGLUtil.log("Failed to set display icon: " + e); + return 0; + } finally { + unlockAWT(); + } + } + + private static native void nSetWindowIcon(long display, long window, ByteBuffer icons_data, int icons_size); + + public int getX() { + return window_x; + } + + public int getY() { + return window_y; + } + + public int getWidth() { + return window_width; + } + + public int getHeight() { + return window_height; + } + + public boolean isInsideWindow() { + return mouseInside; + } + + public void setResizable(boolean resizable) { + if (this.resizable == resizable) { + return; + } + + this.resizable = resizable; + nSetWindowSize(getDisplay(), getWindow(), window_width, window_height, resizable); + } + + public boolean wasResized() { + if (resized) { + resized = false; + return true; + } + + return false; + } + + public float getPixelScaleFactor() { + return 1f; + } + + /** + * Helper class for managing Compiz's workarounds. We need this to enable Legacy + * Fullscreen Support in Compiz, else we'll have trouble with fullscreen windows + * when Compiz effects are enabled. + * + * Implementation Note: This code is probably too much for an inner class, but + * keeping it here until we're sure we cannot find a better solution. + */ + private static final class Compiz { + + private static boolean applyFix; + + private static Provider provider; + + private Compiz() { + } + + static void init() { + if ( Display.getPrivilegedBoolean("org.lwjgl.opengl.Window.nocompiz_lfs") ) + return; + + AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + try { + // Check if Compiz is active + if ( !isProcessActive("compiz") ) + return null; + + provider = null; + + String providerName = null; + + // Check if Dbus is available + if ( isProcessActive("dbus-daemon") ) { + providerName = "Dbus"; + provider = new Provider() { + + private static final String KEY = "/org/freedesktop/compiz/workarounds/allscreens/legacy_fullscreen"; + + public boolean hasLegacyFullscreenSupport() throws LWJGLException { + final List output = Compiz.run( + "dbus-send", "--print-reply", "--type=method_call", "--dest=org.freedesktop.compiz", KEY, "org.freedesktop.compiz.get" + ); + + if ( output == null || output.size() < 2 ) + throw new LWJGLException("Invalid Dbus reply."); + + String line = (String)output.get(0); + + if ( !line.startsWith("method return") ) + throw new LWJGLException("Invalid Dbus reply."); + + line = ((String)output.get(1)).trim(); // value + if ( !line.startsWith("boolean") || line.length() < 12) + throw new LWJGLException("Invalid Dbus reply."); + + return "true".equalsIgnoreCase(line.substring("boolean".length() + 1)); + } + + public void setLegacyFullscreenSupport(final boolean state) throws LWJGLException { + if ( Compiz.run( + "dbus-send", "--type=method_call", "--dest=org.freedesktop.compiz", KEY, "org.freedesktop.compiz.set", "boolean:" + Boolean.toString(state) + ) == null ) + throw new LWJGLException("Failed to apply Compiz LFS workaround."); + } + }; + } else { + try { + // Check if Gconf is available + Runtime.getRuntime().exec("gconftool"); + + providerName = "gconftool"; + provider = new Provider() { + + private static final String KEY = "/apps/compiz/plugins/workarounds/allscreens/options/legacy_fullscreen"; + + public boolean hasLegacyFullscreenSupport() throws LWJGLException { + final List output = Compiz.run(new String[] { + "gconftool", "-g", KEY + }); + + if ( output == null || output.size() == 0 ) + throw new LWJGLException("Invalid gconftool reply."); + + return Boolean.parseBoolean(((String)output.get(0)).trim()); + } + + public void setLegacyFullscreenSupport(final boolean state) throws LWJGLException { + if ( Compiz.run(new String[] { + "gconftool", "-s", KEY, "-s", Boolean.toString(state), "-t", "bool" + }) == null ) + throw new LWJGLException("Failed to apply Compiz LFS workaround."); + + if ( state ) { + try { + // gconftool will not apply the workaround immediately, sleep a bit + // to make sure it will be ok when we create the window. + Thread.sleep(200); // 100 is too low, 150 works, set to 200 to be safe. + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + } + }; + } catch (IOException e) { + // Ignore + } + } + + if ( provider != null && !provider.hasLegacyFullscreenSupport() ) { // No need to do anything if LFS is already enabled. + applyFix = true; + LWJGLUtil.log("Using " + providerName + " to apply Compiz LFS workaround."); + } + } catch (LWJGLException e) { + // Ignore + } finally { + return null; + } + } + }); + } + + static void setLegacyFullscreenSupport(final boolean enabled) { + if ( !applyFix ) + return; + + AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + try { + provider.setLegacyFullscreenSupport(enabled); + } catch (LWJGLException e) { + LWJGLUtil.log("Failed to change Compiz Legacy Fullscreen Support. Reason: " + e.getMessage()); + } + return null; + } + }); + } + + private static List run(final String... command) throws LWJGLException { + final List output = new ArrayList(); + + try { + final Process p = Runtime.getRuntime().exec(command); + try { + final int exitValue = p.waitFor(); + if ( exitValue != 0 ) + return null; + } catch (InterruptedException e) { + throw new LWJGLException("Process interrupted.", e); + } + + final BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream())); + + String line; + while ( (line = br.readLine()) != null ) + output.add(line); + + br.close(); + } catch (final IOException e) { + throw new LWJGLException("Process failed.", e); + } + + return output; + } + + private static boolean isProcessActive(final String processName) throws LWJGLException { + final List output = run(new String[] { "ps", "-C", processName }); + if ( output == null ) + return false; + + for ( final String line : output ) { + if ( line.contains(processName) ) + return true; + } + + return false; + } + + private interface Provider { + + boolean hasLegacyFullscreenSupport() throws LWJGLException; + + void setLegacyFullscreenSupport(boolean state) throws LWJGLException; + + } + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxDisplayPeerInfo.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxDisplayPeerInfo.java new file mode 100644 index 0000000..d304064 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxDisplayPeerInfo.java @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import java.nio.ByteBuffer; + +import org.lwjgl.LWJGLException; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +final class LinuxDisplayPeerInfo extends LinuxPeerInfo { + + final boolean egl; + + LinuxDisplayPeerInfo() throws LWJGLException { + egl = true; + org.lwjgl.opengles.GLContext.loadOpenGLLibrary(); + } + + LinuxDisplayPeerInfo(PixelFormat pixel_format) throws LWJGLException { + egl = false; + LinuxDisplay.lockAWT(); + try { + GLContext.loadOpenGLLibrary(); + try { + LinuxDisplay.incDisplay(); + try { + initDefaultPeerInfo(LinuxDisplay.getDisplay(), LinuxDisplay.getDefaultScreen(), getHandle(), pixel_format); + } catch (LWJGLException e) { + LinuxDisplay.decDisplay(); + throw e; + } + } catch (LWJGLException e) { + GLContext.unloadOpenGLLibrary(); + throw e; + } + } finally { + LinuxDisplay.unlockAWT(); + } + } + private static native void initDefaultPeerInfo(long display, int screen, ByteBuffer peer_info_handle, PixelFormat pixel_format) throws LWJGLException; + + protected void doLockAndInitHandle() throws LWJGLException { + LinuxDisplay.lockAWT(); + try { + initDrawable(LinuxDisplay.getWindow(), getHandle()); + } finally { + LinuxDisplay.unlockAWT(); + } + } + private static native void initDrawable(long window, ByteBuffer peer_info_handle); + + protected void doUnlock() throws LWJGLException { + // NO-OP + } + + public void destroy() { + super.destroy(); + + if ( egl ) + org.lwjgl.opengles.GLContext.unloadOpenGLLibrary(); + else { + LinuxDisplay.lockAWT(); + LinuxDisplay.decDisplay(); + GLContext.unloadOpenGLLibrary(); + LinuxDisplay.unlockAWT(); + } + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxEvent.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxEvent.java new file mode 100644 index 0000000..15dd527 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxEvent.java @@ -0,0 +1,208 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import java.nio.ByteBuffer; + +/** + * Wrapper class for X11 events. + * + * @author elias_naur + * @version $Revision: 2286 $ + * $Id: LinuxPeerInfo.java 2286 2006-03-23 19:32:21Z matzon $ + */ +final class LinuxEvent { + public static final int FocusIn = 9; + public static final int FocusOut = 10; + public static final int KeyPress = 2; + public static final int KeyRelease = 3; + public static final int ButtonPress = 4; + public static final int ButtonRelease = 5; + public static final int MotionNotify = 6; + public static final int EnterNotify = 7; + public static final int LeaveNotify = 8; + public static final int UnmapNotify = 18; + public static final int MapNotify = 19; + public static final int Expose = 12; + public static final int ConfigureNotify = 22; + public static final int ClientMessage = 33; + + private final ByteBuffer event_buffer; + + LinuxEvent() { + this.event_buffer = createEventBuffer(); + } + private static native ByteBuffer createEventBuffer(); + + public void copyFrom(LinuxEvent event) { + int pos = event_buffer.position(); + int event_pos = event.event_buffer.position(); + event_buffer.put(event.event_buffer); + event_buffer.position(pos); + event.event_buffer.position(event_pos); + } + + public static native int getPending(long display); + + public void sendEvent(long display, long window, boolean propagate, long event_mask) { + nSendEvent(event_buffer, display, window, propagate, event_mask); + } + private static native void nSendEvent(ByteBuffer event_buffer, long display, long window, boolean propagate, long event_mask); + + public boolean filterEvent(long window) { + return nFilterEvent(event_buffer, window); + } + private static native boolean nFilterEvent(ByteBuffer event_buffer, long window); + + public void nextEvent(long display) { + nNextEvent(display, event_buffer); + } + private static native void nNextEvent(long display, ByteBuffer event_buffer); + + public int getType() { + return nGetType(event_buffer); + } + private static native int nGetType(ByteBuffer event_buffer); + + public long getWindow() { + return nGetWindow(event_buffer); + } + private static native long nGetWindow(ByteBuffer event_buffer); + + public void setWindow(long window) { + nSetWindow(event_buffer, window); + } + private static native void nSetWindow(ByteBuffer event_buffer, long window); + + /* Focus methods */ + + public int getFocusMode() { + return nGetFocusMode(event_buffer); + } + private static native int nGetFocusMode(ByteBuffer event_buffer); + + public int getFocusDetail() { + return nGetFocusDetail(event_buffer); + } + private static native int nGetFocusDetail(ByteBuffer event_buffer); + + /* ClientMessage methods */ + + public long getClientMessageType() { + return nGetClientMessageType(event_buffer); + } + private static native long nGetClientMessageType(ByteBuffer event_buffer); + + public int getClientData(int index) { + return nGetClientData(event_buffer, index); + } + private static native int nGetClientData(ByteBuffer event_buffer, int index); + + public int getClientFormat() { + return nGetClientFormat(event_buffer); + } + private static native int nGetClientFormat(ByteBuffer event_buffer); + + /* Button methods */ + + public long getButtonTime() { + return nGetButtonTime(event_buffer); + } + private static native long nGetButtonTime(ByteBuffer event_buffer); + + public int getButtonState() { + return nGetButtonState(event_buffer); + } + private static native int nGetButtonState(ByteBuffer event_buffer); + + public int getButtonType() { + return nGetButtonType(event_buffer); + } + private static native int nGetButtonType(ByteBuffer event_buffer); + + public int getButtonButton() { + return nGetButtonButton(event_buffer); + } + private static native int nGetButtonButton(ByteBuffer event_buffer); + + public long getButtonRoot() { + return nGetButtonRoot(event_buffer); + } + private static native long nGetButtonRoot(ByteBuffer event_buffer); + + public int getButtonXRoot() { + return nGetButtonXRoot(event_buffer); + } + private static native int nGetButtonXRoot(ByteBuffer event_buffer); + + public int getButtonYRoot() { + return nGetButtonYRoot(event_buffer); + } + private static native int nGetButtonYRoot(ByteBuffer event_buffer); + + public int getButtonX() { + return nGetButtonX(event_buffer); + } + private static native int nGetButtonX(ByteBuffer event_buffer); + + public int getButtonY() { + return nGetButtonY(event_buffer); + } + private static native int nGetButtonY(ByteBuffer event_buffer); + + /* Key methods */ + + public long getKeyAddress() { + return nGetKeyAddress(event_buffer); + } + private static native long nGetKeyAddress(ByteBuffer event_buffer); + + public long getKeyTime() { + return nGetKeyTime(event_buffer); + } + private static native int nGetKeyTime(ByteBuffer event_buffer); + + public int getKeyType() { + return nGetKeyType(event_buffer); + } + private static native int nGetKeyType(ByteBuffer event_buffer); + + public int getKeyKeyCode() { + return nGetKeyKeyCode(event_buffer); + } + private static native int nGetKeyKeyCode(ByteBuffer event_buffer); + + public int getKeyState() { + return nGetKeyState(event_buffer); + } + private static native int nGetKeyState(ByteBuffer event_buffer); +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxKeyboard.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxKeyboard.java new file mode 100644 index 0000000..2777671 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxKeyboard.java @@ -0,0 +1,353 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + * @author elias_naur + */ + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLUtil; +import org.lwjgl.input.Keyboard; + +final class LinuxKeyboard { + private static final int LockMapIndex = 1; + private static final long NoSymbol = 0; + private static final long ShiftMask = 1 << 0; + private static final long LockMask = 1 << 1; + private static final int XLookupChars = 2; + private static final int XLookupBoth = 4; + + private static final int KEYBOARD_BUFFER_SIZE = 50; + + private final long xim; + private final long xic; + + private final int numlock_mask; + private final int modeswitch_mask; + private final int caps_lock_mask; + private final int shift_lock_mask; + + private final ByteBuffer compose_status; + + private final byte[] key_down_buffer = new byte[Keyboard.KEYBOARD_SIZE]; + private final EventQueue event_queue = new EventQueue(Keyboard.EVENT_SIZE); + + private final ByteBuffer tmp_event = ByteBuffer.allocate(Keyboard.EVENT_SIZE); + private final int[] temp_translation_buffer = new int[KEYBOARD_BUFFER_SIZE]; + private final ByteBuffer native_translation_buffer = BufferUtils.createByteBuffer(KEYBOARD_BUFFER_SIZE); + private final CharsetDecoder utf8_decoder = Charset.forName("UTF-8").newDecoder(); + private final CharBuffer char_buffer = CharBuffer.allocate(KEYBOARD_BUFFER_SIZE); + + // Deferred key released event, to detect key repeat + private boolean has_deferred_event; + private int deferred_keycode; + private int deferred_event_keycode; + private long deferred_nanos; + private byte deferred_key_state; + + LinuxKeyboard(long display, long window) { + long modifier_map = getModifierMapping(display); + int tmp_numlock_mask = 0; + int tmp_modeswitch_mask = 0; + int tmp_caps_lock_mask = 0; + int tmp_shift_lock_mask = 0; + if (modifier_map != 0) { + int max_keypermod = getMaxKeyPerMod(modifier_map); + // Find modifier masks + int i, j; + for (i = 0; i < 8; i++) { + for (j = 0; j < max_keypermod; j++) { + int key_code = lookupModifierMap(modifier_map, i*max_keypermod + j); + int key_sym = (int)keycodeToKeySym(display, key_code); + int mask = 1 << i; + switch (key_sym) { + case LinuxKeycodes.XK_Num_Lock: + tmp_numlock_mask |= mask; + break; + case LinuxKeycodes.XK_Mode_switch: + tmp_modeswitch_mask |= mask; + break; + case LinuxKeycodes.XK_Caps_Lock: + if (i == LockMapIndex) { + tmp_caps_lock_mask = mask; + tmp_shift_lock_mask = 0; + } + break; + case LinuxKeycodes.XK_Shift_Lock: + if (i == LockMapIndex && tmp_caps_lock_mask == 0) + tmp_shift_lock_mask = mask; + break; + default: + break; + } + } + } + freeModifierMapping(modifier_map); + } + numlock_mask = tmp_numlock_mask; + modeswitch_mask = tmp_modeswitch_mask; + caps_lock_mask = tmp_caps_lock_mask; + shift_lock_mask = tmp_shift_lock_mask; + setDetectableKeyRepeat(display, true); + xim = openIM(display); + if (xim != 0) { + xic = createIC(xim, window); + if (xic != 0) { + setupIMEventMask(display, window, xic); + } else { + destroy(display); + } + } else { + xic = 0; + } + compose_status = allocateComposeStatus(); + } + private static native long getModifierMapping(long display); + private static native void freeModifierMapping(long modifier_map); + private static native int getMaxKeyPerMod(long modifier_map); + private static native int lookupModifierMap(long modifier_map, int index); + private static native long keycodeToKeySym(long display, int key_code); + + private static native long openIM(long display); + private static native long createIC(long xim, long window); + private static native void setupIMEventMask(long display, long window, long xic); + private static native ByteBuffer allocateComposeStatus(); + + private static void setDetectableKeyRepeat(long display, boolean enabled) { + boolean success = nSetDetectableKeyRepeat(display, enabled); + if (!success) + LWJGLUtil.log("Failed to set detectable key repeat to " + enabled); + } + private static native boolean nSetDetectableKeyRepeat(long display, boolean enabled); + + public void destroy(long display) { + if (xic != 0) + destroyIC(xic); + if (xim != 0) + closeIM(xim); + setDetectableKeyRepeat(display, false); + } + private static native void destroyIC(long xic); + private static native void closeIM(long xim); + + public void read(ByteBuffer buffer) { + flushDeferredEvent(); + event_queue.copyEvents(buffer); + } + + public void poll(ByteBuffer keyDownBuffer) { + flushDeferredEvent(); + int old_position = keyDownBuffer.position(); + keyDownBuffer.put(key_down_buffer); + keyDownBuffer.position(old_position); + } + + private void putKeyboardEvent(int keycode, byte state, int ch, long nanos, boolean repeat) { + tmp_event.clear(); + tmp_event.putInt(keycode).put(state).putInt(ch).putLong(nanos).put(repeat ? (byte)1 : (byte)0); + tmp_event.flip(); + event_queue.putEvent(tmp_event); + } + + private int lookupStringISO88591(long event_ptr, int[] translation_buffer) { + int i; + + int num_chars = lookupString(event_ptr, native_translation_buffer, compose_status); + for (i = 0; i < num_chars; i++) { + translation_buffer[i] = ((int)native_translation_buffer.get(i)) & 0xff; + } + return num_chars; + } + private static native int lookupString(long event_ptr, ByteBuffer buffer, ByteBuffer compose_status); + + private int lookupStringUnicode(long event_ptr, int[] translation_buffer) { + int status = utf8LookupString(xic, event_ptr, native_translation_buffer, native_translation_buffer.position(), native_translation_buffer.remaining()); + if (status != XLookupChars && status != XLookupBoth) + return 0; + native_translation_buffer.flip(); + utf8_decoder.decode(native_translation_buffer, char_buffer, true); + native_translation_buffer.compact(); + char_buffer.flip(); + int i = 0; + while (char_buffer.hasRemaining() && i < translation_buffer.length) { + translation_buffer[i++] = char_buffer.get(); + } + char_buffer.compact(); + return i; + } + private static native int utf8LookupString(long xic, long event_ptr, ByteBuffer buffer, int pos, int size); + + private int lookupString(long event_ptr, int[] translation_buffer) { + if (xic != 0) { + return lookupStringUnicode(event_ptr, translation_buffer); + } else + return lookupStringISO88591(event_ptr, translation_buffer); + } + + private void translateEvent(long event_ptr, int keycode, byte key_state, long nanos, boolean repeat) { + int num_chars, i; + int ch; + + num_chars = lookupString(event_ptr, temp_translation_buffer); + if (num_chars > 0) { + ch = temp_translation_buffer[0]; + putKeyboardEvent(keycode, key_state, ch, nanos, repeat); + for (i = 1; i < num_chars; i++) { + ch = temp_translation_buffer[i]; + putKeyboardEvent(0, (byte)0, ch, nanos, repeat); + } + } else { + putKeyboardEvent(keycode, key_state, 0, nanos, repeat); + } + } + + private static boolean isKeypadKeysym(long keysym) { + return (0xFF80 <= keysym && keysym <= 0xFFBD) || + (0x11000000 <= keysym && keysym <= 0x1100FFFF); + } + + private static boolean isNoSymbolOrVendorSpecific(long keysym) { + return keysym == NoSymbol || (keysym & (1 << 28)) != 0; + } + + private static long getKeySym(long event_ptr, int group, int index) { + long keysym = lookupKeysym(event_ptr, group*2 + index); + if (isNoSymbolOrVendorSpecific(keysym) && index == 1) { + keysym = lookupKeysym(event_ptr, group*2 + 0); + } + if (isNoSymbolOrVendorSpecific(keysym) && group == 1) + keysym = getKeySym(event_ptr, 0, index); + return keysym; + } + private static native long lookupKeysym(long event_ptr, int index); + private static native long toUpper(long keysym); + + private long mapEventToKeySym(long event_ptr, int event_state) { + int group; + long keysym; + if ((event_state & modeswitch_mask) != 0) + group = 1; + else + group = 0; + if ((event_state & numlock_mask) != 0 && isKeypadKeysym(keysym = getKeySym(event_ptr, group, 1))) { + if ((event_state & (ShiftMask | shift_lock_mask)) != 0) { + return getKeySym(event_ptr, group, 0); + } else { + return keysym; + } + } else if ((event_state & (ShiftMask | LockMask)) == 0) { + return getKeySym(event_ptr, group, 0); + } else if ((event_state & ShiftMask) == 0) { + keysym = getKeySym(event_ptr, group, 0); + if ((event_state & caps_lock_mask) != 0) + keysym = toUpper(keysym); + return keysym; + } else { + keysym = getKeySym(event_ptr, group, 1); + if ((event_state & caps_lock_mask) != 0) + keysym = toUpper(keysym); + return keysym; + } + } + + private int getKeycode(long event_ptr, int event_state) { + long keysym = mapEventToKeySym(event_ptr, event_state); + int keycode = LinuxKeycodes.mapKeySymToLWJGLKeyCode(keysym); + if (keycode == Keyboard.KEY_NONE) { + // Try unshifted keysym mapping + keysym = lookupKeysym(event_ptr, 0); + keycode = LinuxKeycodes.mapKeySymToLWJGLKeyCode(keysym); + } + return keycode; + } + + private byte getKeyState(int event_type) { + switch (event_type) { + case LinuxEvent.KeyPress: + return 1; + case LinuxEvent.KeyRelease: + return 0; + default: + throw new IllegalArgumentException("Unknown event_type: " + event_type); + } + } + + private void handleKeyEvent(long event_ptr, long millis, int event_type, int event_keycode, int event_state) { + int keycode = getKeycode(event_ptr, event_state); + byte key_state = getKeyState(event_type); + boolean repeat = key_state == key_down_buffer[keycode]; + key_down_buffer[keycode] = key_state; + long nanos = millis*1000000; + if (event_type == LinuxEvent.KeyPress) { + if (has_deferred_event) { + if (nanos == deferred_nanos && event_keycode == deferred_event_keycode) { + has_deferred_event = false; + repeat = true; // Repeated event + } else + flushDeferredEvent(); + } + translateEvent(event_ptr, keycode, key_state, nanos, repeat); + } else { + flushDeferredEvent(); + has_deferred_event = true; + deferred_keycode = keycode; + deferred_event_keycode = event_keycode; + deferred_nanos = nanos; + deferred_key_state = key_state; + } + } + + private void flushDeferredEvent() { + if (has_deferred_event) { + putKeyboardEvent(deferred_keycode, deferred_key_state, 0, deferred_nanos, false); + has_deferred_event = false; + } + } + + public boolean filterEvent(LinuxEvent event) { + switch (event.getType()) { + case LinuxEvent.KeyPress: /* Fall through */ + case LinuxEvent.KeyRelease: + handleKeyEvent(event.getKeyAddress(), event.getKeyTime(), event.getKeyType(), event.getKeyKeyCode(), event.getKeyState()); + return true; + default: + break; + } + return false; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxKeycodes.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxKeycodes.java new file mode 100644 index 0000000..99c49e4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxKeycodes.java @@ -0,0 +1,763 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + * @author elias_naur + */ + +import org.lwjgl.input.Keyboard; + +final class LinuxKeycodes { + public static final int XK_Kanji = 0xff21; + + public static final int XK_ISO_Left_Tab = 0xfe20; + + public static final int XK_dead_grave = 0xfe50; + public static final int XK_dead_acute = 0xfe51; + public static final int XK_dead_circumflex = 0xfe52; + public static final int XK_dead_tilde = 0xfe53; + public static final int XK_dead_macron = 0xfe54; + public static final int XK_dead_breve = 0xfe55; + public static final int XK_dead_abovedot = 0xfe56; + public static final int XK_dead_diaeresis = 0xfe57; + public static final int XK_dead_abovering = 0xfe58; + public static final int XK_dead_doubleacute = 0xfe59; + public static final int XK_dead_caron = 0xfe5a; + public static final int XK_dead_cedilla = 0xfe5b; + public static final int XK_dead_ogonek = 0xfe5c; + public static final int XK_dead_iota = 0xfe5d; + public static final int XK_dead_voiced_sound = 0xfe5e; + public static final int XK_dead_semivoiced_sound = 0xfe5f; + public static final int XK_dead_belowdot = 0xfe60; + public static final int XK_dead_hook = 0xfe61; + public static final int XK_dead_horn = 0xfe62; + + public static final int XK_BackSpace = 0xff08; + public static final int XK_Tab = 0xff09; + public static final int XK_Linefeed = 0xff0a; + public static final int XK_Clear = 0xff0b; + public static final int XK_Return = 0xff0d; + public static final int XK_Pause = 0xff13; + public static final int XK_Scroll_Lock = 0xff14; + public static final int XK_Sys_Req = 0xff15; + public static final int XK_Escape = 0xff1b; + public static final int XK_Delete = 0xffff; + + public static final int XK_Home = 0xff50; + public static final int XK_Left = 0xff51; + public static final int XK_Up = 0xff52; + public static final int XK_Right = 0xff53; + public static final int XK_Down = 0xff54; + public static final int XK_Prior = 0xff55; + public static final int XK_Page_Up = 0xff55; + public static final int XK_Next = 0xff56; + public static final int XK_Page_Down = 0xff56; + public static final int XK_End = 0xff57; + public static final int XK_Begin = 0xff58; + + +/* Misc functions */ + + public static final int XK_Select = 0xff60; + public static final int XK_Print = 0xff61; + public static final int XK_Execute = 0xff62; + public static final int XK_Insert = 0xff63; + public static final int XK_Undo = 0xff65; + public static final int XK_Redo = 0xff66; + public static final int XK_Menu = 0xff67; + public static final int XK_Find = 0xff68; + public static final int XK_Cancel = 0xff69; + public static final int XK_Help = 0xff6a; + public static final int XK_Break = 0xff6b; + public static final int XK_Mode_switch = 0xff7e; + public static final int XK_script_switch = 0xff7e; + public static final int XK_Num_Lock = 0xff7f; + +/* Keypad functions, keypad numbers cleverly chosen to map to ASCII */ + + public static final int XK_KP_Space = 0xff80; + public static final int XK_KP_Tab = 0xff89; + public static final int XK_KP_Enter = 0xff8d; + public static final int XK_KP_F1 = 0xff91; + public static final int XK_KP_F2 = 0xff92; + public static final int XK_KP_F3 = 0xff93; + public static final int XK_KP_F4 = 0xff94; + public static final int XK_KP_Home = 0xff95; + public static final int XK_KP_Left = 0xff96; + public static final int XK_KP_Up = 0xff97; + public static final int XK_KP_Right = 0xff98; + public static final int XK_KP_Down = 0xff99; + public static final int XK_KP_Prior = 0xff9a; + public static final int XK_KP_Page_Up = 0xff9a; + public static final int XK_KP_Next = 0xff9b; + public static final int XK_KP_Page_Down = 0xff9b; + public static final int XK_KP_End = 0xff9c; + public static final int XK_KP_Begin = 0xff9d; + public static final int XK_KP_Insert = 0xff9e; + public static final int XK_KP_Delete = 0xff9f; + public static final int XK_KP_Equal = 0xffbd; + public static final int XK_KP_Multiply = 0xffaa; + public static final int XK_KP_Add = 0xffab; + public static final int XK_KP_Separator = 0xffac; + public static final int XK_KP_Subtract = 0xffad; + public static final int XK_KP_Decimal = 0xffae; + public static final int XK_KP_Divide = 0xffaf; + + public static final int XK_KP_0 = 0xffb0; + public static final int XK_KP_1 = 0xffb1; + public static final int XK_KP_2 = 0xffb2; + public static final int XK_KP_3 = 0xffb3; + public static final int XK_KP_4 = 0xffb4; + public static final int XK_KP_5 = 0xffb5; + public static final int XK_KP_6 = 0xffb6; + public static final int XK_KP_7 = 0xffb7; + public static final int XK_KP_8 = 0xffb8; + public static final int XK_KP_9 = 0xffb9; + + + +/* + * Auxilliary functions; note the duplicate definitions for left and right + * function keys; Sun keyboards and a few other manufactures have such + * function key groups on the left and/or right sides of the keyboard. + * We've not found a keyboard with more than 35 function keys total. + */ + + public static final int XK_F1 = 0xffbe; + public static final int XK_F2 = 0xffbf; + public static final int XK_F3 = 0xffc0; + public static final int XK_F4 = 0xffc1; + public static final int XK_F5 = 0xffc2; + public static final int XK_F6 = 0xffc3; + public static final int XK_F7 = 0xffc4; + public static final int XK_F8 = 0xffc5; + public static final int XK_F9 = 0xffc6; + public static final int XK_F10 = 0xffc7; + public static final int XK_F11 = 0xffc8; + public static final int XK_L1 = 0xffc8; + public static final int XK_F12 = 0xffc9; + public static final int XK_L2 = 0xffc9; + public static final int XK_F13 = 0xffca; + public static final int XK_L3 = 0xffca; + public static final int XK_F14 = 0xffcb; + public static final int XK_L4 = 0xffcb; + public static final int XK_F15 = 0xffcc; + public static final int XK_L5 = 0xffcc; + public static final int XK_F16 = 0xffcd; + public static final int XK_L6 = 0xffcd; + public static final int XK_F17 = 0xffce; + public static final int XK_L7 = 0xffce; + public static final int XK_F18 = 0xffcf; + public static final int XK_L8 = 0xffcf; + public static final int XK_F19 = 0xffd0; + public static final int XK_L9 = 0xffd0; + public static final int XK_F20 = 0xffd1; + public static final int XK_L10 = 0xffd1; + public static final int XK_F21 = 0xffd2; + public static final int XK_R1 = 0xffd2; + public static final int XK_F22 = 0xffd3; + public static final int XK_R2 = 0xffd3; + public static final int XK_F23 = 0xffd4; + public static final int XK_R3 = 0xffd4; + public static final int XK_F24 = 0xffd5; + public static final int XK_R4 = 0xffd5; + public static final int XK_F25 = 0xffd6; + public static final int XK_R5 = 0xffd6; + public static final int XK_F26 = 0xffd7; + public static final int XK_R6 = 0xffd7; + public static final int XK_F27 = 0xffd8; + public static final int XK_R7 = 0xffd8; + public static final int XK_F28 = 0xffd9; + public static final int XK_R8 = 0xffd9; + public static final int XK_F29 = 0xffda; + public static final int XK_R9 = 0xffda; + public static final int XK_F30 = 0xffdb; + public static final int XK_R10 = 0xffdb; + public static final int XK_F31 = 0xffdc; + public static final int XK_R11 = 0xffdc; + public static final int XK_F32 = 0xffdd; + public static final int XK_R12 = 0xffdd; + public static final int XK_F33 = 0xffde; + public static final int XK_R13 = 0xffde; + public static final int XK_F34 = 0xffdf; + public static final int XK_R14 = 0xffdf; + public static final int XK_F35 = 0xffe0; + public static final int XK_R15 = 0xffe0; + +/* Modifiers */ + + public static final int XK_Shift_L = 0xffe1; + public static final int XK_Shift_R = 0xffe2; + public static final int XK_Control_L = 0xffe3; + public static final int XK_Control_R = 0xffe4; + public static final int XK_Caps_Lock = 0xffe5; + public static final int XK_Shift_Lock = 0xffe6; + + public static final int XK_Meta_L = 0xffe7; + public static final int XK_Meta_R = 0xffe8; + public static final int XK_Alt_L = 0xffe9; + public static final int XK_Alt_R = 0xffea; + public static final int XK_Super_L = 0xffeb; + public static final int XK_Super_R = 0xffec; + public static final int XK_Hyper_L = 0xffed; + public static final int XK_Hyper_R = 0xffee; + public static final int XK_space = 0x0020; + public static final int XK_exclam = 0x0021; + public static final int XK_quotedbl = 0x0022; + public static final int XK_numbersign = 0x0023; + public static final int XK_dollar = 0x0024; + public static final int XK_percent = 0x0025; + public static final int XK_ampersand = 0x0026; + public static final int XK_apostrophe = 0x0027; + public static final int XK_quoteright = 0x0027; + public static final int XK_parenleft = 0x0028; + public static final int XK_parenright = 0x0029; + public static final int XK_asterisk = 0x002a; + public static final int XK_plus = 0x002b; + public static final int XK_comma = 0x002c; + public static final int XK_minus = 0x002d; + public static final int XK_period = 0x002e; + public static final int XK_slash = 0x002f; + + public static final int XK_0 = 0x0030; + public static final int XK_1 = 0x0031; + public static final int XK_2 = 0x0032; + public static final int XK_3 = 0x0033; + public static final int XK_4 = 0x0034; + public static final int XK_5 = 0x0035; + public static final int XK_6 = 0x0036; + public static final int XK_7 = 0x0037; + public static final int XK_8 = 0x0038; + public static final int XK_9 = 0x0039; + public static final int XK_colon = 0x003a; + public static final int XK_semicolon = 0x003b; + public static final int XK_less = 0x003c; + public static final int XK_equal = 0x003d; + public static final int XK_greater = 0x003e; + public static final int XK_question = 0x003f; + public static final int XK_at = 0x0040; + public static final int XK_A = 0x0041; + public static final int XK_B = 0x0042; + public static final int XK_C = 0x0043; + public static final int XK_D = 0x0044; + public static final int XK_E = 0x0045; + public static final int XK_F = 0x0046; + public static final int XK_G = 0x0047; + public static final int XK_H = 0x0048; + public static final int XK_I = 0x0049; + public static final int XK_J = 0x004a; + public static final int XK_K = 0x004b; + public static final int XK_L = 0x004c; + public static final int XK_M = 0x004d; + public static final int XK_N = 0x004e; + public static final int XK_O = 0x004f; + public static final int XK_P = 0x0050; + public static final int XK_Q = 0x0051; + public static final int XK_R = 0x0052; + public static final int XK_S = 0x0053; + public static final int XK_T = 0x0054; + public static final int XK_U = 0x0055; + public static final int XK_V = 0x0056; + public static final int XK_W = 0x0057; + public static final int XK_X = 0x0058; + public static final int XK_Y = 0x0059; + public static final int XK_Z = 0x005a; + public static final int XK_bracketleft = 0x005b; + public static final int XK_backslash = 0x005c; + public static final int XK_bracketright = 0x005d; + public static final int XK_asciicircum = 0x005e; + public static final int XK_underscore = 0x005f; + public static final int XK_grave = 0x0060; + public static final int XK_quoteleft = 0x0060; + public static final int XK_a = 0x0061; + public static final int XK_b = 0x0062; + public static final int XK_c = 0x0063; + public static final int XK_d = 0x0064; + public static final int XK_e = 0x0065; + public static final int XK_f = 0x0066; + public static final int XK_g = 0x0067; + public static final int XK_h = 0x0068; + public static final int XK_i = 0x0069; + public static final int XK_j = 0x006a; + public static final int XK_k = 0x006b; + public static final int XK_l = 0x006c; + public static final int XK_m = 0x006d; + public static final int XK_n = 0x006e; + public static final int XK_o = 0x006f; + public static final int XK_p = 0x0070; + public static final int XK_q = 0x0071; + public static final int XK_r = 0x0072; + public static final int XK_s = 0x0073; + public static final int XK_t = 0x0074; + public static final int XK_u = 0x0075; + public static final int XK_v = 0x0076; + public static final int XK_w = 0x0077; + public static final int XK_x = 0x0078; + public static final int XK_y = 0x0079; + public static final int XK_z = 0x007a; + public static final int XK_braceleft = 0x007b; + public static final int XK_bar = 0x007c; + public static final int XK_braceright = 0x007d; + public static final int XK_asciitilde = 0x007e; + + public static final int XK_nobreakspace = 0x00a0; + public static final int XK_exclamdown = 0x00a1; + public static final int XK_cent = 0x00a2; + public static final int XK_sterling = 0x00a3; + public static final int XK_currency = 0x00a4; + public static final int XK_yen = 0x00a5; + public static final int XK_brokenbar = 0x00a6; + public static final int XK_section = 0x00a7; + public static final int XK_diaeresis = 0x00a8; + public static final int XK_copyright = 0x00a9; + public static final int XK_ordfeminine = 0x00aa; + public static final int XK_guillemotleft = 0x00ab; + public static final int XK_notsign = 0x00ac; + public static final int XK_hyphen = 0x00ad; + public static final int XK_registered = 0x00ae; + public static final int XK_macron = 0x00af; + public static final int XK_degree = 0x00b0; + public static final int XK_plusminus = 0x00b1; + public static final int XK_twosuperior = 0x00b2; + public static final int XK_threesuperior = 0x00b3; + public static final int XK_acute = 0x00b4; + public static final int XK_mu = 0x00b5; + public static final int XK_paragraph = 0x00b6; + public static final int XK_periodcentered = 0x00b7; + public static final int XK_cedilla = 0x00b8; + public static final int XK_onesuperior = 0x00b9; + public static final int XK_masculine = 0x00ba; + public static final int XK_guillemotright = 0x00bb; + public static final int XK_onequarter = 0x00bc; + public static final int XK_onehalf = 0x00bd; + public static final int XK_threequarters = 0x00be; + public static final int XK_questiondown = 0x00bf; + public static final int XK_Agrave = 0x00c0; + public static final int XK_Aacute = 0x00c1; + public static final int XK_Acircumflex = 0x00c2; + public static final int XK_Atilde = 0x00c3; + public static final int XK_Adiaeresis = 0x00c4; + public static final int XK_Aring = 0x00c5; + public static final int XK_AE = 0x00c6; + public static final int XK_Ccedilla = 0x00c7; + public static final int XK_Egrave = 0x00c8; + public static final int XK_Eacute = 0x00c9; + public static final int XK_Ecircumflex = 0x00ca; + public static final int XK_Ediaeresis = 0x00cb; + public static final int XK_Igrave = 0x00cc; + public static final int XK_Iacute = 0x00cd; + public static final int XK_Icircumflex = 0x00ce; + public static final int XK_Idiaeresis = 0x00cf; + public static final int XK_ETH = 0x00d0; + public static final int XK_Eth = 0x00d0; + public static final int XK_Ntilde = 0x00d1; + public static final int XK_Ograve = 0x00d2; + public static final int XK_Oacute = 0x00d3; + public static final int XK_Ocircumflex = 0x00d4; + public static final int XK_Otilde = 0x00d5; + public static final int XK_Odiaeresis = 0x00d6; + public static final int XK_multiply = 0x00d7; + public static final int XK_Oslash = 0x00d8; + public static final int XK_Ooblique = 0x00d8; + public static final int XK_Ugrave = 0x00d9; + public static final int XK_Uacute = 0x00da; + public static final int XK_Ucircumflex = 0x00db; + public static final int XK_Udiaeresis = 0x00dc; + public static final int XK_Yacute = 0x00dd; + public static final int XK_THORN = 0x00de; + public static final int XK_Thorn = 0x00de; + public static final int XK_ssharp = 0x00df; + public static final int XK_agrave = 0x00e0; + public static final int XK_aacute = 0x00e1; + public static final int XK_acircumflex = 0x00e2; + public static final int XK_atilde = 0x00e3; + public static final int XK_adiaeresis = 0x00e4; + public static final int XK_aring = 0x00e5; + public static final int XK_ae = 0x00e6; + public static final int XK_ccedilla = 0x00e7; + public static final int XK_egrave = 0x00e8; + public static final int XK_eacute = 0x00e9; + public static final int XK_ecircumflex = 0x00ea; + public static final int XK_ediaeresis = 0x00eb; + public static final int XK_igrave = 0x00ec; + public static final int XK_iacute = 0x00ed; + public static final int XK_icircumflex = 0x00ee; + public static final int XK_idiaeresis = 0x00ef; + public static final int XK_eth = 0x00f0; + public static final int XK_ntilde = 0x00f1; + public static final int XK_ograve = 0x00f2; + public static final int XK_oacute = 0x00f3; + public static final int XK_ocircumflex = 0x00f4; + public static final int XK_otilde = 0x00f5; + public static final int XK_odiaeresis = 0x00f6; + public static final int XK_division = 0x00f7; + public static final int XK_oslash = 0x00f8; + public static final int XK_ooblique = 0x00f8; + public static final int XK_ugrave = 0x00f9; + public static final int XK_uacute = 0x00fa; + public static final int XK_ucircumflex = 0x00fb; + public static final int XK_udiaeresis = 0x00fc; + public static final int XK_yacute = 0x00fd; + public static final int XK_thorn = 0x00fe; + public static final int XK_ydiaeresis = 0x00ff; + + public static final int XK_ISO_Level3_Shift = 0xfe03; + + public static int mapKeySymToLWJGLKeyCode(long keysym) { + switch ((int)keysym) { + case XK_BackSpace: + return Keyboard.KEY_BACK; + case XK_ISO_Left_Tab: + case XK_Tab: + return Keyboard.KEY_TAB; + case XK_Return: + return Keyboard.KEY_RETURN; + case XK_Pause: + return Keyboard.KEY_PAUSE; + case XK_Scroll_Lock: + return Keyboard.KEY_SCROLL; + case XK_Sys_Req: + return Keyboard.KEY_SYSRQ; + case XK_Escape: + return Keyboard.KEY_ESCAPE; + case XK_Delete: + return Keyboard.KEY_DELETE; + + /* Japanese keyboard support */ + + case XK_Kanji: + return Keyboard.KEY_KANJI; + + /* Cursor control & motion */ + + case XK_Home: + return Keyboard.KEY_HOME; + case XK_Left: + return Keyboard.KEY_LEFT; + case XK_Up: + return Keyboard.KEY_UP; + case XK_Right: + return Keyboard.KEY_RIGHT; + case XK_Down: + return Keyboard.KEY_DOWN; + case XK_Page_Up: + return Keyboard.KEY_PRIOR; + case XK_Page_Down: + return Keyboard.KEY_NEXT; + case XK_End: + return Keyboard.KEY_END; + + + /* Misc Functions */ + + case XK_Break: + return Keyboard.KEY_PAUSE; + case XK_Insert: + return Keyboard.KEY_INSERT; + case XK_Num_Lock: + return Keyboard.KEY_NUMLOCK; + + /* Keypad Functions, keypad numbers cleverly chosen to map to ascii */ + + case XK_KP_Space: + return Keyboard.KEY_SPACE; + case XK_KP_Tab: + return Keyboard.KEY_TAB; + case XK_KP_Enter: + return Keyboard.KEY_NUMPADENTER; + case XK_KP_F1: + return Keyboard.KEY_F1; + case XK_KP_F2: + return Keyboard.KEY_F2; + case XK_KP_F3: + return Keyboard.KEY_F3; + case XK_KP_F4: + return Keyboard.KEY_F4; + case XK_KP_Home: + return Keyboard.KEY_HOME; + case XK_KP_Left: + return Keyboard.KEY_LEFT; + case XK_KP_Up: + return Keyboard.KEY_UP; + case XK_KP_Right: + return Keyboard.KEY_RIGHT; + case XK_KP_Down: + return Keyboard.KEY_DOWN; + case XK_KP_Page_Up: + return Keyboard.KEY_PRIOR; + case XK_KP_Page_Down: + return Keyboard.KEY_NEXT; + case XK_KP_End: + return Keyboard.KEY_END; + case XK_KP_Insert: + return Keyboard.KEY_INSERT; + case XK_KP_Delete: + return Keyboard.KEY_DELETE; + case XK_KP_Equal: + return Keyboard.KEY_NUMPADEQUALS; + case XK_KP_Multiply: + return Keyboard.KEY_MULTIPLY; + case XK_KP_Add: + return Keyboard.KEY_ADD; + case XK_KP_Subtract: + return Keyboard.KEY_SUBTRACT; + case XK_KP_Decimal: + return Keyboard.KEY_DECIMAL; + case XK_KP_Divide: + return Keyboard.KEY_DIVIDE; + + case XK_KP_0: + return Keyboard.KEY_NUMPAD0; + case XK_KP_1: + return Keyboard.KEY_NUMPAD1; + case XK_KP_2: + return Keyboard.KEY_NUMPAD2; + case XK_KP_3: + return Keyboard.KEY_NUMPAD3; + case XK_KP_4: + return Keyboard.KEY_NUMPAD4; + case XK_KP_5: + return Keyboard.KEY_NUMPAD5; + case XK_KP_6: + return Keyboard.KEY_NUMPAD6; + case XK_KP_7: + return Keyboard.KEY_NUMPAD7; + case XK_KP_8: + return Keyboard.KEY_NUMPAD8; + case XK_KP_9: + return Keyboard.KEY_NUMPAD9; + + /* + * Auxilliary Functions; note the duplicate definitions for left and right + * function keys; Sun keyboards and a few other manufactures have such + * function key groups on the left and/or right sides of the keyboard. + * We've not found a keyboard with more than 35 function keys total. + */ + + case XK_F1: + return Keyboard.KEY_F1; + case XK_F2: + return Keyboard.KEY_F2; + case XK_F3: + return Keyboard.KEY_F3; + case XK_F4: + return Keyboard.KEY_F4; + case XK_F5: + return Keyboard.KEY_F5; + case XK_F6: + return Keyboard.KEY_F6; + case XK_F7: + return Keyboard.KEY_F7; + case XK_F8: + return Keyboard.KEY_F8; + case XK_F9: + return Keyboard.KEY_F9; + case XK_F10: + return Keyboard.KEY_F10; + case XK_F11: + return Keyboard.KEY_F11; + case XK_F12: + return Keyboard.KEY_F12; + case XK_F13: + return Keyboard.KEY_F13; + case XK_F14: + return Keyboard.KEY_F14; + case XK_F15: + return Keyboard.KEY_F15; + + /* Modifiers */ + + case XK_Shift_L: + return Keyboard.KEY_LSHIFT; + case XK_Shift_R: + return Keyboard.KEY_RSHIFT; + case XK_Control_L: + return Keyboard.KEY_LCONTROL; + case XK_Control_R: + return Keyboard.KEY_RCONTROL; + case XK_Caps_Lock: + return Keyboard.KEY_CAPITAL; + + case XK_Meta_L: + return Keyboard.KEY_LMENU; + case XK_ISO_Level3_Shift: + case XK_Meta_R: + return Keyboard.KEY_RMENU; + case XK_Alt_L: + return Keyboard.KEY_LMENU; + case XK_Alt_R: + return Keyboard.KEY_RMENU; + + case XK_dead_grave: + return Keyboard.KEY_GRAVE; + case XK_dead_circumflex: + return Keyboard.KEY_CIRCUMFLEX; + + /* + * Latin 1 + * Byte 3 = 0 + */ + case XK_space: + return Keyboard.KEY_SPACE; + case XK_apostrophe: + return Keyboard.KEY_APOSTROPHE; + case XK_comma: + return Keyboard.KEY_COMMA; + case XK_minus: + return Keyboard.KEY_MINUS; + case XK_period: + return Keyboard.KEY_PERIOD; + case XK_slash: + return Keyboard.KEY_SLASH; + case XK_0: + return Keyboard.KEY_0; + case XK_1: + return Keyboard.KEY_1; + case XK_2: + return Keyboard.KEY_2; + case XK_3: + return Keyboard.KEY_3; + case XK_4: + return Keyboard.KEY_4; + case XK_5: + return Keyboard.KEY_5; + case XK_6: + return Keyboard.KEY_6; + case XK_7: + return Keyboard.KEY_7; + case XK_8: + return Keyboard.KEY_8; + case XK_9: + return Keyboard.KEY_9; + case XK_colon: + return Keyboard.KEY_COLON; + case XK_semicolon: + return Keyboard.KEY_SEMICOLON; + case XK_equal: + return Keyboard.KEY_EQUALS; + case XK_at: + return Keyboard.KEY_AT; + case XK_bracketleft: + return Keyboard.KEY_LBRACKET; + case XK_bracketright: + return Keyboard.KEY_RBRACKET; + case XK_asciicircum: + return Keyboard.KEY_CIRCUMFLEX; + case XK_underscore: + return Keyboard.KEY_UNDERLINE; + case XK_grave: + return Keyboard.KEY_GRAVE; + case XK_a: + case XK_A: + return Keyboard.KEY_A; + case XK_b: + case XK_B: + return Keyboard.KEY_B; + case XK_c: + case XK_C: + return Keyboard.KEY_C; + case XK_d: + case XK_D: + return Keyboard.KEY_D; + case XK_e: + case XK_E: + return Keyboard.KEY_E; + case XK_f: + case XK_F: + return Keyboard.KEY_F; + case XK_g: + case XK_G: + return Keyboard.KEY_G; + case XK_h: + case XK_H: + return Keyboard.KEY_H; + case XK_i: + case XK_I: + return Keyboard.KEY_I; + case XK_j: + case XK_J: + return Keyboard.KEY_J; + case XK_k: + case XK_K: + return Keyboard.KEY_K; + case XK_l: + case XK_L: + return Keyboard.KEY_L; + case XK_m: + case XK_M: + return Keyboard.KEY_M; + case XK_n: + case XK_N: + return Keyboard.KEY_N; + case XK_o: + case XK_O: + return Keyboard.KEY_O; + case XK_p: + case XK_P: + return Keyboard.KEY_P; + case XK_q: + case XK_Q: + return Keyboard.KEY_Q; + case XK_r: + case XK_R: + return Keyboard.KEY_R; + case XK_s: + case XK_S: + return Keyboard.KEY_S; + case XK_t: + case XK_T: + return Keyboard.KEY_T; + case XK_u: + case XK_U: + return Keyboard.KEY_U; + case XK_v: + case XK_V: + return Keyboard.KEY_V; + case XK_w: + case XK_W: + return Keyboard.KEY_W; + case XK_x: + case XK_X: + return Keyboard.KEY_X; + case XK_y: + case XK_Y: + return Keyboard.KEY_Y; + case XK_z: + case XK_Z: + return Keyboard.KEY_Z; + default: + return Keyboard.KEY_NONE; + } + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxMouse.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxMouse.java new file mode 100644 index 0000000..cbac910 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxMouse.java @@ -0,0 +1,318 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + * @author elias_naur + */ + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.input.Mouse; + +final class LinuxMouse { + private static final int POINTER_WARP_BORDER = 10; + // scale the mouse wheel according to DirectInput + private static final int WHEEL_SCALE = 120; + + private int button_count; + + /* X11 constants */ + private static final int Button1 = 1; + private static final int Button2 = 2; + private static final int Button3 = 3; + private static final int Button4 = 4; + private static final int Button5 = 5; + + private static final int Button6 = 6; // wheel tilt left *rare* + private static final int Button7 = 7; // wheel tilt right *rare* + private static final int Button8 = 8; // back button + private static final int Button9 = 9; // forward button + + private static final int ButtonPress = 4; + private static final int ButtonRelease = 5; + + private final long display; + private final long window; + private final long input_window; + private final long warp_atom; + private final IntBuffer query_pointer_buffer = BufferUtils.createIntBuffer(4); + private final ByteBuffer event_buffer = ByteBuffer.allocate(Mouse.EVENT_SIZE); + + private int last_x; + private int last_y; + private int accum_dx; + private int accum_dy; + private int accum_dz; + private byte[] buttons; + private EventQueue event_queue; + private long last_event_nanos; + + LinuxMouse(long display, long window, long input_window) throws LWJGLException { + this.display = display; + this.window = window; + this.input_window = input_window; + this.warp_atom = LinuxDisplay.nInternAtom(display, "_LWJGL", false); + button_count = nGetButtonCount(display); + buttons = new byte[button_count]; + reset(false, false); + } + + private void reset(boolean grab, boolean warp_pointer) { + event_queue = new EventQueue(event_buffer.capacity()); + accum_dx = accum_dy = 0; + long root_window = nQueryPointer(display, window, query_pointer_buffer); + + int root_x = query_pointer_buffer.get(0); + int root_y = query_pointer_buffer.get(1); + int win_x = query_pointer_buffer.get(2); + int win_y = query_pointer_buffer.get(3); + // Pretend that the cursor never moved + last_x = win_x; + last_y = transformY(win_y); + doHandlePointerMotion(grab, warp_pointer, root_window, root_x, root_y, win_x, win_y, last_event_nanos); + } + + public void read(ByteBuffer buffer) { + event_queue.copyEvents(buffer); + } + + public void poll(boolean grab, IntBuffer coord_buffer, ByteBuffer buttons_buffer) { + if (grab) { + coord_buffer.put(0, accum_dx); + coord_buffer.put(1, accum_dy); + } else { + coord_buffer.put(0, last_x); + coord_buffer.put(1, last_y); + } + coord_buffer.put(2, accum_dz); + accum_dx = accum_dy = accum_dz = 0; + for (int i = 0; i < buttons.length; i++) + buttons_buffer.put(i, buttons[i]); + } + + private void putMouseEventWithCoords(byte button, byte state, int coord1, int coord2, int dz, long nanos) { + event_buffer.clear(); + event_buffer.put(button).put(state).putInt(coord1).putInt(coord2).putInt(dz).putLong(nanos); + event_buffer.flip(); + event_queue.putEvent(event_buffer); + last_event_nanos = nanos; + } + + private void setCursorPos(boolean grab, int x, int y, long nanos) { + y = transformY(y); + int dx = x - last_x; + int dy = y - last_y; + if (dx != 0 || dy != 0) { + accum_dx += dx; + accum_dy += dy; + last_x = x; + last_y = y; + if (grab) { + putMouseEventWithCoords((byte)-1, (byte)0, dx, dy, 0, nanos); + } else { + putMouseEventWithCoords((byte)-1, (byte)0, x, y, 0, nanos); + } + } + } + + private void doWarpPointer(int center_x, int center_y) { + nSendWarpEvent(display, input_window, warp_atom, center_x, center_y); + nWarpCursor(display, window, center_x, center_y); + } + private static native void nSendWarpEvent(long display, long window, long warp_atom, int center_x, int center_y); + + private void doHandlePointerMotion(boolean grab, boolean warp_pointer, long root_window, int root_x, int root_y, int win_x, int win_y, long nanos) { + setCursorPos(grab, win_x, win_y, nanos); + if (!warp_pointer) + return; + int root_window_height = nGetWindowHeight(display, root_window); + int root_window_width = nGetWindowWidth(display, root_window); + int window_height = nGetWindowHeight(display, window); + int window_width = nGetWindowWidth(display, window); + + // find the window position in root coordinates + int win_left = root_x - win_x; + int win_top = root_y - win_y; + int win_right = win_left + window_width; + int win_bottom = win_top + window_height; + // cap the window position to the screen dimensions + int border_left = Math.max(0, win_left); + int border_top = Math.max(0, win_top); + int border_right = Math.min(root_window_width, win_right); + int border_bottom = Math.min(root_window_height, win_bottom); + // determine whether the cursor is outside the bounds + boolean outside_limits = root_x < border_left + POINTER_WARP_BORDER || root_y < border_top + POINTER_WARP_BORDER || + root_x > border_right - POINTER_WARP_BORDER || root_y > border_bottom - POINTER_WARP_BORDER; + if (outside_limits) { + // Find the center of the limits in window coordinates + int center_x = (border_right - border_left)/2; + int center_y = (border_bottom - border_top)/2; + doWarpPointer(center_x, center_y); + } + } + + public void changeGrabbed(boolean grab, boolean warp_pointer) { + reset(grab, warp_pointer); + } + + public int getButtonCount() { + return buttons.length; + } + + private int transformY(int y) { + return nGetWindowHeight(display, window) - 1 - y; + } + private static native int nGetWindowHeight(long display, long window); + private static native int nGetWindowWidth(long display, long window); + + private static native int nGetButtonCount(long display); + + private static native long nQueryPointer(long display, long window, IntBuffer result); + + public void setCursorPosition(int x, int y) { + nWarpCursor(display, window, x, transformY(y)); + } + private static native void nWarpCursor(long display, long window, int x, int y); + + private void handlePointerMotion(boolean grab, boolean warp_pointer, long millis, long root_window, int x_root, int y_root, int x, int y) { + doHandlePointerMotion(grab, warp_pointer, root_window, x_root, y_root, x, y, millis*1000000); + } + + private void handleButton(boolean grab, int button, byte state, long nanos) { + byte button_num; + switch (button) { + case Button1: + button_num = (byte)0; + break; + case Button2: + button_num = (byte)2; + break; + case Button3: + button_num = (byte)1; + break; + case Button6: + button_num = (byte)5; + break; + case Button7: + button_num = (byte)6; + break; + case Button8: + button_num = (byte)3; // back button + break; + case Button9: + button_num = (byte)4; // forward button + break; + default: + if (button > Button9 && button <= button_count) { + button_num = (byte)(button-1); + break; + } + return; + } + buttons[button_num] = state; + putMouseEvent(grab, button_num, state, 0, nanos); + } + + private void putMouseEvent(boolean grab, byte button, byte state, int dz, long nanos) { + if (grab) + putMouseEventWithCoords(button, state, 0, 0, dz, nanos); + else + putMouseEventWithCoords(button, state, last_x, last_y, dz, nanos); + } + + private void handleButtonPress(boolean grab, byte button, long nanos) { + int delta = 0; + switch (button) { + case Button4: + delta = WHEEL_SCALE; + putMouseEvent(grab, (byte)-1, (byte)0, delta, nanos); + accum_dz += delta; + break; + case Button5: + delta = -WHEEL_SCALE; + putMouseEvent(grab, (byte)-1, (byte)0, delta, nanos); + accum_dz += delta; + break; + default: + handleButton(grab, button, (byte)1, nanos); + break; + } + } + + private void handleButtonEvent(boolean grab, long millis, int type, byte button) { + long nanos = millis*1000000; + switch (type) { + case ButtonRelease: + handleButton(grab, button, (byte)0, nanos); + break; + case ButtonPress: + handleButtonPress(grab, button, nanos); + break; + default: + break; + } + } + + private void resetCursor(int x, int y) { + last_x = x; + last_y = transformY(y); + } + + private void handleWarpEvent(int x, int y) { + resetCursor(x, y); + } + + public boolean filterEvent(boolean grab, boolean warp_pointer, LinuxEvent event) { + switch (event.getType()) { + case LinuxEvent.ClientMessage: + if (event.getClientMessageType() == warp_atom) { + handleWarpEvent(event.getClientData(0), event.getClientData(1)); + return true; + } + break; + case LinuxEvent.ButtonPress: /* Fall through */ + case LinuxEvent.ButtonRelease: + handleButtonEvent(grab, event.getButtonTime(), event.getButtonType(), (byte)event.getButtonButton()); + return true; + case LinuxEvent.MotionNotify: + handlePointerMotion(grab, warp_pointer, event.getButtonTime(), event.getButtonRoot(), event.getButtonXRoot(), event.getButtonYRoot(), event.getButtonX(), event.getButtonY()); + return true; + default: + break; + } + return false; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxPbufferPeerInfo.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxPbufferPeerInfo.java new file mode 100644 index 0000000..afcbc95 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxPbufferPeerInfo.java @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import java.nio.ByteBuffer; + +import org.lwjgl.LWJGLException; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +final class LinuxPbufferPeerInfo extends LinuxPeerInfo { + LinuxPbufferPeerInfo(int width, int height, PixelFormat pixel_format) throws LWJGLException { + LinuxDisplay.lockAWT(); + try { + GLContext.loadOpenGLLibrary(); + try { + LinuxDisplay.incDisplay(); + try { + nInitHandle(LinuxDisplay.getDisplay(), LinuxDisplay.getDefaultScreen(), getHandle(), width, height, pixel_format); + } catch (LWJGLException e) { + LinuxDisplay.decDisplay(); + throw e; + } + } catch (LWJGLException e) { + GLContext.unloadOpenGLLibrary(); + throw e; + } + } finally { + LinuxDisplay.unlockAWT(); + } + } + private static native void nInitHandle(long display, int screen, ByteBuffer handle, int width, int height, PixelFormat pixel_format) throws LWJGLException; + + public void destroy() { + LinuxDisplay.lockAWT(); + nDestroy(getHandle()); + LinuxDisplay.decDisplay(); + GLContext.unloadOpenGLLibrary(); + LinuxDisplay.unlockAWT(); + } + private static native void nDestroy(ByteBuffer handle); + + protected void doLockAndInitHandle() throws LWJGLException { + // NO-OP + } + + protected void doUnlock() throws LWJGLException { + // NO-OP + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxPeerInfo.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxPeerInfo.java new file mode 100644 index 0000000..6747d76 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/LinuxPeerInfo.java @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import java.nio.ByteBuffer; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +abstract class LinuxPeerInfo extends PeerInfo { + LinuxPeerInfo() { + super(createHandle()); + } + private static native ByteBuffer createHandle(); + + public final long getDisplay() { + return nGetDisplay(getHandle()); + } + private static native long nGetDisplay(ByteBuffer handle); + + public final long getDrawable() { + return nGetDrawable(getHandle()); + } + private static native long nGetDrawable(ByteBuffer handle); +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXAWTGLCanvasPeerInfo.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXAWTGLCanvasPeerInfo.java new file mode 100644 index 0000000..2831923 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXAWTGLCanvasPeerInfo.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.LWJGLException; + +import java.awt.Canvas; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +final class MacOSXAWTGLCanvasPeerInfo extends MacOSXCanvasPeerInfo { + private final Canvas component; + + MacOSXAWTGLCanvasPeerInfo(Canvas component, PixelFormat pixel_format, ContextAttribs attribs, boolean support_pbuffer) throws LWJGLException { + super(pixel_format, attribs, support_pbuffer); + this.component = component; + } + + protected void doLockAndInitHandle() throws LWJGLException { + initHandle(component); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXCanvasImplementation.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXCanvasImplementation.java new file mode 100644 index 0000000..0009fd4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXCanvasImplementation.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import java.awt.GraphicsConfiguration; +import java.awt.GraphicsDevice; +import java.awt.Canvas; + +import org.lwjgl.LWJGLException; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +final class MacOSXCanvasImplementation implements AWTCanvasImplementation { + public PeerInfo createPeerInfo(Canvas component, PixelFormat pixel_format, ContextAttribs attribs) throws LWJGLException { + try { + return new MacOSXAWTGLCanvasPeerInfo(component, pixel_format, attribs, true); + } catch (LWJGLException e) { + return new MacOSXAWTGLCanvasPeerInfo(component, pixel_format, attribs, false); + } + } + + /** + * Find a proper GraphicsConfiguration from the given GraphicsDevice and PixelFormat. + * + * @return The GraphicsConfiguration corresponding to a visual that matches the pixel format. + */ + public GraphicsConfiguration findConfiguration(GraphicsDevice device, PixelFormat pixel_format) throws LWJGLException { + /* + * It seems like the best way is to simply return null + */ + return null; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXCanvasListener.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXCanvasListener.java new file mode 100644 index 0000000..ad955c3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXCanvasListener.java @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + * The AWT compatible Canvas for Mac OS X. + * @author elias_naur + */ + +import java.awt.Canvas; +import java.awt.event.ComponentEvent; +import java.awt.event.ComponentListener; +import java.awt.event.HierarchyEvent; +import java.awt.event.HierarchyListener; + +final class MacOSXCanvasListener implements ComponentListener, HierarchyListener { + private final Canvas canvas; + private int width; + private int height; + private boolean context_update; + private boolean resized; + + MacOSXCanvasListener(Canvas canvas) { + this.canvas = canvas; + canvas.addComponentListener(this); + canvas.addHierarchyListener(this); + setUpdate(); + } + + public void disableListeners() { + // Mac OS X applets will hang in Display.destroy() when parented when removing the listeners directly + java.awt.EventQueue.invokeLater(new Runnable() { + public void run() { + canvas.removeComponentListener(MacOSXCanvasListener.this); + canvas.removeHierarchyListener(MacOSXCanvasListener.this); + } + }); + } + + public boolean syncShouldUpdateContext() { + boolean should_update; + synchronized ( this ) { + should_update = context_update; + context_update = false; + } + return should_update; + } + + private synchronized void setUpdate() { + synchronized ( this ) { + width = canvas.getWidth(); + height = canvas.getHeight(); + context_update = true; + } + } + + public int syncGetWidth() { + synchronized ( this ) { + return width; + } + } + + public int syncGetHeight() { + synchronized ( this ) { + return height; + } + } + + public void componentShown(ComponentEvent e) { + } + + public void componentHidden(ComponentEvent e) { + } + + public void componentResized(ComponentEvent e) { + setUpdate(); + resized = true; + } + + public void componentMoved(ComponentEvent e) { + setUpdate(); + } + + public void hierarchyChanged(HierarchyEvent e) { + setUpdate(); + } + + public boolean wasResized() { + if (resized) { + resized = false; + return true; + } + + return false; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java new file mode 100644 index 0000000..412a7da --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXCanvasPeerInfo.java @@ -0,0 +1,235 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import java.awt.Canvas; +import java.awt.event.ComponentEvent; +import java.awt.event.ComponentListener; +import java.awt.Insets; +import java.awt.Container; +import java.awt.Component; +import java.awt.Point; +import java.awt.Window; +import java.nio.ByteBuffer; + +import javax.swing.SwingUtilities; + +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; + +/** + * + * @author elias_naur + * @author kappaOne + * @version $Revision$ + * $Id$ + */ +abstract class MacOSXCanvasPeerInfo extends MacOSXPeerInfo { + private final AWTSurfaceLock awt_surface = new AWTSurfaceLock(); + public ByteBuffer window_handle; + + protected MacOSXCanvasPeerInfo(PixelFormat pixel_format, ContextAttribs attribs, boolean support_pbuffer) throws LWJGLException { + super(pixel_format, attribs, true, true, support_pbuffer, true); + } + + protected void initHandle(Canvas component) throws LWJGLException { + boolean forceCALayer = true; + boolean autoResizable = true; // set the CALayer to autoResize + + String javaVersion = System.getProperty("java.version"); + + if (javaVersion.startsWith("1.5") || javaVersion.startsWith("1.6")) { + // On Java 7 and newer CALayer mode is the only way to use OpenGL with AWT + // therefore force it on all JVM's except for the older Java 5 and Java 6 + // where the older cocoaViewRef NSView method maybe be available. + forceCALayer = false; + } + else if (javaVersion.startsWith("1.7")) { + autoResizable = false; + } + + Insets insets = getInsets(component); + + int top = insets != null ? insets.top : 0; + int left = insets != null ? insets.left : 0; + + window_handle = nInitHandle(awt_surface.lockAndGetHandle(component), getHandle(), window_handle, forceCALayer, autoResizable, component.getX()-left, component.getY()-top); + + if (javaVersion.startsWith("1.7")) { + // fix for CALayer position not covering Canvas due to a Java 7 bug + // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7172187 + addComponentListener(component); + + if (SwingUtilities.getWindowAncestor(component.getParent()) != null) { + Point componentPosition = SwingUtilities.convertPoint(component, component.getLocation(), null); + Point parentPosition = SwingUtilities.convertPoint(component.getParent(), component.getLocation(), null); + + if (componentPosition.getX() == parentPosition.getX() && componentPosition.getY() == parentPosition.getY()) { + insets = getWindowInsets(component); + + top = insets != null ? insets.top : 0; + left = insets != null ? insets.left : 0; + + int x = (int)componentPosition.getX()-left; + int y = (int)-componentPosition.getY()+top-component.getHeight(); + + int width = component.getWidth(); + int height = component.getHeight(); + + nSetLayerBounds(getHandle(), x, y, width, height); + } + } + } + } + + private void addComponentListener(final Canvas component) { + + ComponentListener[] components = component.getComponentListeners(); + + // avoid adding duplicate listners by checking if one has already been added + for (int i = 0; i < components.length; i++) { + ComponentListener c = components[i]; + if (c.toString() == "CanvasPeerInfoListener") { + return; // already contains the listner below return without adding + } + } + + ComponentListener comp = new ComponentListener() { + public void componentHidden(ComponentEvent e) { + + } + + public void componentMoved(ComponentEvent e) { + + if (SwingUtilities.getWindowAncestor(component.getParent()) != null) { + Point componentPosition = SwingUtilities.convertPoint(component, component.getLocation(), null); + Point parentPosition = SwingUtilities.convertPoint(component.getParent(), component.getLocation(), null); + + if (componentPosition.getX() == parentPosition.getX() && componentPosition.getY() == parentPosition.getY()) { + Insets insets = getWindowInsets(component); + + int top = insets != null ? insets.top : 0; + int left = insets != null ? insets.left : 0; + + nSetLayerBounds(getHandle(), (int)componentPosition.getX()-left, (int)componentPosition.getY()-top, component.getWidth(), component.getHeight()); + return; + } + } + + Insets insets = getInsets(component); + + int top = insets != null ? insets.top : 0; + int left = insets != null ? insets.left : 0; + + //nSetLayerPosition(getHandle(), component.getX() - left, component.getY() - top); + nSetLayerBounds(getHandle(), component.getX() - left, component.getY() - top, component.getWidth(), component.getHeight()); + } + + public void componentResized(ComponentEvent e) { + + if (SwingUtilities.getWindowAncestor(component.getParent()) != null) { + Point componentPosition = SwingUtilities.convertPoint(component, component.getLocation(), null); + Point parentPosition = SwingUtilities.convertPoint(component.getParent(), component.getLocation(), null); + + if (componentPosition.getX() == parentPosition.getX() && componentPosition.getY() == parentPosition.getY()) { + Insets insets = getWindowInsets(component); + + int top = insets != null ? insets.top : 0; + int left = insets != null ? insets.left : 0; + + nSetLayerBounds(getHandle(), (int)componentPosition.getX()-left, (int)componentPosition.getY()-top, component.getWidth(), component.getHeight()); + return; + } + } + + Insets insets = getInsets(component); + + int top = insets != null ? insets.top : 0; + int left = insets != null ? insets.left : 0; + + //nSetLayerPosition(getHandle(), component.getX() - left, component.getY() - top); + nSetLayerBounds(getHandle(), component.getX() - left, component.getY() - top, component.getWidth(), component.getHeight()); + } + + public void componentShown(ComponentEvent e) { + + } + + public String toString() { + return "CanvasPeerInfoListener"; + } + }; + + component.addComponentListener(comp); + } + + private static native ByteBuffer nInitHandle(ByteBuffer surface_buffer, ByteBuffer peer_info_handle, ByteBuffer window_handle, boolean forceCALayer, boolean autoResizable, int x, int y) throws LWJGLException; + + private static native void nSetLayerPosition(ByteBuffer peer_info_handle, int x, int y); + + private static native void nSetLayerBounds(ByteBuffer peer_info_handle, int x, int y, int width, int height); + + protected void doUnlock() throws LWJGLException { + awt_surface.unlock(); + } + + /** + * Return the Insets of the Window holding the Canvas + */ + private Insets getWindowInsets(Canvas canvas) { + Container parent = canvas.getParent(); + + while (parent != null) { + if(parent instanceof Window || parent instanceof java.applet.Applet) { + return parent.getInsets(); + } + + parent = parent.getParent(); + } + + // if no parent Window or Applet found, return null + return null; + } + + private Insets getInsets(Canvas component) { + Component parent = component.getParent(); + + while (parent != null) { + if (parent instanceof Container) { + return ((Container)parent).getInsets(); + } + parent = parent.getParent(); + } + + return null; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXContextImplementation.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXContextImplementation.java new file mode 100644 index 0000000..c782d8b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXContextImplementation.java @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.LWJGLException; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +/** + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +final class MacOSXContextImplementation implements ContextImplementation { + + public ByteBuffer create(PeerInfo peer_info, IntBuffer attribs, ByteBuffer shared_context_handle) throws LWJGLException { + ByteBuffer peer_handle = peer_info.lockAndGetHandle(); + try { + return nCreate(peer_handle, shared_context_handle); + } finally { + peer_info.unlock(); + } + } + + private static native ByteBuffer nCreate(ByteBuffer peer_handle, ByteBuffer shared_context_handle) throws LWJGLException; + + public void swapBuffers() throws LWJGLException { + ContextGL current_context = ContextGL.getCurrentContext(); + if ( current_context == null ) + throw new IllegalStateException("No context is current"); + synchronized ( current_context ) { + nSwapBuffers(current_context.getHandle()); + } + } + + native long getCGLShareGroup(ByteBuffer context_handle); + + private static native void nSwapBuffers(ByteBuffer context_handle) throws LWJGLException; + + public void update(ByteBuffer context_handle) { + nUpdate(context_handle); + } + + private static native void nUpdate(ByteBuffer context_handle); + + public void releaseCurrentContext() throws LWJGLException { + nReleaseCurrentContext(); + } + + private static native void nReleaseCurrentContext() throws LWJGLException; + + public void releaseDrawable(ByteBuffer context_handle) throws LWJGLException { + clearDrawable(context_handle); + } + + private static native void clearDrawable(ByteBuffer handle) throws LWJGLException; + + static void resetView(PeerInfo peer_info, ContextGL context) throws LWJGLException { + ByteBuffer peer_handle = peer_info.lockAndGetHandle(); + try { + synchronized ( context ) { + clearDrawable(context.getHandle()); + setView(peer_handle, context.getHandle()); + } + } finally { + peer_info.unlock(); + } + } + + public void makeCurrent(PeerInfo peer_info, ByteBuffer handle) throws LWJGLException { + ByteBuffer peer_handle = peer_info.lockAndGetHandle(); + try { + setView(peer_handle, handle); + nMakeCurrent(handle); + } finally { + peer_info.unlock(); + } + } + + private static native void setView(ByteBuffer peer_handle, ByteBuffer context_handle) throws LWJGLException; + + private static native void nMakeCurrent(ByteBuffer context_handle) throws LWJGLException; + + public boolean isCurrent(ByteBuffer handle) throws LWJGLException { + boolean result = nIsCurrent(handle); + return result; + } + + private static native boolean nIsCurrent(ByteBuffer context_handle) throws LWJGLException; + + public void setSwapInterval(int value) { + ContextGL current_context = ContextGL.getCurrentContext(); + synchronized ( current_context ) { + nSetSwapInterval(current_context.getHandle(), value); + } + } + + private static native void nSetSwapInterval(ByteBuffer context_handle, int value); + + public void destroy(PeerInfo peer_info, ByteBuffer handle) throws LWJGLException { + nDestroy(handle); + } + + private static native void nDestroy(ByteBuffer context_handle) throws LWJGLException; +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXDisplay.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXDisplay.java new file mode 100644 index 0000000..612f2eb --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXDisplay.java @@ -0,0 +1,641 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + * This is the Display implementation interface. Display delegates + * to implementors of this interface. There is one DisplayImplementation + * for each supported platform. + * + * @author elias_naur + * @author mojang + * @author kappaOne + */ + +import java.awt.Canvas; +import java.awt.Robot; +import java.nio.ByteBuffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.security.PrivilegedExceptionAction; +import java.util.ArrayList; +import java.util.List; + +import org.lwjgl.input.Cursor; +import org.lwjgl.opengl.Display; +import org.lwjgl.opengl.DisplayMode; +import org.lwjgl.BufferUtils; +import org.lwjgl.MemoryUtil; +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; + +import static org.lwjgl.opengl.GL11.*; + +final class MacOSXDisplay implements DisplayImplementation { + private static final int PBUFFER_HANDLE_SIZE = 24; + private static final int GAMMA_LENGTH = 256; + + //private MacOSXCanvasListener canvas_listener; + private Canvas canvas; + private Robot robot; + private MacOSXMouseEventQueue mouse_queue; + private KeyboardEventQueue keyboard_queue; + private DisplayMode requested_mode; + + /* Members for native window use */ + private MacOSXNativeMouse mouse; + private MacOSXNativeKeyboard keyboard; + private ByteBuffer window; + private ByteBuffer context; + + private boolean skipViewportValue = false; + private static final IntBuffer current_viewport = BufferUtils.createIntBuffer(16); + + private boolean mouseInsideWindow; + + private boolean close_requested; + + private boolean native_mode = true; + + private boolean updateNativeCursor = false; + + private long currentNativeCursor = 0; + + private boolean enableHighDPI = false; + + private float scaleFactor = 1.0f; + + MacOSXDisplay() { + + } + + private native ByteBuffer nCreateWindow(int x, int y, int width, int height, boolean fullscreen, boolean undecorated, boolean resizable, boolean parented, boolean enableFullscreenModeAPI, boolean enableHighDPI, ByteBuffer peer_info_handle, ByteBuffer window_handle) throws LWJGLException; + + private native Object nGetCurrentDisplayMode(); + + private native void nGetDisplayModes(Object modesList); + + private native boolean nIsMiniaturized(ByteBuffer window_handle); + + private native boolean nIsFocused(ByteBuffer window_handle); + + private native void nSetResizable(ByteBuffer window_handle, boolean resizable); + + private native void nResizeWindow(ByteBuffer window_handle, int x, int y, int width, int height); + + private native boolean nWasResized(ByteBuffer window_handle); + + private native int nGetX(ByteBuffer window_handle); + + private native int nGetY(ByteBuffer window_handle); + + private native int nGetWidth(ByteBuffer window_handle); + + private native int nGetHeight(ByteBuffer window_handle); + + private native boolean nIsNativeMode(ByteBuffer peer_info_handle); + + private static boolean isUndecorated() { + return Display.getPrivilegedBoolean("org.lwjgl.opengl.Window.undecorated"); + } + + public void createWindow(final DrawableLWJGL drawable, DisplayMode mode, Canvas parent, int x, int y) throws LWJGLException { + boolean fullscreen = Display.isFullscreen(); + boolean resizable = Display.isResizable(); + boolean parented = (parent != null) && !fullscreen; + + // OS X fullscreen mode API is only available on OS X 10.7+ + boolean enableFullscreenModeAPI = LWJGLUtil.isMacOSXEqualsOrBetterThan(10, 7) && parent == null && + !Display.getPrivilegedBoolean("org.lwjgl.opengl.Display.disableOSXFullscreenModeAPI"); + + // OS X high DPI mode is only available on OS X 10.7+ + enableHighDPI = LWJGLUtil.isMacOSXEqualsOrBetterThan(10, 7) && parent == null && + (Display.getPrivilegedBoolean("org.lwjgl.opengl.Display.enableHighDPI") || fullscreen); + + if (parented) this.canvas = parent; + else this.canvas = null; + + close_requested = false; + + DrawableGL gl_drawable = (DrawableGL)Display.getDrawable(); + PeerInfo peer_info = gl_drawable.peer_info; + ByteBuffer peer_handle = peer_info.lockAndGetHandle(); + ByteBuffer window_handle = parented ? ((MacOSXCanvasPeerInfo)peer_info).window_handle : window; + + try { + + window = nCreateWindow(x, y, mode.getWidth(), mode.getHeight(), + fullscreen, isUndecorated(), resizable, + parented, enableFullscreenModeAPI, enableHighDPI, peer_handle, window_handle); + + if (fullscreen) { + // when going to fullscreen viewport is set to screen size by Cocoa, ignore this value + skipViewportValue = true; + // if starting in fullscreen then set initial viewport to displaymode size + if (current_viewport.get(2) == 0 && current_viewport.get(3) == 0) { + current_viewport.put(2, mode.getWidth()); + current_viewport.put(3, mode.getHeight()); + } + } + + native_mode = nIsNativeMode(peer_handle); + + if (!native_mode) { + robot = AWTUtil.createRobot(canvas); + } + + } catch (LWJGLException e) { + destroyWindow(); + throw e; + } finally { + peer_info.unlock(); + } + } + + public void doHandleQuit() { + synchronized (this) { + close_requested = true; + } + } + + public void mouseInsideWindow(boolean inside) { + synchronized (this) { + mouseInsideWindow = inside; + } + updateNativeCursor = true; + } + + public void setScaleFactor(float scale) { + synchronized (this) { + scaleFactor = scale; + } + } + + public native void nDestroyCALayer(ByteBuffer peer_info_handle); + + public native void nDestroyWindow(ByteBuffer window_handle); + + public void destroyWindow() { + + if (!native_mode) { + DrawableGL gl_drawable = (DrawableGL)Display.getDrawable(); + PeerInfo peer_info = gl_drawable.peer_info; + if (peer_info != null) { + ByteBuffer peer_handle = peer_info.getHandle(); + nDestroyCALayer(peer_handle); + } + robot = null; + } + + nDestroyWindow(window); + } + + public int getGammaRampLength() { + return GAMMA_LENGTH; + } + + public native void setGammaRamp(FloatBuffer gammaRamp) throws LWJGLException; + + public String getAdapter() { + return null; + } + + public String getVersion() { + return null; + } + + private static boolean equals(DisplayMode mode1, DisplayMode mode2) { + return mode1.getWidth() == mode2.getWidth() && mode1.getHeight() == mode2.getHeight() + && mode1.getBitsPerPixel() == mode2.getBitsPerPixel() && mode1.getFrequency() == mode2.getFrequency(); + } + + public void switchDisplayMode(DisplayMode mode) throws LWJGLException { + DisplayMode[] modes = getAvailableDisplayModes(); + + for (DisplayMode available_mode : modes) { + if (equals(available_mode, mode)) { + requested_mode = available_mode; + return; + } + } + + throw new LWJGLException(mode + " is not supported"); + } + + public void resetDisplayMode() { + requested_mode = null; + restoreGamma(); + } + + private native void restoreGamma(); + + public Object createDisplayMode(int width, int height, int bitsPerPixel, int refreshRate) { + return new DisplayMode(width, height, bitsPerPixel, refreshRate); + } + + public DisplayMode init() throws LWJGLException { + return (DisplayMode) nGetCurrentDisplayMode(); + } + + public void addDisplayMode(Object modesList, int width, int height, int bitsPerPixel, int refreshRate) { + List modes = (List) modesList; + DisplayMode displayMode = new DisplayMode(width, height, bitsPerPixel, refreshRate); + modes.add(displayMode); + } + + public DisplayMode[] getAvailableDisplayModes() throws LWJGLException { + List modes = new ArrayList(); + nGetDisplayModes(modes); // will populate the above list + modes.add(Display.getDesktopDisplayMode()); // add desktop resolution as scaled resolutions do not appear + return modes.toArray(new DisplayMode[modes.size()]); + } + + private native void nSetTitle(ByteBuffer window_handle, ByteBuffer title_buffer); + + public void setTitle(String title) { + ByteBuffer buffer = MemoryUtil.encodeUTF8(title); + nSetTitle(window, buffer); + } + + public boolean isCloseRequested() { + boolean result; + synchronized (this) { + result = close_requested; + close_requested = false; + } + return result; + } + + public boolean isVisible() { + return true; + } + + public boolean isActive() { + if (native_mode) { + return nIsFocused(window); + } + else { + return Display.getParent().hasFocus(); + } + } + + public Canvas getCanvas() { + return canvas; + } + + public boolean isDirty() { + return false; + } + + public PeerInfo createPeerInfo(PixelFormat pixel_format, ContextAttribs attribs) throws LWJGLException { + try { + return new MacOSXDisplayPeerInfo(pixel_format, attribs, true); + } catch (LWJGLException e) { + return new MacOSXDisplayPeerInfo(pixel_format, attribs, false); + } + } + + public void update() { + boolean should_update = true; + + DrawableGL drawable = (DrawableGL)Display.getDrawable(); + if (should_update) { + drawable.context.update(); + /* This is necessary to make sure the context won't "forget" about the view size */ + if (skipViewportValue) skipViewportValue = false; + else glGetInteger(GL_VIEWPORT, current_viewport); + glViewport(current_viewport.get(0), current_viewport.get(1), current_viewport.get(2), current_viewport.get(3)); + } + + if (native_mode && updateNativeCursor) { + updateNativeCursor = false; + try { + setNativeCursor(currentNativeCursor); + } catch (LWJGLException e) { + e.printStackTrace(); + } + } + } + + public void reshape(int x, int y, int width, int height) { + //if (native_mode) { + // nResizeWindow(window, x, y, width, height); + //} + } + + /* Mouse */ + public boolean hasWheel() { + return AWTUtil.hasWheel(); + } + + public int getButtonCount() { + return AWTUtil.getButtonCount(); + } + + public void createMouse() throws LWJGLException { + if (native_mode) { + mouse = new MacOSXNativeMouse(this, window); + mouse.register(); + } + else { + this.mouse_queue = new MacOSXMouseEventQueue(canvas); + mouse_queue.register(); + } + } + + public void destroyMouse() { + if (native_mode) { + // restore default native cursor + try { + MacOSXNativeMouse.setCursor(0); + } catch (LWJGLException e) {}; + + // release any mouse grab + grabMouse(false); + + if (mouse != null) { + mouse.unregister(); + } + mouse = null; + } + else { + if (mouse_queue != null) { + MacOSXMouseEventQueue.nGrabMouse(false); + mouse_queue.unregister(); + } + this.mouse_queue = null; + } + } + + public void pollMouse(IntBuffer coord_buffer, ByteBuffer buttons_buffer) { + if (native_mode) { + mouse.poll(coord_buffer, buttons_buffer); + } + else { + mouse_queue.poll(coord_buffer, buttons_buffer); + } + } + + public void readMouse(ByteBuffer buffer) { + if (native_mode) { + mouse.copyEvents(buffer); + } + else { + mouse_queue.copyEvents(buffer); + } + } + + public void grabMouse(boolean grab) { + if (native_mode) { + mouse.setGrabbed(grab); + } + else { + mouse_queue.setGrabbed(grab); + } + } + + public int getNativeCursorCapabilities() { + if (native_mode) { + return Cursor.CURSOR_ONE_BIT_TRANSPARENCY | Cursor.CURSOR_8_BIT_ALPHA | Cursor.CURSOR_ANIMATION; + } + + return AWTUtil.getNativeCursorCapabilities(); + } + + public void setCursorPosition(int x, int y) { + if (native_mode) { + if (mouse != null) { + mouse.setCursorPosition(x, y); + } + } + //else { + //MacOSXMouseEventQueue.nWarpCursor(x, y); + //} + } + + public void setNativeCursor(Object handle) throws LWJGLException { + if (native_mode) { + currentNativeCursor = getCursorHandle(handle); + if (Display.isCreated()) { + if (mouseInsideWindow) MacOSXNativeMouse.setCursor(currentNativeCursor); + else MacOSXNativeMouse.setCursor(0); // restore default cursor if outside Display + } + } + } + + public int getMinCursorSize() { + return 1; + } + + public int getMaxCursorSize() { + // as there is no max cursor size limit on OS X + // return the max cursor size as half the screen resolution + DisplayMode dm = Display.getDesktopDisplayMode(); + return Math.min(dm.getWidth(), dm.getHeight()) / 2; + } + + /* Keyboard */ + public void createKeyboard() throws LWJGLException { + if (native_mode) { + this.keyboard = new MacOSXNativeKeyboard(window); + keyboard.register(); + } + else { + this.keyboard_queue = new KeyboardEventQueue(canvas); + keyboard_queue.register(); + } + } + + public void destroyKeyboard() { + if (native_mode) { + if (keyboard != null) { + keyboard.unregister(); + } + keyboard = null; + } + else { + if (keyboard_queue != null) { + keyboard_queue.unregister(); + } + this.keyboard_queue = null; + } + } + + public void pollKeyboard(ByteBuffer keyDownBuffer) { + if (native_mode) { + keyboard.poll(keyDownBuffer); + } + else { + keyboard_queue.poll(keyDownBuffer); + } + } + + public void readKeyboard(ByteBuffer buffer) { + if (native_mode) { + keyboard.copyEvents(buffer); + } + else { + keyboard_queue.copyEvents(buffer); + } + } + + /** Native cursor handles */ + public Object createCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLException { + if (native_mode) { + long cursor = MacOSXNativeMouse.createCursor(width, height, xHotspot, yHotspot, numImages, images, delays); + return cursor; + } + else { + return AWTUtil.createCursor(width, height, xHotspot, yHotspot, numImages, images, delays); + } + } + + public void destroyCursor(Object cursor_handle) { + long handle = getCursorHandle(cursor_handle); + + // reset current cursor if same + if (currentNativeCursor == handle) { + currentNativeCursor = 0; + } + + MacOSXNativeMouse.destroyCursor(handle); + } + + private static long getCursorHandle(Object cursor_handle) { + return cursor_handle != null ? (Long)cursor_handle : 0; + } + + public int getPbufferCapabilities() { + return Pbuffer.PBUFFER_SUPPORTED; + } + + public boolean isBufferLost(PeerInfo handle) { + return false; + } + + public PeerInfo createPbuffer(int width, int height, PixelFormat pixel_format, ContextAttribs attribs, + IntBuffer pixelFormatCaps, + IntBuffer pBufferAttribs) throws LWJGLException { + return new MacOSXPbufferPeerInfo(width, height, pixel_format, attribs); + } + + public void setPbufferAttrib(PeerInfo handle, int attrib, int value) { + throw new UnsupportedOperationException(); + } + + public void bindTexImageToPbuffer(PeerInfo handle, int buffer) { + throw new UnsupportedOperationException(); + } + + public void releaseTexImageFromPbuffer(PeerInfo handle, int buffer) { + throw new UnsupportedOperationException(); + } + + /** + * Sets one or more icons for the Display. + *
    + *
  • On Windows you should supply at least one 16x16 icon and one 32x32.
  • + *
  • Linux (and similar platforms) expect one 32x32 icon.
  • + *
  • Mac OS X should be supplied one 128x128 icon
  • + *
+ * The implementation will use the supplied ByteBuffers with image data in RGBA and perform any conversions nescesarry for the specific platform. + * + * @param icons Array of icons in RGBA mode + * @return number of icons used. + */ + public int setIcon(ByteBuffer[] icons) { + /*int size = 0; + int biggest = -1; + + for (int i=0;i size) { + biggest = i; + size = icons[i].remaining(); + } + } + + if (biggest == -1) { + return 0; + } + + int width; + int height; + + IntBuffer biggest_icon = icons[biggest].asIntBuffer(); + int[] imageData = new int[biggest_icon.remaining()]; + width = height = (int) Math.sqrt(imageData.length); + biggest_icon.get(imageData); + + BufferedImage img = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB); + img.setRGB(0, 0, width, height, imageData, 0, width); + frame.setIconImage(img); + + return 1;*/ + // Don't use any icon, since Mac OS X windows don't have window icons + return 0; + } + + public int getX() { + return nGetX(window); + } + + public int getY() { + return nGetY(window); + } + + public int getWidth() { + return nGetWidth(window); + } + + public int getHeight() { + return nGetHeight(window); + } + + public boolean isInsideWindow() { + return mouseInsideWindow; + } + + public void setResizable(boolean resizable) { + nSetResizable(window, resizable); + } + + public boolean wasResized() { + return nWasResized(window); + } + + public float getPixelScaleFactor() { + return (enableHighDPI && !Display.isFullscreen()) ? scaleFactor : 1f; + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXDisplayPeerInfo.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXDisplayPeerInfo.java new file mode 100644 index 0000000..e663e80 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXDisplayPeerInfo.java @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import java.awt.Canvas; + +import org.lwjgl.LWJGLException; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +final class MacOSXDisplayPeerInfo extends MacOSXCanvasPeerInfo { + private boolean locked; + + MacOSXDisplayPeerInfo(PixelFormat pixel_format, ContextAttribs attribs, boolean support_pbuffer) throws LWJGLException { + super(pixel_format, attribs, support_pbuffer); + } + + protected void doLockAndInitHandle() throws LWJGLException { + if (locked) + throw new RuntimeException("Already locked"); + Canvas canvas = ((MacOSXDisplay)Display.getImplementation()).getCanvas(); + if (canvas != null) { + initHandle(canvas); + locked = true; + } + } + + protected void doUnlock() throws LWJGLException { + if (locked) { + super.doUnlock(); + locked = false; + } + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXGLCanvas.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXGLCanvas.java new file mode 100644 index 0000000..39f8050 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXGLCanvas.java @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + * The AWT compatible Canvas for Mac OS X. + * @author elias_naur + */ + +import java.awt.Canvas; +import java.awt.Graphics; + +final class MacOSXGLCanvas extends Canvas { + + private static final long serialVersionUID = 6916664741667434870L; + + private boolean canvas_painted; + private boolean dirty; + + public void update(Graphics g) { + paint(g); + } + + public void paint(Graphics g) { + synchronized ( this ) { + dirty = true; + canvas_painted = true; + } + } + + public boolean syncCanvasPainted() { + boolean result; + synchronized (this) { + result = canvas_painted; + canvas_painted = false; + } + return result; + } + + public boolean syncIsDirty() { + boolean result; + synchronized ( this ) { + result = dirty; + dirty = false; + } + return result; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXMouseEventQueue.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXMouseEventQueue.java new file mode 100644 index 0000000..e584aa3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXMouseEventQueue.java @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + * An AWT implementation of a LWJGL compatible Mouse event queue. + * @author elias_naur + */ + +import java.awt.Component; +import java.awt.Point; +import java.awt.Rectangle; +import java.nio.IntBuffer; + +import org.lwjgl.BufferUtils; + +final class MacOSXMouseEventQueue extends MouseEventQueue { + private final IntBuffer delta_buffer = BufferUtils.createIntBuffer(2); + + private boolean skip_event; + private static boolean is_grabbed; + + MacOSXMouseEventQueue(Component component) { + super(component); + } + + public void setGrabbed(boolean grab) { + if (is_grabbed != grab) { + super.setGrabbed(grab); + warpCursor(); + grabMouse(grab); + } + } + + private static synchronized void grabMouse(boolean grab) { + is_grabbed = grab; + if (!grab) + nGrabMouse(grab); + } + + protected void resetCursorToCenter() { + super.resetCursorToCenter(); + /* Clear accumulated deltas */ + getMouseDeltas(delta_buffer); + } + + protected void updateDeltas(long nanos) { + super.updateDeltas(nanos); + synchronized ( this ) { + getMouseDeltas(delta_buffer); + int dx = delta_buffer.get(0); + int dy = -delta_buffer.get(1); + if (skip_event) { + skip_event = false; + nGrabMouse(isGrabbed()); + return; + } + if ( dx != 0 || dy != 0 ) { + putMouseEventWithCoords((byte)-1, (byte)0, dx, dy, 0, nanos); + addDelta(dx, dy); + } + } + } + + void warpCursor() { + synchronized (this) { + // If we're going to warp the cursor position, we'll skip the next event to avoid bogus delta values + skip_event = isGrabbed(); + } + if (isGrabbed()) { + Rectangle bounds = getComponent().getBounds(); + Point location_on_screen = getComponent().getLocationOnScreen(); + int x = location_on_screen.x + bounds.width/2; + int y = location_on_screen.y + bounds.height/2; + nWarpCursor(x, y); + } + } + + private static native void getMouseDeltas(IntBuffer delta_buffer); + + private static native void nWarpCursor(int x, int y); + + static native void nGrabMouse(boolean grab); +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXNativeKeyboard.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXNativeKeyboard.java new file mode 100644 index 0000000..e2574c3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXNativeKeyboard.java @@ -0,0 +1,298 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + * A native implementation of a LWJGL compatible Keyboard event queue. + * @author elias_naur + * @author mojang + */ + +import java.awt.event.KeyEvent; +import java.awt.event.KeyListener; +import java.util.HashMap; +import java.awt.Component; +import java.nio.ByteBuffer; + +import org.lwjgl.input.Keyboard; + +final class MacOSXNativeKeyboard extends EventQueue { + private final byte[] key_states = new byte[Keyboard.KEYBOARD_SIZE]; + + /** Event scratch array */ + private final ByteBuffer event = ByteBuffer.allocate(Keyboard.EVENT_SIZE); + + private ByteBuffer window_handle; + + private boolean has_deferred_event; + private long deferred_nanos; + private int deferred_key_code; + private byte deferred_key_state; + private int deferred_character; + + private HashMap nativeToLwjglMap; + + MacOSXNativeKeyboard(ByteBuffer window_handle) { + super(Keyboard.EVENT_SIZE); + nativeToLwjglMap = new HashMap(); + initKeyboardMappings(); + this.window_handle = window_handle; + } + + private native void nRegisterKeyListener(ByteBuffer window_handle); + + private native void nUnregisterKeyListener(ByteBuffer window_handle); + + // These are from: + private void initKeyboardMappings() { + nativeToLwjglMap.put((Short)(short)0x1D, Keyboard.KEY_0); + nativeToLwjglMap.put((Short)(short)0x12, Keyboard.KEY_1); + nativeToLwjglMap.put((Short)(short)0x13, Keyboard.KEY_2); + nativeToLwjglMap.put((Short)(short)0x14, Keyboard.KEY_3); + nativeToLwjglMap.put((Short)(short)0x15, Keyboard.KEY_4); + nativeToLwjglMap.put((Short)(short)0x17, Keyboard.KEY_5); + nativeToLwjglMap.put((Short)(short)0x16, Keyboard.KEY_6); + nativeToLwjglMap.put((Short)(short)0x1A, Keyboard.KEY_7); + nativeToLwjglMap.put((Short)(short)0x1C, Keyboard.KEY_8); + nativeToLwjglMap.put((Short)(short)0x19, Keyboard.KEY_9); + nativeToLwjglMap.put((Short)(short)0x00, Keyboard.KEY_A); + nativeToLwjglMap.put((Short)(short)0x0B, Keyboard.KEY_B); + nativeToLwjglMap.put((Short)(short)0x08, Keyboard.KEY_C); + nativeToLwjglMap.put((Short)(short)0x02, Keyboard.KEY_D); + nativeToLwjglMap.put((Short)(short)0x0E, Keyboard.KEY_E); + nativeToLwjglMap.put((Short)(short)0x03, Keyboard.KEY_F); + nativeToLwjglMap.put((Short)(short)0x05, Keyboard.KEY_G); + nativeToLwjglMap.put((Short)(short)0x04, Keyboard.KEY_H); + nativeToLwjglMap.put((Short)(short)0x22, Keyboard.KEY_I); + nativeToLwjglMap.put((Short)(short)0x26, Keyboard.KEY_J); + nativeToLwjglMap.put((Short)(short)0x28, Keyboard.KEY_K); + nativeToLwjglMap.put((Short)(short)0x25, Keyboard.KEY_L); + nativeToLwjglMap.put((Short)(short)0x2E, Keyboard.KEY_M); + nativeToLwjglMap.put((Short)(short)0x2D, Keyboard.KEY_N); + nativeToLwjglMap.put((Short)(short)0x1F, Keyboard.KEY_O); + nativeToLwjglMap.put((Short)(short)0x23, Keyboard.KEY_P); + nativeToLwjglMap.put((Short)(short)0x0C, Keyboard.KEY_Q); + nativeToLwjglMap.put((Short)(short)0x0F, Keyboard.KEY_R); + nativeToLwjglMap.put((Short)(short)0x01, Keyboard.KEY_S); + nativeToLwjglMap.put((Short)(short)0x11, Keyboard.KEY_T); + nativeToLwjglMap.put((Short)(short)0x20, Keyboard.KEY_U); + nativeToLwjglMap.put((Short)(short)0x09, Keyboard.KEY_V); + nativeToLwjglMap.put((Short)(short)0x0D, Keyboard.KEY_W); + nativeToLwjglMap.put((Short)(short)0x07, Keyboard.KEY_X); + nativeToLwjglMap.put((Short)(short)0x10, Keyboard.KEY_Y); + nativeToLwjglMap.put((Short)(short)0x06, Keyboard.KEY_Z); + + nativeToLwjglMap.put((Short)(short)0x2A, Keyboard.KEY_BACKSLASH); + nativeToLwjglMap.put((Short)(short)0x2B, Keyboard.KEY_COMMA); + nativeToLwjglMap.put((Short)(short)0x18, Keyboard.KEY_EQUALS); + nativeToLwjglMap.put((Short)(short)0x21, Keyboard.KEY_LBRACKET); + nativeToLwjglMap.put((Short)(short)0x1B, Keyboard.KEY_MINUS); + nativeToLwjglMap.put((Short)(short)0x27, Keyboard.KEY_APOSTROPHE); + nativeToLwjglMap.put((Short)(short)0x1E, Keyboard.KEY_RBRACKET); + nativeToLwjglMap.put((Short)(short)0x29, Keyboard.KEY_SEMICOLON); + nativeToLwjglMap.put((Short)(short)0x2C, Keyboard.KEY_SLASH); + nativeToLwjglMap.put((Short)(short)0x2F, Keyboard.KEY_PERIOD); + nativeToLwjglMap.put((Short)(short)0x32, Keyboard.KEY_CIRCUMFLEX); + + nativeToLwjglMap.put((Short)(short)0x41, Keyboard.KEY_DECIMAL); + nativeToLwjglMap.put((Short)(short)0x43, Keyboard.KEY_MULTIPLY); + nativeToLwjglMap.put((Short)(short)0x45, Keyboard.KEY_ADD); + nativeToLwjglMap.put((Short)(short)0x47, Keyboard.KEY_CLEAR); + nativeToLwjglMap.put((Short)(short)0x4B, Keyboard.KEY_DIVIDE); + nativeToLwjglMap.put((Short)(short)0x4C, Keyboard.KEY_NUMPADENTER); + nativeToLwjglMap.put((Short)(short)0x4E, Keyboard.KEY_SUBTRACT); + nativeToLwjglMap.put((Short)(short)0x51, Keyboard.KEY_NUMPADEQUALS); + + nativeToLwjglMap.put((Short)(short)0x52, Keyboard.KEY_NUMPAD0); + nativeToLwjglMap.put((Short)(short)0x53, Keyboard.KEY_NUMPAD1); + nativeToLwjglMap.put((Short)(short)0x54, Keyboard.KEY_NUMPAD2); + nativeToLwjglMap.put((Short)(short)0x55, Keyboard.KEY_NUMPAD3); + nativeToLwjglMap.put((Short)(short)0x56, Keyboard.KEY_NUMPAD4); + nativeToLwjglMap.put((Short)(short)0x57, Keyboard.KEY_NUMPAD5); + nativeToLwjglMap.put((Short)(short)0x58, Keyboard.KEY_NUMPAD6); + nativeToLwjglMap.put((Short)(short)0x59, Keyboard.KEY_NUMPAD7); + nativeToLwjglMap.put((Short)(short)0x5B, Keyboard.KEY_NUMPAD8); + nativeToLwjglMap.put((Short)(short)0x5C, Keyboard.KEY_NUMPAD9); + + + nativeToLwjglMap.put((Short)(short)0x24, Keyboard.KEY_RETURN); + nativeToLwjglMap.put((Short)(short)0x30, Keyboard.KEY_TAB); + nativeToLwjglMap.put((Short)(short)0x31, Keyboard.KEY_SPACE); + nativeToLwjglMap.put((Short)(short)0x33, Keyboard.KEY_BACK); + nativeToLwjglMap.put((Short)(short)0x35, Keyboard.KEY_ESCAPE); + nativeToLwjglMap.put((Short)(short)0x36, Keyboard.KEY_RMETA); // not in Events.h - works on MBP + nativeToLwjglMap.put((Short)(short)0x37, Keyboard.KEY_LMETA); + nativeToLwjglMap.put((Short)(short)0x38, Keyboard.KEY_LSHIFT); + nativeToLwjglMap.put((Short)(short)0x39, Keyboard.KEY_CAPITAL); + nativeToLwjglMap.put((Short)(short)0x3A, Keyboard.KEY_LMENU); + nativeToLwjglMap.put((Short)(short)0x3B, Keyboard.KEY_LCONTROL); + nativeToLwjglMap.put((Short)(short)0x3C, Keyboard.KEY_RSHIFT); + nativeToLwjglMap.put((Short)(short)0x3D, Keyboard.KEY_RMENU); + nativeToLwjglMap.put((Short)(short)0x3E, Keyboard.KEY_RCONTROL); + + nativeToLwjglMap.put((Short)(short)0x3F, Keyboard.KEY_FUNCTION); + nativeToLwjglMap.put((Short)(short)0x77, Keyboard.KEY_END); + + nativeToLwjglMap.put((Short)(short)0x7A, Keyboard.KEY_F1); + nativeToLwjglMap.put((Short)(short)0x78, Keyboard.KEY_F2); + nativeToLwjglMap.put((Short)(short)0x63, Keyboard.KEY_F3); + nativeToLwjglMap.put((Short)(short)0x76, Keyboard.KEY_F4); + nativeToLwjglMap.put((Short)(short)0x60, Keyboard.KEY_F5); + nativeToLwjglMap.put((Short)(short)0x61, Keyboard.KEY_F6); + nativeToLwjglMap.put((Short)(short)0x62, Keyboard.KEY_F7); + nativeToLwjglMap.put((Short)(short)0x64, Keyboard.KEY_F8); + nativeToLwjglMap.put((Short)(short)0x65, Keyboard.KEY_F9); + nativeToLwjglMap.put((Short)(short)0x6D, Keyboard.KEY_F10); + nativeToLwjglMap.put((Short)(short)0x67, Keyboard.KEY_F11); + nativeToLwjglMap.put((Short)(short)0x6F, Keyboard.KEY_F12); + nativeToLwjglMap.put((Short)(short)0x69, Keyboard.KEY_F13); + nativeToLwjglMap.put((Short)(short)0x6B, Keyboard.KEY_F14); + nativeToLwjglMap.put((Short)(short)0x71, Keyboard.KEY_F15); + nativeToLwjglMap.put((Short)(short)0x6A, Keyboard.KEY_F16); + nativeToLwjglMap.put((Short)(short)0x40, Keyboard.KEY_F17); + nativeToLwjglMap.put((Short)(short)0x4F, Keyboard.KEY_F18); + nativeToLwjglMap.put((Short)(short)0x50, Keyboard.KEY_F19); + // nativeToLwjglMap.put((Short)(short)0x5A, Keyboard.KEY_F20); + + nativeToLwjglMap.put((Short)(short)0x75, Keyboard.KEY_DELETE); + nativeToLwjglMap.put((Short)(short)0x72, Keyboard.KEY_INSERT); // 'Help' in Events.h + nativeToLwjglMap.put((Short)(short)0x73, Keyboard.KEY_HOME); + // nativeToLwjglMap.put((Short)(short)0xA4, Keyboard.KEY_MUTE); + nativeToLwjglMap.put((Short)(short)0x79, Keyboard.KEY_NEXT); + nativeToLwjglMap.put((Short)(short)0x74, Keyboard.KEY_PRIOR); + // nativeToLwjglMap.put((Short)(short)0x49, Keyboard.KEY_VOLUMEDOWN); + // nativeToLwjglMap.put((Short)(short)0x48, Keyboard.KEY_VOLUMEUP); + nativeToLwjglMap.put((Short)(short)0x7B, Keyboard.KEY_LEFT); + nativeToLwjglMap.put((Short)(short)0x7C, Keyboard.KEY_RIGHT); + nativeToLwjglMap.put((Short)(short)0x7D, Keyboard.KEY_DOWN); + nativeToLwjglMap.put((Short)(short)0x7E, Keyboard.KEY_UP); + + nativeToLwjglMap.put((Short)(short)0x0A, Keyboard.KEY_SECTION); + + nativeToLwjglMap.put((Short)(short)0x6E, Keyboard.KEY_APPS); // not in Events.h + nativeToLwjglMap.put((Short)(short)0x129, Keyboard.KEY_COLON); // not in Events.h -- do we need it? + } + + public void register() { + nRegisterKeyListener(window_handle); + } + + public void unregister() { + nUnregisterKeyListener(window_handle); + } + + public void putKeyboardEvent(int key_code, byte state, int character, long nanos, boolean repeat) { + event.clear(); + event.putInt(key_code).put(state).putInt(character).putLong(nanos).put(repeat ? (byte)1 : (byte)0); + event.flip(); + putEvent(event); + } + + public synchronized void poll(ByteBuffer key_down_buffer) { + flushDeferredEvent(); + int old_position = key_down_buffer.position(); + key_down_buffer.put(key_states); + key_down_buffer.position(old_position); + } + + public synchronized void copyEvents(ByteBuffer dest) { + flushDeferredEvent(); + super.copyEvents(dest); + } + + private synchronized void handleKey(int key_code, byte state, int character, long nanos) { + if (character == KeyEvent.CHAR_UNDEFINED) + character = Keyboard.CHAR_NONE; + if (state == 1) { + boolean repeat = false; + if (has_deferred_event) { + if ((nanos == deferred_nanos && deferred_key_code == key_code)) { + has_deferred_event = false; + repeat = true; // Repeat event + } else + flushDeferredEvent(); + } + putKeyEvent(key_code, state, character, nanos, repeat); + } else { + flushDeferredEvent(); + has_deferred_event = true; + deferred_nanos = nanos; + deferred_key_code = key_code; + deferred_key_state = state; + deferred_character = character; + } + } + + private void flushDeferredEvent() { + if (has_deferred_event) { + putKeyEvent(deferred_key_code, deferred_key_state, deferred_character, deferred_nanos, false); + has_deferred_event = false; + } + } + + public void putKeyEvent(int key_code, byte state, int character, long nanos, boolean repeat) { + /* Ignore repeating presses */ + int mapped_code = getMappedKeyCode((short)key_code); + if (mapped_code < 0) { + System.out.println("Unrecognized keycode: " + key_code); + /* Unrecognized / unmapped code, do nothing */ + return; + } + if ( key_states[mapped_code] == state ) + repeat = true; + key_states[mapped_code] = state; + int key_int_char = character & 0xffff; + putKeyboardEvent(mapped_code, state, key_int_char, nanos, repeat); + } + + private int getMappedKeyCode(short key_code) { + if (nativeToLwjglMap.containsKey(key_code)) { + return nativeToLwjglMap.get(key_code); + } + return -1; + } + + public void keyPressed(int key_code, String chars, long nanos) { + // use only first character of chars returned for key press + int character = (chars == null || chars.length() == 0) ? 0 : (int)chars.charAt(0); + handleKey(key_code, (byte)1, character, nanos); + } + + public void keyReleased(int key_code, String chars, long nanos) { + // use only first character of chars returned for key release + int character = (chars == null || chars.length() == 0) ? 0 : (int)chars.charAt(0); + handleKey(key_code, (byte)0, character, nanos); + } + + public void keyTyped(KeyEvent e) { + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXNativeMouse.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXNativeMouse.java new file mode 100644 index 0000000..96a2df6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXNativeMouse.java @@ -0,0 +1,228 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + * A Cocoa implementation of a LWJGL compatible Mouse. + * @author mojang + * @author kappaOne + */ + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +import org.lwjgl.input.Mouse; +import org.lwjgl.LWJGLException; + +import java.lang.reflect.*; +import java.lang.Integer; +import java.lang.Long; + +import org.lwjgl.BufferUtils; + +final class MacOSXNativeMouse extends EventQueue { + private static final int WHEEL_SCALE = 120; + private static final int NUM_BUTTONS = 3; + + private ByteBuffer window_handle; + private MacOSXDisplay display; + + private boolean grabbed; + + /** The accumulated mouse deltas returned by poll() */ + private float accum_dx; + private float accum_dy; + private int accum_dz; + + /** The last mouse position */ + private float last_x; + private float last_y; + + /** Saved control key state for ctrl-click right button emulation */ + private boolean saved_control_state; + + private final ByteBuffer event = ByteBuffer.allocate(Mouse.EVENT_SIZE); + private IntBuffer delta_buffer = BufferUtils.createIntBuffer(2); + private int skip_event; + + private final byte[] buttons = new byte[NUM_BUTTONS]; + + MacOSXNativeMouse(MacOSXDisplay display, ByteBuffer window_handle) { + super(Mouse.EVENT_SIZE); + this.display = display; + this.window_handle = window_handle; + } + + private native void nSetCursorPosition(ByteBuffer window_handle, int x, int y); + + public static native void nGrabMouse(boolean grab); + + private native void nRegisterMouseListener(ByteBuffer window_handle); + + private native void nUnregisterMouseListener(ByteBuffer window_handle); + + private static native long nCreateCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, int images_offset, IntBuffer delays, int delays_offset) throws LWJGLException; + + private static native void nDestroyCursor(long cursor_handle); + + private static native void nSetCursor(long cursor_handle) throws LWJGLException; + + public synchronized void register() { + nRegisterMouseListener(window_handle); + } + + public static long createCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLException { + try { + return nCreateCursor(width, height, xHotspot, yHotspot, numImages, images, images.position(), delays, delays != null ? delays.position() : -1); + } catch (LWJGLException e) { + throw e; + } + } + + public static void destroyCursor(long cursor_handle) { + nDestroyCursor(cursor_handle); + } + + public static void setCursor(long cursor_handle) throws LWJGLException { + try { + nSetCursor(cursor_handle); + } catch (LWJGLException e) { + throw e; + } + } + + public synchronized void setCursorPosition(int x, int y) { + nSetCursorPosition(window_handle, x, y); + } + + public synchronized void unregister() { + nUnregisterMouseListener(window_handle); + } + + public synchronized void setGrabbed(boolean grabbed) { + this.grabbed = grabbed; + nGrabMouse(grabbed); + skip_event = 1; + accum_dx = accum_dy = 0; + } + + public synchronized boolean isGrabbed() { + return grabbed; + } + + protected void resetCursorToCenter() { + clearEvents(); + accum_dx = accum_dy = 0; + if (display != null) { + last_x = display.getWidth() / 2; + last_y = display.getHeight() / 2; + } + } + + private void putMouseEvent(byte button, byte state, int dz, long nanos) { + if (grabbed) + putMouseEventWithCoords(button, state, 0, 0, dz, nanos); + else + putMouseEventWithCoords(button, state, (int)last_x, (int)last_y, dz, nanos); + } + + protected void putMouseEventWithCoords(byte button, byte state, int coord1, int coord2, int dz, long nanos) { + event.clear(); + event.put(button).put(state).putInt(coord1).putInt(coord2).putInt(dz).putLong(nanos); + event.flip(); + putEvent(event); + } + + public synchronized void poll(IntBuffer coord_buffer, ByteBuffer buttons_buffer) { + if (grabbed) { + coord_buffer.put(0, (int)accum_dx); + coord_buffer.put(1, (int)accum_dy); + } else { + coord_buffer.put(0, (int)last_x); + coord_buffer.put(1, (int)last_y); + } + coord_buffer.put(2, accum_dz); + accum_dx = accum_dy = accum_dz = 0; + int old_position = buttons_buffer.position(); + buttons_buffer.put(buttons, 0, buttons.length); + buttons_buffer.position(old_position); + } + + private void setCursorPos(float x, float y, long nanos) { + if ( grabbed ) + return; + float dx = x - last_x; + float dy = y - last_y; + addDelta(dx, dy); + last_x = x; + last_y = y; + putMouseEventWithCoords((byte)-1, (byte)0, (int)x, (int)y, 0, nanos); + } + + protected void addDelta(float dx, float dy) { + accum_dx += dx; + accum_dy += -dy; + } + + public synchronized void setButton(int button, int state, long nanos) { + buttons[button] = (byte)state; + putMouseEvent((byte)button, (byte)state, 0, nanos); + } + + public synchronized void mouseMoved(float x, float y, float dx, float dy, float dz, long nanos) { + if (skip_event > 0) { + skip_event--; + if (skip_event == 0) { + last_x = x; + last_y = y; + } + return; + } + + if ( dz != 0 ) { // if scroll wheel event + // if no vertical wheel events, then map the horizontal wheel event to it + if (dy == 0) dy = dx; + + int wheel_amount = (int)(dy * WHEEL_SCALE); + accum_dz += wheel_amount; + putMouseEvent((byte)-1, (byte)0, wheel_amount, nanos); + } + else if (grabbed) { + if ( dx != 0 || dy != 0 ) { + putMouseEventWithCoords((byte)-1, (byte)0, (int)dx, (int)-dy, 0, nanos); + addDelta(dx, dy); + } + } else { + setCursorPos(x, y, nanos); + } + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXPbufferPeerInfo.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXPbufferPeerInfo.java new file mode 100644 index 0000000..b3e5873 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXPbufferPeerInfo.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import java.nio.ByteBuffer; + +import org.lwjgl.LWJGLException; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +final class MacOSXPbufferPeerInfo extends MacOSXPeerInfo { + MacOSXPbufferPeerInfo(int width, int height, PixelFormat pixel_format, ContextAttribs attribs) throws LWJGLException { + super(pixel_format, attribs, false, false, true, false); + nCreate(getHandle(), width, height); + } + private static native void nCreate(ByteBuffer handle, int width, int height) throws LWJGLException; + + public void destroy() { + nDestroy(getHandle()); + } + private static native void nDestroy(ByteBuffer handle); + + protected void doLockAndInitHandle() throws LWJGLException { + // NO-OP + } + + protected void doUnlock() throws LWJGLException { + // NO-OP + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXPeerInfo.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXPeerInfo.java new file mode 100644 index 0000000..ee6a697 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MacOSXPeerInfo.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import java.nio.ByteBuffer; + +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +abstract class MacOSXPeerInfo extends PeerInfo { + MacOSXPeerInfo(PixelFormat pixel_format, ContextAttribs attribs, boolean use_display_bpp, boolean support_window, boolean support_pbuffer, boolean double_buffered) throws LWJGLException { + super(createHandle()); + + boolean gl32 = attribs != null && attribs.getMajorVersion() == 3 && attribs.getMinorVersion() == 2 && attribs.isProfileCore(); + if ( gl32 && !LWJGLUtil.isMacOSXEqualsOrBetterThan(10, 7) ) + throw new LWJGLException("OpenGL 3.2 requested, but it requires MacOS X 10.7 or newer"); + + choosePixelFormat(pixel_format, gl32, use_display_bpp, support_window, support_pbuffer, double_buffered); + } + private static native ByteBuffer createHandle(); + + private void choosePixelFormat(PixelFormat pixel_format, boolean gl32, boolean use_display_bpp, boolean support_window, boolean support_pbuffer, boolean double_buffered) throws LWJGLException { + nChoosePixelFormat(getHandle(), pixel_format, gl32, use_display_bpp, support_window, support_pbuffer, double_buffered); + } + private static native void nChoosePixelFormat(ByteBuffer peer_info_handle, PixelFormat pixel_format, boolean gl32, boolean use_display_bpp, boolean support_window, boolean support_pbuffer, boolean double_buffered) throws LWJGLException; + + public void destroy() { + nDestroy(getHandle()); + } + private static native void nDestroy(ByteBuffer handle); +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MouseEventQueue.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MouseEventQueue.java new file mode 100644 index 0000000..c96f0ea --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/MouseEventQueue.java @@ -0,0 +1,270 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + * An AWT implementation of a LWJGL compatible Mouse event queue. + * @author elias_naur + */ + +import java.awt.Component; +import java.awt.Point; +import java.awt.event.MouseEvent; +import java.awt.event.MouseListener; +import java.awt.event.MouseMotionListener; +import java.awt.event.MouseWheelEvent; +import java.awt.event.MouseWheelListener; +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +import org.lwjgl.input.Mouse; + +class MouseEventQueue extends EventQueue implements MouseListener, MouseMotionListener, MouseWheelListener { + private static final int WHEEL_SCALE = 120; + public static final int NUM_BUTTONS = 3; + + private final Component component; + + private boolean grabbed; + + /** The accumulated mouse deltas returned by poll() */ + private int accum_dx; + private int accum_dy; + private int accum_dz; + + /** The last mouse position */ + private int last_x; + private int last_y; + + /** Saved control key state for ctrl-click right button emulation */ + private boolean saved_control_state; + + /** Event scratch array */ + private final ByteBuffer event = ByteBuffer.allocate(Mouse.EVENT_SIZE); + + /** Buttons array */ + private final byte[] buttons = new byte[NUM_BUTTONS]; + + MouseEventQueue(Component component) { + super(Mouse.EVENT_SIZE); + this.component = component; + } + + public synchronized void register() { + resetCursorToCenter(); + if (component != null) { + component.addMouseListener(this); + component.addMouseMotionListener(this); + component.addMouseWheelListener(this); + } + } + + public synchronized void unregister() { + if (component != null) { + component.removeMouseListener(this); + component.removeMouseMotionListener(this); + component.removeMouseWheelListener(this); + } + } + + protected Component getComponent() { + return component; + } + + public synchronized void setGrabbed(boolean grabbed) { + this.grabbed = grabbed; + resetCursorToCenter(); + } + + public synchronized boolean isGrabbed() { + return grabbed; + } + + protected int transformY(int y) { + if (component != null) { + return component.getHeight() - 1 - y; + } + return y; + } + + protected void resetCursorToCenter() { + clearEvents(); + accum_dx = accum_dy = 0; + if (component != null) { + Point cursor_location = AWTUtil.getCursorPosition(component); + if (cursor_location != null) { + last_x = cursor_location.x; + last_y = cursor_location.y; + } + } + } + + private void putMouseEvent(byte button, byte state, int dz, long nanos) { + if (grabbed) + putMouseEventWithCoords(button, state, 0, 0, dz, nanos); + else + putMouseEventWithCoords(button, state, last_x, last_y, dz, nanos); + } + + protected void putMouseEventWithCoords(byte button, byte state, int coord1, int coord2, int dz, long nanos) { + event.clear(); + event.put(button).put(state).putInt(coord1).putInt(coord2).putInt(dz).putLong(nanos); + event.flip(); + putEvent(event); + } + + public synchronized void poll(IntBuffer coord_buffer, ByteBuffer buttons_buffer) { + if ( grabbed ) { + coord_buffer.put(0, accum_dx); + coord_buffer.put(1, accum_dy); + } else { + coord_buffer.put(0, last_x); + coord_buffer.put(1, last_y); + } + coord_buffer.put(2, accum_dz); + accum_dx = accum_dy = accum_dz = 0; + int old_position = buttons_buffer.position(); + buttons_buffer.put(buttons, 0, buttons.length); + buttons_buffer.position(old_position); + } + + private void setCursorPos(int x, int y, long nanos) { + y = transformY(y); + if ( grabbed ) + return; + int dx = x - last_x; + int dy = y - last_y; + addDelta(dx, dy); + last_x = x; + last_y = y; + putMouseEventWithCoords((byte)-1, (byte)0, x, y, 0, nanos); + } + + protected void addDelta(int dx, int dy) { + accum_dx += dx; + accum_dy += dy; + } + + public void mouseClicked(MouseEvent e) { + } + + public void mouseEntered(MouseEvent e) { + } + + public void mouseExited(MouseEvent e) { + } + + private void handleButton(MouseEvent e) { + byte state; + switch (e.getID()) { + case MouseEvent.MOUSE_PRESSED: + state = 1; + break; + case MouseEvent.MOUSE_RELEASED: + state = 0; + break; + default: + throw new IllegalArgumentException("Not a valid event ID: " + e.getID()); + } + byte button; + switch (e.getButton()) { + case MouseEvent.NOBUTTON: + // Nothing to do, so return + return; + case MouseEvent.BUTTON1: + // Emulate right click if ctrl is down + if (state == 1) + saved_control_state = e.isControlDown(); + if (saved_control_state) { + if (buttons[1] == state) + return; // ignore + button = (byte)1; + } else { + button = (byte)0; + } + break; + case MouseEvent.BUTTON2: + button = (byte)2; + break; + case MouseEvent.BUTTON3: + if (buttons[1] == state) + return; // ignore + button = (byte)1; + break; + default: + throw new IllegalArgumentException("Not a valid button: " + e.getButton()); + } + setButton(button, state, e.getWhen()*1000000); + } + + public synchronized void mousePressed(MouseEvent e) { + handleButton(e); + } + + private void setButton(byte button, byte state, long nanos) { + buttons[button] = state; + putMouseEvent(button, state, 0, nanos); + } + + public synchronized void mouseReleased(MouseEvent e) { + handleButton(e); + } + + private void handleMotion(MouseEvent e) { + if (grabbed) { + updateDeltas(e.getWhen()*1000000); + } else { + setCursorPos(e.getX(), e.getY(), e.getWhen()*1000000); + } + } + + public synchronized void mouseDragged(MouseEvent e) { + handleMotion(e); + } + + public synchronized void mouseMoved(MouseEvent e) { + handleMotion(e); + } + + private void handleWheel(int amount, long nanos) { + accum_dz += amount; + putMouseEvent((byte)-1, (byte)0, amount, nanos); + } + + protected void updateDeltas(long nanos) { + } + + public synchronized void mouseWheelMoved(MouseWheelEvent e) { + int wheel_amount = -e.getWheelRotation() * WHEEL_SCALE; + handleWheel(wheel_amount, e.getWhen()*1000000); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/NVPresentVideoUtil.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/NVPresentVideoUtil.java new file mode 100644 index 0000000..3b60481 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/NVPresentVideoUtil.java @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.opengl; + +import org.lwjgl.BufferChecks; +import org.lwjgl.LWJGLUtil; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; +import java.nio.LongBuffer; + +/** + * This class exposes the platform specific functionality present in the + * NV_present_video extension. + * + * @author Spasi + * @since 20/5/2011 + */ +public final class NVPresentVideoUtil { + + private NVPresentVideoUtil() {} + + private static void checkExtension() { + if ( LWJGLUtil.CHECKS && !GLContext.getCapabilities().GL_NV_present_video ) + throw new IllegalStateException("NV_present_video is not supported"); + } + + private static ByteBuffer getPeerInfo() { + return ContextGL.getCurrentContext().getPeerInfo().getHandle(); + } + + /** + * Enumerate the available video output devices. This method is the cross-platform + * equivalent of glXEnumerateVideoDevicesNV and wglEnumerateVideoDevicesNV. Since they are + * not really compatible, this method works like the WGL version. That is, you first + * call it with a null devices buffer, get the number of devices, then call it again + * with an appropriately sized buffer. + * + * @param devices the buffer to store devices in + * + * @return the number of available video output devices + */ + public static int glEnumerateVideoDevicesNV(LongBuffer devices) { + checkExtension(); + + if ( devices != null ) + BufferChecks.checkBuffer(devices, 1); + return nglEnumerateVideoDevicesNV(getPeerInfo(), devices, devices == null ? 0 : devices.position()); + } + + private static native int nglEnumerateVideoDevicesNV(ByteBuffer peer_info, LongBuffer devices, int devices_position); + + /** + * Binds the video output device specified to one of the context's available video output slots. + * This method is the cross-platform equivalent of glXBindVideoDeviceNV and wglBindVideoDeviceNV. + * To release a video device without binding another device to the same slot, call it with + * video_device set to 0 (will use INVALID_HANDLE_VALUE on WGL). + * + * @param video_slot the video slot + * @param video_device the video device + * @param attrib_list the attributes to use + * + * @return true if the binding was successful + */ + public static boolean glBindVideoDeviceNV(int video_slot, long video_device, IntBuffer attrib_list) { + checkExtension(); + + if ( attrib_list != null ) + BufferChecks.checkNullTerminated(attrib_list); + return nglBindVideoDeviceNV(getPeerInfo(), video_slot, video_device, attrib_list, attrib_list == null ? 0 : attrib_list.position()); + } + + private static native boolean nglBindVideoDeviceNV(ByteBuffer peer_info, int video_slot, long video_device, IntBuffer attrib_list, int attrib_list_position); + + /** + * Queries an attribute associated with the current context. This method is the cross-platform + * equivalent of glXQueryContext and wglQueryCurrentContextNV. + * + * @param attrib the attribute to query + * @param value the buffer to store the value in + */ + public static boolean glQueryContextNV(int attrib, IntBuffer value) { + checkExtension(); + + BufferChecks.checkBuffer(value, 1); + ContextGL ctx = ContextGL.getCurrentContext(); + return nglQueryContextNV(ctx.getPeerInfo().getHandle(), ctx.getHandle(), attrib, value, value.position()); + } + + private static native boolean nglQueryContextNV(ByteBuffer peer_info, ByteBuffer context_handle, int attrib, IntBuffer value, int value_position); + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/NVVideoCaptureUtil.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/NVVideoCaptureUtil.java new file mode 100644 index 0000000..34484e7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/NVVideoCaptureUtil.java @@ -0,0 +1,153 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.opengl; + +import org.lwjgl.BufferChecks; +import org.lwjgl.LWJGLUtil; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; +import java.nio.LongBuffer; + +/** + * This class exposes the platform specific functionality present in the + * NV_video_capture extension. + * + * @author Spasi + * @since 20/5/2011 + */ +public final class NVVideoCaptureUtil { + + private NVVideoCaptureUtil() {} + + private static void checkExtension() { + if ( LWJGLUtil.CHECKS && !GLContext.getCapabilities().GL_NV_video_capture ) + throw new IllegalStateException("NV_video_capture is not supported"); + } + + private static ByteBuffer getPeerInfo() { + return ContextGL.getCurrentContext().getPeerInfo().getHandle(); + } + + /** + * After successfully locking a video capture device, use this method to bind it + * to the capture slot specified in the current context. This method is the cross- + * platform equivalent of glXBindVideoCaptureDeviceNV and wglBindVideoCaptureDeviceNV. + * + * @param video_slot the video slot + * @param device the video capture device + * + * @return true if the binding was successful + */ + public static boolean glBindVideoCaptureDeviceNV(int video_slot, long device) { + checkExtension(); + return nglBindVideoCaptureDeviceNV(getPeerInfo(), video_slot, device); + } + + private static native boolean nglBindVideoCaptureDeviceNV(ByteBuffer peer_info, int video_slot, long device); + + /** + * Enumerate the available video capture devices. This method is the cross-platform + * equivalent of glXEnumerateVideoCaptureDevicesNV and wglEnumerateVideoCaptureDevicesNV. + * Since they are not really compatible, this method works like the WGL version. That is, + * you first call it with a null devices buffer, get the number of devices, then call it + * again with an appropriately sized buffer. + * + * @param devices the buffer to store devices in + * + * @return the number of available video capture devices + */ + public static int glEnumerateVideoCaptureDevicesNV(LongBuffer devices) { + checkExtension(); + + if ( devices != null ) + BufferChecks.checkBuffer(devices, 1); + return nglEnumerateVideoCaptureDevicesNV(getPeerInfo(), devices, devices == null ? 0 : devices.position()); + } + + private static native int nglEnumerateVideoCaptureDevicesNV(ByteBuffer peer_info, LongBuffer devices, int devices_position); + + /** + * To lock a video capture device to a display connection, use this method. + * Before using a video capture device, it must be locked. Once a + * video capture device is locked by a process, no other process can + * lock a video capture device with the same unique ID until the lock + * is released or the process ends. + * + * @param device the device to lock + * + * @return true if the lock was successful + */ + public static boolean glLockVideoCaptureDeviceNV(long device) { + checkExtension(); + return nglLockVideoCaptureDeviceNV(getPeerInfo(), device); + } + + private static native boolean nglLockVideoCaptureDeviceNV(ByteBuffer peer_info, long device); + + /** + * Use this method to query the unique ID of the physical device backing a + * video capture device handle. + * + * @param device the device + * @param attribute the attribute to query + * @param value the buffer to store the value in + * + * @return true if the query was successful + */ + public static boolean glQueryVideoCaptureDeviceNV(long device, int attribute, IntBuffer value) { + checkExtension(); + + BufferChecks.checkBuffer(value, 1); + return nglQueryVideoCaptureDeviceNV(getPeerInfo(), device, attribute, value, value.position()); + } + + private static native boolean nglQueryVideoCaptureDeviceNV(ByteBuffer peer_info, long device, int attribute, IntBuffer value, int value_position); + + /** + * Use this method when finished capturing data on a locked video capture device + * to unlock it. + * + * @param device the device + * + * @return true if the device was unlocked successfully + */ + public static boolean glReleaseVideoCaptureDeviceNV(long device) { + checkExtension(); + return nglReleaseVideoCaptureDeviceNV(getPeerInfo(), device); + } + + private static native boolean nglReleaseVideoCaptureDeviceNV(ByteBuffer peer_info, long device); + +} + diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/OpenGLException.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/OpenGLException.java new file mode 100644 index 0000000..a1eb2b6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/OpenGLException.java @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + *

+ * Thrown by the debug build library of the LWJGL if any OpenGL operation causes an error. + * + * @author cix_foo + * @version $Revision$ + * $Id$ + */ +public class OpenGLException extends RuntimeException { + + private static final long serialVersionUID = 1L; + + /** Constructor for OpenGLException. */ + public OpenGLException(int gl_error_code) { + this(createErrorMessage(gl_error_code)); + } + + private static String createErrorMessage(int gl_error_code) { + String error_string = Util.translateGLErrorString(gl_error_code); + return error_string + " (" + gl_error_code + ")"; + } + + /** Constructor for OpenGLException. */ + public OpenGLException() { + super(); + } + + /** + * Constructor for OpenGLException. + * + * @param message + */ + public OpenGLException(String message) { + super(message); + } + + /** + * Constructor for OpenGLException. + * + * @param message + * @param cause + */ + public OpenGLException(String message, Throwable cause) { + super(message, cause); + } + + /** + * Constructor for OpenGLException. + * + * @param cause + */ + public OpenGLException(Throwable cause) { + super(cause); + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/Pbuffer.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/Pbuffer.java new file mode 100644 index 0000000..07af6d9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/Pbuffer.java @@ -0,0 +1,320 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import java.nio.IntBuffer; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.Sys; + +/** + *

+ * Pbuffer encapsulates an OpenGL pbuffer. + *

+ * + * This class is thread-safe. + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +public final class Pbuffer extends DrawableGL { + /** + * Indicates that Pbuffers can be created. + */ + public static final int PBUFFER_SUPPORTED = 1 << 0; + + /** + * Indicates that Pbuffers can be used as render-textures. + */ + public static final int RENDER_TEXTURE_SUPPORTED = 1 << 1; + + /** + * Indicates that Pbuffers can be used as non-power-of-two render-textures. + */ + public static final int RENDER_TEXTURE_RECTANGLE_SUPPORTED = 1 << 2; + + /** + * Indicates that Pbuffers can be used as depth render-textures. + */ + public static final int RENDER_DEPTH_TEXTURE_SUPPORTED = 1 << 3; + + /** + * The render-to-texture mipmap level attribute. + */ + public static final int MIPMAP_LEVEL = RenderTexture.WGL_MIPMAP_LEVEL_ARB; + + /** + * The render-to-texture cube map face attribute. + */ + public static final int CUBE_MAP_FACE = RenderTexture.WGL_CUBE_MAP_FACE_ARB; + + /** + * The render-to-texture cube map positive X face value. + */ + public static final int TEXTURE_CUBE_MAP_POSITIVE_X = RenderTexture.WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB; + + /** + * The render-to-texture cube map negative X face value. + */ + public static final int TEXTURE_CUBE_MAP_NEGATIVE_X = RenderTexture.WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB; + + /** + * The render-to-texture cube map positive Y face value. + */ + public static final int TEXTURE_CUBE_MAP_POSITIVE_Y = RenderTexture.WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB; + + /** + * The render-to-texture cube map negative Y face value. + */ + public static final int TEXTURE_CUBE_MAP_NEGATIVE_Y = RenderTexture.WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB; + + /** + * The render-to-texture cube map positive Z face value. + */ + public static final int TEXTURE_CUBE_MAP_POSITIVE_Z = RenderTexture.WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB; + + /** + * The render-to-texture cube map negative Z face value. + */ + public static final int TEXTURE_CUBE_MAP_NEGATIVE_Z = RenderTexture.WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB; + + /** + * The Pbuffer front left buffer. + */ + public static final int FRONT_LEFT_BUFFER = RenderTexture.WGL_FRONT_LEFT_ARB; + + /** + * The Pbuffer front right buffer. + */ + public static final int FRONT_RIGHT_BUFFER = RenderTexture.WGL_FRONT_RIGHT_ARB; + + /** + * The Pbuffer back left buffer. + */ + public static final int BACK_LEFT_BUFFER = RenderTexture.WGL_BACK_LEFT_ARB; + + /** + * The Pbuffer back right buffer. + */ + public static final int BACK_RIGHT_BUFFER = RenderTexture.WGL_BACK_RIGHT_ARB; + + /** + * The Pbuffer depth buffer. + */ + public static final int DEPTH_BUFFER = RenderTexture.WGL_DEPTH_COMPONENT_NV; + + /** + * Width + */ + private final int width; + + /** + * Height + */ + private final int height; + + static { + Sys.initialize(); + } + + /** + * Create an instance of a Pbuffer with a unique OpenGL context. The buffer is single-buffered. + *

+ * NOTE: The Pbuffer will have its own context that shares display lists and textures with shared_context, + * or, if shared_context is null, the Display context if it is created. The Pbuffer + * will have its own OpenGL state. Therefore, state changes to a pbuffer will not be seen in the window context and vice versa. + *

+ * + * @param width Pbuffer width + * @param height Pbuffer height + * @param pixel_format Minimum Pbuffer context properties + * @param shared_drawable If non-null the Pbuffer will share display lists and textures with it. Otherwise, the Pbuffer will share + * with the Display context (if created). + */ + public Pbuffer(int width, int height, PixelFormat pixel_format, Drawable shared_drawable) throws LWJGLException { + this(width, height, pixel_format, null, shared_drawable); + } + + /** + * Create an instance of a Pbuffer with a unique OpenGL context. The buffer is single-buffered. + *

+ * NOTE: The Pbuffer will have its own context that shares display lists and textures with shared_context, + * or, if shared_context is null, the Display context if it is created. The Pbuffer + * will have its own OpenGL state. Therefore, state changes to a pbuffer will not be seen in the window context and vice versa. + *

+ * The renderTexture parameter defines the necessary state for enabling render-to-texture. When this parameter is null, + * render-to-texture is not available. Before using render-to-texture, the Pbuffer capabilities must be queried to ensure that + * it is supported. Currently only windows platform can support this feature, so it is recommended that EXT_framebuffer_object + * or similar is used if available, for maximum portability. + *

+ * + * @param width Pbuffer width + * @param height Pbuffer height + * @param pixel_format Minimum Pbuffer context properties + * @param renderTexture + * @param shared_drawable If non-null the Pbuffer will share display lists and textures with it. Otherwise, the Pbuffer will share + * with the Display context (if created). + */ + public Pbuffer(int width, int height, PixelFormat pixel_format, RenderTexture renderTexture, Drawable shared_drawable) throws LWJGLException { + this(width, height, pixel_format, renderTexture, shared_drawable, null); + } + + /** + * Create an instance of a Pbuffer with a unique OpenGL context. The buffer is single-buffered. + *

+ * NOTE: The Pbuffer will have its own context that shares display lists and textures with shared_context, + * or, if shared_context is null, the Display context if it is created. The Pbuffer + * will have its own OpenGL state. Therefore, state changes to a pbuffer will not be seen in the window context and vice versa. + *

+ * The renderTexture parameter defines the necessary state for enabling render-to-texture. When this parameter is null, + * render-to-texture is not available. Before using render-to-texture, the Pbuffer capabilities must be queried to ensure that + * it is supported. Currently only windows platform can support this feature, so it is recommended that EXT_framebuffer_object + * or similar is used if available, for maximum portability. + *

+ * + * @param width Pbuffer width + * @param height Pbuffer height + * @param pixel_format Minimum Pbuffer context properties + * @param renderTexture + * @param shared_drawable If non-null the Pbuffer will share display lists and textures with it. Otherwise, the Pbuffer will share + * with the Display context (if created). + * @param attribs The ContextAttribs to use when creating the context. (optional, may be null) + */ + public Pbuffer(int width, int height, PixelFormat pixel_format, RenderTexture renderTexture, Drawable shared_drawable, ContextAttribs attribs) throws LWJGLException { + if (pixel_format == null) + throw new NullPointerException("Pixel format must be non-null"); + this.width = width; + this.height = height; + this.peer_info = createPbuffer(width, height, pixel_format, attribs, renderTexture); + Context shared_context = null; + if ( shared_drawable == null ) + shared_drawable = Display.getDrawable(); // May be null + if (shared_drawable != null) + shared_context = ((DrawableLWJGL)shared_drawable).getContext(); + this.context = new ContextGL(peer_info, attribs, (ContextGL)shared_context); + } + + private static PeerInfo createPbuffer(int width, int height, PixelFormat pixel_format, ContextAttribs attribs, RenderTexture renderTexture) throws LWJGLException { + if ( renderTexture == null ) { + // Though null is a perfectly valid argument, Matrox Parhelia drivers expect + // a 0 terminated list, or else they crash. Supplying NULL or 0, should + // cause the drivers to use default settings + IntBuffer defaultAttribs = BufferUtils.createIntBuffer(1); + return Display.getImplementation().createPbuffer(width, height, pixel_format, attribs, null, defaultAttribs); + } else + return Display.getImplementation().createPbuffer(width, height, pixel_format, attribs, + renderTexture.pixelFormatCaps, + renderTexture.pBufferAttribs); + } + + /** + * Method to test for validity of the buffer. If this function returns true, the buffer contents is lost. The buffer can still + * be used, but the results are undefined. The application is expected to release the buffer if needed, destroy it and recreate + * a new buffer. + * + * @return true if the buffer is lost and destroyed, false if the buffer is valid. + */ + public synchronized boolean isBufferLost() { + checkDestroyed(); + return Display.getImplementation().isBufferLost(peer_info); + } + + /** + * Gets the Pbuffer capabilities. + * + * @return a bitmask of Pbuffer capabilities. + */ + public static int getCapabilities() { + return Display.getImplementation().getPbufferCapabilities(); + } + + // ----------------------------------------------------------------------------------------- + // ------------------------------- Render-to-Texture Methods ------------------------------- + // ----------------------------------------------------------------------------------------- + + /** + * Sets a render-to-texture attribute. + *

+ * The attrib parameter can be one of MIPMAP_LEVEL and CUBE_MAP_FACE. When the attrib parameter is CUBE_MAP_FACE then the value + * parameter can be on of the following: + *

+ * TEXTURE_CUBE_MAP_POSITIVE_X TEXTURE_CUBE_MAP_NEGATIVE_X TEXTURE_CUBE_MAP_POSITIVE_Y TEXTURE_CUBE_MAP_NEGATIVE_Y + * TEXTURE_CUBE_MAP_POSITIVE_Z TEXTURE_CUBE_MAP_NEGATIVE_Z + * + * @param attrib + * @param value + */ + public synchronized void setAttrib(int attrib, int value) { + checkDestroyed(); + Display.getImplementation().setPbufferAttrib(peer_info, attrib, value); + } + + /** + * Binds the currently bound texture to the buffer specified. The buffer can be one of the following: + *

+ * FRONT_LEFT_BUFFER FRONT_RIGHT_BUFFER BACK_LEFT_BUFFER BACK_RIGHT_BUFFER DEPTH_BUFFER + * + * @param buffer + */ + public synchronized void bindTexImage(int buffer) { + checkDestroyed(); + Display.getImplementation().bindTexImageToPbuffer(peer_info, buffer); + } + + /** + * Releases the currently bound texture from the buffer specified. + * + * @param buffer + */ + public synchronized void releaseTexImage(int buffer) { + checkDestroyed(); + Display.getImplementation().releaseTexImageFromPbuffer(peer_info, buffer); + } + + /** + * @return Returns the height. + */ + public synchronized int getHeight() { + checkDestroyed(); + return height; + } + + /** + * @return Returns the width. + */ + public synchronized int getWidth() { + checkDestroyed(); + return width; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/PeerInfo.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/PeerInfo.java new file mode 100644 index 0000000..3985bf9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/PeerInfo.java @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import java.nio.ByteBuffer; + +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +abstract class PeerInfo { + private final ByteBuffer handle; + private Thread locking_thread; // Thread that has locked this PeerInfo + private int lock_count; + + protected PeerInfo(ByteBuffer handle) { + this.handle = handle; + } + + private void lockAndInitHandle() throws LWJGLException { + doLockAndInitHandle(); + } + + public final synchronized void unlock() throws LWJGLException { + if (lock_count <= 0) + throw new IllegalStateException("PeerInfo not locked!"); + if (Thread.currentThread() != locking_thread) + throw new IllegalStateException("PeerInfo already locked by " + locking_thread); + lock_count--; + if (lock_count == 0) { + doUnlock(); + locking_thread = null; + notify(); + } + } + + protected abstract void doLockAndInitHandle() throws LWJGLException; + protected abstract void doUnlock() throws LWJGLException; + + public final synchronized ByteBuffer lockAndGetHandle() throws LWJGLException { + Thread this_thread = Thread.currentThread(); + while (locking_thread != null && locking_thread != this_thread) { + try { + wait(); + } catch (InterruptedException e) { + LWJGLUtil.log("Interrupted while waiting for PeerInfo lock: " + e); + } + } + if (lock_count == 0) { + locking_thread = this_thread; + doLockAndInitHandle(); + } + lock_count++; + return getHandle(); + } + + protected final ByteBuffer getHandle() { + return handle; + } + + public void destroy() { + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/PixelFormat.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/PixelFormat.java new file mode 100644 index 0000000..2f03f21 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/PixelFormat.java @@ -0,0 +1,424 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + * This class describes pixel format properties for an OpenGL context. Instances + * of this class is used as arguments to Display.create(), Pbuffer.create() and + * AWTGLCanvas, to indicate minimum required properties. + *

+ * Instants of this class are immutable. An example of the expected way to set + * the PixelFormat property values is the following: + * PixelFormat pf = new PixelFormat().withDepthBits(24).withSamples(4).withSRGB(true); + *

+ * WARNING: Some pixel formats are known to cause troubles on certain buggy drivers. + * Example: Under Windows, specifying samples != 0 will enable the ARB + * pixel format selection path, which could trigger a crash. + * + * @author elias_naur@sourceforge.net + * @version $Revision$ + */ +public final class PixelFormat implements PixelFormatLWJGL { + + /** + * The number of bits per pixel, exluding alpha. + * This parameter is ignored in Display.create(). + */ + private int bpp; + /** The number of alpha bits. */ + private int alpha; + /** The number of depth buffer bits */ + private int depth; + /** The number of stencil bits */ + private int stencil; + /** + * The number of samples to use in anti-aliasing. + * 0 means that anti-aliasing is disabled. + */ + private int samples; + /** + * The number of COLOR_SAMPLES_NV to use for Coverage Sample Anti-aliasing (CSAA). + * When this number is greater than 0, the {@code samples} property will be treated + * as if it were the COVERAGE_SAMPLES_NV property. + *

+ * This property is currently a no-op for the MacOS implementation. + */ + private int colorSamples; + /** The number of auxiliary buffers */ + private int num_aux_buffers; + /** The number of bits per pixel in the accumulation buffer */ + private int accum_bpp; + /** The number of alpha bits in the accumulation buffer */ + private int accum_alpha; + /** Whether this format requires a stereo buffer */ + private boolean stereo; + /** Whether this format specifies a floating point format */ + private boolean floating_point; + /** + * Whether this format specifies a packed floating point format (32 bit unsigned - R11F_G11F_B10F) + * This property is currently a no-op for the MacOS implementation. + */ + private boolean floating_point_packed; + /** + * Whether this format specifies an sRGB format + * This property is currently a no-op for the MacOS implementation. + */ + private boolean sRGB; + + /** + * Default pixel format is minimum 8 bits depth, and no alpha + * nor stencil requirements. + */ + public PixelFormat() { + this(0, 8, 0); + } + + public PixelFormat(int alpha, int depth, int stencil) { + this(alpha, depth, stencil, 0); + } + + public PixelFormat(int alpha, int depth, int stencil, int samples) { + this(0, alpha, depth, stencil, samples); + } + + public PixelFormat(int bpp, int alpha, int depth, int stencil, int samples) { + this(bpp, alpha, depth, stencil, samples, 0, 0, 0, false); + } + + public PixelFormat(int bpp, int alpha, int depth, int stencil, int samples, int num_aux_buffers, int accum_bpp, int accum_alpha, boolean stereo) { + this(bpp, alpha, depth, stencil, samples, num_aux_buffers, accum_bpp, accum_alpha, stereo, false); + } + + public PixelFormat(int bpp, int alpha, int depth, int stencil, int samples, int num_aux_buffers, int accum_bpp, int accum_alpha, boolean stereo, boolean floating_point) { + this.bpp = bpp; + this.alpha = alpha; + this.depth = depth; + this.stencil = stencil; + + this.samples = samples; + + this.num_aux_buffers = num_aux_buffers; + + this.accum_bpp = accum_bpp; + this.accum_alpha = accum_alpha; + + this.stereo = stereo; + + this.floating_point = floating_point; + this.floating_point_packed = false; + this.sRGB = false; + } + + private PixelFormat(final PixelFormat pf) { + this.bpp = pf.bpp; + this.alpha = pf.alpha; + this.depth = pf.depth; + this.stencil = pf.stencil; + + this.samples = pf.samples; + this.colorSamples = pf.colorSamples; + + this.num_aux_buffers = pf.num_aux_buffers; + + this.accum_bpp = pf.accum_bpp; + this.accum_alpha = pf.accum_alpha; + + this.stereo = pf.stereo; + + this.floating_point = pf.floating_point; + this.floating_point_packed = pf.floating_point_packed; + this.sRGB = pf.sRGB; + } + + public int getBitsPerPixel() { + return bpp; + } + + /** + * Returns a new PixelFormat object with the same properties as this PixelFormat and the new bits per pixel value. + * + * @param bpp the new bits per pixel value. + * + * @return the new PixelFormat + */ + public PixelFormat withBitsPerPixel(final int bpp) { + if ( bpp < 0 ) + throw new IllegalArgumentException("Invalid number of bits per pixel specified: " + bpp); + + final PixelFormat pf = new PixelFormat(this); + pf.bpp = bpp; + return pf; + } + + public int getAlphaBits() { + return alpha; + } + + /** + * Returns a new PixelFormat object with the same properties as this PixelFormat and the new alpha bits value. + * + * @param alpha the new alpha bits value. + * + * @return the new PixelFormat + */ + public PixelFormat withAlphaBits(final int alpha) { + if ( alpha < 0 ) + throw new IllegalArgumentException("Invalid number of alpha bits specified: " + alpha); + + final PixelFormat pf = new PixelFormat(this); + pf.alpha = alpha; + return pf; + } + + public int getDepthBits() { + return depth; + } + + /** + * Returns a new PixelFormat object with the same properties as this PixelFormat and the new depth bits value. + * + * @param depth the new depth bits value. + * + * @return the new PixelFormat + */ + public PixelFormat withDepthBits(final int depth) { + if ( depth < 0 ) + throw new IllegalArgumentException("Invalid number of depth bits specified: " + depth); + + final PixelFormat pf = new PixelFormat(this); + pf.depth = depth; + return pf; + } + + public int getStencilBits() { + return stencil; + } + + /** + * Returns a new PixelFormat object with the same properties as this PixelFormat and the new stencil bits value. + * + * @param stencil the new stencil bits value. + * + * @return the new PixelFormat + */ + public PixelFormat withStencilBits(final int stencil) { + if ( stencil < 0 ) + throw new IllegalArgumentException("Invalid number of stencil bits specified: " + stencil); + + final PixelFormat pf = new PixelFormat(this); + pf.stencil = stencil; + return pf; + } + + public int getSamples() { + return samples; + } + + /** + * Returns a new PixelFormat object with the same properties as this PixelFormat and the new samples value. + * + * @param samples the new samples value. + * + * @return the new PixelFormat + */ + public PixelFormat withSamples(final int samples) { + if ( samples < 0 ) + throw new IllegalArgumentException("Invalid number of samples specified: " + samples); + + final PixelFormat pf = new PixelFormat(this); + pf.samples = samples; + return pf; + } + + /** + * Returns a new PixelFormat object with the same properties as this PixelFormat and the new color samples values. + * A value greater than 0 is valid only if the {@code samples} property is also greater than 0. Additionally, the + * color samples value needs to be lower than or equal to the {@code samples} property. + * + * @param colorSamples the new color samples value. + * + * @return the new PixelFormat + */ + public PixelFormat withCoverageSamples(final int colorSamples) { + return withCoverageSamples(colorSamples, samples); + } + + /** + * Returns a new PixelFormat object with the same properties as this PixelFormat and the new color samples + * and coverage samples values. + * + * @param colorSamples the new color samples value. This value must be lower than or equal to the coverage samples value. + * @param coverageSamples the new coverage samples value. + * + * @return the new PixelFormat + */ + public PixelFormat withCoverageSamples(final int colorSamples, final int coverageSamples) { + if ( coverageSamples < 0 || colorSamples < 0 || (coverageSamples == 0 && 0 < colorSamples) || coverageSamples < colorSamples ) + throw new IllegalArgumentException("Invalid number of coverage samples specified: " + coverageSamples + " - " + colorSamples); + + final PixelFormat pf = new PixelFormat(this); + pf.samples = coverageSamples; + pf.colorSamples = colorSamples; + return pf; + } + + public int getAuxBuffers() { + return num_aux_buffers; + } + + /** + * Returns a new PixelFormat object with the same properties as this PixelFormat and the new auxiliary buffers value. + * + * @param num_aux_buffers the new auxiliary buffers value. + * + * @return the new PixelFormat + */ + public PixelFormat withAuxBuffers(final int num_aux_buffers) { + if ( num_aux_buffers < 0 ) + throw new IllegalArgumentException("Invalid number of auxiliary buffers specified: " + num_aux_buffers); + + final PixelFormat pf = new PixelFormat(this); + pf.num_aux_buffers = num_aux_buffers; + return pf; + } + + public int getAccumulationBitsPerPixel() { + return accum_bpp; + } + + /** + * Returns a new PixelFormat object with the same properties as this PixelFormat and the new bits per pixel in the accumulation buffer value. + * + * @param accum_bpp the new bits per pixel in the accumulation buffer value. + * + * @return the new PixelFormat + */ + public PixelFormat withAccumulationBitsPerPixel(final int accum_bpp) { + if ( accum_bpp < 0 ) + throw new IllegalArgumentException("Invalid number of bits per pixel in the accumulation buffer specified: " + accum_bpp); + + final PixelFormat pf = new PixelFormat(this); + pf.accum_bpp = accum_bpp; + return pf; + } + + public int getAccumulationAlpha() { + return accum_alpha; + } + + /** + * Returns a new PixelFormat object with the same properties as this PixelFormat and the new alpha bits in the accumulation buffer value. + * + * @param accum_alpha the new alpha bits in the accumulation buffer value. + * + * @return the new PixelFormat + */ + public PixelFormat withAccumulationAlpha(final int accum_alpha) { + if ( accum_alpha < 0 ) + throw new IllegalArgumentException("Invalid number of alpha bits in the accumulation buffer specified: " + accum_alpha); + + final PixelFormat pf = new PixelFormat(this); + pf.accum_alpha = accum_alpha; + return pf; + } + + public boolean isStereo() { + return stereo; + } + + /** + * Returns a new PixelFormat object with the same properties as this PixelFormat and the new stereo value. + * + * @param stereo the new stereo value. + * + * @return the new PixelFormat + */ + public PixelFormat withStereo(final boolean stereo) { + final PixelFormat pf = new PixelFormat(this); + pf.stereo = stereo; + return pf; + } + + public boolean isFloatingPoint() { + return floating_point; + } + + /** + * Returns a new PixelFormat object with the same properties as this PixelFormat and the new floating point value. + * If floating_point is true, floating_point_packed will be reset to false. + * + * @param floating_point the new floating point value. + * + * @return the new PixelFormat + */ + public PixelFormat withFloatingPoint(final boolean floating_point) { + final PixelFormat pf = new PixelFormat(this); + pf.floating_point = floating_point; + if ( floating_point ) + pf.floating_point_packed = false; + return pf; + } + + /** + * Returns a new PixelFormat object with the same properties as this PixelFormat and the new packed floating point value. + * If floating_point_packed is true, floating_point will be reset to false. + * + * @param floating_point_packed the new packed floating point value. + * + * @return the new PixelFormat + */ + public PixelFormat withFloatingPointPacked(final boolean floating_point_packed) { + final PixelFormat pf = new PixelFormat(this); + pf.floating_point_packed = floating_point_packed; + if ( floating_point_packed ) + pf.floating_point = false; + return pf; + } + + public boolean isSRGB() { + return sRGB; + } + + /** + * Returns a new PixelFormat object with the same properties as this PixelFormat and the new sRGB value. + * + * @param sRGB the new floating point value. + * + * @return the new PixelFormat + */ + public PixelFormat withSRGB(final boolean sRGB) { + final PixelFormat pf = new PixelFormat(this); + pf.sRGB = sRGB; + return pf; + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/PixelFormatLWJGL.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/PixelFormatLWJGL.java new file mode 100644 index 0000000..81ff7bd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/PixelFormatLWJGL.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + * [INTERNAL USE ONLY] + * + * @author Spasi + */ +public interface PixelFormatLWJGL { + // Marker interface +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/ReferencesStack.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/ReferencesStack.java new file mode 100644 index 0000000..47df373 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/ReferencesStack.java @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import static org.lwjgl.opengl.GL11.*; + +class ReferencesStack { + private References[] references_stack; + private int stack_pos; + + public References getReferences() { + return references_stack[stack_pos]; + } + + public void pushState() { + int pos = ++stack_pos; + if (pos == references_stack.length) { + growStack(); + } + references_stack[pos].copy(references_stack[pos - 1], GL_ALL_CLIENT_ATTRIB_BITS); + } + + public References popState(int mask) { + References result = references_stack[stack_pos--]; + + references_stack[stack_pos].copy(result, ~mask); + result.clear(); + + return result; + } + + private void growStack() { + References[] new_references_stack = new References[references_stack.length + 1]; + System.arraycopy(references_stack, 0, new_references_stack, 0, references_stack.length); + references_stack = new_references_stack; + references_stack[references_stack.length - 1] = new References(GLContext.getCapabilities()); + } + + ReferencesStack() { + ContextCapabilities caps = GLContext.getCapabilities(); + references_stack = new References[1]; + stack_pos = 0; + for (int i = 0; i < references_stack.length; i++) + references_stack[i] = new References(caps); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/RenderTexture.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/RenderTexture.java new file mode 100644 index 0000000..08c4d36 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/RenderTexture.java @@ -0,0 +1,251 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import java.nio.IntBuffer; + +import org.lwjgl.BufferUtils; + +import static org.lwjgl.opengl.GL11.*; + +/** This class represents the state necessary for render-to-texture. */ +public final class RenderTexture { + + // ---------------------------------------------------------------------------------- + // ----------------------------- WGL_ARB_render_texture ----------------------------- + // ---------------------------------------------------------------------------------- + + /* + Accepted by the parameter of wglGetPixelFormatAttribivARB, + wglGetPixelFormatAttribfvARB, and the and + parameters of wglChoosePixelFormatARB: + */ + private static final int WGL_BIND_TO_TEXTURE_RGB_ARB = 0x2070; + private static final int WGL_BIND_TO_TEXTURE_RGBA_ARB = 0x2071; + + /* + Accepted by the parameter of wglCreatePbufferARB and + by the parameter of wglQueryPbufferARB: + */ + private static final int WGL_TEXTURE_FORMAT_ARB = 0x2072; + private static final int WGL_TEXTURE_TARGET_ARB = 0x2073; + private static final int WGL_MIPMAP_TEXTURE_ARB = 0x2074; + + /* + Accepted as a value in the parameter of + wglCreatePbufferARB and returned in the value parameter of + wglQueryPbufferARB when is WGL_TEXTURE_FORMAT_ARB: + */ + private static final int WGL_TEXTURE_RGB_ARB = 0x2075; + private static final int WGL_TEXTURE_RGBA_ARB = 0x2076; + + /* + Accepted as a value in the parameter of + wglCreatePbufferARB and returned in the value parameter of + wglQueryPbufferARB when is WGL_TEXTURE_TARGET_ARB: + */ + private static final int WGL_TEXTURE_CUBE_MAP_ARB = 0x2078; + private static final int WGL_TEXTURE_1D_ARB = 0x2079; + private static final int WGL_TEXTURE_2D_ARB = 0x207A; + private static final int WGL_NO_TEXTURE_ARB = 0x2077; + + /* + Accepted by the parameter of wglSetPbufferAttribARB and + by the parameter of wglQueryPbufferARB: + */ + static final int WGL_MIPMAP_LEVEL_ARB = 0x207B; + static final int WGL_CUBE_MAP_FACE_ARB = 0x207C; + + /* + Accepted as a value in the parameter of + wglSetPbufferAttribARB and returned in the value parameter of + wglQueryPbufferARB when is WGL_CUBE_MAP_FACE_ARB: + */ + static final int WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB = 0x207D; + static final int WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB = 0x207E; + static final int WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB = 0x207F; + static final int WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB = 0x2080; + static final int WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB = 0x2081; + static final int WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB = 0x2082; + + /* + Accepted by the parameter of wglBindTexImageARB and + wglReleaseTexImageARB: + */ + static final int WGL_FRONT_LEFT_ARB = 0x2083; + static final int WGL_FRONT_RIGHT_ARB = 0x2084; + static final int WGL_BACK_LEFT_ARB = 0x2085; + static final int WGL_BACK_RIGHT_ARB = 0x2086; + + /* + private static final int WGL_AUX0_ARB = 0x2087; + private static final int WGL_AUX1_ARB = 0x2088; + private static final int WGL_AUX2_ARB = 0x2089; + private static final int WGL_AUX3_ARB = 0x208A; + private static final int WGL_AUX4_ARB = 0x208B; + private static final int WGL_AUX5_ARB = 0x208C; + private static final int WGL_AUX6_ARB = 0x208D; + private static final int WGL_AUX7_ARB = 0x208E; + private static final int WGL_AUX8_ARB = 0x208F; + private static final int WGL_AUX9_ARB = 0x2090; + */ + + // ------------------------------------------------------------------------------------------- + // ----------------------------- WGL_NV_render_texture_rectangle ----------------------------- + // ------------------------------------------------------------------------------------------- + + /* + Accepted by the parameter of wglGetPixelFormatAttribivARB, + wglGetPixelFormatAttribfvARB, and the and + parameters of wglChoosePixelFormatARB: + */ + private static final int WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV = 0x20A0; + private static final int WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV = 0x20A1; + + /* + Accepted as a value in the parameter of wglCreatePbufferARB + and returned in the value parameter of wglQueryPbufferARB when + is WGL_TEXTURE_TARGET_ARB: + */ + private static final int WGL_TEXTURE_RECTANGLE_NV = 0x20A2; + + // --------------------------------------------------------------------------------------- + // ----------------------------- WGL_NV_render_depth_texture ----------------------------- + // --------------------------------------------------------------------------------------- + + /* + Accepted by the parameter of wglGetPixelFormatAttribivARB, + wglGetPixelFormatAttribfvARB, and the and + parameters of wglChoosePixelFormatARB: + */ + private static final int WGL_BIND_TO_TEXTURE_DEPTH_NV = 0x20A3; + private static final int WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV = 0x20A4; + + /* + Accepted by the parameter of wglCreatePbufferARB and + by the parameter of wglQueryPbufferARB: + */ + private static final int WGL_DEPTH_TEXTURE_FORMAT_NV = 0x20A5; + + /* + Accepted as a value in the parameter of wglCreatePbufferARB + and returned in the value parameter of wglQueryPbufferARB when + is WGL_DEPTH_TEXTURE_FORMAT_NV: + */ + private static final int WGL_TEXTURE_DEPTH_COMPONENT_NV = 0x20A6; + + /* + Accepted by the parameter of wglBindTexImageARB: + */ + static final int WGL_DEPTH_COMPONENT_NV = 0x20A7; + + /** The TEXTURE_1D target. */ + public static final int RENDER_TEXTURE_1D = WGL_TEXTURE_1D_ARB; + + /** The TEXTURE_2D target. */ + public static final int RENDER_TEXTURE_2D = WGL_TEXTURE_2D_ARB; + + /** The TEXTURE_RECTANGLE target. */ + public static final int RENDER_TEXTURE_RECTANGLE = WGL_TEXTURE_RECTANGLE_NV; + + /** The TEXTURE_CUBE_MAP target. */ + public static final int RENDER_TEXTURE_CUBE_MAP = WGL_TEXTURE_CUBE_MAP_ARB; + + IntBuffer pixelFormatCaps; + IntBuffer pBufferAttribs; + + /** + * Creates a RenderTexture object for enabling render-to-texture on a P-buffer. + *

+ * NOTE: Only one of useRGB and useRGBA can be true at the same time. + *

+ * NOTE: useRGB(A) and useDepth can be true at the same time, thus allowing two different render textures. + *

+ * NOTE: The target parameter can be one of the following: + *

+ * RENDER_TEXTURE_1D RENDER_TEXTURE_2D RENDER_TEXTURE_RECTANGLE RENDER_TEXTURE_CUBE_MAP + * + * @param useRGB - When true the P-buffer can be used as an RGB render texture. + * @param useRGBA - When true the P-buffer can be used as an RGBA render texture. + * @param useDepth - When true the P-buffer can be used as a depth render texture. + * @param isRectangle - When true rectangle textures will be allowed on the P-buffer. + * @param target - The texture target of the render texture. + * @param mipmaps - How many mipmap levels to allocate on the P-buffer. + */ + public RenderTexture(boolean useRGB, boolean useRGBA, boolean useDepth, boolean isRectangle, int target, int mipmaps) { + if ( useRGB && useRGBA ) + throw new IllegalArgumentException("A RenderTexture can't be both RGB and RGBA."); + + if ( mipmaps < 0 ) + throw new IllegalArgumentException("The mipmap levels can't be negative."); + + if ( isRectangle && target != RENDER_TEXTURE_RECTANGLE ) + throw new IllegalArgumentException("When the RenderTexture is rectangle the target must be RENDER_TEXTURE_RECTANGLE."); + + pixelFormatCaps = BufferUtils.createIntBuffer(4); + pBufferAttribs = BufferUtils.createIntBuffer(8); + + if ( useRGB ) { + pixelFormatCaps.put(isRectangle ? WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV : WGL_BIND_TO_TEXTURE_RGB_ARB); + pixelFormatCaps.put(GL_TRUE); + + pBufferAttribs.put(WGL_TEXTURE_FORMAT_ARB); + pBufferAttribs.put(WGL_TEXTURE_RGB_ARB); + } else if ( useRGBA ) { + pixelFormatCaps.put(isRectangle ? WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV : WGL_BIND_TO_TEXTURE_RGBA_ARB); + pixelFormatCaps.put(GL_TRUE); + + pBufferAttribs.put(WGL_TEXTURE_FORMAT_ARB); + pBufferAttribs.put(WGL_TEXTURE_RGBA_ARB); + } + + if ( useDepth ) { + pixelFormatCaps.put(isRectangle ? WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV : WGL_BIND_TO_TEXTURE_DEPTH_NV); + pixelFormatCaps.put(GL_TRUE); + + pBufferAttribs.put(WGL_DEPTH_TEXTURE_FORMAT_NV); + pBufferAttribs.put(WGL_TEXTURE_DEPTH_COMPONENT_NV); + } + + pBufferAttribs.put(WGL_TEXTURE_TARGET_ARB); + pBufferAttribs.put(target); + + if ( mipmaps != 0 ) { + pBufferAttribs.put(WGL_MIPMAP_TEXTURE_ARB); + pBufferAttribs.put(mipmaps); + } + + pixelFormatCaps.flip(); + pBufferAttribs.flip(); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/SharedDrawable.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/SharedDrawable.java new file mode 100644 index 0000000..aacd32d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/SharedDrawable.java @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.LWJGLException; + +/** + * @author Spasi + */ + +/** + * A Drawable implementation that shares its context with another Drawable. This is useful + * for background loading of resources. See org.lwjgl.test.opengl.multithread.BackgroundLoad + * for an example. + * + * @author Spasi + */ +public final class SharedDrawable extends DrawableGL { + + public SharedDrawable(final Drawable drawable) throws LWJGLException { + this.context = (ContextGL)((DrawableLWJGL)drawable).createSharedContext(); + } + + public ContextGL createSharedContext() { + throw new UnsupportedOperationException(); + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/StateStack.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/StateStack.java new file mode 100644 index 0000000..9d7755d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/StateStack.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +class StateStack { + private int[] state_stack; + private int stack_pos; + + public int getState() { + return state_stack[stack_pos]; + } + + public void pushState(int new_state) { + int pos = ++stack_pos; + if (pos == state_stack.length) { + growState(); + } + state_stack[pos] = new_state; + } + + public int popState() { + return state_stack[stack_pos--]; + } + + public void growState() { + int[] new_state_stack = new int[state_stack.length + 1]; + System.arraycopy(state_stack, 0, new_state_stack, 0, state_stack.length); + state_stack = new_state_stack; + } + + StateStack(int initial_value) { + state_stack = new int[1]; + stack_pos = 0; + state_stack[stack_pos] = initial_value; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/StateTracker.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/StateTracker.java new file mode 100644 index 0000000..6c222eb --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/StateTracker.java @@ -0,0 +1,162 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import java.nio.IntBuffer; + +import static org.lwjgl.opengl.GL15.*; +import static org.lwjgl.opengl.GL21.*; +import static org.lwjgl.opengl.GL40.*; + +final class StateTracker { + + private ReferencesStack references_stack; + private final StateStack attrib_stack; + + private boolean insideBeginEnd; + + // VAOs are not shareable between contexts, no need to sync or make this static. + private final FastIntMap vaoMap = new FastIntMap(); + + StateTracker() { + attrib_stack = new StateStack(0); + } + + /** This is called after getting function addresses. */ + void init() { + references_stack = new ReferencesStack(); + } + + static void setBeginEnd(ContextCapabilities caps, boolean inside) { + caps.tracker.insideBeginEnd = inside; + } + + boolean isBeginEnd() { + return insideBeginEnd; + } + + static void popAttrib(ContextCapabilities caps) { + caps.tracker.doPopAttrib(); + } + + private void doPopAttrib() { + references_stack.popState(attrib_stack.popState()); + } + + static void pushAttrib(ContextCapabilities caps, int mask) { + caps.tracker.doPushAttrib(mask); + } + + private void doPushAttrib(int mask) { + attrib_stack.pushState(mask); + references_stack.pushState(); + } + + static References getReferences(ContextCapabilities caps) { + return caps.tracker.references_stack.getReferences(); + } + + static void bindBuffer(ContextCapabilities caps, int target, int buffer) { + final BaseReferences references = getReferences(caps); + switch ( target ) { + case GL_ARRAY_BUFFER: + references.arrayBuffer = buffer; + break; + case GL_ELEMENT_ARRAY_BUFFER: + // When a vertex array object is currently bound, update + // the VAO state instead of client state. + if ( references.vertexArrayObject != 0 ) + caps.tracker.vaoMap.get(references.vertexArrayObject).elementArrayBuffer = buffer; + else + references.elementArrayBuffer = buffer; + break; + case GL_PIXEL_PACK_BUFFER: + references.pixelPackBuffer = buffer; + break; + case GL_PIXEL_UNPACK_BUFFER: + references.pixelUnpackBuffer = buffer; + break; + case GL_DRAW_INDIRECT_BUFFER: + references.indirectBuffer = buffer; + break; + } + } + + static void bindVAO(final ContextCapabilities caps, final int array) { + final FastIntMap vaoMap = caps.tracker.vaoMap; + if ( !vaoMap.containsKey(array) ) + vaoMap.put(array, new VAOState()); + + getReferences(caps).vertexArrayObject = array; + } + + static void deleteVAO(final ContextCapabilities caps, final IntBuffer arrays) { + for ( int i = arrays.position(); i < arrays.limit(); i++ ) + deleteVAO(caps, arrays.get(i)); + } + + static void deleteVAO(final ContextCapabilities caps, final int array) { + caps.tracker.vaoMap.remove(array); + + final BaseReferences references = getReferences(caps); + if ( references.vertexArrayObject == array ) + references.vertexArrayObject = 0; + } + + /** + * Returns the currently bound ELEMENT_ARRAY_BUFFER. If a vertex array + * object is currently bound, then the VAO state is returned instead + * of the client state. + * + * @return the currently bound ELEMENT_ARRAY_BUFFER. + */ + static int getElementArrayBufferBound(final ContextCapabilities caps) { + final BaseReferences references = getReferences(caps); + + if ( references.vertexArrayObject == 0 ) + return references.elementArrayBuffer; + else + return caps.tracker.vaoMap.get(references.vertexArrayObject).elementArrayBuffer; + } + + /** + * Simple class to help us track VAO state. Currently + * only ELEMENT_ARRAY_BUFFER_BINDING is tracked, since + * that's the only state we check from tables 6.6-6.9. + */ + private static class VAOState { + + int elementArrayBuffer; + + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/Sync.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/Sync.java new file mode 100644 index 0000000..830f8d4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/Sync.java @@ -0,0 +1,175 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.Sys; + +/** +* A highly accurate sync method that continually adapts to the system +* it runs on to provide reliable results. +* +* @author Riven +* @author kappaOne +*/ +class Sync { + + /** number of nano seconds in a second */ + private static final long NANOS_IN_SECOND = 1000L * 1000L * 1000L; + + /** The time to sleep/yield until the next frame */ + private static long nextFrame = 0; + + /** whether the initialisation code has run */ + private static boolean initialised = false; + + /** for calculating the averages the previous sleep/yield times are stored */ + private static RunningAvg sleepDurations = new RunningAvg(10); + private static RunningAvg yieldDurations = new RunningAvg(10); + + + /** + * An accurate sync method that will attempt to run at a constant frame rate. + * It should be called once every frame. + * + * @param fps - the desired frame rate, in frames per second + */ + public static void sync(int fps) { + if (fps <= 0) return; + if (!initialised) initialise(); + + try { + // sleep until the average sleep time is greater than the time remaining till nextFrame + for (long t0 = getTime(), t1; (nextFrame - t0) > sleepDurations.avg(); t0 = t1) { + Thread.sleep(1); + sleepDurations.add((t1 = getTime()) - t0); // update average sleep time + } + + // slowly dampen sleep average if too high to avoid yielding too much + sleepDurations.dampenForLowResTicker(); + + // yield until the average yield time is greater than the time remaining till nextFrame + for (long t0 = getTime(), t1; (nextFrame - t0) > yieldDurations.avg(); t0 = t1) { + Thread.yield(); + yieldDurations.add((t1 = getTime()) - t0); // update average yield time + } + } catch (InterruptedException e) { + + } + + // schedule next frame, drop frame(s) if already too late for next frame + nextFrame = Math.max(nextFrame + NANOS_IN_SECOND / fps, getTime()); + } + + /** + * This method will initialise the sync method by setting initial + * values for sleepDurations/yieldDurations and nextFrame. + * + * If running on windows it will start the sleep timer fix. + */ + private static void initialise() { + initialised = true; + + sleepDurations.init(1000 * 1000); + yieldDurations.init((int) (-(getTime() - getTime()) * 1.333)); + + nextFrame = getTime(); + + String osName = System.getProperty("os.name"); + + if (osName.startsWith("Win")) { + // On windows the sleep functions can be highly inaccurate by + // over 10ms making in unusable. However it can be forced to + // be a bit more accurate by running a separate sleeping daemon + // thread. + Thread timerAccuracyThread = new Thread(new Runnable() { + public void run() { + try { + Thread.sleep(Long.MAX_VALUE); + } catch (Exception e) {} + } + }); + + timerAccuracyThread.setName("LWJGL Timer"); + timerAccuracyThread.setDaemon(true); + timerAccuracyThread.start(); + } + } + + /** + * Get the system time in nano seconds + * + * @return will return the current time in nano's + */ + private static long getTime() { + return (Sys.getTime() * NANOS_IN_SECOND) / Sys.getTimerResolution(); + } + + private static class RunningAvg { + private final long[] slots; + private int offset; + + private static final long DAMPEN_THRESHOLD = 10 * 1000L * 1000L; // 10ms + private static final float DAMPEN_FACTOR = 0.9f; // don't change: 0.9f is exactly right! + + public RunningAvg(int slotCount) { + this.slots = new long[slotCount]; + this.offset = 0; + } + + public void init(long value) { + while (this.offset < this.slots.length) { + this.slots[this.offset++] = value; + } + } + + public void add(long value) { + this.slots[this.offset++ % this.slots.length] = value; + this.offset %= this.slots.length; + } + + public long avg() { + long sum = 0; + for (int i = 0; i < this.slots.length; i++) { + sum += this.slots[i]; + } + return sum / this.slots.length; + } + + public void dampenForLowResTicker() { + if (this.avg() > DAMPEN_THRESHOLD) { + for (int i = 0; i < this.slots.length; i++) { + this.slots[i] *= DAMPEN_FACTOR; + } + } + } + } +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/Util.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/Util.java new file mode 100644 index 0000000..2417e1c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/Util.java @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import static org.lwjgl.opengl.ARBImaging.*; +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.opengl.GL30.*; + +/** + * Simple utility class. + * + * @author cix_foo + * @version $Revision$ + */ + +public final class Util { + /** No c'tor */ + private Util() { + } + + /** + * Throws OpenGLException if glGetError() returns anything else than GL_NO_ERROR + * + */ + public static void checkGLError() throws OpenGLException { + if ( ContextCapabilities.DEBUG && GLContext.getCapabilities().tracker.isBeginEnd() ) // Do not call GetError inside a Begin/End pair. + return; + int err = glGetError(); + if ( err != GL_NO_ERROR ) { + throw new OpenGLException(err); + } + } + + /** + * Translate a GL error code to a String describing the error + */ + public static String translateGLErrorString(int error_code) { + switch (error_code) { + case GL_NO_ERROR: + return "No error"; + case GL_INVALID_ENUM: + return "Invalid enum"; + case GL_INVALID_VALUE: + return "Invalid value"; + case GL_INVALID_OPERATION: + return "Invalid operation"; + case GL_STACK_OVERFLOW: + return "Stack overflow"; + case GL_STACK_UNDERFLOW: + return "Stack underflow"; + case GL_OUT_OF_MEMORY: + return "Out of memory"; + case GL_TABLE_TOO_LARGE: + return "Table too large"; + case GL_INVALID_FRAMEBUFFER_OPERATION: + return "Invalid framebuffer operation"; + default: + return null; + } + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsAWTGLCanvasPeerInfo.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsAWTGLCanvasPeerInfo.java new file mode 100644 index 0000000..1f61b1d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsAWTGLCanvasPeerInfo.java @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import java.nio.ByteBuffer; + +import org.lwjgl.LWJGLException; + +import java.awt.Canvas; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +final class WindowsAWTGLCanvasPeerInfo extends WindowsPeerInfo { + private final Canvas component; + private final AWTSurfaceLock awt_surface = new AWTSurfaceLock(); + private final PixelFormat pixel_format; + private boolean has_pixel_format; + + WindowsAWTGLCanvasPeerInfo(Canvas component, PixelFormat pixel_format) { + this.component = component; + this.pixel_format = pixel_format; + } + + protected void doLockAndInitHandle() throws LWJGLException { + nInitHandle(awt_surface.lockAndGetHandle(component), getHandle()); + if (!has_pixel_format && pixel_format != null) { + // If we haven't applied a pixel format yet, do it now + int format = choosePixelFormat(getHdc(), component.getX(), component.getY(), pixel_format, null, true, true, false, true); + setPixelFormat(getHdc(), format); + has_pixel_format = true; + } + } + private static native void nInitHandle(ByteBuffer surface_buffer, ByteBuffer peer_info_handle) throws LWJGLException; + + protected void doUnlock() throws LWJGLException { + awt_surface.unlock(); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsCanvasImplementation.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsCanvasImplementation.java new file mode 100644 index 0000000..cb817c1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsCanvasImplementation.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import java.awt.GraphicsConfiguration; +import java.awt.GraphicsDevice; +import java.awt.Toolkit; +import java.awt.Canvas; +import java.security.PrivilegedAction; +import java.security.AccessController; + +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +final class WindowsCanvasImplementation implements AWTCanvasImplementation { + static { + // Make sure the awt stuff is properly initialised (the jawt library in particular) + Toolkit.getDefaultToolkit(); + AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + try { + System.loadLibrary("jawt"); + } catch (UnsatisfiedLinkError e) { + /* It is probably already loaded, potentially by a different ClassLoader + * so just log the exception and continue + */ + LWJGLUtil.log("Failed to load jawt: " + e.getMessage()); + } + return null; + } + }); + } + + public PeerInfo createPeerInfo(Canvas component, PixelFormat pixel_format, ContextAttribs attribs) throws LWJGLException { + return new WindowsAWTGLCanvasPeerInfo(component, pixel_format); + } + + /** + * Find a proper GraphicsConfiguration from the given GraphicsDevice and PixelFormat. + * + * @return The GraphicsConfiguration corresponding to a visual that matches the pixel format. + */ + public GraphicsConfiguration findConfiguration(GraphicsDevice device, PixelFormat pixel_format) throws LWJGLException { + /* + * It seems like the best way is to simply return null and + * use SetPixelFormat in JNI later. + */ + return null; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsContextAttribs.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsContextAttribs.java new file mode 100644 index 0000000..5367c15 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsContextAttribs.java @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + * An implementation of ContextAttribs using WGL_create_context. + * + * @author spasi + */ +final class WindowsContextAttribs implements ContextAttribsImplementation { + + private static final int WGL_CONTEXT_MAJOR_VERSION_ARB = 0x2091; + private static final int WGL_CONTEXT_MINOR_VERSION_ARB = 0x2092; + private static final int WGL_CONTEXT_LAYER_PLANE_ARB = 0x2093; + private static final int WGL_CONTEXT_FLAGS_ARB = 0x2094; + private static final int WGL_CONTEXT_PROFILE_MASK_ARB = 0x9126; + + private static final int WGL_CONTEXT_DEBUG_BIT_ARB = 0x0001; + private static final int WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB = 0x0002; + + private static final int WGL_CONTEXT_CORE_PROFILE_BIT_ARB = 0x00000001; + private static final int WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB = 0x00000002; + + WindowsContextAttribs() { + } + + public int getMajorVersionAttrib() { + return WGL_CONTEXT_MAJOR_VERSION_ARB; + } + + public int getMinorVersionAttrib() { + return WGL_CONTEXT_MINOR_VERSION_ARB; + } + + public int getLayerPlaneAttrib() { + return WGL_CONTEXT_LAYER_PLANE_ARB; + } + + public int getFlagsAttrib() { + return WGL_CONTEXT_FLAGS_ARB; + } + + public int getDebugBit() { + return WGL_CONTEXT_DEBUG_BIT_ARB; + } + + public int getForwardCompatibleBit() { + return WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB; + } + + public int getProfileMaskAttrib() { + return WGL_CONTEXT_PROFILE_MASK_ARB; + } + + public int getProfileCoreBit() { + return WGL_CONTEXT_CORE_PROFILE_BIT_ARB; + } + + public int getProfileCompatibilityBit() { + return WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB; + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsContextImplementation.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsContextImplementation.java new file mode 100644 index 0000000..08d0d9a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsContextImplementation.java @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +/** + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +final class WindowsContextImplementation implements ContextImplementation { + + public ByteBuffer create(PeerInfo peer_info, IntBuffer attribs, ByteBuffer shared_context_handle) throws LWJGLException { + ByteBuffer peer_handle = peer_info.lockAndGetHandle(); + try { + return nCreate(peer_handle, attribs, shared_context_handle); + } finally { + peer_info.unlock(); + } + } + + private static native ByteBuffer nCreate(ByteBuffer peer_handle, IntBuffer attribs_handle, ByteBuffer shared_context_handle) throws LWJGLException; + + native long getHGLRC(ByteBuffer context_handle); + + native long getHDC(ByteBuffer peer_info_handle); + + public void swapBuffers() throws LWJGLException { + ContextGL current_context = ContextGL.getCurrentContext(); + if ( current_context == null ) + throw new IllegalStateException("No context is current"); + synchronized ( current_context ) { + PeerInfo current_peer_info = current_context.getPeerInfo(); + ByteBuffer peer_handle = current_peer_info.lockAndGetHandle(); + try { + nSwapBuffers(peer_handle); + } finally { + current_peer_info.unlock(); + } + } + } + + private static native void nSwapBuffers(ByteBuffer peer_info_handle) throws LWJGLException; + + public void releaseDrawable(ByteBuffer context_handle) throws LWJGLException { + } + + public void update(ByteBuffer context_handle) { + } + + public void releaseCurrentContext() throws LWJGLException { + nReleaseCurrentContext(); + } + + private static native void nReleaseCurrentContext() throws LWJGLException; + + public void makeCurrent(PeerInfo peer_info, ByteBuffer handle) throws LWJGLException { + ByteBuffer peer_handle = peer_info.lockAndGetHandle(); + try { + nMakeCurrent(peer_handle, handle); + } finally { + peer_info.unlock(); + } + } + + private static native void nMakeCurrent(ByteBuffer peer_handle, ByteBuffer context_handle) throws LWJGLException; + + public boolean isCurrent(ByteBuffer handle) throws LWJGLException { + boolean result = nIsCurrent(handle); + return result; + } + + private static native boolean nIsCurrent(ByteBuffer context_handle) throws LWJGLException; + + public void setSwapInterval(int value) { + boolean success = nSetSwapInterval(value); + if ( !success ) + LWJGLUtil.log("Failed to set swap interval"); + Util.checkGLError(); + } + + private static native boolean nSetSwapInterval(int value); + + public void destroy(PeerInfo peer_info, ByteBuffer handle) throws LWJGLException { + nDestroy(handle); + } + + private static native void nDestroy(ByteBuffer context_handle) throws LWJGLException; +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsDisplay.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsDisplay.java new file mode 100644 index 0000000..0771063 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsDisplay.java @@ -0,0 +1,1234 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + * This is the Display implementation interface. Display delegates + * to implementors of this interface. There is one DisplayImplementation + * for each supported platform. + * @author elias_naur + */ + +import java.awt.*; +import java.awt.event.FocusAdapter; +import java.awt.event.FocusEvent; +import java.lang.reflect.Method; +import java.nio.*; +import java.util.concurrent.atomic.AtomicBoolean; + +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; +import org.lwjgl.BufferUtils; +import org.lwjgl.MemoryUtil; +import org.lwjgl.input.Cursor; +import org.lwjgl.input.Mouse; +import org.lwjgl.opengles.EGL; + +import javax.swing.*; + +final class WindowsDisplay implements DisplayImplementation { + private static final int GAMMA_LENGTH = 256; + + private static final int WM_WINDOWPOSCHANGED = 0x0047; + private static final int WM_MOVE = 0x0003; + private static final int WM_CANCELMODE = 0x001F; + private static final int WM_MOUSEMOVE = 0x0200; + private static final int WM_LBUTTONDOWN = 0x0201; + private static final int WM_LBUTTONUP = 0x0202; + private static final int WM_LBUTTONDBLCLK = 0x0203; + private static final int WM_RBUTTONDOWN = 0x0204; + private static final int WM_RBUTTONUP = 0x0205; + private static final int WM_RBUTTONDBLCLK = 0x0206; + private static final int WM_MBUTTONDOWN = 0x0207; + private static final int WM_MBUTTONUP = 0x0208; + private static final int WM_MBUTTONDBLCLK = 0x0209; + private static final int WM_XBUTTONDOWN = 0x020B; + private static final int WM_XBUTTONUP = 0x020C; + private static final int WM_XBUTTONDBLCLK = 0x020D; + private static final int WM_MOUSEWHEEL = 0x020A; + private static final int WM_CAPTURECHANGED = 0x0215; + private static final int WM_MOUSELEAVE = 0x02A3; + private static final int WM_ENTERSIZEMOVE = 0x0231; + private static final int WM_EXITSIZEMOVE = 0x0232; + private static final int WM_SIZING = 0x0214; + private static final int WM_KEYDOWN = 256; + private static final int WM_KEYUP = 257; + private static final int WM_SYSKEYUP = 261; + private static final int WM_SYSKEYDOWN = 260; + private static final int WM_SYSCHAR = 262; + private static final int WM_CHAR = 258; + private static final int WM_GETICON = 0x007F; + private static final int WM_SETICON = 0x0080; + private static final int WM_SETCURSOR = 0x0020; + private static final int WM_MOUSEACTIVATE = 0x0021; + + private static final int WM_QUIT = 0x0012; + private static final int WM_SYSCOMMAND = 0x0112; + private static final int WM_PAINT = 0x000F; + private static final int WM_KILLFOCUS = 8; + private static final int WM_SETFOCUS = 7; + + private static final int SC_SIZE = 0xF000; + private static final int SC_MOVE = 0xF010; + private static final int SC_MINIMIZE = 0xF020; + private static final int SC_MAXIMIZE = 0xF030; + private static final int SC_NEXTWINDOW = 0xF040; + private static final int SC_PREVWINDOW = 0xF050; + private static final int SC_CLOSE = 0xF060; + private static final int SC_VSCROLL = 0xF070; + private static final int SC_HSCROLL = 0xF080; + private static final int SC_MOUSEMENU = 0xF090; + private static final int SC_KEYMENU = 0xF100; + private static final int SC_ARRANGE = 0xF110; + private static final int SC_RESTORE = 0xF120; + private static final int SC_TASKLIST = 0xF130; + private static final int SC_SCREENSAVE = 0xF140; + private static final int SC_HOTKEY = 0xF150; + private static final int SC_DEFAULT = 0xF160; + private static final int SC_MONITORPOWER = 0xF170; + private static final int SC_CONTEXTHELP = 0xF180; + private static final int SC_SEPARATOR = 0xF00F; + + static final int SM_CXCURSOR = 13; + static final int SM_CYCURSOR = 14; + static final int SM_CMOUSEBUTTONS = 43; + static final int SM_MOUSEWHEELPRESENT = 75; + + private static final int SIZE_RESTORED = 0; + private static final int SIZE_MINIMIZED = 1; + private static final int SIZE_MAXIMIZED = 2; + private static final int WM_SIZE = 0x0005; + private static final int WM_ACTIVATE = 0x0006; + private static final int WA_INACTIVE = 0; + private static final int WA_ACTIVE = 1; + private static final int WA_CLICKACTIVE = 2; + private static final int SW_NORMAL = 1; + private static final int SW_SHOWMINNOACTIVE = 7; + private static final int SW_SHOWDEFAULT = 10; + private static final int SW_RESTORE = 9; + private static final int SW_MAXIMIZE = 3; + + private static final int ICON_SMALL = 0; + private static final int ICON_BIG = 1; + + private static final IntBuffer rect_buffer = BufferUtils.createIntBuffer(4); + private static final Rect rect = new Rect(); + + private static final long HWND_TOP = 0; + private static final long HWND_BOTTOM = 1; + private static final long HWND_TOPMOST = -1; + private static final long HWND_NOTOPMOST = -2; + + private static final int SWP_NOSIZE = 0x0001; + private static final int SWP_NOMOVE = 0x0002; + private static final int SWP_NOZORDER = 0x0004; + private static final int SWP_FRAMECHANGED = 0x0020; + + private static final int GWL_STYLE = -16; + private static final int GWL_EXSTYLE = -20; + + private static final int WS_THICKFRAME = 0x00040000; + private static final int WS_MAXIMIZEBOX = 0x00010000; + + private static final int HTCLIENT = 0x01; + + private static final int MK_XBUTTON1 = 0x0020; + private static final int MK_XBUTTON2 = 0x0040; + private static final int XBUTTON1 = 0x0001; + private static final int XBUTTON2 = 0x0002; + + private static WindowsDisplay current_display; + + private static boolean cursor_clipped; + private WindowsDisplayPeerInfo peer_info; + private Object current_cursor; + + private static boolean hasParent; + + private Canvas parent; + private long parent_hwnd; + private FocusAdapter parent_focus_tracker; + private AtomicBoolean parent_focused; + + private WindowsKeyboard keyboard; + private WindowsMouse mouse; + + private boolean close_requested; + private boolean is_dirty; + + private ByteBuffer current_gamma; + private ByteBuffer saved_gamma; + private DisplayMode current_mode; + + private boolean mode_set; + private boolean isMinimized; + private boolean isFocused; + private boolean redoMakeContextCurrent; + private boolean inAppActivate; + private boolean resized; + private boolean resizable; + private boolean maximized; + private int x; + private int y; + private int width; + private int height; + + private long hwnd; + private long hdc; + + private long small_icon; + private long large_icon; + private boolean iconsLoaded; + + private int captureMouse = -1; + private boolean trackingMouse; + private boolean mouseInside; + + static { + try { + Method windowProc = WindowsDisplay.class.getDeclaredMethod("handleMessage", long.class, int.class, long.class, long.class, long.class); + setWindowProc(windowProc); + } catch (NoSuchMethodException e) { + throw new RuntimeException(e); + } + } + + WindowsDisplay() { + current_display = this; + } + + public void createWindow(DrawableLWJGL drawable, DisplayMode mode, Canvas parent, int x, int y) throws LWJGLException { + close_requested = false; + is_dirty = false; + isMinimized = false; + isFocused = false; + redoMakeContextCurrent = false; + maximized = false; + this.parent = parent; + hasParent = parent != null; + parent_hwnd = parent != null ? getHwnd(parent) : 0; + this.hwnd = nCreateWindow(x, y, mode.getWidth(), mode.getHeight(), Display.isFullscreen() || isUndecorated(), parent != null, parent_hwnd); + this.resizable=false; + if (hwnd == 0) { + throw new LWJGLException("Failed to create window"); + } + this.hdc = getDC(hwnd); + if (hdc == 0) { + nDestroyWindow(hwnd); + throw new LWJGLException("Failed to get dc"); + } + + try { + if ( drawable instanceof DrawableGL ) { + int format = WindowsPeerInfo.choosePixelFormat(getHdc(), 0, 0, (PixelFormat)drawable.getPixelFormat(), null, true, true, false, true); + WindowsPeerInfo.setPixelFormat(getHdc(), format); + } else { + peer_info = new WindowsDisplayPeerInfo(true); + ((DrawableGLES)drawable).initialize(hwnd, hdc, EGL.EGL_WINDOW_BIT, (org.lwjgl.opengles.PixelFormat)drawable.getPixelFormat()); + } + peer_info.initDC(getHwnd(), getHdc()); + showWindow(getHwnd(), SW_SHOWDEFAULT); + + updateWidthAndHeight(); + + if ( parent == null ) { + if(Display.isResizable()) { + setResizable(true); + } + setForegroundWindow(getHwnd()); + } else { + parent_focused = new AtomicBoolean(false); + parent.addFocusListener(parent_focus_tracker = new FocusAdapter() { + public void focusGained(FocusEvent e) { + parent_focused.set(true); + clearAWTFocus(); + } + }); + SwingUtilities.invokeLater(new Runnable() { + public void run() { + clearAWTFocus(); + } + }); + } + grabFocus(); + } catch (LWJGLException e) { + nReleaseDC(hwnd, hdc); + nDestroyWindow(hwnd); + throw e; + } + } + + private void updateWidthAndHeight() { + getClientRect(hwnd, rect_buffer); + rect.copyFromBuffer(rect_buffer); + width = rect.right - rect.left; + height = rect.bottom - rect.top; + } + + private static native long nCreateWindow(int x, int y, int width, int height, boolean undecorated, boolean child_window, long parent_hwnd) throws LWJGLException; + + private static boolean isUndecorated() { + return Display.getPrivilegedBoolean("org.lwjgl.opengl.Window.undecorated"); + } + + private static long getHwnd(Canvas parent) throws LWJGLException { + AWTCanvasImplementation awt_impl = AWTGLCanvas.createImplementation(); + WindowsPeerInfo parent_peer_info = (WindowsPeerInfo)awt_impl.createPeerInfo(parent, null, null); + ByteBuffer parent_peer_info_handle = parent_peer_info.lockAndGetHandle(); + try { + return parent_peer_info.getHwnd(); + } finally { + parent_peer_info.unlock(); + } + } + + public void destroyWindow() { + if ( parent != null ) { + parent.removeFocusListener(parent_focus_tracker); + parent_focus_tracker = null; + } + + nReleaseDC(hwnd, hdc); + nDestroyWindow(hwnd); + freeLargeIcon(); + freeSmallIcon(); + resetCursorClipping(); + } + private static native void nReleaseDC(long hwnd, long hdc); + private static native void nDestroyWindow(long hwnd); + static void resetCursorClipping() { + if (cursor_clipped) { + try { + clipCursor(null); + } catch (LWJGLException e) { + LWJGLUtil.log("Failed to reset cursor clipping: " + e); + } + cursor_clipped = false; + } + } + + private static void getGlobalClientRect(long hwnd, Rect rect) { + rect_buffer.put(0, 0).put(1, 0); + clientToScreen(hwnd, rect_buffer); + int offset_x = rect_buffer.get(0); + int offset_y = rect_buffer.get(1); + getClientRect(hwnd, rect_buffer); + rect.copyFromBuffer(rect_buffer); + rect.offset(offset_x, offset_y); + } + + static void setupCursorClipping(long hwnd) throws LWJGLException { + cursor_clipped = true; + getGlobalClientRect(hwnd, rect); + rect.copyToBuffer(rect_buffer); + clipCursor(rect_buffer); + } + private static native void clipCursor(IntBuffer rect) throws LWJGLException; + + public void switchDisplayMode(DisplayMode mode) throws LWJGLException { + nSwitchDisplayMode(mode); + current_mode = mode; + mode_set = true; + } + private static native void nSwitchDisplayMode(DisplayMode mode) throws LWJGLException; + + /* + * Called when the application is alt-tabbed to or from + */ + private void appActivate(boolean active) { + if (inAppActivate) { + return; + } + inAppActivate = true; + isFocused = active; + if (active) { + if (Display.isFullscreen()) { + restoreDisplayMode(); + } + if (parent == null) { + setForegroundWindow(getHwnd()); + } + setFocus(getHwnd()); + redoMakeContextCurrent = true; + if (Display.isFullscreen()) + updateClipping(); + + if ( keyboard != null ) + keyboard.fireLostKeyEvents(); + } else if (Display.isFullscreen()) { + showWindow(getHwnd(), SW_SHOWMINNOACTIVE); + resetDisplayMode(); + } else + updateClipping(); + updateCursor(); + inAppActivate = false; + } + private static native void showWindow(long hwnd, int mode); + private static native void setForegroundWindow(long hwnd); + private static native void setFocus(long hwnd); + + private void clearAWTFocus() { + // This is needed so that the last focused component AWT remembers is NOT our Canvas + WindowsDisplay.this.parent.setFocusable(false); + WindowsDisplay.this.parent.setFocusable(true); + + // Clear AWT focus owner + KeyboardFocusManager.getCurrentKeyboardFocusManager().clearGlobalFocusOwner(); + } + + private void grabFocus() { + if ( parent == null ) + setFocus(getHwnd()); + else + SwingUtilities.invokeLater(new Runnable() { + public void run() { + parent.requestFocus(); + } + }); + } + + private void restoreDisplayMode() { + try { + doSetGammaRamp(current_gamma); + } catch (LWJGLException e) { + LWJGLUtil.log("Failed to restore gamma: " + e.getMessage()); + } + + if (!mode_set) { + mode_set = true; + try { + nSwitchDisplayMode(current_mode); + } catch (LWJGLException e) { + LWJGLUtil.log("Failed to restore display mode: " + e.getMessage()); + } + } + } + + public void resetDisplayMode() { + try { + doSetGammaRamp(saved_gamma); + } catch (LWJGLException e) { + LWJGLUtil.log("Failed to reset gamma ramp: " + e.getMessage()); + } + current_gamma = saved_gamma; + if (mode_set) { + mode_set = false; + nResetDisplayMode(); + } + resetCursorClipping(); + } + private static native void nResetDisplayMode(); + + public int getGammaRampLength() { + return GAMMA_LENGTH; + } + + public void setGammaRamp(FloatBuffer gammaRamp) throws LWJGLException { + doSetGammaRamp(convertToNativeRamp(gammaRamp)); + } + private static native ByteBuffer convertToNativeRamp(FloatBuffer gamma_ramp) throws LWJGLException; + private static native ByteBuffer getCurrentGammaRamp() throws LWJGLException; + + private void doSetGammaRamp(ByteBuffer native_gamma) throws LWJGLException { + nSetGammaRamp(native_gamma); + current_gamma = native_gamma; + } + private static native void nSetGammaRamp(ByteBuffer native_ramp) throws LWJGLException; + + public String getAdapter() { + try { + String maxObjNo = WindowsRegistry.queryRegistrationKey( + WindowsRegistry.HKEY_LOCAL_MACHINE, + "HARDWARE\\DeviceMap\\Video", + "MaxObjectNumber"); + int maxObjectNumber = maxObjNo.charAt(0); + String vga_driver_value = ""; + for(int i=0;i0) { + WindowsFileVersion version = nGetVersion(drivers[0] + ".dll"); + if (version != null) + return version.toString(); + } + } + return null; + } + private native WindowsFileVersion nGetVersion(String driver); + + public DisplayMode init() throws LWJGLException { + current_gamma = saved_gamma = getCurrentGammaRamp(); + return current_mode = getCurrentDisplayMode(); + } + private static native DisplayMode getCurrentDisplayMode() throws LWJGLException; + + public void setTitle(String title) { + ByteBuffer buffer = MemoryUtil.encodeUTF16(title); + nSetTitle(hwnd, MemoryUtil.getAddress0(buffer)); + } + private static native void nSetTitle(long hwnd, long title); + + public boolean isCloseRequested() { + boolean saved = close_requested; + close_requested = false; + return saved; + } + + public boolean isVisible() { + return !isMinimized; + } + + public boolean isActive() { + return isFocused; + } + + public boolean isDirty() { + boolean saved = is_dirty; + is_dirty = false; + return saved; + } + + public PeerInfo createPeerInfo(PixelFormat pixel_format, ContextAttribs attribs) throws LWJGLException { + peer_info = new WindowsDisplayPeerInfo(false); + return peer_info; + } + + public void update() { + nUpdate(); + + if ( !isFocused && parent != null && parent_focused.compareAndSet(true, false) ) { + setFocus(getHwnd()); + } + + if (redoMakeContextCurrent) { + redoMakeContextCurrent = false; + /** + * WORKAROUND: + * Making the context current (redundantly) when the window + * is maximized helps some gfx cards recover from fullscreen + */ + try { + Context context = ((DrawableLWJGL)Display.getDrawable()).getContext(); + if (context != null && context.isCurrent()) + context.makeCurrent(); + } catch (LWJGLException e) { + LWJGLUtil.log("Exception occurred while trying to make context current: " + e); + } + } + } + private static native void nUpdate(); + + public void reshape(int x, int y, int width, int height) { + nReshape(getHwnd(), x, y, width, height, Display.isFullscreen() || isUndecorated(), parent != null); + } + private static native void nReshape(long hwnd, int x, int y, int width, int height, boolean undecorated, boolean child); + public native DisplayMode[] getAvailableDisplayModes() throws LWJGLException; + + /* Mouse */ + public boolean hasWheel() { + return mouse.hasWheel(); + } + + public int getButtonCount() { + return mouse.getButtonCount(); + } + + public void createMouse() throws LWJGLException { + mouse = new WindowsMouse(getHwnd()); + } + + public void destroyMouse() { + if (mouse != null) + mouse.destroy(); + mouse = null; + } + + public void pollMouse(IntBuffer coord_buffer, ByteBuffer buttons) { + mouse.poll(coord_buffer, buttons); + } + + public void readMouse(ByteBuffer buffer) { + mouse.read(buffer); + } + + public void grabMouse(boolean grab) { + mouse.grab(grab, shouldGrab()); + updateCursor(); + } + + public int getNativeCursorCapabilities() { + return Cursor.CURSOR_ONE_BIT_TRANSPARENCY; + } + + public void setCursorPosition(int x, int y) { + getGlobalClientRect(getHwnd(), rect); + int transformed_x = rect.left + x; + int transformed_y = rect.bottom - 1 - y; + nSetCursorPosition(transformed_x, transformed_y); + setMousePosition(x, y); + } + private static native void nSetCursorPosition(int x, int y); + + public void setNativeCursor(Object handle) throws LWJGLException { + current_cursor = handle; + updateCursor(); + } + + private void updateCursor() { + try { + if (mouse != null && shouldGrab()) + nSetNativeCursor(getHwnd(), mouse.getBlankCursor()); + else + nSetNativeCursor(getHwnd(), current_cursor); + } catch (LWJGLException e) { + LWJGLUtil.log("Failed to update cursor: " + e); + } + } + static native void nSetNativeCursor(long hwnd, Object handle) throws LWJGLException; + + public int getMinCursorSize() { + return getSystemMetrics(SM_CXCURSOR); + } + + public int getMaxCursorSize() { + return getSystemMetrics(SM_CXCURSOR); + } + + static native int getSystemMetrics(int index); + + private static native long getDllInstance(); + + private long getHwnd() { + return hwnd; + } + + private long getHdc() { + return hdc; + } + + private static native long getDC(long hwnd); + private static native long getDesktopWindow(); + private static native long getForegroundWindow(); + + static void centerCursor(long hwnd) { + if (getForegroundWindow() != hwnd && !hasParent) + return; + getGlobalClientRect(hwnd, rect); + int local_offset_x = rect.left; + int local_offset_y = rect.top; + /* -- This is wrong on multi-monitor setups + getGlobalClientRect(getDesktopWindow(), rect2); + Rect.intersect(rect, rect2, rect); + */ + int center_x = (rect.left + rect.right)/2; + int center_y = (rect.top + rect.bottom)/2; + nSetCursorPosition(center_x, center_y); + int local_x = center_x - local_offset_x; + int local_y = center_y - local_offset_y; + if (current_display != null) + current_display.setMousePosition(local_x, transformY(hwnd, local_y)); + } + + private void setMousePosition(int x, int y) { + if (mouse != null) + mouse.setPosition(x, y); + } + + /* Keyboard */ + public void createKeyboard() throws LWJGLException { + keyboard = new WindowsKeyboard(); + } + + public void destroyKeyboard() { + keyboard = null; + } + + public void pollKeyboard(ByteBuffer keyDownBuffer) { + keyboard.poll(keyDownBuffer); + } + + public void readKeyboard(ByteBuffer buffer) { + keyboard.read(buffer); + } + +// public native int isStateKeySet(int key); + + public static native ByteBuffer nCreateCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, int images_offset, IntBuffer delays, int delays_offset) throws LWJGLException; + + public Object createCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLException { + return doCreateCursor(width, height, xHotspot, yHotspot, numImages, images, delays); + } + + static Object doCreateCursor(int width, int height, int xHotspot, int yHotspot, int numImages, IntBuffer images, IntBuffer delays) throws LWJGLException { + return nCreateCursor(width, height, xHotspot, yHotspot, numImages, images, images.position(), delays, delays != null ? delays.position() : -1); + } + + public void destroyCursor(Object cursorHandle) { + doDestroyCursor(cursorHandle); + } + static native void doDestroyCursor(Object cursorHandle); + + public int getPbufferCapabilities() { + try { + // Return the capabilities of a minimum pixel format + return nGetPbufferCapabilities(new PixelFormat(0, 0, 0, 0, 0, 0, 0, 0, false)); + } catch (LWJGLException e) { + LWJGLUtil.log("Exception occurred while determining pbuffer capabilities: " + e); + return 0; + } + } + private native int nGetPbufferCapabilities(PixelFormat format) throws LWJGLException; + + public boolean isBufferLost(PeerInfo handle) { + return ((WindowsPbufferPeerInfo)handle).isBufferLost(); + } + + public PeerInfo createPbuffer(int width, int height, PixelFormat pixel_format, ContextAttribs attribs, + IntBuffer pixelFormatCaps, + IntBuffer pBufferAttribs) throws LWJGLException { + return new WindowsPbufferPeerInfo(width, height, pixel_format, pixelFormatCaps, pBufferAttribs); + } + + public void setPbufferAttrib(PeerInfo handle, int attrib, int value) { + ((WindowsPbufferPeerInfo)handle).setPbufferAttrib(attrib, value); + } + + public void bindTexImageToPbuffer(PeerInfo handle, int buffer) { + ((WindowsPbufferPeerInfo)handle).bindTexImageToPbuffer(buffer); + } + + public void releaseTexImageFromPbuffer(PeerInfo handle, int buffer) { + ((WindowsPbufferPeerInfo)handle).releaseTexImageFromPbuffer(buffer); + } + + private void freeSmallIcon() { + if (small_icon != 0) { + destroyIcon(small_icon); + small_icon = 0; + } + } + + private void freeLargeIcon() { + if (large_icon != 0) { + destroyIcon(large_icon); + large_icon = 0; + } + } + + /** + * Sets one or more icons for the Display. + *
    + *
  • On Windows you should supply at least one 16x16 icon and one 32x32.
  • + *
  • Linux (and similar platforms) expect one 32x32 icon.
  • + *
  • Mac OS X should be supplied one 128x128 icon
  • + *
+ * The implementation will use the supplied ByteBuffers with image data in RGBA and perform any conversions nescesarry for the specific platform. + * + * @param icons Array of icons in RGBA mode + * @return number of icons used. + */ + public int setIcon(ByteBuffer[] icons) { + boolean done_small = false; + boolean done_large = false; + int used = 0; + + int small_icon_size = 16; + int large_icon_size = 32; + for ( ByteBuffer icon : icons ) { + int size = icon.limit() / 4; + + if ( (((int)Math.sqrt(size)) == small_icon_size) && (!done_small) ) { + long small_new_icon = createIcon(small_icon_size, small_icon_size, icon.asIntBuffer()); + sendMessage(hwnd, WM_SETICON, ICON_SMALL, small_new_icon); + freeSmallIcon(); + small_icon = small_new_icon; + used++; + done_small = true; + } + if ( (((int)Math.sqrt(size)) == large_icon_size) && (!done_large) ) { + long large_new_icon = createIcon(large_icon_size, large_icon_size, icon.asIntBuffer()); + sendMessage(hwnd, WM_SETICON, ICON_BIG, large_new_icon); + freeLargeIcon(); + large_icon = large_new_icon; + used++; + done_large = true; + + // Problem: The taskbar icon won't update until Windows sends a WM_GETICON to our window proc and we reply. But this method is usually called + // on init and it might take a while before the next call to nUpdate (because of resources being loaded, etc). So we wait for the next + // WM_GETICON message (usually received about 100ms after WM_SETICON) to make sure the taskbar icon has updated before we return to the user. + // (We wouldn't need to do this if the event loop was running continuously on its own thread.) + iconsLoaded = false; + + // Track how long the wait takes and give up at 500ms, just in case. + long time = System.nanoTime(); + long MAX_WAIT = 500L * 1000L * 1000L; + while ( true ) { + nUpdate(); + if ( iconsLoaded || MAX_WAIT < System.nanoTime() - time ) + break; + + Thread.yield(); + } + } + } + + return used; + } + private static native long createIcon(int width, int height, IntBuffer icon); + private static native void destroyIcon(long handle); + private static native long sendMessage(long hwnd, long msg, long wparam, long lparam); + private static native long setWindowLongPtr(long hwnd, int nindex, long longPtr); + private static native long getWindowLongPtr(long hwnd, int nindex); + private static native boolean setWindowPos(long hwnd, long hwnd_after, int x, int y, int cx, int cy, long uflags); + + private void handleMouseButton(int button, int state, long millis) { + if (mouse != null) { + mouse.handleMouseButton((byte)button, (byte)state, millis); + + // need to capture? + if (captureMouse == -1 && button != -1 && state == 1) { + captureMouse = button; + nSetCapture(hwnd); + } + + // done with capture? + if(captureMouse != -1 && button == captureMouse && state == 0) { + captureMouse = -1; + nReleaseCapture(); + } + } + } + + private boolean shouldGrab() { + return !isMinimized && isFocused && Mouse.isGrabbed(); + } + + private void handleMouseMoved(int x, int y, long millis) { + if (mouse != null) { + mouse.handleMouseMoved(x, y, millis, shouldGrab()); + } + } + + private static native long nSetCapture(long hwnd); + private static native boolean nReleaseCapture(); + + private void handleMouseScrolled(int amount, long millis) { + if (mouse != null) + mouse.handleMouseScrolled(amount, millis); + } + + private static native void getClientRect(long hwnd, IntBuffer rect); + + private void handleChar(long wParam, long lParam, long millis) { + byte previous_state = (byte)((lParam >>> 30) & 0x1); + byte state = (byte)(1 - ((lParam >>> 31) & 0x1)); + boolean repeat = state == previous_state; + if (keyboard != null) + keyboard.handleChar((int)(wParam & 0xFFFF), millis, repeat); + } + + private void handleKeyButton(long wParam, long lParam, long millis) { + if ( keyboard == null ) + return; + + byte previous_state = (byte)((lParam >>> 30) & 0x1); + byte state = (byte)(1 - ((lParam >>> 31) & 0x1)); + boolean repeat = state == previous_state; // Repeat message + byte extended = (byte)((lParam >>> 24) & 0x1); + int scan_code = (int)((lParam >>> 16) & 0xFF); + + keyboard.handleKey((int)wParam, scan_code, extended != 0, state, millis, repeat); + } + + private static int transformY(long hwnd, int y) { + getClientRect(hwnd, rect_buffer); + rect.copyFromBuffer(rect_buffer); + return (rect.bottom - rect.top) - 1 - y; + } + + private static native void clientToScreen(long hwnd, IntBuffer point); + + private static native void setWindowProc(Method windowProc); + + private static long handleMessage(long hwnd, int msg, long wParam, long lParam, long millis) { + if (current_display != null) + return current_display.doHandleMessage(hwnd, msg, wParam, lParam, millis); + else + return defWindowProc(hwnd, msg, wParam, lParam); + } + + private static native long defWindowProc(long hwnd, int msg, long wParam, long lParam); + + private void checkCursorState() { + updateClipping(); + } + + private void updateClipping() { + if ((Display.isFullscreen() || (mouse != null && mouse.isGrabbed())) && !isMinimized && isFocused && (getForegroundWindow() == getHwnd() || hasParent)) { + try { + setupCursorClipping(getHwnd()); + } catch (LWJGLException e) { + LWJGLUtil.log("setupCursorClipping failed: " + e.getMessage()); + } + } else { + resetCursorClipping(); + } + } + + private void setMinimized(boolean m) { + isMinimized = m; + checkCursorState(); + } + + private long doHandleMessage(long hwnd, int msg, long wParam, long lParam, long millis) { + /*switch ( msg ) { + case 0x0: + case 0x0020: + case 0x0084: + case WM_MOUSEMOVE: + break; + default: + WindowsEventDebug.printMessage(msg, wParam, lParam); + }*/ + + if ( parent != null && !isFocused ) { + switch ( msg ) { + case WM_LBUTTONDOWN: + case WM_RBUTTONDOWN: + case WM_MBUTTONDOWN: + case WM_XBUTTONDOWN: + sendMessage(parent_hwnd, msg, wParam, lParam); + } + } + + switch (msg) { + // disable screen saver and monitor power down messages which wreak havoc + case WM_ACTIVATE: + /*switch ((int)wParam) { + case WA_ACTIVE: + case WA_CLICKACTIVE: + appActivate(true); + break; + case WA_INACTIVE: + appActivate(false); + break; + }*/ + return 0L; + case WM_SIZE: + switch ((int)wParam) { + case SIZE_RESTORED: + case SIZE_MAXIMIZED: + maximized = ((int)wParam) == SIZE_MAXIMIZED; + resized = true; + updateWidthAndHeight(); + setMinimized(false); + break; + case SIZE_MINIMIZED: + setMinimized(true); + break; + } + break; + case WM_SIZING: + resized = true; + updateWidthAndHeight(); + break; + case WM_SETCURSOR: + if((lParam & 0xFFFF) == HTCLIENT) { + // if the cursor is inside the client area, reset it + // to the current LWJGL-cursor + updateCursor(); + return -1; //TRUE + } else { + // let Windows handle cursors outside the client area for resizing, etc. + return defWindowProc(hwnd, msg, wParam, lParam); + } + case WM_KILLFOCUS: + appActivate(false); + return 0L; + case WM_SETFOCUS: + appActivate(true); + return 0L; + case WM_MOUSEACTIVATE: + if ( parent != null ) { + if ( !isFocused ) + grabFocus(); + return 3L; // MA_NOACTIVATE + } + break; + case WM_MOUSEMOVE: + int xPos = (int)(short)(lParam & 0xFFFF); + int yPos = transformY(getHwnd(), (int)(short)((lParam >> 16) & 0xFFFF)); + handleMouseMoved(xPos, yPos, millis); + checkCursorState(); + mouseInside = true; + if(!trackingMouse) { + trackingMouse = nTrackMouseEvent(hwnd); + } + return 0L; + case WM_MOUSEWHEEL: + int dwheel = (int)(short)((wParam >> 16) & 0xFFFF); + handleMouseScrolled(dwheel, millis); + return 0L; + case WM_LBUTTONDOWN: + handleMouseButton(0, 1, millis); + return 0L; + case WM_LBUTTONUP: + handleMouseButton(0, 0, millis); + return 0L; + case WM_RBUTTONDOWN: + handleMouseButton(1, 1, millis); + return 0L; + case WM_RBUTTONUP: + handleMouseButton(1, 0, millis); + return 0L; + case WM_MBUTTONDOWN: + handleMouseButton(2, 1, millis); + return 0L; + case WM_MBUTTONUP: + handleMouseButton(2, 0, millis); + return 0L; + case WM_XBUTTONUP: + if((wParam >> 16) == XBUTTON1) { + handleMouseButton(3, 0, millis); + } else { + handleMouseButton(4, 0, millis); + } + return 1; + case WM_XBUTTONDOWN: + if((wParam & 0xFF) == MK_XBUTTON1) { + handleMouseButton(3, 1, millis); + } else { + handleMouseButton(4, 1, millis); + } + return 1; + case WM_SYSCHAR: + case WM_CHAR: + handleChar(wParam, lParam, millis); + return 0L; + case WM_SYSKEYUP: + /* Fall through */ + case WM_KEYUP: + // SysRq apparently only generates WM_KEYUP, so we'll fake a WM_KEYDOWN + if (wParam == WindowsKeycodes.VK_SNAPSHOT && keyboard != null && + !keyboard.isKeyDown(org.lwjgl.input.Keyboard.KEY_SYSRQ)) { + // Set key state to pressed + long fake_lparam = lParam & ~(1 << 31); + // Set key previous state to released + fake_lparam &= ~(1 << 30); + handleKeyButton(wParam, fake_lparam, millis); + } + /* Fall through */ + case WM_SYSKEYDOWN: + /* Fall through */ + case WM_KEYDOWN: + handleKeyButton(wParam, lParam, millis); + break; + case WM_QUIT: + close_requested = true; + return 0L; + case WM_SYSCOMMAND: + switch ((int)(wParam & 0xfff0)) { + case SC_KEYMENU: + case SC_MOUSEMENU: + case SC_SCREENSAVE: + case SC_MONITORPOWER: + return 0L; + case SC_CLOSE: + close_requested = true; + return 0L; + default: + break; + } + break; + case WM_PAINT: + is_dirty = true; + break; + case WM_MOUSELEAVE: + mouseInside = false; + trackingMouse = false; + break; + case WM_CANCELMODE: + nReleaseCapture(); + /* fall through */ + case WM_CAPTURECHANGED: + if(captureMouse != -1) { + handleMouseButton(captureMouse, 0, millis); + captureMouse = -1; + } + return 0L; + case WM_WINDOWPOSCHANGED: + if(getWindowRect(hwnd, rect_buffer)) { + rect.copyFromBuffer(rect_buffer); + x = rect.top; + y = rect.bottom; + } else { + LWJGLUtil.log("WM_WINDOWPOSCHANGED: Unable to get window rect"); + } + break; + case WM_GETICON: + iconsLoaded = true; + break; + } + + return defWindowProc(hwnd, msg, wParam, lParam); + } + + private native boolean getWindowRect(long hwnd, IntBuffer rectBuffer); + + public int getX() { + return x; + } + + public int getY() { + return y; + } + + public int getWidth() { + return width; + } + + public int getHeight() { + return height; + } + + private native boolean nTrackMouseEvent(long hwnd); + + public boolean isInsideWindow() { + return mouseInside; + } + + public void setResizable(boolean resizable) { + if(this.resizable != resizable) { + int style = (int)getWindowLongPtr(hwnd, GWL_STYLE); + int styleex = (int)getWindowLongPtr(hwnd, GWL_EXSTYLE); + + // update frame style + if(resizable && !Display.isFullscreen()) { + setWindowLongPtr(hwnd, GWL_STYLE, style |= (WS_THICKFRAME | WS_MAXIMIZEBOX)); + } else { + setWindowLongPtr(hwnd, GWL_STYLE, style &= ~(WS_THICKFRAME | WS_MAXIMIZEBOX)); + } + + // from the existing client rect, determine the new window rect + // based on the style changes - using AdjustWindowRectEx. + getClientRect(hwnd, rect_buffer); + rect.copyFromBuffer(rect_buffer); + adjustWindowRectEx(rect_buffer, style, false, styleex); + rect.copyFromBuffer(rect_buffer); + + // force a frame update and resize accordingly + setWindowPos(hwnd, HWND_TOP, 0, 0, rect.right - rect.left, rect.bottom - rect.top, SWP_NOMOVE | SWP_NOZORDER | SWP_FRAMECHANGED); + + updateWidthAndHeight(); + resized = false; + } + this.resizable = resizable; + } + + private native boolean adjustWindowRectEx(IntBuffer rectBuffer, int style, boolean menu, int styleex); + + public boolean wasResized() { + if(resized) { + resized = false; + return true; + } + return false; + } + + public float getPixelScaleFactor() { + return 1f; + } + + private static final class Rect { + public int top; + public int bottom; + public int left; + public int right; + + public void copyToBuffer(IntBuffer buffer) { + buffer.put(0, top).put(1, bottom).put(2, left).put(3, right); + } + + public void copyFromBuffer(IntBuffer buffer) { + top = buffer.get(0); + bottom = buffer.get(1); + left = buffer.get(2); + right = buffer.get(3); + } + + public void offset(int offset_x, int offset_y) { + left += offset_x; + right += offset_x; + top += offset_y; + bottom += offset_y; + } + + public static void intersect(Rect r1, Rect r2, Rect dst) { + dst.top = Math.max(r1.top, r2.top); + dst.bottom = Math.min(r1.bottom, r2.bottom); + dst.left = Math.max(r1.left, r2.left); + dst.right = Math.min(r1.right, r2.right); + } + + public String toString() { + return "Rect: top = " + top + " bottom = " + bottom + " left = " + left + " right = " + right + ", width: " + (right - left) + ", height: " + (bottom - top); + } + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsDisplayPeerInfo.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsDisplayPeerInfo.java new file mode 100644 index 0000000..4de8a1d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsDisplayPeerInfo.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import java.nio.ByteBuffer; + +import org.lwjgl.LWJGLException; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +final class WindowsDisplayPeerInfo extends WindowsPeerInfo { + + final boolean egl; + + WindowsDisplayPeerInfo(boolean egl) throws LWJGLException { + this.egl = egl; + + if ( egl) + org.lwjgl.opengles.GLContext.loadOpenGLLibrary(); + else + GLContext.loadOpenGLLibrary(); + } + + void initDC(long hwnd, long hdc) throws LWJGLException { + nInitDC(getHandle(), hwnd, hdc); + } + private static native void nInitDC(ByteBuffer peer_info_handle, long hwnd, long hdc); + + protected void doLockAndInitHandle() throws LWJGLException { + // NO-OP + } + + protected void doUnlock() throws LWJGLException { + // NO-OP + } + + public void destroy() { + super.destroy(); + + if ( egl ) + org.lwjgl.opengles.GLContext.unloadOpenGLLibrary(); + else + GLContext.unloadOpenGLLibrary(); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsFileVersion.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsFileVersion.java new file mode 100644 index 0000000..8ed5cc4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsFileVersion.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + * @author elias_naur + */ + +final class WindowsFileVersion { + private final int product_version_ms; + private final int product_version_ls; + + WindowsFileVersion(int product_version_ms, int product_version_ls) { + this.product_version_ms = product_version_ms; + this.product_version_ls = product_version_ls; + } + + public String toString() { + int f1 = (product_version_ms >> 16) & 0xFFFF; + int f2 = product_version_ms & 0xFFFF; + int f3 = (product_version_ls >> 16) & 0xFFFF; + int f4 = product_version_ls & 0xFFFF; + return f1 + "." + f2 + "." + f3 + "." + f4; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsKeyboard.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsKeyboard.java new file mode 100644 index 0000000..3a7d07e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsKeyboard.java @@ -0,0 +1,164 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + * This is the Windows implementation of the Keyboard. + * @author elias_naur + */ + +import java.nio.ByteBuffer; +import java.nio.CharBuffer; + +import org.lwjgl.LWJGLException; +import org.lwjgl.input.Keyboard; + +final class WindowsKeyboard { + + private final byte[] key_down_buffer = new byte[Keyboard.KEYBOARD_SIZE]; + private final byte[] virt_key_down_buffer = new byte[Keyboard.KEYBOARD_SIZE]; + private final EventQueue event_queue = new EventQueue(Keyboard.EVENT_SIZE); + private final ByteBuffer tmp_event = ByteBuffer.allocate(Keyboard.EVENT_SIZE); + + private boolean has_retained_event; // Indicates if we're waiting for a WM_CHAR + private int retained_key_code; + private byte retained_state; + private int retained_char; + private long retained_millis; + private boolean retained_repeat; + + WindowsKeyboard() throws LWJGLException { + } + + private static native boolean isWindowsNT(); + + boolean isKeyDown(int lwjgl_keycode) { + return key_down_buffer[lwjgl_keycode] == 1; + } + + void poll(ByteBuffer keyDownBuffer) { + // Handle shift key release while both are pressed. + // Windows will not send an up event for the first button that was released in this case. + // There will only be one up event, for the last button only. We handle this problem + // here, using asynchronous state queries. + if ( isKeyDown(Keyboard.KEY_LSHIFT) && isKeyDown(Keyboard.KEY_RSHIFT) ) { + if ( !isKeyPressedAsync(WindowsKeycodes.VK_LSHIFT) ) handleKey(WindowsKeycodes.VK_SHIFT, Keyboard.KEY_LSHIFT, false, (byte)0, 0L, false); + if ( !isKeyPressedAsync(WindowsKeycodes.VK_RSHIFT) ) handleKey(WindowsKeycodes.VK_SHIFT, Keyboard.KEY_RSHIFT, false, (byte)0, 0L, false); + } + + int old_position = keyDownBuffer.position(); + keyDownBuffer.put(key_down_buffer); + keyDownBuffer.position(old_position); + } + + private static native int MapVirtualKey(int uCode, int uMapType); + private static native int ToUnicode(int wVirtKey, int wScanCode, ByteBuffer lpKeyState, CharBuffer pwszBuff, int cchBuff, int flags); + private static native int ToAscii(int wVirtKey, int wScanCode, ByteBuffer lpKeyState, ByteBuffer lpChar, int flags); + private static native int GetKeyboardState(ByteBuffer lpKeyState); + private static native short GetKeyState(int virt_key); + private static native short GetAsyncKeyState(int virt_key); + + private void putEvent(int keycode, byte state, int ch, long millis, boolean repeat) { + tmp_event.clear(); + tmp_event.putInt(keycode).put(state).putInt(ch).putLong(millis*1000000).put(repeat ? (byte)1 : (byte)0); + tmp_event.flip(); + event_queue.putEvent(tmp_event); + } + + private static int translateExtended(int virt_key, int scan_code, boolean extended) { + switch (virt_key) { + case WindowsKeycodes.VK_SHIFT: + return scan_code == 0x36 ? WindowsKeycodes.VK_RSHIFT : WindowsKeycodes.VK_LSHIFT; + case WindowsKeycodes.VK_CONTROL: + return extended ? WindowsKeycodes.VK_RCONTROL : WindowsKeycodes.VK_LCONTROL; + case WindowsKeycodes.VK_MENU: + return extended ? WindowsKeycodes.VK_RMENU : WindowsKeycodes.VK_LMENU; + default: + return virt_key; + } + } + + private void flushRetained() { + if (has_retained_event) { + has_retained_event = false; + putEvent(retained_key_code, retained_state, retained_char, retained_millis, retained_repeat); + } + } + + private static boolean isKeyPressed(int state) { + return (state & 1) == 1; + } + + private static boolean isKeyPressedAsync(int virt_key) { + return (GetAsyncKeyState(virt_key) & 0x8000) != 0; + } + + void handleKey(int virt_key, int scan_code, boolean extended, byte event_state, long millis, boolean repeat) { + virt_key = translateExtended(virt_key, scan_code, extended); + if ( !repeat && isKeyPressed(event_state) == isKeyPressed(virt_key_down_buffer[virt_key]) ) + return; + + flushRetained(); + has_retained_event = true; + int keycode = WindowsKeycodes.mapVirtualKeyToLWJGLCode(virt_key); + if (keycode < key_down_buffer.length) { + key_down_buffer[keycode] = event_state; + virt_key_down_buffer[virt_key] = event_state; + } + retained_key_code = keycode; + retained_state = event_state; + retained_millis = millis; + retained_char = 0; + retained_repeat = repeat; + } + + void fireLostKeyEvents() { + for ( int i = 0; i < virt_key_down_buffer.length; i++ ) { + if ( isKeyPressed(virt_key_down_buffer[i]) && !isKeyPressedAsync(i) ) + handleKey(i, 0, false, (byte)0, 0L, false); + } + } + + void handleChar(int event_char, long millis, boolean repeat) { + if (has_retained_event && retained_char != 0) + flushRetained(); + if (!has_retained_event) { + putEvent(0, (byte)0, event_char, millis, repeat); + } else + retained_char = event_char; + } + + void read(ByteBuffer buffer) { + flushRetained(); + event_queue.copyEvents(buffer); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsKeycodes.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsKeycodes.java new file mode 100644 index 0000000..39e8567 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsKeycodes.java @@ -0,0 +1,578 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + * @author elias_naur + */ + +import org.lwjgl.input.Keyboard; + +final class WindowsKeycodes { + public static final int VK_LBUTTON = 0x01; + public static final int VK_RBUTTON = 0x02; + public static final int VK_CANCEL = 0x03; + public static final int VK_MBUTTON = 0x04; /* NOT contiguous with L & RBUTTON */ + + public static final int VK_XBUTTON1 = 0x05; /* NOT contiguous with L & RBUTTON */ + public static final int VK_XBUTTON2 = 0x06; /* NOT contiguous with L & RBUTTON */ + +/* + * 0x07 : unassigned + */ + + public static final int VK_BACK = 0x08; + public static final int VK_TAB = 0x09; + +/* + * 0x0A - 0x0B : reserved + */ + + public static final int VK_CLEAR = 0x0C; + public static final int VK_RETURN = 0x0D; + + public static final int VK_SHIFT = 0x10; + public static final int VK_CONTROL = 0x11; + public static final int VK_MENU = 0x12; + public static final int VK_PAUSE = 0x13; + public static final int VK_CAPITAL = 0x14; + + public static final int VK_KANA = 0x15; + public static final int VK_HANGEUL = 0x15; /* old name - should be here for compatibility */ + public static final int VK_HANGUL = 0x15; + public static final int VK_JUNJA = 0x17; + public static final int VK_FINAL = 0x18; + public static final int VK_HANJA = 0x19; + public static final int VK_KANJI = 0x19; + + public static final int VK_ESCAPE = 0x1B; + + public static final int VK_CONVERT = 0x1C; + public static final int VK_NONCONVERT = 0x1D; + public static final int VK_ACCEPT = 0x1E; + public static final int VK_MODECHANGE = 0x1F; + + public static final int VK_SPACE = 0x20; + public static final int VK_PRIOR = 0x21; + public static final int VK_NEXT = 0x22; + public static final int VK_END = 0x23; + public static final int VK_HOME = 0x24; + public static final int VK_LEFT = 0x25; + public static final int VK_UP = 0x26; + public static final int VK_RIGHT = 0x27; + public static final int VK_DOWN = 0x28; + public static final int VK_SELECT = 0x29; + public static final int VK_PRINT = 0x2A; + public static final int VK_EXECUTE = 0x2B; + public static final int VK_SNAPSHOT = 0x2C; + public static final int VK_INSERT = 0x2D; + public static final int VK_DELETE = 0x2E; + public static final int VK_HELP = 0x2F; +/* + * VK_0 - VK_9 are the same as ASCII '0' - '9' (0x30 - 0x39) + * 0x40 : unassigned + * VK_A - VK_Z are the same as ASCII 'A' - 'Z' (0x41 - 0x5A) + */ +public static final int VK_0 = 0x30; + public static final int VK_1 = 0x31; + public static final int VK_2 = 0x32; + public static final int VK_3 = 0x33; + public static final int VK_4 = 0x34; + public static final int VK_5 = 0x35; + public static final int VK_6 = 0x36; + public static final int VK_7 = 0x37; + public static final int VK_8 = 0x38; + public static final int VK_9 = 0x39; + + public static final int VK_A = 0x41; + public static final int VK_B = 0x42; + public static final int VK_C = 0x43; + public static final int VK_D = 0x44; + public static final int VK_E = 0x45; + public static final int VK_F = 0x46; + public static final int VK_G = 0x47; + public static final int VK_H = 0x48; + public static final int VK_I = 0x49; + public static final int VK_J = 0x4A; + public static final int VK_K = 0x4B; + public static final int VK_L = 0x4C; + public static final int VK_M = 0x4D; + public static final int VK_N = 0x4E; + public static final int VK_O = 0x4F; + public static final int VK_P = 0x50; + public static final int VK_Q = 0x51; + public static final int VK_R = 0x52; + public static final int VK_S = 0x53; + public static final int VK_T = 0x54; + public static final int VK_U = 0x55; + public static final int VK_V = 0x56; + public static final int VK_W = 0x57; + public static final int VK_X = 0x58; + public static final int VK_Y = 0x59; + public static final int VK_Z = 0x5A; + + public static final int VK_LWIN = 0x5B; + public static final int VK_RWIN = 0x5C; + public static final int VK_APPS = 0x5D; +/* + * 0x5E : reserved; + */ + + public static final int VK_SLEEP = 0x5F; + + public static final int VK_NUMPAD0 = 0x60; + public static final int VK_NUMPAD1 = 0x61; + public static final int VK_NUMPAD2 = 0x62; + public static final int VK_NUMPAD3 = 0x63; + public static final int VK_NUMPAD4 = 0x64; + public static final int VK_NUMPAD5 = 0x65; + public static final int VK_NUMPAD6 = 0x66; + public static final int VK_NUMPAD7 = 0x67; + public static final int VK_NUMPAD8 = 0x68; + public static final int VK_NUMPAD9 = 0x69; + public static final int VK_MULTIPLY = 0x6A; + public static final int VK_ADD = 0x6B; + public static final int VK_SEPARATOR = 0x6C; + public static final int VK_SUBTRACT = 0x6D; + public static final int VK_DECIMAL = 0x6E; + public static final int VK_DIVIDE = 0x6F; + public static final int VK_F1 = 0x70; + public static final int VK_F2 = 0x71; + public static final int VK_F3 = 0x72; + public static final int VK_F4 = 0x73; + public static final int VK_F5 = 0x74; + public static final int VK_F6 = 0x75; + public static final int VK_F7 = 0x76; + public static final int VK_F8 = 0x77; + public static final int VK_F9 = 0x78; + public static final int VK_F10 = 0x79; + public static final int VK_F11 = 0x7A; + public static final int VK_F12 = 0x7B; + public static final int VK_F13 = 0x7C; + public static final int VK_F14 = 0x7D; + public static final int VK_F15 = 0x7E; + public static final int VK_F16 = 0x7F; + public static final int VK_F17 = 0x80; + public static final int VK_F18 = 0x81; + public static final int VK_F19 = 0x82; + public static final int VK_F20 = 0x83; + public static final int VK_F21 = 0x84; + public static final int VK_F22 = 0x85; + public static final int VK_F23 = 0x86; + public static final int VK_F24 = 0x87; + +/* + * 0x88 - 0x8F : unassigned; + */ + + public static final int VK_NUMLOCK = 0x90; + public static final int VK_SCROLL = 0x91; + +/* + * NEC PC-9800 kbd definitions + */ +public static final int VK_OEM_NEC_EQUAL = 0x92; // '=' key on numpad +/* + * Fujitsu/OASYS kbd definitions + */ +public static final int VK_OEM_FJ_JISHO = 0x92; // 'Dictionary' key + public static final int VK_OEM_FJ_MASSHOU = 0x93; // 'Unregister word' key + public static final int VK_OEM_FJ_TOUROKU = 0x94; // 'Register word' key + public static final int VK_OEM_FJ_LOYA = 0x95; // 'Left OYAYUBI' key + public static final int VK_OEM_FJ_ROYA = 0x96; // 'Right OYAYUBI' key + +/* + * 0x97 - 0x9F : unassigned + */ + +/* + * VK_L* & VK_R* - left and right Alt, Ctrl and Shift virtual keys. + * Used only as parameters to GetAsyncKeyState() and GetKeyState(). + * No other API or message will distinguish left and right keys in this way. + */ +public static final int VK_LSHIFT = 0xA0; + public static final int VK_RSHIFT = 0xA1; + public static final int VK_LCONTROL = 0xA2; + public static final int VK_RCONTROL = 0xA3; + public static final int VK_LMENU = 0xA4; + public static final int VK_RMENU = 0xA5; + + public static final int VK_BROWSER_BACK = 0xA6; + public static final int VK_BROWSER_FORWARD = 0xA7; + public static final int VK_BROWSER_REFRESH = 0xA8; + public static final int VK_BROWSER_STOP = 0xA9; + public static final int VK_BROWSER_SEARCH = 0xAA; + public static final int VK_BROWSER_FAVORITES = 0xAB; + public static final int VK_BROWSER_HOME = 0xAC; + + public static final int VK_VOLUME_MUTE = 0xAD; + public static final int VK_VOLUME_DOWN = 0xAE; + public static final int VK_VOLUME_UP = 0xAF; + public static final int VK_MEDIA_NEXT_TRACK = 0xB0; + public static final int VK_MEDIA_PREV_TRACK = 0xB1; + public static final int VK_MEDIA_STOP = 0xB2; + public static final int VK_MEDIA_PLAY_PAUSE = 0xB3; + public static final int VK_LAUNCH_MAIL = 0xB4; + public static final int VK_LAUNCH_MEDIA_SELECT = 0xB5; + public static final int VK_LAUNCH_APP1 = 0xB6; + public static final int VK_LAUNCH_APP2 = 0xB7; + +/* + * 0xB8 - 0xB9 : reserved + */ + + public static final int VK_OEM_1 = 0xBA; // ';:' for US + public static final int VK_OEM_PLUS = 0xBB; // '+' any country + public static final int VK_OEM_COMMA = 0xBC; // ',' any country + public static final int VK_OEM_MINUS = 0xBD; // '-' any country + public static final int VK_OEM_PERIOD = 0xBE; // '.' any country + public static final int VK_OEM_2 = 0xBF; // '/?' for US + public static final int VK_OEM_3 = 0xC0; // '`~' for US + +/* + * 0xC1 - 0xD7 : reserved + */ + +/* + * 0xD8 - 0xDA : unassigned + */ + + public static final int VK_OEM_4 = 0xDB; // '[{' for US + public static final int VK_OEM_5 = 0xDC; // '\|' for US + public static final int VK_OEM_6 = 0xDD; // ']}' for US + public static final int VK_OEM_7 = 0xDE; // ''"' for US + public static final int VK_OEM_8 = 0xDF; + +/* + * 0xE0 : reserved + */ + +/* + * Various extended or enhanced keyboards + */ +public static final int VK_OEM_AX = 0xE1; // 'AX' key on Japanese AX kbd + public static final int VK_OEM_102 = 0xE2; // "<>" or "\|" on RT 102-key kbd. + public static final int VK_ICO_HELP = 0xE3; // Help key on ICO + public static final int VK_ICO_00 = 0xE4; // 00 key on ICO + + public static final int VK_PROCESSKEY = 0xE5; + + public static final int VK_ICO_CLEAR = 0xE6; + + + public static final int VK_PACKET = 0xE7; + +/* + * 0xE8 : unassigned + */ + +/* + * Nokia/Ericsson definitions + */ +public static final int VK_OEM_RESET = 0xE9; + public static final int VK_OEM_JUMP = 0xEA; + public static final int VK_OEM_PA1 = 0xEB; + public static final int VK_OEM_PA2 = 0xEC; + public static final int VK_OEM_PA3 = 0xED; + public static final int VK_OEM_WSCTRL = 0xEE; + public static final int VK_OEM_CUSEL = 0xEF; + public static final int VK_OEM_ATTN = 0xF0; + public static final int VK_OEM_FINISH = 0xF1; + public static final int VK_OEM_COPY = 0xF2; + public static final int VK_OEM_AUTO = 0xF3; + public static final int VK_OEM_ENLW = 0xF4; + public static final int VK_OEM_BACKTAB = 0xF5; + + public static final int VK_ATTN = 0xF6; + public static final int VK_CRSEL = 0xF7; + public static final int VK_EXSEL = 0xF8; + public static final int VK_EREOF = 0xF9; + public static final int VK_PLAY = 0xFA; + public static final int VK_ZOOM = 0xFB; + public static final int VK_NONAME = 0xFC; + public static final int VK_PA1 = 0xFD; + public static final int VK_OEM_CLEAR = 0xFE; + + public static int mapVirtualKeyToLWJGLCode(int virt_key) { + switch (virt_key) { + case VK_ESCAPE: + return Keyboard.KEY_ESCAPE; + case VK_1: + return Keyboard.KEY_1; + case VK_2: + return Keyboard.KEY_2; + case VK_3: + return Keyboard.KEY_3; + case VK_4: + return Keyboard.KEY_4; + case VK_5: + return Keyboard.KEY_5; + case VK_6: + return Keyboard.KEY_6; + case VK_7: + return Keyboard.KEY_7; + case VK_8: + return Keyboard.KEY_8; + case VK_9: + return Keyboard.KEY_9; + case VK_0: + return Keyboard.KEY_0; + case VK_OEM_MINUS: + return Keyboard.KEY_MINUS; + case VK_OEM_PLUS: + return Keyboard.KEY_EQUALS; + case VK_BACK: + return Keyboard.KEY_BACK; + case VK_TAB: + return Keyboard.KEY_TAB; + case VK_Q: + return Keyboard.KEY_Q; + case VK_W: + return Keyboard.KEY_W; + case VK_E: + return Keyboard.KEY_E; + case VK_R: + return Keyboard.KEY_R; + case VK_T: + return Keyboard.KEY_T; + case VK_Y: + return Keyboard.KEY_Y; + case VK_U: + return Keyboard.KEY_U; + case VK_I: + return Keyboard.KEY_I; + case VK_O: + return Keyboard.KEY_O; + case VK_P: + return Keyboard.KEY_P; + case VK_OEM_4: + return Keyboard.KEY_LBRACKET; + case VK_OEM_6: + return Keyboard.KEY_RBRACKET; + case VK_RETURN: + return Keyboard.KEY_RETURN; + case VK_LCONTROL: + return Keyboard.KEY_LCONTROL; + case VK_A: + return Keyboard.KEY_A; + case VK_S: + return Keyboard.KEY_S; + case VK_D: + return Keyboard.KEY_D; + case VK_F: + return Keyboard.KEY_F; + case VK_G: + return Keyboard.KEY_G; + case VK_H: + return Keyboard.KEY_H; + case VK_J: + return Keyboard.KEY_J; + case VK_K: + return Keyboard.KEY_K; + case VK_L: + return Keyboard.KEY_L; + case VK_OEM_1: + return Keyboard.KEY_SEMICOLON; + case VK_OEM_7: + return Keyboard.KEY_APOSTROPHE; + case VK_OEM_3: + case VK_OEM_8: + return Keyboard.KEY_GRAVE; + case VK_LSHIFT: + return Keyboard.KEY_LSHIFT; + case VK_OEM_5: + return Keyboard.KEY_BACKSLASH; + case VK_Z: + return Keyboard.KEY_Z; + case VK_X: + return Keyboard.KEY_X; + case VK_C: + return Keyboard.KEY_C; + case VK_V: + return Keyboard.KEY_V; + case VK_B: + return Keyboard.KEY_B; + case VK_N: + return Keyboard.KEY_N; + case VK_M: + return Keyboard.KEY_M; + case VK_OEM_COMMA: + return Keyboard.KEY_COMMA; + case VK_OEM_PERIOD: + return Keyboard.KEY_PERIOD; + case VK_OEM_2: + return Keyboard.KEY_SLASH; + case VK_RSHIFT: + return Keyboard.KEY_RSHIFT; + case VK_MULTIPLY: + return Keyboard.KEY_MULTIPLY; + case VK_LMENU: + return Keyboard.KEY_LMENU; + case VK_SPACE: + return Keyboard.KEY_SPACE; + case VK_CAPITAL: + return Keyboard.KEY_CAPITAL; + case VK_F1: + return Keyboard.KEY_F1; + case VK_F2: + return Keyboard.KEY_F2; + case VK_F3: + return Keyboard.KEY_F3; + case VK_F4: + return Keyboard.KEY_F4; + case VK_F5: + return Keyboard.KEY_F5; + case VK_F6: + return Keyboard.KEY_F6; + case VK_F7: + return Keyboard.KEY_F7; + case VK_F8: + return Keyboard.KEY_F8; + case VK_F9: + return Keyboard.KEY_F9; + case VK_F10: + return Keyboard.KEY_F10; + case VK_NUMLOCK: + return Keyboard.KEY_NUMLOCK; + case VK_SCROLL: + return Keyboard.KEY_SCROLL; + case VK_NUMPAD7: + return Keyboard.KEY_NUMPAD7; + case VK_NUMPAD8: + return Keyboard.KEY_NUMPAD8; + case VK_NUMPAD9: + return Keyboard.KEY_NUMPAD9; + case VK_SUBTRACT: + return Keyboard.KEY_SUBTRACT; + case VK_NUMPAD4: + return Keyboard.KEY_NUMPAD4; + case VK_NUMPAD5: + return Keyboard.KEY_NUMPAD5; + case VK_NUMPAD6: + return Keyboard.KEY_NUMPAD6; + case VK_ADD: + return Keyboard.KEY_ADD; + case VK_NUMPAD1: + return Keyboard.KEY_NUMPAD1; + case VK_NUMPAD2: + return Keyboard.KEY_NUMPAD2; + case VK_NUMPAD3: + return Keyboard.KEY_NUMPAD3; + case VK_NUMPAD0: + return Keyboard.KEY_NUMPAD0; + case VK_DECIMAL: + return Keyboard.KEY_DECIMAL; + case VK_F11: + return Keyboard.KEY_F11; + case VK_F12: + return Keyboard.KEY_F12; + case VK_F13: + return Keyboard.KEY_F13; + case VK_F14: + return Keyboard.KEY_F14; + case VK_F15: + return Keyboard.KEY_F15; + case VK_KANA: + return Keyboard.KEY_KANA; + case VK_CONVERT: + return Keyboard.KEY_CONVERT; + case VK_NONCONVERT: + return Keyboard.KEY_NOCONVERT; +/* case VK_YEN: + return Keyboard.KEY_YEN; + case VK_NUMPADEQUALS: + return Keyboard.KEY_NUMPADEQUALS; + case VK_CIRCUMFLEX: + return Keyboard.KEY_CIRCUMFLEX; + case VK_AT: + return Keyboard.KEY_AT; + case VK_COLON: + return Keyboard.KEY_COLON; + case VK_UNDERLINE: + return Keyboard.KEY_UNDERLINE;*/ + case VK_KANJI: + return Keyboard.KEY_KANJI; +/* case VK_STOP: + return Keyboard.KEY_STOP; + case VK_AX: + return Keyboard.KEY_AX; + case VK_UNLABELED: + return Keyboard.KEY_UNLABELED; + case VK_NUMPADENTER: + return Keyboard.KEY_NUMPADENTER;*/ + case VK_RCONTROL: + return Keyboard.KEY_RCONTROL; + case VK_SEPARATOR: + return Keyboard.KEY_NUMPADCOMMA; + case VK_DIVIDE: + return Keyboard.KEY_DIVIDE; + case VK_SNAPSHOT: + return Keyboard.KEY_SYSRQ; + case VK_RMENU: + return Keyboard.KEY_RMENU; + case VK_PAUSE: + return Keyboard.KEY_PAUSE; + case VK_HOME: + return Keyboard.KEY_HOME; + case VK_UP: + return Keyboard.KEY_UP; + case VK_PRIOR: + return Keyboard.KEY_PRIOR; + case VK_LEFT: + return Keyboard.KEY_LEFT; + case VK_RIGHT: + return Keyboard.KEY_RIGHT; + case VK_END: + return Keyboard.KEY_END; + case VK_DOWN: + return Keyboard.KEY_DOWN; + case VK_NEXT: + return Keyboard.KEY_NEXT; + case VK_INSERT: + return Keyboard.KEY_INSERT; + case VK_DELETE: + return Keyboard.KEY_DELETE; + case VK_LWIN: + return Keyboard.KEY_LMETA; + case VK_RWIN: + return Keyboard.KEY_RMETA; + case VK_APPS: + return Keyboard.KEY_APPS; +/* case VK_POWER: + return Keyboard.KEY_POWER;*/ + case VK_SLEEP: + return Keyboard.KEY_SLEEP; + default: + return Keyboard.KEY_NONE; + } + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsMouse.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsMouse.java new file mode 100644 index 0000000..e98e4cf --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsMouse.java @@ -0,0 +1,199 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + * This is the Windows implementation of the Mouse. + * @author elias_naur + */ + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; +import org.lwjgl.input.Mouse; + +final class WindowsMouse { + private final long hwnd; + + private final int mouse_button_count; + private final boolean has_wheel; + + private final EventQueue event_queue = new EventQueue(Mouse.EVENT_SIZE); + + private final ByteBuffer mouse_event = ByteBuffer.allocate(Mouse.EVENT_SIZE); + private final Object blank_cursor; + + private boolean mouse_grabbed; + private byte[] button_states; + private int accum_dx; + private int accum_dy; + private int accum_dwheel; + private int last_x; + private int last_y; + + WindowsMouse(long hwnd) throws LWJGLException { + this.hwnd = hwnd; + this.mouse_button_count = Math.min(5, WindowsDisplay.getSystemMetrics(WindowsDisplay.SM_CMOUSEBUTTONS)); + this.has_wheel = WindowsDisplay.getSystemMetrics(WindowsDisplay.SM_MOUSEWHEELPRESENT) != 0; + this.blank_cursor = createBlankCursor(); + this.button_states = new byte[mouse_button_count]; + } + + private Object createBlankCursor() throws LWJGLException { + int width = WindowsDisplay.getSystemMetrics(WindowsDisplay.SM_CXCURSOR); + int height = WindowsDisplay.getSystemMetrics(WindowsDisplay.SM_CYCURSOR); + IntBuffer pixels = BufferUtils.createIntBuffer(width*height); + return WindowsDisplay.doCreateCursor(width, height, 0, 0, 1, pixels, null); + } + + public boolean isGrabbed() { + return mouse_grabbed; + } + + public boolean hasWheel() { + return has_wheel; + } + + public int getButtonCount() { + return mouse_button_count; + } + + public void poll(IntBuffer coord_buffer, ByteBuffer buttons) { + for (int i = 0; i < coord_buffer.remaining(); i++) + coord_buffer.put(coord_buffer.position() + i, 0); + int num_buttons = mouse_button_count; + coord_buffer.put(coord_buffer.position() + 2, accum_dwheel); + if (num_buttons > button_states.length) + num_buttons = button_states.length; + for (int j = 0; j < num_buttons; j++) { + buttons.put(buttons.position() + j, button_states[j]); + } + if (isGrabbed()) { + coord_buffer.put(coord_buffer.position() + 0, accum_dx); + coord_buffer.put(coord_buffer.position() + 1, accum_dy); + } else { + coord_buffer.put(coord_buffer.position() + 0, last_x); + coord_buffer.put(coord_buffer.position() + 1, last_y); + } + accum_dx = accum_dy = accum_dwheel = 0; + } + + private void putMouseEventWithCoords(byte button, byte state, int coord1, int coord2, int dz, long nanos) { + mouse_event.clear(); + mouse_event.put(button).put(state).putInt(coord1).putInt(coord2).putInt(dz).putLong(nanos); + mouse_event.flip(); + event_queue.putEvent(mouse_event); + } + + private void putMouseEvent(byte button, byte state, int dz, long nanos) { + if (mouse_grabbed) + putMouseEventWithCoords(button, state, 0, 0, dz, nanos); + else + putMouseEventWithCoords(button, state, last_x, last_y, dz, nanos); + } + + public void read(ByteBuffer buffer) { + event_queue.copyEvents(buffer); + } + + public Object getBlankCursor() { + return blank_cursor; + } + + public void grab(boolean grab, boolean should_center) { + if (grab) { + if (!mouse_grabbed) { + mouse_grabbed = true; + if (should_center) { + try { + WindowsDisplay.setupCursorClipping(hwnd); + } catch (LWJGLException e) { + LWJGLUtil.log("Failed to setup cursor clipping: " + e); + } + centerCursor(); + } + } + } else { + if (mouse_grabbed) { + mouse_grabbed = false; + WindowsDisplay.resetCursorClipping(); + } + } + event_queue.clearEvents(); + } + + public void handleMouseScrolled(int event_dwheel, long millis) { + accum_dwheel += event_dwheel; + putMouseEvent((byte)-1, (byte)0, event_dwheel, millis*1000000); + } + + private void centerCursor() { + WindowsDisplay.centerCursor(hwnd); + } + + public void setPosition(int x, int y) { + this.last_x = x; + this.last_y = y; + } + + public void destroy() { + WindowsDisplay.doDestroyCursor(blank_cursor); + } + + public void handleMouseMoved(int x, int y, long millis, boolean should_center) { + int dx = x - last_x; + int dy = y - last_y; + if (dx != 0 || dy != 0) { + accum_dx += dx; + accum_dy += dy; + last_x = x; + last_y = y; + long nanos = millis*1000000; + if (mouse_grabbed) { + putMouseEventWithCoords((byte)-1, (byte)0, dx, dy, 0, nanos); + if (should_center) + centerCursor(); + } else { + putMouseEventWithCoords((byte)-1, (byte)0, x, y, 0, nanos); + } + } + } + + public void handleMouseButton(byte button, byte state, long millis) { + putMouseEvent(button, state, 0, millis*1000000); + if (button < button_states.length) + button_states[button] = state != 0 ? (byte)1 : (byte)0; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsPbufferPeerInfo.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsPbufferPeerInfo.java new file mode 100644 index 0000000..7bf010e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsPbufferPeerInfo.java @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +import org.lwjgl.LWJGLException; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +final class WindowsPbufferPeerInfo extends WindowsPeerInfo { + WindowsPbufferPeerInfo(int width, int height, PixelFormat pixel_format, IntBuffer pixelFormatCaps, IntBuffer pBufferAttribs) throws LWJGLException { + nCreate(getHandle(), width, height, pixel_format, pixelFormatCaps, pBufferAttribs); + } + private static native void nCreate(ByteBuffer handle, int width, int height, PixelFormat pixel_format, IntBuffer pixelFormatCaps, IntBuffer pBufferAttribs) throws LWJGLException; + + public boolean isBufferLost() { + return nIsBufferLost(getHandle()); + } + private static native boolean nIsBufferLost(ByteBuffer handle); + + public void setPbufferAttrib(int attrib, int value) { + nSetPbufferAttrib(getHandle(), attrib, value); + } + private static native void nSetPbufferAttrib(ByteBuffer handle, int attrib, int value); + + public void bindTexImageToPbuffer(int buffer) { + nBindTexImageToPbuffer(getHandle(), buffer); + } + private static native void nBindTexImageToPbuffer(ByteBuffer handle, int buffer); + + public void releaseTexImageFromPbuffer(int buffer) { + nReleaseTexImageFromPbuffer(getHandle(), buffer); + } + private static native void nReleaseTexImageFromPbuffer(ByteBuffer handle, int buffer); + + public void destroy() { + nDestroy(getHandle()); + } + private static native void nDestroy(ByteBuffer handle); + + protected void doLockAndInitHandle() throws LWJGLException { + // NO-OP + } + + protected void doUnlock() throws LWJGLException { + // NO-OP + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsPeerInfo.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsPeerInfo.java new file mode 100644 index 0000000..6ad2937 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsPeerInfo.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +import org.lwjgl.LWJGLException; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +abstract class WindowsPeerInfo extends PeerInfo { + protected WindowsPeerInfo() { + super(createHandle()); + } + private static native ByteBuffer createHandle(); + + protected static int choosePixelFormat(long hdc, int origin_x, int origin_y, PixelFormat pixel_format, IntBuffer pixel_format_caps, boolean use_hdc_bpp, boolean support_window, boolean support_pbuffer, boolean double_buffered) throws LWJGLException { + return nChoosePixelFormat(hdc, origin_x, origin_y, pixel_format, pixel_format_caps, use_hdc_bpp, support_window, support_pbuffer, double_buffered); + } + private static native int nChoosePixelFormat(long hdc, int origin_x, int origin_y, PixelFormat pixel_format, IntBuffer pixel_format_caps, boolean use_hdc_bpp, boolean support_window, boolean support_pbuffer, boolean double_buffered) throws LWJGLException; + protected static native void setPixelFormat(long hdc, int pixel_format) throws LWJGLException; + + public final long getHdc() { + return nGetHdc(getHandle()); + } + private static native long nGetHdc(ByteBuffer handle); + + public final long getHwnd() { + return nGetHwnd(getHandle()); + } + private static native long nGetHwnd(ByteBuffer handle); +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsRegistry.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsRegistry.java new file mode 100644 index 0000000..b85b59c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/WindowsRegistry.java @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** + * This is an interface to the windows registry + * @author elias_naur + */ + +import org.lwjgl.LWJGLException; +import org.lwjgl.Sys; + +final class WindowsRegistry { + static final int HKEY_CLASSES_ROOT = 1; + static final int HKEY_CURRENT_USER = 2; + static final int HKEY_LOCAL_MACHINE = 3; + static final int HKEY_USERS = 4; + + static { + Sys.initialize(); + } + + /** + * Query the registry value specified by the root key, subkey, value tuple + */ + static String queryRegistrationKey(int root_key, String subkey, String value) throws LWJGLException { + switch (root_key) { + case HKEY_CLASSES_ROOT: + case HKEY_CURRENT_USER: + case HKEY_LOCAL_MACHINE: + case HKEY_USERS: + break; + default: + throw new IllegalArgumentException("Invalid enum: " + root_key); + } + return nQueryRegistrationKey(root_key, subkey, value); + } + + private static native String nQueryRegistrationKey(int root_key, String subkey, String value) throws LWJGLException; +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/XRandR.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/XRandR.java new file mode 100644 index 0000000..0ac1c7a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengl/XRandR.java @@ -0,0 +1,304 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: * Redistributions of source code must retain the above + * copyright notice, this list of conditions and the following + * disclaimer. * Redistributions in binary form must reproduce the + * above copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. * Neither the name of 'LWJGL' nor the names + * of its contributors may be used to endorse or promote products + * derived from this software without specific prior written + * permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE + * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + */ + +package org.lwjgl.opengl; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.lwjgl.LWJGLUtil; + +/** + * Utility for working with the xrandr commmand-line utility. Assumes + * xrandr v1.2 or higher. + * + * @author ryanm + */ +public class XRandR +{ + private static Screen[] current; + + private static Map screens; + + private static void populate() + { + if( screens == null ) + { + screens = new HashMap(); + + // ProcessBuilder pb = new ProcessBuilder( "xrandr", "-q" ); + // pb.redirectErrorStream(); + try + { + // Process p= pb.start(); + Process p = Runtime.getRuntime().exec( new String[] { "xrandr", "-q" } ); + + List currentList = new ArrayList(); + List possibles = new ArrayList(); + String name = null; + + BufferedReader br = new BufferedReader( new InputStreamReader( p.getInputStream() ) ); + String line; + while( ( line = br.readLine() ) != null ) + { + line = line.trim(); + String[] sa = line.split( "\\s+" ); + + if( "connected".equals(sa[1]) ) + { + // found a new screen block + if( name != null ) + { + screens.put( name, possibles.toArray( new Screen[ possibles.size() ] ) ); + possibles.clear(); + } + name = sa[ 0 ]; + + // record the current config + parseScreen( currentList, name, "primary".equals(sa[ 2 ]) ? sa[ 3 ] : sa[ 2 ] ); + } + else if( Pattern.matches( "\\d*x\\d*", sa[ 0 ] ) ) + { + // found a new mode line + parseScreen( possibles, name, sa[ 0 ] ); + } + } + + screens.put( name, possibles.toArray( new Screen[ possibles.size() ] ) ); + + current = currentList.toArray(new Screen[currentList.size()]); + } + catch( Throwable e ) + { + LWJGLUtil.log( "Exception in XRandR.populate(): " + e.getMessage() ); + screens.clear(); + current = new Screen[ 0 ]; + } + } + } + + /** + * @return The current screen configuration, or an empty array if + * xrandr is not supported + */ + public static Screen[] getConfiguration() + { + populate(); + + return current.clone(); + } + + /** + * @param screens + * The desired screen set, may not be null + * @throws IllegalArgumentException + * if no screens are specified + */ + public static void setConfiguration(Screen... screens) + { + if( screens.length == 0 ) + throw new IllegalArgumentException( "Must specify at least one screen" ); + + List cmd = new ArrayList(); + cmd.add( "xrandr" ); + + // switch off those in the current set not in the new set + for ( Screen screen : current ) { + boolean found = false; + for ( Screen screen1 : screens ) { + if ( screen1.name.equals(screen.name) ) { + found = true; + break; + } + } + + if ( !found ) { + cmd.add("--output"); + cmd.add(screen.name); + cmd.add("--off"); + } + } + + // set up new set + for ( Screen screen : screens ) + screen.getArgs(cmd); + + try + { + // ProcessBuilder pb = new ProcessBuilder( cmd ); + // pb.redirectErrorStream(); + // Process p = pb.start(); + Process p = + Runtime.getRuntime().exec( cmd.toArray( new String[ cmd.size() ] ) ); + // no output is expected, but check anyway + BufferedReader br = new BufferedReader( new InputStreamReader( p.getInputStream() ) ); + String line; + while( ( line = br.readLine() ) != null ) + { + LWJGLUtil.log( "Unexpected output from xrandr process: " + line ); + } + current = screens; + } + catch( IOException e ) + { + LWJGLUtil.log( "XRandR exception in setConfiguration(): " + e.getMessage() ); + } + } + + /** + * @return the name of connected screens, or an empty array if + * xrandr is not supported + */ + public static String[] getScreenNames() + { + populate(); + return screens.keySet().toArray( new String[ screens.size() ] ); + } + + /** + * @param name + * @return the possible resolutions of the named screen, or + * null if there is no such screen + */ + public static Screen[] getResolutions( String name ) + { + populate(); + // clone the array to prevent held copies being altered + return screens.get(name).clone(); + } + + private static final Pattern SCREEN_PATTERN1 = + Pattern.compile( "^(\\d+)x(\\d+)\\+(\\d+)\\+(\\d+)$" ); + + private static final Pattern SCREEN_PATTERN2 = Pattern.compile( "^(\\d+)x(\\d+)$" ); + + /** + * Parses a screen configuration and adds it to the list if it's + * valid. + * + * @param list + * the list to add the Screen to if it's valid + * @param name + * the name of this screen + * @param what + * config string, format either widthxheight or + * widthxheight+xPos+yPos + */ + private static void parseScreen( List list, String name, String what ) + { + Matcher m = SCREEN_PATTERN1.matcher( what ); + if( !m.matches() ) + { + m = SCREEN_PATTERN2.matcher( what ); + if( !m.matches() ) + { + LWJGLUtil.log( "Did not match: " + what ); + return; + } + } + int width = Integer.parseInt( m.group( 1 ) ); + int height = Integer.parseInt( m.group( 2 ) ); + int xpos, ypos; + if( m.groupCount() > 3 ) + { + xpos = Integer.parseInt( m.group( 3 ) ); + ypos = Integer.parseInt( m.group( 4 ) ); + } + else + { + xpos = 0; + ypos = 0; + } + list.add( new Screen( name, width, height, xpos, ypos ) ); + } + + /** + * Encapsulates the configuration of a monitor. Resolution is + * fixed, position is mutable + * + * @author ryanm + */ + public static class Screen implements Cloneable + { + /** + * Name for this output + */ + public final String name; + + /** + * Width in pixels + */ + public final int width; + + /** + * Height in pixels + */ + public final int height; + + /** + * Position on the x-axis, in pixels + */ + public int xPos; + + /** + * Position on the y-axis, in pixels + */ + public int yPos; + + private Screen( String name, int width, int height, int xPos, int yPos ) + { + this.name = name; + this.width = width; + this.height = height; + this.xPos = xPos; + this.yPos = yPos; + } + + private void getArgs( List argList ) + { + argList.add( "--output" ); + argList.add( name ); + argList.add( "--mode" ); + argList.add( width + "x" + height ); + argList.add( "--pos" ); + argList.add( xPos + "x" + yPos ); + } + + //@Override + public String toString() + { + return name + " " + width + "x" + height + " @ " + xPos + "x" + yPos; + } + } +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/APIUtil.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/APIUtil.java new file mode 100644 index 0000000..7ffdf52 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/APIUtil.java @@ -0,0 +1,329 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLUtil; +import org.lwjgl.MemoryUtil; +import org.lwjgl.PointerBuffer; + +import java.nio.ByteBuffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; +import java.nio.LongBuffer; + +/** + * Utility class for OpenGL ES API calls. + * + * @author spasi + */ +final class APIUtil { + + private static final int INITIAL_BUFFER_SIZE = 256; + private static final int INITIAL_LENGTHS_SIZE = 4; + + private static final int BUFFERS_SIZE = 32; + + private static final ThreadLocal arrayTL = new ThreadLocal() { + protected char[] initialValue() { return new char[INITIAL_BUFFER_SIZE]; } + }; + + private static final ThreadLocal bufferTL = new ThreadLocal() { + protected ByteBuffer initialValue() { return BufferUtils.createByteBuffer(INITIAL_BUFFER_SIZE); } + }; + + private static final ThreadLocal bufferPointerTL = new ThreadLocal() { + protected PointerBuffer initialValue() { return BufferUtils.createPointerBuffer(INITIAL_BUFFER_SIZE); } + }; + + private static final ThreadLocal lengthsTL = new ThreadLocal() { + protected IntBuffer initialValue() { return BufferUtils.createIntBuffer(INITIAL_LENGTHS_SIZE); } + }; + + private static final ThreadLocal buffersTL = new ThreadLocal() { + protected Buffers initialValue() { return new Buffers(); } + }; + + private APIUtil() { + } + + private static char[] getArray(final int size) { + char[] array = arrayTL.get(); + + if ( array.length < size ) { + int sizeNew = array.length << 1; + while ( sizeNew < size ) + sizeNew <<= 1; + + array = new char[size]; + arrayTL.set(array); + } + + return array; + } + + static ByteBuffer getBufferByte(final int size) { + ByteBuffer buffer = bufferTL.get(); + + if ( buffer.capacity() < size ) { + int sizeNew = buffer.capacity() << 1; + while ( sizeNew < size ) + sizeNew <<= 1; + + buffer = BufferUtils.createByteBuffer(size); + bufferTL.set(buffer); + } else + buffer.clear(); + + return buffer; + } + + private static ByteBuffer getBufferByteOffset(final int size) { + ByteBuffer buffer = bufferTL.get(); + + if ( buffer.capacity() < size ) { + int sizeNew = buffer.capacity() << 1; + while ( sizeNew < size ) + sizeNew <<= 1; + + final ByteBuffer bufferNew = BufferUtils.createByteBuffer(size); + bufferNew.put(buffer); + bufferTL.set(buffer = bufferNew); + } else { + buffer.position(buffer.limit()); + buffer.limit(buffer.capacity()); + } + + return buffer; + } + + static PointerBuffer getBufferPointer(final int size) { + PointerBuffer buffer = bufferPointerTL.get(); + + if ( buffer.capacity() < size ) { + int sizeNew = buffer.capacity() << 1; + while ( sizeNew < size ) + sizeNew <<= 1; + + buffer = BufferUtils.createPointerBuffer(size); + bufferPointerTL.set(buffer); + } else + buffer.clear(); + + return buffer; + } + + static IntBuffer getBufferInt() { return buffersTL.get().ints; } + + static LongBuffer getBufferLong() { return buffersTL.get().longs; } + + static FloatBuffer getBufferFloat() { return buffersTL.get().floats; } + + static IntBuffer getLengths() { + return getLengths(1); + } + + static IntBuffer getLengths(final int size) { + IntBuffer lengths = lengthsTL.get(); + + if ( lengths.capacity() < size ) { + int sizeNew = lengths.capacity(); + while ( sizeNew < size ) + sizeNew <<= 1; + + lengths = BufferUtils.createIntBuffer(size); + lengthsTL.set(lengths); + } else + lengths.clear(); + + return lengths; + } + + /** + * Simple ASCII encoding. + * + * @param buffer The target buffer + * @param string The source string + */ + private static ByteBuffer encode(final ByteBuffer buffer, final CharSequence string) { + for ( int i = 0; i < string.length(); i++ ) { + final char c = string.charAt(i); + if ( LWJGLUtil.DEBUG && 0x80 <= c ) // Silently ignore and map to 0x1A. + buffer.put((byte)0x1A); + else + buffer.put((byte)c); + } + + return buffer; + } + + /** + * Reads a byte string from the specified buffer. + * + * @param buffer + * + * @return the buffer as a String. + */ + static String getString(final ByteBuffer buffer) { + final int length = buffer.remaining(); + final char[] charArray = getArray(length); + + for ( int i = buffer.position(); i < buffer.limit(); i++ ) + charArray[i - buffer.position()] = (char)buffer.get(i); + + return new String(charArray, 0, length); + } + + /** + * Returns a buffer containing the specified string as bytes. + * + * @param string + * + * @return the String as a ByteBuffer + */ + static long getBuffer(final CharSequence string) { + final ByteBuffer buffer = encode(getBufferByte(string.length()), string); + buffer.flip(); + return MemoryUtil.getAddress0(buffer); + } + + /** + * Returns a buffer containing the specified string as bytes, starting at the specified offset. + * + * @param string + * + * @return the String as a ByteBuffer + */ + static long getBuffer(final CharSequence string, final int offset) { + final ByteBuffer buffer = encode(getBufferByteOffset(offset + string.length()), string); + buffer.flip(); + return MemoryUtil.getAddress(buffer); + } + + /** + * Returns a buffer containing the specified string as bytes, including null-termination. + * + * @param string + * + * @return the String as a ByteBuffer + */ + static long getBufferNT(final CharSequence string) { + final ByteBuffer buffer = encode(getBufferByte(string.length() + 1), string); + buffer.put((byte)0); + buffer.flip(); + return MemoryUtil.getAddress0(buffer); + } + + static int getTotalLength(final CharSequence[] strings) { + int length = 0; + for ( CharSequence string : strings ) + length += string.length(); + + return length; + } + + /** + * Returns a buffer containing the specified strings as bytes. + * + * @param strings + * + * @return the Strings as a ByteBuffer + */ + static long getBuffer(final CharSequence[] strings) { + final ByteBuffer buffer = getBufferByte(getTotalLength(strings)); + + for ( CharSequence string : strings ) + encode(buffer, string); + + buffer.flip(); + return MemoryUtil.getAddress0(buffer); + } + + /** + * Returns a buffer containing the specified strings as bytes, including null-termination. + * + * @param strings + * + * @return the Strings as a ByteBuffer + */ + static long getBufferNT(final CharSequence[] strings) { + final ByteBuffer buffer = getBufferByte(getTotalLength(strings) + strings.length); + + for ( CharSequence string : strings ) { + encode(buffer, string); + buffer.put((byte)0); + } + + buffer.flip(); + return MemoryUtil.getAddress0(buffer); + } + + /** + * Returns a buffer containing the lengths of the specified strings. + * + * @param strings + * + * @return the String lengths in an IntBuffer + */ + static long getLengths(final CharSequence[] strings) { + IntBuffer buffer = getLengths(strings.length); + + for ( CharSequence string : strings ) + buffer.put(string.length()); + + buffer.flip(); + return MemoryUtil.getAddress0(buffer); + } + + static long getInt(final int value) { + return MemoryUtil.getAddress(getBufferInt().put(0, value), 0); + } + + static long getBufferByte0() { + return MemoryUtil.getAddress0(getBufferByte(0)); + } + + private static class Buffers { + + final IntBuffer ints; + final LongBuffer longs; + final FloatBuffer floats; + + Buffers() { + ints = BufferUtils.createIntBuffer(BUFFERS_SIZE); + longs = BufferUtils.createLongBuffer(BUFFERS_SIZE); + floats = BufferUtils.createFloatBuffer(BUFFERS_SIZE); + } + + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/CallbackUtil.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/CallbackUtil.java new file mode 100644 index 0000000..f6e182b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/CallbackUtil.java @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import java.util.HashMap; +import java.util.Map; + +/** + * Utility class that handles OpenGL API callbacks. + * + * @author Spasi + */ +final class CallbackUtil { + + /** Context -> Long */ + private static final Map contextUserParamsKHR = new HashMap(); + + private CallbackUtil() {} + + /** + * Creates a new global reference to the specified Object. + * + * @param obj the Object + * + * @return the GlobalRef memory address or 0 if the Object is null. + */ + static long createGlobalRef(final Object obj) { + return obj == null ? 0 : ncreateGlobalRef(obj); + } + + /** + * Creates a new global reference to the specified Object. + * + * @param obj the Object + * + * @return the GlobalRef memory address. + */ + private static native long ncreateGlobalRef(Object obj); + + /** + * Deletes a global reference. + * + * @param ref the GlobalRef memory address. + */ + private static native void deleteGlobalRef(long ref); + + // --------- [ XXX_debug_output ] --------- + + /** + * Associates the current OpenGL context with the specified global reference. If there + * is no context current, the global reference is deleted and an exception is thrown. + * Any previous callback registrations will be cleared. + * + * @param userParam the global reference pointer + */ + private static void registerContextCallback(final long userParam, final Map contextUserData) { + ContextCapabilities caps = GLContext.getCapabilities(); + if ( caps == null ) { + deleteGlobalRef(userParam); + throw new IllegalStateException("No context is current."); + } + + final Long userParam_old = contextUserData.remove(caps); + if ( userParam_old != null ) + deleteGlobalRef(userParam_old); + + if ( userParam != 0 ) + contextUserData.put(caps, userParam); + } + + /** + * Releases references to any callbacks associated with the specified GL context. + * + * @param context the Context to unregister + */ + static void unregisterCallbacks(final Object context) { + // TODO: This is never called for custom contexts. Need to fix for LWJGL 3.0 + final ContextCapabilities caps = GLContext.getCapabilities(); + + Long userParam = contextUserParamsKHR.remove(caps); + if ( userParam != null ) + deleteGlobalRef(userParam); + } + + // --------- [ KHR_debug ] --------- + + /** + * Returns the memory address of the native function we pass to glDebugMessageCallback. + * + * @return the callback function address + */ + static native long getDebugCallbackKHR(); + + /** + * Associates the current OpenGL context with the specified global reference. If there + * is no context current, the global reference is deleted and an exception is thrown. + * Any previous callback registrations will be cleared. + * + * @param userParam the global reference pointer + */ + static void registerContextCallbackKHR(final long userParam) { + registerContextCallback(userParam, contextUserParamsKHR); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/ContextAttribs.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/ContextAttribs.java new file mode 100644 index 0000000..5724cc0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/ContextAttribs.java @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.BufferUtils; + +import java.nio.IntBuffer; + +import static org.lwjgl.opengles.EGL.*; + +/** + * This class represents the context attributes passed to EGL's eglCreateContext. + * The only attribute allowed is EGL_CONTEXT_CLIENT_VERSION and it must be 2 or 3 (LWJGL does not support GLES 1.x). + */ +public final class ContextAttribs { + + private int version; + + public ContextAttribs() { + this(2); + } + + public ContextAttribs(final int version) { + if ( 3 < version ) + throw new IllegalArgumentException("Invalid OpenGL ES version specified: " + version); + + this.version = version; + } + + private ContextAttribs(final ContextAttribs attribs) { + this.version = attribs.version; + } + + public int getVersion() { + return version; + } + + public IntBuffer getAttribList() { + int attribCount = 1; + + final IntBuffer attribs = BufferUtils.createIntBuffer((attribCount * 2) + 1); + + attribs.put(EGL_CONTEXT_CLIENT_VERSION).put(version); + + attribs.put(EGL_NONE); + attribs.rewind(); + return attribs; + } + + public String toString() { + StringBuilder sb = new StringBuilder(32); + + sb.append("ContextAttribs:"); + sb.append(" Version=").append(version); + + return sb.toString(); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGL.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGL.java new file mode 100644 index 0000000..87ff08f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGL.java @@ -0,0 +1,922 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.BufferChecks; +import org.lwjgl.LWJGLException; +import org.lwjgl.MemoryUtil; +import org.lwjgl.PointerBuffer; + +import java.nio.IntBuffer; + +/** EGL wrapper class. */ +public final class EGL { + + /** EGL aliases */ + public static final int + EGL_FALSE = 0, + EGL_TRUE = 1; + + /** Out-of-band handle values */ + public static final int + EGL_DEFAULT_DISPLAY = 0, + EGL_NO_CONTEXT = 0, + EGL_NO_DISPLAY = 0, + EGL_NO_SURFACE = 0; + + /** Out-of-band attribute value */ + public static final int EGL_DONT_CARE = -1; + + /** Errors / GetError return values */ + public static final int + EGL_SUCCESS = 0x3000, + EGL_NOT_INITIALIZED = 0x3001, + EGL_BAD_ACCESS = 0x3002, + EGL_BAD_ALLOC = 0x3003, + EGL_BAD_ATTRIBUTE = 0x3004, + EGL_BAD_CONFIG = 0x3005, + EGL_BAD_CONTEXT = 0x3006, + EGL_BAD_CURRENT_SURFACE = 0x3007, + EGL_BAD_DISPLAY = 0x3008, + EGL_BAD_MATCH = 0x3009, + EGL_BAD_NATIVE_PIXMAP = 0x300A, + EGL_BAD_NATIVE_WINDOW = 0x300B, + EGL_BAD_PARAMETER = 0x300C, + EGL_BAD_SURFACE = 0x300D, + EGL_CONTEXT_LOST = 0x300E; // EGL 1.1 - IMG_power_management + + /** Reserved =0x300F;-=0x301F; for additional errors */ + + /** Config attributes */ + public static final int + EGL_BUFFER_SIZE = 0x3020, + EGL_ALPHA_SIZE = 0x3021, + EGL_BLUE_SIZE = 0x3022, + EGL_GREEN_SIZE = 0x3023, + EGL_RED_SIZE = 0x3024, + EGL_DEPTH_SIZE = 0x3025, + EGL_STENCIL_SIZE = 0x3026, + EGL_CONFIG_CAVEAT = 0x3027, + EGL_CONFIG_ID = 0x3028, + EGL_LEVEL = 0x3029, + EGL_MAX_PBUFFER_HEIGHT = 0x302A, + EGL_MAX_PBUFFER_PIXELS = 0x302B, + EGL_MAX_PBUFFER_WIDTH = 0x302C, + EGL_NATIVE_RENDERABLE = 0x302D, + EGL_NATIVE_VISUAL_ID = 0x302E, + EGL_NATIVE_VISUAL_TYPE = 0x302F, + EGL_SAMPLES = 0x3031, + EGL_SAMPLE_BUFFERS = 0x3032, + EGL_SURFACE_TYPE = 0x3033, + EGL_TRANSPARENT_TYPE = 0x3034, + EGL_TRANSPARENT_BLUE_VALUE = 0x3035, + EGL_TRANSPARENT_GREEN_VALUE = 0x3036, + EGL_TRANSPARENT_RED_VALUE = 0x3037, + EGL_NONE = 0x3038, // Attrib list terminator + EGL_BIND_TO_TEXTURE_RGB = 0x3039, + EGL_BIND_TO_TEXTURE_RGBA = 0x303A, + EGL_MIN_SWAP_INTERVAL = 0x303B, + EGL_MAX_SWAP_INTERVAL = 0x303C, + EGL_LUMINANCE_SIZE = 0x303D, + EGL_ALPHA_MASK_SIZE = 0x303E, + EGL_COLOR_BUFFER_TYPE = 0x303F, + EGL_RENDERABLE_TYPE = 0x3040, + EGL_MATCH_NATIVE_PIXMAP = 0x3041, // Pseudo-attribute (not queryable) + EGL_CONFORMANT = 0x3042; + + /** Reserved =0x3041;-=0x304F; for additional config attributes */ + + /** Config attribute values */ + public static final int + EGL_SLOW_CONFIG = 0x3050, // EGL_CONFIG_CAVEAT value + EGL_NON_CONFORMANT_CONFIG = 0x3051, // EGL_CONFIG_CAVEAT value + EGL_TRANSPARENT_RGB = 0x3052, // EGL_TRANSPARENT_TYPE value + EGL_RGB_BUFFER = 0x308E, // EGL_COLOR_BUFFER_TYPE value + EGL_LUMINANCE_BUFFER = 0x308F; // EGL_COLOR_BUFFER_TYPE value + + /** More config attribute values, for EGL_TEXTURE_FORMAT */ + public static final int + EGL_NO_TEXTURE = 0x305C, + EGL_TEXTURE_RGB = 0x305D, + EGL_TEXTURE_RGBA = 0x305E, + EGL_TEXTURE_2D = 0x305F; + + /** EGL_SURFACE_TYPE mask bits */ + public static final int + EGL_PBUFFER_BIT = 0x0001, + EGL_PIXMAP_BIT = 0x0002, + EGL_WINDOW_BIT = 0x0004, + EGL_VG_COLORSPACE_LINEAR_BIT = 0x0020, + EGL_VG_ALPHA_FORMAT_PRE_BIT = 0x0040, + EGL_MULTISAMPLE_RESOLVE_BOX_BIT = 0x0200, + EGL_SWAP_BEHAVIOR_PRESERVED_BIT = 0x0400; + + /** EGL_RENDERABLE_TYPE mask bits */ + public static final int + EGL_OPENGL_ES_BIT = 0x0001, + EGL_OPENVG_BIT = 0x0002, + EGL_OPENGL_ES2_BIT = 0x0004, + EGL_OPENGL_BIT = 0x0008; + + /** QueryString targets */ + public static final int + EGL_VENDOR = 0x3053, + EGL_VERSION = 0x3054, + EGL_EXTENSIONS = 0x3055, + EGL_CLIENT_APIS = 0x308D; + + /** QuerySurface / SurfaceAttrib / CreatePbufferSurface targets */ + public static final int + EGL_HEIGHT = 0x3056, + EGL_WIDTH = 0x3057, + EGL_LARGEST_PBUFFER = 0x3058, + EGL_TEXTURE_FORMAT = 0x3080, + EGL_TEXTURE_TARGET = 0x3081, + EGL_MIPMAP_TEXTURE = 0x3082, + EGL_MIPMAP_LEVEL = 0x3083, + EGL_RENDER_BUFFER = 0x3086, + EGL_VG_COLORSPACE = 0x3087, + EGL_VG_ALPHA_FORMAT = 0x3088, + EGL_HORIZONTAL_RESOLUTION = 0x3090, + EGL_VERTICAL_RESOLUTION = 0x3091, + EGL_PIXEL_ASPECT_RATIO = 0x3092, + EGL_SWAP_BEHAVIOR = 0x3093, + EGL_MULTISAMPLE_RESOLVE = 0x3099; + + /** EGL_RENDER_BUFFER values / BindTexImage / ReleaseTexImage buffer targets */ + public static final int + EGL_BACK_BUFFER = 0x3084, + EGL_SINGLE_BUFFER = 0x3085; + + /** OpenVG color spaces */ + public static final int + EGL_VG_COLORSPACE_sRGB = 0x3089, // EGL_VG_COLORSPACE value + EGL_VG_COLORSPACE_LINEAR = 0x308A; // EGL_VG_COLORSPACE value + + /** OpenVG alpha formats */ + public static final int + EGL_VG_ALPHA_FORMAT_NONPRE = 0x308B, // EGL_ALPHA_FORMAT value + EGL_VG_ALPHA_FORMAT_PRE = 0x308C; // EGL_ALPHA_FORMAT + + /** + * Constant scale factor by which fractional display resolutions & + * aspect ratio are scaled when queried as integer values. + */ + public static final int EGL_DISPLAY_SCALING = 10000; + + /** Unknown display resolution/aspect ratio */ + public static final int EGL_UNKNOWN = -1; + + /** Back buffer swap behaviors */ + public static final int + EGL_BUFFER_PRESERVED = 0x3094, // EGL_SWAP_BEHAVIOR value + EGL_BUFFER_DESTROYED = 0x3095; // EGL_SWAP_BEHAVIOR value + + /** CreatePbufferFromClientBuffer buffer types */ + static final int EGL_OPENVG_IMAGE = 0x3096; + + /** QueryContext targets */ + public static final int EGL_CONTEXT_CLIENT_TYPE = 0x3097; + + /** CreateContext attributes */ + public static final int EGL_CONTEXT_CLIENT_VERSION = 0x3098; + + /** Multisample resolution behaviors */ + public static final int + EGL_MULTISAMPLE_RESOLVE_DEFAULT = 0x309A, // EGL_MULTISAMPLE_RESOLVE value + EGL_MULTISAMPLE_RESOLVE_BOX = 0x309B; // EGL_MULTISAMPLE_RESOLVE value + + /** BindAPI/QueryAPI targets */ + public static final int + EGL_OPENGL_ES_API = 0x30A0, + EGL_OPENVG_API = 0x30A1, + EGL_OPENGL_API = 0x30A2; + + /** GetCurrentSurface targets */ + public static final int + EGL_DRAW = 0x3059, + EGL_READ = 0x305A; + + /** WaitNative engines */ + static final int EGL_CORE_NATIVE_ENGINE = 0x305B; + + private EGL() { + } + + public static native int eglGetError(); + + /** + * Obtains an EGL display from the specified native display and initializes it. + * + * @param display_id the handle to the native display. + * + * @return the EGL Display + * + * @throws org.lwjgl.LWJGLException if no display is available or an EGL error occurs + */ + public static EGLDisplay eglGetDisplay(long display_id) throws LWJGLException { + //LWJGLUtil.log("eglGetDisplay"); + final long pointer = neglGetDisplay(display_id); + + if ( pointer == EGL_NO_DISPLAY ) // No error is generated when this happens + throw new LWJGLException("Failed to get EGL display from native display handle: " + display_id); + + return new EGLDisplay(pointer); + } + + private static native long neglGetDisplay(long display_id); + + /** + * Initializes the specified EGL display. + * + * @param dpy the EGL display to initialize + * @param version the EGL major and minor version will be returned in this buffer. + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs + */ + static void eglInitialize(EGLDisplay dpy, IntBuffer version) throws LWJGLException { + //LWJGLUtil.log("eglInitialize"); + BufferChecks.checkBuffer(version, 2); + if ( !neglInitialize(dpy.getPointer(), MemoryUtil.getAddress(version)) ) + throwEGLError("Failed to initialize EGL display."); + } + + private static native boolean neglInitialize(long dpy_ptr, long version); + + /** + * Release the resources associated with the specified EGL display. + * + * @param dpy the EGL display to terminate + */ + static void eglTerminate(EGLDisplay dpy) throws LWJGLException { + //LWJGLUtil.log("eglTerminate"); + if ( !neglTerminate(dpy.getPointer()) ) + throwEGLError("Failed to terminate EGL display."); + } + + private static native boolean neglTerminate(long dpy_ptr); + + /** + * Returns a string describing some aspect of the EGL implementation running on the specified display. + * + * @param dpy the EGL display to query + * @param name the value to query + * + * @return the description + */ + public static String eglQueryString(EGLDisplay dpy, int name) { + //LWJGLUtil.log("eglQueryString"); + return neglQueryString(dpy.getPointer(), name); + } + + private static native String neglQueryString(long dpy, int name); + + /** + * Returns the number of EGLConfigs that are available on the specified display. + * + * @param dpy the EGLDisplay + * + * @return the number of EGLConfigs available + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs + * @see #eglGetConfigs(EGLDisplay, EGLConfig[], IntBuffer) + */ + static int eglGetConfigsNum(EGLDisplay dpy) throws LWJGLException { + //LWJGLUtil.log("eglGetConfigsNum"); + IntBuffer num_config = APIUtil.getBufferInt(); + + if ( !neglGetConfigs(dpy.getPointer(), 0L, 0, MemoryUtil.getAddress0(num_config)) ) + throwEGLError("Failed to get EGL configs."); + + return num_config.get(0); + } + + /** + * Returns the available EGLConfigs on the speficied display. The number of available EGLConfigs + * is returned in the num_config parameter. The configs array may be null. If it is null, a new + * array will be allocated, with size equal to the result of {@link #eglGetConfigsNum(EGLDisplay)} eglGetConfigsNum}. + * If it is not null, no more than {@code configs.length} EGLConfigs will be returned. If the array is bigger + * than the number of available EGLConfigs, the remaining array elements will not be affected. + * + * @param dpy the EGLDisplay + * @param configs the EGLConfigs array + * @param num_config the number of available EGLConfigs returned + * + * @return the available EGLConfigs + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs + */ + static EGLConfig[] eglGetConfigs(EGLDisplay dpy, EGLConfig[] configs, IntBuffer num_config) throws LWJGLException { + //LWJGLUtil.log("eglGetConfigs"); + BufferChecks.checkBuffer(num_config, 1); + + if ( configs == null ) { + if ( !neglGetConfigs(dpy.getPointer(), 0L, 0, MemoryUtil.getAddress(num_config)) ) + throwEGLError("Failed to get number of available EGL configs."); + + configs = new EGLConfig[num_config.get(num_config.position())]; + } + + final PointerBuffer configs_buffer = APIUtil.getBufferPointer(configs.length); + if ( !neglGetConfigs(dpy.getPointer(), MemoryUtil.getAddress0(configs_buffer), configs.length, MemoryUtil.getAddress(num_config)) ) + throwEGLError("Failed to get EGL configs."); + + final int config_size = num_config.get(num_config.position()); + for ( int i = 0; i < config_size; i++ ) + configs[i] = new EGLConfig(dpy, configs_buffer.get(i)); + + return configs; + } + + private static native boolean neglGetConfigs(long dpy_ptr, long configs, int config_size, long num_config); + + /** + * Returns the number of EGLConfigs that are available on the specified display and + * match the speficied list of attributes. + * + * @param dpy the EGLDisplay + * @param attrib_list the attribute list (may be null) + * + * @return the number of EGLConfigs available that satisft the attribute list + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs + * @see #eglChooseConfig(EGLDisplay, IntBuffer, EGLConfig[], IntBuffer) + */ + static int eglChooseConfigNum(EGLDisplay dpy, IntBuffer attrib_list) throws LWJGLException { + //LWJGLUtil.log("eglChooseConfigNum"); + checkAttribList(attrib_list); + IntBuffer num_config = APIUtil.getBufferInt(); + + if ( !neglChooseConfig(dpy.getPointer(), MemoryUtil.getAddressSafe(attrib_list), 0L, 0, MemoryUtil.getAddress0(num_config)) ) + throwEGLError("Failed to get EGL configs."); + + return num_config.get(0); + } + + /** + * Returns the available EGLConfigs on the speficied display that satisfy the specified list of attributes. + * The number of available EGLConfigs is returned in the num_config parameter. The configs array may be null. + * If it is null, a new array will be allocated, with size equal to the result of {@link #eglGetConfigsNum(EGLDisplay)} eglGetConfigsNum}. + * If it is not null, no more than {@code configs.length} EGLConfigs will be returned. If the array is bigger + * than the number of available EGLConfigs, the remaining array elements will not be affected. + * + * @param dpy the EGLDisplay + * @param attrib_list the attribute list (may be null) + * @param configs the EGLConfigs array + * @param num_config the number of available EGLConfigs returned + * + * @return the available EGLConfigs that satisfy the attribute list + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs + */ + static EGLConfig[] eglChooseConfig(EGLDisplay dpy, IntBuffer attrib_list, EGLConfig[] configs, IntBuffer num_config) throws LWJGLException { + //LWJGLUtil.log("eglChooseConfig"); + checkAttribList(attrib_list); + BufferChecks.checkBuffer(num_config, 1); + + int config_size; + if ( configs == null ) { + if ( !neglChooseConfig(dpy.getPointer(), MemoryUtil.getAddressSafe(attrib_list), 0L, 0, MemoryUtil.getAddress(num_config)) ) + throwEGLError("Failed to get number of available EGL configs."); + + config_size = num_config.get(num_config.position()); + } else + config_size = configs.length; + + //LWJGLUtil.log("config_size = " + config_size); + PointerBuffer configs_buffer = APIUtil.getBufferPointer(config_size); + if ( !neglChooseConfig(dpy.getPointer(), MemoryUtil.getAddressSafe(attrib_list), MemoryUtil.getAddress0(configs_buffer), config_size, MemoryUtil.getAddress(num_config)) ) + throwEGLError("Failed to choose EGL config."); + + // Get the true number of configurations (the first neglChooseConfig call may return more than the second) + config_size = num_config.get(num_config.position()); + if ( configs == null ) + configs = new EGLConfig[config_size]; + for ( int i = 0; i < config_size; i++ ) + configs[i] = new EGLConfig(dpy, configs_buffer.get(i)); + + return configs; + } + + private static native boolean neglChooseConfig(long dpy_ptr, long attrib_list, long configs, int config_size, long num_config); + + /** + * Returns the value of an EGL config attribute. + * + * @param dpy the EGL display + * @param config the EGL config + * @param attribute the attribute + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs + */ + static int eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, int attribute) throws LWJGLException { + //LWJGLUtil.log("eglGetConfigAttrib"); + final IntBuffer value = APIUtil.getBufferInt(); + + if ( !neglGetConfigAttrib(dpy.getPointer(), config.getPointer(), attribute, MemoryUtil.getAddress(value)) ) + throwEGLError("Failed to get EGL config attribute."); + + return value.get(0); + } + + private static native boolean neglGetConfigAttrib(long dpy_ptr, long config_ptr, int attribute, long value); + + /** + * Creates an on-screen rendering surface on the specified EGL display. + * + * @param dpy the EGL display + * @param config the EGL config + * @param win the native window handle + * @param attrib_list an attribute list (may be null) + * + * @return the created EGL surface + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs + */ + static EGLSurface eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, long win, IntBuffer attrib_list) throws LWJGLException { + //LWJGLUtil.log("eglCreateWindowSurface"); + checkAttribList(attrib_list); + final long pointer = neglCreateWindowSurface(dpy.getPointer(), config.getPointer(), win, MemoryUtil.getAddressSafe(attrib_list)); + + if ( pointer == EGL_NO_SURFACE ) + throwEGLError("Failed to create EGL window surface."); + + return new EGLSurface(dpy, config, pointer); + } + + private static native long neglCreateWindowSurface(long dpy_ptr, long config_ptr, long win, long attrib_list); + + /** + * Creates an off-screen rendering surface on the specified EGL display. + * + * @param dpy the EGL display + * @param config the EGL config + * @param attrib_list an attribute list (may be null) + * + * @return the created EGL surface + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs + */ + static EGLSurface eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, IntBuffer attrib_list) throws LWJGLException { + //LWJGLUtil.log("eglCreatePbufferSurface"); + checkAttribList(attrib_list); + final long pointer = neglCreatePbufferSurface(dpy.getPointer(), config.getPointer(), MemoryUtil.getAddressSafe(attrib_list)); + + if ( pointer == EGL_NO_SURFACE ) + throwEGLError("Failed to create EGL pbuffer surface."); + + return new EGLSurface(dpy, config, pointer); + } + + private static native long neglCreatePbufferSurface(long dpy_ptr, long config_ptr, long attrib_list); + + /* + EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list); + */ + + /** + * Sets the specified EGL surface attribute to the specified value. + * + * @param dpy the EGL display + * @param surface the EGL surface + * @param attribute the attribute + * @param value the attribute value + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs + */ + static void eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, int attribute, int value) throws LWJGLException { + //LWJGLUtil.log("eglSurfaceAttrib"); + if ( !neglSurfaceAttrib(dpy.getPointer(), surface.getPointer(), attribute, value) ) + throwEGLError("Failed to set surface attribute."); + } + + private static native boolean neglSurfaceAttrib(long dpy_ptr, long surface_ptr, int attribute, int value); + + /** + * Destroys the specified EGL surface. + * + * @param dpy the EGL display + * @param surface the EGL surface to destroy + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs + */ + static void eglDestroySurface(EGLDisplay dpy, EGLSurface surface) throws LWJGLException { + //LWJGLUtil.log("eglDestroySurface"); + if ( !neglDestroySurface(dpy.getPointer(), surface.getPointer()) ) + throwEGLError("Failed to destroy EGL surface."); + } + + private static native boolean neglDestroySurface(long dpy_ptr, long surface_ptr); + + /** + * Returns the value of the specified EGL surface attribute in the value parameter. + * + * @param dpy the EGL display + * @param surface the EGL surface + * @param attribute the surface attribute + * @param value the attribute value will be returned here + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs + */ + public static void eglQuerySurface(EGLDisplay dpy, EGLSurface surface, int attribute, IntBuffer value) throws LWJGLException { + //LWJGLUtil.log("eglQuerySurface"); + BufferChecks.checkBuffer(value, 1); + if ( !neglQuerySurface(dpy.getPointer(), surface.getPointer(), attribute, MemoryUtil.getAddress(value)) ) + throwEGLError("Failed to query surface attribute."); + } + + private static native boolean neglQuerySurface(long dpy_ptr, long surface_ptr, int attribute, long value); + + /** + * Binds the specified rendering API to the current thread. + * + * @param api the API to bind + * + * @return true if the bind was successful, false if an EGL error occurs + */ + public static native boolean eglBindAPI(int api); + + /** + * Returns the current rendering API. + * + * @return the rendering API bound to the current thread + */ + public static native int eglQueryAPI(); + + /** + * Returns EGL to its state at thread initialization. This includes the following:
+ *

+ * For each client API supported by EGL, if there is a currently bound context, + * that context is released. This is equivalent to calling eglMakeCurrent + * with ctx set to EGL_NO_CONTEXT and both draw and read set to EGL_NO_SURFACE + *


+ *

The current rendering API is reset to its value at thread initialization


+ *

Any additional implementation-dependent per-thread state maintained by EGL + * is marked for deletion as soon as possible.

+ * + * @return true if thread state was released successfully, false is an EGL error occurs + */ + static native boolean eglReleaseThread(); + + /* + EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list); + EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer); + EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer); + */ + + /** + * Specifies the minimum number of video frame periods per buffer swap for + * the window associated with the current context. + * + * @param dpy the EGL display + * @param interval the frame interval + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs + */ + static void eglSwapInterval(EGLDisplay dpy, int interval) throws LWJGLException { + //LWJGLUtil.log("eglSwapInterval"); + if ( !neglSwapInterval(dpy.getPointer(), interval) ) + throwEGLError("Failed to set swap interval."); + } + + private static native boolean neglSwapInterval(long dpy_ptr, int interval); + + /** + * Creates a new EGL context for the current rendering API. + * + * @param dpy the EGL display + * @param config the EGL config + * @param share_context the EGL context to share data with + * @param attrib_list the attribute list (may be null) + * + * @return the created EGL context + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs + */ + static EGLContext eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, IntBuffer attrib_list) throws LWJGLException { + //LWJGLUtil.log("eglCreateContext"); + checkAttribList(attrib_list); + final long pointer = neglCreateContext(dpy.getPointer(), config.getPointer(), + share_context == null ? EGL_NO_CONTEXT : share_context.getPointer(), + MemoryUtil.getAddressSafe(attrib_list)); + + if ( pointer == EGL_NO_CONTEXT ) + throwEGLError("Failed to create EGL context."); + + return new EGLContext(dpy, config, pointer); + } + + private static native long neglCreateContext(long dpy_ptr, long config_ptr, long share_context_ptr, long attrib_list); + + /** + * Destroys a rendering context. + * + * @param dpy the EGL display + * @param ctx the EGL context + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs + */ + static void eglDestroyContext(EGLDisplay dpy, EGLContext ctx) throws LWJGLException { + //LWJGLUtil.log("eglDestroyContext"); + if ( !neglDestroyContext(dpy.getPointer(), ctx.getPointer()) ) + throwEGLError("Failed to destroy context."); + } + + private static native boolean neglDestroyContext(long dpy_ptr, long ctx_ptr); + + /** + * Binds the specified context to the current thread and to the draw and read surfaces. + * + * @param dpy the EGL display + * @param draw the draw EGL surface + * @param read the read EGL surface + * @param ctx the EGL context to make current + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs + * @throws PowerManagementEventException if an EGL power management event occurs + */ + static void eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx) throws LWJGLException, PowerManagementEventException { + //LWJGLUtil.log("eglMakeCurrent"); + if ( !neglMakeCurrent(dpy.getPointer(), + draw == null ? EGL_NO_SURFACE : draw.getPointer(), + read == null ? EGL_NO_SURFACE : read.getPointer(), + ctx == null ? EGL_NO_CONTEXT : ctx.getPointer()) ) { + final int error = eglGetError(); + if ( error == EGL_CONTEXT_LOST ) + throw new PowerManagementEventException(); + else + throwEGLError("Failed to change the current context.", error); + } + } + + /** + * Releases the current context without assigning a new one. + * + * @param dpy the EGL display + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs + * @throws PowerManagementEventException if an EGL power management event occurs + * @see #eglMakeCurrent(EGLDisplay, EGLSurface, EGLSurface, EGLContext) + */ + public static void eglReleaseCurrent(EGLDisplay dpy) throws LWJGLException, PowerManagementEventException { + //LWJGLUtil.log("eglReleaseCurrent"); + eglMakeCurrent(dpy, null, null, null); + } + + private static native boolean neglMakeCurrent(long dpy_ptr, long draw_ptr, long read_ptr, long ctx_ptr); + + /** + * Returns the current EGL context for the current rendering API. + * If there is no context current, null is returned. + * + * @return the current context + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs + */ + public static EGLContext eglGetCurrentContext() throws LWJGLException { + //LWJGLUtil.log("eglGetCurrentContext"); + // Get current context + final long ctx = neglGetCurrentContext(); + if ( ctx == EGL_NO_CONTEXT ) + return null; + + // Get current display + final EGLDisplay display = eglGetCurrentDisplay(); + + // Query context's CONFIG_ID + final IntBuffer attrib_list = APIUtil.getBufferInt(); + neglQueryContext(display.getPointer(), ctx, EGL_CONFIG_ID, MemoryUtil.getAddress0(attrib_list)); + + final EGLConfig config = getEGLConfig(display, attrib_list); + + // Create the context handle + return new EGLContext(display, config, ctx); + } + + /** + * Returns true if the specified EGL context is the current context. + * This method is faster than using {@code #eglGetCurrentContext} + * and comparing the two EGLContext objects. + * + * @param context the EGL context + * + * @return true if the EGL context is current + * + * @see #eglGetCurrentContext() + */ + public static boolean eglIsCurrentContext(EGLContext context) { + //LWJGLUtil.log("eglIsCurrentContext"); + return neglGetCurrentContext() == context.getPointer(); + } + + private static native long neglGetCurrentContext(); + + /** + * Returns the EGL surfaces used for rendering by the current context. + * If there is no context current, null is returned. + * + * @param readdraw the read or draw surface + * + * @return the current surface + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs + */ + public static EGLSurface eglGetCurrentSurface(int readdraw) throws LWJGLException { + //LWJGLUtil.log("eglGetCurrentSurface"); + final long surface = neglGetCurrentSurface(readdraw); + if ( surface == EGL_NO_SURFACE ) + return null; + + // Get current display + EGLDisplay display = eglGetCurrentDisplay(); + + // Query context's CONFIG_ID + final IntBuffer attrib_list = APIUtil.getBufferInt(); + if ( !neglQuerySurface(display.getPointer(), surface, EGL_CONFIG_ID, MemoryUtil.getAddress0(attrib_list)) ) + throwEGLError("Failed to query surface EGL config ID."); + + final EGLConfig config = getEGLConfig(display, attrib_list); + + // Create the surface handle + return new EGLSurface(display, config, surface); + } + + private static native long neglGetCurrentSurface(int readdraw); + + /** + * Returns the EGL display associated with the current context. + * + * @return the current display + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs + */ + public static EGLDisplay eglGetCurrentDisplay() throws LWJGLException { + //LWJGLUtil.log("eglGetCurrentDisplay"); + return new EGLDisplay(neglGetCurrentDisplay()); + } + + private static native long neglGetCurrentDisplay(); + + /** + * Returns the value of the specified EGL context attribute in the value parameter. + * + * @param dpy the EGL display + * @param ctx the EGL context + * @param attribute the context attribute + * @param value the attribute value will be returned here + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs + */ + public static void eglQueryContext(EGLDisplay dpy, EGLContext ctx, int attribute, IntBuffer value) throws LWJGLException { + //LWJGLUtil.log("eglQueryContext"); + BufferChecks.checkBuffer(value, 1); + if ( !neglQueryContext(dpy.getPointer(), ctx.getPointer(), attribute, MemoryUtil.getAddress(value)) ) + throwEGLError("Failed to query context attribute."); + } + + private static native boolean neglQueryContext(long dpy_ptr, long ctx_ptr, int attribute, long value); + + /** + * Prevents native rendering API functions from executing until any + * outstanding client API rendering affecting the same surface is complete. + * + * @return true if the wait was successful, false is an EGL error occurs + */ + public static native boolean eglWaitClient(); + + /** + * This method does the equivalent of:
+ * + * EGLenum api = eglQueryAPI(); + * eglBindAPI(EGL_OPENGL_ES_API); + * eglWaitClient(); + * eglBindAPI(api); + * + * + * @return true if the wait was successful, false if an EGL error occurs + */ + public static native boolean eglWaitGL(); + + /** + * Prevents a client API command sequence from executing until any outstanding + * native rendering affecting the same surface is complete. + * + * @param engine the native rendering engine + * + * @return true if the wait was successful, false if an EGL error occurs + */ + public static native boolean eglWaitNative(int engine); + + /** + * Posts the color buffer to the window. + * + * @param dpy the EGL display + * @param surface the EGL back-buffered window surface + * + * @throws org.lwjgl.LWJGLException if an EGL occurs + * @throws PowerManagementEventException if an EGL power management event occurs + */ + static void eglSwapBuffers(EGLDisplay dpy, EGLSurface surface) throws LWJGLException, PowerManagementEventException { + //LWJGLUtil.log("eglSwapBuffers"); + if ( !neglSwapBuffers(dpy.getPointer(), surface.getPointer()) ) { + final int error = eglGetError(); + if ( error == EGL_CONTEXT_LOST ) + throw new PowerManagementEventException(); + else + throwEGLError("Failed to swap buffers.", error); + } + } + + private static native boolean neglSwapBuffers(long dpy_ptr, long surface_ptr); + + //EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target); + + /* -------------------------------- + HELPER METHODS + -------------------------------- */ + + static void checkAttribList(IntBuffer attrib_list) { + if ( attrib_list == null ) + return; + + //BufferChecks.checkDirect(attrib_list); + if ( attrib_list.remaining() % 2 != 1 ) + throw new IllegalArgumentException("Invalid number of values in attribute list."); + if ( attrib_list.get(attrib_list.limit() - 1) != EGL_NONE ) + throw new IllegalArgumentException("The attribute list is not terminated with EGL_NONE."); + } + + private static EGLConfig getEGLConfig(final EGLDisplay dpy, final IntBuffer attrib_list) throws LWJGLException { + final int configID = attrib_list.get(0); + + // -- This fails on the emulator + // Get EGL config used by the context + attrib_list.put(0, EGL_CONFIG_ID).put(1, configID).put(2, EGL_NONE); + + final PointerBuffer configs_buffer = APIUtil.getBufferPointer(1); + if ( !neglChooseConfig(dpy.getPointer(), MemoryUtil.getAddress(attrib_list), MemoryUtil.getAddress0(configs_buffer), 1, MemoryUtil.getAddress(attrib_list, 3)) ) + throwEGLError("Failed to choose EGL config."); + + return new EGLConfig(dpy, configs_buffer.get(0)); + + // -- Emulator workaround + /* + EGLConfig config = null; + + final EGLConfig[] configs = eglGetConfigs(dpy, null, attrib_list); + final int config_size = attrib_list.get(0); + for ( int i = 0; i < config_size; i++ ) { + if ( configs[i].getConfigID() == configID ) { + config = configs[i]; + break; + } + } + + if ( config == null ) + throwEGLError("Failed to retrieve EGL config for current context."); + + return config; + //*/ + } + + static void throwEGLError(final String msg) throws LWJGLException { + throwEGLError(msg, eglGetError()); + } + + static void throwEGLError(String msg, final int error) throws LWJGLException { + if ( error != EGL_SUCCESS ) + msg += " EGL error: " + Util.translateEGLErrorString(error); + + throw new LWJGLException(msg); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLConfig.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLConfig.java new file mode 100644 index 0000000..a73b56b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLConfig.java @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.LWJGLException; +import org.lwjgl.PointerWrapperAbstract; + +import static org.lwjgl.opengles.EGL.*; + +/** EGLConfig wrapper class. */ +public final class EGLConfig extends PointerWrapperAbstract { + + private final EGLDisplay display; + + private final int configID; + + EGLConfig(final EGLDisplay display, final long pointer) throws LWJGLException { + super(pointer); + + this.display = display; + this.configID = getAttribute(EGL_CONFIG_ID); + } + + /** + * Returns the EGL display from which this EGL config was retrieved. + * + * @return the EGL display + */ + public EGLDisplay getDisplay() { + return display; + } + + /** + * Returns the EGL_CONFIG_ID attribute of this EGLConfig. + * + * @return the EGL_CONFIG_ID + */ + public int getConfigID() { + return configID; + } + + /** + * Returns the value of the specified EGL config attribute. + * + * @param attribute the attribute + * + * @return the attribute value + */ + public int getAttribute(final int attribute) throws LWJGLException { + return eglGetConfigAttrib(display, this, attribute); + } + + public boolean equals(final Object obj) { + if ( obj == null || !(obj instanceof EGLConfig) ) + return false; + + return getPointer() == ((EGLConfig)obj).getPointer(); + } + + public String toString() { + final StringBuilder sb = new StringBuilder(512); + + sb.append("EGLConfig (").append(configID).append(")"); + sb.append("\n------------"); + + try { + sb.append("\nEGL_LEVEL").append(": ").append(getAttribute(EGL_LEVEL)); + sb.append("\nEGL_RENDERABLE_TYPE").append(": ").append(Integer.toBinaryString(getAttribute(EGL_RENDERABLE_TYPE))); + sb.append("\nEGL_NATIVE_RENDERABLE").append(": ").append(getAttribute(EGL_NATIVE_RENDERABLE) == EGL_TRUE); + sb.append("\nEGL_SURFACE_TYPE").append(": ").append(Integer.toBinaryString(getAttribute(EGL_SURFACE_TYPE))); + } catch (LWJGLException e) { + } + + final PixelFormat.Attrib[] attribEnums = PixelFormat.Attrib.values(); + for ( PixelFormat.Attrib attribEnum : attribEnums ) { + if ( attribEnum.isSurfaceAttrib() ) + continue; + + try { + final int attrib = getAttribute(attribEnum.getEGLAttrib()); + sb.append("\nEGL_").append(attribEnum.name()).append(": ").append(attrib); + } catch (LWJGLException e) { + //System.out.println("Failed to retrieve: " + attribEnum.name()); + // Ignore, can happen when querying unsupported attributes (e.g. extension ones) + } + } + + return sb.toString(); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLContext.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLContext.java new file mode 100644 index 0000000..54f48b2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLContext.java @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.LWJGLException; +import org.lwjgl.PointerWrapperAbstract; + +import java.nio.IntBuffer; + +import static org.lwjgl.opengles.EGL.*; + +/** EGLContext wrapper class. */ +public final class EGLContext extends PointerWrapperAbstract { + + private EGLDisplay display; + private final EGLConfig config; + + private boolean destroyed; + + EGLContext(final EGLDisplay display, final EGLConfig config, final long pointer) { + super(pointer); + + if ( !display.isInitialized() ) + throw new IllegalStateException("Invalid EGL display specified."); + + if ( config.getDisplay() != display ) + throw new IllegalStateException("Invalid EGL config specified."); + + this.display = display; + this.config = config; + } + + public void setDisplay(EGLDisplay display) { + this.display = display; + } + + EGLDisplay getDisplay() { + return display; + } + + EGLConfig getConfig() { + return config; + } + + private void checkDestroyed() { + if ( destroyed ) + throw new IllegalStateException("The EGL surface has been destroyed."); + } + + public void destroy() throws LWJGLException { + eglDestroyContext(display, this); + destroyed = true; + } + + /** + * Returns the value of the specified EGL context attribute. + * + * @param attribute the context attribute + * + * @return the attribute value + */ + int getAttribute(final int attribute) throws LWJGLException { + checkDestroyed(); + + IntBuffer value = APIUtil.getBufferInt(); + eglQueryContext(display, this, attribute, value); + return value.get(0); + } + + public void makeCurrent(final EGLSurface surface) throws LWJGLException, PowerManagementEventException { + makeCurrent(surface, surface); + } + + public void makeCurrent(final EGLSurface draw, final EGLSurface read) throws LWJGLException, PowerManagementEventException { + eglMakeCurrent(display, draw, read, this); + } + + public boolean equals(final Object obj) { + if ( obj == null || !(obj instanceof EGLContext) ) + return false; + + return getPointer() == ((EGLContext)obj).getPointer(); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLDisplay.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLDisplay.java new file mode 100644 index 0000000..b654df6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLDisplay.java @@ -0,0 +1,216 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.LWJGLException; +import org.lwjgl.PointerWrapperAbstract; + +import java.nio.IntBuffer; +import java.util.HashSet; +import java.util.Set; +import java.util.StringTokenizer; + +import static org.lwjgl.opengles.EGL.*; + +/** EGLDisplay wrapper class. */ +public final class EGLDisplay extends PointerWrapperAbstract { + + private int majorVersion; + private int minorVersion; + + private Set extensions; + + private boolean initialized; + + EGLDisplay(final long pointer) throws LWJGLException { + super(pointer); + + initialize(); + + /*final EGLConfig[] configs = eglGetConfigs(this, null, APIUtil.getBufferInt()); + for ( EGLConfig config : configs ) { + System.out.println(config); + System.out.println(""); + }*/ + } + + /** + * Returns the major EGL version of this EGL display. + * + * @return the major EGL version + */ + public int getMajorVersion() { + return majorVersion; + } + + /** + * Returns the minor EGL version of this EGL display. + * + * @return the minor EGL version + */ + public int getMinorVersion() { + return minorVersion; + } + + /** + * Returns true if the specified EGL extension is supported by this EGL display. + * + * @param eglExtension the EGL extension + * + * @return true if the extension is supported + */ + public boolean isExtensionSupported(final String eglExtension) { + checkInitialized(); + if ( extensions == null ) { + extensions = new HashSet(16); + + final StringTokenizer tokenizer = new StringTokenizer(eglQueryString(this, EGL_EXTENSIONS)); + while ( tokenizer.hasMoreTokens() ) + extensions.add(tokenizer.nextToken()); + } + + return extensions.contains(eglExtension); + } + + boolean isInitialized() { + return initialized; + } + + private void initialize() throws LWJGLException { + IntBuffer version = APIUtil.getBufferInt(); + eglInitialize(this, version); + + majorVersion = version.get(0); + minorVersion = version.get(1); + + initialized = true; + } + + private void checkInitialized() { + if ( !initialized ) + throw new IllegalStateException("The EGL display needs to be initialized first."); + } + + /** Release the resources associated with this EGL display. */ + public void terminate() throws LWJGLException { + eglTerminate(this); + + majorVersion = 0; + minorVersion = 0; + + initialized = false; + } + + /** + * Returns a string describing some aspect of the EGL implementation running on the specified display. + * + * @param name the value to query + * + * @return the description + */ + public String query(int name) { + checkInitialized(); + return eglQueryString(this, name); + } + + int getConfigsNum() throws LWJGLException { + checkInitialized(); + return eglGetConfigsNum(this); + } + + EGLConfig[] getConfigs(EGLConfig[] configs, IntBuffer num_config) throws LWJGLException { + checkInitialized(); + return eglGetConfigs(this, configs, num_config); + } + + int getConfigNum(IntBuffer attrib_list) throws LWJGLException { + checkInitialized(); + return eglChooseConfigNum(this, attrib_list); + } + + /** Returns the available EGL configs on this display that satisfy the specified list of attributes. */ + public EGLConfig[] chooseConfig(IntBuffer attrib_list, EGLConfig[] configs, IntBuffer num_config) throws LWJGLException { + checkInitialized(); + return eglChooseConfig(this, attrib_list, configs, num_config); + } + + /** + * Creates an on-screen rendering surface on this EGL display. + * + * @param config the EGL config + * @param window the native window handle + * @param attrib_list an attribute list (may be null) + * + * @return the EGL surface + */ + public EGLSurface createWindowSurface(EGLConfig config, long window, IntBuffer attrib_list) throws LWJGLException { + checkInitialized(); + + if ( config.getDisplay() != this ) + throw new IllegalArgumentException("Invalid EGL config specified."); + + return eglCreateWindowSurface(this, config, window, attrib_list); + } + + EGLSurface createPbufferSurface(EGLConfig config, IntBuffer attrib_list) throws LWJGLException { + checkInitialized(); + + if ( config.getDisplay() != this ) + throw new IllegalArgumentException("Invalid EGL config specified."); + + return eglCreatePbufferSurface(this, config, attrib_list); + } + + public EGLContext createContext(EGLConfig config, EGLContext shareContext, IntBuffer attrib_list) throws LWJGLException { + checkInitialized(); + + if ( config.getDisplay() != this ) + throw new IllegalStateException("Invalid EGL config specified."); + + if ( shareContext != null && shareContext.getDisplay() != this ) + throw new IllegalStateException("Invalid shared EGL context specified."); + + return eglCreateContext(this, config, shareContext, attrib_list); + } + + public void setSwapInterval(final int interval) throws LWJGLException { + eglSwapInterval(this, interval); + } + + public boolean equals(final Object obj) { + if ( obj == null || !(obj instanceof EGLDisplay) ) + return false; + + return getPointer() == ((EGLDisplay)obj).getPointer(); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLImageOES.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLImageOES.java new file mode 100644 index 0000000..18c6a1e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLImageOES.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.PointerWrapperAbstract; + +/** EGLImageOES wrapper class. */ +public final class EGLImageOES extends PointerWrapperAbstract { + + public EGLImageOES(final long pointer) { + super(pointer); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLKHRFenceSync.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLKHRFenceSync.java new file mode 100644 index 0000000..8fffb57 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLKHRFenceSync.java @@ -0,0 +1,174 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.LWJGLException; +import org.lwjgl.MemoryUtil; + +import java.nio.IntBuffer; + +import static org.lwjgl.opengles.EGL.*; + +/** EGL_KHR_fence_sync wrapper class. */ +public final class EGLKHRFenceSync { + + /** + * Accepted by the <type> parameter of eglCreateSyncKHR, and returned + * in <value> when eglGetSyncAttribKHR is called with <attribute> + * EGL_SYNC_TYPE_KHR: + */ + public static final int EGL_SYNC_FENCE_KHR = 0x30F9; + + /** Accepted by the <attribute> parameter of eglGetSyncAttribKHR: */ + public static final int EGL_SYNC_TYPE_KHR = 0x30F7, + EGL_SYNC_STATUS_KHR = 0x30F1, + EGL_SYNC_CONDITION_KHR = 0x30F8; + + /** + * Returned in <value> when eglGetSyncAttribKHR is called with + * <attribute> EGL_SYNC_STATUS_KHR: + */ + public static final int EGL_SIGNALED_KHR = 0x30F2, + EGL_UNSIGNALED_KHR = 0x30F3; + + /** + * Returned in <value> when eglGetSyncAttribKHR is called with + * <attribute> EGL_SYNC_CONDITION_KHR: + */ + public static final int EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR = 0x30F0; + + /** Accepted in the <flags> parameter of eglClientWaitSyncKHR: */ + public static final int EGL_SYNC_FLUSH_COMMANDS_BIT_KHR = 0x0001; + + /** Accepted in the <timeout> parameter of eglClientWaitSyncKHR: */ + public static final long EGL_FOREVER_KHR = 0xFFFFFFFFFFFFFFFFl; + + /** Returned by eglClientWaitSyncKHR: */ + public static final int EGL_TIMEOUT_EXPIRED_KHR = 0x30F5, + EGL_CONDITION_SATISFIED_KHR = 0x30F6; + + /** Returned by eglCreateSyncKHR in the event of an error: */ + public static final long EGL_NO_SYNC_KHR = 0; + + static { + initNativeStubs(); + } + + private EGLKHRFenceSync() { + } + + private static native void initNativeStubs(); + + /** + * Creates a fence sync object for the specified EGL display and returns + * a handle to the new object. + * + * @param dpy the EGL display + * @param type the sync type + * @param attrib_list an attribute list (may be null) + * + * @return the created fence sync object + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs. + */ + public static EGLSyncKHR eglCreateSyncKHR(EGLDisplay dpy, int type, IntBuffer attrib_list) throws LWJGLException { + checkAttribList(attrib_list); + + final long pointer = neglCreateSyncKHR(dpy.getPointer(), type, MemoryUtil.getAddressSafe(attrib_list)); + + if ( pointer == EGL_NO_SYNC_KHR ) + throwEGLError("Failed to create KHR fence sync object."); + + return new EGLSyncKHR(pointer); + } + + private static native long neglCreateSyncKHR(long dpy_ptr, int type, long attrib_list); + + /** + * Destroys an existing sync object. + * + * @param sync the sync object + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs. + */ + public static void eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync) throws LWJGLException { + if ( !neglDestroySyncKHR(dpy.getPointer(), sync.getPointer()) ) + throwEGLError("Failed to destroy KHR fence sync object."); + } + + private static native boolean neglDestroySyncKHR(long dpy_ptr, long sync_ptr); + + /** + * Blocks the calling thread until the specified sync object is + * signaled, or until a specified timeout value expires. + * + * @param sync the sync object + * @param flags the block flags + * @param timeout the block timeout + * + * @return the sync object status + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs. + */ + public static int eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, int flags, long timeout) throws LWJGLException { + final int status = neglClientWaitSyncKHR(dpy.getPointer(), sync.getPointer(), flags, timeout); + + if ( status == EGL_FALSE ) + throwEGLError("Failed to block on KHR fence sync object."); + + return status; + } + + private static native int neglClientWaitSyncKHR(long dpy_ptr, long sync_ptr, int flags, long timeout); + + /** + * Returns the value of the sync object attribute. + * + * @param sync the sync object + * @param attribute the attribute to query + * + * @return the attribute value + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs. + */ + public static int eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, int attribute) throws LWJGLException { + final IntBuffer value = APIUtil.getBufferInt(); + + if ( !neglGetSyncAttribKHR(dpy.getPointer(), sync.getPointer(), attribute, MemoryUtil.getAddress(value)) ) + throwEGLError("Failed to get KHR fence sync object attribute."); + + return value.get(0); + } + + private static native boolean neglGetSyncAttribKHR(long dpy_ptr, long sync_ptr, int attribute, long value); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLKHRReusableSync.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLKHRReusableSync.java new file mode 100644 index 0000000..3ddca45 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLKHRReusableSync.java @@ -0,0 +1,156 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.LWJGLException; + +import java.nio.IntBuffer; + +import static org.lwjgl.opengles.EGL.*; + +/** EGL_KHR_reusable_sync wrapper class. */ +public final class EGLKHRReusableSync { + + /** + * Accepted by the <type> parameter of eglCreateSyncKHR, and returned + * in <value> when eglGetSyncAttribKHR is called with <attribute> + * EGL_SYNC_TYPE_KHR: + */ + public static final int EGL_SYNC_REUSABLE_KHR = 0x30FA; + + /** Accepted by the <attribute> parameter of eglGetSyncAttribKHR: */ + public static final int EGL_SYNC_TYPE_KHR = 0x30F7, + EGL_SYNC_STATUS_KHR = 0x30F1; + + /** + * Returned in <value> when eglGetSyncAttribKHR is called with + * <attribute> EGL_SYNC_STATUS_KHR: + */ + public static final int EGL_SIGNALED_KHR = 0x30F2, + EGL_UNSIGNALED_KHR = 0x30F3; + + /** Accepted in the <flags> parameter of eglClientWaitSyncKHR: */ + public static final int EGL_SYNC_FLUSH_COMMANDS_BIT_KHR = 0x0001; + + /** Accepted in the <timeout> parameter of eglClientWaitSyncKHR: */ + public static final long EGL_FOREVER_KHR = 0xFFFFFFFFFFFFFFFFl; + + /** Returned by eglClientWaitSyncKHR: */ + public static final int EGL_TIMEOUT_EXPIRED_KHR = 0x30F5, + EGL_CONDITION_SATISFIED_KHR = 0x30F6; + + /** Returned by eglCreateSyncKHR in the event of an error: */ + public static final long EGL_NO_SYNC_KHR = 0; + + static { + initNativeStubs(); + } + + private EGLKHRReusableSync() { + } + + private static native void initNativeStubs(); + + /** + * Creates a fence sync object for the specified EGL display and returns + * a handle to the new object. + * + * @param dpy the EGL display + * @param type the sync type + * @param attrib_list an attribute list (may be null) + * + * @return the created fence sync object + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs. + */ + public static EGLSyncKHR eglCreateSyncKHR(EGLDisplay dpy, int type, IntBuffer attrib_list) throws LWJGLException { + return EGLKHRFenceSync.eglCreateSyncKHR(dpy, type, attrib_list); + } + + /** + * Destroys an existing sync object. + * + * @param sync the sync object + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs. + */ + public static void eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync) throws LWJGLException { + EGLKHRFenceSync.eglDestroySyncKHR(dpy, sync); + } + + /** + * Blocks the calling thread until the specified sync object is + * signaled, or until a specified timeout value expires. + * + * @param sync the sync object + * @param flags the block flags + * @param timeout the block timeout + * + * @return the sync object status + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs. + */ + public static int eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, int flags, long timeout) throws LWJGLException { + return EGLKHRFenceSync.eglClientWaitSyncKHR(dpy, sync, flags, timeout); + } + + /** + * Signals or unsignals the sync object by changing its status to + * the specified mode. + * + * @param sync the sync object + * @param mode the mode + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs. + */ + public static void eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, int mode) throws LWJGLException { + if ( !neglSignalSyncKHR(dpy.getPointer(), sync.getPointer(), mode) ) + throwEGLError("Failed to signal the KHR fence sync object."); + } + + private static native boolean neglSignalSyncKHR(long dpy_ptr, long sync_ptr, int mode); + + /** + * Returns the value of the sync object attribute. + * + * @param sync the sync object + * @param attribute the attribute to query + * + * @return the attribute value + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs. + */ + public static int eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, int attribute) throws LWJGLException { + return EGLKHRFenceSync.eglGetSyncAttribKHR(dpy, sync, attribute); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLNVSync.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLNVSync.java new file mode 100644 index 0000000..ccb0a79 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLNVSync.java @@ -0,0 +1,215 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.LWJGLException; +import org.lwjgl.MemoryUtil; + +import java.nio.IntBuffer; + +import static org.lwjgl.opengles.EGL.*; + +/** EGL_NV_sync wrapper class. */ +public final class EGLNVSync { + + /** + * Accepted in the <condition> parameter of eglCreateFenceSyncNV, and + * returned in <value> when eglGetSyncAttribNV is called with <attribute> + * EGL_SYNC_CONDITION_NV: + */ + public static final int EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV = 0x30E6; + + /** + * Accepted as an attribute name in the <attrib_list> parameter of + * eglCreateFenceSyncNV, and by the <attribute> parameter of + * eglGetSyncAttribNV: + */ + public static final int EGL_SYNC_STATUS_NV = 0x30E7; + + /** + * Accepted as an attribute value in the <attrib_list> parameter of + * eglCreateFenceSyncNV for the EGL_SYNC_STATUS_NV attribute, by + * the <mode> parameter of eglSignalSyncNV and returned in <value> + * when eglGetSyncAttribNV is called with <attribute> + * EGL_SYNC_STATUS_NV: + */ + public static final int EGL_SIGNALED_NV = 0x30E8, + EGL_UNSIGNALED_NV = 0x30E9; + + /** Accepted in the <flags> parameter of eglClientWaitSyncNV: */ + public static final int EGL_SYNC_FLUSH_COMMANDS_BIT_NV = 0x0001; + + /** Accepted in the <timeout> parameter of eglClientWaitSyncNV: */ + public static final long EGL_FOREVER_NV = 0xFFFFFFFFFFFFFFFFL; + + /** Returned by eglClientWaitSyncNV: */ + public static final int EGL_ALREADY_SIGNALED_NV = 0x30EA, + EGL_TIMEOUT_EXPIRED_NV = 0x30EB, + EGL_CONDITION_SATISFIED_NV = 0x30EC; + + /** Accepted in the <attribute> parameter of eglGetSyncAttribNV: */ + public static final int EGL_SYNC_TYPE_NV = 0x30ED, + EGL_SYNC_CONDITION_NV = 0x30EE; + + /** + * Returned in <value> when eglGetSyncAttribNV is called with + * <attribute> EGL_SYNC_TYPE_NV: + */ + public static final int EGL_SYNC_FENCE_NV = 0x30EF; + + /** Returned by eglCreateFenceSyncNV in the event of an error: */ + public static final long EGL_NO_SYNC_NV = 0; + + static { + initNativeStubs(); + } + + private EGLNVSync() { + } + + private static native void initNativeStubs(); + + /** + * Creates a fence sync object for the specified EGL display and returns + * a handle to the new object. + * + * @param dpy the EGL display + * @param condition the sync condition + * @param attrib_list an attribute list (may be null) + * + * @return the created fence sync object + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs. + */ + public static EGLSyncNV eglCreateFenceSyncNV(EGLDisplay dpy, int condition, IntBuffer attrib_list) throws LWJGLException { + checkAttribList(attrib_list); + + final long pointer = neglCreateFenceSyncNV(dpy.getPointer(), condition, MemoryUtil.getAddressSafe(attrib_list)); + + if ( pointer == EGL_NO_SYNC_NV ) + throwEGLError("Failed to create NV fence sync object."); + + return new EGLSyncNV(pointer); + } + + private static native long neglCreateFenceSyncNV(long dpy_ptr, int condition, long attrib_list); + + /** + * Destroys an existing sync object. + * + * @param sync the sync object + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs. + */ + public static void eglDestroySyncNV(EGLSyncNV sync) throws LWJGLException { + if ( !neglDestroySyncNV(sync.getPointer()) ) + throwEGLError("Failed to destroy NV fence sync object."); + } + + private static native boolean neglDestroySyncNV(long sync_ptr); + + /** + * Inserts a fence command into the command stream of the bound API's current + * context and associates it with sync object. + * + * @param sync the sync object + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs. + */ + public static void eglFenceNV(EGLSyncNV sync) throws LWJGLException { + if ( !neglFenceNV(sync.getPointer()) ) + throwEGLError("Failed to insert NV fence command."); + } + + private static native boolean neglFenceNV(long sync_ptr); + + /** + * Blocks the calling thread until the specified sync object is + * signaled, or until a specified timeout value expires. + * + * @param sync the sync object + * @param flags the block flags + * @param timeout the block timeout + * + * @return the sync object status + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs. + */ + public static int eglClientWaitSyncNV(EGLSyncNV sync, int flags, long timeout) throws LWJGLException { + final int status = neglClientWaitSyncNV(sync.getPointer(), flags, timeout); + + if ( status == EGL_FALSE ) + throwEGLError("Failed to block on NV fence sync object."); + + return status; + } + + private static native int neglClientWaitSyncNV(long sync_ptr, int flags, long timeout); + + /** + * Signals or unsignals the sync object by changing its status to + * the specified mode. + * + * @param sync the sync object + * @param mode the mode + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs. + */ + public static void eglSignalSyncNV(EGLSyncNV sync, int mode) throws LWJGLException { + if ( !neglSignalSyncNV(sync.getPointer(), mode) ) + throwEGLError("Failed to signal the NV fence sync object."); + } + + private static native boolean neglSignalSyncNV(long sync_ptr, int mode); + + /** + * Returns the value of the sync object attribute. + * + * @param sync the sync object + * @param attribute the attribute to query + * + * @return the attribute value + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs. + */ + public static int eglGetSyncAttribNV(EGLSyncNV sync, int attribute) throws LWJGLException { + final IntBuffer value = APIUtil.getBufferInt(); + + if ( !neglGetSyncAttribNV(sync.getPointer(), attribute, MemoryUtil.getAddress0(value)) ) + throwEGLError("Failed to get NV fence sync object attribute."); + + return value.get(0); + } + + private static native boolean neglGetSyncAttribNV(long sync_ptr, int attribute, long value); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLSurface.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLSurface.java new file mode 100644 index 0000000..5464337 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLSurface.java @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.LWJGLException; +import org.lwjgl.PointerWrapperAbstract; + +import java.nio.IntBuffer; + +import static org.lwjgl.opengles.EGL.*; + +/** EGLSurface wrapper class. */ +public final class EGLSurface extends PointerWrapperAbstract { + + private final EGLDisplay display; + private final EGLConfig config; + + private boolean destroyed; + + EGLSurface(final EGLDisplay display, final EGLConfig config, final long pointer) { + super(pointer); + + if ( !display.isInitialized() ) + throw new IllegalStateException("Invalid EGL display specified."); + + this.display = display; + this.config = config; + } + + /** + * Returns the EGL display from which this EGL surface was created. + * + * @return the EGL display + */ + public EGLDisplay getDisplay() { + return display; + } + + /** + * Returns the EGL config associated with this EGL surface. + * + * @return the EGL config + */ + public EGLConfig getConfig() { + return config; + } + + private void checkDestroyed() { + if ( destroyed ) + throw new IllegalStateException("The EGL surface has been destroyed."); + } + + /** Destroys this EGL surface. */ + public void destroy() throws LWJGLException { + eglDestroySurface(display, this); + destroyed = true; + } + + void setAttribute(int attribute, int value) throws LWJGLException { + checkDestroyed(); + eglSurfaceAttrib(display, this, attribute, value); + } + + /** + * Returns the value of the specified EGL surface attribute. + * + * @param attribute the surface attribute + * + * @return the attribute value + */ + public int getAttribute(int attribute) throws LWJGLException { + checkDestroyed(); + + IntBuffer value = APIUtil.getBufferInt(); + eglQuerySurface(display, this, attribute, value); + return value.get(0); + } + + public void swapBuffers() throws LWJGLException, PowerManagementEventException { + checkDestroyed(); + eglSwapBuffers(display, this); + } + + public boolean equals(final Object obj) { + if ( obj == null || !(obj instanceof EGLSurface) ) + return false; + + return getPointer() == ((EGLSurface)obj).getPointer(); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLSyncKHR.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLSyncKHR.java new file mode 100644 index 0000000..743d121 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLSyncKHR.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.PointerWrapperAbstract; + +/** EGLSyncKHR wrapper class. */ +public class EGLSyncKHR extends PointerWrapperAbstract { + + public EGLSyncKHR(final long pointer) { + super(pointer); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLSyncNV.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLSyncNV.java new file mode 100644 index 0000000..6833adc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/EGLSyncNV.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.PointerWrapperAbstract; + +/** EGLSyncNV wrapper class. */ +public class EGLSyncNV extends PointerWrapperAbstract { + + public EGLSyncNV(final long pointer) { + super(pointer); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/FastIntMap.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/FastIntMap.java new file mode 100644 index 0000000..17776a5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/FastIntMap.java @@ -0,0 +1,238 @@ +/* + * Copyright 2002-2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the + * License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" + * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language + * governing permissions and limitations under the License. + */ +package org.lwjgl.opengles; + +import java.util.Iterator; + +/** + * A hash map using primitive ints as keys rather than objects. + * + * @author Justin Couch + * @author Alex Chaffee (alex@apache.org) + * @author Stephen Colebourne + * @author Nathan Sweet + */ +final class FastIntMap implements Iterable> { + + private Entry[] table; + private int size, mask, capacity, threshold; + + /** Same as: FastIntMap(16, 0.75f); */ + FastIntMap() { + this(16, 0.75f); + } + + /** Same as: FastIntMap(initialCapacity, 0.75f); */ + FastIntMap(int initialCapacity) { + this(initialCapacity, 0.75f); + } + + FastIntMap(int initialCapacity, float loadFactor) { + if ( initialCapacity > 1 << 30 ) throw new IllegalArgumentException("initialCapacity is too large."); + if ( initialCapacity < 0 ) throw new IllegalArgumentException("initialCapacity must be greater than zero."); + if ( loadFactor <= 0 ) throw new IllegalArgumentException("initialCapacity must be greater than zero."); + capacity = 1; + while ( capacity < initialCapacity ) + capacity <<= 1; + this.threshold = (int)(capacity * loadFactor); + this.table = new Entry[capacity]; + this.mask = capacity - 1; + } + + private int index(final int key) { + return index(key, mask); + } + + private static int index(final int key, final int mask) { + return key & mask; + } + + public V put(int key, V value) { + final Entry[] table = this.table; + int index = index(key); + + // Check if key already exists. + for ( Entry e = table[index]; e != null; e = e.next ) { + if ( e.key != key ) continue; + V oldValue = e.value; + e.value = value; + return oldValue; + } + + table[index] = new Entry(key, value, table[index]); + + if ( size++ >= threshold ) + rehash(table); + + return null; + } + + private void rehash(final Entry[] table) { + final int newCapacity = 2 * capacity; + final int newMask = newCapacity - 1; + + final Entry[] newTable = new Entry[newCapacity]; + + for ( int i = 0, index; i < table.length; i++ ) { + Entry e = table[i]; + if ( e == null ) continue; + do { + final Entry next = e.next; + index = index(e.key, newMask); + e.next = newTable[index]; + newTable[index] = e; + e = next; + } while ( e != null ); + } + + this.table = newTable; + capacity = newCapacity; + mask = newMask; + threshold *= 2; + } + + public V get(int key) { + final int index = index(key); + for ( Entry e = table[index]; e != null; e = e.next ) + if ( e.key == key ) return e.value; + return null; + } + + public boolean containsValue(Object value) { + final Entry[] table = this.table; + for ( int i = table.length - 1; i >= 0; i-- ) + for ( Entry e = table[i]; e != null; e = e.next ) + if ( e.value.equals(value) ) return true; + return false; + } + + public boolean containsKey(int key) { + final int index = index(key); + for ( Entry e = table[index]; e != null; e = e.next ) + if ( e.key == key ) return true; + return false; + } + + public V remove(int key) { + final int index = index(key); + + Entry prev = table[index]; + Entry e = prev; + while ( e != null ) { + Entry next = e.next; + if ( e.key == key ) { + size--; + if ( prev == e ) + table[index] = next; + else + prev.next = next; + return e.value; + } + prev = e; + e = next; + } + return null; + } + + public int size() { + return size; + } + + public boolean isEmpty() { + return size == 0; + } + + public void clear() { + final Entry[] table = this.table; + for ( int index = table.length - 1; index >= 0; index-- ) + table[index] = null; + size = 0; + } + + public EntryIterator iterator() { + return new EntryIterator(); + } + + public class EntryIterator implements Iterator> { + + private int nextIndex; + private Entry current; + + EntryIterator() { + reset(); + } + + public void reset() { + current = null; + // Find first bucket. + final Entry[] table = FastIntMap.this.table; + int i; + for ( i = table.length - 1; i >= 0; i-- ) + if ( table[i] != null ) break; + nextIndex = i; + } + + public boolean hasNext() { + if ( nextIndex >= 0 ) return true; + Entry e = current; + return e != null && e.next != null; + } + + public Entry next() { + // Next entry in current bucket. + Entry e = current; + if ( e != null ) { + e = e.next; + if ( e != null ) { + current = e; + return e; + } + } + // Use the bucket at nextIndex and find the next nextIndex. + final Entry[] table = FastIntMap.this.table; + int i = nextIndex; + e = current = table[i]; + while ( --i >= 0 ) + if ( table[i] != null ) break; + nextIndex = i; + return e; + } + + public void remove() { + FastIntMap.this.remove(current.key); + } + } + + static final class Entry { + + final int key; + T value; + Entry next; + + Entry(int key, T value, Entry next) { + this.key = key; + this.value = value; + this.next = next; + } + + public int getKey() { + return key; + } + + public T getValue() { + return value; + } + + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/GLChecks.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/GLChecks.java new file mode 100644 index 0000000..a7463e4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/GLChecks.java @@ -0,0 +1,212 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLUtil; +import org.lwjgl.opengl.OpenGLException; + +import java.nio.Buffer; + +import static org.lwjgl.opengles.GLES20.*; + +/** + * A class to check buffer boundaries in GL methods. Many GL + * methods read data from the GL into a native Buffer at its current position. If there is unsufficient space in the buffer when + * the call is made then a buffer overflow would otherwise occur and cause unexpected behaviour, a crash, or worse, a security + * risk. Therefore in those methods where GL reads data back into a buffer, we will call a bounds check method from this class + * to ensure that there is sufficient space in the buffer. + *

+ * Thrown by the debug build library of the LWJGL if any OpenGL operation causes an error. + * + * @author cix_foo + * @version $Revision: 3459 $ + * $Id: GLChecks.java 3459 2010-11-29 17:21:05Z spasi $ + */ +class GLChecks { + + /** Static methods only! */ + private GLChecks() { + } + + static int getBufferObjectSize(int buffer_enum) { + return glGetBufferParameteri(buffer_enum, GLES20.GL_BUFFER_SIZE); + } + + /** Helper method to ensure that array buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */ + static void ensureArrayVBOdisabled() { + if ( LWJGLUtil.CHECKS && StateTracker.getTracker().arrayBuffer != 0 ) + throw new OpenGLException("Cannot use Buffers when Array Buffer Object is enabled"); + } + + /** Helper method to ensure that array buffer objects are enabled. If they are disabled, we'll throw an OpenGLException */ + static void ensureArrayVBOenabled() { + if ( LWJGLUtil.CHECKS && StateTracker.getTracker().arrayBuffer == 0 ) + throw new OpenGLException("Cannot use offsets when Array Buffer Object is disabled"); + } + + /** Helper method to ensure that element array buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */ + static void ensureElementVBOdisabled() { + if ( LWJGLUtil.CHECKS && StateTracker.getTracker().elementArrayBuffer != 0 ) + throw new OpenGLException("Cannot use Buffers when Element Array Buffer Object is enabled"); + } + + /** Helper method to ensure that element array buffer objects are enabled. If they are disabled, we'll throw an OpenGLException */ + static void ensureElementVBOenabled() { + if ( LWJGLUtil.CHECKS && StateTracker.getTracker().elementArrayBuffer == 0 ) + throw new OpenGLException("Cannot use offsets when Element Array Buffer Object is disabled"); + } + + /** Helper method to ensure that pixel pack buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */ + static void ensurePackPBOdisabled() { + if ( LWJGLUtil.CHECKS && StateTracker.getTracker().pixelPackBuffer != 0 ) + throw new OpenGLException("Cannot use Buffers when Pixel Pack Buffer Object is enabled"); + } + + /** Helper method to ensure that pixel pack buffer objects are enabled. If they are disabled, we'll throw an OpenGLException */ + static void ensurePackPBOenabled() { + if ( LWJGLUtil.CHECKS && StateTracker.getTracker().pixelPackBuffer == 0 ) + throw new OpenGLException("Cannot use offsets when Pixel Pack Buffer Object is disabled"); + } + + /** Helper method to ensure that pixel unpack buffer objects are disabled. If they are enabled, we'll throw an OpenGLException */ + static void ensureUnpackPBOdisabled() { + if ( LWJGLUtil.CHECKS && StateTracker.getTracker().pixelUnpackBuffer != 0 ) + throw new OpenGLException("Cannot use Buffers when Pixel Unpack Buffer Object is enabled"); + } + + /** Helper method to ensure that pixel unpack buffer objects are enabled. If they are disabled, we'll throw an OpenGLException */ + static void ensureUnpackPBOenabled() { + if ( LWJGLUtil.CHECKS && StateTracker.getTracker().pixelUnpackBuffer == 0 ) + throw new OpenGLException("Cannot use offsets when Pixel Unpack Buffer Object is disabled"); + } + + /** + * Calculate the storage required for an image in elements + * + * @param format The format of the image (example: GL_RGBA) + * @param type The type of the image elements (example: GL_UNSIGNED_BYTE) + * @param width The width of the image + * @param height The height of the image (1 for 1D images) + * @param depth The depth of the image (1 for 2D images) + * + * @return the size, in elements, of the image + */ + static int calculateImageStorage(Buffer buffer, int format, int type, int width, int height, int depth) { + return LWJGLUtil.CHECKS ? calculateImageStorage(format, type, width, height, depth) >> BufferUtils.getElementSizeExponent(buffer) : 0; + } + + static int calculateTexImage1DStorage(Buffer buffer, int format, int type, int width) { + return LWJGLUtil.CHECKS ? calculateTexImage1DStorage(format, type, width) >> BufferUtils.getElementSizeExponent(buffer) : 0; + } + + static int calculateTexImage2DStorage(Buffer buffer, int format, int type, int width, int height) { + return LWJGLUtil.CHECKS ? calculateTexImage2DStorage(format, type, width, height) >> BufferUtils.getElementSizeExponent(buffer) : 0; + } + + static int calculateTexImage3DStorage(Buffer buffer, int format, int type, int width, int height, int depth) { + return LWJGLUtil.CHECKS ? calculateTexImage3DStorage(format, type, width, height, depth) >> BufferUtils.getElementSizeExponent(buffer) : 0; + } + + /** + * Calculate the storage required for an image in bytes. + * + * @param format The format of the image (example: GL_RGBA) + * @param type The type of the image elements (example: GL_UNSIGNED_BYTE) + * @param width The width of the image + * @param height The height of the image (1 for 1D images) + * @param depth The depth of the image (1 for 2D images) + * + * @return the size, in bytes, of the image + */ + private static int calculateImageStorage(int format, int type, int width, int height, int depth) { + return calculateBytesPerPixel(format, type) * width * height * depth; + } + + private static int calculateTexImage1DStorage(int format, int type, int width) { + return calculateBytesPerPixel(format, type) * width; + } + + private static int calculateTexImage2DStorage(int format, int type, int width, int height) { + return calculateTexImage1DStorage(format, type, width) * height; + } + + private static int calculateTexImage3DStorage(int format, int type, int width, int height, int depth) { + return calculateTexImage2DStorage(format, type, width, height) * depth; + } + + private static int calculateBytesPerPixel(int format, int type) { + int bpe; + switch ( type ) { + case GL_UNSIGNED_BYTE: + case GL_BYTE: + bpe = 1; + break; + case GL_UNSIGNED_SHORT: + case GL_SHORT: + bpe = 2; + break; + case GL_UNSIGNED_INT: + case GL_INT: + case GL_FLOAT: + bpe = 4; + break; + default: + // TODO: Add more types (like the GL12 types GL_UNSIGNED_INT_8_8_8_8 + return 0; + // throw new IllegalArgumentException("Unknown type " + type); + } + int epp; + switch ( format ) { + case GL_LUMINANCE: + case GL_ALPHA: + epp = 1; + break; + + case GL_LUMINANCE_ALPHA: + epp = 2; + break; + case GL_RGB: + epp = 3; + break; + case GL_RGBA: + epp = 4; + break; + default: + // TODO: Add more formats. Assuming 4 is too wasteful on buffer sizes where e.g. 1 is enough (like GL_DEPTH_COMPONENT) + return 0; + } + + return bpe * epp; + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/GLContext.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/GLContext.java new file mode 100644 index 0000000..14f9e88 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/GLContext.java @@ -0,0 +1,312 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; +import org.lwjgl.Sys; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.security.AccessController; +import java.security.PrivilegedActionException; +import java.security.PrivilegedExceptionAction; +import java.util.Map; +import java.util.Set; +import java.util.StringTokenizer; +import java.util.WeakHashMap; + +import static org.lwjgl.opengles.GLES20.*; + +/** + *

+ * Manages GL contexts. Before any rendering is done by a LWJGL system, a call should be made to GLContext.useContext() with a + * context. This will ensure that GLContext has an accurate reflection of the current context's capabilities and function + * pointers. + *

+ * This class is thread-safe in the sense that multiple threads can safely call all public methods. The class is also + * thread-aware in the sense that it tracks a per-thread current context (including capabilities and function pointers). + * That way, multiple threads can have multiple contexts current and render to them concurrently. + * + * @author elias_naur + * @version $Revision: 3279 $ + * $Id: GLContext.java 3279 2010-03-11 21:06:49Z spasi $ + */ +public final class GLContext { + + /** Maps threads to their current context's ContextCapabilities, if any */ + private static final ThreadLocal current_capabilities = new ThreadLocal(); + + /** + * The getCapabilities() method is a potential hot spot in any LWJGL application, since + * it is needed for context capability discovery (e.g. is OpenGL 2.0 supported?), and + * for the function pointers of gl functions. However, the 'current_capabilities' ThreadLocal + * is (relatively) expensive to look up, and since most OpenGL applications use are single threaded + * rendering, the following two is an optimization for this case. + *

+ * ThreadLocals can be thought of as a mapping between threads and values, so the idea + * is to use a lock-less cache of mappings between threads and the current ContextCapabilities. The cache + * could be any size, but in our case, we want a single sized cache for optimal performance + * in the single threaded case. + *

+ * 'fast_path_cache' is the most recent ContextCapabilities (potentially null) and its owner. By + * recent I mean the last thread setting the value in setCapabilities(). When getCapabilities() + * is called, a check to see if the current is the owner of the ContextCapabilities instance in + * fast_path_cache. If so, the instance is returned, if not, some thread has since taken ownership + * of the cache entry and the slower current_capabilities ThreadLocal is queried instead. + *

+ * No locks are needed in get/setCapabilities, because even though fast_path_cache can be accessed + * from multiple threads at once, we are guaranteed by the JVM spec that its value is always valid. + * Furthermore, if the ownership test in getCapabilities() succeeds, the cache entry can only contain + * the correct ContextCapabilites (that is, the one from getThreadLocalCapabilites()), + * since no other thread can set the owner to anyone else than itself. + */ + private static CapabilitiesCacheEntry fast_path_cache = new CapabilitiesCacheEntry(); + + /** + * Simple lock-free cache of CapabilitesEntryCache to avoid allocating more than one + * cache entry per thread + */ + private static final ThreadLocal thread_cache_entries = new ThreadLocal(); + + /** + * The weak mapping from context Object instances to ContextCapabilities. Used + * to avoid recreating a ContextCapabilities every time a context is made current. + */ + private static final Map capability_cache = new WeakHashMap(); + + /** Reference count of the native opengl implementation library */ + private static int gl_ref_count; + private static boolean did_auto_load; + + static { + Sys.initialize(); + } + + /** + * Get the current capabilities instance. It contains the flags used + * to test for support of a particular extension. + * + * @return The current capabilities instance. + */ + public static ContextCapabilities getCapabilities() { + CapabilitiesCacheEntry recent_cache_entry = fast_path_cache; + // Check owner of cache entry + if ( recent_cache_entry.owner == Thread.currentThread() ) { + /* The owner ship test succeeded, so the cache must contain the current ContextCapabilities instance + * assert recent_cache_entry.capabilities == getThreadLocalCapabilities(); + */ + return recent_cache_entry.capabilities; + } else // Some other thread has written to the cache since, and we fall back to the slower path + return getThreadLocalCapabilities(); + } + + private static ContextCapabilities getThreadLocalCapabilities() { + return current_capabilities.get(); + } + + /** + * Set the current capabilities instance. It contains the flags used + * to test for support of a particular extension. + * + * @return The current capabilities instance. + */ + static void setCapabilities(ContextCapabilities capabilities) { + current_capabilities.set(capabilities); + + CapabilitiesCacheEntry thread_cache_entry = thread_cache_entries.get(); + if ( thread_cache_entry == null ) { + thread_cache_entry = new CapabilitiesCacheEntry(); + thread_cache_entries.set(thread_cache_entry); + } + thread_cache_entry.owner = Thread.currentThread(); + thread_cache_entry.capabilities = capabilities; + + fast_path_cache = thread_cache_entry; + } + + /** + * Determine which extensions are available and returns the context profile mask. Helper method to ContextCapabilities. + * + * @param supported_extensions the Set to fill with the available extension names + * + * @return the context profile mask, will be 0 for any version < 3.2 + */ + static void getSupportedExtensions(final Set supported_extensions) { + // Detect OpenGL version first + final String version = glGetString(GL_VERSION); + if ( version == null ) + throw new IllegalStateException("glGetString(GL_VERSION) returned null - possibly caused by missing current context."); + + final String VERSION_PREFIX = "OpenGL ES "; + final StringTokenizer version_tokenizer = new StringTokenizer(version.substring(VERSION_PREFIX.length()), ". "); + + int majorVersion = 0; + int minorVersion = 0; + try { + majorVersion = Integer.parseInt(version_tokenizer.nextToken()); + minorVersion = Integer.parseInt(version_tokenizer.nextToken()); + } catch (NumberFormatException e) { + LWJGLUtil.log("The major and/or minor OpenGL version is malformed: " + e.getMessage()); + } + + // ----------------------[ 2.X ]---------------------- + if ( 3 <= majorVersion ) + supported_extensions.add("OpenGLES30"); + if ( 2 <= majorVersion ) + supported_extensions.add("OpenGLES20"); + + // Parse EXTENSIONS string + final String extensions_string = glGetString(GL_EXTENSIONS); + if ( extensions_string == null ) + throw new IllegalStateException("glGetString(GL_EXTENSIONS) returned null - is there a context current?"); + + final StringTokenizer tokenizer = new StringTokenizer(extensions_string); + while ( tokenizer.hasMoreTokens() ) + supported_extensions.add(tokenizer.nextToken()); + } + + /** + * Helper method to ContextCapabilities. It will try to initialize the native stubs, + * and remove the given extension name from the extension set if the initialization fails. + */ + static void initNativeStubs(final Class extension_class, Set supported_extensions, String ext_name) { + //resetNativeStubs(extension_class); + if ( supported_extensions.contains(ext_name) ) { + try { + doInitNativeStubs(extension_class); + } catch (LWJGLException e) { + LWJGLUtil.log("Failed to initialize extension " + extension_class + " - exception: " + e); + supported_extensions.remove(ext_name); + } + } + } + + static void doInitNativeStubs(final Class extension_class) throws LWJGLException { + try { + AccessController.doPrivileged(new PrivilegedExceptionAction() { + public Object run() throws Exception { + Method init_stubs_method = extension_class.getDeclaredMethod("initNativeStubs"); + init_stubs_method.invoke(null); + return null; + } + }); + } catch (PrivilegedActionException e) { + final Throwable c = e.getCause(); + if ( c instanceof InvocationTargetException ) + throw new LWJGLException(c.getCause()); + else + throw new LWJGLException(c); + } + } + + /** + * Makes a GL context the current LWJGL context by loading GL function pointers. The context must be current before a call to + * this method! Instead it simply ensures that the current context is reflected accurately by GLContext's extension caps and + * function pointers. Use useContext(null) when no context is active.

If the context is the same as last time, then this is + * a no-op.

If the context has not been encountered before it will be fully initialized from scratch. Otherwise a cached set + * of caps and function pointers will be used.

The reference to the context is held in a weak reference; therefore if no + * strong reference exists to the GL context it will automatically be forgotten by the VM at an indeterminate point in the + * future, freeing up a little RAM. + * + * @param context The context object, which uniquely identifies a GL context. If context is null, the native stubs are + * unloaded. + * + * @throws org.lwjgl.LWJGLException if context non-null, and the gl library can't be loaded or the basic GL11 functions can't be loaded + */ + public static synchronized void useContext(Object context) throws LWJGLException { + if ( context == null ) { + // Moved this to the shutdown hook + ContextCapabilities.unloadAllStubs(); + setCapabilities(null); + if ( did_auto_load ) + unloadOpenGLLibrary(); + return; + } + + if ( gl_ref_count == 0 ) { + loadOpenGLLibrary(); + did_auto_load = true; + } + + try { + ContextCapabilities capabilities = capability_cache.get(context); + if ( capabilities == null ) { + /* + * The capabilities object registers itself as current. This behaviour is caused + * by a chicken-and-egg situation where the constructor needs to call GL functions + * as part of its capability discovery, but GL functions cannot be called before + * a capabilities object has been set. + */ + new ContextCapabilities(); + capability_cache.put(context, getCapabilities()); + } else + setCapabilities(capabilities); + } catch (LWJGLException e) { + if ( did_auto_load ) + unloadOpenGLLibrary(); + throw e; + + } + } + + /** If the OpenGL reference count is 0, the library is loaded. The reference count is then incremented. */ + public static synchronized void loadOpenGLLibrary() throws LWJGLException { + if ( gl_ref_count == 0 ) + nLoadOpenGLLibrary(); + gl_ref_count++; + } + + private static native void nLoadOpenGLLibrary() throws LWJGLException; + + /** The OpenGL library reference count is decremented, and if it reaches 0, the library is unloaded. */ + public static synchronized void unloadOpenGLLibrary() { + gl_ref_count--; + /* + * Unload the native OpenGL library unless we're on linux, since + * some drivers (NVIDIA proprietary) crash on exit when unloading the library. + */ + if ( gl_ref_count == 0 && LWJGLUtil.getPlatform() != LWJGLUtil.PLATFORM_LINUX ) + nUnloadOpenGLLibrary(); + } + + private static native void nUnloadOpenGLLibrary(); + + /** Native method to clear native stub bindings */ + static native void resetNativeStubs(Class clazz); + + private static final class CapabilitiesCacheEntry { + + Thread owner; + ContextCapabilities capabilities; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/GLSync.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/GLSync.java new file mode 100644 index 0000000..05c343e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/GLSync.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.PointerWrapperAbstract; + +/** + * This class is a wrapper around a GLsync pointer. + * + * @author spasi + */ +public final class GLSync extends PointerWrapperAbstract { + + GLSync(final long sync) { + super(sync); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/KHRDebugCallback.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/KHRDebugCallback.java new file mode 100644 index 0000000..4762e74 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/KHRDebugCallback.java @@ -0,0 +1,205 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.PointerWrapperAbstract; + +/** + * Instances of this class are needed to use the callback functionality of the KHR_debug extension. + * Users of this class may provide implementations of the {@code Handler} interface to receive notifications. + * The same {@code Handler} instance may be used by different contexts but it is not recommended. + * Handler notifications are synchronized. + * + * @author Spasi + */ +public final class KHRDebugCallback extends PointerWrapperAbstract { + + /** Severity levels. */ + private static final int + GL_DEBUG_SEVERITY_HIGH = 0x9146, + GL_DEBUG_SEVERITY_MEDIUM = 0x9147, + GL_DEBUG_SEVERITY_LOW = 0x9148, + GL_DEBUG_SEVERITY_NOTIFICATION = 0x826B; + + /** Sources. */ + private static final int + GL_DEBUG_SOURCE_API = 0x8246, + GL_DEBUG_SOURCE_WINDOW_SYSTEM = 0x8247, + GL_DEBUG_SOURCE_SHADER_COMPILER = 0x8248, + GL_DEBUG_SOURCE_THIRD_PARTY = 0x8249, + GL_DEBUG_SOURCE_APPLICATION = 0x824A, + GL_DEBUG_SOURCE_OTHER = 0x824B; + + /** Types. */ + private static final int + GL_DEBUG_TYPE_ERROR = 0x824C, + GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR = 0x824D, + GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR = 0x824E, + GL_DEBUG_TYPE_PORTABILITY = 0x824F, + GL_DEBUG_TYPE_PERFORMANCE = 0x8250, + GL_DEBUG_TYPE_OTHER = 0x8251, + GL_DEBUG_TYPE_MARKER = 0x8268; + + private static final long CALLBACK_POINTER; + + static { + long pointer = 0; + try { + // Call reflectively so that we can compile this class for the Generator. + pointer = (Long)Class.forName("org.lwjgl.opengles.CallbackUtil").getDeclaredMethod("getDebugCallbackKHR").invoke(null); + } catch (Exception e) { + // ignore + } + CALLBACK_POINTER = pointer; + } + + private final Handler handler; + + /** + * Creates an KHRebugCallback with a default callback handler. + * The default handler will simply print the message on System.err. + */ + public KHRDebugCallback() { + this(new Handler() { + public void handleMessage(final int source, final int type, final int id, final int severity, final String message) { + System.err.println("[LWJGL] KHR_debug message"); + System.err.println("\tID: " + id); + + String description; + switch ( source ) { + case GL_DEBUG_SOURCE_API: + description = "API"; + break; + case GL_DEBUG_SOURCE_WINDOW_SYSTEM: + description = "WINDOW SYSTEM"; + break; + case GL_DEBUG_SOURCE_SHADER_COMPILER: + description = "SHADER COMPILER"; + break; + case GL_DEBUG_SOURCE_THIRD_PARTY: + description = "THIRD PARTY"; + break; + case GL_DEBUG_SOURCE_APPLICATION: + description = "APPLICATION"; + break; + case GL_DEBUG_SOURCE_OTHER: + description = "OTHER"; + break; + default: + description = "Unknown (" + Integer.toHexString(source) + ")"; + } + System.err.println("\tSource: " + description); + + switch ( type ) { + case GL_DEBUG_TYPE_ERROR: + description = "ERROR"; + break; + case GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR: + description = "DEPRECATED BEHAVIOR"; + break; + case GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR: + description = "UNDEFINED BEHAVIOR"; + break; + case GL_DEBUG_TYPE_PORTABILITY: + description = "PORTABILITY"; + break; + case GL_DEBUG_TYPE_PERFORMANCE: + description = "PERFORMANCE"; + break; + case GL_DEBUG_TYPE_OTHER: + description = "OTHER"; + break; + case GL_DEBUG_TYPE_MARKER: + description = "MARKER"; + break; + default: + description = "Unknown (" + Integer.toHexString(source) + ")"; + } + System.err.println("\tType: " + description); + + switch ( severity ) { + case GL_DEBUG_SEVERITY_HIGH: + description = "HIGH"; + break; + case GL_DEBUG_SEVERITY_MEDIUM: + description = "MEDIUM"; + break; + case GL_DEBUG_SEVERITY_LOW: + description = "LOW"; + break; + case GL_DEBUG_SEVERITY_NOTIFICATION: + description = "NOTIFICATION"; + break; + default: + description = "Unknown (" + Integer.toHexString(source) + ")"; + } + System.err.println("\tSeverity: " + description); + + System.err.println("\tMessage: " + message); + } + }); + } + + /** + * Creates an ARBDebugOutputCallback with the specified callback handler. + * The handler's {@code handleMessage} method will be called whenever + * debug output is generated by the GL. + * + * @param handler the callback handler + */ + public KHRDebugCallback(final Handler handler) { + super(CALLBACK_POINTER); + + this.handler = handler; + } + + Handler getHandler() { + return handler; + } + + /** Implementations of this interface can be used to receive ARB_debug_output notifications. */ + public interface Handler { + + /** + * This method will be called when an ARB_debug_output message is generated. + * + * @param id the message ID + * @param source the message source + * @param type the message type + * @param severity the message severity + * @param message the string representation of the message. + */ + void handleMessage(int source, int type, int id, int severity, String message); + + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/PeerInfo.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/PeerInfo.java new file mode 100644 index 0000000..c6d766e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/PeerInfo.java @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; + +import java.nio.ByteBuffer; + +/** + * + * @author elias_naur + * @version $Revision: 3418 $ + * $Id: PeerInfo.java 3418 2010-09-28 21:11:35Z spasi $ + */ +abstract class PeerInfo { + private final ByteBuffer handle; + private Thread locking_thread; // Thread that has locked this PeerInfo + private int lock_count; + + protected PeerInfo(ByteBuffer handle) { + this.handle = handle; + } + + private void lockAndInitHandle() throws LWJGLException { + doLockAndInitHandle(); + } + + public final synchronized void unlock() throws LWJGLException { + if (lock_count <= 0) + throw new IllegalStateException("PeerInfo not locked!"); + if (Thread.currentThread() != locking_thread) + throw new IllegalStateException("PeerInfo already locked by " + locking_thread); + lock_count--; + if (lock_count == 0) { + doUnlock(); + locking_thread = null; + notify(); + } + } + + protected abstract void doLockAndInitHandle() throws LWJGLException; + protected abstract void doUnlock() throws LWJGLException; + + public final synchronized ByteBuffer lockAndGetHandle() throws LWJGLException { + Thread this_thread = Thread.currentThread(); + while (locking_thread != null && locking_thread != this_thread) { + try { + wait(); + } catch (InterruptedException e) { + LWJGLUtil.log("Interrupted while waiting for PeerInfo lock: " + e); + } + } + if (lock_count == 0) { + locking_thread = this_thread; + doLockAndInitHandle(); + } + lock_count++; + return getHandle(); + } + + final ByteBuffer getHandle() { + return handle; + } + + public void destroy() { + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/PixelFormat.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/PixelFormat.java new file mode 100644 index 0000000..0451898 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/PixelFormat.java @@ -0,0 +1,767 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; +import org.lwjgl.opengl.PixelFormatLWJGL; + +import java.nio.IntBuffer; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +import static org.lwjgl.opengles.EGL.*; +import static org.lwjgl.opengles.NVCoverageSample.*; +import static org.lwjgl.opengles.NVDepthNonlinear.*; +import static org.lwjgl.opengles.PixelFormat.Attrib.*; + +/** + * This class describes the configuration settings for an EGL surface. Instances + * of this class are used as arguments to Display.create(). The attributes specified + * in this class will be used to get EGLConfigs from an EGLDisplay. PixelFormat + * is not the best name for this class, but it matches the corresponding class + * in the official desktop LWJGL. + *

+ * Instances of this class are immutable. An example of the expected way to set + * the PixelFormat property values is the following: + * PixelFormat pf = new PixelFormat().withDepth(24).withSamples(4); + *

+ * Attributes that correspond to EGL extensions will be silently ignored if those + * extensions are not supported by the EGLDisplay. + */ +public final class PixelFormat implements PixelFormatLWJGL { + + public static enum Attrib { + // CORE ATTRIBUTES + + RED_SIZE(EGL_RED_SIZE, 0), + GREEN_SIZE(EGL_GREEN_SIZE, 0), + BLUE_SIZE(EGL_BLUE_SIZE, 0), + ALPHA_SIZE(EGL_ALPHA_SIZE, 0), + + LUMINANCE_SIZE(EGL_LUMINANCE_SIZE, 0), + + DEPTH_SIZE(EGL_DEPTH_SIZE, 0), + STENCIL_SIZE(EGL_STENCIL_SIZE, 0), + + MIN_SWAP_INTERVAL(EGL_MIN_SWAP_INTERVAL, EGL_DONT_CARE), + MAX_SWAP_INTERVAL(EGL_MAX_SWAP_INTERVAL, EGL_DONT_CARE), + + SAMPLES(EGL_SAMPLES, 0), + SAMPLE_BUFFERS(EGL_SAMPLE_BUFFERS, 0), + + TRANSPARENT_TYPE(EGL_TRANSPARENT_TYPE, EGL_NONE), + TRANSPARENT_RED_VALUE(EGL_TRANSPARENT_RED_VALUE, EGL_DONT_CARE), + TRANSPARENT_GREEN_VALUE(EGL_TRANSPARENT_GREEN_VALUE, EGL_DONT_CARE), + TRANSPARENT_BLUE_VALUE(EGL_TRANSPARENT_BLUE_VALUE, EGL_DONT_CARE), + + // SURFACE ATTRIBUTES + + MULTISAMPLE_RESOLVE(EGL_MULTISAMPLE_RESOLVE, EGL_MULTISAMPLE_RESOLVE_DEFAULT, true), + SWAP_BEHAVIOR(EGL_SWAP_BEHAVIOR, EGL_DONT_CARE, true), + + // EXTENSION ATTRIBUTES + + COVERAGE_SAMPLES_NV(EGL_COVERAGE_SAMPLES_NV, 0), + COVERAGE_BUFFERS_NV(EGL_COVERAGE_BUFFERS_NV, 0), + + DEPTH_ENCODING_NONLINEAR_NV(EGL_DEPTH_ENCODING_NONLINEAR_NV, EGL_DONT_CARE); + + private final int eglAttrib; + private final int defaultValue; + + private final boolean surfaceAttrib; + + Attrib(final int eglAttrib, final int defaultValue) { + this(eglAttrib, defaultValue, false); + } + + Attrib(final int eglAttrib, final int defaultValue, final boolean surfaceAttrib) { + this.eglAttrib = eglAttrib; + this.defaultValue = defaultValue; + + this.surfaceAttrib = surfaceAttrib; + } + + /** + * Returns the EGL token that corresponds to this attribute. + * + * @return the EGL attribute token + */ + public int getEGLAttrib() { + return eglAttrib; + } + + /** + * Returns the default value of this attribute. Attributes + * with default values will be ignored when choosing the EGLConfig. + * + * @return the default value + */ + public int getDefaultValue() { + return defaultValue; + } + + public boolean isSurfaceAttrib() { + return surfaceAttrib; + } + + } + + private final Map config = new HashMap(16); + + /** + * Creates a new PixelFormat with rgbSize = 8, alphaSize = 8 and depthSize = 16. + * + * @see #PixelFormat(int, int, int, int, int, int) + */ + public PixelFormat() { + this(8, 16, 0); + } + + /** + * Creates a new PixelFormat with rgbSize = 8 and the specified + * alphaSize, depthSize and stencilSize. + * + * @param alphaSize the EGL_ALPHA_SIZE value + * @param depthSize the EGL_DEPTH_SIZE value + * @param stencilSize the EGL_STENCIL_SIZE value + * + * @see #PixelFormat(int, int, int, int, int, int) + */ + public PixelFormat(int alphaSize, int depthSize, int stencilSize) { + this(alphaSize, depthSize, stencilSize, 0); + } + + /** + * Creates a new PixelFormat with rgbSize = 8 and the specified + * alphaSize, depthSize, stencilSize and samples. + * + * @param alphaSize the EGL_ALPHA_SIZE value + * @param depthSize the EGL_DEPTH_SIZE value + * @param stencilSize the EGL_STENCIL_SIZE value + * @param samples the EGL_SAMPLE_SIZE value + * + * @see #PixelFormat(int, int, int, int, int, int) + */ + public PixelFormat(int alphaSize, int depthSize, int stencilSize, int samples) { + this(8, alphaSize, 0, depthSize, stencilSize, samples); + } + + /** + * Creates a new PixelFormat with the specified RGB sizes, EGL_ALPHA_SIZE, + * EGL_LUMINANCE_SIZE, EGL_DEPTH_SIZE, EGL_STENCIL_SIZE, EGL_SAMPLES. + * All values must be greater than or equal to 0. rgbSize and luminanceSize + * cannot both be greater than 0. depthSize greater than 24 and stencilSize + * greater than 8 are not recommended. + * The corresponding EGL_SAMPLE_BUFFERS value will become 0 if samples is 0, + * or 1 if samples is greater than 0. + * + * @param rgbSize the RGB sizes + * @param alphaSize the EGL_ALPHA_SIZE value + * @param luminanceSize the EGL_LUMINANCE_SIZE value + * @param depthSize the EGL_DEPTH_SIZE value + * @param stencilSize the EGL_STENCIL_SIZE value + * @param samples the EGL_SAMPLE_SIZE value + */ + public PixelFormat(int rgbSize, int alphaSize, int luminanceSize, int depthSize, int stencilSize, int samples) { + if ( rgbSize < 0 ) + throw new IllegalArgumentException("Invalid RGB size specified: " + rgbSize); + + if ( alphaSize < 0 ) + throw new IllegalArgumentException("Invalid EGL_ALPHA_SIZE specified: " + alphaSize); + + if ( luminanceSize < 0 || (0 < luminanceSize && 0 < rgbSize) ) + throw new IllegalArgumentException("Invalid EGL_LUMINANCE_SIZE specified: " + luminanceSize); + + if ( depthSize < 0 ) + throw new IllegalArgumentException("Invalid EGL_DEPTH_SIZE specified: " + depthSize); + + if ( stencilSize < 0 ) + throw new IllegalArgumentException("Invalid EGL_STENCIL_SIZE specified: " + stencilSize); + + if ( samples < 0 ) + throw new IllegalArgumentException("Invalid EGL_SAMPLES specified: " + samples); + + if ( 0 < rgbSize ) { + setAttrib(RED_SIZE, rgbSize); + setAttrib(GREEN_SIZE, rgbSize); + setAttrib(BLUE_SIZE, rgbSize); + } + setAttrib(ALPHA_SIZE, alphaSize); + + setAttrib(LUMINANCE_SIZE, luminanceSize); + + setAttrib(DEPTH_SIZE, depthSize); + setAttrib(STENCIL_SIZE, stencilSize); + + setAttrib(SAMPLES, samples); + setAttrib(SAMPLE_BUFFERS, samples == 0 ? 0 : 1); + } + + /** + * Creates a new PixelFormat that is a copy of the specified PixelFormat. + * + * @param pf the source PixelFormat + */ + private PixelFormat(final PixelFormat pf) { + config.clear(); + config.putAll(pf.config); + } + + /** + * Sets the value of an attribute to the current configuration. + * If the value matches the default attribute value, the + * attribute will be removed from the configuration. + * + * @param attrib the attribute + * @param value the new value + */ + private void setAttrib(final Attrib attrib, final int value) { + if ( attrib.defaultValue == value ) + config.remove(attrib); + else + config.put(attrib, value); + } + + /** + * Returns an IntBuffer that can be used to get/choose EGLConfigs. + * The contents of the IntBuffer will be the sum of the source + * LWJGL attributes and the user-defined attributes from this + * PixelFormat's configuration. + *

+ * The source LWJGL attributes should not contain the EGL_SURFACE_TYPE + * attirube, or any attributes that are handled by PixelFormat. + *

+ * Attributes that correspond to EGL extensions will be checked + * against the extensions supported in the specified EGLDisplay. + * Attributes that correspond to unsupported extensions will not + * be included in the final EGLConfig query. + * + * @param display the EGL display from which the EGLConfig is going to be retrieved + * @param lwjglAttribs the LWJGL attributes + * + * @return the IntBuffer + */ + public IntBuffer getAttribBuffer(final EGLDisplay display, int surfaceType, final int[] lwjglAttribs) { + // Create a copy of the configuration attributes + Set keys = new HashSet(config.keySet()); + + // Handle surface type bits + if ( keys.contains(MULTISAMPLE_RESOLVE) ) { + if ( display.getMajorVersion() == 1 && display.getMinorVersion() < 4 ) + keys.remove(MULTISAMPLE_RESOLVE); + else if ( getAttrib(MULTISAMPLE_RESOLVE) == EGL_MULTISAMPLE_RESOLVE_BOX ) + surfaceType |= EGL_MULTISAMPLE_RESOLVE_BOX_BIT; + } + + if ( keys.contains(SWAP_BEHAVIOR) ) { + if ( display.getMajorVersion() == 1 && display.getMinorVersion() < 4 ) + keys.remove(SWAP_BEHAVIOR); + else if ( getAttrib(SWAP_BEHAVIOR) == EGL_BUFFER_PRESERVED ) + surfaceType |= EGL_SWAP_BEHAVIOR_PRESERVED_BIT; + } + + // Check NV_coverage_sample + if ( keys.contains(COVERAGE_BUFFERS_NV) && !display.isExtensionSupported("EGL_NV_coverage_sample") ) { + keys.remove(COVERAGE_BUFFERS_NV); + keys.remove(COVERAGE_SAMPLES_NV); + } + + // Check NV_depth_nonlinear + if ( keys.contains(DEPTH_ENCODING_NONLINEAR_NV) && !display.isExtensionSupported("EGL_NV_depth_nonlinear") ) + keys.remove(DEPTH_ENCODING_NONLINEAR_NV); + + // Create IntBuffer and insert the attributes + final IntBuffer attribs = BufferUtils.createIntBuffer( + 2 // SURFACE_TYPE + + lwjglAttribs.length // Source LWJGL attributes + + (keys.size() * 2) // PixelFormat attributes + + 1 // Termination + ); + + attribs.put(EGL_SURFACE_TYPE).put(surfaceType); + attribs.put(lwjglAttribs); + + for ( Attrib key : keys ) { + if ( !key.isSurfaceAttrib() ) + attribs.put(key.eglAttrib).put(config.get(key)); + } + + // Finish the attribute list + attribs.put(EGL_NONE); + attribs.flip(); + + return attribs; + } + + /** + * Returns true if the requested attribute matches the attribute in the specified EGL config. + * + * @param attrib the requested attribute + * @param config the EGL config + * + * @return true if the two attributes match + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs + */ + private boolean matches(final Attrib attrib, final EGLConfig config) throws LWJGLException { + return getAttrib(attrib) == config.getAttribute(attrib.getEGLAttrib()); + } + + /** + * Returns true if the requested attribute matches the attribute in the specified EGL config. + * If the requested attribute is equal to 1, then it will match with any EGL config attribute + * that is greater than 0. + * + * @param attrib the requested attribute + * @param config the EGL config + * + * @return true if the two attributes match + * + * @throws org.lwjgl.LWJGLException if an EGL error occurs + */ + private boolean matchesNonZero(final Attrib attrib, final EGLConfig config) throws LWJGLException { + final int reqValue = getAttrib(attrib); + final int cfgValue = config.getAttribute(attrib.getEGLAttrib()); + + return reqValue == cfgValue || (reqValue == 1 && cfgValue > 0); + } + + /** + * Returns the EGL config from the specified array that best matches this PixelFormat. + * + * @param configs the EGL configs + * + * @return the best match + */ + public EGLConfig getBestMatch(final EGLConfig[] configs) throws LWJGLException { + if ( configs == null || configs.length == 0 ) + throw new IllegalArgumentException("No EGLConfigs specified."); + + if ( configs.length == 1 ) + return configs[0]; + + /*System.out.println("\nASKED FOR:"); + for ( Attrib attrib : config.keySet() ) { + System.out.println("EGL_" + attrib.name() + ": " + getAttrib(attrib)); + } + + for ( EGLConfig config : configs ) { + if ( config == null ) + continue; + + System.out.println("\n----"); + System.out.println(config); + }*/ + + for ( EGLConfig config : configs ) { + if ( config == null ) + continue; + + if ( !(matches(ALPHA_SIZE, config) && matchesNonZero(DEPTH_SIZE, config) && matchesNonZero(STENCIL_SIZE, config)) ) + continue; + + final int luminance = getAttrib(LUMINANCE_SIZE); + if ( 0 < luminance && !matches(LUMINANCE_SIZE, config) ) + continue; + + if ( luminance == 0 && !(matches(RED_SIZE, config) && matches(GREEN_SIZE, config) && matches(BLUE_SIZE, config)) ) + continue; + + if ( !(matches(SAMPLE_BUFFERS, config) && matches(SAMPLES, config)) ) + continue; + + // TODO: Add more? NV's Tegra SDK checks a hardcoded 5 value for COVERAGE_SAMPLES_NV (nv_main.c, line: 1823) + + return config; + } + + // No match found, use the one recommended by the EGL implementation. + LWJGLUtil.log("Could not find an exact EGLConfig match for the PixelFormat requested, using first returned."); + return configs[0]; + } + + /** + * Applies this PixelFormat's surface attributes to the specified EGL surface. + * + * @param surface the EGL surface + */ + public void setSurfaceAttribs(final EGLSurface surface) throws LWJGLException { + setSurfaceAttrib(surface, SWAP_BEHAVIOR); + setSurfaceAttrib(surface, MULTISAMPLE_RESOLVE); + } + + private void setSurfaceAttrib(final EGLSurface surface, final Attrib attrib) throws LWJGLException { + final int value = getAttrib(attrib); + if ( value != attrib.getDefaultValue() ) + surface.setAttribute(attrib.getEGLAttrib(), value); + } + + /** + * Returns the value of the specified attribute. + * + * @param attrib the attribute to retrieve + * + * @return the attribute's value + */ + public int getAttrib(final Attrib attrib) { + final Integer value = config.get(attrib); + if ( value == null ) + return attrib.defaultValue; + + return value; + } + + /* ----------------------------------------- + CORE ATTRIBUTES + ----------------------------------------- */ + + /** + * Returns a new PixelFormat with the specified RGB sizes. + * + * @param rgb the new EGL_RED_SIZE, EGL_GREEN_SIZE and EGL_BLUE_SIZE + * + * @return the new PixelFormat + * + * @see #withRGBSize(int, int, int) + */ + public PixelFormat withRGBSize(final int rgb) { + return withRGBSize(rgb, rgb, rgb); + } + + /** + * Returns a new PixelFormat with the specified EGL_RED_SIZE, EGL_GREEN_SIZE and EGL_BLUE_SIZE. + * All 3 values must be greater than or equal to 0. If any of the 3 values is greater than 0, + * the luminanceSize will be set to 0. + * + * @param r the new EGL_RED_SIZE + * @param g the new EGL_GREEN_SIZE + * @param b the new EGL_BLUE_SIZE + * + * @return the new PixelFormat + */ + public PixelFormat withRGBSize(final int r, final int g, final int b) { + if ( r < 0 || g < 0 || b < 0 ) + throw new IllegalArgumentException("Invalid RGB sizes specified: " + r + ", " + g + ", " + b); + + final PixelFormat pf = new PixelFormat(this); + pf.setAttrib(RED_SIZE, r); + pf.setAttrib(GREEN_SIZE, g); + pf.setAttrib(BLUE_SIZE, b); + if ( 0 < r || 0 < g || 0 < b ) + pf.setAttrib(LUMINANCE_SIZE, 0); + return pf; + } + + /** + * Returns a new PixelFormat with the specified EGL_ALPHA_SIZE. + * The alphaSize value must be greater than or equal to 0. + * + * @param alphaSize the new EGL_ALPHA_SIZE + * + * @return the new PixelFormat + */ + public PixelFormat withAlphaSize(final int alphaSize) { + if ( alphaSize < 0 ) + throw new IllegalArgumentException("Invalid EGL_ALPHA_SIZE specified: " + alphaSize); + + final PixelFormat pf = new PixelFormat(this); + pf.setAttrib(ALPHA_SIZE, alphaSize); + return pf; + } + + /** + * Returns a new PixelFormat with the specified EGL_LUMINANCE_SIZE. + * The luminanceSize value must be greater than or equal to 0. If + * luminanceSize is greater than 0, the RGB sizes will be set to 0. + * + * @param luminanceSize the new EGL_LUMINANCE_SIZE + * + * @return the new PixelFormat + */ + public PixelFormat withLuminanceSize(final int luminanceSize) { + if ( luminanceSize < 0 ) + throw new IllegalArgumentException("Invalid EGL_LUMINANCE_SIZE specified: " + luminanceSize); + + final PixelFormat pf = new PixelFormat(this); + pf.setAttrib(LUMINANCE_SIZE, luminanceSize); + if ( 0 < luminanceSize ) { + pf.setAttrib(RED_SIZE, 0); + pf.setAttrib(GREEN_SIZE, 0); + pf.setAttrib(BLUE_SIZE, 0); + } + return pf; + } + + /** + * Returns a new PixelFormat with the specified EGL_DEPTH_SIZE. + * The depthSize value must be greater than or equal to 0. + * Values greater than 24 are not recommended. + * + * @param depthSize the new EGL_DEPTH_SIZE + * + * @return the new PixelFormat + */ + public PixelFormat withDepthSize(final int depthSize) { + if ( depthSize < 0 ) + throw new IllegalArgumentException("Invalid EGL_DEPTH_SIZE specified: " + depthSize); + + final PixelFormat pf = new PixelFormat(this); + pf.setAttrib(DEPTH_SIZE, depthSize); + return pf; + } + + /** + * Returns a new PixelFormat with the specified EGL_STENCIL_SIZE. + * The stencilSize value must be greater than or equal to 0. + * Values greater than 8 are not recommended. + * + * @param stencilSize the new EGL_STENCIL_SIZE + * + * @return the new PixelFormat + */ + public PixelFormat withStencilSize(final int stencilSize) { + if ( stencilSize < 0 ) + throw new IllegalArgumentException("Invalid EGL_STENCIL_SIZE specified: " + stencilSize); + + final PixelFormat pf = new PixelFormat(this); + pf.setAttrib(STENCIL_SIZE, stencilSize); + return pf; + } + + /** + * Returns a new PixelFormat with the specified EGL_MIN_SWAP_INTERVAL. + * The minSwapInterval value must be between 0 and this PixelFormat's EGL_MAX_SWAP_INTERVAL. + * + * @param minSwapInterval the new EGL_MIN_SWAP_INTERVAL value + * + * @return the new PixelFormat + */ + public PixelFormat withMinSwapInterval(final int minSwapInterval) { + final int maxSwapInterval = getAttrib(MAX_SWAP_INTERVAL); + if ( minSwapInterval != EGL_DONT_CARE && (minSwapInterval < 0 || (maxSwapInterval != EGL_DONT_CARE && maxSwapInterval < minSwapInterval)) ) + throw new IllegalArgumentException("Invalid EGL_MIN_SWAP_INTERVAL specified: " + minSwapInterval); + + final PixelFormat pf = new PixelFormat(this); + pf.setAttrib(MIN_SWAP_INTERVAL, minSwapInterval); + return pf; + } + + /** + * Returns a new PixelFormat with the specified EGL_MAX_SWAP_INTERVAL. + * The maxSwapInterval value must be greater than or equal to this PixelFormat's EGL_MIN_SWAP_INTERVAL. + * + * @param maxSwapInterval the new EGL_MAX_SWAP_INTERVAL value + * + * @return the new PixelFormat + */ + public PixelFormat withMaxSwapInterval(final int maxSwapInterval) { + if ( maxSwapInterval < getAttrib(MIN_SWAP_INTERVAL) ) + throw new IllegalArgumentException("Invalid EGL_MAX_SWAP_INTERVAL specified: " + maxSwapInterval); + + final PixelFormat pf = new PixelFormat(this); + pf.setAttrib(MAX_SWAP_INTERVAL, maxSwapInterval); + return pf; + } + + /** + * Returns a new PixelFormat with the specified number of EGL_SAMPLES. + * The samples value must be either 0 or greater than or equal to 2. The related + * EGL_SAMPLE_BUFFERS value will become 0 if samples is 0, or 1 if samples + * is greater than or equal to 2. + * + * @param samples the new EGL_SAMPLES value + * + * @return the new PixelFormat + */ + public PixelFormat withSamples(final int samples) { + if ( samples != 0 && samples < 2 ) + throw new IllegalArgumentException("Invalid number of EGL_SAMPLES specified: " + samples); + + final PixelFormat pf = new PixelFormat(this); + pf.setAttrib(SAMPLES, samples); + pf.setAttrib(SAMPLE_BUFFERS, samples == 0 ? 0 : 1); + return pf; + } + + private static int maxValue(final int bits) { + return (2 << bits) - 1; + } + + /** + * Returns a new PixelFormat with the specified EGL_TRANSPARENT_TYPE and + * the specified transparent RGB values. The transparentType must be + * either EGL_NONE or EGL_TRANSPARENT_RGB. When it is EGL_NONE, the RGB + * values are set to zero and ignored. When it is EGL_TRANSPARENT_RGB, + * the RGB values must be between 0 and 2^rgbSize - 1. + * + * @param transparentType the new EGL_TRANSPARENT_TYPE value + * @param r the new EGL_TRANSPARENT_RED_VALUE + * @param g the new EGL_TRANSPARENT_GREEN_VALUE + * @param b the new EGL_TRANSPARENT_BLUE_VALUE + * + * @return the new PixelFormat + */ + public PixelFormat withTransparentType(final int transparentType, int r, int g, int b) { + if ( transparentType == EGL_TRANSPARENT_RGB ) { + final int redSize = getAttrib(RED_SIZE); + final int greenSize = getAttrib(GREEN_SIZE); + final int blueSize = getAttrib(BLUE_SIZE); + if ( r < 0 || (0 < redSize && maxValue(redSize) < r) ) + throw new IllegalArgumentException("Invalid EGL_TRANSPARENT_RED_VALUE specified: " + r); + + if ( r < 0 || (0 < greenSize && maxValue(greenSize) < g) ) + throw new IllegalArgumentException("Invalid EGL_TRANSPARENT_GREEN_VALUE specified: " + g); + + if ( r < 0 || (0 < blueSize && maxValue(blueSize) < b) ) + throw new IllegalArgumentException("Invalid EGL_TRANSPARENT_BLUE_VALUE specified: " + b); + } else if ( transparentType != EGL_NONE ) + throw new IllegalArgumentException("Invalid EGL_TRANSPARENT_TYPE specified: " + transparentType); + else + r = g = b = EGL_DONT_CARE; + + final PixelFormat pf = new PixelFormat(this); + + pf.setAttrib(TRANSPARENT_TYPE, transparentType); + + pf.setAttrib(TRANSPARENT_RED_VALUE, r); + pf.setAttrib(TRANSPARENT_GREEN_VALUE, g); + pf.setAttrib(TRANSPARENT_BLUE_VALUE, b); + + return pf; + } + + /* ----------------------------------------- + SURFACE ATTRIBUTES + ----------------------------------------- */ + + /** + * Returns a new PixelFormat with the specified EGL_MULTISAMPLE_RESOLVE value. + * Valid values for multisampleResolve are EGL_MULTISAMPLE_RESOLVE_DEFAULT + * and EGL_MULTISAMPLE_RESOLVE_BOX. + *

+ * An IllegalStateException will be thrown if EGL_SAMPLES has not been previously defined + * to be greater than or equal to 2. + * + * @param multisampleResolve the new EGL_MULTISAMPLE_RESOLVE value + * + * @return the new PixelFormat + */ + public PixelFormat withMultisampleResolve(final int multisampleResolve) { + if ( multisampleResolve != EGL_MULTISAMPLE_RESOLVE_DEFAULT && multisampleResolve != EGL_MULTISAMPLE_RESOLVE_BOX ) + throw new IllegalArgumentException("Invalid EGL_MULTISAMPLE_RESOLVE value specified: " + multisampleResolve); + + if ( getAttrib(SAMPLE_BUFFERS) == 0 ) + throw new IllegalStateException("An EGL_MULTISAMPLE_RESOLVE value cannot be specified unless EGL_SAMPLE_BUFFERS is 1."); + + final PixelFormat pf = new PixelFormat(this); + pf.setAttrib(MULTISAMPLE_RESOLVE, multisampleResolve); + return pf; + } + + /** + * Returns a new PixelFormat with the specified EGL_SWAP_BEHAVIOR value. + * Valid values for swapBehavior are EGL_DONT_CARE, EGL_BUFFER_PRESERVED + * and EGL_BUFFER_DESTROYED. + * + * @param swapBehavior the new EGL_SWAP_BEHAVIOR value + * + * @return the new PixelFormat + */ + public PixelFormat withSwapBehavior(final int swapBehavior) { + switch ( swapBehavior ) { + case EGL_DONT_CARE: + case EGL_BUFFER_PRESERVED: + case EGL_BUFFER_DESTROYED: + break; + default: + throw new IllegalArgumentException("Invalid EGL_SWAP_BEHAVIOR value specified: " + swapBehavior); + } + + final PixelFormat pf = new PixelFormat(this); + pf.setAttrib(SWAP_BEHAVIOR, swapBehavior); + return pf; + } + + /* ----------------------------------------- + EXTENSION ATTRIBUTES + ----------------------------------------- */ + + /** + * Returns a new PixelFormat with the specified number of EGL_COVERAGE_SAMPLES_NV. + * The samples value must be greater than or equal to 0. The related + * EGL_COVERAGE_BUFFERS_NV value will become 0 if samples is 0, or 1 if samples + * is greater than 0. + * + * @param samples the new EGL_SAMPLES value + * + * @return the new PixelFormat + */ + public PixelFormat withCoverageSamplesNV(final int samples) { + if ( samples < 0 ) + throw new IllegalArgumentException("Invalid number of EGL_COVERAGE_SAMPLES_NV specified: " + samples); + + final PixelFormat pf = new PixelFormat(this); + pf.setAttrib(COVERAGE_SAMPLES_NV, samples); + pf.setAttrib(COVERAGE_BUFFERS_NV, samples == 0 ? 0 : 1); + return pf; + } + + /** + * Returns a new PixelFormat with the specified EGL_DEPTH_ENCODING_NONLINEAR_NV. + * Valid values for depthEncoding are EGL_DONT_CARE, EGL_DEPTH_ENCODING_NONE_NV + * and EGL_DEPTH_ENCODING_NONLINEAR_NV. + * + * @param depthEncoding the new EGL_DEPTH_ENCODING_NONLINEAR_NV value + * + * @return the new PixelFormat + */ + public PixelFormat withDepthEncodingNonlinearNV(final int depthEncoding) { + switch ( depthEncoding ) { + case EGL_DONT_CARE: + case EGL_DEPTH_ENCODING_NONE_NV: + case EGL_DEPTH_ENCODING_NONLINEAR_NV: + break; + default: + throw new IllegalArgumentException("Invalid EGL_DEPTH_ENCODING_NONLINEAR_NV value specified: " + depthEncoding); + } + + final PixelFormat pf = new PixelFormat(this); + pf.setAttrib(DEPTH_ENCODING_NONLINEAR_NV, depthEncoding); + return pf; + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/PowerManagementEventException.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/PowerManagementEventException.java new file mode 100644 index 0000000..fc4083b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/PowerManagementEventException.java @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +/** + * A PowerManagementEventException exception will be thrown when a call + * to eglSwapBuffers, eglCopyBuffers or eglMakeCurrent returns EGL_FALSE + * and the EGL_ERROR generated is EGL_CONTEXT_LOST. + *

+ * On detection of this error, the application must destroy all contexts. + * To continue rendering the application must recreate any contexts it + * requires, and subsequently restore any client API state and objects + * it wishes to use. + *

+ * Note that not all implementations can be made to generate power management + * events, and developers should continue to refer to platform-specific + * documentation in this area. + */ +public class PowerManagementEventException extends RuntimeException { + + static final long serialVersionUID = -1L; + + public PowerManagementEventException() { + super(); + } + + public PowerManagementEventException(final String message) { + super(message); + } + + public PowerManagementEventException(final String message, final Throwable cause) { + super(message, cause); + } + + public PowerManagementEventException(final Throwable cause) { + super(cause); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/StateTracker.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/StateTracker.java new file mode 100644 index 0000000..2235871 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/StateTracker.java @@ -0,0 +1,116 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import java.nio.Buffer; +import java.nio.IntBuffer; + +import static org.lwjgl.opengles.GLES20.*; +import static org.lwjgl.opengles.GLES30.*; + +final class StateTracker { + + private static StateTracker tracker = new StateTracker(); + + int elementArrayBuffer; + int arrayBuffer; + int pixelPackBuffer; + int pixelUnpackBuffer; + + Buffer[] glVertexAttribPointer_buffer; + + private final FastIntMap vaoMap = new FastIntMap(); + + int vertexArrayObject; + + StateTracker() { + } + + void init() { + glVertexAttribPointer_buffer = new Buffer[glGetInteger(GL_MAX_VERTEX_ATTRIBS)]; + } + + static StateTracker getTracker() { + return tracker; + } + + static void bindBuffer(int target, int buffer) { + final StateTracker tracker = getTracker(); + + switch ( target ) { + case GL_ARRAY_BUFFER: + tracker.arrayBuffer = buffer; + break; + case GL_ELEMENT_ARRAY_BUFFER: + tracker.elementArrayBuffer = buffer; + break; + case GL_PIXEL_PACK_BUFFER: + tracker.pixelPackBuffer = buffer; + break; + case GL_PIXEL_UNPACK_BUFFER: + tracker.pixelUnpackBuffer = buffer; + break; + } + } + + static void bindVAO(final int array) { + final FastIntMap vaoMap = tracker.vaoMap; + if ( !vaoMap.containsKey(array) ) + vaoMap.put(array, new VAOState()); + + tracker.vertexArrayObject = array; + } + + static void deleteVAO(final IntBuffer arrays) { + for ( int i = arrays.position(); i < arrays.limit(); i++ ) + deleteVAO(arrays.get(i)); + } + + static void deleteVAO(final int array) { + tracker.vaoMap.remove(array); + + if ( tracker.vertexArrayObject == array ) + tracker.vertexArrayObject = 0; + } + + /** + * Simple class to help us track VAO state. Currently + * only ELEMENT_ARRAY_BUFFER_BINDING is tracked, since + * that's the only state we check from tables 6.6-6.9. + */ + private static class VAOState { + + int elementArrayBuffer; + + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/Util.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/Util.java new file mode 100644 index 0000000..98699d8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/opengles/Util.java @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.LWJGLException; +import org.lwjgl.opengl.OpenGLException; + +import static org.lwjgl.opengles.EGL.*; +import static org.lwjgl.opengles.GLES20.*; + +/** + * Simple utility class. + * + * @author Spasi + */ +public final class Util { + + private Util() { + } + + /** + * Checks for OpenGL ES errors. + * + * @throws org.lwjgl.opengl.OpenGLException + * if GLES20.glGetError() returns anything else than GLES20.GL_NO_ERROR + */ + public static void checkGLError() throws OpenGLException { + int err = glGetError(); + if ( err != GL_NO_ERROR ) + throw new OpenGLException(err); + } + + /** + * Translates a GL error code to a String describing the error. + * + * @param error_code the OpenGL ES error code + * + * @return the error description + */ + public static String translateGLErrorString(int error_code) { + switch ( error_code ) { + case GL_NO_ERROR: + return "No error"; + case GL_INVALID_ENUM: + return "Invalid enum"; + case GL_INVALID_VALUE: + return "Invalid value"; + case GL_INVALID_OPERATION: + return "Invalid operation"; + case GL_OUT_OF_MEMORY: + return "Out of memory"; + default: + return null; + } + } + + /** + * Checks for EGL errors. + * + * @throws org.lwjgl.LWJGLException if EGL.eglGetError() returns anything else than EGL.EGL_SUCCESS + */ + static void checkEGLError() throws LWJGLException { + int err = eglGetError(); + if ( err != EGL_SUCCESS ) + throw new LWJGLException(translateEGLErrorString(err)); + } + + /** + * Translates an EGL error code to a String describing the error. + * + * @param error_code the EGL error code + * + * @return the error description + */ + static String translateEGLErrorString(int error_code) { + switch ( error_code ) { + case EGL_NOT_INITIALIZED: + return "EGL not initialized"; + case EGL_BAD_ACCESS: + return "Bad access"; + case EGL_BAD_ALLOC: + return "Bad allocation"; + case EGL_BAD_ATTRIBUTE: + return "Bad attribute"; + case EGL_BAD_CONFIG: + return "Bad config"; + case EGL_BAD_CONTEXT: + return "Bad EGL context"; + case EGL_BAD_CURRENT_SURFACE: + return "Bad current EGL surface"; + case EGL_BAD_DISPLAY: + return "Bad EGL display"; + case EGL_BAD_MATCH: + return "Bad match"; + case EGL_BAD_NATIVE_PIXMAP: + return "Bad native pixmap"; + case EGL_BAD_NATIVE_WINDOW: + return "Bad native window"; + case EGL_BAD_PARAMETER: + return "Bad parameter"; + case EGL_BAD_SURFACE: + return "Bad EGL surface"; + case EGL_CONTEXT_LOST: + return "EGL context lost"; + default: + return null; + } + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/DisplayTest.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/DisplayTest.java new file mode 100644 index 0000000..f0a67ad --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/DisplayTest.java @@ -0,0 +1,252 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test; + +import org.lwjgl.LWJGLException; +import org.lwjgl.opengl.Display; +import org.lwjgl.opengl.DisplayMode; + +/** + *
+ * Test class for Display & DisplayMode + * + * @author Brian Matzon + * @version $Revision$ + * $Id$ + */ +public class DisplayTest { + + /** + * Creates a new DisplayTest + */ + public DisplayTest() { + } + + /** + * Runs the tests + */ + public void executeTest() throws LWJGLException { + currentTest(); + queryModesTest(); + setDisplayModeTest(); + setDisplayConfigurationTest(); + } + + /** + * Prints some info about the current mode + */ + private void currentTest() { + System.out.println("==== Test Current ===="); + + System.out.println("Info about current:"); + System.out.println("Graphics card: " + Display.getAdapter() + ", version: " + Display.getVersion()); + System.out.println("Resolution: " + + Display.getDisplayMode().getWidth() + "x" + + Display.getDisplayMode().getHeight() + "x" + + Display.getDisplayMode().getBitsPerPixel() + "@" + + Display.getDisplayMode().getFrequency() + "Hz"); + System.out.println("---- Test Current ----"); + } + + /** + * Tests querying for modes + */ + private void queryModesTest() throws LWJGLException { + DisplayMode[] modes = null; + + System.out.println("==== Test query ===="); + System.out.println("Retrieving available displaymodes"); + modes = Display.getAvailableDisplayModes(); + + // no modes check + if (modes == null) { + System.out.println("FATAL: unable to find any modes!"); + System.exit(-1); + } + + // write some info + System.out.println("Found " + modes.length + " modes"); + System.out.println("The first 5 are:"); + for(int i=0;i + * Simple test that just checks that the native library loads + * + * @author Brian Matzon + * @version $Revision: 2983 $ + * $Id: SysTest.java 2983 2008-04-07 18:36:09Z matzon $ + */ +public class NativeTest { + + public void invokeSys() { + Sys.getVersion(); + } + + /** + * Entry point for test + * + * @param args ignored + */ + public static void main(String[] args) { + // try to "load" awt - work around for headless issue on linux + Toolkit.getDefaultToolkit(); + new NativeTest().invokeSys(); + System.out.println("OK"); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/SysTest.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/SysTest.java new file mode 100644 index 0000000..2accdbc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/SysTest.java @@ -0,0 +1,180 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test; + +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; +import org.lwjgl.Sys; +import org.lwjgl.opengl.Display; + +/** + *
+ * Test class for Sys + * + * @author Brian Matzon + * @version $Revision$ + * $Id$ + */ +public class SysTest { + + /** + * Creates a new SysTest + */ + public SysTest() { + } + + /** + * Runs the tests + */ + public void executeTest() { + testAlert(); + testDebug(); + testTimer(); + testUrl(); + testClipboard(); + } + + /** + * Tests debug mode + */ + private void testDebug() { + System.out.println("==== Test Debug ===="); + if (LWJGLUtil.DEBUG) { + LWJGLUtil.log("Debug is enabled, you should now see output from LWJGL during the following tests."); + } else { + System.out.println("Debug is not enabled. Please set the org.lwjgl.Sys.debug property to true to enable debugging"); + System.out.println("Example:\n java -Dorg.lwjgl.util.Debug=true ..."); + System.out.println("You will not see any debug output in the following tests."); + } + + // get some display modes, to force some debug info + try { + Display.getAvailableDisplayModes(); + } catch (LWJGLException e) { + throw new RuntimeException(e); + } + + System.out.println("---- Test Debug ----\n"); + } + + /** + * Tests the timer + */ + private void testTimer() { + long resolution = Sys.getTimerResolution(); + long time = Sys.getTime(); + + System.out.println("==== Test Timer ===="); + System.out.println("Resolution of timer (ticks per second): " + resolution); + System.out.println("Current time: " + time); + System.out.println("Sleeping for 2 seconds, using Thread.sleep()"); + + pause(2000); + + long time2 = Sys.getTime(); + System.out.println("Current time: " + time2); + System.out.println("Actually slept for: " + ((time2 - time) / (float) resolution) + " seconds"); + System.out.println("---- Test Timer ----\n"); + } + + /** + * Tests the alert + */ + private void testAlert() { + System.out.println("==== Test Alert ===="); + + System.out.println("Opening native alert window"); + Sys.alert("SysTest", "Hello World!"); + + System.out.println("---- Test Alert ----\n"); + } + + /** + * Tests the openUrl + */ + private void testUrl() { + System.out.println("==== Test URL ===="); + + System.out.println("Opening a browser window to http://www.lwjgl.org"); + Sys.openURL("http://www.lwjgl.org"); + + System.out.println("---- Test URL ----\n"); + } + + /** + * Busy waits for a specified number of seconds + * + * @param priority Priority to busy wait in + * @param seconds Number of seconds to busy wait + * @param message Message to print to user + */ + private void busyWait(int priority, int seconds, String message) { + long future = Sys.getTime() + (Sys.getTimerResolution() * seconds); + + System.out.print(message); + + // waste some cycles + while (Sys.getTime() < future) { + } + + System.out.println("done"); + } + + /** + * Pause current thread for a specified time + * + * @param time milliseconds to sleep + */ + private void pause(long time) { + try { + Thread.sleep(time); + } catch (InterruptedException inte) { + } + } + + /** + * Tests the clipboard. Helps to have something in it first... + */ + private void testClipboard() { + System.out.println("Contents of clipboard: '"+Sys.getClipboard()+"'"); + } + + /** + * Tests the Sys class, and serves as basic usage test + * + * @param args ignored + */ + public static void main(String[] args) { + new SysTest().executeTest(); + System.exit(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/WaveDataTest.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/WaveDataTest.java new file mode 100644 index 0000000..43abc99 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/WaveDataTest.java @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test; + +import java.io.File; + +import javax.sound.sampled.AudioInputStream; +import javax.sound.sampled.AudioSystem; + +import org.lwjgl.LWJGLException; +import org.lwjgl.util.WaveData; + +/** + *
+ * Test class WaveDataTest + * + * @author Brian Matzon + */ +public class WaveDataTest { + + String filePath = "Footsteps.wav"; + + /** + * Creates a new DisplayTest + */ + public WaveDataTest() { + } + + /** + * Runs the tests + */ + public void executeTest() throws LWJGLException { + executeCreationTest(); + executeBrokenCreationTest(); + executeMidStreamCreationTest(); + } + + + private void executeCreationTest() { + WaveData wd = WaveData.create(filePath); + if(wd != null) { + System.out.println("executeCreationTest::success"); + } + } + + private void executeBrokenCreationTest() { + WaveData wd = WaveData.create(""); + if(wd == null) { + System.out.println("executeBrokenCreationTest::success"); + } + } + + private void executeStreamCreationTest() { + try { + AudioInputStream ais = AudioSystem.getAudioInputStream(new File(filePath)); + WaveData wd = WaveData.create(ais); + if(wd == null) { + System.out.println("executeMidStreamCreationTest::success"); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + private void executeMidStreamCreationTest() { + try { + + AudioInputStream ais = AudioSystem.getAudioInputStream(WaveDataTest.class.getClassLoader().getResource(filePath)); + int totalSize = ais.getFormat().getChannels() * (int) ais.getFrameLength() * ais.getFormat().getSampleSizeInBits() / 8; + + // skip 1/4 of the stream + int skip = totalSize / 4; + long skipped = ais.skip(skip); + + WaveData wd = WaveData.create(ais); + if(wd == null) { + System.out.println("executeMidStreamCreationTest::success"); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Pause current thread for a specified time + * + * @param time milliseconds to sleep + */ + private void pause(long time) { + try { + Thread.sleep(time); + } catch (InterruptedException inte) { + /* ignored */ + } + } + + /** + * Tests the Sys class, and serves as basic usage test + * + * @param args ignored + */ + public static void main(String[] args) throws LWJGLException { + new WaveDataTest().executeTest(); + System.exit(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/WindowCreationTest.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/WindowCreationTest.java new file mode 100644 index 0000000..8ce779c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/WindowCreationTest.java @@ -0,0 +1,326 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test; + +import org.lwjgl.LWJGLException; +import org.lwjgl.input.Keyboard; +import org.lwjgl.opengl.Display; +import org.lwjgl.opengl.DisplayMode; +import org.lwjgl.opengl.GL11; + +import static org.lwjgl.opengl.GL11.*; + +/** + * Small class for testing that the Window is creatable + * If this class can't run, LWJGL wont work! + * + * @author Brian Matzon + */ +public class WindowCreationTest { + + /** Locatable modes */ + private DisplayMode[] located_modes; + + /** Fixed selectable modes */ + private DisplayMode[] fixed_modes = new DisplayMode[10]; + + + /** Window position x */ + private int window_x; + + /** Window position y */ + private int window_y; + + /** Color being cleared to */ + private float color = 0f; + + /** Direction moving clearing color */ + private int direction = 1; + + /** Whether we're running */ + private boolean running; + + /** Whether we're in fullscreen mode */ + private boolean fullscreen; + + /** + * Initializes the test + * @return true if initialization was successfull + */ + public boolean initialize() { + try { + // get available modes, and print out + located_modes = Display.getAvailableDisplayModes(); + System.out.println("Found " + located_modes.length + " display modes"); + + // get 640x480, 800x600, 1024x768 modes + findFixedModes(); + + // create default windowed display 640*480 @ 100, 100 + setDefaultDisplayMode(); + + window_x = window_y = 100; + Display.setLocation(window_x, window_y); + + Display.create(); + return true; + } catch (LWJGLException le) { + le.printStackTrace(); + } + return false; + } + + /** Locate fixed modes */ + private void findFixedModes() { + // get 640*480 modes + fixed_modes[0] = getDisplayMode(640, 480, 16, -1); + fixed_modes[1] = getDisplayMode(640, 480, 24, -1); + fixed_modes[2] = getDisplayMode(640, 480, 32, -1); + + // get 800*600*16*60 + fixed_modes[3] = getDisplayMode(800, 600, 16, -1); + fixed_modes[4] = getDisplayMode(800, 600, 24, -1); + fixed_modes[5] = getDisplayMode(800, 600, 32, -1); + + // get 1024*768*16*60 + fixed_modes[6] = getDisplayMode(1024, 768, 16, -1); + fixed_modes[7] = getDisplayMode(1024, 768, 24, -1); + fixed_modes[8] = getDisplayMode(1024, 768, 32, -1); + } + + /** + * Executes the test + */ + private void execute() { + running = true; + + // wait for user to close window + while (!Display.isCloseRequested() && running) { + + // handle input accordingly + handleInput(); + + // render something + render(); + + // update display as needed + Display.update(); + + // no need to run at full speed + try { + Thread.sleep(100); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + /** + * Destroys any resources used while running test + */ + public void destroy() { + // nuke window and get out + Display.destroy(); + } + + /** + * Handles the input + */ + private void handleInput() { + while (Keyboard.next()) { + + // we only want key down events + if (!Keyboard.getEventKeyState()) { + continue; + } + + // check for exit + if (Keyboard.getEventKey() == Keyboard.KEY_ESCAPE) { + running = false; + } + + // check for listing of modes + if (Keyboard.getEventKey() == Keyboard.KEY_L) { + for(int i=0;i 1f) { + color = 1f; + direction = -1 * direction; + } else if (color < 0f) { + direction = -1 * direction; + color = 0f; + } + } + + /** + * Main entry point + * + * @param args ignored params to app + */ + public static void main(String[] args) throws LWJGLException { + + System.out.println("The following keys are available:\n" + + "ESCAPE:\t\tExit test\n" + + "ARROW Keys:\tMove window when in non-fullscreen mode\n" + + "L:\t\tList selectable display modes\n" + + "0-8:\t\tSelection of display modes\n" + + "F:\t\tToggle fullscreen\n" + + "SHIFT-F:\tToggle fullscreen with Display.destroy()/create() cycle"); + + WindowCreationTest wct = new WindowCreationTest(); + if (wct.initialize()) { + wct.execute(); + wct.destroy(); + } + System.exit(0); + } + + /** + * Sets the display mode for fullscreen mode + */ + protected boolean setDefaultDisplayMode() { + try { + // get modes + DisplayMode[] dm = org.lwjgl.util.Display.getAvailableDisplayModes(640, 480, -1, -1, -1, -1, -1, -1); + + org.lwjgl.util.Display.setDisplayMode(dm, new String[] { "width=" + 640, "height=" + 480, "freq=" + 60, + "bpp=" + org.lwjgl.opengl.Display.getDisplayMode().getBitsPerPixel()}); + return true; + } catch (Exception e) { + e.printStackTrace(); + } + return false; + } + + /** + * Gets a specific display mode + */ + private DisplayMode getDisplayMode(int width, int height, int bpp, int freq) { + DisplayMode[] dm = null; + try { + dm = org.lwjgl.util.Display.getAvailableDisplayModes(width, height, width, height, bpp, bpp, freq, freq); + if(dm == null || dm.length == 0) { + System.out.println("Problem retrieving mode with " + width + "x" + height + "x" + bpp + "@" + freq); + } + } catch (LWJGLException le) { + le.printStackTrace(); + System.out.println("Problem retrieving mode with " + width + "x" + height + "x" + bpp + "@" + freq); + } + return (dm != null && dm.length != 0) ? dm[0] : null; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/applet/AppletLoaderTest.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/applet/AppletLoaderTest.java new file mode 100644 index 0000000..05ecfaa --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/applet/AppletLoaderTest.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.applet; + +import java.applet.Applet; +import java.awt.BorderLayout; +import java.awt.Canvas; + +public class AppletLoaderTest extends Applet { + + Test test; + + public void destroy() { + super.destroy(); + System.out.println("*** destroy ***"); + } + + public void start() { + super.start(); + System.out.println("*** start ***"); + } + + public void stop() { + super.stop(); + System.out.println("*** stop ***"); + test.stop(); + } + + public void init() { + System.out.println("*** init ***"); + + setLayout(new BorderLayout()); + try { + test = (Test) Class.forName(getParameter("test")).newInstance(); + Canvas canvas = (Canvas) test; + canvas.setSize(getWidth(), getHeight()); + add(canvas); + } catch (Exception e) { + e.printStackTrace(); + } + test.start(); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/applet/ControllersTest.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/applet/ControllersTest.java new file mode 100644 index 0000000..7f39ad6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/applet/ControllersTest.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.applet; + +import java.awt.Canvas; + +import org.lwjgl.LWJGLException; +import org.lwjgl.input.Controllers; + +public class ControllersTest extends Canvas implements Test { + public void start() { + try { + Controllers.create(); + } catch (LWJGLException e) { + e.printStackTrace(); + return; + } + System.out.println("Controllers.getControllerCount() = " + Controllers.getControllerCount()); + } + + public void stop() { + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/applet/GearsApplet.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/applet/GearsApplet.java new file mode 100644 index 0000000..63b646e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/applet/GearsApplet.java @@ -0,0 +1,405 @@ +package org.lwjgl.test.applet; + +import java.applet.Applet; +import java.awt.BorderLayout; +import java.awt.Canvas; +import java.nio.FloatBuffer; +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; +import org.lwjgl.Sys; +import org.lwjgl.opengl.Display; +import org.lwjgl.input.Keyboard; +import org.lwjgl.input.Mouse; +import org.lwjgl.opengl.GLContext; + +import static org.lwjgl.opengl.ARBTransposeMatrix.*; +import static org.lwjgl.opengl.GL11.*; + +public class GearsApplet extends Applet { + + /** The Canvas where the LWJGL Display is added */ + Canvas display_parent; + + /** Thread which runs the main game loop */ + Thread gameThread; + + /** is the game loop running */ + boolean running; + + /** variables used to rotate the view */ + private float view_rotx = 20.0f; + private float view_roty = 30.0f; + private float view_rotz; + + private int gear1; + private int gear2; + private int gear3; + private float angle; + + boolean keyDown; + + private int prevMouseX, prevMouseY; + private boolean mouseButtonDown; + + + /** + * Once the Canvas is created its add notify method will call this method to + * start the LWJGL Display and game loop in another thread. + */ + public void startLWJGL() { + gameThread = new Thread() { + public void run() { + running = true; + try { + Display.setParent(display_parent); + //Display.setVSyncEnabled(true); + Display.create(); + initGL(); + } catch (LWJGLException e) { + e.printStackTrace(); + } + gameLoop(); + } + }; + gameThread.start(); + } + + + /** + * Tell game loop to stop running, after which the LWJGL Display will be destoryed. + * The main thread will wait for the Display.destroy() to complete + */ + private void stopLWJGL() { + running = false; + try { + gameThread.join(); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + + public void start() { + + } + + public void stop() { + + } + + /** + * Applet Destroy method will remove the canvas, before canvas is destroyed it will notify + * stopLWJGL() to stop main game loop and to destroy the Display + */ + public void destroy() { + remove(display_parent); + super.destroy(); + System.out.println("Clear up"); + } + + /** + * initialise applet by adding a canvas to it, this canvas will start the LWJGL Display and game loop + * in another thread. It will also stop the game loop and destroy the display on canvas removal when + * applet is destroyed. + */ + public void init() { + setLayout(new BorderLayout()); + try { + display_parent = new Canvas() { + public void addNotify() { + super.addNotify(); + startLWJGL(); + } + public void removeNotify() { + stopLWJGL(); + super.removeNotify(); + } + }; + display_parent.setSize(getWidth(),getHeight()); + add(display_parent); + display_parent.setFocusable(true); + display_parent.requestFocus(); + display_parent.setIgnoreRepaint(true); + //setResizable(true); + setVisible(true); + } catch (Exception e) { + System.err.println(e); + throw new RuntimeException("Unable to create display"); + } + } + + public void gameLoop() { + long startTime = System.currentTimeMillis() + 5000; + long fps = 0; + + while(running) { + angle += 2.0f; + + // draw the gears + drawLoop(); + + Display.update(); + + if (startTime > System.currentTimeMillis()) { + fps++; + } else { + long timeUsed = 5000 + (startTime - System.currentTimeMillis()); + startTime = System.currentTimeMillis() + 5000; + System.out.println(fps + " frames 2 in " + timeUsed / 1000f + " seconds = " + + (fps / (timeUsed / 1000f))); + fps = 0; + } + + if (Mouse.isButtonDown(0)) { + if (!mouseButtonDown) { + prevMouseX = Mouse.getX(); + prevMouseY= Mouse.getY(); + } + mouseButtonDown = true; + } + else { + mouseButtonDown = false; + } + + if (mouseButtonDown) { + int x = Mouse.getX(); + int y = Mouse.getY(); + + float thetaY = 360.0f * ( (float)(x-prevMouseX)/(float)display_parent.getWidth()); + float thetaX = 360.0f * ( (float)(prevMouseY-y)/(float)display_parent.getHeight()); + + prevMouseX = x; + prevMouseY = y; + + view_rotx += thetaX; + view_roty += thetaY; + } + + // F Key Pressed (i.e. released) + if (keyDown && !Keyboard.isKeyDown(Keyboard.KEY_F)) { + keyDown = false; + + try { + if (Display.isFullscreen()) { + Display.setFullscreen(false); + } + else { + Display.setFullscreen(true); + } + } catch (LWJGLException e) { + e.printStackTrace(); + } + } + } + + Display.destroy(); + } + + public void drawLoop() { + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glPushMatrix(); + + glRotatef(view_rotx, 1.0f, 0.0f, 0.0f); + glRotatef(view_roty, 0.0f, 1.0f, 0.0f); + glRotatef(view_rotz, 0.0f, 0.0f, 1.0f); + + glPushMatrix(); + glTranslatef(-3.0f, -2.0f, 0.0f); + glRotatef(angle, 0.0f, 0.0f, 1.0f); + glCallList(gear1); + glPopMatrix(); + + glPushMatrix(); + glTranslatef(3.1f, -2.0f, 0.0f); + glRotatef(-2.0f * angle - 9.0f, 0.0f, 0.0f, 1.0f); + glCallList(gear2); + glPopMatrix(); + + glPushMatrix(); + glTranslatef(-3.1f, 4.2f, 0.0f); + glRotatef(-2.0f * angle - 25.0f, 0.0f, 0.0f, 1.0f); + glCallList(gear3); + glPopMatrix(); + + glPopMatrix(); + } + + protected void initGL() { + try { + // setup ogl + FloatBuffer pos = BufferUtils.createFloatBuffer(4).put(new float[] { 5.0f, 5.0f, 10.0f, 0.0f}); + FloatBuffer red = BufferUtils.createFloatBuffer(4).put(new float[] { 0.8f, 0.1f, 0.0f, 1.0f}); + FloatBuffer green = BufferUtils.createFloatBuffer(4).put(new float[] { 0.0f, 0.8f, 0.2f, 1.0f}); + FloatBuffer blue = BufferUtils.createFloatBuffer(4).put(new float[] { 0.2f, 0.2f, 1.0f, 1.0f}); + + pos.flip(); + red.flip(); + green.flip(); + blue.flip(); + + glLight(GL_LIGHT0, GL_POSITION, pos); + glEnable(GL_CULL_FACE); + glEnable(GL_LIGHTING); + glEnable(GL_LIGHT0); + glEnable(GL_DEPTH_TEST); + + /* make the gears */ + gear1 = glGenLists(1); + glNewList(gear1, GL_COMPILE); + glMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red); + gear(1.0f, 4.0f, 1.0f, 20, 0.7f); + glEndList(); + + gear2 = glGenLists(1); + glNewList(gear2, GL_COMPILE); + glMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green); + gear(0.5f, 2.0f, 2.0f, 10, 0.7f); + glEndList(); + + gear3 = glGenLists(1); + glNewList(gear3, GL_COMPILE); + glMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue); + gear(1.3f, 2.0f, 0.5f, 10, 0.7f); + glEndList(); + glEnable(GL_NORMALIZE); + glMatrixMode(GL_PROJECTION); + + System.err.println("LWJGL: " + Sys.getVersion() + " / " + LWJGLUtil.getPlatformName()); + System.err.println("GL_VENDOR: " + glGetString(GL_VENDOR)); + System.err.println("GL_RENDERER: " + glGetString(GL_RENDERER)); + System.err.println("GL_VERSION: " + glGetString(GL_VERSION)); + System.err.println(); + System.err.println("glLoadTransposeMatrixfARB() supported: " + GLContext.getCapabilities().GL_ARB_transpose_matrix); + + if (!GLContext.getCapabilities().GL_ARB_transpose_matrix) { + // --- not using extensions + glLoadIdentity(); + } else { + // --- using extensions + final FloatBuffer identityTranspose = BufferUtils.createFloatBuffer(16).put( + new float[] { 1, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 1}); + identityTranspose.flip(); + glLoadTransposeMatrixARB(identityTranspose); + } + float h = (float) display_parent.getHeight() / (float) display_parent.getWidth(); + glFrustum(-1.0f, 1.0f, -h, h, 5.0f, 60.0f); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glTranslatef(0.0f, 0.0f, -40.0f); + } catch (Exception e) { + System.err.println(e); + running = false; + } + } + + /** + * Draw a gear wheel. You'll probably want to call this function when + * building a display list since we do a lot of trig here. + * + * @param inner_radius radius of hole at center + * @param outer_radius radius at center of teeth + * @param width width of gear + * @param teeth number of teeth + * @param tooth_depth depth of tooth + */ + private void gear(float inner_radius, float outer_radius, float width, int teeth, float tooth_depth) { + int i; + float r0, r1, r2; + float angle, da; + float u, v, len; + + r0 = inner_radius; + r1 = outer_radius - tooth_depth / 2.0f; + r2 = outer_radius + tooth_depth / 2.0f; + da = 2.0f * (float) Math.PI / teeth / 4.0f; + glShadeModel(GL_FLAT); + glNormal3f(0.0f, 0.0f, 1.0f); + /* draw front face */ + glBegin(GL_QUAD_STRIP); + for (i = 0; i <= teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), width * 0.5f); + glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), width * 0.5f); + if (i < teeth) { + glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), width * 0.5f); + glVertex3f(r1 * (float) Math.cos(angle + 3.0f * da), r1 * (float) Math.sin(angle + 3.0f * da), + width * 0.5f); + } + } + glEnd(); + + /* draw front sides of teeth */ + glBegin(GL_QUADS); + for (i = 0; i < teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), width * 0.5f); + glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), width * 0.5f); + glVertex3f(r2 * (float) Math.cos(angle + 2.0f * da), r2 * (float) Math.sin(angle + 2.0f * da), width * 0.5f); + glVertex3f(r1 * (float) Math.cos(angle + 3.0f * da), r1 * (float) Math.sin(angle + 3.0f * da), width * 0.5f); + } + glEnd(); + + /* draw back face */ + glBegin(GL_QUAD_STRIP); + for (i = 0; i <= teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), -width * 0.5f); + glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), -width * 0.5f); + glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), -width * 0.5f); + glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), -width * 0.5f); + } + glEnd(); + + /* draw back sides of teeth */ + glBegin(GL_QUADS); + for (i = 0; i < teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), -width * 0.5f); + glVertex3f(r2 * (float) Math.cos(angle + 2 * da), r2 * (float) Math.sin(angle + 2 * da), -width * 0.5f); + glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), -width * 0.5f); + glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), -width * 0.5f); + } + glEnd(); + + /* draw outward faces of teeth */ + glBegin(GL_QUAD_STRIP); + for (i = 0; i < teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), width * 0.5f); + glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), -width * 0.5f); + u = r2 * (float) Math.cos(angle + da) - r1 * (float) Math.cos(angle); + v = r2 * (float) Math.sin(angle + da) - r1 * (float) Math.sin(angle); + len = (float) Math.sqrt(u * u + v * v); + u /= len; + v /= len; + glNormal3f(v, -u, 0.0f); + glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), width * 0.5f); + glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), -width * 0.5f); + glNormal3f((float) Math.cos(angle), (float) Math.sin(angle), 0.0f); + glVertex3f(r2 * (float) Math.cos(angle + 2 * da), r2 * (float) Math.sin(angle + 2 * da), width * 0.5f); + glVertex3f(r2 * (float) Math.cos(angle + 2 * da), r2 * (float) Math.sin(angle + 2 * da), -width * 0.5f); + u = r1 * (float) Math.cos(angle + 3 * da) - r2 * (float) Math.cos(angle + 2 * da); + v = r1 * (float) Math.sin(angle + 3 * da) - r2 * (float) Math.sin(angle + 2 * da); + glNormal3f(v, -u, 0.0f); + glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), width * 0.5f); + glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), -width * 0.5f); + glNormal3f((float) Math.cos(angle), (float) Math.sin(angle), 0.0f); + } + glVertex3f(r1 * (float) Math.cos(0), r1 * (float) Math.sin(0), width * 0.5f); + glVertex3f(r1 * (float) Math.cos(0), r1 * (float) Math.sin(0), -width * 0.5f); + glEnd(); + + glShadeModel(GL_SMOOTH); + /* draw inside radius cylinder */ + glBegin(GL_QUAD_STRIP); + for (i = 0; i <= teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + glNormal3f(-(float) Math.cos(angle), -(float) Math.sin(angle), 0.0f); + glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), -width * 0.5f); + glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), width * 0.5f); + } + glEnd(); + } +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/applet/OpenAL.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/applet/OpenAL.java new file mode 100644 index 0000000..4ce774d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/applet/OpenAL.java @@ -0,0 +1,183 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.applet; + +import java.nio.IntBuffer; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.openal.AL; +import org.lwjgl.openal.AL10; +import org.lwjgl.opengl.AWTGLCanvas; +import org.lwjgl.opengl.Display; +import org.lwjgl.util.WaveData; + +import static org.lwjgl.opengl.GL11.*; + +public class OpenAL extends AWTGLCanvas implements Test { + + float angle; + + // create 1 buffer and 1 source + IntBuffer buffers = BufferUtils.createIntBuffer(1); + IntBuffer sources = BufferUtils.createIntBuffer(1); + + public OpenAL() throws LWJGLException { + + try { + AL.create(); + } catch (Exception e) { + System.out.println("Unable to create OpenAL.\nPlease make sure that OpenAL is available on this system. Exception: " + e); + return; + } + + Thread t = new Thread() { + + public void run() { + while (true) { + if (isVisible()) + repaint(); + Display.sync(60); + } + } + }; + t.setDaemon(true); + t.start(); + } + + private void playOpenAL() { + int lastError; + + // al generate buffers and sources + buffers.position(0).limit(1); + AL10.alGenBuffers(buffers); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + sources.position(0).limit(1); + AL10.alGenSources(sources); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + // load wave data from buffer + WaveData wavefile = WaveData.create(getClass().getClassLoader().getResourceAsStream("Footsteps.wav")); + + //copy to buffers + AL10.alBufferData(buffers.get(0), wavefile.format, wavefile.data, wavefile.samplerate); + + //unload file again + wavefile.dispose(); + + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + //set up source input + AL10.alSourcei(sources.get(0), AL10.AL_BUFFER, buffers.get(0)); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + //lets loop the sound + AL10.alSourcei(sources.get(0), AL10.AL_LOOPING, AL10.AL_TRUE); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + //play source 0 + AL10.alSourcePlay(sources.get(0)); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + } + + private void exit(int error) { + System.out.println("OpenAL Error: " + AL10.alGetString(error)); + } + + public void paintGL() { + glClear(GL_COLOR_BUFFER_BIT); + glMatrixMode(GL_PROJECTION_MATRIX); + glLoadIdentity(); + glOrtho(0, 640, 0, 480, 1, -1); + glMatrixMode(GL_MODELVIEW_MATRIX); + + glPushMatrix(); + glTranslatef(320, 240, 0.0f); + glRotatef(angle, 0, 0, 1.0f); + glBegin(GL_QUADS); + glVertex2i(-50, -50); + glVertex2i(50, -50); + glVertex2i(50, 50); + glVertex2i(-50, 50); + glEnd(); + glPopMatrix(); + + angle += 1; + + try { + swapBuffers(); + } catch (Exception e) {/*OK*/ + } + } + + public void start() { + playOpenAL(); + } + + public void stop() { + int lastError; + + //stop source 0 + AL10.alSourceStop(sources.get(0)); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + //delete buffers and sources + sources.position(0).limit(1); + AL10.alDeleteSources(sources); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + buffers.position(0).limit(1); + AL10.alDeleteBuffers(buffers); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + AL.destroy(); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/applet/OpenGL.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/applet/OpenGL.java new file mode 100644 index 0000000..59d3dbc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/applet/OpenGL.java @@ -0,0 +1,129 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.applet; + +import org.lwjgl.LWJGLException; +import org.lwjgl.input.Keyboard; +import org.lwjgl.input.Mouse; +import org.lwjgl.opengl.AWTGLCanvas; + +import static org.lwjgl.opengl.GL11.*; + +public class OpenGL extends AWTGLCanvas implements Test { + + float angle; + float x; + float y; + + public OpenGL() throws LWJGLException { + } + + public void initGL() { + glMatrixMode(GL_PROJECTION_MATRIX); + glLoadIdentity(); + glOrtho(0, 640, 0, 480, 1, -1); + x = 320; + y = 240; + glMatrixMode(GL_MODELVIEW_MATRIX); + setVSyncEnabled(true); + } + + public void paintGL() { + glClear(GL_COLOR_BUFFER_BIT); + + glPushMatrix(); + glTranslatef(x, y, 0.0f); + glRotatef(angle, 0, 0, 1.0f); + glBegin(GL_QUADS); + glVertex2i(-50, -50); + glVertex2i(50, -50); + glVertex2i(50, 50); + glVertex2i(-50, 50); + glEnd(); + glPopMatrix(); + + angle += 1; + + if (Mouse.isCreated()) { + Mouse.poll(); + while (Mouse.next()) { + x += Mouse.getEventDX(); + y += Mouse.getEventDY(); + } + } + if (Keyboard.isCreated()) { + Keyboard.poll(); + } + while (Keyboard.isCreated() && Keyboard.next()) { + if (Keyboard.getEventKey() != Keyboard.KEY_NONE) { + String key_name = Keyboard.getKeyName(Keyboard.getEventKey()); + if (Keyboard.getEventKeyState()) { + switch (Keyboard.getEventKey()) { + case Keyboard.KEY_G: + Mouse.setGrabbed(!Mouse.isGrabbed()); + break; + default: + break; + } + System.out.println("Pressed: " + key_name); + } else + System.out.println("Released: " + key_name); + } + if (Keyboard.getEventCharacter() != Keyboard.CHAR_NONE) + System.out.println("Typed: " + Keyboard.getEventCharacter()); + } + if (Keyboard.isCreated()) { + if (Keyboard.isKeyDown(Keyboard.KEY_UP)) + y += 5; + else if (Keyboard.isKeyDown(Keyboard.KEY_DOWN)) + y -= 5; + if (Keyboard.isKeyDown(Keyboard.KEY_LEFT)) + x -= 5; + else if (Keyboard.isKeyDown(Keyboard.KEY_RIGHT)) + x += 5; + } + try { + swapBuffers(); + if (isVisible()) { + Thread.yield(); // Helps input responsiveness on linux + repaint(); + } + } catch (Exception e) {/*OK*/ + } + } + + public void start() { + } + + public void stop() { + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/applet/Speed.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/applet/Speed.java new file mode 100644 index 0000000..87317da --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/applet/Speed.java @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.applet; + +import org.lwjgl.LWJGLException; +import org.lwjgl.opengl.AWTGLCanvas; + +import static org.lwjgl.opengl.GL11.*; + +public class Speed extends AWTGLCanvas implements Test { + + private float angle; + private long startTime = System.currentTimeMillis() + 5000; + private long fps; + + public Speed() throws LWJGLException { + } + + public void paintGL() { + glClear(GL_COLOR_BUFFER_BIT); + glMatrixMode(GL_PROJECTION_MATRIX); + glLoadIdentity(); + glOrtho(0, 640, 0, 480, 1, -1); + glMatrixMode(GL_MODELVIEW_MATRIX); + + glPushMatrix(); + glTranslatef(320, 240, 0.0f); + glRotatef(angle, 0, 0, 1.0f); + glBegin(GL_QUADS); + glVertex2i(-50, -50); + glVertex2i(50, -50); + glVertex2i(50, 50); + glVertex2i(-50, 50); + glEnd(); + glPopMatrix(); + + angle += 1; + + try { + swapBuffers(); + if (isVisible()) { + Thread.yield(); // Helps input responsiveness on linux + repaint(); + } + } catch (Exception e) {/*OK*/ + } + if (startTime > System.currentTimeMillis()) { + fps++; + } else { + long timeUsed = 5000 + (startTime - System.currentTimeMillis()); + startTime = System.currentTimeMillis() + 5000; + System.out.println(fps + " frames in " + timeUsed / 1000f + " seconds = " + + (fps / (timeUsed / 1000f))); + fps = 0; + } + } + + public void start() { + } + + public void stop() { + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/applet/Test.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/applet/Test.java new file mode 100644 index 0000000..18bea65 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/applet/Test.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.applet; + + +public interface Test { + void start(); + void stop(); +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/glu/tessellation/TessCallback.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/glu/tessellation/TessCallback.java new file mode 100644 index 0000000..3102454 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/glu/tessellation/TessCallback.java @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.glu.tessellation; + +import org.lwjgl.util.glu.GLUtessellatorCallbackAdapter; + +import static org.lwjgl.opengl.GL11.*; + +public class TessCallback extends GLUtessellatorCallbackAdapter { + + public void begin(int type) { + glBegin(type); + } + + public void combine(double[] coords, Object[] data, float[] weight, Object[] outData) { + for (int i=0;i + * @version $Revision$ + * $Id$ + */ +public class HWCursorTest { + + /** The native cursor */ + private static Cursor[] cursors; + + /** The mouse cursor position */ + private static int mouse_x; + private static int mouse_y; + private static int mouse_btn; + + /** + * Executes the test + */ + public void execute() { + initialize(); + + mainLoop(); + + cleanup(); + } + + /** + * Sets the display mode for fullscreen mode + */ + protected boolean setDisplayMode() { + try { + // get modes + DisplayMode[] dm = org.lwjgl.util.Display.getAvailableDisplayModes(640, 480, -1, -1, -1, -1, 60, 60); + + org.lwjgl.util.Display.setDisplayMode(dm, new String[] { + "width=" + 640, + "height=" + 480, + "freq=" + 60, + "bpp=" + org.lwjgl.opengl.Display.getDisplayMode().getBitsPerPixel() + }); + return true; + } catch (Exception e) { + e.printStackTrace(); + } + + return false; + } + + /** + * Initializes the test + */ + private void initialize() { + try { + // start of in windowed mode + setDisplayMode(); + Display.create(); + + glInit(); + + initNativeCursors(); + + } catch (Exception e) { + e.printStackTrace(); + System.exit(-1); + } + } + + private static void initNativeCursors() throws Exception { + if ((Cursor.getCapabilities() & Cursor.CURSOR_ONE_BIT_TRANSPARENCY) == 0) { + System.out.println("No HW cursor support!"); + System.exit(0); + } + + cursors = new Cursor[3]; + + int cursorImageCount = 1; + int cursorWidth = Math.min(64, Cursor.getMaxCursorSize()); + int cursorHeight = cursorWidth; + IntBuffer cursorImages; + IntBuffer cursorDelays; + + + // Create a single cursor + // ================================== + cursorImages = ByteBuffer.allocateDirect(cursorWidth*cursorHeight*cursorImageCount*4).order(ByteOrder.nativeOrder()).asIntBuffer(); + cursorDelays = null; + for(int j=0; j= centerLeft && j < centerRight && l >= centerLeft && l < centerRight) { + cursorImages.put(offColor); + } else { + cursorImages.put(onColor); + } + } + } + } + cursorDelays.put(2000).put(2000).put(2000); + cursorDelays.flip(); + cursorImages.flip(); + + cursors[1] = new Cursor(cursorWidth, cursorHeight, cursorWidth/2, cursorHeight/2, cursorImageCount, cursorImages, cursorDelays); + // ---------------------------------- + + + // Create a 20 piece animation + // ================================== + cursorImageCount = 20; + cursorImages = ByteBuffer.allocateDirect(cursorWidth*cursorHeight*cursorImageCount*4).order(ByteOrder.nativeOrder()).asIntBuffer(); + cursorDelays = ByteBuffer.allocateDirect(cursorImageCount*4).order(ByteOrder.nativeOrder()).asIntBuffer(); + cursorDelays.put( + new int[] { + 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100, + 100, 100, 100, 100, 100 + }); + + float step = 0xffffffff / 20.0f; + for(int i=0; i= 0 && button < 3 && Mouse.getEventButtonState()) { + mouse_btn = Mouse.getEventButton(); + switchCursor(); + } + } + } + + /** + * Processes keyboard input + */ + private void processKeyboard() { + //check for fullscreen key + if (Keyboard.isKeyDown(Keyboard.KEY_F)) { + + try { + try { + Mouse.setNativeCursor(null); + } catch (Exception e) { + e.printStackTrace(); + System.exit(1); + } + for ( Cursor aCursor : cursors ) { + aCursor.destroy(); + } + Display.setFullscreen(true); + + glInit(); + + initNativeCursors(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + //check for window key + if (Keyboard.isKeyDown(Keyboard.KEY_W)) { + try { + try { + Mouse.setNativeCursor(null); + } catch (Exception e) { + e.printStackTrace(); + System.exit(1); + } + for ( Cursor cursor : cursors ) { + cursor.destroy(); + } + Display.setFullscreen(false); + glInit(); + + initNativeCursors(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + if (Keyboard.isKeyDown(Keyboard.KEY_M)) { + try { + Mouse.setNativeCursor(null); + } catch (Exception e) { + e.printStackTrace(); + } + } + + if (Keyboard.isKeyDown(Keyboard.KEY_N)) { + switchCursor(); + } + + while(Keyboard.next()) { + if(Keyboard.getEventKey() == Keyboard.KEY_SPACE && Keyboard.getEventKeyState()) { + Mouse.setGrabbed(!Mouse.isGrabbed()); + } + } + } + + private void switchCursor() { + try { + Mouse.setNativeCursor(cursors[mouse_btn]); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Cleans up the test + */ + private void cleanup() { + try { + Mouse.setNativeCursor(null); + } catch (Exception e) { + e.printStackTrace(); + System.exit(1); + } + for ( Cursor cursor : cursors ) { + cursor.destroy(); + } + Display.destroy(); + } + + /** + * Initializes OGL + */ + private void glInit() { + // Go into orthographic projection mode. + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluOrtho2D(0, Display.getDisplayMode().getWidth(), 0, Display.getDisplayMode().getHeight()); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glViewport(0, 0, Display.getDisplayMode().getWidth(), Display.getDisplayMode().getHeight()); + + //set clear color to black + glClearColor(0.0f, 0.0f, 0.0f, 0.0f); + + //sync frame (only works on windows) + Display.setVSyncEnabled(true); + } + + /** + * Test entry point + */ + public static void main(String[] args) { + System.out.println("Change between fullscreen and windowed mode, by pressing F and W respectively. Enable hw cursor with N and disable it with M."); + HWCursorTest cursorTest = new HWCursorTest(); + cursorTest.execute(); + System.exit(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/input/KeyboardTest.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/input/KeyboardTest.java new file mode 100644 index 0000000..e417902 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/input/KeyboardTest.java @@ -0,0 +1,234 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.input; + +import org.lwjgl.input.Keyboard; +import org.lwjgl.opengl.Display; +import org.lwjgl.opengl.DisplayMode; +import org.lwjgl.util.vector.Vector2f; + +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.util.glu.GLU.*; + +/** + *
+ * Keyboard test + * + * @author Brian Matzon + * @version $Revision$ + * $Id$ + */ +public class KeyboardTest { + + /** position of quad to draw */ + private Vector2f position = new Vector2f(320.0f, 240.0f); + + /** Display mode selected */ + private DisplayMode displayMode; + + /** Creates a new instance of MouseTest */ + public KeyboardTest() { + } + + private void initialize() { + // create display and opengl + setupDisplay(false); + + try { + Keyboard.create(); + } catch (Exception e) { + e.printStackTrace(); + System.exit(-1); + } + } + + /** + * Sets the display mode for fullscreen mode + */ + protected boolean setDisplayMode() { + try { + // get modes + DisplayMode[] dm = org.lwjgl.util.Display.getAvailableDisplayModes(640, 480, -1, -1, -1, -1, 60, 60); + + org.lwjgl.util.Display.setDisplayMode(dm, new String[] { + "width=" + 640, + "height=" + 480, + "freq=" + 60, + "bpp=" + org.lwjgl.opengl.Display.getDisplayMode().getBitsPerPixel() + }); + return true; + } catch (Exception e) { + e.printStackTrace(); + } + + return false; + } + + private void setupDisplay(boolean fullscreen) { + try { + setDisplayMode(); + Display.create(); + } catch (Exception e) { + e.printStackTrace(); + System.exit(-1); + } + + initializeOpenGL(); + } + + private void initializeOpenGL() { + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluOrtho2D(0, Display.getDisplayMode().getWidth(), 0, Display.getDisplayMode().getHeight()); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glViewport(0, 0, Display.getDisplayMode().getWidth(), Display.getDisplayMode().getHeight()); + glClearColor(0.0f, 0.0f, 0.0f, 0.0f); + } + + public void executeTest() { + initialize(); + + createKeyboard(); + + wiggleKeyboard(); + + Keyboard.destroy(); + Display.destroy(); + } + + private void createKeyboard() { + try { + Keyboard.create(); + } catch (Exception e) { + e.printStackTrace(); + System.exit(-1); + } + } + + private void wiggleKeyboard() { + + while (!Display.isCloseRequested()) { + Display.update(); + + if (!Display.isVisible()) { + try { + Thread.sleep(100); + } catch (InterruptedException inte) { + inte.printStackTrace(); + } + continue; + } + + //check keys, buffered + Keyboard.poll(); + + int count = Keyboard.getNumKeyboardEvents(); + while (Keyboard.next()) { + int character_code = ((int)Keyboard.getEventCharacter()) & 0xffff; + System.out.println("Checking key:" + Keyboard.getKeyName(Keyboard.getEventKey())); + System.out.println("Pressed:" + Keyboard.getEventKeyState()); + System.out.println("Key character code: 0x" + Integer.toHexString(character_code)); + System.out.println("Key character: " + Keyboard.getEventCharacter()); + System.out.println("Repeat event: " + Keyboard.isRepeatEvent()); + + if (Keyboard.getEventKey() == Keyboard.KEY_R && Keyboard.getEventKeyState()) { + Keyboard.enableRepeatEvents(!Keyboard.areRepeatEventsEnabled()); + } + if (Keyboard.getEventKey() == Keyboard.KEY_ESCAPE) { + return; + } + } + if (Keyboard.isKeyDown(Keyboard.KEY_RIGHT)) { + position.x += 1; + } + + if (Keyboard.isKeyDown(Keyboard.KEY_LEFT)) { + position.x -= 1; + } + + if (Keyboard.isKeyDown(Keyboard.KEY_UP)) { + position.y += 1; + } + + if (Keyboard.isKeyDown(Keyboard.KEY_DOWN)) { + position.y -= 1; + } + + if (count > 0) { + System.out.println(); + } + + if (position.x < 0) { + position.x = 0; + } else if (position.x > 640 - 60) { + position.x = 640 - 60; + } + + if (position.y < 0) { + position.y = 0; + } else if (position.y > 480 - 30) { + position.y = 480 - 30; + } + + render(); + + Display.sync(60); + } + } + + private void render() { + glClear(GL_COLOR_BUFFER_BIT); + + glBegin(GL_POLYGON); + { + float color = 1.0f; + glColor3f(color, color, color); + + glVertex2f(position.x + 0.0f, position.y + 0.0f); + glVertex2f(position.x + 0.0f, position.y + 30.0f); + glVertex2f(position.x + 40.0f, position.y + 30.0f); + glVertex2f(position.x + 60.0f, position.y + 15.f); + glVertex2f(position.x + 40.0f, position.y + 0.0f); + } + glEnd(); + } + + /** + * @param args the command line arguments + */ + public static void main(String[] args) { + KeyboardTest kt = new KeyboardTest(); + kt.executeTest(); + System.exit(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/input/MouseCreationTest.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/input/MouseCreationTest.java new file mode 100644 index 0000000..a37939f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/input/MouseCreationTest.java @@ -0,0 +1,218 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.input; + +import org.lwjgl.Sys; +import org.lwjgl.input.Mouse; +import org.lwjgl.opengl.Display; +import org.lwjgl.opengl.DisplayMode; +import org.lwjgl.util.vector.Vector2f; + +import static org.lwjgl.opengl.GL11.*; + +/** + *
+ * Mouse test + * + * @author Brian Matzon + * @version $Revision$ + * $Id$ + */ +public class MouseCreationTest { + /** position of quad to draw */ + private Vector2f position = new Vector2f(320.0f, 240.0f); + + /** Creates a new instance of MouseTest */ + public MouseCreationTest() { + } + + private void initialize(boolean fullscreen) { + try { + setDisplayMode(); + Display.setFullscreen(fullscreen); + Display.create(); + Mouse.setGrabbed(true); + } catch (Exception e) { + e.printStackTrace(); + System.exit(-1); + } + + initializeOpenGL(); + } + + /** + * Sets the display mode for fullscreen mode + */ + protected boolean setDisplayMode() { + try { + // get modes + DisplayMode[] dm = org.lwjgl.util.Display.getAvailableDisplayModes(640, 480, -1, -1, -1, -1, 60, 60); + + org.lwjgl.util.Display.setDisplayMode(dm, new String[] { + "width=" + 640, + "height=" + 480, + "freq=" + 60, + "bpp=" + org.lwjgl.opengl.Display.getDisplayMode().getBitsPerPixel() + }); + return true; + } catch (Exception e) { + e.printStackTrace(); + } + + return false; + } + + private void initializeOpenGL() { + glClearColor(0.0f, 0.0f, 0.0f, 0.0f); + // Put the window into orthographic projection mode with 1:1 pixel ratio. + // We haven't used GLU here to do this to avoid an unnecessary dependency. + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(0.0, Display.getDisplayMode().getWidth(), 0.0, Display.getDisplayMode().getHeight(), -1.0, 1.0); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glViewport(0, 0, Display.getDisplayMode().getWidth(), Display.getDisplayMode().getHeight()); + } + + public void executeTest() { + initialize(false); + + System.out.println("Test ready:\n"); + + // windowed mode + System.out.println("=========== WINDOWED MODE =============="); + for(int i=0; i<2; i++) { + System.out.println("Test " + (i+1) + ":"); + wiggleMouse(); + System.out.println(""); + } + + // recreate display in fullscreen mode + System.out.print("Destroying display..."); + + System.out.println("success"); + + System.out.print("Entering fullscreen mode..."); + try { + Display.destroy(); + initialize(true); + } catch (Exception e) { + e.printStackTrace(); + } + System.out.println("success"); + + + // fullscreen mode + System.out.println("=========== FULLSCREEN MODE =============="); + for(int i=0; i<2; i++) { + System.out.println("Test " + (i+3) + ":"); + wiggleMouse(); + System.out.println(""); + } + + System.out.println("Test completed successfully!"); + System.out.print("Shutting down..."); + Display.destroy(); + System.out.println("shutdown complete"); + } + + private void wiggleMouse() { + System.out.print("Please move the mouse around"); + + long statustime = Sys.getTime(); + long endtime = Sys.getTime() + Sys.getTimerResolution() * 5; + + while (Sys.getTime() < endtime) { + Display.update(); + + // empty mouse buffer + while(Mouse.next()); + + position.x += Mouse.getDX(); + position.y += Mouse.getDY(); + + if(position.x<0) { + position.x = 0; + } else if (position.x>640-60) { + position.x = 640-60; + } + + if(position.y < 0) { + position.y = 0; + } else if (position.y>480-30) { + position.y = 480-30; + } + + render(); + + if (Sys.getTime() - statustime > Sys.getTimerResolution()) { + System.out.print("."); + statustime = Sys.getTime(); + } + } + System.out.println("thank you"); + } + + private void render() { + glClear(GL_COLOR_BUFFER_BIT); + + glBegin(GL_POLYGON); + { + float color = 1.0f; + int buttonDown = 0; + + for(int i=0;i + * Mouse test + * + * @author Brian Matzon + * @version $Revision$ + * $Id$ + */ +public class MouseTest { + /** Direction mouse has moved */ + private int direction; + + /** Last button pressed */ + private int lastButton; + + /** Last direction we scrolled in */ + private int lastScrollDirection = -1; + + /** Width of window */ + private static int WINDOW_WIDTH = 640; + + /** Height of window */ + private static int WINDOW_HEIGHT = 640; + + /** Triangle size */ + private Vector2f triangleSize = new Vector2f(120, 100); + + /** Triangle color */ + private Vector3f triangleColors[] = new Vector3f[] { + new Vector3f(1,1,1), + new Vector3f(1,0,0), + new Vector3f(0,1,0), + new Vector3f(0,0,1) + }; + + private Vector3f quadColors[] = new Vector3f[] { + new Vector3f(1,1,1), + new Vector3f(1,0,0), + new Vector3f(0,1,0), + new Vector3f(0,0,1) + }; + + /** Triangles to paint */ + private Vector2f[] triangles = { + new Vector2f(WINDOW_WIDTH/2, WINDOW_HEIGHT - triangleSize.y), + new Vector2f(triangleSize.y, WINDOW_HEIGHT/2), + new Vector2f(WINDOW_WIDTH/2, triangleSize.y), + new Vector2f(WINDOW_WIDTH-triangleSize.y, WINDOW_HEIGHT/2) + }; + + /** Whether the test is closing */ + private boolean closing; + + /** Fullscreen or not */ + public static final boolean FULLSCREEN = false; + + /** Creates a new instance of MouseTest */ + public MouseTest() { + } + + private void initialize() { + // create display and opengl + setupDisplay(); + + setupMouse(); + setupKeyboard(); + } + + /** + * Setup display + */ + private void setupDisplay() { + try { + setDisplayMode(); + Display.setFullscreen(FULLSCREEN); + Display.setVSyncEnabled(true); + Display.create(); + Mouse.setGrabbed(true); + } catch (Exception e) { + e.printStackTrace(); + System.exit(-1); + } + + initializeOpenGL(); + } + + /** + * Sets the display mode for fullscreen mode + */ + protected boolean setDisplayMode() { + // get modes + DisplayMode dm = new DisplayMode(WINDOW_WIDTH, WINDOW_HEIGHT); + + try { + Display.setDisplayMode(dm); + return true; + } catch (Exception e) { + e.printStackTrace(); + } + + return false; + } + + /** + * Initializes OpenGL + * + */ + private void initializeOpenGL() { + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluOrtho2D(0, Display.getDisplayMode().getWidth(), 0, Display.getDisplayMode().getHeight()); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glViewport(0, 0, Display.getDisplayMode().getWidth(), Display.getDisplayMode().getHeight()); + glClearColor(0.0f, 0.0f, 0.0f, 0.0f); + } + + /** + * Executes the actual test + */ + public void executeTest() { + initialize(); + + runTest(); + + Display.destroy(); + } + + /** + * Creates the mouse + */ + private void setupMouse() { + } + + /** + * Creates the keyboard + */ + private void setupKeyboard() { + } + + /** + * Runs the test + */ + private void runTest() { + // while not exiting + while (!closing) { + handleWindow(); + + // secondary check + if(!closing) { + + // poll and check keyboard and mouse + handleKeyboard(); + handleMouse(); + + // pause and continue if minimized + if(!Display.isVisible()) { + if(Display.isDirty()) { + render(); + } + pause(100); + continue; + } + + // render and flip + logic(); + render(); + } + Thread.yield(); + } + } + + /** + * Pauses the current thread for a specified time + * + * @param time milliseconds to pause + */ + private void pause(long time) { + try { + Thread.sleep(time); + } catch (InterruptedException inte) { + inte.printStackTrace(); + } + } + + /** + * Handles the window + */ + private void handleWindow() { + Display.update(); + closing = Display.isCloseRequested(); + } + + /** + * handles the mouse + */ + private void handleMouse() { + readBufferedMouse(); + + Display.setTitle("x: " + Mouse.getX() + ", y: " + Mouse.getY() + ", [0]: " + Mouse.isButtonDown(0) + ", [1]: " + Mouse.isButtonDown(1) + ", [2]: " + Mouse.isButtonDown(2) + ", inside: " + Mouse.isInsideWindow()); + } + + /** + * reads a mouse in buffered mode + */ + private void readBufferedMouse() { + // iterate all events, use the last button down + while(Mouse.next()) { + if(Mouse.getEventButton() != -1 && Mouse.getEventButtonState()) { + lastButton = Mouse.getEventButton(); + } + } + + updateState(); + } + + /** + * Updates our "model" + * + */ + private void updateState() { + direction = -1; + + int dx = Mouse.getDX(); + int dy = Mouse.getDY(); + int dw = Mouse.getDWheel(); + + + // get out if no movement + if (dx == dy && dx == 0 && dw == 0) { + return; + } + + // determine direction moved + // ============================ + if(dx > 0) { + direction = 3; + } + + if(dx < 0) { + direction = 1; + } + + if(dy > 0) { + direction = 0; + } + + if(dy < 0) { + direction = 2; + } + + // ---------------------------- + if(direction > -1) { + + // based on which button was last pushed, update model + switch(lastButton) { + case -1: + break; + case 1: + triangleColors[direction].y = 1; + break; + case 2: + triangleColors[direction].z = 1; + break; + case 3: + triangleColors[direction].x = 1; + triangleColors[direction].y = 1; + triangleColors[direction].z = 1; + break; + case 0: // fall through + default: + triangleColors[direction].x = 1; + break; + } + } + + // get direction to update in + if (dw > 0) { + lastScrollDirection++; + } else if (dw < 0) { + lastScrollDirection--; + } else if (dw == 0) { + return; + } + + // over/underflow + if(lastScrollDirection < 0) { + lastScrollDirection = 3; + } + if(lastScrollDirection > 3) { + lastScrollDirection = 0; + } + + // update colors + quadColors[lastScrollDirection].x = (float) Math.random(); + quadColors[lastScrollDirection].y = (float) Math.random(); + quadColors[lastScrollDirection].z = (float) Math.random(); + } + + /** + * Handles the keyboard + */ + private void handleKeyboard() { + + while(Keyboard.next()) { + // closing on ESCAPE + if(Keyboard.getEventKey() == Keyboard.KEY_ESCAPE && Keyboard.getEventKeyState()) { + closing = true; + } + + if(Keyboard.getEventKey() == Keyboard.KEY_SPACE && Keyboard.getEventKeyState()) { + Mouse.setGrabbed(!Mouse.isGrabbed()); + } + + if(Keyboard.getEventKey() == Keyboard.KEY_R && Keyboard.getEventKeyState()) { + Display.setResizable(!Display.isResizable()); + } + } + } + + /** + * Does the "model logic" + */ + private void logic() { + // "we fade to black" + // =========================================== + for ( Vector3f color : triangleColors ) { + color.x -= 0.01; + color.y -= 0.01; + color.z -= 0.01; + } + + for ( Vector3f color : quadColors ) { + color.x -= 0.01; + color.y -= 0.01; + color.z -= 0.01; + } + // ------------------------------------------- + } + + /** + * Render our triangles + */ + private void render() { + glClear(GL_COLOR_BUFFER_BIT); + + // for each triangle, render it at position, rotating degrees for each + for(int i=0; i 0 + + MappedFloat vecs2 = MappedFloat.map(posTest); + vecs2.view = 39; + assert vecs2.view == 39; + vecs2.view = 40; + System.out.println("org.lwjgl.util.mapped.Checks is false or there is a bug in bounds checking."); + } catch (IndexOutOfBoundsException e) { + // expected, ignore + } + } + + // test newBuffer + { + long addr1 = MemoryUtil.getAddress(bb); + ByteBuffer bb2 = MappedHelper.newBuffer(addr1, bb.capacity()); + long addr2 = MemoryUtil.getAddress(bb); + + System.out.println(bb); + System.out.println(bb2); + System.out.println(addr1); + System.out.println(addr2); + } + + // test 'copy' + { + vecs.value = 13.37f; + MappedFloat dec2 = vecs.dup(); + dec2.view = 1; + System.out.println(vecs); + System.out.println(dec2); + vecs.copyTo(dec2); + System.out.println(vecs); + System.out.println(dec2); + assert (dec2.value == 13.37f); + + vecs.value = 73.31f; + vecs.copyRange(dec2, 1); + assert (dec2.value == 73.31f); + } + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/mapped/MappedObjectTests2.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/mapped/MappedObjectTests2.java new file mode 100644 index 0000000..c8daac7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/mapped/MappedObjectTests2.java @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.mapped; + +import java.nio.ByteBuffer; + +/** @author Riven */ +@SuppressWarnings("static-access") +public class MappedObjectTests2 { + + static void testWriteFieldAccess(MappedVec3 vecs) { + // write access results into a transform-time IllegalAccessException + + System.out.println(vecs.baseAddress); // test read-access + + System.out.println(vecs.viewAddress); // test read-access + + System.out.println(vecs.getAlign()); // test read-access + + System.out.println(MappedVec3.SIZEOF); // test read-access + } + + static void testFields() { + ByteBuffer bb = ByteBuffer.allocateDirect(200); + MappedVec3 vecs = MappedVec3.map(bb); + + testWriteFieldAccess(vecs); + + vecs.x = 13.13f; + vecs.y = 14.14f; + vecs.z = 15.15f; + + System.out.println(vecs.viewAddress); + + assert (vecs.x == 13.13f); + assert (vecs.y == 14.14f); + assert (vecs.z == 15.15f); + + vecs.view = 0; + + assert (vecs.x == 13.13f); + assert (vecs.y == 14.14f); + assert (vecs.z == 15.15f); + + System.out.println(vecs); + vecs.view = 1; + System.out.println(vecs); + + assert (vecs.x == 0.0f); + assert (vecs.y == 0.0f); + assert (vecs.z == 0.0f); + + // now it becomes weird: offsets and strides + + vecs.view = 1; + vecs.x = 0.1234f; + vecs.view = 0; + + // test stride & sizeof + { + long a1 = vecs.viewAddress; + vecs.view = 1; + long a2 = vecs.viewAddress; + assert (a2 - a1 == MappedVec3.SIZEOF); + assert (a2 - a1 == vecs.getSizeof()); + vecs.view = 0; + } + } +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/mapped/MappedObjectTests3.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/mapped/MappedObjectTests3.java new file mode 100644 index 0000000..01ec9c2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/mapped/MappedObjectTests3.java @@ -0,0 +1,145 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.mapped; + +import org.lwjgl.MemoryUtil; +import org.lwjgl.util.mapped.MappedObject; +import org.lwjgl.util.mapped.MappedSet; +import org.lwjgl.util.mapped.MappedSet2; + +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +import static org.lwjgl.util.mapped.MappedObject.*; + +/** @author Riven */ +@SuppressWarnings("static-access") +public class MappedObjectTests3 { + + static void testMappedBuffer() { + int elementCount = 4; + + MappedSomething some = MappedSomething.malloc(elementCount); + + assert (some.data != some.data); + + long addr1 = MemoryUtil.getAddress(some.backingByteBuffer()); + + ByteBuffer mapped = some.data; // creates new ByteBuffer instance + long addr2 = MemoryUtil.getAddress(mapped); + + assert (addr2 - addr1 == 4); + assert (mapped.capacity() == MappedSomething.SIZEOF - 4); + + { + assert (some.shared == 0); + assert (mapped.getInt(8) == 0); + + some.shared = 1234; + + assert (some.shared == 1234); + assert (mapped.getInt(8) == 1234); + } + + some.view++; + mapped = some.data; // creates new ByteBuffer instance + + long addr3 = MemoryUtil.getAddress(mapped); + assert (addr3 - addr1 == 4 + MappedSomething.SIZEOF); + assert (addr3 - addr2 == 0 + MappedSomething.SIZEOF); + assert (mapped.capacity() == MappedSomething.SIZEOF - 4); + } + + static void testForeach() { + int elementCount = 10; + MappedSomething some = MappedSomething.malloc(elementCount); + + int i = 0; + for ( MappedSomething item : foreach(some, elementCount / 2) ) { + assert (item.view == i++); + } + assert (some.view == (elementCount / 2) - 1); + System.out.println("current.view=" + some.view + ", not " + (elementCount / 2) + ", as you might expect"); + + i = 0; + for ( MappedSomething item : foreach(some) ) { + assert (item.view == i++); + } + assert (some.view == elementCount - 1); + } + + public static class Xyz extends MappedObject { + + int x, y, z; + } + + static void testConstructor() { + int capacity = 1024; + ByteBuffer bb = ByteBuffer.allocateDirect(capacity).order(ByteOrder.nativeOrder()); + long address = MemoryUtil.getAddress(bb); + + MappedFloat mf = MappedFloat.map(address, capacity); + + assert (address == mf.baseAddress); + + assert (mf.value == 0.0f); + mf.view = 1; + assert (mf.value == 0.0f); + mf.runViewConstructor(); + assert (mf.value == 4.0f); + + Xyz.malloc(3); + } + + static void testMappedSet() { + MappedVec2 vec2 = MappedVec2.malloc(3); + MappedVec3 vec3 = MappedVec3.malloc(3); + + MappedSet2 set = MappedSet.create(vec2, vec3); + + assert (vec2.view == 0); + assert (vec3.view == 0); + + set.view = 2; + assert (vec2.view == 2); + assert (vec3.view == 2); + + set.view = 0; + assert (vec2.view == 0); + assert (vec3.view == 0); + + set.next(); + assert (vec2.view == 1); + assert (vec3.view == 1); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/mapped/MappedObjectTests4.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/mapped/MappedObjectTests4.java new file mode 100644 index 0000000..f6ea670 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/mapped/MappedObjectTests4.java @@ -0,0 +1,253 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.mapped; + +import org.lwjgl.MemoryUtil; +import org.lwjgl.PointerBuffer; +import org.lwjgl.opengl.Display; +import org.lwjgl.util.mapped.*; + +import java.io.File; +import java.lang.reflect.Field; +import java.nio.ByteBuffer; + +/** @author Riven */ +@SuppressWarnings("static-access") +public class MappedObjectTests4 { + + public static void testLWJGL() throws Exception { + System.out.println(new File(System.getProperty("java.library.path")).getCanonicalPath()); + Display.create(); + } + + public static void testLocalView() { + MappedFloat mapped1 = MappedFloat.malloc(5); + MappedFloat mapped2 = MappedFloat.malloc(5); + + testLocalView(mapped1); + testLocalView(mapped1, mapped2); + + MappedSomething some = MappedSomething.malloc(5); + testLocalView(some); + } + + private static void testLocalView(MappedFloat mapped1) { + final MappedFloat[] array = mapped1.asArray(); + + assert (array.length == 5); + + int l = 10 * array.length; + for ( int localView1 = 0; localView1 < 5; localView1++ ) { + array[localView1].value = localView1 * 5; + array[localView1].value *= 2.0f; + } + System.out.println(); + float x = 0.0f; + for ( int localView1 = 0; localView1 < 5; localView1++ ) { + System.out.println("[" + localView1 + "] =>" + array[localView1].value); + x += array[localView1].value; + } + System.out.println("x = " + x); + } + + private static void testLocalView(MappedFloat mo1, MappedFloat mo2) { + final MappedFloat[] array1 = mo1.asArray(); + for ( int v1 = 0; v1 < 5; v1++ ) { + array1[v1].value = (float)Math.random(); + array1[v1].value *= 2.0f; + } + final MappedFloat[] array2 = mo2.asArray(); + for ( int v2 = 0; v2 < 5; v2++ ) { + array2[v2].value = (float)Math.random(); + array2[v2].value *= 2.0f; + } + + System.out.println(); + + for ( int v1 = 0; v1 < 5; v1++ ) { + System.out.println("[" + v1 + "] =>" + array1[v1].value); + } + for ( int v2 = 0; v2 < 5; v2++ ) { + System.out.println("[" + v2 + "] =>" + array2[v2].value); + } + } + + private static void testLocalView(MappedSomething some) { + final MappedSomething[] array = some.asArray(); + + assert (array.length == 5); + + final long baseAddress = MemoryUtil.getAddress(some.backingByteBuffer()); + for ( int i = 0; i < array.length; i++ ) { + ByteBuffer data = array[i].data; + + assert (data.capacity() == (64 - 4)); + assert (MemoryUtil.getAddress(data) == baseAddress + i * MappedSomething.SIZEOF + 4); + } + } + + public static class MappedPointer extends MappedObject { + + int foo; + @Pointer long pointer; + int bar; + + } + + public static void testPointer() { + MappedPointer data = MappedPointer.malloc(100); + + assert (data.backingByteBuffer().capacity() == 100 * (4 + 4 + PointerBuffer.getPointerSize())); + + for ( int i = 0; i < 100; i++ ) { + data.view = i; + + data.foo = i; + data.pointer = i * 1000; + data.bar = i * 2; + } + + for ( int i = 0; i < 100; i++ ) { + data.view = i; + + assert (data.foo == i); + assert (data.pointer == i * 1000); + assert (data.bar == i * 2); + } + } + + @MappedType(cacheLinePadding = true) + public static class MappedCacheLinePadded extends MappedObject { + + int foo; + int bar; + + } + + public static void testCacheLineAlignment() { + MappedCacheLinePadded data = MappedCacheLinePadded.malloc(10); + + assert (data.backingByteBuffer().capacity() == 10 * CacheUtil.getCacheLineSize()); + assert (MemoryUtil.getAddress(data.backingByteBuffer()) % CacheUtil.getCacheLineSize() == 0); + + for ( int i = 0; i < 10; i++ ) { + data.view = i; + + data.foo = i; + data.bar = i * 2; + } + + for ( int i = 0; i < 10; i++ ) { + data.view = i; + + assert (data.foo == i); + assert (data.bar == i * 2); + } + } + + public static class MappedFieldCacheLinePadded extends MappedObject { + + // If we assume CacheUtil.getCacheLineSize() == 64 + // 0 - 63 + @CacheLinePad long longBar; + // 64 - 71 + long longFoo; + // 72 - 75 + int intFoo; + // 128 - 131 + @CacheLinePad(before = true) int intBar; + // 192 - 195 + int foo; + // 256 - 267 + @CacheLinePad(before = true, after = false) + @MappedField(byteLength = 12) + ByteBuffer buffer; + // 268 - 271 + int bar; + + } + + public static void testCacheLinePadding() { + MappedFieldCacheLinePadded data = MappedFieldCacheLinePadded.map(CacheUtil.createByteBuffer(10 * MappedFieldCacheLinePadded.SIZEOF)); + + final int sizeof = + CacheUtil.getCacheLineSize() + + 8 + + (CacheUtil.getCacheLineSize() - 8) + + CacheUtil.getCacheLineSize() + + 4 + + (CacheUtil.getCacheLineSize() - 4) + + 12 + + 4; + + assert (MappedFieldCacheLinePadded.SIZEOF == sizeof); + assert (data.backingByteBuffer().capacity() == sizeof * 10); + + for ( int i = 0; i < 10; i++ ) { + data.view = i; + + data.longFoo = i * 1000000000L; + data.longBar = i * 2000000000L; + data.intFoo = i * 1000; + data.intBar = i * 2000; + data.foo = i; + } + + for ( int i = 0; i < 10; i++ ) { + data.view = i; + + assert (data.longFoo == i * 1000000000L); + assert (data.longBar == i * 2000000000L); + assert (data.intFoo == i * 1000); + assert (data.intBar == i * 2000); + assert (data.foo == i); + } + } + + public static class POJOFieldCacheLinePadded { + + @CacheLinePad long longBar; + long longFoo; + int intFoo; + @CacheLinePad(before = true) int intBar; + int foo; + @CacheLinePad boolean bool; + int bar; + + } + + public static void testCacheLinePaddingPOJO() { + Field[] fields = new POJOFieldCacheLinePadded().getClass().getDeclaredFields(); + assert (fields.length == (1 + 7) + 1 + 1 + (15 + 1 + 15) + 1 + (1 + 63) + 1); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/mapped/MappedObjectWithLibrary.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/mapped/MappedObjectWithLibrary.java new file mode 100644 index 0000000..aec393f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/mapped/MappedObjectWithLibrary.java @@ -0,0 +1,17 @@ +/* + * Created on Jul 12, 2011 + */ + +package org.lwjgl.test.mapped; + +import org.lwjgl.opengl.Display; + +import java.io.File; + +public class MappedObjectWithLibrary { + + public static void testLWJGL() throws Exception { + System.out.println(new File(System.getProperty("java.library.path")).getCanonicalPath()); + Display.create(); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/mapped/MappedSomething.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/mapped/MappedSomething.java new file mode 100644 index 0000000..95590ad --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/mapped/MappedSomething.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.mapped; + +import org.lwjgl.util.mapped.MappedField; +import org.lwjgl.util.mapped.MappedObject; + +import java.nio.ByteBuffer; + +/** @author Riven */ +public class MappedSomething extends MappedObject { + + @MappedField(byteOffset = 0) + public int used; + + @MappedField(byteLength = 64 - 4) // optional byteOffset + public ByteBuffer data; + + @MappedField(byteOffset = 12) // inside data + public int shared; + + @Override + public String toString() { + return "MappedSomething[" + used + "]"; + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/mapped/MappedVec2.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/mapped/MappedVec2.java new file mode 100644 index 0000000..74512f3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/mapped/MappedVec2.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.mapped; + +import org.lwjgl.util.mapped.MappedObject; + +/** @author Riven */ +public class MappedVec2 extends MappedObject { + + public float x; + + public float y; + + @Override + public String toString() { + return "MappedVec2[" + x + "," + y + "]"; + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/mapped/MappedVec3.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/mapped/MappedVec3.java new file mode 100644 index 0000000..d0536be --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/mapped/MappedVec3.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.mapped; + +import org.lwjgl.util.mapped.MappedObject; + +/** @author Riven */ +public class MappedVec3 extends MappedObject { + + public float x; + + public float y; + + public float z; + + @Override + public String toString() { + return "[" + x + "," + y + "," + z + "]"; + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/mapped/TestMappedObject.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/mapped/TestMappedObject.java new file mode 100644 index 0000000..0cee7f5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/mapped/TestMappedObject.java @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.mapped; + +import org.lwjgl.util.mapped.MappedObjectClassLoader; +import org.lwjgl.util.mapped.MappedObjectTransformer; + +/** @author Riven */ +@SuppressWarnings("static-access") +public class TestMappedObject { + + static { + boolean assertsEnabled = false; + assert assertsEnabled = true; // Intentional side effect!!! + if ( !assertsEnabled ) + throw new RuntimeException("Asserts must be enabled for this test."); + } + + public static void main(String[] args) throws Exception { + MappedObjectTransformer.register(MappedFloat.class); + MappedObjectTransformer.register(MappedVec2.class); + MappedObjectTransformer.register(MappedVec3.class); + MappedObjectTransformer.register(MappedSomething.class); + MappedObjectTransformer.register(MappedObjectTests3.Xyz.class); + MappedObjectTransformer.register(MappedObjectTests4.MappedPointer.class); + MappedObjectTransformer.register(MappedObjectTests4.MappedCacheLinePadded.class); + MappedObjectTransformer.register(MappedObjectTests4.MappedFieldCacheLinePadded.class); + + if ( MappedObjectClassLoader.fork(TestMappedObject.class, args) ) { + return; + } + + MappedObjectTests1.testViewField(); + + MappedObjectTests2.testFields(); + + // MappedObjectBench.benchmarkMapped(); + // MappedObjectBench.benchmarkInstances(); + // MappedObjectBench.benchmarkIndirectArray(); + // MappedObjectBench.benchmarkDirectArray(); + // MappedObjectBench.benchmarkUnsafe(); + + MappedObjectTests3.testMappedBuffer(); + MappedObjectTests3.testForeach(); + MappedObjectTests3.testConstructor(); + MappedObjectTests3.testMappedSet(); + + MappedObjectTests4.testLocalView(); + //MappedObjectTests4.testLWJGL(); + MappedObjectTests4.testPointer(); + MappedObjectTests4.testCacheLineAlignment(); + MappedObjectTests4.testCacheLinePadding(); + MappedObjectTests4.testCacheLinePaddingPOJO(); + + System.out.println("done"); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/ALCCaptureTest.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/ALCCaptureTest.java new file mode 100644 index 0000000..c3df9fb --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/ALCCaptureTest.java @@ -0,0 +1,154 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.openal; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +import org.lwjgl.BufferUtils; +import org.lwjgl.openal.AL; +import org.lwjgl.openal.AL10; +import org.lwjgl.openal.ALC10; +import org.lwjgl.openal.ALC11; +import org.lwjgl.openal.ALCdevice; +import org.lwjgl.openal.OpenALException; + +/** + * + * This is a test for the ALC part of OpenAL + * + * @author Brian Matzon + * @version $Revision: 2286 $ + * $Id: ALCTest.java 2286 2006-03-23 19:32:21Z matzon $ + */ +public class ALCCaptureTest extends BasicTest { + + /** + * Creates an instance of ALCTest + */ + public ALCCaptureTest() { + super(); + } + + /** + * Runs the actual test, using supplied arguments + */ + protected void execute(String[] args) { + int lastError = ALC10.ALC_NO_ERROR; + IntBuffer sampleCount = BufferUtils.createIntBuffer(1); + + int state = AL10.AL_PLAYING; + int FMT = AL10.AL_FORMAT_MONO16; + int FMTSIZE = 16/8; + int FREQ = 44100; + int TIME = 5; + int SAMPS = (FREQ * TIME); + ByteBuffer buf = BufferUtils.createByteBuffer(SAMPS * FMTSIZE); + + // check that capture is available + if(!ALC10.alcIsExtensionPresent(AL.getDevice(), "ALC_EXT_CAPTURE")) { + throw new OpenALException("ALC_EXT_CAPTURE extension not available"); + } + + // get list of devices + String[] captureDevices = ALC10.alcGetString(null, ALC11.ALC_CAPTURE_DEVICE_SPECIFIER).split("\0"); + System.out.println("Available Capture Devices: "); + for(int i=0; i + * @version $Revision$ + * $Id$ + */ +public class ALCTest extends BasicTest { + + /** + * Creates an instance of ALCTest + */ + public ALCTest() { + super(); + } + + /** + * Runs the actual test, using supplied arguments + */ + protected void execute(String[] args) { + //error stuff + int lastError = ALC10.ALC_NO_ERROR; + + //create attribute list for context creation + IntBuffer buffer = BufferUtils.createIntBuffer(7); + + if ((lastError = ALC10.alcGetError(AL.getDevice())) != ALC10.ALC_NO_ERROR) { + System.out.println("ALC Error: " + ALC10.alcGetString(AL.getDevice(), lastError)); + System.exit(-1); + } + + //query + System.out.println( + "DEFAULT_DEVICE_SPECIFIER: " + + ALC10.alcGetString(AL.getDevice(), ALC10.ALC_DEFAULT_DEVICE_SPECIFIER)); + System.out.println( + "DEVICE_SPECIFIER: " + ALC10.alcGetString(AL.getDevice(), ALC10.ALC_DEVICE_SPECIFIER)); + System.out.println("EXTENSIONS: " + ALC10.alcGetString(AL.getDevice(), ALC10.ALC_EXTENSIONS)); + + //mo query + buffer.rewind(); + buffer.position(0); + ALC10.alcGetInteger(AL.getDevice(), ALC10.ALC_MAJOR_VERSION, buffer); + ALC10.alcGetInteger(AL.getDevice(), ALC10.ALC_MINOR_VERSION, (IntBuffer) buffer.position(1)); + + System.out.println("ALC_MAJOR_VERSION: " + buffer.get(0)); + System.out.println("ALC_MINOR_VERSION: " + buffer.get(1)); + + //no check for ALC_ALL_ATTRIBUTES / ALC_ATTRIBUTES_SIZE since it + //is buggy on win32 - my dev platform + + //get an enumerstion value + System.out.println( + "Value of ALC_MAJOR_VERSION: " + + ALC10.alcGetEnumValue(AL.getDevice(), "ALC_MAJOR_VERSION")); + + alExit(); + } + + /** + * main entry point + * + * @param args String array containing arguments + */ + public static void main(String[] args) { + ALCTest alcTest = new ALCTest(); + alcTest.execute(args); + System.exit(0); + } +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/BasicTest.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/BasicTest.java new file mode 100644 index 0000000..f8d2610 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/BasicTest.java @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.openal; + +import java.nio.FloatBuffer; + +import org.lwjgl.BufferUtils; +import org.lwjgl.openal.AL; +import org.lwjgl.openal.AL10; +import org.lwjgl.openal.ALC10; +import org.lwjgl.opengl.DisplayMode; + +/** + * + * This is a basic test, which contains the most used stuff + * + * @author Brian Matzon + * @version $Revision$ + * $Id$ + */ +public abstract class BasicTest { + + /** + * Creates an instance of PlayTest + */ + protected BasicTest() { + try { + AL.create(); + + System.out.println("Default device: " + ALC10.alcGetString(null, ALC10.ALC_DEFAULT_DEVICE_SPECIFIER)); + + if(ALC10.alcIsExtensionPresent(null, "ALC_ENUMERATION_EXT")) { + String[] devices = ALC10.alcGetString(null, ALC10.ALC_DEVICE_SPECIFIER).split("\0"); + System.out.println("Available devices: "); + for(int i=0; i + * This class is not compatible with the LWJGL debug build (lwjgl-debug.jar), as the debug build + * throws exceptions instead of alGetError checks. The redundant exception handling code was not + * added in order to keep these examples simple. + * + * @author Ciardhubh + * @version $Revision$ + * $Id$ + */ +public final class EFX10Test { + + public static void main(final String[] args) throws Exception { + silentTests(); + playbackTest(); + efxUtilTest(); + } + + /** + * Loads OpenAL and makes sure ALC_EXT_EFX is supported. + */ + private static void setupEfx() throws Exception { + // Load and create OpenAL + if (!AL.isCreated()) { + AL.create(); + } + // Query for Effect Extension + if (!ALC10.alcIsExtensionPresent(AL.getDevice(), EFX10.ALC_EXT_EFX_NAME)) { + throw new Exception("No ALC_EXT_EFX supported by driver."); + } + System.out.println("ALC_EXT_EFX found."); + } + + /** + * Runs a series of API calls similar to the tutorials in the Effects Extension Guide of the + * OpenAL SDK. Nothing is played in this method. + */ + private static void silentTests() throws Exception { + setupEfx(); + + final ALCdevice device = AL.getDevice(); + + // Create context (only necessary if LWJGL context isn't sufficient, done as example) + final IntBuffer contextAttribList = BufferUtils.createIntBuffer(8); + contextAttribList.put(ALC10.ALC_FREQUENCY); + contextAttribList.put(44100); + contextAttribList.put(ALC10.ALC_REFRESH); + contextAttribList.put(60); + contextAttribList.put(ALC10.ALC_SYNC); + contextAttribList.put(ALC10.ALC_FALSE); + contextAttribList.rewind(); + // ALC_MAX_AUXILIARY_SENDS won't go above compile-time max. Set to compile-time max if + // greater. + contextAttribList.put(EFX10.ALC_MAX_AUXILIARY_SENDS); + contextAttribList.put(2); + final ALCcontext newContext = ALC10.alcCreateContext(device, contextAttribList); + if (newContext == null) { + throw new Exception("Failed to create context."); + } + final int contextCurResult = ALC10.alcMakeContextCurrent(newContext); + if (contextCurResult == ALC10.ALC_FALSE) { + throw new Exception("Failed to make context current."); + } + + // Query EFX ALC values + System.out.println("AL_VERSION: " + AL10.alGetString(AL10.AL_VERSION)); + final IntBuffer buff = BufferUtils.createIntBuffer(1); + ALC10.alcGetInteger(device, EFX10.ALC_EFX_MAJOR_VERSION, buff); + System.out.println("ALC_EFX_MAJOR_VERSION: " + buff.get(0)); + ALC10.alcGetInteger(device, EFX10.ALC_EFX_MINOR_VERSION, buff); + System.out.println("ALC_EFX_MINOR_VERSION: " + buff.get(0)); + ALC10.alcGetInteger(device, EFX10.ALC_MAX_AUXILIARY_SENDS, buff); + final int maxAuxSends = buff.get(0); + System.out.println("ALC_MAX_AUXILIARY_SENDS: " + maxAuxSends); + + + // Try to create 4 Auxiliary Effect Slots + int numAuxSlots = 0; + final int[] auxEffectSlots = new int[4]; // try more to test + AL10.alGetError(); + for (numAuxSlots = 0; numAuxSlots < 4; numAuxSlots++) { + auxEffectSlots[numAuxSlots] = EFX10.alGenAuxiliaryEffectSlots(); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { + break; + } + } + System.out.println("Created " + numAuxSlots + " aux effect slots."); + + // Try to create 2 Effects + int numEffects = 0; + final int[] effects = new int[2]; + for (numEffects = 0; numEffects < 2; numEffects++) { + effects[numEffects] = EFX10.alGenEffects(); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { + break; + } + } + System.out.println("Created " + numEffects + " effects."); + + // Set first Effect Type to Reverb and change Decay Time + AL10.alGetError(); + if (EFX10.alIsEffect(effects[0])) { + EFX10.alEffecti(effects[0], EFX10.AL_EFFECT_TYPE, EFX10.AL_EFFECT_REVERB); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { + System.out.println("Reverb effect not supported."); + } else { + EFX10.alEffectf(effects[0], EFX10.AL_REVERB_DECAY_TIME, 5.0f); + System.out.println("Reverb effect created."); + } + } else { + throw new Exception("First effect not a valid effect."); + } + + // Set second Effect Type to Flanger and change Phase + AL10.alGetError(); + if (EFX10.alIsEffect(effects[1])) { + EFX10.alEffecti(effects[1], EFX10.AL_EFFECT_TYPE, EFX10.AL_EFFECT_FLANGER); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { + System.out.println("Flanger effect not support."); + } else { + EFX10.alEffecti(effects[1], EFX10.AL_FLANGER_PHASE, 180); + System.out.println("Flanger effect created."); + } + } else { + throw new Exception("Second effect not a valid effect."); + } + + // Try to create a Filter + AL10.alGetError(); + final int filter = EFX10.alGenFilters(); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { + throw new Exception("Failed to create filter."); + } + System.out.println("Generated a filter."); + if (EFX10.alIsFilter(filter)) { + // Set Filter type to Low-Pass and set parameters + EFX10.alFilteri(filter, EFX10.AL_FILTER_TYPE, EFX10.AL_FILTER_LOWPASS); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { + System.out.println("Low pass filter not supported."); + } else { + EFX10.alFilterf(filter, EFX10.AL_LOWPASS_GAIN, 0.5f); + EFX10.alFilterf(filter, EFX10.AL_LOWPASS_GAINHF, 0.5f); + System.out.println("Low pass filter created."); + } + } + + // Attach Effect to Auxiliary Effect Slot + AL10.alGetError(); + EFX10.alAuxiliaryEffectSloti(auxEffectSlots[0], EFX10.AL_EFFECTSLOT_EFFECT, effects[0]); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { + throw new Exception("Failed to attach effect to aux effect slot."); + } + System.out.println("Successfully loaded effect into effect slot."); + + // Configure Source Auxiliary Effect Slot Sends + final int source = AL10.alGenSources(); + // Set Source Send 0 to feed auxEffectSlots[0] without filtering + AL11.alSource3i(source, EFX10.AL_AUXILIARY_SEND_FILTER, auxEffectSlots[0], 0, + EFX10.AL_FILTER_NULL); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { + throw new Exception("Failed to configure Source Send 0"); + } + System.out.println("Linked aux effect slot to soutce slot 0"); + // Set Source Send 1 to feed uiEffectSlot[1] with filter filter + AL11.alSource3i(source, EFX10.AL_AUXILIARY_SEND_FILTER, auxEffectSlots[1], 1, filter); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { + // e.g. if only 1 send per source is available + throw new Exception("Failed to configure Source Send 1"); + } + System.out.println("Linked aux effect slot to soutce slot 1"); + // Disable Send 0 + AL11.alSource3i(source, EFX10.AL_AUXILIARY_SEND_FILTER, EFX10.AL_EFFECTSLOT_NULL, 0, + EFX10.AL_FILTER_NULL); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { + throw new Exception("Failed to disable Source Send 0"); + } + System.out.println("Disabled source send 0"); + // Disable Send 1 + AL11.alSource3i(source, EFX10.AL_AUXILIARY_SEND_FILTER, EFX10.AL_EFFECTSLOT_NULL, 1, + EFX10.AL_FILTER_NULL); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { + throw new Exception("Failed to disable Source Send 1"); + } + System.out.println("Disabled source send 1"); + + + // Filter 'source', a generated Source + AL10.alSourcei(source, EFX10.AL_DIRECT_FILTER, filter); + if (AL10.alGetError() == AL10.AL_NO_ERROR) { + { + System.out.println("Successfully applied a direct path filter"); + // Remove filter from 'source' + AL10.alSourcei(source, EFX10.AL_DIRECT_FILTER, EFX10.AL_FILTER_NULL); + if (AL10.alGetError() == AL10.AL_NO_ERROR) { + System.out.println("Successfully removed direct filter"); + } + } + // Filter the Source send 0 from 'source' to Auxiliary Effect Slot auxEffectSlot[0] + // using Filter uiFilter[0] + AL11.alSource3i(source, EFX10.AL_AUXILIARY_SEND_FILTER, auxEffectSlots[0], 0, filter); + if (AL10.alGetError() == AL10.AL_NO_ERROR) { + { + System.out.println("Successfully applied aux send filter"); + // Remove Filter from Source Auxiliary Send + AL11.alSource3i(source, EFX10.AL_AUXILIARY_SEND_FILTER, auxEffectSlots[0], 0, + EFX10.AL_FILTER_NULL); + if (AL10.alGetError() == AL10.AL_NO_ERROR) { + System.out.println("Successfully removed filter"); + } + } + } + } + + // Set Source Cone Outer Gain HF value + AL10.alSourcef(source, EFX10.AL_CONE_OUTER_GAINHF, 0.5f); + if (AL10.alGetError() == AL10.AL_NO_ERROR) { + System.out.println("Successfully set cone outside gain filter"); + } + + // Set distance units to be in feet + AL10.alListenerf(EFX10.AL_METERS_PER_UNIT, 0.3f); + if (AL10.alGetError() == AL10.AL_NO_ERROR) { + System.out.println("Successfully set distance units"); + } + + // Cleanup + final IntBuffer auxEffectSlotsBuf = (IntBuffer) BufferUtils.createIntBuffer( + auxEffectSlots.length).put(auxEffectSlots).rewind(); + EFX10.alDeleteAuxiliaryEffectSlots(auxEffectSlotsBuf); + final IntBuffer effectsBuf = (IntBuffer) BufferUtils.createIntBuffer( + effects.length).put(effects).rewind(); + EFX10.alDeleteEffects(effectsBuf); + EFX10.alDeleteFilters(filter); + AL.destroy(); + } + + /** + * Plays a sound with various effects applied to it. + */ + private static void playbackTest() throws Exception { + setupEfx(); + + // Create a source and buffer audio data + final int source = AL10.alGenSources(); + final int buffer = AL10.alGenBuffers(); + WaveData waveFile = WaveData.create("Footsteps.wav"); + if (waveFile == null) { + System.out.println("Failed to load Footsteps.wav! Skipping playback test."); + AL.destroy(); + return; + } + AL10.alBufferData(buffer, waveFile.format, waveFile.data, waveFile.samplerate); + waveFile.dispose(); + AL10.alSourcei(source, AL10.AL_BUFFER, buffer); + AL10.alSourcei(source, AL10.AL_LOOPING, AL10.AL_TRUE); + + System.out.println("Playing sound unaffected by EFX ..."); + AL10.alSourcePlay(source); + Thread.sleep(7500); + + // Add reverb effect + final int effectSlot = EFX10.alGenAuxiliaryEffectSlots(); + final int reverbEffect = EFX10.alGenEffects(); + EFX10.alEffecti(reverbEffect, EFX10.AL_EFFECT_TYPE, EFX10.AL_EFFECT_REVERB); + EFX10.alEffectf(reverbEffect, EFX10.AL_REVERB_DECAY_TIME, 5.0f); + EFX10.alAuxiliaryEffectSloti(effectSlot, EFX10.AL_EFFECTSLOT_EFFECT, reverbEffect); + AL11.alSource3i(source, EFX10.AL_AUXILIARY_SEND_FILTER, effectSlot, 0, + EFX10.AL_FILTER_NULL); + + System.out.println("Playing sound with reverb ..."); + AL10.alSourcePlay(source); + Thread.sleep(7500); + + // Add low-pass filter directly to source + final int filter = EFX10.alGenFilters(); + EFX10.alFilteri(filter, EFX10.AL_FILTER_TYPE, EFX10.AL_FILTER_LOWPASS); + EFX10.alFilterf(filter, EFX10.AL_LOWPASS_GAIN, 0.5f); + EFX10.alFilterf(filter, EFX10.AL_LOWPASS_GAINHF, 0.5f); + AL10.alSourcei(source, EFX10.AL_DIRECT_FILTER, filter); + + System.out.println("Playing sound with reverb and direct low pass filter ..."); + AL10.alSourcePlay(source); + Thread.sleep(7500); + AL10.alSourcei(source, EFX10.AL_DIRECT_FILTER, EFX10.AL_FILTER_NULL); + + // Add low-pass filter to source send + //AL11.alSource3i(source, EFX10.AL_AUXILIARY_SEND_FILTER, effectSlot, 0, filter); + // + //System.out.println("Playing sound with reverb and aux send low pass filter ..."); + //AL10.alSourcePlay(source); + //Thread.sleep(7500); + + // Cleanup + AL11.alSource3i(source, EFX10.AL_AUXILIARY_SEND_FILTER, EFX10.AL_EFFECTSLOT_NULL, 0, + EFX10.AL_FILTER_NULL); + EFX10.alAuxiliaryEffectSloti(effectSlot, EFX10.AL_EFFECTSLOT_EFFECT, EFX10.AL_EFFECT_NULL); + EFX10.alDeleteEffects(reverbEffect); + EFX10.alDeleteFilters(filter); + + // Echo effect + final int echoEffect = EFX10.alGenEffects(); + EFX10.alEffecti(echoEffect, EFX10.AL_EFFECT_TYPE, EFX10.AL_EFFECT_ECHO); + //EFX10.alEffectf(echoEffect, EFX10.AL_ECHO_DELAY, 5.0f); + EFX10.alAuxiliaryEffectSloti(effectSlot, EFX10.AL_EFFECTSLOT_EFFECT, echoEffect); + AL11.alSource3i(source, EFX10.AL_AUXILIARY_SEND_FILTER, effectSlot, 0, + EFX10.AL_FILTER_NULL); + + System.out.println("Playing sound with echo effect ..."); + AL10.alSourcePlay(source); + Thread.sleep(7500); + + AL.destroy(); + } + + /** + * Checks OpenAL for every EFX 1.0 effect and filter and prints the result to the console. + */ + private static void efxUtilTest() throws Exception { + setupEfx(); + + System.out.println(); + System.out.println("Checking supported effects ..."); + if (EFXUtil.isEffectSupported(EFX10.AL_EFFECT_NULL)) { + System.out.println("AL_EFFECT_NULL is supported."); + } else { + System.out.println("AL_EFFECT_NULL is NOT supported."); + } + if (EFXUtil.isEffectSupported(EFX10.AL_EFFECT_EAXREVERB)) { + System.out.println("AL_EFFECT_EAXREVERB is supported."); + } else { + System.out.println("AL_EFFECT_EAXREVERB is NOT supported."); + } + if (EFXUtil.isEffectSupported(EFX10.AL_EFFECT_REVERB)) { + System.out.println("AL_EFFECT_REVERB is supported."); + } else { + System.out.println("AL_EFFECT_REVERB is NOT supported."); + } + if (EFXUtil.isEffectSupported(EFX10.AL_EFFECT_CHORUS)) { + System.out.println("AL_EFFECT_CHORUS is supported."); + } else { + System.out.println("AL_EFFECT_CHORUS is NOT supported."); + } + if (EFXUtil.isEffectSupported(EFX10.AL_EFFECT_DISTORTION)) { + System.out.println("AL_EFFECT_DISTORTION is supported."); + } else { + System.out.println("AL_EFFECT_DISTORTION is NOT supported."); + } + if (EFXUtil.isEffectSupported(EFX10.AL_EFFECT_ECHO)) { + System.out.println("AL_EFFECT_ECHO is supported."); + } else { + System.out.println("AL_EFFECT_ECHO is NOT supported."); + } + if (EFXUtil.isEffectSupported(EFX10.AL_EFFECT_FLANGER)) { + System.out.println("AL_EFFECT_FLANGER is supported."); + } else { + System.out.println("AL_EFFECT_FLANGER is NOT supported."); + } + if (EFXUtil.isEffectSupported(EFX10.AL_EFFECT_FREQUENCY_SHIFTER)) { + System.out.println("AL_EFFECT_FREQUENCY_SHIFTER is supported."); + } else { + System.out.println("AL_EFFECT_FREQUENCY_SHIFTER is NOT supported."); + } + if (EFXUtil.isEffectSupported(EFX10.AL_EFFECT_VOCAL_MORPHER)) { + System.out.println("AL_EFFECT_VOCAL_MORPHER is supported."); + } else { + System.out.println("AL_EFFECT_VOCAL_MORPHER is NOT supported."); + } + if (EFXUtil.isEffectSupported(EFX10.AL_EFFECT_PITCH_SHIFTER)) { + System.out.println("AL_EFFECT_PITCH_SHIFTER is supported."); + } else { + System.out.println("AL_EFFECT_PITCH_SHIFTER is NOT supported."); + } + if (EFXUtil.isEffectSupported(EFX10.AL_EFFECT_RING_MODULATOR)) { + System.out.println("AL_EFFECT_RING_MODULATOR is supported."); + } else { + System.out.println("AL_EFFECT_RING_MODULATOR is NOT supported."); + } + if (EFXUtil.isEffectSupported(EFX10.AL_EFFECT_AUTOWAH)) { + System.out.println("AL_EFFECT_AUTOWAH is supported."); + } else { + System.out.println("AL_EFFECT_AUTOWAH is NOT supported."); + } + if (EFXUtil.isEffectSupported(EFX10.AL_EFFECT_COMPRESSOR)) { + System.out.println("AL_EFFECT_COMPRESSOR is supported."); + } else { + System.out.println("AL_EFFECT_COMPRESSOR is NOT supported."); + } + if (EFXUtil.isEffectSupported(EFX10.AL_EFFECT_EQUALIZER)) { + System.out.println("AL_EFFECT_EQUALIZER is supported."); + } else { + System.out.println("AL_EFFECT_EQUALIZER is NOT supported."); + } + + System.out.println(); + System.out.println("Checking supported filters ..."); + if (EFXUtil.isFilterSupported(EFX10.AL_FILTER_NULL)) { + System.out.println("AL_FILTER_NULL is supported."); + } else { + System.out.println("AL_FILTER_NULL is NOT supported."); + } + if (EFXUtil.isFilterSupported(EFX10.AL_FILTER_LOWPASS)) { + System.out.println("AL_FILTER_LOWPASS is supported."); + } else { + System.out.println("AL_FILTER_LOWPASS is NOT supported."); + } + if (EFXUtil.isFilterSupported(EFX10.AL_FILTER_HIGHPASS)) { + System.out.println("AL_FILTER_HIGHPASS is supported."); + } else { + System.out.println("AL_FILTER_HIGHPASS is NOT supported."); + } + if (EFXUtil.isFilterSupported(EFX10.AL_FILTER_BANDPASS)) { + System.out.println("AL_FILTER_BANDPASS is supported."); + } else { + System.out.println("AL_FILTER_BANDPASS is NOT supported."); + } + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/MovingSoundTest.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/MovingSoundTest.java new file mode 100644 index 0000000..c5bade7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/MovingSoundTest.java @@ -0,0 +1,218 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.openal; + +import java.nio.IntBuffer; + +import org.lwjgl.BufferUtils; +import org.lwjgl.input.Keyboard; +import org.lwjgl.openal.AL10; +import org.lwjgl.opengl.Display; +import org.lwjgl.util.WaveData; +import org.lwjgl.util.vector.Vector3f; + +/** + * + * This test simulates a listener positioned in the center, and + * a source moving around the listener using the keyboard + * + * @author Brian Matzon + * @version $Revision$ + * $Id$ + */ +public class MovingSoundTest extends BasicTest { + + public static float MOVEMENT = 50.00f; + + /** + * Creates an instance of MovingSoundTest + */ + public MovingSoundTest() { + super(); + } + + /** + * Runs the actual test, using supplied arguments + */ + protected void execute(String[] args) { + if (args.length < 1) { + System.out.println("no argument supplied, assuming Footsteps.wav"); + args = new String[] {"Footsteps.wav"}; + } + + try { + setDisplayMode(); + Display.create(); + } catch (Exception e) { + e.printStackTrace(); + } + + + int lastError; + Vector3f sourcePosition = new Vector3f(); + Vector3f listenerPosition = new Vector3f(); + + //initialize keyboard + try { + Keyboard.create(); + } catch (Exception e) { + e.printStackTrace(); + exit(-1); + } + + //create 1 buffer and 1 source + IntBuffer buffers = BufferUtils.createIntBuffer(1); + IntBuffer sources = BufferUtils.createIntBuffer(1); + + // al generate buffers and sources + buffers.position(0).limit(1); + AL10.alGenBuffers(buffers); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + sources.position(0).limit(1); + AL10.alGenSources(sources); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + //load wave data + WaveData wavefile = WaveData.create(args[0]); + + //copy to buffers + AL10.alBufferData( + buffers.get(0), + wavefile.format, + wavefile.data, + wavefile.samplerate); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + //unload file again + wavefile.dispose(); + + //set up source input + AL10.alSourcei(sources.get(0), AL10.AL_BUFFER, buffers.get(0)); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + AL10.alSourcef(sources.get(0), AL10.AL_REFERENCE_DISTANCE, 1024.0f); + AL10.alSourcef(sources.get(0), AL10.AL_ROLLOFF_FACTOR, 0.5f); + + //lets loop the sound + AL10.alSourcei(sources.get(0), AL10.AL_LOOPING, AL10.AL_TRUE); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + //play source 0 + AL10.alSourcePlay(sources.get(0)); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + System.out.println("Move source with arrow keys\nMove listener with right shift and arrowkeys\nExit with ESC"); + + while(!Keyboard.isKeyDown(Keyboard.KEY_ESCAPE)) { + Display.update(); + + Keyboard.poll(); + if(Keyboard.isKeyDown(Keyboard.KEY_LEFT)) { + if(Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) { + listenerPosition.x -= MOVEMENT; + AL10.alListener3f(AL10.AL_POSITION, listenerPosition.x, listenerPosition.y, listenerPosition.z); + System.out.println("listenerx: " + listenerPosition.x); + } else { + sourcePosition.x -= MOVEMENT; + AL10.alSource3f(sources.get(0), AL10.AL_POSITION, sourcePosition.x, sourcePosition.y, sourcePosition.z); + System.out.println("sourcex: " + sourcePosition.x); + } + } + if(Keyboard.isKeyDown(Keyboard.KEY_RIGHT)) { + if(Keyboard.isKeyDown(Keyboard.KEY_RSHIFT)) { + listenerPosition.x += MOVEMENT; + AL10.alListener3f(AL10.AL_POSITION, listenerPosition.x, listenerPosition.y, listenerPosition.z); + System.out.println("listenerx: " + listenerPosition.x); + } else { + sourcePosition.x += MOVEMENT; + AL10.alSource3f(sources.get(0), AL10.AL_POSITION, sourcePosition.x, sourcePosition.y, sourcePosition.z); + System.out.println("sourcex: " + sourcePosition.x); + } + } + + if(Display.isCloseRequested()) { + break; + } + + try { + Thread.sleep(100); + } catch (InterruptedException inte) { + } + } + + //stop source 0 + AL10.alSourceStop(sources.get(0)); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + //delete buffers and sources + sources.position(0).limit(1); + AL10.alDeleteSources(sources); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + buffers.position(0).limit(1); + AL10.alDeleteBuffers(buffers); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + //shutdown + alExit(); + } + + /** + * main entry point + * + * @param args String array containing arguments + */ + public static void main(String[] args) { + MovingSoundTest movingSoundTest = new MovingSoundTest(); + movingSoundTest.execute(args); + System.exit(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/OpenALCreationTest.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/OpenALCreationTest.java new file mode 100644 index 0000000..79b9fef --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/OpenALCreationTest.java @@ -0,0 +1,225 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.openal; + +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.IntBuffer; + +import org.lwjgl.openal.AL; +import org.lwjgl.openal.AL10; +import org.lwjgl.util.WaveData; + +/** + *
+ * Performs a creation test, by creating and destroying OpenAL twice. + * We cannot inherit from BasicTest since it follows another structure. + * + * @author Brian Matzon + * @version $Revision$ + * $Id$ + */ +public class OpenALCreationTest { + + /** + * Creates an instance of OpenALCreationTest + */ + public OpenALCreationTest() { + } + + public void alInitialize() { + try { + AL.create(); + } catch (Exception e) { + e.printStackTrace(); + return; + } + } + + public void alExit() { + AL.destroy(); + } + + /** + * Creates an integer buffer to hold specified ints + * - strictly a utility method + * + * @param size how many int to contain + * @return created IntBuffer + */ + protected IntBuffer createIntBuffer(int size) { + ByteBuffer temp = ByteBuffer.allocateDirect(4 * size); + temp.order(ByteOrder.nativeOrder()); + + return temp.asIntBuffer(); + } + + /** + * Exits the test NOW, printing errorcode to stdout + * + * @param error Error code causing exit + */ + protected void exit(int error) { + System.out.println("OpenAL Error: " + AL10.alGetString(error)); + alExit(); + System.exit(-1); + } + + /** + * Runs the actual test, using supplied arguments + */ + protected void execute(String[] args) { + int lastError; + + //initialize AL, using ALC + System.out.print("initialize..."); + alInitialize(); + System.out.println("success"); + + //do some audio + executeAudioTest(); + + //shutdown + System.out.print("shutdown..."); + alExit(); + System.out.println("success"); + + //initialize AL, using ALC + System.out.print("initialize..."); + alInitialize(); + System.out.println("success"); + + //do some audio + executeAudioTest(); + + //shutdown + System.out.print("shutdown..."); + alExit(); + System.out.println("success"); + } + + /** + * Executes the audio test, which just plays some sound + */ + private void executeAudioTest() { + int lastError; + + //create 1 buffer and 1 source + IntBuffer buffers = createIntBuffer(1); + IntBuffer sources = createIntBuffer(1); + + // al generate buffers and sources + buffers.position(0).limit(1); + AL10.alGenBuffers(buffers); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + sources.position(0).limit(1); + AL10.alGenSources(sources); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + //load wave data + WaveData wavefile = WaveData.create("Footsteps.wav"); + + //copy to buffers + AL10.alBufferData( + buffers.get(0), + wavefile.format, + wavefile.data, + wavefile.samplerate); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + //unload file again + wavefile.dispose(); + + //set up source input + AL10.alSourcei(sources.get(0), AL10.AL_BUFFER, buffers.get(0)); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + //lets loop the sound + AL10.alSourcei(sources.get(0), AL10.AL_LOOPING, AL10.AL_TRUE); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + //play source 0 + AL10.alSourcePlay(sources.get(0)); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + //wait 5 secs + try { + System.out.print("Playing 'Footsteps.wav' for 2 seconds..."); + Thread.sleep(2000); + } catch (InterruptedException inte) { + } + System.out.println("done"); + + //stop source 0 + AL10.alSourceStop(sources.get(0)); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + //delete buffers and sources + sources.position(0).limit(1); + AL10.alDeleteSources(sources); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + buffers.position(0).limit(1); + AL10.alDeleteBuffers(buffers); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + } + + /** + * main entry point + * + * @param args String array containing arguments + */ + public static void main(String[] args) { + OpenALCreationTest oalCreationTest = new OpenALCreationTest(); + oalCreationTest.execute(args); + System.exit(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/OpenALInfo.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/OpenALInfo.java new file mode 100644 index 0000000..573275f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/OpenALInfo.java @@ -0,0 +1,238 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.openal; + +import java.nio.IntBuffer; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.Set; +import java.util.Map.Entry; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.openal.AL; +import org.lwjgl.openal.AL10; +import org.lwjgl.openal.ALC10; +import org.lwjgl.openal.ALC11; +import org.lwjgl.openal.ALCdevice; +import org.lwjgl.openal.EFX10; +import org.lwjgl.openal.EFXUtil; + +/** + * + * idea from openal-info + * + * @author Brian Matzon + * @version $Revision: 2983 $ + * $Id$ + */ +public class OpenALInfo { + + /** + * Creates an instance of OpenALInfo + */ + public OpenALInfo() { + } + + /** + * Runs the actual test, using supplied arguments + */ + protected void execute(String[] args) { + try { + AL.create(null, -1, 60, false); + checkForErrors(); + } catch (LWJGLException le) { + die("Init", le.getMessage()); + } + + printALCInfo(); + printALInfo(); + printEFXInfo(); + + checkForErrors(); + + AL.destroy(); + } + + private void printALCInfo() { + IntBuffer version = BufferUtils.createIntBuffer(2); + ALCdevice device; + + if(ALC10.alcIsExtensionPresent(null, "ALC_ENUMERATION_EXT")) { + if(ALC10.alcIsExtensionPresent(null, "ALC_ENUMERATE_ALL_EXT")) { + printDevices(ALC11.ALC_ALL_DEVICES_SPECIFIER, "playback"); + } else { + printDevices(ALC10.ALC_DEVICE_SPECIFIER, "playback"); + } + printDevices(ALC11.ALC_CAPTURE_DEVICE_SPECIFIER, "capture"); + } else { + System.out.println("No device enumeration available"); + } + + device = ALC10.alcGetContextsDevice(ALC10.alcGetCurrentContext()); + checkForErrors(); + + System.out.println("Default playback device: " + ALC10.alcGetString(device, ALC10.ALC_DEFAULT_DEVICE_SPECIFIER)); + + System.out.println("Default capture device: " + ALC10.alcGetString(device, ALC11.ALC_CAPTURE_DEFAULT_DEVICE_SPECIFIER)); + + ALC10.alcGetInteger(AL.getDevice(), ALC10.ALC_MAJOR_VERSION, version); + ALC10.alcGetInteger(AL.getDevice(), ALC10.ALC_MINOR_VERSION, (IntBuffer) version.position(1)); + checkForErrors(); + + System.out.println("ALC version: " + version.get(0) + "." + version.get(1)); + + System.out.println("ALC extensions:"); + String[] extensions = ALC10.alcGetString(device, ALC10.ALC_EXTENSIONS).split(" "); + for ( String extension : extensions ) { + if ( extension.trim().length() == 0 ) { + continue; + } + System.out.println(" " + extension); + } + checkForErrors(); + } + + private void printALInfo() { + System.out.println("OpenAL vendor string: " + AL10.alGetString(AL10.AL_VENDOR)); + System.out.println("OpenAL renderer string: " + AL10.alGetString(AL10.AL_RENDERER)); + System.out.println("OpenAL version string: " + AL10.alGetString(AL10.AL_VERSION)); + System.out.println("AL extensions:"); + String[] extensions = AL10.alGetString(AL10.AL_EXTENSIONS).split(" "); + for ( String extension : extensions ) { + if ( extension.trim().length() == 0 ) { + continue; + } + System.out.println(" " + extension); + } + checkForErrors(); + } + + private void printEFXInfo() { + if(!EFXUtil.isEfxSupported()) { + System.out.println("EFX not available"); + return; + } + + ALCdevice device = AL.getDevice(); + IntBuffer major = BufferUtils.createIntBuffer(1); + IntBuffer minor = BufferUtils.createIntBuffer(1); + IntBuffer sends = BufferUtils.createIntBuffer(1); + ALC10.alcGetInteger(device, EFX10.ALC_EFX_MAJOR_VERSION, major); + ALC10.alcGetInteger(device, EFX10.ALC_EFX_MINOR_VERSION, minor); + if(ALC10.alcGetError(device) == ALC10.ALC_NO_ERROR) { + System.out.println("EFX version: " + major.get() + "." + minor.get()); + } + + ALC10.alcGetInteger(device, EFX10.ALC_MAX_AUXILIARY_SENDS, sends); + if(ALC10.alcGetError(device) == ALC10.ALC_NO_ERROR) { + System.out.println("Max auxiliary sends: " + sends.get()); + } + + System.out.println("Supported filters: "); + HashMap filters = new HashMap(); + filters.put("Low-pass", EFX10.AL_FILTER_LOWPASS); + filters.put("High-pass", EFX10.AL_FILTER_HIGHPASS); + filters.put("Band-pass", EFX10.AL_FILTER_BANDPASS); + + Set> entries = filters.entrySet(); + for ( final Entry entry : entries ) { + String key = entry.getKey(); + if ( EFXUtil.isFilterSupported(entry.getValue()) ) + System.out.println(" " + entry.getKey()); + } + + System.out.println("Supported effects: "); + HashMap effects = new HashMap(); + effects.put("EAX Reverb", EFX10.AL_EFFECT_EAXREVERB); + effects.put("Reverb", EFX10.AL_EFFECT_REVERB); + effects.put("Chorus", EFX10.AL_EFFECT_CHORUS); + effects.put("Distortion", EFX10.AL_EFFECT_DISTORTION); + effects.put("Echo", EFX10.AL_EFFECT_ECHO); + effects.put("Flanger", EFX10.AL_EFFECT_FLANGER); + effects.put("Frequency Shifter", EFX10.AL_EFFECT_FREQUENCY_SHIFTER); + effects.put("Vocal Morpher", EFX10.AL_EFFECT_VOCAL_MORPHER); + effects.put("Pitch Shifter", EFX10.AL_EFFECT_PITCH_SHIFTER); + effects.put("Ring Modulator", EFX10.AL_EFFECT_RING_MODULATOR); + effects.put("Autowah", EFX10.AL_EFFECT_AUTOWAH); + effects.put("Compressor", EFX10.AL_EFFECT_COMPRESSOR); + effects.put("Equalizer", EFX10.AL_EFFECT_EQUALIZER); + + entries = effects.entrySet(); + for ( final Entry entry : entries ) { + if ( EFXUtil.isEffectSupported(entry.getValue()) ) + System.out.println(" " + entry.getKey()); + } + } + + private void printDevices(int which, String kind) { + String[] devices = ALC10.alcGetString(null, which).split("\0"); + checkForErrors(); + + System.out.println("Available " + kind + " devices: "); + for ( String device : devices ) { + System.out.println(" " + device); + } + } + + private void die(String kind, String description) { + System.out.println(kind + " error " + description + " occured"); + } + + private void checkForErrors() { + { + ALCdevice device = ALC10.alcGetContextsDevice(ALC10.alcGetCurrentContext()); + int error = ALC10.alcGetError(device); + if(error != ALC10.ALC_NO_ERROR) { + die("ALC", ALC10.alcGetString(device, error)); + } + } + { + int error = AL10.alGetError(); + if(error != AL10.AL_NO_ERROR) { + die("AL", AL10.alGetString(error)); + } + } + } + + /** + * main entry point + * + * @param args String array containing arguments + */ + public static void main(String[] args) { + OpenALInfo openalInfo = new OpenALInfo(); + openalInfo.execute(args); + System.exit(0); + } +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/PlayTest.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/PlayTest.java new file mode 100644 index 0000000..a632010 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/PlayTest.java @@ -0,0 +1,221 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.openal; + +import java.io.BufferedInputStream; +import java.io.ByteArrayOutputStream; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.IntBuffer; + +import org.lwjgl.BufferUtils; +import org.lwjgl.openal.AL10; +import org.lwjgl.util.WaveData; + +/** + * + * This is a basic play test + * Yes, over zealous use of getError ;) + * + * @author Brian Matzon + * @version $Revision$ + * $Id$ + */ +public class PlayTest extends BasicTest { + + private boolean usingVorbis; + + /** + * Creates an instance of PlayTest + */ + public PlayTest() { + super(); + } + + /** + * Runs the actual test, using supplied arguments + */ + protected void execute(String[] args) { + if(args.length < 1) { + System.out.println("no argument supplied, assuming Footsteps.wav"); + args = new String[] {"Footsteps.wav"}; + } + + if(args[0].endsWith(".ogg")) { + System.out.print("Attempting to load Ogg Vorbis file, checking for extension..."); + if(AL10.alIsExtensionPresent("AL_EXT_vorbis")) { + System.out.println("found"); + usingVorbis = true; + } else { + System.out.println("not supported"); + alExit(); + System.exit(-1); + } + } + + int lastError; + + //create 1 buffer and 1 source + IntBuffer buffers = BufferUtils.createIntBuffer(1); + IntBuffer sources = BufferUtils.createIntBuffer(1); + + // al generate buffers and sources + buffers.position(0).limit(1); + AL10.alGenBuffers(buffers); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + sources.position(0).limit(1); + AL10.alGenSources(sources); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + if(usingVorbis) { + ByteBuffer filebuffer = getData(args[0]); + + // pass directly to buffer data + AL10.alBufferData(buffers.get(0), AL10.AL_FORMAT_VORBIS_EXT, filebuffer, -1); + filebuffer.clear(); + } else { + // load wave data from buffer + WaveData wavefile = WaveData.create(args[0]); + + //copy to buffers + AL10.alBufferData(buffers.get(0), wavefile.format, wavefile.data, wavefile.samplerate); + + //unload file again + wavefile.dispose(); + } + + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + //set up source input + AL10.alSourcei(sources.get(0), AL10.AL_BUFFER, buffers.get(0)); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + //lets loop the sound + AL10.alSourcei(sources.get(0), AL10.AL_LOOPING, AL10.AL_TRUE); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + //play source 0 + AL10.alSourcePlay(sources.get(0)); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + //wait 5 secs + try { + System.out.println("Waiting 5 seconds for sound to complete"); + Thread.sleep(5000); + } catch (InterruptedException inte) { + } + + //stop source 0 + AL10.alSourceStop(sources.get(0)); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + //delete buffers and sources + sources.position(0).limit(1); + AL10.alDeleteSources(sources); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + buffers.position(0).limit(1); + AL10.alDeleteBuffers(buffers); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + //no errorchecking from now on, since our context is gone. + //shutdown + alExit(); + } + + /** + * Reads the file into a ByteBuffer + * + * @param filename Name of file to load + * @return ByteBuffer containing file data + */ + protected ByteBuffer getData(String filename) { + ByteBuffer buffer = null; + + System.out.println("Attempting to load: " + filename); + + try { + BufferedInputStream bis = new BufferedInputStream(WaveData.class.getClassLoader().getResourceAsStream(filename)); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + + int bufferLength = 4096; + byte[] readBuffer = new byte[bufferLength]; + int read = -1; + + while((read = bis.read(readBuffer, 0, bufferLength)) != -1) { + baos.write(readBuffer, 0, read); + } + + //done reading, close + bis.close(); + + // if ogg vorbis data, we need to pass it unmodified to alBufferData + buffer = ByteBuffer.allocateDirect(baos.size()); + buffer.order(ByteOrder.nativeOrder()); + buffer.put(baos.toByteArray()); + buffer.rewind(); + } catch (Exception ioe) { + ioe.printStackTrace(); + } + return buffer; + } + + /** + * main entry point + * + * @param args String array containing arguments + */ + public static void main(String[] args) { + PlayTest playTest = new PlayTest(); + playTest.execute(args); + System.exit(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/PlayTestMemory.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/PlayTestMemory.java new file mode 100644 index 0000000..8cdfb04 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/PlayTestMemory.java @@ -0,0 +1,234 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.openal; + +import java.io.BufferedInputStream; +import java.io.ByteArrayOutputStream; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.IntBuffer; + +import org.lwjgl.BufferUtils; +import org.lwjgl.openal.AL10; +import org.lwjgl.util.WaveData; + +/** + * + * This is a basic play test + * Yes, over zealous use of getError ;) + * + * @author Brian Matzon + * @version $Revision$ + * $Id$ + */ +public class PlayTestMemory extends BasicTest { + + private boolean usingVorbis; + + /** + * Creates an instance of PlayTestMemory + */ + public PlayTestMemory() { + super(); + } + + /** + * Runs the actual test, using supplied arguments + */ + protected void execute(String[] args) { + if(args.length < 1) { + System.out.println("no argument supplied, assuming Footsteps.wav"); + args = new String[] {"Footsteps.wav"}; + } + + if(args[0].endsWith(".ogg")) { + System.out.print("Attempting to load Ogg Vorbis file, checking for extension..."); + if(AL10.alIsExtensionPresent("AL_EXT_vorbis")) { + System.out.println("found"); + usingVorbis = true; + } else { + System.out.println("not supported"); + alExit(); + System.exit(-1); + } + } + + int lastError; + + //create 1 buffer and 1 source + IntBuffer buffers = BufferUtils.createIntBuffer(1); + IntBuffer sources = BufferUtils.createIntBuffer(1); + + // al generate buffers and sources + buffers.position(0).limit(1); + AL10.alGenBuffers(buffers); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + sources.position(0).limit(1); + AL10.alGenSources(sources); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + //load wave data + ByteBuffer filebuffer = getData(args[0]); + if(filebuffer == null) { + System.out.println("Error loading file: " + args[0]); + System.exit(-1); + } + + System.out.println("loaded " + filebuffer.capacity()); + + //ALUTLoadWAVData file = alut.loadWAVMemory(Sys.getDirectBufferAddress(filebuffer)); + if(usingVorbis) { + // pass directly to buffer data + AL10.alBufferData(buffers.get(0), AL10.AL_FORMAT_VORBIS_EXT, filebuffer, -1); + filebuffer.clear(); + } else { + // load wave data from buffer + WaveData wavefile = WaveData.create(filebuffer.array()); + + //copy to buffers + AL10.alBufferData(buffers.get(0), wavefile.format, wavefile.data, wavefile.samplerate); + + //unload file again + wavefile.dispose(); + } + + // check for errors + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + + //set up source input + AL10.alSourcei(sources.get(0), AL10.AL_BUFFER, buffers.get(0)); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + //lets loop the sound + AL10.alSourcei(sources.get(0), AL10.AL_LOOPING, AL10.AL_TRUE); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + //play source 0 + AL10.alSourcePlay(sources.get(0)); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + //wait 5 secs + try { + System.out.println("Waiting 5 seconds for sound to complete"); + Thread.sleep(5000); + } catch (InterruptedException inte) { + } + + //stop source 0 + AL10.alSourceStop(sources.get(0)); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + //delete buffers and sources + sources.position(0).limit(1); + AL10.alDeleteSources(sources); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + buffers.position(0).limit(1); + AL10.alDeleteBuffers(buffers); + if((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + exit(lastError); + } + + //no errorchecking from now on, since our context is gone. + alExit(); + } + + /** + * Reads the file into a ByteBuffer + * + * @param filename Name of file to load + * @return ByteBuffer containing file data + */ + protected ByteBuffer getData(String filename) { + ByteBuffer buffer = null; + + System.out.println("Attempting to load: " + filename); + + try { + BufferedInputStream bis = new BufferedInputStream(WaveData.class.getClassLoader().getResourceAsStream(filename)); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + + int bufferLength = 4096; + byte[] readBuffer = new byte[bufferLength]; + int read = -1; + + while((read = bis.read(readBuffer, 0, bufferLength)) != -1) { + baos.write(readBuffer, 0, read); + } + + //done reading, close + bis.close(); + + // if ogg vorbis data, we need to pass it unmodified to alBufferData + if(usingVorbis) { + buffer = ByteBuffer.allocateDirect(baos.size()); + } else { + buffer = ByteBuffer.allocate(baos.size()); + } + buffer.order(ByteOrder.nativeOrder()); + buffer.put(baos.toByteArray()); + buffer.rewind(); + } catch (Exception ioe) { + ioe.printStackTrace(); + } + return buffer; + } + + /** + * main entry point + * + * @param args String array containing arguments + */ + public static void main(String[] args) { + PlayTestMemory playTestMemory = new PlayTestMemory(); + playTestMemory.execute(args); + System.exit(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/PositionTest.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/PositionTest.java new file mode 100644 index 0000000..5487b19 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/PositionTest.java @@ -0,0 +1,553 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.openal; + +import java.nio.FloatBuffer; +import java.nio.IntBuffer; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLUtil; +import org.lwjgl.input.Keyboard; +import org.lwjgl.input.Mouse; +import org.lwjgl.openal.AL; +import org.lwjgl.opengl.Display; +import org.lwjgl.util.WaveData; + +import static org.lwjgl.openal.AL10.*; +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.util.glu.GLU.*; + +/** + *
+ * This test demonstrates OpenAL positioning Based on the example by Chad Armstrong + * (http://www.edenwaith.com/products/pige/tutorials/openal.php) + * + * @author Brian Matzon + * @version $Revision$ + * $Id$ + */ +public class PositionTest extends BasicTest { + + /** *Small* glut implementation :) */ + private GLUT glut; + + /** Width of window */ + public static final int WINDOW_WIDTH = 640; + + /** Height of window */ + public static final int WINDOW_HEIGHT = 480; + + /** LEFT enumeration */ + public static final int LEFT = 0; + + /** CENTER enumeration */ + public static final int CENTER = 1; + + /** RIGHT enumeration */ + public static final int RIGHT = 2; + + /** Whether the demo is done */ + private boolean finished; + + /** Whether in pause mode */ + private boolean pauseMode; + + // OpenAL stuff + // =================================================== + + /** OpenAL buffers */ + private IntBuffer soundBuffers = BufferUtils.createIntBuffer(3); + + /** OpenAL sources */ + private IntBuffer soundSources = BufferUtils.createIntBuffer(3); + + /** Position of listener */ + private FloatBuffer listenerPosition = createFloatBuffer(new float[] { 0.0f, 0.0f, 0.0f }); + + /** Velocity of listener */ + private FloatBuffer listenerVelocity = createFloatBuffer(new float[] { 0.0f, 0.0f, 0.0f }); + + /** Orientation of listener */ + private FloatBuffer listenerOrientation = + createFloatBuffer(new float[] { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f }); + + /** Position of left sound */ + private FloatBuffer leftPosition = createFloatBuffer(new float[] { -2.0f, 0.0f, 0.0f }); + + /** Velocity of left sound */ + private FloatBuffer leftVelocity = createFloatBuffer(new float[] { 0.0f, 0.0f, 0.0f }); + + /** Position of center sound */ + private FloatBuffer centerPosition = createFloatBuffer(new float[] { 0.0f, 0.0f, -4.0f }); + + /** Velocity of center sound */ + private FloatBuffer centerVelocity = createFloatBuffer(new float[] { 0.0f, 0.0f, 0.0f }); + + /** Position of right sound */ + private FloatBuffer rightPosition = createFloatBuffer(new float[] { 2.0f, 0.0f, 0.0f }); + + /** Velocity of right sound */ + private FloatBuffer rightVelocity = createFloatBuffer(new float[] { 0.0f, 0.0f, 0.0f }); + // --------------------------------------------------- + + /** + * Runs the actual test, using supplied arguments + */ + protected void execute(String[] args) { + // Setup needed stuff + try { + setup(); + } catch (Exception e) { + System.out.println("Error setting up demonstration: "); + e.printStackTrace(); + System.exit(-1); + } + + // run the actual demonstration + run(); + + // shutdown + shutdown(); + } + + /** + * Performs setup of demonstration + */ + private void setup() throws Exception { + + // Setup Window + // ===================================================== + LWJGLUtil.log("Setting up window"); + + // calc center + int centerX = (Display.getDisplayMode().getWidth() - WINDOW_WIDTH) / 2; + int centerY = (Display.getDisplayMode().getHeight() - WINDOW_HEIGHT) / 2; + + // setup window + setDisplayMode(); + Display.create(); + // ----------------------------------------------------- + + // Setup OpenGL + // ===================================================== + LWJGLUtil.log("Setting up OpenGL"); + + glViewport(0, 0, WINDOW_WIDTH, WINDOW_HEIGHT); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluPerspective(50.0f, (float) WINDOW_WIDTH / WINDOW_HEIGHT, 0.0f, 50.0f); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glTranslatef(0.0f, 0.0f, -6.6f); + glClearColor(0.0f, 0.0f, 0.0f, 1.0f); + glut = this.new GLUT(); + + Display.setVSyncEnabled(true); + // ----------------------------------------------------- + + // Setup OpenAL + // ===================================================== + LWJGLUtil.log("Setting up OpenAL"); + + alListener(AL_POSITION, listenerPosition); + alListener(AL_VELOCITY, listenerVelocity); + alListener(AL_ORIENTATION, listenerOrientation); + + // creating buffers + LWJGLUtil.log("Creating buffers"); + alGenBuffers(soundBuffers); + soundBuffers.rewind(); + + // creating sources + alGenSources(soundSources); + soundSources.rewind(); + + // load sound files (left, center, right).wav + LWJGLUtil.log("Loading soundfiles..."); + + LWJGLUtil.log("Loading left.wav"); + WaveData left = WaveData.create("left.wav"); + alBufferData(soundBuffers.get(LEFT), left.format, left.data, left.samplerate); + alSourcef(soundSources.get(LEFT), AL_PITCH, 1.0f); + alSourcef(soundSources.get(LEFT), AL_GAIN, 1.0f); + alSource(soundSources.get(LEFT), AL_POSITION, leftPosition); + alSource(soundSources.get(LEFT), AL_VELOCITY, leftVelocity); + alSourcei(soundSources.get(LEFT), AL_BUFFER, soundBuffers.get(LEFT)); + alSourcei(soundSources.get(LEFT), AL_LOOPING, AL_TRUE); + + LWJGLUtil.log("Loading center.wav"); + WaveData center = WaveData.create("center.wav"); + alBufferData(soundBuffers.get(CENTER), center.format, center.data, center.samplerate); + alSourcef(soundSources.get(CENTER), AL_PITCH, 1.0f); + alSourcef(soundSources.get(CENTER), AL_GAIN, 1.0f); + alSource(soundSources.get(CENTER), AL_POSITION, centerPosition); + alSource(soundSources.get(CENTER), AL_VELOCITY, centerVelocity); + alSourcei(soundSources.get(CENTER), AL_BUFFER, soundBuffers.get(CENTER)); + alSourcei(soundSources.get(CENTER), AL_LOOPING, AL_TRUE); + + LWJGLUtil.log("Loading right.wav"); + WaveData right = WaveData.create("right.wav"); + alBufferData(soundBuffers.get(RIGHT), right.format, right.data, right.samplerate); + alSourcef(soundSources.get(RIGHT), AL_PITCH, 1.0f); + alSourcef(soundSources.get(RIGHT), AL_GAIN, 1.0f); + alSource(soundSources.get(RIGHT), AL_POSITION, rightPosition); + alSource(soundSources.get(RIGHT), AL_VELOCITY, rightVelocity); + alSourcei(soundSources.get(RIGHT), AL_BUFFER, soundBuffers.get(RIGHT)); + alSourcei(soundSources.get(RIGHT), AL_LOOPING, AL_TRUE); + + LWJGLUtil.log("Soundfiles loaded successfully"); + // ----------------------------------------------------- + + Mouse.setGrabbed(true); + } + + /** + * Runs the actual demonstration + */ + private void run() { + boolean firstRun = true; + + System.out.println("Press 1/4 (left), 2/5 (center) or 3/6 (right) to toggle sound"); + System.out.println("Press LEFT/RIGHT to move along x axis"); + System.out.println("Press SHIFT and either UP/DOWN to move along y axis"); + System.out.println("Press UP/DOWN to move along z axis"); + System.out.println("Move along the x and y axis with the mouse"); + System.out.println("Press LEFT or RIGHT mouse button to move along z axis"); + System.out.println("Press ESC to exit demo"); + + LWJGLUtil.log( + "Listener position: " + + listenerPosition.get(0) + + ", " + + listenerPosition.get(1) + + ", " + + listenerPosition.get(2)); + LWJGLUtil.log("Left position: " + leftPosition.get(0) + ", " + leftPosition.get(1) + ", " + leftPosition.get(2)); + LWJGLUtil.log("Center position: " + centerPosition.get(0) + ", " + centerPosition.get(1) + ", " + centerPosition.get(2)); + LWJGLUtil.log("Right position: " + rightPosition.get(0) + ", " + rightPosition.get(1) + ", " + rightPosition.get(2)); + + while (!finished) { + // handle any input + handleInput(); + + // allow window to process internal messages + Display.update(); + + // render and paint if !minimized and not dirty + if(Display.isVisible()) { + render(); + } else { + // sleeeeeep + pause(100); + } + + // act on pause mode + paused(!(Display.isVisible() || Display.isActive())); + + // start sound after first paint, since we don't want + // the delay before something is painted on the screen + if (firstRun && !pauseMode) { + firstRun = false; + + // start sounds with delays + startSounds(); + } + } + } + + /** + * Starts playing the sounds at different times + */ + private void startSounds() { + alSourcePlay(soundSources.get(LEFT)); + pause(300); + alSourcePlay(soundSources.get(CENTER)); + pause(500); + alSourcePlay(soundSources.get(RIGHT)); + } + + /** + * Handles any changes in pause mode + * + * @param paused Which pause mode to enter + */ + private void paused(boolean paused) { + // if requesting pause, and not paused - pause and stop sound + if(paused && !pauseMode) { + pauseMode = true; + alSourcePause(soundSources); + System.out.println("pauseMode = true"); + } + + // else go out of pause mode and start sounds + else if(!paused && pauseMode) { + pauseMode = false; + startSounds(); + System.out.println("pauseMode = false"); + } + } + + /** + * Handles any input + */ + private void handleInput() { + // User wants to exit? + finished = Display.isCloseRequested() || Keyboard.isKeyDown(Keyboard.KEY_ESCAPE); + if (finished) { + return; + } + + boolean shift = Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT); + + // Test for play + // ============================================ + if (Keyboard.isKeyDown(Keyboard.KEY_1)) { + alSourcePlay(soundSources.get(LEFT)); + LWJGLUtil.log("Playing left.wav"); + } + + if (Keyboard.isKeyDown(Keyboard.KEY_2)) { + alSourcePlay(soundSources.get(CENTER)); + LWJGLUtil.log("Playing center.wav"); + } + + if (Keyboard.isKeyDown(Keyboard.KEY_3)) { + alSourcePlay(soundSources.get(RIGHT)); + LWJGLUtil.log("Playing right.wav"); + } + // -------------------------------------------- + + // Test for stop + // ============================================ + if (Keyboard.isKeyDown(Keyboard.KEY_4)) { + alSourceStop(soundSources.get(LEFT)); + LWJGLUtil.log("Stopped left.wav"); + } + + if (Keyboard.isKeyDown(Keyboard.KEY_5)) { + alSourceStop(soundSources.get(CENTER)); + LWJGLUtil.log("Stopped center.wav"); + } + + if (Keyboard.isKeyDown(Keyboard.KEY_6)) { + alSourceStop(soundSources.get(RIGHT)); + LWJGLUtil.log("Stopped right.wav"); + } + // -------------------------------------------- + + // Test for movement with keyboard + // ============================================ + if (Keyboard.isKeyDown(Keyboard.KEY_LEFT)) { + listenerPosition.put(0, listenerPosition.get(0) - 0.1f); + alListener(AL_POSITION, listenerPosition); + } + + if (Keyboard.isKeyDown(Keyboard.KEY_RIGHT)) { + listenerPosition.put(0, listenerPosition.get(0) + 0.1f); + alListener(AL_POSITION, listenerPosition); + } + + if (Keyboard.isKeyDown(Keyboard.KEY_UP)) { + if (shift) { + listenerPosition.put(1, listenerPosition.get(1) + 0.1f); + } else { + listenerPosition.put(2, listenerPosition.get(2) - 0.1f); + } + alListener(AL_POSITION, listenerPosition); + } + + if (Keyboard.isKeyDown(Keyboard.KEY_DOWN)) { + if (shift) { + listenerPosition.put(1, listenerPosition.get(1) - 0.1f); + } else { + listenerPosition.put(2, listenerPosition.get(2) + 0.1f); + } + alListener(AL_POSITION, listenerPosition); + } + // -------------------------------------------- + + // Test for movement with Mouse + // ============================================ + listenerPosition.put(0, listenerPosition.get(0) + (0.01f * Mouse.getDX())); + listenerPosition.put(1, listenerPosition.get(1) + (0.01f * Mouse.getDY())); + if (Mouse.isButtonDown(0)) { + listenerPosition.put(2, listenerPosition.get(2) - 0.1f); + } + if (Mouse.isButtonDown(1)) { + listenerPosition.put(2, listenerPosition.get(2) + 0.1f); + } + + alListener(AL_POSITION, listenerPosition); + + // empty mouse buffer + while(Mouse.next()); + } + + /** + * Render the scene + */ + private void render() { + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glPushMatrix(); + { + glRotatef(20.0f, 1.0f, 1.0f, 0.0f); + + // left + glPushMatrix(); + { + glTranslatef(leftPosition.get(0), leftPosition.get(1), leftPosition.get(2)); + glColor3f(1.0f, 0.0f, 0.0f); + glut.glutWireCube(0.5f); + } + glPopMatrix(); + + // center + glPushMatrix(); + { + glTranslatef(centerPosition.get(0), centerPosition.get(1), centerPosition.get(2)); + glColor3f(0.0f, 0.0f, 1.0f); + glut.glutWireCube(0.5f); + } + glPopMatrix(); + + // right + glPushMatrix(); + { + glTranslatef(rightPosition.get(0), rightPosition.get(1), rightPosition.get(2)); + glColor3f(0.0f, 1.0f, 0.0f); + glut.glutWireCube(0.5f); + } + glPopMatrix(); + + // listener + glPushMatrix(); + { + glTranslatef(listenerPosition.get(0), listenerPosition.get(1), listenerPosition.get(2)); + glColor3f(1.0f, 1.0f, 1.0f); + glut.glutSolidCube(0.5f); + } + glPopMatrix(); + } + glPopMatrix(); + } + + /** + * Shutdown of demonstration + */ + private void shutdown() { + LWJGLUtil.log("Shutting down OpenAL"); + alSourceStop(soundSources); + alDeleteSources(soundSources); + alDeleteBuffers(soundBuffers); + AL.destroy(); + + LWJGLUtil.log("Shutting down Window"); + Display.destroy(); + } + + /** + * main entry point + * + * @param args + * String array containing arguments + */ + public static void main(String[] args) { + PositionTest positionTest = new PositionTest(); + positionTest.execute(args); + System.exit(0); + } + + /** + * Minute implementation of GLUT:
COPYRIGHT: + * + * The OpenGL Utility Toolkit distribution for Win32 (Windows NT & Windows + * 95) contains source code modified from the original source code for GLUT + * version 3.3 which was developed by Mark J. Kilgard. The original source + * code for GLUT is Copyright 1997 by Mark J. Kilgard. GLUT for Win32 is + * Copyright 1997 by Nate Robins and is not in the public domain, but it is + * freely distributable without licensing fees. It is provided without + * guarantee or warrantee expressed or implied. It was ported with the + * permission of Mark J. Kilgard by Nate Robins. + * + * THIS SOURCE CODE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER + * EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OR MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + */ + class GLUT { + + float n[][] = new float[][] { { -1.0f, 0.0f, 0.0f }, { + 0.0f, 1.0f, 0.0f }, { + 1.0f, 0.0f, 0.0f }, { + 0.0f, -1.0f, 0.0f }, { + 0.0f, 0.0f, 1.0f }, { + 0.0f, 0.0f, -1.0f } + }; + + int faces[][] = new int[][] { { 0, 1, 2, 3 }, { + 3, 2, 6, 7 }, { + 7, 6, 5, 4 }, { + 4, 5, 1, 0 }, { + 5, 6, 2, 1 }, { + 7, 4, 0, 3 } + }; + float v[][] = new float[8][3]; + + public void glutWireCube(float size) { + drawBox(size, GL_LINE_LOOP); + } + + public void glutSolidCube(float size) { + drawBox(size, GL_QUADS); + } + + private void drawBox(float size, int type) { + + v[0][0] = v[1][0] = v[2][0] = v[3][0] = -size / 2; + v[4][0] = v[5][0] = v[6][0] = v[7][0] = size / 2; + v[0][1] = v[1][1] = v[4][1] = v[5][1] = -size / 2; + v[2][1] = v[3][1] = v[6][1] = v[7][1] = size / 2; + v[0][2] = v[3][2] = v[4][2] = v[7][2] = -size / 2; + v[1][2] = v[2][2] = v[5][2] = v[6][2] = size / 2; + + for (int i = 5; i >= 0; i--) { + glBegin(type); + glNormal3f(n[i][0], n[i][1], n[i][2]); + glVertex3f(v[faces[i][0]][0], v[faces[i][0]][1], v[faces[i][0]][2]); + glVertex3f(v[faces[i][1]][0], v[faces[i][1]][1], v[faces[i][1]][2]); + glVertex3f(v[faces[i][2]][0], v[faces[i][2]][1], v[faces[i][2]][2]); + glVertex3f(v[faces[i][3]][0], v[faces[i][3]][1], v[faces[i][3]][2]); + glEnd(); + } + + } + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/SourceLimitTest.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/SourceLimitTest.java new file mode 100644 index 0000000..d25a4e7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/SourceLimitTest.java @@ -0,0 +1,165 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.openal; + +import java.nio.IntBuffer; + +import org.lwjgl.BufferUtils; +import org.lwjgl.openal.AL10; +import org.lwjgl.openal.OpenALException; + +/** + * + * Simple test for testing the number of available sources + * + * @author Brian Matzon + * @version $Revision$ + * $Id$ + */ +public class SourceLimitTest extends BasicTest { + + /** Sources to create */ + protected int sourcesToCreate = 64; + + /** + * Creates an instance of SourceLimitTest + */ + public SourceLimitTest() { + super(); + } + + /** + * Runs the actual test, using supplied arguments + */ + protected void execute(String[] args) { + //parse 1st arg to sourcecount + if (args.length > 0) { + try { + sourcesToCreate = Integer.parseInt(args[0]); + } catch (NumberFormatException nfe) { + System.out.println( + "Unable to parse parameter to integer. Defaulting to 64 sources."); + } + } + + System.out.print("Creating " + sourcesToCreate + " in one go..."); + try { + CreateAllSources(); + } catch(OpenALException oale) { + oale.printStackTrace(); + } + + + System.out.print("Creating " + sourcesToCreate + " one at a time..."); + try { + CreateSourcesStep(); + } catch(Exception e) { + e.printStackTrace(); + } + //shutdown + alExit(); + } + + /** + * Tests the creation of n sources in on go + */ + protected void CreateAllSources() { + int lastError; + + //make bytbuffer that can hold sourcesToCreate sources + IntBuffer sources = BufferUtils.createIntBuffer(sourcesToCreate); + + //Create sourcesToCreate sources in one fell swoop + try { + sources.position(0).limit(sourcesToCreate); + AL10.alGenSources(sources); + + //delete sources + sources.position(0).limit(sourcesToCreate); + AL10.alDeleteSources(sources); + + System.out.println("created " + sourcesToCreate + " sources successfully!"); + } catch (OpenALException oale) { + System.out.println("Unable to create " + sourcesToCreate + " sources"); + } + } + + /** + * Tests if n sources can be created one at a time + */ + protected void CreateSourcesStep() { + int lastError; + int sourcesCreated = 0; + + //make bytbuffer that can hold sourcesToCreate sources + IntBuffer[] sources = new IntBuffer[sourcesToCreate]; + + //create the sources + try { + for (int i = 0; i < sourcesToCreate; i++) { + sources[i] = BufferUtils.createIntBuffer(1); + sources[i].position(0).limit(1); + AL10.alGenSources(sources[i]); + if ((lastError = AL10.alGetError()) != AL10.AL_NO_ERROR) { + break; + } + sourcesCreated++; + } + } catch (OpenALException oale) { + System.out.println("failed to create source: " + (sourcesCreated + 1)); + } + + //delete allocated sources + for (int i = 0; i < sourcesCreated; i++) { + //delete buffers and sources + sources[i].position(0).limit(1); + AL10.alDeleteSources(sources[i]); + } + + if(sourcesCreated != sourcesToCreate) { + System.out.println("created " + sourcesCreated + " sources before failing"); + } else { + System.out.println("created " + sourcesCreated + " sources successfully!"); + } + } + + /** + * main entry point + * + * @param args String array containing arguments + */ + public static void main(String[] args) { + SourceLimitTest sourceLimitTest = new SourceLimitTest(); + sourceLimitTest.execute(args); + System.exit(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/StressTest.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/StressTest.java new file mode 100644 index 0000000..c9eec15 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/openal/StressTest.java @@ -0,0 +1,223 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.openal; + +import java.nio.IntBuffer; + +import org.lwjgl.BufferUtils; +import org.lwjgl.openal.AL10; +import org.lwjgl.util.WaveData; + +/** + * + * Simple test for stresstesting OpenAL playing random samples ad nausea + * + * @author Brian Matzon + * @version $Revision$ + * $Id$ + */ +public class StressTest extends BasicTest { + + /** Buffer containing sources */ + private IntBuffer sources; + + /** Buffer containing buffers */ + private IntBuffer buffers; + + /** + * Creates an instance of StressTest + */ + public StressTest() { + super(); + } + + /** + * Runs the actual test, using supplied arguments + */ + protected void execute(String[] args) { + + createSources(); + + createBuffers(); + + try { + loadSamples(); + runTest(); + } catch (Exception e) { + e.printStackTrace(); + } + + + alExit(); + } + + private void createSources() { + sources = BufferUtils.createIntBuffer(4); + sources.position(0).limit(4); + AL10.alGenSources(sources); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { + System.out.println("Unable to create 4 sources"); + alExit(); + } + } + + private void createBuffers() { + buffers = BufferUtils.createIntBuffer(10); + buffers.position(0).limit(10); + AL10.alGenBuffers(buffers); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { + System.out.println("Unable to create 10 buffers"); + sources.position(0).limit(4); + AL10.alDeleteSources(sources); + alExit(); + } + } + + private void loadSamples() throws Exception { + AL10.alGetError(); + WaveData data = WaveData.create("ding.wav"); + for (int i = 1; i <= 10; i++) { + AL10.alBufferData( + buffers.get(i - 1), + data.format, + data.data, + data.samplerate); + + if (AL10.alGetError() != AL10.AL_NO_ERROR) { + System.out.println("Failed to load " + i + ".wav into buffer"); + sources.position(0).limit(4); + AL10.alDeleteSources(sources); + buffers.position(0).limit(10); + AL10.alDeleteBuffers(buffers); + + alExit(); + } + } + data.dispose(); + } + + public void runTest() { + int iterations = 0; + int randomBuffer; + int startSlot = 1; + int nextSlot = startSlot; + long startTime = System.currentTimeMillis(); + + //mark background source as looping + AL10.alSourcei(sources.get(0), AL10.AL_LOOPING, AL10.AL_TRUE); + + //play background + AL10.alSourcei(sources.get(0), AL10.AL_BUFFER, buffers.get(0)); + AL10.alSourcePlay(sources.get(0)); + + while (System.currentTimeMillis() - startTime < (2000)) { + + randomBuffer = getRandomBuffer(); + System.out.println("random:" + randomBuffer); + + //stop source at slot + AL10.alSourceStop(sources.get(nextSlot)); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { + System.out.println("Error stopping source."); + } + System.out.println("Stopped source: " + nextSlot); + + //link source<->buffer + AL10.alSourcei(sources.get(nextSlot), AL10.AL_BUFFER, buffers.get(randomBuffer)); + if (AL10.alGetError() != AL10.AL_NO_ERROR) { + System.out.println("Error linking buffer and source."); + } + System.out.println("linked source " + nextSlot + " with buffer " + randomBuffer); + + //start playing + System.out.println("playing source " + nextSlot); + AL10.alSourcePlay(sources.get(nextSlot++)); + if (nextSlot == 4) { + nextSlot = startSlot; + } + + //pause + try { + Thread.sleep(500); + } catch (InterruptedException inte) { + } + + //debug info + if ((++iterations % 10) == 0) { + System.out.println("========================"); + System.out.println("MaxMemory: " + Runtime.getRuntime().maxMemory() / 1024); + System.out.println("FreeMemory: " + Runtime.getRuntime().freeMemory() / 1024); + System.out.println("TotalMemory: " + Runtime.getRuntime().totalMemory() / 1024); + System.out.println("========================"); + } + } + + //stop all sources + for (int i = 0; i < 4; i++) { + AL10.alSourceStop(sources.get(i)); + System.out.println("Stopping source " + (i+1)); + } + + //test done - ask for user input + try { + System.out.println("Test completed"); + System.out.println("========================"); + System.out.println("MaxMemory: " + Runtime.getRuntime().maxMemory() / 1024); + System.out.println("FreeMemory: " + Runtime.getRuntime().freeMemory() / 1024); + System.out.println("TotalMemory: " + Runtime.getRuntime().totalMemory() / 1024); + System.out.println("========================"); + System.out.println("Push any key to exit..."); + System.in.read(); + } catch (Exception e) { + } + + sources.position(0).limit(4); + AL10.alDeleteSources(sources); + buffers.position(0).limit(10); + AL10.alDeleteBuffers(buffers); + } + + private int getRandomBuffer() { + return (int) (Math.random() * 10.0); + } + + /** + * main entry point + * + * @param args String array containing arguments + */ + public static void main(String[] args) { + StressTest stressTest = new StressTest(); + stressTest.execute(args); + System.exit(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opencl/HelloOpenCL.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opencl/HelloOpenCL.java new file mode 100644 index 0000000..e3c36fd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opencl/HelloOpenCL.java @@ -0,0 +1,229 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.opencl; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; +import org.lwjgl.PointerBuffer; +import org.lwjgl.opencl.*; +import org.lwjgl.opencl.api.CLBufferRegion; + +import java.nio.ByteBuffer; +import java.util.List; + +import static org.lwjgl.opencl.CL10.*; +import static org.lwjgl.opencl.CL11.*; + +/** Basic OpenCL test. */ +public class HelloOpenCL { + + public HelloOpenCL() { + } + + protected static void execute() { + try { + CL.create(); + + final List platforms = CLPlatform.getPlatforms(); + if ( platforms == null ) + throw new RuntimeException("No OpenCL platforms found."); + + for ( CLPlatform platform : platforms ) { + System.out.println("\n-------------------------"); + System.out.println("NEW PLATFORM: " + platform.getPointer()); + System.out.println(CLCapabilities.getPlatformCapabilities(platform)); + System.out.println("-------------------------"); + printPlatformInfo(platform, "CL_PLATFORM_PROFILE", CL_PLATFORM_PROFILE); + printPlatformInfo(platform, "CL_PLATFORM_VERSION", CL_PLATFORM_VERSION); + printPlatformInfo(platform, "CL_PLATFORM_NAME", CL_PLATFORM_NAME); + printPlatformInfo(platform, "CL_PLATFORM_VENDOR", CL_PLATFORM_VENDOR); + printPlatformInfo(platform, "CL_PLATFORM_EXTENSIONS", CL_PLATFORM_EXTENSIONS); + System.out.println(""); + + final PointerBuffer ctxProps = BufferUtils.createPointerBuffer(3); + ctxProps.put(CL_CONTEXT_PLATFORM).put(platform.getPointer()).put(0).flip(); + + final List devices = platform.getDevices(CL_DEVICE_TYPE_ALL); + for ( CLDevice device : devices ) { + final CLDeviceCapabilities caps = CLCapabilities.getDeviceCapabilities(device); + + System.out.println("\n\tNEW DEVICE: " + device.getPointer()); + System.out.println(caps); + System.out.println("\t-------------------------"); + + System.out.println("\tCL_DEVICE_TYPE = " + device.getInfoLong(CL_DEVICE_TYPE)); + System.out.println("\tCL_DEVICE_VENDOR_ID = " + device.getInfoInt(CL_DEVICE_VENDOR_ID)); + System.out.println("\tCL_DEVICE_MAX_COMPUTE_UNITS = " + device.getInfoInt(CL_DEVICE_MAX_COMPUTE_UNITS)); + System.out.println("\tCL_DEVICE_MAX_WORK_ITEM_DIMENSIONS = " + device.getInfoInt(CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS)); + //CL10.clGetDeviceInfo(device, CL10.CL_DEVICE_MAX_WORK_ITEM_SIZES, info, size_ret); + //System.out.println("\tCL_DEVICE_MAX_WORK_ITEM_SIZES = " + info.getInt(0)); + System.out.println("\tCL_DEVICE_MAX_WORK_GROUP_SIZE = " + device.getInfoSize(CL_DEVICE_MAX_WORK_GROUP_SIZE)); + System.out.println("\tCL_DEVICE_MAX_CLOCK_FREQUENCY = " + device.getInfoInt(CL_DEVICE_MAX_CLOCK_FREQUENCY)); + System.out.println("\tCL_DEVICE_ADDRESS_BITS = " + device.getInfoInt(CL_DEVICE_ADDRESS_BITS)); + System.out.println("\tCL_DEVICE_AVAILABLE = " + device.getInfoBoolean(CL_DEVICE_AVAILABLE)); + System.out.println("\tCL_DEVICE_COMPILER_AVAILABLE = " + device.getInfoBoolean(CL_DEVICE_COMPILER_AVAILABLE)); + + printDeviceInfo(device, "CL_DEVICE_NAME", CL_DEVICE_NAME); + printDeviceInfo(device, "CL_DEVICE_VENDOR", CL_DEVICE_VENDOR); + printDeviceInfo(device, "CL_DRIVER_VERSION", CL_DRIVER_VERSION); + printDeviceInfo(device, "CL_DEVICE_PROFILE", CL_DEVICE_PROFILE); + printDeviceInfo(device, "CL_DEVICE_VERSION", CL_DEVICE_VERSION); + printDeviceInfo(device, "CL_DEVICE_EXTENSIONS", CL_DEVICE_EXTENSIONS); + if ( caps.OpenCL11 ) + printDeviceInfo(device, "CL_DEVICE_OPENCL_C_VERSION", CL_DEVICE_OPENCL_C_VERSION); + + CLContext context = clCreateContext(ctxProps, device, new CLContextCallback() { + protected void handleMessage(final String errinfo, final ByteBuffer private_info) { + System.out.println("IN CLContextCallback :: " + errinfo); + } + }, null); + + CLMem buffer = clCreateBuffer(context, CL_MEM_READ_ONLY, 128, null); + + if ( caps.OpenCL11 ) { + clSetMemObjectDestructorCallback(buffer, new CLMemObjectDestructorCallback() { + protected void handleMessage(final long memobj) { + System.out.println("FIRST Buffer destructed: " + memobj); + } + }); + + clSetMemObjectDestructorCallback(buffer, new CLMemObjectDestructorCallback() { + protected void handleMessage(final long memobj) { + System.out.println("SECOND Buffer destructed: " + memobj); + } + }); + } + + if ( caps.OpenCL11 ) { + CLMem subbuffer = buffer.createSubBuffer(CL_MEM_READ_ONLY, CL_BUFFER_CREATE_TYPE_REGION, new CLBufferRegion(0, 64), null); + + clSetMemObjectDestructorCallback(subbuffer, new CLMemObjectDestructorCallback() { + protected void handleMessage(final long memobj) { + System.out.println("Sub Buffer destructed: " + memobj); + } + }); + } + + clRetainMemObject(buffer); + + if ( LWJGLUtil.getPlatform() != LWJGLUtil.PLATFORM_MACOSX ) { + // TODO: Native kernels crash on MacOSX, disable this until we can debug properly. + final long exec_caps = device.getInfoLong(CL_DEVICE_EXECUTION_CAPABILITIES); + if ( (exec_caps & CL_EXEC_NATIVE_KERNEL) == CL_EXEC_NATIVE_KERNEL ) { + System.out.println("-TRYING TO EXEC NATIVE KERNEL-"); + final CLCommandQueue queue = clCreateCommandQueue(context, device, 0, null); + + final PointerBuffer ev = BufferUtils.createPointerBuffer(1); + + clEnqueueNativeKernel(queue, new CLNativeKernel() { + protected void execute(final ByteBuffer[] memobjs) { + System.out.println("\tmemobjs.length = " + memobjs.length); + for ( int k = 0; k < memobjs.length; k++ ) { + System.out.println("\tmemobjs[" + k + "].remaining() = " + memobjs[k].remaining()); + for ( int l = memobjs[k].position(); l < memobjs[k].limit(); l++ ) { + memobjs[k].put(l, (byte)l); + } + } + System.out.println("\tNative kernel done."); + } + }, new CLMem[] { buffer }, new long[] { 128 }, null, ev); + + final CLEvent e = queue.getCLEvent(ev.get(0)); + + clSetEventCallback(e, CL_COMPLETE, new CLEventCallback() { + protected void handleMessage(final CLEvent event, final int event_command_exec_status) { + System.out.println("\t\tEvent callback status: " + getEventStatusName(event_command_exec_status)); + } + }); + + int status = e.getInfoInt(CL_EVENT_COMMAND_EXECUTION_STATUS); + System.out.println("NATIVE KERNEL STATUS: " + getEventStatusName(status)); + clFlush(queue); + do { + int newStatus = e.getInfoInt(CL_EVENT_COMMAND_EXECUTION_STATUS); + if ( newStatus != status ) { + status = newStatus; + System.out.println("NATIVE KERNEL STATUS: " + getEventStatusName(status)); + } + } while ( status != CL_SUCCESS ); // Busy-spin until we're done + + clReleaseEvent(e); + } + } + + clReleaseMemObject(buffer); + clReleaseContext(context); + } + } + } catch (LWJGLException le) { + die("Init", le.getMessage()); + } + + CL.destroy(); + } + + private static void printPlatformInfo(final CLPlatform platform, final String param_name, final int param) { + System.out.println("\t" + param_name + " = " + platform.getInfoString(param)); + } + + private static void printDeviceInfo(final CLDevice device, final String param_name, final int param) { + System.out.println("\t" + param_name + " = " + device.getInfoString(param)); + } + + private static String getEventStatusName(final int status) { + switch ( status ) { + case CL_QUEUED: + return "CL_QUEUED"; + case CL_SUBMITTED: + return "CL_SUBMITTED"; + case CL_RUNNING: + return "CL_RUNNING"; + default: + return "CL_COMPLETE"; + } + } + + private static void die(String kind, String description) { + System.out.println(kind + " error " + description + " occured"); + } + + /** + * main entry point + * + * @param args String array containing arguments + */ + public static void main(String[] args) { + new HelloOpenCL().execute(); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opencl/gl/DemoFractal.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opencl/gl/DemoFractal.java new file mode 100644 index 0000000..30b04f6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opencl/gl/DemoFractal.java @@ -0,0 +1,896 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.opencl.gl; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.PointerBuffer; +import org.lwjgl.input.Keyboard; +import org.lwjgl.input.Mouse; +import org.lwjgl.opencl.*; +import org.lwjgl.opencl.api.Filter; +import org.lwjgl.opengl.*; +import org.lwjgl.util.Color; +import org.lwjgl.util.ReadableColor; + +import java.io.*; +import java.net.URL; +import java.nio.ByteBuffer; +import java.nio.IntBuffer; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import static java.lang.Math.*; +import static org.lwjgl.opencl.CL10.*; +import static org.lwjgl.opencl.CL10GL.*; +import static org.lwjgl.opencl.KHRGLEvent.*; +import static org.lwjgl.opengl.AMDDebugOutput.*; +import static org.lwjgl.opengl.ARBCLEvent.*; +import static org.lwjgl.opengl.ARBDebugOutput.*; +import static org.lwjgl.opengl.ARBSync.*; +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.opengl.GL15.*; +import static org.lwjgl.opengl.GL20.*; +import static org.lwjgl.opengl.GL21.*; + +/* + THIS DEMO USES CODE PORTED FROM JogAmp.org + Original code: http://github.com/mbien/jocl-demos + Original author: Michael Bien + + ___ ___ ___ + / /\ / /\ ___ / /\ http://jocl.jogamp.org/ + / /:/ / /::\ /__/\ / /::\ a http://jogamp.org/ project. + /__/::\ / /:/\:\ \ \:\ / /:/\:\ + \__\/\:\ / /:/~/::\ \ \:\ / /:/~/::\ + \ \:\ /__/:/ /:/\:\ ___ \__\:\/__/:/ /:/\:\ + \__\:\\ \:\/:/__\//__/\ | |:|\ \:\/:/__\/ + / /:/ \ \::/ \ \:\| |:| \ \::/ + /__/:/ \ \:\ \ \:\__|:| \ \:\ + \__\/ \ \:\ \__\::::/ \ \:\ + \__\/ ~~~~ \__\/ + ___ ___ ___ ___ ___ + / /\ / /\ / /\ /__/\ / /\ + / /::\ / /::\ / /:/_ \ \:\ / /:/ + / /:/\:\ / /:/\:\ / /:/ /\ \ \:\ / /:/ ___ ___ + / /:/ \:\ / /:/~/:// /:/ /:/_ _____\__\:\ / /:/ ___ /__/\ / /\ + /__/:/ \__\:\/__/:/ /://__/:/ /:/ /\/__/::::::::\/__/:/ / /\\ \:\ / /:/ + \ \:\ / /:/\ \:\/:/ \ \:\/:/ /:/\ \:\~~\~~\/\ \:\ / /:/ \ \:\ /:/ + \ \:\ /:/ \ \::/ \ \::/ /:/ \ \:\ ~~~ \ \:\ /:/ \ \:\/:/ + \ \:\/:/ \ \:\ \ \:\/:/ \ \:\ \ \:\/:/ \ \::/ + \ \::/ \ \:\ \ \::/ \ \:\ \ \::/ \__\/ + \__\/ \__\/ \__\/ \__\/ \__\/ + + _____ ___ ___ ___ ___ + / /::\ / /\ /__/\ / /\ / /\ + / /:/\:\ / /:/_ | |::\ / /::\ / /:/_ + / /:/ \:\ / /:/ /\ | |:|:\ / /:/\:\ / /:/ /\ + /__/:/ \__\:| / /:/ /:/_ __|__|:|\:\ / /:/ \:\ / /:/ /::\ + \ \:\ / /:/ /__/:/ /:/ /\ /__/::::| \:\ /__/:/ \__\:\ /__/:/ /:/\:\ + \ \:\ /:/ \ \:\/:/ /:/ \ \:\~~\__\/ \ \:\ / /:/ \ \:\/:/~/:/ + \ \:\/:/ \ \::/ /:/ \ \:\ \ \:\ /:/ \ \::/ /:/ + \ \::/ \ \:\/:/ \ \:\ \ \:\/:/ \__\/ /:/ + \__\/ \ \::/ \ \:\ \ \::/ /__/:/ + \__\/ \__\/ \__\/ \__\/ +*/ + +/** + * Computes the Mandelbrot set with OpenCL using multiple GPUs and renders the result with OpenGL. + * A shared PBO is used as storage for the fractal image.
+ * http://en.wikipedia.org/wiki/Mandelbrot_set + *

+ * controls:
+ * keys 1-9 control parallelism level
+ * space enables/disables slice seperator
+ * 'd' toggles between 32/64bit floatingpoint precision
+ * mouse/mousewheel to drag and zoom
+ * 'Home' to reset the viewport
+ *

+ * + * @author Michael Bien, Spasi + */ +public class DemoFractal { + + // max number of used GPUs + private static final int MAX_PARALLELISM_LEVEL = 8; + + private static final int COLOR_MAP_SIZE = 32 * 2 * 4; + + private Set params; + + private CLContext clContext; + private CLCommandQueue[] queues; + private CLKernel[] kernels; + private CLProgram[] programs; + + private CLMem[] glBuffers; + private IntBuffer glIDs; + + private boolean useTextures; + + // Texture rendering + private int dlist; + private int vsh; + private int fsh; + private int program; + + private CLMem[] colorMap; + + private final PointerBuffer kernel2DGlobalWorkSize; + + // max per pixel iterations to compute the fractal + private int maxIterations = 500; + + private int width = 512; + private int height = 512; + + private double minX = -2f; + private double minY = -1.2f; + private double maxX = 0.6f; + private double maxY = 1.3f; + + private boolean dragging; + private double dragX; + private double dragY; + private double dragMinX; + private double dragMinY; + private double dragMaxX; + private double dragMaxY; + + private int mouseX; + private int mouseY; + + private int slices; + + private boolean drawSeparator; + private boolean doublePrecision = true; + private boolean buffersInitialized; + private boolean rebuild; + + private boolean run = true; + + // EVENT SYNCING + + private final PointerBuffer syncBuffer = BufferUtils.createPointerBuffer(1); + + private boolean syncGLtoCL; // true if we can make GL wait on events generated from CL queues. + private CLEvent[] clEvents; + private GLSync[] clSyncs; + + private boolean syncCLtoGL; // true if we can make CL wait on sync objects generated from GL. + private GLSync glSync; + private CLEvent glEvent; + + public DemoFractal(final String[] args) { + params = new HashSet(); + + for ( int i = 0; i < args.length; i++ ) { + final String arg = args[i]; + + if ( arg.charAt(0) != '-' && arg.charAt(0) != '/' ) + throw new IllegalArgumentException("Invalid command-line argument: " + args[i]); + + final String param = arg.substring(1); + + if ( "forcePBO".equalsIgnoreCase(param) ) + params.add("forcePBO"); + else if ( "forceCPU".equalsIgnoreCase(param) ) + params.add("forceCPU"); + else if ( "debugGL".equalsIgnoreCase(param) ) + params.add("debugGL"); + else if ( "iterations".equalsIgnoreCase(param) ) { + if ( args.length < i + 1 + 1 ) + throw new IllegalArgumentException("Invalid iterations argument specified."); + + try { + this.maxIterations = Integer.parseInt(args[++i]); + } catch (NumberFormatException e) { + throw new IllegalArgumentException("Invalid number of iterations specified."); + } + } else if ( "res".equalsIgnoreCase(param) ) { + if ( args.length < i + 2 + 1 ) + throw new IllegalArgumentException("Invalid res argument specified."); + + try { + this.width = Integer.parseInt(args[++i]); + this.height = Integer.parseInt(args[++i]); + + if ( width < 1 || height < 1 ) + throw new IllegalArgumentException("Invalid res dimensions specified."); + } catch (NumberFormatException e) { + throw new IllegalArgumentException("Invalid res dimensions specified."); + } + } + } + + kernel2DGlobalWorkSize = BufferUtils.createPointerBuffer(2); + } + + public static void main(String args[]) { + DemoFractal demo = new DemoFractal(args); + demo.init(); + demo.run(); + } + + public void init() { + try { + CL.create(); + Display.setDisplayMode(new DisplayMode(width, height)); + Display.setTitle("OpenCL Fractal Demo"); + Display.setSwapInterval(0); + Display.create(new PixelFormat(), new ContextAttribs().withDebug(params.contains("debugGL"))); + } catch (LWJGLException e) { + throw new RuntimeException(e); + } + + try { + initCL(Display.getDrawable()); + } catch (Exception e) { + if ( clContext != null ) + clReleaseContext(clContext); + Display.destroy(); + throw new RuntimeException(e); + } + + glDisable(GL_DEPTH_TEST); + glClearColor(0.0f, 0.0f, 0.0f, 1.0f); + + initView(Display.getDisplayMode().getWidth(), Display.getDisplayMode().getHeight()); + + initGLObjects(); + glFinish(); + + setKernelConstants(); + } + + private void initCL(Drawable drawable) throws Exception { + // Find a platform + List platforms = CLPlatform.getPlatforms(); + if ( platforms == null ) + throw new RuntimeException("No OpenCL platforms found."); + + final CLPlatform platform = platforms.get(0); // just grab the first one + + // Find devices with GL sharing support + final Filter glSharingFilter = new Filter() { + public boolean accept(final CLDevice device) { + final CLDeviceCapabilities caps = CLCapabilities.getDeviceCapabilities(device); + return caps.CL_KHR_gl_sharing; + } + }; + int device_type = params.contains("forceCPU") ? CL_DEVICE_TYPE_CPU : CL_DEVICE_TYPE_GPU; + List devices = platform.getDevices(device_type, glSharingFilter); + if ( devices == null ) { + device_type = CL_DEVICE_TYPE_CPU; + devices = platform.getDevices(device_type, glSharingFilter); + if ( devices == null ) + throw new RuntimeException("No OpenCL devices found with KHR_gl_sharing support."); + } + + // Create the context + clContext = CLContext.create(platform, devices, new CLContextCallback() { + protected void handleMessage(final String errinfo, final ByteBuffer private_info) { + System.out.println("[CONTEXT MESSAGE] " + errinfo); + } + }, drawable, null); + + slices = min(devices.size(), MAX_PARALLELISM_LEVEL); + + // create command queues for every GPU, setup colormap and init kernels + queues = new CLCommandQueue[slices]; + kernels = new CLKernel[slices]; + colorMap = new CLMem[slices]; + + for ( int i = 0; i < slices; i++ ) { + colorMap[i] = clCreateBuffer(clContext, CL_MEM_READ_ONLY, COLOR_MAP_SIZE, null); + colorMap[i].checkValid(); + + // create command queue and upload color map buffer on each used device + queues[i] = clCreateCommandQueue(clContext, devices.get(i), CL_QUEUE_PROFILING_ENABLE, null); + queues[i].checkValid(); + + final ByteBuffer colorMapBuffer = clEnqueueMapBuffer(queues[i], colorMap[i], CL_TRUE, CL_MAP_WRITE, 0, COLOR_MAP_SIZE, null, null, null); + initColorMap(colorMapBuffer.asIntBuffer(), 32, Color.BLUE, Color.GREEN, Color.RED); + clEnqueueUnmapMemObject(queues[i], colorMap[i], colorMapBuffer, null, null); + } + + // check if we have 64bit FP support on all devices + // if yes we can use only one program for all devices + one kernel per device. + // if not we will have to create (at least) one program for 32 and one for 64bit devices. + // since there are different vendor extensions for double FP we use one program per device. + // (OpenCL spec is not very clear about this usecases) + boolean all64bit = true; + for ( CLDevice device : devices ) { + if ( !isDoubleFPAvailable(device) ) { + all64bit = false; + break; + } + } + + // load program(s) + programs = new CLProgram[all64bit ? 1 : slices]; + + final ContextCapabilities caps = GLContext.getCapabilities(); + + if ( !caps.OpenGL20 ) + throw new RuntimeException("OpenGL 2.0 is required to run this demo."); + else if ( device_type == CL_DEVICE_TYPE_CPU && !caps.OpenGL21 ) + throw new RuntimeException("OpenGL 2.1 is required to run this demo."); + + if ( params.contains("debugGL") ) { + if ( caps.GL_ARB_debug_output ) + glDebugMessageCallbackARB(new ARBDebugOutputCallback()); + else if ( caps.GL_AMD_debug_output ) + glDebugMessageCallbackAMD(new AMDDebugOutputCallback()); + } + + if ( device_type == CL_DEVICE_TYPE_GPU ) + System.out.println("OpenCL Device Type: GPU (Use -forceCPU to use CPU)"); + else + System.out.println("OpenCL Device Type: CPU"); + for ( int i = 0; i < devices.size(); i++ ) + System.out.println("OpenCL Device #" + (i + 1) + " supports KHR_gl_event = " + CLCapabilities.getDeviceCapabilities(devices.get(i)).CL_KHR_gl_event); + + System.out.println("\nMax Iterations: " + maxIterations + " (Use -iterations to change)"); + System.out.println("Display resolution: " + width + "x" + height + " (Use -res to change)"); + + System.out.println("\nOpenGL caps.GL_ARB_sync = " + caps.GL_ARB_sync); + System.out.println("OpenGL caps.GL_ARB_cl_event = " + caps.GL_ARB_cl_event); + + // Use PBO if we're on a CPU implementation + useTextures = device_type == CL_DEVICE_TYPE_GPU && (!caps.OpenGL21 || !params.contains("forcePBO")); + if ( useTextures ) { + System.out.println("\nCL/GL Sharing method: TEXTURES (use -forcePBO to use PBO + DrawPixels)"); + System.out.println("Rendering method: Shader on a fullscreen quad"); + } else { + System.out.println("\nCL/GL Sharing method: PIXEL BUFFER OBJECTS"); + System.out.println("Rendering method: DrawPixels"); + } + + buildPrograms(); + + // Detect GLtoCL synchronization method + syncGLtoCL = caps.GL_ARB_cl_event; // GL3.2 or ARB_sync implied + if ( syncGLtoCL ) { + clEvents = new CLEvent[slices]; + clSyncs = new GLSync[slices]; + System.out.println("\nGL to CL sync: Using OpenCL events"); + } else + System.out.println("\nGL to CL sync: Using clFinish"); + + // Detect CLtoGL synchronization method + syncCLtoGL = caps.OpenGL32 || caps.GL_ARB_sync; + if ( syncCLtoGL ) { + for ( CLDevice device : devices ) { + if ( !CLCapabilities.getDeviceCapabilities(device).CL_KHR_gl_event ) { + syncCLtoGL = false; + break; + } + } + } + if ( syncCLtoGL ) { + System.out.println("CL to GL sync: Using OpenGL sync objects"); + } else + System.out.println("CL to GL sync: Using glFinish"); + + if ( useTextures ) { + dlist = glGenLists(1); + + glNewList(dlist, GL_COMPILE); + glBegin(GL_QUADS); + { + glTexCoord2f(0.0f, 0.0f); + glVertex2f(0, 0); + + glTexCoord2f(0.0f, 1.0f); + glVertex2i(0, height); + + glTexCoord2f(1.0f, 1.0f); + glVertex2f(width, height); + + glTexCoord2f(1.0f, 0.0f); + glVertex2f(width, 0); + } + glEnd(); + glEndList(); + + vsh = glCreateShader(GL_VERTEX_SHADER); + glShaderSource(vsh, "varying vec2 texCoord;\n" + + "\n" + + "void main(void) {\n" + + "\tgl_Position = ftransform();\n" + + "\ttexCoord = gl_MultiTexCoord0.xy;\n" + + "}"); + glCompileShader(vsh); + + fsh = glCreateShader(GL_FRAGMENT_SHADER); + glShaderSource(fsh, "uniform sampler2D mandelbrot;\n" + + "\n" + + "varying vec2 texCoord;\n" + + "\n" + + "void main(void) {\n" + + "\tgl_FragColor = texture2D(mandelbrot, texCoord);" + + "}"); + glCompileShader(fsh); + + program = glCreateProgram(); + glAttachShader(program, vsh); + glAttachShader(program, fsh); + glLinkProgram(program); + + glUseProgram(program); + glUniform1i(glGetUniformLocation(program, "mandelbrot"), 0); + } + + System.out.println(""); + } + + private void buildPrograms() { + /* + * workaround: The driver keeps using the old binaries for some reason. + * to solve this we simple create a new program and release the old. + * however rebuilding programs should be possible -> remove when drivers are fixed. + * (again: the spec is not very clear about this kind of usages) + */ + if ( programs[0] != null ) { + for ( CLProgram program : programs ) + clReleaseProgram(program); + } + + try { + createPrograms(); + } catch (IOException e) { + throw new RuntimeException(e); + } + + // disable 64bit floating point math if not available + for ( int i = 0; i < programs.length; i++ ) { + final CLDevice device = queues[i].getCLDevice(); + + final StringBuilder options = new StringBuilder(useTextures ? "-D USE_TEXTURE" : ""); + final CLDeviceCapabilities caps = CLCapabilities.getDeviceCapabilities(device); + if ( doublePrecision && isDoubleFPAvailable(device) ) { + //cl_khr_fp64 + options.append(" -D DOUBLE_FP"); + + //amd's verson of double precision floating point math + if ( !caps.CL_KHR_fp64 && caps.CL_AMD_fp64 ) + options.append(" -D AMD_FP"); + } + + System.out.println("\nOpenCL COMPILER OPTIONS: " + options); + + try { + clBuildProgram(programs[i], device, options, null); + } finally { + System.out.println("BUILD LOG: " + programs[i].getBuildInfoString(device, CL_PROGRAM_BUILD_LOG)); + } + } + + rebuild = false; + + // init kernel with constants + for ( int i = 0; i < kernels.length; i++ ) + kernels[i] = clCreateKernel(programs[min(i, programs.length)], "mandelbrot", null); + } + + private void initGLObjects() { + if ( glBuffers == null ) { + glBuffers = new CLMem[slices]; + glIDs = BufferUtils.createIntBuffer(slices); + } else { + for ( CLMem mem : glBuffers ) + clReleaseMemObject(mem); + + if ( useTextures ) + glDeleteTextures(glIDs); + else + glDeleteBuffers(glIDs); + } + + if ( useTextures ) { + glGenTextures(glIDs); + + // Init textures + for ( int i = 0; i < slices; i++ ) { + glBindTexture(GL_TEXTURE_2D, glIDs.get(i)); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width / slices, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (ByteBuffer)null); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + + glBuffers[i] = clCreateFromGLTexture2D(clContext, CL_MEM_WRITE_ONLY, GL_TEXTURE_2D, 0, glIDs.get(i), null); + } + glBindTexture(GL_TEXTURE_2D, 0); + } else { + glGenBuffers(glIDs); + + // setup one empty PBO per slice + for ( int i = 0; i < slices; i++ ) { + glBindBuffer(GL_PIXEL_UNPACK_BUFFER, glIDs.get(i)); + glBufferData(GL_PIXEL_UNPACK_BUFFER, width * height * 4 / slices, GL_STREAM_DRAW); + + glBuffers[i] = clCreateFromGLBuffer(clContext, CL_MEM_WRITE_ONLY, glIDs.get(i), null); + } + glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0); + } + + buffersInitialized = true; + } + + // init kernels with constants + + private void setKernelConstants() { + for ( int i = 0; i < slices; i++ ) { + kernels[i] + .setArg(6, glBuffers[i]) + .setArg(7, colorMap[i]) + .setArg(8, COLOR_MAP_SIZE) + .setArg(9, maxIterations); + } + } + + // rendering cycle + + private void run() { + long startTime = System.currentTimeMillis() + 5000; + long fps = 0; + + while ( run ) { + if ( !Display.isVisible() ) + Thread.yield(); + + handleIO(); + display(); + + Display.update(); + if ( Display.isCloseRequested() ) + break; + + if ( startTime > System.currentTimeMillis() ) { + fps++; + } else { + long timeUsed = 5000 + (startTime - System.currentTimeMillis()); + startTime = System.currentTimeMillis() + 5000; + System.out.println(fps + " frames in 5 seconds = " + (fps / (timeUsed / 1000f))); + fps = 0; + } + } + + clReleaseContext(clContext); + + if ( useTextures ) { + glDeleteProgram(program); + glDeleteShader(fsh); + glDeleteShader(vsh); + + glDeleteLists(dlist, 1); + } + + CL.destroy(); + Display.destroy(); + } + + public void display() { + // TODO: Need to clean-up events, test when ARB_cl_events & KHR_gl_event are implemented. + + // make sure GL does not use our objects before we start computing + if ( syncCLtoGL && glEvent != null ) { + for ( final CLCommandQueue queue : queues ) + clEnqueueWaitForEvents(queue, glEvent); + } else + glFinish(); + + if ( !buffersInitialized ) { + initGLObjects(); + setKernelConstants(); + } + + if ( rebuild ) { + buildPrograms(); + setKernelConstants(); + } + compute(doublePrecision); + + render(); + } + + // OpenCL + + private void compute(final boolean is64bit) { + int sliceWidth = (int)(width / (float)slices); + double rangeX = (maxX - minX) / slices; + double rangeY = (maxY - minY); + + kernel2DGlobalWorkSize.put(0, sliceWidth).put(1, height); + + // start computation + for ( int i = 0; i < slices; i++ ) { + kernels[i].setArg(0, sliceWidth).setArg(1, height); + if ( !is64bit || !isDoubleFPAvailable(queues[i].getCLDevice()) ) { + kernels[i] + .setArg(2, (float)(minX + rangeX * i)).setArg(3, (float)minY) + .setArg(4, (float)rangeX).setArg(5, (float)rangeY); + } else { + kernels[i] + .setArg(2, minX + rangeX * i).setArg(3, minY) + .setArg(4, rangeX).setArg(5, rangeY); + } + + // acquire GL objects, and enqueue a kernel with a probe from the list + clEnqueueAcquireGLObjects(queues[i], glBuffers[i], null, null); + + clEnqueueNDRangeKernel(queues[i], kernels[i], 2, + null, + kernel2DGlobalWorkSize, + null, + null, null); + + clEnqueueReleaseGLObjects(queues[i], glBuffers[i], null, syncGLtoCL ? syncBuffer : null); + if ( syncGLtoCL ) { + clEvents[i] = queues[i].getCLEvent(syncBuffer.get(0)); + clSyncs[i] = glCreateSyncFromCLeventARB(queues[i].getParent(), clEvents[i], 0); + } + } + + // block until done (important: finish before doing further gl work) + if ( !syncGLtoCL ) { + for ( int i = 0; i < slices; i++ ) + clFinish(queues[i]); + } + } + + // OpenGL + + private void render() { + glClear(GL_COLOR_BUFFER_BIT); + + if ( syncGLtoCL ) { + for ( int i = 0; i < slices; i++ ) + glWaitSync(clSyncs[i], 0, 0); + } + + //draw slices + int sliceWidth = width / slices; + + if ( useTextures ) { + for ( int i = 0; i < slices; i++ ) { + int seperatorOffset = drawSeparator ? i : 0; + + glBindTexture(GL_TEXTURE_2D, glIDs.get(i)); + glCallList(dlist); + } + } else { + for ( int i = 0; i < slices; i++ ) { + int seperatorOffset = drawSeparator ? i : 0; + + glBindBuffer(GL_PIXEL_UNPACK_BUFFER, glIDs.get(i)); + glRasterPos2i(sliceWidth * i + seperatorOffset, 0); + + glDrawPixels(sliceWidth, height, GL_RGBA, GL_UNSIGNED_BYTE, 0); + } + glBindBuffer(GL_PIXEL_UNPACK_BUFFER, 0); + } + + if ( syncCLtoGL ) { + glSync = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); + glEvent = clCreateEventFromGLsyncKHR(clContext, glSync, null); + } + + //draw info text + /* + textRenderer.beginRendering(width, height, false); + + textRenderer.draw("device/time/precision", 10, height - 15); + + for ( int i = 0; i < slices; i++ ) { + CLDevice device = queues[i].getDevice(); + boolean doubleFP = doublePrecision && isDoubleFPAvailable(device); + CLEvent event = probes.getEvent(i); + long start = event.getProfilingInfo(START); + long end = event.getProfilingInfo(END); + textRenderer.draw(device.getType().toString() + i + " " + + (int)((end - start) / 1000000.0f) + "ms @" + + (doubleFP ? "64bit" : "32bit"), 10, height - (20 + 16 * (slices - i))); + } + + textRenderer.endRendering(); + */ + } + + private void handleIO() { + if ( Keyboard.getNumKeyboardEvents() != 0 ) { + while ( Keyboard.next() ) { + if ( Keyboard.getEventKeyState() ) + continue; + + final int key = Keyboard.getEventKey(); + + if ( Keyboard.KEY_1 <= key && key <= Keyboard.KEY_8 ) { + int number = key - Keyboard.KEY_1 + 1; + slices = min(number, min(queues.length, MAX_PARALLELISM_LEVEL)); + System.out.println("NEW PARALLELISM LEVEL: " + slices); + buffersInitialized = false; + } else { + switch ( Keyboard.getEventKey() ) { + case Keyboard.KEY_SPACE: + drawSeparator = !drawSeparator; + System.out.println("SEPARATOR DRAWING IS NOW: " + (drawSeparator ? "ON" : "OFF")); + break; + case Keyboard.KEY_D: + doublePrecision = !doublePrecision; + System.out.println("DOUBLE PRECISION IS NOW: " + (doublePrecision ? "ON" : "OFF")); + rebuild = true; + break; + case Keyboard.KEY_HOME: + minX = -2f; + minY = -1.2f; + maxX = 0.6f; + maxY = 1.3f; + break; + case Keyboard.KEY_ESCAPE: + run = false; + break; + } + } + } + } + + while ( Mouse.next() ) { + final int eventBtn = Mouse.getEventButton(); + + final int x = Mouse.getX(); + final int y = Mouse.getY(); + + if ( Mouse.isButtonDown(0) && (x != mouseX || y != mouseY) ) { + if ( !dragging ) { + dragging = true; + + dragX = mouseX; + dragY = mouseY; + + dragMinX = minX; + dragMinY = minY; + dragMaxX = maxX; + dragMaxY = maxY; + } + + double offsetX = (x - dragX) * (maxX - minX) / width; + double offsetY = (y - dragY) * (maxY - minY) / height; + + minX = dragMinX - offsetX; + minY = dragMinY - offsetY; + + maxX = dragMaxX - offsetX; + maxY = dragMaxY - offsetY; + } else { + if ( dragging ) + dragging = false; + + if ( eventBtn == -1 ) { + final int dwheel = Mouse.getEventDWheel(); + if ( dwheel != 0 ) { + double scaleFactor = Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) || Keyboard.isKeyDown(Keyboard.KEY_RCONTROL) ? 0.25 : 0.05; + double scale = dwheel > 0 ? scaleFactor : -scaleFactor; + + double deltaX = scale * (maxX - minX); + double deltaY = scale * (maxY - minY); + + // offset for "zoom to cursor" + double offsetX = (x / (double)width - 0.5) * deltaX * 2.0; + double offsetY = (y / (double)height - 0.5) * deltaY * 2.0; + + minX += deltaX + offsetX; + minY += deltaY - offsetY; + + maxX += -deltaX + offsetX; + maxY += -deltaY - offsetY; + } + } + } + + mouseX = x; + mouseY = y; + } + } + + private static boolean isDoubleFPAvailable(CLDevice device) { + final CLDeviceCapabilities caps = CLCapabilities.getDeviceCapabilities(device); + return caps.CL_KHR_fp64 || caps.CL_AMD_fp64; + } + + private void createPrograms() throws IOException { + final String source = getProgramSource("org/lwjgl/test/opencl/gl/Mandelbrot.cl"); + for ( int i = 0; i < programs.length; i++ ) + programs[i] = clCreateProgramWithSource(clContext, source, null); + } + + private String getProgramSource(final String file) throws IOException { + InputStream source = null; + URL sourceURL = Thread.currentThread().getContextClassLoader().getResource(file); + if(sourceURL != null) { + source = sourceURL.openStream(); + } + if ( source == null ) // dev-mode + source = new FileInputStream("src/java/" + file); + final BufferedReader reader = new BufferedReader(new InputStreamReader(source)); + + final StringBuilder sb = new StringBuilder(); + String line; + try { + while ( (line = reader.readLine()) != null ) + sb.append(line).append("\n"); + } finally { + source.close(); + } + + return sb.toString(); + } + + private static void initColorMap(IntBuffer colorMap, int stepSize, ReadableColor... colors) { + for ( int n = 0; n < colors.length - 1; n++ ) { + ReadableColor color = colors[n]; + int r0 = color.getRed(); + int g0 = color.getGreen(); + int b0 = color.getBlue(); + + color = colors[n + 1]; + int r1 = color.getRed(); + int g1 = color.getGreen(); + int b1 = color.getBlue(); + + int deltaR = r1 - r0; + int deltaG = g1 - g0; + int deltaB = b1 - b0; + + for ( int step = 0; step < stepSize; step++ ) { + float alpha = (float)step / (stepSize - 1); + int r = (int)(r0 + alpha * deltaR); + int g = (int)(g0 + alpha * deltaG); + int b = (int)(b0 + alpha * deltaB); + colorMap.put((r << 0) | (g << 8) | (b << 16)); + } + } + } + + private static void initView(int width, int height) { + glViewport(0, 0, width, height); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(0.0, width, 0.0, height, 0.0, 1.0); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opencl/gl/Mandelbrot.cl b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opencl/gl/Mandelbrot.cl new file mode 100644 index 0000000..8d05d61 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opencl/gl/Mandelbrot.cl @@ -0,0 +1,83 @@ +#ifdef DOUBLE_FP + #ifdef AMD_FP + #pragma OPENCL EXTENSION cl_amd_fp64 : enable + #else + #ifndef CL_VERSION_1_2 + #pragma OPENCL EXTENSION cl_khr_fp64 : enable + #endif + #endif + #define varfloat double + #define _255 255.0 +#else + #define varfloat float + #define _255 255.0f +#endif + +#ifdef USE_TEXTURE + #define OUTPUT_TYPE __write_only image2d_t +#else + #define OUTPUT_TYPE global uint * +#endif + +/** + * For a description of this algorithm please refer to + * http://en.wikipedia.org/wiki/Mandelbrot_set + * @author Michael Bien + */ +kernel void mandelbrot( + const int width, const int height, + const varfloat x0, const varfloat y0, + const varfloat rangeX, const varfloat rangeY, + OUTPUT_TYPE output, global uint *colorMap, + const int colorMapSize, const int maxIterations +) { + unsigned int ix = get_global_id(0); + unsigned int iy = get_global_id(1); + + varfloat r = x0 + ix * rangeX / width; + varfloat i = y0 + iy * rangeY / height; + + varfloat x = 0; + varfloat y = 0; + + varfloat magnitudeSquared = 0; + int iteration = 0; + + while ( magnitudeSquared < 4 && iteration < maxIterations ) { + varfloat x2 = x*x; + varfloat y2 = y*y; + y = 2 * x * y + i; + x = x2 - y2 + r; + magnitudeSquared = x2+y2; + iteration++; + } + + if ( iteration == maxIterations ) { + #ifdef USE_TEXTURE + write_imagef(output, (int2)(ix, iy), (float4)0); + #else + output[iy * width + ix] = 0; + #endif + } else { + float alpha = (float)iteration / maxIterations; + int colorIndex = (int)(alpha * colorMapSize); + #ifdef USE_TEXTURE + // We could have changed colorMap to a texture + sampler, but the + // unpacking below has minimal overhead and it's kinda interesting. + // We could also use an R32UI texture and do the unpacking in GLSL, + // but then we'd require OpenGL 3.0 (GLSL 1.30). + uint c = colorMap[colorIndex]; + float4 oc = (float4)( + (c & 0xFF) >> 0, + (c & 0xFF00) >> 8, + (c & 0xFF0000) >> 16, + 255.0f + ); + write_imagef(output, (int2)(ix, iy), oc / 255.0f); + #else + output[iy * width + ix] = colorMap[colorIndex]; + #endif + // monochrom + //output[iy * width + ix] = 255*iteration/maxIterations; + } +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/FullScreenWindowedTest.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/FullScreenWindowedTest.java new file mode 100644 index 0000000..f2d2547 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/FullScreenWindowedTest.java @@ -0,0 +1,283 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.opengl; + +import org.lwjgl.LWJGLException; +import org.lwjgl.input.Keyboard; +import org.lwjgl.input.Mouse; +import org.lwjgl.opengl.Display; +import org.lwjgl.opengl.DisplayMode; +import org.lwjgl.util.vector.Vector2f; + +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.util.glu.GLU.*; + +/** + * + * Tests switching between windowed and fullscreen + * + * @author Brian Matzon + * @version $Revision$ + * $Id$ + */ +public class FullScreenWindowedTest { + /** Intended deiplay mode */ + private DisplayMode mode; + /** our quad moving around */ + private Vector2f quadPosition; + /** our quadVelocity */ + private Vector2f quadVelocity; + /** angle of quad */ + private float angle; + /** degrees to rotate per frame */ + private float angleRotation = 1.0f; + /** Max speed of all changable attributes */ + private static final float MAX_SPEED = 20.0f; + + /** + * Creates a FullScreenWindowedTest + */ + public FullScreenWindowedTest() { + } + /** + * Executes the test + */ + public void execute() { + initialize(); + mainLoop(); + cleanup(); + } + + private void switchMode() throws LWJGLException { + mode = findDisplayMode(800, 600, Display.getDisplayMode().getBitsPerPixel()); + Display.setDisplayModeAndFullscreen(mode); + } + + /** + * Initializes the test + */ + private void initialize() { + try { + //find displaymode + switchMode(); + // start of in windowed mode + Display.create(); + glInit(); + quadPosition = new Vector2f(100f, 100f); + quadVelocity = new Vector2f(1.0f, 1.0f); + } catch (Exception e) { + e.printStackTrace(); + } + } + /** + * Runs the main loop of the "test" + */ + private void mainLoop() { + while (!Keyboard.isKeyDown(Keyboard.KEY_ESCAPE) && !Display.isCloseRequested()) { + if (Display.isVisible()) { + // check keyboard input + processKeyboard(); + // do "game" logic, and render it + logic(); + render(); + } else { + // no need to render/paint if nothing has changed (ie. window + // dragged over) + if (Display.isDirty()) { + render(); + } + // don't waste cpu time, sleep more + try { + Thread.sleep(100); + } catch (InterruptedException inte) { + } + } + // Update window + Display.update(); + } + } + /** + * Performs the logic + */ + private void logic() { + angle += angleRotation; + if (angle > 90.0f) { + angle = 0.0f; + } + quadPosition.x += quadVelocity.x; + quadPosition.y += quadVelocity.y; + //check colision with vertical border border + if (quadPosition.x + 50 >= mode.getWidth() || quadPosition.x - 50 <= 0) { + quadVelocity.x *= -1; + } + //check collision with horizontal border + if (quadPosition.y + 50 >= mode.getHeight() || quadPosition.y - 50 <= 0) { + quadVelocity.y *= -1; + } + } + private void render() { + //clear background + glClear(GL_COLOR_BUFFER_BIT); + // draw white quad + glPushMatrix(); + { + glTranslatef(quadPosition.x, quadPosition.y, 0); + glRotatef(angle, 0.0f, 0.0f, 1.0f); + glColor3f(1.0f, 1.0f, 1.0f); + glBegin(GL_QUADS); + { + glVertex2i(-50, -50); + glVertex2i(50, -50); + glVertex2i(50, 50); + glVertex2i(-50, 50); + } + glEnd(); + } + glPopMatrix(); + } + /** + * Processes keyboard input + */ + private void processKeyboard() { + //check for fullscreen key + if (Keyboard.isKeyDown(Keyboard.KEY_F)) { + try { + switchMode(); + } catch (Exception e) { + e.printStackTrace(); + } + } + //check for window key + if (Keyboard.isKeyDown(Keyboard.KEY_W)) { + try { + mode = new DisplayMode(640, 480); + Display.setDisplayModeAndFullscreen(mode); + glInit(); + } catch (Exception e) { + e.printStackTrace(); + } + } + //check for speed changes + if (Keyboard.isKeyDown(Keyboard.KEY_UP)) { + quadVelocity.y += 0.1f; + } + if (Keyboard.isKeyDown(Keyboard.KEY_DOWN)) { + quadVelocity.y -= 0.1f; + } + if (Keyboard.isKeyDown(Keyboard.KEY_RIGHT)) { + quadVelocity.x += 0.1f; + } + if (Keyboard.isKeyDown(Keyboard.KEY_LEFT)) { + quadVelocity.x -= 0.1f; + } + if (Keyboard.isKeyDown(Keyboard.KEY_ADD)) { + angleRotation += 0.1f; + } + if (Keyboard.isKeyDown(Keyboard.KEY_SUBTRACT)) { + angleRotation -= 0.1f; + } + //throttle + if (quadVelocity.x < -MAX_SPEED) { + quadVelocity.x = -MAX_SPEED; + } + if (quadVelocity.x > MAX_SPEED) { + quadVelocity.x = MAX_SPEED; + } + if (quadVelocity.y < -MAX_SPEED) { + quadVelocity.y = -MAX_SPEED; + } + if (quadVelocity.y > MAX_SPEED) { + quadVelocity.y = MAX_SPEED; + } + if (angleRotation < 0.0f) { + angleRotation = 0.0f; + } + if (angleRotation > MAX_SPEED) { + angleRotation = MAX_SPEED; + } + + while ( Mouse.next() ); + } + /** + * Cleans up the test + */ + private void cleanup() { + Display.destroy(); + } + + /** + * Retrieves a displaymode, if one such is available + * + * @param width + * Required width + * @param height + * Required height + * @param bpp + * Minimum required bits per pixel + * @return + */ + private DisplayMode findDisplayMode(int width, int height, int bpp) throws LWJGLException { + DisplayMode[] modes = Display.getAvailableDisplayModes(); + for ( DisplayMode mode : modes ) { + if ( mode.getWidth() == width && mode.getHeight() == height && mode.getBitsPerPixel() >= bpp && mode.getFrequency() <= 60 ) { + return mode; + } + } + return Display.getDesktopDisplayMode(); + } + /** + * Initializes OGL + */ + private void glInit() { + // Go into orthographic projection mode. + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluOrtho2D(0, mode.getWidth(), 0, mode.getHeight()); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glViewport(0, 0, mode.getWidth(), mode.getHeight()); + //set clear color to black + glClearColor(0.0f, 0.0f, 0.0f, 0.0f); + //sync frame (only works on windows) + Display.setVSyncEnabled(true); + } + /** + * Test entry point + */ + public static void main(String[] args) { + System.out.println("Change between fullscreen and windowed mode, by pressing F and W respectively"); + System.out.println("Move quad using arrowkeys, and change rotation using +/-"); + FullScreenWindowedTest fswTest = new FullScreenWindowedTest(); + fswTest.execute(); + System.exit(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/Gears.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/Gears.java new file mode 100644 index 0000000..38b81d1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/Gears.java @@ -0,0 +1,343 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * 3-D gear wheels. Originally by Brian Paul + */ +package org.lwjgl.test.opengl; + +import java.nio.FloatBuffer; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; +import org.lwjgl.Sys; +import org.lwjgl.opengl.Display; +import org.lwjgl.opengl.DisplayMode; +import org.lwjgl.opengl.GLContext; + +import static org.lwjgl.opengl.ARBTransposeMatrix.*; +import static org.lwjgl.opengl.GL11.*; + +/** + *

+ * This is the OpenGL "standard" Gears demo, originally by Brian Paul + *

+ * @author Brian Matzon + * @version $Revision$ + * $Id$ + */ +public class Gears { + + private float view_rotx = 20.0f; + + private float view_roty = 30.0f; + + private float view_rotz; + + private int gear1; + + private int gear2; + + private int gear3; + + private float angle; + + public static void main(String[] args) { + new Gears().execute(); + System.exit(0); + } + + /** + * + */ + private void execute() { + try { + init(); + } catch (LWJGLException le) { + le.printStackTrace(); + System.out.println("Failed to initialize Gears."); + return; + } + + loop(); + + destroy(); + } + + /** + * + */ + private void destroy() { + Display.destroy(); + } + + /** + * + */ + private void loop() { + long startTime = System.currentTimeMillis() + 5000; + long fps = 0; + + while (!Display.isCloseRequested()) { + angle += 2.0f; + + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glPushMatrix(); + glRotatef(view_rotx, 1.0f, 0.0f, 0.0f); + glRotatef(view_roty, 0.0f, 1.0f, 0.0f); + glRotatef(view_rotz, 0.0f, 0.0f, 1.0f); + + glPushMatrix(); + glTranslatef(-3.0f, -2.0f, 0.0f); + glRotatef(angle, 0.0f, 0.0f, 1.0f); + glCallList(gear1); + glPopMatrix(); + + glPushMatrix(); + glTranslatef(3.1f, -2.0f, 0.0f); + glRotatef(-2.0f * angle - 9.0f, 0.0f, 0.0f, 1.0f); + glCallList(gear2); + glPopMatrix(); + + glPushMatrix(); + glTranslatef(-3.1f, 4.2f, 0.0f); + glRotatef(-2.0f * angle - 25.0f, 0.0f, 0.0f, 1.0f); + glCallList(gear3); + glPopMatrix(); + + glPopMatrix(); + + Display.update(); + if (startTime > System.currentTimeMillis()) { + fps++; + } else { + long timeUsed = 5000 + (startTime - System.currentTimeMillis()); + startTime = System.currentTimeMillis() + 5000; + System.out.println(fps + " frames in " + timeUsed / 1000f + " seconds = " + + (fps / (timeUsed / 1000f))); + fps = 0; + } + } + } + + /** + * + */ + private void init() throws LWJGLException { + // create Window of size 300x300 + Display.setLocation((Display.getDisplayMode().getWidth() - 300) / 2, + (Display.getDisplayMode().getHeight() - 300) / 2); + Display.setDisplayMode(new DisplayMode(300, 300)); + Display.setTitle("Gears"); + Display.create(); + + // setup ogl + FloatBuffer pos = BufferUtils.createFloatBuffer(4).put(new float[] { 5.0f, 5.0f, 10.0f, 0.0f}); + FloatBuffer red = BufferUtils.createFloatBuffer(4).put(new float[] { 0.8f, 0.1f, 0.0f, 1.0f}); + FloatBuffer green = BufferUtils.createFloatBuffer(4).put(new float[] { 0.0f, 0.8f, 0.2f, 1.0f}); + FloatBuffer blue = BufferUtils.createFloatBuffer(4).put(new float[] { 0.2f, 0.2f, 1.0f, 1.0f}); + + pos.flip(); + red.flip(); + green.flip(); + blue.flip(); + + glLight(GL_LIGHT0, GL_POSITION, pos); + glEnable(GL_CULL_FACE); + glEnable(GL_LIGHTING); + glEnable(GL_LIGHT0); + glEnable(GL_DEPTH_TEST); + + /* make the gears */ + gear1 = glGenLists(1); + glNewList(gear1, GL_COMPILE); + glMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red); + gear(1.0f, 4.0f, 1.0f, 20, 0.7f); + glEndList(); + + gear2 = glGenLists(1); + glNewList(gear2, GL_COMPILE); + glMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green); + gear(0.5f, 2.0f, 2.0f, 10, 0.7f); + glEndList(); + + gear3 = glGenLists(1); + glNewList(gear3, GL_COMPILE); + glMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue); + gear(1.3f, 2.0f, 0.5f, 10, 0.7f); + glEndList(); + + glEnable(GL_NORMALIZE); + + glMatrixMode(GL_PROJECTION); + + System.err.println("LWJGL: " + Sys.getVersion() + " / " + LWJGLUtil.getPlatformName()); + System.err.println("GL_VENDOR: " + glGetString(GL_VENDOR)); + System.err.println("GL_RENDERER: " + glGetString(GL_RENDERER)); + System.err.println("GL_VERSION: " + glGetString(GL_VERSION)); + System.err.println(); + System.err.println("glLoadTransposeMatrixfARB() supported: " + GLContext.getCapabilities().GL_ARB_transpose_matrix); + if (!GLContext.getCapabilities().GL_ARB_transpose_matrix) { + // --- not using extensions + glLoadIdentity(); + } else { + // --- using extensions + final FloatBuffer identityTranspose = BufferUtils.createFloatBuffer(16).put( + new float[] { 1, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 1}); + identityTranspose.flip(); + glLoadTransposeMatrixARB(identityTranspose); + } + + float h = (float) 300 / (float) 300; + glFrustum(-1.0f, 1.0f, -h, h, 5.0f, 60.0f); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glTranslatef(0.0f, 0.0f, -40.0f); + } + + /** + * Draw a gear wheel. You'll probably want to call this function when + * building a display list since we do a lot of trig here. + * + * @param inner_radius radius of hole at center + * @param outer_radius radius at center of teeth + * @param width width of gear + * @param teeth number of teeth + * @param tooth_depth depth of tooth + */ + private void gear(float inner_radius, float outer_radius, float width, int teeth, float tooth_depth) { + int i; + float r0, r1, r2; + float angle, da; + float u, v, len; + + r0 = inner_radius; + r1 = outer_radius - tooth_depth / 2.0f; + r2 = outer_radius + tooth_depth / 2.0f; + + da = 2.0f * (float) Math.PI / teeth / 4.0f; + + glShadeModel(GL_FLAT); + + glNormal3f(0.0f, 0.0f, 1.0f); + + /* draw front face */ + glBegin(GL_QUAD_STRIP); + for (i = 0; i <= teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), width * 0.5f); + glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), width * 0.5f); + if (i < teeth) { + glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), width * 0.5f); + glVertex3f(r1 * (float) Math.cos(angle + 3.0f * da), r1 * (float) Math.sin(angle + 3.0f * da), + width * 0.5f); + } + } + glEnd(); + + /* draw front sides of teeth */ + glBegin(GL_QUADS); + for (i = 0; i < teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), width * 0.5f); + glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), width * 0.5f); + glVertex3f(r2 * (float) Math.cos(angle + 2.0f * da), r2 * (float) Math.sin(angle + 2.0f * da), width * 0.5f); + glVertex3f(r1 * (float) Math.cos(angle + 3.0f * da), r1 * (float) Math.sin(angle + 3.0f * da), width * 0.5f); + } + glEnd(); + + /* draw back face */ + glBegin(GL_QUAD_STRIP); + for (i = 0; i <= teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), -width * 0.5f); + glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), -width * 0.5f); + glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), -width * 0.5f); + glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), -width * 0.5f); + } + glEnd(); + + /* draw back sides of teeth */ + glBegin(GL_QUADS); + for (i = 0; i < teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), -width * 0.5f); + glVertex3f(r2 * (float) Math.cos(angle + 2 * da), r2 * (float) Math.sin(angle + 2 * da), -width * 0.5f); + glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), -width * 0.5f); + glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), -width * 0.5f); + } + glEnd(); + + /* draw outward faces of teeth */ + glBegin(GL_QUAD_STRIP); + for (i = 0; i < teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), width * 0.5f); + glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), -width * 0.5f); + u = r2 * (float) Math.cos(angle + da) - r1 * (float) Math.cos(angle); + v = r2 * (float) Math.sin(angle + da) - r1 * (float) Math.sin(angle); + len = (float) Math.sqrt(u * u + v * v); + u /= len; + v /= len; + glNormal3f(v, -u, 0.0f); + glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), width * 0.5f); + glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), -width * 0.5f); + glNormal3f((float) Math.cos(angle), (float) Math.sin(angle), 0.0f); + glVertex3f(r2 * (float) Math.cos(angle + 2 * da), r2 * (float) Math.sin(angle + 2 * da), width * 0.5f); + glVertex3f(r2 * (float) Math.cos(angle + 2 * da), r2 * (float) Math.sin(angle + 2 * da), -width * 0.5f); + u = r1 * (float) Math.cos(angle + 3 * da) - r2 * (float) Math.cos(angle + 2 * da); + v = r1 * (float) Math.sin(angle + 3 * da) - r2 * (float) Math.sin(angle + 2 * da); + glNormal3f(v, -u, 0.0f); + glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), width * 0.5f); + glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), -width * 0.5f); + glNormal3f((float) Math.cos(angle), (float) Math.sin(angle), 0.0f); + } + glVertex3f(r1 * (float) Math.cos(0), r1 * (float) Math.sin(0), width * 0.5f); + glVertex3f(r1 * (float) Math.cos(0), r1 * (float) Math.sin(0), -width * 0.5f); + glEnd(); + + glShadeModel(GL_SMOOTH); + + /* draw inside radius cylinder */ + glBegin(GL_QUAD_STRIP); + for (i = 0; i <= teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + glNormal3f(-(float) Math.cos(angle), -(float) Math.sin(angle), 0.0f); + glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), -width * 0.5f); + glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), width * 0.5f); + } + glEnd(); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/PbufferTest.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/PbufferTest.java new file mode 100644 index 0000000..44ebf58 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/PbufferTest.java @@ -0,0 +1,398 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.opengl; + +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.IntBuffer; + +import org.lwjgl.LWJGLException; +import org.lwjgl.input.Keyboard; +import org.lwjgl.opengl.Display; +import org.lwjgl.opengl.DisplayMode; +import org.lwjgl.opengl.Pbuffer; +import org.lwjgl.opengl.PixelFormat; +import org.lwjgl.util.vector.Vector2f; + +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.util.glu.GLU.*; + +/** + * + * Tests Pbuffers + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +public class PbufferTest { + + /** Intended deiplay mode */ + private DisplayMode mode; + + /** our quad moving around */ + private Vector2f quadPosition; + + /** our quadVelocity */ + private Vector2f quadVelocity; + + /** angle of quad */ + private float angle; + + /** degrees to rotate per frame */ + private float angleRotation = 1.0f; + + /** Max speed of all changable attributes */ + private static final float MAX_SPEED = 20.0f; + + /** Pbuffer instance */ + private static Pbuffer pbuffer; + + /** The shared texture */ + private static int tex_handle; + + /** + * Executes the test + */ + public void execute() { + initialize(); + + mainLoop(); + + cleanup(); + } + + /** + * Initializes the test + */ + private void initialize() { + try { + //find displaymode + pbuffer = new Pbuffer(512, 512, new PixelFormat(), null, null); + mode = findDisplayMode(800, 600, 16); + Display.setDisplayMode(mode); + // start of in windowed mode + Display.create(); +// gl = new GLWindow("Test", 50, 50, mode.width, mode.height, mode.bpp, 0, 0, 0); + if ((Pbuffer.getCapabilities() & Pbuffer.PBUFFER_SUPPORTED) == 0) { + System.out.println("No Pbuffer support!"); + System.exit(1); + } + System.out.println("Pbuffer support detected"); + + glInit(); + initPbuffer(); + + Keyboard.create(); + + quadPosition = new Vector2f(100f, 100f); + quadVelocity = new Vector2f(1.0f, 1.0f); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Runs the main loop of the "test" + */ + private void mainLoop() { + while (!Keyboard.isKeyDown(Keyboard.KEY_ESCAPE) && !Display.isCloseRequested()) { + if (Display.isVisible()) { + // check keyboard input + processKeyboard(); + // do "game" logic, and render it + logic(); + render(); + } else { + // no need to render/paint if nothing has changed (ie. window + // dragged over) + if (Display.isDirty()) { + render(); + } + // don't waste cpu time, sleep more + try { + Thread.sleep(100); + } catch (InterruptedException inte) { + } + } + // Update window + Display.update(); + } + } + + /** + * Performs the logic + */ + private void logic() { + angle += angleRotation; + if (angle > 90.0f) { + angle = 0.0f; + } + + quadPosition.x += quadVelocity.x; + quadPosition.y += quadVelocity.y; + + //check colision with vertical border border + if (quadPosition.x + 50 >= mode.getWidth() || quadPosition.x - 50 <= 0) { + quadVelocity.x *= -1; + } + + //check collision with horizontal border + if (quadPosition.y + 50 >= mode.getHeight() || quadPosition.y - 50 <= 0) { + quadVelocity.y *= -1; + } + } + + private void render() { + if (pbuffer.isBufferLost()) { + System.out.println("Buffer contents lost - will recreate the buffer"); + pbuffer.destroy(); + try { + pbuffer = new Pbuffer(512, 512, new PixelFormat(), null, null); + initPbuffer(); + } catch (LWJGLException e) { + e.printStackTrace(); + } + } + try { + pbuffer.makeCurrent(); + } catch (LWJGLException e) { + throw new RuntimeException(e); + } + // Pbuffer rendering + //clear background + glClear(GL_COLOR_BUFFER_BIT); + + // draw white quad + glPushMatrix(); + { + glTranslatef(quadPosition.x, quadPosition.y, 0); + glRotatef(angle, 0.0f, 0.0f, 1.0f); + glColor3f(1.0f, 1.0f, 1.0f); + glBegin(GL_QUADS); + { + glVertex2i(-50, -50); + glVertex2i(50, -50); + glVertex2i(50, 50); + glVertex2i(-50, 50); + } + glEnd(); + } + glPopMatrix(); + glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, 512, 512, 0); + try { + Display.makeCurrent(); + } catch (LWJGLException e) { + throw new RuntimeException(e); + } + + // OpenGL window rendering + glClear(GL_COLOR_BUFFER_BIT); + // draw white quad + glPushMatrix(); + { + glTranslatef(quadPosition.x, quadPosition.y, 0); + glRotatef(angle, 0.0f, 0.0f, 1.0f); + glColor3f(1.0f, 1.0f, 0.0f); + glBegin(GL_QUADS); + { + glTexCoord2f(0f, 0f); + glVertex2i(-50, -50); + glTexCoord2f(1f, 0f); + glVertex2i(50, -50); + glTexCoord2f(1f, 1f); + glVertex2i(50, 50); + glTexCoord2f(0f, 1f); + glVertex2i(-50, 50); + } + glEnd(); + } + glPopMatrix(); + } + + private void initPbuffer() { + try { + pbuffer.makeCurrent(); + initGLState(256, 256, 0.5f); + glBindTexture(GL_TEXTURE_2D, tex_handle); + Display.makeCurrent(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Processes keyboard input + */ + private void processKeyboard() { + Keyboard.poll(); + + //check for fullscreen key + if (Keyboard.isKeyDown(Keyboard.KEY_F)) { + + try { + Display.setDisplayMode(mode); + Display.setFullscreen(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + + //check for window key + if (Keyboard.isKeyDown(Keyboard.KEY_W)) { + try { + Display.setFullscreen(false); + } catch (Exception e) { + e.printStackTrace(); + } + } + + //check for speed changes + if (Keyboard.isKeyDown(Keyboard.KEY_UP)) { + quadVelocity.y += 0.1f; + } + if (Keyboard.isKeyDown(Keyboard.KEY_DOWN)) { + quadVelocity.y -= 0.1f; + } + if (Keyboard.isKeyDown(Keyboard.KEY_RIGHT)) { + quadVelocity.x += 0.1f; + } + if (Keyboard.isKeyDown(Keyboard.KEY_LEFT)) { + quadVelocity.x -= 0.1f; + } + + if (Keyboard.isKeyDown(Keyboard.KEY_ADD)) { + angleRotation += 0.1f; + } + if (Keyboard.isKeyDown(Keyboard.KEY_SUBTRACT)) { + angleRotation -= 0.1f; + } + + //throttle + if (quadVelocity.x < -MAX_SPEED) { + quadVelocity.x = -MAX_SPEED; + } + if (quadVelocity.x > MAX_SPEED) { + quadVelocity.x = MAX_SPEED; + } + if (quadVelocity.y < -MAX_SPEED) { + quadVelocity.y = -MAX_SPEED; + } + if (quadVelocity.y > MAX_SPEED) { + quadVelocity.y = MAX_SPEED; + } + + if (angleRotation < 0.0f) { + angleRotation = 0.0f; + } + if (angleRotation > MAX_SPEED) { + angleRotation = MAX_SPEED; + } + } + + private void destroyTexture() { + IntBuffer buffer = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer(); + buffer.put(0, tex_handle); + glDeleteTextures(buffer); + } + + /** + * Cleans up the test + */ + private void cleanup() { + destroyTexture(); + pbuffer.destroy(); + Display.destroy(); + } + + /** + * Retrieves a displaymode, if one such is available + * + * @param width Required width + * @param height Required height + * @param bpp Minimum required bits per pixel + * @return + */ + private DisplayMode findDisplayMode(int width, int height, int bpp) throws LWJGLException { + DisplayMode[] modes = Display.getAvailableDisplayModes(); + for ( DisplayMode mode : modes ) { + if ( mode.getWidth() == width && mode.getHeight() == height && mode.getBitsPerPixel() >= bpp ) + return mode; + } + return null; + } + + private void initGLState(int width, int height, float color) { + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluOrtho2D(0, mode.getWidth(), 0, mode.getHeight()); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glViewport(0, 0, width, height); + + //set clear color to black + glClearColor(color, color, color, 0.0f); + } + + /** + * Initializes OGL + */ + private void glInit() { + //sync frame (only works on windows) + Display.setVSyncEnabled(true); + + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + glEnable(GL_TEXTURE_2D); + // Create shared texture + IntBuffer buffer = ByteBuffer.allocateDirect(4).order(ByteOrder.nativeOrder()).asIntBuffer(); + glGenTextures(buffer); + tex_handle = buffer.get(0); + glBindTexture(GL_TEXTURE_2D, tex_handle); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + initGLState(mode.getWidth(), mode.getHeight(), 0f); + } + + /** + * Test entry point + */ + public static void main(String[] args) { + System.out.println( + "Change between fullscreen and windowed mode, by pressing F and W respectively"); + System.out.println("Move quad using arrowkeys, and change rotation using +/-"); + PbufferTest fswTest = new PbufferTest(); + fswTest.execute(); + System.exit(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/SyncTest.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/SyncTest.java new file mode 100644 index 0000000..47c9ac1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/SyncTest.java @@ -0,0 +1,180 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.opengl; + +import org.lwjgl.LWJGLException; +import org.lwjgl.Sys; +import org.lwjgl.opengl.*; + +import java.util.Random; + +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.opengl.GL32.*; + +/** @author spasi */ +public final class SyncTest { + + private SyncTest() { + } + + public static void main(String[] args) { + runTest(args); + cleanup(); + System.exit(0); + } + + private static void runTest(String[] args) { + if ( args.length < 2 ) + argsError("Insufficient number of arguments."); + + int clears = 1; + int timeout = 0; + + try { + clears = Integer.parseInt(args[0]); + timeout = Integer.parseInt(args[1]); + } catch (NumberFormatException e) { + argsError("Invalid number format."); + } + + ContextAttribs ca = new ContextAttribs(); + + try { + DisplayMode[] modes = Display.getAvailableDisplayModes(); + + DisplayMode displayMode = chooseMode(modes, 1024, 768); + if ( displayMode == null ) + displayMode = chooseMode(modes, 800, 600); + if ( displayMode == null ) + displayMode = chooseMode(modes, 640, 480); + if ( displayMode == null ) + kill("Failed to set an appropriate display mode."); + + System.out.println("Setting display mode to: " + displayMode); + Display.setDisplayMode(displayMode); + Display.create(new PixelFormat(8, 24, 0), ca); + } catch (LWJGLException e) { + kill(e.getMessage()); + } + + System.out.println("\n---------\n"); + + final String version = glGetString(GL_VERSION); + + System.out.println("GL Version: " + version); + System.out.println("ARB_sync: " + GLContext.getCapabilities().GL_ARB_sync); + + if ( !GLContext.getCapabilities().OpenGL32 && !GLContext.getCapabilities().GL_ARB_sync ) + kill("OpenGL3.2 or ARB_sync support is required for this test."); + + System.out.println("\n---------\n"); + + System.out.println("Clearing the framebuffer a gazillion times..."); + + Random rand = new Random(System.currentTimeMillis()); + for ( int i = 0; i < clears; i++ ) { + glClearColor(rand.nextFloat(), rand.nextFloat(), rand.nextFloat(), 1.0f); + glClear(GL_COLOR_BUFFER_BIT); + } + + GLSync sync = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); + + System.out.println("\nWaiting on fence..."); + long time = Sys.getTime(); + int status = glClientWaitSync(sync, 0, timeout < 0 ? GL_TIMEOUT_IGNORED : timeout * 1000 * 1000); + System.out.println("\nFence sync complete after: " + ((Sys.getTime() - time) / (double)Sys.getTimerResolution()) + " seconds."); + System.out.print("\nWait Status: "); + switch ( status ) { + case GL_ALREADY_SIGNALED: + System.out.println("ALREADY_SIGNALED"); + break; + case GL_CONDITION_SATISFIED: + System.out.println("CONDITION_SATISFIED"); + break; + case GL_TIMEOUT_EXPIRED: + System.out.println("TIMEOUT_EXPIRED"); + break; + case GL_WAIT_FAILED: + System.out.println("WAIT_FAILED"); + break; + default: + System.out.println("Unexpected wait status: 0x" + Integer.toHexString(status)); + } + + System.out.println("Sync Status: " + (glGetSynci(sync, GL_SYNC_STATUS) == GL_UNSIGNALED ? "UNSIGNALED" : "SIGNALED")); + + glDeleteSync(sync); + + int error = glGetError(); + if ( error != 0 ) + System.out.println("\nTest failed with OpenGL error: " + error); + else + System.out.println("\nTest completed successfully."); + } + + private static DisplayMode chooseMode(DisplayMode[] modes, int width, int height) { + DisplayMode bestMode = null; + + for ( DisplayMode mode : modes ) { + if ( mode.getWidth() == width && mode.getHeight() == height && mode.getFrequency() <= 85 ) { + if ( bestMode == null || (mode.getBitsPerPixel() >= bestMode.getBitsPerPixel() && mode.getFrequency() > bestMode.getFrequency()) ) + bestMode = mode; + } + } + + return bestMode; + } + + private static void cleanup() { + if ( Display.isCreated() ) + Display.destroy(); + } + + private static void argsError(final String msg) { + System.out.println("\nInvalid arguments error: " + msg); + System.out.println("\nUsage: SyncTest :\n"); + System.out.println("clears\t- Number of times to clear the framebuffer."); + System.out.println("timeout\t- WaitSync timeout in milliseconds."); + + cleanup(); + System.exit(-1); + } + + static void kill(String reason) { + System.out.println("The SyncTest program was terminated because an error occured.\n"); + System.out.println("Reason: " + (reason == null ? "Unknown" : reason)); + + cleanup(); + System.exit(-1); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/VBOIndexTest.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/VBOIndexTest.java new file mode 100644 index 0000000..6e2fc5f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/VBOIndexTest.java @@ -0,0 +1,244 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Simple java test program. + * + * @author elias_naur + * @version $Revision$ + */ + +package org.lwjgl.test.opengl; + +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; + +import org.lwjgl.Sys; +import org.lwjgl.input.Keyboard; +import org.lwjgl.input.Mouse; +import org.lwjgl.opengl.Display; +import org.lwjgl.opengl.DisplayMode; +import org.lwjgl.opengl.GLContext; + +import static org.lwjgl.opengl.ARBBufferObject.*; +import static org.lwjgl.opengl.ARBVertexBufferObject.*; +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.util.glu.GLU.*; + +public final class VBOIndexTest { + + static { + try { + //find first display mode that allows us 640*480*16 + int mode = -1; + DisplayMode[] modes = Display.getAvailableDisplayModes(); + for ( int i = 0; i < modes.length; i++ ) { + if ( modes[i].getWidth() == 640 + && modes[i].getHeight() == 480 + && modes[i].getBitsPerPixel() >= 16 ) { + mode = i; + break; + } + } + if ( mode != -1 ) { + //select above found displaymode + System.out.println("Setting display mode to " + modes[mode]); + Display.setDisplayMode(modes[mode]); + System.out.println("Created display."); + } + } catch (Exception e) { + System.err.println("Failed to create display due to " + e); + } + } + + static { + try { + Display.create(); + System.out.println("Created OpenGL."); + } catch (Exception e) { + System.err.println("Failed to create OpenGL due to " + e); + System.exit(1); + } + } + + /** + * Is the game finished? + */ + private static boolean finished; + + /** + * A rotating square! + */ + private static float angle; + private static int buffer_id; + private static int indices_buffer_id; + private static FloatBuffer vertices; + private static ByteBuffer mapped_buffer; + private static FloatBuffer mapped_float_buffer; + private static IntBuffer indices; + private static ByteBuffer mapped_indices_buffer; + private static IntBuffer mapped_indices_int_buffer; + + public static void main(String[] arguments) { + try { + init(); + while ( !finished ) { + Display.update(); + + if ( !Display.isVisible() ) + Thread.sleep(200); + else if ( Display.isCloseRequested() ) + System.exit(0); + + mainLoop(); + render(); + } + } catch (Throwable t) { + t.printStackTrace(); + } finally { + cleanup(); + } + System.exit(0); + } + + /** + * All calculations are done in here + */ + private static void mainLoop() { + angle += 1f; + if ( angle > 360.0f ) + angle = 0.0f; + + if ( Mouse.getDX() != 0 || Mouse.getDY() != 0 || Mouse.getDWheel() != 0 ) + System.out.println("Mouse moved " + Mouse.getDX() + " " + Mouse.getDY() + " " + Mouse.getDWheel()); + for ( int i = 0; i < Mouse.getButtonCount(); i++ ) + if ( Mouse.isButtonDown(i) ) + System.out.println("Button " + i + " down"); + if ( Keyboard.isKeyDown(Keyboard.KEY_ESCAPE) ) + finished = true; + for ( int i = 0; i < Keyboard.getNumKeyboardEvents(); i++ ) { + Keyboard.next(); + if ( Keyboard.getEventKey() == Keyboard.KEY_ESCAPE && Keyboard.getEventKeyState() ) + finished = true; + if ( Keyboard.getEventKey() == Keyboard.KEY_T && Keyboard.getEventKeyState() ) + System.out.println("Current time: " + Sys.getTime()); + } + } + + /** + * All rendering is done in here + */ + private static void render() { + glClear(GL_COLOR_BUFFER_BIT); + glPushMatrix(); + glTranslatef(Display.getDisplayMode().getWidth() / 2, Display.getDisplayMode().getHeight() / 2, 0.0f); + glRotatef(angle, 0, 0, 1.0f); + + + ByteBuffer new_mapped_buffer = glMapBufferARB(GL_ARRAY_BUFFER_ARB, + GL_WRITE_ONLY_ARB, + mapped_buffer); + if ( new_mapped_buffer != mapped_buffer ) + mapped_float_buffer = new_mapped_buffer.order(ByteOrder.nativeOrder()).asFloatBuffer(); + mapped_buffer = new_mapped_buffer; + + new_mapped_buffer = glMapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, + GL_WRITE_ONLY_ARB, + mapped_indices_buffer); + if ( new_mapped_buffer != mapped_indices_buffer ) + mapped_indices_int_buffer = new_mapped_buffer.order(ByteOrder.nativeOrder()).asIntBuffer(); + mapped_indices_buffer = new_mapped_buffer; + + mapped_float_buffer.rewind(); + vertices.rewind(); + mapped_float_buffer.put(vertices); + + mapped_indices_int_buffer.rewind(); + indices.rewind(); + mapped_indices_int_buffer.put(indices); + if ( glUnmapBufferARB(GL_ARRAY_BUFFER_ARB) && + glUnmapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB) ) { + glDrawElements(GL_QUADS, 4, GL_UNSIGNED_INT, 0); + } + glPopMatrix(); + } + + /** + * Initialize + */ + private static void init() throws Exception { + + System.out.println("Timer resolution: " + Sys.getTimerResolution()); + // Go into orthographic projection mode. + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluOrtho2D(0, Display.getDisplayMode().getWidth(), 0, Display.getDisplayMode().getHeight()); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glViewport(0, 0, Display.getDisplayMode().getWidth(), Display.getDisplayMode().getHeight()); + if ( !GLContext.getCapabilities().GL_ARB_vertex_buffer_object ) { + System.out.println("ARB VBO not supported!"); + System.exit(1); + } + IntBuffer int_buffer = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()).asIntBuffer(); + glGenBuffersARB(int_buffer); + buffer_id = int_buffer.get(0); + indices_buffer_id = int_buffer.get(1); + glBindBufferARB(GL_ARRAY_BUFFER_ARB, buffer_id); + glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, indices_buffer_id); + vertices = ByteBuffer.allocateDirect(2 * 4 * 4).order(ByteOrder.nativeOrder()).asFloatBuffer(); + vertices.put(-50).put(-50).put(50).put(-50).put(50).put(50).put(-50).put(50); + vertices.rewind(); + indices = ByteBuffer.allocateDirect(4 * 4).order(ByteOrder.nativeOrder()).asIntBuffer(); + indices.put(0).put(1).put(2).put(3); + indices.rewind(); + glBufferDataARB(GL_ARRAY_BUFFER_ARB, 2 * 4 * 4, GL_STREAM_DRAW_ARB); + glBufferDataARB(GL_ELEMENT_ARRAY_BUFFER_ARB, 4 * 4, GL_STREAM_DRAW_ARB); + glEnableClientState(GL_VERTEX_ARRAY); + glVertexPointer(2, GL_FLOAT, 0, 0); + } + + /** + * Cleanup + */ + private static void cleanup() { + IntBuffer int_buffer = ByteBuffer.allocateDirect(8).order(ByteOrder.nativeOrder()).asIntBuffer(); + int_buffer.put(0, buffer_id); + int_buffer.put(1, indices_buffer_id); + glDeleteBuffersARB(int_buffer); + Display.destroy(); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/VBOTest.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/VBOTest.java new file mode 100644 index 0000000..cdd303f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/VBOTest.java @@ -0,0 +1,210 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Simple java test program. + * + * @author elias_naur + * @version $Revision$ + */ + +package org.lwjgl.test.opengl; + +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.FloatBuffer; + +import org.lwjgl.Sys; +import org.lwjgl.input.Keyboard; +import org.lwjgl.input.Mouse; +import org.lwjgl.opengl.Display; +import org.lwjgl.opengl.DisplayMode; +import org.lwjgl.opengl.GLContext; + +import static org.lwjgl.opengl.ARBBufferObject.*; +import static org.lwjgl.opengl.ARBVertexBufferObject.*; +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.util.glu.GLU.*; + +public final class VBOTest { + + static { + try { + //find first display mode that allows us 640*480*16 + int mode = -1; + DisplayMode[] modes = Display.getAvailableDisplayModes(); + for ( int i = 0; i < modes.length; i++ ) { + if ( modes[i].getWidth() == 640 + && modes[i].getHeight() == 480 + && modes[i].getBitsPerPixel() >= 16 ) { + mode = i; + break; + } + } + if ( mode != -1 ) { + //select above found displaymode + System.out.println("Setting display mode to " + modes[mode]); + Display.setDisplayMode(modes[mode]); + System.out.println("Created display."); + } + } catch (Exception e) { + System.err.println("Failed to create display due to " + e); + } + } + + static { + try { + Display.create(); + System.out.println("Created OpenGL."); + } catch (Exception e) { + System.err.println("Failed to create OpenGL due to " + e); + System.exit(1); + } + } + + /** + * Is the game finished? + */ + private static boolean finished; + + /** + * A rotating square! + */ + private static float angle; + private static int buffer_id; + private static FloatBuffer vertices; + private static ByteBuffer mapped_buffer; + private static FloatBuffer mapped_float_buffer; + + public static void main(String[] arguments) { + try { + init(); + while ( !finished ) { + Display.update(); + + if ( !Display.isVisible() ) + Thread.sleep(200); + else if ( Display.isCloseRequested() ) + System.exit(0); + + mainLoop(); + render(); + } + } catch (Throwable t) { + t.printStackTrace(); + } finally { + cleanup(); + } + System.exit(0); + } + + /** + * All calculations are done in here + */ + private static void mainLoop() { + angle += 1f; + if ( angle > 360.0f ) + angle = 0.0f; + + if ( Mouse.getDX() != 0 || Mouse.getDY() != 0 || Mouse.getDWheel() != 0 ) + System.out.println("Mouse moved " + Mouse.getDX() + " " + Mouse.getDY() + " " + Mouse.getDWheel()); + for ( int i = 0; i < Mouse.getButtonCount(); i++ ) + if ( Mouse.isButtonDown(i) ) + System.out.println("Button " + i + " down"); + if ( Keyboard.isKeyDown(Keyboard.KEY_ESCAPE) ) + finished = true; + for ( int i = 0; i < Keyboard.getNumKeyboardEvents(); i++ ) { + Keyboard.next(); + if ( Keyboard.getEventKey() == Keyboard.KEY_ESCAPE && Keyboard.getEventKeyState() ) + finished = true; + if ( Keyboard.getEventKey() == Keyboard.KEY_T && Keyboard.getEventKeyState() ) + System.out.println("Current time: " + Sys.getTime()); + } + } + + /** + * All rendering is done in here + */ + private static void render() { + glClear(GL_COLOR_BUFFER_BIT); + glPushMatrix(); + glTranslatef(Display.getDisplayMode().getWidth() / 2, Display.getDisplayMode().getHeight() / 2, 0.0f); + glRotatef(angle, 0, 0, 1.0f); + ByteBuffer new_mapped_buffer = glMapBufferARB(GL_ARRAY_BUFFER_ARB, + GL_WRITE_ONLY_ARB, + mapped_buffer); + if ( new_mapped_buffer != mapped_buffer ) + mapped_float_buffer = new_mapped_buffer.order(ByteOrder.nativeOrder()).asFloatBuffer(); + mapped_buffer = new_mapped_buffer; + mapped_float_buffer.rewind(); + vertices.rewind(); + mapped_float_buffer.put(vertices); + if ( glUnmapBufferARB(GL_ARRAY_BUFFER_ARB) ) + glDrawArrays(GL_QUADS, 0, 4); + glPopMatrix(); + } + + /** + * Initialize + */ + private static void init() throws Exception { + System.out.println("Timer resolution: " + Sys.getTimerResolution()); + // Go into orthographic projection mode. + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluOrtho2D(0, Display.getDisplayMode().getWidth(), 0, Display.getDisplayMode().getHeight()); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glViewport(0, 0, Display.getDisplayMode().getWidth(), Display.getDisplayMode().getHeight()); + if ( !GLContext.getCapabilities().GL_ARB_vertex_buffer_object ) { + System.out.println("ARB VBO not supported!"); + System.exit(1); + } + buffer_id = glGenBuffersARB(); + glBindBufferARB(GL_ARRAY_BUFFER_ARB, buffer_id); + vertices = ByteBuffer.allocateDirect(2 * 4 * 4).order(ByteOrder.nativeOrder()).asFloatBuffer(); + vertices.put(-50).put(-50).put(50).put(-50).put(50).put(50).put(-50).put(50); + glBufferDataARB(GL_ARRAY_BUFFER_ARB, 2 * 4 * 4, GL_STREAM_DRAW_ARB); + glEnableClientState(GL_VERTEX_ARRAY); + glVertexPointer(2, GL_FLOAT, 0, 0); + } + + /** + * Cleanup + */ + private static void cleanup() { + glDeleteBuffersARB(buffer_id); + Display.destroy(); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/VersionTest.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/VersionTest.java new file mode 100644 index 0000000..2255c5d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/VersionTest.java @@ -0,0 +1,261 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.opengl; + +import org.lwjgl.LWJGLException; +import org.lwjgl.opengl.*; + +import java.util.StringTokenizer; +import java.util.regex.Pattern; + +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.opengl.GL32.*; + +/** + * Tests the ARB_create_context extension through the use of the ContextAttribs class. + * + * @author Spasi + */ +public final class VersionTest { + + private VersionTest() { + } + + public static void main(String[] args) { + initialize(args); + cleanup(); + System.exit(0); + } + + private static void initialize(String[] args) { + if ( args.length < 2 ) + argsError("Insufficient number of arguments"); + + int majorInput = 1; + int minorInput = 0; + + try { + majorInput = Integer.parseInt(args[0]); + minorInput = Integer.parseInt(args[1]); + } catch (NumberFormatException e) { + argsError("Invalid number format"); + } + + ContextAttribs ca = new ContextAttribs(majorInput, minorInput); + + if ( 2 < args.length ) { + for ( int i = 2; i < args.length; i++ ) { + if ( Pattern.matches("[0-9]+", args[i]) ) + ca = ca.withLayer(Integer.parseInt(args[i])); + else if ( "debug".equalsIgnoreCase(args[i]) ) + ca = ca.withDebug(true); + else if ( "fc".equalsIgnoreCase(args[i]) ) + ca = ca.withForwardCompatible(true); + else if ( "core".equalsIgnoreCase(args[i]) ) + ca = ca.withProfileCore(true); + else if ( "compatibility".equalsIgnoreCase(args[i]) ) + ca = ca.withProfileCompatibility(true); + else if ( "es".equalsIgnoreCase(args[i]) ) + ca = ca.withProfileES(true); + else + argsError("Unknown argument: \'" + args[i] + "\'"); + } + } + + try { + DisplayMode[] modes = Display.getAvailableDisplayModes(); + + DisplayMode displayMode; + + displayMode = chooseMode(modes, 1024, 768); + if ( displayMode == null ) + displayMode = chooseMode(modes, 800, 600); + if ( displayMode == null ) + displayMode = chooseMode(modes, 640, 480); + if ( displayMode == null ) + kill("Failed to set an appropriate display mode."); + + System.out.println("Setting display mode to: " + displayMode); + Display.setDisplayMode(displayMode); + Display.create(new PixelFormat(8, 24, 0), ca); + } catch (LWJGLException e) { + kill(e.getMessage()); + } + + System.out.println("\n---------\n"); + + System.out.println("Requested " + ca); + + final String version = glGetString(GL_VERSION); + + boolean deprecated = false; + try { + glVertex3f(0.0f, 0.0f, 0.0f); + Util.checkGLError(); + deprecated = true; + } catch (Throwable t) {} + + final StringTokenizer version_tokenizer = new StringTokenizer(version, ". "); + + int majorVersion = Integer.parseInt(version_tokenizer.nextToken()); + int minorVersion = Integer.parseInt(version_tokenizer.nextToken()); + + final boolean compatibilityProfile; + final boolean coreProfile; + + if ( 3 < majorVersion || (majorVersion == 3 && 2 <= minorVersion) ) { + final int profileMask = glGetInteger(GL_CONTEXT_PROFILE_MASK); + + compatibilityProfile = (profileMask & GL_CONTEXT_COMPATIBILITY_PROFILE_BIT) != 0; + coreProfile = (profileMask & GL_CONTEXT_CORE_PROFILE_BIT) != 0; + } else { + compatibilityProfile = false; + coreProfile = false; + } + + System.out.println("\nGL_VERSION returned : " + version); + System.out.println("\tCore profile: " + coreProfile); + System.out.println("\tCompatibility profile: " + compatibilityProfile); + System.out.println("ARB_compatibility present: " + GLContext.getCapabilities().GL_ARB_compatibility); + System.out.println("Deprecated functionality present: " + deprecated); + if ( !deprecated && GLContext.getCapabilities().GL_ARB_compatibility ) + System.out.println("\tARB_compatibility is present, but LWJGL has enabled pseudo-forward compatible mode."); + + System.out.println("\n---------"); + + boolean success = false; + boolean check; + if ( majorInput < 3 || (majorInput == 3 && minorInput == 0) ) { + System.out.println("\nA version less than or equal to 3.0 is requested, the context\n" + + "returned may implement any of the following versions:"); + + System.out.println("\n1) Any version no less than that requested and no greater than 3.0."); + check = (majorInput < majorVersion || (majorInput == majorVersion && minorInput <= minorVersion)) // Satisfies requested version + && (majorVersion < 3 || (majorVersion == 3 && minorVersion == 0)); // 3.0 or earlier + System.out.println("\t" + check); + success |= check; + + System.out.println("\n2) Version 3.1, if the GL_ARB_compatibility extension is also implemented."); + check = majorVersion == 3 && minorVersion == 1 && GLContext.getCapabilities().GL_ARB_compatibility; + System.out.println("\t" + check); + success |= check; + + System.out.println("\n3) The compatibility profile of version 3.2 or greater."); + check = compatibilityProfile; // No need to check version, profiles are only available with 3.2+. + System.out.println("\t" + check); + success |= check; + + System.out.println("\nTEST " + (success ? "SUCCEEDED" : "FAILED")); + if ( !success && ca.isForwardCompatible() ) + System.out.println("\t(probably because the forward compatible flag was set)"); + } else if ( majorInput == 3 && minorInput == 1 ) { + System.out.println("\nVersion 3.1 is requested, the context returned may implement\n" + + "any of the following versions:"); + + System.out.println("\n1) Version 3.1. The GL_ARB_compatibility extension may or may not\n" + + "be implemented, as determined by the implementation."); + check = majorVersion == 3 && minorVersion == 1; + System.out.println("\t" + check); + success |= check; + + System.out.println("\n2) The core profile of version 3.2 or greater."); + check = coreProfile; // No need to check version, profiles are only available with 3.2+. + System.out.println("\t" + check); + success |= check; + + System.out.println("\nTEST " + (success ? "SUCCEEDED" : "FAILED")); + } else { + System.out.println("\nVersion 3.2 or greater is requested, the context returned may\n" + + "implement any of the following versions:"); + + System.out.println("\n1) The requested profile of the requested version."); + check = majorInput == majorVersion && minorInput == minorVersion + && (!ca.isProfileCompatibility() || compatibilityProfile) + && (!ca.isProfileCore() || coreProfile); + System.out.println("\t" + check); + success |= check; + + System.out.println("\n2) The requested profile of any later version, so long as no\n" + + "features have been removed from that later version and profile."); + check = majorInput < majorVersion || (majorInput == majorVersion && minorInput < minorVersion) + && (!ca.isProfileCompatibility() || compatibilityProfile) + && (!ca.isProfileCore() || coreProfile); + System.out.println("\t" + check); + success |= check; + + System.out.println("\nTEST " + (success ? "SUCCEEDED" : "FAILED")); + } + } + + private static DisplayMode chooseMode(DisplayMode[] modes, int width, int height) { + DisplayMode bestMode = null; + + for ( DisplayMode mode : modes ) { + if ( mode.getWidth() == width && mode.getHeight() == height && mode.getFrequency() <= 85 ) { + if ( bestMode == null || (mode.getBitsPerPixel() >= bestMode.getBitsPerPixel() && mode.getFrequency() > bestMode.getFrequency()) ) + bestMode = mode; + } + } + + return bestMode; + } + + private static void cleanup() { + if ( Display.isCreated() ) + Display.destroy(); + } + + private static void argsError(final String msg) { + System.out.println("\nInvalid arguments error: " + msg); + System.out.println("\nUsage: VersionTest {'core'|'compatibility', , 'debug', 'fc'}:\n"); + System.out.println("majorVersion\t- Major OpenGL version."); + System.out.println("majorVersion\t- Minor OpenGL version."); + System.out.println("core\t- Sets the Core Profile bit (optional, requires 3.2+)."); + System.out.println("compatibility\t- Sets the Compatibility Profile bit (optional, requires 3.2+)."); + System.out.println("ws\t- Sets the OpenGL ES Profile bit (optional, requires 2.0)."); + System.out.println("layer\t- Layer plane (optional)."); + System.out.println("debug\t- Enables debug mode (optional)."); + System.out.println("fc\t- Enables forward compatibility mode (optional, requires 3.0+)."); + + cleanup(); + System.exit(-1); + } + + static void kill(String reason) { + System.out.println("The VersionTest program was terminated because an error occured.\n"); + System.out.println("Reason: " + (reason == null ? "Unknown" : reason)); + + cleanup(); + System.exit(-1); + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/awt/AWTGears.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/awt/AWTGears.java new file mode 100644 index 0000000..fc9efc3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/awt/AWTGears.java @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.opengl.awt; + +import java.awt.Frame; +import java.awt.Color; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; + +import org.lwjgl.LWJGLException; + +/** + *

+ * AWT version of the gears demo + *

+ * @version $Revision$ + * @author Brian Matzon + * $Id$ + */ +public class AWTGears extends Frame { + + /** + * C'tor + */ + public AWTGears() throws LWJGLException { + setTitle("Gears"); + setBackground(Color.BLACK); + AWTGearsCanvas canvas = new AWTGearsCanvas(); + canvas.setSize(300, 300); + add(canvas); + addWindowListener(new WindowAdapter() { + public void windowClosing(WindowEvent e) { + dispose(); + System.exit(0); + } + }); + setResizable(true); + pack(); + setVisible(true); + } + + public static void main(String[] args) throws LWJGLException { + new AWTGears(); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/awt/AWTGearsCanvas.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/awt/AWTGearsCanvas.java new file mode 100644 index 0000000..24b0bbb --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/awt/AWTGearsCanvas.java @@ -0,0 +1,326 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.opengl.awt; + +import java.nio.FloatBuffer; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.opengl.AWTGLCanvas; +import org.lwjgl.opengl.GLContext; +import org.lwjgl.test.applet.Test; + +import static org.lwjgl.opengl.ARBTransposeMatrix.*; +import static org.lwjgl.opengl.GL11.*; + +/** + *

+ * AWT version of the gears demo + *

+ * @version $Revision$ + * @author Brian Matzon + * $Id$ + */ +public class AWTGearsCanvas extends AWTGLCanvas implements Test { + + private float view_rotx = 20.0f; + + private float view_roty = 30.0f; + + private float view_rotz; + + private int gear1; + + private int gear2; + + private int gear3; + + private float angle; + + long startTime; + long fps; + int current_width; + int current_height; + + /** + * C'tor + */ + public AWTGearsCanvas() throws LWJGLException { + super(); + } + + public void paintGL() { + + if(startTime == 0) { + setup(); + startTime = System.currentTimeMillis() + 5000; + } + + try { + angle += 2.0f; + if (getWidth() != current_width || getHeight() != current_height) { + current_width = getWidth(); + current_height = getHeight(); + glViewport(0, 0, current_width, current_height); + } + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glPushMatrix(); + glRotatef(view_rotx, 1.0f, 0.0f, 0.0f); + glRotatef(view_roty, 0.0f, 1.0f, 0.0f); + glRotatef(view_rotz, 0.0f, 0.0f, 1.0f); + + glPushMatrix(); + glTranslatef(-3.0f, -2.0f, 0.0f); + glRotatef(angle, 0.0f, 0.0f, 1.0f); + glCallList(gear1); + glPopMatrix(); + + glPushMatrix(); + glTranslatef(3.1f, -2.0f, 0.0f); + glRotatef(-2.0f * angle - 9.0f, 0.0f, 0.0f, 1.0f); + glCallList(gear2); + glPopMatrix(); + + glPushMatrix(); + glTranslatef(-3.1f, 4.2f, 0.0f); + glRotatef(-2.0f * angle - 25.0f, 0.0f, 0.0f, 1.0f); + glCallList(gear3); + glPopMatrix(); + + glPopMatrix(); + swapBuffers(); + repaint(); + } catch (LWJGLException e) { + throw new RuntimeException(e); + } + if (startTime > System.currentTimeMillis()) { + fps++; + } else { + long timeUsed = 5000 + (startTime - System.currentTimeMillis()); + startTime = System.currentTimeMillis() + 5000; + System.out.println(fps + " frames in " + timeUsed / 1000f + " seconds = " + + (fps / (timeUsed / 1000f))); + fps = 0; + } + } + + private void setup() { + // setup ogl + FloatBuffer pos = BufferUtils.createFloatBuffer(4).put(new float[] { 5.0f, 5.0f, 10.0f, 0.0f}); + FloatBuffer red = BufferUtils.createFloatBuffer(4).put(new float[] { 0.8f, 0.1f, 0.0f, 1.0f}); + FloatBuffer green = BufferUtils.createFloatBuffer(4).put(new float[] { 0.0f, 0.8f, 0.2f, 1.0f}); + FloatBuffer blue = BufferUtils.createFloatBuffer(4).put(new float[] { 0.2f, 0.2f, 1.0f, 1.0f}); + pos.flip(); + red.flip(); + green.flip(); + blue.flip(); + + glLight(GL_LIGHT0, GL_POSITION, pos); + glEnable(GL_CULL_FACE); + glEnable(GL_LIGHTING); + glEnable(GL_LIGHT0); + glEnable(GL_DEPTH_TEST); + + /* make the gears */ + gear1 = glGenLists(1); + glNewList(gear1, GL_COMPILE); + glMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red); + gear(1.0f, 4.0f, 1.0f, 20, 0.7f); + glEndList(); + + gear2 = glGenLists(1); + glNewList(gear2, GL_COMPILE); + glMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green); + gear(0.5f, 2.0f, 2.0f, 10, 0.7f); + glEndList(); + + gear3 = glGenLists(1); + glNewList(gear3, GL_COMPILE); + glMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue); + gear(1.3f, 2.0f, 0.5f, 10, 0.7f); + glEndList(); + + glEnable(GL_NORMALIZE); + + glMatrixMode(GL_PROJECTION); + + System.err.println("GL_VENDOR: " + glGetString(GL_VENDOR)); + System.err.println("GL_RENDERER: " + glGetString(GL_RENDERER)); + System.err.println("GL_VERSION: " + glGetString(GL_VERSION)); + System.err.println(); + System.err.println("glLoadTransposeMatrixfARB() supported: " + GLContext.getCapabilities().GL_ARB_transpose_matrix); + if (!GLContext.getCapabilities().GL_ARB_transpose_matrix) { + // --- not using extensions + glLoadIdentity(); + } else { + // --- using extensions + final FloatBuffer identityTranspose = BufferUtils.createFloatBuffer(16).put( + new float[] { 1, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 1}); + identityTranspose.flip(); + glLoadTransposeMatrixARB(identityTranspose); + } + + float h = (float) 300 / (float) 300; + glFrustum(-1.0f, 1.0f, -h, h, 5.0f, 60.0f); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glTranslatef(0.0f, 0.0f, -40.0f); + } + + /** + * Draw a gear wheel. You'll probably want to call this function when + * building a display list since we do a lot of trig here. + * + * @param inner_radius radius of hole at center + * @param outer_radius radius at center of teeth + * @param width width of gear + * @param teeth number of teeth + * @param tooth_depth depth of tooth + */ + private void gear(float inner_radius, float outer_radius, float width, int teeth, float tooth_depth) { + int i; + float r0, r1, r2; + float angle, da; + float u, v, len; + + r0 = inner_radius; + r1 = outer_radius - tooth_depth / 2.0f; + r2 = outer_radius + tooth_depth / 2.0f; + + da = 2.0f * (float) Math.PI / teeth / 4.0f; + + glShadeModel(GL_FLAT); + + glNormal3f(0.0f, 0.0f, 1.0f); + + /* draw front face */ + glBegin(GL_QUAD_STRIP); + for (i = 0; i <= teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), width * 0.5f); + glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), width * 0.5f); + if (i < teeth) { + glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), width * 0.5f); + glVertex3f(r1 * (float) Math.cos(angle + 3.0f * da), r1 * (float) Math.sin(angle + 3.0f * da), + width * 0.5f); + } + } + glEnd(); + + /* draw front sides of teeth */ + glBegin(GL_QUADS); + for (i = 0; i < teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), width * 0.5f); + glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), width * 0.5f); + glVertex3f(r2 * (float) Math.cos(angle + 2.0f * da), r2 * (float) Math.sin(angle + 2.0f * da), width * 0.5f); + glVertex3f(r1 * (float) Math.cos(angle + 3.0f * da), r1 * (float) Math.sin(angle + 3.0f * da), width * 0.5f); + } + glEnd(); + + /* draw back face */ + glBegin(GL_QUAD_STRIP); + for (i = 0; i <= teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), -width * 0.5f); + glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), -width * 0.5f); + glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), -width * 0.5f); + glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), -width * 0.5f); + } + glEnd(); + + /* draw back sides of teeth */ + glBegin(GL_QUADS); + for (i = 0; i < teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), -width * 0.5f); + glVertex3f(r2 * (float) Math.cos(angle + 2 * da), r2 * (float) Math.sin(angle + 2 * da), -width * 0.5f); + glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), -width * 0.5f); + glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), -width * 0.5f); + } + glEnd(); + + /* draw outward faces of teeth */ + glBegin(GL_QUAD_STRIP); + for (i = 0; i < teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), width * 0.5f); + glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), -width * 0.5f); + u = r2 * (float) Math.cos(angle + da) - r1 * (float) Math.cos(angle); + v = r2 * (float) Math.sin(angle + da) - r1 * (float) Math.sin(angle); + len = (float) Math.sqrt(u * u + v * v); + u /= len; + v /= len; + glNormal3f(v, -u, 0.0f); + glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), width * 0.5f); + glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), -width * 0.5f); + glNormal3f((float) Math.cos(angle), (float) Math.sin(angle), 0.0f); + glVertex3f(r2 * (float) Math.cos(angle + 2 * da), r2 * (float) Math.sin(angle + 2 * da), width * 0.5f); + glVertex3f(r2 * (float) Math.cos(angle + 2 * da), r2 * (float) Math.sin(angle + 2 * da), -width * 0.5f); + u = r1 * (float) Math.cos(angle + 3 * da) - r2 * (float) Math.cos(angle + 2 * da); + v = r1 * (float) Math.sin(angle + 3 * da) - r2 * (float) Math.sin(angle + 2 * da); + glNormal3f(v, -u, 0.0f); + glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), width * 0.5f); + glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), -width * 0.5f); + glNormal3f((float) Math.cos(angle), (float) Math.sin(angle), 0.0f); + } + glVertex3f(r1 * (float) Math.cos(0), r1 * (float) Math.sin(0), width * 0.5f); + glVertex3f(r1 * (float) Math.cos(0), r1 * (float) Math.sin(0), -width * 0.5f); + glEnd(); + + glShadeModel(GL_SMOOTH); + + /* draw inside radius cylinder */ + glBegin(GL_QUAD_STRIP); + for (i = 0; i <= teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + glNormal3f(-(float) Math.cos(angle), -(float) Math.sin(angle), 0.0f); + glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), -width * 0.5f); + glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), width * 0.5f); + } + glEnd(); + } + + /* + * @see org.lwjgl.test.applet.Test#start() + */ + public void start() { + } + + /* + * @see org.lwjgl.test.applet.Test#stop() + */ + public void stop() { + } +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/awt/AWTTest.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/awt/AWTTest.java new file mode 100644 index 0000000..4e1abf4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/awt/AWTTest.java @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.opengl.awt; + +import java.awt.Frame; +import java.awt.GridLayout; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; + +import org.lwjgl.LWJGLException; +import org.lwjgl.opengl.AWTGLCanvas; + +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.util.glu.GLU.*; + +/** + *

+ * Tests AWTGLCanvas functionality + *

+ * @version $Revision$ + * @author $Author$ + * $Id$ + */ +public class AWTTest extends Frame { + + /** AWT GL canvas */ + private AWTGLCanvas canvas0, canvas1; + + private volatile float angle; + + /** + * C'tor + */ + public AWTTest() throws LWJGLException { + setTitle("LWJGL AWT Canvas Test"); + setSize(640, 320); + setLayout(new GridLayout(1, 2)); + add(canvas0 = new AWTGLCanvas() { + int current_height; + int current_width; + public void paintGL() { + try { + if (getWidth() != current_width || getHeight() != current_height) { + current_width = getWidth(); + current_height = getHeight(); + glViewport(0, 0, current_width, current_height); + } + glViewport(0, 0, getWidth(), getHeight()); + glClearColor(1.0f, 0.0f, 0.0f, 1.0f); + glClear(GL_COLOR_BUFFER_BIT); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluOrtho2D(0.0f, (float) getWidth(), 0.0f, (float) getHeight()); + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + glColor3f(1f, 1f, 0f); + glTranslatef(getWidth() / 2.0f, getHeight() / 2.0f, 0.0f); + glRotatef(angle, 0f, 0f, 1.0f); + glRectf(-50.0f, -50.0f, 50.0f, 50.0f); + glPopMatrix(); + swapBuffers(); + repaint(); + } catch (LWJGLException e) { + throw new RuntimeException(e); + } + } + }); + add(canvas1 = new AWTGLCanvas() { + int current_height; + int current_width; + public void paintGL() { + try { + angle += 1.0f; + if (getWidth() != current_width || getHeight() != current_height) { + current_width = getWidth(); + current_height = getHeight(); + glViewport(0, 0, current_width, current_height); + } + glViewport(0, 0, getWidth(), getHeight()); + glClearColor(0.0f, 1.0f, 0.0f, 1.0f); + glClear(GL_COLOR_BUFFER_BIT); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluOrtho2D(0.0f, (float) getWidth(), 0.0f, (float) getHeight()); + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + glTranslatef(getWidth() / 2.0f, getHeight() / 2.0f, 0.0f); + glRotatef(2*angle, 0f, 0f, -1.0f); + glRectf(-50.0f, -50.0f, 50.0f, 50.0f); + glPopMatrix(); + swapBuffers(); + repaint(); + } catch (LWJGLException e) { + throw new RuntimeException(e); + } + } + }); + addWindowListener(new WindowAdapter() { + public void windowClosing(WindowEvent e) { + dispose(); + System.exit(0); + } + }); + setResizable(true); + setVisible(true); + } + + public static void main(String[] args) throws LWJGLException { + new AWTTest(); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/awt/DemoBox.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/awt/DemoBox.java new file mode 100644 index 0000000..93489c1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/awt/DemoBox.java @@ -0,0 +1,639 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.opengl.awt; + +import java.awt.BorderLayout; +import java.awt.Button; +import java.awt.Frame; +import java.awt.GridBagConstraints; +import java.awt.GridBagLayout; +import java.awt.Label; +import java.awt.List; +import java.awt.Panel; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.awt.event.ItemEvent; +import java.awt.event.ItemListener; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; +import java.nio.FloatBuffer; +import java.util.Enumeration; +import java.util.Hashtable; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.opengl.AWTGLCanvas; +import org.lwjgl.opengl.GLContext; + +import static org.lwjgl.opengl.ARBTransposeMatrix.*; +import static org.lwjgl.opengl.GL11.*; + +/** + *

+ *

+ * @version $Revision$ + * @author Brian Matzon + * $Id$ + */ +public class DemoBox extends Frame { + + /** GL canvas */ + private DemoBoxGLCanvas demoCanvas; + + /** Demo selection panel */ + private Panel selectionPanel; + + /** Hashtable of demos */ + private Hashtable selectableDemos; + + /** + * Creates a new demo box instance + */ + public DemoBox() { + selectableDemos = new Hashtable(); + selectableDemos.put("default", new NullDemoBox()); + selectableDemos.put("clear_color", new ClearColorDemoBox()); + selectableDemos.put("gears", new GearsDemoBox()); + } + + /** + * @return + */ + public boolean initialize() { + setTitle("LWJGL - Demo Box"); + setSize(640, 480); + setLayout(new GridBagLayout()); + + // Setup selection panel + // ================================= + selectionPanel = new Panel(); + selectionPanel.setLayout(new BorderLayout()); + selectionPanel.add(new Label("Demo", Label.CENTER), BorderLayout.NORTH); + + Button fullScreen = new Button("Fullscreen"); + fullScreen.addActionListener(new ActionListener() { + + public void actionPerformed(ActionEvent event) { + toggleFullscreen(); + } + }); + selectionPanel.add(fullScreen, BorderLayout.SOUTH); + + final List demos = new List(); + for (Enumeration e = selectableDemos.keys(); e.hasMoreElements();) { + demos.add(e.nextElement().toString()); + } + selectionPanel.add(demos, BorderLayout.CENTER); + + demos.addItemListener(new ItemListener() { + + public void itemStateChanged(ItemEvent event) { + demoSelected(event.getItemSelectable().getSelectedObjects()[0].toString()); + } + }); + + GridBagConstraints gbc = new GridBagConstraints(); + gbc.gridx = 0; + gbc.gridy = 0; + gbc.fill = java.awt.GridBagConstraints.BOTH; + gbc.weightx = 0.05; + gbc.weighty = 1.0; + add(selectionPanel, gbc); + // --------------------------------- + + // setup demo canvas + // ================================= + try { + demoCanvas = new DemoBoxGLCanvas(this); + + gbc = new GridBagConstraints(); + gbc.gridx = 1; + gbc.gridy = 0; + gbc.fill = java.awt.GridBagConstraints.BOTH; + gbc.weightx = 0.95; + gbc.weighty = 1.0; + add(demoCanvas, gbc); + } catch (LWJGLException le) { + le.printStackTrace(); + return false; + } + // --------------------------------- + + addWindowListener(new WindowAdapter() { + + public void windowClosing(WindowEvent e) { + demoCanvas.destroyCanvas(); + dispose(); + System.exit(0); + } + }); + + //demos.select(0); + //demoSelected(demos.getSelectedItem()); + return true; + } + + public void updateFPS(float fps) { + if(fps != -1) { + setTitle("LWJGL - Demo Box (FPS: " + fps + ")"); + } else { + setTitle("LWJGL - Demo Box"); + } + } + + /** + * Enter fullscreen mode for this demo + */ + protected void toggleFullscreen() { + System.out.println("Toggle Fullscreen"); + } + + /** + * Selected a demo + * @param demo Name of demo that was selected + */ + protected void demoSelected(String demo) { + System.out.println("Selecting demo: " + demo); + demoCanvas.setActiveDemo(selectableDemos.get(demo)); + } + + /** + * @param args + * @throws LWJGLException + */ + public static void main(String[] args) throws LWJGLException { + DemoBox demo = new DemoBox(); + demo.initialize(); + demo.setVisible(true); + } + + /** + * Interface for a demo + */ + public interface Demo { + boolean isInitialized(); + boolean initialize(); + void render(); + void destroy(); + } + + /** + * + */ + private class DemoBoxGLCanvas extends AWTGLCanvas implements Runnable { + + /** Parent demo box */ + DemoBox parent; + + /** Currently active demo */ + Demo activeDemo; + + /** last active demo */ + Demo lastActiveDemo; + + /** Render thread */ + private Thread renderThread; + + private DemoBoxGLCanvas(DemoBox parent) throws LWJGLException { + super(); + this.parent = parent; + } + + // FPS + long startTime; + long fps; + + protected void paintGL() { + synchronized (this) { + if (lastActiveDemo != null && lastActiveDemo != activeDemo) { + lastActiveDemo.destroy(); + lastActiveDemo = null; + if (activeDemo != null) { + activeDemo.initialize(); + startTime = System.currentTimeMillis() + 5000; + } else { + parent.updateFPS(-1); + } + } + + if (activeDemo != null) { + + if(!activeDemo.isInitialized()) { + activeDemo.initialize(); + } + + activeDemo.render(); + try { + swapBuffers(); + } catch (LWJGLException le) { + le.printStackTrace(); + } + + if (startTime > System.currentTimeMillis()) { + fps++; + } else { + long timeUsed = 5000 + (startTime - System.currentTimeMillis()); + startTime = System.currentTimeMillis() + 5000; + parent.updateFPS((fps / (timeUsed / 1000f))); + fps = 0; + } + } + } + } + + public void destroyCanvas() { + setActiveDemo(null); + renderThread = null; + } + + public void setActiveDemo(Demo activeDemo) { + synchronized (this) { + // setting no current demo + if (activeDemo == null) { + lastActiveDemo = this.activeDemo; + this.activeDemo = null; + return; + } + + // setting to new demo + lastActiveDemo = this.activeDemo; + this.activeDemo = activeDemo; + } + + if (renderThread == null) { + renderThread = new Thread(this); + renderThread.setName("DemoBox-Renderer"); + renderThread.start(); + } + } + + private DemoBoxGLCanvas() throws LWJGLException { + super(); + } + + public void run() { + long sleep_time = 1000; + while (renderThread != null) { + + // check for change of demo + synchronized (this) { + // if no demo set, just sleep + if (activeDemo == null) { + sleep_time = 1000; + } else { + // we have a demo! + sleep_time = 16; + repaint(); + } + } + sleep(sleep_time); + } + System.out.println("dead"); + } + + private void sleep(long time) { + try { + Thread.sleep(time); + } catch (InterruptedException inte) { + } + } + } + + // Demo box demo + // ======================================================== + public class ClearColorDemoBox implements Demo { + + private boolean initialized; + + int direction = 1; + + float color; + + public boolean isInitialized() { + return initialized; + } + + public boolean initialize() { + return initialized = true; + } + + public void render() { + glClearColor(color, color, color, 1f); + glClear(GL_COLOR_BUFFER_BIT); + + color += direction * .05f; + + if (color > 1f) { + color = 1f; + direction = -1 * direction; + } else if (color < 0f) { + direction = -1 * direction; + color = 0f; + } + } + + public void destroy() { + initialized = false; + } + } + + // -------------------------------------------------------- + + // Demo box demo + // ======================================================== + public class NullDemoBox implements Demo { + + private boolean initialized; + + public boolean isInitialized() { + return initialized; + } + + public boolean initialize() { + glClearColor(0, 0, 0, 1f); + return true; + } + + public void render() { + glClear(GL_COLOR_BUFFER_BIT); + } + + public void destroy() { + initialized = false; + } + } + // -------------------------------------------------------- + + // Demo box demo + // ======================================================== + public class GearsDemoBox implements Demo { + + private boolean initialized; + + private float view_rotx = 20.0f; + + private float view_roty = 30.0f; + + private float view_rotz; + + private int gear1; + + private int gear2; + + private int gear3; + + private float angle; + + public boolean isInitialized() { + return initialized; + } + + public boolean initialize() { + // setup ogl + FloatBuffer pos = BufferUtils.createFloatBuffer(4).put(new float[] { 5.0f, 5.0f, 10.0f, 0.0f}); + FloatBuffer red = BufferUtils.createFloatBuffer(4).put(new float[] { 0.8f, 0.1f, 0.0f, 1.0f}); + FloatBuffer green = BufferUtils.createFloatBuffer(4).put(new float[] { 0.0f, 0.8f, 0.2f, 1.0f}); + FloatBuffer blue = BufferUtils.createFloatBuffer(4).put(new float[] { 0.2f, 0.2f, 1.0f, 1.0f}); + pos.flip(); + red.flip(); + green.flip(); + blue.flip(); + + glClearColor(0, 0, 0, 1f); + + glLight(GL_LIGHT0, GL_POSITION, pos); + glEnable(GL_CULL_FACE); + glEnable(GL_LIGHTING); + glEnable(GL_LIGHT0); + glEnable(GL_DEPTH_TEST); + + /* make the gears */ + gear1 = glGenLists(1); + glNewList(gear1, GL_COMPILE); + glMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, red); + gear(1.0f, 4.0f, 1.0f, 20, 0.7f); + glEndList(); + + gear2 = glGenLists(1); + glNewList(gear2, GL_COMPILE); + glMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, green); + gear(0.5f, 2.0f, 2.0f, 10, 0.7f); + glEndList(); + + gear3 = glGenLists(1); + glNewList(gear3, GL_COMPILE); + glMaterial(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, blue); + gear(1.3f, 2.0f, 0.5f, 10, 0.7f); + glEndList(); + + glEnable(GL_NORMALIZE); + + glMatrixMode(GL_PROJECTION); + + System.err.println("GL_VENDOR: " + glGetString(GL_VENDOR)); + System.err.println("GL_RENDERER: " + glGetString(GL_RENDERER)); + System.err.println("GL_VERSION: " + glGetString(GL_VERSION)); + System.err.println(); + System.err.println("glLoadTransposeMatrixfARB() supported: " + GLContext.getCapabilities().GL_ARB_transpose_matrix); + if (!GLContext.getCapabilities().GL_ARB_transpose_matrix) { + // --- not using extensions + glLoadIdentity(); + } else { + // --- using extensions + final FloatBuffer identityTranspose = BufferUtils.createFloatBuffer(16).put( + new float[] { 1, 0, 0, 0, 0, 1, 0, 0, + 0, 0, 1, 0, 0, 0, 0, 1}); + identityTranspose.flip(); + glLoadTransposeMatrixARB(identityTranspose); + } + + float h = (float) 300 / (float) 300; + glFrustum(-1.0f, 1.0f, -h, h, 5.0f, 60.0f); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glTranslatef(0.0f, 0.0f, -40.0f); + return initialized = true; + } + + public void render() { + angle += 2.0f; + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glPushMatrix(); + glRotatef(view_rotx, 1.0f, 0.0f, 0.0f); + glRotatef(view_roty, 0.0f, 1.0f, 0.0f); + glRotatef(view_rotz, 0.0f, 0.0f, 1.0f); + + glPushMatrix(); + glTranslatef(-3.0f, -2.0f, 0.0f); + glRotatef(angle, 0.0f, 0.0f, 1.0f); + glCallList(gear1); + glPopMatrix(); + + glPushMatrix(); + glTranslatef(3.1f, -2.0f, 0.0f); + glRotatef(-2.0f * angle - 9.0f, 0.0f, 0.0f, 1.0f); + glCallList(gear2); + glPopMatrix(); + + glPushMatrix(); + glTranslatef(-3.1f, 4.2f, 0.0f); + glRotatef(-2.0f * angle - 25.0f, 0.0f, 0.0f, 1.0f); + glCallList(gear3); + glPopMatrix(); + + glPopMatrix(); + } + + /** + * Draw a gear wheel. You'll probably want to call this function when + * building a display list since we do a lot of trig here. + * + * @param inner_radius radius of hole at center + * @param outer_radius radius at center of teeth + * @param width width of gear + * @param teeth number of teeth + * @param tooth_depth depth of tooth + */ + private void gear(float inner_radius, float outer_radius, float width, int teeth, float tooth_depth) { + int i; + float r0, r1, r2; + float angle, da; + float u, v, len; + + r0 = inner_radius; + r1 = outer_radius - tooth_depth / 2.0f; + r2 = outer_radius + tooth_depth / 2.0f; + + da = 2.0f * (float) Math.PI / teeth / 4.0f; + + glShadeModel(GL_FLAT); + + glNormal3f(0.0f, 0.0f, 1.0f); + + /* draw front face */ + glBegin(GL_QUAD_STRIP); + for (i = 0; i <= teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), width * 0.5f); + glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), width * 0.5f); + if (i < teeth) { + glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), width * 0.5f); + glVertex3f(r1 * (float) Math.cos(angle + 3.0f * da), r1 * (float) Math.sin(angle + 3.0f * da), + width * 0.5f); + } + } + glEnd(); + + /* draw front sides of teeth */ + glBegin(GL_QUADS); + for (i = 0; i < teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), width * 0.5f); + glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), width * 0.5f); + glVertex3f(r2 * (float) Math.cos(angle + 2.0f * da), r2 * (float) Math.sin(angle + 2.0f * da), width * 0.5f); + glVertex3f(r1 * (float) Math.cos(angle + 3.0f * da), r1 * (float) Math.sin(angle + 3.0f * da), width * 0.5f); + } + glEnd(); + + /* draw back face */ + glBegin(GL_QUAD_STRIP); + for (i = 0; i <= teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), -width * 0.5f); + glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), -width * 0.5f); + glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), -width * 0.5f); + glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), -width * 0.5f); + } + glEnd(); + + /* draw back sides of teeth */ + glBegin(GL_QUADS); + for (i = 0; i < teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), -width * 0.5f); + glVertex3f(r2 * (float) Math.cos(angle + 2 * da), r2 * (float) Math.sin(angle + 2 * da), -width * 0.5f); + glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), -width * 0.5f); + glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), -width * 0.5f); + } + glEnd(); + + /* draw outward faces of teeth */ + glBegin(GL_QUAD_STRIP); + for (i = 0; i < teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), width * 0.5f); + glVertex3f(r1 * (float) Math.cos(angle), r1 * (float) Math.sin(angle), -width * 0.5f); + u = r2 * (float) Math.cos(angle + da) - r1 * (float) Math.cos(angle); + v = r2 * (float) Math.sin(angle + da) - r1 * (float) Math.sin(angle); + len = (float) Math.sqrt(u * u + v * v); + u /= len; + v /= len; + glNormal3f(v, -u, 0.0f); + glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), width * 0.5f); + glVertex3f(r2 * (float) Math.cos(angle + da), r2 * (float) Math.sin(angle + da), -width * 0.5f); + glNormal3f((float) Math.cos(angle), (float) Math.sin(angle), 0.0f); + glVertex3f(r2 * (float) Math.cos(angle + 2 * da), r2 * (float) Math.sin(angle + 2 * da), width * 0.5f); + glVertex3f(r2 * (float) Math.cos(angle + 2 * da), r2 * (float) Math.sin(angle + 2 * da), -width * 0.5f); + u = r1 * (float) Math.cos(angle + 3 * da) - r2 * (float) Math.cos(angle + 2 * da); + v = r1 * (float) Math.sin(angle + 3 * da) - r2 * (float) Math.sin(angle + 2 * da); + glNormal3f(v, -u, 0.0f); + glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), width * 0.5f); + glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1 * (float) Math.sin(angle + 3 * da), -width * 0.5f); + glNormal3f((float) Math.cos(angle), (float) Math.sin(angle), 0.0f); + } + glVertex3f(r1 * (float) Math.cos(0), r1 * (float) Math.sin(0), width * 0.5f); + glVertex3f(r1 * (float) Math.cos(0), r1 * (float) Math.sin(0), -width * 0.5f); + glEnd(); + + glShadeModel(GL_SMOOTH); + + /* draw inside radius cylinder */ + glBegin(GL_QUAD_STRIP); + for (i = 0; i <= teeth; i++) { + angle = i * 2.0f * (float) Math.PI / teeth; + glNormal3f(-(float) Math.cos(angle), -(float) Math.sin(angle), 0.0f); + glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), -width * 0.5f); + glVertex3f(r0 * (float) Math.cos(angle), r0 * (float) Math.sin(angle), width * 0.5f); + } + glEnd(); + } + + public void destroy() { + glDeleteLists(gear1, 1); + glDeleteLists(gear2, 1); + glDeleteLists(gear3, 1); + initialized = false; + } + } + // -------------------------------------------------------- +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/awt/DisplayParentTest.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/awt/DisplayParentTest.java new file mode 100644 index 0000000..5f041d2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/awt/DisplayParentTest.java @@ -0,0 +1,133 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.opengl.awt; + +import java.awt.Canvas; +import java.awt.Frame; +import java.awt.GridLayout; +import java.awt.event.WindowAdapter; +import java.awt.event.WindowEvent; + +import org.lwjgl.LWJGLException; +import org.lwjgl.input.Keyboard; +import org.lwjgl.input.Mouse; +import org.lwjgl.opengl.Display; + +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.util.glu.GLU.*; + +/** + *

+ * Tests Display.setParent() + *

+ * @version $Revision$ + * @author $Author$ + * $Id$ + */ +public class DisplayParentTest extends Frame { + boolean killswitch; + public DisplayParentTest() throws LWJGLException { + setTitle("LWJGL Display Parent Test"); + setSize(640, 320); + setLayout(new GridLayout(1, 2)); + final Canvas display_parent = new Canvas(); + display_parent.setFocusable(true); + display_parent.setIgnoreRepaint(true); + add(display_parent); + addWindowListener(new WindowAdapter() { + public void windowClosing(WindowEvent e) { + killswitch = true; + } + }); + setResizable(true); + setVisible(true); + Display.setParent(display_parent); + Display.setVSyncEnabled(true); + Display.create(); + float angle = 0f; + + while (isVisible() && !killswitch) { + angle += 1.0f; + int width; + int height; + if (!Display.isFullscreen()) { + width = display_parent.getWidth(); + height = display_parent.getHeight(); + } else { + width = Display.getDisplayMode().getWidth(); + height = Display.getDisplayMode().getHeight(); + } + + if(width < 1 || height < 1) { + continue; + } + + glViewport(0, 0, width, height); + glClearColor(0.0f, 1.0f, 0.0f, 1.0f); + glClear(GL_COLOR_BUFFER_BIT); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluOrtho2D(0.0f, (float) width, 0.0f, (float) height); + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + glTranslatef(width / 2.0f, height / 2.0f, 0.0f); + glRotatef(2*angle, 0f, 0f, -1.0f); + glRectf(-50.0f, -50.0f, 50.0f, 50.0f); + glPopMatrix(); + Display.update(); + while(Keyboard.next()) { + // closing on ESCAPE + if(Keyboard.getEventKey() == Keyboard.KEY_ESCAPE && Keyboard.getEventKeyState()) { + Display.destroy(); + dispose(); + break; + } + + if(Keyboard.getEventKey() == Keyboard.KEY_SPACE && Keyboard.getEventKeyState()) { + Mouse.setGrabbed(!Mouse.isGrabbed()); + } + if(Keyboard.getEventKey() == Keyboard.KEY_F && Keyboard.getEventKeyState()) { + Display.setFullscreen(!Display.isFullscreen()); + } + } +/* while (Mouse.next()) { +System.out.println(" Mouse.getEventX() = " + Mouse.getEventX() + " | Mouse.getEventY() = " + Mouse.getEventY()); + }*/ + } + Display.destroy(); + dispose(); + } + + public static void main(String[] args) throws LWJGLException { + new DisplayParentTest(); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/multithread/BackgroundLoadTest.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/multithread/BackgroundLoadTest.java new file mode 100644 index 0000000..bf2326c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/multithread/BackgroundLoadTest.java @@ -0,0 +1,297 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.opengl.multithread; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.input.Keyboard; +import org.lwjgl.input.Mouse; +import org.lwjgl.opengl.*; +import org.lwjgl.util.glu.Sphere; + +import java.nio.FloatBuffer; + +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.util.glu.GLU.*; + +/** + * A test of loading textures in a background thread. This can be achieved in 2 ways: + *
+ * a) A dummy Pbuffer is created and its context shares the rendering context.
+ * b) A SharedDrawable is used.
+ *
+ * When the test starts, there's no texture created and rendering is done with texturing disabled. + * 2 seconds later a "dummy" texture is created in the background thread and texturing is enabled. This dummy texture + * can by anything the developer wants to have as a placeholder while textures are being loaded. + * Finally, 5 seconds later the "true" texture is loaded and displayed. This texture will change every 5 seconds after + * that, until the test is terminated (ESC key). + * + * @author Spasi + */ +public final class BackgroundLoadTest { + + private static boolean run = true; + + private static BackgroundLoader backgroundLoader; + + private static Sphere sphere; + + private BackgroundLoadTest() { + } + + public static void main(String[] args) { + initialize(args); + + Util.checkGLError(); + + try { + backgroundLoader.start(); + } catch (LWJGLException e) { + kill("Failed to start background thread.", e); + } + + Util.checkGLError(); + + while ( run ) { + if ( !Display.isVisible() ) + Thread.yield(); + else { + handleIO(); + + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + renderObject(); + + Util.checkGLError(); + + // Restore camera position. + glPopMatrix(); + glPushMatrix(); + } + + Display.update(); + + if ( Display.isCloseRequested() ) + break; + } + + cleanup(); + System.exit(0); + } + + private static void initialize(String[] args) { + if ( args.length != 1 ) + argsError(); + + DisplayMode displayMode = null; + + try { + DisplayMode[] modes = Display.getAvailableDisplayModes(); + + displayMode = chooseMode(modes, 1024, 768); + if ( displayMode == null ) + displayMode = chooseMode(modes, 800, 600); + if ( displayMode == null ) + displayMode = chooseMode(modes, 640, 480); + if ( displayMode == null ) + kill("Failed to set an appropriate display mode."); + + System.out.println("Setting display mode to: " + displayMode); + Display.setDisplayMode(displayMode); + Display.setTitle("Background Loading Test"); + Display.create(new PixelFormat(8, 24, 0)); + } catch (LWJGLException e) { + kill(e.getMessage()); + } + + glViewport(0, 0, displayMode.getWidth(), displayMode.getHeight()); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluPerspective(45, displayMode.getWidth() / (float)displayMode.getHeight(), 1.0f, 10.0f); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + + // Setup camera position. + glTranslatef(0.0f, 0.0f, -4.0f); + glRotatef(90.0f, 1.0f, 0.0f, 0.0f); + glPushMatrix(); + + glClearDepth(1.0f); + glDepthFunc(GL_LEQUAL); + + glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); + + glFrontFace(GL_CCW); + glPolygonMode(GL_FRONT, GL_FILL); + + glCullFace(GL_BACK); + glEnable(GL_CULL_FACE); + + glAlphaFunc(GL_GREATER, 0.0f); + glEnable(GL_ALPHA_TEST); + + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glDisable(GL_BLEND); + + glShadeModel(GL_SMOOTH); + + final FloatBuffer vectorBuffer = BufferUtils.createFloatBuffer(4); + + vectorBuffer.clear(); + vectorBuffer.put(0, 1.0f).put(1, 1.0f).put(2, 1.0f).put(3, 1.0f); + glLight(GL_LIGHT0, GL_DIFFUSE, vectorBuffer); + + vectorBuffer.put(0, 1.0f).put(1, 1.0f).put(2, 1.0f).put(3, 1.0f); + glLight(GL_LIGHT0, GL_AMBIENT, vectorBuffer); + + vectorBuffer.put(0, 1.0f).put(1, 1.0f).put(2, 0.5f).put(3, 1.0f); + glLight(GL_LIGHT0, GL_SPECULAR, vectorBuffer); + + vectorBuffer.put(0, -1.0f / 3.0f).put(1, 1.0f / 3.0f).put(2, 1.0f / 3.0f).put(3, 0.0f); // Infinite + glLight(GL_LIGHT0, GL_POSITION, vectorBuffer); + + vectorBuffer.put(0, 0.2f).put(1, 0.2f).put(2, 0.2f).put(3, 1.0f); + glLightModel(GL_LIGHT_MODEL_AMBIENT, vectorBuffer); + + glEnable(GL_LIGHT0); + glEnable(GL_LIGHTING); + + sphere = new Sphere(); + + if ( "PB".equalsIgnoreCase(args[0]) ) { + backgroundLoader = new BackgroundLoader() { + Drawable getDrawable() throws LWJGLException { + return new Pbuffer(2, 2, new PixelFormat(8, 24, 0), Display.getDrawable()); + } + }; + } else if ( "SD".equalsIgnoreCase(args[0]) ) { + backgroundLoader = new BackgroundLoader() { + Drawable getDrawable() throws LWJGLException { + return new SharedDrawable(Display.getDrawable()); + } + }; + } else { + argsError(); + } + } + + private static void handleIO() { + if ( Keyboard.getNumKeyboardEvents() != 0 ) { + while ( Keyboard.next() ) { + if ( Keyboard.getEventKeyState() ) + continue; + + switch ( Keyboard.getEventKey() ) { + case Keyboard.KEY_ESCAPE: + run = false; + break; + } + } + } + + while ( Mouse.next() ) ; + } + + static void renderObject() { + glColor3f(1.0f, 1.0f, 1.0f); + + int texID = backgroundLoader.getTexID(); + if ( texID == 0 ) { + sphere.setTextureFlag(false); + glDisable(GL_TEXTURE_2D); + } else { + sphere.setTextureFlag(true); + glEnable(GL_TEXTURE_2D); + glBindTexture(GL_TEXTURE_2D, texID); + } + + sphere.draw(1.0f, 32, 32); + + if ( texID != 0 ) { // Unbind so we can update from the background thread. + glBindTexture(GL_TEXTURE_2D, 0); + glDisable(GL_TEXTURE_2D); + } + } + + private static DisplayMode chooseMode(DisplayMode[] modes, int width, int height) { + DisplayMode bestMode = null; + + for ( DisplayMode mode : modes ) { + if ( mode.getWidth() == width && mode.getHeight() == height && mode.getFrequency() <= 85 ) { + if ( bestMode == null || (mode.getBitsPerPixel() >= bestMode.getBitsPerPixel() && mode.getFrequency() > bestMode.getFrequency()) ) + bestMode = mode; + } + } + + return bestMode; + } + + private static void cleanup() { + backgroundLoader.cleanup(); + + Thread.yield(); // Let background thread finish. + + if ( Display.isCreated() ) + Display.destroy(); + } + + private static void argsError() { + System.out.println("\nInvalid program arguments."); + System.out.println("\nUsage: BackgroundLoadTest , where argument can be one of the following:\n"); + System.out.println("PB\t- Use a Pbuffer context for the background thread."); + System.out.println("SD\t- Use a SharedDrawable context for the background thread."); + + cleanup(); + System.exit(-1); + } + + static void kill(String reason) { + System.out.println("The BackgroundLoadTest program was terminated because an error occured.\n"); + System.out.println("Reason: " + (reason == null ? "Unknown" : reason)); + + cleanup(); + System.exit(-1); + } + + static void kill(String reason, Throwable t) { + System.out.println("The BackgroundLoadTest program was terminated because an exception occured.\n"); + System.out.println("Reason: " + (reason == null ? "Unknown" : reason)); + + System.out.println("Exception message: " + t.getMessage()); + + cleanup(); + System.exit(-1); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/multithread/BackgroundLoader.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/multithread/BackgroundLoader.java new file mode 100644 index 0000000..c32f8d5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/multithread/BackgroundLoader.java @@ -0,0 +1,226 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +/* + * Created by LWJGL. + * User: spasi + * Date: 2004-03-30 + * Time: 8:41:42 pm + */ +package org.lwjgl.test.opengl.multithread; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.opengl.Drawable; +import org.lwjgl.opengl.GLContext; +import org.lwjgl.opengl.GLSync; +import org.lwjgl.util.Color; +import org.lwjgl.util.ReadableColor; + +import java.nio.ByteBuffer; +import java.util.concurrent.locks.ReentrantLock; + +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.opengl.GL32.*; + +abstract class BackgroundLoader { + + private static final int WIDTH = 32; + private static final int HEIGHT = 32; + + // CPU synchronization + private final ReentrantLock lock = new ReentrantLock(); + // GPU synchronization + private GLSync fence; + + private Drawable drawable; + + private boolean running; + + private ByteBuffer texture; + private int texID; + + protected BackgroundLoader() { + running = true; + texture = BufferUtils.createByteBuffer(WIDTH * HEIGHT * 3); + } + + abstract Drawable getDrawable() throws LWJGLException; + + void cleanup() { + running = false; + } + + void start() throws LWJGLException { + // The shared context must be created on the main thread. + drawable = getDrawable(); + + new Thread(new Runnable() { + public void run() { + System.out.println("-- Background Thread started --"); + + System.out.println("** Sleeping, no texture created yet **"); + + try { + Thread.sleep(2000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + + try { + // Make the shared context current in the worker thread + drawable.makeCurrent(); + } catch (LWJGLException e) { + throw new RuntimeException(e); + } + + System.out.println("** Drawable created **"); + + // Create a "dummy" texture while we wait for texture IO + createCheckerTexture(Color.RED, Color.WHITE, 2); + + lock.lock(); + + texID = glGenTextures(); + glBindTexture(GL_TEXTURE_2D, texID); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, WIDTH, HEIGHT, 0, GL_RGB, GL_UNSIGNED_BYTE, texture); + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + + glBindTexture(GL_TEXTURE_2D, 0); + + // OpenGL commands from different contexts may be executed in any order. So we need a way to synchronize + final boolean useFences = GLContext.getCapabilities().OpenGL32; + + if ( useFences ) + fence = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); + else + glFlush(); // Best we can do without fences. This will force rendering on the main thread to happen after we upload the texture. + + lock.unlock(); + + System.out.println("** Dummy texture created **"); + + long lastTextureCreated = System.currentTimeMillis(); // Delay first texture creation + int count = 0; + while ( running ) { + long time = System.currentTimeMillis(); + if ( time - lastTextureCreated < 5000 ) { // Update the texture every 5 seconds + try { + Thread.sleep(200); + } catch (InterruptedException e) { + e.printStackTrace(); + } + continue; + } + + // Create the "true" texture + if ( count % 2 == 0 ) + createGradientTexture(Color.RED, Color.BLUE); + else + createGradientTexture(Color.GREEN, Color.YELLOW); + + lock.lock(); + + glBindTexture(GL_TEXTURE_2D, texID); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, WIDTH, HEIGHT, 0, GL_RGB, GL_UNSIGNED_BYTE, texture); + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + + glBindTexture(GL_TEXTURE_2D, 0); + + if ( useFences ) + fence = glFenceSync(GL_SYNC_GPU_COMMANDS_COMPLETE, 0); + else + glFlush(); + + lock.unlock(); + + System.out.println("** Created new gradient texture **"); + + lastTextureCreated = System.currentTimeMillis(); + count++; + } + + drawable.destroy(); + + System.out.println("-- Background Thread finished --"); + } + }).start(); + } + + int getTexID() { + lock.lock(); + try { + if ( fence != null ) { + glWaitSync(fence, 0, GL_TIMEOUT_IGNORED); + fence = null; + } + return texID; + } finally { + lock.unlock(); + } + } + + private void createCheckerTexture(final ReadableColor a, final ReadableColor b, final int size) { + int i = 0; + for ( int y = 0; y < HEIGHT; y++ ) { + for ( int x = 0; x < WIDTH; x++ ) { + ReadableColor c = (x / size) % 2 == 0 ? ((y / size) % 2 == 0 ? a : b) : ((y / size) % 2 == 0 ? b : a); + texture.put(i + 0, c.getRedByte()); + texture.put(i + 1, c.getGreenByte()); + texture.put(i + 2, c.getBlueByte()); + i += 3; + } + } + } + + private void createGradientTexture(final ReadableColor a, final ReadableColor b) { + float l = 0.0f; + int i = 0; + for ( int y = 0; y < HEIGHT; y++ ) { + for ( int x = 0; x < WIDTH; x++ ) { + texture.put(i + 0, lerp(a.getRed(), b.getRed(), l)); + texture.put(i + 1, lerp(a.getGreen(), b.getGreen(), l)); + texture.put(i + 2, lerp(a.getBlue(), b.getBlue(), l)); + i += 3; + } + l += (1.0f / (HEIGHT - 1)); + } + } + + private static byte lerp(final int a, final int b, final float l) { + return (byte)Math.round(((1.0f - l) * a + l * b)); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/pbuffers/PbufferTest.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/pbuffers/PbufferTest.java new file mode 100644 index 0000000..f3ddea6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/pbuffers/PbufferTest.java @@ -0,0 +1,436 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.opengl.pbuffers; + +import java.nio.IntBuffer; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.input.Keyboard; +import org.lwjgl.opengl.Display; +import org.lwjgl.opengl.DisplayMode; +import org.lwjgl.opengl.Pbuffer; +import org.lwjgl.opengl.PixelFormat; +import org.lwjgl.util.vector.Vector2f; + +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.util.glu.GLU.*; + +/** + *

+ * Tests Pbuffers + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +public final class PbufferTest { + + /** + * Texture and pbuffer size + */ + private static final int TEXTURE_SIZE = 512; + + /** + * Size of the animated quad + */ + private static final int QUAD_SIZE = 64; + + /** + * The renderer to use when rendering to texture. + */ + private TextureRenderer texRenderer; + + /** + * Intended deiplay mode + */ + private DisplayMode mode; + + /** + * our quad moving around + */ + private Vector2f quadPosition; + + /** + * For positioning our quad in the texture + */ + private float texScaleX, texScaleY; + + /** + * our quadVelocity + */ + private Vector2f quadVelocity; + + /** + * angle of quad + */ + private float angle; + + /** + * degrees to rotate per frame + */ + private float angleRotation = 1.0f; + + /** + * Max speed of all changable attributes + */ + private static final float MAX_SPEED = 20.0f; + + /** + * The shared texture + */ + private static int texID; + + public PbufferTest(final int renderMode) { + try { + //find displaymode + mode = findDisplayMode(800, 600, 16); + Display.setDisplayMode(mode); + Display.create(new PixelFormat(16, 0, 0, 0, 0)); + + glInit(); + + if ( (Pbuffer.getCapabilities() & Pbuffer.PBUFFER_SUPPORTED) == 0 ) { + System.out.println("No Pbuffer support!"); + System.exit(-1); + } + System.out.println("Pbuffer support detected. Initializing...\n"); + + switch ( renderMode ) { + case 1: + System.out.print("Creating pbuffer with unique context..."); + texRenderer = new UniqueRenderer(TEXTURE_SIZE, TEXTURE_SIZE, texID); + break; + case 2: + System.out.print("Creating render-to-texture pbuffer with unique context..."); + texRenderer = new UniqueRendererRTT(TEXTURE_SIZE, TEXTURE_SIZE, texID); + break; + } + + System.out.println("OK"); + + quadPosition = new Vector2f(100f, 100f); + quadVelocity = new Vector2f(1.0f, 1.0f); + + texScaleX = TEXTURE_SIZE / (float)mode.getWidth(); + texScaleY = TEXTURE_SIZE / (float)mode.getHeight(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * Executes the test + */ + public void execute() { + mainLoop(); + cleanup(); + } + + /** + * Runs the main loop of the "test" + */ + private void mainLoop() { + while ( !Keyboard.isKeyDown(Keyboard.KEY_ESCAPE) && !Display.isCloseRequested() ) { + if ( Display.isVisible() ) { + // check keyboard input + processKeyboard(); + + // do "game" logic, and render it + logic(); + + render(); + } else { + // no need to render/paint if nothing has changed (ie. window dragged over) + if ( Display.isDirty() ) + render(); + + + // don't waste cpu time, sleep more + try { + Thread.sleep(100); + } catch (InterruptedException inte) { + } + } + // Update window + Display.update(); + // Sync + Display.sync(100); + } + } + + /** + * Performs the logic + */ + private void logic() { + angle += angleRotation; + if ( angle > 360.0f ) + angle -= 360.0f; + + quadPosition.x += quadVelocity.x; + quadPosition.y += quadVelocity.y; + + // check colision with vertical border border + if ( quadPosition.x + QUAD_SIZE >= mode.getWidth() || quadPosition.x - QUAD_SIZE <= 0 ) + quadVelocity.x *= -1; + + // check collision with horizontal border + if ( quadPosition.y + QUAD_SIZE >= mode.getHeight() || quadPosition.y - QUAD_SIZE <= 0 ) + quadVelocity.y *= -1; + } + + private void render() { + // ----------------------------------------------------------- + // -------------------- Pbuffer rendering -------------------- + // ----------------------------------------------------------- + // Tell the pbuffer to get ready for rendering + texRenderer.enable(); + + // Clear the background + glClear(GL_COLOR_BUFFER_BIT); + + // Draw quad with gradient + glPushMatrix(); + { + glTranslatef(quadPosition.x * texScaleX, quadPosition.y * texScaleY, 0); + glRotatef(angle, 0.0f, 0.0f, 1.0f); + glBegin(GL_QUADS); + { + glColor3f(1.0f, 0.0f, 0.0f); + glVertex2i(-QUAD_SIZE, -QUAD_SIZE); + glVertex2i(QUAD_SIZE, -QUAD_SIZE); + glColor3f(0.0f, 0.0f, 1.0f); + glVertex2i(QUAD_SIZE, QUAD_SIZE); + glVertex2i(-QUAD_SIZE, QUAD_SIZE); + } + glEnd(); + } + glPopMatrix(); + + // Refresh the texture + texRenderer.updateTexture(); + + // ----------------------------------------------------------- + // -------------------- Display rendering -------------------- + // ----------------------------------------------------------- + try { + Display.makeCurrent(); + } catch (LWJGLException e) { + throw new RuntimeException(e); + } + + glClear(GL_COLOR_BUFFER_BIT); + + // draw white quad + glPushMatrix(); + { + glTranslatef(quadPosition.x, quadPosition.y, 0); + glRotatef(angle, 0.0f, 0.0f, 1.0f); + glColor3f(1.0f, 1.0f, 1.0f); + glBegin(GL_QUADS); + { + glTexCoord2f(0f, 0f); + glVertex2i(-QUAD_SIZE, -QUAD_SIZE); + glTexCoord2f(1f, 0f); + glVertex2i(QUAD_SIZE, -QUAD_SIZE); + glTexCoord2f(1f, 1f); + glVertex2i(QUAD_SIZE, QUAD_SIZE); + glTexCoord2f(0f, 1f); + glVertex2i(-QUAD_SIZE, QUAD_SIZE); + } + glEnd(); + } + glPopMatrix(); + } + + /** + * Processes keyboard input + */ + private void processKeyboard() { + Keyboard.poll(); + + //check for fullscreen key + if ( Keyboard.isKeyDown(Keyboard.KEY_F) ) { + try { + Display.setDisplayMode(mode); + Display.setFullscreen(true); + } catch (Exception e) { + e.printStackTrace(); + } + } + + //check for window key + if ( Keyboard.isKeyDown(Keyboard.KEY_W) ) { + try { + Display.setFullscreen(false); + } catch (Exception e) { + e.printStackTrace(); + } + } + + //check for speed changes + if ( Keyboard.isKeyDown(Keyboard.KEY_UP) ) + quadVelocity.y += 0.1f; + if ( Keyboard.isKeyDown(Keyboard.KEY_DOWN) ) + quadVelocity.y -= 0.1f; + if ( Keyboard.isKeyDown(Keyboard.KEY_RIGHT) ) + quadVelocity.x += 0.1f; + if ( Keyboard.isKeyDown(Keyboard.KEY_LEFT) ) + quadVelocity.x -= 0.1f; + + if ( Keyboard.isKeyDown(Keyboard.KEY_ADD) ) + angleRotation += 0.1f; + if ( Keyboard.isKeyDown(Keyboard.KEY_SUBTRACT) ) + angleRotation -= 0.1f; + + //throttle + if ( quadVelocity.x < -MAX_SPEED ) + quadVelocity.x = -MAX_SPEED; + if ( quadVelocity.x > MAX_SPEED ) + quadVelocity.x = MAX_SPEED; + if ( quadVelocity.y < -MAX_SPEED ) + quadVelocity.y = -MAX_SPEED; + if ( quadVelocity.y > MAX_SPEED ) + quadVelocity.y = MAX_SPEED; + + if ( angleRotation < 0.0f ) + angleRotation = 0.0f; + if ( angleRotation > MAX_SPEED ) + angleRotation = MAX_SPEED; + } + + /** + * Cleans up the test + */ + private void cleanup() { + // Destroy texture + IntBuffer buffer = BufferUtils.createIntBuffer(1); + buffer.put(0, texID); + glDeleteTextures(buffer); + + texRenderer.destroy(); + Display.destroy(); + } + + /** + * Retrieves a displaymode, if one such is available + * + * @param width Required width + * @param height Required height + * @param bpp Minimum required bits per pixel + * + * @return + */ + private DisplayMode findDisplayMode(int width, int height, int bpp) throws LWJGLException { + DisplayMode[] modes = Display.getAvailableDisplayModes(); + for ( DisplayMode mode : modes ) { + if ( mode.getWidth() == width && mode.getHeight() == height && mode.getBitsPerPixel() >= bpp ) + return mode; + } + return null; + } + + static void initGLState(int width, int height, float color) { + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluOrtho2D(0, width, 0, height); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glViewport(0, 0, width, height); + + //set clear color + glClearColor(color, color, color, 0.0f); + } + + /** + * Initializes OGL + */ + private void glInit() { + // Sync frame (only works on windows) + Display.setVSyncEnabled(true); + + // Create shared texture + IntBuffer buffer = BufferUtils.createIntBuffer(1); + glGenTextures(buffer); + texID = buffer.get(0); + + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + glEnable(GL_TEXTURE_2D); + + glBindTexture(GL_TEXTURE_2D, texID); + + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + + initGLState(mode.getWidth(), mode.getHeight(), 0.0f); + } + + /** + * Test entry point + */ + public static void main(String[] args) { + if ( args.length != 1 ) + kill("Invalid arguments length."); + + int mode = -1; + try { + mode = Integer.parseInt(args[0]); + } catch (NumberFormatException e) { + kill("Invalid mode."); + } + + if ( mode != 1 && mode != 2 ) + kill("Invalid mode."); + + System.out.println("Change between fullscreen and windowed mode, by pressing F and W respectively"); + System.out.println("Move quad using arrowkeys, and change rotation using +/-"); + + PbufferTest test = new PbufferTest(mode); + + test.execute(); + System.exit(0); + } + + private static void kill(final String msg) { + System.out.println(msg); + System.out.println("-------"); + System.out.println("Usage: java org.lwjgl.test.opengl.pbuffer.PbufferTest "); + System.out.println("\n."); + System.out.println("\t1: no render-to-texture"); + System.out.println("\t2: with render-to-texture"); + + System.exit(-1); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/pbuffers/TextureRenderer.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/pbuffers/TextureRenderer.java new file mode 100644 index 0000000..a8a2f77 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/pbuffers/TextureRenderer.java @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.opengl.pbuffers; + +import org.lwjgl.LWJGLException; +import org.lwjgl.opengl.Pbuffer; + +/** + * Implementations of this class should create a pbuffer and implement "render-to-texture" accordingly. + */ +abstract class TextureRenderer { + + protected final int width; + protected final int height; + private final int texID; + + protected Pbuffer pbuffer; + + protected TextureRenderer(final int width, final int height, final int texID) { + this.width = width; + this.height = height; + this.texID = texID; + + try { + pbuffer = init(width, height, texID); + } catch (LWJGLException e) { + e.printStackTrace(); + System.exit(-1); + } + } + + /** + * Create and initialize the pbuffer. + * + * @param width + * @param height + * @param texID + * @return + * @throws LWJGLException + */ + protected abstract Pbuffer init(int width, int height, int texID) throws LWJGLException; + + /** + * This will be called before rendering to the renderer. Implementations should setup the pbuffer context as necessary. + */ + void enable() { + try { + if ( pbuffer.isBufferLost() ) { + System.out.println("Buffer contents lost - recreating the pbuffer"); + pbuffer.destroy(); + pbuffer = init(width, height, texID); + } + + pbuffer.makeCurrent(); + } catch (LWJGLException e) { + throw new RuntimeException(e); + } + } + + /** + * Implementations should update the texture contents here. + */ + abstract void updateTexture(); + + /** + * Clean-up resources held by the renderer + */ + final void destroy() { + pbuffer.destroy(); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/pbuffers/UniqueRenderer.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/pbuffers/UniqueRenderer.java new file mode 100644 index 0000000..4a4d8cd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/pbuffers/UniqueRenderer.java @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.opengl.pbuffers; + +import org.lwjgl.LWJGLException; +import org.lwjgl.opengl.Display; +import org.lwjgl.opengl.Pbuffer; +import org.lwjgl.opengl.PixelFormat; + +import static org.lwjgl.opengl.GL11.*; + +final class UniqueRenderer extends TextureRenderer { + + UniqueRenderer(final int width, final int height, final int texID) { + super(width, height, texID); + } + + protected Pbuffer init(final int width, final int height, final int texID) { + Pbuffer pbuffer = null; + + try { + pbuffer = new Pbuffer(width, height, new PixelFormat(16, 0, 0, 0, 0), null, null); + + // Initialise state of the pbuffer context. + pbuffer.makeCurrent(); + + PbufferTest.initGLState(width, height, 0.5f); + glBindTexture(GL_TEXTURE_2D, texID); + + Display.makeCurrent(); + } catch (LWJGLException e) { + e.printStackTrace(); + System.exit(-1); + } + + return pbuffer; + } + + public void updateTexture() { + // Copy the pbuffer contents to the texture. + glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, width, height, 0); + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/pbuffers/UniqueRendererRTT.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/pbuffers/UniqueRendererRTT.java new file mode 100644 index 0000000..0bdee34 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/pbuffers/UniqueRendererRTT.java @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.opengl.pbuffers; + +import org.lwjgl.LWJGLException; +import org.lwjgl.opengl.Display; +import org.lwjgl.opengl.Pbuffer; +import org.lwjgl.opengl.PixelFormat; +import org.lwjgl.opengl.RenderTexture; + +import static org.lwjgl.opengl.GL11.*; + +final class UniqueRendererRTT extends TextureRenderer { + + UniqueRendererRTT(final int width, final int height, final int texID) { + super(width, height, texID); + } + + // Initialize texture renderer + protected Pbuffer init(final int width, final int height, final int texID) { + Pbuffer pbuffer = null; + + try { + final RenderTexture rt = new RenderTexture(true, false, false, false, RenderTexture.RENDER_TEXTURE_2D, 0); + pbuffer = new Pbuffer(width, height, new PixelFormat(16, 0, 0, 0, 0), rt, null); + + // Initialise state of the pbuffer context. + pbuffer.makeCurrent(); + + PbufferTest.initGLState(width, height, 0.5f); + glBindTexture(GL_TEXTURE_2D, texID); + + Display.makeCurrent(); + } catch (LWJGLException e) { + e.printStackTrace(); + System.exit(-1); + } + + return pbuffer; + } + + void enable() { + super.enable(); + + // Put the renderer contents to the texture + pbuffer.releaseTexImage(Pbuffer.FRONT_LEFT_BUFFER); + } + + void updateTexture() { + // Bind the texture after rendering. + pbuffer.bindTexImage(Pbuffer.FRONT_LEFT_BUFFER); + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/Shader.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/Shader.java new file mode 100644 index 0000000..9251493 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/Shader.java @@ -0,0 +1,148 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +/* + * Created by LWJGL. + * User: spasi + * Date: 2004-03-30 + * Time: 8:41:42 pm + */ +package org.lwjgl.test.opengl.shaders; + +import org.lwjgl.BufferUtils; + +import java.io.BufferedInputStream; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.nio.ByteBuffer; + +import static org.lwjgl.opengl.ARBProgram.*; +import static org.lwjgl.opengl.ARBShaderObjects.*; +import static org.lwjgl.opengl.GL11.*; + +abstract class Shader { + + protected static ByteBuffer fileBuffer = BufferUtils.createByteBuffer(1024 * 10); + + protected Shader() { + } + + abstract void render(); + + abstract void cleanup(); + + protected static String getShaderText(String file) { + String shader = null; + + try { + InputStream source = ShadersTest.class.getResourceAsStream(file); + if ( source == null ) // dev-mode + source = new FileInputStream("src/java/org/lwjgl/test/opengl/shaders/" + file); + + BufferedInputStream stream = new BufferedInputStream(source); + + byte character; + while ( (character = (byte)stream.read()) != -1 ) + fileBuffer.put(character); + + stream.close(); + + fileBuffer.flip(); + + byte[] array = new byte[fileBuffer.remaining()]; + fileBuffer.get(array); + shader = new String(array); + + fileBuffer.clear(); + } catch (IOException e) { + ShadersTest.kill("Failed to read the shader source file: " + file, e); + } + + return shader; + } + + protected static void checkProgramError(String programFile, String programSource) { + if ( glGetError() == GL_INVALID_OPERATION ) { + final int errorPos = glGetInteger(GL_PROGRAM_ERROR_POSITION_ARB); + int lineStart = 0; + int lineEnd = -1; + for ( int i = 0; i < programSource.length(); i++ ) { + if ( programSource.charAt(i) == '\n' ) { + if ( i <= errorPos ) { + lineStart = i + 1; + } else { + lineEnd = i; + break; + } + } + } + + if ( lineEnd == -1 ) + lineEnd = programSource.length(); + + ShadersTest.kill("Low-level program error in file: " + programFile + + "\n\tError line: " + programSource.substring(lineStart, lineEnd) + + "\n\tError message: " + glGetString(GL_PROGRAM_ERROR_STRING_ARB)); + } + } + + protected static int getUniformLocation(int ID, String name) { + final int location = glGetUniformLocationARB(ID, name); + + if ( location == -1 ) + throw new IllegalArgumentException("The uniform \"" + name + "\" does not exist in the Shader Program."); + + return location; + } + + protected static void printShaderObjectInfoLog(String file, int ID) { + final int logLength = glGetObjectParameteriARB(ID, GL_OBJECT_INFO_LOG_LENGTH_ARB); + if ( logLength <= 1 ) + return; + + System.out.println("\nInfo Log of Shader Object: " + file); + System.out.println("--------------------------"); + System.out.println(glGetInfoLogARB(ID, logLength)); + + } + + protected static void printShaderProgramInfoLog(int ID) { + final int logLength = glGetObjectParameteriARB(ID, GL_OBJECT_INFO_LOG_LENGTH_ARB); + if ( logLength <= 1 ) + return; + + System.out.println("\nShader Program Info Log: "); + System.out.println("--------------------------"); + System.out.println(glGetInfoLogARB(ID, logLength)); + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/ShaderFP.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/ShaderFP.java new file mode 100644 index 0000000..dea6999 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/ShaderFP.java @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +/* + * Created by LWJGL. + * User: spasi + * Date: 2004-03-30 + * Time: 9:55:38 pm + */ + +package org.lwjgl.test.opengl.shaders; + +import org.lwjgl.opengl.ARBFragmentProgram; +import org.lwjgl.opengl.ARBVertexProgram; + +import static org.lwjgl.opengl.ARBProgram.*; +import static org.lwjgl.opengl.GL11.*; + +final class ShaderFP extends Shader { + + final String vpFile; + final String vpSource; + + final int vpID; + + final String fpFile; + final String fpSource; + + final int fpID; + + ShaderFP(final String vpShaderFile, final String fpShaderFile) { + // Initialize the vertex program. + vpFile = vpShaderFile; + vpSource = getShaderText(vpShaderFile); + + vpID = glGenProgramsARB(); + + glBindProgramARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, vpID); + glProgramStringARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, vpSource); + + checkProgramError(vpFile, vpSource); + + // Initialize the fragment program. + fpFile = fpShaderFile; + fpSource = getShaderText(fpShaderFile); + + fpID = glGenProgramsARB(); + + glBindProgramARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, fpID); + glProgramStringARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, fpSource); + + checkProgramError(fpFile, fpSource); + } + + void render() { + glEnable(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB); + glBindProgramARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, vpID); + + glEnable(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB); + glBindProgramARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, fpID); + + glProgramLocalParameter4fARB(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB, 0, + ShadersTest.getSin(), ShadersTest.getSpecularity() * 8.0f, 0.0f, 0.0f); + + glProgramLocalParameter4fARB(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB, 0, + ShadersTest.getSin(), ShadersTest.getSpecularity() * 8.0f, + -ShadersTest.getDisplayWidth() * 0.5f, -ShadersTest.getDisplayHeight() * 0.5f); + + ShadersTest.renderObject(); + + glDisable(ARBVertexProgram.GL_VERTEX_PROGRAM_ARB); + glDisable(ARBFragmentProgram.GL_FRAGMENT_PROGRAM_ARB); + } + + void cleanup() { + glDeleteProgramsARB(vpID); + glDeleteProgramsARB(fpID); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/ShaderFSH.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/ShaderFSH.java new file mode 100644 index 0000000..f094675 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/ShaderFSH.java @@ -0,0 +1,127 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +/* + * Created by LWJGL. + * User: spasi + * Date: 2004-03-30 + * Time: 9:55:38 pm + */ + +package org.lwjgl.test.opengl.shaders; + +import static org.lwjgl.opengl.ARBFragmentShader.*; +import static org.lwjgl.opengl.ARBShaderObjects.*; +import static org.lwjgl.opengl.ARBVertexShader.*; +import static org.lwjgl.opengl.GL11.*; + +final class ShaderFSH extends Shader { + + final String vshFile; + final String vshSource; + + final int vshID; + + final String fshFile; + final String fshSource; + + final int fshID; + + final int programID; + + final int uniformLocation; + + ShaderFSH(final String vshFile, final String fshFile) { + // Initialize the vertex shader. + this.vshFile = vshFile; + vshSource = getShaderText(vshFile); + + vshID = glCreateShaderObjectARB(GL_VERTEX_SHADER_ARB); + glShaderSourceARB(vshID, vshSource); + glCompileShaderARB(vshID); + + printShaderObjectInfoLog(this.vshFile, vshID); + + if ( glGetObjectParameteriARB(vshID, GL_OBJECT_COMPILE_STATUS_ARB) == GL_FALSE ) + ShadersTest.kill("A compilation error occured in a vertex shader."); + + // Initialize the fragment shader. + this.fshFile = fshFile; + fshSource = getShaderText(fshFile); + + fshID = glCreateShaderObjectARB(GL_FRAGMENT_SHADER_ARB); + glShaderSourceARB(fshID, fshSource); + glCompileShaderARB(fshID); + + printShaderObjectInfoLog(this.fshFile, fshID); + + if ( glGetObjectParameteriARB(fshID, GL_OBJECT_COMPILE_STATUS_ARB) == GL_FALSE ) + ShadersTest.kill("A compilation error occured in a fragment shader."); + + // Initialize the shader program. + programID = glCreateProgramObjectARB(); + + glAttachObjectARB(programID, vshID); + glAttachObjectARB(programID, fshID); + + glLinkProgramARB(programID); + + printShaderProgramInfoLog(programID); + + if ( glGetObjectParameteriARB(programID, GL_OBJECT_LINK_STATUS_ARB) == GL_FALSE ) + ShadersTest.kill("A linking error occured in a shader program."); + + uniformLocation = getUniformLocation(programID, "UNIFORMS"); + } + + void render() { + glUseProgramObjectARB(programID); + + glUniform4fARB(uniformLocation, + ShadersTest.getSin(), ShadersTest.getSpecularity() * 8.0f, + -ShadersTest.getDisplayWidth() * 0.5f, -ShadersTest.getDisplayHeight() * 0.5f); + + ShadersTest.renderObject(); + + glUseProgramObjectARB(0); + } + + void cleanup() { + glDetachObjectARB(programID, vshID); + glDetachObjectARB(programID, fshID); + + glDeleteObjectARB(vshID); + glDeleteObjectARB(fshID); + + glDeleteObjectARB(programID); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/ShaderUNI.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/ShaderUNI.java new file mode 100644 index 0000000..41ab082 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/ShaderUNI.java @@ -0,0 +1,169 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +/* + * Created by LWJGL. + * User: spasi + * Date: 2009-12-04 + */ + +package org.lwjgl.test.opengl.shaders; + +import org.lwjgl.BufferUtils; +import org.lwjgl.opengl.*; + +import java.nio.FloatBuffer; +import java.nio.IntBuffer; + +import static org.lwjgl.opengl.ARBUniformBufferObject.*; +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.opengl.GL15.*; +import static org.lwjgl.opengl.GL20.*; + +final class ShaderUNI extends Shader { + + final String file; + final String source; + + final int shaderID; + final int programID; + + final int bufferID; + final FloatBuffer buffer; + + final int uniformA_index; + final int uniformA_offset; + + final int uniformB_index; + final int uniformB_offset; + + ShaderUNI(final String shaderFile) { + file = shaderFile; + source = getShaderText(shaderFile); + + shaderID = glCreateShader(GL_VERTEX_SHADER); + glShaderSource(shaderID, source); + glCompileShader(shaderID); + + printShaderObjectInfoLog(file, shaderID); + + if ( glGetShaderi(shaderID, GL_COMPILE_STATUS) == GL_FALSE ) + ShadersTest.kill("A compilation error occured in a vertex shader."); + + programID = glCreateProgram(); + + glAttachShader(programID, shaderID); + glLinkProgram(programID); + + printShaderProgramInfoLog(programID); + + if ( glGetProgrami(programID, GL_LINK_STATUS) == GL_FALSE ) + ShadersTest.kill("A linking error occured in a shader program."); + + final String[] uniformNames = { "uniformA", "uniformB" }; + + // Get uniform block index and data size + final int blockIndex = glGetUniformBlockIndex(programID, "test"); + final int blockSize = glGetActiveUniformBlocki(programID, blockIndex, GL_UNIFORM_BLOCK_DATA_SIZE); + + System.out.println("blockSize = " + blockSize); + + // Create uniform buffer object and allocate a ByteBuffer + bufferID = glGenBuffers(); + glBindBuffer(GL_UNIFORM_BUFFER, bufferID); + glBufferData(GL_UNIFORM_BUFFER, blockSize, GL_DYNAMIC_DRAW); + buffer = BufferUtils.createFloatBuffer(blockSize); + + // Attach UBO and associate uniform block to binding point 0 + glBindBufferBase(GL_UNIFORM_BUFFER, 0, bufferID); + glUniformBlockBinding(programID, blockIndex, 0); + + // Get uniform information + IntBuffer indexes = BufferUtils.createIntBuffer(uniformNames.length); + IntBuffer params = BufferUtils.createIntBuffer(uniformNames.length); + + glGetUniformIndices(programID, uniformNames, indexes); + uniformA_index = indexes.get(0); + uniformB_index = indexes.get(1); + + glGetActiveUniforms(programID, indexes, GL_UNIFORM_OFFSET, params); + uniformA_offset = params.get(0); + uniformB_offset = params.get(1); + + System.out.println("\nuniformA index = " + uniformA_index); + System.out.println("uniformB index = " + uniformB_index); + + System.out.println("\nuniformA offset = " + uniformA_offset + " - should be 0 for std140"); + System.out.println("uniformB offset = " + uniformB_offset + " - should be 16 for std140"); + + Util.checkGLError(); + } + + void render() { + glUseProgram(programID); + + //* -- std140 layout + // Uniform A + buffer.put(0, ShadersTest.getSin()).put(1, ShadersTest.getSpecularity() * 8.0f); + // Uniform B - str140 alignment at 16 bytes + buffer.put(4, 0.0f).put(5, 0.7f).put(6, 0.0f); + + glBindBuffer(GL_UNIFORM_BUFFER, bufferID); + glBufferData(GL_UNIFORM_BUFFER, buffer, GL_DYNAMIC_DRAW); + //*/ + + /* -- non-std140 layout + // Uniform A + buffer.put(ShadersTest.getSin()).put(ShadersTest.getSpecularity() * 8.0f); + buffer.flip(); + glBufferSubData(GL_UNIFORM_BUFFER, uniformA_offset, buffer); + // Uniform B + buffer.clear(); + buffer.put(0.0f).put(0.7f).put(0.0f); + buffer.flip(); + glBufferSubData(GL_UNIFORM_BUFFER, uniformB_offset, buffer); + //*/ + + ShadersTest.renderObject(); + + glUseProgram(0); + } + + void cleanup() { + glDeleteBuffers(bufferID); + + glDetachShader(programID, shaderID); + + glDeleteShader(shaderID); + glDeleteProgram(programID); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/ShaderVP.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/ShaderVP.java new file mode 100644 index 0000000..b8d8678 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/ShaderVP.java @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +/* + * Created by LWJGL. + * User: spasi + * Date: 2004-03-30 + * Time: 9:55:38 pm + */ + +package org.lwjgl.test.opengl.shaders; + +import static org.lwjgl.opengl.ARBVertexProgram.*; +import static org.lwjgl.opengl.GL11.*; + +final class ShaderVP extends Shader { + + final String file; + final String source; + + final int ID; + + ShaderVP(final String shaderFile) { + file = shaderFile; + source = getShaderText(shaderFile); + + ID = glGenProgramsARB(); + + glBindProgramARB(GL_VERTEX_PROGRAM_ARB, ID); + glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, source); + + checkProgramError(file, source); + } + + void render() { + glEnable(GL_VERTEX_PROGRAM_ARB); + glBindProgramARB(GL_VERTEX_PROGRAM_ARB, ID); + + glProgramLocalParameter4fARB(GL_VERTEX_PROGRAM_ARB, 0, + ShadersTest.getSin(), ShadersTest.getSpecularity() * 8.0f, 0.0f, 0.0f); + + ShadersTest.renderObject(); + + glDisable(GL_VERTEX_PROGRAM_ARB); + } + + void cleanup() { + glDeleteProgramsARB(ID); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/ShaderVSH.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/ShaderVSH.java new file mode 100644 index 0000000..c8d0136 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/ShaderVSH.java @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +/* + * Created by LWJGL. + * User: spasi + * Date: 2004-03-30 + * Time: 9:55:38 pm + */ + +package org.lwjgl.test.opengl.shaders; + +import static org.lwjgl.opengl.ARBShaderObjects.*; +import static org.lwjgl.opengl.ARBVertexShader.*; +import static org.lwjgl.opengl.GL11.*; + +final class ShaderVSH extends Shader { + + final String file; + final String source; + + final int shaderID; + final int programID; + + final int uniformLocation; + + ShaderVSH(final String shaderFile) { + file = shaderFile; + source = getShaderText(shaderFile); + + shaderID = glCreateShaderObjectARB(GL_VERTEX_SHADER_ARB); + glShaderSourceARB(shaderID, source); + glCompileShaderARB(shaderID); + + printShaderObjectInfoLog(file, shaderID); + + if ( glGetObjectParameteriARB(shaderID, GL_OBJECT_COMPILE_STATUS_ARB) == GL_FALSE ) + ShadersTest.kill("A compilation error occured in a vertex shader."); + + programID = glCreateProgramObjectARB(); + + glAttachObjectARB(programID, shaderID); + glLinkProgramARB(programID); + + printShaderProgramInfoLog(programID); + + if ( glGetObjectParameteriARB(programID, GL_OBJECT_LINK_STATUS_ARB) == GL_FALSE ) + ShadersTest.kill("A linking error occured in a shader program."); + + uniformLocation = getUniformLocation(programID, "UNIFORMS"); + } + + void render() { + glUseProgramObjectARB(programID); + + glUniform2fARB(uniformLocation, ShadersTest.getSin(), ShadersTest.getSpecularity() * 8.0f); + + ShadersTest.renderObject(); + + glUseProgramObjectARB(0); + } + + void cleanup() { + glDetachObjectARB(programID, shaderID); + + glDeleteObjectARB(shaderID); + glDeleteObjectARB(programID); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/ShadersTest.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/ShadersTest.java new file mode 100644 index 0000000..dec42ad --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/ShadersTest.java @@ -0,0 +1,346 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +/* + * Created by LWJGL. + * User: spasi + * Date: 2004-03-30 + * Time: 8:41:42 pm + */ + +package org.lwjgl.test.opengl.shaders; + +import java.nio.FloatBuffer; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.Sys; +import org.lwjgl.input.Keyboard; +import org.lwjgl.input.Mouse; +import org.lwjgl.opengl.*; +import org.lwjgl.util.glu.Sphere; + +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.util.glu.GLU.*; + +public final class ShadersTest { + + private static DisplayMode displayMode; + + private static boolean run = true; + + private static final FloatBuffer vectorBuffer = BufferUtils.createFloatBuffer(4); + + private static Sphere sphere; + + private static Shader shader; + + private static float frameTime; + + private static float angle; + private static float sin; + private static int specularity = 4; + + private ShadersTest() { + } + + public static void main(String[] args) { + initialize(args); + + long frameStart; + long lastFrameTime = 0; + + while ( run ) { + if (!Display.isVisible() ) + Thread.yield(); + else { + // This is the current frame time. + frameStart = Sys.getTime(); + + // How many seconds passed since last frame. + frameTime = (float)((frameStart - lastFrameTime) / (double)Sys.getTimerResolution()); + + lastFrameTime = frameStart; + + //angle += frameTime * 90.0f; + angle += 0.1f; + sin = (float)Math.sin(Math.toRadians(angle)); + + handleIO(); + + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + if ( shader != null ) + shader.render(); + else + renderObject(); + + // Restore camera position. + glPopMatrix(); + glPushMatrix(); + } + + Display.update(); + + if ( Display.isCloseRequested() ) + break; + } + + cleanup(); + System.exit(0); + } + + private static void initialize(String[] args) { + if ( args.length != 1 ) + argsError(); + + try { + DisplayMode[] modes = Display.getAvailableDisplayModes(); + + DisplayMode displayMode; + + displayMode = chooseMode(modes, 1024, 768); + if ( displayMode == null ) + displayMode = chooseMode(modes, 800, 600); + if ( displayMode == null ) + displayMode = chooseMode(modes, 640, 480); + if ( displayMode == null ) + kill("Failed to set an appropriate display mode."); + + System.out.println("Setting display mode to: " + displayMode); + Display.setDisplayMode(displayMode); + Display.create(new PixelFormat(8, 24, 0)); + ShadersTest.displayMode = displayMode; + } catch (LWJGLException e) { + kill(e.getMessage()); + } + + final ContextCapabilities caps = GLContext.getCapabilities(); + + if ( "NONE".equalsIgnoreCase(args[0]) ) { + shader = null; + } else if ( "VP".equalsIgnoreCase(args[0]) ) { + if ( !caps.GL_ARB_vertex_program ) + kill("The ARB_vertex_program extension is not supported."); + + shader = new ShaderVP("shaderVP.vp"); + } else if ( "FP".equalsIgnoreCase(args[0]) ) { + if ( !caps.GL_ARB_vertex_program ) + kill("The ARB_vertex_program extension is not supported."); + if ( !caps.GL_ARB_fragment_program ) + kill("The ARB_fragment_program extension is not supported."); + + shader = new ShaderFP("shaderFP.vp", "shaderFP.fp"); + } else if ( "VSH".equalsIgnoreCase(args[0]) ) { + if ( !caps.GL_ARB_vertex_shader ) + kill("The ARB_vertex_shader extension is not supported."); + + shader = new ShaderVSH("shaderVSH.vsh"); + } else if ( "FSH".equalsIgnoreCase(args[0]) ) { + if ( !caps.GL_ARB_vertex_shader ) + kill("The ARB_vertex_shader extension is not supported."); + if ( !caps.GL_ARB_fragment_shader ) + kill("The ARB_fragment_shader extension is not supported."); + + shader = new ShaderFSH("shaderFSH.vsh", "shaderFSH.fsh"); + } else if ("UNI".equalsIgnoreCase(args[0]) ) { + if ( !(caps.OpenGL31 || caps.GL_ARB_uniform_buffer_object) ) + kill("Neither OpenGL version 3.1 nor ARB_uniform_buffer_object are supported."); + + shader = new ShaderUNI("shaderUNI.vsh"); + } else { + argsError(); + } + + glViewport(0, 0, displayMode.getWidth(), displayMode.getHeight()); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluPerspective(45, displayMode.getWidth() / (float)displayMode.getHeight(), 1.0f, 10.0f); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + + // Setup camera position. + glTranslatef(0.0f, 0.0f, -4.0f); + glRotatef(15.0f, 1.0f, 0.0f, 0.0f); + glPushMatrix(); + + glClearDepth(1.0f); + glDepthFunc(GL_LEQUAL); + + glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); + + glFrontFace(GL_CCW); + glPolygonMode(GL_FRONT, GL_FILL); + + glCullFace(GL_BACK); + glEnable(GL_CULL_FACE); + + glAlphaFunc(GL_NOTEQUAL, 0.0f); + glEnable(GL_ALPHA_TEST); + + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glEnable(GL_BLEND); + + // Setup lighting for when we have fixed function fragment rendering. + glShadeModel(GL_SMOOTH); + + if ( shader == null ) { + glEnable(GL_LIGHTING); + glEnable(GL_LIGHT0); + } + + vectorBuffer.clear(); + vectorBuffer.put(1.0f).put(1.0f).put(1.0f).put(1.0f); + vectorBuffer.clear(); + glLight(GL_LIGHT0, GL_DIFFUSE, vectorBuffer); + + vectorBuffer.put(1.0f).put(1.0f).put(1.0f).put(1.0f); + vectorBuffer.clear(); + glLight(GL_LIGHT0, GL_AMBIENT, vectorBuffer); + + vectorBuffer.put(1.0f).put(1.0f).put(0.5f).put(1.0f); + vectorBuffer.clear(); + glLight(GL_LIGHT0, GL_SPECULAR, vectorBuffer); + + vectorBuffer.put(-1.0f / 3.0f).put(1.0f / 3.0f).put(1.0f / 3.0f).put(0.0f); // Infinite + vectorBuffer.clear(); + glLight(GL_LIGHT0, GL_POSITION, vectorBuffer); + + vectorBuffer.put(0.2f).put(0.2f).put(0.2f).put(1.0f); + vectorBuffer.clear(); + glLightModel(GL_LIGHT_MODEL_AMBIENT, vectorBuffer); + + sphere = new Sphere(); + } + + private static void handleIO() { + if ( Keyboard.getNumKeyboardEvents() != 0 ) { + while ( Keyboard.next() ) { + if ( Keyboard.getEventKeyState() ) + continue; + + switch ( Keyboard.getEventKey() ) { + case Keyboard.KEY_EQUALS: + if ( specularity < 8 ) + specularity++; + break; + case Keyboard.KEY_MINUS: + if ( specularity > 1 ) + specularity--; + break; + case Keyboard.KEY_ESCAPE: + run = false; + break; + } + } + } + + while ( Mouse.next() ) ; + } + + static int getDisplayWidth() { + return displayMode.getWidth(); + } + + static int getDisplayHeight() { + return displayMode.getHeight(); + } + + static float getSin() { + return sin; + } + + static int getSpecularity() { + return specularity; + } + + static void renderObject() { + glColor3b((byte)255, (byte)255, (byte)255); + sphere.draw(1.0f, 32, 32); + } + + private static DisplayMode chooseMode(DisplayMode[] modes, int width, int height) { + DisplayMode bestMode = null; + + for ( DisplayMode mode : modes ) { + if ( mode.getWidth() == width && mode.getHeight() == height && mode.getFrequency() <= 85 ) { + if ( bestMode == null || (mode.getBitsPerPixel() >= bestMode.getBitsPerPixel() && mode.getFrequency() > bestMode.getFrequency()) ) + bestMode = mode; + } + } + + return bestMode; + } + + private static void cleanup() { + // This is not necessary, just showing how to properly delete a program/shader. + if ( shader != null ) + shader.cleanup(); + + if ( Display.isCreated() ) + Display.destroy(); + } + + private static void argsError() { + System.out.println("\nInvalid program arguments."); + System.out.println("\nUsage: ShadersTest , where argument can be one of the following:\n"); + System.out.println("none\t- Use fixed function rendering."); + System.out.println("vp\t- Use ARB_vertex_program (low-level) only."); + System.out.println("vsh\t- Use ARB_vertex_shader (GLSL) only."); + System.out.println("fp\t- Use ARB_vertex_program + ARB_fragment_program (low-level)."); + System.out.println("fsh\t- Use ARB_vertex_shader + ARB_fragment_shader (GLSL)."); + System.out.println("uni\t- Use ARB_uniform_buffer_object to update shader uniforms (GLSL)."); + + cleanup(); + System.exit(-1); + } + + static void kill(String reason) { + System.out.println("The ShaderTest program was terminated because an error occured.\n"); + System.out.println("Reason: " + (reason == null ? "Unknown" : reason)); + + cleanup(); + System.exit(-1); + } + + static void kill(String reason, Throwable t) { + System.out.println("The ShaderTest program was terminated because an exception occured.\n"); + System.out.println("Reason: " + reason == null ? "Unknown" : reason); + + System.out.println("Exception message: " + t.getMessage()); + + cleanup(); + System.exit(-1); + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/shaderFP.fp b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/shaderFP.fp new file mode 100644 index 0000000..bf11274 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/shaderFP.fp @@ -0,0 +1,40 @@ +!!ARBfp1.0 +OPTION ARB_precision_hint_fastest; + +ATTRIB winPos = fragment.position; +ATTRIB iDots = fragment.texcoord[0]; + +PARAM ambience = state.lightmodel.ambient; + +PARAM specularColor = state.light[0].specular; + +PARAM UNIFORMS = program.local[0]; + +TEMP temp; + +OUTPUT oColor = result.color; + +# Offset window-space fragment position. +ADD temp.xyz, winPos, UNIFORMS.zwxx; +# Normalize position. +DP3 temp.w, temp, temp; +RSQ temp.w, temp.w; +MUL temp.xy, temp, temp.w; + +# Multiply with current sin. +MUL temp.xy, temp, UNIFORMS.x; +# {-1..1} => {0..1} +MAD temp.xy, temp, 0.5, 0.5; +# Intensify colors. +MUL temp.xy, temp, 2.0; +MOV temp.z, 1.0; + +# Accumulate color contributions. +MAD temp.xyz, iDots.x, temp, ambience; +# Calculate ^ +POW temp.w, iDots.y, UNIFORMS.y; +MAD oColor.xyz, temp.w, specularColor, temp; + +MOV oColor.w, 1.0; + +END \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/shaderFP.vp b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/shaderFP.vp new file mode 100644 index 0000000..8b14a96 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/shaderFP.vp @@ -0,0 +1,37 @@ +!!ARBvp1.0 + +ATTRIB iPos = vertex.position; +ATTRIB iNormal = vertex.normal; + +PARAM mvp[4] = { state.matrix.mvp }; +PARAM mvIT[4] = { state.matrix.modelview.invtrans }; + +PARAM lightDir = state.light[0].position; +PARAM halfDir = state.light[0].half; + +PARAM UNIFORMS = program.local[0]; + +TEMP normal, dots; + +OUTPUT oPos = result.position; +OUTPUT oDots = result.texcoord[0]; + +# Transform the vertex to clip coordinates. +DP4 oPos.x, mvp[0], iPos; +DP4 oPos.y, mvp[1], iPos; +DP4 oPos.z, mvp[2], iPos; +DP4 oPos.w, mvp[3], iPos; + +# Transform the normal to eye coordinates. +DP3 normal.x, mvIT[0], iNormal; +DP3 normal.y, mvIT[1], iNormal; +DP3 normal.z, mvIT[2], iNormal; + +# Compute diffuse and specular dot products and clamp them. +DP3 dots.x, normal, lightDir; +MAX oDots.x, dots.x, 0.0; + +DP3 dots.y, normal, halfDir; +MAX oDots.y, dots.y, 0.0; + +END \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/shaderFSH.fsh b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/shaderFSH.fsh new file mode 100644 index 0000000..99567c2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/shaderFSH.fsh @@ -0,0 +1,21 @@ +uniform vec4 UNIFORMS; + +varying vec2 dots; + +void main(void) { + // Offset window-space fragment position. + vec3 color2D = vec3(gl_FragCoord + UNIFORMS.zwxx); + + // Normalize position. + // Multiply with current sin. + color2D.xy = normalize(color2D).xy * UNIFORMS.x; + // {-1..1} => {0..1} & Intensify colors. + color2D.xy = (vec2(color2D) * 0.5 + 0.5) * 2.0; + color2D.z = 1.0; + + // Accumulate color contributions. + // Hardcoded ambience and specular color, due to buggy drivers. + color2D = dots.x * color2D + vec3(0.2, 0.2, 0.2); + gl_FragColor.rgb = pow(dots.y, UNIFORMS.y) * vec3(1.0, 1.0, 0.5) + color2D; + gl_FragColor.a = 1.0; +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/shaderFSH.vsh b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/shaderFSH.vsh new file mode 100644 index 0000000..4fc5db3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/shaderFSH.vsh @@ -0,0 +1,13 @@ +uniform vec4 UNIFORMS; + +varying vec2 dots; + +void main(void) { + gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; + + vec3 normal = gl_NormalMatrix * gl_Normal; + + // Pass the dot products to the fragment shader. + dots.x = max(dot(normal, vec3(gl_LightSource[0].position)), 0.0); + dots.y = max(dot(normal, vec3(gl_LightSource[0].halfVector)), 0.0); +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/shaderUNI.vsh b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/shaderUNI.vsh new file mode 100644 index 0000000..d1fbd74 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/shaderUNI.vsh @@ -0,0 +1,28 @@ +#version 140 +#extension GL_ARB_uniform_buffer_object : enable + +layout(std140) uniform test { + vec2 uniformA; + vec3 uniformB; +}; + +void main(void) { + gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; + + vec3 normal = gl_NormalMatrix * gl_Normal; + + float diffuseDot = max(dot(normal, vec3(gl_LightSource[0].position)), 0.0); + float specularDot = max(dot(normal, vec3(gl_LightSource[0].halfVector)), 0.0); + specularDot = pow(specularDot, uniformA.y); + + // Normalize position, to get a {-1..1} value for each vertex. + // Multiply with current sin. + vec3 color3D = normalize(vec3(gl_Vertex)) * uniformA.x; + // {-1..1} => {0..1} & Intensify colors. + color3D = (color3D * 0.5 + 0.5) * 2.0; + + // Accumulate color contributions. + color3D = diffuseDot * (uniformB + color3D) + vec3(gl_LightModel.ambient); + gl_FrontColor.rgb = specularDot * vec3(gl_LightSource[0].specular) + color3D; + gl_FrontColor.a = 1.0; +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/shaderVP.vp b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/shaderVP.vp new file mode 100644 index 0000000..a410222 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/shaderVP.vp @@ -0,0 +1,59 @@ +!!ARBvp1.0 + +ATTRIB iPos = vertex.position; +ATTRIB iNormal = vertex.normal; + +PARAM mvp[4] = { state.matrix.mvp }; +PARAM mvIT[4] = { state.matrix.modelview.invtrans }; + +PARAM ambience = state.lightmodel.ambient; + +PARAM lightDir = state.light[0].position; +PARAM halfDir = state.light[0].half; +PARAM diffuseColor = state.light[0].diffuse; +PARAM specularColor = state.light[0].specular; + +PARAM UNIFORMS = program.local[0]; + +TEMP temp, temp2, normal, dots; + +OUTPUT oPos = result.position; +OUTPUT oColor = result.color; + +# Transform the vertex to clip coordinates. +DP4 oPos.x, mvp[0], iPos; +DP4 oPos.y, mvp[1], iPos; +DP4 oPos.z, mvp[2], iPos; +DP4 oPos.w, mvp[3], iPos; + +# Transform the normal to eye coordinates. +DP3 normal.x, mvIT[0], iNormal; +DP3 normal.y, mvIT[1], iNormal; +DP3 normal.z, mvIT[2], iNormal; + +# Compute diffuse and specular dot products and use LIT to compute +# lighting coefficients. +DP3 dots.x, normal, lightDir; +DP3 dots.y, normal, halfDir; +MOV dots.w, UNIFORMS.y; +LIT dots, dots; + +# Normalize position, to get a {-1..1} value for each vertex. +DP3 temp.w, iPos, iPos; +RSQ temp.w, temp.w; +MUL temp.xyz, iPos, temp.w; + +# Multiply with current sin. +MUL temp.xyz, temp, UNIFORMS.x; +# {-1..1} => {0..1} +MAD temp.xyz, temp, 0.5, 0.5; +# Intensify colors. +MUL temp.xyz, temp, 2.0; + +# Accumulate color contributions. +MAD temp.xyz, dots.y, temp, ambience; +MAD oColor.xyz, dots.z, specularColor, temp; +MOV oColor.w, 1.0; + + +END \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/shaderVSH.vsh b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/shaderVSH.vsh new file mode 100644 index 0000000..c34ae1b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/shaders/shaderVSH.vsh @@ -0,0 +1,22 @@ +uniform vec2 UNIFORMS; + +void main(void) { + gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; + + vec3 normal = gl_NormalMatrix * gl_Normal; + + float diffuseDot = max(dot(normal, vec3(gl_LightSource[0].position)), 0.0); + float specularDot = max(dot(normal, vec3(gl_LightSource[0].halfVector)), 0.0); + specularDot = pow(specularDot, UNIFORMS.y); + + // Normalize position, to get a {-1..1} value for each vertex. + // Multiply with current sin. + vec3 color3D = normalize(vec3(gl_Vertex)) * UNIFORMS.x; + // {-1..1} => {0..1} & Intensify colors. + color3D = (color3D * 0.5 + 0.5) * 2.0; + + // Accumulate color contributions. + color3D = diffuseDot * color3D + vec3(gl_LightModel.ambient); + gl_FrontColor.rgb = specularDot * vec3(gl_LightSource[0].specular) + color3D; + gl_FrontColor.a = 1.0; +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/sprites/SpriteShootout.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/sprites/SpriteShootout.java new file mode 100644 index 0000000..70c3ceb --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/sprites/SpriteShootout.java @@ -0,0 +1,752 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.opengl.sprites; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.Sys; +import org.lwjgl.input.Keyboard; +import org.lwjgl.input.Mouse; +import org.lwjgl.opengl.*; + +import java.awt.image.BufferedImage; +import java.awt.image.Raster; +import java.io.IOException; +import java.nio.ByteBuffer; +import java.nio.FloatBuffer; +import java.util.Random; +import javax.imageio.ImageIO; + +import static org.lwjgl.opengl.EXTTransformFeedback.*; +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.opengl.GL12.*; +import static org.lwjgl.opengl.GL15.*; +import static org.lwjgl.opengl.GL20.*; +import static org.lwjgl.opengl.GL30.*; + +/** + * Sprite rendering demo. Three implementations are supported: + * a) CPU animation + BufferData VBO update. + * b) CPU animation + MapBufferRange VBO update. + * c) GPU animation using transform feedback with a vertex shader. + * + * @author Spasi + * @since 18/3/2011 + */ +public final class SpriteShootout { + + static final int SCREEN_WIDTH = 800; + static final int SCREEN_HEIGHT = 600; + + private static final int ANIMATION_TICKS = 60; + + private boolean run = true; + private boolean render = true; + private boolean colorMask = true; + private boolean animate = true; + private boolean smooth; + private boolean vsync; + + int ballSize = 42; + int ballCount = 100 * 1000; + + private SpriteRenderer renderer; + + // OpenGL stuff + private int texID; + private int texBigID; + private int texSmallID; + + long animateTime; + + private SpriteShootout() { + } + + public static void main(String[] args) { + try { + new SpriteShootout().start(); + } catch (LWJGLException e) { + e.printStackTrace(); + } + } + + private void start() throws LWJGLException { + try { + initGL(); + + final ContextCapabilities caps = GLContext.getCapabilities(); + if ( caps.OpenGL30 || caps.GL_EXT_transform_feedback ) + renderer = new SpriteRendererTF(); + else if ( caps.GL_ARB_map_buffer_range ) + renderer = new SpriteRendererMapped(); + else + renderer = new SpriteRendererPlain(); + + updateBalls(ballCount); + run(); + } catch (Throwable t) { + t.printStackTrace(); + } finally { + destroy(); + } + } + + private void initGL() throws LWJGLException { + Display.setLocation((Display.getDisplayMode().getWidth() - SCREEN_WIDTH) / 2, + (Display.getDisplayMode().getHeight() - SCREEN_HEIGHT) / 2); + Display.setDisplayMode(new DisplayMode(SCREEN_WIDTH, SCREEN_HEIGHT)); + Display.setTitle("Sprite Shootout"); + Display.create(); + //Display.create(new PixelFormat(), new ContextAttribs(4, 1).withProfileCompatibility(true).withDebug(true)); + //AMDDebugOutput.glDebugMessageCallbackAMD(new AMDDebugOutputCallback()); + + final ContextCapabilities caps = GLContext.getCapabilities(); + if ( !GLContext.getCapabilities().OpenGL20 ) + throw new RuntimeException("OpenGL 2.0 is required for this demo."); + + // Setup viewport + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(0, SCREEN_WIDTH, 0, SCREEN_HEIGHT, -1.0, 1.0); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glViewport(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + + glClearColor(1.0f, 1.0f, 1.0f, 0.0f); + + // Create textures + + try { + texSmallID = createTexture("res/ball_sm.png"); + texBigID = createTexture("res/ball.png"); + } catch (IOException e) { + e.printStackTrace(); + System.exit(-1); + } + texID = texBigID; + + // Setup rendering state + + glEnable(GL_BLEND); + glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); + + glEnable(GL_ALPHA_TEST); + glAlphaFunc(GL_GREATER, 0.0f); + + glColorMask(colorMask, colorMask, colorMask, false); + glDepthMask(false); + glDisable(GL_DEPTH_TEST); + + if ( caps.GL_ARB_compatibility || !caps.OpenGL31 ) + glEnable(GL_POINT_SPRITE); + + // Setup geometry + + glEnableClientState(GL_VERTEX_ARRAY); + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + + Util.checkGLError(); + } + + private static int createTexture(final String path) throws IOException { + final BufferedImage img = ImageIO.read(SpriteShootout.class.getClassLoader().getResource(path)); + + final int w = img.getWidth(); + final int h = img.getHeight(); + + final ByteBuffer buffer = readImage(img); + + final int texID = glGenTextures(); + + glBindTexture(GL_TEXTURE_2D, texID); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_BGRA, GL_UNSIGNED_BYTE, buffer); + + return texID; + } + + private static ByteBuffer readImage(final BufferedImage img) throws IOException { + final Raster raster = img.getRaster(); + + final int bands = raster.getNumBands(); + + final int w = img.getWidth(); + final int h = img.getHeight(); + + final int size = w * h * bands; + + final byte[] pixels = new byte[size]; + raster.getDataElements(0, 0, w, h, pixels); + + final ByteBuffer pbuffer = BufferUtils.createByteBuffer(size); + + if ( bands == 4 ) { + for ( int i = 0; i < (w * h * 4); i += 4 ) { + // Pre-multiply alpha + final float a = unpackUByte01(pixels[i + 3]); + pbuffer.put(packUByte01(unpackUByte01(pixels[i + 2]) * a)); + pbuffer.put(packUByte01(unpackUByte01(pixels[i + 1]) * a)); + pbuffer.put(packUByte01(unpackUByte01(pixels[i + 0]) * a)); + pbuffer.put(pixels[i + 3]); + } + } else if ( bands == 3 ) { + for ( int i = 0; i < (w * h * 3); i += 3 ) { + pbuffer.put(pixels[i + 2]); + pbuffer.put(pixels[i + 1]); + pbuffer.put(pixels[i + 0]); + } + } else + pbuffer.put(pixels, 0, size); + + pbuffer.flip(); + + return pbuffer; + } + + private static float unpackUByte01(final byte x) { + return (x & 0xFF) / 255.0f; + } + + private static byte packUByte01(final float x) { + return (byte)(x * 255.0f); + } + + private void updateBalls(final int count) { + System.out.println("NUMBER OF BALLS: " + count); + renderer.updateBalls(ballCount); + } + + private void run() { + long startTime = System.currentTimeMillis() + 5000; + long fps = 0; + + long time = Sys.getTime(); + final int ticksPerUpdate = (int)(Sys.getTimerResolution() / ANIMATION_TICKS); + + renderer.render(false, true, 0); + + while ( run ) { + Display.processMessages(); + handleInput(); + + glClear(GL_COLOR_BUFFER_BIT); + + final long currTime = Sys.getTime(); + final int delta = (int)(currTime - time); + if ( smooth || delta >= ticksPerUpdate ) { + renderer.render(render, animate, delta); + time = currTime; + } else + renderer.render(render, false, 0); + + Display.update(false); + //Display.sync(60); + + if ( startTime > System.currentTimeMillis() ) { + fps++; + } else { + long timeUsed = 5000 + (startTime - System.currentTimeMillis()); + startTime = System.currentTimeMillis() + 5000; + System.out.println("FPS: " + (Math.round(fps / (timeUsed / 1000.0) * 10) / 10.0) + ", Balls: " + ballCount); + System.out.println("\tAnimation: " + (animateTime / fps / 1000) + "us"); + animateTime = 0; + fps = 0; + } + } + } + + private void handleInput() { + if ( Display.isCloseRequested() ) + run = false; + + while ( Keyboard.next() ) { + if ( Keyboard.getEventKeyState() ) + continue; + + switch ( Keyboard.getEventKey() ) { + case Keyboard.KEY_1: + case Keyboard.KEY_2: + case Keyboard.KEY_3: + case Keyboard.KEY_4: + case Keyboard.KEY_5: + case Keyboard.KEY_6: + case Keyboard.KEY_7: + case Keyboard.KEY_8: + case Keyboard.KEY_9: + case Keyboard.KEY_0: + ballCount = 1 << (Keyboard.getEventKey() - Keyboard.KEY_1); + updateBalls(ballCount); + break; + case Keyboard.KEY_ADD: + case Keyboard.KEY_SUBTRACT: + int mult; + if ( Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) ) + mult = 1000; + else if ( Keyboard.isKeyDown(Keyboard.KEY_LMENU) || Keyboard.isKeyDown(Keyboard.KEY_RMENU) ) + mult = 100; + else if ( Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) || Keyboard.isKeyDown(Keyboard.KEY_RCONTROL) ) + mult = 10; + else + mult = 1; + if ( Keyboard.getEventKey() == Keyboard.KEY_SUBTRACT ) + mult = -mult; + ballCount += mult * 100; + if ( ballCount <= 0 ) + ballCount = 1; + updateBalls(ballCount); + break; + case Keyboard.KEY_ESCAPE: + run = false; + break; + case Keyboard.KEY_A: + animate = !animate; + System.out.println("Animation is now " + (animate ? "on" : "off") + "."); + break; + case Keyboard.KEY_C: + colorMask = !colorMask; + glColorMask(colorMask, colorMask, colorMask, false); + System.out.println("Color mask is now " + (colorMask ? "on" : "off") + "."); + // Disable alpha test when color mask is off, else we get no benefit. + if ( colorMask ) { + glEnable(GL_BLEND); + glEnable(GL_ALPHA_TEST); + } else { + glDisable(GL_BLEND); + glDisable(GL_ALPHA_TEST); + } + break; + case Keyboard.KEY_R: + render = !render; + System.out.println("Rendering is now " + (render ? "on" : "off") + "."); + break; + case Keyboard.KEY_S: + smooth = !smooth; + System.out.println("Smooth animation is now " + (smooth ? "on" : "off") + "."); + break; + case Keyboard.KEY_T: + if ( texID == texBigID ) { + texID = texSmallID; + ballSize = 16; + } else { + texID = texBigID; + ballSize = 42; + } + renderer.updateBallSize(); + glBindTexture(GL_TEXTURE_2D, texID); + System.out.println("Now using the " + (texID == texBigID ? "big" : "small") + " texture."); + break; + case Keyboard.KEY_V: + vsync = !vsync; + Display.setVSyncEnabled(vsync); + System.out.println("VSYNC is now " + (vsync ? "enabled" : "disabled") + "."); + break; + } + } + + while ( Mouse.next() ) ; + } + + private void destroy() { + Display.destroy(); + } + + private abstract class SpriteRenderer { + + protected float[] transform = { }; + + protected int vshID; + protected int progID; + + protected void createProgram() { + final int fshID = glCreateShader(GL_FRAGMENT_SHADER); + glShaderSource(fshID, "uniform sampler2D COLOR_MAP;\n" + + "void main(void) {\n" + + " gl_FragColor = texture2D(COLOR_MAP, gl_PointCoord);\n" + + "}"); + glCompileShader(fshID); + if ( glGetShaderi(fshID, GL_COMPILE_STATUS) == GL_FALSE ) { + System.out.println(glGetShaderInfoLog(fshID, glGetShaderi(fshID, GL_INFO_LOG_LENGTH))); + throw new RuntimeException("Failed to compile fragment shader."); + } + + progID = glCreateProgram(); + glAttachShader(progID, vshID); + glAttachShader(progID, fshID); + glLinkProgram(progID); + if ( glGetProgrami(progID, GL_LINK_STATUS) == GL_FALSE ) { + System.out.println(glGetProgramInfoLog(progID, glGetProgrami(progID, GL_INFO_LOG_LENGTH))); + throw new RuntimeException("Failed to link shader program."); + } + + glUseProgram(progID); + glUniform1i(glGetUniformLocation(progID, "COLOR_MAP"), 0); + + updateBallSize(); + + glEnableClientState(GL_VERTEX_ARRAY); + } + + public void updateBallSize() { + glPointSize(ballSize); + } + + public void updateBalls(final int count) { + final Random random = new Random(); + + final float[] newTransform = new float[count * 4]; + System.arraycopy(transform, 0, newTransform, 0, Math.min(transform.length, newTransform.length)); + if ( newTransform.length > transform.length ) { + for ( int i = transform.length; i < newTransform.length; ) { + newTransform[i++] = (int)(random.nextFloat() * (SCREEN_WIDTH - ballSize) + ballSize * 0.5f); + newTransform[i++] = (int)(random.nextFloat() * (SCREEN_HEIGHT - ballSize) + ballSize * 0.5f); + newTransform[i++] = random.nextFloat() * 0.4f - 0.2f; + newTransform[i++] = random.nextFloat() * 0.4f - 0.2f; + } + } + transform = newTransform; + } + + protected void animate( + final float[] sprites, + final FloatBuffer spritesRender, + final int ballSize, final int ballIndex, final int batchSize, final int delta + ) { + final float ballRadius = ballSize * 0.5f; + final float boundW = SCREEN_WIDTH - ballRadius; + final float boundH = SCREEN_HEIGHT - ballRadius; + + for ( int b = ballIndex * 4, len = (ballIndex + batchSize) * 4; b < len; b += 4 ) { + float x = sprites[b + 0]; + float dx = sprites[b + 2]; + + x += dx * delta; + if ( x < ballRadius ) { + x = ballRadius; + sprites[b + 2] = -dx; + } else if ( x > boundW ) { + x = boundW; + sprites[b + 2] = -dx; + } + sprites[b + 0] = x; + + float y = sprites[b + 1]; + float dy = sprites[b + 3]; + + y += dy * delta; + if ( y < ballRadius ) { + y = ballRadius; + sprites[b + 3] = -dy; + } else if ( y > boundH ) { + y = boundH; + sprites[b + 3] = -dy; + } + sprites[b + 1] = y; + + spritesRender.put(x).put(y); + } + spritesRender.clear(); + } + + protected abstract void render(boolean render, boolean animate, int delta); + + } + + private abstract class SpriteRendererBatched extends SpriteRenderer { + + protected static final int BALLS_PER_BATCH = 10 * 1000; + + SpriteRendererBatched() { + vshID = glCreateShader(GL_VERTEX_SHADER); + glShaderSource(vshID, "void main(void) {\n" + + " gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n" + + "}"); + glCompileShader(vshID); + if ( glGetShaderi(vshID, GL_COMPILE_STATUS) == GL_FALSE ) { + System.out.println(glGetShaderInfoLog(vshID, glGetShaderi(vshID, GL_INFO_LOG_LENGTH))); + throw new RuntimeException("Failed to compile vertex shader."); + } + + createProgram(); + } + + } + + private class SpriteRendererPlain extends SpriteRendererBatched { + + private final FloatBuffer geom; + + protected int[] animVBO; + + SpriteRendererPlain() { + System.out.println("Shootout Implementation: CPU animation & BufferData"); + geom = BufferUtils.createFloatBuffer(BALLS_PER_BATCH * 4 * 2); + } + + public void updateBalls(final int count) { + super.updateBalls(count); + + final int batchCount = count / BALLS_PER_BATCH + (count % BALLS_PER_BATCH == 0 ? 0 : 1); + if ( animVBO != null && batchCount == animVBO.length ) + return; + + final int[] newAnimVBO = new int[batchCount]; + if ( animVBO != null ) { + System.arraycopy(animVBO, 0, newAnimVBO, 0, Math.min(animVBO.length, newAnimVBO.length)); + for ( int i = newAnimVBO.length; i < animVBO.length; i++ ) + glDeleteBuffers(animVBO[i]); + } + for ( int i = animVBO == null ? 0 : animVBO.length; i < newAnimVBO.length; i++ ) { + newAnimVBO[i] = glGenBuffers(); + glBindBuffer(GL_ARRAY_BUFFER, newAnimVBO[i]); + } + + animVBO = newAnimVBO; + } + + public void render(final boolean render, final boolean animate, final int delta) { + int batchSize = Math.min(ballCount, BALLS_PER_BATCH); + int ballIndex = 0; + int vboIndex = 0; + while ( ballIndex < ballCount ) { + glBindBuffer(GL_ARRAY_BUFFER, animVBO[vboIndex++]); + + if ( animate ) + animate(ballIndex, batchSize, delta); + + if ( render ) { + glVertexPointer(2, GL_FLOAT, 0, 0); + glDrawArrays(GL_POINTS, 0, batchSize); + } + + ballIndex += batchSize; + batchSize = Math.min(ballCount - ballIndex, BALLS_PER_BATCH); + } + } + + private void animate(final int ballIndex, final int batchSize, final int delta) { + animate(transform, geom, ballSize, ballIndex, batchSize, delta); + + // Orphan current buffer and allocate a new one + glBufferData(GL_ARRAY_BUFFER, geom.capacity() * 4, GL_STREAM_DRAW); + glBufferSubData(GL_ARRAY_BUFFER, 0, geom); + } + } + + private class SpriteRendererMapped extends SpriteRendererBatched { + + private StreamVBO animVBO; + + SpriteRendererMapped() { + System.out.println("Shootout Implementation: CPU animation & MapBufferRange"); + } + + public void updateBalls(final int count) { + super.updateBalls(count); + + if ( animVBO != null ) + animVBO.destroy(); + + animVBO = new StreamVBO(GL_ARRAY_BUFFER, ballCount * (2 * 4)); + } + + public void render(final boolean render, final boolean animate, final int delta) { + int batchSize = Math.min(ballCount, BALLS_PER_BATCH); + int ballIndex = 0; + while ( ballIndex < ballCount ) { + if ( animate ) { + final ByteBuffer buffer = animVBO.map(batchSize * (2 * 4)); + + long t0 = System.nanoTime(); + animate(transform, buffer.asFloatBuffer(), ballSize, ballIndex, batchSize, delta); + long t1 = System.nanoTime(); + + animateTime += t1 - t0; + + animVBO.unmap(); + } + + if ( render ) { + glVertexPointer(2, GL_FLOAT, 0, ballIndex * (2 * 4)); + glDrawArrays(GL_POINTS, 0, batchSize); + } + + ballIndex += batchSize; + batchSize = Math.min(ballCount - ballIndex, BALLS_PER_BATCH); + } + } + } + + private class SpriteRendererTF extends SpriteRenderer { + + private int progIDTF; + private int ballSizeLoc; + private int deltaLoc; + + private int[] tfVBO = new int[2]; + private int currVBO; + + SpriteRendererTF() { + System.out.println("Shootout Implementation: TF GPU animation"); + + // Transform-feedback program + + final int vshID = glCreateShader(GL_VERTEX_SHADER); + glShaderSource(vshID, "#version 130\n" + + "const float WIDTH = " + SCREEN_WIDTH + ";\n" + + "const float HEIGHT = " + SCREEN_HEIGHT + ";\n" + + "uniform float ballSize;\n" + // ballSize / 2 + "uniform float delta;\n" + + "void main(void) {\n" + + " vec4 anim = gl_Vertex;\n" + + " anim.xy = anim.xy + anim.zw * delta;\n" + + " vec2 animC = clamp(anim.xy, vec2(ballSize), vec2(WIDTH - ballSize, HEIGHT - ballSize));\n" + + " if ( anim.x != animC.x ) anim.z = -anim.z;\n" + + " if ( anim.y != animC.y ) anim.w = -anim.w;\n" + + " gl_Position = vec4(animC, anim.zw);\n" + + "}"); + glCompileShader(vshID); + if ( glGetShaderi(vshID, GL_COMPILE_STATUS) == GL_FALSE ) { + System.out.println(glGetShaderInfoLog(vshID, glGetShaderi(vshID, GL_INFO_LOG_LENGTH))); + throw new RuntimeException("Failed to compile vertex shader."); + } + + progIDTF = glCreateProgram(); + glAttachShader(progIDTF, vshID); + glTransformFeedbackVaryings(progIDTF, new CharSequence[] { "gl_Position" }, GL_SEPARATE_ATTRIBS); + glLinkProgram(progIDTF); + if ( glGetProgrami(progIDTF, GL_LINK_STATUS) == GL_FALSE ) { + System.out.println(glGetProgramInfoLog(progIDTF, glGetProgrami(progIDTF, GL_INFO_LOG_LENGTH))); + throw new RuntimeException("Failed to link shader program."); + } + + glUseProgram(progIDTF); + + ballSizeLoc = glGetUniformLocation(progIDTF, "ballSize"); + deltaLoc = glGetUniformLocation(progIDTF, "delta"); + + glUniform1f(ballSizeLoc, ballSize * 0.5f); + + // ----------------- + + this.vshID = glCreateShader(GL_VERTEX_SHADER); + glShaderSource(this.vshID, "void main(void) {\n" + + " gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n" + + "}"); + glCompileShader(this.vshID); + if ( glGetShaderi(this.vshID, GL_COMPILE_STATUS) == GL_FALSE ) { + System.out.println(glGetShaderInfoLog(this.vshID, glGetShaderi(this.vshID, GL_INFO_LOG_LENGTH))); + throw new RuntimeException("Failed to compile vertex shader."); + } + + createProgram(); + } + + public void updateBallSize() { + glUseProgram(progIDTF); + glUniform1f(ballSizeLoc, ballSize * 0.5f); + + glUseProgram(progID); + super.updateBallSize(); + } + + public void updateBalls(final int count) { + if ( tfVBO[0] != 0 ) { + // Fetch current animation state + final FloatBuffer state = BufferUtils.createFloatBuffer(transform.length); + glGetBufferSubData(GL_TRANSFORM_FEEDBACK_BUFFER, 0, state); + state.get(transform); + } + + super.updateBalls(count); + + if ( tfVBO[0] != 0 ) { + for ( int i = 0; i < tfVBO.length; i++ ) + glDeleteBuffers(tfVBO[i]); + } + + final FloatBuffer state = BufferUtils.createFloatBuffer(count * 4); + state.put(transform); + state.flip(); + + for ( int i = 0; i < tfVBO.length; i++ ) { + tfVBO[i] = glGenBuffers(); + glBindBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, tfVBO[i]); + glBufferData(GL_TRANSFORM_FEEDBACK_BUFFER, state, GL_STATIC_DRAW); + } + + glBindBuffer(GL_ARRAY_BUFFER, tfVBO[0]); + glVertexPointer(2, GL_FLOAT, (4 * 4), 0); + } + + public void render(final boolean render, final boolean animate, final int delta) { + if ( animate ) { + glUseProgram(progIDTF); + glUniform1f(deltaLoc, delta); + + final int vbo = currVBO; + currVBO = 1 - currVBO; + + glBindBuffer(GL_ARRAY_BUFFER, tfVBO[vbo]); + glVertexPointer(4, GL_FLOAT, 0, 0); + + glEnable(GL_RASTERIZER_DISCARD); + if ( GLContext.getCapabilities().OpenGL30 ) { + glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0, tfVBO[1 - vbo]); + + glBeginTransformFeedback(GL_POINTS); + glDrawArrays(GL_POINTS, 0, ballCount); + glEndTransformFeedback(); + } else { + glBindBufferBaseEXT(GL_TRANSFORM_FEEDBACK_BUFFER_EXT, 0, tfVBO[1 - vbo]); + + glBeginTransformFeedbackEXT(GL_POINTS); + glDrawArrays(GL_POINTS, 0, ballCount); + glEndTransformFeedbackEXT(); + } + glDisable(GL_RASTERIZER_DISCARD); + + glUseProgram(progID); + glVertexPointer(2, GL_FLOAT, (4 * 4), 0); + } + + if ( render ) + glDrawArrays(GL_POINTS, 0, ballCount); + } + + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/sprites/SpriteShootout2P.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/sprites/SpriteShootout2P.java new file mode 100644 index 0000000..e35219b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/sprites/SpriteShootout2P.java @@ -0,0 +1,625 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.opengl.sprites; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.Sys; +import org.lwjgl.input.Keyboard; +import org.lwjgl.input.Mouse; +import org.lwjgl.opengl.*; + +import java.awt.image.BufferedImage; +import java.awt.image.Raster; +import java.io.IOException; +import java.nio.ByteBuffer; +import java.nio.FloatBuffer; +import java.util.Random; +import javax.imageio.ImageIO; + +import static org.lwjgl.opengl.EXTTransformFeedback.*; +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.opengl.GL12.*; +import static org.lwjgl.opengl.GL15.*; +import static org.lwjgl.opengl.GL20.*; +import static org.lwjgl.opengl.GL30.*; + +/** + * Sprite rendering demo. In this version we're doing the animation + * computations on the GPU, using transform feedback and a vertex + * shader, then rendering is performed in 2 passes, with depth testing + * enabled: + * 1) Sprites are rendered front-to-back, opaque fragments only, blending is disabled. + * 2) Sprites are rendered back-to-front, transparent fragments only, blending is enabled. + * Sorting is free, because we're animating double the amount of sprites rendered, the + * first batch is sorted f2b, the second is sorted b2f. Ordering is achieved by modifying + * the z-axis position of the sprites in the vertex shader. + * + * @author Spasi + * @since 18/3/2011 + */ +public final class SpriteShootout2P { + + private static final int SCREEN_WIDTH = 800; + private static final int SCREEN_HEIGHT = 600; + + private static final int ANIMATION_TICKS = 60; + + private boolean run = true; + private boolean render = true; + private boolean colorMask = true; + private boolean animate = true; + private boolean smooth; + private boolean vsync; + + private int ballSize = 42; + private int ballCount = 100 * 1000; + + private SpriteRenderer renderer; + + // OpenGL stuff + private int texID; + private int texBigID; + private int texSmallID; + + private SpriteShootout2P() { + } + + public static void main(String[] args) { + try { + new SpriteShootout2P().start(); + } catch (LWJGLException e) { + e.printStackTrace(); + } + } + + private void start() throws LWJGLException { + try { + initGL(); + + renderer = new SpriteRendererTF(); + + updateBalls(ballCount); + run(); + } catch (Throwable t) { + t.printStackTrace(); + } finally { + destroy(); + } + } + + private void initGL() throws LWJGLException { + Display.setLocation((Display.getDisplayMode().getWidth() - SCREEN_WIDTH) / 2, + (Display.getDisplayMode().getHeight() - SCREEN_HEIGHT) / 2); + Display.setDisplayMode(new DisplayMode(SCREEN_WIDTH, SCREEN_HEIGHT)); + Display.setTitle("Sprite Shootout 2-pass"); + Display.create(new PixelFormat(0, 24, 0)); + //Display.create(new PixelFormat(), new ContextAttribs(4, 1).withProfileCompatibility(true).withDebug(true)); + //AMDDebugOutput.glDebugMessageCallbackAMD(new AMDDebugOutputCallback()); + + final ContextCapabilities caps = GLContext.getCapabilities(); + if ( !(caps.OpenGL30 || (caps.OpenGL20 && caps.GL_EXT_transform_feedback)) ) + throw new RuntimeException("OpenGL 3.0 or 2.0 + EXT_transform_feedback is required for this demo."); + + // Setup viewport + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(0, SCREEN_WIDTH, 0, SCREEN_HEIGHT, -1.0, 1.0); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glViewport(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + + glClearColor(1.0f, 1.0f, 1.0f, 0.0f); + + // Create textures + + try { + texSmallID = createTexture("res/ball_sm.png"); + texBigID = createTexture("res/ball.png"); + } catch (IOException e) { + e.printStackTrace(); + System.exit(-1); + } + texID = texBigID; + + // Setup rendering state + + glEnable(GL_BLEND); + glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); + + glEnable(GL_ALPHA_TEST); + + glColorMask(colorMask, colorMask, colorMask, false); + glDepthMask(true); + glEnable(GL_DEPTH_TEST); + glDepthFunc(GL_LESS); + glClearDepth(1.0f); + + if ( caps.GL_ARB_compatibility || !caps.OpenGL31 ) + glEnable(GL_POINT_SPRITE); + + // Setup geometry + + glEnableClientState(GL_VERTEX_ARRAY); + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + + Util.checkGLError(); + } + + private static int createTexture(final String path) throws IOException { + final BufferedImage img = ImageIO.read(SpriteShootout2P.class.getClassLoader().getResource(path)); + + final int w = img.getWidth(); + final int h = img.getHeight(); + + final ByteBuffer buffer = readImage(img); + + final int texID = glGenTextures(); + + glBindTexture(GL_TEXTURE_2D, texID); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_BGRA, GL_UNSIGNED_BYTE, buffer); + + return texID; + } + + private static ByteBuffer readImage(final BufferedImage img) throws IOException { + final Raster raster = img.getRaster(); + + final int bands = raster.getNumBands(); + + final int w = img.getWidth(); + final int h = img.getHeight(); + + final int size = w * h * bands; + + final byte[] pixels = new byte[size]; + raster.getDataElements(0, 0, w, h, pixels); + + final ByteBuffer pbuffer = BufferUtils.createByteBuffer(size); + + if ( bands == 4 ) { + for ( int i = 0; i < (w * h * 4); i += 4 ) { + // Pre-multiply alpha + final float a = unpackUByte01(pixels[i + 3]); + pbuffer.put(packUByte01(unpackUByte01(pixels[i + 2]) * a)); + pbuffer.put(packUByte01(unpackUByte01(pixels[i + 1]) * a)); + pbuffer.put(packUByte01(unpackUByte01(pixels[i + 0]) * a)); + pbuffer.put(pixels[i + 3]); + } + } else if ( bands == 3 ) { + for ( int i = 0; i < (w * h * 3); i += 3 ) { + pbuffer.put(pixels[i + 2]); + pbuffer.put(pixels[i + 1]); + pbuffer.put(pixels[i + 0]); + } + } else + pbuffer.put(pixels, 0, size); + + pbuffer.flip(); + + return pbuffer; + } + + private static float unpackUByte01(final byte x) { + return (x & 0xFF) / 255.0f; + } + + private static byte packUByte01(final float x) { + return (byte)(x * 255.0f); + } + + private void updateBalls(final int count) { + System.out.println("NUMBER OF BALLS: " + count); + renderer.updateBalls(ballCount); + } + + private void run() { + long startTime = System.currentTimeMillis() + 5000; + long fps = 0; + + long time = Sys.getTime(); + final int ticksPerUpdate = (int)(Sys.getTimerResolution() / ANIMATION_TICKS); + + renderer.render(false, true, 0); + + while ( run ) { + Display.processMessages(); + handleInput(); + + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + final long currTime = Sys.getTime(); + final int delta = (int)(currTime - time); + if ( smooth || delta >= ticksPerUpdate ) { + renderer.render(render, animate, delta); + time = currTime; + } else + renderer.render(render, false, 0); + + Display.update(false); + //Display.sync(60); + + if ( startTime > System.currentTimeMillis() ) { + fps++; + } else { + long timeUsed = 5000 + (startTime - System.currentTimeMillis()); + startTime = System.currentTimeMillis() + 5000; + System.out.println("FPS: " + (Math.round(fps / (timeUsed / 1000.0) * 10) / 10.0) + ", Balls: " + ballCount); + fps = 0; + } + } + } + + private void handleInput() { + if ( Display.isCloseRequested() ) + run = false; + + while ( Keyboard.next() ) { + if ( Keyboard.getEventKeyState() ) + continue; + + switch ( Keyboard.getEventKey() ) { + case Keyboard.KEY_1: + case Keyboard.KEY_2: + case Keyboard.KEY_3: + case Keyboard.KEY_4: + case Keyboard.KEY_5: + case Keyboard.KEY_6: + case Keyboard.KEY_7: + case Keyboard.KEY_8: + case Keyboard.KEY_9: + case Keyboard.KEY_0: + ballCount = 1 << (Keyboard.getEventKey() - Keyboard.KEY_1); + updateBalls(ballCount); + break; + case Keyboard.KEY_ADD: + case Keyboard.KEY_SUBTRACT: + int mult; + if ( Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) ) { + mult = 1000; + if ( Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) || Keyboard.isKeyDown(Keyboard.KEY_RCONTROL) ) + mult *= 5; + } else if ( Keyboard.isKeyDown(Keyboard.KEY_LMENU) || Keyboard.isKeyDown(Keyboard.KEY_RMENU) ) + mult = 100; + else if ( Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) || Keyboard.isKeyDown(Keyboard.KEY_RCONTROL) ) + mult = 10; + else + mult = 1; + if ( Keyboard.getEventKey() == Keyboard.KEY_SUBTRACT ) + mult = -mult; + ballCount += mult * 100; + if ( ballCount <= 0 ) + ballCount = 1; + updateBalls(ballCount); + break; + case Keyboard.KEY_ESCAPE: + run = false; + break; + case Keyboard.KEY_A: + animate = !animate; + System.out.println("Animation is now " + (animate ? "on" : "off") + "."); + break; + case Keyboard.KEY_C: + colorMask = !colorMask; + glColorMask(colorMask, colorMask, colorMask, false); + System.out.println("Color mask is now " + (colorMask ? "on" : "off") + "."); + // Disable alpha test when color mask is off, else we get no benefit. + if ( colorMask ) { + glEnable(GL_BLEND); + glEnable(GL_ALPHA_TEST); + } else { + glDisable(GL_BLEND); + glDisable(GL_ALPHA_TEST); + } + break; + case Keyboard.KEY_R: + render = !render; + System.out.println("Rendering is now " + (render ? "on" : "off") + "."); + break; + case Keyboard.KEY_S: + smooth = !smooth; + System.out.println("Smooth animation is now " + (smooth ? "on" : "off") + "."); + break; + case Keyboard.KEY_T: + if ( texID == texBigID ) { + texID = texSmallID; + ballSize = 16; + } else { + texID = texBigID; + ballSize = 42; + } + renderer.updateBallSize(); + glBindTexture(GL_TEXTURE_2D, texID); + System.out.println("Now using the " + (texID == texBigID ? "big" : "small") + " texture."); + break; + case Keyboard.KEY_V: + vsync = !vsync; + Display.setVSyncEnabled(vsync); + System.out.println("VSYNC is now " + (vsync ? "enabled" : "disabled") + "."); + break; + } + } + + while ( Mouse.next() ) ; + } + + private void destroy() { + Display.destroy(); + } + + private abstract class SpriteRenderer { + + protected int progID; + + protected void createPrograms(final int vshID) { + // Opaque pass + + final int fshID = glCreateShader(GL_FRAGMENT_SHADER); + glShaderSource(fshID, "uniform sampler2D COLOR_MAP;\n" + + "void main(void) {\n" + + " gl_FragColor = texture2D(COLOR_MAP, gl_PointCoord);\n" + + "}"); + glCompileShader(fshID); + if ( glGetShaderi(fshID, GL_COMPILE_STATUS) == GL_FALSE ) { + System.out.println(glGetShaderInfoLog(fshID, glGetShaderi(fshID, GL_INFO_LOG_LENGTH))); + throw new RuntimeException("Failed to compile fragment shader."); + } + + progID = glCreateProgram(); + glAttachShader(progID, vshID); + glAttachShader(progID, fshID); + glLinkProgram(progID); + if ( glGetProgrami(progID, GL_LINK_STATUS) == GL_FALSE ) { + System.out.println(glGetProgramInfoLog(progID, glGetProgrami(progID, GL_INFO_LOG_LENGTH))); + throw new RuntimeException("Failed to link shader program."); + } + + glUseProgram(progID); + glUniform1i(glGetUniformLocation(progID, "COLOR_MAP"), 0); + + updateBallSize(); + + glEnableClientState(GL_VERTEX_ARRAY); + } + + public void updateBallSize() { + glPointSize(ballSize); + } + + protected abstract void updateBalls(final int count); + + protected abstract void render(boolean render, boolean animate, int delta); + + } + + private class SpriteRendererTF extends SpriteRenderer { + + private int progIDTF; + private int ballSizeLoc; + private int deltaLoc; + + private int[] tfVBO = new int[2]; + private int currVBO; + + private int depthVBO; + private int depthLoc; + + SpriteRendererTF() { + System.out.println("Shootout Implementation: TF GPU animation & 2-pass rendering"); + + // Transform-feedback program + + int vshID = glCreateShader(GL_VERTEX_SHADER); + glShaderSource(vshID, "#version 130\n" + + "const float WIDTH = " + SCREEN_WIDTH + ";\n" + + "const float HEIGHT = " + SCREEN_HEIGHT + ";\n" + + "uniform float ballSize;\n" + // ballSize / 2 + "uniform float delta;\n" + + "void main(void) {\n" + + " vec4 anim = gl_Vertex;\n" + + " anim.xy = anim.xy + anim.zw * delta;\n" + + " vec2 animC = clamp(anim.xy, vec2(ballSize), vec2(WIDTH - ballSize, HEIGHT - ballSize));\n" + + " if ( anim.x != animC.x ) anim.z = -anim.z;\n" + + " if ( anim.y != animC.y ) anim.w = -anim.w;\n" + + " gl_Position = vec4(animC, anim.zw);\n" + + "}"); + glCompileShader(vshID); + if ( glGetShaderi(vshID, GL_COMPILE_STATUS) == GL_FALSE ) { + System.out.println(glGetShaderInfoLog(vshID, glGetShaderi(vshID, GL_INFO_LOG_LENGTH))); + throw new RuntimeException("Failed to compile vertex shader."); + } + + progIDTF = glCreateProgram(); + glAttachShader(progIDTF, vshID); + glTransformFeedbackVaryings(progIDTF, new CharSequence[] { "gl_Position" }, GL_SEPARATE_ATTRIBS); + glLinkProgram(progIDTF); + if ( glGetProgrami(progIDTF, GL_LINK_STATUS) == GL_FALSE ) { + System.out.println(glGetProgramInfoLog(progIDTF, glGetProgrami(progIDTF, GL_INFO_LOG_LENGTH))); + throw new RuntimeException("Failed to link shader program."); + } + + glUseProgram(progIDTF); + + ballSizeLoc = glGetUniformLocation(progIDTF, "ballSize"); + deltaLoc = glGetUniformLocation(progIDTF, "delta"); + + glUniform1f(ballSizeLoc, ballSize * 0.5f); + + // ----------------- + + vshID = glCreateShader(GL_VERTEX_SHADER); + glShaderSource(vshID, "#version 130\n" + + "in float depth;\n" + + "void main(void) {\n" + + " gl_Position = gl_ModelViewProjectionMatrix * vec4(gl_Vertex.xy, depth, gl_Vertex.w);\n" + + "}"); + glCompileShader(vshID); + if ( glGetShaderi(vshID, GL_COMPILE_STATUS) == GL_FALSE ) { + System.out.println(glGetShaderInfoLog(vshID, glGetShaderi(vshID, GL_INFO_LOG_LENGTH))); + throw new RuntimeException("Failed to compile vertex shader."); + } + + createPrograms(vshID); + + depthLoc = glGetAttribLocation(progID, "depth"); + + // ----------------- + } + + public void updateBallSize() { + glUseProgram(progIDTF); + glUniform1f(ballSizeLoc, ballSize * 0.5f); + + super.updateBallSize(); + } + + public void updateBalls(final int count) { + // Depth data + + final FloatBuffer depths = BufferUtils.createFloatBuffer(count * 2); + final float depthStep = 1.9f / count; + float depth = Float.parseFloat("0x1.fffffep-1"); + // Front-to-back + for ( int i = 0; i < count; i++ ) { + depths.put(depth); + depth -= depthStep; + } + // Back-to-front + for ( int i = 0; i < count; i++ ) + depths.put(depths.get(count - 1 - i)); + depths.flip(); + + if ( depthVBO != 0 ) + glDeleteBuffers(depthVBO); + + depthVBO = glGenBuffers(); + glBindBuffer(GL_ARRAY_BUFFER, depthVBO); + glBufferData(GL_ARRAY_BUFFER, depths, GL_STATIC_DRAW); + + glEnableVertexAttribArray(depthLoc); + glVertexAttribPointer(depthLoc, 1, GL_FLOAT, false, 0, 0); + + // Animation data + + final FloatBuffer transform = BufferUtils.createFloatBuffer(count * 2 * 4); + // Front-to-back + final Random random = new Random(); + for ( int i = 0; i < count; i++ ) { + transform.put((int)(random.nextFloat() * (SCREEN_WIDTH - ballSize) + ballSize * 0.5f)); + transform.put((int)(random.nextFloat() * (SCREEN_HEIGHT - ballSize) + ballSize * 0.5f)); + transform.put(random.nextFloat() * 0.4f - 0.2f); + transform.put(random.nextFloat() * 0.4f - 0.2f); + } + // Back-to-front + for ( int i = 0; i < count; i++ ) { + final int offset = (count - 1 - i) * 4; + transform.put(transform.get(offset + 0)); + transform.put(transform.get(offset + 1)); + transform.put(transform.get(offset + 2)); + transform.put(transform.get(offset + 3)); + } + transform.flip(); + + if ( tfVBO[0] != 0 ) { + for ( int i = 0; i < tfVBO.length; i++ ) + glDeleteBuffers(tfVBO[i]); + } + + for ( int i = 0; i < tfVBO.length; i++ ) { + tfVBO[i] = glGenBuffers(); + glBindBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, tfVBO[i]); + glBufferData(GL_TRANSFORM_FEEDBACK_BUFFER, transform, GL_STATIC_DRAW); + } + + glBindBuffer(GL_ARRAY_BUFFER, tfVBO[0]); + glVertexPointer(2, GL_FLOAT, (4 * 4), 0); + } + + public void render(final boolean render, final boolean animate, final int delta) { + if ( animate ) { + glDisableVertexAttribArray(depthLoc); + + final int vbo = currVBO; + currVBO = 1 - currVBO; + + glUseProgram(progIDTF); + glUniform1f(deltaLoc, delta); + + glBindBuffer(GL_ARRAY_BUFFER, tfVBO[vbo]); + glVertexPointer(4, GL_FLOAT, 0, 0); + + glEnable(GL_RASTERIZER_DISCARD); + if ( GLContext.getCapabilities().OpenGL30 ) { + glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0, tfVBO[1 - vbo]); + + glBeginTransformFeedback(GL_POINTS); + glDrawArrays(GL_POINTS, 0, ballCount * 2); + glEndTransformFeedback(); + } else { + glBindBufferBaseEXT(GL_TRANSFORM_FEEDBACK_BUFFER_EXT, 0, tfVBO[1 - vbo]); + + glBeginTransformFeedbackEXT(GL_POINTS); + glDrawArrays(GL_POINTS, 0, ballCount * 2); + glEndTransformFeedbackEXT(); + } + glDisable(GL_RASTERIZER_DISCARD); + + glUseProgram(progID); + glVertexPointer(2, GL_FLOAT, (4 * 4), 0); + + glEnableVertexAttribArray(depthLoc); + } + + if ( render ) { + // Render front-to-back opaque pass + glAlphaFunc(GL_EQUAL, 1.0f); + glDisable(GL_BLEND); + glDrawArrays(GL_POINTS, 0, ballCount); + glEnable(GL_BLEND); + + // Render back-to-front transparent pass + glAlphaFunc(GL_GREATER, 0.0f); // Fragments with alpha == 1.0 are early-depth-rejected. + glDepthMask(false); + glDrawArrays(GL_POINTS, ballCount, ballCount); + glDepthMask(true); + } + } + + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/sprites/SpriteShootoutCL.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/sprites/SpriteShootoutCL.java new file mode 100644 index 0000000..34d5d04 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/sprites/SpriteShootoutCL.java @@ -0,0 +1,598 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.opengl.sprites; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.PointerBuffer; +import org.lwjgl.Sys; +import org.lwjgl.input.Keyboard; +import org.lwjgl.input.Mouse; +import org.lwjgl.opencl.*; +import org.lwjgl.opencl.api.Filter; +import org.lwjgl.opengl.ContextCapabilities; +import org.lwjgl.opengl.Display; +import org.lwjgl.opengl.DisplayMode; +import org.lwjgl.opengl.GLContext; + +import java.awt.image.BufferedImage; +import java.awt.image.Raster; +import java.io.IOException; +import java.nio.ByteBuffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; +import java.util.List; +import java.util.Random; +import javax.imageio.ImageIO; + +import static org.lwjgl.opencl.CL10.*; +import static org.lwjgl.opencl.CL10GL.*; +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.opengl.GL12.*; +import static org.lwjgl.opengl.GL15.*; +import static org.lwjgl.opengl.GL20.*; + +/** + * Sprite rendering demo. In this version OpenCL is used for the animation + * computations. CL_KHR_gl_sharing is required for sharing the animation + * data with OpenGL for rendering. + * + * @author Spasi + * @since 18/3/2011 + */ +public final class SpriteShootoutCL { + + private static final int SCREEN_WIDTH = 800; + private static final int SCREEN_HEIGHT = 600; + + private static final int ANIMATION_TICKS = 60; + + private boolean run = true; + private boolean render = true; + private boolean colorMask = true; + private boolean animate = true; + private boolean smooth; + private boolean vsync; + + private int ballSize = 42; + private int ballCount = 100 * 1000; + + private SpriteRenderer renderer; + + // OpenGL stuff + private int texID; + private int texBigID; + private int texSmallID; + + // OpenCL stuff + + private IntBuffer errorCode = BufferUtils.createIntBuffer(1); + + private CLDevice clDevice; + private CLContext clContext; + private CLCommandQueue queue; + private CLProgram program; + private CLKernel kernel; + private CLMem clTransform; + + private PointerBuffer kernelGlobalWorkSize; + + private SpriteShootoutCL() { + } + + public static void main(String[] args) { + try { + new SpriteShootoutCL().start(); + } catch (LWJGLException e) { + e.printStackTrace(); + } + } + + private void start() throws LWJGLException { + try { + initGL(); + initCL(); + + renderer = new SpriteRendererDefault(); + + updateBalls(ballCount); + run(); + } catch (Throwable t) { + t.printStackTrace(); + } finally { + destroy(); + } + } + + private void initCL() throws LWJGLException { + CL.create(); + + final List platforms = CLPlatform.getPlatforms(); + if ( platforms == null ) + throw new RuntimeException("No OpenCL platforms found."); + + final Filter glSharingFilter = new Filter() { + public boolean accept(final CLDevice device) { + final CLDeviceCapabilities caps = CLCapabilities.getDeviceCapabilities(device); + return caps.CL_KHR_gl_sharing; + } + }; + + CLPlatform platform = null; + List devices = null; + for ( CLPlatform p : platforms ) { + // Find devices with GL sharing support + devices = p.getDevices(CL_DEVICE_TYPE_GPU, glSharingFilter); + if ( devices != null ) { + platform = p; + break; + } + } + + if ( devices == null ) + throw new RuntimeException("No OpenCL GPU device found."); + + clDevice = devices.get(0); + // Make sure we use only 1 device + devices.clear(); + devices.add(clDevice); + + clContext = CLContext.create(platform, devices, new CLContextCallback() { + protected void handleMessage(final String errinfo, final ByteBuffer private_info) { + System.out.println("[CONTEXT MESSAGE] " + errinfo); + } + }, Display.getDrawable(), errorCode); + checkCLError(errorCode); + + queue = clCreateCommandQueue(clContext, clDevice, 0, errorCode); + checkCLError(errorCode); + } + + private void initGL() throws LWJGLException { + Display.setLocation((Display.getDisplayMode().getWidth() - SCREEN_WIDTH) / 2, + (Display.getDisplayMode().getHeight() - SCREEN_HEIGHT) / 2); + Display.setDisplayMode(new DisplayMode(SCREEN_WIDTH, SCREEN_HEIGHT)); + Display.setTitle("Sprite Shootout - CL"); + Display.create(); + + final ContextCapabilities caps = GLContext.getCapabilities(); + if ( !caps.OpenGL20 ) + throw new RuntimeException("OpenGL 2.0 is required for this demo."); + + // Setup viewport + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(0, SCREEN_WIDTH, 0, SCREEN_HEIGHT, -1.0, 1.0); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glViewport(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + + glClearColor(1.0f, 1.0f, 1.0f, 0.0f); + + // Create textures + + try { + texSmallID = createTexture("res/ball_sm.png"); + texBigID = createTexture("res/ball.png"); + } catch (IOException e) { + e.printStackTrace(); + System.exit(-1); + } + texID = texBigID; + + // Setup rendering state + + glEnable(GL_BLEND); + glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); + + glEnable(GL_ALPHA_TEST); + glAlphaFunc(GL_GREATER, 0.0f); + + glColorMask(colorMask, colorMask, colorMask, false); + glDepthMask(false); + glDisable(GL_DEPTH_TEST); + + if ( caps.GL_ARB_compatibility || !caps.OpenGL31 ) + glEnable(GL_POINT_SPRITE); + + // Setup geometry + + org.lwjgl.opengl.Util.checkGLError(); + } + + private static int createTexture(final String path) throws IOException { + final BufferedImage img = ImageIO.read(SpriteShootoutCL.class.getClassLoader().getResource(path)); + + final int w = img.getWidth(); + final int h = img.getHeight(); + + final ByteBuffer buffer = readImage(img); + + final int texID = glGenTextures(); + + glBindTexture(GL_TEXTURE_2D, texID); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_BGRA, GL_UNSIGNED_BYTE, buffer); + + return texID; + } + + private static ByteBuffer readImage(final BufferedImage img) throws IOException { + final Raster raster = img.getRaster(); + + final int bands = raster.getNumBands(); + + final int w = img.getWidth(); + final int h = img.getHeight(); + + final int size = w * h * bands; + + final byte[] pixels = new byte[size]; + raster.getDataElements(0, 0, w, h, pixels); + + final ByteBuffer pbuffer = BufferUtils.createByteBuffer(size); + + if ( bands == 4 ) { + for ( int i = 0; i < (w * h * 4); i += 4 ) { + // Pre-multiply alpha + final float a = unpackUByte01(pixels[i + 3]); + pbuffer.put(packUByte01(unpackUByte01(pixels[i + 2]) * a)); + pbuffer.put(packUByte01(unpackUByte01(pixels[i + 1]) * a)); + pbuffer.put(packUByte01(unpackUByte01(pixels[i + 0]) * a)); + pbuffer.put(pixels[i + 3]); + } + } else if ( bands == 3 ) { + for ( int i = 0; i < (w * h * 3); i += 3 ) { + pbuffer.put(pixels[i + 2]); + pbuffer.put(pixels[i + 1]); + pbuffer.put(pixels[i + 0]); + } + } else + pbuffer.put(pixels, 0, size); + + pbuffer.flip(); + + return pbuffer; + } + + private static float unpackUByte01(final byte x) { + return (x & 0xFF) / 255.0f; + } + + private static byte packUByte01(final float x) { + return (byte)(x * 255.0f); + } + + private void updateBalls(final int count) { + System.out.println("NUMBER OF BALLS: " + count); + renderer.updateBalls(ballCount); + } + + private void run() { + long startTime = System.currentTimeMillis() + 5000; + long fps = 0; + + long time = Sys.getTime(); + final int ticksPerUpdate = (int)(Sys.getTimerResolution() / ANIMATION_TICKS); + + renderer.render(false, true, 0); + + while ( run ) { + Display.processMessages(); + handleInput(); + + glClear(GL_COLOR_BUFFER_BIT); + + final long currTime = Sys.getTime(); + final int delta = (int)(currTime - time); + if ( smooth || delta >= ticksPerUpdate ) { + renderer.render(render, animate, delta); + time = currTime; + } else + renderer.render(render, false, 0); + + Display.update(false); + + if ( startTime > System.currentTimeMillis() ) { + fps++; + } else { + long timeUsed = 5000 + (startTime - System.currentTimeMillis()); + startTime = System.currentTimeMillis() + 5000; + System.out.println("FPS: " + (Math.round(fps / (timeUsed / 1000.0) * 10) / 10.0) + ", Balls: " + ballCount); + fps = 0; + } + } + } + + private void handleInput() { + if ( Display.isCloseRequested() ) + run = false; + + while ( Keyboard.next() ) { + if ( Keyboard.getEventKeyState() ) + continue; + + switch ( Keyboard.getEventKey() ) { + case Keyboard.KEY_1: + case Keyboard.KEY_2: + case Keyboard.KEY_3: + case Keyboard.KEY_4: + case Keyboard.KEY_5: + case Keyboard.KEY_6: + case Keyboard.KEY_7: + case Keyboard.KEY_8: + case Keyboard.KEY_9: + case Keyboard.KEY_0: + ballCount = 1 << (Keyboard.getEventKey() - Keyboard.KEY_1); + updateBalls(ballCount); + break; + case Keyboard.KEY_ADD: + case Keyboard.KEY_SUBTRACT: + int mult; + if ( Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) ) + mult = 1000; + else if ( Keyboard.isKeyDown(Keyboard.KEY_LMENU) || Keyboard.isKeyDown(Keyboard.KEY_RMENU) ) + mult = 100; + else if ( Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) || Keyboard.isKeyDown(Keyboard.KEY_RCONTROL) ) + mult = 10; + else + mult = 1; + if ( Keyboard.getEventKey() == Keyboard.KEY_SUBTRACT ) + mult = -mult; + ballCount += mult * 100; + if ( ballCount <= 0 ) + ballCount = 1; + updateBalls(ballCount); + break; + case Keyboard.KEY_ESCAPE: + run = false; + break; + case Keyboard.KEY_A: + animate = !animate; + System.out.println("Animation is now " + (animate ? "on" : "off") + "."); + break; + case Keyboard.KEY_C: + colorMask = !colorMask; + glColorMask(colorMask, colorMask, colorMask, false); + System.out.println("Color mask is now " + (colorMask ? "on" : "off") + "."); + // Disable alpha test when color mask is off, else we get no benefit. + if ( colorMask ) { + glEnable(GL_BLEND); + glEnable(GL_ALPHA_TEST); + } else { + glDisable(GL_BLEND); + glDisable(GL_ALPHA_TEST); + } + break; + case Keyboard.KEY_R: + render = !render; + System.out.println("Rendering is now " + (render ? "on" : "off") + "."); + break; + case Keyboard.KEY_S: + smooth = !smooth; + System.out.println("Smooth animation is now " + (smooth ? "on" : "off") + "."); + break; + case Keyboard.KEY_T: + if ( texID == texBigID ) { + texID = texSmallID; + ballSize = 16; + } else { + texID = texBigID; + ballSize = 42; + } + renderer.updateBallSize(); + glBindTexture(GL_TEXTURE_2D, texID); + System.out.println("Now using the " + (texID == texBigID ? "big" : "small") + " texture."); + break; + case Keyboard.KEY_V: + vsync = !vsync; + Display.setVSyncEnabled(vsync); + System.out.println("VSYNC is now " + (vsync ? "enabled" : "disabled") + "."); + break; + } + } + + while ( Mouse.next() ) ; + } + + private static void checkCLError(IntBuffer buffer) { + org.lwjgl.opencl.Util.checkCLError(buffer.get(0)); + } + + private void destroy() { + if ( clContext != null ) + clReleaseContext(clContext); + Display.destroy(); + System.exit(0); + } + + private abstract class SpriteRenderer { + + protected int progID; + protected int animVBO; + + protected void createKernel(final String source) { + program = clCreateProgramWithSource(clContext, source, errorCode); + checkCLError(errorCode); + final int build = clBuildProgram(program, clDevice, "", null); + if ( build != CL_SUCCESS ) { + System.out.println("BUILD LOG: " + program.getBuildInfoString(clDevice, CL_PROGRAM_BUILD_LOG)); + throw new RuntimeException("Failed to build CL program, status: " + build); + } + + kernel = clCreateKernel(program, "animate", errorCode); + checkCLError(errorCode); + + kernelGlobalWorkSize = BufferUtils.createPointerBuffer(1); + kernelGlobalWorkSize.put(0, ballCount); + + kernel.setArg(0, SCREEN_WIDTH); + kernel.setArg(1, SCREEN_HEIGHT); + } + + protected void createProgram(final int vshID) { + final int fshID = glCreateShader(GL_FRAGMENT_SHADER); + glShaderSource(fshID, "#version 110\n" + + "uniform sampler2D COLOR_MAP;" + + "void main(void) {\n" + + " gl_FragColor = texture2D(COLOR_MAP, gl_PointCoord);\n" + + "}"); + glCompileShader(fshID); + if ( glGetShaderi(fshID, GL_COMPILE_STATUS) == GL_FALSE ) { + System.out.println(glGetShaderInfoLog(fshID, glGetShaderi(fshID, GL_INFO_LOG_LENGTH))); + throw new RuntimeException("Failed to compile fragment shader."); + } + + progID = glCreateProgram(); + glAttachShader(progID, vshID); + glAttachShader(progID, fshID); + glLinkProgram(progID); + if ( glGetProgrami(progID, GL_LINK_STATUS) == GL_FALSE ) { + System.out.println(glGetProgramInfoLog(progID, glGetProgrami(progID, GL_INFO_LOG_LENGTH))); + throw new RuntimeException("Failed to link shader program."); + } + + glUseProgram(progID); + glUniform1i(glGetUniformLocation(progID, "COLOR_MAP"), 0); + + glEnableClientState(GL_VERTEX_ARRAY); + } + + public void updateBallSize() { + glPointSize(ballSize); + kernel.setArg(2, ballSize * 0.5f); + } + + public void updateBalls(final int count) { + kernelGlobalWorkSize.put(0, ballCount); + + final FloatBuffer transform = BufferUtils.createFloatBuffer(count * 4); + + final Random random = new Random(); + for ( int i = 0; i < count; i++ ) { + transform.put((int)(random.nextFloat() * (SCREEN_WIDTH - ballSize)) + ballSize * 0.5f); + transform.put((int)(random.nextFloat() * (SCREEN_HEIGHT - ballSize)) + ballSize * 0.5f); + transform.put(random.nextFloat() * 0.4f - 0.2f); + transform.put(random.nextFloat() * 0.4f - 0.2f); + } + transform.flip(); + + if ( animVBO != 0 ) { + clReleaseMemObject(clTransform); + glDeleteBuffers(animVBO); + } + + animVBO = glGenBuffers(); + + glBindBuffer(GL_ARRAY_BUFFER, animVBO); + glBufferData(GL_ARRAY_BUFFER, transform, GL_STATIC_DRAW); + glVertexPointer(2, GL_FLOAT, (4 * 4), 0); + + clTransform = clCreateFromGLBuffer(clContext, CL_MEM_READ_WRITE, animVBO, errorCode); + checkCLError(errorCode); + kernel.setArg(4, clTransform); + } + + protected abstract void render(boolean render, boolean animate, int delta); + + } + + private class SpriteRendererDefault extends SpriteRenderer { + + SpriteRendererDefault() { + System.out.println("Shootout Implementation: OpenCL GPU animation"); + + final int vshID = glCreateShader(GL_VERTEX_SHADER); + glShaderSource(vshID, "#version 150\n" + + "void main(void) {\n" + + " gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n" + + "}"); + glCompileShader(vshID); + if ( glGetShaderi(vshID, GL_COMPILE_STATUS) == GL_FALSE ) { + System.out.println(glGetShaderInfoLog(vshID, glGetShaderi(vshID, GL_INFO_LOG_LENGTH))); + throw new RuntimeException("Failed to compile vertex shader."); + } + + createProgram(vshID); + + org.lwjgl.opengl.Util.checkGLError(); + + createKernel("kernel void animate(\n" + + " const int WIDTH,\n" + + " const int HEIGHT,\n" + + " const float radius,\n" + + " const int delta,\n" + + " global float4 *balls\n" + + ") {\n" + + " unsigned int b = get_global_id(0);\n" + + "\n" + + " float4 anim = balls[b];\n" + + " anim.xy = anim.xy + anim.zw * delta;\n" + + " float2 animC = clamp(anim.xy, (float2)radius, (float2)(WIDTH - radius, HEIGHT - radius));\n" + + " if ( anim.x != animC.x ) anim.z = -anim.z;\n" + + " if ( anim.y != animC.y ) anim.w = -anim.w;\n" + + "\n" + + " balls[b] = (float4)(animC, anim.zw);\n" + + "}"); + + updateBallSize(); + } + + public void updateBalls(final int count) { + super.updateBalls(count); + } + + public void render(final boolean render, final boolean animate, final int delta) { + if ( animate ) { + //glFinish(); + + kernel.setArg(3, delta); + + clEnqueueAcquireGLObjects(queue, clTransform, null, null); + clEnqueueNDRangeKernel(queue, kernel, 1, null, kernelGlobalWorkSize, null, null, null); + clEnqueueReleaseGLObjects(queue, clTransform, null, null); + + clFinish(queue); + } + + if ( render ) + glDrawArrays(GL_POINTS, 0, ballCount); + } + + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/sprites/SpriteShootoutMapped.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/sprites/SpriteShootoutMapped.java new file mode 100644 index 0000000..3512915 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/sprites/SpriteShootoutMapped.java @@ -0,0 +1,839 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.opengl.sprites; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.Sys; +import org.lwjgl.input.Keyboard; +import org.lwjgl.input.Mouse; +import org.lwjgl.opengl.*; +import org.lwjgl.util.mapped.MappedObject; +import org.lwjgl.util.mapped.MappedObjectClassLoader; +import org.lwjgl.util.mapped.MappedObjectTransformer; +import org.lwjgl.util.mapped.MappedType; + +import java.awt.image.BufferedImage; +import java.awt.image.Raster; +import java.io.IOException; +import java.nio.ByteBuffer; +import java.util.Random; +import javax.imageio.ImageIO; + +import static org.lwjgl.opengl.EXTTransformFeedback.*; +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.opengl.GL12.*; +import static org.lwjgl.opengl.GL15.*; +import static org.lwjgl.opengl.GL20.*; +import static org.lwjgl.opengl.GL30.*; + +/** + * Sprite rendering demo. Three implementations are supported: + * a) CPU animation + BufferData VBO update. + * b) CPU animation + MapBufferRange VBO update. + * c) GPU animation using transform feedback with a vertex shader. + * + * @author Spasi + * @since 18/3/2011 + */ +public final class SpriteShootoutMapped { + + static final int SCREEN_WIDTH = 800; + static final int SCREEN_HEIGHT = 600; + + private static final int ANIMATION_TICKS = 60; + + private boolean run = true; + private boolean render = true; + private boolean colorMask = true; + private boolean animate = true; + private boolean smooth; + private boolean vsync; + + int ballSize = 42; + int ballCount = 100 * 1000; + + private SpriteRenderer renderer; + + // OpenGL stuff + private int texID; + private int texBigID; + private int texSmallID; + + long animateTime; + + private SpriteShootoutMapped() { + } + + public static void main(String[] args) { + MappedObjectTransformer.register(Pixel4b.class); + MappedObjectTransformer.register(Pixel3b.class); + MappedObjectTransformer.register(Sprite.class); + MappedObjectTransformer.register(SpriteRender.class); + + if ( MappedObjectClassLoader.fork(SpriteShootoutMapped.class, args) ) + return; + + try { + new SpriteShootoutMapped().start(); + } catch (LWJGLException e) { + e.printStackTrace(); + } + } + + private void start() throws LWJGLException { + try { + initGL(); + + final ContextCapabilities caps = GLContext.getCapabilities(); + if ( !true && (caps.OpenGL30 || caps.GL_EXT_transform_feedback) ) + renderer = new SpriteRendererTF(); + else if ( true && caps.GL_ARB_map_buffer_range ) + renderer = new SpriteRendererMapped(); + else + renderer = new SpriteRendererPlain(); + + updateBalls(ballCount); + run(); + } catch (Throwable t) { + t.printStackTrace(); + } finally { + destroy(); + } + } + + private void initGL() throws LWJGLException { + Display.setLocation((Display.getDisplayMode().getWidth() - SCREEN_WIDTH) / 2, + (Display.getDisplayMode().getHeight() - SCREEN_HEIGHT) / 2); + Display.setDisplayMode(new DisplayMode(SCREEN_WIDTH, SCREEN_HEIGHT)); + Display.setTitle("Sprite Shootout"); + Display.create(); + //Display.create(new PixelFormat(), new ContextAttribs(4, 1).withProfileCompatibility(true).withDebug(true)); + //AMDDebugOutput.glDebugMessageCallbackAMD(new AMDDebugOutputCallback()); + + if ( !GLContext.getCapabilities().OpenGL20 ) + throw new RuntimeException("OpenGL 2.0 is required for this demo."); + + // Setup viewport + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(0, SCREEN_WIDTH, 0, SCREEN_HEIGHT, -1.0, 1.0); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glViewport(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT); + + glClearColor(1.0f, 1.0f, 1.0f, 0.0f); + + // Create textures + + try { + texSmallID = createTexture("res/ball_sm.png"); + texBigID = createTexture("res/ball.png"); + } catch (IOException e) { + e.printStackTrace(); + System.exit(-1); + } + texID = texBigID; + + // Setup rendering state + + glEnable(GL_BLEND); + glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); + + glEnable(GL_ALPHA_TEST); + glAlphaFunc(GL_GREATER, 0.0f); + + glColorMask(colorMask, colorMask, colorMask, false); + glDepthMask(false); + glDisable(GL_DEPTH_TEST); + + // Setup geometry + + glEnableClientState(GL_VERTEX_ARRAY); + glEnableClientState(GL_TEXTURE_COORD_ARRAY); + + Util.checkGLError(); + } + + private static int createTexture(final String path) throws IOException { + final BufferedImage img = ImageIO.read(SpriteShootoutMapped.class.getClassLoader().getResource(path)); + + final int w = img.getWidth(); + final int h = img.getHeight(); + + final ByteBuffer buffer = readImage(img); + + final int texID = glGenTextures(); + + glBindTexture(GL_TEXTURE_2D, texID); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, w, h, 0, GL_BGRA, GL_UNSIGNED_BYTE, buffer); + + return texID; + } + + public static class Pixel4b extends MappedObject { + + public byte r, g, b, a; + + } + + @MappedType(align = 3) + public static class Pixel3b extends MappedObject { + + public byte r, g, b; + + } + + private static ByteBuffer readImage(final BufferedImage img) throws IOException { + final Raster raster = img.getRaster(); + + final int bands = raster.getNumBands(); + + final int w = img.getWidth(); + final int h = img.getHeight(); + + final int count = w * h; + + final byte[] pixels = new byte[count * bands]; + raster.getDataElements(0, 0, w, h, pixels); + + if ( bands == 4 ) { + Pixel4b p = Pixel4b.malloc(count); + + int b = 0; + for ( int i = 0; i < count; i++, b += 4 ) { + // Pre-multiply alpha + final float a = unpackUByte01(pixels[b + 3]); + + p.view = i; + p.r = packUByte01(unpackUByte01(pixels[b + 2]) * a); + p.g = packUByte01(unpackUByte01(pixels[b + 1]) * a); + p.b = packUByte01(unpackUByte01(pixels[b + 0]) * a); + p.a = pixels[b + 3]; + } + + return p.backingByteBuffer(); + } else if ( bands == 3 ) { + Pixel3b p = Pixel3b.malloc(count); + + int b = 0; + for ( int i = 0; i < count; i++, b += 3 ) { + p.view = i; + p.r = pixels[b + 2]; + p.g = pixels[b + 1]; + p.b = pixels[b + 0]; + } + + return p.backingByteBuffer(); + } else { + ByteBuffer p = BufferUtils.createByteBuffer(count * bands); + p.put(pixels, 0, p.capacity()); + p.flip(); + return p; + } + + } + + private static float unpackUByte01(final byte x) { + return (x & 0xFF) / 255.0f; + } + + private static byte packUByte01(final float x) { + return (byte)(x * 255.0f); + } + + private void updateBalls(final int count) { + System.out.println("NUMBER OF BALLS: " + count); + renderer.updateBalls(ballCount); + } + + private void run() { + long startTime = System.currentTimeMillis() + 5000; + long fps = 0; + + long time = Sys.getTime(); + final int ticksPerUpdate = (int)(Sys.getTimerResolution() / ANIMATION_TICKS); + + renderer.render(false, true, 0); + + while ( run ) { + Display.processMessages(); + handleInput(); + + glClear(GL_COLOR_BUFFER_BIT); + + final long currTime = Sys.getTime(); + final int delta = (int)(currTime - time); + if ( smooth || delta >= ticksPerUpdate ) { + renderer.render(render, animate, delta); + time = currTime; + } else + renderer.render(render, false, 0); + + Display.update(false); + //Display.sync(60); + + if ( startTime > System.currentTimeMillis() ) { + fps++; + } else { + long timeUsed = 5000 + (startTime - System.currentTimeMillis()); + startTime = System.currentTimeMillis() + 5000; + System.out.println("FPS: " + (Math.round(fps / (timeUsed / 1000.0) * 10) / 10.0) + ", Balls: " + ballCount); + System.out.println("Animation: " + animateTime / fps); + animateTime = 0; + fps = 0; + } + } + } + + private void handleInput() { + if ( Display.isCloseRequested() ) + run = false; + + while ( Keyboard.next() ) { + if ( Keyboard.getEventKeyState() ) + continue; + + switch ( Keyboard.getEventKey() ) { + case Keyboard.KEY_1: + case Keyboard.KEY_2: + case Keyboard.KEY_3: + case Keyboard.KEY_4: + case Keyboard.KEY_5: + case Keyboard.KEY_6: + case Keyboard.KEY_7: + case Keyboard.KEY_8: + case Keyboard.KEY_9: + case Keyboard.KEY_0: + ballCount = 1 << (Keyboard.getEventKey() - Keyboard.KEY_1); + updateBalls(ballCount); + break; + case Keyboard.KEY_ADD: + case Keyboard.KEY_SUBTRACT: + int mult; + if ( Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT) ) + mult = 1000; + else if ( Keyboard.isKeyDown(Keyboard.KEY_LMENU) || Keyboard.isKeyDown(Keyboard.KEY_RMENU) ) + mult = 100; + else if ( Keyboard.isKeyDown(Keyboard.KEY_LCONTROL) || Keyboard.isKeyDown(Keyboard.KEY_RCONTROL) ) + mult = 10; + else + mult = 1; + if ( Keyboard.getEventKey() == Keyboard.KEY_SUBTRACT ) + mult = -mult; + ballCount += mult * 100; + if ( ballCount <= 0 ) + ballCount = 1; + updateBalls(ballCount); + break; + case Keyboard.KEY_ESCAPE: + run = false; + break; + case Keyboard.KEY_A: + animate = !animate; + System.out.println("Animation is now " + (animate ? "on" : "off") + "."); + break; + case Keyboard.KEY_C: + colorMask = !colorMask; + glColorMask(colorMask, colorMask, colorMask, false); + System.out.println("Color mask is now " + (colorMask ? "on" : "off") + "."); + // Disable alpha test when color mask is off, else we get no benefit. + if ( colorMask ) { + glEnable(GL_BLEND); + glEnable(GL_ALPHA_TEST); + } else { + glDisable(GL_BLEND); + glDisable(GL_ALPHA_TEST); + } + break; + case Keyboard.KEY_R: + render = !render; + System.out.println("Rendering is now " + (render ? "on" : "off") + "."); + break; + case Keyboard.KEY_S: + smooth = !smooth; + System.out.println("Smooth animation is now " + (smooth ? "on" : "off") + "."); + break; + case Keyboard.KEY_T: + if ( texID == texBigID ) { + texID = texSmallID; + ballSize = 16; + } else { + texID = texBigID; + ballSize = 42; + } + renderer.updateBallSize(); + glBindTexture(GL_TEXTURE_2D, texID); + System.out.println("Now using the " + (texID == texBigID ? "big" : "small") + " texture."); + break; + case Keyboard.KEY_V: + vsync = !vsync; + Display.setVSyncEnabled(vsync); + System.out.println("VSYNC is now " + (vsync ? "enabled" : "disabled") + "."); + break; + } + } + + while ( Mouse.next() ) ; + } + + private void destroy() { + Display.destroy(); + } + + public static class Sprite extends MappedObject { + + public float dx, x; + public float dy, y; + + } + + public static class SpriteRender extends MappedObject { + + public float x, y; + + } + + private abstract class SpriteRenderer { + + protected Sprite sprites; + + protected int spriteCount; + + protected int vshID; + protected int progID; + + protected void createProgram() { + final int fshID = glCreateShader(GL_FRAGMENT_SHADER); + glShaderSource(fshID, "uniform sampler2D COLOR_MAP;\n" + + "void main(void) {\n" + + " gl_FragColor = texture2D(COLOR_MAP, gl_PointCoord);\n" + + "}"); + glCompileShader(fshID); + if ( glGetShaderi(fshID, GL_COMPILE_STATUS) == GL_FALSE ) { + System.out.println(glGetShaderInfoLog(fshID, glGetShaderi(fshID, GL_INFO_LOG_LENGTH))); + throw new RuntimeException("Failed to compile fragment shader."); + } + + progID = glCreateProgram(); + glAttachShader(progID, vshID); + glAttachShader(progID, fshID); + glLinkProgram(progID); + if ( glGetProgrami(progID, GL_LINK_STATUS) == GL_FALSE ) { + System.out.println(glGetProgramInfoLog(progID, glGetProgrami(progID, GL_INFO_LOG_LENGTH))); + throw new RuntimeException("Failed to link shader program."); + } + + glUseProgram(progID); + glUniform1i(glGetUniformLocation(progID, "COLOR_MAP"), 0); + + updateBallSize(); + + glEnableClientState(GL_VERTEX_ARRAY); + } + + public void updateBallSize() { + glPointSize(ballSize); + } + + public abstract void updateBalls(int count); + + protected abstract void render(boolean render, boolean animate, int delta); + + } + + private abstract class SpriteRendererBatched extends SpriteRenderer { + + protected static final int BALLS_PER_BATCH = 10 * 1000; + + SpriteRendererBatched() { + vshID = glCreateShader(GL_VERTEX_SHADER); + glShaderSource(vshID, "void main(void) {\n" + + " gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n" + + "}"); + glCompileShader(vshID); + if ( glGetShaderi(vshID, GL_COMPILE_STATUS) == GL_FALSE ) { + System.out.println(glGetShaderInfoLog(vshID, glGetShaderi(vshID, GL_INFO_LOG_LENGTH))); + throw new RuntimeException("Failed to compile vertex shader."); + } + + createProgram(); + } + + public void updateBalls(final int count) { + final Random random = new Random(); + + final Sprite newSprites = Sprite.malloc(count); + if ( sprites != null ) { + sprites.view = 0; + sprites.copyRange(newSprites, Math.min(count, spriteCount)); + } + + if ( count > spriteCount ) { + for ( int i = spriteCount; i < count; i++ ) { + newSprites.view = i; + + newSprites.x = (int)(random.nextFloat() * (SCREEN_WIDTH - ballSize) + ballSize * 0.5f); + newSprites.y = (int)(random.nextFloat() * (SCREEN_HEIGHT - ballSize) + ballSize * 0.5f); + newSprites.dx = random.nextFloat() * 0.4f - 0.2f; + newSprites.dy = random.nextFloat() * 0.4f - 0.2f; + } + } + + sprites = newSprites; + spriteCount = count; + } + + protected void animate( + final Sprite sprite, + final SpriteRender spriteRender, + final int ballSize, final int ballIndex, final int batchSize, final int delta + ) { + final float ballRadius = ballSize * 0.5f; + final float boundW = SCREEN_WIDTH - ballRadius; + final float boundH = SCREEN_HEIGHT - ballRadius; + + final Sprite[] sprites = sprite.asArray(); + final SpriteRender[] spritesRender = spriteRender.asArray(); + for ( int b = ballIndex, r = 0, len = (ballIndex + batchSize); b < len; b++, r++ ) { + float dx = sprites[b].dx; + float x = sprites[b].x; + + x += dx * delta; + if ( x < ballRadius ) { + x = ballRadius; + dx = -dx; + } else if ( x > boundW ) { + x = boundW; + dx = -dx; + } + + sprites[b].dx = dx; + sprites[b].x = x; + spritesRender[r].x = x; + + float dy = sprites[b].dy; + float y = sprites[b].y; + + y += dy * delta; + if ( y < ballRadius ) { + y = ballRadius; + dy = -dy; + } else if ( y > boundH ) { + y = boundH; + dy = -dy; + } + + sprites[b].dy = dy; + sprites[b].y = y; + spritesRender[r].y = y; + } + } + + } + + private class SpriteRendererPlain extends SpriteRendererBatched { + + private final int DATA_PER_BATCH = BALLS_PER_BATCH * 2 * 4; // balls * 2 floats * 4 bytes + + protected int[] animVBO; + + private SpriteRender spritesRender; + + SpriteRendererPlain() { + System.out.println("Shootout Implementation: CPU animation & BufferData"); + spritesRender = SpriteRender.malloc(BALLS_PER_BATCH); + } + + public void updateBalls(final int count) { + super.updateBalls(count); + + final int batchCount = count / BALLS_PER_BATCH + (count % BALLS_PER_BATCH == 0 ? 0 : 1); + if ( animVBO != null && batchCount == animVBO.length ) + return; + + final int[] newAnimVBO = new int[batchCount]; + if ( animVBO != null ) { + System.arraycopy(animVBO, 0, newAnimVBO, 0, Math.min(animVBO.length, newAnimVBO.length)); + for ( int i = newAnimVBO.length; i < animVBO.length; i++ ) + glDeleteBuffers(animVBO[i]); + } + for ( int i = animVBO == null ? 0 : animVBO.length; i < newAnimVBO.length; i++ ) { + newAnimVBO[i] = glGenBuffers(); + glBindBuffer(GL_ARRAY_BUFFER, newAnimVBO[i]); + } + + animVBO = newAnimVBO; + } + + public void render(final boolean render, final boolean animate, final int delta) { + int batchSize = Math.min(ballCount, BALLS_PER_BATCH); + int ballIndex = 0; + int batchIndex = 0; + while ( ballIndex < ballCount ) { + glBindBuffer(GL_ARRAY_BUFFER, animVBO[batchIndex]); + + if ( animate ) + animate(ballIndex, batchSize, delta); + + if ( render ) { + glVertexPointer(2, GL_FLOAT, 0, 0); + glDrawArrays(GL_POINTS, 0, batchSize); + } + + ballIndex += batchSize; + batchSize = Math.min(ballCount - ballIndex, BALLS_PER_BATCH); + batchIndex++; + } + } + + private void animate(final int ballIndex, final int batchSize, final int delta) { + animate( + sprites, spritesRender, + ballSize, ballIndex, batchSize, delta + ); + + glBufferData(GL_ARRAY_BUFFER, DATA_PER_BATCH, GL_STREAM_DRAW); + glBufferSubData(GL_ARRAY_BUFFER, 0, spritesRender.backingByteBuffer()); + } + + } + + private class SpriteRendererMapped extends SpriteRendererBatched { + + private StreamVBO animVBO; + + SpriteRendererMapped() { + System.out.println("Shootout Implementation: CPU animation & MapBufferRange"); + } + + public void updateBalls(final int count) { + super.updateBalls(count); + + if ( animVBO != null ) + animVBO.destroy(); + + animVBO = new StreamVBO(GL_ARRAY_BUFFER, ballCount * (2 * 4)); + } + + public void render(final boolean render, final boolean animate, final int delta) { + int batchSize = Math.min(ballCount, BALLS_PER_BATCH); + int ballIndex = 0; + while ( ballIndex < ballCount ) { + if ( animate ) { + final ByteBuffer buffer = animVBO.map(batchSize * (2 * 4)); + + long t0 = System.nanoTime(); + animate(sprites, SpriteRender.map(buffer), ballSize, ballIndex, batchSize, delta); + long t1 = System.nanoTime(); + + animateTime += t1 - t0; + + animVBO.unmap(); + } + + if ( render ) { + glVertexPointer(2, GL_FLOAT, 0, ballIndex * (2 * 4)); + glDrawArrays(GL_POINTS, 0, batchSize); + } + + ballIndex += batchSize; + batchSize = Math.min(ballCount - ballIndex, BALLS_PER_BATCH); + } + } + + } + + private class SpriteRendererTF extends SpriteRenderer { + + private int progIDTF; + private int ballSizeLoc; + private int deltaLoc; + + private int[] tfVBO = new int[2]; + private int currVBO; + + SpriteRendererTF() { + System.out.println("Shootout Implementation: TF GPU animation"); + + // Transform-feedback program + + final int vshID = glCreateShader(GL_VERTEX_SHADER); + glShaderSource(vshID, "#version 130\n" + + "const float WIDTH = " + SCREEN_WIDTH + ";\n" + + "const float HEIGHT = " + SCREEN_HEIGHT + ";\n" + + "uniform float ballSize;\n" + // ballSize / 2 + "uniform float delta;\n" + + "void main(void) {\n" + + " vec4 anim = gl_Vertex;\n" + + " anim.xy = anim.xy + anim.zw * delta;\n" + + " vec2 animC = clamp(anim.xy, vec2(ballSize), vec2(WIDTH - ballSize, HEIGHT - ballSize));\n" + + " if ( anim.x != animC.x ) anim.z = -anim.z;\n" + + " if ( anim.y != animC.y ) anim.w = -anim.w;\n" + + " gl_Position = vec4(animC, anim.zw);\n" + + "}"); + glCompileShader(vshID); + if ( glGetShaderi(vshID, GL_COMPILE_STATUS) == GL_FALSE ) { + System.out.println(glGetShaderInfoLog(vshID, glGetShaderi(vshID, GL_INFO_LOG_LENGTH))); + throw new RuntimeException("Failed to compile vertex shader."); + } + + progIDTF = glCreateProgram(); + glAttachShader(progIDTF, vshID); + glTransformFeedbackVaryings(progIDTF, new CharSequence[] { "gl_Position" }, GL_SEPARATE_ATTRIBS); + glLinkProgram(progIDTF); + if ( glGetProgrami(progIDTF, GL_LINK_STATUS) == GL_FALSE ) { + System.out.println(glGetProgramInfoLog(progIDTF, glGetProgrami(progIDTF, GL_INFO_LOG_LENGTH))); + throw new RuntimeException("Failed to link shader program."); + } + + glUseProgram(progIDTF); + + ballSizeLoc = glGetUniformLocation(progIDTF, "ballSize"); + deltaLoc = glGetUniformLocation(progIDTF, "delta"); + + glUniform1f(ballSizeLoc, ballSize * 0.5f); + + // ----------------- + + this.vshID = glCreateShader(GL_VERTEX_SHADER); + glShaderSource(this.vshID, "void main(void) {\n" + + " gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;\n" + + "}"); + glCompileShader(this.vshID); + if ( glGetShaderi(this.vshID, GL_COMPILE_STATUS) == GL_FALSE ) { + System.out.println(glGetShaderInfoLog(this.vshID, glGetShaderi(this.vshID, GL_INFO_LOG_LENGTH))); + throw new RuntimeException("Failed to compile vertex shader."); + } + + createProgram(); + } + + public void updateBallSize() { + glUseProgram(progIDTF); + glUniform1f(ballSizeLoc, ballSize * 0.5f); + + glUseProgram(progID); + super.updateBallSize(); + } + + private void doUpdateBalls(final int count) { + final Random random = new Random(); + + final Sprite newSprites = Sprite.malloc(count); + if ( sprites != null ) { + sprites.view = 0; + sprites.copyRange(newSprites, Math.min(count, spriteCount)); + } + + if ( count > spriteCount ) { + for ( int i = spriteCount; i < count; i++ ) { + newSprites.view = i; + + newSprites.x = (int)(random.nextFloat() * (SCREEN_WIDTH - ballSize) + ballSize * 0.5f); + newSprites.y = (int)(random.nextFloat() * (SCREEN_HEIGHT - ballSize) + ballSize * 0.5f); + newSprites.dx = random.nextFloat() * 0.4f - 0.2f; + newSprites.dy = random.nextFloat() * 0.4f - 0.2f; + } + } + + sprites = newSprites; + spriteCount = count; + } + + public void updateBalls(final int count) { + if ( tfVBO[0] != 0 ) { + // Fetch current animation state + glGetBufferSubData(GL_TRANSFORM_FEEDBACK_BUFFER, 0, sprites.backingByteBuffer()); + } + + doUpdateBalls(count); + + if ( tfVBO[0] != 0 ) { + for ( int i = 0; i < tfVBO.length; i++ ) + glDeleteBuffers(tfVBO[i]); + } + + for ( int i = 0; i < tfVBO.length; i++ ) { + tfVBO[i] = glGenBuffers(); + glBindBuffer(GL_TRANSFORM_FEEDBACK_BUFFER, tfVBO[i]); + glBufferData(GL_TRANSFORM_FEEDBACK_BUFFER, sprites.backingByteBuffer(), GL_STATIC_DRAW); + } + + glBindBuffer(GL_ARRAY_BUFFER, tfVBO[0]); + glVertexPointer(2, GL_FLOAT, (4 * 4), 0); + } + + public void render(final boolean render, final boolean animate, final int delta) { + if ( animate ) { + glUseProgram(progIDTF); + glUniform1f(deltaLoc, delta); + + final int vbo = currVBO; + currVBO = 1 - currVBO; + + glBindBuffer(GL_ARRAY_BUFFER, tfVBO[vbo]); + glVertexPointer(4, GL_FLOAT, 0, 0); + + glEnable(GL_RASTERIZER_DISCARD); + if ( GLContext.getCapabilities().OpenGL30 ) { + glBindBufferBase(GL_TRANSFORM_FEEDBACK_BUFFER, 0, tfVBO[1 - vbo]); + + glBeginTransformFeedback(GL_POINTS); + glDrawArrays(GL_POINTS, 0, ballCount); + glEndTransformFeedback(); + } else { + glBindBufferBaseEXT(GL_TRANSFORM_FEEDBACK_BUFFER_EXT, 0, tfVBO[1 - vbo]); + + glBeginTransformFeedbackEXT(GL_POINTS); + glDrawArrays(GL_POINTS, 0, ballCount); + glEndTransformFeedbackEXT(); + } + glDisable(GL_RASTERIZER_DISCARD); + + glUseProgram(progID); + glVertexPointer(2, GL_FLOAT, (4 * 4), 0); + } + + if ( render ) + glDrawArrays(GL_POINTS, 0, ballCount); + } + + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/sprites/StreamVBO.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/sprites/StreamVBO.java new file mode 100644 index 0000000..933c513 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengl/sprites/StreamVBO.java @@ -0,0 +1,144 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.opengl.sprites; + +import org.lwjgl.LWJGLUtil; + +import java.nio.ByteBuffer; + +import static java.lang.Math.*; +import static org.lwjgl.opengl.GL15.*; +import static org.lwjgl.opengl.GL30.*; + +/** + * This class implements VBO orphaning, useful for streaming + * dynamically generated geometry to the GPU. OpenGL 3.0 or + * higher is required. See + * {@url http://www.opengl.org/wiki/Buffer_Object_Streaming} + * under "Buffer update" for details. + * + * @author Spasi + */ +public class StreamVBO { + + private final int target; + private final long size; + private final int padding; + + private int ID; + + private long cursor; + + public StreamVBO(final int target, final int size) { + this(target, size, 64); + } + + public StreamVBO(final int target, final int size, final int padding) { + this.target = target; + this.padding = padding; + this.size = max(pad(size), padding); + + ID = glGenBuffers(); + + glBindBuffer(target, ID); + glBufferData(target, this.size, GL_STREAM_DRAW); + } + + public int getTarget() { + return target; + } + + public int getID() { + return ID; + } + + public long getSize() { + return size; + } + + public int getPadding() { + return padding; + } + + public void bind() { + glBindBuffer(target, ID); + } + + public void init(final int offset, final ByteBuffer data) { + glBufferSubData(target, offset, data); + } + + public void unmap() { + glUnmapBuffer(target); + } + + public void destroy() { + glBindBuffer(target, 0); + glDeleteBuffers(ID); + } + + public void reset() { + // Orphan current buffer and allocate a new one + glBufferData(target, size, GL_STREAM_DRAW); + // Flush + cursor = 0; + } + + public ByteBuffer map(final int bytes) { + return map(bytes, null); + } + + public ByteBuffer map(final int bytes, final ByteBuffer old_buffer) { + return doMap(pad(bytes), old_buffer); + } + + private int pad(int size) { + final int mod = size % padding; + if ( mod == 0 ) + return size; + + return size + padding - mod; + } + + private ByteBuffer doMap(final int bytes, final ByteBuffer old_buffer) { + if ( LWJGLUtil.CHECKS && size < bytes ) + throw new IllegalArgumentException(Integer.toString(bytes)); + + if ( size < cursor + bytes ) + reset(); + + final ByteBuffer map = glMapBufferRange(target, cursor, bytes, GL_MAP_WRITE_BIT | GL_MAP_UNSYNCHRONIZED_BIT, old_buffer); + cursor += bytes; + return map; + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/FullScreenWindowedTest.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/FullScreenWindowedTest.java new file mode 100644 index 0000000..b674f49 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/FullScreenWindowedTest.java @@ -0,0 +1,330 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.test.opengles; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.input.Keyboard; +import org.lwjgl.opengl.Display; +import org.lwjgl.opengl.DisplayMode; +import org.lwjgl.opengles.PixelFormat; +import org.lwjgl.opengles.PowerManagementEventException; +import org.lwjgl.util.vector.Vector2f; + +import java.nio.FloatBuffer; +import java.nio.IntBuffer; + +import static org.lwjgl.opengles.GLES20.*; +import static org.lwjgl.test.opengles.util.GLMatrix.*; + +/** + * Tests switching between windowed and fullscreen + * + * @author Brian Matzon + * @version $Revision: 3172 $ + * $Id: FullScreenWindowedTest.java 3172 2008-12-28 19:30:43Z elias_naur $ + */ +public class FullScreenWindowedTest { + + /** Intended deiplay mode */ + private DisplayMode mode; + /** our quad moving around */ + private Vector2f quadPosition; + /** our quadVelocity */ + private Vector2f quadVelocity; + /** angle of quad */ + private float angle; + /** degrees to rotate per frame */ + private float angleRotation = 1.0f; + /** Max speed of all changable attributes */ + private static final float MAX_SPEED = 20.0f; + + private static int buffer_id; + private static int indices_buffer_id; + + private QuadRenderer renderer; + + /** Creates a FullScreenWindowedTest */ + public FullScreenWindowedTest() { + } + + /** Executes the test */ + public void execute() { + initialize(); + mainLoop(); + cleanup(); + } + + private void switchMode() throws LWJGLException { + mode = findDisplayMode(1024, 600, Display.getDisplayMode().getBitsPerPixel()); + try { + Display.setDisplayModeAndFullscreen(mode); + } catch (PowerManagementEventException e) { + e.printStackTrace(); + } + } + + /** Initializes the test */ + private void initialize() { + try { + //find displaymode + switchMode(); + + quadPosition = new Vector2f(100f, 100f); + quadVelocity = new Vector2f(1.0f, 1.0f); + + reinit(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + private void reinit() throws LWJGLException { + Display.create(new PixelFormat()); + glInit(); + renderer = new QuadRenderer(); + } + + /** Runs the main loop of the "test" */ + private void mainLoop() { + while ( !Keyboard.isKeyDown(Keyboard.KEY_ESCAPE) && !Display.isCloseRequested() ) { + if ( Display.isVisible() ) { + // check keyboard input + processKeyboard(); + // do "game" logic, and render it + logic(); + render(); + } else { + // no need to render/paint if nothing has changed (ie. window + // dragged over) + if ( Display.isDirty() ) { + render(); + } + // don't waste cpu time, sleep more + try { + Thread.sleep(100); + } catch (InterruptedException inte) { + } + } + // Update window + try { + Display.update(); + Display.sync(60); + } catch (PowerManagementEventException e) { + e.printStackTrace(); + } + } + } + + /** Performs the logic */ + private void logic() { + angle += angleRotation; + if ( angle > 90.0f ) { + angle = 0.0f; + } + quadPosition.x += quadVelocity.x; + quadPosition.y += quadVelocity.y; + //check colision with vertical border border + if ( quadPosition.x + 50 >= mode.getWidth() || quadPosition.x - 50 <= 0 ) { + quadVelocity.x *= -1; + } + //check collision with horizontal border + if ( quadPosition.y + 50 >= mode.getHeight() || quadPosition.y - 50 <= 0 ) { + quadVelocity.y *= -1; + } + } + + private void render() { + //clear background + glClear(GL_COLOR_BUFFER_BIT); + // draw white quad + glPushMatrix(); + { + glTranslatef(quadPosition.x, quadPosition.y, 0); + glRotatef(angle, 0.0f, 0.0f, 1.0f); + + renderer.setMVPUniform(); + + glDrawElements(GL_TRIANGLE_STRIP, 4, GL_UNSIGNED_INT, 0); + } + glPopMatrix(); + } + + /** Processes keyboard input */ + private void processKeyboard() { + //check for fullscreen key + if ( Keyboard.isKeyDown(Keyboard.KEY_F) ) { + try { + cleanup(); + + switchMode(); + + reinit(); + } catch (Exception e) { + e.printStackTrace(); + } + } + //check for window key + if ( Keyboard.isKeyDown(Keyboard.KEY_W) ) { + try { + cleanup(); + + mode = new DisplayMode(800, 480); + Display.setDisplayModeAndFullscreen(mode); + + reinit(); + } catch (Exception e) { + e.printStackTrace(); + } + } + //check for speed changes + if ( Keyboard.isKeyDown(Keyboard.KEY_UP) ) { + quadVelocity.y += 0.1f; + } + if ( Keyboard.isKeyDown(Keyboard.KEY_DOWN) ) { + quadVelocity.y -= 0.1f; + } + if ( Keyboard.isKeyDown(Keyboard.KEY_RIGHT) ) { + quadVelocity.x += 0.1f; + } + if ( Keyboard.isKeyDown(Keyboard.KEY_LEFT) ) { + quadVelocity.x -= 0.1f; + } + if ( Keyboard.isKeyDown(Keyboard.KEY_ADD) ) { + angleRotation += 0.1f; + } + if ( Keyboard.isKeyDown(Keyboard.KEY_SUBTRACT) ) { + angleRotation -= 0.1f; + } + //throttle + if ( quadVelocity.x < -MAX_SPEED ) { + quadVelocity.x = -MAX_SPEED; + } + if ( quadVelocity.x > MAX_SPEED ) { + quadVelocity.x = MAX_SPEED; + } + if ( quadVelocity.y < -MAX_SPEED ) { + quadVelocity.y = -MAX_SPEED; + } + if ( quadVelocity.y > MAX_SPEED ) { + quadVelocity.y = MAX_SPEED; + } + if ( angleRotation < 0.0f ) { + angleRotation = 0.0f; + } + if ( angleRotation > MAX_SPEED ) { + angleRotation = MAX_SPEED; + } + } + + /** Cleans up the test */ + private void cleanup() { + renderer.cleanup(); + + IntBuffer int_buffer = BufferUtils.createIntBuffer(2); + int_buffer.put(0, buffer_id); + int_buffer.put(1, indices_buffer_id); + + glDeleteBuffers(int_buffer); + + Display.destroy(); + } + + /** + * Retrieves a displaymode, if one such is available + * + * @param width Required width + * @param height Required height + * @param bpp Minimum required bits per pixel + * + * @return + */ + private static DisplayMode findDisplayMode(int width, int height, int bpp) throws LWJGLException { + DisplayMode[] modes = Display.getAvailableDisplayModes(); + for ( int i = 0; i < modes.length; i++ ) { + if ( modes[i].getWidth() == width && modes[i].getHeight() == height && modes[i].getBitsPerPixel() >= bpp && modes[i].getFrequency() <= 60 ) { + return modes[i]; + } + } + return Display.getDesktopDisplayMode(); + } + + /** Initializes OGL */ + private void glInit() { + // Go into orthographic projection mode. + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(0, mode.getWidth(), 0, mode.getHeight(), -1.0f, 1.0f); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + + glViewport(0, 0, mode.getWidth(), mode.getHeight()); + //set clear color to black + glClearColor(0.0f, 0.0f, 0.0f, 0.0f); + + //sync frame (only works on windows) + Display.setVSyncEnabled(true); + + final IntBuffer int_buffer = BufferUtils.createIntBuffer(2); + glGenBuffers(int_buffer); + buffer_id = int_buffer.get(0); + indices_buffer_id = int_buffer.get(1); + + glBindBuffer(GL_ARRAY_BUFFER, buffer_id); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, indices_buffer_id); + + final FloatBuffer vertices = BufferUtils.createFloatBuffer(2 * 4); + vertices + .put(-50).put(-50) + .put(50).put(-50) + .put(-50).put(50) + .put(50).put(50); + vertices.rewind(); + + final IntBuffer indices = BufferUtils.createIntBuffer(4); + indices.put(0).put(1).put(2).put(3); + indices.rewind(); + + glBufferData(GL_ARRAY_BUFFER, vertices, GL_STATIC_DRAW); + glBufferData(GL_ELEMENT_ARRAY_BUFFER, indices, GL_STATIC_DRAW); + } + + /** Test entry point */ + public static void main(String[] args) { + System.out.println("Change between fullscreen and windowed mode, by pressing F and W respectively"); + System.out.println("Move quad using arrowkeys, and change rotation using +/-"); + FullScreenWindowedTest fswTest = new FullScreenWindowedTest(); + fswTest.execute(); + System.exit(0); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/Gears.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/Gears.java new file mode 100644 index 0000000..58994ba --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/Gears.java @@ -0,0 +1,580 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * 3-D gear wheels. Originally by Brian Paul + */ +package org.lwjgl.test.opengles; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.Sys; +import org.lwjgl.input.Keyboard; +import org.lwjgl.input.Mouse; +import org.lwjgl.opengl.Display; +import org.lwjgl.opengl.DisplayMode; +import org.lwjgl.opengles.*; +import org.lwjgl.test.opengles.util.Geometry; +import org.lwjgl.test.opengles.util.ImmediateModeBuffer; +import org.lwjgl.test.opengles.util.Shader; +import org.lwjgl.test.opengles.util.ShaderProgram; +import org.lwjgl.util.vector.Matrix4f; +import org.lwjgl.util.vector.Vector3f; + +import java.lang.reflect.Field; +import java.nio.FloatBuffer; +import java.util.StringTokenizer; + +import static org.lwjgl.opengles.GLES20.*; +import static org.lwjgl.test.opengles.util.GLLight.*; +import static org.lwjgl.test.opengles.util.GLMatrix.*; +import static org.lwjgl.test.opengles.util.Geometry.*; + +/** + *

+ * This is the OpenGL "standard" Gears demo, originally by Brian Paul + *

+ * + * @author Brian Matzon + * @version $Revision: 3276 $ + * $Id: Gears.java 3276 2010-02-21 21:18:17Z matzon $ + */ +public class Gears { + + private boolean run = true; + + private float view_rotx = 20.0f; + + private float view_roty = 30.0f; + + private float view_rotz = 0.0f; + + private Gear gear1; + + private Gear gear2; + + private Gear gear3; + + private float angle = 0.0f; + + private Shader vsh; + private Shader fsh; + + private ShaderProgram program; + + private int LIGHT_POS; + + private int MVP; + private int NM; + + private int GEAR_COLOR; + + private int vPosition; + private int vNormal; + + private final Matrix4f p = new Matrix4f(); + private final Matrix4f mv = new Matrix4f(); + private final Matrix4f mvp = new Matrix4f(); + + private final FloatBuffer m4fBuffer = BufferUtils.createFloatBuffer(4 * 4); + private final FloatBuffer m3fBuffer = BufferUtils.createFloatBuffer(3 * 3); + + public static void main(String[] args) { + new Gears().execute(); + System.exit(0); + } + + /** + * + */ + private void execute() { + try { + init(); + } catch (LWJGLException e) { + e.printStackTrace(); + System.out.println("Failed to initialize Gears."); + return; + } + + System.out.println("\nGL RENDERER: " + glGetString(GL_RENDERER)); + System.out.println("GL VENDOR: " + glGetString(GL_VENDOR)); + System.out.println("GL VERSION: " + glGetString(GL_VERSION)); + System.out.println("GL_SHADING_LANGUAGE_VERSION: " + glGetString(GL_SHADING_LANGUAGE_VERSION)); + System.out.println("GL_EXTENSIONS = " + glGetString(GL_EXTENSIONS)); + + ContextCapabilities caps = GLContext.getCapabilities(); + + System.out.println(); + + // Check extension support + Field[] field = ContextCapabilities.class.getFields(); + for ( Field f : field ) { + if ( f.getName().startsWith("GL_") ) { + try { + System.out.println(f.getName() + " - " + f.getBoolean(caps)); + } catch (IllegalAccessException e) { + e.printStackTrace(); + } + } + } + + System.out.println(); + + // Check for extensions that LWJGL does not support + final String extensions = glGetString(GL_EXTENSIONS); + + final StringTokenizer tokenizer = new StringTokenizer(extensions); + while ( tokenizer.hasMoreTokens() ) { + final String ext = tokenizer.nextToken(); + try { + if ( !caps.getClass().getField(ext).getBoolean(caps) ) + System.out.println("-- Extension exposed but functions are missing: " + ext); + } catch (NoSuchFieldException e) { + System.out.println("-- No LWJGL support for extension: " + ext); + } catch (Exception e) { + e.printStackTrace(); + } + } + + loop(); + + destroy(); + } + + /** + * + */ + private void destroy() { + program.destroy(); + + fsh.destroy(); + vsh.destroy(); + + gear3.destroy(); + gear2.destroy(); + gear1.destroy(); + + Display.destroy(); + } + + /** + * + */ + private void loop() { + long lastFrameTime = Sys.getTime(); + long startTime = System.currentTimeMillis() + 5000; + long fps = 0; + + while ( run ) { + if ( !Display.isVisible() ) + Thread.yield(); + else { + // This is the current frame time. + long frameStart = Sys.getTime(); + + // How many seconds passed since last frame. + final float frameTime = (float)((frameStart - lastFrameTime) / (double)Sys.getTimerResolution()); + lastFrameTime = frameStart; + + angle += frameTime * 120.0f; + + handleInput(); + + //glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_COVERAGE_BUFFER_BIT_NV); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glPushMatrix(); + glRotatef(view_rotx, 1.0f, 0.0f, 0.0f); + glRotatef(view_roty, 0.0f, 1.0f, 0.0f); + glRotatef(view_rotz, 0.0f, 0.0f, 1.0f); + + glPushMatrix(); + glTranslatef(-3.0f, -2.0f, 0.0f); + glRotatef(angle, 0.0f, 0.0f, 1.0f); + gear1.render(); + glPopMatrix(); + + glPushMatrix(); + glTranslatef(3.1f, -2.0f, 0.0f); + glRotatef(-2.0f * angle - 9.0f, 0.0f, 0.0f, 1.0f); + gear2.render(); + glPopMatrix(); + + glPushMatrix(); + glTranslatef(-3.1f, 4.2f, 0.0f); + glRotatef(-2.0f * angle - 25.0f, 0.0f, 0.0f, 1.0f); + gear3.render(); + glPopMatrix(); + + glPopMatrix(); + + try { + Display.update(); + //Display.sync(60); + } catch (PowerManagementEventException e) { + e.printStackTrace(); + } + if ( startTime > System.currentTimeMillis() ) { + fps++; + } else { + long timeUsed = 5000 + (startTime - System.currentTimeMillis()); + startTime = System.currentTimeMillis() + 5000; + System.out.println(fps + " frames in " + (timeUsed / 1000f) + " seconds = " + (fps / (timeUsed / 1000f))); + fps = 0; + } + + if ( Display.isCloseRequested() ) + break; + } + } + } + + private void handleInput() { + if ( Keyboard.getNumKeyboardEvents() != 0 ) { + while ( Keyboard.next() ) { + if ( Keyboard.getEventKeyState() ) + continue; + + final int key = Keyboard.getEventKey(); + switch ( key ) { + case Keyboard.KEY_ESCAPE: + run = false; + break; + } + } + } + + while ( Mouse.next() ) ; + } + + /** + * + */ + private void init() throws LWJGLException { + final int WIDTH = 640; + final int HEIGHT = 480; + + Display.setLocation((Display.getDisplayMode().getWidth() - WIDTH) / 2, + (Display.getDisplayMode().getHeight() - HEIGHT) / 2); + try { + Display.setDisplayMode(new DisplayMode(WIDTH, HEIGHT)); + } catch (PowerManagementEventException e) { + e.printStackTrace(); + } + Display.setTitle("Gears"); + Display.create(new PixelFormat()); + + //glCoverageMaskNV(true); + + // setup ogl + glViewport(0, 0, WIDTH, HEIGHT); + glFrontFace(GL_CCW); + glCullFace(GL_BACK); + glEnable(GL_CULL_FACE); + glEnable(GL_DEPTH_TEST); + + final Vector3f lp = new Vector3f(5.0f, 5.0f, 10.0f); + lp.normalise(); + glLight(GL_LIGHT0, GL_POSITION, lp.getX(), lp.getY(), lp.getZ(), 0.0f); + + /* make the gears */ + gear1 = new Gear(gear(1.0f, 4.0f, 1.0f, 20, 0.7f), new float[] { 0.8f, 0.1f, 0.0f, 1.0f }); + gear2 = new Gear(gear(0.5f, 2.0f, 2.0f, 10, 0.7f), new float[] { 0.0f, 0.8f, 0.2f, 1.0f }); + gear3 = new Gear(gear(1.3f, 2.0f, 0.5f, 10, 0.7f), new float[] { 0.2f, 0.2f, 1.0f, 1.0f }); + + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + + final float h = (float)300 / (float)300; + glFrustum(-1.0f, 1.0f, -h, h, 5.0f, 60.0f); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glTranslatef(0.0f, 0.0f, -40.0f); + + vsh = new Shader(GL_VERTEX_SHADER, "uniform highp vec4 LIGHT_POS;\n" + + "uniform highp mat4 MODEL_VIEW_PROJECTION_MATRIX;\n" + + "uniform mediump mat3 NORMAL_MATRIX;\n" + + "uniform lowp vec3 GEAR_COLOR;\n" + + "attribute highp vec3 vPosition;\n" + + "attribute mediump vec3 vNormal;\n" + + "varying lowp vec3 color;\n" + + "void main(void) {\n" + + "\tgl_Position = MODEL_VIEW_PROJECTION_MATRIX * vec4(vPosition, 1.0);\n" + + "\tvec3 normal = NORMAL_MATRIX * vNormal;\n" + + "\tcolor = max(dot(normal, vec3(LIGHT_POS)), 0.0) * GEAR_COLOR + vec3(0.05);\n" + + "}"); + + fsh = new Shader(GL_FRAGMENT_SHADER, "varying lowp vec3 color;\n" + + "void main(void) {\n" + + "\tgl_FragColor = vec4(color, 1.0);\n" + + "}"); + + program = new ShaderProgram(vsh, fsh); + program.enable(); + + LIGHT_POS = program.getUniformLocation("LIGHT_POS"); + + MVP = program.getUniformLocation("MODEL_VIEW_PROJECTION_MATRIX"); + NM = program.getUniformLocation("NORMAL_MATRIX"); + + GEAR_COLOR = program.getUniformLocation("GEAR_COLOR"); + + vPosition = program.getAttributeLocation("vPosition"); + vNormal = program.getAttributeLocation("vNormal"); + + glEnableVertexAttribArray(vNormal); + glEnableVertexAttribArray(vPosition); + } + + /** + * Draw a gear wheel. You'll probably want to call this function when + * building a display list since we do a lot of trig here. + * + * @param inner_radius radius of hole at center + * @param outer_radius radius at center of teeth + * @param width width of gear + * @param teeth number of teeth + * @param tooth_depth depth of tooth + */ + private static Geometry gear(float inner_radius, float outer_radius, float width, int teeth, float tooth_depth) { + int i; + float r0, r1, r2; + float angle, da; + float u, v, len; + + r0 = inner_radius; + r1 = outer_radius - tooth_depth / 2.0f; + r2 = outer_radius + tooth_depth / 2.0f; + + da = 2.0f * (float)Math.PI / teeth / 4.0f; + + final Geometry gear = new Geometry(); + final ImmediateModeBuffer imb = new ImmediateModeBuffer(1024); + int lastDrawIndex = 0; + + //glShadeModel(GL_FLAT); + + // draw front face + lastDrawIndex += gear.addDrawCommand(GL_TRIANGLE_STRIP, lastDrawIndex, teeth * 4 + 2); + for ( i = 0; i <= teeth; i++ ) { + angle = i * 2.0f * (float)Math.PI / teeth; + + imb.glNormal3f(0.0f, 0.0f, 1.0f); + imb.glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5f); + + imb.glNormal3f(0.0f, 0.0f, 1.0f); + imb.glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5f); + + if ( i < teeth ) { + imb.glNormal3f(0.0f, 0.0f, 1.0f); + imb.glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5f); + + imb.glNormal3f(0.0f, 0.0f, 1.0f); + imb.glVertex3f(r1 * cos(angle + 3.0f * da), r1 * sin(angle + 3.0f * da), width * 0.5f); + } + } + + // draw front sides of teeth + for ( i = 0; i < teeth; i++ ) { + lastDrawIndex += gear.addDrawCommand(GL_TRIANGLE_STRIP, lastDrawIndex, 4); + + angle = i * 2.0f * (float)Math.PI / teeth; + + imb.glNormal3f(0.0f, 0.0f, 1.0f); + imb.glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5f); + + imb.glNormal3f(0.0f, 0.0f, 1.0f); + imb.glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5f); + + imb.glNormal3f(0.0f, 0.0f, 1.0f); + imb.glVertex3f(r1 * cos(angle + 3.0f * da), r1 * sin(angle + 3.0f * da), width * 0.5f); + + imb.glNormal3f(0.0f, 0.0f, 1.0f); + imb.glVertex3f(r2 * cos(angle + 2.0f * da), r2 * sin(angle + 2.0f * da), width * 0.5f); + } + + // draw back face + lastDrawIndex += gear.addDrawCommand(GL_TRIANGLE_STRIP, lastDrawIndex, (teeth + 1) * 4); + for ( i = 0; i <= teeth; i++ ) { + angle = i * 2.0f * (float)Math.PI / teeth; + + imb.glNormal3f(0.0f, 0.0f, 1.0f); + imb.glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5f); + + imb.glNormal3f(0.0f, 0.0f, 1.0f); + imb.glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5f); + + imb.glNormal3f(0.0f, 0.0f, 1.0f); + imb.glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5f); + + imb.glNormal3f(0.0f, 0.0f, 1.0f); + imb.glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5f); + } + + // draw back sides of teeth + for ( i = 0; i < teeth; i++ ) { + lastDrawIndex += gear.addDrawCommand(GL_TRIANGLE_STRIP, lastDrawIndex, 4); + + angle = i * 2.0f * (float)Math.PI / teeth; + + imb.glNormal3f(0.0f, 0.0f, 1.0f); + imb.glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5f); + + imb.glNormal3f(0.0f, 0.0f, 1.0f); + imb.glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), -width * 0.5f); + + imb.glNormal3f(0.0f, 0.0f, 1.0f); + imb.glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5f); + + imb.glNormal3f(0.0f, 0.0f, 1.0f); + imb.glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5f); + } + + // draw outward faces of teeth + // OpenGL ES 2.0 note: This needs to be converted to a triangle + // list with face normals to get the flat look of the original. + lastDrawIndex += gear.addDrawCommand(GL_TRIANGLE_STRIP, lastDrawIndex, teeth * 8 + 2); + for ( i = 0; i < teeth; i++ ) { + angle = i * 2.0f * (float)Math.PI / teeth; + + imb.glNormal3f(cos(angle), sin(angle), 0.0f); + imb.glVertex3f(r1 * cos(angle), r1 * sin(angle), width * 0.5f); + + imb.glNormal3f(cos(angle), sin(angle), 0.0f); + imb.glVertex3f(r1 * cos(angle), r1 * sin(angle), -width * 0.5f); + + u = r2 * cos(angle + da) - r1 * cos(angle); + v = r2 * sin(angle + da) - r1 * sin(angle); + len = (float)Math.sqrt(u * u + v * v); + u /= len; + v /= len; + + imb.glNormal3f(v, -u, 0.0f); + imb.glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), width * 0.5f); + + imb.glNormal3f(v, -u, 0.0f); + imb.glVertex3f(r2 * cos(angle + da), r2 * sin(angle + da), -width * 0.5f); + + imb.glNormal3f(cos(angle), sin(angle), 0.0f); + imb.glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), width * 0.5f); + + imb.glNormal3f(cos(angle), sin(angle), 0.0f); + imb.glVertex3f(r2 * cos(angle + 2 * da), r2 * sin(angle + 2 * da), -width * 0.5f); + + u = r1 * cos(angle + 3 * da) - r2 * cos(angle + 2 * da); + v = r1 * sin(angle + 3 * da) - r2 * sin(angle + 2 * da); + + imb.glNormal3f(v, -u, 0.0f); + imb.glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), width * 0.5f); + + imb.glNormal3f(v, -u, 0.0f); + imb.glVertex3f(r1 * cos(angle + 3 * da), r1 * sin(angle + 3 * da), -width * 0.5f); + } + imb.glNormal3f(cos(0), sin(0), 0.0f); + imb.glVertex3f(r1 * cos(0), r1 * sin(0), width * 0.5f); + + imb.glNormal3f(cos(0), sin(0), 0.0f); + imb.glVertex3f(r1 * cos(0), r1 * sin(0), -width * 0.5f); + + //glShadeModel(GL_SMOOTH); + + // draw inside radius cylinder + lastDrawIndex += gear.addDrawCommand(GL_TRIANGLE_STRIP, lastDrawIndex, (teeth + 1) * 2); + for ( i = 0; i <= teeth; i++ ) { + angle = i * 2.0f * (float)Math.PI / teeth; + + imb.glNormal3f(-cos(angle), -sin(angle), 0.0f); + imb.glVertex3f(r0 * cos(angle), r0 * sin(angle), -width * 0.5f); + + imb.glNormal3f(-cos(angle), -sin(angle), 0.0f); + imb.glVertex3f(r0 * cos(angle), r0 * sin(angle), width * 0.5f); + } + + gear.update(imb.getBuffer()); + return gear; + } + + private class Gear { + + private final Geometry geom; + + private final float[] color; + + Gear(final Geometry geom, final float[] color) { + this.geom = geom; + this.color = color; + } + + void render() { + // Set gear color + glUniform3f(GEAR_COLOR, color[0], color[1], color[2]); + + // Set Light position + setUniform4f(LIGHT_POS, GL_LIGHT0, GL_POSITION); + + // Get Projection and Modelview matrices + glMatrixMode(GL_PROJECTION); + glGetMatrix(p); + + glMatrixMode(GL_MODELVIEW); + glGetMatrix(mv); + + // Set MVP uniform + Matrix4f.mul(p, mv, mvp); + mvp.store(m4fBuffer); + m4fBuffer.flip(); + glUniformMatrix4(MVP, false, m4fBuffer); + + // Set normal matrix (upper-left 3x3 of the inverse transpose MV matrix) + mv.invert(); + mv.transpose(); + mv.store3f(m3fBuffer); + m3fBuffer.flip(); + glUniformMatrix3(NM, false, m3fBuffer); + + geom.bind(); + + final int stride = (3 + 3) * 4; + glVertexAttribPointer(vNormal, 3, GL_FLOAT, false, stride, 0); + glVertexAttribPointer(vPosition, 3, GL_FLOAT, false, stride, 3 * 4); + + geom.draw(); + } + + void destroy() { + geom.destroy(); + } + + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/MappedIndexedVBOTest.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/MappedIndexedVBOTest.java new file mode 100644 index 0000000..ac011f5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/MappedIndexedVBOTest.java @@ -0,0 +1,252 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id: VBOIndexTest.java 2983 2008-04-07 18:36:09Z matzon $ + * + * Simple java test program. + * + * @author elias_naur + * @version $Revision: 2983 $ + */ + +package org.lwjgl.test.opengles; + +import org.lwjgl.BufferUtils; +import org.lwjgl.Sys; +import org.lwjgl.input.Keyboard; +import org.lwjgl.input.Mouse; +import org.lwjgl.opengl.Display; +import org.lwjgl.opengl.DisplayMode; +import org.lwjgl.opengles.GLContext; +import org.lwjgl.opengles.PixelFormat; + +import java.nio.ByteBuffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; + +import static org.lwjgl.opengles.GLES20.*; +import static org.lwjgl.opengles.OESMapbuffer.*; +import static org.lwjgl.test.opengles.util.GLMatrix.*; + +public final class MappedIndexedVBOTest { + + static { + try { + //find first display mode that allows us 640*480*16 + int mode = -1; + DisplayMode[] modes = Display.getAvailableDisplayModes(); + for ( int i = 0; i < modes.length; i++ ) { + if ( modes[i].getWidth() == 640 + && modes[i].getHeight() == 480 + && modes[i].getBitsPerPixel() >= 16 ) { + mode = i; + break; + } + } + if ( mode != -1 ) { + //select above found displaymode + System.out.println("Setting display mode to " + modes[mode]); + Display.setDisplayMode(modes[mode]); + System.out.println("Created display."); + } + } catch (Exception e) { + System.err.println("Failed to create display due to " + e); + } + } + + static { + try { + Display.create(new PixelFormat()); + System.out.println("Created OpenGL."); + + if ( !GLContext.getCapabilities().GL_OES_mapbuffer ) { + System.out.println("GL_OES_mapbuffer is not supported, quitting!"); + System.exit(0); + } + } catch (Exception e) { + System.err.println("Failed to create OpenGL due to " + e); + System.exit(1); + } + } + + /** Is the game finished? */ + private static boolean finished; + + /** A rotating square! */ + private static float angle; + private static int buffer_id; + private static int indices_buffer_id; + private static FloatBuffer vertices; + private static ByteBuffer mapped_buffer; + private static FloatBuffer mapped_float_buffer; + private static IntBuffer indices; + private static ByteBuffer mapped_indices_buffer; + private static IntBuffer mapped_indices_int_buffer; + + private static QuadRenderer renderer; + + public static void main(String[] arguments) { + try { + init(); + while ( !finished ) { + Display.update(); + Display.sync(30); + + if ( !Display.isVisible() ) + Thread.sleep(200); + else if ( Display.isCloseRequested() ) + System.exit(0); + + mainLoop(); + render(); + } + } catch (Throwable t) { + t.printStackTrace(); + } finally { + cleanup(); + } + System.exit(0); + } + + /** All calculations are done in here */ + private static void mainLoop() { + angle += 1f; + if ( angle > 360.0f ) + angle = 0.0f; + + if ( Mouse.getDX() != 0 || Mouse.getDY() != 0 || Mouse.getDWheel() != 0 ) + System.out.println("Mouse moved " + Mouse.getDX() + " " + Mouse.getDY() + " " + Mouse.getDWheel()); + for ( int i = 0; i < Mouse.getButtonCount(); i++ ) + if ( Mouse.isButtonDown(i) ) + System.out.println("Button " + i + " down"); + if ( Keyboard.isKeyDown(Keyboard.KEY_ESCAPE) ) + finished = true; + for ( int i = 0; i < Keyboard.getNumKeyboardEvents(); i++ ) { + Keyboard.next(); + if ( Keyboard.getEventKey() == Keyboard.KEY_ESCAPE && Keyboard.getEventKeyState() ) + finished = true; + if ( Keyboard.getEventKey() == Keyboard.KEY_T && Keyboard.getEventKeyState() ) + System.out.println("Current time: " + Sys.getTime()); + } + } + + /** All rendering is done in here */ + private static void render() { + glClear(GL_COLOR_BUFFER_BIT); + + glPushMatrix(); + glTranslatef(Display.getDisplayMode().getWidth() / 2, Display.getDisplayMode().getHeight() / 2, 0.0f); + glRotatef(angle, 0, 0, 1.0f); + + renderer.setMVPUniform(); + + ByteBuffer new_mapped_buffer = glMapBufferOES(GL_ARRAY_BUFFER, GL_WRITE_ONLY_OES, mapped_buffer); + if ( new_mapped_buffer != mapped_buffer ) { + mapped_buffer = new_mapped_buffer; + mapped_float_buffer = new_mapped_buffer.asFloatBuffer(); + } + + new_mapped_buffer = glMapBufferOES(GL_ELEMENT_ARRAY_BUFFER, GL_WRITE_ONLY_OES, mapped_indices_buffer); + if ( new_mapped_buffer != mapped_indices_buffer ) { + mapped_indices_buffer = new_mapped_buffer; + mapped_indices_int_buffer = new_mapped_buffer.asIntBuffer(); + } + + mapped_float_buffer.rewind(); + vertices.rewind(); + mapped_float_buffer.put(vertices); + + mapped_indices_int_buffer.rewind(); + indices.rewind(); + mapped_indices_int_buffer.put(indices); + if ( glUnmapBufferOES(GL_ARRAY_BUFFER) && + glUnmapBufferOES(GL_ELEMENT_ARRAY_BUFFER) ) { + glDrawElements(GL_TRIANGLE_STRIP, 4, GL_UNSIGNED_INT, 0); + } + + glPopMatrix(); + } + + /** Initialize */ + private static void init() throws Exception { + System.out.println("Timer resolution: " + Sys.getTimerResolution()); + + // Go into orthographic projection mode. + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(0, Display.getDisplayMode().getWidth(), 0, Display.getDisplayMode().getHeight(), -1.0f, 1.0f); + + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glViewport(0, 0, Display.getDisplayMode().getWidth(), Display.getDisplayMode().getHeight()); + + final IntBuffer int_buffer = BufferUtils.createIntBuffer(2); + glGenBuffers(int_buffer); + buffer_id = int_buffer.get(0); + indices_buffer_id = int_buffer.get(1); + + glBindBuffer(GL_ARRAY_BUFFER, buffer_id); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, indices_buffer_id); + + vertices = BufferUtils.createFloatBuffer(2 * 4); + vertices + .put(-50).put(-50) + .put(50).put(-50) + .put(-50).put(50) + .put(50).put(50); + vertices.rewind(); + + indices = BufferUtils.createIntBuffer(4); + indices.put(0).put(1).put(2).put(3); + indices.rewind(); + + glBufferData(GL_ARRAY_BUFFER, 2 * 4 * 4, GL_STREAM_DRAW); + glBufferData(GL_ELEMENT_ARRAY_BUFFER, 4 * 4, GL_STREAM_DRAW); + + renderer = new QuadRenderer(); + } + + /** Cleanup */ + private static void cleanup() { + renderer.cleanup(); + + IntBuffer int_buffer = BufferUtils.createIntBuffer(2); + int_buffer.put(0, buffer_id); + int_buffer.put(1, indices_buffer_id); + + glDeleteBuffers(int_buffer); + + Display.destroy(); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/QuadRenderer.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/QuadRenderer.java new file mode 100644 index 0000000..27a1ef6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/QuadRenderer.java @@ -0,0 +1,70 @@ +package org.lwjgl.test.opengles; + +import org.lwjgl.BufferUtils; +import org.lwjgl.test.opengles.util.Shader; +import org.lwjgl.test.opengles.util.ShaderProgram; +import org.lwjgl.util.vector.Matrix4f; + +import java.nio.FloatBuffer; + +import static org.lwjgl.opengles.GLES20.*; +import static org.lwjgl.test.opengles.util.GLMatrix.*; + +final class QuadRenderer { + + private final Shader vsh; + private final Shader fsh; + private final ShaderProgram program; + + private final int uniMVP; + + private final Matrix4f p = new Matrix4f(); + private final Matrix4f mv = new Matrix4f(); + private final Matrix4f mvp = new Matrix4f(); + + private final FloatBuffer m4fBuffer = BufferUtils.createFloatBuffer(4 * 4); + + QuadRenderer() { + vsh = new Shader(GL_VERTEX_SHADER, "uniform highp mat4 MODEL_VIEW_PROJECTION_MATRIX;\n" + + "attribute highp vec2 vPosition;\n" + + "void main(void) {\n" + + "\tgl_Position = MODEL_VIEW_PROJECTION_MATRIX * vec4(vPosition, 0.0, 1.0);\n" + + "}"); + + fsh = new Shader(GL_FRAGMENT_SHADER, "void main(void) {\n" + + "\tgl_FragColor = vec4(1.0);\n" + + "}"); + + program = new ShaderProgram(vsh, fsh); + program.enable(); + + uniMVP = program.getUniformLocation("MODEL_VIEW_PROJECTION_MATRIX"); + + final int vPosition = program.getAttributeLocation("vPosition"); + glVertexAttribPointer(vPosition, 2, GL_FLOAT, false, 0, 0); + glEnableVertexAttribArray(vPosition); + } + + void setMVPUniform() { + // Get Projection and Modelview matrices + glMatrixMode(GL_PROJECTION); + glGetMatrix(p); + + glMatrixMode(GL_MODELVIEW); + glGetMatrix(mv); + + // Set MVP uniform + Matrix4f.mul(p, mv, mvp); + mvp.store(m4fBuffer); + m4fBuffer.flip(); + glUniformMatrix4(uniMVP, false, m4fBuffer); + } + + void cleanup() { + program.destroy(); + + fsh.destroy(); + vsh.destroy(); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/BufferObject.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/BufferObject.java new file mode 100644 index 0000000..ea15141 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/BufferObject.java @@ -0,0 +1,99 @@ +package org.lwjgl.test.opengles.util; + +import java.nio.*; + +import static org.lwjgl.opengles.GLES20.*; +import static org.lwjgl.opengles.OESMapbuffer.*; + +abstract class BufferObject implements GLObject { + + protected final int ID; + + protected int target; + protected int usage; + + /** The BufferObject data size in bytes. */ + private int size; + + protected BufferObject(final int type, final int usage) { + this.ID = glGenBuffers(); + this.target = type; + this.usage = usage; + } + + protected BufferObject(final int type, final int usage, final Buffer buffer) { + this(type, usage); + setData(buffer); + } + + protected BufferObject(final int type, final int usage, final int dataSize) { + this(type, usage); + setData(dataSize); + } + + public final int getID() { + return ID; + } + + public void destroy() { + glDeleteBuffers(ID); + } + + public final int getTarget() { + return target; + } + + public final int getUsage() { + return usage; + } + + public final int getSize() { + return size; + } + + public abstract void enable(); + + public abstract void disable(); + + public final void setData(final Buffer buffer) { + enable(); + + if ( buffer instanceof ByteBuffer ) { + glBufferData(target, (ByteBuffer)buffer, usage); + size = buffer.remaining(); + } else if ( buffer instanceof ShortBuffer ) { + glBufferData(target, (ShortBuffer)buffer, usage); + size = buffer.remaining() << 1; + } else if ( buffer instanceof IntBuffer ) { + glBufferData(target, (IntBuffer)buffer, usage); + size = buffer.remaining() << 2; + } else if ( buffer instanceof FloatBuffer ) { + glBufferData(target, (FloatBuffer)buffer, usage); + size = buffer.remaining() << 2; + } + + disable(); + } + + public final void setData(final int dataSize) { + enable(); + + glBufferData(target, dataSize, usage); + size = dataSize; + + disable(); + } + + public final ByteBuffer map(final int access, final ByteBuffer oldBuffer) { + return glMapBufferOES(target, access, oldBuffer); + } + + public final ByteBuffer map(final int access, final int length, final ByteBuffer oldBuffer) { + return glMapBufferOES(target, access, length, oldBuffer); + } + + public final boolean unmap() { + return glUnmapBufferOES(target); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/BufferObjectArray.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/BufferObjectArray.java new file mode 100644 index 0000000..05d1307 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/BufferObjectArray.java @@ -0,0 +1,41 @@ +package org.lwjgl.test.opengles.util; + +import java.nio.Buffer; + +import static org.lwjgl.opengles.GLES20.*; + +public final class BufferObjectArray extends BufferObject { + + private static int boundBOArray; + + public BufferObjectArray(final int usage) { + super(GL_ARRAY_BUFFER, usage); + } + + public BufferObjectArray(final int usage, final Buffer buffer) { + super(GL_ARRAY_BUFFER, usage, buffer); + } + + public BufferObjectArray(final int usage, final int dataSize) { + super(GL_ARRAY_BUFFER, usage, dataSize); + } + + public void enable() { + if ( boundBOArray != ID ) { + glBindBuffer(GL_ARRAY_BUFFER, ID); + boundBOArray = ID; + } + } + + public void disable() { + boArrayDisable(); + } + + public static void boArrayDisable() { + if ( boundBOArray != 0 ) { + glBindBuffer(GL_ARRAY_BUFFER, 0); + boundBOArray = 0; + } + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/BufferObjectElement.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/BufferObjectElement.java new file mode 100644 index 0000000..80952c3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/BufferObjectElement.java @@ -0,0 +1,41 @@ +package org.lwjgl.test.opengles.util; + +import java.nio.Buffer; + +import static org.lwjgl.opengles.GLES20.*; + +public final class BufferObjectElement extends BufferObject { + + private static int boundBOElementArray; + + public BufferObjectElement(final int usage) { + super(GL_ELEMENT_ARRAY_BUFFER, usage); + } + + public BufferObjectElement(final int usage, final Buffer buffer) { + super(GL_ELEMENT_ARRAY_BUFFER, usage, buffer); + } + + public BufferObjectElement(final int usage, final int dataSize) { + super(GL_ELEMENT_ARRAY_BUFFER, usage, dataSize); + } + + public void enable() { + if ( boundBOElementArray != ID ) { + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ID); + boundBOElementArray = ID; + } + } + + public void disable() { + boElementArrayDisable(); + } + + public static void boElementArrayDisable() { + if ( boundBOElementArray != 0 ) { + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); + boundBOElementArray = 0; + } + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/GLLight.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/GLLight.java new file mode 100644 index 0000000..7b5467c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/GLLight.java @@ -0,0 +1,165 @@ +package org.lwjgl.test.opengles.util; + +import static org.lwjgl.opengles.GLES20.*; + +/** Emulates the light state in fixed-function OpenGL. */ +public class GLLight { + + public static final int GL_LIGHT0 = 0x4000; + public static final int GL_LIGHT1 = 0x4001; + public static final int GL_LIGHT2 = 0x4002; + public static final int GL_LIGHT3 = 0x4003; + public static final int GL_LIGHT4 = 0x4004; + public static final int GL_LIGHT5 = 0x4005; + public static final int GL_LIGHT6 = 0x4006; + public static final int GL_LIGHT7 = 0x4007; + + public static final int GL_AMBIENT = 0x1200; + public static final int GL_DIFFUSE = 0x1201; + public static final int GL_SPECULAR = 0x1202; + public static final int GL_POSITION = 0x1203; + public static final int GL_SPOT_DIRECTION = 0x1204; + public static final int GL_SPOT_EXPONENT = 0x1205; + public static final int GL_SPOT_CUTOFF = 0x1206; + public static final int GL_CONSTANT_ATTENUATION = 0x1207; + public static final int GL_LINEAR_ATTENUATION = 0x1208; + public static final int GL_QUADRATIC_ATTENUATION = 0x1209; + + private static final Light[] lights = new Light[8]; + + static { + for ( int i = 0; i < lights.length; i++ ) + lights[i] = new Light(); + + System.arraycopy(new float[] { 1.0f, 1.0f, 1.0f, 1.0f }, 0, lights[0].diffuse, 0, 4); + System.arraycopy(new float[] { 1.0f, 1.0f, 1.0f, 1.0f }, 0, lights[0].specular, 0, 4); + } + + private GLLight() { + } + + public static void glLight(final int light, final int pname, final float v) { + if ( light < GL_LIGHT0 || GL_LIGHT7 < light ) + throw new IllegalArgumentException("Invalid light specified: " + light); + + final Light l = lights[light - GL_LIGHT0]; + + switch ( pname ) { + case GL_SPOT_EXPONENT: + l.s = v; + break; + case GL_SPOT_CUTOFF: + l.c = v; + break; + case GL_CONSTANT_ATTENUATION: + l.k0 = v; + break; + case GL_LINEAR_ATTENUATION: + l.k1 = v; + break; + case GL_QUADRATIC_ATTENUATION: + l.k2 = v; + break; + default: + throw new IllegalArgumentException("Invalid light parameter specified: " + pname); + } + } + + public static void glLight(final int light, final int pname, + final float x, final float y, final float z) { + if ( light < GL_LIGHT0 || GL_LIGHT7 < light ) + throw new IllegalArgumentException("Invalid light specified: " + light); + + if ( pname != GL_SPOT_DIRECTION ) + throw new IllegalArgumentException("Invalid light parameter specified: " + pname); + + final float[] param = lights[light - GL_LIGHT0].direction; + + param[0] = x; + param[1] = y; + param[2] = z; + } + + private static float[] getParam4f(final int light, final int pname) { + if ( light < GL_LIGHT0 || GL_LIGHT7 < light ) + throw new IllegalArgumentException("Invalid light specified: " + light); + + final Light l = lights[light - GL_LIGHT0]; + switch ( pname ) { + case GL_AMBIENT: + return l.ambient; + case GL_DIFFUSE: + return l.diffuse; + case GL_SPECULAR: + return l.specular; + case GL_POSITION: + return l.position; + default: + throw new IllegalArgumentException("Invalid light parameter specified: " + pname); + } + } + + public static void glLight(final int light, final int pname, + final float x, final float y, final float z, final float w) { + final float[] param = getParam4f(light, pname); + param[0] = x; + param[1] = y; + param[2] = z; + param[3] = w; + } + + public static void setUniform1f(final int location, final int light, final int pname) { + if ( light < GL_LIGHT0 || GL_LIGHT7 < light ) + throw new IllegalArgumentException("Invalid light specified: " + light); + + final Light l = lights[light - GL_LIGHT0]; + + switch ( pname ) { + case GL_SPOT_EXPONENT: + glUniform1f(location, l.s); + break; + case GL_SPOT_CUTOFF: + glUniform1f(location, l.c); + break; + case GL_CONSTANT_ATTENUATION: + glUniform1f(location, l.k0); + break; + case GL_LINEAR_ATTENUATION: + glUniform1f(location, l.k1); + break; + case GL_QUADRATIC_ATTENUATION: + glUniform1f(location, l.k2); + break; + default: + throw new IllegalArgumentException("Invalid light parameter specified: " + pname); + } + } + + public static void setUniform3f(final int location, final int light, final int pname) { + if ( pname != GL_SPOT_DIRECTION ) + throw new IllegalArgumentException("Invalid light parameter specified: " + pname); + + final float[] param = lights[light - GL_LIGHT0].direction; + glUniform3f(location, param[0], param[1], param[2]); + } + + public static void setUniform4f(final int location, final int light, final int pname) { + final float[] param = getParam4f(light, pname); + glUniform4f(location, param[0], param[1], param[2], param[3]); + } + + private static class Light { + + float[] ambient = { 0.0f, 0.0f, 0.0f, 1.0f }; + float[] diffuse = { 0.0f, 0.0f, 0.0f, 1.0f }; + float[] specular = { 0.0f, 0.0f, 0.0f, 1.0f }; + + float[] position = { 0.0f, 0.0f, 1.0f, 0.0f }; + float[] direction = { 0.0f, 0.0f, -1.0f }; + + float s, c = 180.0f; + float k0 = 1.0f, k1, k2; + + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/GLMatrix.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/GLMatrix.java new file mode 100644 index 0000000..5ca8ab0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/GLMatrix.java @@ -0,0 +1,163 @@ +package org.lwjgl.test.opengles.util; + +import org.lwjgl.util.vector.Matrix4f; +import org.lwjgl.util.vector.Vector3f; + +import java.util.Stack; + +import static java.lang.Math.*; + +/** Emulates the matrix stack in fixed-function OpenGL. */ +public final class GLMatrix { + + public static final int GL_MODELVIEW = 0x1700; + public static final int GL_PROJECTION = 0x1701; + + private static final float PI = (float)Math.PI; + + /** The model/view matrix stack. */ + private static final Stack mvMatrixStack = new Stack(); + + /** The projection matrix stack. */ + private static final Stack pMatrixStack = new Stack(); + + private static final Matrix4f m4f = new Matrix4f(); + private static final Vector3f v3f = new Vector3f(); + + private static int mode = GL_MODELVIEW; + + static { + mvMatrixStack.push(new Matrix4f()); + pMatrixStack.push(new Matrix4f()); + } + + private GLMatrix() { + } + + private static Stack getCurrentStack() { + switch ( mode ) { + case GL_MODELVIEW: + return mvMatrixStack; + case GL_PROJECTION: + return pMatrixStack; + default: + return null; // Cannot happen + } + } + + private static Matrix4f getCurrentMatrix() { + return getCurrentStack().peek(); + } + + public static void glMatrixMode(final int mode) { + if ( mode != GL_MODELVIEW && mode != GL_PROJECTION ) + throw new IllegalArgumentException("Invalid matrix mode specified: " + mode); + + GLMatrix.mode = mode; + } + + public static void glPushMatrix() { + final Stack stack = getCurrentStack(); + stack.push(new Matrix4f(stack.peek())); + } + + public static void glPopMatrix() { + final Stack stack = getCurrentStack(); + + if ( stack.size() == 1 ) + throw new IllegalStateException("The last matrix in the stack cannot be popped."); + + getCurrentStack().pop(); + } + + public static void glLoadIdentity() { + final Matrix4f m = getCurrentMatrix(); + m.setIdentity(); + } + + public static void glLoadMatrix(final Matrix4f s) { + getCurrentMatrix().load(s); + } + + public static void glMultMatrix(final Matrix4f m) { + final Matrix4f c = getCurrentMatrix(); + Matrix4f.mul(c, m, c); + } + + public static void glTranslatef(final float x, final float y, final float z) { + final Matrix4f m = getCurrentMatrix(); + v3f.set(x, y, z); + m.translate(v3f); + } + + public static void glRotatef(final float angle, final float x, final float y, final float z) { + final Matrix4f m = getCurrentMatrix(); + v3f.set(x, y, z); + m.rotate((float)toRadians(angle), v3f); + } + + public static void glOrtho(final float l, final float r, final float b, final float t, final float n, final float f) { + final Matrix4f m = m4f; + m.setIdentity(); + + m.m00 = 2.0f / (r - l); + m.m30 = -(r + l) / (r - l); + + m.m11 = 2.0f / (t - b); + m.m31 = -(t + b) / (t - b); + + m.m22 = -2.0f / (f - n); + m.m32 = -(f + n) / (f - n); + + glMultMatrix(m); + } + + public static void glFrustum(final float l, final float r, final float b, final float t, final float n, final float f) { + final Matrix4f m = m4f; + m.setIdentity(); + + m.m00 = 2.0f * n / (r - l); + m.m20 = (r + l) / (r - l); + + m.m11 = 2.0f * n / (t - b); + m.m21 = (t + b) / (t - b); + + m.m22 = -(f + n) / (f - n); + m.m32 = -(2.0f * f * n) / (f - n); + + m.m23 = -1.0f; + m.m33 = 0.0f; + + glMultMatrix(m); + } + + public static void gluPerspective(final float fovy, final float aspect, final float zNear, final float zFar) { + final float radians = fovy / 2.0f * PI / 180.0f; + + final float deltaZ = zFar - zNear; + final float sine = (float)sin(radians); + + if ( (deltaZ == 0) || (sine == 0) || (aspect == 0) ) { + return; + } + + final float cotangent = (float)cos(radians) / sine; + + final Matrix4f m = m4f; + m.setIdentity(); + + m.m00 = cotangent / aspect; + m.m11 = cotangent; + m.m22 = -(zFar + zNear) / deltaZ; + m.m23 = -1.0f; + m.m32 = -2 * zNear * zFar / deltaZ; + m.m33 = 0.0f; + + glMultMatrix(m); + } + + public static void glGetMatrix(final Matrix4f d) { + d.load(getCurrentMatrix()); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/GLObject.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/GLObject.java new file mode 100644 index 0000000..6286f1c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/GLObject.java @@ -0,0 +1,9 @@ +package org.lwjgl.test.opengles.util; + +public interface GLObject { + + int getID(); + + void destroy(); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/Geometry.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/Geometry.java new file mode 100644 index 0000000..a200fa8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/Geometry.java @@ -0,0 +1,78 @@ +package org.lwjgl.test.opengles.util; + +import org.lwjgl.test.opengles.util.BufferObjectArray; + +import java.nio.FloatBuffer; +import java.util.ArrayList; +import java.util.List; + +import static org.lwjgl.opengles.GLES20.*; + +public class Geometry { + + protected BufferObjectArray bo; + + protected final List drawCommands = new ArrayList(4); + + public Geometry() { + } + + public Geometry(final FloatBuffer buffer) { + update(buffer); + } + + public void update(final FloatBuffer buffer) { + if ( bo != null ) + destroy(); + + bo = new BufferObjectArray(GL_STATIC_DRAW, buffer); + } + + public void bind() { + bo.enable(); + } + + public void draw() { + for ( DrawCommand command : drawCommands ) + command.draw(); + } + + public void destroy() { + bo.destroy(); + bo = null; + + drawCommands.clear(); + } + + public int addDrawCommand(final int mode, final int first, final int count) { + drawCommands.add(new DrawCommand(mode, first, count)); + return count; + } + + public static float sin(final float r) { + return (float)Math.sin(r); + } + + public static float cos(final float r) { + return (float)Math.cos(r); + } + + protected static class DrawCommand { + + private int mode; + private int first; + private int count; + + private DrawCommand(final int mode, final int first, final int count) { + this.mode = mode; + this.first = first; + this.count = count; + } + + void draw() { + glDrawArrays(mode, first, count); + } + + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/ImmediateModeBuffer.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/ImmediateModeBuffer.java new file mode 100644 index 0000000..8205405 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/ImmediateModeBuffer.java @@ -0,0 +1,58 @@ +package org.lwjgl.test.opengles.util; + +import org.lwjgl.BufferUtils; + +import java.nio.FloatBuffer; + +/** + * Utility class that emulates immediate mode vertex data submission. + * Can be used to create VBO data. + */ +public final class ImmediateModeBuffer { + + private FloatBuffer buffer; + + public ImmediateModeBuffer(final int startSize) { + this.buffer = BufferUtils.createFloatBuffer(startSize); + } + + private void checkSize(final int count) { + while ( buffer.remaining() < count ) { + final FloatBuffer newBuffer = BufferUtils.createFloatBuffer(buffer.capacity() << 1); + buffer.flip(); + newBuffer.put(buffer); + buffer = newBuffer; + } + } + + public FloatBuffer getBuffer() { + buffer.flip(); + return buffer; + } + + public void glVertex2f(final float x, final float y) { + checkSize(2); + buffer.put(x).put(y); + } + + public void glVertex3f(final float x, final float y, final float z) { + checkSize(3); + buffer.put(x).put(y).put(z); + } + + public void glVertex4f(final float x, final float y, final float z, final float w) { + checkSize(4); + buffer.put(x).put(y).put(z).put(w); + } + + public void glNormal3f(final float x, final float y, final float z) { + checkSize(3); + buffer.put(x).put(y).put(z); + } + + public void glTexCoord2f(final float s, final float t) { + checkSize(2); + buffer.put(s).put(t); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/Shader.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/Shader.java new file mode 100644 index 0000000..c377d3e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/Shader.java @@ -0,0 +1,98 @@ +package org.lwjgl.test.opengles.util; + +import org.lwjgl.BufferUtils; + +import java.io.BufferedInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.nio.ByteBuffer; + +import static org.lwjgl.opengles.GLES20.*; + +public class Shader implements GLObject { + + protected static ByteBuffer fileBuffer = BufferUtils.createByteBuffer(1024 * 10); + + private int type; + private int ID; + + public Shader() { + } + + public Shader(final int type, final CharSequence source) { + createFromSource(type, source); + } + + public int getID() { + return ID; + } + + public int getType() { + return type; + } + + public void destroy() { + if ( ID == 0 ) + throw new IllegalStateException("The shader has not been created"); + + glDeleteShader(ID); + ID = 0; + } + + public void createFromFile(final int type, final ClassLoader loader, final String file) throws IOException { + final InputStream inputStream = loader.getResourceAsStream(file); + + if ( inputStream == null ) + throw new IllegalArgumentException("A shader source file could not be found: " + file); + + final BufferedInputStream stream = new BufferedInputStream(inputStream); + + byte character; + while ( (character = (byte)stream.read()) != -1 ) + fileBuffer.put(character); + fileBuffer.flip(); + + stream.close(); + + final byte[] array = new byte[fileBuffer.remaining()]; + fileBuffer.get(array); + + final String source = new String(array); + + fileBuffer.clear(); + + createFromSource(type, source); + } + + public void createFromSource(final int type, final CharSequence source) { + if ( ID != 0 ) + throw new IllegalStateException("The shader has already been created"); + + this.type = type; + this.ID = glCreateShader(type); + + glShaderSource(ID, source); + + glCompileShader(ID); + + if ( glGetShaderi(ID, GL_COMPILE_STATUS) == GL_FALSE ) { + printInfoLog(); + destroy(); + throw new RuntimeException("A compilation error occured in a shader."); + } + } + + public void printInfoLog() { + if ( ID == 0 ) + throw new IllegalStateException("The shader has not been created"); + + final int logLength = glGetShaderi(ID, GL_INFO_LOG_LENGTH); + if ( logLength <= 1 ) + return; + + System.out.println("\nInfo Log of Shader Object: " + ID); + System.out.println("--------------------------"); + System.out.println(glGetShaderInfoLog(ID, logLength)); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/ShaderProgram.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/ShaderProgram.java new file mode 100644 index 0000000..de120d1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/ShaderProgram.java @@ -0,0 +1,82 @@ +package org.lwjgl.test.opengles.util; + +import static org.lwjgl.opengles.GLES20.*; + +public class ShaderProgram implements GLObject { + + private final int ID; + + public ShaderProgram(final Shader... shaders) { + this.ID = glCreateProgram(); + + for ( Shader shader : shaders ) + glAttachShader(ID, shader.getID()); + + glLinkProgram(ID); + + if ( glGetProgrami(ID, GL_LINK_STATUS) == GL_FALSE ) { + printInfoLog(); + destroy(); + throw new RuntimeException("Failed to link a Shader Program: " + ID); + } + } + + public void validate() { + glValidateProgram(ID); + + final boolean error = glGetProgrami(ID, GL_VALIDATE_STATUS) == GL_FALSE; + + if ( error ) { + printInfoLog(); + throw new RuntimeException("Failed to validate a Shader Program."); + } + } + + public int getID() { + return ID; + } + + public void destroy() { + glDeleteProgram(ID); + } + + public void enable() { + glUseProgram(ID); + } + + public static void disable() { + glUseProgram(0); + } + + public int getUniformLocation(final String uniform) { + final int location = glGetUniformLocation(ID, uniform); + + if ( location == -1 ) + throw new IllegalArgumentException("Invalid uniform name specified: " + uniform); + + return location; + } + + public int getAttributeLocation(final String attrib) { + final int location = glGetAttribLocation(ID, attrib); + + if ( location == -1 ) + throw new IllegalArgumentException("Invalid attribute name specified: " + attrib); + + return location; + } + + private void printInfoLog() { + final int logLength = glGetProgrami(ID, GL_INFO_LOG_LENGTH); + + System.out.println(logLength); + if ( logLength <= 1 ) + return; + + System.out.println("\nInfo Log of Shader Program: " + ID); + System.out.println("-------------------"); + System.out.println(glGetProgramInfoLog(ID, logLength)); + System.out.println("-------------------"); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/Sphere.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/Sphere.java new file mode 100644 index 0000000..5932080 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/test/opengles/util/Sphere.java @@ -0,0 +1,414 @@ +package org.lwjgl.test.opengles.util; + +import java.nio.FloatBuffer; +import java.util.ArrayList; +import java.util.List; + +import static org.lwjgl.opengles.GLES20.*; + +/** VBO implementation of GLU Sphere. */ +public final class Sphere { + + /* QuadricNormal */ + public static final int GLU_SMOOTH = 100000; + public static final int GLU_FLAT = 100001; + public static final int GLU_NONE = 100002; + + /* QuadricDrawStyle */ + public static final int GLU_POINT = 100010; + public static final int GLU_LINE = 100011; + public static final int GLU_FILL = 100012; + public static final int GLU_SILHOUETTE = 100013; + + /* QuadricOrientation */ + public static final int GLU_OUTSIDE = 100020; + public static final int GLU_INSIDE = 100021; + + static final float PI = (float)Math.PI; + + private int drawStyle; + private int orientation; + private boolean textureFlag; + private int normals; + + private BufferObjectArray bo; + + private final List drawCommands = new ArrayList(4); + + public Sphere() { + this(GLU_FILL, GLU_OUTSIDE, false, GLU_SMOOTH); + } + + public Sphere(final int drawStyle, final int orientation, final boolean textureFlag, final int normals) { + setDrawStyle(drawStyle); + setOrientation(orientation); + setTextureFlag(textureFlag); + setNormals(normals); + } + + public Sphere(final float radius, final int slices, final int stacks) { + this(); + updateGeometry(radius, slices, stacks); + } + + public Sphere(final float radius, final int slices, final int stacks, + final int drawStyle, final int orientation, final boolean textureFlag, final int normals) { + this(drawStyle, orientation, textureFlag, normals); + updateGeometry(radius, slices, stacks); + } + + public void updateGeometry(final float radius, final int slices, final int stacks) { + if ( bo != null ) + destroy(); + + bo = new BufferObjectArray(GL_STATIC_DRAW, createBuffer(radius, slices, stacks)); + } + + public void bind() { + bo.enable(); + } + + public void draw() { + for ( DrawCommand command : drawCommands ) + command.draw(); + } + + public void destroy() { + bo.destroy(); + bo = null; + + drawCommands.clear(); + } + + /** + * specifies the draw style for quadrics. + *

+ * The legal values are as follows: + *

+ * GLU.FILL: Quadrics are rendered with polygon primitives. The polygons + * are drawn in a counterclockwise fashion with respect to + * their normals (as defined with glu.quadricOrientation). + *

+ * GLU.LINE: Quadrics are rendered as a set of lines. + *

+ * GLU.SILHOUETTE: Quadrics are rendered as a set of lines, except that edges + * separating coplanar faces will not be drawn. + *

+ * GLU.POINT: Quadrics are rendered as a set of points. + * + * @param drawStyle The drawStyle to set + */ + public void setDrawStyle(int drawStyle) { + switch ( drawStyle ) { + case GLU_FILL: + case GLU_LINE: + case GLU_SILHOUETTE: + case GLU_POINT: + break; + default: + throw new IllegalArgumentException("Invalid draw style specified: " + drawStyle); + } + + this.drawStyle = drawStyle; + } + + /** + * specifies what kind of normals are desired for quadrics. + * The legal values are as follows: + *

+ * GLU.NONE: No normals are generated. + *

+ * GLU.FLAT: One normal is generated for every facet of a quadric. + *

+ * GLU.SMOOTH: One normal is generated for every vertex of a quadric. This + * is the default. + * + * @param normals The normals to set + */ + public void setNormals(int normals) { + switch ( normals ) { + case GLU_NONE: + case GLU_FLAT: + case GLU_SMOOTH: + break; + default: + throw new IllegalArgumentException("Invalid normal kind specified: " + normals); + } + + this.normals = normals; + } + + /** + * specifies what kind of orientation is desired for. + * The orientation values are as follows: + *

+ * GLU.OUTSIDE: Quadrics are drawn with normals pointing outward. + *

+ * GLU.INSIDE: Normals point inward. The default is GLU.OUTSIDE. + *

+ * Note that the interpretation of outward and inward depends on the quadric + * being drawn. + * + * @param orientation The orientation to set + */ + public void setOrientation(int orientation) { + if ( orientation != GLU_OUTSIDE && orientation != GLU_INSIDE ) + throw new IllegalArgumentException("Invalid orientation specified: " + orientation); + + this.orientation = orientation; + } + + /** + * specifies if texture coordinates should be generated for + * quadrics rendered with qobj. If the value of textureCoords is true, + * then texture coordinates are generated, and if textureCoords is false, + * they are not.. The default is false. + *

+ * The manner in which texture coordinates are generated depends upon the + * specific quadric rendered. + * + * @param textureFlag The textureFlag to set + */ + public void setTextureFlag(boolean textureFlag) { + this.textureFlag = textureFlag; + } + + /** + * Returns the drawStyle. + * + * @return int + */ + public int getDrawStyle() { + return drawStyle; + } + + /** + * Returns the normals. + * + * @return int + */ + public int getNormals() { + return normals; + } + + /** + * Returns the orientation. + * + * @return int + */ + public int getOrientation() { + return orientation; + } + + /** + * Returns the textureFlag. + * + * @return boolean + */ + public boolean getTextureFlag() { + return textureFlag; + } + + private static float sin(final float r) { + return (float)Math.sin(r); + } + + private static float cos(final float r) { + return (float)Math.cos(r); + } + + private int addDrawCommand(final int mode, final int first, final int count) { + drawCommands.add(new DrawCommand(mode, first, count)); + return count; + } + + /** + * draws a sphere of the given radius centered around the origin. + * The sphere is subdivided around the z axis into slices and along the z axis + * into stacks (similar to lines of longitude and latitude). + *

+ * If the orientation is set to GLU.OUTSIDE (with glu.quadricOrientation), then + * any normals generated point away from the center of the sphere. Otherwise, + * they point toward the center of the sphere. + *

+ * If texturing is turned on (with glu.quadricTexture), then texture + * coordinates are generated so that t ranges from 0.0 at z=-radius to 1.0 at + * z=radius (t increases linearly along longitudinal lines), and s ranges from + * 0.0 at the +y axis, to 0.25 at the +x axis, to 0.5 at the -y axis, to 0.75 + * at the -x axis, and back to 1.0 at the +y axis. + */ + public FloatBuffer createBuffer(float radius, int slices, int stacks) { + float rho, theta; + float x, y, z; + float s, t, ds, dt; + int i, j; + + final boolean normals = this.normals != GLU_NONE; + final float nsign = this.orientation == GLU_INSIDE ? -1.0f : 1.0f; + + final float drho = PI / stacks; + final float dtheta = 2.0f * PI / slices; + + final ImmediateModeBuffer imb = new ImmediateModeBuffer(16 * 1024); // TODO: We can calculate this to avoid re-allocs + int lastDrawIndex = 0; + + if ( this.drawStyle == GLU_FILL ) { + if ( !this.textureFlag ) { + lastDrawIndex += addDrawCommand(GL_TRIANGLE_FAN, lastDrawIndex, slices + 2); + + // draw +Z end as a triangle fan + imb.glNormal3f(0.0f, 0.0f, 1.0f); + imb.glVertex3f(0.0f, 0.0f, nsign * radius); + for ( j = 0; j <= slices; j++ ) { + theta = (j == slices) ? 0.0f : j * dtheta; + x = -sin(theta) * sin(drho); + y = cos(theta) * sin(drho); + z = nsign * cos(drho); + if ( normals ) + imb.glNormal3f(x * nsign, y * nsign, z * nsign); + imb.glVertex3f(x * radius, y * radius, z * radius); + } + } + + ds = 1.0f / slices; + dt = 1.0f / stacks; + t = 1.0f; // because loop now runs from 0 + + final int imin, imax; + if ( this.textureFlag ) { + imin = 0; + imax = stacks; + } else { + imin = 1; + imax = stacks - 1; + } + + // draw intermediate stacks as quad strips + for ( i = imin; i < imax; i++ ) { + lastDrawIndex += addDrawCommand(GL_TRIANGLE_STRIP, lastDrawIndex, (slices + 1) * 2); + + rho = i * drho; + s = 0.0f; + for ( j = 0; j <= slices; j++ ) { + theta = (j == slices) ? 0.0f : j * dtheta; + + x = -sin(theta) * sin(rho); + y = cos(theta) * sin(rho); + z = nsign * cos(rho); + if ( normals ) + imb.glNormal3f(x * nsign, y * nsign, z * nsign); + if ( textureFlag ) + imb.glTexCoord2f(s, t); + imb.glVertex3f(x * radius, y * radius, z * radius); + + x = -sin(theta) * sin(rho + drho); + y = cos(theta) * sin(rho + drho); + z = nsign * cos(rho + drho); + if ( normals ) + imb.glNormal3f(x * nsign, y * nsign, z * nsign); + if ( textureFlag ) + imb.glTexCoord2f(s, t - dt); + s += ds; + imb.glVertex3f(x * radius, y * radius, z * radius); + } + t -= dt; + } + + if ( !this.textureFlag ) { + lastDrawIndex += addDrawCommand(GL_TRIANGLE_FAN, lastDrawIndex, slices + 2); + + // draw -Z end as a triangle fan + imb.glNormal3f(0.0f, 0.0f, -1.0f); + imb.glVertex3f(0.0f, 0.0f, -radius * nsign); + rho = PI - drho; + s = 1.0f; + for ( j = slices; j >= 0; j-- ) { + theta = (j == slices) ? 0.0f : j * dtheta; + x = -sin(theta) * sin(rho); + y = cos(theta) * sin(rho); + z = nsign * cos(rho); + if ( normals ) + imb.glNormal3f(x * nsign, y * nsign, z * nsign); + s -= ds; + imb.glVertex3f(x * radius, y * radius, z * radius); + } + } + } else if ( this.drawStyle == GLU_LINE || this.drawStyle == GLU_SILHOUETTE ) { + // draw stack lines + for ( i = 1; i < stacks; i++ ) { // stack line at i==stacks-1 was missing here + lastDrawIndex += addDrawCommand(GL_LINE_LOOP, lastDrawIndex, slices); + + rho = i * drho; + for ( j = 0; j < slices; j++ ) { + theta = j * dtheta; + x = cos(theta) * sin(rho); + y = sin(theta) * sin(rho); + z = cos(rho); + if ( normals ) + imb.glNormal3f(x * nsign, y * nsign, z * nsign); + imb.glVertex3f(x * radius, y * radius, z * radius); + } + } + // draw slice lines + for ( j = 0; j < slices; j++ ) { + lastDrawIndex += addDrawCommand(GL_LINE_STRIP, lastDrawIndex, stacks + 1); + + theta = j * dtheta; + for ( i = 0; i <= stacks; i++ ) { + rho = i * drho; + x = cos(theta) * sin(rho); + y = sin(theta) * sin(rho); + z = cos(rho); + if ( normals ) + imb.glNormal3f(x * nsign, y * nsign, z * nsign); + imb.glVertex3f(x * radius, y * radius, z * radius); + } + } + } else if ( this.drawStyle == GLU_POINT ) { + lastDrawIndex += addDrawCommand(GL_POINTS, lastDrawIndex, 2 + (stacks - 2) * slices); + + // top and bottom-most points + if ( normals ) + imb.glNormal3f(0.0f, 0.0f, nsign); + imb.glVertex3f(0.0f, 0.0f, radius); + if ( normals ) + imb.glNormal3f(0.0f, 0.0f, -nsign); + imb.glVertex3f(0.0f, 0.0f, -radius); + + // loop over stacks + for ( i = 1; i < stacks - 1; i++ ) { + rho = i * drho; + for ( j = 0; j < slices; j++ ) { + theta = j * dtheta; + x = cos(theta) * sin(rho); + y = sin(theta) * sin(rho); + z = cos(rho); + if ( normals ) + imb.glNormal3f(x * nsign, y * nsign, z * nsign); + imb.glVertex3f(x * radius, y * radius, z * radius); + } + } + } + + return imb.getBuffer(); + } + + private static class DrawCommand { + + private int mode; + private int first; + private int count; + + private DrawCommand(final int mode, final int first, final int count) { + this.mode = mode; + this.first = first; + this.count = count; + } + + void draw() { + glDrawArrays(mode, first, count); + } + + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/Color.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/Color.java new file mode 100644 index 0000000..fdce824 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/Color.java @@ -0,0 +1,494 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util; +import java.io.Serializable; +import java.nio.ByteBuffer; + +/** + * A mutable Color class + * @author $Author$ + * @version $Revision$ + * $Id$ + */ +public final class Color implements ReadableColor, Serializable, WritableColor { + + static final long serialVersionUID = 1L; + + /** Color components, publicly accessible */ + private byte red, green, blue, alpha; + + /** + * Constructor for Color. + */ + public Color() { + this(0, 0, 0, 255); + } + + /** + * Constructor for Color. Alpha defaults to 255. + */ + public Color(int r, int g, int b) { + this(r, g, b, 255); + } + + /** + * Constructor for Color. Alpha defaults to 255. + */ + public Color(byte r, byte g, byte b) { + this(r, g, b, (byte) 255); + } + + /** + * Constructor for Color. + */ + public Color(int r, int g, int b, int a) { + set(r, g, b, a); + } + + /** + * Constructor for Color. + */ + public Color(byte r, byte g, byte b, byte a) { + set(r, g, b, a); + } + + /** + * Constructor for Color + */ + public Color(ReadableColor c) { + setColor(c); + } + + /** + * Set a color + */ + public void set(int r, int g, int b, int a) { + red = (byte) r; + green = (byte) g; + blue = (byte) b; + alpha = (byte) a; + } + + /** + * Set a color + */ + public void set(byte r, byte g, byte b, byte a) { + this.red = r; + this.green = g; + this.blue = b; + this.alpha = a; + } + + /** + * Set a color + */ + public void set(int r, int g, int b) { + set(r, g, b, 255); + } + + /** + * Set a color + */ + public void set(byte r, byte g, byte b) { + set(r, g, b, (byte) 255); + } + + /** + * Accessor + */ + public int getRed() { + return red & 0xFF; + } + + /** + * Accessor + */ + public int getGreen() { + return green & 0xFF; + } + + /** + * Accessor + */ + public int getBlue() { + return blue & 0xFF; + } + + /** + * Accessor + */ + public int getAlpha() { + return alpha & 0xFF; + } + + /** + * Set the Red component + */ + public void setRed(int red) { + this.red = (byte) red; + } + + /** + * Set the Green component + */ + public void setGreen(int green) { + this.green = (byte) green; + } + + /** + * Set the Blue component + */ + public void setBlue(int blue) { + this.blue = (byte) blue; + } + + /** + * Set the Alpha component + */ + public void setAlpha(int alpha) { + this.alpha = (byte) alpha; + } + + /** + * Set the Red component + */ + public void setRed(byte red) { + this.red = red; + } + + /** + * Set the Green component + */ + public void setGreen(byte green) { + this.green = green; + } + + /** + * Set the Blue component + */ + public void setBlue(byte blue) { + this.blue = blue; + } + + /** + * Set the Alpha component + */ + public void setAlpha(byte alpha) { + this.alpha = alpha; + } + + /** + * Stringify + */ + public String toString() { + return "Color [" + getRed() + ", " + getGreen() + ", " + getBlue() + ", " + getAlpha() + "]"; + } + + /** + * Equals + */ + public boolean equals(Object o) { + return (o != null) + && (o instanceof ReadableColor) + && (((ReadableColor) o).getRed() == this.getRed()) + && (((ReadableColor) o).getGreen() == this.getGreen()) + && (((ReadableColor) o).getBlue() == this.getBlue()) + && (((ReadableColor) o).getAlpha() == this.getAlpha()); + } + + /** + * Hashcode + */ + public int hashCode() { + return (red << 24) | (green << 16) | (blue << 8) | alpha; + } + + /* (Overrides) + * @see com.shavenpuppy.jglib.ReadableColor#getAlphaByte() + */ + public byte getAlphaByte() { + return alpha; + } + + /* (Overrides) + * @see com.shavenpuppy.jglib.ReadableColor#getBlueByte() + */ + public byte getBlueByte() { + return blue; + } + + /* (Overrides) + * @see com.shavenpuppy.jglib.ReadableColor#getGreenByte() + */ + public byte getGreenByte() { + return green; + } + + /* (Overrides) + * @see com.shavenpuppy.jglib.ReadableColor#getRedByte() + */ + public byte getRedByte() { + return red; + } + + /* (Overrides) + * @see com.shavenpuppy.jglib.ReadableColor#writeRGBA(java.nio.ByteBuffer) + */ + public void writeRGBA(ByteBuffer dest) { + dest.put(red); + dest.put(green); + dest.put(blue); + dest.put(alpha); + } + + /* (Overrides) + * @see com.shavenpuppy.jglib.ReadableColor#writeRGB(java.nio.ByteBuffer) + */ + public void writeRGB(ByteBuffer dest) { + dest.put(red); + dest.put(green); + dest.put(blue); + } + + /* (Overrides) + * @see com.shavenpuppy.jglib.ReadableColor#writeABGR(java.nio.ByteBuffer) + */ + public void writeABGR(ByteBuffer dest) { + dest.put(alpha); + dest.put(blue); + dest.put(green); + dest.put(red); + } + + /* (Overrides) + * @see com.shavenpuppy.jglib.ReadableColor#writeARGB(java.nio.ByteBuffer) + */ + public void writeARGB(ByteBuffer dest) { + dest.put(alpha); + dest.put(red); + dest.put(green); + dest.put(blue); + } + + /* (Overrides) + * @see com.shavenpuppy.jglib.ReadableColor#writeBGR(java.nio.ByteBuffer) + */ + public void writeBGR(ByteBuffer dest) { + dest.put(blue); + dest.put(green); + dest.put(red); + } + + /* (Overrides) + * @see com.shavenpuppy.jglib.ReadableColor#writeBGRA(java.nio.ByteBuffer) + */ + public void writeBGRA(ByteBuffer dest) { + dest.put(blue); + dest.put(green); + dest.put(red); + dest.put(alpha); + } + + /** + * Read a color from a byte buffer + * @param src The source buffer + */ + public void readRGBA(ByteBuffer src) { + red = src.get(); + green = src.get(); + blue = src.get(); + alpha = src.get(); + } + + /** + * Read a color from a byte buffer + * @param src The source buffer + */ + public void readRGB(ByteBuffer src) { + red = src.get(); + green = src.get(); + blue = src.get(); + } + + /** + * Read a color from a byte buffer + * @param src The source buffer + */ + public void readARGB(ByteBuffer src) { + alpha = src.get(); + red = src.get(); + green = src.get(); + blue = src.get(); + } + + /** + * Read a color from a byte buffer + * @param src The source buffer + */ + public void readBGRA(ByteBuffer src) { + blue = src.get(); + green = src.get(); + red = src.get(); + alpha = src.get(); + } + + /** + * Read a color from a byte buffer + * @param src The source buffer + */ + public void readBGR(ByteBuffer src) { + blue = src.get(); + green = src.get(); + red = src.get(); + } + + /** + * Read a color from a byte buffer + * @param src The source buffer + */ + public void readABGR(ByteBuffer src) { + alpha = src.get(); + blue = src.get(); + green = src.get(); + red = src.get(); + } + + /** + * Set this color's color by copying another color + * @param src The source color + */ + public void setColor(ReadableColor src) { + red = src.getRedByte(); + green = src.getGreenByte(); + blue = src.getBlueByte(); + alpha = src.getAlphaByte(); + } + + /** + * HSB to RGB conversion, pinched from java.awt.Color. + * @param hue (0..1.0f) + * @param saturation (0..1.0f) + * @param brightness (0..1.0f) + */ + public void fromHSB(float hue, float saturation, float brightness) { + if (saturation == 0.0F) { + red = green = blue = (byte) (brightness * 255F + 0.5F); + } else { + float f3 = (hue - (float) Math.floor(hue)) * 6F; + float f4 = f3 - (float) Math.floor(f3); + float f5 = brightness * (1.0F - saturation); + float f6 = brightness * (1.0F - saturation * f4); + float f7 = brightness * (1.0F - saturation * (1.0F - f4)); + switch ((int) f3) { + case 0 : + red = (byte) (brightness * 255F + 0.5F); + green = (byte) (f7 * 255F + 0.5F); + blue = (byte) (f5 * 255F + 0.5F); + break; + case 1 : + red = (byte) (f6 * 255F + 0.5F); + green = (byte) (brightness * 255F + 0.5F); + blue = (byte) (f5 * 255F + 0.5F); + break; + case 2 : + red = (byte) (f5 * 255F + 0.5F); + green = (byte) (brightness * 255F + 0.5F); + blue = (byte) (f7 * 255F + 0.5F); + break; + case 3 : + red = (byte) (f5 * 255F + 0.5F); + green = (byte) (f6 * 255F + 0.5F); + blue = (byte) (brightness * 255F + 0.5F); + break; + case 4 : + red = (byte) (f7 * 255F + 0.5F); + green = (byte) (f5 * 255F + 0.5F); + blue = (byte) (brightness * 255F + 0.5F); + break; + case 5 : + red = (byte) (brightness * 255F + 0.5F); + green = (byte) (f5 * 255F + 0.5F); + blue = (byte) (f6 * 255F + 0.5F); + break; + } + } + } + + /** + * RGB to HSB conversion, pinched from java.awt.Color. + * The HSB value is returned in dest[] if dest[] is supplied. + * Values range from 0..1 + * @param dest Destination floats, or null + * @return dest, or a new float array + */ + public float[] toHSB(float dest[]) { + int r = getRed(); + int g = getGreen(); + int b = getBlue(); + if (dest == null) + dest = new float[3]; + int l = r <= g ? g : r; + if (b > l) + l = b; + int i1 = r >= g ? g : r; + if (b < i1) + i1 = b; + float brightness = l / 255F; + float saturation; + if (l != 0) + saturation = (float) (l - i1) / (float) l; + else + saturation = 0.0F; + float hue; + if (saturation == 0.0F) { + hue = 0.0F; + } else { + float f3 = (float) (l - r) / (float) (l - i1); + float f4 = (float) (l - g) / (float) (l - i1); + float f5 = (float) (l - b) / (float) (l - i1); + if (r == l) + hue = f5 - f4; + else if (g == l) + hue = (2.0F + f3) - f5; + else + hue = (4F + f4) - f3; + hue /= 6F; + if (hue < 0.0F) + hue++; + } + dest[0] = hue; + dest[1] = saturation; + dest[2] = brightness; + return dest; + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/Dimension.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/Dimension.java new file mode 100644 index 0000000..341024c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/Dimension.java @@ -0,0 +1,156 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util; + +import java.io.Serializable; + +/** + * A 2D integer Dimension class, which looks remarkably like an AWT one. + * @author $Author$ + * @version $Revision$ + * $Id$ + */ +public final class Dimension implements Serializable, ReadableDimension, WritableDimension { + + static final long serialVersionUID = 1L; + + /** The dimensions! */ + private int width, height; + + /** + * Constructor for Dimension. + */ + public Dimension() { + super(); + } + + /** + * Constructor for Dimension. + */ + public Dimension(int w, int h) { + this.width = w; + this.height = h; + } + + /** + * Constructor for Dimension. + */ + public Dimension(ReadableDimension d) { + setSize(d); + } + + public void setSize(int w, int h) { + this.width = w; + this.height = h; + } + + public void setSize(ReadableDimension d) { + this.width = d.getWidth(); + this.height = d.getHeight(); + } + + /* (Overrides) + * @see com.shavenpuppy.jglib.ReadableDimension#getSize(com.shavenpuppy.jglib.Dimension) + */ + public void getSize(WritableDimension dest) { + dest.setSize(this); + } + + /** + * Checks whether two dimension objects have equal values. + */ + public boolean equals(Object obj) { + if (obj instanceof ReadableDimension) { + ReadableDimension d = (ReadableDimension) obj; + return (width == d.getWidth()) && (height == d.getHeight()); + } + return false; + } + + /** + * Returns the hash code for this Dimension. + * + * @return a hash code for this Dimension + */ + public int hashCode() { + int sum = width + height; + return sum * (sum + 1) / 2 + width; + } + + /** + * Returns a string representation of the values of this + * Dimension object's height and + * width fields. This method is intended to be used only + * for debugging purposes, and the content and format of the returned + * string may vary between implementations. The returned string may be + * empty but may not be null. + * + * @return a string representation of this Dimension + * object + */ + public String toString() { + return getClass().getName() + "[width=" + width + ",height=" + height + "]"; + } + + /** + * Gets the height. + * @return Returns a int + */ + public int getHeight() { + return height; + } + + /** + * Sets the height. + * @param height The height to set + */ + public void setHeight(int height) { + this.height = height; + } + + /** + * Gets the width. + * @return Returns a int + */ + public int getWidth() { + return width; + } + + /** + * Sets the width. + * @param width The width to set + */ + public void setWidth(int width) { + this.width = width; + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/Display.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/Display.java new file mode 100644 index 0000000..999d9de --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/Display.java @@ -0,0 +1,243 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Comparator; + +import org.lwjgl.LWJGLException; +import org.lwjgl.LWJGLUtil; +import org.lwjgl.opengl.DisplayMode; + +/** + * Display initialization utility, that can be used to find display modes and pick + * one for you based on your criteria. + * @author $Author$ + * @version $Revision$ + * $Id$ + */ +public final class Display { + + private static final boolean DEBUG = false; + + /** + * Determine the available display modes that match the specified minimum and maximum criteria. + * If any given criterium is specified as -1 then it is ignored. + * + * @param minWidth the minimum display resolution in pixels + * @param minHeight the minimum display resolution in pixels + * @param maxWidth the maximum display resolution in pixels + * @param maxHeight the maximum display resolution in pixels + * @param minBPP the minimum bit depth per pixel + * @param maxBPP the maximum bit depth per pixel + * @param minFreq the minimum display frequency in Hz + * @param maxFreq the maximum display frequency in Hz + * @return an array of matching display modes + */ + public static DisplayMode[] getAvailableDisplayModes(int minWidth, int minHeight, int maxWidth, int maxHeight, int minBPP, int maxBPP, + int minFreq, int maxFreq) throws LWJGLException + { + // First get the available display modes + DisplayMode[] modes = org.lwjgl.opengl.Display.getAvailableDisplayModes(); + + if (LWJGLUtil.DEBUG || DEBUG) { + System.out.println("Available screen modes:"); + for ( DisplayMode mode : modes ) { + System.out.println(mode); + } + } + + ArrayList matches = new ArrayList(modes.length); + + for (int i = 0; i < modes.length; i ++) { + assert modes[i] != null : ""+i+" "+modes.length; + if (minWidth != -1 && modes[i].getWidth() < minWidth) + continue; + if (maxWidth != -1 && modes[i].getWidth() > maxWidth) + continue; + if (minHeight != -1 && modes[i].getHeight() < minHeight) + continue; + if (maxHeight != -1 && modes[i].getHeight() > maxHeight) + continue; + if (minBPP != -1 && modes[i].getBitsPerPixel() < minBPP) + continue; + if (maxBPP != -1 && modes[i].getBitsPerPixel() > maxBPP) + continue; + //if (modes[i].bpp == 24) + // continue; + if (modes[i].getFrequency() != 0) { + if (minFreq != -1 && modes[i].getFrequency() < minFreq) + continue; + if (maxFreq != -1 && modes[i].getFrequency() > maxFreq) + continue; + } + matches.add(modes[i]); + } + + DisplayMode[] ret = new DisplayMode[matches.size()]; + matches.toArray(ret); + if (LWJGLUtil.DEBUG && DEBUG) { + System.out.println("Filtered screen modes:"); + for ( DisplayMode mode : ret ) { + System.out.println(mode); + } + } + + return ret; + } + + /** + * Create the display by choosing from a list of display modes based on an order of preference. + * You must supply a list of allowable display modes, probably by calling getAvailableDisplayModes(), + * and an array with the order in which you would like them sorted in descending order. + * This method attempts to create the topmost display mode; if that fails, it will try the next one, + * and so on, until there are no modes left. If no mode is set at the end, an exception is thrown. + * @param dm a list of display modes to choose from + * @param param the names of the DisplayMode fields in the order in which you would like them sorted. + * @return the chosen display mode + * @throws NoSuchFieldException if one of the params is not a field in DisplayMode + * @throws Exception if no display mode could be set + * @see org.lwjgl.opengl.DisplayMode + */ + public static DisplayMode setDisplayMode(DisplayMode[] dm, final String[] param) throws Exception { + + class FieldAccessor { + final String fieldName; + final int order; + final int preferred; + final boolean usePreferred; + FieldAccessor(String fieldName, int order, int preferred, boolean usePreferred) { + this.fieldName = fieldName; + this.order = order; + this.preferred = preferred; + this.usePreferred = usePreferred; + } + int getInt(DisplayMode mode) { + if ("width".equals(fieldName)) { + return mode.getWidth(); + } + if ("height".equals(fieldName)) { + return mode.getHeight(); + } + if ("freq".equals(fieldName)) { + return mode.getFrequency(); + } + if ("bpp".equals(fieldName)) { + return mode.getBitsPerPixel(); + } + throw new IllegalArgumentException("Unknown field "+fieldName); + } + } + + class Sorter implements Comparator { + + final FieldAccessor[] accessors; + + Sorter() { + accessors = new FieldAccessor[param.length]; + for (int i = 0; i < accessors.length; i ++) { + int idx = param[i].indexOf('='); + if (idx > 0) { + accessors[i] = new FieldAccessor(param[i].substring(0, idx), 0, Integer.parseInt(param[i].substring(idx + 1, param[i].length())), true); + } else if (param[i].charAt(0) == '-') { + accessors[i] = new FieldAccessor(param[i].substring(1), -1, 0, false); + } else { + accessors[i] = new FieldAccessor(param[i], 1, 0, false); + } + } + } + + /** + * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object) + */ + public int compare(DisplayMode dm1, DisplayMode dm2) { + for ( FieldAccessor accessor : accessors ) { + int f1 = accessor.getInt(dm1); + int f2 = accessor.getInt(dm2); + + if ( accessor.usePreferred && f1 != f2 ) { + if ( f1 == accessor.preferred ) + return -1; + else if ( f2 == accessor.preferred ) + return 1; + else { + // Score according to the difference between the values + int absf1 = Math.abs(f1 - accessor.preferred); + int absf2 = Math.abs(f2 - accessor.preferred); + if ( absf1 < absf2 ) + return -1; + else if ( absf1 > absf2 ) + return 1; + else + continue; + } + } else if ( f1 < f2 ) + return accessor.order; + else if ( f1 == f2 ) + continue; + else + return -accessor.order; + } + + return 0; + } + } + + // Sort the display modes + Arrays.sort(dm, new Sorter()); + + // Try them out in the appropriate order + if (LWJGLUtil.DEBUG || DEBUG) { + System.out.println("Sorted display modes:"); + for ( DisplayMode aDm : dm ) { + System.out.println(aDm); + } + } + for ( DisplayMode aDm : dm ) { + try { + if ( LWJGLUtil.DEBUG || DEBUG ) + System.out.println("Attempting to set displaymode: " + aDm); + org.lwjgl.opengl.Display.setDisplayMode(aDm); + return aDm; + } catch (Exception e) { + if ( LWJGLUtil.DEBUG || DEBUG ) { + System.out.println("Failed to set display mode to " + aDm); + e.printStackTrace(); + } + } + } + + throw new Exception("Failed to set display mode."); + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/Point.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/Point.java new file mode 100644 index 0000000..90db474 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/Point.java @@ -0,0 +1,170 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util; + +import java.io.Serializable; + +/** + * A 2D integer point class, which looks remarkably like an AWT one. + * @author $Author$ + * @version $Revision$ + * $Id$ + */ +public final class Point implements ReadablePoint, WritablePoint, Serializable { + + static final long serialVersionUID = 1L; + + /** The location */ + private int x, y; + + /** + * Constructor for Point. + */ + public Point() { + super(); + } + + /** + * Constructor for Point. + */ + public Point(int x, int y) { + setLocation(x, y); + } + + /** + * Constructor for Point. + */ + public Point(ReadablePoint p) { + setLocation(p); + } + + public void setLocation(int x, int y) { + this.x = x; + this.y = y; + } + + public void setLocation(ReadablePoint p) { + this.x = p.getX(); + this.y = p.getY(); + } + + public void setX(int x) { + this.x = x; + } + + public void setY(int y) { + this.y = y; + } + + /** + * Translate a point. + * @param dx The translation to apply + * @param dy The translation to apply + */ + public void translate(int dx, int dy) { + this.x += dx; + this.y += dy; + } + + /** + * Translate a point. + * @param p The translation to apply + */ + public void translate(ReadablePoint p) { + this.x += p.getX(); + this.y += p.getY(); + } + + /** + * Un-translate a point. + * @param p The translation to apply + */ + public void untranslate(ReadablePoint p) { + this.x -= p.getX(); + this.y -= p.getY(); + } + + /** + * Determines whether an instance of Point2D is equal + * to this point. Two instances of Point2D are equal if + * the values of their x and y member + * fields, representing their position in the coordinate space, are + * the same. + * @param obj an object to be compared with this point + * @return true if the object to be compared is + * an instance of Point and has + * the same values; false otherwise + */ + public boolean equals(Object obj) { + if (obj instanceof Point) { + Point pt = (Point) obj; + return (x == pt.x) && (y == pt.y); + } + return super.equals(obj); + } + + /** + * Returns a string representation of this point and its location + * in the (xy) coordinate space. This method is + * intended to be used only for debugging purposes, and the content + * and format of the returned string may vary between implementations. + * The returned string may be empty but may not be null. + * + * @return a string representation of this point + */ + public String toString() { + return getClass().getName() + "[x=" + x + ",y=" + y + "]"; + } + + /** + * Returns the hash code for this Point. + * + * @return a hash code for this Point + */ + public int hashCode() { + int sum = x + y; + return sum * (sum + 1) / 2 + x; + } + + public int getX() { + return x; + } + + public int getY() { + return y; + } + + public void getLocation(WritablePoint dest) { + dest.setLocation(x, y); + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/ReadableColor.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/ReadableColor.java new file mode 100644 index 0000000..e4f9ea8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/ReadableColor.java @@ -0,0 +1,146 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util; + +import java.nio.ByteBuffer; + +/** + * Readonly interface for Colors + * @author $Author$ + * @version $Revision$ + * $Id$ + */ +public interface ReadableColor { + + /** + * Return the red component (0..255) + * @return int + */ + int getRed(); + + /** + * Return the red component (0..255) + * @return int + */ + int getGreen(); + + /** + * Return the red component (0..255) + * @return int + */ + int getBlue(); + + /** + * Return the red component (0..255) + * @return int + */ + int getAlpha(); + + /** + * Return the red component + * @return int + */ + byte getRedByte(); + + /** + * Return the red component + * @return int + */ + byte getGreenByte(); + + /** + * Return the red component + * @return int + */ + byte getBlueByte(); + + /** + * Return the red component + * @return int + */ + byte getAlphaByte(); + + /** + * Write the RGBA color directly out to a ByteBuffer + * @param dest the buffer to write to + */ + void writeRGBA(ByteBuffer dest); + + /** + * Write the RGB color directly out to a ByteBuffer + * @param dest the buffer to write to + */ + void writeRGB(ByteBuffer dest); + + /** + * Write the ABGR color directly out to a ByteBuffer + * @param dest the buffer to write to + */ + void writeABGR(ByteBuffer dest); + + /** + * Write the BGR color directly out to a ByteBuffer + * @param dest the buffer to write to + */ + void writeBGR(ByteBuffer dest); + + /** + * Write the BGRA color directly out to a ByteBuffer + * @param dest the buffer to write to + */ + void writeBGRA(ByteBuffer dest); + + /** + * Write the ARGB color directly out to a ByteBuffer + * @param dest the buffer to write to + */ + void writeARGB(ByteBuffer dest); + + /* + * Some standard colors + */ + ReadableColor RED = new Color(255, 0, 0); + ReadableColor ORANGE = new Color(255, 128, 0); + ReadableColor YELLOW = new Color(255, 255, 0); + ReadableColor GREEN = new Color(0, 255, 0); + ReadableColor CYAN = new Color(0, 255, 255); + ReadableColor BLUE = new Color(0, 0, 255); + ReadableColor PURPLE = new Color(255, 0, 255); + ReadableColor WHITE = new Color(255, 255, 255); + ReadableColor BLACK = new Color(0, 0, 0); + ReadableColor LTGREY = new Color(192, 192, 192); + ReadableColor DKGREY = new Color(64, 64, 64); + ReadableColor GREY = new Color(128, 128, 128); + + + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/ReadableDimension.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/ReadableDimension.java new file mode 100644 index 0000000..0c2babc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/ReadableDimension.java @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util; + +/** + * Readonly interface for Dimensions + * @author $Author$ + * @version $Revision$ + * $Id$ + */ +public interface ReadableDimension { + + /** + * Get the width + * @return int + */ + int getWidth(); + + /** + * Get the height + * @return int + */ + int getHeight(); + + /** + * Copy this ReadableDimension into a destination Dimension + * @param dest The destination + */ + void getSize(WritableDimension dest); + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/ReadablePoint.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/ReadablePoint.java new file mode 100644 index 0000000..df02317 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/ReadablePoint.java @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util; + +/** + * Readonly interface for Points + * @author $Author$ + * @version $Revision$ + * $Id$ + */ +public interface ReadablePoint { + + /** + * @return int + */ + int getX(); + + /** + * @return int + */ + int getY(); + + /** + * Copy this ReadablePoint into a destination Point + * @param dest The destination Point, or null, to create a new Point + */ + void getLocation(WritablePoint dest); +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/ReadableRectangle.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/ReadableRectangle.java new file mode 100644 index 0000000..66e162c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/ReadableRectangle.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util; + +/** + * Readonly interface for Rectangles + * @author $Author$ + * @version $Revision$ + * $Id$ + */ +public interface ReadableRectangle extends ReadableDimension, ReadablePoint { + + /** + * Copy this readable rectangle's bounds into a destination Rectangle + * @param dest The destination Rectangle, or null, to create a new Rectangle + */ + void getBounds(WritableRectangle dest); + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/Rectangle.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/Rectangle.java new file mode 100644 index 0000000..8f030b3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/Rectangle.java @@ -0,0 +1,581 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util; + +import java.io.Serializable; + +/** + * A 2D integer Rectangle class which looks remarkably like an AWT one. + * @author $Author$ + * @version $Revision$ + * $Id$ + */ +public final class Rectangle implements ReadableRectangle, WritableRectangle, Serializable { + + static final long serialVersionUID = 1L; + + /** Rectangle's bounds */ + private int x, y, width, height; + + /** + * Constructor for Rectangle. + */ + public Rectangle() { + super(); + } + /** + * Constructor for Rectangle. + */ + public Rectangle(int x, int y, int w, int h) { + this.x = x; + this.y = y; + this.width = w; + this.height = h; + } + /** + * Constructor for Rectangle. + */ + public Rectangle(ReadablePoint p, ReadableDimension d) { + x = p.getX(); + y = p.getY(); + width = d.getWidth(); + height = d.getHeight(); + } + /** + * Constructor for Rectangle. + */ + public Rectangle(ReadableRectangle r) { + x = r.getX(); + y = r.getY(); + width = r.getWidth(); + height = r.getHeight(); + } + + public void setLocation(int x, int y) { + this.x = x; + this.y = y; + } + + public void setLocation(ReadablePoint p) { + this.x = p.getX(); + this.y = p.getY(); + } + + public void setSize(int w, int h) { + this.width = w; + this.height = h; + } + + public void setSize(ReadableDimension d) { + this.width = d.getWidth(); + this.height = d.getHeight(); + } + + public void setBounds(int x, int y, int w, int h) { + this.x = x; + this.y = y; + this.width = w; + this.height = h; + } + + public void setBounds(ReadablePoint p, ReadableDimension d) { + x = p.getX(); + y = p.getY(); + width = d.getWidth(); + height = d.getHeight(); + } + + public void setBounds(ReadableRectangle r) { + x = r.getX(); + y = r.getY(); + width = r.getWidth(); + height = r.getHeight(); + } + + /* (Overrides) + * @see com.shavenpuppy.jglib.ReadableRectangle#getBounds(com.shavenpuppy.jglib.Rectangle) + */ + public void getBounds(WritableRectangle dest) { + dest.setBounds(x, y, width, height); + } + + /* (Overrides) + * @see com.shavenpuppy.jglib.ReadablePoint#getLocation(com.shavenpuppy.jglib.Point) + */ + public void getLocation(WritablePoint dest) { + dest.setLocation(x, y); + } + + /* (Overrides) + * @see com.shavenpuppy.jglib.ReadableDimension#getSize(com.shavenpuppy.jglib.Dimension) + */ + public void getSize(WritableDimension dest) { + dest.setSize(width, height); + } + + /** + * Translate the rectangle by an amount. + * @param x The translation amount on the x axis + * @param y The translation amount on the y axis + */ + public void translate(int x, int y) { + this.x += x; + this.y += y; + } + + /** + * Translate the rectangle by an amount. + * @param point The translation amount + */ + public void translate(ReadablePoint point) { + this.x += point.getX(); + this.y += point.getY(); + } + + /** + * Un-translate the rectangle by an amount. + * @param point The translation amount + */ + public void untranslate(ReadablePoint point) { + this.x -= point.getX(); + this.y -= point.getY(); + } + + /** + * Checks whether or not this Rectangle contains the + * specified Point. + * @param p the Point to test + * @return true if the Point + * (xy) is inside this + * Rectangle; + * false otherwise. + */ + public boolean contains(ReadablePoint p) { + return contains(p.getX(), p.getY()); + } + + /** + * Checks whether or not this Rectangle contains the + * point at the specified location + * (xy). + * @param X the specified x coordinate + * @param Y the specified y coordinate + * @return true if the point + * (xy) is inside this + * Rectangle; + * false otherwise. + */ + public boolean contains(int X, int Y) { + int w = this.width; + int h = this.height; + if ((w | h) < 0) { + // At least one of the dimensions is negative... + return false; + } + // Note: if either dimension is zero, tests below must return false... + int x = this.x; + int y = this.y; + if (X < x || Y < y) { + return false; + } + w += x; + h += y; + // overflow || intersect + return ((w < x || w > X) && (h < y || h > Y)); + } + + /** + * Checks whether or not this Rectangle entirely contains + * the specified Rectangle. + * @param r the specified Rectangle + * @return true if the Rectangle + * is contained entirely inside this Rectangle; + * false otherwise. + */ + public boolean contains(ReadableRectangle r) { + return contains(r.getX(), r.getY(), r.getWidth(), r.getHeight()); + } + + /** + * Checks whether this Rectangle entirely contains + * the Rectangle + * at the specified location (XY) with the + * specified dimensions (WH). + * @param X the specified x coordinate + * @param Y the specified y coordinate + * @param W the width of the Rectangle + * @param H the height of the Rectangle + * @return true if the Rectangle specified by + * (XYWH) + * is entirely enclosed inside this Rectangle; + * false otherwise. + */ + public boolean contains(int X, int Y, int W, int H) { + int w = this.width; + int h = this.height; + if ((w | h | W | H) < 0) { + // At least one of the dimensions is negative... + return false; + } + // Note: if any dimension is zero, tests below must return false... + int x = this.x; + int y = this.y; + if (X < x || Y < y) { + return false; + } + w += x; + W += X; + if (W <= X) { + // X+W overflowed or W was zero, return false if... + // either original w or W was zero or + // x+w did not overflow or + // the overflowed x+w is smaller than the overflowed X+W + if (w >= x || W > w) + return false; + } else { + // X+W did not overflow and W was not zero, return false if... + // original w was zero or + // x+w did not overflow and x+w is smaller than X+W + if (w >= x && W > w) + return false; + } + h += y; + H += Y; + if (H <= Y) { + if (h >= y || H > h) + return false; + } else { + if (h >= y && H > h) + return false; + } + return true; + } + + /** + * Determines whether or not this Rectangle and the specified + * Rectangle intersect. Two rectangles intersect if + * their intersection is nonempty. + * + * @param r the specified Rectangle + * @return true if the specified Rectangle + * and this Rectangle intersect; + * false otherwise. + */ + public boolean intersects(ReadableRectangle r) { + int tw = this.width; + int th = this.height; + int rw = r.getWidth(); + int rh = r.getHeight(); + if (rw <= 0 || rh <= 0 || tw <= 0 || th <= 0) { + return false; + } + int tx = this.x; + int ty = this.y; + int rx = r.getX(); + int ry = r.getY(); + rw += rx; + rh += ry; + tw += tx; + th += ty; + // overflow || intersect + return ((rw < rx || rw > tx) && (rh < ry || rh > ty) && (tw < tx || tw > rx) && (th < ty || th > ry)); + } + + /** + * Computes the intersection of this Rectangle with the + * specified Rectangle. Returns a new Rectangle + * that represents the intersection of the two rectangles. + * If the two rectangles do not intersect, the result will be + * an empty rectangle. + * + * @param r the specified Rectangle + * @return the largest Rectangle contained in both the + * specified Rectangle and in + * this Rectangle; or if the rectangles + * do not intersect, an empty rectangle. + */ + public Rectangle intersection(ReadableRectangle r, Rectangle dest) { + int tx1 = this.x; + int ty1 = this.y; + int rx1 = r.getX(); + int ry1 = r.getY(); + long tx2 = tx1; + tx2 += this.width; + long ty2 = ty1; + ty2 += this.height; + long rx2 = rx1; + rx2 += r.getWidth(); + long ry2 = ry1; + ry2 += r.getHeight(); + if (tx1 < rx1) + tx1 = rx1; + if (ty1 < ry1) + ty1 = ry1; + if (tx2 > rx2) + tx2 = rx2; + if (ty2 > ry2) + ty2 = ry2; + tx2 -= tx1; + ty2 -= ty1; + // tx2,ty2 will never overflow (they will never be + // larger than the smallest of the two source w,h) + // they might underflow, though... + if (tx2 < Integer.MIN_VALUE) + tx2 = Integer.MIN_VALUE; + if (ty2 < Integer.MIN_VALUE) + ty2 = Integer.MIN_VALUE; + if (dest == null) + dest = new Rectangle(tx1, ty1, (int) tx2, (int) ty2); + else + dest.setBounds(tx1, ty1, (int) tx2, (int) ty2); + return dest; + + } + + /** + * Computes the union of this Rectangle with the + * specified Rectangle. Returns a new + * Rectangle that + * represents the union of the two rectangles + * @param r the specified Rectangle + * @return the smallest Rectangle containing both + * the specified Rectangle and this + * Rectangle. + */ + public WritableRectangle union(ReadableRectangle r, WritableRectangle dest) { + int x1 = Math.min(x, r.getX()); + int x2 = Math.max(x + width, r.getX() + r.getWidth()); + int y1 = Math.min(y, r.getY()); + int y2 = Math.max(y + height, r.getY() + r.getHeight()); + dest.setBounds(x1, y1, x2 - x1, y2 - y1); + return dest; + } + + /** + * Adds a point, specified by the integer arguments newx + * and newy, to this Rectangle. The + * resulting Rectangle is + * the smallest Rectangle that contains both the + * original Rectangle and the specified point. + *

+ * After adding a point, a call to contains with the + * added point as an argument does not necessarily return + * true. The contains method does not + * return true for points on the right or bottom + * edges of a Rectangle. Therefore, if the added point + * falls on the right or bottom edge of the enlarged + * Rectangle, contains returns + * false for that point. + * @param newx the x coordinates of the new point + * @param newy the y coordinates of the new point + */ + public void add(int newx, int newy) { + int x1 = Math.min(x, newx); + int x2 = Math.max(x + width, newx); + int y1 = Math.min(y, newy); + int y2 = Math.max(y + height, newy); + x = x1; + y = y1; + width = x2 - x1; + height = y2 - y1; + } + + /** + * Adds the specified Point to this + * Rectangle. The resulting Rectangle + * is the smallest Rectangle that contains both the + * original Rectangle and the specified + * Point. + *

+ * After adding a Point, a call to contains + * with the added Point as an argument does not + * necessarily return true. The contains + * method does not return true for points on the right + * or bottom edges of a Rectangle. Therefore if the added + * Point falls on the right or bottom edge of the + * enlarged Rectangle, contains returns + * false for that Point. + * @param pt the new Point to add to this + * Rectangle + */ + public void add(ReadablePoint pt) { + add(pt.getX(), pt.getY()); + } + + /** + * Adds a Rectangle to this Rectangle. + * The resulting Rectangle is the union of the two + * rectangles. + * @param r the specified Rectangle + */ + public void add(ReadableRectangle r) { + int x1 = Math.min(x, r.getX()); + int x2 = Math.max(x + width, r.getX() + r.getWidth()); + int y1 = Math.min(y, r.getY()); + int y2 = Math.max(y + height, r.getY() + r.getHeight()); + x = x1; + y = y1; + width = x2 - x1; + height = y2 - y1; + } + + /** + * Resizes the Rectangle both horizontally and vertically. + *

+ * This method modifies the Rectangle so that it is + * h units larger on both the left and right side, + * and v units larger at both the top and bottom. + *

+ * The new Rectangle has (x - h, + * y - v) as its top-left corner, a + * width of + * width + 2h, + * and a height of + * height + 2v. + *

+ * If negative values are supplied for h and + * v, the size of the Rectangle + * decreases accordingly. + * The grow method does not check whether the resulting + * values of width and height are + * non-negative. + * @param h the horizontal expansion + * @param v the vertical expansion + */ + public void grow(int h, int v) { + x -= h; + y -= v; + width += h * 2; + height += v * 2; + } + + /** + * Determines whether or not this Rectangle is empty. A + * Rectangle is empty if its width or its height is less + * than or equal to zero. + * @return true if this Rectangle is empty; + * false otherwise. + */ + public boolean isEmpty() { + return (width <= 0) || (height <= 0); + } + /** + * Checks whether two rectangles are equal. + *

+ * The result is true if and only if the argument is not + * null and is a Rectangle object that has the + * same top-left corner, width, and height as this Rectangle. + * @param obj the Object to compare with + * this Rectangle + * @return true if the objects are equal; + * false otherwise. + */ + public boolean equals(Object obj) { + if (obj instanceof Rectangle) { + Rectangle r = (Rectangle) obj; + return ((x == r.x) && (y == r.y) && (width == r.width) && (height == r.height)); + } + return super.equals(obj); + } + + /** + * Debugging + * @return a String + */ + public String toString() { + return getClass().getName() + "[x=" + x + ",y=" + y + ",width=" + width + ",height=" + height + "]"; + } + /** + * Gets the height. + * @return Returns a int + */ + public int getHeight() { + return height; + } + + /** + * Sets the height. + * @param height The height to set + */ + public void setHeight(int height) { + this.height = height; + } + + /** + * Gets the width. + * @return Returns a int + */ + public int getWidth() { + return width; + } + + /** + * Sets the width. + * @param width The width to set + */ + public void setWidth(int width) { + this.width = width; + } + + /** + * Gets the x. + * @return Returns a int + */ + public int getX() { + return x; + } + + /** + * Sets the x. + * @param x The x to set + */ + public void setX(int x) { + this.x = x; + } + + /** + * Gets the y. + * @return Returns a int + */ + public int getY() { + return y; + } + + /** + * Sets the y. + * @param y The y to set + */ + public void setY(int y) { + this.y = y; + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/Renderable.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/Renderable.java new file mode 100644 index 0000000..f75bd2f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/Renderable.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util; + +/** + * + * Simple interface to things that can be Rendered. + * + * @author $Author$ + * @version $Revision$ + * $Id$ + */ +public interface Renderable { + + /** + * "Render" this thing. This will involve calls to the GL. + */ + void render(); + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/Timer.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/Timer.java new file mode 100644 index 0000000..1ae20aa --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/Timer.java @@ -0,0 +1,156 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util; + +import org.lwjgl.Sys; + +/** + * + * A hires timer. This measures time in seconds as floating point values. + * All Timers created are updated simultaneously by calling the static method + * tick(). This ensures that within a single iteration of a game loop that + * all timers are updated consistently with each other. + * + * @author cix_foo + * @version $Revision$ + * $Id$ + */ +public class Timer { + + // Record the timer resolution on classload + private static long resolution = Sys.getTimerResolution(); + + // Every so often we will re-query the timer resolution + private static final int QUERY_INTERVAL = 50; // in calls to tick() + private static int queryCount; + + // Globally keeps track of time for all instances of Timer + private static long currentTime; + + // When the timer was started + private long startTime; + + // The last time recorded by getTime() + private long lastTime; + + // Whether the timer is paused + private boolean paused; + + static { + tick(); + } + + /** + * Constructs a timer. The timer will be reset to 0.0 and resumed immediately. + */ + public Timer() { + reset(); + resume(); + } + + /** + * @return the time in seconds, as a float + */ + public float getTime() { + if (!paused) { + lastTime = currentTime - startTime; + } + + return (float) ((double) lastTime / (double) resolution); + } + /** + * @return whether this timer is paused + */ + public boolean isPaused() { + return paused; + } + + /** + * Pause the timer. Whilst paused the time will not change for this timer + * when tick() is called. + * + * @see #resume() + */ + public void pause() { + paused = true; + } + + /** + * Reset the timer. Equivalent to set(0.0f); + * @see #set(float) + */ + public void reset() { + set(0.0f); + } + + /** + * Resume the timer. + * @see #pause() + */ + public void resume() { + paused = false; + startTime = currentTime - lastTime; + } + + /** + * Set the time of this timer + * @param newTime the new time, in seconds + */ + public void set(float newTime) { + long newTimeInTicks = (long) ((double) newTime * (double) resolution); + startTime = currentTime - newTimeInTicks; + lastTime = newTimeInTicks; + } + + /** + * Get the next time update from the system's hires timer. This method should + * be called once per main loop iteration; all timers are updated simultaneously + * from it. + */ + public static void tick() { + currentTime = Sys.getTime(); + + // Periodically refresh the timer resolution: + queryCount ++; + if (queryCount > QUERY_INTERVAL) { + queryCount = 0; + resolution = Sys.getTimerResolution(); + } + } + + /** + * Debug output. + */ + public String toString() { + return "Timer[Time=" + getTime() + ", Paused=" + paused + "]"; + } +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/WaveData.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/WaveData.java new file mode 100644 index 0000000..c12159b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/WaveData.java @@ -0,0 +1,257 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util; + +import java.io.BufferedInputStream; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.URL; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.ShortBuffer; + +import javax.sound.sampled.AudioFormat; +import javax.sound.sampled.AudioInputStream; +import javax.sound.sampled.AudioSystem; + +import org.lwjgl.openal.AL10; + +import com.sun.media.sound.WaveFileReader; + +/** + * + * Utitlity class for loading wavefiles. + * + * @author Brian Matzon + * @version $Revision$ + * $Id$ + */ +public class WaveData { + /** actual wave data */ + public final ByteBuffer data; + + /** format type of data */ + public final int format; + + /** sample rate of data */ + public final int samplerate; + + /** + * Creates a new WaveData + * + * @param data actual wavedata + * @param format format of wave data + * @param samplerate sample rate of data + */ + private WaveData(ByteBuffer data, int format, int samplerate) { + this.data = data; + this.format = format; + this.samplerate = samplerate; + } + + /** + * Disposes the wavedata + */ + public void dispose() { + data.clear(); + } + + /** + * Creates a WaveData container from the specified url + * + * @param path URL to file + * @return WaveData containing data, or null if a failure occured + */ + public static WaveData create(URL path) { + try { + // due to an issue with AudioSystem.getAudioInputStream + // and mixing unsigned and signed code + // we will use the reader directly + WaveFileReader wfr = new WaveFileReader(); + return create(wfr.getAudioInputStream(new BufferedInputStream(path.openStream()))); + } catch (Exception e) { + org.lwjgl.LWJGLUtil.log("Unable to create from: " + path + ", " + e.getMessage()); + return null; + } + } + + /** + * Creates a WaveData container from the specified in the classpath + * + * @param path path to file (relative, and in classpath) + * @return WaveData containing data, or null if a failure occured + */ + public static WaveData create(String path) { + return create(Thread.currentThread().getContextClassLoader().getResource(path)); + } + + /** + * Creates a WaveData container from the specified inputstream + * + * @param is InputStream to read from + * @return WaveData containing data, or null if a failure occured + */ + public static WaveData create(InputStream is) { + try { + return create( + AudioSystem.getAudioInputStream(is)); + } catch (Exception e) { + org.lwjgl.LWJGLUtil.log("Unable to create from inputstream, " + e.getMessage()); + return null; + } + } + + /** + * Creates a WaveData container from the specified bytes + * + * @param buffer array of bytes containing the complete wave file + * @return WaveData containing data, or null if a failure occured + */ + public static WaveData create(byte[] buffer) { + try { + return create( + AudioSystem.getAudioInputStream( + new BufferedInputStream(new ByteArrayInputStream(buffer)))); + } catch (Exception e) { + org.lwjgl.LWJGLUtil.log("Unable to create from byte array, " + e.getMessage()); + return null; + } + } + + /** + * Creates a WaveData container from the specified ByetBuffer. + * If the buffer is backed by an array, it will be used directly, + * else the contents of the buffer will be copied using get(byte[]). + * + * @param buffer ByteBuffer containing sound file + * @return WaveData containing data, or null if a failure occured + */ + public static WaveData create(ByteBuffer buffer) { + try { + byte[] bytes = null; + + if(buffer.hasArray()) { + bytes = buffer.array(); + } else { + bytes = new byte[buffer.capacity()]; + buffer.get(bytes); + } + return create(bytes); + } catch (Exception e) { + org.lwjgl.LWJGLUtil.log("Unable to create from ByteBuffer, " + e.getMessage()); + return null; + } + } + + /** + * Creates a WaveData container from the specified stream + * + * @param ais AudioInputStream to read from + * @return WaveData containing data, or null if a failure occured + */ + public static WaveData create(AudioInputStream ais) { + //get format of data + AudioFormat audioformat = ais.getFormat(); + + // get channels + int channels = 0; + if (audioformat.getChannels() == 1) { + if (audioformat.getSampleSizeInBits() == 8) { + channels = AL10.AL_FORMAT_MONO8; + } else if (audioformat.getSampleSizeInBits() == 16) { + channels = AL10.AL_FORMAT_MONO16; + } else { + assert false : "Illegal sample size"; + } + } else if (audioformat.getChannels() == 2) { + if (audioformat.getSampleSizeInBits() == 8) { + channels = AL10.AL_FORMAT_STEREO8; + } else if (audioformat.getSampleSizeInBits() == 16) { + channels = AL10.AL_FORMAT_STEREO16; + } else { + assert false : "Illegal sample size"; + } + } else { + assert false : "Only mono or stereo is supported"; + } + + //read data into buffer + ByteBuffer buffer = null; + try { + int available = ais.available(); + if(available <= 0) { + available = ais.getFormat().getChannels() * (int) ais.getFrameLength() * ais.getFormat().getSampleSizeInBits() / 8; + } + byte[] buf = new byte[ais.available()]; + int read = 0, total = 0; + while ((read = ais.read(buf, total, buf.length - total)) != -1 + && total < buf.length) { + total += read; + } + buffer = convertAudioBytes(buf, audioformat.getSampleSizeInBits() == 16, audioformat.isBigEndian() ? ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN); + } catch (IOException ioe) { + return null; + } + + + //create our result + WaveData wavedata = + new WaveData(buffer, channels, (int) audioformat.getSampleRate()); + + //close stream + try { + ais.close(); + } catch (IOException ioe) { + } + + return wavedata; + } + + private static ByteBuffer convertAudioBytes(byte[] audio_bytes, boolean two_bytes_data, ByteOrder order) { + ByteBuffer dest = ByteBuffer.allocateDirect(audio_bytes.length); + dest.order(ByteOrder.nativeOrder()); + ByteBuffer src = ByteBuffer.wrap(audio_bytes); + src.order(order); + if (two_bytes_data) { + ShortBuffer dest_short = dest.asShortBuffer(); + ShortBuffer src_short = src.asShortBuffer(); + while (src_short.hasRemaining()) + dest_short.put(src_short.get()); + } else { + while (src.hasRemaining()) + dest.put(src.get()); + } + dest.rewind(); + return dest; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/WritableColor.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/WritableColor.java new file mode 100644 index 0000000..5f02464 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/WritableColor.java @@ -0,0 +1,126 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util; + +import java.nio.ByteBuffer; + +/** + * Write interface for Colors + * @author $Author$ + * @version $Revision$ + * $Id$ + */ +public interface WritableColor { + /** + * Set a color + */ + void set(int r, int g, int b, int a); + /** + * Set a color + */ + void set(byte r, byte g, byte b, byte a); + /** + * Set a color + */ + void set(int r, int g, int b); + /** + * Set a color + */ + void set(byte r, byte g, byte b); + /** + * Set the Red component + */ + void setRed(int red); + /** + * Set the Green component + */ + void setGreen(int green); + /** + * Set the Blue component + */ + void setBlue(int blue); + /** + * Set the Alpha component + */ + void setAlpha(int alpha); + /** + * Set the Red component + */ + void setRed(byte red); + /** + * Set the Green component + */ + void setGreen(byte green); + /** + * Set the Blue component + */ + void setBlue(byte blue); + /** + * Set the Alpha component + */ + void setAlpha(byte alpha); + /** + * Read a color from a byte buffer + * @param src The source buffer + */ + void readRGBA(ByteBuffer src); + /** + * Read a color from a byte buffer + * @param src The source buffer + */ + void readRGB(ByteBuffer src); + /** + * Read a color from a byte buffer + * @param src The source buffer + */ + void readARGB(ByteBuffer src); + /** + * Read a color from a byte buffer + * @param src The source buffer + */ + void readBGRA(ByteBuffer src); + /** + * Read a color from a byte buffer + * @param src The source buffer + */ + void readBGR(ByteBuffer src); + /** + * Read a color from a byte buffer + * @param src The source buffer + */ + void readABGR(ByteBuffer src); + /** + * Set this color's color by copying another color + * @param src The source color + */ + void setColor(ReadableColor src); +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/WritableDimension.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/WritableDimension.java new file mode 100644 index 0000000..2c89400 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/WritableDimension.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util; + +/** + * Write interface for Dimensions + * @author $Author$ + * @version $Revision$ + * $Id$ + + */ +public interface WritableDimension { + void setSize(int w, int h); + void setSize(ReadableDimension d); + /** + * Sets the height. + * @param height The height to set + */ + void setHeight(int height); + /** + * Sets the width. + * @param width The width to set + */ + void setWidth(int width); +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/WritablePoint.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/WritablePoint.java new file mode 100644 index 0000000..d777f17 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/WritablePoint.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util; + +/** + * Write interface for Points + * @author $Author$ + * @version $Revision$ + * $Id$ + */ +public interface WritablePoint { + void setLocation(int x, int y); + void setLocation(ReadablePoint p); + void setX(int x); + void setY(int y); +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/WritableRectangle.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/WritableRectangle.java new file mode 100644 index 0000000..c821963 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/WritableRectangle.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util; + +/** + * Write interface for Rectangles + * @author $Author$ + * @version $Revision$ + * $Id$ + */ +public interface WritableRectangle extends WritablePoint, WritableDimension { + + /** + * Sets the bounds of the rectangle + * @param x Position of rectangle on x axis + * @param y Position of rectangle on y axis + * @param width Width of rectangle + * @param height Height of rectangle + */ + void setBounds(int x, int y, int width, int height); + + /** + * Sets the bounds of the rectangle + * @param location + * @param size + */ + void setBounds(ReadablePoint location, ReadableDimension size); + + /** + * Sets the bounds of the rectangle + * @param src + */ + void setBounds(ReadableRectangle src); +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/XPMFile.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/XPMFile.java new file mode 100644 index 0000000..c98c17d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/XPMFile.java @@ -0,0 +1,302 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util; + +import java.io.BufferedOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.LineNumberReader; +import java.util.HashMap; +import java.util.StringTokenizer; + +/** + *

+ * NOTE: This simple XPM reader does not support extensions nor hotspots + *

+ * + * @author Brian Matzon + * @author Jos Hirth + * @version $Revision$ + * $Id$ + */ + +public class XPMFile { + + /** Array of bytes (RGBA) */ + private byte bytes[]; + + private static final int WIDTH = 0; + + private static final int HEIGHT = 1; + + private static final int NUMBER_OF_COLORS = 2; + + private static final int CHARACTERS_PER_PIXEL = 3; + + private static int[] format = new int[4]; + + /* + * Private constructor, use load(String filename) + */ + private XPMFile() { + } + + /** + * Loads the XPM file + * + * @param file + * path to file + * @return XPMFile loaded, or exception + * @throws IOException + * If any IO exceptions occurs while reading file + */ + public static XPMFile load(String file) throws IOException { + return load(new FileInputStream(new File(file))); + } + + /** + * Loads the XPM file + * + * @param is + * InputStream to read file from + * @return XPMFile loaded, or exception + */ + public static XPMFile load(InputStream is) { + XPMFile xFile = new XPMFile(); + xFile.readImage(is); + return xFile; + } + + /** + * @return the height of the image. + */ + public int getHeight() { + return format[HEIGHT]; + } + + /** + * @return the width of the image. + */ + public int getWidth() { + return format[WIDTH]; + } + + /** + * @return The data of the image. + */ + public byte[] getBytes() { + return bytes; + } + + /** + * Read the image from the specified file. + */ + private void readImage(InputStream is) { + try { + LineNumberReader reader = new LineNumberReader( + new InputStreamReader(is)); + HashMap colors = new HashMap(); + + format = parseFormat(nextLineOfInterest(reader)); + + // setup color mapping + for (int i = 0; i < format[NUMBER_OF_COLORS]; i++) { + Object[] colorDefinition = parseColor(nextLineOfInterest(reader)); + colors.put((String)colorDefinition[0], (Integer)colorDefinition[1]); + } + + // read actual image (convert to RGBA) + bytes = new byte[format[WIDTH] * format[HEIGHT] * 4]; + for (int i = 0; i < format[HEIGHT]; i++) { + parseImageLine(nextLineOfInterest(reader), format, colors, i); + } + } catch (Exception e) { + e.printStackTrace(); + throw new IllegalArgumentException("Unable to parse XPM File"); + } + } + + /** + * Finds the next interesting line of text. + * + * @param reader + * The LineNumberReader to read from + * @return The next interesting String (with stripped quotes) + * @throws IOException + * If any IO exceptions occurs while reading file + */ + private static String nextLineOfInterest(LineNumberReader reader) + throws IOException { + String ret; + do { + ret = reader.readLine(); + } while (!ret.startsWith("\"")); + // lacks sanity check + return ret.substring(1, ret.lastIndexOf('\"')); + } + + /** + * Parses the format of the xpm file given a format string + * + * @param format + * String to parse + * @return Array specifying width, height, colors, characters per pixel + */ + private static int[] parseFormat(String format) { + // format should look like this: + // 16 16 122 2 + + // tokenize it + StringTokenizer st = new StringTokenizer(format); + + return new int[] { Integer.parseInt(st.nextToken()), /* width */ + Integer.parseInt(st.nextToken()), /* height */ + Integer.parseInt(st.nextToken()), /* colors */ + Integer.parseInt(st.nextToken()) /* chars per pixel */ + }; + } + + /** + * Given a line defining a color/pixel, parses this into an array containing + * a key and a color + * + * @param line + * Line to parse + * @return Array containing a key (String) and a color (Integer) + */ + private static Object[] parseColor(String line) { + // line should look like this: + // # c #0A0A0A + + // NOTE: will break if the color is something like "black" or "gray50" + // etc (instead of #rrggbb). + + String key = line.substring(0, format[CHARACTERS_PER_PIXEL]); + // since we always assume color as type we dont need to read it + // String type = line.substring(format[CHARACTERS_PER_PIXEL] + 1, + // format[CHARACTERS_PER_PIXEL] + 2); + String color = line.substring(format[CHARACTERS_PER_PIXEL] + 4); + + // we always assume type is color, and supplied as # + return new Object[] { key, Integer.parseInt(color, 16) }; + } + + /** + * Parses an Image line into its byte values + * + * @param line + * Line of chars to parse + * @param format + * Format to expext it in + * @param colors + * Colors to lookup + * @param index + * current index into lines, we've reached + */ + private void parseImageLine(String line, int[] format, HashMap colors, + int index) { + // offset for next line + int offset = index * 4 * format[WIDTH]; + + // read characters times, + // each iteration equals one pixel + for (int i = 0; i < format[WIDTH]; i++) { + String key = line + .substring( + i * format[CHARACTERS_PER_PIXEL], + (i * format[CHARACTERS_PER_PIXEL] + format[CHARACTERS_PER_PIXEL])); + int color = colors.get(key); + bytes[offset + (i * 4)] = (byte) ((color & 0x00ff0000) >> 16); + bytes[offset + ((i * 4) + 1)] = (byte) ((color & 0x0000ff00) >> 8); + bytes[offset + ((i * 4) + 2)] = (byte) ((color & 0x000000ff) >> 0); // looks + // better + // :) + bytes[offset + ((i * 4) + 3)] = (byte) 0xff; // always 0xff alpha + } + } + + /** + * @param args + */ + public static void main(String[] args) { + if (args.length != 1) { + System.out.println("usage:\nXPMFile "); + } + + try { + String out = args[0].substring(0, args[0].indexOf(".")) + ".raw"; + XPMFile file = XPMFile.load(args[0]); + BufferedOutputStream bos = new BufferedOutputStream( + new FileOutputStream(new File(out))); + bos.write(file.getBytes()); + bos.close(); + + // showResult(file.getBytes()); + } catch (Exception e) { + e.printStackTrace(); + } + } + /* + private static void showResult(byte[] bytes) { + final BufferedImage i = new BufferedImage(16, 16, BufferedImage.TYPE_INT_ARGB); + int c = 0; + for (int y = 0; y < 16; y++) { + for (int x = 0; x < 16; x++) { + i.setRGB(x, y, (bytes[c] << 16) + (bytes[c + 1] << 8) + (bytes[c + 2] << 0) + (bytes[c + 3] << 24));//+(128<<24));// + c += 4; + } + } + + final Frame frame = new Frame("XPM Result"); + frame.add(new Canvas() { + + public void paint(Graphics g) { + g.drawImage(i, 0, 0, frame); + } + }); + + frame.addWindowListener(new WindowAdapter() { + + public void windowClosing(WindowEvent e) { + frame.dispose(); + } + + }); + + frame.setSize(100, 100); + frame.setVisible(true); + }*/ +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/applet/AppletLoader.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/applet/AppletLoader.java new file mode 100644 index 0000000..41e5518 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/applet/AppletLoader.java @@ -0,0 +1,2259 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.applet; + +import java.applet.Applet; +import java.applet.AppletStub; +import java.awt.BorderLayout; +import java.awt.Color; +import java.awt.EventQueue; +import java.awt.FontMetrics; +import java.awt.Graphics; +import java.awt.Image; +import java.awt.MediaTracker; +import java.awt.image.ImageObserver; +import java.io.BufferedInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.FilePermission; +import java.io.IOException; +import java.io.InputStream; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.OutputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.io.Writer; +import java.lang.reflect.Constructor; +import java.lang.reflect.Field; +import java.net.HttpURLConnection; +import java.net.JarURLConnection; +import java.net.SocketPermission; +import java.net.URL; +import java.net.URLClassLoader; +import java.net.URLConnection; +import java.security.AccessControlException; +import java.security.AccessController; +import java.security.AllPermission; +import java.security.CodeSource; +import java.security.PermissionCollection; +import java.security.Permissions; +import java.security.PrivilegedExceptionAction; +import java.security.cert.Certificate; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.Queue; +import java.util.StringTokenizer; +import java.util.Vector; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; +import java.util.jar.JarEntry; +import java.util.jar.JarFile; +import java.util.jar.JarOutputStream; +import java.util.jar.Pack200; +import java.util.zip.CRC32; +import java.util.zip.CheckedInputStream; +import java.util.zip.GZIPInputStream; +import java.util.zip.ZipEntry; +import java.util.zip.ZipFile; + +/** + *

+ * The AppletLoader enables deployment of LWJGL to applets in an easy + * and polished way. The loader will display a configurable logo and progressbar + * while the relevant jars (generic and native) are downloaded from a specified source. + *

+ *

+ * The downloaded jars are extracted to the users temporary directory - and if enabled, cached for + * faster loading in future uses. + *

+ *

+ * The following applet parameters are required: + *

    + *
  • al_main - [String] Full package and class the applet to instantiate and display when loaded.
  • + *
  • al_jars - [String] Comma separated list of jars to download.
  • + *

    + *

  • al_windows - [String] Jar containing native files for windows.
  • + *
  • al_linux - [String] Jar containing native files for linux.
  • + *
  • al_mac - [String] Jar containing native files for mac.
  • + *
  • al_solaris - [String] Jar containing native files for solaris.
  • + *
  • al_freebsd - [String] Jar containing native files for freebsd.
  • + *
+ *

+ *

+ * Additionally the following parameters can be supplied to tweak the behaviour of the AppletLoader. + *

    + *
  • al_cache - [boolean] Whether to use cache system. Default: true.
  • + *
  • al_version - [int or float] Version of deployment. If this is specified, the jars will be cached and + * reused if the version matches. If version doesn't match all of the files are reloaded.
  • + * + *
  • al_debug - [boolean] Whether to enable debug mode. Default: false.
  • + *
  • al_min_jre - [String] Specify the minimum jre version that the applet requires, should be in format like 1.6.0_24 or a subset like 1.6 Default: 1.5.
  • + *
  • al_prepend_host - [boolean] Whether to limit caching to this domain, disable if your applet is hosted on multiple domains and needs to share the cache. Default: true.
  • + *
  • al_lookup_threads - [int] Specify the number of concurrent threads to use to get file information before downloading. Default: 1.
  • + *

    + *

  • al_windows64 - [String] If specified it will be used instead of al_windows on 64bit windows systems.
  • + *
  • al_windows32 - [String] If specified it will be used instead of al_windows on 32bit windows systems.
  • + *
  • al_linux64 - [String] If specified it will be used instead of al_linux on 64bit linux systems.
  • + *
  • al_linux32 - [String] If specified it will be used instead of al_linux on 32bit linux systems.
  • + *
  • al_mac32 - [String] If specified it will be used instead of al_mac on 64bit mac systems.
  • + *
  • al_mac64 - [String] If specified it will be used instead of al_mac on 32bit mac systems.
  • + *
  • al_macppc - [String] If specified it will be used instead of al_mac on PPC mac systems.
  • + *

    + *

  • boxbgcolor - [String] any String AWT color ("red", "blue", etc), RGB (0-255) or hex formated color (#RRGGBB) to use as background. Default: #ffffff.
  • + *
  • boxfgcolor - [String] any String AWT color ("red", "blue", etc), RGB (0-255) or hex formated color (#RRGGBB) to use as foreground. Default: #000000.
  • + *

    + *

  • al_logo - [String Path of of the logo resource to paint while loading.Default: "appletlogo.gif".
  • + *
  • al_progressbar - [String] Path of the progressbar resource to paint on top of the logo, width clipped by percentage.Default: "appletprogress.gif".
  • + *

    + *

  • lwjgl_arguments -
  • [String] used to pass LWJGL parameters to LWJGL e.g. ("-Dorg.lwjgl.input.Mouse.allowNegativeMouseCoords=true -Dorg.lwjgl.util.Debug=true"). + *
+ *

+ * @author kappaOne + * @author Brian Matzon + * @version $Revision$ + * $Id$ + * + * Contributors: + *
    + *
  • Arielsan
  • + *
  • Bobjob
  • + *
  • Dashiva
  • + *
  • Dr_evil
  • + *
  • Elias Naur
  • + *
  • Kevin Glass
  • + *
  • Matthias Mann
  • + *
  • Mickelukas
  • + *
  • NateS
  • + *
  • Pelle Johnsen
  • + *
  • Riven
  • + *
  • Ruben01
  • + *
  • Shannon Smith
  • + *
+ * + */ +public class AppletLoader extends Applet implements Runnable, AppletStub { + + /** initializing */ + public static final int STATE_INIT = 1; + + /** checking version of jre */ + public static final int STATE_CHECK_JRE_VERSION = 2; + + /** determining which packages that are required */ + public static final int STATE_DETERMINING_PACKAGES = 3; + + /** checking for already downloaded files */ + public static final int STATE_CHECKING_CACHE = 4; + + /** checking if any updates are available for cache files */ + public static final int STATE_CHECKING_FOR_UPDATES = 5; + + /** downloading packages */ + public static final int STATE_DOWNLOADING = 6; + + /** extracting packages */ + public static final int STATE_EXTRACTING_PACKAGES = 7; + + /** validating packages */ + public static final int STATE_VALIDATING_PACKAGES = 8; + + /** updating the classpath */ + public static final int STATE_UPDATING_CLASSPATH = 9; + + /** switching to real applet */ + public static final int STATE_SWITCHING_APPLET = 10; + + /** initializing real applet */ + public static final int STATE_INITIALIZE_REAL_APPLET = 11; + + /** stating real applet */ + public static final int STATE_START_REAL_APPLET = 12; + + /** done */ + public static final int STATE_DONE = 13; + + /** used to calculate length of progress bar */ + protected volatile int percentage; + + /** total size of download in bytes */ + protected int totalDownloadSize; + + /** current size of extracted in bytes */ + protected int currentSizeExtract; + + /** total size of extracted in bytes */ + protected int totalSizeExtract; + + /** logo to be shown while loading */ + protected Image logo, logoBuffer; + + /** progressbar to render while loading */ + protected Image progressbar, progressbarBuffer; + + /** offscreen image used */ + protected Image offscreen; + + /** set to true while painting is done */ + protected boolean painting; + + /** background color of applet */ + protected Color bgColor = Color.white; + + /** color to write foreground in */ + protected Color fgColor = Color.black; + + /** urls of the jars to download */ + protected URL[] urlList; + + /** classLoader used to add downloaded jars to the classpath */ + protected ClassLoader classLoader; + + /** actual thread that does the loading */ + protected Thread loaderThread; + + /** animation thread that renders our load screen while loading */ + protected Thread animationThread; + + /** applet to load after all downloads are complete */ + protected Applet lwjglApplet; + + /** whether we're running in debug mode */ + protected boolean debugMode; + + /** whether to prepend host to cache path */ + protected boolean prependHost; + + /** Used to store file names with lastModified time */ + protected HashMap filesLastModified; + + /** Sizes of files to download */ + protected int[] fileSizes; + + /** Number of native jars */ + protected int nativeJarCount; + + /** whether to use caching system, only download files that have changed */ + protected boolean cacheEnabled; + + /** String to display as a subtask */ + protected String subtaskMessage = ""; + + /** state of applet loader */ + protected volatile int state = STATE_INIT; + + /** whether lzma is supported */ + protected boolean lzmaSupported; + + /** whether pack200 is supported */ + protected boolean pack200Supported; + + /** whether to run in headless mode */ + protected boolean headless = false; + + /** whether to switch applets in headless mode or wait longer */ + protected boolean headlessWaiting = true; + + /** messages to be passed via liveconnect in headless mode */ + protected String[] headlessMessage; + + /** threads to use when fetching information of files to be downloaded */ + protected int concurrentLookupThreads; + + /** whether a fatal error occurred */ + protected boolean fatalError; + + /** whether a certificate refused error occurred */ + protected boolean certificateRefused; + + /** whether the minimum required JRE version is not found */ + protected boolean minimumJreNotFound; + + /** generic error message to display on error */ + protected String[] genericErrorMessage = { "An error occured while loading the applet.", + "Please contact support to resolve this issue.", + ""}; + + /** error message to display if user refuses to accept certificate*/ + protected String[] certificateRefusedMessage = { "Permissions for Applet Refused.", + "Please accept the permissions dialog to allow", + "the applet to continue the loading process."}; + + /** error message to display if minimum JRE version is not met */ + protected String[] minimumJREMessage = { "Your version of Java is out of date.", + "Visit java.com to get the latest version.", + "Java or greater is required."}; + + /** fatal error message to display */ + protected String[] errorMessage; + + /** have natives been loaded by another instance of this applet */ + protected static boolean natives_loaded; + + /* + * @see java.applet.Applet#init() + */ + public void init() { + setState(STATE_INIT); + + // sanity check + String[] requiredArgs = {"al_main", "al_jars"}; + for ( String requiredArg : requiredArgs ) { + if ( getParameter(requiredArg) == null ) { + fatalErrorOccured("missing required applet parameter: " + requiredArg, null); + return; + } + } + + // whether to use cache system + cacheEnabled = getBooleanParameter("al_cache", true); + + // whether to run in debug mode + debugMode = getBooleanParameter("al_debug", false); + + // whether to prepend host to cache path + prependHost = getBooleanParameter("al_prepend_host", true); + + // whether to run in headless mode + headless = getBooleanParameter("al_headless", false); + + // obtain the number of concurrent lookup threads to use + concurrentLookupThreads = getIntParameter("al_lookup_threads", 1); // defaults to 1 + + // get colors of applet + bgColor = getColor("boxbgcolor", Color.white); + setBackground(bgColor); + fgColor = getColor("boxfgcolor", Color.black); + + if (!headless) { + // load logos + logo = getImage(getStringParameter("al_logo", "appletlogo.gif")); + progressbar = getImage(getStringParameter("al_progressbar", "appletprogress.gif")); + } + + // check for lzma support + try { + Class.forName("LZMA.LzmaInputStream"); + lzmaSupported = true; + } catch (Throwable e) { + /* no lzma support */ + } + + // check pack200 support + try { + java.util.jar.Pack200.class.getSimpleName(); + pack200Supported = true; + } catch (Throwable e) { + /* no pack200 support */ + } + } + + /** + * Generates a stacktrace in the form of a string + * @param exception Exception to make stacktrace of + * @return Stacktrace of exception in the form of a string + */ + private static String generateStacktrace(Exception exception) { + Writer result = new StringWriter(); + PrintWriter printWriter = new PrintWriter(result); + exception.printStackTrace(printWriter); + return result.toString(); + } + + /* + * @see java.applet.Applet#start() + */ + public void start() { + if (lwjglApplet != null) { + lwjglApplet.start(); + } + else { + if(loaderThread == null && !fatalError) { + loaderThread = new Thread(this); + loaderThread.setName("AppletLoader.loaderThread"); + loaderThread.start(); + + if (!headless) { + animationThread = new Thread() { + public void run() { + while(loaderThread != null) { + repaint(); + AppletLoader.this.sleep(100); + } + animationThread = null; + } + }; + animationThread.setName("AppletLoader.animationthread"); + animationThread.start(); + } + } + } + } + + /* + * @see java.applet.Applet#stop() + */ + public void stop() { + if (lwjglApplet != null) { + lwjglApplet.stop(); + } + } + + /* + * @see java.applet.Applet#destroy() + */ + public void destroy() { + if (lwjglApplet != null) { + lwjglApplet.destroy(); + } + } + + /** + * Clean up resources + */ + protected void cleanUp() { + progressbar = null; + logo = null; + + logoBuffer = null; + progressbarBuffer = null; + + offscreen = null; + } + + /** + * Retrieves the applet that has been loaded. Useful for liveconnect. + */ + public Applet getApplet() { + return lwjglApplet; + } + + /** + * Retrieves the current status of the AppletLoader and is + * used by liveconnect when running in headless mode. + * + * This method will return the current progress of the AppletLoader + * as a value from 0-100. In the case of a fatal error it will + * return -1. If the certificate is refused it will return -2. + * If the minimum jre requirement is not met will return -3. + * + * When method returns 100 the AppletLoader will sleep until the + * method is called again. When called again it will switch to the + * LWJGL Applet. This is a useful trigger to start the LWJGL applet + * when needed. + */ + public int getStatus() { + if (fatalError) { + headlessMessage = errorMessage; + + if (certificateRefused) return -2; + if (minimumJreNotFound) return -3; + return -1; + } + + if (percentage == 100 && headlessWaiting) { + headlessWaiting = false; + } + + if (percentage == 95) { + percentage = 100; // ready to switch applet + } + + String[] message = {getDescriptionForState(), subtaskMessage}; + headlessMessage = message; + + return percentage; + } + + /** + * Retrieves the current message for the current status. + * Used by liveconnect when running in headless mode. + */ + public String[] getMessages() { + return headlessMessage; + } + + /** + * Transfers the call of AppletResize from the stub to the lwjglApplet. + */ + public void appletResize(int width, int height) { + resize(width, height); + } + + /* + * @see java.awt.Container#update(java.awt.Graphics) + */ + public final void update(Graphics g) { + paint(g); + } + + /* + * @see java.awt.Container#paint(java.awt.Graphics) + */ + public void paint(Graphics g) { + // don't paint loader if applet loaded + if(state == STATE_DONE) { + cleanUp(); // clean up resources + return; + } + + // no drawing in headless mode + if (headless) return; + + // create offscreen if missing + if (offscreen == null) { + offscreen = createImage(getWidth(), getHeight()); + + // create buffers for animated gifs + if (logo != null) { + logoBuffer = createImage(logo.getWidth(null), logo.getHeight(null)); + // add image observer, it will notify when next animated gif frame is ready + offscreen.getGraphics().drawImage(logo, 0, 0, this); + // in case image is not animated fill image buffer once + imageUpdate(logo, ImageObserver.FRAMEBITS, 0, 0, 0, 0); + } + + if (progressbar != null) { + progressbarBuffer = createImage(progressbar.getWidth(null), progressbar.getHeight(null)); + // add image observer, it will notify when next animated gif frame is ready + offscreen.getGraphics().drawImage(progressbar, 0, 0, this); + // in case image is not animated fill image buffer once + imageUpdate(progressbar, ImageObserver.FRAMEBITS, 0, 0, 0, 0); + } + } + + // draw everything onto an image before drawing to avoid flicker + Graphics og = offscreen.getGraphics(); + FontMetrics fm = og.getFontMetrics(); + + // clear background color + og.setColor(bgColor); + og.fillRect(0, 0, offscreen.getWidth(null), offscreen.getHeight(null)); + + og.setColor(fgColor); + + // if we had a failure of some sort, notify the user + if (fatalError) { + for(int i=0; i 0) { + messageX = (offscreen.getWidth(null) - fm.stringWidth(subtaskMessage)) / 2; + og.drawString(subtaskMessage, messageX, messageY+20); + } + + // draw loading progress bar, clipping it depending on percentage done + if (progressbar != null) { + int barSize = (progressbar.getWidth(null) * percentage) / 100; + og.clipRect(x-progressbar.getWidth(null)/2, 0, barSize, offscreen.getHeight(null)); + og.drawImage(progressbarBuffer, x-progressbar.getWidth(null)/2, y-progressbar.getHeight(null)/2, this); + } + + painting = false; + } + + og.dispose(); + + // finally draw it all centred + g.drawImage(offscreen, (getWidth() - offscreen.getWidth(null))/2, (getHeight() - offscreen.getHeight(null))/2, null); + } + + /** + * When an animated gif frame is ready to be drawn the ImageObserver + * will call this method. + * + * The Image frame is copied into a buffer, which is then drawn. + * This is done to prevent image tearing on gif animations. + */ + public boolean imageUpdate(Image img, int flag, int x, int y, int width, int height) { + + // finish with this ImageObserver + if (state == STATE_DONE) return false; + + // if image frame is ready to be drawn and is currently not being painted + if (flag == ImageObserver.FRAMEBITS && !painting) { + Image buffer; + + // select which buffer to fill + if (img == logo) buffer = logoBuffer; + else buffer = progressbarBuffer; + + Graphics g = buffer.getGraphics(); + + // clear background on buffer + g.setColor(bgColor); + g.fillRect(0, 0, buffer.getWidth(null), buffer.getHeight(null)); + + // buffer background is cleared, so draw logo under progressbar + if (img == progressbar && logo != null) { + g.drawImage(logoBuffer, progressbar.getWidth(null)/2-logo.getWidth(null)/2, + progressbar.getHeight(null)/2-logo.getHeight(null)/2, null); + } + + g.drawImage(img, 0, 0, this); + g.dispose(); + + repaint(); + } + + return true; + } + + /** + * @return string describing the state of the loader + */ + protected String getDescriptionForState() { + switch (state) { + case STATE_INIT: + return "Initializing loader"; + case STATE_CHECK_JRE_VERSION: + return "Checking version"; + case STATE_DETERMINING_PACKAGES: + return "Determining packages to load"; + case STATE_CHECKING_CACHE: + return "Calculating download size"; + case STATE_CHECKING_FOR_UPDATES: + return "Checking for updates"; + case STATE_DOWNLOADING: + return "Downloading packages"; + case STATE_EXTRACTING_PACKAGES: + return "Extracting downloaded packages"; + case STATE_VALIDATING_PACKAGES: + return "Validating packages"; + case STATE_UPDATING_CLASSPATH: + return "Updating classpath"; + case STATE_SWITCHING_APPLET: + return "Switching applet"; + case STATE_INITIALIZE_REAL_APPLET: + return "Initializing real applet"; + case STATE_START_REAL_APPLET: + return "Starting real applet"; + case STATE_DONE: + return "Done loading"; + default: + return "unknown state"; + } + } + + /** + * Trims the passed file string based on the available capabilities + * @param file string of files to be trimmed + * @return trimmed string based on capabilities of client + */ + protected String trimExtensionByCapabilities(String file) { + if (!pack200Supported) { + file = file.replace(".pack", ""); + } + + if (!lzmaSupported && file.endsWith(".lzma")) { + file = file.replace(".lzma", ""); + System.out.println("LZMA decoder (lzma.jar) not found, trying " + file + " without lzma extension."); + } + return file; + } + + /** + * Reads list of jars to download and adds the urls to urlList + * also finds out which OS you are on and adds appropriate native + * jar to the urlList + */ + protected void loadJarURLs() throws Exception { + setState(STATE_DETERMINING_PACKAGES); + + // jars to load + String jarList = getParameter("al_jars"); + String nativeJarList = null; + + String osName = System.getProperty("os.name"); + + if (osName.startsWith("Win")) { + + // check if arch specific natives have been specified + if (System.getProperty("os.arch").endsWith("64")) { + nativeJarList = getParameter("al_windows64"); + } else { + nativeJarList = getParameter("al_windows32"); + } + + if (nativeJarList == null) { + nativeJarList = getParameter("al_windows"); + } + + } else if (osName.startsWith("Linux") || osName.startsWith("Unix")) { + + // check if arch specific natives have been specified + if (System.getProperty("os.arch").endsWith("64")) { + nativeJarList = getParameter("al_linux64"); + } else { + nativeJarList = getParameter("al_linux32"); + } + + if (nativeJarList == null) { + nativeJarList = getParameter("al_linux"); + } + + } else if (osName.startsWith("Mac") || osName.startsWith("Darwin")) { + + // check if arch specific natives have been specified + if (System.getProperty("os.arch").endsWith("64")) { + nativeJarList = getParameter("al_mac64"); + } else if (System.getProperty("os.arch").contains("ppc")) { + nativeJarList = getParameter("al_macppc"); + } else { + nativeJarList = getParameter("al_mac32"); + } + + if (nativeJarList == null) { + nativeJarList = getParameter("al_mac"); + } + + } else if (osName.startsWith("Solaris") || osName.startsWith("SunOS")) { + nativeJarList = getParameter("al_solaris"); + } else if (osName.startsWith("FreeBSD")) { + nativeJarList = getParameter("al_freebsd"); + } else { + fatalErrorOccured("OS (" + osName + ") not supported", null); + return; + } + + if (nativeJarList == null) { + fatalErrorOccured("no lwjgl natives files found", null); + return; + } + + jarList = trimExtensionByCapabilities(jarList); + StringTokenizer jars = new StringTokenizer(jarList, ", "); + + nativeJarList = trimExtensionByCapabilities(nativeJarList); + StringTokenizer nativeJars = new StringTokenizer(nativeJarList, ", "); + + int jarCount = jars.countTokens(); + nativeJarCount = nativeJars.countTokens(); + + urlList = new URL[jarCount+nativeJarCount]; + + URL path = getCodeBase(); + + // set jars urls + for (int i = 0; i < jarCount; i++) { + urlList[i] = new URL(path, jars.nextToken()); + } + + for (int i = jarCount; i < jarCount+nativeJarCount; i++) { + urlList[i] = new URL(path, nativeJars.nextToken()); + } + } + + /** + * 9 steps + * + * 1) check jre version meets minimum requirements + * 2) check applet cache and decide which jars to download + * 3) download the jars + * 4) extract native files + * 5) validate jars for any corruption + * 6) save applet cache information + * 7) add jars to class path + * 8) set any lwjgl properties + * 9) switch to loaded applet + */ + public void run() { + percentage = 5; + + try { + debug_sleep(2000); + + // check JRE version meets minimum requirements + if (!isMinJREVersionAvailable()) { + minimumJreNotFound = true; + fatalErrorOccured("Java " + getStringParameter("al_min_jre", "1.5") + " or greater is required.", null); + return; + } + + // parse the urls for the jars into the url list + loadJarURLs(); + + // get path where applet files will be stored + String path = getCacheDirectory(); + + File dir = new File(path); + + // create directory + if (!dir.exists()) { + dir.mkdirs(); + } + + File versionFile = new File(dir, "version"); + + // if specified applet version already available don't download anything + boolean versionAvailable = false; + + // version string of applet + String version = getParameter("al_version"); + + // if applet version specifed, compare with version in the cache + if (version != null) { + versionAvailable = compareVersion(versionFile, version.toLowerCase()); + } + + // if jars not available or need updating download them + if (!versionAvailable) { + // get jars file sizes and check cache + getJarInfo(dir); // 5-15% + + // downloads jars from the server + downloadJars(path); // 15-55% + + // Extract Pack and LZMA files + extractJars(path); // 55-65% + + // Extracts Native Files + extractNatives(path); // 65-80% + + // Validate Jars // 80-90% + validateJars(path); + + // save version information once jars downloaded successfully + if (version != null) { + percentage = 90; + writeObjectFile(versionFile, version.toLowerCase()); + } + + // save file names with last modified info once downloaded successfully + writeObjectFile(new File(dir, "timestamps"), filesLastModified); + } + + // add the downloaded jars and natives to classpath + updateClassPath(path); + + // set lwjgl properties + setLWJGLProperties(); + + // if headless mode then sleep, until told to continue + if (headless) { + while(headlessWaiting) { + Thread.sleep(100); + } + } + + // make applet switch on the EDT as an AWT/Swing permission dialog could be called + EventQueue.invokeAndWait(new Runnable() { + public void run() { + try { + switchApplet(); + } catch (Exception e) { + fatalErrorOccured("This occurred while '" + getDescriptionForState() + "'", e); + } + setState(STATE_DONE); + repaint(); + } + }); + + } catch (Exception e) { + certificateRefused = e instanceof AccessControlException; + fatalErrorOccured("This occurred while '" + getDescriptionForState() + "'", e); + } finally { + loaderThread = null; + } + } + + /** + * When this method is supplied with a JRE version it will compare it to the + * current JRE version. + * + * minimum requried JRE version is set using al_min_jre parameter, if not + * this is not set then the value will default to version 1.5 + * + * The minimumVersion should follow a structure such as x.x.x_x + * Example values would include 1.6.0_10 or a subset like 1.6.0 or 1.6 + * + * @return returns true if the available version is greater or equal to the + * minimum version required + * + * @throws Exception a NumberFormatException is thrown if the string is not valid + */ + public boolean isMinJREVersionAvailable() throws Exception { + setState(STATE_CHECK_JRE_VERSION); + + String minimumVersion = getStringParameter("al_min_jre", "1.5"); + String javaVersion = System.getProperty("java.version"); + + // remove dash and anything after it (letters) from version string e.g. 1.5.0_01-ea + minimumVersion = javaVersion.split("-")[0]; + javaVersion = minimumVersion.split("-")[0]; + + // split version string into a string arrays + String[] jvmVersionData = javaVersion.split("[_\\.]"); + String[] minVersionData = minimumVersion.split("[_\\.]"); + + int maxLength = Math.max(jvmVersionData.length, minVersionData.length); + + // convert string arrays into int arrays + int[] jvmVersion = new int[maxLength]; + int[] minVersion = new int[maxLength]; + + for (int i = 0; i < jvmVersionData.length; i++) { + jvmVersion[i] = Integer.parseInt(jvmVersionData[i]); + } + + for (int i = 0; i < minVersionData.length; i++) { + minVersion[i] = Integer.parseInt(minVersionData[i]); + } + + // compare versions + for (int i = 0; i < maxLength; i++) { + if (jvmVersion[i] < minVersion[i]) return false; // minVersion is greater then jvmVersion + } + + return true; + } + + /** + * This method will return true if the version stored in the file + * matches the supplied String version. + * + * @param versionFile - location to file containing version information + * @param version - String version that needs to be compared + * @return returns true if the version in file matches specified version + */ + protected boolean compareVersion(File versionFile, String version) { + // if version file exists + if (versionFile.exists()) { + String s = readStringFile(versionFile); + + // compare to version with file + if (s != null && s.equals(version)) { + percentage = 90; // not need to download cache files again + + if(debugMode) { + System.out.println("Loading Cached Applet Version: " + version); + } + debug_sleep(2000); + + return true; // version matches file + } + } + + return false; + } + + /** + * Parses the java_arguments list and sets lwjgl specific + * properties accordingly, before the launch. + */ + protected void setLWJGLProperties() { + String lwjglArguments = getParameter("lwjgl_arguments"); + + if(lwjglArguments != null && lwjglArguments.length() > 0) { + int start = lwjglArguments.indexOf("-Dorg.lwjgl"); + while(start != -1) { + int end = lwjglArguments.indexOf(" ", start); + if(end == -1) { + end = lwjglArguments.length(); + } + String[] keyValue = lwjglArguments.substring(start+2, end).split("="); + System.setProperty(keyValue[0], keyValue[1]); + if(debugMode) { + System.out.println("Setting property " + keyValue[0] + " to " + keyValue[1]); + } + start = lwjglArguments.indexOf("-Dorg.lwjgl", end); + } + } + } + + /** + * This method will return the location of the cache directory. All the + * applet files will be downloaded and stored here. A folder will be + * created inside the LWJGL cache directory from the al_title parameter. + * This folder will also be prepended by the host name of the codebase + * to avoid conflict with same named applets on other hosts. + * + * @return path to applets cache directory + * @throws Exception if access is denied + */ + protected String getCacheDirectory() throws Exception { + + String path = AccessController.doPrivileged(new PrivilegedExceptionAction() { + public String run() throws Exception { + + // we append the code base to avoid naming collisions with al_title + String codebase = ""; + if(prependHost) { + codebase = getCodeBase().getHost(); + if(codebase == null || codebase.length() == 0) { + codebase = "localhost"; + } + codebase += File.separator; + } + return getLWJGLCacheDir() + File.separator + codebase + getParameter("al_title") + File.separator; + } + }); + + return path; + } + + /** + * Get path to the lwjgl cache directory. This location will be where + * the OS keeps temporary files. + * + * @return path to the lwjgl cache directory + */ + protected String getLWJGLCacheDir() { + String cacheDir = System.getProperty("deployment.user.cachedir"); + + if (cacheDir == null || System.getProperty("os.name").startsWith("Win")) { + cacheDir = System.getProperty("java.io.tmpdir"); + } + + return cacheDir + File.separator + "lwjglcache"; + } + + /** + * read String object from File + * + * @param file to be read + * @return the String stored in the file or null if it fails + */ + protected String readStringFile(File file) { + try { + return (String)readObjectFile(file); + } catch (Exception e) { + // failed to read version file + e.printStackTrace(); + } + + // return null if failed to read file + return null; + } + + /** + * read the HashMap from File + * + * @param file the file to read + * @return the hashmap stored in the file or an empty hashmap if it fails + */ + @SuppressWarnings("unchecked") + protected HashMap readHashMapFile(File file) { + + try { + return (HashMap) readObjectFile(file); + } catch (Exception e) { + // failed to read hashmap from file + e.printStackTrace(); + } + + // return an empty map if failed to read file + return new HashMap(); + } + + /** + * read the object from the File + * + * @param file the file to read + * @return the object contained in the file or null if it fails + * @throws Exception if it fails to read object from file + */ + protected Object readObjectFile(File file) throws Exception { + FileInputStream fis = new FileInputStream(file); + + try { + ObjectInputStream dis = new ObjectInputStream(fis); + Object object = dis.readObject(); + dis.close(); + return object; + } catch (Exception e) { + // failed to read file + throw e; + } finally { + fis.close(); + } + } + + /** + * write object to specified File + * + * @param file the file to write out to + * @param object the contents of the file + * @throws Exception if it fails to write file + */ + protected void writeObjectFile(File file, Object object) throws Exception { + FileOutputStream fos = new FileOutputStream(file); + try { + ObjectOutputStream dos = new ObjectOutputStream(fos); + dos.writeObject(object); + dos.close(); + } finally { + fos.close(); + } + } + + /** + * Edits the ClassPath at runtime to include the jars + * that have just been downloaded and then adds the + * lwjgl natives folder property. + * + * @param path location where applet is stored + * @throws Exception if it fails to add classpath + */ + protected void updateClassPath(final String path) throws Exception { + + setState(STATE_UPDATING_CLASSPATH); + + percentage = 95; + + URL[] urls = new URL[urlList.length]; + + for (int i = 0; i < urlList.length; i++) { + String file = new File(path, getJarName(urlList[i])).toURI().toString(); + // fix JVM bug where ! is not escaped + file = file.replace("!", "%21"); + urls[i] = new URL(file); + } + + // get AppletLoader certificates + final Certificate[] certs = getCurrentCertificates(); + + // detect if we are running on a mac and save result as boolean + String osName = System.getProperty("os.name"); + final boolean isMacOS = (osName.startsWith("Mac") || osName.startsWith("Darwin")); + + // add downloaded jars to the classpath with required permissions + classLoader = new URLClassLoader(urls) { + protected PermissionCollection getPermissions (CodeSource codesource) { + PermissionCollection perms = null; + + try { + // no permissions + perms = new Permissions(); + + // if certificates match the AppletLoader certificates then we should be all set + if (certificatesMatch(certs, codesource.getCertificates())) { + perms.add(new AllPermission()); + return perms; + } + + String host = getCodeBase().getHost(); + if (host != null && (host.length() > 0)) { + // add permission for downloaded jars to access host they were from + perms.add(new SocketPermission(host, "connect,accept")); + } + else if ( "file".equals(codesource.getLocation().getProtocol()) ) { + // if running locally add file permission + String path = codesource.getLocation().getFile().replace('/', File.separatorChar); + perms.add(new FilePermission(path, "read")); + } + + } catch (Exception e) { + e.printStackTrace(); + } + + return perms; + } + + // allow non lwjgl native to be found from cache directory + protected String findLibrary (String libname) { + String libPath = path + "natives" + File.separator + System.mapLibraryName(libname); + + if (new File(libPath).exists()) { + return libPath; + } + + return super.findLibrary(libname); + } + }; + + debug_sleep(2000); + + // unload natives loaded by a previous instance of this lwjgl applet + unloadNatives(path); + + // add natives files path to native class path + System.setProperty("org.lwjgl.librarypath", path + "natives"); + + // Make sure jinput knows about the new path too + System.setProperty("net.java.games.input.librarypath", path + "natives"); + + // set the library path, useful for non lwjgl natives + System.setProperty("java.library.path", path + "natives"); + + // mark natives as loaded + natives_loaded = true; + } + + /** + * Unload natives loaded by a different classloader. + * + * Due to limitations of the jvm, native files can only + * be loaded once and only be used by the classloader + * they were loaded from. + * + * Due to the way applets on plugin1 work, one jvm must + * be used for all applets. We need to use multiple + * classloaders in the same jvm due to LWJGL's static + * nature. In order to solve this we simply remove the + * natives from a previous classloader allowing a new + * classloader to use those natives in the same jvm. + * + * This method will only attempt to unload natives from a + * previous classloader if it detects that the natives have + * been loaded in the same jvm. + * + * @param nativePath directory where natives are stored + */ + private void unloadNatives(String nativePath) { + + // check whether natives have been loaded into this jvm + if (!natives_loaded) { + return; + } + + try { + Field field = ClassLoader.class.getDeclaredField("loadedLibraryNames"); + field.setAccessible(true); + Vector libs = (Vector) field.get(getClass().getClassLoader()); + + String path = new File(nativePath).getCanonicalPath(); + + for (int i = 0; i < libs.size(); i++) { + String s = (String) libs.get(i); + + // if a native from the nativePath directory is loaded, unload it + if (s.startsWith(path)) { + libs.remove(i); + i--; + } + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + /** + * replace the current applet with the lwjgl applet + * using AppletStub and initialise and start it + */ + protected void switchApplet() throws Exception { + + setState(STATE_SWITCHING_APPLET); + percentage = 100; + + debug_sleep(2000); + + // set correct context classloader for lwjgl applet + Thread.currentThread().setContextClassLoader(classLoader); + + Class appletClass = classLoader.loadClass(getParameter("al_main")); + lwjglApplet = (Applet) appletClass.newInstance(); + + lwjglApplet.setStub(this); + lwjglApplet.setSize(getWidth(), getHeight()); + + setLayout(new BorderLayout()); + add(lwjglApplet); + validate(); + + setState(STATE_INITIALIZE_REAL_APPLET); + lwjglApplet.init(); + + setState(STATE_START_REAL_APPLET); + lwjglApplet.start(); + } + + /** + * This method will get the files sizes of the files to download. + * It wil further get the lastModified time of files + * and save it in a hashmap, if cache is enabled it will mark + * those files that have not changed since last download to not + * redownloaded. + * + * @param dir - location to read cache file from + * @throws Exception - if fails to get infomation + */ + protected void getJarInfo(File dir) throws Exception { + setState(STATE_CHECKING_CACHE); + + filesLastModified = new HashMap(); + + // store file sizes and mark which files not to download + fileSizes = new int[urlList.length]; + + File timestampsFile = new File(dir, "timestamps"); + + // if timestamps file exists, load it + if (timestampsFile.exists()) { + setState(STATE_CHECKING_FOR_UPDATES); + filesLastModified = readHashMapFile(timestampsFile); + } + + // calculate total size of jars to download + + ExecutorService executorService = Executors.newFixedThreadPool(concurrentLookupThreads); + Queue requests = new LinkedList(); + + // create unique object to sync code in requests + final Object sync = new Integer(1); + + for (int j = 0; j < urlList.length; j++) { + final int i = j; + + Future request = executorService.submit(new Runnable() { + + public void run() { + + try { + + URLConnection urlconnection = urlList[i].openConnection(); + urlconnection.setDefaultUseCaches(false); + if (urlconnection instanceof HttpURLConnection) { + ((HttpURLConnection) urlconnection).setRequestMethod("HEAD"); + } + + fileSizes[i] = urlconnection.getContentLength(); + + long lastModified = urlconnection.getLastModified(); + String fileName = getFileName(urlList[i]); + + if (cacheEnabled && lastModified != 0 && filesLastModified.containsKey(fileName)) { + long savedLastModified = filesLastModified.get(fileName); + + // if lastModifed time is the same, don't redownload + if (savedLastModified == lastModified) { + fileSizes[i] = -2; // mark it to not redownload + } + } + + if (fileSizes[i] >= 0) { + synchronized (sync) { + totalDownloadSize += fileSizes[i]; + } + } + + // put key and value in the hashmap + filesLastModified.put(fileName, lastModified); + + } catch (Exception e) { + throw new RuntimeException("Failed to fetch information for " + urlList[i], e); + } + }}); + + requests.add(request); + } + + while (!requests.isEmpty()) { + Iterator iterator = requests.iterator(); + while (iterator.hasNext()) { + Future request = iterator.next(); + if (request.isDone()) { + request.get(); // will throw an exception if request thrown an exception. + iterator.remove(); + + // update progress bar + percentage = 5 + (int) (10 * (urlList.length - requests.size()) / (float) urlList.length); + } + } + + Thread.sleep(10); + } + + executorService.shutdown(); + } + + /** + * Will download the jars from the server using the list of urls + * in urlList, while at the same time updating progress bar + * + * @param path location of the directory to save to + * @throws Exception if download fails + */ + protected void downloadJars(String path) throws Exception { + setState(STATE_DOWNLOADING); + + URLConnection urlconnection; + + int initialPercentage = percentage = 15; + int amountDownloaded = 0; + + // download each jar + byte buffer[] = new byte[65536]; + for (int i = 0; i < urlList.length; i++) { + + // skip file if marked as -2 (already downloaded and not changed) + if (fileSizes[i] == -2) continue; + + int unsuccessfulAttempts = 0; + int maxUnsuccessfulAttempts = 3; + boolean downloadFile = true; + + String currentFile = getFileName(urlList[i]); + + // download the jar a max of 3 times + while(downloadFile) { + downloadFile = false; + + debug_sleep(2000); + + try { + urlconnection = urlList[i].openConnection(); + urlconnection.setUseCaches(false); + + if (urlconnection instanceof HttpURLConnection) { + urlconnection.setRequestProperty("Cache-Control", "no-store,max-age=0,no-cache"); + urlconnection.connect(); + } + + + InputStream inputstream = getJarInputStream(currentFile, urlconnection); + FileOutputStream fos = new FileOutputStream(path + currentFile); + + + int bufferSize; + int currentDownload = 0; + + long downloadStartTime = System.currentTimeMillis(); + int downloadedAmount = 0; + String downloadSpeedMessage = ""; + + try { + while ((bufferSize = inputstream.read(buffer, 0, buffer.length)) != -1) { + debug_sleep(10); + fos.write(buffer, 0, bufferSize); + currentDownload += bufferSize; + + int totalDownloaded = amountDownloaded + currentDownload; + percentage = initialPercentage + ((totalDownloaded * 45) / totalDownloadSize); + subtaskMessage = "Retrieving: " + currentFile + " " + ((totalDownloaded * 100) / totalDownloadSize) + "%"; + + downloadedAmount += bufferSize; + long timeLapse = System.currentTimeMillis() - downloadStartTime; + // update only if a second or more has passed + if (timeLapse >= 1000) { + // get kb/s, nice that bytes/millis is same as kilobytes/seconds + float downloadSpeed = (float) downloadedAmount / timeLapse; + // round to two decimal places + downloadSpeed = ((int)(downloadSpeed*100))/100f; + // set current speed message + downloadSpeedMessage = " - " + downloadSpeed + " KB/sec"; + // reset downloaded amount + downloadedAmount = 0; + // reset start time + downloadStartTime = System.currentTimeMillis(); + } + + subtaskMessage += downloadSpeedMessage; + } + + } finally { + inputstream.close(); + fos.close(); + } + + // download complete, verify if it was successful + if (urlconnection instanceof HttpURLConnection) { + if (currentDownload == fileSizes[i]) { + // successful download + } + else if (fileSizes[i] <= 0 && currentDownload != 0) { + // If contentLength for fileSizes[i] <= 0, we don't know if the download + // is complete. We're going to guess the download is complete. + } + else { + throw new Exception("size mismatch on download of " + currentFile + + " expected " + fileSizes[i] + " got " + currentDownload); + } + } + + // successful file download, update total amount downloaded + amountDownloaded += fileSizes[i]; + + } catch (Exception e) { + e.printStackTrace(); // output exception to console + + // Failed to download the file + unsuccessfulAttempts++; + + // download failed try again + if (unsuccessfulAttempts < maxUnsuccessfulAttempts) { + downloadFile = true; + Thread.sleep(100); // wait a bit before retrying + } + else { + // retry attempts exhasted, download failed + throw new Exception("failed to download " + currentFile + + " after " + maxUnsuccessfulAttempts + " attempts"); + } + } + } + } + subtaskMessage = ""; + } + + /** + * Retrieves a jar files input stream. This method exists primarily to fix an Opera hang in getInputStream + * @param urlconnection connection to get input stream from + * @return InputStream or null if not possible + */ + protected InputStream getJarInputStream(final String currentFile, final URLConnection urlconnection) throws Exception { + final InputStream[] is = new InputStream[1]; + + // try to get the input stream 3 times. + // Wait at most 5 seconds before interrupting the thread + for (int j = 0; j < 3 && is[0] == null; j++) { + Thread t = new Thread() { + public void run() { + try { + is[0] = urlconnection.getInputStream(); + } catch (IOException e) { + /* ignored */ + } + } + }; + t.setName("JarInputStreamThread"); + t.start(); + + int iterationCount = 0; + while(is[0] == null && iterationCount++ < 5) { + try { + t.join(1000); + } catch (InterruptedException inte) { + /* ignored */ + } + } + + if(is[0] == null) { + try { + t.interrupt(); + t.join(); + } catch (InterruptedException inte) { + /* ignored */ + } + } + } + + if(is[0] == null) { + throw new Exception("Unable to get input stream for " + currentFile); + } + + + return is[0]; + } + + /** + * Extract LZMA File + * @param in Input path to pack file + * @param out output path to resulting file + * @throws Exception if any errors occur + */ + protected void extractLZMA(String in, String out) throws Exception { + + File f = new File(in); + FileInputStream fileInputHandle = new FileInputStream(f); + + // use reflection to avoid hard dependency + Class clazz = Class.forName( "LZMA.LzmaInputStream" ); + Constructor constructor = clazz.getDeclaredConstructor(InputStream.class); + InputStream inputHandle = (InputStream) constructor.newInstance(fileInputHandle); + + OutputStream outputHandle = new FileOutputStream(out); + + byte [] buffer = new byte [1<<14]; + + try { + int ret = inputHandle.read(buffer); + while (ret >= 1) { + outputHandle.write(buffer,0,ret); + ret = inputHandle.read(buffer); + } + } finally { + inputHandle.close(); + outputHandle.close(); + } + + // delete LZMA file, as it is no longer needed + f.delete(); + } + + /** + * Extract GZip File + * @param in Input path to pack file + * @param out output path to resulting file + * @throws Exception if any errors occur + */ + protected void extractGZip(String in, String out) throws Exception { + + File f = new File(in); + FileInputStream fileInputHandle = new FileInputStream(f); + + InputStream inputHandle = new GZIPInputStream(fileInputHandle); + + OutputStream outputHandle = new FileOutputStream(out); + + try { + byte [] buffer = new byte [1<<14]; + + int ret = inputHandle.read(buffer); + while (ret >= 1) { + outputHandle.write(buffer,0,ret); + ret = inputHandle.read(buffer); + } + } finally { + inputHandle.close(); + outputHandle.close(); + } + + // delete GZip file, as it is no longer needed + f.delete(); + } + + /** + * Extract Pack File + * @param in Input path to pack file + * @param out output path to resulting file + * @throws Exception if any errors occur + */ + protected void extractPack(String in, String out) throws Exception { + File f = new File(in); + FileOutputStream fostream = new FileOutputStream(out); + JarOutputStream jostream = new JarOutputStream(fostream); + + try { + Pack200.Unpacker unpacker = Pack200.newUnpacker(); + unpacker.unpack(f, jostream); + } finally { + jostream.close(); + fostream.close(); + } + + // delete pack file as its no longer needed + f.delete(); + } + + /** + * Extract all jars from any lzma/gz/pack files + * + * @param path output path + * @throws Exception if any errors occur + */ + protected void extractJars(String path) throws Exception { + setState(STATE_EXTRACTING_PACKAGES); + + float increment = (float) 10.0 / urlList.length; + // extract all gz, lzma, pack.gz and pack.lzma files + for (int i = 0; i < urlList.length; i++) { + + // if file has not changed, skip it + if (fileSizes[i] == -2) continue; + + percentage = 55 + (int) (increment * (i+1)); + String filename = getFileName(urlList[i]); + + if (filename.endsWith(".pack.lzma")) { + subtaskMessage = "Extracting: " + filename + " to " + replaceLast(filename, ".lzma", ""); + debug_sleep(1000); + extractLZMA(path + filename, path + replaceLast(filename, ".lzma", "")); + + subtaskMessage = "Extracting: " + replaceLast(filename, ".lzma", "") + " to " + replaceLast(filename, ".pack.lzma", ""); + debug_sleep(1000); + extractPack(path + replaceLast(filename, ".lzma", ""), path + replaceLast(filename, ".pack.lzma", "")); + } + else if (filename.endsWith(".pack.gz")) { + subtaskMessage = "Extracting: " + filename + " to " + replaceLast(filename, ".gz", ""); + debug_sleep(1000); + extractGZip(path + filename, path + replaceLast(filename, ".gz", "")); + + subtaskMessage = "Extracting: " + replaceLast(filename, ".gz", "") + " to " + replaceLast(filename, ".pack.gz", ""); + debug_sleep(1000); + extractPack(path + replaceLast(filename, ".gz", ""), path + replaceLast(filename, ".pack.gz", "")); + } + else if (filename.endsWith(".pack")) { + subtaskMessage = "Extracting: " + filename + " to " + replaceLast(filename, ".pack", ""); + debug_sleep(1000); + extractPack(path + filename, path + replaceLast(filename, ".pack", "")); + } + else if (filename.endsWith(".lzma")) { + subtaskMessage = "Extracting: " + filename + " to " + replaceLast(filename, ".lzma", ""); + debug_sleep(1000); + extractLZMA(path + filename, path + replaceLast(filename, ".lzma", "")); + } + else if (filename.endsWith(".gz")) { + subtaskMessage = "Extracting: " + filename + " to " + replaceLast(filename, ".gz", ""); + debug_sleep(1000); + extractGZip(path + filename, path + replaceLast(filename, ".gz", "")); + } + } + } + + /** + * This method will extract all file from the native jar and extract them + * to the subdirectory called "natives" in the local path, will also check + * to see if the native jar files is signed properly + * + * @param path base folder containing all downloaded jars + * @throws Exception if it fails to extract files + */ + protected void extractNatives(String path) throws Exception { + + setState(STATE_EXTRACTING_PACKAGES); + + float percentageParts = 15f/nativeJarCount; // parts for each native jar from 15% + + // create native folder + File nativeFolder = new File(path + "natives"); + if (!nativeFolder.exists()) { + nativeFolder.mkdir(); + } + + // get the current AppletLoader certificates to compare against certificates of the native files + Certificate[] certificate = getCurrentCertificates(); + + for (int i = urlList.length - nativeJarCount; i < urlList.length; i++) { + + // if a new native jar was not downloaded, no extracting needed + if (fileSizes[i] == -2) { + continue; + } + + // get name of jar file with natives from urlList + String nativeJar = getJarName(urlList[i]); + + // open jar file + JarFile jarFile = new JarFile(path + nativeJar, true); + + // get list of files in jar + Enumeration entities = jarFile.entries(); + + totalSizeExtract = 0; + int jarNum = i - (urlList.length - nativeJarCount); // used for progressbar + + // calculate the size of the files to extract for progress bar + while (entities.hasMoreElements()) { + JarEntry entry = (JarEntry) entities.nextElement(); + + // skip directories and anything in directories + // conveniently ignores the manifest + if (entry.isDirectory() || entry.getName().indexOf('/') != -1) { + continue; + } + totalSizeExtract += entry.getSize(); + } + + currentSizeExtract = 0; + + // reset point to begining by getting list of file again + entities = jarFile.entries(); + + // extract all files from the jar + while (entities.hasMoreElements()) { + JarEntry entry = (JarEntry) entities.nextElement(); + + // skip directories and anything in directories + // conveniently ignores the manifest + if (entry.isDirectory() || entry.getName().indexOf('/') != -1) { + continue; + } + + // check if native file already exists if so delete it to make room for new one + // useful when using the reload button on the browser + File f = new File(path + "natives" + File.separator + entry.getName()); + if (f.exists()) { + if (!f.delete()) { + continue; // unable to delete file, it is in use, skip extracting it + } + } + + debug_sleep(1000); + + InputStream in = jarFile.getInputStream(jarFile.getEntry(entry.getName())); + OutputStream out = new FileOutputStream(path + "natives" + File.separator + entry.getName()); + + try { + int bufferSize; + byte buffer[] = new byte[65536]; + + while ((bufferSize = in.read(buffer, 0, buffer.length)) != -1) { + debug_sleep(10); + out.write(buffer, 0, bufferSize); + currentSizeExtract += bufferSize; + + // update progress bar + percentage = 65 + (int)(percentageParts * (jarNum + currentSizeExtract/(float)totalSizeExtract)); + subtaskMessage = "Extracting: " + entry.getName() + " " + ((currentSizeExtract * 100) / totalSizeExtract) + "%"; + } + } finally { + in.close(); + out.close(); + } + + // validate the certificate for the native file being extracted + if (!certificatesMatch(certificate, entry.getCertificates())) { + f.delete(); // delete extracted native as its certificates doesn't match + throw new Exception("The certificate(s) in " + nativeJar + " do not match the AppletLoader!"); + } + } + subtaskMessage = ""; + + jarFile.close(); + + // delete native jar as it is no longer needed + File f = new File(path + nativeJar); + f.delete(); + + } + } + + /** + * Compare two certificate chains to see if they match + * + * @param cert1 first chain of certificates + * @param cert2 second chain of certificates + * + * @return true if the certificate chains are the same + */ + protected static boolean certificatesMatch(Certificate[] certs1, Certificate[] certs2) throws Exception { + if (certs1 == null || certs2 == null) { + return false; + } + + if (certs1.length != certs2.length) { + System.out.println("Certificate chain differs in length [" + certs1.length + " vs " + certs2.length + "]!"); + return false; + } + + for (int i = 0; i < certs1.length; i++) { + if (!certs1[i].equals(certs2[i])) { + System.out.println("Certificate mismatch found!"); + return false; + } + } + + return true; + } + + /** + * Returns the current certificate chain of the AppletLoader + * + * @return - certificate chain of AppletLoader + */ + protected static Certificate[] getCurrentCertificates() throws Exception { + // get the current certificate to compare against native files + Certificate[] certificate = AppletLoader.class.getProtectionDomain().getCodeSource().getCertificates(); + + // workaround for bug where cached applet loader does not have certificates!? + if (certificate == null) { + URL location = AppletLoader.class.getProtectionDomain().getCodeSource().getLocation(); + + // manually load the certificate + JarURLConnection jurl = (JarURLConnection) (new URL("jar:" + location.toString() + "!/org/lwjgl/util/applet/AppletLoader.class").openConnection()); + jurl.setDefaultUseCaches(true); + certificate = jurl.getCertificates(); + jurl.setDefaultUseCaches(false); + } + + return certificate; + } + + /** + * Check and validate jars which will be loaded into the classloader to make + * sure that they are not corrupt. This ensures corrupt files are never marked + * as successful downloadeds by the cache system. + * + * @param path - where the jars are stored + * @throws Exception if a corrupt jar is found + */ + protected void validateJars(String path) throws Exception { + + setState(STATE_VALIDATING_PACKAGES); + + percentage = 80; + + float percentageParts = 10f / urlList.length; // percentage for each file out of 10% + + for (int i = 0; i < urlList.length - nativeJarCount; i++) { + + debug_sleep(1000); + + // if file not downloaded, no need to validate again + if (fileSizes[i] == -2) continue; + + subtaskMessage = "Validating: " + getJarName(urlList[i]); + + File file = new File(path, getJarName(urlList[i])); + if (!isZipValid(file)) { + throw new Exception("The file " + getJarName(urlList[i]) + " is corrupt!"); + } + + percentage = 80 + (int)(percentageParts * i); + } + + subtaskMessage = ""; + } + + /** + * This method will check if a zip file is valid by running through it + * and checking for any corruption and CRC failures + * + * @param file - zip file to test + * @return boolean - runs false if the file is corrupt + */ + protected boolean isZipValid(File file) { + + try { + ZipFile zipFile = new ZipFile(file); + + try { + Enumeration e = zipFile.entries(); + + byte[] buffer = new byte[4096]; + + while(e.hasMoreElements()) { + ZipEntry zipEntry = (ZipEntry) e.nextElement(); + + CRC32 crc = new CRC32(); + + BufferedInputStream bis = new BufferedInputStream(zipFile.getInputStream(zipEntry)); + CheckedInputStream cis = new CheckedInputStream(bis, crc); + + while(cis.read(buffer, 0, buffer.length) != -1) { + // scroll through zip entry + } + + if (crc.getValue() != zipEntry.getCrc()) { + return false; // CRC match failed, corrupt zip + } + } + + return true; // valid zip file + } finally { + zipFile.close(); + } + } catch (IOException e) { + e.printStackTrace(); + return false; + } + } + + /** + * Get Image from path provided + * + * @param s location of the image + * @return the Image file + */ + protected Image getImage(String s) { + + // if s is "" then don't load an image + if (s.length() == 0) return null; + + Image image = null; + + try { + image = getImage(new URL(getCodeBase(), s)); + } catch (Exception e) { + /* */ + } + + // if image failed to load, try another method + if (image == null) { + image = getImage(Thread.currentThread().getContextClassLoader().getResource(s)); + } + + // if image loaded sucessfully return it + if (image != null) { + return image; + } + + // show error as image could not be loaded + fatalErrorOccured("Unable to load the logo/progressbar image: " + s, null); + return null; + } + + /** + * Get Image from path provided + * + * @param url location of the image + * @return the Image file + */ + public Image getImage(URL url) { + try { + MediaTracker tracker = new MediaTracker(this); + + Image image = super.getImage(url); + + // wait for image to load + tracker.addImage(image, 0); + tracker.waitForAll(); + + // if no errors return image + if (!tracker.isErrorAny()) { + return image; + } + } catch (Exception e) { + /* */ + } + + return null; + } + + /** + * Get jar name from URL. + * + * @param url Get jar file name from this url + * @return file name as string + */ + protected String getJarName(URL url) { + String fileName = url.getFile(); + + if (fileName.endsWith(".pack.lzma")) { + fileName = replaceLast(fileName, ".pack.lzma", ""); + } else if (fileName.endsWith(".pack.gz")) { + fileName = replaceLast(fileName, ".pack.gz", ""); + } else if (fileName.endsWith(".pack")) { + fileName = replaceLast(fileName, ".pack", ""); + } else if (fileName.endsWith(".lzma")) { + fileName = replaceLast(fileName, ".lzma", ""); + } else if (fileName.endsWith(".gz")) { + fileName = replaceLast(fileName, ".gz", ""); + } + + return fileName.substring(fileName.lastIndexOf('/') + 1); + } + + /** + * Get file name portion of URL. + * + * @param url Get file name from this url + * @return file name as string + */ + protected String getFileName(URL url) { + String fileName = url.getFile(); + return fileName.substring(fileName.lastIndexOf('/') + 1); + } + + /** + * Retrieves the color + * + * @param param Color to load + * @param defaultColor Default color to use if no color to load + * @return Color to use + */ + protected Color getColor(String param, Color defaultColor) { + String color = getParameter(param); + + if (color == null) return defaultColor; + + // Check if RGB format + if (color.indexOf(",") != -1) { + StringTokenizer st = new StringTokenizer(color, ","); + + // We've got three components for the color + try { + return new Color(Integer.parseInt(st.nextToken().trim()), + Integer.parseInt(st.nextToken().trim()), + Integer.parseInt(st.nextToken().trim())); + } catch (Exception e) { + // failed to parse + return defaultColor; + } + } + + // Check & decode if the color is in hexadecimal color format (i.e. #808000) + try { + return Color.decode(color); + } catch (NumberFormatException e) { + // ignore exception + } + + // Get the color by name if it exists + try { + return (Color)Color.class.getField(color).get(null); + } catch (Exception e) { + return defaultColor; + } + } + + /** + * Replaces the last occurrence of the specified target substring with + * the specified replacement string in a string. + * + * @param original - String to search + * @param target - substring to find + * @param replacement - what to replace target substring with + * @return - return the modified string, if target substring not found return original string + */ + public String replaceLast(String original, String target, String replacement) { + int index = original.lastIndexOf(target); + + if(index == -1) { + return original; + } + + return original.substring(0, index) + replacement + original.substring(index + target.length()); + } + + /** + * Retrieves the String value for the parameter + * @param name Name of parameter + * @param defaultValue default value to return if no such parameter + * @return value of parameter or defaultValue + */ + protected String getStringParameter(String name, String defaultValue) { + String parameter = getParameter(name); + if (parameter != null) { + return parameter; + } + return defaultValue; + } + + /** + * Retrieves the boolean value for the parameter + * @param name Name of parameter + * @param defaultValue default value to return if no such parameter + * @return value of parameter or defaultValue + */ + protected boolean getBooleanParameter(String name, boolean defaultValue) { + String parameter = getParameter(name); + if (parameter != null) { + return Boolean.parseBoolean(parameter); + } + return defaultValue; + } + + /** + * Retrieves the int value for the applet + * @param name Name of parameter + * @param defaultValue default value to return if no such parameter + * @return value of parameter or defaultValue + */ + protected int getIntParameter(String name, int defaultValue) { + String parameter = getParameter(name); + if (parameter != null) { + return Integer.parseInt(parameter); + } + return defaultValue; + } + + /** + * Sets the error message and print debug information + * + * @param error Error message to print + */ + protected void fatalErrorOccured(String error, Exception e) { + fatalError = true; + + if (minimumJreNotFound) { + errorMessage = minimumJREMessage; + errorMessage[errorMessage.length-1] = error; + } + else if (certificateRefused) { + errorMessage = certificateRefusedMessage; + } + else { + errorMessage = genericErrorMessage; + errorMessage[errorMessage.length-1] = error; + } + + System.out.println(error); + if(e != null) { + System.out.println(e.getMessage()); + System.out.println(generateStacktrace(e)); + } + repaint(); + } + + /** + * set the state of applet loader + * @param new state of applet loader + * */ + protected void setState(int state) { + this.state = state; + if(debugMode) { + System.out.println(getDescriptionForState()); + } + } + + /** + * Utility method for sleeping + * Will only really sleep if debug has been enabled + * @param ms milliseconds to sleep + */ + protected void debug_sleep(long ms) { + if(debugMode) { + sleep(ms); + } + } + + /** + * Utility method for sleeping + * @param ms milliseconds to sleep + */ + protected void sleep(long ms) { + try { + Thread.sleep(ms); + } catch (Exception e) { + /* ignored */ + } + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Alias.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Alias.java new file mode 100644 index 0000000..3983174 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Alias.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * This annotation can be used for extensions that have aliases + * with the exact same functionality. + *

+ * This is currently only implemented for context-specific functionality. + * + * @author Spasi + */ +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@Target(ElementType.TYPE) +public @interface Alias { + + /** The aliased extension name. */ + String value(); + + /** The function name postfix for the aliased version. (optional) */ + String postfix() default ""; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Alternate.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Alternate.java new file mode 100644 index 0000000..c137415 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Alternate.java @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +/** + * When a method is annonated with @Alternate, no native stub will be created and the Java method will be renamed to value(). + * This can be useful when we want to provide an alternate GL call with different arguments (created by different annotations) + * + * @author spasi + */ +@Target({ ElementType.METHOD }) +public @interface Alternate { + + /** This must match an existing GL method name. */ + String value(); + + /** If true, an alternate Java->native call will be created. Useful when the alternate implementation uses different types. */ + boolean nativeAlt() default false; + + /** Applicable when nativeAlt is true. If true, no extra native call will be generated. Useful when there's another nativeAlt already defined. */ + boolean skipNative() default false; + + /** If true, the alternate method's name will be used for the Java call. */ + boolean javaAlt() default false; +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Auto.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Auto.java new file mode 100644 index 0000000..e5702a1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Auto.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * + * AutoType and AutoSize is annotated with @Auto. + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@Target(ElementType.ANNOTATION_TYPE) +public @interface Auto { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/AutoSize.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/AutoSize.java new file mode 100644 index 0000000..741a417 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/AutoSize.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * + * AutoSize specifies that a parameter should be pre-computed + * according to the remaining() of a Buffer parameter. + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@Auto +@Target({ElementType.METHOD,ElementType.PARAMETER}) +public @interface AutoSize { + String value(); // The name of the Buffer parameter + String expression() default ""; // This value is added after the argument + boolean useExpression() default false; // When this is true, the expression result will be used directly. + boolean canBeNull() default false; // When this is true and the Buffer parameter is null, 0 will be used. + boolean isNative() default false; // When this is true, auto-sizing will be performed in native code. +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/AutoType.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/AutoType.java new file mode 100644 index 0000000..123a6aa --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/AutoType.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * + * Indicates that a parameter should be pre-computed according + * to the type of a Buffer parameter. + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@Auto +@Target(ElementType.PARAMETER) +public @interface AutoType { + String value(); // The parameter to get the type from +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/BufferKind.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/BufferKind.java new file mode 100644 index 0000000..d5ae1fd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/BufferKind.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +public enum BufferKind { + UnpackPBO, + PackPBO, + ElementVBO, + ArrayVBO, + IndirectBO +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/BufferObject.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/BufferObject.java new file mode 100644 index 0000000..9c96a3c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/BufferObject.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * + * This annotation implies that a Buffer parameter can be an + * integer VBO/PBO offset. + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@Target(ElementType.PARAMETER) +public @interface BufferObject { + BufferKind value(); +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/CachedReference.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/CachedReference.java new file mode 100644 index 0000000..a8cbf49 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/CachedReference.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * + * This annotation indicates that a buffer parameter is cached by + * OpenGL. + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@Target(ElementType.PARAMETER) +public @interface CachedReference { + /** If set then this will be used as array index for accessing the stored reference. */ + String index() default ""; + + /** If set then this name will be used for the reference and the reference field will not be auto generated in References. */ + String name() default ""; +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/CachedResult.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/CachedResult.java new file mode 100644 index 0000000..a38ef75 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/CachedResult.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@Target(ElementType.METHOD) +public @interface CachedResult { + boolean isRange() default false; +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Check.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Check.java new file mode 100644 index 0000000..3a1c640 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Check.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface Check { + String value() default ""; + boolean canBeNull() default false; +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Code.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Code.java new file mode 100644 index 0000000..cb924c4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Code.java @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@Target(ElementType.METHOD) +public @interface Code { + + String value() default ""; // Java, before everything + + boolean tryBlock() default false; // Add a try/finally block around the native call and return statement + + String javaBeforeNative() default ""; // Before the native call + String javaAfterNative() default ""; // After the native call + String javaFinally() default ""; // In the finally block + + String nativeAfterVars() default ""; // After variable declaration + String nativeBeforeCall() default ""; // Before the API call + String nativeAfterCall() default ""; // After the API call + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Const.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Const.java new file mode 100644 index 0000000..f32942e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Const.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface Const { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Constant.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Constant.java new file mode 100644 index 0000000..e1bcb96 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Constant.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@Target(ElementType.PARAMETER) +public @interface Constant { + String value(); + /** If true, the original parameter will not be removed from the method. */ + boolean keepParam() default false; + /** If true, this is a native code constant. */ + boolean isNative() default false; +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Dependent.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Dependent.java new file mode 100644 index 0000000..1741823 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Dependent.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * Use this annotation on extensions with functionality that depends on the presence of other extensions. + * Functions in such extensions marked with this annotation will only be loaded if the specified extension is present. + * + * @author spasi + */ + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@Target({ ElementType.TYPE, ElementType.METHOD }) +public @interface Dependent { + String value() default ""; +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/DeprecatedGL.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/DeprecatedGL.java new file mode 100644 index 0000000..4789d98 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/DeprecatedGL.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * Use this annotation on extensions with deprecated functionality. + * Functions in such extensions marked with this annotation will not be loaded in a forward compatible context. + * + * @author spasi + */ + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@Target({ ElementType.TYPE, ElementType.METHOD }) +public @interface DeprecatedGL { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Extension.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Extension.java new file mode 100644 index 0000000..3db8bdb --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Extension.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@Target(ElementType.TYPE) +public @interface Extension { + String className() default ""; + boolean isFinal() default true; + String postfix(); +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Extern.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Extern.java new file mode 100644 index 0000000..b4e8f6f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Extern.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +/** + * Functions marked with @Extern will not be declared as static in the C implementation. + * This allows other source files to call them. + * + * @author Spasi + */ +@Target(ElementType.METHOD) +public @interface Extern { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/FieldsGenerator.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/FieldsGenerator.java new file mode 100644 index 0000000..3118e53 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/FieldsGenerator.java @@ -0,0 +1,124 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.util.generator; + +import java.io.PrintWriter; +import java.util.Collection; + +import com.sun.mirror.declaration.FieldDeclaration; +import com.sun.mirror.declaration.Modifier; +import com.sun.mirror.type.PrimitiveType; +import com.sun.mirror.type.TypeMirror; + +public class FieldsGenerator { + + private static void validateField(FieldDeclaration field) { + // Check if field is "public static final" + Collection modifiers = field.getModifiers(); + if ( modifiers.size() != 3 + || !modifiers.contains(Modifier.PUBLIC) + || !modifiers.contains(Modifier.STATIC) + || !modifiers.contains(Modifier.FINAL) ) { + throw new RuntimeException("Field " + field.getSimpleName() + " is not declared public static final"); + } + + // Check suported types (int, long, float, String) + TypeMirror field_type = field.getType(); + if ( field_type instanceof PrimitiveType ) { + PrimitiveType field_type_prim = (PrimitiveType)field_type; + PrimitiveType.Kind field_kind = field_type_prim.getKind(); + if ( field_kind != PrimitiveType.Kind.INT + && field_kind != PrimitiveType.Kind.LONG + && field_kind != PrimitiveType.Kind.FLOAT + && field_kind != PrimitiveType.Kind.BYTE ) { + throw new RuntimeException("Field " + field.getSimpleName() + " is not of type 'int', 'long' or 'float'"); + } + } else if ( "java.lang.String".equals(field_type.toString()) ) { + } else { + throw new RuntimeException("Field " + field.getSimpleName() + " is not a primitive type or String"); + } + + Object field_value = field.getConstantValue(); + if ( field_value == null ) { + throw new RuntimeException("Field " + field.getSimpleName() + " has no initial value"); + } + } + + private static void generateField(PrintWriter writer, FieldDeclaration field, FieldDeclaration prev_field) { + validateField(field); + + Object value = field.getConstantValue(); + String field_value_string; + Class field_value_class = value.getClass(); + if ( field_value_class.equals(Integer.class) ) { + field_value_string = "0x" + Integer.toHexString((Integer)field.getConstantValue()).toUpperCase(); + } else if ( field_value_class.equals(Long.class) ) { + field_value_string = "0x" + Long.toHexString((Long)field.getConstantValue()).toUpperCase() + 'L'; + } else if ( field_value_class.equals(Float.class) ) { + field_value_string = field.getConstantValue() + "f"; + } else if ( value.getClass().equals(Byte.class) ) { + field_value_string = "0x" + Integer.toHexString((Byte)field.getConstantValue()).toUpperCase(); + } else if ( field_value_class.equals(String.class) ) { + field_value_string = "\"" + field.getConstantValue() + "\""; + } else { + throw new RuntimeException("Field is of unexpected type. This means there is a bug in validateField()."); + } + + boolean hadDoc = prev_field != null && prev_field.getDocComment() != null; + boolean hasDoc = field.getDocComment() != null; + boolean newBatch = prev_field == null || !prev_field.getType().equals(field.getType()) || (!hadDoc && field.getDocComment() != null) || (hadDoc && hasDoc && !prev_field.getDocComment().equals(field.getDocComment())); + + // Print field declaration + if ( newBatch ) { + if ( prev_field != null ) + writer.println(";\n"); + + Utils.printDocComment(writer, field); + writer.print("\tpublic static final " + field.getType().toString() + " " + field.getSimpleName() + " = " + field_value_string); + } else + writer.print(",\n\t\t" + field.getSimpleName() + " = " + field_value_string); + } + + public static void generateFields(PrintWriter writer, Collection fields) { + if ( 0 < fields.size() ) { + writer.println(); + FieldDeclaration prev_field = null; + for ( FieldDeclaration field : fields ) { + generateField(writer, field, prev_field); + prev_field = field; + } + writer.println(";"); + } + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/ForceInit.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/ForceInit.java new file mode 100644 index 0000000..7173f6e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/ForceInit.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * Extensions marked with ForceInit will be initialized by LWJGL even if not exposed in the GL_EXTENSIONS string. + * + * @author spasi + */ + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@Target({ ElementType.TYPE }) +public @interface ForceInit { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/GenerateAutos.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/GenerateAutos.java new file mode 100644 index 0000000..b103b40 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/GenerateAutos.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@Target(ElementType.METHOD) +public @interface GenerateAutos { + /** If true, a size variable will be generated. */ + String[] sizeVariables() default {}; +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/GeneratorProcessorFactory.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/GeneratorProcessorFactory.java new file mode 100644 index 0000000..d9206b8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/GeneratorProcessorFactory.java @@ -0,0 +1,176 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.util.generator; + +import java.io.File; +import java.io.FileFilter; +import java.util.Arrays; +import java.util.Collection; +import java.util.Map; +import java.util.Set; + +import com.sun.mirror.apt.*; +import com.sun.mirror.declaration.AnnotationTypeDeclaration; +import com.sun.mirror.declaration.TypeDeclaration; + +import static com.sun.mirror.util.DeclarationVisitors.*; +import static java.util.Collections.*; + +/** + * Generator tool for creating the java classes and native code + * from an annotated template java interface. + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +public class GeneratorProcessorFactory implements AnnotationProcessorFactory, RoundCompleteListener { + + private static boolean first_round = true; + + // Process any set of annotations + private static final Collection supportedAnnotations = + unmodifiableCollection(Arrays.asList("*")); + + private static final Collection supportedOptions = + unmodifiableCollection(Arrays.asList("-Atypemap", "-Ageneratechecks", "-Acontextspecific")); + + public Collection supportedAnnotationTypes() { + return supportedAnnotations; + } + + public Collection supportedOptions() { + return supportedOptions; + } + + public void roundComplete(RoundCompleteEvent event) { + first_round = false; + } + + public AnnotationProcessor getProcessorFor(Set atds, AnnotationProcessorEnvironment env) { + // Only process the initial types, not the generated ones + if ( first_round ) { + env.addListener(this); + return new GeneratorProcessor(env); + } else + return AnnotationProcessors.NO_OP; + } + + private static class GeneratorProcessor implements AnnotationProcessor { + + private final AnnotationProcessorEnvironment env; + + GeneratorProcessor(AnnotationProcessorEnvironment env) { + this.env = env; + } + + public void process() { + Map options = env.getOptions(); + String typemap_classname = null; + String bin_path = null; + boolean generate_error_checks = options.containsKey("-Ageneratechecks"); + boolean context_specific = options.containsKey("-Acontextspecific"); + for ( String k : options.keySet() ) { + if ( !k.startsWith("-A") ) + continue; + + int delimiter = k.indexOf('='); + if ( delimiter != -1 ) { + if ( k.startsWith("-Atypemap") ) { + typemap_classname = k.substring(delimiter + 1); + } else if ( k.startsWith("-Abinpath") ) { + bin_path = k.substring(delimiter + 1); + } + } + } + if ( typemap_classname == null ) + throw new RuntimeException("No TypeMap class name specified with -Atypemap="); + if ( bin_path == null ) + throw new RuntimeException("No path specified for the bin directory with -Abinpath="); + + TypeDeclaration lastFile = null; + try { + long generatorLM = getGeneratorLastModified(bin_path); + TypeMap type_map = (TypeMap)(Class.forName(typemap_classname).newInstance()); + for ( TypeDeclaration typedecl : env.getSpecifiedTypeDeclarations() ) { + lastFile = typedecl; + typedecl.accept(getDeclarationScanner(new GeneratorVisitor(env, type_map, generate_error_checks, context_specific, generatorLM), NO_OP)); + } + } catch (Exception e) { + if ( lastFile == null ) + throw new RuntimeException(e); + else + throw new RuntimeException("\n-- Failed to process template: " + lastFile.getQualifiedName() + " --", e); + } + } + + /** + * Gets the time of the latest change on the Generator classes. + * + * @return time of the latest change + */ + private static long getGeneratorLastModified(final String bin_path) { + long lastModified = getDirectoryLastModified(bin_path, "/org/lwjgl/util/generator"); + lastModified = Math.max(lastModified, getDirectoryLastModified(bin_path, "/org/lwjgl/util/generator/openal")); + lastModified = Math.max(lastModified, getDirectoryLastModified(bin_path, "/org/lwjgl/util/generator/opengl")); + lastModified = Math.max(lastModified, getDirectoryLastModified(bin_path, "/org/lwjgl/util/generator/opencl")); + + return lastModified; + } + + private static long getDirectoryLastModified(final String bin_path, final String path) { + final File pck = new File(bin_path + path); + if ( !pck.exists() || !pck.isDirectory() ) + return Long.MAX_VALUE; + + final File[] classes = pck.listFiles(new FileFilter() { + public boolean accept(final File pathname) { + return pathname.isFile() && pathname.getName().endsWith(".class"); + } + }); + + if ( classes == null || classes.length == 0 ) + return Long.MAX_VALUE; + + long lastModified = 0; + + for ( File clazz : classes ) { + long lm = clazz.lastModified(); + if ( lastModified < lm ) + lastModified = lm; + } + + return lastModified; + } + } +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/GeneratorVisitor.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/GeneratorVisitor.java new file mode 100644 index 0000000..8658c22 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/GeneratorVisitor.java @@ -0,0 +1,346 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.util.generator; + +import com.sun.mirror.apt.*; +import com.sun.mirror.declaration.*; +import com.sun.mirror.type.*; +import com.sun.mirror.util.*; + +import java.io.*; +import java.lang.annotation.Annotation; +import java.nio.channels.FileChannel; +import java.util.*; + +import java.nio.*; + +/** + * + * Generator visitor for the generator tool + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +public class GeneratorVisitor extends SimpleDeclarationVisitor { + private final AnnotationProcessorEnvironment env; + private final TypeMap type_map; + private final boolean generate_error_checks; + private final boolean context_specific; + private final long generatorLM; + + public GeneratorVisitor(AnnotationProcessorEnvironment env, TypeMap type_map, boolean generate_error_checks, boolean context_specific, long generatorLM) { + this.env = env; + this.type_map = type_map; + this.generate_error_checks = generate_error_checks; + this.context_specific = context_specific; + this.generatorLM = generatorLM; + } + + private void validateMethod(MethodDeclaration method) { + if (method.isVarArgs()) + throw new RuntimeException("Method " + method.getSimpleName() + " is variadic"); + Collection modifiers = method.getModifiers(); + if (!modifiers.contains(Modifier.PUBLIC)) + throw new RuntimeException("Method " + method.getSimpleName() + " is not public"); + if (method.getThrownTypes().size() > 0) + throw new RuntimeException("Method " + method.getSimpleName() + " throws checked exceptions"); + validateParameters(method); + StripPostfix strip_annotation = method.getAnnotation(StripPostfix.class); + if (strip_annotation != null && method.getAnnotation(Alternate.class) == null) { + String postfix_param_name = strip_annotation.value(); + ParameterDeclaration postfix_param = Utils.findParameter(method, postfix_param_name); + if (Utils.isParameterMultiTyped(postfix_param)) + throw new RuntimeException("Postfix parameter can't be the same as a multityped parameter in method " + method); + if (Utils.getNIOBufferType(postfix_param.getType()) == null) + throw new RuntimeException("Postfix parameter type must be a nio Buffer"); + } + if (Utils.getResultParameter(method) != null && !method.getReturnType().equals(env.getTypeUtils().getVoidType())) + throw new RuntimeException(method + " return type is not void but a parameter is annotated with Result"); + if (method.getAnnotation(CachedResult.class) != null) { + if (Utils.getNIOBufferType(Utils.getMethodReturnType(method)) == null) + throw new RuntimeException(method + " return type is not a Buffer, but is annotated with CachedResult"); + if (method.getAnnotation(AutoSize.class) == null) + throw new RuntimeException(method + " is annotated with CachedResult but misses an AutoSize annotation"); + } + validateTypes(method, method.getAnnotationMirrors(), method.getReturnType()); + } + + private void validateType(MethodDeclaration method, Class annotation_type, Class type) { + Class[] valid_types = type_map.getValidAnnotationTypes(type); + for ( Class valid_type : valid_types ) + if ( valid_type.equals(annotation_type) ) + return; + throw new RuntimeException(type + " is annotated with invalid native type " + annotation_type + + " in method " + method); + } + + private void validateTypes(MethodDeclaration method, Collection annotations, TypeMirror type_mirror) { + for (AnnotationMirror annotation : annotations) { + NativeType native_type_annotation = NativeTypeTranslator.getAnnotation(annotation, NativeType.class); + if (native_type_annotation != null) { + Class annotation_type = NativeTypeTranslator.getClassFromType(annotation.getAnnotationType()); + Class type = Utils.getJavaType(type_mirror); + if (Buffer.class.equals(type)) + continue; + validateType(method, annotation_type, type); + } + } + } + + private void validateParameters(MethodDeclaration method) { + for (ParameterDeclaration param : method.getParameters()) { + validateTypes(method, param.getAnnotationMirrors(), param.getType()); + Class param_type = Utils.getJavaType(param.getType()); + if (Utils.getNIOBufferType(param.getType()) != null && param_type != CharSequence.class && param_type != CharSequence[].class) { + Check parameter_check_annotation = param.getAnnotation(Check.class); + NullTerminated null_terminated_annotation = param.getAnnotation(NullTerminated.class); + if (parameter_check_annotation == null && null_terminated_annotation == null) { + boolean found_auto_size_param = false; + for (ParameterDeclaration inner_param : method.getParameters()) { + AutoSize auto_size_annotation = inner_param.getAnnotation(AutoSize.class); + if (auto_size_annotation != null && + auto_size_annotation.value().equals(param.getSimpleName())) { + found_auto_size_param = true; + break; + } + } + if (!found_auto_size_param + && param.getAnnotation(Result.class) == null + && param.getAnnotation(Constant.class) == null + && !Utils.isReturnParameter(method, param) + ) + throw new RuntimeException(param + " has no Check, Result nor Constant annotation, is not the return parameter and no other parameter has" + + " an @AutoSize annotation on it in method " + method); + } + if (param.getAnnotation(CachedReference.class) != null && param.getAnnotation(Result.class) != null) + throw new RuntimeException(param + " can't be annotated with both CachedReference and Result"); + if (param.getAnnotation(BufferObject.class) != null && param.getAnnotation(Result.class) != null) + throw new RuntimeException(param + " can't be annotated with both BufferObject and Result"); + //if (param.getAnnotation(Constant.class) != null) + //throw new RuntimeException("Buffer parameter " + param + " cannot be Constant"); + } else { + if (param.getAnnotation(BufferObject.class) != null) + throw new RuntimeException(param + " type is not a buffer, but annotated as a BufferObject"); + if (param.getAnnotation(CachedReference.class) != null) + throw new RuntimeException(param + " type is not a buffer, but annotated as a CachedReference"); + } + } + } + + private static void generateMethodsNativePointers(PrintWriter writer, Collection methods) { + for (MethodDeclaration method : methods) { + if ( method.getAnnotation(Alternate.class) == null ) + generateMethodNativePointers(writer, method); + } + } + + private static void generateMethodNativePointers(PrintWriter writer, MethodDeclaration method) { + if ( method.getAnnotation(Extern.class) == null ) + writer.print("static "); + writer.println(Utils.getTypedefName(method) + " " + method.getSimpleName() + ";"); + } + + private void generateJavaSource(InterfaceDeclaration d, PrintWriter java_writer) throws IOException { + java_writer.println("/* MACHINE GENERATED FILE, DO NOT EDIT */"); + java_writer.println(); + java_writer.println("package " + d.getPackage().getQualifiedName() + ";"); + java_writer.println(); + java_writer.println("import org.lwjgl.*;"); + java_writer.println("import java.nio.*;"); + Imports imports = d.getAnnotation(Imports.class); + if ( imports != null ) { + for ( String i : imports.value() ) + java_writer.println("import " + i + ";"); + } + java_writer.println(); + Utils.printDocComment(java_writer, d); + if ( d.getAnnotation(Private.class) == null ) + java_writer.print("public "); + boolean is_final = Utils.isFinal(d); + if (is_final) + java_writer.write("final "); + java_writer.print("class " + Utils.getSimpleClassName(d)); + Collection super_interfaces = d.getSuperinterfaces(); + if (super_interfaces.size() > 1) + throw new RuntimeException(d + " extends more than one interface"); + if (super_interfaces.size() == 1) { + InterfaceDeclaration super_interface = super_interfaces.iterator().next().getDeclaration(); + java_writer.print(" extends " + Utils.getSimpleClassName(super_interface)); + } + java_writer.println(" {"); + FieldsGenerator.generateFields(java_writer, d.getFields()); + java_writer.println(); + if (is_final) { + // Write private constructor to avoid instantiation + java_writer.println("\tprivate " + Utils.getSimpleClassName(d) + "() {}"); + } + if (d.getMethods().size() > 0 && !context_specific) { + java_writer.println(); + java_writer.println("\tstatic native void " + Utils.STUB_INITIALIZER_NAME + "() throws LWJGLException;"); + } + JavaMethodsGenerator.generateMethodsJava(env, type_map, java_writer, d, generate_error_checks, context_specific); + java_writer.println("}"); + java_writer.close(); + String qualified_interface_name = Utils.getQualifiedClassName(d); + env.getMessager().printNotice("Generated class " + qualified_interface_name); + } + + private void generateNativeSource(InterfaceDeclaration d) throws IOException { + String qualified_interface_name = Utils.getQualifiedClassName(d); + String qualified_native_name = Utils.getNativeQualifiedName(qualified_interface_name)+ ".c"; + PrintWriter native_writer = env.getFiler().createTextFile(Filer.Location.CLASS_TREE, "", new File(qualified_native_name), "UTF-8"); + native_writer.println("/* MACHINE GENERATED FILE, DO NOT EDIT */"); + native_writer.println(); + native_writer.println("#include "); + type_map.printNativeIncludes(native_writer); + native_writer.println(); + TypedefsGenerator.generateNativeTypedefs(type_map, native_writer, d.getMethods()); + native_writer.println(); + if (!context_specific) { + generateMethodsNativePointers(native_writer, d.getMethods()); + native_writer.println(); + } + NativeMethodStubsGenerator.generateNativeMethodStubs(env, type_map, native_writer, d, generate_error_checks, context_specific); + if (!context_specific) { + native_writer.print("JNIEXPORT void JNICALL " + Utils.getQualifiedNativeMethodName(qualified_interface_name, Utils.STUB_INITIALIZER_NAME)); + native_writer.println("(JNIEnv *env, jclass clazz) {"); + native_writer.println("\tJavaMethodAndExtFunction functions[] = {"); + RegisterStubsGenerator.generateMethodsNativeStubBind(native_writer, d, generate_error_checks, context_specific); + native_writer.println("\t};"); + native_writer.println("\tint num_functions = NUMFUNCTIONS(functions);"); + native_writer.print("\t"); + native_writer.print(type_map.getRegisterNativesFunctionName()); + native_writer.println("(env, clazz, num_functions, functions);"); + native_writer.println("}"); + } + native_writer.close(); + env.getMessager().printNotice("Generated C source " + qualified_interface_name); + } + + public void visitInterfaceDeclaration(InterfaceDeclaration d) { + final File input = d.getPosition().file(); + final File outputJava = new File(env.getOptions().get("-s") + '/' + d.getPackage().getQualifiedName().replace('.', '/'), Utils.getSimpleClassName(d) + ".java"); + + PrintWriter java_writer = null; + + try { + final Collection methods = d.getMethods(); + if ( methods.size() == 0 && d.getFields().size() == 0 ) + return; + + // Skip this class if the output exists and the input has not been modified. + if ( outputJava.exists() && Math.max(input.lastModified(), generatorLM) < outputJava.lastModified() ) + return; + + for ( final MethodDeclaration method : methods ) + validateMethod(method); + java_writer = env.getFiler().createTextFile(Filer.Location.SOURCE_TREE, d.getPackage().getQualifiedName(), new File(Utils.getSimpleClassName(d) + ".java"), null); + generateJavaSource(d, java_writer); + + if ( methods.size() > 0 ) { + boolean noNative = true; + for ( final MethodDeclaration method : methods ) { + Alternate alt_annotation = method.getAnnotation(Alternate.class); + if ( (alt_annotation == null || alt_annotation.nativeAlt()) && method.getAnnotation(Reuse.class) == null ) { + noNative = false; + break; + } + } + if ( noNative ) + return; + + final String outputPath = env.getOptions().get("-d") + '/' + Utils.getNativeQualifiedName(Utils.getQualifiedClassName(d)); + final File outputNative = new File(outputPath + ".c"); + final File outputBackup = new File(outputPath + "_backup.c"); + + // If the native file exists, rename. + final ByteBuffer nativeBefore; + if ( outputNative.exists() ) { + nativeBefore = readFile(outputNative); + outputNative.renameTo(outputBackup); + } else + nativeBefore = null; + + try { + generateNativeSource(d); + + // If the native file did exist, compare with the new file. If they're the same, + // reset the last modified time to avoid ridiculous C compilation times. + if ( nativeBefore != null && outputNative.length() == nativeBefore.capacity() ) { + final ByteBuffer nativeAfter = readFile(outputNative); + boolean same = true; + for ( int i = nativeBefore.position(); i < nativeBefore.limit(); i++ ) { + if ( nativeBefore.get(i) != nativeAfter.get(i) ) { + same = false; + break; + } + } + + if ( same ) { + outputNative.delete(); + outputBackup.renameTo(outputNative); + } + } + } finally { + if ( outputBackup.exists() ) + outputBackup.delete(); + } + } + } catch (Exception e) { + // If anything goes wrong mid-gen, delete output to allow regen next time we run. + if ( java_writer != null ) java_writer.close(); + if ( outputJava.exists() ) outputJava.delete(); + + throw new RuntimeException(e); + } + } + + private static ByteBuffer readFile(final File file) throws IOException { + final FileChannel channel = new FileInputStream(file).getChannel(); + + final long bytesTotal = channel.size(); + final ByteBuffer buffer = ByteBuffer.allocateDirect((int)bytesTotal); + + long bytesRead = 0; + do { + bytesRead += channel.read(buffer); + } while ( bytesRead < bytesTotal ); + buffer.flip(); + + channel.close(); + + return buffer; + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Helper.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Helper.java new file mode 100644 index 0000000..708c75d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Helper.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * Method parameters marked with @Helper will be considered Java-API + * parameters and will be ignored when generating native stubs/code. + * + * @author Spasi + */ +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@Target(ElementType.PARAMETER) +public @interface Helper { + boolean passToNative() default false; +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Imports.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Imports.java new file mode 100644 index 0000000..6a278ba --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Imports.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +/** + * This annotation can be used when an extension template needs + * extra imports in its generated class. + * + * @author Spasi + */ +@Target(ElementType.TYPE) +public @interface Imports { + String[] value(); +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Indirect.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Indirect.java new file mode 100644 index 0000000..6696e46 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Indirect.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * + * Implies that a parameter is indirect, and forces the native + * stub to use the indirection operator '&' on it. + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@Target(ElementType.PARAMETER) +public @interface Indirect { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/JNITypeTranslator.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/JNITypeTranslator.java new file mode 100644 index 0000000..2b8a54c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/JNITypeTranslator.java @@ -0,0 +1,151 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.util.generator; + +import org.lwjgl.PointerBuffer; + +import java.nio.Buffer; + +import com.sun.mirror.type.*; +import com.sun.mirror.util.*; + +/** + * + * A TypeVisitor that translates TypeMirrors to JNI + * type strings. + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +public class JNITypeTranslator implements TypeVisitor { + + private final StringBuilder signature = new StringBuilder(); + + private boolean objectReturn; + + public String getSignature() { + return signature.toString(); + } + + public String getReturnSignature() { + return objectReturn ? "jobject" : signature.toString(); + } + + public void visitAnnotationType(AnnotationType t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitArrayType(ArrayType t) { + final String className = t.getComponentType().toString(); + if ( "java.lang.CharSequence".equals(className) ) + signature.append("jlong"); + else if ( "java.nio.ByteBuffer".equals(className) ) + signature.append("jobjectArray"); + else if ( "org.lwjgl.opencl.CLMem".equals(className) ) + signature.append("jobjectArray"); + else + throw new RuntimeException(t + " is not allowed"); + } + + public void visitClassType(ClassType t) { + final Class type = Utils.getJavaType(t); + if ( Buffer.class.isAssignableFrom(type) || PointerBuffer.class.isAssignableFrom(type) ) { + signature.append("jlong"); + objectReturn = true; + } else + signature.append("jobject"); + } + + public void visitDeclaredType(DeclaredType t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitEnumType(EnumType t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitInterfaceType(InterfaceType t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitPrimitiveType(PrimitiveType t) { + String type; + switch (t.getKind()) { + case LONG: + type = "jlong"; + break; + case INT: + type = "jint"; + break; + case FLOAT: + type = "jfloat"; + break; + case SHORT: + type = "jshort"; + break; + case BYTE: + type = "jbyte"; + break; + case DOUBLE: + type = "jdouble"; + break; + case BOOLEAN: + type = "jboolean"; + break; + default: + throw new RuntimeException(t + " is not allowed"); + } + signature.append(type); + } + + public void visitReferenceType(ReferenceType t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitTypeMirror(TypeMirror t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitTypeVariable(TypeVariable t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitVoidType(VoidType t) { + signature.append(t.toString()); + } + + public void visitWildcardType(WildcardType t) { + throw new RuntimeException(t + " is not allowed"); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java new file mode 100644 index 0000000..c1231bf --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/JavaMethodsGenerator.java @@ -0,0 +1,738 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.util.generator; + +/** + * + * This class generates the methods in the generated java source files. + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import org.lwjgl.PointerBuffer; +import org.lwjgl.util.generator.opengl.GLreturn; + +import com.sun.mirror.apt.*; +import com.sun.mirror.declaration.*; +import com.sun.mirror.type.*; + +import java.io.*; +import java.util.*; +import java.nio.*; + +public class JavaMethodsGenerator { + private static final String SAVED_PARAMETER_POSTFIX = "_saved"; + + public static void generateMethodsJava(AnnotationProcessorEnvironment env, TypeMap type_map, PrintWriter writer, InterfaceDeclaration interface_decl, boolean generate_error_checks, boolean context_specific) { + for (MethodDeclaration method : interface_decl.getMethods()) + generateMethodJava(env, type_map, writer, interface_decl, method, generate_error_checks, context_specific); + } + + private static void generateMethodJava(AnnotationProcessorEnvironment env, TypeMap type_map, PrintWriter writer, InterfaceDeclaration interface_decl, MethodDeclaration method, boolean generate_error_checks, boolean context_specific) { + writer.println(); + if (Utils.isMethodIndirect(generate_error_checks, context_specific, method)) { + if (method.getAnnotation(GenerateAutos.class) != null) { + printMethodWithMultiType(env, type_map, writer, interface_decl, method, TypeInfo.getDefaultTypeInfoMap(method), Mode.AUTOS, generate_error_checks, context_specific); + } + Collection> cross_product = TypeInfo.getTypeInfoCrossProduct(type_map, method); + for (Map typeinfos_instance : cross_product) { + printMethodWithMultiType(env, type_map, writer, interface_decl, method, typeinfos_instance, Mode.NORMAL, generate_error_checks, context_specific); + } + } + if ( method.getAnnotation(CachedResult.class) != null && !method.getAnnotation(CachedResult.class).isRange() ) { + printMethodWithMultiType(env, type_map, writer, interface_decl, method, TypeInfo.getDefaultTypeInfoMap(method), Mode.CACHEDRESULT, generate_error_checks, context_specific); + } + + Reuse reuse_annotation = method.getAnnotation(Reuse.class); + Alternate alt_annotation = method.getAnnotation(Alternate.class); + if ( alt_annotation == null || (alt_annotation.nativeAlt() && !alt_annotation.skipNative()) ) { + if ( alt_annotation != null && method.getSimpleName().equals(alt_annotation.value()) ) + throw new RuntimeException("An alternate function with native code should have a different name than the main function."); + + if ( reuse_annotation == null ) + printJavaNativeStub(writer, method, Mode.NORMAL, generate_error_checks, context_specific); + + if (Utils.hasMethodBufferObjectParameter(method)) { + printMethodWithMultiType(env, type_map, writer, interface_decl, method, TypeInfo.getDefaultTypeInfoMap(method), Mode.BUFFEROBJECT, generate_error_checks, context_specific); + if ( reuse_annotation == null ) + printJavaNativeStub(writer, method, Mode.BUFFEROBJECT, generate_error_checks, context_specific); + } + } + } + + private static void printJavaNativeStub(PrintWriter writer, MethodDeclaration method, Mode mode, boolean generate_error_checks, boolean context_specific) { + if (Utils.isMethodIndirect(generate_error_checks, context_specific, method)) { + writer.print("\tstatic native "); + } else { + Utils.printDocComment(writer, method); + writer.print("\tpublic static native "); + } + writer.print(getResultType(method, true)); + writer.print(" " + Utils.getSimpleNativeMethodName(method, generate_error_checks, context_specific)); + if (mode == Mode.BUFFEROBJECT) + writer.print(Utils.BUFFER_OBJECT_METHOD_POSTFIX); + writer.print("("); + boolean first_parameter = generateParametersJava(writer, method, TypeInfo.getDefaultTypeInfoMap(method), true, true, mode); + if (context_specific) { + if (!first_parameter) + writer.print(", "); + writer.print("long " + Utils.FUNCTION_POINTER_VAR_NAME); + } + writer.println(");"); + } + + private static boolean generateParametersJava(PrintWriter writer, MethodDeclaration method, Map typeinfos_instance, boolean native_stub, final boolean printTypes, Mode mode) { + boolean first_parameter = true; + for (ParameterDeclaration param : method.getParameters()) { + if ( native_stub && (param.getAnnotation(Helper.class) != null && !param.getAnnotation(Helper.class).passToNative()) ) + continue; + final Constant constant_annotation = param.getAnnotation(Constant.class); + if ( constant_annotation != null && constant_annotation.isNative() ) + continue; + AnnotationMirror auto_annotation_mirror = Utils.getParameterAutoAnnotation(param); + boolean hide_auto_parameter = mode == Mode.NORMAL && !native_stub && auto_annotation_mirror != null; + if (hide_auto_parameter) { + AutoType auto_type_annotation = param.getAnnotation(AutoType.class); + if (auto_type_annotation != null) { + ParameterDeclaration auto_parameter = Utils.findParameter(method, auto_type_annotation.value()); + TypeInfo auto_param_type_info = typeinfos_instance.get(auto_parameter); + if (auto_param_type_info.getSignedness() == Signedness.BOTH) { + if (!first_parameter) + writer.print(", "); + first_parameter = false; + if ( printTypes ) + writer.print("boolean "); + writer.print(TypeInfo.UNSIGNED_PARAMETER_NAME); + } + } + } else if ( + param.getAnnotation(Result.class) == null + && (native_stub || ((param.getAnnotation(Constant.class) == null || param.getAnnotation(Constant.class).keepParam()) && !Utils.isReturnParameter(method, param))) + && (mode != Mode.AUTOS || getAutoTypeParameter(method, param) == null) + ) { + first_parameter = generateParameterJava(writer, param, typeinfos_instance.get(param), native_stub, printTypes, first_parameter, mode); + } + } + CachedResult cached_result_annotation = method.getAnnotation(CachedResult.class); + TypeMirror result_type = Utils.getMethodReturnType(method); + if ((native_stub && Utils.getNIOBufferType(result_type) != null) || Utils.needResultSize(method)) { + AutoSize auto_size_annotation = method.getAnnotation(AutoSize.class); + if ( auto_size_annotation == null || !auto_size_annotation.isNative() ) { + if (cached_result_annotation == null || !cached_result_annotation.isRange()) { + if (!first_parameter) + writer.print(", "); + first_parameter = false; + if ( printTypes ) + writer.print("long "); + writer.print(Utils.RESULT_SIZE_NAME); + } + } + } + if (cached_result_annotation != null) { + if (!first_parameter) + writer.print(", "); + + if ( mode == Mode.CACHEDRESULT ) { + if ( printTypes ) + writer.print("long "); + writer.print(Utils.CACHED_BUFFER_LENGTH_NAME + ", "); + } + + first_parameter = false; + if ( printTypes ) + writer.print(getResultType(method, native_stub)); + writer.print(" " + Utils.CACHED_BUFFER_NAME); + } + return first_parameter; + } + + private static boolean generateParameterJava(PrintWriter writer, ParameterDeclaration param, TypeInfo type_info, boolean native_stub, final boolean printTypes, boolean first_parameter, Mode mode) { + Class buffer_type = Utils.getNIOBufferType(param.getType()); + if (!first_parameter) + writer.print(", "); + BufferObject bo_annotation = param.getAnnotation(BufferObject.class); + if (bo_annotation != null && mode == Mode.BUFFEROBJECT) { + if (buffer_type == null) + throw new RuntimeException("type of " + param + " is not a nio Buffer parameter but is annotated as buffer object"); + if ( printTypes ) + writer.print("long "); + writer.print(param.getSimpleName() + Utils.BUFFER_OBJECT_PARAMETER_POSTFIX); + } else { + if ( native_stub && param.getAnnotation(PointerWrapper.class) != null ) + writer.print("long "); + else { + Class type = type_info.getType(); + if ( native_stub && (type == CharSequence.class || type == CharSequence[].class || type == PointerBuffer.class || Buffer.class.isAssignableFrom(type) ) ) + writer.print("long "); + else if ( printTypes ) + writer.print(type_info.getType().getSimpleName() + " "); + } + AutoSize auto_size_annotation = param.getAnnotation(AutoSize.class); + if ( auto_size_annotation != null ) + writer.print(auto_size_annotation.value() + "_"); + writer.print(param.getSimpleName()); + } + return false; + } + + private static void printBufferObjectCheck(PrintWriter writer, BufferKind kind, Mode mode, boolean context_specific) { + String bo_check_method_name = kind.toString(); + writer.print("\t\t" + Utils.CHECKS_CLASS_NAME + ".ensure" + bo_check_method_name); + if (mode == Mode.BUFFEROBJECT) + writer.print("enabled"); + else + writer.print("disabled"); + + if ( context_specific ) + writer.println("(caps);"); + else + writer.println("();"); + } + + private static void printBufferObjectChecks(PrintWriter writer, MethodDeclaration method, Mode mode, boolean context_specific) { + EnumSet check_set = EnumSet.noneOf(BufferKind.class); + for (ParameterDeclaration param : method.getParameters()) { + BufferObject bo_annotation = param.getAnnotation(BufferObject.class); + if (bo_annotation != null) + check_set.add(bo_annotation.value()); + } + for (BufferKind kind : check_set) + printBufferObjectCheck(writer, kind, mode, context_specific); + } + + private static void printMethodWithMultiType(AnnotationProcessorEnvironment env, TypeMap type_map, PrintWriter writer, InterfaceDeclaration interface_decl, MethodDeclaration method, Map typeinfos_instance, Mode mode, boolean generate_error_checks, boolean context_specific) { + Utils.printDocComment(writer, method); + if ( method.getAnnotation(Deprecated.class) != null ) + writer.println("\t@Deprecated"); + if ( interface_decl.getAnnotation(Private.class) == null && method.getAnnotation(Private.class) == null ) + writer.print("\tpublic static "); + else + writer.print("\tstatic "); + writer.print(getResultType(method, false)); + StripPostfix strip_annotation = method.getAnnotation(StripPostfix.class); + String method_name; + Alternate alt_annotation = method.getAnnotation(Alternate.class); + method_name = alt_annotation == null || alt_annotation.javaAlt() ? method.getSimpleName() : alt_annotation.value(); + if (strip_annotation != null && mode == Mode.NORMAL) + method_name = getPostfixStrippedName(type_map, interface_decl, method); + writer.print(" " + method_name + "("); + generateParametersJava(writer, method, typeinfos_instance, false, true, mode); + writer.println(") {"); + + final TypeMirror result_type = Utils.getMethodReturnType(method); + boolean has_result = !result_type.equals(env.getTypeUtils().getVoidType()); + + final Reuse reuse_annotation = method.getAnnotation(Reuse.class); + if ( reuse_annotation != null ) { + writer.print("\t\t"); + if ( has_result || method.getAnnotation(GLreturn.class) != null ) + writer.print("return "); + + writer.print(reuse_annotation.value() + "." + (reuse_annotation.method().length() > 0 ? reuse_annotation.method() : method_name) + "("); + generateParametersJava(writer, method, typeinfos_instance, false, false, mode); + writer.println(");\n\t}"); + return; + } + + if (context_specific) { + type_map.printCapabilitiesInit(writer); + writer.print("\t\tlong " + Utils.FUNCTION_POINTER_VAR_NAME + " = " + type_map.getCapabilities() + "."); + writer.println(Utils.getFunctionAddressName(interface_decl, method, true) + ";"); + writer.print("\t\tBufferChecks.checkFunctionAddress("); + writer.println(Utils.FUNCTION_POINTER_VAR_NAME + ");"); + } + final Code code_annotation = method.getAnnotation(Code.class); + if (code_annotation != null && code_annotation.value().length() > 0) + writer.println(code_annotation.value()); + printBufferObjectChecks(writer, method, mode, context_specific); + printParameterChecks(writer, method, typeinfos_instance, mode, generate_error_checks); + printParameterCaching(writer, interface_decl, method, mode, context_specific); + + if ( code_annotation != null && code_annotation.javaBeforeNative().length() > 0 ) + writer.println(code_annotation.javaBeforeNative()); + writer.print("\t\t"); + + final PointerWrapper pointer_wrapper_annotation = method.getAnnotation(PointerWrapper.class); + if (has_result) { + writer.print(getResultType(method, false) + " " + Utils.RESULT_VAR_NAME); + + if ( code_annotation != null && code_annotation.tryBlock() ) { + writer.print(" = " + getDefaultResultValue(method)); + writer.println(";\n\t\ttry {"); + writer.print("\t\t\t" + Utils.RESULT_VAR_NAME); + } + + writer.print(" = "); + if ( pointer_wrapper_annotation != null ) { + if ( pointer_wrapper_annotation.factory().length() > 0 ) + writer.print(pointer_wrapper_annotation.factory() + "("); + else + writer.print("new " + getResultType(method, false) + "("); + } + } else if ( method.getAnnotation(GLreturn.class) != null ) { + has_result = true; + Utils.printGLReturnPre(writer, method, method.getAnnotation(GLreturn.class), type_map); + } + writer.print(Utils.getSimpleNativeMethodName(method, generate_error_checks, context_specific)); + if (mode == Mode.BUFFEROBJECT) + writer.print(Utils.BUFFER_OBJECT_METHOD_POSTFIX); + writer.print("("); + boolean first_parameter = printMethodCallArguments(writer, method, typeinfos_instance, mode, type_map); + if (context_specific) { + if (!first_parameter) + writer.print(", "); + writer.print(Utils.FUNCTION_POINTER_VAR_NAME); + } + if ( has_result && pointer_wrapper_annotation != null ) { + writer.print(")"); + if ( pointer_wrapper_annotation.params().length() > 0 ) + writer.print(", " + pointer_wrapper_annotation.params()); + } + writer.println(");"); + + if ( code_annotation != null && code_annotation.javaAfterNative().length() > 0 ) + writer.println(code_annotation.javaAfterNative()); + + final String tabs = code_annotation != null && code_annotation.tryBlock() ? "\t\t\t" : "\t\t"; + if (generate_error_checks && method.getAnnotation(NoErrorCheck.class) == null) + type_map.printErrorCheckMethod(writer, method, tabs); + // DISABLED: indirect buffer support + //printNondirectParameterCopies(writer, method, mode); + if (has_result) { + if ( method.getAnnotation(GLreturn.class) == null ) { + if ( ByteBuffer.class.equals(Utils.getJavaType(result_type)) ) + writer.println(tabs + "return LWJGLUtil.CHECKS && " + Utils.RESULT_VAR_NAME + " == null ? null : " + Utils.RESULT_VAR_NAME + ".order(ByteOrder.nativeOrder());"); // safeNewBuffer returns a direct ByteBuffer with BIG_ENDIAN order. + else + writer.println(tabs + "return " + Utils.RESULT_VAR_NAME + ";"); + } else + Utils.printGLReturnPost(writer, method, method.getAnnotation(GLreturn.class), type_map); + } + + if ( code_annotation != null && code_annotation.tryBlock() ) { + writer.println("\t\t} finally {"); + writer.println(code_annotation.javaFinally()); + writer.println("\t\t}"); + } + writer.println("\t}"); + } + + private static String getExtensionPostfix(InterfaceDeclaration interface_decl) { + String interface_simple_name = interface_decl.getSimpleName(); + Extension extension_annotation = interface_decl.getAnnotation(Extension.class); + if (extension_annotation == null) { + int underscore_index = interface_simple_name.indexOf("_"); + if (underscore_index != -1) + return interface_simple_name.substring(0, underscore_index); + else + return ""; + } else + return extension_annotation.postfix(); + } + + private static ParameterDeclaration getAutoTypeParameter(MethodDeclaration method, ParameterDeclaration target_parameter) { + for (ParameterDeclaration param : method.getParameters()) { + AnnotationMirror auto_annotation = Utils.getParameterAutoAnnotation(param); + if (auto_annotation != null) { + Class annotation_type = NativeTypeTranslator.getClassFromType(auto_annotation.getAnnotationType()); + String parameter_name; + if (annotation_type.equals(AutoType.class)) + parameter_name = param.getAnnotation(AutoType.class).value(); + else if (annotation_type.equals(AutoSize.class)) + parameter_name = param.getAnnotation(AutoSize.class).value(); + else + throw new RuntimeException("Unknown annotation type " + annotation_type); + if (target_parameter.getSimpleName().equals(parameter_name)) + return param; + } + } + return null; + } + + private static boolean hasAnyParameterAutoTypeAnnotation(MethodDeclaration method, ParameterDeclaration target_param) { + for (ParameterDeclaration param : method.getParameters()) { + AutoType auto_type_annotation = param.getAnnotation(AutoType.class); + if (auto_type_annotation != null) { + ParameterDeclaration type_target_param = Utils.findParameter(method, auto_type_annotation.value()); + if (target_param.equals(type_target_param)) + return true; + } + } + return false; + } + + private static String getPostfixStrippedName(TypeMap type_map, InterfaceDeclaration interface_decl, MethodDeclaration method) { + StripPostfix strip_annotation = method.getAnnotation(StripPostfix.class); + ParameterDeclaration postfix_parameter = Utils.findParameter(method, strip_annotation.value()); + String postfix = strip_annotation.postfix(); + if ( "NULL".equals(postfix) ) { + PostfixTranslator translator = new PostfixTranslator(type_map, postfix_parameter); + postfix_parameter.getType().accept(translator); + postfix = translator.getSignature(); + } + String method_name; + Alternate alt_annotation = method.getAnnotation(Alternate.class); + method_name = alt_annotation == null || alt_annotation.javaAlt() ? method.getSimpleName() : alt_annotation.value(); + + String extension_postfix = "NULL".equals(strip_annotation.extension()) ? getExtensionPostfix(interface_decl) : strip_annotation.extension(); + String result; + + if ( strip_annotation.hasPostfix() && method_name.endsWith(postfix + "v" + extension_postfix)) + result = method_name.substring(0, method_name.length() - (postfix.length() + 1 + extension_postfix.length())); + else if ( strip_annotation.hasPostfix() && method_name.endsWith(postfix + extension_postfix)) + result = method_name.substring(0, method_name.length() - (postfix.length() + extension_postfix.length())); + else if ( strip_annotation.hasPostfix() && method_name.endsWith(postfix + "i_v" + extension_postfix) ) + result = method_name.substring(0, method_name.length() - (postfix.length() + 3 + extension_postfix.length())); + else if ( method_name.endsWith("i_v" + extension_postfix) ) + result = method_name.substring(0, method_name.length() - (3 + extension_postfix.length())); + else if (method_name.endsWith("v" + extension_postfix)) + result = method_name.substring(0, method_name.length() - (1 + extension_postfix.length())); + else + throw new RuntimeException(method + " is specified as being postfix stripped on parameter " + postfix_parameter + ", but it's postfix is not '" + postfix + "' nor 'v'"); + + return result + extension_postfix; + } + + private static int getBufferElementSizeExponent(Class c) { + if (IntBuffer.class.equals(c)) + return 2; + else if (LongBuffer.class.equals(c)) + return 3; + else if (DoubleBuffer.class.equals(c)) + return 3; + else if (ShortBuffer.class.equals(c)) + return 1; + else if (ByteBuffer.class.equals(c)) + return 0; + else if (FloatBuffer.class.equals(c)) + return 2; + else + throw new RuntimeException(c + " is not allowed"); + } + + private static boolean printMethodCallArgument(PrintWriter writer, MethodDeclaration method, ParameterDeclaration param, Map typeinfos_instance, Mode mode, boolean first_parameter, TypeMap type_map) { + if (!first_parameter) + writer.print(", "); + + AnnotationMirror auto_annotation = Utils.getParameterAutoAnnotation(param); + Constant constant_annotation = param.getAnnotation(Constant.class); + if (constant_annotation != null) { + writer.print(constant_annotation.value()); + } else if (auto_annotation != null && mode == Mode.NORMAL) { + Class param_type = NativeTypeTranslator.getClassFromType(auto_annotation.getAnnotationType()); + if (AutoType.class.equals(param_type)) { + final AutoType auto_type_annotation = param.getAnnotation(AutoType.class); + final ParameterDeclaration auto_parameter = Utils.findParameter(method, auto_type_annotation.value()); + final String auto_type = typeinfos_instance.get(auto_parameter).getAutoType(); + if ( auto_type == null ) + throw new RuntimeException("No auto type for parameter " + param.getSimpleName() + " in method " + method); + writer.print(auto_type); + } else if (AutoSize.class.equals(param_type)) { + final AutoSize auto_size_annotation = param.getAnnotation(AutoSize.class); + if ( !auto_size_annotation.useExpression() ) { + final String auto_parameter_name = auto_size_annotation.value(); + final ParameterDeclaration auto_target_param = Utils.findParameter(method, auto_parameter_name); + final TypeInfo auto_target_type_info = typeinfos_instance.get(auto_target_param); + final boolean shift_remaining = !hasAnyParameterAutoTypeAnnotation(method, auto_target_param) && Utils.isParameterMultiTyped(auto_target_param); + int shifting = 0; + if ( shift_remaining ) { + shifting = getBufferElementSizeExponent(auto_target_type_info.getType()); + if ( shifting > 0 ) + writer.print("("); + } + if ( auto_size_annotation.canBeNull() ) + writer.print("(" + auto_parameter_name + " == null ? 0 : " + auto_parameter_name + ".remaining())"); + else + writer.print(auto_parameter_name + ".remaining()"); + // Shift the remaining if the target parameter is multityped and there's no AutoType to track type + if (shift_remaining && shifting > 0) { + writer.print(" << " + shifting); + writer.print(")"); + } + } + writer.print(auto_size_annotation.expression()); + } else + throw new RuntimeException("Unknown auto annotation " + param_type); + } else { + if (mode == Mode.BUFFEROBJECT && param.getAnnotation(BufferObject.class) != null) { + writer.print(param.getSimpleName() + Utils.BUFFER_OBJECT_PARAMETER_POSTFIX); + } else { + Class type = typeinfos_instance.get(param).getType(); + Check check_annotation = param.getAnnotation(Check.class); + boolean hide_buffer = mode == Mode.AUTOS && getAutoTypeParameter(method, param) != null; + if (hide_buffer) { + writer.print("0L"); + } else { + if ( type == CharSequence.class || type == CharSequence[].class ) { + final String offset = Utils.getStringOffset(method, param); + + writer.print("APIUtil.getBuffer"); + if ( param.getAnnotation(NullTerminated.class) != null ) + writer.print("NT"); + writer.print('('); + writer.print(type_map.getAPIUtilParam(true)); + writer.print(param.getSimpleName()); + if ( offset != null ) + writer.print(", " + offset); + writer.print(")"); + } else { + final AutoSize auto_size_annotation = param.getAnnotation(AutoSize.class); + if ( auto_size_annotation != null ) + writer.print(auto_size_annotation.value() + "_"); + + final Class buffer_type = Utils.getNIOBufferType(param.getType()); + if ( buffer_type == null ) + writer.print(param.getSimpleName()); + else { + writer.print("MemoryUtil.getAddress"); + if ( check_annotation != null && check_annotation.canBeNull() ) + writer.print("Safe"); + writer.print("("); + writer.print(param.getSimpleName()); + writer.print(")"); + } + } + } + if ( type != long.class ) { + PointerWrapper pointer_annotation = param.getAnnotation(PointerWrapper.class); + if ( pointer_annotation != null ) { + if ( pointer_annotation.canBeNull() ) + writer.print(" == null ? 0 : " + param.getSimpleName()); + writer.print(".getPointer()"); + } + } + } + } + return false; + } + + private static boolean printMethodCallArguments(PrintWriter writer, MethodDeclaration method, Map typeinfos_instance, Mode mode, TypeMap type_map) { + boolean first_parameter = true; + for ( ParameterDeclaration param : method.getParameters() ) { + if ( param.getAnnotation(Result.class) != null || (param.getAnnotation(Helper.class) != null && !param.getAnnotation(Helper.class).passToNative()) ) + continue; + + final Constant constant_annotation = param.getAnnotation(Constant.class); + if ( constant_annotation== null || !constant_annotation.isNative() ) + first_parameter = printMethodCallArgument(writer, method, param, typeinfos_instance, mode, first_parameter, type_map); + } + if (Utils.getNIOBufferType(Utils.getMethodReturnType(method)) != null) { + if (method.getAnnotation(CachedResult.class) != null && method.getAnnotation(CachedResult.class).isRange()) { + first_parameter = false; + Utils.printExtraCallArguments(writer, method, ""); + } else { + AutoSize auto_size_annotation = method.getAnnotation(AutoSize.class); + if ( auto_size_annotation == null || !auto_size_annotation.isNative() ) { + if (!first_parameter) + writer.print(", "); + first_parameter = false; + + String result_size_expression; + if ( mode == Mode.CACHEDRESULT ) + result_size_expression = Utils.CACHED_BUFFER_LENGTH_NAME; + else if ( auto_size_annotation == null ) + result_size_expression = Utils.RESULT_SIZE_NAME; + else + result_size_expression = auto_size_annotation.value(); + + Utils.printExtraCallArguments(writer, method, result_size_expression); + } + } + } + return first_parameter; + } + + private static void printParameterCaching(PrintWriter writer, InterfaceDeclaration interface_decl, MethodDeclaration method, Mode mode, boolean context_specific) { + for (ParameterDeclaration param : method.getParameters()) { + Class java_type = Utils.getJavaType(param.getType()); + CachedReference cachedReference = param.getAnnotation(CachedReference.class); + if (Buffer.class.isAssignableFrom(java_type) && + cachedReference != null && + (mode != Mode.BUFFEROBJECT || param.getAnnotation(BufferObject.class) == null) && + param.getAnnotation(Result.class) == null) { + writer.print("\t\tif ( LWJGLUtil.CHECKS ) StateTracker."); + if ( context_specific ) + writer.print("getReferences(caps)."); + else + writer.print("getTracker()."); + if(cachedReference.name().length() > 0) { + writer.print(cachedReference.name()); + } else { + writer.print(Utils.getReferenceName(interface_decl, method, param)); + } + if(cachedReference.index().length() > 0) { + writer.print("[" + cachedReference.index() + "]"); + } + writer.println(" = " + param.getSimpleName() + ";"); + } + } + } + + private static void printParameterChecks(PrintWriter writer, MethodDeclaration method, Map typeinfos, Mode mode, final boolean generate_error_checks) { + if ( mode == Mode.NORMAL ) { + final GenerateAutos gen_autos_annotation = method.getAnnotation(GenerateAutos.class); + if ( gen_autos_annotation != null && gen_autos_annotation.sizeVariables().length > 0 ) { + // For the auto-generated parameters, declare and init a size variable (that can be reused by @Code) + for ( final ParameterDeclaration param : method.getParameters() ) { + if ( Arrays.binarySearch(gen_autos_annotation.sizeVariables(), param.getSimpleName()) >= 0 ) { + final int shifting = getBufferElementSizeExponent(typeinfos.get(param).getType()); + final Check check_annotation = param.getAnnotation(Check.class); + + writer.print("\t\tlong " + param.getSimpleName() + "_size = "); + if ( check_annotation == null || !check_annotation.canBeNull() ) + writer.println(param.getSimpleName() + ".remaining() << " + shifting + ";"); + else + writer.println(param.getSimpleName() + " == null ? 0 : " + param.getSimpleName() + ".remaining() << " + shifting + ";"); + } + } + } + } + + for (ParameterDeclaration param : method.getParameters()) { + Class java_type = Utils.getJavaType(param.getType()); + if ( java_type.isArray() || (Utils.isAddressableType(java_type) && + (mode != Mode.BUFFEROBJECT || param.getAnnotation(BufferObject.class) == null) && + (mode != Mode.AUTOS || getAutoTypeParameter(method, param) == null) && + param.getAnnotation(Result.class) == null && + !Utils.isReturnParameter(method, param)) ) { + String check_value = null; + boolean can_be_null = false; + Check check_annotation = param.getAnnotation(Check.class); + if (check_annotation != null) { + check_value = check_annotation.value(); + can_be_null = check_annotation.canBeNull(); + } + if ((Buffer.class.isAssignableFrom(java_type) || PointerBuffer.class.isAssignableFrom(java_type)) && param.getAnnotation(Constant.class) == null) { + boolean out_parameter = param.getAnnotation(OutParameter.class) != null; + TypeInfo typeinfo = typeinfos.get(param); + printParameterCheck(writer, method, param.getSimpleName(), typeinfo.getType().getSimpleName(), check_value, can_be_null, param.getAnnotation(NullTerminated.class), out_parameter, generate_error_checks); + } else if ( String.class.equals(java_type)) { + if (!can_be_null) + writer.println("\t\tBufferChecks.checkNotNull(" + param.getSimpleName() + ");"); + } else if ( java_type.isArray() ) { + final TypeInfo typeinfo = typeinfos.get(param); + printArrayParameterCheck(writer, param.getSimpleName(), typeinfo.getType().getSimpleName(), check_value, can_be_null); + } + } + } + if (method.getAnnotation(CachedResult.class) != null) + printParameterCheck(writer, method, Utils.CACHED_BUFFER_NAME, null, null, true, null, false, generate_error_checks); + } + + private static void printParameterCheck(PrintWriter writer, MethodDeclaration method, String name, String type, String check_value, boolean can_be_null, NullTerminated null_terminated, boolean out_parameter, boolean generate_error_checks) { + String tabs; + if (can_be_null) { + writer.print("\t\tif (" + name + " != null)"); + if ( null_terminated != null ) + writer.println(" {"); + else + writer.println(); + tabs = "\t\t\t"; + } else + tabs = "\t\t"; + writer.print(tabs + "BufferChecks.check"); + if (check_value != null && check_value.length() > 0) { + writer.print("Buffer"); + if ( "Buffer".equals(type) ) + writer.print("Size"); // Check size only, Buffer.isDirect() was added in 1.6, cannot use yet. TODO: Remove? + writer.print("(" + name + ", " + check_value); + } else { + writer.print("Direct(" + name); + } + writer.println(");"); + if ( can_be_null && generate_error_checks ) { + final Check check_annotation = method.getAnnotation(Check.class); + if ( check_annotation != null && check_annotation.value().equals(name) ) { + writer.println("\t\telse"); + writer.println("\t\t\t" + name + " = APIUtil.getBufferIntDebug();"); // Use an exclusive buffer here + } + } + if (null_terminated != null) { + writer.print(tabs + "BufferChecks.checkNullTerminated("); + writer.print(name); + if ( null_terminated.value().length() > 0 ) { + writer.print(", "); + writer.print(null_terminated.value()); + } + writer.println(");"); + if ( can_be_null ) + writer.println("\t\t}"); + } + } + + private static void printArrayParameterCheck(PrintWriter writer, String name, String type, String check_value, boolean can_be_null) { + String tabs; + if ( can_be_null ) { + writer.println("\t\tif (" + name + " != null)"); + tabs = "\t\t\t"; + } else + tabs = "\t\t"; + + writer.print(tabs + "BufferChecks.checkArray(" + name); + if ( check_value != null && check_value.length() > 0) + writer.print(", " + check_value); + writer.println(");"); + } + + private static String getResultType(MethodDeclaration method, boolean native_stub) { + if ( native_stub && method.getAnnotation(PointerWrapper.class) != null ) + return "long"; + else if ( !native_stub && method.getAnnotation(GLreturn.class) != null ) + return Utils.getMethodReturnType(method, method.getAnnotation(GLreturn.class), false); + else + return Utils.getJavaType(Utils.getMethodReturnType(method)).getSimpleName(); + } + + private static String getDefaultResultValue(MethodDeclaration method) { + if ( method.getAnnotation(GLreturn.class) != null ) { + final String type = Utils.getMethodReturnType(method, method.getAnnotation(GLreturn.class), false); + if ( "boolean".equals(type) ) + return "false"; + else if ( Character.isLowerCase(type.charAt(0)) ) + return "0"; + else + return "null"; + } else { + final Class type = Utils.getJavaType(Utils.getMethodReturnType(method)); + if ( type.isPrimitive() ) { + if ( type == boolean.class ) + return "false"; + else + return "0"; + } else + return "null"; + } + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/JavaTypeTranslator.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/JavaTypeTranslator.java new file mode 100644 index 0000000..a170461 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/JavaTypeTranslator.java @@ -0,0 +1,160 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.util.generator; + +import org.lwjgl.opencl.CLMem; + +import java.nio.ByteBuffer; + +import com.sun.mirror.type.*; +import com.sun.mirror.util.*; + +/** + * A TypeVisitor that translates (annotated) TypeMirrors to + * java types (represented by a Class) + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ +public class JavaTypeTranslator implements TypeVisitor { + private Class type; + + public Class getType() { + return type; + } + + public void visitAnnotationType(AnnotationType t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitArrayType(ArrayType t) { + final TypeMirror componentType = t.getComponentType(); + if ( componentType instanceof PrimitiveType ) { + type = getPrimitiveArrayClassFromKind(((PrimitiveType)componentType).getKind()); + } else { + try { + final Class c = Class.forName(t.getComponentType().toString()); + if ( CharSequence.class.isAssignableFrom(c) || ByteBuffer.class.isAssignableFrom(c) || org.lwjgl.PointerWrapper.class.isAssignableFrom(c) ) + type = Class.forName("[L" + t.getComponentType() + ";"); + else { + throw new RuntimeException(t + " is not allowed"); + } + } catch (ClassNotFoundException e) { + throw new RuntimeException(e); + } + } + } + + public static Class getPrimitiveClassFromKind(PrimitiveType.Kind kind) { + switch ( kind ) { + case LONG: + return long.class; + case INT: + return int.class; + case DOUBLE: + return double.class; + case FLOAT: + return float.class; + case SHORT: + return short.class; + case BYTE: + return byte.class; + case BOOLEAN: + return boolean.class; + default: + throw new RuntimeException(kind + " is not allowed"); + } + } + + private static Class getPrimitiveArrayClassFromKind(PrimitiveType.Kind kind) { + switch ( kind ) { + case LONG: + return long[].class; + case INT: + return int[].class; + case DOUBLE: + return double[].class; + case FLOAT: + return float[].class; + case SHORT: + return short[].class; + case BYTE: + return byte[].class; + case BOOLEAN: + return boolean[].class; + default: + throw new RuntimeException(kind + " is not allowed"); + } + } + + public void visitPrimitiveType(PrimitiveType t) { + type = getPrimitiveClassFromKind(t.getKind()); + } + + public void visitDeclaredType(DeclaredType t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitEnumType(EnumType t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitClassType(ClassType t) { + type = NativeTypeTranslator.getClassFromType(t); + } + + public void visitInterfaceType(InterfaceType t) { + type = NativeTypeTranslator.getClassFromType(t); + } + + public void visitReferenceType(ReferenceType t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitTypeMirror(TypeMirror t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitTypeVariable(TypeVariable t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitVoidType(VoidType t) { + type = void.class; + } + + public void visitWildcardType(WildcardType t) { + throw new RuntimeException(t + " is not allowed"); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Mode.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Mode.java new file mode 100644 index 0000000..ffb6aa9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Mode.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +public enum Mode { + BUFFEROBJECT, + AUTOS, + CACHEDRESULT, // Used for generating a CachedResult method with an explicit length argument. + NORMAL +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java new file mode 100644 index 0000000..f69dbfe --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/NativeMethodStubsGenerator.java @@ -0,0 +1,412 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.util.generator; + +/** + * + * This class generates the functions in the native source files. + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import org.lwjgl.PointerBuffer; + +import com.sun.mirror.apt.*; +import com.sun.mirror.declaration.*; +import com.sun.mirror.type.*; + +import java.io.*; +import java.util.*; +import java.nio.*; + +public class NativeMethodStubsGenerator { + private static final String BUFFER_ADDRESS_POSTFIX = "_address"; + public static final String BUFFER_POSITION_POSTFIX = "_position"; + private static final String STRING_LIST_NAME = "_str"; + private static final String POINTER_LIST_NAME = "_ptr"; + + public static void generateNativeMethodStubs(AnnotationProcessorEnvironment env, TypeMap type_map, PrintWriter writer, InterfaceDeclaration d, boolean generate_error_checks, boolean context_specific) { + for (MethodDeclaration method : d.getMethods()) { + Alternate alt_annotation = method.getAnnotation(Alternate.class); + if ( (alt_annotation != null && (!alt_annotation.nativeAlt() || alt_annotation.skipNative())) || method.getAnnotation(Reuse.class) != null ) + continue; + generateMethodStub(env, type_map, writer, Utils.getQualifiedClassName(d), method, Mode.NORMAL, generate_error_checks, context_specific); + if (Utils.hasMethodBufferObjectParameter(method)) + generateMethodStub(env, type_map, writer, Utils.getQualifiedClassName(d), method, Mode.BUFFEROBJECT, generate_error_checks, context_specific); + } + } + + private static void generateParameters(PrintWriter writer, Collection params, Mode mode) { + for (ParameterDeclaration param : params) { + if ( param.getAnnotation(Result.class) != null || (param.getAnnotation(Helper.class) != null && !param.getAnnotation(Helper.class).passToNative()) ) + continue; + final Constant constant_annotation = param.getAnnotation(Constant.class); + if ( constant_annotation == null || !constant_annotation.isNative() ) + generateParameter(writer, param, mode); + } + } + + private static void generateParameter(PrintWriter writer, ParameterDeclaration param, Mode mode) { + writer.print(", "); + if (mode == Mode.BUFFEROBJECT && param.getAnnotation(BufferObject.class) != null) { + writer.print("jlong " + param.getSimpleName() + Utils.BUFFER_OBJECT_PARAMETER_POSTFIX); + } else if ( param.getAnnotation(PointerWrapper.class) != null ) { + writer.print("jlong " + param.getSimpleName()); + } else { + JNITypeTranslator translator = new JNITypeTranslator(); + param.getType().accept(translator); + writer.print(translator.getSignature() + " " + param.getSimpleName()); + } + } + + private static void generateMethodStub(AnnotationProcessorEnvironment env, TypeMap type_map, PrintWriter writer, String interface_name, MethodDeclaration method, Mode mode, boolean generate_error_checks, boolean context_specific) { + if ( !context_specific && method.getAnnotation(Alternate.class) == null ) + writer.print("static "); + else + writer.print("JNIEXPORT "); + + final TypeMirror result_type = Utils.getMethodReturnType(method); + final CachedResult cached_result_annotation = method.getAnnotation(CachedResult.class); + final AutoSize auto_size_annotation = method.getAnnotation(AutoSize.class); + + if ( method.getAnnotation(PointerWrapper.class) != null ) { + writer.print("jlong"); + } else { + JNITypeTranslator translator = new JNITypeTranslator(); + result_type.accept(translator); + writer.print(translator.getReturnSignature()); + } + writer.print(" JNICALL "); + + writer.print(Utils.getQualifiedNativeMethodName(interface_name, method, generate_error_checks, context_specific)); + if (mode == Mode.BUFFEROBJECT) + writer.print(Utils.BUFFER_OBJECT_METHOD_POSTFIX); + writer.print("(JNIEnv *env, jclass clazz"); + generateParameters(writer, method.getParameters(), mode); + if (Utils.getNIOBufferType(result_type) != null) { + if ( (cached_result_annotation == null || !cached_result_annotation.isRange()) && (auto_size_annotation == null || !auto_size_annotation.isNative()) ) + writer.print(", jlong " + Utils.RESULT_SIZE_NAME); + if (cached_result_annotation != null) + writer.print(", jobject " + Utils.CACHED_BUFFER_NAME); + } + if (context_specific) { + writer.print(", jlong " + Utils.FUNCTION_POINTER_VAR_NAME); + } + writer.println(") {"); + + generateBufferParameterAddresses(type_map, writer, method, mode); + Alternate alt_annotation = method.getAnnotation(Alternate.class); + if (context_specific) { + String typedef_name = Utils.getTypedefName(method); + writer.print("\t" + typedef_name + " " + (alt_annotation == null ? method.getSimpleName() : alt_annotation.value())); + writer.print(" = (" + typedef_name + ")((intptr_t)"); + writer.println(Utils.FUNCTION_POINTER_VAR_NAME + ");"); + } + + final Code code_annotation = method.getAnnotation(Code.class); + + final boolean hasResult = !result_type.equals(env.getTypeUtils().getVoidType()); + final boolean resultPreDeclare = hasResult && (hasPointerArrayInits(method.getParameters()) || (code_annotation != null && (code_annotation.nativeAfterVars().length() > 0 || code_annotation.nativeBeforeCall().length() > 0))); + if ( resultPreDeclare ) + printResultParam(type_map, writer, method, result_type, true); + + if ( code_annotation != null && code_annotation.nativeAfterVars().length() > 0 ) + writer.println(code_annotation.nativeAfterVars()); + + generatePointerArrayInits(type_map, writer, method.getParameters()); + + if ( code_annotation != null && code_annotation.nativeBeforeCall().length() > 0 ) + writer.println(code_annotation.nativeBeforeCall()); + + writer.print("\t"); + if ( resultPreDeclare ) + writer.print(Utils.RESULT_VAR_NAME + " = "); + else if ( hasResult ) + printResultParam(type_map, writer, method, result_type, false); + writer.print((alt_annotation == null ? method.getSimpleName() : alt_annotation.value()) + "("); + generateCallParameters(writer, type_map, method.getParameters()); + writer.print(")"); + writer.println(";"); + + if ( code_annotation != null && code_annotation.nativeAfterCall().length() > 0 ) + writer.println(code_annotation.nativeAfterCall()); + + generateStringDeallocations(writer, method.getParameters()); + if (!result_type.equals(env.getTypeUtils().getVoidType())) { + writer.print("\treturn "); + Class java_result_type = Utils.getJavaType(result_type); + if (Buffer.class.isAssignableFrom(java_result_type)) { + if (cached_result_annotation != null) + writer.print("safeNewBufferCached(env, "); + else + writer.print("safeNewBuffer(env, "); + } else if (String.class.equals(java_result_type)) { + writer.print("NewStringNativeUnsigned(env, "); + } else if ( method.getAnnotation(PointerWrapper.class) != null ) { + writer.print("(intptr_t)"); + } + writer.print(Utils.RESULT_VAR_NAME); + if (Buffer.class.isAssignableFrom(java_result_type)) { + final String size_parameter_name; + if ( auto_size_annotation != null && (auto_size_annotation.isNative() || (cached_result_annotation != null && cached_result_annotation.isRange())) ) + size_parameter_name = auto_size_annotation.value(); + else + size_parameter_name = Utils.RESULT_SIZE_NAME; + + writer.print(", "); + Utils.printExtraCallArguments(writer, method, size_parameter_name); + } + if (Buffer.class.isAssignableFrom(java_result_type) || + String.class.equals(java_result_type)) + writer.print(")"); + writer.println(";"); + } + writer.println("}"); + writer.println(); + } + + private static void printResultParam(final TypeMap type_map, final PrintWriter writer, final MethodDeclaration method, final TypeMirror result_type, final boolean preDeclare) { + final ParameterDeclaration result_param = Utils.getResultParameter(method); + final Declaration return_declaration = result_param == null ? method : result_param; + final NativeTypeTranslator result_translator = new NativeTypeTranslator(type_map, return_declaration); + result_type.accept(result_translator); + if ( preDeclare ) + writer.print("\t"); + writer.print(result_translator.getSignature() + " " + Utils.RESULT_VAR_NAME); + if ( preDeclare) + writer.println(";"); + else + writer.print(result_param == null ? " = " : ";\n\t"); + } + + private static void generateCallParameters(PrintWriter writer, TypeMap type_map, Collection params) { + if (params.size() > 0) { + boolean first = true; + for ( ParameterDeclaration param : params ) { + if ( param.getAnnotation(Helper.class) != null ) + continue; + + if ( first ) + first = false; + else + writer.print(", "); + + generateCallParameter(writer, type_map, param); + } + } + } + + private static void generateCallParameter(PrintWriter writer, TypeMap type_map, ParameterDeclaration param) { + if ( param.getAnnotation(Helper.class) != null ) + return; + + final Constant constant_annotation = param.getAnnotation(Constant.class); + if ( constant_annotation != null && constant_annotation.isNative() ) { + writer.print(constant_annotation.value()); + return; + } + + boolean is_indirect = param.getAnnotation(Indirect.class) != null; + if (is_indirect || param.getAnnotation(PointerArray.class) != null) { + writer.print("("); + final NativeTypeTranslator translator = new NativeTypeTranslator(type_map, param); + param.getType().accept(translator); + writer.print(translator.getSignature()); + writer.print("*)"); + } + if ( param.getAnnotation(PointerWrapper.class) != null ) + writer.print("(" + param.getAnnotation(PointerWrapper.class).value() + ")(intptr_t)"); + if (param.getAnnotation(Result.class) != null || is_indirect) + writer.print("&"); + + if ( param.getAnnotation(Result.class) != null ) { + writer.print(Utils.RESULT_VAR_NAME); + } else { + writer.print(param.getSimpleName()); + if ( param.getAnnotation(PointerArray.class) != null ) + writer.print(getPointerArrayName(Utils.getJavaType(param.getType()))); + else if ( Utils.isAddressableType(param.getType()) ) + writer.print(BUFFER_ADDRESS_POSTFIX); + } + } + + private static void generateStringDeallocations(PrintWriter writer, Collection params) { + for (ParameterDeclaration param : params) { + final Class java_type = Utils.getJavaType(param.getType()); + if ( java_type.equals(String.class) && param.getAnnotation(Result.class) == null ) + writer.println("\tfree(" + param.getSimpleName() + BUFFER_ADDRESS_POSTFIX + ");"); + else if (param.getAnnotation(PointerArray.class) != null ) // Free the string array mem + writer.println("\tfree(" + param.getSimpleName() + getPointerArrayName(java_type) + ");"); + } + } + + private static void generateBufferParameterAddresses(TypeMap type_map, PrintWriter writer, MethodDeclaration method, Mode mode) { + strLoopDeclared = false; + ptrLoopDeclared = false; + for ( ParameterDeclaration param : method.getParameters() ) { + final Constant constant_annotation = param.getAnnotation(Constant.class); + if ( param.getAnnotation(Result.class) == null && (constant_annotation == null || !constant_annotation.isNative()) && Utils.isAddressableType(param.getType())) + generateBufferParameterAddress(type_map, writer, method, param, mode); + } + } + + private static boolean strLoopDeclared; + private static boolean ptrLoopDeclared; + + private static void generateBufferParameterAddress(TypeMap type_map, PrintWriter writer, MethodDeclaration method, ParameterDeclaration param, Mode mode) { + final Check check_annotation = param.getAnnotation(Check.class); + final PointerArray array_annotation = param.getAnnotation(PointerArray.class); + final Class java_type = Utils.getJavaType(param.getType()); + + final NativeTypeTranslator translator = new NativeTypeTranslator(type_map, param); + param.getType().accept(translator); + final String native_type = translator.getSignature(); + + if ( !java_type.isArray() || CharSequence.class.isAssignableFrom(java_type.getComponentType()) ) { + writer.print("\t" + native_type + param.getSimpleName()); + writer.print(BUFFER_ADDRESS_POSTFIX + " = ("); + writer.print(native_type); + writer.print(")(intptr_t)"); + + if (mode == Mode.BUFFEROBJECT && param.getAnnotation(BufferObject.class) != null) { + writer.print("offsetToPointer(" + param.getSimpleName() + Utils.BUFFER_OBJECT_PARAMETER_POSTFIX + ")"); + } else { + if (Buffer.class.isAssignableFrom(java_type) || java_type.equals(CharSequence.class) || java_type.equals(CharSequence[].class) || PointerBuffer.class.isAssignableFrom(java_type) ) { + writer.print(param.getSimpleName()); + } else if (java_type.equals(String.class)) { + writer.print("GetStringNativeChars(env, " + param.getSimpleName() + ")"); + } else if ( array_annotation == null ) + throw new RuntimeException("Illegal type " + java_type); + } + writer.println(";"); + } + + if ( array_annotation != null ) { + final String n = getPointerArrayName(java_type); + final String arrayType; + if ( POINTER_LIST_NAME.equals(n) ) { + if ( n.equals(param.getSimpleName()) ) + throw new RuntimeException("The name '" + n + "' is not valid for object array arguments annotated with PointerArray"); + + arrayType = translator.getSignature(true) + (org.lwjgl.PointerWrapper.class.isAssignableFrom(java_type.getComponentType()) ? " " : ""); + + // Declare loop counters and allocate object array + if ( !ptrLoopDeclared ) { + writer.println("\tint " + n + "_i;"); + writer.println("\tjobject " + n + "_object;"); + ptrLoopDeclared = true; + } + } else { + if ( n.equals(param.getSimpleName()) ) + throw new RuntimeException("The name '" + n + "' is not valid for arguments annotated with PointerArray"); + + arrayType = translator.getSignature(true); + + // Declare loop counters and allocate string array + if ( !strLoopDeclared ) { + writer.println("\tint " + n + "_i;"); + writer.println("\t" + arrayType + n + "_address;"); + strLoopDeclared = true; + } + } + + writer.print("\t" + arrayType + "*" + param.getSimpleName() + n + " = "); + if ( check_annotation != null && check_annotation.canBeNull() ) + writer.print(array_annotation.value() + " == 0 ? NULL : "); + writer.println("(" + arrayType + "*) malloc(" + array_annotation.value() + " * sizeof(" + arrayType + "));"); + } + } + + private static String getPointerArrayName(final Class java_type) { + final Class component_type = java_type.getComponentType(); + if ( component_type != null && (Buffer.class.isAssignableFrom(component_type) || org.lwjgl.PointerWrapper.class.isAssignableFrom(component_type)) ) + return POINTER_LIST_NAME; + else + return STRING_LIST_NAME; + } + + private static boolean hasPointerArrayInits(Collection params) { + for ( ParameterDeclaration param : params ) { + PointerArray pointerArray_annotation = param.getAnnotation(PointerArray.class); + if ( pointerArray_annotation != null ) + return true; + } + return false; + } + + private static void generatePointerArrayInits(TypeMap type_map, PrintWriter writer, Collection params) { + for ( ParameterDeclaration param : params ) { + PointerArray pointerArray_annotation = param.getAnnotation(PointerArray.class); + if ( pointerArray_annotation != null ) { + final Class java_type = Utils.getJavaType(param.getType()); + final Class component_type = java_type.isArray() ? java_type.getComponentType() : null; + final NativeTypeTranslator translator = new NativeTypeTranslator(type_map, param); + param.getType().accept(translator); + + final String n = getPointerArrayName(java_type); + if ( POINTER_LIST_NAME.equals(n) ) { + // Init vars + writer.println("\t" + n + "_i = 0;"); + // Fill pointer array with the buffer pointers + writer.println("\twhile ( " + n + "_i < " + pointerArray_annotation.value() + " ) {"); + writer.println("\t\t" + n + "_object = (*env)->GetObjectArrayElement(env, " + param.getSimpleName() + ", " + n + "_i);"); + writer.print("\t\t" + param.getSimpleName() + n + "[" + n + "_i++] = (" + translator.getSignature(true) + ")"); + if ( Buffer.class.isAssignableFrom(component_type) ) + writer.println("(*env)->GetDirectBufferAddress(env, " + n + "_object);"); + else + writer.println("(intptr_t)getPointerWrapperAddress(env, " + n + "_object);"); + writer.println("\t}"); + } else { + final String lengths = pointerArray_annotation.lengths(); + + // Init vars + writer.println("\t" + n + "_i = 0;"); + writer.println("\t" + n + "_address = (" + translator.getSignature(true) + ")" + param.getSimpleName() + BUFFER_ADDRESS_POSTFIX + ";"); + // Fill string array with the string pointers + writer.println("\twhile ( " + n + "_i < " + pointerArray_annotation.value() + " ) {"); + if ( lengths.length() == 0 ) { + writer.println("\t\t" + param.getSimpleName() + n + "[" + n + "_i++] = " + n + "_address;"); + writer.println("\t\t" + n + "_address += strlen(" + n + "_address) + 1;"); + } else { + writer.println("\t\t" + param.getSimpleName() + n + "[" + n + "_i] = " + n + "_address;"); + writer.println("\t\t" + n + "_address += " + lengths + BUFFER_ADDRESS_POSTFIX + "[" + n + "_i++];"); + } + writer.println("\t}"); + } + } + } + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/NativeType.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/NativeType.java new file mode 100644 index 0000000..fbcf1b9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/NativeType.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * + * This annotation indicates that another annotation is + * a native type. + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@Target({ElementType.ANNOTATION_TYPE, ElementType.PARAMETER}) +public @interface NativeType { + String value() default ""; +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/NativeTypeTranslator.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/NativeTypeTranslator.java new file mode 100644 index 0000000..3c9963f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/NativeTypeTranslator.java @@ -0,0 +1,253 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.util.generator; + +/** + * + * A TypeVisitor that translates types (and optional native type + * annotations) to the native type string. + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import org.lwjgl.PointerBuffer; + +import java.lang.annotation.Annotation; +import java.nio.*; +import java.util.ArrayList; +import java.util.Collection; + +import com.sun.mirror.declaration.AnnotationMirror; +import com.sun.mirror.declaration.Declaration; +import com.sun.mirror.type.*; +import com.sun.mirror.util.TypeVisitor; + +/** + * $Id$ + *

+ * A TypeVisitor that translates (annotated) TypeMirrors to + * native types + * + * @author elias_naur + * @version $Revision$ + */ +public class NativeTypeTranslator implements TypeVisitor { + + private Collection native_types; + private boolean is_indirect; + private final Declaration declaration; + private final TypeMap type_map; + + public NativeTypeTranslator(TypeMap type_map, Declaration declaration) { + this.declaration = declaration; + this.type_map = type_map; + } + + public String getSignature() { + return getSignature(false); + } + + public String getSignature(final boolean skipConst) { + StringBuilder signature = new StringBuilder(); + if ( !skipConst && declaration.getAnnotation(Const.class) != null ) + signature.append("const "); + + if ( declaration.getAnnotation(PointerWrapper.class) != null ) { + signature.append(declaration.getAnnotation(PointerWrapper.class).value()); + } else if ( declaration.getAnnotation(NativeType.class) != null ) { + signature.append(declaration.getAnnotation(NativeType.class).value()); + } else { + // Use the name of the native type annotation as the C type name + signature.append(getAnnotationType().getSimpleName()); + } + + if ( is_indirect ) + signature.append(" *"); + return signature.toString(); + } + + public Class getAnnotationType() { + if ( native_types.size() != 1 ) + throw new RuntimeException("Expected only one native type for declaration " + declaration + + ", but got " + native_types.size()); + return native_types.iterator().next(); + } + + public void visitAnnotationType(AnnotationType t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitArrayType(ArrayType t) { + final Class type = Utils.getJavaType(t).getComponentType(); + + if ( CharSequence.class.isAssignableFrom(type) ) { + is_indirect = true; + native_types = new ArrayList(); + native_types.add(type_map.getStringArrayType()); + } else if ( Buffer.class.isAssignableFrom(type) ) { + is_indirect = true; + native_types = new ArrayList(); + native_types.add(type_map.getByteBufferArrayType()); + } else if ( org.lwjgl.PointerWrapper.class.isAssignableFrom(type) ) { + is_indirect = false; + } else + throw new RuntimeException(t + " is not allowed"); + } + + public static PrimitiveType.Kind getPrimitiveKindFromBufferClass(Class c) { + if ( IntBuffer.class.equals(c) ) + return PrimitiveType.Kind.INT; + else if ( DoubleBuffer.class.equals(c) ) + return PrimitiveType.Kind.DOUBLE; + else if ( ShortBuffer.class.equals(c) ) + return PrimitiveType.Kind.SHORT; + else if ( ByteBuffer.class.equals(c) || PointerBuffer.class.equals(c) ) + return PrimitiveType.Kind.BYTE; + else if ( FloatBuffer.class.equals(c) ) + return PrimitiveType.Kind.FLOAT; + else if ( LongBuffer.class.equals(c) ) + return PrimitiveType.Kind.LONG; + else + throw new RuntimeException(c + " is not allowed"); + } + + @SuppressWarnings("unchecked") + public static Class getClassFromType(DeclaredType t) { + try { + return (Class)Class.forName(t.getDeclaration().getQualifiedName()); + } catch (ClassNotFoundException e) { + throw new RuntimeException(e); + } + } + + private void getNativeTypeFromAnnotatedPrimitiveType(PrimitiveType.Kind kind) { + native_types = translateAnnotations(); + if ( native_types.size() == 0 ) + native_types.add(type_map.getNativeTypeFromPrimitiveType(kind)); + } + + public void visitClassType(ClassType t) { + is_indirect = true; + + Class c = getClassFromType(t); + if ( String.class.equals(c) ) { + native_types = new ArrayList(); + native_types.add(type_map.getStringElementType()); + } else if ( Buffer.class.equals(c) ) { + native_types = new ArrayList(); + native_types.add(type_map.getVoidType()); + } else if ( Buffer.class.isAssignableFrom(c) || PointerBuffer.class.isAssignableFrom(c) ) { + PrimitiveType.Kind kind = getPrimitiveKindFromBufferClass(c); + getNativeTypeFromAnnotatedPrimitiveType(kind); + } else if ( org.lwjgl.PointerWrapper.class.isAssignableFrom(c) ) { + native_types = new ArrayList(); + native_types.add(PointerWrapper.class); + + is_indirect = false; + } else + throw new RuntimeException(t + " is not allowed"); + } + + public void visitPrimitiveType(PrimitiveType t) { + getNativeTypeFromAnnotatedPrimitiveType(t.getKind()); + } + + public void visitDeclaredType(DeclaredType t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitEnumType(EnumType t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitInterfaceType(InterfaceType t) { + // See ARB_debug_label.glObjectPtrLabel + Class c = getClassFromType(t); + if ( org.lwjgl.PointerWrapper.class.isAssignableFrom(c) ) { + native_types = new ArrayList(); + native_types.add(PointerWrapper.class); + + is_indirect = false; + } else + throw new RuntimeException(t + " is not allowed"); + } + + // Check if the annotation is itself annotated with a certain annotation type + + public static T getAnnotation(AnnotationMirror annotation, Class type) { + return annotation.getAnnotationType().getDeclaration().getAnnotation(type); + } + + private static Class translateAnnotation(AnnotationMirror annotation) { + NativeType native_type = getAnnotation(annotation, NativeType.class); + if ( native_type != null ) { + return getClassFromType(annotation.getAnnotationType()); + } else + return null; + } + + private Collection translateAnnotations() { + Collection result = new ArrayList(); + for ( AnnotationMirror annotation : Utils.getSortedAnnotations(declaration.getAnnotationMirrors()) ) { + Class translated_result = translateAnnotation(annotation); + if ( translated_result != null ) { + result.add(translated_result); + } + } + return result; + } + + public void visitReferenceType(ReferenceType t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitTypeMirror(TypeMirror t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitTypeVariable(TypeVariable t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitVoidType(VoidType t) { + native_types = translateAnnotations(); + if ( native_types.size() == 0 ) + native_types.add(void.class); + } + + public void visitWildcardType(WildcardType t) { + throw new RuntimeException(t + " is not allowed"); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/NoErrorCheck.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/NoErrorCheck.java new file mode 100644 index 0000000..bb330c6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/NoErrorCheck.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * + * This annotation implies that a method should not include + * error checking even if it is enabled. + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@Target(ElementType.METHOD) +public @interface NoErrorCheck { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/NullTerminated.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/NullTerminated.java new file mode 100644 index 0000000..1d32492 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/NullTerminated.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * + * This annotation implies that a Buffer argument should be + * checked for a trailing '\0' + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@Target(ElementType.PARAMETER) +public @interface NullTerminated { + String value() default ""; +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Optional.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Optional.java new file mode 100644 index 0000000..60f1063 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Optional.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * A function annotated with @Optional will allow the extension to be available even if the driver does not expose that function. + * This is useful when certain buggy drivers miss some functionality. + * + * @author spasi + */ + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@Target(ElementType.METHOD) +public @interface Optional { + String reason(); // No default value to force documentation +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/OutParameter.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/OutParameter.java new file mode 100644 index 0000000..c23c6ee --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/OutParameter.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * This annotation indicates that a parameter is written, + * not read. + * + * @author elias_naur + * @version $Revision: 2286 $ + * $Id: Check.java 2286 2006-03-23 19:32:21Z matzon $ + */ + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@Target(ElementType.PARAMETER) +public @interface OutParameter { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Platform.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Platform.java new file mode 100644 index 0000000..5968478 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Platform.java @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import java.io.PrintWriter; + +public enum Platform { + WGL, + GLX, + ALL; + + public void printPrologue(PrintWriter writer) { + if (this == ALL) + return; + writer.print("#ifdef "); + switch (this) { + case WGL: + writer.println("_WIN32"); + break; + case GLX: + writer.println("_X11"); + break; + default: + throw new RuntimeException(this + " is not supported"); + } + } + + public void printEpilogue(PrintWriter writer) { + if (this == ALL) + return; + writer.println("#endif"); + } + + public String getOSPrefix() { + switch (this) { + case WGL: + return "Windows"; + case GLX: + return "Linux"; + default: + throw new RuntimeException(this + " has no OS specific prefix"); + } + } + + public String getPrefix() { + switch (this) { + case WGL: + return "wgl"; + case GLX: + return "glX"; + case ALL: + return "gl"; + default: + throw new RuntimeException(this + " is not supported"); + } + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/PlatformDependent.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/PlatformDependent.java new file mode 100644 index 0000000..22ca33f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/PlatformDependent.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * + * This annotation implies that the corresponding native + * function symbol is named after the platform specific + * window system (glX, wgl, ...) + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@Target(ElementType.METHOD) +public @interface PlatformDependent { + Platform[] value(); +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/PointerArray.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/PointerArray.java new file mode 100644 index 0000000..0eaa493 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/PointerArray.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * + * @author spasi + */ + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface PointerArray { + /** Number of values in the string list (name of native-side parameter) */ + String value(); + /** List of string lengths (name of native-side parameter) */ + String lengths() default ""; +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/PointerType.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/PointerType.java new file mode 100644 index 0000000..48f4ce3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/PointerType.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2002-2013 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +/** Marker interface for pointer types. */ +@Target(ElementType.ANNOTATION_TYPE) +public @interface PointerType { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/PointerWrapper.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/PointerWrapper.java new file mode 100644 index 0000000..0efe225 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/PointerWrapper.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * @author spasi + */ +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface PointerWrapper { + String value(); // The native pointer type. + boolean canBeNull() default false; // Whether the pointer may be null. + String params() default ""; // Pass these extra parameters when constructing PointerWrapper objects. + String factory() default ""; // Use this factory method call instead of normal object construction. +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/PostfixTranslator.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/PostfixTranslator.java new file mode 100644 index 0000000..878a14d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/PostfixTranslator.java @@ -0,0 +1,183 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.util.generator; + +/** + * + * A TypeVisitor that translates (annotated) TypeMirrors to + * postfixes. + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import com.sun.mirror.declaration.*; +import com.sun.mirror.type.*; +import com.sun.mirror.util.*; + +import java.lang.annotation.Annotation; +import java.nio.*; + +public class PostfixTranslator implements TypeVisitor { + private final StringBuilder signature = new StringBuilder(); + private final Declaration declaration; + private final TypeMap type_map; + + public PostfixTranslator(TypeMap type_map, Declaration declaration) { + this.declaration = declaration; + this.type_map = type_map; + } + + public String getSignature() { + return signature.toString(); + } + + public void visitAnnotationType(AnnotationType t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitArrayType(ArrayType t) { + throw new RuntimeException(t + " is not allowed"); + } + + private static PrimitiveType.Kind getPrimitiveKindFromBufferClass(Class c) { + if (IntBuffer.class.equals(c) || int.class.equals(c) ) + return PrimitiveType.Kind.INT; + else if (DoubleBuffer.class.equals(c) || double.class.equals(c) ) + return PrimitiveType.Kind.DOUBLE; + else if (ShortBuffer.class.equals(c) || short.class.equals(c) ) + return PrimitiveType.Kind.SHORT; + else if (ByteBuffer.class.equals(c) || byte.class.equals(c) ) + return PrimitiveType.Kind.BYTE; + else if (FloatBuffer.class.equals(c) || float.class.equals(c)) + return PrimitiveType.Kind.FLOAT; + else if (LongBuffer.class.equals(c) || long.class.equals(c) ) + return PrimitiveType.Kind.LONG; + else + throw new RuntimeException(c + " is not allowed"); + } + + public void visitClassType(ClassType t) { + Class c = NativeTypeTranslator.getClassFromType(t); + PrimitiveType.Kind kind = getPrimitiveKindFromBufferClass(c); + visitPrimitiveTypeKind(kind); + } + + public void visitDeclaredType(DeclaredType t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitEnumType(EnumType t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitInterfaceType(InterfaceType t) { + throw new RuntimeException(t + " is not allowed"); + } + + private boolean translateAnnotation(AnnotationMirror annotation) { + NativeType native_type = NativeTypeTranslator.getAnnotation(annotation, NativeType.class); + if (native_type != null) { + Class annotation_class = NativeTypeTranslator.getClassFromType(annotation.getAnnotationType()); + signature.append(type_map.translateAnnotation(annotation_class)); + return true; + } else + return false; + } + + private boolean translateAnnotations() { + boolean result = false; + for (AnnotationMirror annotation : Utils.getSortedAnnotations(declaration.getAnnotationMirrors())) + if (translateAnnotation(annotation)) { + if (result) + throw new RuntimeException("Multiple native types"); + result = true; + } + return result; + } + + public void visitPrimitiveType(PrimitiveType t) { + visitPrimitiveTypeKind(t.getKind()); + } + + private void visitPrimitiveTypeKind(PrimitiveType.Kind kind) { + boolean annotated_translation = translateAnnotations(); + if (annotated_translation) + return; + // No annotation type was specified, fall back to default + String type; + switch (kind) { + case INT: + type = "i"; + break; + case DOUBLE: + type = "d"; + break; + case FLOAT: + type = "f"; + break; + case SHORT: + type = "s"; + break; + case BYTE: + type = "b"; + break; + case LONG: + type = "i64"; + break; + default: + throw new RuntimeException(kind + " is not allowed"); + } + signature.append(type); + } + + public void visitReferenceType(ReferenceType t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitTypeMirror(TypeMirror t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitTypeVariable(TypeVariable t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitVoidType(VoidType t) { + } + + public void visitWildcardType(WildcardType t) { + throw new RuntimeException(t + " is not allowed"); + } +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Private.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Private.java new file mode 100644 index 0000000..3cfcc12 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Private.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * Extension templates marked with @Private will result in classes without the public keyword. + * + * @author Spasi + */ + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@Target({ElementType.TYPE, ElementType.METHOD}) +public @interface Private { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/RegisterStubsGenerator.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/RegisterStubsGenerator.java new file mode 100644 index 0000000..00cc4c8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/RegisterStubsGenerator.java @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.util.generator; + +/** + * + * This class generates the initNatives native function. + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import com.sun.mirror.declaration.*; +import com.sun.mirror.type.*; + +import java.io.*; +import java.util.*; + +public class RegisterStubsGenerator { + public static void generateMethodsNativeStubBind(PrintWriter writer, InterfaceDeclaration d, boolean generate_error_checks, boolean context_specific) { + Iterator it = d.getMethods().iterator(); + while (it.hasNext()) { + MethodDeclaration method = it.next(); + Alternate alt_annotation = method.getAnnotation(Alternate.class); + if ( (alt_annotation != null && (!alt_annotation.nativeAlt() || alt_annotation.skipNative())) || method.getAnnotation(Reuse.class) != null ) + continue; + EnumSet platforms; + PlatformDependent platform_annotation = method.getAnnotation(PlatformDependent.class); + if (platform_annotation != null) + platforms = EnumSet.copyOf(Arrays.asList(platform_annotation.value())); + else + platforms = EnumSet.of(Platform.ALL); + for (Platform platform : platforms) { + platform.printPrologue(writer); + boolean has_buffer_parameter = Utils.hasMethodBufferObjectParameter(method); + printMethodNativeStubBind(writer, d, method, platform, Mode.NORMAL, it.hasNext() || has_buffer_parameter, generate_error_checks, context_specific); + if (has_buffer_parameter) { + printMethodNativeStubBind(writer, d, method, platform, Mode.BUFFEROBJECT, it.hasNext(), generate_error_checks, context_specific); + } + platform.printEpilogue(writer); + } + } + writer.println(); + } + + private static String getTypeSignature(TypeMirror type, boolean add_position_signature) { + SignatureTranslator v = new SignatureTranslator(add_position_signature); + type.accept(v); + return v.getSignature(); + } + + private static String getMethodSignature(MethodDeclaration method, Mode mode) { + Collection params = method.getParameters(); + String signature = "("; + for (ParameterDeclaration param : params) { + if ( param.getAnnotation(Result.class) != null || (param.getAnnotation(Helper.class) != null && !param.getAnnotation(Helper.class).passToNative()) ) + continue; + + final Constant constant_annotation = param.getAnnotation(Constant.class); + if ( constant_annotation != null && constant_annotation.isNative() ) + continue; + + if (mode == Mode.BUFFEROBJECT && param.getAnnotation(BufferObject.class) != null) + signature += "J"; + else + signature += getTypeSignature(param.getType(), true); + } + + final TypeMirror result_type = Utils.getMethodReturnType(method); + final CachedResult cached_result_annotation = method.getAnnotation(CachedResult.class); + final AutoSize auto_size_annotation = method.getAnnotation(AutoSize.class); + + final boolean isNIOBuffer = Utils.getNIOBufferType(result_type) != null; + if ( isNIOBuffer && (auto_size_annotation == null || !auto_size_annotation.isNative()) ) + signature += "J"; + + final String result_type_signature = isNIOBuffer ? "Ljava/nio/ByteBuffer;" : getTypeSignature(result_type, false); + if ( cached_result_annotation != null ) + signature += result_type_signature; + + signature += ")"; + signature += result_type_signature; + return signature; + } + + private static void printMethodNativeStubBind(PrintWriter writer, InterfaceDeclaration d, MethodDeclaration method, Platform platform, Mode mode, boolean has_more, boolean generate_error_checks, boolean context_specific) { + writer.print("\t\t{\"" + Utils.getSimpleNativeMethodName(method, generate_error_checks, context_specific)); + if (mode == Mode.BUFFEROBJECT) + writer.print(Utils.BUFFER_OBJECT_METHOD_POSTFIX); + writer.print("\", \"" + getMethodSignature(method, mode) + "\", (void *)&"); + writer.print(Utils.getQualifiedNativeMethodName(Utils.getQualifiedClassName(d), method, generate_error_checks, context_specific)); + if (mode == Mode.BUFFEROBJECT) + writer.print(Utils.BUFFER_OBJECT_METHOD_POSTFIX); + + final Alternate alt_annotation = method.getAnnotation(Alternate.class); + final String methodName = alt_annotation == null ? method.getSimpleName() : alt_annotation.value(); + String opengl_handle_name = methodName.replaceFirst("gl", platform.getPrefix()); + writer.print(", \"" + opengl_handle_name + "\", (void *)&" + methodName + ", " + (method.getAnnotation(Optional.class) == null ? "false" : "true") + "}"); + if (has_more) + writer.println(","); + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Result.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Result.java new file mode 100644 index 0000000..ebd1618 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Result.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * + * This annotation indicates that the method result is in the + * specified parameter. + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@Target(ElementType.PARAMETER) +public @interface Result { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Reuse.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Reuse.java new file mode 100644 index 0000000..c2c25e1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Reuse.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +/** + * Reuse can be used to annotate methods that duplicate functionality that has been already + * defined somewhere else. For example, this can be applied to OpenGL core functionality that + * exists as an ARB extension as well, but with the exact same entry points. + * + * @author Spasi + */ +@Target(ElementType.METHOD) +public @interface Reuse { + /** The extension Class that defines the method. */ + String value(); + String method() default ""; +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/SignatureTranslator.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/SignatureTranslator.java new file mode 100644 index 0000000..2eff145 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/SignatureTranslator.java @@ -0,0 +1,164 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.util.generator; + +/** + * + * A TypeVisitor that translates types to JNI signatures. + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import org.lwjgl.PointerBuffer; + +import com.sun.mirror.type.*; +import com.sun.mirror.util.*; + +import java.nio.*; + +class SignatureTranslator implements TypeVisitor { + private final boolean add_position_signature; + private final StringBuilder signature = new StringBuilder(); + + SignatureTranslator(boolean add_position_signature) { + this.add_position_signature = add_position_signature; + } + + private static String getNativeNameFromClassName(String class_name) { + return class_name.replaceAll("\\.", "/"); + } + + public String getSignature() { + return signature.toString(); + } + + public void visitAnnotationType(AnnotationType t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitArrayType(ArrayType t) { + final Class type = Utils.getJavaType(t.getComponentType()); + if ( CharSequence.class.isAssignableFrom(type) ) + signature.append("J"); + else if ( Buffer.class.isAssignableFrom(type) ) + signature.append("[Ljava/nio/ByteBuffer;"); + else if ( org.lwjgl.PointerWrapper.class.isAssignableFrom(type) ) + signature.append("[L" + getNativeNameFromClassName(type.getName()) + ";"); + else + throw new RuntimeException(t + " is not allowed"); + } + + public void visitClassType(ClassType t) { + Class type = NativeTypeTranslator.getClassFromType(t); + + if ( org.lwjgl.PointerWrapper.class.isAssignableFrom(type) || (Utils.isAddressableType(type) && !String.class.equals(type)) ) + signature.append("J"); + else { + String type_name; + if ( (CharSequence.class.isAssignableFrom(type) && !String.class.equals(type)) || CharSequence[].class.isAssignableFrom(type) || PointerBuffer.class.isAssignableFrom(type) ) + type_name = ByteBuffer.class.getName(); + else + type_name = t.getDeclaration().getQualifiedName(); + + signature.append("L"); + signature.append(getNativeNameFromClassName(type_name)); + signature.append(";"); + } + } + + public void visitDeclaredType(DeclaredType t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitEnumType(EnumType t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitInterfaceType(InterfaceType t) { + Class type = NativeTypeTranslator.getClassFromType(t); + if ( org.lwjgl.PointerWrapper.class.isAssignableFrom(type) ) + signature.append("J"); + else + throw new RuntimeException(t + " is not allowed"); + } + + public void visitPrimitiveType(PrimitiveType t) { + switch (t.getKind()) { + case BOOLEAN: + signature.append("Z"); + break; + case INT: + signature.append("I"); + break; + case FLOAT: + signature.append("F"); + break; + case SHORT: + signature.append("S"); + break; + case DOUBLE: + signature.append("D"); + break; + case BYTE: + signature.append("B"); + break; + case LONG: + signature.append("J"); + break; + default: + throw new RuntimeException("Unsupported type " + t); + } + } + + public void visitReferenceType(ReferenceType t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitTypeMirror(TypeMirror t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitTypeVariable(TypeVariable t) { + throw new RuntimeException(t + " is not allowed"); + } + + public void visitVoidType(VoidType t) { + signature.append("V"); + } + + public void visitWildcardType(WildcardType t) { + throw new RuntimeException(t + " is not allowed"); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Signedness.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Signedness.java new file mode 100644 index 0000000..3df3b25 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Signedness.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +public enum Signedness { + SIGNED, + UNSIGNED, + NONE, + BOTH +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/StripPostfix.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/StripPostfix.java new file mode 100644 index 0000000..b2c8a18 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/StripPostfix.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * + * This annotation implies that a method have its postfix stripped + * according to a specified Buffer parameter. + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@Target(ElementType.METHOD) +public @interface StripPostfix { + String value(); // The parameter to deduce the postfix from + String extension() default "NULL"; + boolean hasPostfix() default true; + String postfix() default "NULL"; +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/TypeInfo.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/TypeInfo.java new file mode 100644 index 0000000..021ee50 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/TypeInfo.java @@ -0,0 +1,239 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * + * This class represent a parameter configuration. There are multiple + * TypeInfos in case of multityped parameters. + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import org.lwjgl.PointerBuffer; +import org.lwjgl.util.generator.opengl.GLvoid; + +import com.sun.mirror.declaration.*; +import com.sun.mirror.type.*; + +import java.lang.annotation.Annotation; +import java.util.*; +import java.nio.*; + +public class TypeInfo { + public static final String UNSIGNED_PARAMETER_NAME = "unsigned"; + + private final Signedness signedness; + private final Class type; + private final String auto_type; + + private TypeInfo(Class type, Signedness signedness, String auto_type) { + this.type = type; + this.signedness = signedness; + this.auto_type = auto_type; + } + + public Class getType() { + return type; + } + + public Signedness getSignedness() { + return signedness; + } + + public String getAutoType() { + if (auto_type == null) + throw new RuntimeException("No auto type assigned"); + return auto_type; + } + + private static Class getTypeFromPrimitiveKind(PrimitiveType.Kind kind) { + Class type; + switch (kind) { + case LONG: + type = long.class; + break; + case INT: + type = int.class; + break; + case FLOAT: + type = float.class; + break; + case DOUBLE: + type = double.class; + break; + case SHORT: + type = short.class; + break; + case BYTE: + type = byte.class; + break; + case BOOLEAN: + type = boolean.class; + break; + default: + throw new RuntimeException(kind + " is not allowed"); + } + return type; + } + + private static Class getBufferTypeFromPrimitiveKind(PrimitiveType.Kind kind, AnnotationMirror annotation) { + Class type; + switch (kind) { + case INT: + type = IntBuffer.class; + break; + case FLOAT: + type = FloatBuffer.class; + break; + case DOUBLE: + type = DoubleBuffer.class; + break; + case SHORT: + type = ShortBuffer.class; + break; + case LONG: + if ( annotation.getAnnotationType().getDeclaration().getAnnotation(PointerType.class) != null ) + type = PointerBuffer.class; + else + type = LongBuffer.class; + break; + case BYTE: /* fall through */ + case BOOLEAN: + type = ByteBuffer.class; + break; + default: + throw new RuntimeException(kind + " is not allowed"); + } + return type; + } + + private static TypeInfo getDefaultTypeInfo(TypeMirror t) { + Class java_type = Utils.getJavaType(t); + return new TypeInfo(java_type, Signedness.NONE, null); + } + + public static Map getDefaultTypeInfoMap(MethodDeclaration method) { + Map map = new HashMap(); + for (ParameterDeclaration param : method.getParameters()) { + TypeInfo type_info = getDefaultTypeInfo(param.getType()); + map.put(param, type_info); + } + return map; + } + + private static Collection getTypeInfos(TypeMap type_map, Declaration param, TypeMirror decl_type) { + Collection annotations = Utils.getSortedAnnotations(param.getAnnotationMirrors()); + Map types = new HashMap(); + Collection multityped_result = new ArrayList(); + boolean add_default_type = true; + for (AnnotationMirror annotation : annotations) { + NativeType native_type_annotation = NativeTypeTranslator.getAnnotation(annotation, NativeType.class); + if (native_type_annotation != null) { + Class annotation_type = NativeTypeTranslator.getClassFromType(annotation.getAnnotationType()); + Signedness signedness = type_map.getSignednessFromType(annotation_type); + Class inverse_type = type_map.getInverseType(annotation_type); + String auto_type = type_map.getAutoTypeFromAnnotation(annotation); + if (inverse_type != null) { + if (types.containsKey(inverse_type)) { + TypeInfo inverse_type_info = types.get(inverse_type); + String inverse_auto_type = inverse_type_info.getAutoType(); + auto_type = signedness == Signedness.UNSIGNED ? auto_type + " : " + inverse_auto_type : + inverse_auto_type + " : " + auto_type; + auto_type = UNSIGNED_PARAMETER_NAME + " ? " + auto_type; + signedness = Signedness.BOTH; + types.remove(inverse_type); + multityped_result.remove(inverse_type_info); + } + } + Class type; + PrimitiveType.Kind kind; + GLvoid void_annotation = param.getAnnotation(GLvoid.class); + kind = void_annotation == null ? type_map.getPrimitiveTypeFromNativeType(annotation_type) : void_annotation.value(); + if (Utils.getNIOBufferType(decl_type) != null) + type = getBufferTypeFromPrimitiveKind(kind, annotation); + else + type = getTypeFromPrimitiveKind(kind); + TypeInfo type_info = new TypeInfo(type, signedness, auto_type); + types.put(annotation_type, type_info); + multityped_result.add(type_info); + add_default_type = false; + } + } + if (add_default_type) { + TypeInfo default_type_info = getDefaultTypeInfo(decl_type); + Collection result = new ArrayList(); + result.add(default_type_info); + return result; + } else + return multityped_result; + } + + private static Map> getTypeInfoMap(TypeMap type_map, MethodDeclaration method) { + Map> map = new HashMap>(); + for (ParameterDeclaration param : method.getParameters()) { + Collection types = getTypeInfos(type_map, param, param.getType()); + map.put(param, types); + } + return map; + } + + public static Collection> getTypeInfoCrossProduct(TypeMap type_map, MethodDeclaration method) { + Collection parameter_collection = method.getParameters(); + ParameterDeclaration[] parameters = new ParameterDeclaration[parameter_collection.size()]; + parameter_collection.toArray(parameters); + Collection> cross_product = new ArrayList>(); + getCrossProductRecursive(0, parameters, getTypeInfoMap(type_map, method), + new HashMap(), cross_product); + return cross_product; + } + + private static void getCrossProductRecursive(int index, ParameterDeclaration[] parameters, Map> typeinfos_map, Map current_instance, + Collection> cross_product) { + if (index == parameters.length) { + cross_product.add(current_instance); + return; + } + ParameterDeclaration param = parameters[index]; + Collection typeinfos = typeinfos_map.get(param); + if (typeinfos != null) { + for (TypeInfo typeinfo : typeinfos) { + Map instance = new HashMap(current_instance); + instance.put(param, typeinfo); + getCrossProductRecursive(index + 1, parameters, typeinfos_map, instance, cross_product); + } + } + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/TypeMap.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/TypeMap.java new file mode 100644 index 0000000..1092994 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/TypeMap.java @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.util.generator; + +/** + * + * The interface to the OpenAL/OpenGL specific generator behaviour + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import com.sun.mirror.declaration.*; +import com.sun.mirror.type.*; + +import java.io.*; +import java.lang.annotation.Annotation; + +public interface TypeMap { + void printCapabilitiesInit(PrintWriter writer); + String getCapabilities(); + String getAPIUtilParam(boolean comma); + void printErrorCheckMethod(PrintWriter writer, MethodDeclaration method, String tabs); + String getRegisterNativesFunctionName(); + PrimitiveType.Kind getPrimitiveTypeFromNativeType(Class native_type); + String getTypedefPostfix(); + String getFunctionPrefix(); + void printNativeIncludes(PrintWriter writer); + Class getStringElementType(); + Class getStringArrayType(); + Class getByteBufferArrayType(); + Class[] getValidAnnotationTypes(Class type); + Class getVoidType(); + String translateAnnotation(Class annotation_type); + Class getNativeTypeFromPrimitiveType(PrimitiveType.Kind kind); + String getAutoTypeFromAnnotation(AnnotationMirror annotation); + Class getInverseType(Class type); + Signedness getSignednessFromType(Class type); +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/TypedefsGenerator.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/TypedefsGenerator.java new file mode 100644 index 0000000..bd4aac8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/TypedefsGenerator.java @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.util.generator; + +/** + * + * A TypeVisitor that generates the native typedefs. + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import com.sun.mirror.declaration.*; +import com.sun.mirror.type.*; + +import java.io.*; +import java.util.*; + +public class TypedefsGenerator { + private static void generateNativeTypedefs(TypeMap type_map, PrintWriter writer, MethodDeclaration method) { + TypeMirror return_type = method.getReturnType(); + writer.print("typedef "); + writer.print(type_map.getTypedefPostfix()); + NativeTypeTranslator translator = new NativeTypeTranslator(type_map, method); + return_type.accept(translator); + writer.print(translator.getSignature()); + writer.print(" ("); + writer.print(type_map.getFunctionPrefix()); + writer.print(" *" + Utils.getTypedefName(method) + ") ("); + generateNativeTypedefsParameters(type_map, writer, method.getParameters()); + writer.println(");"); + } + + private static void generateNativeTypedefsParameters(TypeMap type_map, PrintWriter writer, Collection params) { + if (params.size() > 0) { + boolean first = true; + for ( ParameterDeclaration param : params ) { + if ( param.getAnnotation(Helper.class) != null ) + continue; + + if ( first ) + first = false; + else + writer.print(", "); + + generateNativeTypedefsParameter(type_map, writer, param); + } + } + } + + private static void generateNativeTypedefsParameter(TypeMap type_map, PrintWriter writer, ParameterDeclaration param) { + NativeTypeTranslator translator = new NativeTypeTranslator(type_map, param); + param.getType().accept(translator); + writer.print(translator.getSignature()); + if (param.getAnnotation(Result.class) != null || param.getAnnotation(Indirect.class) != null || param.getAnnotation(PointerArray.class) != null) + writer.print("*"); + writer.print(" " + param.getSimpleName()); + } + + public static void generateNativeTypedefs(TypeMap type_map, PrintWriter writer, Collection methods) { + for (MethodDeclaration method : methods) { + if ( method.getAnnotation(Alternate.class) == null && method.getAnnotation(Reuse.class) == null ) + generateNativeTypedefs(type_map, writer, method); + } + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Utils.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Utils.java new file mode 100644 index 0000000..cd4f5ef --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/Utils.java @@ -0,0 +1,458 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator; + +/** + * + * Various utility methods to the generator. + * + * @author elias_naur + * @version $Revision$ + * $Id$ + */ + +import org.lwjgl.PointerBuffer; +import org.lwjgl.util.generator.opengl.GLboolean; +import org.lwjgl.util.generator.opengl.GLchar; +import org.lwjgl.util.generator.opengl.GLcharARB; +import org.lwjgl.util.generator.opengl.GLreturn; + +import java.io.PrintWriter; +import java.nio.Buffer; +import java.nio.ByteBuffer; +import java.util.*; + +import com.sun.mirror.declaration.*; +import com.sun.mirror.type.PrimitiveType; +import com.sun.mirror.type.TypeMirror; + +public class Utils { + + public static final String TYPEDEF_POSTFIX = "PROC"; + public static final String FUNCTION_POINTER_VAR_NAME = "function_pointer"; + public static final String FUNCTION_POINTER_POSTFIX = "_pointer"; + public static final String CHECKS_CLASS_NAME = "GLChecks"; + public static final String CONTEXT_CAPS_CLASS_NAME = "ContextCapabilities"; + public static final String STUB_INITIALIZER_NAME = "initNativeStubs"; + public static final String BUFFER_OBJECT_METHOD_POSTFIX = "BO"; + public static final String BUFFER_OBJECT_PARAMETER_POSTFIX = "_buffer_offset"; + public static final String RESULT_SIZE_NAME = "result_size"; + public static final String RESULT_VAR_NAME = "__result"; + public static final String CACHED_BUFFER_LENGTH_NAME = "length"; + public static final String CACHED_BUFFER_NAME = "old_buffer"; + private static final String OVERLOADED_METHOD_PREFIX = "n"; + + public static String getTypedefName(MethodDeclaration method) { + Alternate alt_annotation = method.getAnnotation(Alternate.class); + return (alt_annotation == null ? method.getSimpleName() : alt_annotation.value()) + TYPEDEF_POSTFIX; + } + + public static String getFunctionAddressName(InterfaceDeclaration interface_decl, MethodDeclaration method) { + return getFunctionAddressName(interface_decl, method, false); + } + + public static String getFunctionAddressName(InterfaceDeclaration interface_decl, MethodDeclaration method, boolean forceAlt) { + final Alternate alt_annotation = method.getAnnotation(Alternate.class); + + /* Removed prefix so that we can identify reusable entry points, removed postfix because it's not needed and looks nicer. + String interfaceName = interface_decl.getSimpleName(); // If we add this back, we need to fix @Reuse (add a param for the template name) + if ( alt_annotation == null || (alt_annotation.nativeAlt() && !forceAlt) ) + return interfaceName + "_" + method.getSimpleName() + FUNCTION_POINTER_POSTFIX; + else + return interfaceName + "_" + alt_annotation.value() + FUNCTION_POINTER_POSTFIX; + */ + if ( alt_annotation == null || (alt_annotation.nativeAlt() && !forceAlt) ) + return method.getSimpleName(); + else + return alt_annotation.value(); + } + + public static boolean isFinal(InterfaceDeclaration d) { + Extension extension_annotation = d.getAnnotation(Extension.class); + return extension_annotation == null || extension_annotation.isFinal(); + } + + private static class AnnotationMirrorComparator implements Comparator { + + public int compare(AnnotationMirror a1, AnnotationMirror a2) { + String n1 = a1.getAnnotationType().getDeclaration().getQualifiedName(); + String n2 = a2.getAnnotationType().getDeclaration().getQualifiedName(); + int result = n1.compareTo(n2); + return result; + } + + public boolean equals(AnnotationMirror a1, AnnotationMirror a2) { + return compare(a1, a2) == 0; + } + } + + public static Collection getSortedAnnotations(Collection annotations) { + List annotation_list = new ArrayList(annotations); + Collections.sort(annotation_list, new AnnotationMirrorComparator()); + return annotation_list; + } + + public static String getReferenceName(InterfaceDeclaration interface_decl, MethodDeclaration method, ParameterDeclaration param) { + return interface_decl.getSimpleName() + "_" + method.getSimpleName() + "_" + param.getSimpleName(); + } + + public static boolean isAddressableType(TypeMirror type) { + return isAddressableType(getJavaType(type)); + } + + public static boolean isAddressableType(Class type) { + if ( type.isArray() ) { + final Class component_type = type.getComponentType(); + return isAddressableTypeImpl(component_type) || org.lwjgl.PointerWrapper.class.isAssignableFrom(component_type); + } + return isAddressableTypeImpl(type); + } + + private static boolean isAddressableTypeImpl(Class type) { + return Buffer.class.isAssignableFrom(type) || PointerBuffer.class.isAssignableFrom(type) || CharSequence.class.isAssignableFrom(type); + } + + public static Class getJavaType(TypeMirror type_mirror) { + JavaTypeTranslator translator = new JavaTypeTranslator(); + type_mirror.accept(translator); + return translator.getType(); + } + + private static boolean hasParameterMultipleTypes(ParameterDeclaration param) { + int num_native_annotations = 0; + for ( AnnotationMirror annotation : param.getAnnotationMirrors() ) + if ( NativeTypeTranslator.getAnnotation(annotation, NativeType.class) != null ) + num_native_annotations++; + return num_native_annotations > 1; + } + + public static boolean isParameterMultiTyped(ParameterDeclaration param) { + boolean result = Buffer.class.equals(Utils.getJavaType(param.getType())); + if ( !result && hasParameterMultipleTypes(param) ) + throw new RuntimeException(param + " not defined as java.nio.Buffer but has multiple types"); + return result; + } + + public static ParameterDeclaration findParameter(MethodDeclaration method, String name) { + for ( ParameterDeclaration param : method.getParameters() ) + if ( param.getSimpleName().equals(name) ) + return param; + throw new RuntimeException("Parameter " + name + " not found"); + } + + public static void printDocComment(PrintWriter writer, Declaration decl) { + final String overloadsComment; + if ( (decl instanceof MethodDeclaration) && decl.getAnnotation(Alternate.class) != null ) + overloadsComment = "Overloads " + decl.getAnnotation(Alternate.class).value() + "."; + else + overloadsComment = null; + + String doc_comment = decl.getDocComment(); + if ( doc_comment != null ) { + final String tab = decl instanceof InterfaceDeclaration ? "" : "\t"; + writer.println(tab + "/**"); + + if ( overloadsComment != null ) { + writer.println("\t * " + overloadsComment); + writer.println("\t *

"); + } + + final StringTokenizer doc_lines = new StringTokenizer(doc_comment, "\n", true); + boolean lastWasNL = false; + while ( doc_lines.hasMoreTokens() ) { + final String t = doc_lines.nextToken(); + if ( "\n".equals(t) ) { + if ( lastWasNL ) + writer.println(tab + " *

"); + lastWasNL = true; + } else { + writer.println(tab + " * " + t); + lastWasNL = false; + } + } + + writer.println(tab + " */"); + } else if ( overloadsComment != null ) + writer.println("\t/** " + overloadsComment + " */"); + } + + public static AnnotationMirror getParameterAutoAnnotation(ParameterDeclaration param) { + for ( AnnotationMirror annotation : param.getAnnotationMirrors() ) + if ( NativeTypeTranslator.getAnnotation(annotation, Auto.class) != null ) + return annotation; + return null; + } + + // DISABLED: We always generate indirect methods. (affects OpenAL only at the time of this change) + public static boolean isMethodIndirect(boolean generate_error_checks, boolean context_specific, MethodDeclaration method) { + /* + for (ParameterDeclaration param : method.getParameters()) { + if (isAddressableType(param.getType()) || getParameterAutoAnnotation(param) != null || + param.getAnnotation(Constant.class) != null) + return true; + } + return hasMethodBufferObjectParameter(method) || method.getAnnotation(Code.class) != null || + method.getAnnotation(CachedResult.class) != null || + (generate_error_checks && method.getAnnotation(NoErrorCheck.class) == null) || + context_specific; + */ + return true; + } + + public static String getNativeQualifiedName(String qualified_name) { + return qualified_name.replaceAll("\\.", "_"); + } + + public static String getQualifiedNativeMethodName(String qualified_class_name, String method_name) { + // Escape '_' in method name + if ( method_name.indexOf('_') != -1 ) + method_name = method_name.replace("_", "_1"); + + return "Java_" + getNativeQualifiedName(qualified_class_name) + "_" + method_name; + } + + public static String getQualifiedNativeMethodName(String qualified_class_name, MethodDeclaration method, boolean generate_error_checks, boolean context_specific) { + String method_name = getSimpleNativeMethodName(method, generate_error_checks, context_specific); + return getQualifiedNativeMethodName(qualified_class_name, method_name); + } + + public static ParameterDeclaration getResultParameter(MethodDeclaration method) { + ParameterDeclaration result_param = null; + for ( ParameterDeclaration param : method.getParameters() ) { + if ( param.getAnnotation(Result.class) != null ) { + if ( result_param != null ) + throw new RuntimeException("Multiple parameters annotated with Result in method " + method); + result_param = param; + } + } + return result_param; + } + + public static TypeMirror getMethodReturnType(MethodDeclaration method) { + TypeMirror result_type; + ParameterDeclaration result_param = getResultParameter(method); + if ( result_param != null ) { + result_type = result_param.getType(); + } else + result_type = method.getReturnType(); + return result_type; + } + + public static String getMethodReturnType(MethodDeclaration method, GLreturn return_annotation, boolean buffer) { + ParameterDeclaration return_param = null; + for ( ParameterDeclaration param : method.getParameters() ) { + if ( param.getSimpleName().equals(return_annotation.value()) ) { + return_param = param; + break; + } + } + if ( return_param == null ) + throw new RuntimeException("The @GLreturn parameter \"" + return_annotation.value() + "\" could not be found in method: " + method); + + PrimitiveType.Kind kind = NativeTypeTranslator.getPrimitiveKindFromBufferClass(Utils.getJavaType(return_param.getType())); + if ( return_param.getAnnotation(GLboolean.class) != null ) + kind = PrimitiveType.Kind.BOOLEAN; + + if ( kind == PrimitiveType.Kind.BYTE && (return_param.getAnnotation(GLchar.class) != null || return_param.getAnnotation(GLcharARB.class) != null) ) + return "String"; + else { + final String type = JavaTypeTranslator.getPrimitiveClassFromKind(kind).getName(); + return buffer ? Character.toUpperCase(type.charAt(0)) + type.substring(1) : type; + } + } + + public static boolean needResultSize(MethodDeclaration method) { + return getNIOBufferType(getMethodReturnType(method)) != null && method.getAnnotation(AutoSize.class) == null; + } + + public static void printExtraCallArguments(PrintWriter writer, MethodDeclaration method, String size_parameter_name) { + writer.print(size_parameter_name); + if ( method.getAnnotation(CachedResult.class) != null ) { + writer.print(", " + CACHED_BUFFER_NAME); + } + } + + private static String getClassName(InterfaceDeclaration interface_decl, String opengl_name) { + Extension extension_annotation = interface_decl.getAnnotation(Extension.class); + if ( extension_annotation != null && !"".equals(extension_annotation.className()) ) { + return extension_annotation.className(); + } + StringBuilder result = new StringBuilder(); + for ( int i = 0; i < opengl_name.length(); i++ ) { + int ch = opengl_name.codePointAt(i); + if ( ch == '_' ) { + i++; + result.appendCodePoint(Character.toUpperCase(opengl_name.codePointAt(i))); + } else + result.appendCodePoint(ch); + } + return result.toString(); + } + + public static boolean hasMethodBufferObjectParameter(MethodDeclaration method) { + for ( ParameterDeclaration param : method.getParameters() ) { + if ( param.getAnnotation(BufferObject.class) != null ) { + return true; + } + } + return false; + } + + public static String getQualifiedClassName(InterfaceDeclaration interface_decl) { + return interface_decl.getPackage().getQualifiedName() + "." + getSimpleClassName(interface_decl); + } + + public static String getSimpleClassName(InterfaceDeclaration interface_decl) { + return getClassName(interface_decl, interface_decl.getSimpleName()); + } + + public static Class getNIOBufferType(TypeMirror t) { + Class param_type = getJavaType(t); + if ( Buffer.class.isAssignableFrom(param_type) ) + return param_type; + else if ( param_type == CharSequence.class || param_type == CharSequence[].class || param_type == PointerBuffer.class ) + return ByteBuffer.class; + else + return null; + } + + public static String getSimpleNativeMethodName(MethodDeclaration method, boolean generate_error_checks, boolean context_specific) { + String method_name; + Alternate alt_annotation = method.getAnnotation(Alternate.class); + method_name = alt_annotation == null || alt_annotation.nativeAlt() ? method.getSimpleName() : alt_annotation.value(); + if ( isMethodIndirect(generate_error_checks, context_specific, method) ) + method_name = OVERLOADED_METHOD_PREFIX + method_name; + return method_name; + } + + static boolean isReturnParameter(MethodDeclaration method, ParameterDeclaration param) { + GLreturn string_annotation = method.getAnnotation(GLreturn.class); + if ( string_annotation == null || !string_annotation.value().equals(param.getSimpleName()) ) + return false; + + if ( param.getAnnotation(OutParameter.class) == null ) + throw new RuntimeException("The parameter specified in @GLreturn is not annotated with @OutParameter in method: " + method); + + if ( param.getAnnotation(Check.class) != null ) + throw new RuntimeException("The parameter specified in @GLreturn is annotated with @Check in method: " + method); + + if ( param.getAnnotation(GLchar.class) != null && Utils.getJavaType(param.getType()).equals(ByteBuffer.class) && string_annotation.maxLength().length() == 0 ) + throw new RuntimeException("The @GLreturn annotation is missing a maxLength parameter in method: " + method); + + return true; + } + + static String getStringOffset(MethodDeclaration method, ParameterDeclaration param) { + String offset = null; + for ( ParameterDeclaration p : method.getParameters() ) { + if ( param != null && p.getSimpleName().equals(param.getSimpleName()) ) + break; + + if ( p.getAnnotation(NullTerminated.class) != null ) + continue; + + final Class type = Utils.getJavaType(p.getType()); + if ( type.equals(CharSequence.class) ) { + if ( offset == null ) + offset = p.getSimpleName() + ".length()"; + else + offset += " + " + p.getSimpleName() + ".length()"; + //if ( p.getAnnotation(NullTerminated.class) != null ) offset += " + 1"; + } else if ( type.equals(CharSequence[].class) ) { + if ( offset == null ) + offset = "APIUtil.getTotalLength(" + p.getSimpleName() + ")"; + else + offset += " + APIUtil.getTotalLength(" + p.getSimpleName() + ")"; + //if ( p.getAnnotation(NullTerminated.class) != null ) offset += " + " + p.getSimpleName() + ".length"; + } + + } + return offset; + } + + static void printGLReturnPre(PrintWriter writer, MethodDeclaration method, GLreturn return_annotation, TypeMap type_map) { + final String return_type = getMethodReturnType(method, return_annotation, true); + + if ( "String".equals(return_type) ) { + if ( !return_annotation.forceMaxLength() ) { + writer.println("IntBuffer " + return_annotation.value() + "_length = APIUtil.getLengths(" + type_map.getAPIUtilParam(false) + ");"); + writer.print("\t\t"); + } + writer.print("ByteBuffer " + return_annotation.value() + " = APIUtil.getBufferByte(" + type_map.getAPIUtilParam(true) + return_annotation.maxLength()); + /* + Params that use the return buffer will advance its position while filling it. When we return, the position will be + at the right spot for grabbing the returned string bytes. We only have to make sure that the original buffer was + large enough to hold everything, so that no re-allocations happen while filling. + */ + final String offset = getStringOffset(method, null); + if ( offset != null ) + writer.print(" + " + offset); + writer.println(");"); + } else { + final String buffer_type = "Boolean".equals(return_type) ? "Byte" : return_type; + writer.print(buffer_type + "Buffer " + return_annotation.value() + " = APIUtil.getBuffer" + buffer_type + "(" + type_map.getAPIUtilParam(false)); + if ( "Byte".equals(buffer_type) ) + writer.print((type_map.getAPIUtilParam(false).length() > 0 ? ", " : "") + "1"); + writer.println(");"); + } + + final Code code_annotation = method.getAnnotation(Code.class); + if ( code_annotation != null && code_annotation.tryBlock() ) { + writer.println("\t\ttry {"); + writer.print("\t\t\t"); + } else + writer.print("\t\t"); + } + + static void printGLReturnPost(PrintWriter writer, MethodDeclaration method, GLreturn return_annotation, TypeMap type_map) { + final String return_type = getMethodReturnType(method, return_annotation, true); + + if ( "String".equals(return_type) ) { + writer.print("\t\t" + return_annotation.value() + ".limit("); + final String offset = getStringOffset(method, null); + if ( offset != null ) + writer.print(offset + " + "); + if ( return_annotation.forceMaxLength() ) + writer.print(return_annotation.maxLength()); + else + writer.print(return_annotation.value() + "_length.get(0)"); + writer.println(");"); + writer.println("\t\treturn APIUtil.getString(" + type_map.getAPIUtilParam(true) + return_annotation.value() + ");"); + } else { + writer.print("\t\treturn " + return_annotation.value() + ".get(0)"); + if ( "Boolean".equals(return_type) ) + writer.print(" == 1"); + writer.println(";"); + } + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALTypeMap.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALTypeMap.java new file mode 100644 index 0000000..e1aed20 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALTypeMap.java @@ -0,0 +1,246 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.util.generator.openal; + +/** + * + * The OpenAL specific generator behaviour + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: ALTypeMap.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.Signedness; +import org.lwjgl.util.generator.TypeMap; + +import com.sun.mirror.declaration.*; +import com.sun.mirror.type.*; + +import java.io.*; +import java.lang.annotation.Annotation; +import java.util.*; +import java.nio.*; + +public class ALTypeMap implements TypeMap { + private static final Map native_types_to_primitive; + + static { + native_types_to_primitive = new HashMap(); + native_types_to_primitive.put(ALboolean.class, PrimitiveType.Kind.BOOLEAN); + native_types_to_primitive.put(ALbyte.class, PrimitiveType.Kind.BYTE); + native_types_to_primitive.put(ALenum.class, PrimitiveType.Kind.INT); + native_types_to_primitive.put(ALfloat.class, PrimitiveType.Kind.FLOAT); + native_types_to_primitive.put(ALdouble.class, PrimitiveType.Kind.DOUBLE); + native_types_to_primitive.put(ALint.class, PrimitiveType.Kind.INT); + native_types_to_primitive.put(ALshort.class, PrimitiveType.Kind.SHORT); + native_types_to_primitive.put(ALsizei.class, PrimitiveType.Kind.INT); + native_types_to_primitive.put(ALubyte.class, PrimitiveType.Kind.BYTE); + native_types_to_primitive.put(ALuint.class, PrimitiveType.Kind.INT); + native_types_to_primitive.put(ALvoid.class, PrimitiveType.Kind.BYTE); + } + + public PrimitiveType.Kind getPrimitiveTypeFromNativeType(Class native_type) { + PrimitiveType.Kind kind = native_types_to_primitive.get(native_type); + if (kind == null) + throw new RuntimeException("Unsupported type " + native_type); + return kind; + } + + public Signedness getSignednessFromType(Class type) { + if (ALuint.class.equals(type)) + return Signedness.UNSIGNED; + else if (ALint.class.equals(type)) + return Signedness.SIGNED; + else if (ALshort.class.equals(type)) + return Signedness.SIGNED; + else if (ALbyte.class.equals(type)) + return Signedness.SIGNED; + else + return Signedness.NONE; + } + + public String translateAnnotation(Class annotation_type) { + if (annotation_type.equals(ALuint.class)) + return "i"; + else if (annotation_type.equals(ALint.class)) + return "i"; + else if (annotation_type.equals(ALshort.class)) + return "s"; + else if (annotation_type.equals(ALbyte.class)) + return "b"; + else if (annotation_type.equals(ALfloat.class)) + return "f"; + else if (annotation_type.equals(ALdouble.class)) + return "d"; + else if (annotation_type.equals(ALboolean.class) || annotation_type.equals(ALvoid.class)) + return ""; + else + throw new RuntimeException(annotation_type + " is not allowed"); + } + + public Class getNativeTypeFromPrimitiveType(PrimitiveType.Kind kind) { + Class type; + switch (kind) { + case INT: + type = ALint.class; + break; + case FLOAT: + type = ALfloat.class; + break; + case DOUBLE: + type = ALdouble.class; + break; + case SHORT: + type = ALshort.class; + break; + case BYTE: + type = ALbyte.class; + break; + case BOOLEAN: + type = ALboolean.class; + break; + default: + throw new RuntimeException(kind + " is not allowed"); + } + return type; + } + + private static Class[] getValidBufferTypes(Class type) { + if (type.equals(IntBuffer.class)) + return new Class[]{ALenum.class, ALint.class, ALsizei.class, ALuint.class}; + else if (type.equals(FloatBuffer.class)) + return new Class[]{ALfloat.class}; + else if (type.equals(ByteBuffer.class)) + return new Class[]{ALboolean.class, ALbyte.class, ALvoid.class}; + else if (type.equals(ShortBuffer.class)) + return new Class[]{ALshort.class}; + else if (type.equals(DoubleBuffer.class)) + return new Class[]{ALdouble.class}; + else + return new Class[]{}; + } + + private static Class[] getValidPrimitiveTypes(Class type) { + if (type.equals(int.class)) + return new Class[]{ALenum.class, ALint.class, ALsizei.class, ALuint.class}; + else if (type.equals(double.class)) + return new Class[]{ALdouble.class}; + else if (type.equals(float.class)) + return new Class[]{ALfloat.class}; + else if (type.equals(short.class)) + return new Class[]{ALshort.class}; + else if (type.equals(byte.class)) + return new Class[]{ALbyte.class}; + else if (type.equals(boolean.class)) + return new Class[]{ALboolean.class}; + else if (type.equals(void.class)) + return new Class[]{ALvoid.class}; + else + return new Class[]{}; + } + + public void printCapabilitiesInit(final PrintWriter writer) { + throw new UnsupportedOperationException(); + } + + public String getCapabilities() { + throw new UnsupportedOperationException(); + } + + public String getAPIUtilParam(boolean comma) { + return ""; + } + + public void printErrorCheckMethod(final PrintWriter writer, final MethodDeclaration method, final String tabs) { + writer.println(tabs + "Util.checkALError();"); + } + + public String getRegisterNativesFunctionName() { + return "extal_InitializeClass"; + } + + public String getTypedefPostfix() { + return ""; + } + + public String getFunctionPrefix() { + return "ALAPIENTRY"; + } + + public void printNativeIncludes(PrintWriter writer) { + writer.println("#include \"extal.h\""); + } + + public Class getStringElementType() { + return ALubyte.class; + } + + public Class getStringArrayType() { + return ALubyte.class; + } + + public Class getByteBufferArrayType() { + return ALubyte.class; + } + + public Class[] getValidAnnotationTypes(Class type) { + Class[] valid_types; + if (Buffer.class.isAssignableFrom(type)) + valid_types = getValidBufferTypes(type); + else if (type.isPrimitive()) + valid_types = getValidPrimitiveTypes(type); + else if (type.equals(String.class)) + valid_types = new Class[]{ALubyte.class}; + else + valid_types = new Class[]{}; + return valid_types; + } + + public Class getVoidType() { + return ALvoid.class; + } + + public Class getInverseType(Class type) { + if (ALuint.class.equals(type)) + return ALint.class; + else if (ALint.class.equals(type)) + return ALuint.class; + else + return null; + } + + public String getAutoTypeFromAnnotation(AnnotationMirror annotation) { + return null; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALboolean.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALboolean.java new file mode 100644 index 0000000..ed45b77 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALboolean.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.openal; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: ALboolean.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface ALboolean { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALbyte.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALbyte.java new file mode 100644 index 0000000..412e4b2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALbyte.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.openal; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: ALbyte.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface ALbyte { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALdouble.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALdouble.java new file mode 100644 index 0000000..aa6e081 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALdouble.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.openal; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: ALdouble.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface ALdouble { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALenum.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALenum.java new file mode 100644 index 0000000..4563691 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALenum.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.openal; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: ALenum.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface ALenum { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALfloat.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALfloat.java new file mode 100644 index 0000000..39e358a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALfloat.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.openal; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: ALfloat.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface ALfloat { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALint.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALint.java new file mode 100644 index 0000000..ae347e7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALint.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.openal; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: ALint.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface ALint { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALshort.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALshort.java new file mode 100644 index 0000000..603386b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALshort.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.openal; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: ALshort.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface ALshort { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALsizei.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALsizei.java new file mode 100644 index 0000000..b079c8f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALsizei.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.openal; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: ALsizei.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface ALsizei { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALubyte.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALubyte.java new file mode 100644 index 0000000..caf22ef --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALubyte.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.openal; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: ALubyte.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface ALubyte { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALuint.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALuint.java new file mode 100644 index 0000000..a31c2a3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALuint.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.openal; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: ALuint.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface ALuint { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALvoid.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALvoid.java new file mode 100644 index 0000000..9b645eb --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/openal/ALvoid.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.openal; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: ALvoid.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface ALvoid { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/CLCapabilitiesGenerator.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/CLCapabilitiesGenerator.java new file mode 100644 index 0000000..fabeb1f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/CLCapabilitiesGenerator.java @@ -0,0 +1,159 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.util.generator.opencl; + +import org.lwjgl.util.generator.*; + +import java.io.PrintWriter; +import java.util.Collection; +import java.util.Iterator; + +import com.sun.mirror.declaration.InterfaceDeclaration; +import com.sun.mirror.declaration.MethodDeclaration; +import com.sun.mirror.declaration.TypeDeclaration; + +/** + * CLCapabilities generator. + * + * @author Spasi + */ +public class CLCapabilitiesGenerator { + + static void generateClassPrologue(final PrintWriter writer) { + writer.println("public final class " + CLGeneratorProcessorFactory.CLCAPS_CLASS_NAME + " {"); + writer.println(); + } + + static void generateSymbolAddresses(final PrintWriter writer, final InterfaceDeclaration d) { + final Alias alias_annotation = d.getAnnotation(Alias.class); + final boolean aliased = alias_annotation != null && alias_annotation.postfix().length() > 0; + + boolean foundNative = false; + for ( final MethodDeclaration method : d.getMethods() ) { + if ( method.getAnnotation(Alternate.class) != null || method.getAnnotation(Reuse.class) != null ) + continue; + + if ( !foundNative ) { + //writer.println("\t// " + d.getSimpleName()); + writer.println("\tstatic final boolean " + CLGeneratorProcessorFactory.getExtensionName(d.getSimpleName()) + ";"); + foundNative = true; + } + writer.print("\tstatic final long " + Utils.getFunctionAddressName(d, method) + " = CL.getFunctionAddress("); + + if ( aliased ) + writer.println("new String [] {\"" + Utils.getFunctionAddressName(d, method) + "\",\"" + method.getSimpleName() + alias_annotation.postfix() + "\"});"); + else + writer.println("\"" + Utils.getFunctionAddressName(d, method) + "\");"); + } + + if ( foundNative ) + writer.println(); + } + + static void generateConstructor(final PrintWriter writer, final Collection interface_decls) { + writer.println("\tprivate " + CLGeneratorProcessorFactory.CLCAPS_CLASS_NAME + "() {}"); + writer.println(); + writer.println("\tstatic {"); + + for ( final TypeDeclaration d : interface_decls ) { + if ( d.getMethods().isEmpty() ) + continue; + + //writer.println("\t\tif ( " + getExtensionSupportedName(d.getSimpleName()) + "() )"); + //writer.println("\t\t\t" + SUPPORTED_EXTS + ".add(\"" + CLGeneratorProcessorFactory.getExtensionName(d.getSimpleName()) + "\");"); + writer.println("\t\t" + CLGeneratorProcessorFactory.getExtensionName(d.getSimpleName()) + " = " + getExtensionSupportedName(d.getSimpleName()) + "();"); + } + + writer.println("\t}\n"); + } + + static void generateExtensionChecks(final PrintWriter writer, final InterfaceDeclaration d) { + Iterator methods = d.getMethods().iterator(); + if ( !methods.hasNext() ) + return; + + writer.println("\tprivate static boolean " + getExtensionSupportedName(d.getSimpleName()) + "() {"); + writer.println("\t\treturn "); + + boolean first = true; + while ( methods.hasNext() ) { + MethodDeclaration method = methods.next(); + if ( method.getAnnotation(Alternate.class) != null ) + continue; + + if ( !first ) + writer.println(" &"); + else + first = false; + + final boolean optional = method.getAnnotation(Optional.class) != null; + + writer.print("\t\t\t"); + if ( optional ) + writer.print('('); + writer.print(Utils.getFunctionAddressName(d, method) + " != 0"); + if ( optional ) + writer.print(" || true)"); + } + writer.println(";"); + writer.println("\t}"); + writer.println(); + } + + private static String getExtensionSupportedName(final String class_name) { + return "is" + class_name + "Supported"; + } + + public static void generateCapabilitiesGetters(final PrintWriter writer) { + writer.println("\tpublic static CLPlatformCapabilities getPlatformCapabilities(final CLPlatform platform) {\n" + + "\t\tplatform.checkValid();\n" + + "\n" + + "\t\tCLPlatformCapabilities caps = (CLPlatformCapabilities)platform.getCapabilities();\n" + + "\t\tif ( caps == null )\n" + + "\t\t\tplatform.setCapabilities(caps = new CLPlatformCapabilities(platform));\n" + + "\n" + + "\t\treturn caps;\n" + + "\t}\n"); + + writer.println("\tpublic static CLDeviceCapabilities getDeviceCapabilities(final CLDevice device) {\n" + + "\t\tdevice.checkValid();\n" + + "\n" + + "\t\tCLDeviceCapabilities caps = (CLDeviceCapabilities)device.getCapabilities();\n" + + "\t\tif ( caps == null )\n" + + "\t\t\tdevice.setCapabilities(caps = new CLDeviceCapabilities(device));\n" + + "\n" + + "\t\treturn caps;\n" + + "\t}\n"); + + } +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/CLDeviceExtension.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/CLDeviceExtension.java new file mode 100644 index 0000000..f34e8f5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/CLDeviceExtension.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opencl; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +/** Extension templates marked with @CLDeviceExtension will be considered CL device extensions. */ +@Target(ElementType.TYPE) +public @interface CLDeviceExtension { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/CLGeneratorProcessorFactory.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/CLGeneratorProcessorFactory.java new file mode 100644 index 0000000..d881fc1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/CLGeneratorProcessorFactory.java @@ -0,0 +1,181 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.util.generator.opencl; + +import org.lwjgl.PointerWrapper; +import org.lwjgl.opencl.CLDevice; +import org.lwjgl.opencl.CLPlatform; + +import java.io.File; +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.annotation.Annotation; +import java.util.Arrays; +import java.util.Collection; +import java.util.Set; + +import com.sun.mirror.apt.*; +import com.sun.mirror.declaration.AnnotationTypeDeclaration; +import com.sun.mirror.declaration.InterfaceDeclaration; +import com.sun.mirror.declaration.TypeDeclaration; +import com.sun.mirror.util.DeclarationFilter; + +import static java.util.Collections.*; + +/** + * Generator tool for creating the OpenCL capabilities classes + * + * @author Spasi + */ +public class CLGeneratorProcessorFactory implements AnnotationProcessorFactory, RoundCompleteListener { + + public static final String CLCAPS_CLASS_NAME = "CLCapabilities"; + public static final String PLATFORM_CAPS_CLASS_NAME = "CLPlatformCapabilities"; + public static final String DEVICE_CAPS_CLASS_NAME = "CLDeviceCapabilities"; + + private static final String EXTENSION_PREFIX = "CL_"; + private static final String CORE_PREFIX = "Open"; + + private static boolean first_round = true; + + // Process any set of annotations + private static final Collection supportedAnnotations = unmodifiableCollection(Arrays.asList("*")); + + public Collection supportedAnnotationTypes() { + return supportedAnnotations; + } + + public Collection supportedOptions() { + return unmodifiableCollection(Arrays.asList("-Acontextspecific")); + } + + public void roundComplete(RoundCompleteEvent event) { + first_round = false; + } + + public AnnotationProcessor getProcessorFor(Set atds, AnnotationProcessorEnvironment env) { + // Only process the initial types, not the generated ones + if ( first_round ) { + env.addListener(this); + return new GeneratorProcessor(env); + } else + return AnnotationProcessors.NO_OP; + } + + static String getExtensionName(String interface_name) { + if ( interface_name.startsWith("CL") ) + return CORE_PREFIX + interface_name; + else + return EXTENSION_PREFIX + interface_name; + } + + private static class GeneratorProcessor implements AnnotationProcessor { + + private final AnnotationProcessorEnvironment env; + + GeneratorProcessor(AnnotationProcessorEnvironment env) { + this.env = env; + } + + public void process() { + try { + generateCLCapabilitiesSource(); + generateCLPDCapabilitiesSource(CLPlatformExtension.class, PLATFORM_CAPS_CLASS_NAME, CLPlatform.class, "platform"); + generateCLPDCapabilitiesSource(CLDeviceExtension.class, DEVICE_CAPS_CLASS_NAME, CLDevice.class, "device"); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + private static void printHeader(final PrintWriter writer) { + writer.println("/* MACHINE GENERATED FILE, DO NOT EDIT */"); + writer.println(); + writer.println("package org.lwjgl.opencl;"); + writer.println(); + } + + private void generateCLCapabilitiesSource() throws IOException { + final PrintWriter writer = env.getFiler().createTextFile(Filer.Location.SOURCE_TREE, "org.lwjgl.opencl", new File(CLCAPS_CLASS_NAME + ".java"), null); + printHeader(writer); + + CLCapabilitiesGenerator.generateClassPrologue(writer); + + final Collection templates = DeclarationFilter.getFilter(InterfaceDeclaration.class).filter(env.getSpecifiedTypeDeclarations()); + + for ( final TypeDeclaration t : templates ) { + if ( t.getAnnotation(CLPlatformExtension.class) == null && t.getAnnotation(CLDeviceExtension.class) == null && !t.getSimpleName().startsWith("CL") ) + throw new RuntimeException("An OpenCL extension is missing an extension type annotation: " + t.getSimpleName()); + + CLCapabilitiesGenerator.generateSymbolAddresses(writer, (InterfaceDeclaration)t); + } + writer.println(); + + CLCapabilitiesGenerator.generateConstructor(writer, templates); + + CLCapabilitiesGenerator.generateCapabilitiesGetters(writer); + + for ( final TypeDeclaration template : templates ) + CLCapabilitiesGenerator.generateExtensionChecks(writer, (InterfaceDeclaration)template); + + writer.println("}"); + writer.close(); + } + + private void generateCLPDCapabilitiesSource(final Class capsType, final String capsName, final Class objectType, final String objectName) throws IOException { + final PrintWriter writer = env.getFiler().createTextFile(Filer.Location.SOURCE_TREE, "org.lwjgl.opencl", new File(capsName + ".java"), null); + printHeader(writer); + writer.println("import java.util.*;"); + writer.println(); + + CLPDCapabilitiesGenerator.generateClassPrologue(writer, capsName); + + final Collection templates = DeclarationFilter.getFilter(InterfaceDeclaration.class).filter(env.getSpecifiedTypeDeclarations()); + + for ( final TypeDeclaration t : templates ) { + if ( t.getAnnotation(capsType) != null ) + CLPDCapabilitiesGenerator.generateExtensions(writer, (InterfaceDeclaration)t); + } + writer.println(); + + CLPDCapabilitiesGenerator.generateConstructor(writer, templates, capsType, capsName, objectType, objectName); + + CLPDCapabilitiesGenerator.generateGetters(writer); + + CLPDCapabilitiesGenerator.generateToString(writer, templates, capsType); + + writer.println("}"); + writer.close(); + } + + } +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/CLPDCapabilitiesGenerator.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/CLPDCapabilitiesGenerator.java new file mode 100644 index 0000000..9d7f10e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/CLPDCapabilitiesGenerator.java @@ -0,0 +1,148 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.util.generator.opencl; + +import org.lwjgl.PointerWrapper; +import org.lwjgl.util.generator.Private; + +import java.io.PrintWriter; +import java.lang.annotation.Annotation; +import java.util.Collection; + +import com.sun.mirror.declaration.InterfaceDeclaration; +import com.sun.mirror.declaration.TypeDeclaration; + +/** + * CL platform/device capabilities generator. + * + * @author Spasi + */ +public class CLPDCapabilitiesGenerator { + + // TODO: Add future versions here + private static final int[][] CL_VERSIONS = { + { 1, 2 }, // OpenCL 1 + }; + + static void generateClassPrologue(final PrintWriter writer, final String name) { + writer.println("public class " + name + " {"); + writer.println(); + writer.println("\tpublic final int majorVersion;"); + writer.println("\tpublic final int minorVersion;"); + writer.println(); + for ( int major = 1; major <= CL_VERSIONS.length; major++ ) { + for ( final int minor : CL_VERSIONS[major - 1] ) + writer.println("\tpublic final boolean OpenCL" + Integer.toString(major) + Integer.toString(minor) + ";"); + } + writer.println(); + } + + static void generateExtensions(final PrintWriter writer, final InterfaceDeclaration d) { + writer.print("\t"); + + if ( d.getAnnotation(Private.class) == null ) + writer.print("public "); + + writer.println("final boolean " + CLGeneratorProcessorFactory.getExtensionName(d.getSimpleName()) + ";"); + } + + static void generateConstructor(final PrintWriter writer, final Collection templates, + final Class capsType, final String capsName, + final Class objectType, final String objectName) { + writer.println("\tpublic " + capsName + "(final " + objectType.getSimpleName() + ' ' + objectName + ") {"); + + writer.println("\t\tfinal String extensionList = " + objectName + ".getInfoString(CL10.CL_" + objectName.toUpperCase() + "_EXTENSIONS);\n" + + "\t\tfinal String version = " + objectName + ".getInfoString(CL10.CL_" + objectName.toUpperCase() + "_VERSION);\n" + + "\t\tif ( !version.startsWith(\"OpenCL \") )\n" + + "\t\t\tthrow new RuntimeException(\"Invalid OpenCL version string: \" + version);\n\n" + + "\t\ttry {\n" + + "\t\t\tfinal StringTokenizer tokenizer = new StringTokenizer(version.substring(7), \". \");\n" + + "\n" + + "\t\t\tmajorVersion = Integer.parseInt(tokenizer.nextToken());\n" + + "\t\t\tminorVersion = Integer.parseInt(tokenizer.nextToken());\n"); + + for ( int major = 1; major <= CL_VERSIONS.length; major++ ) { + for ( final int minor : CL_VERSIONS[major - 1] ) + writer.println("\t\t\tOpenCL" + Integer.toString(major) + Integer.toString(minor) + " = " + major + " < majorVersion || (" + major + " == majorVersion && " + minor + " <= minorVersion);"); + } + + writer.println("\t\t} catch (RuntimeException e) {\n" + + "\t\t\tthrow new RuntimeException(\"The major and/or minor OpenCL version \\\"\" + version + \"\\\" is malformed: \" + e.getMessage());\n" + + "\t\t}\n"); + + writer.println("\t\tfinal Set extensions = APIUtil.getExtensions(extensionList);"); + + for ( final TypeDeclaration t : templates ) { + if ( t.getAnnotation(capsType) == null ) + continue; + + final String extName = CLGeneratorProcessorFactory.getExtensionName(t.getSimpleName()); + + writer.print("\t\t" + extName + " = extensions.contains(\"" + extName.toLowerCase() + "\")"); + if ( !t.getMethods().isEmpty() ) + writer.print(" && CLCapabilities." + extName); + writer.println(";"); + } + + writer.println("\t}\n"); + } + + public static void generateGetters(final PrintWriter writer) { + writer.println("\tpublic int getMajorVersion() {"); + writer.println("\t\treturn majorVersion;"); + writer.println("\t}\n"); + + writer.println("\tpublic int getMinorVersion() {"); + writer.println("\t\treturn minorVersion;"); + writer.println("\t}\n"); + } + + public static void generateToString(final PrintWriter writer, final Collection templates, final Class capsType) { + writer.println("\tpublic String toString() {"); + writer.println("\t\tfinal StringBuilder buf = new StringBuilder();\n"); + + writer.println("\t\tbuf.append(\"OpenCL \").append(majorVersion).append('.').append(minorVersion);"); + writer.println(); + writer.println("\t\tbuf.append(\" - Extensions: \");"); + for ( final TypeDeclaration t : templates ) { + if ( t.getAnnotation(capsType) == null ) + continue; + + writer.println("\t\tif ( " + CLGeneratorProcessorFactory.getExtensionName(t.getSimpleName()) + " ) buf.append(\"" + CLGeneratorProcessorFactory.getExtensionName(t.getSimpleName()).toLowerCase() + " \");"); + } + + writer.println("\n\t\treturn buf.toString();"); + writer.println("\t}\n"); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/CLPlatformExtension.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/CLPlatformExtension.java new file mode 100644 index 0000000..e8ddadc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/CLPlatformExtension.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opencl; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +/** Extension templates marked with @CLPlatformExtension will be considered CL platform extensions. */ +@Target(ElementType.TYPE) +public @interface CLPlatformExtension { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/CLTypeMap.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/CLTypeMap.java new file mode 100644 index 0000000..9b6433a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/CLTypeMap.java @@ -0,0 +1,270 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.util.generator.opencl; + +/** + * + * OpenCL specific generator behaviour + * + * @author Spasi + */ + +import org.lwjgl.PointerBuffer; +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLreturn; + +import java.io.PrintWriter; +import java.lang.annotation.Annotation; +import java.nio.*; +import java.util.HashMap; +import java.util.Map; + +import com.sun.mirror.declaration.AnnotationMirror; +import com.sun.mirror.declaration.MethodDeclaration; +import com.sun.mirror.declaration.ParameterDeclaration; +import com.sun.mirror.type.PrimitiveType; + +public class CLTypeMap implements TypeMap { + + private static final Map native_types_to_primitive; + + static { + native_types_to_primitive = new HashMap(); + native_types_to_primitive.put(cl_void.class, PrimitiveType.Kind.BYTE); + native_types_to_primitive.put(cl_byte.class, PrimitiveType.Kind.BYTE); + native_types_to_primitive.put(cl_char.class, PrimitiveType.Kind.BYTE); + native_types_to_primitive.put(cl_uchar.class, PrimitiveType.Kind.BYTE); + native_types_to_primitive.put(cl_short.class, PrimitiveType.Kind.SHORT); + native_types_to_primitive.put(cl_bool.class, PrimitiveType.Kind.INT); + native_types_to_primitive.put(cl_int.class, PrimitiveType.Kind.INT); + native_types_to_primitive.put(cl_uint.class, PrimitiveType.Kind.INT); + native_types_to_primitive.put(cl_long.class, PrimitiveType.Kind.LONG); + native_types_to_primitive.put(size_t.class, PrimitiveType.Kind.LONG); + native_types_to_primitive.put(cl_bitfield.class, PrimitiveType.Kind.LONG); + native_types_to_primitive.put(cl_float.class, PrimitiveType.Kind.FLOAT); + native_types_to_primitive.put(cl_double.class, PrimitiveType.Kind.DOUBLE); + } + + public PrimitiveType.Kind getPrimitiveTypeFromNativeType(Class native_type) { + PrimitiveType.Kind kind = native_types_to_primitive.get(native_type); + if ( kind == null ) + throw new RuntimeException("Unsupported type " + native_type); + return kind; + } + + public void printCapabilitiesInit(final PrintWriter writer) { + } + + public String getCapabilities() { + return "CLCapabilities"; + } + + public String getAPIUtilParam(boolean comma) { + return ""; + } + + public void printErrorCheckMethod(final PrintWriter writer, final MethodDeclaration method, final String tabs) { + final Check check = method.getAnnotation(Check.class); + if ( check != null ) // Get the error code from an IntBuffer output parameter + writer.println(tabs + "Util.checkCLError(" + check.value() + ".get(" + check.value() + ".position()));"); + else { + final Class return_type = Utils.getJavaType(method.getReturnType()); + if ( return_type == int.class ) + writer.println(tabs + "Util.checkCLError(__result);"); + else { + boolean hasErrCodeParam = false; + for ( final ParameterDeclaration param : method.getParameters() ) { + if ( "errcode_ret".equals(param.getSimpleName()) && Utils.getJavaType(param.getType()) == IntBuffer.class ) { + hasErrCodeParam = true; + break; + } + } + if ( hasErrCodeParam ) + throw new RuntimeException("A method is missing the @Check annotation: " + method.toString()); + } + } + } + + public String getRegisterNativesFunctionName() { + return "extcl_InitializeClass"; + } + + public Signedness getSignednessFromType(Class type) { + if ( cl_uint.class.equals(type) ) + return Signedness.UNSIGNED; + else if ( cl_int.class.equals(type) ) + return Signedness.SIGNED; + else + return Signedness.NONE; + } + + public String translateAnnotation(Class annotation_type) { + if ( annotation_type.equals(cl_uint.class) || annotation_type.equals(cl_int.class) ) + return "i"; + else if ( annotation_type.equals(cl_short.class) ) + return "s"; + else if ( annotation_type.equals(cl_byte.class) ) + return "b"; + else if ( annotation_type.equals(cl_float.class) ) + return "f"; + else if ( annotation_type.equals(cl_double.class) ) + return "d"; + else + throw new RuntimeException(annotation_type + " is not allowed"); + } + + public Class getNativeTypeFromPrimitiveType(PrimitiveType.Kind kind) { + Class type; + switch ( kind ) { + case INT: + type = cl_int.class; + break; + case DOUBLE: + type = cl_double.class; + break; + case FLOAT: + type = cl_float.class; + break; + case SHORT: + type = cl_short.class; + break; + case BYTE: + type = cl_byte.class; + break; + case LONG: + type = cl_long.class; + break; + case BOOLEAN: + type = cl_bool.class; + break; + default: + throw new RuntimeException(kind + " is not allowed"); + } + return type; + } + + public Class getVoidType() { + return cl_void.class; + } + + public Class getStringElementType() { + return cl_char.class; + } + + public Class getStringArrayType() { + return cl_char.class; + } + + public Class getByteBufferArrayType() { + return cl_uchar.class; + } + + private static Class[] getValidBufferTypes(Class type) { + if ( type.equals(IntBuffer.class) ) + return new Class[] { cl_int.class, cl_uint.class }; + else if ( type.equals(FloatBuffer.class) ) + return new Class[] { cl_float.class }; + else if ( type.equals(ByteBuffer.class) ) + return new Class[] { cl_byte.class, cl_char.class, cl_uchar.class, cl_void.class }; + else if ( type.equals(ShortBuffer.class) ) + return new Class[] { cl_short.class }; + else if ( type.equals(DoubleBuffer.class) ) + return new Class[] { cl_double.class }; + else if ( type.equals(LongBuffer.class) ) + return new Class[] { cl_long.class }; + else if ( type.equals(PointerBuffer.class) ) + return new Class[] { size_t.class }; + else + return new Class[] { }; + } + + private static Class[] getValidPrimitiveTypes(Class type) { + if ( type.equals(long.class) ) + return new Class[] { cl_long.class, size_t.class, cl_bitfield.class }; + else if ( type.equals(int.class) ) + return new Class[] { cl_int.class, cl_uint.class, cl_bool.class }; + else if ( type.equals(double.class) ) + return new Class[] { cl_double.class }; + else if ( type.equals(float.class) ) + return new Class[] { cl_float.class }; + else if ( type.equals(short.class) ) + return new Class[] { cl_short.class }; + else if ( type.equals(byte.class) ) + return new Class[] { cl_byte.class, cl_char.class, cl_uchar.class }; + else if ( type.equals(boolean.class) ) + return new Class[] { cl_bool.class }; + else if ( type.equals(void.class) ) + return new Class[] { cl_void.class }; + else + return new Class[] { }; + } + + public String getTypedefPostfix() { + return "CL_API_ENTRY "; + } + + public String getFunctionPrefix() { + return "CL_API_CALL"; + } + + public void printNativeIncludes(PrintWriter writer) { + writer.println("#include \"extcl.h\""); + } + + public Class[] getValidAnnotationTypes(Class type) { + Class[] valid_types; + if ( Buffer.class.isAssignableFrom(type) || PointerBuffer.class.isAssignableFrom(type) ) + valid_types = getValidBufferTypes(type); + else if ( type.isPrimitive() ) + valid_types = getValidPrimitiveTypes(type); + else if ( String.class.equals(type) ) + valid_types = new Class[] { cl_byte.class }; + else if ( org.lwjgl.PointerWrapper.class.isAssignableFrom(type) ) + valid_types = new Class[] { PointerWrapper.class }; + else if ( ByteBuffer[].class == type ) + valid_types = new Class[] { cl_char.class, cl_uchar.class }; + else if ( void.class.equals(type) ) + valid_types = new Class[] { GLreturn.class }; + else + valid_types = new Class[] { }; + return valid_types; + } + + public Class getInverseType(Class type) { + return null; + } + + public String getAutoTypeFromAnnotation(AnnotationMirror annotation) { + return null; + } +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_bitfield.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_bitfield.java new file mode 100644 index 0000000..4b21651 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_bitfield.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opencl; + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@NativeType +@Target({ ElementType.PARAMETER }) +public @interface cl_bitfield { + String alias() default ""; +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_bool.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_bool.java new file mode 100644 index 0000000..73792b6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_bool.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opencl; + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@NativeType +@Target({ ElementType.PARAMETER }) +public @interface cl_bool { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_byte.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_byte.java new file mode 100644 index 0000000..28bc59e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_byte.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opencl; + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@NativeType +@Target({ ElementType.PARAMETER, ElementType.METHOD }) +public @interface cl_byte { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_char.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_char.java new file mode 100644 index 0000000..c275db4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_char.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opencl; + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@NativeType +@Target({ ElementType.PARAMETER }) +public @interface cl_char { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_double.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_double.java new file mode 100644 index 0000000..8459a87 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_double.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opencl; + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@NativeType +@Target({ ElementType.PARAMETER, ElementType.METHOD }) +public @interface cl_double { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_float.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_float.java new file mode 100644 index 0000000..44c9cb1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_float.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opencl; + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@NativeType +@Target({ ElementType.PARAMETER, ElementType.METHOD }) +public @interface cl_float { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_int.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_int.java new file mode 100644 index 0000000..b515e4e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_int.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opencl; + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@NativeType +@Target({ ElementType.PARAMETER, ElementType.METHOD }) +public @interface cl_int { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_long.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_long.java new file mode 100644 index 0000000..c34aa6a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_long.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opencl; + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@NativeType +@Target({ ElementType.PARAMETER }) +public @interface cl_long { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_short.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_short.java new file mode 100644 index 0000000..23ce10d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_short.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opencl; + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@NativeType +@Target({ ElementType.PARAMETER, ElementType.METHOD }) +public @interface cl_short { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_uchar.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_uchar.java new file mode 100644 index 0000000..825a479 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_uchar.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opencl; + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@NativeType +@Target({ ElementType.PARAMETER }) +public @interface cl_uchar { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_uint.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_uint.java new file mode 100644 index 0000000..50a335a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_uint.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opencl; + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@NativeType +@Target({ ElementType.PARAMETER, ElementType.METHOD }) +public @interface cl_uint { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_void.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_void.java new file mode 100644 index 0000000..6cf5631 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/cl_void.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opencl; + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +import com.sun.mirror.type.PrimitiveType; + +@NativeType +@Target({ ElementType.PARAMETER, ElementType.METHOD }) +public @interface cl_void { + PrimitiveType.Kind value() default PrimitiveType.Kind.BYTE; +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/size_t.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/size_t.java new file mode 100644 index 0000000..b6bdeab --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opencl/size_t.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opencl; + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@NativeType +@Target({ ElementType.PARAMETER }) +public @interface size_t { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/EGLint64NV.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/EGLint64NV.java new file mode 100644 index 0000000..99a6e68 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/EGLint64NV.java @@ -0,0 +1,12 @@ +package org.lwjgl.util.generator.opengl; + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@NativeType +@Target({ ElementType.PARAMETER, ElementType.METHOD }) +public @interface EGLint64NV { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/EGLuint64NV.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/EGLuint64NV.java new file mode 100644 index 0000000..e633d57 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/EGLuint64NV.java @@ -0,0 +1,12 @@ +package org.lwjgl.util.generator.opengl; + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@NativeType +@Target({ ElementType.PARAMETER, ElementType.METHOD }) +public @interface EGLuint64NV { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLCapabilitiesGenerator.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLCapabilitiesGenerator.java new file mode 100644 index 0000000..b15a4dd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLCapabilitiesGenerator.java @@ -0,0 +1,329 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.util.generator.opengl; + +import org.lwjgl.util.generator.*; + +import java.io.PrintWriter; +import java.util.Arrays; +import java.util.Collection; +import java.util.EnumSet; +import java.util.Iterator; + +import com.sun.mirror.declaration.InterfaceDeclaration; +import com.sun.mirror.declaration.MethodDeclaration; +import com.sun.mirror.type.InterfaceType; + +/** + * Generator visitor for the context capabilities generator tool + * + * @author elias_naur + * @version $Revision: 3355 $ + * $Id: ContextCapabilitiesGenerator.java 3355 2010-05-27 22:56:29Z spasi $ + */ +public class GLCapabilitiesGenerator { + + private static final String STUBS_LOADED_NAME = "loaded_stubs"; + private static final String ALL_INIT_METHOD_NAME = "initAllStubs"; + private static final String POINTER_INITIALIZER_POSTFIX = "_initNativeFunctionAddresses"; + private static final String CACHED_EXTS_VAR_NAME = "supported_extensions"; + private static final String PROFILE_MASK_VAR_NAME = "profileMask"; + private static final String EXTENSION_PREFIX = "GL_"; + private static final String CORE_PREFIX = "Open"; + + public static void generateClassPrologue(PrintWriter writer, boolean context_specific, boolean generate_error_checks) { + writer.println("public class " + Utils.CONTEXT_CAPS_CLASS_NAME + " {"); + writer.println("\tstatic final boolean DEBUG = " + Boolean.toString(generate_error_checks) + ";"); + writer.println("\tfinal APIUtil util = new APIUtil();"); + writer.println("\tfinal StateTracker tracker = new StateTracker();"); + writer.println(); + if ( !context_specific ) { + writer.println("\tprivate static boolean " + STUBS_LOADED_NAME + " = false;"); + } + } + + public static void generateInitializerPrologue(PrintWriter writer) { + writer.println("\t" + Utils.CONTEXT_CAPS_CLASS_NAME + "(boolean forwardCompatible) throws LWJGLException {"); + writer.println("\t\tSet " + CACHED_EXTS_VAR_NAME + " = " + ALL_INIT_METHOD_NAME + "(forwardCompatible);"); + } + + private static String translateFieldName(String interface_name) { + if ( interface_name.startsWith("GL") ) + return CORE_PREFIX + interface_name; + else + return EXTENSION_PREFIX + interface_name; + } + + public static void generateSuperClassAdds(PrintWriter writer, InterfaceDeclaration d) { + Collection super_interfaces = d.getSuperinterfaces(); + if ( super_interfaces.size() > 1 ) + throw new RuntimeException(d + " extends more than one other interface"); + if ( super_interfaces.size() == 1 ) { + InterfaceType super_interface = super_interfaces.iterator().next(); + writer.print("\t\tif (" + CACHED_EXTS_VAR_NAME + ".contains(\""); + writer.println(translateFieldName(d.getSimpleName()) + "\"))"); + writer.print("\t\t\t"); + generateAddExtension(writer, super_interface.getDeclaration()); + } + } + + public static void generateInitializer(PrintWriter writer, InterfaceDeclaration d) { + String translated_field_name = translateFieldName(d.getSimpleName()); + writer.print("\t\tthis." + translated_field_name + " = "); + writer.print(CACHED_EXTS_VAR_NAME + ".contains(\""); + writer.print(translated_field_name + "\")"); + Collection super_interfaces = d.getSuperinterfaces(); + if ( super_interfaces.size() > 1 ) + throw new RuntimeException(d + " extends more than one other interface"); + if ( super_interfaces.size() == 1 ) { + InterfaceType super_interface = super_interfaces.iterator().next(); + writer.println(); + writer.print("\t\t\t&& " + CACHED_EXTS_VAR_NAME + ".contains(\""); + writer.print(translateFieldName(super_interface.getDeclaration().getSimpleName()) + "\")"); + } + Alias alias_annotation = d.getAnnotation(Alias.class); + if ( alias_annotation != null ) { + writer.println(); + writer.print("\t\t\t|| " + CACHED_EXTS_VAR_NAME + ".contains(\""); + writer.print(translateFieldName(alias_annotation.value()) + "\")"); + } + writer.println(";"); + } + + private static String getAddressesInitializerName(String class_name) { + return class_name + POINTER_INITIALIZER_POSTFIX; + } + + public static void generateInitStubsPrologue(PrintWriter writer, boolean context_specific) { + writer.println("\tprivate Set " + ALL_INIT_METHOD_NAME + "(boolean forwardCompatible) throws LWJGLException {"); + + // Load the basic pointers we need to detect OpenGL version and supported extensions. + writer.println("\t\tglGetError = GLContext.getFunctionAddress(\"glGetError\");"); + writer.println("\t\tglGetString = GLContext.getFunctionAddress(\"glGetString\");"); + + // Initialize GL11.glGetIntegerv and GL30.glGetStringi here, in case we have created an OpenGL 3.0 context. + // (they will be used in GLContext.getSupportedExtensions) + writer.println("\t\tglGetIntegerv = GLContext.getFunctionAddress(\"glGetIntegerv\");"); + writer.println("\t\tglGetStringi = GLContext.getFunctionAddress(\"glGetStringi\");"); + + // Get the supported extensions set. + writer.println("\t\tGLContext.setCapabilities(this);"); + writer.println("\t\tSet " + CACHED_EXTS_VAR_NAME + " = new HashSet(256);"); + writer.println("\t\tint " + PROFILE_MASK_VAR_NAME + " = GLContext.getSupportedExtensions(" + CACHED_EXTS_VAR_NAME + ");"); + + // Force forward compatible mode when OpenGL version is 3.1 or higher and ARB_compatibility is not available. + writer.println("\t\tif ( supported_extensions.contains(\"OpenGL31\") && !(supported_extensions.contains(\"GL_ARB_compatibility\") || (profileMask & GL32.GL_CONTEXT_COMPATIBILITY_PROFILE_BIT) != 0) )"); + writer.println("\t\t\tforwardCompatible = true;"); + + if ( !context_specific ) { + writer.println("\t\tif (" + STUBS_LOADED_NAME + ")"); + writer.println("\t\t\treturn GLContext.getSupportedExtensions();"); + writer.println("\t\torg.lwjgl.opengl.GL11." + Utils.STUB_INITIALIZER_NAME + "();"); + } else { + writer.println("\t\tif (!" + getAddressesInitializerName("GL11") + "(forwardCompatible))"); + writer.println("\t\t\tthrow new LWJGLException(\"GL11 not supported\");"); + } + } + + public static void generateInitStubsEpilogue(PrintWriter writer, boolean context_specific) { + if ( !context_specific ) { + writer.println("\t\t" + STUBS_LOADED_NAME + " = true;"); + } + writer.println("\t\treturn " + CACHED_EXTS_VAR_NAME + ";"); + writer.println("\t}"); + } + + public static void generateUnloadStubs(PrintWriter writer, InterfaceDeclaration d) { + if ( d.getMethods().size() > 0 ) { + writer.print("\t\tGLContext.resetNativeStubs(" + Utils.getSimpleClassName(d)); + writer.println(".class);"); + } + } + + public static void generateInitStubs(PrintWriter writer, InterfaceDeclaration d, boolean context_specific) { + if ( d.getMethods().size() > 0 ) { + if ( context_specific ) { + final Alias alias_annotation = d.getAnnotation(Alias.class); + + if ( d.getAnnotation(ForceInit.class) != null ) + writer.println("\t\t" + CACHED_EXTS_VAR_NAME + ".add(\"" + translateFieldName(d.getSimpleName()) + "\");"); + writer.print("\t\tif ("); + if ( alias_annotation != null ) + writer.print("("); + writer.print(CACHED_EXTS_VAR_NAME + ".contains(\""); + writer.print(translateFieldName(d.getSimpleName()) + "\")"); + if ( alias_annotation != null ) { + writer.print(" || " + CACHED_EXTS_VAR_NAME + ".contains(\""); + writer.print(translateFieldName(alias_annotation.value()) + "\"))"); + } + writer.print(" && !" + getAddressesInitializerName(d.getSimpleName()) + "("); + if ( d.getAnnotation(DeprecatedGL.class) != null ) + writer.print("forwardCompatible"); + if ( d.getAnnotation(Dependent.class) != null ) { + if ( d.getAnnotation(DeprecatedGL.class) != null ) + writer.print(","); + writer.print("supported_extensions"); + } + if ( alias_annotation != null ) { + writer.println(")) {"); + writer.print("\t\t\tremove(" + CACHED_EXTS_VAR_NAME + ", \""); + writer.println(translateFieldName(alias_annotation.value()) + "\");"); + } else + writer.println("))"); + writer.print("\t\t\tremove(" + CACHED_EXTS_VAR_NAME + ", \""); + writer.println(translateFieldName(d.getSimpleName()) + "\");"); + if ( alias_annotation != null ) + writer.println("\t\t}"); + } else { + writer.print("\t\tGLContext." + Utils.STUB_INITIALIZER_NAME + "(" + Utils.getSimpleClassName(d)); + writer.println(".class, " + CACHED_EXTS_VAR_NAME + ", \"" + translateFieldName(d.getSimpleName()) + "\");"); + } + } + } + + private static void generateAddExtension(PrintWriter writer, InterfaceDeclaration d) { + writer.print(CACHED_EXTS_VAR_NAME + ".add(\""); + writer.println(translateFieldName(d.getSimpleName()) + "\");"); + } + + public static void generateAddressesInitializers(PrintWriter writer, InterfaceDeclaration d) { + Iterator methods = d.getMethods().iterator(); + if ( !methods.hasNext() ) + return; + + writer.print("\tprivate boolean " + getAddressesInitializerName(d.getSimpleName()) + "("); + + boolean optional; + boolean deprecated = d.getAnnotation(DeprecatedGL.class) != null; + Dependent dependent = d.getAnnotation(Dependent.class); + if ( deprecated ) + writer.print("boolean forwardCompatible"); + if ( dependent != null ) { + if ( deprecated ) + writer.print(","); + writer.print("Set supported_extensions"); + } + + Alias alias_annotation = d.getAnnotation(Alias.class); + boolean aliased = alias_annotation != null && alias_annotation.postfix().length() > 0; + + writer.println(") {"); + writer.println("\t\treturn "); + + boolean first = true; + while ( methods.hasNext() ) { + MethodDeclaration method = methods.next(); + if ( method.getAnnotation(Alternate.class) != null ) + continue; + + if ( !first ) + writer.println(" &"); + else + first = false; + + optional = method.getAnnotation(Optional.class) != null; + deprecated = method.getAnnotation(DeprecatedGL.class) != null; + dependent = method.getAnnotation(Dependent.class); + + writer.print("\t\t\t("); + if ( optional ) + writer.print('('); + if ( deprecated ) + writer.print("forwardCompatible || "); + if ( dependent != null ) { + if ( dependent.value().indexOf(',') == -1 ) + writer.print("!supported_extensions.contains(\"" + dependent.value() + "\") || "); + else { + writer.print("!(false"); + for ( String extension : dependent.value().split(",") ) + writer.print(" || supported_extensions.contains(\"" + extension + "\")"); + writer.print(") || "); + } + } + if ( deprecated || dependent != null ) + writer.print('('); + writer.print(Utils.getFunctionAddressName(d, method) + " = "); + PlatformDependent platform_dependent = method.getAnnotation(PlatformDependent.class); + if ( platform_dependent != null ) { + EnumSet platform_set = EnumSet.copyOf(Arrays.asList(platform_dependent.value())); + writer.print("GLContext.getPlatformSpecificFunctionAddress(\""); + writer.print(Platform.ALL.getPrefix() + "\", "); + writer.print("new String[]{"); + Iterator platforms = platform_set.iterator(); + while ( platforms.hasNext() ) { + writer.print("\"" + platforms.next().getOSPrefix() + "\""); + if ( platforms.hasNext() ) + writer.print(", "); + } + writer.print("}, new String[]{"); + platforms = platform_set.iterator(); + while ( platforms.hasNext() ) { + writer.print("\"" + platforms.next().getPrefix() + "\""); + if ( platforms.hasNext() ) + writer.print(", "); + } + writer.print("}, "); + } else if ( aliased ) { + writer.print("GLContext.getFunctionAddress(new String[] {\"" + method.getSimpleName() + "\",\"" + method.getSimpleName() + alias_annotation.postfix() + "\"})) != 0"); + } else + writer.print("GLContext.getFunctionAddress("); + if ( !aliased ) + writer.print("\"" + method.getSimpleName() + "\")) != 0"); + if ( deprecated || dependent != null ) + writer.print(')'); + if ( optional ) + writer.print(" || true)"); + } + writer.println(";"); + writer.println("\t}"); + writer.println(); + } + + public static void generateSymbolAddresses(PrintWriter writer, InterfaceDeclaration d) { + boolean first = true; + for ( final MethodDeclaration method : d.getMethods() ) { + if ( method.getAnnotation(Alternate.class) != null || method.getAnnotation(Reuse.class) != null ) + continue; + + if ( first ) { + writer.println("\t// " + d.getSimpleName()); + first = false; + } + writer.println("\tlong " + Utils.getFunctionAddressName(d, method) + ";"); + } + } + + public static void generateField(PrintWriter writer, InterfaceDeclaration d) { + writer.println("\tpublic final boolean " + translateFieldName(d.getSimpleName()) + ";"); + } +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLESCapabilitiesGenerator.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLESCapabilitiesGenerator.java new file mode 100644 index 0000000..06d5e9a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLESCapabilitiesGenerator.java @@ -0,0 +1,308 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.util.generator.opengl; + +import org.lwjgl.util.generator.*; + +import java.io.PrintWriter; +import java.util.Arrays; +import java.util.Collection; +import java.util.EnumSet; +import java.util.Iterator; + +import com.sun.mirror.declaration.InterfaceDeclaration; +import com.sun.mirror.declaration.MethodDeclaration; +import com.sun.mirror.type.InterfaceType; + +/** + * Generator visitor for the context capabilities generator tool + * + * @author elias_naur + * @version $Revision: 3334 $ + * $Id: ContextCapabilitiesGenerator.java 3334 2010-04-22 23:21:48Z spasi $ + */ +public class GLESCapabilitiesGenerator { + + private static final String STUBS_LOADED_NAME = "loaded_stubs"; + private static final String ALL_INIT_METHOD_NAME = "initAllStubs"; + private static final String POINTER_INITIALIZER_POSTFIX = "_initNativeFunctionAddresses"; + private static final String CACHED_EXTS_VAR_NAME = "supported_extensions"; + private static final String EXTENSION_PREFIX = "GL_"; + private static final String CORE_PREFIX = "Open"; + + public static void generateClassPrologue(PrintWriter writer, boolean context_specific, boolean generate_error_checks) { + writer.println("public class " + Utils.CONTEXT_CAPS_CLASS_NAME + " {"); + writer.println("\tstatic final boolean DEBUG = " + Boolean.toString(generate_error_checks) + ";"); + writer.println(); + if ( !context_specific ) { + writer.println("\tprivate static boolean " + STUBS_LOADED_NAME + ";"); + } + } + + public static void generateInitializerPrologue(PrintWriter writer) { + writer.println("\t" + Utils.CONTEXT_CAPS_CLASS_NAME + "() throws LWJGLException {"); + writer.println("\t\tSet " + CACHED_EXTS_VAR_NAME + " = " + ALL_INIT_METHOD_NAME + "();"); + } + + private static String translateFieldName(String interface_name) { + if ( interface_name.startsWith("GL") ) + return CORE_PREFIX + interface_name; + else + return EXTENSION_PREFIX + interface_name; + } + + public static void generateSuperClassAdds(PrintWriter writer, InterfaceDeclaration d) { + Collection super_interfaces = d.getSuperinterfaces(); + if ( super_interfaces.size() > 1 ) + throw new RuntimeException(d + " extends more than one other interface"); + if ( super_interfaces.size() == 1 ) { + InterfaceType super_interface = super_interfaces.iterator().next(); + writer.print("\t\tif (" + CACHED_EXTS_VAR_NAME + ".contains(\""); + writer.println(translateFieldName(d.getSimpleName()) + "\"))"); + writer.print("\t\t\t"); + generateAddExtension(writer, super_interface.getDeclaration()); + } + } + + public static void generateInitializer(PrintWriter writer, InterfaceDeclaration d) { + String translated_field_name = translateFieldName(d.getSimpleName()); + writer.print("\t\tthis." + translated_field_name + " = "); + writer.print(CACHED_EXTS_VAR_NAME + ".contains(\""); + writer.print(translated_field_name + "\")"); + Collection super_interfaces = d.getSuperinterfaces(); + if ( super_interfaces.size() > 1 ) + throw new RuntimeException(d + " extends more than one other interface"); + if ( super_interfaces.size() == 1 ) { + InterfaceType super_interface = super_interfaces.iterator().next(); + writer.println(); + writer.print("\t\t\t&& " + CACHED_EXTS_VAR_NAME + ".contains(\""); + writer.print(translateFieldName(super_interface.getDeclaration().getSimpleName()) + "\")"); + } + Alias alias_annotation = d.getAnnotation(Alias.class); + if ( alias_annotation != null ) { + writer.println(); + writer.print("\t\t\t|| " + CACHED_EXTS_VAR_NAME + ".contains(\""); + writer.print(translateFieldName(alias_annotation.value()) + "\")"); + } + writer.println(";"); + } + + private static String getAddressesInitializerName(String class_name) { + return class_name + POINTER_INITIALIZER_POSTFIX; + } + + public static void generateInitStubsPrologue(PrintWriter writer, boolean context_specific) { + writer.println("\tprivate Set " + ALL_INIT_METHOD_NAME + "() throws LWJGLException {"); + + if ( context_specific ) { + // Load the basic pointers we need to detect OpenGL version and supported extensions. + writer.println("\t\tglGetError = GLContext.getFunctionAddress(\"glGetError\");"); + writer.println("\t\tglGetString = GLContext.getFunctionAddress(\"glGetString\");"); + } + + // Get the supported extensions set. + writer.println("\t\tGLContext.setCapabilities(this);"); + writer.println("\t\tSet " + CACHED_EXTS_VAR_NAME + " = new HashSet(256);"); + if ( !context_specific ) + writer.println("\t\tGLContext.doInitNativeStubs(GLES20.class);"); + writer.println("\t\tGLContext.getSupportedExtensions(" + CACHED_EXTS_VAR_NAME + ");"); + + if ( !context_specific ) { + writer.println("\t\tif (" + STUBS_LOADED_NAME + ")"); + writer.println("\t\t\treturn " + CACHED_EXTS_VAR_NAME + ";"); + } else { + writer.println("\t\tif (!" + getAddressesInitializerName("GLES20") + "())"); + writer.println("\t\t\tthrow new LWJGLException(\"GL ES 2.0 not supported\");"); + } + } + + public static void generateInitStubsEpilogue(PrintWriter writer, boolean context_specific) { + if ( !context_specific ) + writer.println("\t\t" + STUBS_LOADED_NAME + " = true;"); + writer.println("\t\treturn " + CACHED_EXTS_VAR_NAME + ";"); + writer.println("\t}"); + } + + public static void generateUnloadStubs(PrintWriter writer, InterfaceDeclaration d) { + // TODO: Remove GLES + if ( d.getMethods().size() > 0 && !d.getSimpleName().startsWith("GLES") ) { + writer.print("\t\tGLContext.resetNativeStubs(" + Utils.getSimpleClassName(d)); + writer.println(".class);"); + } + } + + public static void generateInitStubs(PrintWriter writer, InterfaceDeclaration d, boolean context_specific) { + if ( d.getMethods().size() > 0 ) { + if ( context_specific ) { + final Alias alias_annotation = d.getAnnotation(Alias.class); + + if ( d.getAnnotation(ForceInit.class) != null ) + writer.println("\t\t" + CACHED_EXTS_VAR_NAME + ".add(\"" + translateFieldName(d.getSimpleName()) + "\");"); + writer.print("\t\tif ("); + if ( alias_annotation != null ) + writer.print("("); + writer.print(CACHED_EXTS_VAR_NAME + ".contains(\""); + writer.print(translateFieldName(d.getSimpleName()) + "\")"); + if ( alias_annotation != null ) { + writer.print(" || " + CACHED_EXTS_VAR_NAME + ".contains(\""); + writer.print(translateFieldName(alias_annotation.value()) + "\"))"); + } + writer.print(" && !" + getAddressesInitializerName(d.getSimpleName()) + "("); + if ( d.getAnnotation(Dependent.class) != null ) + writer.print("supported_extensions"); + if ( alias_annotation != null ) { + writer.println(")) {"); + writer.print("\t\t\tremove(" + CACHED_EXTS_VAR_NAME + ", \""); + writer.println(translateFieldName(alias_annotation.value()) + "\");"); + } else + writer.println("))"); + writer.print("\t\t\tremove(" + CACHED_EXTS_VAR_NAME + ", \""); + writer.println(translateFieldName(d.getSimpleName()) + "\");"); + if ( alias_annotation != null ) + writer.println("\t\t}"); + } else { + writer.print("\t\tGLContext." + Utils.STUB_INITIALIZER_NAME + "(" + Utils.getSimpleClassName(d)); + writer.println(".class, " + CACHED_EXTS_VAR_NAME + ", \"" + translateFieldName(d.getSimpleName()) + "\");"); + } + } + } + + private static void generateAddExtension(PrintWriter writer, InterfaceDeclaration d) { + writer.print(CACHED_EXTS_VAR_NAME + ".add(\""); + writer.println(translateFieldName(d.getSimpleName()) + "\");"); + } + + public static void generateAddressesInitializers(PrintWriter writer, InterfaceDeclaration d) { + Iterator methods = d.getMethods().iterator(); + if ( !methods.hasNext() ) + return; + + writer.print("\tprivate boolean " + getAddressesInitializerName(d.getSimpleName()) + "("); + + boolean optional; + Dependent dependent = d.getAnnotation(Dependent.class); + if ( dependent != null ) { + writer.print("Set supported_extensions"); + } + + Alias alias_annotation = d.getAnnotation(Alias.class); + boolean aliased = alias_annotation != null && alias_annotation.postfix().length() > 0; + + writer.println(") {"); + writer.println("\t\treturn "); + + boolean first = true; + while ( methods.hasNext() ) { + MethodDeclaration method = methods.next(); + if ( method.getAnnotation(Alternate.class) != null ) + continue; + + if ( !first ) + writer.println(" &"); + else + first = false; + + optional = method.getAnnotation(Optional.class) != null; + dependent = method.getAnnotation(Dependent.class); + + writer.print("\t\t\t("); + if ( optional ) + writer.print('('); + if ( dependent != null ) { + if ( dependent.value().indexOf(',') == -1 ) + writer.print("!supported_extensions.contains(\"" + dependent.value() + "\") || "); + else { + writer.print("!(false"); + for ( String extension : dependent.value().split(",") ) + writer.print(" || supported_extensions.contains(\"" + extension + "\")"); + writer.print(") || "); + } + } + if ( dependent != null ) + writer.print('('); + writer.print(Utils.getFunctionAddressName(d, method) + " = "); + PlatformDependent platform_dependent = method.getAnnotation(PlatformDependent.class); + if ( platform_dependent != null ) { + EnumSet platform_set = EnumSet.copyOf(Arrays.asList(platform_dependent.value())); + writer.print("GLContext.getPlatformSpecificFunctionAddress(\""); + writer.print(Platform.ALL.getPrefix() + "\", "); + writer.print("new String[]{"); + Iterator platforms = platform_set.iterator(); + while ( platforms.hasNext() ) { + writer.print("\"" + platforms.next().getOSPrefix() + "\""); + if ( platforms.hasNext() ) + writer.print(", "); + } + writer.print("}, new String[]{"); + platforms = platform_set.iterator(); + while ( platforms.hasNext() ) { + writer.print("\"" + platforms.next().getPrefix() + "\""); + if ( platforms.hasNext() ) + writer.print(", "); + } + writer.print("}, "); + } else if ( aliased ) { + writer.print("GLContext.getFunctionAddress(new String[] {\"" + method.getSimpleName() + "\",\"" + method.getSimpleName() + alias_annotation.postfix() + "\"})) != 0"); + } else + writer.print("GLContext.getFunctionAddress("); + if ( !aliased ) + writer.print("\"" + method.getSimpleName() + "\")) != 0"); + if ( dependent != null ) + writer.print(')'); + if ( optional ) + writer.print(" || true)"); + } + writer.println(";"); + writer.println("\t}"); + writer.println(); + } + + public static void generateSymbolAddresses(PrintWriter writer, InterfaceDeclaration d) { + boolean first = true; + for ( final MethodDeclaration method : d.getMethods() ) { + if ( method.getAnnotation(Alternate.class) != null || method.getAnnotation(Reuse.class) != null ) + continue; + + if ( first ) { + writer.println("\t// " + d.getSimpleName()); + first = false; + } + writer.println("\tint " + Utils.getFunctionAddressName(d, method) + ";"); + } + } + + public static void generateField(PrintWriter writer, InterfaceDeclaration d) { + writer.println("\tpublic final boolean " + translateFieldName(d.getSimpleName()) + ";"); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLESGeneratorProcessorFactory.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLESGeneratorProcessorFactory.java new file mode 100644 index 0000000..2c2c730 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLESGeneratorProcessorFactory.java @@ -0,0 +1,184 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.util.generator.opengl; + +import org.lwjgl.util.generator.Utils; + +import java.io.File; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.Arrays; +import java.util.Collection; +import java.util.Map; +import java.util.Set; + +import com.sun.mirror.apt.*; +import com.sun.mirror.declaration.AnnotationTypeDeclaration; +import com.sun.mirror.declaration.InterfaceDeclaration; +import com.sun.mirror.declaration.TypeDeclaration; +import com.sun.mirror.util.DeclarationFilter; + +import static java.util.Collections.*; + +/** + * Generator tool for creating the ContexCapabilities class + * + * @author elias_naur + * @version $Revision: 3316 $ + * $Id: ContextGeneratorProcessorFactory.java 3316 2010-04-09 23:57:40Z spasi $ + */ +public class GLESGeneratorProcessorFactory implements AnnotationProcessorFactory, RoundCompleteListener { + + private static boolean first_round = true; + + // Process any set of annotations + private static final Collection supportedAnnotations = + unmodifiableCollection(Arrays.asList("*")); + + public Collection supportedAnnotationTypes() { + return supportedAnnotations; + } + + public Collection supportedOptions() { + return unmodifiableCollection(Arrays.asList("-Acontextspecific", "-Ageneratechecks")); + } + + public void roundComplete(RoundCompleteEvent event) { + first_round = false; + } + + public AnnotationProcessor getProcessorFor(Set atds, AnnotationProcessorEnvironment env) { + // Only process the initial types, not the generated ones + if ( first_round ) { + env.addListener(this); + return new GeneratorProcessor(env); + } else + return AnnotationProcessors.NO_OP; + } + + private static class GeneratorProcessor implements AnnotationProcessor { + + private final AnnotationProcessorEnvironment env; + + GeneratorProcessor(AnnotationProcessorEnvironment env) { + this.env = env; + } + + public void process() { + Map options = env.getOptions(); + boolean generate_error_checks = options.containsKey("-Ageneratechecks"); + boolean context_specific = options.containsKey("-Acontextspecific"); + try { + generateContextCapabilitiesSource(context_specific, generate_error_checks); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + private void generateContextCapabilitiesSource(boolean context_specific, boolean generate_error_checks) throws IOException { + PrintWriter writer = env.getFiler().createTextFile(Filer.Location.SOURCE_TREE, "org.lwjgl.opengles", new File(Utils.CONTEXT_CAPS_CLASS_NAME + ".java"), null); + writer.println("/* MACHINE GENERATED FILE, DO NOT EDIT */"); + writer.println(); + writer.println("package org.lwjgl.opengles;"); + writer.println(); + writer.println("import org.lwjgl.LWJGLException;"); + writer.println("import org.lwjgl.LWJGLUtil;"); + writer.println("import java.util.Set;"); + writer.println("import java.util.HashSet;"); + writer.println(); + GLESCapabilitiesGenerator.generateClassPrologue(writer, context_specific, generate_error_checks); + DeclarationFilter filter = DeclarationFilter.getFilter(InterfaceDeclaration.class); + Collection interface_decls = filter.filter(env.getSpecifiedTypeDeclarations()); + for ( TypeDeclaration typedecl : interface_decls ) { + InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl; + if ( Utils.isFinal(interface_decl) ) + GLESCapabilitiesGenerator.generateField(writer, interface_decl); + } + writer.println(); + if ( context_specific ) { + for ( TypeDeclaration typedecl : interface_decls ) { + InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl; + GLESCapabilitiesGenerator.generateSymbolAddresses(writer, interface_decl); + } + writer.println(); + for ( TypeDeclaration typedecl : interface_decls ) { + InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl; + GLESCapabilitiesGenerator.generateAddressesInitializers(writer, interface_decl); + } + writer.println(); + } + + if ( context_specific ) { + writer.println("\tprivate static void remove(Set supported_extensions, String extension) {"); + writer.println("\t\tLWJGLUtil.log(extension + \" was reported as available but an entry point is missing\");"); + writer.println("\t\tsupported_extensions.remove(extension);"); + writer.println("\t}\n"); + } + + GLESCapabilitiesGenerator.generateInitStubsPrologue(writer, context_specific); + for ( TypeDeclaration typedecl : interface_decls ) { + InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl; + GLESCapabilitiesGenerator.generateSuperClassAdds(writer, interface_decl); + } + for ( TypeDeclaration typedecl : interface_decls ) { + InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl; + if ( "GLES20".equals(interface_decl.getSimpleName()) ) + continue; + GLESCapabilitiesGenerator.generateInitStubs(writer, interface_decl, context_specific); + } + GLESCapabilitiesGenerator.generateInitStubsEpilogue(writer, context_specific); + writer.println(); + writer.println("\tstatic void unloadAllStubs() {"); + if ( !context_specific ) { + writer.println("\t\tif (!loaded_stubs)"); + writer.println("\t\t\treturn;"); + for ( TypeDeclaration typedecl : interface_decls ) { + InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl; + GLESCapabilitiesGenerator.generateUnloadStubs(writer, interface_decl); + } + writer.println("\t\tloaded_stubs = false;"); + } + writer.println("\t}"); + writer.println(); + GLESCapabilitiesGenerator.generateInitializerPrologue(writer); + for ( TypeDeclaration typedecl : interface_decls ) { + InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl; + if ( Utils.isFinal(interface_decl) ) + GLESCapabilitiesGenerator.generateInitializer(writer, interface_decl); + } + writer.println("\t}"); + writer.println("}"); + writer.close(); + } + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLESTypeMap.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLESTypeMap.java new file mode 100644 index 0000000..3383da5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLESTypeMap.java @@ -0,0 +1,301 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.util.generator.opengl; + +/** + * + * OpenGL sepcific generator behaviour + * + * @author elias_naur + * @version $Revision: 3287 $ + * $Id: GLTypeMap.java 3287 2010-03-14 23:24:40Z spasi $ + */ + +import org.lwjgl.util.generator.NativeTypeTranslator; +import org.lwjgl.util.generator.PointerWrapper; +import org.lwjgl.util.generator.Signedness; +import org.lwjgl.util.generator.TypeMap; + +import java.io.PrintWriter; +import java.lang.annotation.Annotation; +import java.nio.*; +import java.util.HashMap; +import java.util.Map; + +import com.sun.mirror.declaration.AnnotationMirror; +import com.sun.mirror.declaration.MethodDeclaration; +import com.sun.mirror.type.PrimitiveType; + +public class GLESTypeMap implements TypeMap { + + private static final Map, PrimitiveType.Kind> native_types_to_primitive; + + static { + native_types_to_primitive = new HashMap, PrimitiveType.Kind>(); + native_types_to_primitive.put(GLbitfield.class, PrimitiveType.Kind.INT); + native_types_to_primitive.put(GLclampf.class, PrimitiveType.Kind.FLOAT); + native_types_to_primitive.put(GLfloat.class, PrimitiveType.Kind.FLOAT); + native_types_to_primitive.put(GLint.class, PrimitiveType.Kind.INT); + native_types_to_primitive.put(GLshort.class, PrimitiveType.Kind.SHORT); + native_types_to_primitive.put(GLsizeiptr.class, PrimitiveType.Kind.LONG); + native_types_to_primitive.put(GLuint.class, PrimitiveType.Kind.INT); + native_types_to_primitive.put(GLboolean.class, PrimitiveType.Kind.BOOLEAN); + native_types_to_primitive.put(GLchar.class, PrimitiveType.Kind.BYTE); + native_types_to_primitive.put(GLhalf.class, PrimitiveType.Kind.SHORT); + native_types_to_primitive.put(GLsizei.class, PrimitiveType.Kind.INT); + native_types_to_primitive.put(GLushort.class, PrimitiveType.Kind.SHORT); + native_types_to_primitive.put(GLbyte.class, PrimitiveType.Kind.BYTE); + native_types_to_primitive.put(GLenum.class, PrimitiveType.Kind.INT); + native_types_to_primitive.put(GLintptr.class, PrimitiveType.Kind.LONG); + native_types_to_primitive.put(GLubyte.class, PrimitiveType.Kind.BYTE); + native_types_to_primitive.put(GLvoid.class, PrimitiveType.Kind.BYTE); + native_types_to_primitive.put(EGLint64NV.class, PrimitiveType.Kind.LONG); + native_types_to_primitive.put(EGLuint64NV.class, PrimitiveType.Kind.LONG); + native_types_to_primitive.put(GLint64.class, PrimitiveType.Kind.LONG); + native_types_to_primitive.put(GLuint64.class, PrimitiveType.Kind.LONG); + } + + public PrimitiveType.Kind getPrimitiveTypeFromNativeType(Class native_type) { + PrimitiveType.Kind kind = native_types_to_primitive.get(native_type); + if ( kind == null ) + throw new RuntimeException("Unsupported type " + native_type); + return kind; + } + + public void printCapabilitiesInit(final PrintWriter writer) { + writer.println("\t\tContextCapabilities caps = GLContext.getCapabilities();"); + } + + public String getCapabilities() { + return "caps"; + } + + public String getAPIUtilParam(boolean comma) { + return ""; + } + + public void printErrorCheckMethod(final PrintWriter writer, final MethodDeclaration method, final String tabs) { + writer.println(tabs + "Util.checkGLError();"); + } + + public String getRegisterNativesFunctionName() { + return "extgl_InitializeClass"; + } + + public Signedness getSignednessFromType(Class type) { + if ( GLuint.class.equals(type) ) + return Signedness.UNSIGNED; + else if ( GLint.class.equals(type) ) + return Signedness.SIGNED; + else if ( GLushort.class.equals(type) ) + return Signedness.UNSIGNED; + else if ( GLshort.class.equals(type) ) + return Signedness.SIGNED; + else if ( GLubyte.class.equals(type) ) + return Signedness.UNSIGNED; + else if ( GLbyte.class.equals(type) ) + return Signedness.SIGNED; + else if ( EGLuint64NV.class.equals(type) ) + return Signedness.UNSIGNED; + else if ( EGLint64NV.class.equals(type) ) + return Signedness.SIGNED; + else + return Signedness.NONE; + } + + public String translateAnnotation(Class annotation_type) { + if ( annotation_type.equals(GLuint64.class) || annotation_type.equals(GLint64.class) ) + return "i64"; + else if ( annotation_type.equals(GLuint.class) || annotation_type.equals(GLint.class) ) + return "i"; + else if ( annotation_type.equals(GLushort.class) || annotation_type.equals(GLshort.class) ) + return "s"; + else if ( annotation_type.equals(GLubyte.class) || annotation_type.equals(GLbyte.class) ) + return "b"; + else if ( annotation_type.equals(GLfloat.class) ) + return "f"; + else if ( annotation_type.equals(GLhalf.class) ) + return "h"; + else if ( annotation_type.equals(GLboolean.class) || annotation_type.equals(GLvoid.class) ) + return ""; + else if ( annotation_type.equals(EGLuint64NV.class) || annotation_type.equals(EGLint64NV.class) ) + return "l"; + else + throw new RuntimeException(annotation_type + " is not allowed"); + } + + public Class getNativeTypeFromPrimitiveType(PrimitiveType.Kind kind) { + Class type; + switch ( kind ) { + case INT: + type = GLint.class; + break; + case FLOAT: + type = GLfloat.class; + break; + case SHORT: + type = GLshort.class; + break; + case BYTE: + type = GLbyte.class; + break; + case BOOLEAN: + type = GLboolean.class; + break; + case LONG: + type = GLint64.class; + break; + default: + throw new RuntimeException(kind + " is not allowed"); + } + return type; + } + + public Class getVoidType() { + return GLvoid.class; + } + + public Class getStringElementType() { + return GLubyte.class; + } + + public Class getStringArrayType() { + return GLchar.class; + } + + public Class getByteBufferArrayType() { + return GLubyte.class; + } + + private static Class[] getValidBufferTypes(Class type) { + if ( type.equals(IntBuffer.class) ) + return new Class[] { GLbitfield.class, GLenum.class, GLint.class, GLsizei.class, GLuint.class, GLvoid.class }; + else if ( type.equals(FloatBuffer.class) ) + return new Class[] { GLclampf.class, GLfloat.class }; + else if ( type.equals(ByteBuffer.class) ) + return new Class[] { GLboolean.class, GLbyte.class, GLchar.class, GLubyte.class, GLvoid.class }; + else if ( type.equals(ShortBuffer.class) ) + return new Class[] { GLhalf.class, GLshort.class, GLushort.class }; + else if ( type.equals(LongBuffer.class) ) + return new Class[] { GLint64.class, GLuint64.class, EGLint64NV.class, EGLuint64NV.class }; + else + return new Class[] { }; + } + + private static Class[] getValidPrimitiveTypes(Class type) { + if ( type.equals(long.class) ) + return new Class[] { GLintptr.class, GLsizeiptr.class, GLint64.class, GLuint64.class, EGLuint64NV.class, EGLint64NV.class }; + else if ( type.equals(int.class) ) + return new Class[] { GLbitfield.class, GLenum.class, GLint.class, GLuint.class, GLsizei.class }; + else if ( type.equals(float.class) ) + return new Class[] { GLclampf.class, GLfloat.class }; + else if ( type.equals(short.class) ) + return new Class[] { GLhalf.class, GLshort.class, GLushort.class }; + else if ( type.equals(byte.class) ) + return new Class[] { GLbyte.class, GLchar.class, GLubyte.class }; + else if ( type.equals(boolean.class) ) + return new Class[] { GLboolean.class }; + else if ( type.equals(void.class) ) + return new Class[] { GLvoid.class, GLreturn.class }; + else + return new Class[] { }; + } + + public String getTypedefPostfix() { + return "GL_APICALL "; + } + + public String getFunctionPrefix() { + return "GL_APIENTRY"; + } + + public void printNativeIncludes(PrintWriter writer) { + writer.println("#include \"extgl.h\""); + } + + public Class[] getValidAnnotationTypes(Class type) { + Class[] valid_types; + if ( Buffer.class.isAssignableFrom(type) ) + valid_types = getValidBufferTypes(type); + else if ( type.isPrimitive() ) + valid_types = getValidPrimitiveTypes(type); + else if ( String.class.equals(type) ) + valid_types = new Class[] { GLubyte.class }; + else if ( org.lwjgl.PointerWrapper.class.isAssignableFrom(type) ) + valid_types = new Class[] { PointerWrapper.class }; + else if ( void.class.equals(type) ) + valid_types = new Class[] { GLreturn.class }; + else + valid_types = new Class[] { }; + return valid_types; + } + + public Class getInverseType(Class type) { + if ( GLuint64.class.equals(type) ) + return GLint64.class; + if ( GLuint.class.equals(type) ) + return GLint.class; + else if ( GLint.class.equals(type) ) + return GLuint.class; + else if ( GLushort.class.equals(type) ) + return GLshort.class; + else if ( GLshort.class.equals(type) ) + return GLushort.class; + else if ( GLubyte.class.equals(type) ) + return GLbyte.class; + else if ( GLbyte.class.equals(type) ) + return GLubyte.class; + else + return null; + } + + public String getAutoTypeFromAnnotation(AnnotationMirror annotation) { + Class annotation_class = NativeTypeTranslator.getClassFromType(annotation.getAnnotationType()); + if ( annotation_class.equals(GLint.class) ) + return "GLES20.GL_INT"; + else if ( annotation_class.equals(GLbyte.class) ) + return "GLES20.GL_BYTE"; + else if ( annotation_class.equals(GLshort.class) ) + return "GLES20.GL_SHORT"; + if ( annotation_class.equals(GLuint.class) ) + return "GLES20.GL_UNSIGNED_INT"; + else if ( annotation_class.equals(GLubyte.class) ) + return "GLES20.GL_UNSIGNED_BYTE"; + else if ( annotation_class.equals(GLushort.class) ) + return "GLES20.GL_UNSIGNED_SHORT"; + else if ( annotation_class.equals(GLfloat.class) ) + return "GLES20.GL_FLOAT"; + else + return null; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLGeneratorProcessorFactory.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLGeneratorProcessorFactory.java new file mode 100644 index 0000000..db50e48 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLGeneratorProcessorFactory.java @@ -0,0 +1,189 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.util.generator.opengl; + +import org.lwjgl.util.generator.Utils; + +import static java.util.Collections.unmodifiableCollection; + +import java.io.File; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.Arrays; +import java.util.Collection; +import java.util.Map; +import java.util.Set; + +import com.sun.mirror.apt.AnnotationProcessor; +import com.sun.mirror.apt.AnnotationProcessorEnvironment; +import com.sun.mirror.apt.AnnotationProcessorFactory; +import com.sun.mirror.apt.AnnotationProcessors; +import com.sun.mirror.apt.Filer; +import com.sun.mirror.apt.RoundCompleteEvent; +import com.sun.mirror.apt.RoundCompleteListener; +import com.sun.mirror.declaration.AnnotationTypeDeclaration; +import com.sun.mirror.declaration.InterfaceDeclaration; +import com.sun.mirror.declaration.TypeDeclaration; +import com.sun.mirror.util.DeclarationFilter; + +/** + * + * Generator tool for creating the ContexCapabilities class + * + * @author elias_naur + * @version $Revision: 3316 $ + * $Id: ContextGeneratorProcessorFactory.java 3316 2010-04-09 23:57:40Z spasi $ + */ +public class GLGeneratorProcessorFactory implements AnnotationProcessorFactory, RoundCompleteListener { + private static boolean first_round = true; + + // Process any set of annotations + private static final Collection supportedAnnotations = + unmodifiableCollection(Arrays.asList("*")); + + public Collection supportedAnnotationTypes() { + return supportedAnnotations; + } + + public Collection supportedOptions() { + return unmodifiableCollection(Arrays.asList("-Acontextspecific", "-Ageneratechecks")); + } + + public void roundComplete(RoundCompleteEvent event) { + first_round = false; + } + + public AnnotationProcessor getProcessorFor(Set atds, AnnotationProcessorEnvironment env) { + // Only process the initial types, not the generated ones + if (first_round) { + env.addListener(this); + return new GeneratorProcessor(env); + } else + return AnnotationProcessors.NO_OP; + } + + private static class GeneratorProcessor implements AnnotationProcessor { + private final AnnotationProcessorEnvironment env; + + GeneratorProcessor(AnnotationProcessorEnvironment env) { + this.env = env; + } + + public void process() { + Map options = env.getOptions(); + boolean generate_error_checks = options.containsKey("-Ageneratechecks"); + boolean context_specific = options.containsKey("-Acontextspecific"); + try { + generateContextCapabilitiesSource(context_specific, generate_error_checks); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + private void generateContextCapabilitiesSource(boolean context_specific, boolean generate_error_checks) throws IOException { + PrintWriter writer = env.getFiler().createTextFile(Filer.Location.SOURCE_TREE, "org.lwjgl.opengl", new File(Utils.CONTEXT_CAPS_CLASS_NAME + ".java"), null); + writer.println("/* MACHINE GENERATED FILE, DO NOT EDIT */"); + writer.println(); + writer.println("package org.lwjgl.opengl;"); + writer.println(); + writer.println("import org.lwjgl.LWJGLException;"); + writer.println("import org.lwjgl.LWJGLUtil;"); + writer.println("import java.util.Set;"); + writer.println("import java.util.HashSet;"); + writer.println(); + GLCapabilitiesGenerator.generateClassPrologue(writer, context_specific, generate_error_checks); + DeclarationFilter filter = DeclarationFilter.getFilter(InterfaceDeclaration.class); + Collection interface_decls = filter.filter(env.getSpecifiedTypeDeclarations()); + for (TypeDeclaration typedecl : interface_decls) { + InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl; + if (Utils.isFinal(interface_decl)) + GLCapabilitiesGenerator.generateField(writer, interface_decl); + } + writer.println(); + for (TypeDeclaration typedecl : interface_decls) { + InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl; + GLCapabilitiesGenerator.generateSymbolAddresses(writer, interface_decl); + } + writer.println(); + if (context_specific) { + for (TypeDeclaration typedecl : interface_decls) { + InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl; + GLCapabilitiesGenerator.generateAddressesInitializers(writer, interface_decl); + } + writer.println(); + } + + writer.println("\tprivate static void remove(Set supported_extensions, String extension) {"); + writer.println("\t\tLWJGLUtil.log(extension + \" was reported as available but an entry point is missing\");"); + writer.println("\t\tsupported_extensions.remove(extension);"); + writer.println("\t}\n"); + + GLCapabilitiesGenerator.generateInitStubsPrologue(writer, context_specific); + for (TypeDeclaration typedecl : interface_decls) { + InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl; + GLCapabilitiesGenerator.generateSuperClassAdds(writer, interface_decl); + } + for (TypeDeclaration typedecl : interface_decls) { + InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl; + String simple_name = interface_decl.getSimpleName(); + if ( "GL11".equals(simple_name) ) + continue; + GLCapabilitiesGenerator.generateInitStubs(writer, interface_decl, context_specific); + } + GLCapabilitiesGenerator.generateInitStubsEpilogue(writer, context_specific); + writer.println(); + writer.println("\tstatic void unloadAllStubs() {"); + if (!context_specific) { + writer.println("\t\tif (!loaded_stubs)"); + writer.println("\t\t\treturn;"); + for (TypeDeclaration typedecl : interface_decls) { + InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl; + GLCapabilitiesGenerator.generateUnloadStubs(writer, interface_decl); + } + writer.println("\t\tloaded_stubs = false;"); + } + writer.println("\t}"); + writer.println(); + GLCapabilitiesGenerator.generateInitializerPrologue(writer); + for (TypeDeclaration typedecl : interface_decls) { + InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl; + if (Utils.isFinal(interface_decl)) + GLCapabilitiesGenerator.generateInitializer(writer, interface_decl); + } + writer.println("\t\ttracker.init();"); + writer.println("\t}"); + writer.println("}"); + writer.close(); + } + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLReferencesGeneratorProcessorFactory.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLReferencesGeneratorProcessorFactory.java new file mode 100644 index 0000000..6424de7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLReferencesGeneratorProcessorFactory.java @@ -0,0 +1,218 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.util.generator.opengl; + +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.CachedReference; +import org.lwjgl.util.generator.Utils; + +import static java.util.Collections.emptyList; +import static java.util.Collections.unmodifiableCollection; + +import java.io.File; +import java.io.IOException; +import java.io.PrintWriter; +import java.util.Arrays; +import java.util.Collection; +import java.util.Set; + +import com.sun.mirror.apt.AnnotationProcessor; +import com.sun.mirror.apt.AnnotationProcessorEnvironment; +import com.sun.mirror.apt.AnnotationProcessorFactory; +import com.sun.mirror.apt.AnnotationProcessors; +import com.sun.mirror.apt.Filer; +import com.sun.mirror.apt.RoundCompleteEvent; +import com.sun.mirror.apt.RoundCompleteListener; +import com.sun.mirror.declaration.AnnotationTypeDeclaration; +import com.sun.mirror.declaration.InterfaceDeclaration; +import com.sun.mirror.declaration.MethodDeclaration; +import com.sun.mirror.declaration.ParameterDeclaration; +import com.sun.mirror.declaration.TypeDeclaration; +import com.sun.mirror.util.DeclarationFilter; + +/** + * + * Generator tool for creating the References class + * + * @author elias_naur + * @version $Revision: 3237 $ + * $Id: ReferencesGeneratorProcessorFactory.java 3237 2009-09-08 15:07:15Z spasi $ + */ +public class GLReferencesGeneratorProcessorFactory implements AnnotationProcessorFactory, RoundCompleteListener { + private static final String REFERENCES_CLASS_NAME = "References"; + private static final String REFERENCES_PARAMETER_NAME = "references"; + + private static boolean first_round = true; + + // Process any set of annotations + private static final Collection supportedAnnotations = + unmodifiableCollection(Arrays.asList("*")); + + public Collection supportedAnnotationTypes() { + return supportedAnnotations; + } + + public Collection supportedOptions() { + return emptyList(); + } + + public void roundComplete(RoundCompleteEvent event) { + first_round = false; + } + + public AnnotationProcessor getProcessorFor(Set atds, AnnotationProcessorEnvironment env) { + // Only process the initial types, not the generated ones + if (first_round) { + env.addListener(this); + return new GeneratorProcessor(env); + } else + return AnnotationProcessors.NO_OP; + } + + private static class GeneratorProcessor implements AnnotationProcessor { + private final AnnotationProcessorEnvironment env; + + GeneratorProcessor(AnnotationProcessorEnvironment env) { + this.env = env; + } + + public void process() { + try { + generateReferencesSource(); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + private static void generateClearsFromParameters(PrintWriter writer, InterfaceDeclaration interface_decl, MethodDeclaration method) { + for (ParameterDeclaration param : method.getParameters()) { + CachedReference cached_reference_annotation = param.getAnnotation(CachedReference.class); + if (cached_reference_annotation != null && cached_reference_annotation.name().length() == 0) { + Class nio_type = Utils.getNIOBufferType(param.getType()); + String reference_name = Utils.getReferenceName(interface_decl, method, param); + writer.println("\t\tthis." + reference_name + " = null;"); + } + } + } + + private static void generateCopiesFromParameters(PrintWriter writer, InterfaceDeclaration interface_decl, MethodDeclaration method) { + for (ParameterDeclaration param : method.getParameters()) { + CachedReference cached_reference_annotation = param.getAnnotation(CachedReference.class); + if (cached_reference_annotation != null && cached_reference_annotation.name().length() == 0) { + Class nio_type = Utils.getNIOBufferType(param.getType()); + String reference_name = Utils.getReferenceName(interface_decl, method, param); + writer.print("\t\t\tthis." + reference_name + " = "); + writer.println(REFERENCES_PARAMETER_NAME + "." + reference_name + ";"); + } + } + } + + private static void generateClearsFromMethods(PrintWriter writer, InterfaceDeclaration interface_decl) { + for (MethodDeclaration method : interface_decl.getMethods()) { + if ( method.getAnnotation(Alternate.class) != null ) + continue; + + generateClearsFromParameters(writer, interface_decl, method); + } + } + + private static void generateCopiesFromMethods(PrintWriter writer, InterfaceDeclaration interface_decl) { + for (MethodDeclaration method : interface_decl.getMethods()) { + if ( method.getAnnotation(Alternate.class) != null ) + continue; + + generateCopiesFromParameters(writer, interface_decl, method); + } + } + + private static void generateReferencesFromParameters(PrintWriter writer, InterfaceDeclaration interface_decl, MethodDeclaration method) { + for (ParameterDeclaration param : method.getParameters()) { + CachedReference cached_reference_annotation = param.getAnnotation(CachedReference.class); + if (cached_reference_annotation != null && cached_reference_annotation.name().length() == 0) { + Class nio_type = Utils.getNIOBufferType(param.getType()); + if (nio_type == null) + throw new RuntimeException(param + " in method " + method + " in " + interface_decl + " is annotated with " + + cached_reference_annotation.annotationType().getSimpleName() + " but the parameter is not a NIO buffer"); + writer.print("\t" + nio_type.getName() + " " + Utils.getReferenceName(interface_decl, method, param)); + writer.println(";"); + } + } + } + + private static void generateReferencesFromMethods(PrintWriter writer, InterfaceDeclaration interface_decl) { + for (MethodDeclaration method : interface_decl.getMethods()) { + if ( method.getAnnotation(Alternate.class) != null ) + continue; + + generateReferencesFromParameters(writer, interface_decl, method); + } + } + + private void generateReferencesSource() throws IOException { + PrintWriter writer = env.getFiler().createTextFile(Filer.Location.SOURCE_TREE, "org.lwjgl.opengl", new File(REFERENCES_CLASS_NAME + ".java"), null); + writer.println("/* MACHINE GENERATED FILE, DO NOT EDIT */"); + writer.println(); + writer.println("package org.lwjgl.opengl;"); + writer.println(); + writer.println("class " + REFERENCES_CLASS_NAME + " extends BaseReferences {"); + writer.println("\t" + REFERENCES_CLASS_NAME + "(ContextCapabilities caps) {"); + writer.println("\t\tsuper(caps);"); + writer.println("\t}"); + DeclarationFilter filter = DeclarationFilter.getFilter(InterfaceDeclaration.class); + Collection interface_decls = filter.filter(env.getSpecifiedTypeDeclarations()); + for (TypeDeclaration typedecl : interface_decls) { + InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl; + generateReferencesFromMethods(writer, interface_decl); + } + writer.println(); + writer.println("\tvoid copy(" + REFERENCES_CLASS_NAME + " " + REFERENCES_PARAMETER_NAME + ", int mask) {"); + writer.println("\t\tsuper.copy(" + REFERENCES_PARAMETER_NAME + ", mask);"); + writer.println("\t\tif ( (mask & GL11.GL_CLIENT_VERTEX_ARRAY_BIT) != 0 ) {"); + for (TypeDeclaration typedecl : interface_decls) { + InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl; + generateCopiesFromMethods(writer, interface_decl); + } + writer.println("\t\t}"); + writer.println("\t}"); + writer.println("\tvoid clear() {"); + writer.println("\t\tsuper.clear();"); + for (TypeDeclaration typedecl : interface_decls) { + InterfaceDeclaration interface_decl = (InterfaceDeclaration)typedecl; + generateClearsFromMethods(writer, interface_decl); + } + writer.println("\t}"); + writer.println("}"); + writer.close(); + } + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLTypeMap.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLTypeMap.java new file mode 100644 index 0000000..46797e2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLTypeMap.java @@ -0,0 +1,331 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.util.generator.opengl; + +/** + * + * OpenGL sepcific generator behaviour + * + * @author elias_naur + * @version $Revision: 3392 $ + * $Id: GLTypeMap.java 3392 2010-07-27 15:33:22Z spasi $ + */ + +import org.lwjgl.PointerBuffer; +import org.lwjgl.util.generator.NativeTypeTranslator; +import org.lwjgl.util.generator.PointerWrapper; +import org.lwjgl.util.generator.Signedness; +import org.lwjgl.util.generator.TypeMap; + +import java.io.PrintWriter; +import java.lang.annotation.Annotation; +import java.nio.*; +import java.util.HashMap; +import java.util.Map; + +import com.sun.mirror.declaration.AnnotationMirror; +import com.sun.mirror.declaration.MethodDeclaration; +import com.sun.mirror.type.PrimitiveType; + +public class GLTypeMap implements TypeMap { + + private static final Map native_types_to_primitive; + + static { + native_types_to_primitive = new HashMap(); + native_types_to_primitive.put(GLbitfield.class, PrimitiveType.Kind.INT); + native_types_to_primitive.put(GLcharARB.class, PrimitiveType.Kind.BYTE); + native_types_to_primitive.put(GLclampf.class, PrimitiveType.Kind.FLOAT); + native_types_to_primitive.put(GLfloat.class, PrimitiveType.Kind.FLOAT); + native_types_to_primitive.put(GLint.class, PrimitiveType.Kind.INT); + native_types_to_primitive.put(GLshort.class, PrimitiveType.Kind.SHORT); + native_types_to_primitive.put(GLsizeiptr.class, PrimitiveType.Kind.LONG); + native_types_to_primitive.put(GLuint.class, PrimitiveType.Kind.INT); + native_types_to_primitive.put(GLboolean.class, PrimitiveType.Kind.BOOLEAN); + native_types_to_primitive.put(GLchar.class, PrimitiveType.Kind.BYTE); + native_types_to_primitive.put(GLdouble.class, PrimitiveType.Kind.DOUBLE); + native_types_to_primitive.put(GLhalf.class, PrimitiveType.Kind.SHORT); + native_types_to_primitive.put(GLintptrARB.class, PrimitiveType.Kind.LONG); + native_types_to_primitive.put(GLsizei.class, PrimitiveType.Kind.INT); + native_types_to_primitive.put(GLushort.class, PrimitiveType.Kind.SHORT); + native_types_to_primitive.put(GLbyte.class, PrimitiveType.Kind.BYTE); + native_types_to_primitive.put(GLclampd.class, PrimitiveType.Kind.DOUBLE); + native_types_to_primitive.put(GLenum.class, PrimitiveType.Kind.INT); + native_types_to_primitive.put(GLhandleARB.class, PrimitiveType.Kind.INT); + native_types_to_primitive.put(GLintptr.class, PrimitiveType.Kind.LONG); + native_types_to_primitive.put(GLsizeiptrARB.class, PrimitiveType.Kind.LONG); + native_types_to_primitive.put(GLubyte.class, PrimitiveType.Kind.BYTE); + native_types_to_primitive.put(GLvoid.class, PrimitiveType.Kind.BYTE); + native_types_to_primitive.put(GLint64EXT.class, PrimitiveType.Kind.LONG); + native_types_to_primitive.put(GLuint64EXT.class, PrimitiveType.Kind.LONG); + native_types_to_primitive.put(GLint64.class, PrimitiveType.Kind.LONG); + native_types_to_primitive.put(GLuint64.class, PrimitiveType.Kind.LONG); + } + + public PrimitiveType.Kind getPrimitiveTypeFromNativeType(Class native_type) { + PrimitiveType.Kind kind = native_types_to_primitive.get(native_type); + if ( kind == null ) + throw new RuntimeException("Unsupported type " + native_type); + return kind; + } + + public void printCapabilitiesInit(final PrintWriter writer) { + writer.println("\t\tContextCapabilities caps = GLContext.getCapabilities();"); + } + + public String getCapabilities() { + return "caps"; + } + + public String getAPIUtilParam(boolean comma) { + return comma ? "caps, " : "caps"; + } + + public void printErrorCheckMethod(final PrintWriter writer, final MethodDeclaration method, final String tabs) { + writer.println(tabs + "Util.checkGLError();"); + } + + public String getRegisterNativesFunctionName() { + return "extgl_InitializeClass"; + } + + public Signedness getSignednessFromType(Class type) { + if ( GLuint.class.equals(type) ) + return Signedness.UNSIGNED; + else if ( GLint.class.equals(type) ) + return Signedness.SIGNED; + else if ( GLushort.class.equals(type) ) + return Signedness.UNSIGNED; + else if ( GLshort.class.equals(type) ) + return Signedness.SIGNED; + else if ( GLubyte.class.equals(type) ) + return Signedness.UNSIGNED; + else if ( GLbyte.class.equals(type) ) + return Signedness.SIGNED; + else if ( GLuint64EXT.class.equals(type) ) + return Signedness.UNSIGNED; + else if ( GLint64EXT.class.equals(type) ) + return Signedness.SIGNED; + else if ( GLuint64.class.equals(type) ) + return Signedness.UNSIGNED; + else if ( GLint64.class.equals(type) ) + return Signedness.SIGNED; + else + return Signedness.NONE; + } + + public String translateAnnotation(Class annotation_type) { + if ( annotation_type.equals(GLuint.class) || annotation_type.equals(GLint.class) ) + return "i"; + else if ( annotation_type.equals(GLushort.class) || annotation_type.equals(GLshort.class) ) + return "s"; + else if ( annotation_type.equals(GLubyte.class) || annotation_type.equals(GLbyte.class) ) + return "b"; + else if ( annotation_type.equals(GLfloat.class) || annotation_type.equals(GLclampf.class) ) + return "f"; + else if ( annotation_type.equals(GLdouble.class) || annotation_type.equals(GLclampd.class) ) + return "d"; + else if ( annotation_type.equals(GLhalf.class) ) + return "h"; + else if ( annotation_type.equals(GLuint64EXT.class) || annotation_type.equals(GLint64EXT.class) || annotation_type.equals(GLuint64.class) || annotation_type.equals(GLint64.class) ) + return "i64"; + else if ( annotation_type.equals(GLboolean.class) || annotation_type.equals(GLvoid.class) ) + return ""; + else + throw new RuntimeException(annotation_type + " is not allowed"); + } + + public Class getNativeTypeFromPrimitiveType(PrimitiveType.Kind kind) { + Class type; + switch ( kind ) { + case INT: + type = GLint.class; + break; + case DOUBLE: + type = GLdouble.class; + break; + case FLOAT: + type = GLfloat.class; + break; + case SHORT: + type = GLshort.class; + break; + case BYTE: + type = GLbyte.class; + break; + case LONG: + type = GLint64EXT.class; + break; + case BOOLEAN: + type = GLboolean.class; + break; + default: + throw new RuntimeException(kind + " is not allowed"); + } + return type; + } + + public Class getVoidType() { + return GLvoid.class; + } + + public Class getStringElementType() { + return GLubyte.class; + } + + public Class getStringArrayType() { + return GLchar.class; + } + + public Class getByteBufferArrayType() { + return GLchar.class; + } + + private static Class[] getValidBufferTypes(Class type) { + if ( type.equals(IntBuffer.class) ) + return new Class[] { GLbitfield.class, GLenum.class, GLhandleARB.class, GLint.class, + GLsizei.class, GLuint.class, GLvoid.class }; + else if ( type.equals(FloatBuffer.class) ) + return new Class[] { GLclampf.class, GLfloat.class }; + else if ( type.equals(ByteBuffer.class) ) + return new Class[] { GLboolean.class, GLbyte.class, GLcharARB.class, GLchar.class, GLubyte.class, GLvoid.class }; + else if ( type.equals(ShortBuffer.class) ) + return new Class[] { GLhalf.class, GLshort.class, GLushort.class }; + else if ( type.equals(DoubleBuffer.class) ) + return new Class[] { GLclampd.class, GLdouble.class }; + else if ( type.equals(LongBuffer.class) ) + return new Class[] { GLint64EXT.class, GLuint64EXT.class, GLint64.class, GLuint64.class }; + else + return new Class[] { }; + } + + private static Class[] getValidPrimitiveTypes(Class type) { + if ( type.equals(long.class) ) + return new Class[] { GLintptrARB.class, GLuint.class, GLintptr.class, GLsizeiptrARB.class, GLsizeiptr.class, GLint64EXT.class, GLuint64EXT.class, GLint64.class, GLuint64.class }; + else if ( type.equals(int.class) ) + return new Class[] { GLbitfield.class, GLenum.class, GLhandleARB.class, GLint.class, GLuint.class, + GLsizei.class }; + else if ( type.equals(double.class) ) + return new Class[] { GLclampd.class, GLdouble.class }; + else if ( type.equals(float.class) ) + return new Class[] { GLclampf.class, GLfloat.class }; + else if ( type.equals(short.class) ) + return new Class[] { GLhalf.class, GLshort.class, GLushort.class }; + else if ( type.equals(byte.class) ) + return new Class[] { GLbyte.class, GLcharARB.class, GLchar.class, GLubyte.class }; + else if ( type.equals(boolean.class) ) + return new Class[] { GLboolean.class }; + else if ( type.equals(void.class) ) + return new Class[] { GLvoid.class, GLreturn.class }; + else + return new Class[] { }; + } + + public String getTypedefPostfix() { + return ""; + } + + public String getFunctionPrefix() { + return "APIENTRY"; + } + + public void printNativeIncludes(PrintWriter writer) { + writer.println("#include \"extgl.h\""); + } + + public Class[] getValidAnnotationTypes(Class type) { + Class[] valid_types; + if ( Buffer.class.isAssignableFrom(type) ) + valid_types = getValidBufferTypes(type); + else if ( type.isPrimitive() ) + valid_types = getValidPrimitiveTypes(type); + else if ( String.class.equals(type) ) + valid_types = new Class[] { GLubyte.class }; + else if ( org.lwjgl.PointerWrapper.class.isAssignableFrom(type) ) + valid_types = new Class[] { PointerWrapper.class }; + else if (void.class.equals(type) ) + valid_types = new Class[] { GLreturn.class }; + else if ( PointerBuffer.class.equals(type) ) + valid_types = new Class[] { GLintptr.class, GLintptrARB.class, GLsizeiptr.class, GLsizeiptrARB.class }; + else + valid_types = new Class[] { }; + return valid_types; + } + + public Class getInverseType(Class type) { + if ( GLuint.class.equals(type) ) + return GLint.class; + else if ( GLint.class.equals(type) ) + return GLuint.class; + else if ( GLushort.class.equals(type) ) + return GLshort.class; + else if ( GLshort.class.equals(type) ) + return GLushort.class; + else if ( GLubyte.class.equals(type) ) + return GLbyte.class; + else if ( GLbyte.class.equals(type) ) + return GLubyte.class; + else if ( GLuint64EXT.class.equals(type) ) + return GLint64EXT.class; + else if ( GLint64EXT.class.equals(type) ) + return GLuint64EXT.class; + else if ( GLuint64.class.equals(type) ) + return GLint64.class; + else if ( GLint64.class.equals(type) ) + return GLuint64.class; + else + return null; + } + + public String getAutoTypeFromAnnotation(AnnotationMirror annotation) { + Class annotation_class = NativeTypeTranslator.getClassFromType(annotation.getAnnotationType()); + if ( annotation_class.equals(GLint.class) ) + return "GL11.GL_INT"; + else if ( annotation_class.equals(GLbyte.class) ) + return "GL11.GL_BYTE"; + else if ( annotation_class.equals(GLshort.class) ) + return "GL11.GL_SHORT"; + if ( annotation_class.equals(GLuint.class) ) + return "GL11.GL_UNSIGNED_INT"; + else if ( annotation_class.equals(GLubyte.class) ) + return "GL11.GL_UNSIGNED_BYTE"; + else if ( annotation_class.equals(GLushort.class) ) + return "GL11.GL_UNSIGNED_SHORT"; + else if ( annotation_class.equals(GLfloat.class) ) + return "GL11.GL_FLOAT"; + else if ( annotation_class.equals(GLdouble.class) ) + return "GL11.GL_DOUBLE"; + else + return null; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLbitfield.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLbitfield.java new file mode 100644 index 0000000..6652f88 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLbitfield.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opengl; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: GLbitfield.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLbitfield { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLboolean.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLboolean.java new file mode 100644 index 0000000..f392283 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLboolean.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opengl; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: GLboolean.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLboolean { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLbyte.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLbyte.java new file mode 100644 index 0000000..6f4fcc5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLbyte.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opengl; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: GLbyte.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLbyte { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLchar.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLchar.java new file mode 100644 index 0000000..a31bf42 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLchar.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opengl; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: GLchar.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLchar { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLcharARB.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLcharARB.java new file mode 100644 index 0000000..25fe1f7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLcharARB.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opengl; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: GLcharARB.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLcharARB { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLclampd.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLclampd.java new file mode 100644 index 0000000..21c85fb --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLclampd.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opengl; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: GLclampd.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLclampd { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLclampf.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLclampf.java new file mode 100644 index 0000000..0027efb --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLclampf.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opengl; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: GLclampf.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLclampf { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLdouble.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLdouble.java new file mode 100644 index 0000000..10fdf38 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLdouble.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opengl; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: GLdouble.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLdouble { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLenum.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLenum.java new file mode 100644 index 0000000..fecf2eb --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLenum.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opengl; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: GLenum.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLenum { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLfloat.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLfloat.java new file mode 100644 index 0000000..ba90d6c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLfloat.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opengl; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: GLfloat.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLfloat { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLhalf.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLhalf.java new file mode 100644 index 0000000..dd77e6f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLhalf.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opengl; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: GLhalf.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLhalf { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLhandleARB.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLhandleARB.java new file mode 100644 index 0000000..6d8f05e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLhandleARB.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opengl; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: GLhandleARB.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLhandleARB { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLint.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLint.java new file mode 100644 index 0000000..cb9fc0d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLint.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opengl; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: GLint.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLint { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLint64.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLint64.java new file mode 100644 index 0000000..e83f034 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLint64.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opengl; + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLint64 { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLint64EXT.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLint64EXT.java new file mode 100644 index 0000000..e215241 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLint64EXT.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opengl; + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLint64EXT { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLintptr.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLintptr.java new file mode 100644 index 0000000..11da320 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLintptr.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opengl; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: GLintptr.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; +import org.lwjgl.util.generator.PointerType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@PointerType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLintptr { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLintptrARB.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLintptrARB.java new file mode 100644 index 0000000..c0b0e60 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLintptrARB.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opengl; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: GLintptrARB.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; +import org.lwjgl.util.generator.PointerType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@PointerType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLintptrARB { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLreturn.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLreturn.java new file mode 100644 index 0000000..2ab196e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLreturn.java @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opengl; + +/** + * When a method is annonated with @GLreturn, the specified output Buffer parameter + * will be used to return a single value. The primitive type will match the Buffer type. + * String will be returned if the Buffer is a ByteBuffer annotated with @GLchar. + * + * @author spasi + */ +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@NativeType +@Target({ ElementType.METHOD }) +public @interface GLreturn { + /** The Buffer parameter to use as the method result. */ + String value(); + /** The argument that specifies the maximum number of bytes that may be read (String results only). */ + String maxLength() default ""; + /** If true, the maxLength value is going to be used when creating the String. */ + boolean forceMaxLength() default false; + ///** If we use the byte buffer for another parameter, an offset must be used. */ + //String offset() default ""; +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLshort.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLshort.java new file mode 100644 index 0000000..44c27b1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLshort.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opengl; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: GLshort.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLshort { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLsizei.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLsizei.java new file mode 100644 index 0000000..ce787e5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLsizei.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opengl; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: GLsizei.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLsizei { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLsizeiptr.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLsizeiptr.java new file mode 100644 index 0000000..eba3c28 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLsizeiptr.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opengl; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: GLsizeiptr.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; +import org.lwjgl.util.generator.PointerType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@PointerType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLsizeiptr { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLsizeiptrARB.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLsizeiptrARB.java new file mode 100644 index 0000000..8c56bab --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLsizeiptrARB.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opengl; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: GLsizeiptrARB.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; +import org.lwjgl.util.generator.PointerType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@PointerType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLsizeiptrARB { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLtime.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLtime.java new file mode 100644 index 0000000..c53b62c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLtime.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opengl; + +/** + * Unsigned binary representing an absolute absolute or relative time interval. + * Precision is nanoseconds but accuracy is implementation-dependent. + * + * @author spasi + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Target; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLtime { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLubyte.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLubyte.java new file mode 100644 index 0000000..a22c539 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLubyte.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opengl; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: GLubyte.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLubyte { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLuint.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLuint.java new file mode 100644 index 0000000..44760a8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLuint.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opengl; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: GLuint.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLuint { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLuint64.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLuint64.java new file mode 100644 index 0000000..9395dd8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLuint64.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opengl; + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLuint64 { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLuint64EXT.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLuint64EXT.java new file mode 100644 index 0000000..05a228f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLuint64EXT.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opengl; + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLuint64EXT { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLushort.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLushort.java new file mode 100644 index 0000000..18d3198 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLushort.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opengl; + +/** + * + * @author elias_naur + * @version $Revision: 2983 $ + * $Id: GLushort.java 2983 2008-04-07 18:36:09Z matzon $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLushort { +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLvoid.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLvoid.java new file mode 100644 index 0000000..8cff6a2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/generator/opengl/GLvoid.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.generator.opengl; + +/** + * + * @author elias_naur + * @version $Revision: 3279 $ + * $Id: GLvoid.java 3279 2010-03-11 21:06:49Z spasi $ + */ + +import org.lwjgl.util.generator.NativeType; + +import java.lang.annotation.Target; +import java.lang.annotation.ElementType; + +import com.sun.mirror.type.PrimitiveType; + +@NativeType +@Target({ElementType.PARAMETER, ElementType.METHOD}) +public @interface GLvoid { + PrimitiveType.Kind value() default PrimitiveType.Kind.BYTE; +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/Cylinder.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/Cylinder.java new file mode 100644 index 0000000..f964c60 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/Cylinder.java @@ -0,0 +1,201 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.glu; + +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.util.glu.GLU.*; + +/** + * Cylinder.java + * + * + * Created 23-dec-2003 + * @author Erik Duijs + */ +public class Cylinder extends Quadric { + + /** + * Constructor for Cylinder. + */ + public Cylinder() { + super(); + } + + /** + * draws a cylinder oriented along the z axis. The base of the + * cylinder is placed at z = 0, and the top at z=height. Like a sphere, a + * cylinder is subdivided around the z axis into slices, and along the z axis + * into stacks. + * + * Note that if topRadius is set to zero, then this routine will generate a + * cone. + * + * If the orientation is set to GLU.OUTSIDE (with glu.quadricOrientation), then + * any generated normals point away from the z axis. Otherwise, they point + * toward the z axis. + * + * If texturing is turned on (with glu.quadricTexture), then texture + * coordinates are generated so that t ranges linearly from 0.0 at z = 0 to + * 1.0 at z = height, and s ranges from 0.0 at the +y axis, to 0.25 at the +x + * axis, to 0.5 at the -y axis, to 0.75 at the -x axis, and back to 1.0 at the + * +y axis. + * + * @param baseRadius Specifies the radius of the cylinder at z = 0. + * @param topRadius Specifies the radius of the cylinder at z = height. + * @param height Specifies the height of the cylinder. + * @param slices Specifies the number of subdivisions around the z axis. + * @param stacks Specifies the number of subdivisions along the z axis. + */ + public void draw(float baseRadius, float topRadius, float height, int slices, int stacks) { + + float da, r, dr, dz; + float x, y, z, nz, nsign; + int i, j; + + if (super.orientation == GLU_INSIDE) { + nsign = -1.0f; + } else { + nsign = 1.0f; + } + + da = 2.0f * PI / slices; + dr = (topRadius - baseRadius) / stacks; + dz = height / stacks; + nz = (baseRadius - topRadius) / height; + // Z component of normal vectors + + if (super.drawStyle == GLU_POINT) { + glBegin(GL_POINTS); + for (i = 0; i < slices; i++) { + x = cos((i * da)); + y = sin((i * da)); + normal3f(x * nsign, y * nsign, nz * nsign); + + z = 0.0f; + r = baseRadius; + for (j = 0; j <= stacks; j++) { + glVertex3f((x * r), (y * r), z); + z += dz; + r += dr; + } + } + glEnd(); + } else if (super.drawStyle == GLU_LINE || super.drawStyle == GLU_SILHOUETTE) { + // Draw rings + if (super.drawStyle == GLU_LINE) { + z = 0.0f; + r = baseRadius; + for (j = 0; j <= stacks; j++) { + glBegin(GL_LINE_LOOP); + for (i = 0; i < slices; i++) { + x = cos((i * da)); + y = sin((i * da)); + normal3f(x * nsign, y * nsign, nz * nsign); + glVertex3f((x * r), (y * r), z); + } + glEnd(); + z += dz; + r += dr; + } + } else { + // draw one ring at each end + if (baseRadius != 0.0) { + glBegin(GL_LINE_LOOP); + for (i = 0; i < slices; i++) { + x = cos((i * da)); + y = sin((i * da)); + normal3f(x * nsign, y * nsign, nz * nsign); + glVertex3f((x * baseRadius), (y * baseRadius), 0.0f); + } + glEnd(); + glBegin(GL_LINE_LOOP); + for (i = 0; i < slices; i++) { + x = cos((i * da)); + y = sin((i * da)); + normal3f(x * nsign, y * nsign, nz * nsign); + glVertex3f((x * topRadius), (y * topRadius), height); + } + glEnd(); + } + } + // draw length lines + glBegin(GL_LINES); + for (i = 0; i < slices; i++) { + x = cos((i * da)); + y = sin((i * da)); + normal3f(x * nsign, y * nsign, nz * nsign); + glVertex3f((x * baseRadius), (y * baseRadius), 0.0f); + glVertex3f((x * topRadius), (y * topRadius), (height)); + } + glEnd(); + } else if (super.drawStyle == GLU_FILL) { + float ds = 1.0f / slices; + float dt = 1.0f / stacks; + float t = 0.0f; + z = 0.0f; + r = baseRadius; + for (j = 0; j < stacks; j++) { + float s = 0.0f; + glBegin(GL_QUAD_STRIP); + for (i = 0; i <= slices; i++) { + if (i == slices) { + x = sin(0.0f); + y = cos(0.0f); + } else { + x = sin((i * da)); + y = cos((i * da)); + } + if (nsign == 1.0f) { + normal3f((x * nsign), (y * nsign), (nz * nsign)); + TXTR_COORD(s, t); + glVertex3f((x * r), (y * r), z); + normal3f((x * nsign), (y * nsign), (nz * nsign)); + TXTR_COORD(s, t + dt); + glVertex3f((x * (r + dr)), (y * (r + dr)), (z + dz)); + } else { + normal3f(x * nsign, y * nsign, nz * nsign); + TXTR_COORD(s, t); + glVertex3f((x * r), (y * r), z); + normal3f(x * nsign, y * nsign, nz * nsign); + TXTR_COORD(s, t + dt); + glVertex3f((x * (r + dr)), (y * (r + dr)), (z + dz)); + } + s += ds; + } // for slices + glEnd(); + r += dr; + t += dt; + z += dz; + } // for stacks + } + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/Disk.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/Disk.java new file mode 100644 index 0000000..b71cf36 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/Disk.java @@ -0,0 +1,214 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.glu; + +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.util.glu.GLU.*; + +/** + * Disk.java + * + * + * Created 23-dec-2003 + * @author Erik Duijs + */ +public class Disk extends Quadric { + + /** + * Constructor for Disk. + */ + public Disk() { + super(); + } + + /** + * renders a disk on the z = 0 plane. The disk has a radius of + * outerRadius, and contains a concentric circular hole with a radius of + * innerRadius. If innerRadius is 0, then no hole is generated. The disk is + * subdivided around the z axis into slices (like pizza slices), and also + * about the z axis into rings (as specified by slices and loops, + * respectively). + * + * With respect to orientation, the +z side of the disk is considered to be + * "outside" (see glu.quadricOrientation). This means that if the orientation + * is set to GLU.OUTSIDE, then any normals generated point along the +z axis. + * Otherwise, they point along the -z axis. + * + * If texturing is turned on (with glu.quadricTexture), texture coordinates are + * generated linearly such that where r=outerRadius, the value at (r, 0, 0) is + * (1, 0.5), at (0, r, 0) it is (0.5, 1), at (-r, 0, 0) it is (0, 0.5), and at + * (0, -r, 0) it is (0.5, 0). + */ + public void draw(float innerRadius, float outerRadius, int slices, int loops) + { + float da, dr; + + /* Normal vectors */ + if (super.normals != GLU_NONE) { + if (super.orientation == GLU_OUTSIDE) { + glNormal3f(0.0f, 0.0f, +1.0f); + } + else { + glNormal3f(0.0f, 0.0f, -1.0f); + } + } + + da = 2.0f * PI / slices; + dr = (outerRadius - innerRadius) / loops; + + switch (super.drawStyle) { + case GLU_FILL: + { + /* texture of a gluDisk is a cut out of the texture unit square + * x, y in [-outerRadius, +outerRadius]; s, t in [0, 1] + * (linear mapping) + */ + float dtc = 2.0f * outerRadius; + float sa, ca; + float r1 = innerRadius; + int l; + for (l = 0; l < loops; l++) { + float r2 = r1 + dr; + if (super.orientation == GLU_OUTSIDE) { + int s; + glBegin(GL_QUAD_STRIP); + for (s = 0; s <= slices; s++) { + float a; + if (s == slices) + a = 0.0f; + else + a = s * da; + sa = sin(a); + ca = cos(a); + TXTR_COORD(0.5f + sa * r2 / dtc, 0.5f + ca * r2 / dtc); + glVertex2f(r2 * sa, r2 * ca); + TXTR_COORD(0.5f + sa * r1 / dtc, 0.5f + ca * r1 / dtc); + glVertex2f(r1 * sa, r1 * ca); + } + glEnd(); + } + else { + int s; + glBegin(GL_QUAD_STRIP); + for (s = slices; s >= 0; s--) { + float a; + if (s == slices) + a = 0.0f; + else + a = s * da; + sa = sin(a); + ca = cos(a); + TXTR_COORD(0.5f - sa * r2 / dtc, 0.5f + ca * r2 / dtc); + glVertex2f(r2 * sa, r2 * ca); + TXTR_COORD(0.5f - sa * r1 / dtc, 0.5f + ca * r1 / dtc); + glVertex2f(r1 * sa, r1 * ca); + } + glEnd(); + } + r1 = r2; + } + break; + } + case GLU_LINE: + { + int l, s; + /* draw loops */ + for (l = 0; l <= loops; l++) { + float r = innerRadius + l * dr; + glBegin(GL_LINE_LOOP); + for (s = 0; s < slices; s++) { + float a = s * da; + glVertex2f(r * sin(a), r * cos(a)); + } + glEnd(); + } + /* draw spokes */ + for (s = 0; s < slices; s++) { + float a = s * da; + float x = sin(a); + float y = cos(a); + glBegin(GL_LINE_STRIP); + for (l = 0; l <= loops; l++) { + float r = innerRadius + l * dr; + glVertex2f(r * x, r * y); + } + glEnd(); + } + break; + } + case GLU_POINT: + { + int s; + glBegin(GL_POINTS); + for (s = 0; s < slices; s++) { + float a = s * da; + float x = sin(a); + float y = cos(a); + int l; + for (l = 0; l <= loops; l++) { + float r = innerRadius * l * dr; + glVertex2f(r * x, r * y); + } + } + glEnd(); + break; + } + case GLU_SILHOUETTE: + { + if (innerRadius != 0.0) { + float a; + glBegin(GL_LINE_LOOP); + for (a = 0.0f; a < 2.0 * PI; a += da) { + float x = innerRadius * sin(a); + float y = innerRadius * cos(a); + glVertex2f(x, y); + } + glEnd(); + } + { + float a; + glBegin(GL_LINE_LOOP); + for (a = 0; a < 2.0f * PI; a += da) { + float x = outerRadius * sin(a); + float y = outerRadius * cos(a); + glVertex2f(x, y); + } + glEnd(); + } + break; + } + default: + return; + } + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/GLU.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/GLU.java new file mode 100644 index 0000000..7268c5d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/GLU.java @@ -0,0 +1,430 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.glu; + +import java.nio.ByteBuffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; + +import org.lwjgl.opengl.Util; +import org.lwjgl.util.glu.tessellation.GLUtessellatorImpl; + +import static org.lwjgl.opengl.GL11.*; + +/** + * GLU.java + * + * + * Created 23-dec-2003 + * @author Erik Duijs + */ +public class GLU { + static final float PI = (float)Math.PI; + + /* Errors: (return value 0 = no error) */ + public static final int GLU_INVALID_ENUM = 100900; + public static final int GLU_INVALID_VALUE = 100901; + public static final int GLU_OUT_OF_MEMORY = 100902; + public static final int GLU_INCOMPATIBLE_GL_VERSION = 100903; + + /* StringName */ + public static final int GLU_VERSION = 100800; + public static final int GLU_EXTENSIONS = 100801; + + /* Boolean */ + public static final boolean GLU_TRUE = true; + public static final boolean GLU_FALSE = false; + + + /**** Quadric constants ****/ + + /* QuadricNormal */ + public static final int GLU_SMOOTH = 100000; + public static final int GLU_FLAT = 100001; + public static final int GLU_NONE = 100002; + + /* QuadricDrawStyle */ + public static final int GLU_POINT = 100010; + public static final int GLU_LINE = 100011; + public static final int GLU_FILL = 100012; + public static final int GLU_SILHOUETTE = 100013; + + /* QuadricOrientation */ + public static final int GLU_OUTSIDE = 100020; + public static final int GLU_INSIDE = 100021; + + /* Callback types: */ + /* ERROR = 100103 */ + + + /**** Tesselation constants ****/ + + public static final double GLU_TESS_MAX_COORD = 1.0e150; + public static final double TESS_MAX_COORD = 1.0e150; + + /* TessProperty */ + public static final int GLU_TESS_WINDING_RULE = 100140; + public static final int GLU_TESS_BOUNDARY_ONLY = 100141; + public static final int GLU_TESS_TOLERANCE = 100142; + + /* TessWinding */ + public static final int GLU_TESS_WINDING_ODD = 100130; + public static final int GLU_TESS_WINDING_NONZERO = 100131; + public static final int GLU_TESS_WINDING_POSITIVE = 100132; + public static final int GLU_TESS_WINDING_NEGATIVE = 100133; + public static final int GLU_TESS_WINDING_ABS_GEQ_TWO = 100134; + + /* TessCallback */ + public static final int GLU_TESS_BEGIN = 100100; /* void (CALLBACK*)(GLenum type) */ + public static final int GLU_TESS_VERTEX = 100101; /* void (CALLBACK*)(void *data) */ + public static final int GLU_TESS_END = 100102; /* void (CALLBACK*)(void) */ + public static final int GLU_TESS_ERROR = 100103; /* void (CALLBACK*)(GLenum errno) */ + public static final int GLU_TESS_EDGE_FLAG = 100104; /* void (CALLBACK*)(GLboolean boundaryEdge) */ + public static final int GLU_TESS_COMBINE = 100105; /* void (CALLBACK*)(GLdouble coords[3], + void *data[4], + GLfloat weight[4], + void **dataOut) */ + public static final int GLU_TESS_BEGIN_DATA = 100106; /* void (CALLBACK*)(GLenum type, + void *polygon_data) */ + public static final int GLU_TESS_VERTEX_DATA = 100107; /* void (CALLBACK*)(void *data, + void *polygon_data) */ + public static final int GLU_TESS_END_DATA = 100108; /* void (CALLBACK*)(void *polygon_data) */ + public static final int GLU_TESS_ERROR_DATA = 100109; /* void (CALLBACK*)(GLenum errno, + void *polygon_data) */ + public static final int GLU_TESS_EDGE_FLAG_DATA = 100110; /* void (CALLBACK*)(GLboolean boundaryEdge, + void *polygon_data) */ + public static final int GLU_TESS_COMBINE_DATA = 100111; /* void (CALLBACK*)(GLdouble coords[3], + void *data[4], + GLfloat weight[4], + void **dataOut, + void *polygon_data) */ + + /* TessError */ + public static final int GLU_TESS_ERROR1 = 100151; + public static final int GLU_TESS_ERROR2 = 100152; + public static final int GLU_TESS_ERROR3 = 100153; + public static final int GLU_TESS_ERROR4 = 100154; + public static final int GLU_TESS_ERROR5 = 100155; + public static final int GLU_TESS_ERROR6 = 100156; + public static final int GLU_TESS_ERROR7 = 100157; + public static final int GLU_TESS_ERROR8 = 100158; + + public static final int GLU_TESS_MISSING_BEGIN_POLYGON = GLU_TESS_ERROR1; + public static final int GLU_TESS_MISSING_BEGIN_CONTOUR = GLU_TESS_ERROR2; + public static final int GLU_TESS_MISSING_END_POLYGON = GLU_TESS_ERROR3; + public static final int GLU_TESS_MISSING_END_CONTOUR = GLU_TESS_ERROR4; + public static final int GLU_TESS_COORD_TOO_LARGE = GLU_TESS_ERROR5; + public static final int GLU_TESS_NEED_COMBINE_CALLBACK = GLU_TESS_ERROR6; + + /**** NURBS constants ****/ + + /* NurbsProperty */ + public static final int GLU_AUTO_LOAD_MATRIX = 100200; + public static final int GLU_CULLING = 100201; + public static final int GLU_SAMPLING_TOLERANCE = 100203; + public static final int GLU_DISPLAY_MODE = 100204; + public static final int GLU_PARAMETRIC_TOLERANCE = 100202; + public static final int GLU_SAMPLING_METHOD = 100205; + public static final int GLU_U_STEP = 100206; + public static final int GLU_V_STEP = 100207; + + /* NurbsSampling */ + public static final int GLU_PATH_LENGTH = 100215; + public static final int GLU_PARAMETRIC_ERROR = 100216; + public static final int GLU_DOMAIN_DISTANCE = 100217; + + + /* NurbsTrim */ + public static final int GLU_MAP1_TRIM_2 = 100210; + public static final int GLU_MAP1_TRIM_3 = 100211; + + /* NurbsDisplay */ + /* FILL = 100012 */ + public static final int GLU_OUTLINE_POLYGON = 100240; + public static final int GLU_OUTLINE_PATCH = 100241; + + /* NurbsCallback */ + /* ERROR = 100103 */ + + /* NurbsErrors */ + public static final int GLU_NURBS_ERROR1 = 100251; + public static final int GLU_NURBS_ERROR2 = 100252; + public static final int GLU_NURBS_ERROR3 = 100253; + public static final int GLU_NURBS_ERROR4 = 100254; + public static final int GLU_NURBS_ERROR5 = 100255; + public static final int GLU_NURBS_ERROR6 = 100256; + public static final int GLU_NURBS_ERROR7 = 100257; + public static final int GLU_NURBS_ERROR8 = 100258; + public static final int GLU_NURBS_ERROR9 = 100259; + public static final int GLU_NURBS_ERROR10 = 100260; + public static final int GLU_NURBS_ERROR11 = 100261; + public static final int GLU_NURBS_ERROR12 = 100262; + public static final int GLU_NURBS_ERROR13 = 100263; + public static final int GLU_NURBS_ERROR14 = 100264; + public static final int GLU_NURBS_ERROR15 = 100265; + public static final int GLU_NURBS_ERROR16 = 100266; + public static final int GLU_NURBS_ERROR17 = 100267; + public static final int GLU_NURBS_ERROR18 = 100268; + public static final int GLU_NURBS_ERROR19 = 100269; + public static final int GLU_NURBS_ERROR20 = 100270; + public static final int GLU_NURBS_ERROR21 = 100271; + public static final int GLU_NURBS_ERROR22 = 100272; + public static final int GLU_NURBS_ERROR23 = 100273; + public static final int GLU_NURBS_ERROR24 = 100274; + public static final int GLU_NURBS_ERROR25 = 100275; + public static final int GLU_NURBS_ERROR26 = 100276; + public static final int GLU_NURBS_ERROR27 = 100277; + public static final int GLU_NURBS_ERROR28 = 100278; + public static final int GLU_NURBS_ERROR29 = 100279; + public static final int GLU_NURBS_ERROR30 = 100280; + public static final int GLU_NURBS_ERROR31 = 100281; + public static final int GLU_NURBS_ERROR32 = 100282; + public static final int GLU_NURBS_ERROR33 = 100283; + public static final int GLU_NURBS_ERROR34 = 100284; + public static final int GLU_NURBS_ERROR35 = 100285; + public static final int GLU_NURBS_ERROR36 = 100286; + public static final int GLU_NURBS_ERROR37 = 100287; + + /* Contours types -- obsolete! */ + public static final int GLU_CW = 100120; + public static final int GLU_CCW = 100121; + public static final int GLU_INTERIOR = 100122; + public static final int GLU_EXTERIOR = 100123; + public static final int GLU_UNKNOWN = 100124; + + /* Names without "TESS_" prefix */ + public static final int GLU_BEGIN = GLU_TESS_BEGIN; + public static final int GLU_VERTEX = GLU_TESS_VERTEX; + public static final int GLU_END = GLU_TESS_END; + public static final int GLU_ERROR = GLU_TESS_ERROR; + public static final int GLU_EDGE_FLAG = GLU_TESS_EDGE_FLAG; + + /** + * Method gluLookAt + * @param eyex + * @param eyey + * @param eyez + * @param centerx + * @param centery + * @param centerz + * @param upx + * @param upy + * @param upz + */ + public static void gluLookAt( + float eyex, + float eyey, + float eyez, + float centerx, + float centery, + float centerz, + float upx, + float upy, + float upz) { + + Project.gluLookAt(eyex, eyey, eyez, centerx, centery, centerz, upx, upy, upz); + } + + /** + * Method gluOrtho2D + * @param left + * @param right + * @param bottom + * @param top + */ + public static void gluOrtho2D( + float left, + float right, + float bottom, + float top) { + + glOrtho(left, right, bottom, top, -1.0, 1.0); + } + + /** + * Method gluPerspective + * @param fovy + * @param aspect + * @param zNear + * @param zFar + */ + public static void gluPerspective( + float fovy, + float aspect, + float zNear, + float zFar) { + + Project.gluPerspective(fovy, aspect, zNear, zFar); + } + + /** + * Method gluProject + * @param objx + * @param objy + * @param objz + * @param modelMatrix + * @param projMatrix + * @param viewport + * @param win_pos + */ + public static boolean gluProject(float objx, float objy, float objz, + FloatBuffer modelMatrix, + FloatBuffer projMatrix, + IntBuffer viewport, + FloatBuffer win_pos) + { + return Project.gluProject(objx, objy, objz, modelMatrix, projMatrix, viewport, win_pos); + } + + /** + * Method gluUnproject + * @param winx + * @param winy + * @param winz + * @param modelMatrix + * @param projMatrix + * @param viewport + * @param obj_pos + */ + public static boolean gluUnProject(float winx, float winy, float winz, + FloatBuffer modelMatrix, + FloatBuffer projMatrix, + IntBuffer viewport, + FloatBuffer obj_pos) + { + return Project.gluUnProject(winx, winy, winz, modelMatrix, projMatrix, viewport, obj_pos); + } + + /** + * Method gluPickMatrix + * @param x + * @param y + * @param width + * @param height + * @param viewport + */ + public static void gluPickMatrix( + float x, + float y, + float width, + float height, + IntBuffer viewport) { + + Project.gluPickMatrix(x, y, width, height, viewport); + } + + /** + * Method gluGetString. + * @param name + * @return String + */ + public static String gluGetString(int name) { + return Registry.gluGetString(name); + } + + /** + * Method gluCheckExtension. + * @param extName + * @param extString + * @return boolean + */ + public static boolean gluCheckExtension(String extName, String extString) { + return Registry.gluCheckExtension(extName, extString); + } + + /** + * Method gluBuild2DMipmaps + * @param target + * @param components + * @param width + * @param height + * @param format + * @param type + * @param data + * @return int + */ + public static int gluBuild2DMipmaps( + int target, + int components, + int width, + int height, + int format, + int type, + ByteBuffer data) { + + return MipMap.gluBuild2DMipmaps(target, components, width, height, format, type, data); + } + + /** + * Method gluScaleImage. + * @param format + * @param widthIn + * @param heightIn + * @param typeIn + * @param dataIn + * @param widthOut + * @param heightOut + * @param typeOut + * @param dataOut + * @return int + */ + public static int gluScaleImage( + int format, + int widthIn, + int heightIn, + int typeIn, + ByteBuffer dataIn, + int widthOut, + int heightOut, + int typeOut, + ByteBuffer dataOut) { + + return MipMap.gluScaleImage(format, widthIn, heightIn, typeIn, dataIn, widthOut, heightOut, typeOut, dataOut); + } + + public static String gluErrorString(int error_code) { + switch (error_code) { + case GLU_INVALID_ENUM: + return "Invalid enum (glu)"; + case GLU_INVALID_VALUE: + return "Invalid value (glu)"; + case GLU_OUT_OF_MEMORY: + return "Out of memory (glu)"; + default: + return Util.translateGLErrorString(error_code); + } + } + + public static GLUtessellator gluNewTess() { + return new GLUtessellatorImpl(); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/GLUtessellator.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/GLUtessellator.java new file mode 100644 index 0000000..521ee04 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/GLUtessellator.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package org.lwjgl.util.glu; + +public interface GLUtessellator { + + void gluDeleteTess(); + + void gluTessProperty(int which, double value); + + /* Returns tessellator property */ + void gluGetTessProperty(int which, double[] value, + int value_offset); /* gluGetTessProperty() */ + + void gluTessNormal(double x, double y, double z); + + void gluTessCallback(int which, + GLUtessellatorCallback aCallback); + + void gluTessVertex(double[] coords, int coords_offset, + Object vertexData); + + void gluTessBeginPolygon(Object data); + + void gluTessBeginContour(); + + void gluTessEndContour(); + + void gluTessEndPolygon(); + + /*******************************************************/ + + /* Obsolete calls -- for backward compatibility */ + + void gluBeginPolygon(); + + /*ARGSUSED*/ + void gluNextContour(int type); + + void gluEndPolygon(); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/GLUtessellatorCallback.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/GLUtessellatorCallback.java new file mode 100644 index 0000000..1a008e7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/GLUtessellatorCallback.java @@ -0,0 +1,388 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* +* Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. +* All rights reserved. +*/ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** NOTE: The Original Code (as defined below) has been licensed to Sun +** Microsystems, Inc. ("Sun") under the SGI Free Software License B +** (Version 1.1), shown above ("SGI License"). Pursuant to Section +** 3.2(3) of the SGI License, Sun is distributing the Covered Code to +** you under an alternative license ("Alternative License"). This +** Alternative License includes all of the provisions of the SGI License +** except that Section 2.2 and 11 are omitted. Any differences between +** the Alternative License and the SGI License are offered solely by Sun +** and not by SGI. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +** Author: Eric Veach, July 1994 +** Java Port: Pepijn Van Eeckhoudt, July 2003 +** Java Port: Nathan Parker Burg, August 2003 +*/ +package org.lwjgl.util.glu; + +/** + * GLUtessellatorCallback interface provides methods that the user will + * override to define the callbacks for a tessellation object. + * + * @author Eric Veach, July 1994 + * @author Java Port: Pepijn Van Eeckhoudt, July 2003 + * @author Java Port: Nathan Parker Burg, August 2003 + */ +public interface GLUtessellatorCallback { + /** + * The begin callback method is invoked like + * {@link javax.media.opengl.GL#glBegin glBegin} to indicate the start of a + * (triangle) primitive. The method takes a single argument of type int. If + * the GLU_TESS_BOUNDARY_ONLY property is set to GL_FALSE, then + * the argument is set to either GL_TRIANGLE_FAN, + * GL_TRIANGLE_STRIP, or GL_TRIANGLES. If the + * GLU_TESS_BOUNDARY_ONLY property is set to GL_TRUE, then the + * argument will be set to GL_LINE_LOOP. + * + * @param type + * Specifics the type of begin/end pair being defined. The following + * values are valid: GL_TRIANGLE_FAN, GL_TRIANGLE_STRIP, + * GL_TRIANGLES or GL_LINE_LOOP. + * + * @see GLU#gluTessCallback gluTessCallback + * @see #end end + * @see #begin begin + */ + void begin(int type); + + /** + * The same as the {@link #begin begin} callback method except that + * it takes an additional reference argument. This reference is + * identical to the opaque reference provided when {@link + * GLU#gluTessBeginPolygon gluTessBeginPolygon} was called. + * + * @param type + * Specifics the type of begin/end pair being defined. The following + * values are valid: GL_TRIANGLE_FAN, GL_TRIANGLE_STRIP, + * GL_TRIANGLES or GL_LINE_LOOP. + * @param polygonData + * Specifics a reference to user-defined data. + * + * @see GLU#gluTessCallback gluTessCallback + * @see #endData endData + * @see #begin begin + */ + void beginData(int type, Object polygonData); + + + /** + * The edgeFlag callback method is similar to + * {@link javax.media.opengl.GL#glEdgeFlag glEdgeFlag}. The method takes + * a single boolean boundaryEdge that indicates which edges lie on the + * polygon boundary. If the boundaryEdge is GL_TRUE, then each vertex + * that follows begins an edge that lies on the polygon boundary, that is, + * an edge that separates an interior region from an exterior one. If the + * boundaryEdge is GL_FALSE, then each vertex that follows begins an + * edge that lies in the polygon interior. The edge flag callback (if + * defined) is invoked before the first vertex callback.

+ * + * Since triangle fans and triangle strips do not support edge flags, the + * begin callback is not called with GL_TRIANGLE_FAN or + * GL_TRIANGLE_STRIP if a non-null edge flag callback is provided. + * (If the callback is initialized to null, there is no impact on + * performance). Instead, the fans and strips are converted to independent + * triangles. + * + * @param boundaryEdge + * Specifics which edges lie on the polygon boundary. + * + * @see GLU#gluTessCallback gluTessCallback + * @see #edgeFlagData edgeFlagData + */ + void edgeFlag(boolean boundaryEdge); + + + /** + * The same as the {@link #edgeFlag edgeFlage} callback method + * except that it takes an additional reference argument. This + * reference is identical to the opaque reference provided when + * {@link GLU#gluTessBeginPolygon gluTessBeginPolygon} was called. + * + * @param boundaryEdge + * Specifics which edges lie on the polygon boundary. + * @param polygonData + * Specifics a reference to user-defined data. + * + * @see GLU#gluTessCallback gluTessCallback + * @see #edgeFlag edgeFlag + */ + void edgeFlagData(boolean boundaryEdge, Object polygonData); + + + /** + * The vertex callback method is invoked between the {@link + * #begin begin} and {@link #end end} callback methods. It is + * similar to {@link javax.media.opengl.GL#glVertex3f glVertex3f}, + * and it defines the vertices of the triangles created by the + * tessellation process. The method takes a reference as its only + * argument. This reference is identical to the opaque reference + * provided by the user when the vertex was described (see {@link + * GLU#gluTessVertex gluTessVertex}). + * + * @param vertexData + * Specifics a reference to the vertices of the triangles created + * byt the tessellatin process. + * + * @see GLU#gluTessCallback gluTessCallback + * @see #vertexData vertexData + */ + void vertex(Object vertexData); + + + /** + * The same as the {@link #vertex vertex} callback method except + * that it takes an additional reference argument. This reference is + * identical to the opaque reference provided when {@link + * GLU#gluTessBeginPolygon gluTessBeginPolygon} was called. + * + * @param vertexData + * Specifics a reference to the vertices of the triangles created + * byt the tessellatin process. + * @param polygonData + * Specifics a reference to user-defined data. + * + * @see GLU#gluTessCallback gluTessCallback + * @see #vertex vertex + */ + void vertexData(Object vertexData, Object polygonData); + + + /** + * The end callback serves the same purpose as + * {@link javax.media.opengl.GL#glEnd glEnd}. It indicates the end of a + * primitive and it takes no arguments. + * + * @see GLU#gluTessCallback gluTessCallback + * @see #begin begin + * @see #endData endData + */ + void end(); + + + /** + * The same as the {@link #end end} callback method except that it + * takes an additional reference argument. This reference is + * identical to the opaque reference provided when {@link + * GLU#gluTessBeginPolygon gluTessBeginPolygon} was called. + * + * @param polygonData + * Specifics a reference to user-defined data. + * + * @see GLU#gluTessCallback gluTessCallback + * @see #beginData beginData + * @see #end end + */ + void endData(Object polygonData); + + + /** + * The combine callback method is called to create a new vertex when + * the tessellation detects an intersection, or wishes to merge features. The + * method takes four arguments: an array of three elements each of type + * double, an array of four references, an array of four elements each of + * type float, and a reference to a reference.

+ * + * The vertex is defined as a linear combination of up to four existing + * vertices, stored in data. The coefficients of the linear combination + * are given by weight; these weights always add up to 1. All vertex + * pointers are valid even when some of the weights are 0. coords gives + * the location of the new vertex.

+ * + * The user must allocate another vertex, interpolate parameters using + * data and weight, and return the new vertex pointer in + * outData. This handle is supplied during rendering callbacks. The + * user is responsible for freeing the memory some time after + * {@link GLU#gluTessEndPolygon gluTessEndPolygon} is + * called.

+ * + * For example, if the polygon lies in an arbitrary plane in 3-space, and a + * color is associated with each vertex, the GLU_TESS_COMBINE + * callback might look like this: + * + *

+   *         void myCombine(double[] coords, Object[] data,
+   *                        float[] weight, Object[] outData)
+   *         {
+   *            MyVertex newVertex = new MyVertex();
+   *
+   *            newVertex.x = coords[0];
+   *            newVertex.y = coords[1];
+   *            newVertex.z = coords[2];
+   *            newVertex.r = weight[0]*data[0].r +
+   *                          weight[1]*data[1].r +
+   *                          weight[2]*data[2].r +
+   *                          weight[3]*data[3].r;
+   *            newVertex.g = weight[0]*data[0].g +
+   *                          weight[1]*data[1].g +
+   *                          weight[2]*data[2].g +
+   *                          weight[3]*data[3].g;
+   *            newVertex.b = weight[0]*data[0].b +
+   *                          weight[1]*data[1].b +
+   *                          weight[2]*data[2].b +
+   *                          weight[3]*data[3].b;
+   *            newVertex.a = weight[0]*data[0].a +
+   *                          weight[1]*data[1].a +
+   *                          weight[2]*data[2].a +
+   *                          weight[3]*data[3].a;
+   *            outData = newVertex;
+   *         }
+ * + * @param coords + * Specifics the location of the new vertex. + * @param data + * Specifics the vertices used to create the new vertex. + * @param weight + * Specifics the weights used to create the new vertex. + * @param outData + * Reference user the put the coodinates of the new vertex. + * + * @see GLU#gluTessCallback gluTessCallback + * @see #combineData combineData + */ + void combine(double[] coords, Object[] data, + float[] weight, Object[] outData); + + + /** + * The same as the {@link #combine combine} callback method except + * that it takes an additional reference argument. This reference is + * identical to the opaque reference provided when {@link + * GLU#gluTessBeginPolygon gluTessBeginPolygon} was called. + * + * @param coords + * Specifics the location of the new vertex. + * @param data + * Specifics the vertices used to create the new vertex. + * @param weight + * Specifics the weights used to create the new vertex. + * @param outData + * Reference user the put the coodinates of the new vertex. + * @param polygonData + * Specifics a reference to user-defined data. + * + * @see GLU#gluTessCallback gluTessCallback + * @see #combine combine + */ + void combineData(double[] coords, Object[] data, + float[] weight, Object[] outData, + Object polygonData); + + + /** + * The error callback method is called when an error is encountered. + * The one argument is of type int; it indicates the specific error that + * occurred and will be set to one of GLU_TESS_MISSING_BEGIN_POLYGON, + * GLU_TESS_MISSING_END_POLYGON, GLU_TESS_MISSING_BEGIN_CONTOUR, + * GLU_TESS_MISSING_END_CONTOUR, GLU_TESS_COORD_TOO_LARGE, + * GLU_TESS_NEED_COMBINE_CALLBACK or GLU_OUT_OF_MEMORY. + * Character strings describing these errors can be retrieved with the + * {@link GLU#gluErrorString gluErrorString} call.

+ * + * The GLU library will recover from the first four errors by inserting the + * missing call(s). GLU_TESS_COORD_TOO_LARGE indicates that some + * vertex coordinate exceeded the predefined constant + * GLU_TESS_MAX_COORD in absolute value, and that the value has been + * clamped. (Coordinate values must be small enough so that two can be + * multiplied together without overflow.) + * GLU_TESS_NEED_COMBINE_CALLBACK indicates that the tessellation + * detected an intersection between two edges in the input data, and the + * GLU_TESS_COMBINE or GLU_TESS_COMBINE_DATA callback was not + * provided. No output is generated. GLU_OUT_OF_MEMORY indicates that + * there is not enough memory so no output is generated. + * + * @param errnum + * Specifics the error number code. + * + * @see GLU#gluTessCallback gluTessCallback + * @see #errorData errorData + */ + void error(int errnum); + + + /** + * The same as the {@link #error error} callback method except that + * it takes an additional reference argument. This reference is + * identical to the opaque reference provided when {@link + * GLU#gluTessBeginPolygon gluTessBeginPolygon} was called. + * + * @param errnum + * Specifics the error number code. + * @param polygonData + * Specifics a reference to user-defined data. + * + * @see GLU#gluTessCallback gluTessCallback + * @see #error error + */ + void errorData(int errnum, Object polygonData); + + //void mesh(com.sun.opengl.impl.tessellator.GLUmesh mesh); +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/GLUtessellatorCallbackAdapter.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/GLUtessellatorCallbackAdapter.java new file mode 100644 index 0000000..7ca0044 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/GLUtessellatorCallbackAdapter.java @@ -0,0 +1,116 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* +* Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. +* All rights reserved. +*/ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** NOTE: The Original Code (as defined below) has been licensed to Sun +** Microsystems, Inc. ("Sun") under the SGI Free Software License B +** (Version 1.1), shown above ("SGI License"). Pursuant to Section +** 3.2(3) of the SGI License, Sun is distributing the Covered Code to +** you under an alternative license ("Alternative License"). This +** Alternative License includes all of the provisions of the SGI License +** except that Section 2.2 and 11 are omitted. Any differences between +** the Alternative License and the SGI License are offered solely by Sun +** and not by SGI. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +** Author: Eric Veach, July 1994 +** Java Port: Pepijn Van Eeckhoudt, July 2003 +** Java Port: Nathan Parker Burg, August 2003 +*/ +package org.lwjgl.util.glu; + +/** + * The GLUtessellatorCallbackAdapter provides a default implementation of + * {@link GLUtessellatorCallback GLUtessellatorCallback} + * with empty callback methods. This class can be extended to provide user + * defined callback methods. + * + * @author Eric Veach, July 1994 + * @author Java Port: Pepijn Van Eechhoudt, July 2003 + * @author Java Port: Nathan Parker Burg, August 2003 + */ + +public class GLUtessellatorCallbackAdapter implements GLUtessellatorCallback { + public void begin(int type) {} + public void edgeFlag(boolean boundaryEdge) {} + public void vertex(Object vertexData) {} + public void end() {} +// public void mesh(com.sun.opengl.impl.tessellator.GLUmesh mesh) {} + public void error(int errnum) {} + public void combine(double[] coords, Object[] data, + float[] weight, Object[] outData) {} + public void beginData(int type, Object polygonData) {} + public void edgeFlagData(boolean boundaryEdge, + Object polygonData) {} + public void vertexData(Object vertexData, Object polygonData) {} + public void endData(Object polygonData) {} + public void errorData(int errnum, Object polygonData) {} + public void combineData(double[] coords, Object[] data, + float[] weight, Object[] outData, + Object polygonData) {} +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/MipMap.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/MipMap.java new file mode 100644 index 0000000..b0fe3db --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/MipMap.java @@ -0,0 +1,353 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.glu; + +import java.nio.ByteBuffer; + +import org.lwjgl.BufferUtils; + +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.util.glu.GLU.*; + +/** + * MipMap.java + * + * + * Created 11-jan-2004 + * @author Erik Duijs + */ +public class MipMap extends Util { + + /** + * Method gluBuild2DMipmaps + * + * @param target + * @param components + * @param width + * @param height + * @param format + * @param type + * @param data + * @return int + */ + public static int gluBuild2DMipmaps(final int target, + final int components, final int width, final int height, + final int format, final int type, final ByteBuffer data) { + if ( width < 1 || height < 1 ) return GLU_INVALID_VALUE; + + final int bpp = bytesPerPixel(format, type); + if ( bpp == 0 ) + return GLU_INVALID_ENUM; + + final int maxSize = glGetIntegerv(GL_MAX_TEXTURE_SIZE); + + int w = nearestPower(width); + if ( w > maxSize ) + w = maxSize; + + int h = nearestPower(height); + if ( h > maxSize ) + h = maxSize; + + // Get current glPixelStore state + PixelStoreState pss = new PixelStoreState(); + + // set pixel packing + glPixelStorei(GL_PACK_ROW_LENGTH, 0); + glPixelStorei(GL_PACK_ALIGNMENT, 1); + glPixelStorei(GL_PACK_SKIP_ROWS, 0); + glPixelStorei(GL_PACK_SKIP_PIXELS, 0); + + ByteBuffer image; + int retVal = 0; + boolean done = false; + + if ( w != width || h != height ) { + // must rescale image to get "top" mipmap texture image + image = BufferUtils.createByteBuffer((w + 4) * h * bpp); + int error = gluScaleImage(format, width, height, type, data, w, h, type, image); + if ( error != 0 ) { + retVal = error; + done = true; + } + + /* set pixel unpacking */ + glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); + } else { + image = data; + } + + ByteBuffer bufferA = null; + ByteBuffer bufferB = null; + + int level = 0; + while ( !done ) { + if (image != data) { + /* set pixel unpacking */ + glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); + glPixelStorei(GL_UNPACK_SKIP_ROWS, 0); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, 0); + } + + glTexImage2D(target, level, components, w, h, 0, format, type, image); + + if ( w == 1 && h == 1 ) + break; + + final int newW = (w < 2) ? 1 : w >> 1; + final int newH = (h < 2) ? 1 : h >> 1; + + final ByteBuffer newImage; + + if ( bufferA == null ) + newImage = (bufferA = BufferUtils.createByteBuffer((newW + 4) * newH * bpp)); + else if ( bufferB == null ) + newImage = (bufferB = BufferUtils.createByteBuffer((newW + 4) * newH * bpp)); + else + newImage = bufferB; + + int error = gluScaleImage(format, w, h, type, image, newW, newH, type, newImage); + if ( error != 0 ) { + retVal = error; + done = true; + } + + image = newImage; + if ( bufferB != null ) + bufferB = bufferA; + + w = newW; + h = newH; + level++; + } + + // Restore original glPixelStore state + pss.save(); + + return retVal; + } + + /** + * Method gluScaleImage. + * @param format + * @param widthIn + * @param heightIn + * @param typein + * @param dataIn + * @param widthOut + * @param heightOut + * @param typeOut + * @param dataOut + * @return int + */ + public static int gluScaleImage(int format, + int widthIn, int heightIn, int typein, ByteBuffer dataIn, + int widthOut, int heightOut, int typeOut, ByteBuffer dataOut) { + + final int components = compPerPix(format); + if ( components == -1 ) + return GLU_INVALID_ENUM; + + int i, j, k; + float[] tempIn, tempOut; + float sx, sy; + int sizein, sizeout; + int rowstride, rowlen; + + // temp image data + tempIn = new float[widthIn * heightIn * components]; + tempOut = new float[widthOut * heightOut * components]; + + // Determine bytes per input type + switch ( typein ) { + case GL_UNSIGNED_BYTE: + sizein = 1; + break; + case GL_FLOAT: + sizein = 4; + break; + default: + return GL_INVALID_ENUM; + } + + // Determine bytes per output type + switch ( typeOut ) { + case GL_UNSIGNED_BYTE: + sizeout = 1; + break; + case GL_FLOAT: + sizeout = 4; + break; + default: + return GL_INVALID_ENUM; + } + + // Get glPixelStore state + PixelStoreState pss = new PixelStoreState(); + + //Unpack the pixel data and convert to floating point + if ( pss.unpackRowLength > 0 ) + rowlen = pss.unpackRowLength; + else + rowlen = widthIn; + + if ( sizein >= pss.unpackAlignment ) + rowstride = components * rowlen; + else + rowstride = pss.unpackAlignment / sizein * ceil(components * rowlen * sizein, pss.unpackAlignment); + + switch ( typein ) { + case GL_UNSIGNED_BYTE: + k = 0; + dataIn.rewind(); + for ( i = 0; i < heightIn; i++ ) { + int ubptr = i * rowstride + pss.unpackSkipRows * rowstride + pss.unpackSkipPixels * components; + for ( j = 0; j < widthIn * components; j++ ) { + tempIn[k++] = dataIn.get(ubptr++) & 0xff; + } + } + break; + case GL_FLOAT: + k = 0; + dataIn.rewind(); + for ( i = 0; i < heightIn; i++ ) + { + int fptr = 4 * (i * rowstride + pss.unpackSkipRows * rowstride + pss.unpackSkipPixels * components); + for ( j = 0; j < widthIn * components; j++ ) + { + tempIn[k++] = dataIn.getFloat(fptr); + fptr += 4; + } + } + break; + default: + return GLU_INVALID_ENUM; + } + + // Do scaling + sx = (float)widthIn / (float)widthOut; + sy = (float)heightIn / (float)heightOut; + + float[] c = new float[components]; + int src, dst; + + for ( int iy = 0; iy < heightOut; iy++ ) { + for ( int ix = 0; ix < widthOut; ix++ ) { + int x0 = (int)(ix * sx); + int x1 = (int)((ix + 1) * sx); + int y0 = (int)(iy * sy); + int y1 = (int)((iy + 1) * sy); + + int readPix = 0; + + // reset weighted pixel + for ( int ic = 0; ic < components; ic++ ) { + c[ic] = 0; + } + + // create weighted pixel + for ( int ix0 = x0; ix0 < x1; ix0++ ) { + for ( int iy0 = y0; iy0 < y1; iy0++ ) { + + src = (iy0 * widthIn + ix0) * components; + + for ( int ic = 0; ic < components; ic++ ) { + c[ic] += tempIn[src + ic]; + } + + readPix++; + } + } + + // store weighted pixel + dst = (iy * widthOut + ix) * components; + + if ( readPix == 0 ) { + // Image is sized up, caused by non power of two texture as input + src = (y0 * widthIn + x0) * components; + for ( int ic = 0; ic < components; ic++ ) { + tempOut[dst++] = tempIn[src + ic]; + } + } else { + // sized down + for ( k = 0; k < components; k++ ) { + tempOut[dst++] = c[k] / readPix; + } + } + } + } + + + // Convert temp output + if ( pss.packRowLength > 0 ) + rowlen = pss.packRowLength; + else + rowlen = widthOut; + + if ( sizeout >= pss.packAlignment ) + rowstride = components * rowlen; + else + rowstride = pss.packAlignment / sizeout * ceil(components * rowlen * sizeout, pss.packAlignment); + + switch ( typeOut ) { + case GL_UNSIGNED_BYTE: + k = 0; + for ( i = 0; i < heightOut; i++ ) { + int ubptr = i * rowstride + pss.packSkipRows * rowstride + pss.packSkipPixels * components; + + for ( j = 0; j < widthOut * components; j++ ) { + dataOut.put(ubptr++, (byte)tempOut[k++]); + } + } + break; + case GL_FLOAT: + k = 0; + for ( i = 0; i < heightOut; i++ ) { + int fptr = 4 * (i * rowstride + pss.unpackSkipRows * rowstride + pss.unpackSkipPixels * components); + + for ( j = 0; j < widthOut * components; j++ ) { + dataOut.putFloat(fptr, tempOut[k++]); + fptr += 4; + } + } + break; + default: + return GLU_INVALID_ENUM; + } + + return 0; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/PartialDisk.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/PartialDisk.java new file mode 100644 index 0000000..ce06a47 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/PartialDisk.java @@ -0,0 +1,358 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.glu; + +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.util.glu.GLU.*; + +/** + * PartialDisk.java + * + * + * Created 23-dec-2003 + * + * @author Erik Duijs + */ +public class PartialDisk extends Quadric { + + private static final int CACHE_SIZE = 240; + + /** + * Constructor for PartialDisk. + */ + public PartialDisk() { + super(); + } + + /** + * renders a partial disk on the z=0 plane. A partial disk is similar to a + * full disk, except that only the subset of the disk from startAngle + * through startAngle + sweepAngle is included (where 0 degrees is along + * the +y axis, 90 degrees along the +x axis, 180 along the -y axis, and + * 270 along the -x axis). + * + * The partial disk has a radius of outerRadius, and contains a concentric + * circular hole with a radius of innerRadius. If innerRadius is zero, then + * no hole is generated. The partial disk is subdivided around the z axis + * into slices (like pizza slices), and also about the z axis into rings + * (as specified by slices and loops, respectively). + * + * With respect to orientation, the +z side of the partial disk is + * considered to be outside (see gluQuadricOrientation). This means that if + * the orientation is set to GLU.GLU_OUTSIDE, then any normals generated point + * along the +z axis. Otherwise, they point along the -z axis. + * + * If texturing is turned on (with gluQuadricTexture), texture coordinates + * are generated linearly such that where r=outerRadius, the value at (r, 0, 0) + * is (1, 0.5), at (0, r, 0) it is (0.5, 1), at (-r, 0, 0) it is (0, 0.5), + * and at (0, -r, 0) it is (0.5, 0). + */ + public void draw( + float innerRadius, + float outerRadius, + int slices, + int loops, + float startAngle, + float sweepAngle) { + + int i, j; + float[] sinCache = new float[CACHE_SIZE]; + float[] cosCache = new float[CACHE_SIZE]; + float angle; + float sintemp, costemp; + float deltaRadius; + float radiusLow, radiusHigh; + float texLow = 0, texHigh = 0; + float angleOffset; + int slices2; + int finish; + + if (slices >= CACHE_SIZE) + slices = CACHE_SIZE - 1; + if (slices < 2 + || loops < 1 + || outerRadius <= 0.0f + || innerRadius < 0.0f + || innerRadius > outerRadius) { + //gluQuadricError(qobj, GLU.GLU_INVALID_VALUE); + System.err.println("PartialDisk: GLU_INVALID_VALUE"); + return; + } + + if (sweepAngle < -360.0f) + sweepAngle = 360.0f; + if (sweepAngle > 360.0f) + sweepAngle = 360.0f; + if (sweepAngle < 0) { + startAngle += sweepAngle; + sweepAngle = -sweepAngle; + } + + if (sweepAngle == 360.0f) { + slices2 = slices; + } else { + slices2 = slices + 1; + } + + /* Compute length (needed for normal calculations) */ + deltaRadius = outerRadius - innerRadius; + + /* Cache is the vertex locations cache */ + + angleOffset = startAngle / 180.0f * PI; + for (i = 0; i <= slices; i++) { + angle = angleOffset + ((PI * sweepAngle) / 180.0f) * i / slices; + sinCache[i] = sin(angle); + cosCache[i] = cos(angle); + } + + if (sweepAngle == 360.0f) { + sinCache[slices] = sinCache[0]; + cosCache[slices] = cosCache[0]; + } + + switch (super.normals) { + case GLU_FLAT : + case GLU_SMOOTH : + if (super.orientation == GLU_OUTSIDE) { + glNormal3f(0.0f, 0.0f, 1.0f); + } else { + glNormal3f(0.0f, 0.0f, -1.0f); + } + break; + default : + case GLU_NONE : + break; + } + + switch (super.drawStyle) { + case GLU_FILL : + if (innerRadius == .0f) { + finish = loops - 1; + /* Triangle strip for inner polygons */ + glBegin(GL_TRIANGLE_FAN); + if (super.textureFlag) { + glTexCoord2f(0.5f, 0.5f); + } + glVertex3f(0.0f, 0.0f, 0.0f); + radiusLow = outerRadius - deltaRadius * ((float) (loops - 1) / loops); + if (super.textureFlag) { + texLow = radiusLow / outerRadius / 2; + } + + if (super.orientation == GLU_OUTSIDE) { + for (i = slices; i >= 0; i--) { + if (super.textureFlag) { + glTexCoord2f( + texLow * sinCache[i] + 0.5f, + texLow * cosCache[i] + 0.5f); + } + glVertex3f(radiusLow * sinCache[i], radiusLow * cosCache[i], 0.0f); + } + } else { + for (i = 0; i <= slices; i++) { + if (super.textureFlag) { + glTexCoord2f( + texLow * sinCache[i] + 0.5f, + texLow * cosCache[i] + 0.5f); + } + glVertex3f(radiusLow * sinCache[i], radiusLow * cosCache[i], 0.0f); + } + } + glEnd(); + } else { + finish = loops; + } + for (j = 0; j < finish; j++) { + radiusLow = outerRadius - deltaRadius * ((float) j / loops); + radiusHigh = outerRadius - deltaRadius * ((float) (j + 1) / loops); + if (super.textureFlag) { + texLow = radiusLow / outerRadius / 2; + texHigh = radiusHigh / outerRadius / 2; + } + + glBegin(GL_QUAD_STRIP); + for (i = 0; i <= slices; i++) { + if (super.orientation == GLU_OUTSIDE) { + if (super.textureFlag) { + glTexCoord2f( + texLow * sinCache[i] + 0.5f, + texLow * cosCache[i] + 0.5f); + } + glVertex3f(radiusLow * sinCache[i], radiusLow * cosCache[i], 0.0f); + + if (super.textureFlag) { + glTexCoord2f( + texHigh * sinCache[i] + 0.5f, + texHigh * cosCache[i] + 0.5f); + } + glVertex3f( + radiusHigh * sinCache[i], + radiusHigh * cosCache[i], + 0.0f); + } else { + if (super.textureFlag) { + glTexCoord2f( + texHigh * sinCache[i] + 0.5f, + texHigh * cosCache[i] + 0.5f); + } + glVertex3f( + radiusHigh * sinCache[i], + radiusHigh * cosCache[i], + 0.0f); + + if (super.textureFlag) { + glTexCoord2f( + texLow * sinCache[i] + 0.5f, + texLow * cosCache[i] + 0.5f); + } + glVertex3f(radiusLow * sinCache[i], radiusLow * cosCache[i], 0.0f); + } + } + glEnd(); + } + break; + case GLU_POINT : + glBegin(GL_POINTS); + for (i = 0; i < slices2; i++) { + sintemp = sinCache[i]; + costemp = cosCache[i]; + for (j = 0; j <= loops; j++) { + radiusLow = outerRadius - deltaRadius * ((float) j / loops); + + if (super.textureFlag) { + texLow = radiusLow / outerRadius / 2; + + glTexCoord2f( + texLow * sinCache[i] + 0.5f, + texLow * cosCache[i] + 0.5f); + } + glVertex3f(radiusLow * sintemp, radiusLow * costemp, 0.0f); + } + } + glEnd(); + break; + case GLU_LINE : + if (innerRadius == outerRadius) { + glBegin(GL_LINE_STRIP); + + for (i = 0; i <= slices; i++) { + if (super.textureFlag) { + glTexCoord2f(sinCache[i] / 2 + 0.5f, cosCache[i] / 2 + 0.5f); + } + glVertex3f(innerRadius * sinCache[i], innerRadius * cosCache[i], 0.0f); + } + glEnd(); + break; + } + for (j = 0; j <= loops; j++) { + radiusLow = outerRadius - deltaRadius * ((float) j / loops); + if (super.textureFlag) { + texLow = radiusLow / outerRadius / 2; + } + + glBegin(GL_LINE_STRIP); + for (i = 0; i <= slices; i++) { + if (super.textureFlag) { + glTexCoord2f( + texLow * sinCache[i] + 0.5f, + texLow * cosCache[i] + 0.5f); + } + glVertex3f(radiusLow * sinCache[i], radiusLow * cosCache[i], 0.0f); + } + glEnd(); + } + for (i = 0; i < slices2; i++) { + sintemp = sinCache[i]; + costemp = cosCache[i]; + glBegin(GL_LINE_STRIP); + for (j = 0; j <= loops; j++) { + radiusLow = outerRadius - deltaRadius * ((float) j / loops); + if (super.textureFlag) { + texLow = radiusLow / outerRadius / 2; + } + + if (super.textureFlag) { + glTexCoord2f( + texLow * sinCache[i] + 0.5f, + texLow * cosCache[i] + 0.5f); + } + glVertex3f(radiusLow * sintemp, radiusLow * costemp, 0.0f); + } + glEnd(); + } + break; + case GLU_SILHOUETTE : + if (sweepAngle < 360.0f) { + for (i = 0; i <= slices; i += slices) { + sintemp = sinCache[i]; + costemp = cosCache[i]; + glBegin(GL_LINE_STRIP); + for (j = 0; j <= loops; j++) { + radiusLow = outerRadius - deltaRadius * ((float) j / loops); + + if (super.textureFlag) { + texLow = radiusLow / outerRadius / 2; + glTexCoord2f( + texLow * sinCache[i] + 0.5f, + texLow * cosCache[i] + 0.5f); + } + glVertex3f(radiusLow * sintemp, radiusLow * costemp, 0.0f); + } + glEnd(); + } + } + for (j = 0; j <= loops; j += loops) { + radiusLow = outerRadius - deltaRadius * ((float) j / loops); + if (super.textureFlag) { + texLow = radiusLow / outerRadius / 2; + } + + glBegin(GL_LINE_STRIP); + for (i = 0; i <= slices; i++) { + if (super.textureFlag) { + glTexCoord2f( + texLow * sinCache[i] + 0.5f, + texLow * cosCache[i] + 0.5f); + } + glVertex3f(radiusLow * sinCache[i], radiusLow * cosCache[i], 0.0f); + } + glEnd(); + if (innerRadius == outerRadius) + break; + } + break; + default : + break; + } + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/PixelStoreState.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/PixelStoreState.java new file mode 100644 index 0000000..b7ed9a2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/PixelStoreState.java @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.glu; + +import static org.lwjgl.opengl.GL11.*; + +/** + * PixelStoreState.java + * + * + * Created 11-jan-2004 + * @author Erik Duijs + */ +class PixelStoreState extends Util { + + public int unpackRowLength; + public int unpackAlignment; + public int unpackSkipRows; + public int unpackSkipPixels; + public int packRowLength; + public int packAlignment; + public int packSkipRows; + public int packSkipPixels; + + /** + * Constructor for PixelStoreState. + */ + PixelStoreState() { + super(); + load(); + } + + public void load() { + unpackRowLength = glGetIntegerv(GL_UNPACK_ROW_LENGTH); + unpackAlignment = glGetIntegerv(GL_UNPACK_ALIGNMENT); + unpackSkipRows = glGetIntegerv(GL_UNPACK_SKIP_ROWS); + unpackSkipPixels = glGetIntegerv(GL_UNPACK_SKIP_PIXELS); + packRowLength = glGetIntegerv(GL_PACK_ROW_LENGTH); + packAlignment = glGetIntegerv(GL_PACK_ALIGNMENT); + packSkipRows = glGetIntegerv(GL_PACK_SKIP_ROWS); + packSkipPixels = glGetIntegerv(GL_PACK_SKIP_PIXELS); + } + + public void save() { + glPixelStorei(GL_UNPACK_ROW_LENGTH, unpackRowLength); + glPixelStorei(GL_UNPACK_ALIGNMENT, unpackAlignment); + glPixelStorei(GL_UNPACK_SKIP_ROWS, unpackSkipRows); + glPixelStorei(GL_UNPACK_SKIP_PIXELS, unpackSkipPixels); + glPixelStorei(GL_PACK_ROW_LENGTH, packRowLength); + glPixelStorei(GL_PACK_ALIGNMENT, packAlignment); + glPixelStorei(GL_PACK_SKIP_ROWS, packSkipRows); + glPixelStorei(GL_PACK_SKIP_PIXELS, packSkipPixels); + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/Project.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/Project.java new file mode 100644 index 0000000..0ea0c54 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/Project.java @@ -0,0 +1,412 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.glu; + +import java.nio.FloatBuffer; +import java.nio.IntBuffer; + +import org.lwjgl.BufferUtils; +import org.lwjgl.opengl.GL11; + +import static org.lwjgl.opengl.GL11.*; + +/** + * Project.java + *

+ *

+ * Created 11-jan-2004 + * + * @author Erik Duijs + */ +public class Project extends Util { + + private static final float[] IDENTITY_MATRIX = + new float[] { + 1.0f, 0.0f, 0.0f, 0.0f, + 0.0f, 1.0f, 0.0f, 0.0f, + 0.0f, 0.0f, 1.0f, 0.0f, + 0.0f, 0.0f, 0.0f, 1.0f }; + + private static final FloatBuffer matrix = BufferUtils.createFloatBuffer(16); + private static final FloatBuffer finalMatrix = BufferUtils.createFloatBuffer(16); + + private static final FloatBuffer tempMatrix = BufferUtils.createFloatBuffer(16); + private static final float[] in = new float[4]; + private static final float[] out = new float[4]; + + private static final float[] forward = new float[3]; + private static final float[] side = new float[3]; + private static final float[] up = new float[3]; + + /** + * Make matrix an identity matrix + */ + private static void __gluMakeIdentityf(FloatBuffer m) { + int oldPos = m.position(); + m.put(IDENTITY_MATRIX); + m.position(oldPos); + } + + /** + * Method __gluMultMatrixVecf + * + * @param finalMatrix + * @param in + * @param out + */ + private static void __gluMultMatrixVecf(FloatBuffer m, float[] in, float[] out) { + for (int i = 0; i < 4; i++) { + out[i] = + in[0] * m.get(m.position() + 0*4 + i) + + in[1] * m.get(m.position() + 1*4 + i) + + in[2] * m.get(m.position() + 2*4 + i) + + in[3] * m.get(m.position() + 3*4 + i); + + } + } + + /** + * @param src + * @param inverse + * + * @return + */ + private static boolean __gluInvertMatrixf(FloatBuffer src, FloatBuffer inverse) { + int i, j, k, swap; + float t; + FloatBuffer temp = Project.tempMatrix; + + + for (i = 0; i < 16; i++) { + temp.put(i, src.get(i + src.position())); + } + __gluMakeIdentityf(inverse); + + for (i = 0; i < 4; i++) { + /* + * * Look for largest element in column + */ + swap = i; + for (j = i + 1; j < 4; j++) { + /* + * if (fabs(temp[j][i]) > fabs(temp[i][i])) { swap = j; + */ + if (Math.abs(temp.get(j*4 + i)) > Math.abs(temp.get(i* 4 + i))) { + swap = j; + } + } + + if (swap != i) { + /* + * * Swap rows. + */ + for (k = 0; k < 4; k++) { + t = temp.get(i*4 + k); + temp.put(i*4 + k, temp.get(swap*4 + k)); + temp.put(swap*4 + k, t); + + t = inverse.get(i*4 + k); + inverse.put(i*4 + k, inverse.get(swap*4 + k)); + //inverse.put((i << 2) + k, inverse.get((swap << 2) + k)); + inverse.put(swap*4 + k, t); + //inverse.put((swap << 2) + k, t); + } + } + + if (temp.get(i*4 + i) == 0) { + /* + * * No non-zero pivot. The matrix is singular, which shouldn't * + * happen. This means the user gave us a bad matrix. + */ + return false; + } + + t = temp.get(i*4 + i); + for (k = 0; k < 4; k++) { + temp.put(i*4 + k, temp.get(i*4 + k)/t); + inverse.put(i*4 + k, inverse.get(i*4 + k)/t); + } + for (j = 0; j < 4; j++) { + if (j != i) { + t = temp.get(j*4 + i); + for (k = 0; k < 4; k++) { + temp.put(j*4 + k, temp.get(j*4 + k) - temp.get(i*4 + k) * t); + inverse.put(j*4 + k, inverse.get(j*4 + k) - inverse.get(i*4 + k) * t); + /*inverse.put( + (j << 2) + k, + inverse.get((j << 2) + k) - inverse.get((i << 2) + k) * t);*/ + } + } + } + } + return true; + } + + /** + * @param a + * @param b + * @param r + */ + private static void __gluMultMatricesf(FloatBuffer a, FloatBuffer b, FloatBuffer r) { + for (int i = 0; i < 4; i++) { + for (int j = 0; j < 4; j++) { + r.put(r.position() + i*4 + j, + a.get(a.position() + i*4 + 0) * b.get(b.position() + 0*4 + j) + a.get(a.position() + i*4 + 1) * b.get(b.position() + 1*4 + j) + a.get(a.position() + i*4 + 2) * b.get(b.position() + 2*4 + j) + a.get(a.position() + i*4 + 3) * b.get(b.position() + 3*4 + j)); + } + } + } + + /** + * Method gluPerspective. + * + * @param fovy + * @param aspect + * @param zNear + * @param zFar + */ + public static void gluPerspective(float fovy, float aspect, float zNear, float zFar) { + float sine, cotangent, deltaZ; + float radians = fovy / 2 * GLU.PI / 180; + + deltaZ = zFar - zNear; + sine = (float) Math.sin(radians); + + if ((deltaZ == 0) || (sine == 0) || (aspect == 0)) { + return; + } + + cotangent = (float) Math.cos(radians) / sine; + + __gluMakeIdentityf(matrix); + + matrix.put(0 * 4 + 0, cotangent / aspect); + matrix.put(1 * 4 + 1, cotangent); + matrix.put(2 * 4 + 2, - (zFar + zNear) / deltaZ); + matrix.put(2 * 4 + 3, -1); + matrix.put(3 * 4 + 2, -2 * zNear * zFar / deltaZ); + matrix.put(3 * 4 + 3, 0); + + glMultMatrix(matrix); + } + + /** + * Method gluLookAt + * + * @param eyex + * @param eyey + * @param eyez + * @param centerx + * @param centery + * @param centerz + * @param upx + * @param upy + * @param upz + */ + public static void gluLookAt( + float eyex, + float eyey, + float eyez, + float centerx, + float centery, + float centerz, + float upx, + float upy, + float upz) { + float[] forward = Project.forward; + float[] side = Project.side; + float[] up = Project.up; + + forward[0] = centerx - eyex; + forward[1] = centery - eyey; + forward[2] = centerz - eyez; + + up[0] = upx; + up[1] = upy; + up[2] = upz; + + normalize(forward); + + /* Side = forward x up */ + cross(forward, up, side); + normalize(side); + + /* Recompute up as: up = side x forward */ + cross(side, forward, up); + + __gluMakeIdentityf(matrix); + matrix.put(0 * 4 + 0, side[0]); + matrix.put(1 * 4 + 0, side[1]); + matrix.put(2 * 4 + 0, side[2]); + + matrix.put(0 * 4 + 1, up[0]); + matrix.put(1 * 4 + 1, up[1]); + matrix.put(2 * 4 + 1, up[2]); + + matrix.put(0 * 4 + 2, -forward[0]); + matrix.put(1 * 4 + 2, -forward[1]); + matrix.put(2 * 4 + 2, -forward[2]); + + glMultMatrix(matrix); + glTranslatef(-eyex, -eyey, -eyez); + } + + /** + * Method gluProject + * + * @param objx + * @param objy + * @param objz + * @param modelMatrix + * @param projMatrix + * @param viewport + * @param win_pos + */ + public static boolean gluProject( + float objx, + float objy, + float objz, + FloatBuffer modelMatrix, + FloatBuffer projMatrix, + IntBuffer viewport, + FloatBuffer win_pos) { + + float[] in = Project.in; + float[] out = Project.out; + + in[0] = objx; + in[1] = objy; + in[2] = objz; + in[3] = 1.0f; + + __gluMultMatrixVecf(modelMatrix, in, out); + __gluMultMatrixVecf(projMatrix, out, in); + + if (in[3] == 0.0) + return false; + + in[3] = (1.0f / in[3]) * 0.5f; + + // Map x, y and z to range 0-1 + in[0] = in[0] * in[3] + 0.5f; + in[1] = in[1] * in[3] + 0.5f; + in[2] = in[2] * in[3] + 0.5f; + + // Map x,y to viewport + win_pos.put(0, in[0] * viewport.get(viewport.position() + 2) + viewport.get(viewport.position() + 0)); + win_pos.put(1, in[1] * viewport.get(viewport.position() + 3) + viewport.get(viewport.position() + 1)); + win_pos.put(2, in[2]); + + return true; + } + + /** + * Method gluUnproject + * + * @param winx + * @param winy + * @param winz + * @param modelMatrix + * @param projMatrix + * @param viewport + * @param obj_pos + */ + public static boolean gluUnProject( + float winx, + float winy, + float winz, + FloatBuffer modelMatrix, + FloatBuffer projMatrix, + IntBuffer viewport, + FloatBuffer obj_pos) { + float[] in = Project.in; + float[] out = Project.out; + + __gluMultMatricesf(modelMatrix, projMatrix, finalMatrix); + + if (!__gluInvertMatrixf(finalMatrix, finalMatrix)) + return false; + + in[0] = winx; + in[1] = winy; + in[2] = winz; + in[3] = 1.0f; + + // Map x and y from window coordinates + in[0] = (in[0] - viewport.get(viewport.position() + 0)) / viewport.get(viewport.position() + 2); + in[1] = (in[1] - viewport.get(viewport.position() + 1)) / viewport.get(viewport.position() + 3); + + // Map to range -1 to 1 + in[0] = in[0] * 2 - 1; + in[1] = in[1] * 2 - 1; + in[2] = in[2] * 2 - 1; + + __gluMultMatrixVecf(finalMatrix, in, out); + + if (out[3] == 0.0) + return false; + + out[3] = 1.0f / out[3]; + + obj_pos.put(obj_pos.position() + 0, out[0] * out[3]); + obj_pos.put(obj_pos.position() + 1, out[1] * out[3]); + obj_pos.put(obj_pos.position() + 2, out[2] * out[3]); + + return true; + } + + /** + * Method gluPickMatrix + * + * @param x + * @param y + * @param deltaX + * @param deltaY + * @param viewport + */ + public static void gluPickMatrix( + float x, + float y, + float deltaX, + float deltaY, + IntBuffer viewport) { + if (deltaX <= 0 || deltaY <= 0) { + return; + } + + /* Translate and scale the picked region to the entire window */ + glTranslatef( + (viewport.get(viewport.position() + 2) - 2 * (x - viewport.get(viewport.position() + 0))) / deltaX, + (viewport.get(viewport.position() + 3) - 2 * (y - viewport.get(viewport.position() + 1))) / deltaY, + 0); + glScalef(viewport.get(viewport.position() + 2) / deltaX, viewport.get(viewport.position() + 3) / deltaY, 1.0f); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/Quadric.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/Quadric.java new file mode 100644 index 0000000..b3c0aa4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/Quadric.java @@ -0,0 +1,199 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.glu; + +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.util.glu.GLU.*; + +/** + * Quadric.java + * + * + * Created 22-dec-2003 + * @author Erik Duijs + */ +public class Quadric { + + protected int drawStyle; + protected int orientation; + protected boolean textureFlag; + protected int normals; + + /** + * Constructor for Quadric. + */ + public Quadric() { + super(); + + drawStyle = GLU_FILL; + orientation = GLU_OUTSIDE; + textureFlag = false; + normals = GLU_SMOOTH; + } + + /** + * Call glNormal3f after scaling normal to unit length. + * + * @param x + * @param y + * @param z + */ + protected void normal3f(float x, float y, float z) { + float mag; + + mag = (float)Math.sqrt(x * x + y * y + z * z); + if (mag > 0.00001F) { + x /= mag; + y /= mag; + z /= mag; + } + glNormal3f(x, y, z); + } + + /** + * specifies the draw style for quadrics. + * + * The legal values are as follows: + * + * GLU.FILL: Quadrics are rendered with polygon primitives. The polygons + * are drawn in a counterclockwise fashion with respect to + * their normals (as defined with glu.quadricOrientation). + * + * GLU.LINE: Quadrics are rendered as a set of lines. + * + * GLU.SILHOUETTE: Quadrics are rendered as a set of lines, except that edges + * separating coplanar faces will not be drawn. + * + * GLU.POINT: Quadrics are rendered as a set of points. + * + * @param drawStyle The drawStyle to set + */ + public void setDrawStyle(int drawStyle) { + this.drawStyle = drawStyle; + } + + /** + * specifies what kind of normals are desired for quadrics. + * The legal values are as follows: + * + * GLU.NONE: No normals are generated. + * + * GLU.FLAT: One normal is generated for every facet of a quadric. + * + * GLU.SMOOTH: One normal is generated for every vertex of a quadric. This + * is the default. + * + * @param normals The normals to set + */ + public void setNormals(int normals) { + this.normals = normals; + } + + /** + * specifies what kind of orientation is desired for. + * The orientation values are as follows: + * + * GLU.OUTSIDE: Quadrics are drawn with normals pointing outward. + * + * GLU.INSIDE: Normals point inward. The default is GLU.OUTSIDE. + * + * Note that the interpretation of outward and inward depends on the quadric + * being drawn. + * + * @param orientation The orientation to set + */ + public void setOrientation(int orientation) { + this.orientation = orientation; + } + + /** + * specifies if texture coordinates should be generated for + * quadrics rendered with qobj. If the value of textureCoords is true, + * then texture coordinates are generated, and if textureCoords is false, + * they are not.. The default is false. + * + * The manner in which texture coordinates are generated depends upon the + * specific quadric rendered. + * + * @param textureFlag The textureFlag to set + */ + public void setTextureFlag(boolean textureFlag) { + this.textureFlag = textureFlag; + } + + + /** + * Returns the drawStyle. + * @return int + */ + public int getDrawStyle() { + return drawStyle; + } + + /** + * Returns the normals. + * @return int + */ + public int getNormals() { + return normals; + } + + /** + * Returns the orientation. + * @return int + */ + public int getOrientation() { + return orientation; + } + + /** + * Returns the textureFlag. + * @return boolean + */ + public boolean getTextureFlag() { + return textureFlag; + } + + protected void TXTR_COORD(float x, float y) { + if (textureFlag) glTexCoord2f(x,y); + } + + + protected float sin(float r) { + return (float)Math.sin(r); + } + + protected float cos(float r) { + return (float)Math.cos(r); + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/Registry.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/Registry.java new file mode 100644 index 0000000..3f354f7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/Registry.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.glu; + +import static org.lwjgl.util.glu.GLU.*; + +/** + * Registry.java + * + * + * Created 11-jan-2004 + * @author Erik Duijs + */ +public class Registry extends Util { + + private static final String versionString = "1.3"; + private static final String extensionString = + "GLU_EXT_nurbs_tessellator " + "GLU_EXT_object_space_tess "; + + /** + * Method gluGetString + * @param name + * @return String + */ + public static String gluGetString(int name) { + + if (name == GLU_VERSION) { + return versionString; + } else if (name == GLU_EXTENSIONS) { + return extensionString; + } + return null; + } + + /** + * Method gluCheckExtension + * + * @param extName is an extension name. + * @param extString is a string of extensions separated by blank(s). There may or + * may not be leading or trailing blank(s) in extString. + * This works in cases of extensions being prefixes of another like + * GL_EXT_texture and GL_EXT_texture3D. + * @return boolean true if extName is found otherwise it returns false. + */ + public static boolean gluCheckExtension(String extName, String extString) { + if (extString == null || extName == null) + return false; + + return extString.indexOf(extName) != -1; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/Sphere.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/Sphere.java new file mode 100644 index 0000000..0b0fad3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/Sphere.java @@ -0,0 +1,229 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.glu; + +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.util.glu.GLU.*; + +/** + * Sphere.java + * + * + * Created 23-dec-2003 + * @author Erik Duijs + */ +public class Sphere extends Quadric { + + /** + * Constructor + */ + public Sphere() { + super(); + } + + /** + * draws a sphere of the given radius centered around the origin. + * The sphere is subdivided around the z axis into slices and along the z axis + * into stacks (similar to lines of longitude and latitude). + * + * If the orientation is set to GLU.OUTSIDE (with glu.quadricOrientation), then + * any normals generated point away from the center of the sphere. Otherwise, + * they point toward the center of the sphere. + + * If texturing is turned on (with glu.quadricTexture), then texture + * coordinates are generated so that t ranges from 0.0 at z=-radius to 1.0 at + * z=radius (t increases linearly along longitudinal lines), and s ranges from + * 0.0 at the +y axis, to 0.25 at the +x axis, to 0.5 at the -y axis, to 0.75 + * at the -x axis, and back to 1.0 at the +y axis. + */ + public void draw(float radius, int slices, int stacks) { + // TODO + + float rho, drho, theta, dtheta; + float x, y, z; + float s, t, ds, dt; + int i, j, imin, imax; + boolean normals; + float nsign; + + normals = super.normals != GLU_NONE; + + if (super.orientation == GLU_INSIDE) { + nsign = -1.0f; + } else { + nsign = 1.0f; + } + + drho = PI / stacks; + dtheta = 2.0f * PI / slices; + + if (super.drawStyle == GLU_FILL) { + if (!super.textureFlag) { + // draw +Z end as a triangle fan + glBegin(GL_TRIANGLE_FAN); + glNormal3f(0.0f, 0.0f, 1.0f); + glVertex3f(0.0f, 0.0f, nsign * radius); + for (j = 0; j <= slices; j++) { + theta = (j == slices) ? 0.0f : j * dtheta; + x = -sin(theta) * sin(drho); + y = cos(theta) * sin(drho); + z = nsign * cos(drho); + if (normals) { + glNormal3f(x * nsign, y * nsign, z * nsign); + } + glVertex3f(x * radius, y * radius, z * radius); + } + glEnd(); + } + + ds = 1.0f / slices; + dt = 1.0f / stacks; + t = 1.0f; // because loop now runs from 0 + if (super.textureFlag) { + imin = 0; + imax = stacks; + } else { + imin = 1; + imax = stacks - 1; + } + + // draw intermediate stacks as quad strips + for (i = imin; i < imax; i++) { + rho = i * drho; + glBegin(GL_QUAD_STRIP); + s = 0.0f; + for (j = 0; j <= slices; j++) { + theta = (j == slices) ? 0.0f : j * dtheta; + x = -sin(theta) * sin(rho); + y = cos(theta) * sin(rho); + z = nsign * cos(rho); + if (normals) { + glNormal3f(x * nsign, y * nsign, z * nsign); + } + TXTR_COORD(s, t); + glVertex3f(x * radius, y * radius, z * radius); + x = -sin(theta) * sin(rho + drho); + y = cos(theta) * sin(rho + drho); + z = nsign * cos(rho + drho); + if (normals) { + glNormal3f(x * nsign, y * nsign, z * nsign); + } + TXTR_COORD(s, t - dt); + s += ds; + glVertex3f(x * radius, y * radius, z * radius); + } + glEnd(); + t -= dt; + } + + if (!super.textureFlag) { + // draw -Z end as a triangle fan + glBegin(GL_TRIANGLE_FAN); + glNormal3f(0.0f, 0.0f, -1.0f); + glVertex3f(0.0f, 0.0f, -radius * nsign); + rho = PI - drho; + s = 1.0f; + for (j = slices; j >= 0; j--) { + theta = (j == slices) ? 0.0f : j * dtheta; + x = -sin(theta) * sin(rho); + y = cos(theta) * sin(rho); + z = nsign * cos(rho); + if (normals) + glNormal3f(x * nsign, y * nsign, z * nsign); + s -= ds; + glVertex3f(x * radius, y * radius, z * radius); + } + glEnd(); + } + } else if ( + super.drawStyle == GLU_LINE + || super.drawStyle == GLU_SILHOUETTE) { + // draw stack lines + for (i = 1; + i < stacks; + i++) { // stack line at i==stacks-1 was missing here + rho = i * drho; + glBegin(GL_LINE_LOOP); + for (j = 0; j < slices; j++) { + theta = j * dtheta; + x = cos(theta) * sin(rho); + y = sin(theta) * sin(rho); + z = cos(rho); + if (normals) + glNormal3f(x * nsign, y * nsign, z * nsign); + glVertex3f(x * radius, y * radius, z * radius); + } + glEnd(); + } + // draw slice lines + for (j = 0; j < slices; j++) { + theta = j * dtheta; + glBegin(GL_LINE_STRIP); + for (i = 0; i <= stacks; i++) { + rho = i * drho; + x = cos(theta) * sin(rho); + y = sin(theta) * sin(rho); + z = cos(rho); + if (normals) + glNormal3f(x * nsign, y * nsign, z * nsign); + glVertex3f(x * radius, y * radius, z * radius); + } + glEnd(); + } + } else if (super.drawStyle == GLU_POINT) { + // top and bottom-most points + glBegin(GL_POINTS); + if (normals) + glNormal3f(0.0f, 0.0f, nsign); + glVertex3f(0.0f, 0.0f, radius); + if (normals) + glNormal3f(0.0f, 0.0f, -nsign); + glVertex3f(0.0f, 0.0f, -radius); + + // loop over stacks + for (i = 1; i < stacks - 1; i++) { + rho = i * drho; + for (j = 0; j < slices; j++) { + theta = j * dtheta; + x = cos(theta) * sin(rho); + y = sin(theta) * sin(rho); + z = cos(rho); + if (normals) + glNormal3f(x * nsign, y * nsign, z * nsign); + glVertex3f(x * radius, y * radius, z * radius); + } + } + glEnd(); + } + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/Util.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/Util.java new file mode 100644 index 0000000..82763a6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/Util.java @@ -0,0 +1,247 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.glu; + +import java.nio.IntBuffer; + +import org.lwjgl.BufferUtils; + +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.opengl.GL12.*; + +/** + * Util.java + *

+ *

+ * Created 7-jan-2004 + * + * @author Erik Duijs + */ +public class Util { + + /** + * temp IntBuffer of one for getting an int from some GL functions + */ + private static IntBuffer scratch = BufferUtils.createIntBuffer(16); + + /** + * Return ceiling of integer division + * + * @param a + * @param b + * + * @return int + */ + protected static int ceil(int a, int b) { + return (a % b == 0 ? a / b : a / b + 1); + } + + /** + * Normalize vector + * + * @param v + * + * @return float[] + */ + protected static float[] normalize(float[] v) { + float r; + + r = (float)Math.sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]); + if ( r == 0.0 ) + return v; + + r = 1.0f / r; + + v[0] *= r; + v[1] *= r; + v[2] *= r; + + return v; + } + + /** + * Calculate cross-product + * + * @param v1 + * @param v2 + * @param result + */ + protected static void cross(float[] v1, float[] v2, float[] result) { + result[0] = v1[1] * v2[2] - v1[2] * v2[1]; + result[1] = v1[2] * v2[0] - v1[0] * v2[2]; + result[2] = v1[0] * v2[1] - v1[1] * v2[0]; + } + + /** + * Method compPerPix. + * + * @param format + * + * @return int + */ + protected static int compPerPix(int format) { + /* Determine number of components per pixel */ + switch ( format ) { + case GL_COLOR_INDEX: + case GL_STENCIL_INDEX: + case GL_DEPTH_COMPONENT: + case GL_RED: + case GL_GREEN: + case GL_BLUE: + case GL_ALPHA: + case GL_LUMINANCE: + return 1; + case GL_LUMINANCE_ALPHA: + return 2; + case GL_RGB: + case GL_BGR: + return 3; + case GL_RGBA: + case GL_BGRA: + return 4; + default : + return -1; + } + } + + /** + * Method nearestPower. + *

+ * Compute the nearest power of 2 number. This algorithm is a little strange, but it works quite well. + * + * @param value + * + * @return int + */ + protected static int nearestPower(int value) { + int i; + + i = 1; + + /* Error! */ + if ( value == 0 ) + return -1; + + for ( ; ; ) { + if ( value == 1 ) { + return i; + } else if ( value == 3 ) { + return i << 2; + } + value >>= 1; + i <<= 1; + } + } + + /** + * Method bytesPerPixel. + * + * @param format + * @param type + * + * @return int + */ + protected static int bytesPerPixel(int format, int type) { + int n, m; + + switch ( format ) { + case GL_COLOR_INDEX: + case GL_STENCIL_INDEX: + case GL_DEPTH_COMPONENT: + case GL_RED: + case GL_GREEN: + case GL_BLUE: + case GL_ALPHA: + case GL_LUMINANCE: + n = 1; + break; + case GL_LUMINANCE_ALPHA: + n = 2; + break; + case GL_RGB: + case GL_BGR: + n = 3; + break; + case GL_RGBA: + case GL_BGRA: + n = 4; + break; + default : + n = 0; + } + + switch ( type ) { + case GL_UNSIGNED_BYTE: + m = 1; + break; + case GL_BYTE: + m = 1; + break; + case GL_BITMAP: + m = 1; + break; + case GL_UNSIGNED_SHORT: + m = 2; + break; + case GL_SHORT: + m = 2; + break; + case GL_UNSIGNED_INT: + m = 4; + break; + case GL_INT: + m = 4; + break; + case GL_FLOAT: + m = 4; + break; + default : + m = 0; + } + + return n * m; + } + + /** + * Convenience method for returning an int, rather than getting it out of a buffer yourself. + * + * @param what + * + * @return int + */ + protected static int glGetIntegerv(int what) { + scratch.rewind(); + glGetInteger(what, scratch); + return scratch.get(); + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/ActiveRegion.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/ActiveRegion.java new file mode 100644 index 0000000..2e96d04 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/ActiveRegion.java @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* +* Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. +* All rights reserved. +*/ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** NOTE: The Original Code (as defined below) has been licensed to Sun +** Microsystems, Inc. ("Sun") under the SGI Free Software License B +** (Version 1.1), shown above ("SGI License"). Pursuant to Section +** 3.2(3) of the SGI License, Sun is distributing the Covered Code to +** you under an alternative license ("Alternative License"). This +** Alternative License includes all of the provisions of the SGI License +** except that Section 2.2 and 11 are omitted. Any differences between +** the Alternative License and the SGI License are offered solely by Sun +** and not by SGI. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +** Author: Eric Veach, July 1994 +** Java Port: Pepijn Van Eeckhoudt, July 2003 +** Java Port: Nathan Parker Burg, August 2003 +*/ +package org.lwjgl.util.glu.tessellation; + +class ActiveRegion { + GLUhalfEdge eUp; /* upper edge, directed right to left */ + DictNode nodeUp; /* dictionary node corresponding to eUp */ + int windingNumber; /* used to determine which regions are + * inside the polygon */ + boolean inside; /* is this region inside the polygon? */ + boolean sentinel; /* marks fake edges at t = +/-infinity */ + boolean dirty; /* marks regions where the upper or lower + * edge has changed, but we haven't checked + * whether they intersect yet */ + boolean fixUpperEdge; /* marks temporary edges introduced when + * we process a "right vertex" (one without + * any edges leaving to the right) */ +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/CachedVertex.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/CachedVertex.java new file mode 100644 index 0000000..66df7f7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/CachedVertex.java @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* +* Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. +* All rights reserved. +*/ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** NOTE: The Original Code (as defined below) has been licensed to Sun +** Microsystems, Inc. ("Sun") under the SGI Free Software License B +** (Version 1.1), shown above ("SGI License"). Pursuant to Section +** 3.2(3) of the SGI License, Sun is distributing the Covered Code to +** you under an alternative license ("Alternative License"). This +** Alternative License includes all of the provisions of the SGI License +** except that Section 2.2 and 11 are omitted. Any differences between +** the Alternative License and the SGI License are offered solely by Sun +** and not by SGI. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +** Author: Eric Veach, July 1994 +** Java Port: Pepijn Van Eeckhoudt, July 2003 +** Java Port: Nathan Parker Burg, August 2003 +*/ +package org.lwjgl.util.glu.tessellation; + +class CachedVertex { + public double[] coords = new double[3]; + public Object data; +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/Dict.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/Dict.java new file mode 100644 index 0000000..fbca7a9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/Dict.java @@ -0,0 +1,172 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* +* Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. +* All rights reserved. +*/ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** NOTE: The Original Code (as defined below) has been licensed to Sun +** Microsystems, Inc. ("Sun") under the SGI Free Software License B +** (Version 1.1), shown above ("SGI License"). Pursuant to Section +** 3.2(3) of the SGI License, Sun is distributing the Covered Code to +** you under an alternative license ("Alternative License"). This +** Alternative License includes all of the provisions of the SGI License +** except that Section 2.2 and 11 are omitted. Any differences between +** the Alternative License and the SGI License are offered solely by Sun +** and not by SGI. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +** Author: Eric Veach, July 1994 +** Java Port: Pepijn Van Eeckhoudt, July 2003 +** Java Port: Nathan Parker Burg, August 2003 +*/ +package org.lwjgl.util.glu.tessellation; + +class Dict { + DictNode head; + Object frame; + DictLeq leq; + + private Dict() { + } + + static Dict dictNewDict(Object frame, DictLeq leq) { + Dict dict = new Dict(); + dict.head = new DictNode(); + + dict.head.key = null; + dict.head.next = dict.head; + dict.head.prev = dict.head; + + dict.frame = frame; + dict.leq = leq; + + return dict; + } + + static void dictDeleteDict(Dict dict) { + dict.head = null; + dict.frame = null; + dict.leq = null; + } + + static DictNode dictInsert(Dict dict, Object key) { + return dictInsertBefore(dict, dict.head, key); + } + + static DictNode dictInsertBefore(Dict dict, DictNode node, Object key) { + do { + node = node.prev; + } while (node.key != null && !dict.leq.leq(dict.frame, node.key, key)); + + DictNode newNode = new DictNode(); + newNode.key = key; + newNode.next = node.next; + node.next.prev = newNode; + newNode.prev = node; + node.next = newNode; + + return newNode; + } + + static Object dictKey(DictNode aNode) { + return aNode.key; + } + + static DictNode dictSucc(DictNode aNode) { + return aNode.next; + } + + static DictNode dictPred(DictNode aNode) { + return aNode.prev; + } + + static DictNode dictMin(Dict aDict) { + return aDict.head.next; + } + + static DictNode dictMax(Dict aDict) { + return aDict.head.prev; + } + + static void dictDelete(Dict dict, DictNode node) { + node.next.prev = node.prev; + node.prev.next = node.next; + } + + static DictNode dictSearch(Dict dict, Object key) { + DictNode node = dict.head; + + do { + node = node.next; + } while (node.key != null && !(dict.leq.leq(dict.frame, key, node.key))); + + return node; + } + + public interface DictLeq { + boolean leq(Object frame, Object key1, Object key2); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/DictNode.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/DictNode.java new file mode 100644 index 0000000..6d54786 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/DictNode.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* +* Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. +* All rights reserved. +*/ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** NOTE: The Original Code (as defined below) has been licensed to Sun +** Microsystems, Inc. ("Sun") under the SGI Free Software License B +** (Version 1.1), shown above ("SGI License"). Pursuant to Section +** 3.2(3) of the SGI License, Sun is distributing the Covered Code to +** you under an alternative license ("Alternative License"). This +** Alternative License includes all of the provisions of the SGI License +** except that Section 2.2 and 11 are omitted. Any differences between +** the Alternative License and the SGI License are offered solely by Sun +** and not by SGI. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +** Author: Eric Veach, July 1994 +** Java Port: Pepijn Van Eeckhoudt, July 2003 +** Java Port: Nathan Parker Burg, August 2003 +*/ +package org.lwjgl.util.glu.tessellation; + +class DictNode { + Object key; + DictNode next; + DictNode prev; +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/GLUface.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/GLUface.java new file mode 100644 index 0000000..7e39cc3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/GLUface.java @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* +* Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. +* All rights reserved. +*/ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** NOTE: The Original Code (as defined below) has been licensed to Sun +** Microsystems, Inc. ("Sun") under the SGI Free Software License B +** (Version 1.1), shown above ("SGI License"). Pursuant to Section +** 3.2(3) of the SGI License, Sun is distributing the Covered Code to +** you under an alternative license ("Alternative License"). This +** Alternative License includes all of the provisions of the SGI License +** except that Section 2.2 and 11 are omitted. Any differences between +** the Alternative License and the SGI License are offered solely by Sun +** and not by SGI. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +** Author: Eric Veach, July 1994 +** Java Port: Pepijn Van Eeckhoudt, July 2003 +** Java Port: Nathan Parker Burg, August 2003 +*/ +package org.lwjgl.util.glu.tessellation; + +class GLUface { + public GLUface next; /* next face (never NULL) */ + public GLUface prev; /* previous face (never NULL) */ + public GLUhalfEdge anEdge; /* a half edge with this left face */ + public Object data; /* room for client's data */ + + /* Internal data (keep hidden) */ + public GLUface trail; /* "stack" for conversion to strips */ + public boolean marked; /* flag for conversion to strips */ + public boolean inside; /* this face is in the polygon interior */ +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/GLUhalfEdge.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/GLUhalfEdge.java new file mode 100644 index 0000000..db0a52b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/GLUhalfEdge.java @@ -0,0 +1,105 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* +* Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. +* All rights reserved. +*/ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** NOTE: The Original Code (as defined below) has been licensed to Sun +** Microsystems, Inc. ("Sun") under the SGI Free Software License B +** (Version 1.1), shown above ("SGI License"). Pursuant to Section +** 3.2(3) of the SGI License, Sun is distributing the Covered Code to +** you under an alternative license ("Alternative License"). This +** Alternative License includes all of the provisions of the SGI License +** except that Section 2.2 and 11 are omitted. Any differences between +** the Alternative License and the SGI License are offered solely by Sun +** and not by SGI. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +** Author: Eric Veach, July 1994 +** Java Port: Pepijn Van Eeckhoudt, July 2003 +** Java Port: Nathan Parker Burg, August 2003 +*/ +package org.lwjgl.util.glu.tessellation; + + + +class GLUhalfEdge { + public GLUhalfEdge next; /* doubly-linked list (prev==Sym->next) */ + public GLUhalfEdge Sym; /* same edge, opposite direction */ + public GLUhalfEdge Onext; /* next edge CCW around origin */ + public GLUhalfEdge Lnext; /* next edge CCW around left face */ + public GLUvertex Org; /* origin vertex (Overtex too long) */ + public GLUface Lface; /* left face */ + + /* Internal data (keep hidden) */ + public ActiveRegion activeRegion; /* a region with this upper edge (sweep.c) */ + public int winding; /* change in winding number when crossing */ + public boolean first; + + GLUhalfEdge(boolean first) { + this.first = first; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/GLUmesh.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/GLUmesh.java new file mode 100644 index 0000000..5c9a177 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/GLUmesh.java @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* +* Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. +* All rights reserved. +*/ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** NOTE: The Original Code (as defined below) has been licensed to Sun +** Microsystems, Inc. ("Sun") under the SGI Free Software License B +** (Version 1.1), shown above ("SGI License"). Pursuant to Section +** 3.2(3) of the SGI License, Sun is distributing the Covered Code to +** you under an alternative license ("Alternative License"). This +** Alternative License includes all of the provisions of the SGI License +** except that Section 2.2 and 11 are omitted. Any differences between +** the Alternative License and the SGI License are offered solely by Sun +** and not by SGI. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +** Author: Eric Veach, July 1994 +** Java Port: Pepijn Van Eeckhoudt, July 2003 +** Java Port: Nathan Parker Burg, August 2003 +*/ +package org.lwjgl.util.glu.tessellation; + + + +class GLUmesh { + GLUvertex vHead = new GLUvertex(); /* dummy header for vertex list */ + GLUface fHead = new GLUface(); /* dummy header for face list */ + GLUhalfEdge eHead = new GLUhalfEdge(true); /* dummy header for edge list */ + GLUhalfEdge eHeadSym = new GLUhalfEdge(false); /* and its symmetric counterpart */ +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/GLUtessellatorImpl.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/GLUtessellatorImpl.java new file mode 100644 index 0000000..eb8e2dc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/GLUtessellatorImpl.java @@ -0,0 +1,669 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* +* Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. +* All rights reserved. +*/ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** NOTE: The Original Code (as defined below) has been licensed to Sun +** Microsystems, Inc. ("Sun") under the SGI Free Software License B +** (Version 1.1), shown above ("SGI License"). Pursuant to Section +** 3.2(3) of the SGI License, Sun is distributing the Covered Code to +** you under an alternative license ("Alternative License"). This +** Alternative License includes all of the provisions of the SGI License +** except that Section 2.2 and 11 are omitted. Any differences between +** the Alternative License and the SGI License are offered solely by Sun +** and not by SGI. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +** Author: Eric Veach, July 1994 +** Java Port: Pepijn Van Eeckhoudt, July 2003 +** Java Port: Nathan Parker Burg, August 2003 +*/ +package org.lwjgl.util.glu.tessellation; + +import org.lwjgl.util.glu.GLUtessellator; +import org.lwjgl.util.glu.GLUtessellatorCallback; +import org.lwjgl.util.glu.GLUtessellatorCallbackAdapter; + +import static org.lwjgl.util.glu.GLU.*; + +public class GLUtessellatorImpl implements GLUtessellator { + public static final int TESS_MAX_CACHE = 100; + + private int state; /* what begin/end calls have we seen? */ + + private GLUhalfEdge lastEdge; /* lastEdge->Org is the most recent vertex */ + GLUmesh mesh; /* stores the input contours, and eventually + the tessellation itself */ + + /*** state needed for projecting onto the sweep plane ***/ + + double[] normal = new double[3]; /* user-specified normal (if provided) */ + double[] sUnit = new double[3]; /* unit vector in s-direction (debugging) */ + double[] tUnit = new double[3]; /* unit vector in t-direction (debugging) */ + + /*** state needed for the line sweep ***/ + + private double relTolerance; /* tolerance for merging features */ + int windingRule; /* rule for determining polygon interior */ + boolean fatalError; /* fatal error: needed combine callback */ + + Dict dict; /* edge dictionary for sweep line */ + PriorityQ pq; /* priority queue of vertex events */ + GLUvertex event; /* current sweep event being processed */ + + /*** state needed for rendering callbacks (see render.c) ***/ + + boolean flagBoundary; /* mark boundary edges (use EdgeFlag) */ + boolean boundaryOnly; /* Extract contours, not triangles */ + GLUface lonelyTriList; + /* list of triangles which could not be rendered as strips or fans */ + + + + /*** state needed to cache single-contour polygons for renderCache() */ + + private boolean flushCacheOnNextVertex; /* empty cache on next vertex() call */ + int cacheCount; /* number of cached vertices */ + CachedVertex[] cache = new CachedVertex[TESS_MAX_CACHE]; /* the vertex data */ + + /*** rendering callbacks that also pass polygon data ***/ + private Object polygonData; /* client data for current polygon */ + + private GLUtessellatorCallback callBegin; + private GLUtessellatorCallback callEdgeFlag; + private GLUtessellatorCallback callVertex; + private GLUtessellatorCallback callEnd; +// private GLUtessellatorCallback callMesh; + private GLUtessellatorCallback callError; + private GLUtessellatorCallback callCombine; + + private GLUtessellatorCallback callBeginData; + private GLUtessellatorCallback callEdgeFlagData; + private GLUtessellatorCallback callVertexData; + private GLUtessellatorCallback callEndData; +// private GLUtessellatorCallback callMeshData; + private GLUtessellatorCallback callErrorData; + private GLUtessellatorCallback callCombineData; + + private static final double GLU_TESS_DEFAULT_TOLERANCE = 0.0; +// private static final int GLU_TESS_MESH = 100112; /* void (*)(GLUmesh *mesh) */ + private static GLUtessellatorCallback NULL_CB = new GLUtessellatorCallbackAdapter(); + +// #define MAX_FAST_ALLOC (MAX(sizeof(EdgePair), \ +// MAX(sizeof(GLUvertex),sizeof(GLUface)))) + + public GLUtessellatorImpl() { + state = TessState.T_DORMANT; + + normal[0] = 0; + normal[1] = 0; + normal[2] = 0; + + relTolerance = GLU_TESS_DEFAULT_TOLERANCE; + windingRule = GLU_TESS_WINDING_ODD; + flagBoundary = false; + boundaryOnly = false; + + callBegin = NULL_CB; + callEdgeFlag = NULL_CB; + callVertex = NULL_CB; + callEnd = NULL_CB; + callError = NULL_CB; + callCombine = NULL_CB; +// callMesh = NULL_CB; + + callBeginData = NULL_CB; + callEdgeFlagData = NULL_CB; + callVertexData = NULL_CB; + callEndData = NULL_CB; + callErrorData = NULL_CB; + callCombineData = NULL_CB; + + polygonData = null; + + for (int i = 0; i < cache.length; i++) { + cache[i] = new CachedVertex(); + } + } + + public static GLUtessellator gluNewTess() + { + return new GLUtessellatorImpl(); + } + + + private void makeDormant() { + /* Return the tessellator to its original dormant state. */ + + if (mesh != null) { + Mesh.__gl_meshDeleteMesh(mesh); + } + state = TessState.T_DORMANT; + lastEdge = null; + mesh = null; + } + + private void requireState(int newState) { + if (state != newState) gotoState(newState); + } + + private void gotoState(int newState) { + while (state != newState) { + /* We change the current state one level at a time, to get to + * the desired state. + */ + if (state < newState) { + if (state == TessState.T_DORMANT) { + callErrorOrErrorData(GLU_TESS_MISSING_BEGIN_POLYGON); + gluTessBeginPolygon(null); + } else if (state == TessState.T_IN_POLYGON) { + callErrorOrErrorData(GLU_TESS_MISSING_BEGIN_CONTOUR); + gluTessBeginContour(); + } + } else { + if (state == TessState.T_IN_CONTOUR) { + callErrorOrErrorData(GLU_TESS_MISSING_END_CONTOUR); + gluTessEndContour(); + } else if (state == TessState.T_IN_POLYGON) { + callErrorOrErrorData(GLU_TESS_MISSING_END_POLYGON); + /* gluTessEndPolygon( tess ) is too much work! */ + makeDormant(); + } + } + } + } + + public void gluDeleteTess() { + requireState(TessState.T_DORMANT); + } + + public void gluTessProperty(int which, double value) { + switch (which) { + case GLU_TESS_TOLERANCE: + if (value < 0.0 || value > 1.0) break; + relTolerance = value; + return; + + case GLU_TESS_WINDING_RULE: + int windingRule = (int) value; + if (windingRule != value) break; /* not an integer */ + + switch (windingRule) { + case GLU_TESS_WINDING_ODD: + case GLU_TESS_WINDING_NONZERO: + case GLU_TESS_WINDING_POSITIVE: + case GLU_TESS_WINDING_NEGATIVE: + case GLU_TESS_WINDING_ABS_GEQ_TWO: + this.windingRule = windingRule; + return; + default: + break; + } + + case GLU_TESS_BOUNDARY_ONLY: + boundaryOnly = (value != 0); + return; + + default: + callErrorOrErrorData(GLU_INVALID_ENUM); + return; + } + callErrorOrErrorData(GLU_INVALID_VALUE); + } + +/* Returns tessellator property */ + public void gluGetTessProperty(int which, double[] value, int value_offset) { + switch (which) { + case GLU_TESS_TOLERANCE: +/* tolerance should be in range [0..1] */ + assert (0.0 <= relTolerance && relTolerance <= 1.0); + value[value_offset] = relTolerance; + break; + case GLU_TESS_WINDING_RULE: + assert (windingRule == GLU_TESS_WINDING_ODD || + windingRule == GLU_TESS_WINDING_NONZERO || + windingRule == GLU_TESS_WINDING_POSITIVE || + windingRule == GLU_TESS_WINDING_NEGATIVE || + windingRule == GLU_TESS_WINDING_ABS_GEQ_TWO); + value[value_offset] = windingRule; + break; + case GLU_TESS_BOUNDARY_ONLY: + assert (boundaryOnly == true || boundaryOnly == false); + value[value_offset] = boundaryOnly ? 1 : 0; + break; + default: + value[value_offset] = 0.0; + callErrorOrErrorData(GLU_INVALID_ENUM); + break; + } + } /* gluGetTessProperty() */ + + public void gluTessNormal(double x, double y, double z) { + normal[0] = x; + normal[1] = y; + normal[2] = z; + } + + public void gluTessCallback(int which, GLUtessellatorCallback aCallback) { + switch (which) { + case GLU_TESS_BEGIN: + callBegin = aCallback == null ? NULL_CB : aCallback; + return; + case GLU_TESS_BEGIN_DATA: + callBeginData = aCallback == null ? NULL_CB : aCallback; + return; + case GLU_TESS_EDGE_FLAG: + callEdgeFlag = aCallback == null ? NULL_CB : aCallback; +/* If the client wants boundary edges to be flagged, + * we render everything as separate triangles (no strips or fans). + */ + flagBoundary = aCallback != null; + return; + case GLU_TESS_EDGE_FLAG_DATA: + callEdgeFlagData = callBegin = aCallback == null ? NULL_CB : aCallback; +/* If the client wants boundary edges to be flagged, + * we render everything as separate triangles (no strips or fans). + */ + flagBoundary = (aCallback != null); + return; + case GLU_TESS_VERTEX: + callVertex = aCallback == null ? NULL_CB : aCallback; + return; + case GLU_TESS_VERTEX_DATA: + callVertexData = aCallback == null ? NULL_CB : aCallback; + return; + case GLU_TESS_END: + callEnd = aCallback == null ? NULL_CB : aCallback; + return; + case GLU_TESS_END_DATA: + callEndData = aCallback == null ? NULL_CB : aCallback; + return; + case GLU_TESS_ERROR: + callError = aCallback == null ? NULL_CB : aCallback; + return; + case GLU_TESS_ERROR_DATA: + callErrorData = aCallback == null ? NULL_CB : aCallback; + return; + case GLU_TESS_COMBINE: + callCombine = aCallback == null ? NULL_CB : aCallback; + return; + case GLU_TESS_COMBINE_DATA: + callCombineData = aCallback == null ? NULL_CB : aCallback; + return; +// case GLU_TESS_MESH: +// callMesh = aCallback == null ? NULL_CB : aCallback; +// return; + default: + callErrorOrErrorData(GLU_INVALID_ENUM); + return; + } + } + + private boolean addVertex(double[] coords, Object vertexData) { + GLUhalfEdge e; + + e = lastEdge; + if (e == null) { +/* Make a self-loop (one vertex, one edge). */ + + e = Mesh.__gl_meshMakeEdge(mesh); + if (e == null) return false; + if (!Mesh.__gl_meshSplice(e, e.Sym)) return false; + } else { +/* Create a new vertex and edge which immediately follow e + * in the ordering around the left face. + */ + if (Mesh.__gl_meshSplitEdge(e) == null) return false; + e = e.Lnext; + } + +/* The new vertex is now e.Org. */ + e.Org.data = vertexData; + e.Org.coords[0] = coords[0]; + e.Org.coords[1] = coords[1]; + e.Org.coords[2] = coords[2]; + +/* The winding of an edge says how the winding number changes as we + * cross from the edge''s right face to its left face. We add the + * vertices in such an order that a CCW contour will add +1 to + * the winding number of the region inside the contour. + */ + e.winding = 1; + e.Sym.winding = -1; + + lastEdge = e; + + return true; + } + + private void cacheVertex(double[] coords, Object vertexData) { + if (cache[cacheCount] == null) { + cache[cacheCount] = new CachedVertex(); + } + + CachedVertex v = cache[cacheCount]; + + v.data = vertexData; + v.coords[0] = coords[0]; + v.coords[1] = coords[1]; + v.coords[2] = coords[2]; + ++cacheCount; + } + + + private boolean flushCache() { + CachedVertex[] v = cache; + + mesh = Mesh.__gl_meshNewMesh(); + if (mesh == null) return false; + + for (int i = 0; i < cacheCount; i++) { + CachedVertex vertex = v[i]; + if (!addVertex(vertex.coords, vertex.data)) return false; + } + cacheCount = 0; + flushCacheOnNextVertex = false; + + return true; + } + + public void gluTessVertex(double[] coords, int coords_offset, Object vertexData) { + int i; + boolean tooLarge = false; + double x; + double[] clamped = new double[3]; + + requireState(TessState.T_IN_CONTOUR); + + if (flushCacheOnNextVertex) { + if (!flushCache()) { + callErrorOrErrorData(GLU_OUT_OF_MEMORY); + return; + } + lastEdge = null; + } + for (i = 0; i < 3; ++i) { + x = coords[i+coords_offset]; + if (x < -GLU_TESS_MAX_COORD) { + x = -GLU_TESS_MAX_COORD; + tooLarge = true; + } + if (x > GLU_TESS_MAX_COORD) { + x = GLU_TESS_MAX_COORD; + tooLarge = true; + } + clamped[i] = x; + } + if (tooLarge) { + callErrorOrErrorData(GLU_TESS_COORD_TOO_LARGE); + } + + if (mesh == null) { + if (cacheCount < TESS_MAX_CACHE) { + cacheVertex(clamped, vertexData); + return; + } + if (!flushCache()) { + callErrorOrErrorData(GLU_OUT_OF_MEMORY); + return; + } + } + + if (!addVertex(clamped, vertexData)) { + callErrorOrErrorData(GLU_OUT_OF_MEMORY); + } + } + + + public void gluTessBeginPolygon(Object data) { + requireState(TessState.T_DORMANT); + + state = TessState.T_IN_POLYGON; + cacheCount = 0; + flushCacheOnNextVertex = false; + mesh = null; + + polygonData = data; + } + + + public void gluTessBeginContour() { + requireState(TessState.T_IN_POLYGON); + + state = TessState.T_IN_CONTOUR; + lastEdge = null; + if (cacheCount > 0) { +/* Just set a flag so we don't get confused by empty contours + * -- these can be generated accidentally with the obsolete + * NextContour() interface. + */ + flushCacheOnNextVertex = true; + } + } + + + public void gluTessEndContour() { + requireState(TessState.T_IN_CONTOUR); + state = TessState.T_IN_POLYGON; + } + + public void gluTessEndPolygon() { + GLUmesh mesh; + + try { + requireState(TessState.T_IN_POLYGON); + state = TessState.T_DORMANT; + + if (this.mesh == null) { + if (!flagBoundary /*&& callMesh == NULL_CB*/) { + +/* Try some special code to make the easy cases go quickly + * (eg. convex polygons). This code does NOT handle multiple contours, + * intersections, edge flags, and of course it does not generate + * an explicit mesh either. + */ + if (Render.__gl_renderCache(this)) { + polygonData = null; + return; + } + } + if (!flushCache()) throw new RuntimeException(); /* could've used a label*/ + } + +/* Determine the polygon normal and project vertices onto the plane + * of the polygon. + */ + Normal.__gl_projectPolygon(this); + +/* __gl_computeInterior( tess ) computes the planar arrangement specified + * by the given contours, and further subdivides this arrangement + * into regions. Each region is marked "inside" if it belongs + * to the polygon, according to the rule given by windingRule. + * Each interior region is guaranteed be monotone. + */ + if (!Sweep.__gl_computeInterior(this)) { + throw new RuntimeException(); /* could've used a label */ + } + + mesh = this.mesh; + if (!fatalError) { + boolean rc = true; + +/* If the user wants only the boundary contours, we throw away all edges + * except those which separate the interior from the exterior. + * Otherwise we tessellate all the regions marked "inside". + */ + if (boundaryOnly) { + rc = TessMono.__gl_meshSetWindingNumber(mesh, 1, true); + } else { + rc = TessMono.__gl_meshTessellateInterior(mesh); + } + if (!rc) throw new RuntimeException(); /* could've used a label */ + + Mesh.__gl_meshCheckMesh(mesh); + + if (callBegin != NULL_CB || callEnd != NULL_CB + || callVertex != NULL_CB || callEdgeFlag != NULL_CB + || callBeginData != NULL_CB + || callEndData != NULL_CB + || callVertexData != NULL_CB + || callEdgeFlagData != NULL_CB) { + if (boundaryOnly) { + Render.__gl_renderBoundary(this, mesh); /* output boundary contours */ + } else { + Render.__gl_renderMesh(this, mesh); /* output strips and fans */ + } + } +// if (callMesh != NULL_CB) { +// +///* Throw away the exterior faces, so that all faces are interior. +// * This way the user doesn't have to check the "inside" flag, +// * and we don't need to even reveal its existence. It also leaves +// * the freedom for an implementation to not generate the exterior +// * faces in the first place. +// */ +// TessMono.__gl_meshDiscardExterior(mesh); +// callMesh.mesh(mesh); /* user wants the mesh itself */ +// mesh = null; +// polygonData = null; +// return; +// } + } + Mesh.__gl_meshDeleteMesh(mesh); + polygonData = null; + mesh = null; + } catch (Exception e) { + e.printStackTrace(); + callErrorOrErrorData(GLU_OUT_OF_MEMORY); + } + } + + /*******************************************************/ + +/* Obsolete calls -- for backward compatibility */ + + public void gluBeginPolygon() { + gluTessBeginPolygon(null); + gluTessBeginContour(); + } + + +/*ARGSUSED*/ + public void gluNextContour(int type) { + gluTessEndContour(); + gluTessBeginContour(); + } + + + public void gluEndPolygon() { + gluTessEndContour(); + gluTessEndPolygon(); + } + + void callBeginOrBeginData(int a) { + if (callBeginData != NULL_CB) + callBeginData.beginData(a, polygonData); + else + callBegin.begin(a); + } + + void callVertexOrVertexData(Object a) { + if (callVertexData != NULL_CB) + callVertexData.vertexData(a, polygonData); + else + callVertex.vertex(a); + } + + void callEdgeFlagOrEdgeFlagData(boolean a) { + if (callEdgeFlagData != NULL_CB) + callEdgeFlagData.edgeFlagData(a, polygonData); + else + callEdgeFlag.edgeFlag(a); + } + + void callEndOrEndData() { + if (callEndData != NULL_CB) + callEndData.endData(polygonData); + else + callEnd.end(); + } + + void callCombineOrCombineData(double[] coords, Object[] vertexData, float[] weights, Object[] outData) { + if (callCombineData != NULL_CB) + callCombineData.combineData(coords, vertexData, weights, outData, polygonData); + else + callCombine.combine(coords, vertexData, weights, outData); + } + + void callErrorOrErrorData(int a) { + if (callErrorData != NULL_CB) + callErrorData.errorData(a, polygonData); + else + callError.error(a); + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/GLUvertex.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/GLUvertex.java new file mode 100644 index 0000000..7eaa40a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/GLUvertex.java @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* +* Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. +* All rights reserved. +*/ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** NOTE: The Original Code (as defined below) has been licensed to Sun +** Microsystems, Inc. ("Sun") under the SGI Free Software License B +** (Version 1.1), shown above ("SGI License"). Pursuant to Section +** 3.2(3) of the SGI License, Sun is distributing the Covered Code to +** you under an alternative license ("Alternative License"). This +** Alternative License includes all of the provisions of the SGI License +** except that Section 2.2 and 11 are omitted. Any differences between +** the Alternative License and the SGI License are offered solely by Sun +** and not by SGI. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +** Author: Eric Veach, July 1994 +** Java Port: Pepijn Van Eeckhoudt, July 2003 +** Java Port: Nathan Parker Burg, August 2003 +*/ +package org.lwjgl.util.glu.tessellation; + +class GLUvertex { + public GLUvertex next; /* next vertex (never NULL) */ + public GLUvertex prev; /* previous vertex (never NULL) */ + public GLUhalfEdge anEdge; /* a half-edge with this origin */ + public Object data; /* client's data */ + + /* Internal data (keep hidden) */ + public double[] coords = new double[3]; /* vertex location in 3D */ + public double s, t; /* projection onto the sweep plane */ + public int pqHandle; /* to allow deletion from priority queue */ +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/Geom.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/Geom.java new file mode 100644 index 0000000..e5f1e97 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/Geom.java @@ -0,0 +1,350 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* +* Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. +* All rights reserved. +*/ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** NOTE: The Original Code (as defined below) has been licensed to Sun +** Microsystems, Inc. ("Sun") under the SGI Free Software License B +** (Version 1.1), shown above ("SGI License"). Pursuant to Section +** 3.2(3) of the SGI License, Sun is distributing the Covered Code to +** you under an alternative license ("Alternative License"). This +** Alternative License includes all of the provisions of the SGI License +** except that Section 2.2 and 11 are omitted. Any differences between +** the Alternative License and the SGI License are offered solely by Sun +** and not by SGI. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +** Author: Eric Veach, July 1994 +** Java Port: Pepijn Van Eeckhoudt, July 2003 +** Java Port: Nathan Parker Burg, August 2003 +*/ +package org.lwjgl.util.glu.tessellation; + +class Geom { + private Geom() { + } + + /* Given three vertices u,v,w such that VertLeq(u,v) && VertLeq(v,w), + * evaluates the t-coord of the edge uw at the s-coord of the vertex v. + * Returns v->t - (uw)(v->s), ie. the signed distance from uw to v. + * If uw is vertical (and thus passes thru v), the result is zero. + * + * The calculation is extremely accurate and stable, even when v + * is very close to u or w. In particular if we set v->t = 0 and + * let r be the negated result (this evaluates (uw)(v->s)), then + * r is guaranteed to satisfy MIN(u->t,w->t) <= r <= MAX(u->t,w->t). + */ + static double EdgeEval(GLUvertex u, GLUvertex v, GLUvertex w) { + double gapL, gapR; + + assert (VertLeq(u, v) && VertLeq(v, w)); + + gapL = v.s - u.s; + gapR = w.s - v.s; + + if (gapL + gapR > 0) { + if (gapL < gapR) { + return (v.t - u.t) + (u.t - w.t) * (gapL / (gapL + gapR)); + } else { + return (v.t - w.t) + (w.t - u.t) * (gapR / (gapL + gapR)); + } + } + /* vertical line */ + return 0; + } + + static double EdgeSign(GLUvertex u, GLUvertex v, GLUvertex w) { + double gapL, gapR; + + assert (VertLeq(u, v) && VertLeq(v, w)); + + gapL = v.s - u.s; + gapR = w.s - v.s; + + if (gapL + gapR > 0) { + return (v.t - w.t) * gapL + (v.t - u.t) * gapR; + } + /* vertical line */ + return 0; + } + + + /*********************************************************************** + * Define versions of EdgeSign, EdgeEval with s and t transposed. + */ + + static double TransEval(GLUvertex u, GLUvertex v, GLUvertex w) { + /* Given three vertices u,v,w such that TransLeq(u,v) && TransLeq(v,w), + * evaluates the t-coord of the edge uw at the s-coord of the vertex v. + * Returns v->s - (uw)(v->t), ie. the signed distance from uw to v. + * If uw is vertical (and thus passes thru v), the result is zero. + * + * The calculation is extremely accurate and stable, even when v + * is very close to u or w. In particular if we set v->s = 0 and + * let r be the negated result (this evaluates (uw)(v->t)), then + * r is guaranteed to satisfy MIN(u->s,w->s) <= r <= MAX(u->s,w->s). + */ + double gapL, gapR; + + assert (TransLeq(u, v) && TransLeq(v, w)); + + gapL = v.t - u.t; + gapR = w.t - v.t; + + if (gapL + gapR > 0) { + if (gapL < gapR) { + return (v.s - u.s) + (u.s - w.s) * (gapL / (gapL + gapR)); + } else { + return (v.s - w.s) + (w.s - u.s) * (gapR / (gapL + gapR)); + } + } + /* vertical line */ + return 0; + } + + static double TransSign(GLUvertex u, GLUvertex v, GLUvertex w) { + /* Returns a number whose sign matches TransEval(u,v,w) but which + * is cheaper to evaluate. Returns > 0, == 0 , or < 0 + * as v is above, on, or below the edge uw. + */ + double gapL, gapR; + + assert (TransLeq(u, v) && TransLeq(v, w)); + + gapL = v.t - u.t; + gapR = w.t - v.t; + + if (gapL + gapR > 0) { + return (v.s - w.s) * gapL + (v.s - u.s) * gapR; + } + /* vertical line */ + return 0; + } + + + static boolean VertCCW(GLUvertex u, GLUvertex v, GLUvertex w) { + /* For almost-degenerate situations, the results are not reliable. + * Unless the floating-point arithmetic can be performed without + * rounding errors, *any* implementation will give incorrect results + * on some degenerate inputs, so the client must have some way to + * handle this situation. + */ + return (u.s * (v.t - w.t) + v.s * (w.t - u.t) + w.s * (u.t - v.t)) >= 0; + } + +/* Given parameters a,x,b,y returns the value (b*x+a*y)/(a+b), + * or (x+y)/2 if a==b==0. It requires that a,b >= 0, and enforces + * this in the rare case that one argument is slightly negative. + * The implementation is extremely stable numerically. + * In particular it guarantees that the result r satisfies + * MIN(x,y) <= r <= MAX(x,y), and the results are very accurate + * even when a and b differ greatly in magnitude. + */ + static double Interpolate(double a, double x, double b, double y) { + a = (a < 0) ? 0 : a; + b = (b < 0) ? 0 : b; + if (a <= b) { + if (b == 0) { + return (x + y) / 2.0; + } else { + return (x + (y - x) * (a / (a + b))); + } + } else { + return (y + (x - y) * (b / (a + b))); + } + } + + static void EdgeIntersect(GLUvertex o1, GLUvertex d1, + GLUvertex o2, GLUvertex d2, + GLUvertex v) +/* Given edges (o1,d1) and (o2,d2), compute their point of intersection. + * The computed point is guaranteed to lie in the intersection of the + * bounding rectangles defined by each edge. + */ { + double z1, z2; + + /* This is certainly not the most efficient way to find the intersection + * of two line segments, but it is very numerically stable. + * + * Strategy: find the two middle vertices in the VertLeq ordering, + * and interpolate the intersection s-value from these. Then repeat + * using the TransLeq ordering to find the intersection t-value. + */ + + if (!VertLeq(o1, d1)) { + GLUvertex temp = o1; + o1 = d1; + d1 = temp; + } + if (!VertLeq(o2, d2)) { + GLUvertex temp = o2; + o2 = d2; + d2 = temp; + } + if (!VertLeq(o1, o2)) { + GLUvertex temp = o1; + o1 = o2; + o2 = temp; + temp = d1; + d1 = d2; + d2 = temp; + } + + if (!VertLeq(o2, d1)) { + /* Technically, no intersection -- do our best */ + v.s = (o2.s + d1.s) / 2.0; + } else if (VertLeq(d1, d2)) { + /* Interpolate between o2 and d1 */ + z1 = EdgeEval(o1, o2, d1); + z2 = EdgeEval(o2, d1, d2); + if (z1 + z2 < 0) { + z1 = -z1; + z2 = -z2; + } + v.s = Interpolate(z1, o2.s, z2, d1.s); + } else { + /* Interpolate between o2 and d2 */ + z1 = EdgeSign(o1, o2, d1); + z2 = -EdgeSign(o1, d2, d1); + if (z1 + z2 < 0) { + z1 = -z1; + z2 = -z2; + } + v.s = Interpolate(z1, o2.s, z2, d2.s); + } + + /* Now repeat the process for t */ + + if (!TransLeq(o1, d1)) { + GLUvertex temp = o1; + o1 = d1; + d1 = temp; + } + if (!TransLeq(o2, d2)) { + GLUvertex temp = o2; + o2 = d2; + d2 = temp; + } + if (!TransLeq(o1, o2)) { + GLUvertex temp = o2; + o2 = o1; + o1 = temp; + temp = d2; + d2 = d1; + d1 = temp; + } + + if (!TransLeq(o2, d1)) { + /* Technically, no intersection -- do our best */ + v.t = (o2.t + d1.t) / 2.0; + } else if (TransLeq(d1, d2)) { + /* Interpolate between o2 and d1 */ + z1 = TransEval(o1, o2, d1); + z2 = TransEval(o2, d1, d2); + if (z1 + z2 < 0) { + z1 = -z1; + z2 = -z2; + } + v.t = Interpolate(z1, o2.t, z2, d1.t); + } else { + /* Interpolate between o2 and d2 */ + z1 = TransSign(o1, o2, d1); + z2 = -TransSign(o1, d2, d1); + if (z1 + z2 < 0) { + z1 = -z1; + z2 = -z2; + } + v.t = Interpolate(z1, o2.t, z2, d2.t); + } + } + + static boolean VertEq(GLUvertex u, GLUvertex v) { + return u.s == v.s && u.t == v.t; + } + + static boolean VertLeq(GLUvertex u, GLUvertex v) { + return u.s < v.s || (u.s == v.s && u.t <= v.t); + } + +/* Versions of VertLeq, EdgeSign, EdgeEval with s and t transposed. */ + + static boolean TransLeq(GLUvertex u, GLUvertex v) { + return u.t < v.t || (u.t == v.t && u.s <= v.s); + } + + static boolean EdgeGoesLeft(GLUhalfEdge e) { + return VertLeq(e.Sym.Org, e.Org); + } + + static boolean EdgeGoesRight(GLUhalfEdge e) { + return VertLeq(e.Org, e.Sym.Org); + } + + static double VertL1dist(GLUvertex u, GLUvertex v) { + return Math.abs(u.s - v.s) + Math.abs(u.t - v.t); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/Mesh.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/Mesh.java new file mode 100644 index 0000000..b85644b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/Mesh.java @@ -0,0 +1,766 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* +* Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. +* All rights reserved. +*/ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** NOTE: The Original Code (as defined below) has been licensed to Sun +** Microsystems, Inc. ("Sun") under the SGI Free Software License B +** (Version 1.1), shown above ("SGI License"). Pursuant to Section +** 3.2(3) of the SGI License, Sun is distributing the Covered Code to +** you under an alternative license ("Alternative License"). This +** Alternative License includes all of the provisions of the SGI License +** except that Section 2.2 and 11 are omitted. Any differences between +** the Alternative License and the SGI License are offered solely by Sun +** and not by SGI. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +** Author: Eric Veach, July 1994 +** Java Port: Pepijn Van Eeckhoudt, July 2003 +** Java Port: Nathan Parker Burg, August 2003 +*/ +package org.lwjgl.util.glu.tessellation; + +class Mesh { + private Mesh() { + } + + /************************ Utility Routines ************************/ +/* MakeEdge creates a new pair of half-edges which form their own loop. + * No vertex or face structures are allocated, but these must be assigned + * before the current edge operation is completed. + */ + static GLUhalfEdge MakeEdge(GLUhalfEdge eNext) { + GLUhalfEdge e; + GLUhalfEdge eSym; + GLUhalfEdge ePrev; + +// EdgePair * pair = (EdgePair *) +// memAlloc(sizeof(EdgePair)); +// if (pair == NULL) return NULL; +// +// e = &pair - > e; + e = new GLUhalfEdge(true); +// eSym = &pair - > eSym; + eSym = new GLUhalfEdge(false); + + + /* Make sure eNext points to the first edge of the edge pair */ + if (!eNext.first) { + eNext = eNext.Sym; + } + + /* Insert in circular doubly-linked list before eNext. + * Note that the prev pointer is stored in Sym->next. + */ + ePrev = eNext.Sym.next; + eSym.next = ePrev; + ePrev.Sym.next = e; + e.next = eNext; + eNext.Sym.next = eSym; + + e.Sym = eSym; + e.Onext = e; + e.Lnext = eSym; + e.Org = null; + e.Lface = null; + e.winding = 0; + e.activeRegion = null; + + eSym.Sym = e; + eSym.Onext = eSym; + eSym.Lnext = e; + eSym.Org = null; + eSym.Lface = null; + eSym.winding = 0; + eSym.activeRegion = null; + + return e; + } + +/* Splice( a, b ) is best described by the Guibas/Stolfi paper or the + * CS348a notes (see mesh.h). Basically it modifies the mesh so that + * a->Onext and b->Onext are exchanged. This can have various effects + * depending on whether a and b belong to different face or vertex rings. + * For more explanation see __gl_meshSplice() below. + */ + static void Splice(GLUhalfEdge a, GLUhalfEdge b) { + GLUhalfEdge aOnext = a.Onext; + GLUhalfEdge bOnext = b.Onext; + + aOnext.Sym.Lnext = b; + bOnext.Sym.Lnext = a; + a.Onext = bOnext; + b.Onext = aOnext; + } + +/* MakeVertex( newVertex, eOrig, vNext ) attaches a new vertex and makes it the + * origin of all edges in the vertex loop to which eOrig belongs. "vNext" gives + * a place to insert the new vertex in the global vertex list. We insert + * the new vertex *before* vNext so that algorithms which walk the vertex + * list will not see the newly created vertices. + */ + static void MakeVertex(GLUvertex newVertex, + GLUhalfEdge eOrig, GLUvertex vNext) { + GLUhalfEdge e; + GLUvertex vPrev; + GLUvertex vNew = newVertex; + + assert (vNew != null); + + /* insert in circular doubly-linked list before vNext */ + vPrev = vNext.prev; + vNew.prev = vPrev; + vPrev.next = vNew; + vNew.next = vNext; + vNext.prev = vNew; + + vNew.anEdge = eOrig; + vNew.data = null; + /* leave coords, s, t undefined */ + + /* fix other edges on this vertex loop */ + e = eOrig; + do { + e.Org = vNew; + e = e.Onext; + } while (e != eOrig); + } + +/* MakeFace( newFace, eOrig, fNext ) attaches a new face and makes it the left + * face of all edges in the face loop to which eOrig belongs. "fNext" gives + * a place to insert the new face in the global face list. We insert + * the new face *before* fNext so that algorithms which walk the face + * list will not see the newly created faces. + */ + static void MakeFace(GLUface newFace, GLUhalfEdge eOrig, GLUface fNext) { + GLUhalfEdge e; + GLUface fPrev; + GLUface fNew = newFace; + + assert (fNew != null); + + /* insert in circular doubly-linked list before fNext */ + fPrev = fNext.prev; + fNew.prev = fPrev; + fPrev.next = fNew; + fNew.next = fNext; + fNext.prev = fNew; + + fNew.anEdge = eOrig; + fNew.data = null; + fNew.trail = null; + fNew.marked = false; + + /* The new face is marked "inside" if the old one was. This is a + * convenience for the common case where a face has been split in two. + */ + fNew.inside = fNext.inside; + + /* fix other edges on this face loop */ + e = eOrig; + do { + e.Lface = fNew; + e = e.Lnext; + } while (e != eOrig); + } + +/* KillEdge( eDel ) destroys an edge (the half-edges eDel and eDel->Sym), + * and removes from the global edge list. + */ + static void KillEdge(GLUhalfEdge eDel) { + GLUhalfEdge ePrev, eNext; + + /* Half-edges are allocated in pairs, see EdgePair above */ + if (!eDel.first) { + eDel = eDel.Sym; + } + + /* delete from circular doubly-linked list */ + eNext = eDel.next; + ePrev = eDel.Sym.next; + eNext.Sym.next = ePrev; + ePrev.Sym.next = eNext; + } + + +/* KillVertex( vDel ) destroys a vertex and removes it from the global + * vertex list. It updates the vertex loop to point to a given new vertex. + */ + static void KillVertex(GLUvertex vDel, GLUvertex newOrg) { + GLUhalfEdge e, eStart = vDel.anEdge; + GLUvertex vPrev, vNext; + + /* change the origin of all affected edges */ + e = eStart; + do { + e.Org = newOrg; + e = e.Onext; + } while (e != eStart); + + /* delete from circular doubly-linked list */ + vPrev = vDel.prev; + vNext = vDel.next; + vNext.prev = vPrev; + vPrev.next = vNext; + } + +/* KillFace( fDel ) destroys a face and removes it from the global face + * list. It updates the face loop to point to a given new face. + */ + static void KillFace(GLUface fDel, GLUface newLface) { + GLUhalfEdge e, eStart = fDel.anEdge; + GLUface fPrev, fNext; + + /* change the left face of all affected edges */ + e = eStart; + do { + e.Lface = newLface; + e = e.Lnext; + } while (e != eStart); + + /* delete from circular doubly-linked list */ + fPrev = fDel.prev; + fNext = fDel.next; + fNext.prev = fPrev; + fPrev.next = fNext; + } + + + /****************** Basic Edge Operations **********************/ + +/* __gl_meshMakeEdge creates one edge, two vertices, and a loop (face). + * The loop consists of the two new half-edges. + */ + public static GLUhalfEdge __gl_meshMakeEdge(GLUmesh mesh) { + GLUvertex newVertex1 = new GLUvertex(); + GLUvertex newVertex2 = new GLUvertex(); + GLUface newFace = new GLUface(); + GLUhalfEdge e; + + e = MakeEdge(mesh.eHead); + if (e == null) return null; + + MakeVertex(newVertex1, e, mesh.vHead); + MakeVertex(newVertex2, e.Sym, mesh.vHead); + MakeFace(newFace, e, mesh.fHead); + return e; + } + + +/* __gl_meshSplice( eOrg, eDst ) is the basic operation for changing the + * mesh connectivity and topology. It changes the mesh so that + * eOrg->Onext <- OLD( eDst->Onext ) + * eDst->Onext <- OLD( eOrg->Onext ) + * where OLD(...) means the value before the meshSplice operation. + * + * This can have two effects on the vertex structure: + * - if eOrg->Org != eDst->Org, the two vertices are merged together + * - if eOrg->Org == eDst->Org, the origin is split into two vertices + * In both cases, eDst->Org is changed and eOrg->Org is untouched. + * + * Similarly (and independently) for the face structure, + * - if eOrg->Lface == eDst->Lface, one loop is split into two + * - if eOrg->Lface != eDst->Lface, two distinct loops are joined into one + * In both cases, eDst->Lface is changed and eOrg->Lface is unaffected. + * + * Some special cases: + * If eDst == eOrg, the operation has no effect. + * If eDst == eOrg->Lnext, the new face will have a single edge. + * If eDst == eOrg->Lprev, the old face will have a single edge. + * If eDst == eOrg->Onext, the new vertex will have a single edge. + * If eDst == eOrg->Oprev, the old vertex will have a single edge. + */ + public static boolean __gl_meshSplice(GLUhalfEdge eOrg, GLUhalfEdge eDst) { + boolean joiningLoops = false; + boolean joiningVertices = false; + + if (eOrg == eDst) return true; + + if (eDst.Org != eOrg.Org) { + /* We are merging two disjoint vertices -- destroy eDst->Org */ + joiningVertices = true; + KillVertex(eDst.Org, eOrg.Org); + } + if (eDst.Lface != eOrg.Lface) { + /* We are connecting two disjoint loops -- destroy eDst.Lface */ + joiningLoops = true; + KillFace(eDst.Lface, eOrg.Lface); + } + + /* Change the edge structure */ + Splice(eDst, eOrg); + + if (!joiningVertices) { + GLUvertex newVertex = new GLUvertex(); + + /* We split one vertex into two -- the new vertex is eDst.Org. + * Make sure the old vertex points to a valid half-edge. + */ + MakeVertex(newVertex, eDst, eOrg.Org); + eOrg.Org.anEdge = eOrg; + } + if (!joiningLoops) { + GLUface newFace = new GLUface(); + + /* We split one loop into two -- the new loop is eDst.Lface. + * Make sure the old face points to a valid half-edge. + */ + MakeFace(newFace, eDst, eOrg.Lface); + eOrg.Lface.anEdge = eOrg; + } + + return true; + } + + +/* __gl_meshDelete( eDel ) removes the edge eDel. There are several cases: + * if (eDel.Lface != eDel.Rface), we join two loops into one; the loop + * eDel.Lface is deleted. Otherwise, we are splitting one loop into two; + * the newly created loop will contain eDel.Dst. If the deletion of eDel + * would create isolated vertices, those are deleted as well. + * + * This function could be implemented as two calls to __gl_meshSplice + * plus a few calls to memFree, but this would allocate and delete + * unnecessary vertices and faces. + */ + static boolean __gl_meshDelete(GLUhalfEdge eDel) { + GLUhalfEdge eDelSym = eDel.Sym; + boolean joiningLoops = false; + + /* First step: disconnect the origin vertex eDel.Org. We make all + * changes to get a consistent mesh in this "intermediate" state. + */ + if (eDel.Lface != eDel.Sym.Lface) { + /* We are joining two loops into one -- remove the left face */ + joiningLoops = true; + KillFace(eDel.Lface, eDel.Sym.Lface); + } + + if (eDel.Onext == eDel) { + KillVertex(eDel.Org, null); + } else { + /* Make sure that eDel.Org and eDel.Sym.Lface point to valid half-edges */ + eDel.Sym.Lface.anEdge = eDel.Sym.Lnext; + eDel.Org.anEdge = eDel.Onext; + + Splice(eDel, eDel.Sym.Lnext); + if (!joiningLoops) { + GLUface newFace = new GLUface(); + + /* We are splitting one loop into two -- create a new loop for eDel. */ + MakeFace(newFace, eDel, eDel.Lface); + } + } + + /* Claim: the mesh is now in a consistent state, except that eDel.Org + * may have been deleted. Now we disconnect eDel.Dst. + */ + if (eDelSym.Onext == eDelSym) { + KillVertex(eDelSym.Org, null); + KillFace(eDelSym.Lface, null); + } else { + /* Make sure that eDel.Dst and eDel.Lface point to valid half-edges */ + eDel.Lface.anEdge = eDelSym.Sym.Lnext; + eDelSym.Org.anEdge = eDelSym.Onext; + Splice(eDelSym, eDelSym.Sym.Lnext); + } + + /* Any isolated vertices or faces have already been freed. */ + KillEdge(eDel); + + return true; + } + + + /******************** Other Edge Operations **********************/ + +/* All these routines can be implemented with the basic edge + * operations above. They are provided for convenience and efficiency. + */ + + +/* __gl_meshAddEdgeVertex( eOrg ) creates a new edge eNew such that + * eNew == eOrg.Lnext, and eNew.Dst is a newly created vertex. + * eOrg and eNew will have the same left face. + */ + static GLUhalfEdge __gl_meshAddEdgeVertex(GLUhalfEdge eOrg) { + GLUhalfEdge eNewSym; + GLUhalfEdge eNew = MakeEdge(eOrg); + + eNewSym = eNew.Sym; + + /* Connect the new edge appropriately */ + Splice(eNew, eOrg.Lnext); + + /* Set the vertex and face information */ + eNew.Org = eOrg.Sym.Org; + { + GLUvertex newVertex = new GLUvertex(); + + MakeVertex(newVertex, eNewSym, eNew.Org); + } + eNew.Lface = eNewSym.Lface = eOrg.Lface; + + return eNew; + } + + +/* __gl_meshSplitEdge( eOrg ) splits eOrg into two edges eOrg and eNew, + * such that eNew == eOrg.Lnext. The new vertex is eOrg.Sym.Org == eNew.Org. + * eOrg and eNew will have the same left face. + */ + public static GLUhalfEdge __gl_meshSplitEdge(GLUhalfEdge eOrg) { + GLUhalfEdge eNew; + GLUhalfEdge tempHalfEdge = __gl_meshAddEdgeVertex(eOrg); + + eNew = tempHalfEdge.Sym; + + /* Disconnect eOrg from eOrg.Sym.Org and connect it to eNew.Org */ + Splice(eOrg.Sym, eOrg.Sym.Sym.Lnext); + Splice(eOrg.Sym, eNew); + + /* Set the vertex and face information */ + eOrg.Sym.Org = eNew.Org; + eNew.Sym.Org.anEdge = eNew.Sym; /* may have pointed to eOrg.Sym */ + eNew.Sym.Lface = eOrg.Sym.Lface; + eNew.winding = eOrg.winding; /* copy old winding information */ + eNew.Sym.winding = eOrg.Sym.winding; + + return eNew; + } + + +/* __gl_meshConnect( eOrg, eDst ) creates a new edge from eOrg.Sym.Org + * to eDst.Org, and returns the corresponding half-edge eNew. + * If eOrg.Lface == eDst.Lface, this splits one loop into two, + * and the newly created loop is eNew.Lface. Otherwise, two disjoint + * loops are merged into one, and the loop eDst.Lface is destroyed. + * + * If (eOrg == eDst), the new face will have only two edges. + * If (eOrg.Lnext == eDst), the old face is reduced to a single edge. + * If (eOrg.Lnext.Lnext == eDst), the old face is reduced to two edges. + */ + static GLUhalfEdge __gl_meshConnect(GLUhalfEdge eOrg, GLUhalfEdge eDst) { + GLUhalfEdge eNewSym; + boolean joiningLoops = false; + GLUhalfEdge eNew = MakeEdge(eOrg); + + eNewSym = eNew.Sym; + + if (eDst.Lface != eOrg.Lface) { + /* We are connecting two disjoint loops -- destroy eDst.Lface */ + joiningLoops = true; + KillFace(eDst.Lface, eOrg.Lface); + } + + /* Connect the new edge appropriately */ + Splice(eNew, eOrg.Lnext); + Splice(eNewSym, eDst); + + /* Set the vertex and face information */ + eNew.Org = eOrg.Sym.Org; + eNewSym.Org = eDst.Org; + eNew.Lface = eNewSym.Lface = eOrg.Lface; + + /* Make sure the old face points to a valid half-edge */ + eOrg.Lface.anEdge = eNewSym; + + if (!joiningLoops) { + GLUface newFace = new GLUface(); + + /* We split one loop into two -- the new loop is eNew.Lface */ + MakeFace(newFace, eNew, eOrg.Lface); + } + return eNew; + } + + + /******************** Other Operations **********************/ + +/* __gl_meshZapFace( fZap ) destroys a face and removes it from the + * global face list. All edges of fZap will have a null pointer as their + * left face. Any edges which also have a null pointer as their right face + * are deleted entirely (along with any isolated vertices this produces). + * An entire mesh can be deleted by zapping its faces, one at a time, + * in any order. Zapped faces cannot be used in further mesh operations! + */ + static void __gl_meshZapFace(GLUface fZap) { + GLUhalfEdge eStart = fZap.anEdge; + GLUhalfEdge e, eNext, eSym; + GLUface fPrev, fNext; + + /* walk around face, deleting edges whose right face is also null */ + eNext = eStart.Lnext; + do { + e = eNext; + eNext = e.Lnext; + + e.Lface = null; + if (e.Sym.Lface == null) { + /* delete the edge -- see __gl_MeshDelete above */ + + if (e.Onext == e) { + KillVertex(e.Org, null); + } else { + /* Make sure that e.Org points to a valid half-edge */ + e.Org.anEdge = e.Onext; + Splice(e, e.Sym.Lnext); + } + eSym = e.Sym; + if (eSym.Onext == eSym) { + KillVertex(eSym.Org, null); + } else { + /* Make sure that eSym.Org points to a valid half-edge */ + eSym.Org.anEdge = eSym.Onext; + Splice(eSym, eSym.Sym.Lnext); + } + KillEdge(e); + } + } while (e != eStart); + + /* delete from circular doubly-linked list */ + fPrev = fZap.prev; + fNext = fZap.next; + fNext.prev = fPrev; + fPrev.next = fNext; + } + + +/* __gl_meshNewMesh() creates a new mesh with no edges, no vertices, + * and no loops (what we usually call a "face"). + */ + public static GLUmesh __gl_meshNewMesh() { + GLUvertex v; + GLUface f; + GLUhalfEdge e; + GLUhalfEdge eSym; + GLUmesh mesh = new GLUmesh(); + + v = mesh.vHead; + f = mesh.fHead; + e = mesh.eHead; + eSym = mesh.eHeadSym; + + v.next = v.prev = v; + v.anEdge = null; + v.data = null; + + f.next = f.prev = f; + f.anEdge = null; + f.data = null; + f.trail = null; + f.marked = false; + f.inside = false; + + e.next = e; + e.Sym = eSym; + e.Onext = null; + e.Lnext = null; + e.Org = null; + e.Lface = null; + e.winding = 0; + e.activeRegion = null; + + eSym.next = eSym; + eSym.Sym = e; + eSym.Onext = null; + eSym.Lnext = null; + eSym.Org = null; + eSym.Lface = null; + eSym.winding = 0; + eSym.activeRegion = null; + + return mesh; + } + + +/* __gl_meshUnion( mesh1, mesh2 ) forms the union of all structures in + * both meshes, and returns the new mesh (the old meshes are destroyed). + */ + static GLUmesh __gl_meshUnion(GLUmesh mesh1, GLUmesh mesh2) { + GLUface f1 = mesh1.fHead; + GLUvertex v1 = mesh1.vHead; + GLUhalfEdge e1 = mesh1.eHead; + GLUface f2 = mesh2.fHead; + GLUvertex v2 = mesh2.vHead; + GLUhalfEdge e2 = mesh2.eHead; + + /* Add the faces, vertices, and edges of mesh2 to those of mesh1 */ + if (f2.next != f2) { + f1.prev.next = f2.next; + f2.next.prev = f1.prev; + f2.prev.next = f1; + f1.prev = f2.prev; + } + + if (v2.next != v2) { + v1.prev.next = v2.next; + v2.next.prev = v1.prev; + v2.prev.next = v1; + v1.prev = v2.prev; + } + + if (e2.next != e2) { + e1.Sym.next.Sym.next = e2.next; + e2.next.Sym.next = e1.Sym.next; + e2.Sym.next.Sym.next = e1; + e1.Sym.next = e2.Sym.next; + } + + return mesh1; + } + + +/* __gl_meshDeleteMesh( mesh ) will free all storage for any valid mesh. + */ + static void __gl_meshDeleteMeshZap(GLUmesh mesh) { + GLUface fHead = mesh.fHead; + + while (fHead.next != fHead) { + __gl_meshZapFace(fHead.next); + } + assert (mesh.vHead.next == mesh.vHead); + } + +/* __gl_meshDeleteMesh( mesh ) will free all storage for any valid mesh. + */ + public static void __gl_meshDeleteMesh(GLUmesh mesh) { + GLUface f, fNext; + GLUvertex v, vNext; + GLUhalfEdge e, eNext; + + for (f = mesh.fHead.next; f != mesh.fHead; f = fNext) { + fNext = f.next; + } + + for (v = mesh.vHead.next; v != mesh.vHead; v = vNext) { + vNext = v.next; + } + + for (e = mesh.eHead.next; e != mesh.eHead; e = eNext) { + /* One call frees both e and e.Sym (see EdgePair above) */ + eNext = e.next; + } + } + +/* __gl_meshCheckMesh( mesh ) checks a mesh for self-consistency. + */ + public static void __gl_meshCheckMesh(GLUmesh mesh) { + GLUface fHead = mesh.fHead; + GLUvertex vHead = mesh.vHead; + GLUhalfEdge eHead = mesh.eHead; + GLUface f, fPrev; + GLUvertex v, vPrev; + GLUhalfEdge e, ePrev; + + fPrev = fHead; + for (fPrev = fHead; (f = fPrev.next) != fHead; fPrev = f) { + assert (f.prev == fPrev); + e = f.anEdge; + do { + assert (e.Sym != e); + assert (e.Sym.Sym == e); + assert (e.Lnext.Onext.Sym == e); + assert (e.Onext.Sym.Lnext == e); + assert (e.Lface == f); + e = e.Lnext; + } while (e != f.anEdge); + } + assert (f.prev == fPrev && f.anEdge == null && f.data == null); + + vPrev = vHead; + for (vPrev = vHead; (v = vPrev.next) != vHead; vPrev = v) { + assert (v.prev == vPrev); + e = v.anEdge; + do { + assert (e.Sym != e); + assert (e.Sym.Sym == e); + assert (e.Lnext.Onext.Sym == e); + assert (e.Onext.Sym.Lnext == e); + assert (e.Org == v); + e = e.Onext; + } while (e != v.anEdge); + } + assert (v.prev == vPrev && v.anEdge == null && v.data == null); + + ePrev = eHead; + for (ePrev = eHead; (e = ePrev.next) != eHead; ePrev = e) { + assert (e.Sym.next == ePrev.Sym); + assert (e.Sym != e); + assert (e.Sym.Sym == e); + assert (e.Org != null); + assert (e.Sym.Org != null); + assert (e.Lnext.Onext.Sym == e); + assert (e.Onext.Sym.Lnext == e); + } + assert (e.Sym.next == ePrev.Sym + && e.Sym == mesh.eHeadSym + && e.Sym.Sym == e + && e.Org == null && e.Sym.Org == null + && e.Lface == null && e.Sym.Lface == null); + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/Normal.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/Normal.java new file mode 100644 index 0000000..cefa61d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/Normal.java @@ -0,0 +1,319 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* +* Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. +* All rights reserved. +*/ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** NOTE: The Original Code (as defined below) has been licensed to Sun +** Microsystems, Inc. ("Sun") under the SGI Free Software License B +** (Version 1.1), shown above ("SGI License"). Pursuant to Section +** 3.2(3) of the SGI License, Sun is distributing the Covered Code to +** you under an alternative license ("Alternative License"). This +** Alternative License includes all of the provisions of the SGI License +** except that Section 2.2 and 11 are omitted. Any differences between +** the Alternative License and the SGI License are offered solely by Sun +** and not by SGI. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +** Author: Eric Veach, July 1994 +** Java Port: Pepijn Van Eeckhoudt, July 2003 +** Java Port: Nathan Parker Burg, August 2003 +*/ +package org.lwjgl.util.glu.tessellation; + +import org.lwjgl.util.glu.GLU; + +class Normal { + private Normal() { + } + + static boolean SLANTED_SWEEP; + static double S_UNIT_X; /* Pre-normalized */ + static double S_UNIT_Y; + private static final boolean TRUE_PROJECT = false; + + static { + if (SLANTED_SWEEP) { +/* The "feature merging" is not intended to be complete. There are + * special cases where edges are nearly parallel to the sweep line + * which are not implemented. The algorithm should still behave + * robustly (ie. produce a reasonable tesselation) in the presence + * of such edges, however it may miss features which could have been + * merged. We could minimize this effect by choosing the sweep line + * direction to be something unusual (ie. not parallel to one of the + * coordinate axes). + */ + S_UNIT_X = 0.50941539564955385; /* Pre-normalized */ + S_UNIT_Y = 0.86052074622010633; + } else { + S_UNIT_X = 1.0; + S_UNIT_Y = 0.0; + } + } + + private static double Dot(double[] u, double[] v) { + return (u[0] * v[0] + u[1] * v[1] + u[2] * v[2]); + } + + static void Normalize(double[] v) { + double len = v[0] * v[0] + v[1] * v[1] + v[2] * v[2]; + + assert (len > 0); + len = Math.sqrt(len); + v[0] /= len; + v[1] /= len; + v[2] /= len; + } + + static int LongAxis(double[] v) { + int i = 0; + + if (Math.abs(v[1]) > Math.abs(v[0])) { + i = 1; + } + if (Math.abs(v[2]) > Math.abs(v[i])) { + i = 2; + } + return i; + } + + static void ComputeNormal(GLUtessellatorImpl tess, double[] norm) { + GLUvertex v, v1, v2; + double c, tLen2, maxLen2; + double[] maxVal, minVal, d1, d2, tNorm; + GLUvertex[] maxVert, minVert; + GLUvertex vHead = tess.mesh.vHead; + int i; + + maxVal = new double[3]; + minVal = new double[3]; + minVert = new GLUvertex[3]; + maxVert = new GLUvertex[3]; + d1 = new double[3]; + d2 = new double[3]; + tNorm = new double[3]; + + maxVal[0] = maxVal[1] = maxVal[2] = -2 * GLU.TESS_MAX_COORD; + minVal[0] = minVal[1] = minVal[2] = 2 * GLU.TESS_MAX_COORD; + + for (v = vHead.next; v != vHead; v = v.next) { + for (i = 0; i < 3; ++i) { + c = v.coords[i]; + if (c < minVal[i]) { + minVal[i] = c; + minVert[i] = v; + } + if (c > maxVal[i]) { + maxVal[i] = c; + maxVert[i] = v; + } + } + } + +/* Find two vertices separated by at least 1/sqrt(3) of the maximum + * distance between any two vertices + */ + i = 0; + if (maxVal[1] - minVal[1] > maxVal[0] - minVal[0]) { + i = 1; + } + if (maxVal[2] - minVal[2] > maxVal[i] - minVal[i]) { + i = 2; + } + if (minVal[i] >= maxVal[i]) { +/* All vertices are the same -- normal doesn't matter */ + norm[0] = 0; + norm[1] = 0; + norm[2] = 1; + return; + } + +/* Look for a third vertex which forms the triangle with maximum area + * (Length of normal == twice the triangle area) + */ + maxLen2 = 0; + v1 = minVert[i]; + v2 = maxVert[i]; + d1[0] = v1.coords[0] - v2.coords[0]; + d1[1] = v1.coords[1] - v2.coords[1]; + d1[2] = v1.coords[2] - v2.coords[2]; + for (v = vHead.next; v != vHead; v = v.next) { + d2[0] = v.coords[0] - v2.coords[0]; + d2[1] = v.coords[1] - v2.coords[1]; + d2[2] = v.coords[2] - v2.coords[2]; + tNorm[0] = d1[1] * d2[2] - d1[2] * d2[1]; + tNorm[1] = d1[2] * d2[0] - d1[0] * d2[2]; + tNorm[2] = d1[0] * d2[1] - d1[1] * d2[0]; + tLen2 = tNorm[0] * tNorm[0] + tNorm[1] * tNorm[1] + tNorm[2] * tNorm[2]; + if (tLen2 > maxLen2) { + maxLen2 = tLen2; + norm[0] = tNorm[0]; + norm[1] = tNorm[1]; + norm[2] = tNorm[2]; + } + } + + if (maxLen2 <= 0) { +/* All points lie on a single line -- any decent normal will do */ + norm[0] = norm[1] = norm[2] = 0; + norm[LongAxis(d1)] = 1; + } + } + + static void CheckOrientation(GLUtessellatorImpl tess) { + double area; + GLUface f, fHead = tess.mesh.fHead; + GLUvertex v, vHead = tess.mesh.vHead; + GLUhalfEdge e; + +/* When we compute the normal automatically, we choose the orientation + * so that the the sum of the signed areas of all contours is non-negative. + */ + area = 0; + for (f = fHead.next; f != fHead; f = f.next) { + e = f.anEdge; + if (e.winding <= 0) continue; + do { + area += (e.Org.s - e.Sym.Org.s) * (e.Org.t + e.Sym.Org.t); + e = e.Lnext; + } while (e != f.anEdge); + } + if (area < 0) { +/* Reverse the orientation by flipping all the t-coordinates */ + for (v = vHead.next; v != vHead; v = v.next) { + v.t = -v.t; + } + tess.tUnit[0] = -tess.tUnit[0]; + tess.tUnit[1] = -tess.tUnit[1]; + tess.tUnit[2] = -tess.tUnit[2]; + } + } + +/* Determine the polygon normal and project vertices onto the plane + * of the polygon. + */ + public static void __gl_projectPolygon(GLUtessellatorImpl tess) { + GLUvertex v, vHead = tess.mesh.vHead; + double w; + double[] norm = new double[3]; + double[] sUnit, tUnit; + int i; + boolean computedNormal = false; + + norm[0] = tess.normal[0]; + norm[1] = tess.normal[1]; + norm[2] = tess.normal[2]; + if (norm[0] == 0 && norm[1] == 0 && norm[2] == 0) { + ComputeNormal(tess, norm); + computedNormal = true; + } + sUnit = tess.sUnit; + tUnit = tess.tUnit; + i = LongAxis(norm); + + if (TRUE_PROJECT) { +/* Choose the initial sUnit vector to be approximately perpendicular + * to the normal. + */ + Normalize(norm); + + sUnit[i] = 0; + sUnit[(i + 1) % 3] = S_UNIT_X; + sUnit[(i + 2) % 3] = S_UNIT_Y; + +/* Now make it exactly perpendicular */ + w = Dot(sUnit, norm); + sUnit[0] -= w * norm[0]; + sUnit[1] -= w * norm[1]; + sUnit[2] -= w * norm[2]; + Normalize(sUnit); + +/* Choose tUnit so that (sUnit,tUnit,norm) form a right-handed frame */ + tUnit[0] = norm[1] * sUnit[2] - norm[2] * sUnit[1]; + tUnit[1] = norm[2] * sUnit[0] - norm[0] * sUnit[2]; + tUnit[2] = norm[0] * sUnit[1] - norm[1] * sUnit[0]; + Normalize(tUnit); + } else { +/* Project perpendicular to a coordinate axis -- better numerically */ + sUnit[i] = 0; + sUnit[(i + 1) % 3] = S_UNIT_X; + sUnit[(i + 2) % 3] = S_UNIT_Y; + + tUnit[i] = 0; + tUnit[(i + 1) % 3] = (norm[i] > 0) ? -S_UNIT_Y : S_UNIT_Y; + tUnit[(i + 2) % 3] = (norm[i] > 0) ? S_UNIT_X : -S_UNIT_X; + } + +/* Project the vertices onto the sweep plane */ + for (v = vHead.next; v != vHead; v = v.next) { + v.s = Dot(v.coords, sUnit); + v.t = Dot(v.coords, tUnit); + } + if (computedNormal) { + CheckOrientation(tess); + } + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/PriorityQ.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/PriorityQ.java new file mode 100644 index 0000000..574abe2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/PriorityQ.java @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* +* Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. +* All rights reserved. +*/ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** NOTE: The Original Code (as defined below) has been licensed to Sun +** Microsystems, Inc. ("Sun") under the SGI Free Software License B +** (Version 1.1), shown above ("SGI License"). Pursuant to Section +** 3.2(3) of the SGI License, Sun is distributing the Covered Code to +** you under an alternative license ("Alternative License"). This +** Alternative License includes all of the provisions of the SGI License +** except that Section 2.2 and 11 are omitted. Any differences between +** the Alternative License and the SGI License are offered solely by Sun +** and not by SGI. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +** Author: Eric Veach, July 1994 +** Java Port: Pepijn Van Eeckhoudt, July 2003 +** Java Port: Nathan Parker Burg, August 2003 +*/ +package org.lwjgl.util.glu.tessellation; + +abstract class PriorityQ { + public static final int INIT_SIZE = 32; + + public static class PQnode { + int handle; + } + + public static class PQhandleElem { + Object key; + int node; + } + + public interface Leq { + boolean leq(Object key1, Object key2); + } + + // #ifdef FOR_TRITE_TEST_PROGRAM +// private static boolean LEQ(PriorityQCommon.Leq leq, Object x,Object y) { +// return pq.leq.leq(x,y); +// } +// #else +/* Violates modularity, but a little faster */ +// #include "geom.h" + public static boolean LEQ(Leq leq, Object x, Object y) { + return Geom.VertLeq((GLUvertex) x, (GLUvertex) y); + } + + static PriorityQ pqNewPriorityQ(Leq leq) { + return new PriorityQSort(leq); + } + + abstract void pqDeletePriorityQ(); + + abstract boolean pqInit(); + + abstract int pqInsert(Object keyNew); + + abstract Object pqExtractMin(); + + abstract void pqDelete(int hCurr); + + abstract Object pqMinimum(); + + abstract boolean pqIsEmpty(); +// #endif +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/PriorityQHeap.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/PriorityQHeap.java new file mode 100644 index 0000000..4a1232e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/PriorityQHeap.java @@ -0,0 +1,296 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* +* Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. +* All rights reserved. +*/ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** NOTE: The Original Code (as defined below) has been licensed to Sun +** Microsystems, Inc. ("Sun") under the SGI Free Software License B +** (Version 1.1), shown above ("SGI License"). Pursuant to Section +** 3.2(3) of the SGI License, Sun is distributing the Covered Code to +** you under an alternative license ("Alternative License"). This +** Alternative License includes all of the provisions of the SGI License +** except that Section 2.2 and 11 are omitted. Any differences between +** the Alternative License and the SGI License are offered solely by Sun +** and not by SGI. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +** Author: Eric Veach, July 1994 +** Java Port: Pepijn Van Eeckhoudt, July 2003 +** Java Port: Nathan Parker Burg, August 2003 +*/ +package org.lwjgl.util.glu.tessellation; + + + +class PriorityQHeap extends PriorityQ { + PriorityQ.PQnode[] nodes; + PriorityQ.PQhandleElem[] handles; + int size, max; + int freeList; + boolean initialized; + PriorityQ.Leq leq; + +/* really __gl_pqHeapNewPriorityQ */ +PriorityQHeap(PriorityQ.Leq leq) { + size = 0; + max = PriorityQ.INIT_SIZE; + nodes = new PriorityQ.PQnode[PriorityQ.INIT_SIZE + 1]; + for (int i = 0; i < nodes.length; i++) { + nodes[i] = new PQnode(); + } + handles = new PriorityQ.PQhandleElem[PriorityQ.INIT_SIZE + 1]; + for (int i = 0; i < handles.length; i++) { + handles[i] = new PQhandleElem(); + } + initialized = false; + freeList = 0; + this.leq = leq; + + nodes[1].handle = 1; /* so that Minimum() returns NULL */ + handles[1].key = null; + } + +/* really __gl_pqHeapDeletePriorityQ */ + void pqDeletePriorityQ() { + handles = null; + nodes = null; + } + + void FloatDown(int curr) { + PriorityQ.PQnode[] n = nodes; + PriorityQ.PQhandleElem[] h = handles; + int hCurr, hChild; + int child; + + hCurr = n[curr].handle; + for (; ;) { + child = curr << 1; + if (child < size && LEQ(leq, h[n[child + 1].handle].key, + h[n[child].handle].key)) { + ++child; + } + + assert (child <= max); + + hChild = n[child].handle; + if (child > size || LEQ(leq, h[hCurr].key, h[hChild].key)) { + n[curr].handle = hCurr; + h[hCurr].node = curr; + break; + } + n[curr].handle = hChild; + h[hChild].node = curr; + curr = child; + } + } + + + void FloatUp(int curr) { + PriorityQ.PQnode[] n = nodes; + PriorityQ.PQhandleElem[] h = handles; + int hCurr, hParent; + int parent; + + hCurr = n[curr].handle; + for (; ;) { + parent = curr >> 1; + hParent = n[parent].handle; + if (parent == 0 || LEQ(leq, h[hParent].key, h[hCurr].key)) { + n[curr].handle = hCurr; + h[hCurr].node = curr; + break; + } + n[curr].handle = hParent; + h[hParent].node = curr; + curr = parent; + } + } + +/* really __gl_pqHeapInit */ + boolean pqInit() { + int i; + + /* This method of building a heap is O(n), rather than O(n lg n). */ + + for (i = size; i >= 1; --i) { + FloatDown(i); + } + initialized = true; + + return true; + } + +/* really __gl_pqHeapInsert */ +/* returns LONG_MAX iff out of memory */ + int pqInsert(Object keyNew) { + int curr; + int free; + + curr = ++size; + if ((curr * 2) > max) { + PriorityQ.PQnode[] saveNodes = nodes; + PriorityQ.PQhandleElem[] saveHandles = handles; + + /* If the heap overflows, double its size. */ + max <<= 1; +// pq->nodes = (PQnode *)memRealloc( pq->nodes, (size_t) ((pq->max + 1) * sizeof( pq->nodes[0] ))); + PriorityQ.PQnode[] pqNodes = new PriorityQ.PQnode[max + 1]; + System.arraycopy( nodes, 0, pqNodes, 0, nodes.length ); + for (int i = nodes.length; i < pqNodes.length; i++) { + pqNodes[i] = new PQnode(); + } + nodes = pqNodes; + if (nodes == null) { + nodes = saveNodes; /* restore ptr to free upon return */ + return Integer.MAX_VALUE; + } + +// pq->handles = (PQhandleElem *)memRealloc( pq->handles,(size_t)((pq->max + 1) * sizeof( pq->handles[0] ))); + PriorityQ.PQhandleElem[] pqHandles = new PriorityQ.PQhandleElem[max + 1]; + System.arraycopy( handles, 0, pqHandles, 0, handles.length ); + for (int i = handles.length; i < pqHandles.length; i++) { + pqHandles[i] = new PQhandleElem(); + } + handles = pqHandles; + if (handles == null) { + handles = saveHandles; /* restore ptr to free upon return */ + return Integer.MAX_VALUE; + } + } + + if (freeList == 0) { + free = curr; + } else { + free = freeList; + freeList = handles[free].node; + } + + nodes[curr].handle = free; + handles[free].node = curr; + handles[free].key = keyNew; + + if (initialized) { + FloatUp(curr); + } + assert (free != Integer.MAX_VALUE); + return free; + } + +/* really __gl_pqHeapExtractMin */ + Object pqExtractMin() { + PriorityQ.PQnode[] n = nodes; + PriorityQ.PQhandleElem[] h = handles; + int hMin = n[1].handle; + Object min = h[hMin].key; + + if (size > 0) { + n[1].handle = n[size].handle; + h[n[1].handle].node = 1; + + h[hMin].key = null; + h[hMin].node = freeList; + freeList = hMin; + + if (--size > 0) { + FloatDown(1); + } + } + return min; + } + +/* really __gl_pqHeapDelete */ + void pqDelete(int hCurr) { + PriorityQ.PQnode[] n = nodes; + PriorityQ.PQhandleElem[] h = handles; + int curr; + + assert (hCurr >= 1 && hCurr <= max && h[hCurr].key != null); + + curr = h[hCurr].node; + n[curr].handle = n[size].handle; + h[n[curr].handle].node = curr; + + if (curr <= --size) { + if (curr <= 1 || LEQ(leq, h[n[curr >> 1].handle].key, h[n[curr].handle].key)) { + FloatDown(curr); + } else { + FloatUp(curr); + } + } + h[hCurr].key = null; + h[hCurr].node = freeList; + freeList = hCurr; + } + + Object pqMinimum() { + return handles[nodes[1].handle].key; + } + + boolean pqIsEmpty() { + return size == 0; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/PriorityQSort.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/PriorityQSort.java new file mode 100644 index 0000000..ef30d07 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/PriorityQSort.java @@ -0,0 +1,312 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** NOTE: The Original Code (as defined below) has been licensed to Sun +** Microsystems, Inc. ("Sun") under the SGI Free Software License B +** (Version 1.1), shown above ("SGI License"). Pursuant to Section +** 3.2(3) of the SGI License, Sun is distributing the Covered Code to +** you under an alternative license ("Alternative License"). This +** Alternative License includes all of the provisions of the SGI License +** except that Section 2.2 and 11 are omitted. Any differences between +** the Alternative License and the SGI License are offered solely by Sun +** and not by SGI. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +** Author: Eric Veach, July 1994 +** Java Port: Pepijn Van Eeckhoudt, July 2003 +** Java Port: Nathan Parker Burg, August 2003 +*/ +package org.lwjgl.util.glu.tessellation; + + + +class PriorityQSort extends PriorityQ { + PriorityQHeap heap; + Object[] keys; + + // JAVA: 'order' contains indices into the keys array. + // This simulates the indirect pointers used in the original C code + // (from Frank Suykens, Luciad.com). + int[] order; + int size, max; + boolean initialized; + PriorityQ.Leq leq; + + PriorityQSort(PriorityQ.Leq leq) { + heap = new PriorityQHeap(leq); + + keys = new Object[PriorityQ.INIT_SIZE]; + + size = 0; + max = PriorityQ.INIT_SIZE; + initialized = false; + this.leq = leq; + } + +/* really __gl_pqSortDeletePriorityQ */ + void pqDeletePriorityQ() { + if (heap != null) heap.pqDeletePriorityQ(); + order = null; + keys = null; + } + + private static boolean LT(PriorityQ.Leq leq, Object x, Object y) { + return (!PriorityQHeap.LEQ(leq, y, x)); + } + + private static boolean GT(PriorityQ.Leq leq, Object x, Object y) { + return (!PriorityQHeap.LEQ(leq, x, y)); + } + + private static void Swap(int[] array, int a, int b) { + if (true) { + int tmp = array[a]; + array[a] = array[b]; + array[b] = tmp; + } else { + + } + } + + private static class Stack { + int p, r; + } + +/* really __gl_pqSortInit */ + boolean pqInit() { + int p, r, i, j; + int piv; + Stack[] stack = new Stack[50]; + for (int k = 0; k < stack.length; k++) { + stack[k] = new Stack(); + } + int top = 0; + + int seed = 2016473283; + + /* Create an array of indirect pointers to the keys, so that we + * the handles we have returned are still valid. + */ + order = new int[size + 1]; +/* the previous line is a patch to compensate for the fact that IBM */ +/* machines return a null on a malloc of zero bytes (unlike SGI), */ +/* so we have to put in this defense to guard against a memory */ +/* fault four lines down. from fossum@austin.ibm.com. */ + p = 0; + r = size - 1; + for (piv = 0, i = p; i <= r; ++piv, ++i) { + // indirect pointers: keep an index into the keys array, not a direct pointer to its contents + order[i] = piv; + } + + /* Sort the indirect pointers in descending order, + * using randomized Quicksort + */ + stack[top].p = p; + stack[top].r = r; + ++top; + while (--top >= 0) { + p = stack[top].p; + r = stack[top].r; + while (r > p + 10) { + seed = Math.abs( seed * 1539415821 + 1 ); + i = p + seed % (r - p + 1); + piv = order[i]; + order[i] = order[p]; + order[p] = piv; + i = p - 1; + j = r + 1; + do { + do { + ++i; + } while (GT(leq, keys[order[i]], keys[piv])); + do { + --j; + } while (LT(leq, keys[order[j]], keys[piv])); + Swap(order, i, j); + } while (i < j); + Swap(order, i, j); /* Undo last swap */ + if (i - p < r - j) { + stack[top].p = j + 1; + stack[top].r = r; + ++top; + r = i - 1; + } else { + stack[top].p = p; + stack[top].r = i - 1; + ++top; + p = j + 1; + } + } + /* Insertion sort small lists */ + for (i = p + 1; i <= r; ++i) { + piv = order[i]; + for (j = i; j > p && LT(leq, keys[order[j - 1]], keys[piv]); --j) { + order[j] = order[j - 1]; + } + order[j] = piv; + } + } + max = size; + initialized = true; + heap.pqInit(); /* always succeeds */ + +/* #ifndef NDEBUG + p = order; + r = p + size - 1; + for (i = p; i < r; ++i) { + Assertion.doAssert(LEQ( * * (i + 1), **i )); + } + #endif*/ + + return true; + } + +/* really __gl_pqSortInsert */ +/* returns LONG_MAX iff out of memory */ + int pqInsert(Object keyNew) { + int curr; + + if (initialized) { + return heap.pqInsert(keyNew); + } + curr = size; + if (++size >= max) { + Object[] saveKey = keys; + + /* If the heap overflows, double its size. */ + max <<= 1; +// pq->keys = (PQHeapKey *)memRealloc( pq->keys,(size_t)(pq->max * sizeof( pq->keys[0] ))); + Object[] pqKeys = new Object[max]; + System.arraycopy( keys, 0, pqKeys, 0, keys.length ); + keys = pqKeys; + if (keys == null) { + keys = saveKey; /* restore ptr to free upon return */ + return Integer.MAX_VALUE; + } + } + assert curr != Integer.MAX_VALUE; + keys[curr] = keyNew; + + /* Negative handles index the sorted array. */ + return -(curr + 1); + } + +/* really __gl_pqSortExtractMin */ + Object pqExtractMin() { + Object sortMin, heapMin; + + if (size == 0) { + return heap.pqExtractMin(); + } + sortMin = keys[order[size - 1]]; + if (!heap.pqIsEmpty()) { + heapMin = heap.pqMinimum(); + if (LEQ(leq, heapMin, sortMin)) { + return heap.pqExtractMin(); + } + } + do { + --size; + } while (size > 0 && keys[order[size - 1]] == null); + return sortMin; + } + +/* really __gl_pqSortMinimum */ + Object pqMinimum() { + Object sortMin, heapMin; + + if (size == 0) { + return heap.pqMinimum(); + } + sortMin = keys[order[size - 1]]; + if (!heap.pqIsEmpty()) { + heapMin = heap.pqMinimum(); + if (PriorityQHeap.LEQ(leq, heapMin, sortMin)) { + return heapMin; + } + } + return sortMin; + } + +/* really __gl_pqSortIsEmpty */ + boolean pqIsEmpty() { + return (size == 0) && heap.pqIsEmpty(); + } + +/* really __gl_pqSortDelete */ + void pqDelete(int curr) { + if (curr >= 0) { + heap.pqDelete(curr); + return; + } + curr = -(curr + 1); + assert curr < max && keys[curr] != null; + + keys[curr] = null; + while (size > 0 && keys[order[size - 1]] == null) { + --size; + } + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/Render.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/Render.java new file mode 100644 index 0000000..b4c1031 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/Render.java @@ -0,0 +1,589 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* +* Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. +* All rights reserved. +*/ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** NOTE: The Original Code (as defined below) has been licensed to Sun +** Microsystems, Inc. ("Sun") under the SGI Free Software License B +** (Version 1.1), shown above ("SGI License"). Pursuant to Section +** 3.2(3) of the SGI License, Sun is distributing the Covered Code to +** you under an alternative license ("Alternative License"). This +** Alternative License includes all of the provisions of the SGI License +** except that Section 2.2 and 11 are omitted. Any differences between +** the Alternative License and the SGI License are offered solely by Sun +** and not by SGI. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +** Author: Eric Veach, July 1994 +** Java Port: Pepijn Van Eeckhoudt, July 2003 +** Java Port: Nathan Parker Burg, August 2003 +*/ +package org.lwjgl.util.glu.tessellation; + +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.util.glu.GLU.*; + +class Render { + private static final boolean USE_OPTIMIZED_CODE_PATH = false; + + private Render() { + } + + private static final RenderFan renderFan = new RenderFan(); + private static final RenderStrip renderStrip = new RenderStrip(); + private static final RenderTriangle renderTriangle = new RenderTriangle(); + +/* This structure remembers the information we need about a primitive + * to be able to render it later, once we have determined which + * primitive is able to use the most triangles. + */ + private static class FaceCount { + private FaceCount() { + } + + private FaceCount(long size, GLUhalfEdge eStart, renderCallBack render) { + this.size = size; + this.eStart = eStart; + this.render = render; + } + + long size; /* number of triangles used */ + GLUhalfEdge eStart; /* edge where this primitive starts */ + renderCallBack render; + }; + + private interface renderCallBack { + void render(GLUtessellatorImpl tess, GLUhalfEdge e, long size); + } + + /************************ Strips and Fans decomposition ******************/ + +/* __gl_renderMesh( tess, mesh ) takes a mesh and breaks it into triangle + * fans, strips, and separate triangles. A substantial effort is made + * to use as few rendering primitives as possible (ie. to make the fans + * and strips as large as possible). + * + * The rendering output is provided as callbacks (see the api). + */ + public static void __gl_renderMesh(GLUtessellatorImpl tess, GLUmesh mesh) { + GLUface f; + + /* Make a list of separate triangles so we can render them all at once */ + tess.lonelyTriList = null; + + for (f = mesh.fHead.next; f != mesh.fHead; f = f.next) { + f.marked = false; + } + for (f = mesh.fHead.next; f != mesh.fHead; f = f.next) { + + /* We examine all faces in an arbitrary order. Whenever we find + * an unprocessed face F, we output a group of faces including F + * whose size is maximum. + */ + if (f.inside && !f.marked) { + RenderMaximumFaceGroup(tess, f); + assert (f.marked); + } + } + if (tess.lonelyTriList != null) { + RenderLonelyTriangles(tess, tess.lonelyTriList); + tess.lonelyTriList = null; + } + } + + + static void RenderMaximumFaceGroup(GLUtessellatorImpl tess, GLUface fOrig) { + /* We want to find the largest triangle fan or strip of unmarked faces + * which includes the given face fOrig. There are 3 possible fans + * passing through fOrig (one centered at each vertex), and 3 possible + * strips (one for each CCW permutation of the vertices). Our strategy + * is to try all of these, and take the primitive which uses the most + * triangles (a greedy approach). + */ + GLUhalfEdge e = fOrig.anEdge; + FaceCount max = new FaceCount(); + FaceCount newFace; + + max.size = 1; + max.eStart = e; + max.render = renderTriangle; + + if (!tess.flagBoundary) { + newFace = MaximumFan(e); + if (newFace.size > max.size) { + max = newFace; + } + newFace = MaximumFan(e.Lnext); + if (newFace.size > max.size) { + max = newFace; + } + newFace = MaximumFan(e.Onext.Sym); + if (newFace.size > max.size) { + max = newFace; + } + + newFace = MaximumStrip(e); + if (newFace.size > max.size) { + max = newFace; + } + newFace = MaximumStrip(e.Lnext); + if (newFace.size > max.size) { + max = newFace; + } + newFace = MaximumStrip(e.Onext.Sym); + if (newFace.size > max.size) { + max = newFace; + } + } + max.render.render(tess, max.eStart, max.size); + } + + +/* Macros which keep track of faces we have marked temporarily, and allow + * us to backtrack when necessary. With triangle fans, this is not + * really necessary, since the only awkward case is a loop of triangles + * around a single origin vertex. However with strips the situation is + * more complicated, and we need a general tracking method like the + * one here. + */ + private static boolean Marked(GLUface f) { + return !f.inside || f.marked; + } + + private static GLUface AddToTrail(GLUface f, GLUface t) { + f.trail = t; + f.marked = true; + return f; + } + + private static void FreeTrail(GLUface t) { + if (true) { + while (t != null) { + t.marked = false; + t = t.trail; + } + } else { + /* absorb trailing semicolon */ + } + } + + static FaceCount MaximumFan(GLUhalfEdge eOrig) { + /* eOrig.Lface is the face we want to render. We want to find the size + * of a maximal fan around eOrig.Org. To do this we just walk around + * the origin vertex as far as possible in both directions. + */ + FaceCount newFace = new FaceCount(0, null, renderFan); + GLUface trail = null; + GLUhalfEdge e; + + for (e = eOrig; !Marked(e.Lface); e = e.Onext) { + trail = AddToTrail(e.Lface, trail); + ++newFace.size; + } + for (e = eOrig; !Marked(e.Sym.Lface); e = e.Sym.Lnext) { + trail = AddToTrail(e.Sym.Lface, trail); + ++newFace.size; + } + newFace.eStart = e; + /*LINTED*/ + FreeTrail(trail); + return newFace; + } + + + private static boolean IsEven(long n) { + return (n & 0x1L) == 0; + } + + static FaceCount MaximumStrip(GLUhalfEdge eOrig) { + /* Here we are looking for a maximal strip that contains the vertices + * eOrig.Org, eOrig.Dst, eOrig.Lnext.Dst (in that order or the + * reverse, such that all triangles are oriented CCW). + * + * Again we walk forward and backward as far as possible. However for + * strips there is a twist: to get CCW orientations, there must be + * an *even* number of triangles in the strip on one side of eOrig. + * We walk the strip starting on a side with an even number of triangles; + * if both side have an odd number, we are forced to shorten one side. + */ + FaceCount newFace = new FaceCount(0, null, renderStrip); + long headSize = 0, tailSize = 0; + GLUface trail = null; + GLUhalfEdge e, eTail, eHead; + + for (e = eOrig; !Marked(e.Lface); ++tailSize, e = e.Onext) { + trail = AddToTrail(e.Lface, trail); + ++tailSize; + e = e.Lnext.Sym; + if (Marked(e.Lface)) break; + trail = AddToTrail(e.Lface, trail); + } + eTail = e; + + for (e = eOrig; !Marked(e.Sym.Lface); ++headSize, e = e.Sym.Onext.Sym) { + trail = AddToTrail(e.Sym.Lface, trail); + ++headSize; + e = e.Sym.Lnext; + if (Marked(e.Sym.Lface)) break; + trail = AddToTrail(e.Sym.Lface, trail); + } + eHead = e; + + newFace.size = tailSize + headSize; + if (IsEven(tailSize)) { + newFace.eStart = eTail.Sym; + } else if (IsEven(headSize)) { + newFace.eStart = eHead; + } else { + /* Both sides have odd length, we must shorten one of them. In fact, + * we must start from eHead to guarantee inclusion of eOrig.Lface. + */ + --newFace.size; + newFace.eStart = eHead.Onext; + } + /*LINTED*/ + FreeTrail(trail); + return newFace; + } + + private static class RenderTriangle implements renderCallBack { + public void render(GLUtessellatorImpl tess, GLUhalfEdge e, long size) { + /* Just add the triangle to a triangle list, so we can render all + * the separate triangles at once. + */ + assert (size == 1); + tess.lonelyTriList = AddToTrail(e.Lface, tess.lonelyTriList); + } + } + + + static void RenderLonelyTriangles(GLUtessellatorImpl tess, GLUface f) { + /* Now we render all the separate triangles which could not be + * grouped into a triangle fan or strip. + */ + GLUhalfEdge e; + int newState; + int edgeState = -1; /* force edge state output for first vertex */ + + tess.callBeginOrBeginData(GL_TRIANGLES); + + for (; f != null; f = f.trail) { + /* Loop once for each edge (there will always be 3 edges) */ + + e = f.anEdge; + do { + if (tess.flagBoundary) { + /* Set the "edge state" to true just before we output the + * first vertex of each edge on the polygon boundary. + */ + newState = (!e.Sym.Lface.inside) ? 1 : 0; + if (edgeState != newState) { + edgeState = newState; + tess.callEdgeFlagOrEdgeFlagData( edgeState != 0); + } + } + tess.callVertexOrVertexData( e.Org.data); + + e = e.Lnext; + } while (e != f.anEdge); + } + tess.callEndOrEndData(); + } + + private static class RenderFan implements renderCallBack { + public void render(GLUtessellatorImpl tess, GLUhalfEdge e, long size) { + /* Render as many CCW triangles as possible in a fan starting from + * edge "e". The fan *should* contain exactly "size" triangles + * (otherwise we've goofed up somewhere). + */ + tess.callBeginOrBeginData(GL_TRIANGLE_FAN); + tess.callVertexOrVertexData( e.Org.data); + tess.callVertexOrVertexData( e.Sym.Org.data); + + while (!Marked(e.Lface)) { + e.Lface.marked = true; + --size; + e = e.Onext; + tess.callVertexOrVertexData( e.Sym.Org.data); + } + + assert (size == 0); + tess.callEndOrEndData(); + } + } + + private static class RenderStrip implements renderCallBack { + public void render(GLUtessellatorImpl tess, GLUhalfEdge e, long size) { + /* Render as many CCW triangles as possible in a strip starting from + * edge "e". The strip *should* contain exactly "size" triangles + * (otherwise we've goofed up somewhere). + */ + tess.callBeginOrBeginData(GL_TRIANGLE_STRIP); + tess.callVertexOrVertexData( e.Org.data); + tess.callVertexOrVertexData( e.Sym.Org.data); + + while (!Marked(e.Lface)) { + e.Lface.marked = true; + --size; + e = e.Lnext.Sym; + tess.callVertexOrVertexData( e.Org.data); + if (Marked(e.Lface)) break; + + e.Lface.marked = true; + --size; + e = e.Onext; + tess.callVertexOrVertexData( e.Sym.Org.data); + } + + assert (size == 0); + tess.callEndOrEndData(); + } + } + + /************************ Boundary contour decomposition ******************/ + +/* __gl_renderBoundary( tess, mesh ) takes a mesh, and outputs one + * contour for each face marked "inside". The rendering output is + * provided as callbacks (see the api). + */ + public static void __gl_renderBoundary(GLUtessellatorImpl tess, GLUmesh mesh) { + GLUface f; + GLUhalfEdge e; + + for (f = mesh.fHead.next; f != mesh.fHead; f = f.next) { + if (f.inside) { + tess.callBeginOrBeginData(GL_LINE_LOOP); + e = f.anEdge; + do { + tess.callVertexOrVertexData( e.Org.data); + e = e.Lnext; + } while (e != f.anEdge); + tess.callEndOrEndData(); + } + } + } + + + /************************ Quick-and-dirty decomposition ******************/ + + private static final int SIGN_INCONSISTENT = 2; + + static int ComputeNormal(GLUtessellatorImpl tess, double[] norm, boolean check) +/* + * If check==false, we compute the polygon normal and place it in norm[]. + * If check==true, we check that each triangle in the fan from v0 has a + * consistent orientation with respect to norm[]. If triangles are + * consistently oriented CCW, return 1; if CW, return -1; if all triangles + * are degenerate return 0; otherwise (no consistent orientation) return + * SIGN_INCONSISTENT. + */ { + CachedVertex[] v = tess.cache; +// CachedVertex vn = v0 + tess.cacheCount; + int vn = tess.cacheCount; +// CachedVertex vc; + int vc; + double dot, xc, yc, zc, xp, yp, zp; + double[] n = new double[3]; + int sign = 0; + + /* Find the polygon normal. It is important to get a reasonable + * normal even when the polygon is self-intersecting (eg. a bowtie). + * Otherwise, the computed normal could be very tiny, but perpendicular + * to the true plane of the polygon due to numerical noise. Then all + * the triangles would appear to be degenerate and we would incorrectly + * decompose the polygon as a fan (or simply not render it at all). + * + * We use a sum-of-triangles normal algorithm rather than the more + * efficient sum-of-trapezoids method (used in CheckOrientation() + * in normal.c). This lets us explicitly reverse the signed area + * of some triangles to get a reasonable normal in the self-intersecting + * case. + */ + if (!check) { + norm[0] = norm[1] = norm[2] = 0.0; + } + + vc = 1; + xc = v[vc].coords[0] - v[0].coords[0]; + yc = v[vc].coords[1] - v[0].coords[1]; + zc = v[vc].coords[2] - v[0].coords[2]; + while (++vc < vn) { + xp = xc; + yp = yc; + zp = zc; + xc = v[vc].coords[0] - v[0].coords[0]; + yc = v[vc].coords[1] - v[0].coords[1]; + zc = v[vc].coords[2] - v[0].coords[2]; + + /* Compute (vp - v0) cross (vc - v0) */ + n[0] = yp * zc - zp * yc; + n[1] = zp * xc - xp * zc; + n[2] = xp * yc - yp * xc; + + dot = n[0] * norm[0] + n[1] * norm[1] + n[2] * norm[2]; + if (!check) { + /* Reverse the contribution of back-facing triangles to get + * a reasonable normal for self-intersecting polygons (see above) + */ + if (dot >= 0) { + norm[0] += n[0]; + norm[1] += n[1]; + norm[2] += n[2]; + } else { + norm[0] -= n[0]; + norm[1] -= n[1]; + norm[2] -= n[2]; + } + } else if (dot != 0) { + /* Check the new orientation for consistency with previous triangles */ + if (dot > 0) { + if (sign < 0) return SIGN_INCONSISTENT; + sign = 1; + } else { + if (sign > 0) return SIGN_INCONSISTENT; + sign = -1; + } + } + } + return sign; + } + +/* __gl_renderCache( tess ) takes a single contour and tries to render it + * as a triangle fan. This handles convex polygons, as well as some + * non-convex polygons if we get lucky. + * + * Returns true if the polygon was successfully rendered. The rendering + * output is provided as callbacks (see the api). + */ + public static boolean __gl_renderCache(GLUtessellatorImpl tess) { + CachedVertex[] v = tess.cache; +// CachedVertex vn = v0 + tess.cacheCount; + int vn = tess.cacheCount; +// CachedVertex vc; + int vc; + double[] norm = new double[3]; + int sign; + + if (tess.cacheCount < 3) { + /* Degenerate contour -- no output */ + return true; + } + + norm[0] = tess.normal[0]; + norm[1] = tess.normal[1]; + norm[2] = tess.normal[2]; + if (norm[0] == 0 && norm[1] == 0 && norm[2] == 0) { + ComputeNormal( tess, norm, false); + } + + sign = ComputeNormal( tess, norm, true); + if (sign == SIGN_INCONSISTENT) { + /* Fan triangles did not have a consistent orientation */ + return false; + } + if (sign == 0) { + /* All triangles were degenerate */ + return true; + } + + if ( !USE_OPTIMIZED_CODE_PATH ) { + return false; + } else { + /* Make sure we do the right thing for each winding rule */ + switch (tess.windingRule) { + case GLU_TESS_WINDING_ODD: + case GLU_TESS_WINDING_NONZERO: + break; + case GLU_TESS_WINDING_POSITIVE: + if (sign < 0) return true; + break; + case GLU_TESS_WINDING_NEGATIVE: + if (sign > 0) return true; + break; + case GLU_TESS_WINDING_ABS_GEQ_TWO: + return true; + } + + tess.callBeginOrBeginData( tess.boundaryOnly ? GL_LINE_LOOP + : (tess.cacheCount > 3) ? GL_TRIANGLE_FAN + : GL_TRIANGLES); + + tess.callVertexOrVertexData( v[0].data); + if (sign > 0) { + for (vc = 1; vc < vn; ++vc) { + tess.callVertexOrVertexData( v[vc].data); + } + } else { + for (vc = vn - 1; vc > 0; --vc) { + tess.callVertexOrVertexData( v[vc].data); + } + } + tess.callEndOrEndData(); + return true; + } + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/Sweep.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/Sweep.java new file mode 100644 index 0000000..c96819f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/Sweep.java @@ -0,0 +1,1384 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* +* Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. +* All rights reserved. +*/ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** NOTE: The Original Code (as defined below) has been licensed to Sun +** Microsystems, Inc. ("Sun") under the SGI Free Software License B +** (Version 1.1), shown above ("SGI License"). Pursuant to Section +** 3.2(3) of the SGI License, Sun is distributing the Covered Code to +** you under an alternative license ("Alternative License"). This +** Alternative License includes all of the provisions of the SGI License +** except that Section 2.2 and 11 are omitted. Any differences between +** the Alternative License and the SGI License are offered solely by Sun +** and not by SGI. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +** Author: Eric Veach, July 1994 +** Java Port: Pepijn Van Eeckhoudt, July 2003 +** Java Port: Nathan Parker Burg, August 2003 +*/ +package org.lwjgl.util.glu.tessellation; + +import static org.lwjgl.util.glu.GLU.*; + +class Sweep { + private Sweep() { + } + +// #ifdef FOR_TRITE_TEST_PROGRAM +// extern void DebugEvent( GLUtessellator *tess ); +// #else + private static void DebugEvent(GLUtessellatorImpl tess) { + + } +// #endif + +/* + * Invariants for the Edge Dictionary. + * - each pair of adjacent edges e2=Succ(e1) satisfies EdgeLeq(e1,e2) + * at any valid location of the sweep event + * - if EdgeLeq(e2,e1) as well (at any valid sweep event), then e1 and e2 + * share a common endpoint + * - for each e, e.Dst has been processed, but not e.Org + * - each edge e satisfies VertLeq(e.Dst,event) && VertLeq(event,e.Org) + * where "event" is the current sweep line event. + * - no edge e has zero length + * + * Invariants for the Mesh (the processed portion). + * - the portion of the mesh left of the sweep line is a planar graph, + * ie. there is *some* way to embed it in the plane + * - no processed edge has zero length + * - no two processed vertices have identical coordinates + * - each "inside" region is monotone, ie. can be broken into two chains + * of monotonically increasing vertices according to VertLeq(v1,v2) + * - a non-invariant: these chains may intersect (very slightly) + * + * Invariants for the Sweep. + * - if none of the edges incident to the event vertex have an activeRegion + * (ie. none of these edges are in the edge dictionary), then the vertex + * has only right-going edges. + * - if an edge is marked "fixUpperEdge" (it is a temporary edge introduced + * by ConnectRightVertex), then it is the only right-going edge from + * its associated vertex. (This says that these edges exist only + * when it is necessary.) + */ + +/* When we merge two edges into one, we need to compute the combined + * winding of the new edge. + */ + private static void AddWinding(GLUhalfEdge eDst, GLUhalfEdge eSrc) { + eDst.winding += eSrc.winding; + eDst.Sym.winding += eSrc.Sym.winding; + } + + + private static ActiveRegion RegionBelow(ActiveRegion r) { + return ((ActiveRegion) Dict.dictKey(Dict.dictPred(r.nodeUp))); + } + + private static ActiveRegion RegionAbove(ActiveRegion r) { + return ((ActiveRegion) Dict.dictKey(Dict.dictSucc(r.nodeUp))); + } + + static boolean EdgeLeq(GLUtessellatorImpl tess, ActiveRegion reg1, ActiveRegion reg2) +/* + * Both edges must be directed from right to left (this is the canonical + * direction for the upper edge of each region). + * + * The strategy is to evaluate a "t" value for each edge at the + * current sweep line position, given by tess.event. The calculations + * are designed to be very stable, but of course they are not perfect. + * + * Special case: if both edge destinations are at the sweep event, + * we sort the edges by slope (they would otherwise compare equally). + */ { + GLUvertex event = tess.event; + GLUhalfEdge e1, e2; + double t1, t2; + + e1 = reg1.eUp; + e2 = reg2.eUp; + + if (e1.Sym.Org == event) { + if (e2.Sym.Org == event) { + /* Two edges right of the sweep line which meet at the sweep event. + * Sort them by slope. + */ + if (Geom.VertLeq(e1.Org, e2.Org)) { + return Geom.EdgeSign(e2.Sym.Org, e1.Org, e2.Org) <= 0; + } + return Geom.EdgeSign(e1.Sym.Org, e2.Org, e1.Org) >= 0; + } + return Geom.EdgeSign(e2.Sym.Org, event, e2.Org) <= 0; + } + if (e2.Sym.Org == event) { + return Geom.EdgeSign(e1.Sym.Org, event, e1.Org) >= 0; + } + + /* General case - compute signed distance *from* e1, e2 to event */ + t1 = Geom.EdgeEval(e1.Sym.Org, event, e1.Org); + t2 = Geom.EdgeEval(e2.Sym.Org, event, e2.Org); + return (t1 >= t2); + } + + + static void DeleteRegion(GLUtessellatorImpl tess, ActiveRegion reg) { + if (reg.fixUpperEdge) { + /* It was created with zero winding number, so it better be + * deleted with zero winding number (ie. it better not get merged + * with a real edge). + */ + assert (reg.eUp.winding == 0); + } + reg.eUp.activeRegion = null; + Dict.dictDelete(tess.dict, reg.nodeUp); /* __gl_dictListDelete */ + } + + + static boolean FixUpperEdge(ActiveRegion reg, GLUhalfEdge newEdge) +/* + * Replace an upper edge which needs fixing (see ConnectRightVertex). + */ { + assert (reg.fixUpperEdge); + if (!Mesh.__gl_meshDelete(reg.eUp)) return false; + reg.fixUpperEdge = false; + reg.eUp = newEdge; + newEdge.activeRegion = reg; + + return true; + } + + static ActiveRegion TopLeftRegion(ActiveRegion reg) { + GLUvertex org = reg.eUp.Org; + GLUhalfEdge e; + + /* Find the region above the uppermost edge with the same origin */ + do { + reg = RegionAbove(reg); + } while (reg.eUp.Org == org); + + /* If the edge above was a temporary edge introduced by ConnectRightVertex, + * now is the time to fix it. + */ + if (reg.fixUpperEdge) { + e = Mesh.__gl_meshConnect(RegionBelow(reg).eUp.Sym, reg.eUp.Lnext); + if (e == null) return null; + if (!FixUpperEdge(reg, e)) return null; + reg = RegionAbove(reg); + } + return reg; + } + + static ActiveRegion TopRightRegion(ActiveRegion reg) { + GLUvertex dst = reg.eUp.Sym.Org; + + /* Find the region above the uppermost edge with the same destination */ + do { + reg = RegionAbove(reg); + } while (reg.eUp.Sym.Org == dst); + return reg; + } + + static ActiveRegion AddRegionBelow(GLUtessellatorImpl tess, + ActiveRegion regAbove, + GLUhalfEdge eNewUp) +/* + * Add a new active region to the sweep line, *somewhere* below "regAbove" + * (according to where the new edge belongs in the sweep-line dictionary). + * The upper edge of the new region will be "eNewUp". + * Winding number and "inside" flag are not updated. + */ { + ActiveRegion regNew = new ActiveRegion(); + if (regNew == null) throw new RuntimeException(); + + regNew.eUp = eNewUp; + /* __gl_dictListInsertBefore */ + regNew.nodeUp = Dict.dictInsertBefore(tess.dict, regAbove.nodeUp, regNew); + if (regNew.nodeUp == null) throw new RuntimeException(); + regNew.fixUpperEdge = false; + regNew.sentinel = false; + regNew.dirty = false; + + eNewUp.activeRegion = regNew; + return regNew; + } + + static boolean IsWindingInside(GLUtessellatorImpl tess, int n) { + switch (tess.windingRule) { + case GLU_TESS_WINDING_ODD: + return (n & 1) != 0; + case GLU_TESS_WINDING_NONZERO: + return (n != 0); + case GLU_TESS_WINDING_POSITIVE: + return (n > 0); + case GLU_TESS_WINDING_NEGATIVE: + return (n < 0); + case GLU_TESS_WINDING_ABS_GEQ_TWO: + return (n >= 2) || (n <= -2); + } + /*LINTED*/ +// assert (false); + throw new InternalError(); + /*NOTREACHED*/ + } + + + static void ComputeWinding(GLUtessellatorImpl tess, ActiveRegion reg) { + reg.windingNumber = RegionAbove(reg).windingNumber + reg.eUp.winding; + reg.inside = IsWindingInside(tess, reg.windingNumber); + } + + + static void FinishRegion(GLUtessellatorImpl tess, ActiveRegion reg) +/* + * Delete a region from the sweep line. This happens when the upper + * and lower chains of a region meet (at a vertex on the sweep line). + * The "inside" flag is copied to the appropriate mesh face (we could + * not do this before -- since the structure of the mesh is always + * changing, this face may not have even existed until now). + */ { + GLUhalfEdge e = reg.eUp; + GLUface f = e.Lface; + + f.inside = reg.inside; + f.anEdge = e; /* optimization for __gl_meshTessellateMonoRegion() */ + DeleteRegion(tess, reg); + } + + + static GLUhalfEdge FinishLeftRegions(GLUtessellatorImpl tess, + ActiveRegion regFirst, ActiveRegion regLast) +/* + * We are given a vertex with one or more left-going edges. All affected + * edges should be in the edge dictionary. Starting at regFirst.eUp, + * we walk down deleting all regions where both edges have the same + * origin vOrg. At the same time we copy the "inside" flag from the + * active region to the face, since at this point each face will belong + * to at most one region (this was not necessarily true until this point + * in the sweep). The walk stops at the region above regLast; if regLast + * is null we walk as far as possible. At the same time we relink the + * mesh if necessary, so that the ordering of edges around vOrg is the + * same as in the dictionary. + */ { + ActiveRegion reg, regPrev; + GLUhalfEdge e, ePrev; + + regPrev = regFirst; + ePrev = regFirst.eUp; + while (regPrev != regLast) { + regPrev.fixUpperEdge = false; /* placement was OK */ + reg = RegionBelow(regPrev); + e = reg.eUp; + if (e.Org != ePrev.Org) { + if (!reg.fixUpperEdge) { + /* Remove the last left-going edge. Even though there are no further + * edges in the dictionary with this origin, there may be further + * such edges in the mesh (if we are adding left edges to a vertex + * that has already been processed). Thus it is important to call + * FinishRegion rather than just DeleteRegion. + */ + FinishRegion(tess, regPrev); + break; + } + /* If the edge below was a temporary edge introduced by + * ConnectRightVertex, now is the time to fix it. + */ + e = Mesh.__gl_meshConnect(ePrev.Onext.Sym, e.Sym); + if (e == null) throw new RuntimeException(); + if (!FixUpperEdge(reg, e)) throw new RuntimeException(); + } + + /* Relink edges so that ePrev.Onext == e */ + if (ePrev.Onext != e) { + if (!Mesh.__gl_meshSplice(e.Sym.Lnext, e)) throw new RuntimeException(); + if (!Mesh.__gl_meshSplice(ePrev, e)) throw new RuntimeException(); + } + FinishRegion(tess, regPrev); /* may change reg.eUp */ + ePrev = reg.eUp; + regPrev = reg; + } + return ePrev; + } + + + static void AddRightEdges(GLUtessellatorImpl tess, ActiveRegion regUp, + GLUhalfEdge eFirst, GLUhalfEdge eLast, GLUhalfEdge eTopLeft, + boolean cleanUp) +/* + * Purpose: insert right-going edges into the edge dictionary, and update + * winding numbers and mesh connectivity appropriately. All right-going + * edges share a common origin vOrg. Edges are inserted CCW starting at + * eFirst; the last edge inserted is eLast.Sym.Lnext. If vOrg has any + * left-going edges already processed, then eTopLeft must be the edge + * such that an imaginary upward vertical segment from vOrg would be + * contained between eTopLeft.Sym.Lnext and eTopLeft; otherwise eTopLeft + * should be null. + */ { + ActiveRegion reg, regPrev; + GLUhalfEdge e, ePrev; + boolean firstTime = true; + + /* Insert the new right-going edges in the dictionary */ + e = eFirst; + do { + assert (Geom.VertLeq(e.Org, e.Sym.Org)); + AddRegionBelow(tess, regUp, e.Sym); + e = e.Onext; + } while (e != eLast); + + /* Walk *all* right-going edges from e.Org, in the dictionary order, + * updating the winding numbers of each region, and re-linking the mesh + * edges to match the dictionary ordering (if necessary). + */ + if (eTopLeft == null) { + eTopLeft = RegionBelow(regUp).eUp.Sym.Onext; + } + regPrev = regUp; + ePrev = eTopLeft; + for (; ;) { + reg = RegionBelow(regPrev); + e = reg.eUp.Sym; + if (e.Org != ePrev.Org) break; + + if (e.Onext != ePrev) { + /* Unlink e from its current position, and relink below ePrev */ + if (!Mesh.__gl_meshSplice(e.Sym.Lnext, e)) throw new RuntimeException(); + if (!Mesh.__gl_meshSplice(ePrev.Sym.Lnext, e)) throw new RuntimeException(); + } + /* Compute the winding number and "inside" flag for the new regions */ + reg.windingNumber = regPrev.windingNumber - e.winding; + reg.inside = IsWindingInside(tess, reg.windingNumber); + + /* Check for two outgoing edges with same slope -- process these + * before any intersection tests (see example in __gl_computeInterior). + */ + regPrev.dirty = true; + if (!firstTime && CheckForRightSplice(tess, regPrev)) { + AddWinding(e, ePrev); + DeleteRegion(tess, regPrev); + if (!Mesh.__gl_meshDelete(ePrev)) throw new RuntimeException(); + } + firstTime = false; + regPrev = reg; + ePrev = e; + } + regPrev.dirty = true; + assert (regPrev.windingNumber - e.winding == reg.windingNumber); + + if (cleanUp) { + /* Check for intersections between newly adjacent edges. */ + WalkDirtyRegions(tess, regPrev); + } + } + + + static void CallCombine(GLUtessellatorImpl tess, GLUvertex isect, + Object[] data, float[] weights, boolean needed) { + double[] coords = new double[3]; + + /* Copy coord data in case the callback changes it. */ + coords[0] = isect.coords[0]; + coords[1] = isect.coords[1]; + coords[2] = isect.coords[2]; + + Object[] outData = new Object[1]; + tess.callCombineOrCombineData(coords, data, weights, outData); + isect.data = outData[0]; + if (isect.data == null) { + if (!needed) { + isect.data = data[0]; + } else if (!tess.fatalError) { + /* The only way fatal error is when two edges are found to intersect, + * but the user has not provided the callback necessary to handle + * generated intersection points. + */ + tess.callErrorOrErrorData(GLU_TESS_NEED_COMBINE_CALLBACK); + tess.fatalError = true; + } + } + } + + static void SpliceMergeVertices(GLUtessellatorImpl tess, GLUhalfEdge e1, + GLUhalfEdge e2) +/* + * Two vertices with idential coordinates are combined into one. + * e1.Org is kept, while e2.Org is discarded. + */ { + Object[] data = new Object[4]; + float[] weights = new float[]{0.5f, 0.5f, 0.0f, 0.0f}; + + data[0] = e1.Org.data; + data[1] = e2.Org.data; + CallCombine(tess, e1.Org, data, weights, false); + if (!Mesh.__gl_meshSplice(e1, e2)) throw new RuntimeException(); + } + + static void VertexWeights(GLUvertex isect, GLUvertex org, GLUvertex dst, + float[] weights) +/* + * Find some weights which describe how the intersection vertex is + * a linear combination of "org" and "dest". Each of the two edges + * which generated "isect" is allocated 50% of the weight; each edge + * splits the weight between its org and dst according to the + * relative distance to "isect". + */ { + double t1 = Geom.VertL1dist(org, isect); + double t2 = Geom.VertL1dist(dst, isect); + + weights[0] = (float) (0.5 * t2 / (t1 + t2)); + weights[1] = (float) (0.5 * t1 / (t1 + t2)); + isect.coords[0] += weights[0] * org.coords[0] + weights[1] * dst.coords[0]; + isect.coords[1] += weights[0] * org.coords[1] + weights[1] * dst.coords[1]; + isect.coords[2] += weights[0] * org.coords[2] + weights[1] * dst.coords[2]; + } + + + static void GetIntersectData(GLUtessellatorImpl tess, GLUvertex isect, + GLUvertex orgUp, GLUvertex dstUp, + GLUvertex orgLo, GLUvertex dstLo) +/* + * We've computed a new intersection point, now we need a "data" pointer + * from the user so that we can refer to this new vertex in the + * rendering callbacks. + */ { + Object[] data = new Object[4]; + float[] weights = new float[4]; + float[] weights1 = new float[2]; + float[] weights2 = new float[2]; + + data[0] = orgUp.data; + data[1] = dstUp.data; + data[2] = orgLo.data; + data[3] = dstLo.data; + + isect.coords[0] = isect.coords[1] = isect.coords[2] = 0; + VertexWeights(isect, orgUp, dstUp, weights1); + VertexWeights(isect, orgLo, dstLo, weights2); + System.arraycopy(weights1, 0, weights, 0, 2); + System.arraycopy(weights2, 0, weights, 2, 2); + + CallCombine(tess, isect, data, weights, true); + } + + static boolean CheckForRightSplice(GLUtessellatorImpl tess, ActiveRegion regUp) +/* + * Check the upper and lower edge of "regUp", to make sure that the + * eUp.Org is above eLo, or eLo.Org is below eUp (depending on which + * origin is leftmost). + * + * The main purpose is to splice right-going edges with the same + * dest vertex and nearly identical slopes (ie. we can't distinguish + * the slopes numerically). However the splicing can also help us + * to recover from numerical errors. For example, suppose at one + * point we checked eUp and eLo, and decided that eUp.Org is barely + * above eLo. Then later, we split eLo into two edges (eg. from + * a splice operation like this one). This can change the result of + * our test so that now eUp.Org is incident to eLo, or barely below it. + * We must correct this condition to maintain the dictionary invariants. + * + * One possibility is to check these edges for intersection again + * (ie. CheckForIntersect). This is what we do if possible. However + * CheckForIntersect requires that tess.event lies between eUp and eLo, + * so that it has something to fall back on when the intersection + * calculation gives us an unusable answer. So, for those cases where + * we can't check for intersection, this routine fixes the problem + * by just splicing the offending vertex into the other edge. + * This is a guaranteed solution, no matter how degenerate things get. + * Basically this is a combinatorial solution to a numerical problem. + */ { + ActiveRegion regLo = RegionBelow(regUp); + GLUhalfEdge eUp = regUp.eUp; + GLUhalfEdge eLo = regLo.eUp; + + if (Geom.VertLeq(eUp.Org, eLo.Org)) { + if (Geom.EdgeSign(eLo.Sym.Org, eUp.Org, eLo.Org) > 0) return false; + + /* eUp.Org appears to be below eLo */ + if (!Geom.VertEq(eUp.Org, eLo.Org)) { + /* Splice eUp.Org into eLo */ + if (Mesh.__gl_meshSplitEdge(eLo.Sym) == null) throw new RuntimeException(); + if (!Mesh.__gl_meshSplice(eUp, eLo.Sym.Lnext)) throw new RuntimeException(); + regUp.dirty = regLo.dirty = true; + + } else if (eUp.Org != eLo.Org) { + /* merge the two vertices, discarding eUp.Org */ + tess.pq.pqDelete(eUp.Org.pqHandle); /* __gl_pqSortDelete */ + SpliceMergeVertices(tess, eLo.Sym.Lnext, eUp); + } + } else { + if (Geom.EdgeSign(eUp.Sym.Org, eLo.Org, eUp.Org) < 0) return false; + + /* eLo.Org appears to be above eUp, so splice eLo.Org into eUp */ + RegionAbove(regUp).dirty = regUp.dirty = true; + if (Mesh.__gl_meshSplitEdge(eUp.Sym) == null) throw new RuntimeException(); + if (!Mesh.__gl_meshSplice(eLo.Sym.Lnext, eUp)) throw new RuntimeException(); + } + return true; + } + + static boolean CheckForLeftSplice(GLUtessellatorImpl tess, ActiveRegion regUp) +/* + * Check the upper and lower edge of "regUp", to make sure that the + * eUp.Sym.Org is above eLo, or eLo.Sym.Org is below eUp (depending on which + * destination is rightmost). + * + * Theoretically, this should always be true. However, splitting an edge + * into two pieces can change the results of previous tests. For example, + * suppose at one point we checked eUp and eLo, and decided that eUp.Sym.Org + * is barely above eLo. Then later, we split eLo into two edges (eg. from + * a splice operation like this one). This can change the result of + * the test so that now eUp.Sym.Org is incident to eLo, or barely below it. + * We must correct this condition to maintain the dictionary invariants + * (otherwise new edges might get inserted in the wrong place in the + * dictionary, and bad stuff will happen). + * + * We fix the problem by just splicing the offending vertex into the + * other edge. + */ { + ActiveRegion regLo = RegionBelow(regUp); + GLUhalfEdge eUp = regUp.eUp; + GLUhalfEdge eLo = regLo.eUp; + GLUhalfEdge e; + + assert (!Geom.VertEq(eUp.Sym.Org, eLo.Sym.Org)); + + if (Geom.VertLeq(eUp.Sym.Org, eLo.Sym.Org)) { + if (Geom.EdgeSign(eUp.Sym.Org, eLo.Sym.Org, eUp.Org) < 0) return false; + + /* eLo.Sym.Org is above eUp, so splice eLo.Sym.Org into eUp */ + RegionAbove(regUp).dirty = regUp.dirty = true; + e = Mesh.__gl_meshSplitEdge(eUp); + if (e == null) throw new RuntimeException(); + if (!Mesh.__gl_meshSplice(eLo.Sym, e)) throw new RuntimeException(); + e.Lface.inside = regUp.inside; + } else { + if (Geom.EdgeSign(eLo.Sym.Org, eUp.Sym.Org, eLo.Org) > 0) return false; + + /* eUp.Sym.Org is below eLo, so splice eUp.Sym.Org into eLo */ + regUp.dirty = regLo.dirty = true; + e = Mesh.__gl_meshSplitEdge(eLo); + if (e == null) throw new RuntimeException(); + if (!Mesh.__gl_meshSplice(eUp.Lnext, eLo.Sym)) throw new RuntimeException(); + e.Sym.Lface.inside = regUp.inside; + } + return true; + } + + + static boolean CheckForIntersect(GLUtessellatorImpl tess, ActiveRegion regUp) +/* + * Check the upper and lower edges of the given region to see if + * they intersect. If so, create the intersection and add it + * to the data structures. + * + * Returns true if adding the new intersection resulted in a recursive + * call to AddRightEdges(); in this case all "dirty" regions have been + * checked for intersections, and possibly regUp has been deleted. + */ { + ActiveRegion regLo = RegionBelow(regUp); + GLUhalfEdge eUp = regUp.eUp; + GLUhalfEdge eLo = regLo.eUp; + GLUvertex orgUp = eUp.Org; + GLUvertex orgLo = eLo.Org; + GLUvertex dstUp = eUp.Sym.Org; + GLUvertex dstLo = eLo.Sym.Org; + double tMinUp, tMaxLo; + GLUvertex isect = new GLUvertex(); + GLUvertex orgMin; + GLUhalfEdge e; + + assert (!Geom.VertEq(dstLo, dstUp)); + assert (Geom.EdgeSign(dstUp, tess.event, orgUp) <= 0); + assert (Geom.EdgeSign(dstLo, tess.event, orgLo) >= 0); + assert (orgUp != tess.event && orgLo != tess.event); + assert (!regUp.fixUpperEdge && !regLo.fixUpperEdge); + + if (orgUp == orgLo) return false; /* right endpoints are the same */ + + tMinUp = Math.min(orgUp.t, dstUp.t); + tMaxLo = Math.max(orgLo.t, dstLo.t); + if (tMinUp > tMaxLo) return false; /* t ranges do not overlap */ + + if (Geom.VertLeq(orgUp, orgLo)) { + if (Geom.EdgeSign(dstLo, orgUp, orgLo) > 0) return false; + } else { + if (Geom.EdgeSign(dstUp, orgLo, orgUp) < 0) return false; + } + + /* At this point the edges intersect, at least marginally */ + DebugEvent(tess); + + Geom.EdgeIntersect(dstUp, orgUp, dstLo, orgLo, isect); + /* The following properties are guaranteed: */ + assert (Math.min(orgUp.t, dstUp.t) <= isect.t); + assert (isect.t <= Math.max(orgLo.t, dstLo.t)); + assert (Math.min(dstLo.s, dstUp.s) <= isect.s); + assert (isect.s <= Math.max(orgLo.s, orgUp.s)); + + if (Geom.VertLeq(isect, tess.event)) { + /* The intersection point lies slightly to the left of the sweep line, + * so move it until it''s slightly to the right of the sweep line. + * (If we had perfect numerical precision, this would never happen + * in the first place). The easiest and safest thing to do is + * replace the intersection by tess.event. + */ + isect.s = tess.event.s; + isect.t = tess.event.t; + } + /* Similarly, if the computed intersection lies to the right of the + * rightmost origin (which should rarely happen), it can cause + * unbelievable inefficiency on sufficiently degenerate inputs. + * (If you have the test program, try running test54.d with the + * "X zoom" option turned on). + */ + orgMin = Geom.VertLeq(orgUp, orgLo) ? orgUp : orgLo; + if (Geom.VertLeq(orgMin, isect)) { + isect.s = orgMin.s; + isect.t = orgMin.t; + } + + if (Geom.VertEq(isect, orgUp) || Geom.VertEq(isect, orgLo)) { + /* Easy case -- intersection at one of the right endpoints */ + CheckForRightSplice(tess, regUp); + return false; + } + + if ((!Geom.VertEq(dstUp, tess.event) + && Geom.EdgeSign(dstUp, tess.event, isect) >= 0) + || (!Geom.VertEq(dstLo, tess.event) + && Geom.EdgeSign(dstLo, tess.event, isect) <= 0)) { + /* Very unusual -- the new upper or lower edge would pass on the + * wrong side of the sweep event, or through it. This can happen + * due to very small numerical errors in the intersection calculation. + */ + if (dstLo == tess.event) { + /* Splice dstLo into eUp, and process the new region(s) */ + if (Mesh.__gl_meshSplitEdge(eUp.Sym) == null) throw new RuntimeException(); + if (!Mesh.__gl_meshSplice(eLo.Sym, eUp)) throw new RuntimeException(); + regUp = TopLeftRegion(regUp); + if (regUp == null) throw new RuntimeException(); + eUp = RegionBelow(regUp).eUp; + FinishLeftRegions(tess, RegionBelow(regUp), regLo); + AddRightEdges(tess, regUp, eUp.Sym.Lnext, eUp, eUp, true); + return true; + } + if (dstUp == tess.event) { + /* Splice dstUp into eLo, and process the new region(s) */ + if (Mesh.__gl_meshSplitEdge(eLo.Sym) == null) throw new RuntimeException(); + if (!Mesh.__gl_meshSplice(eUp.Lnext, eLo.Sym.Lnext)) throw new RuntimeException(); + regLo = regUp; + regUp = TopRightRegion(regUp); + e = RegionBelow(regUp).eUp.Sym.Onext; + regLo.eUp = eLo.Sym.Lnext; + eLo = FinishLeftRegions(tess, regLo, null); + AddRightEdges(tess, regUp, eLo.Onext, eUp.Sym.Onext, e, true); + return true; + } + /* Special case: called from ConnectRightVertex. If either + * edge passes on the wrong side of tess.event, split it + * (and wait for ConnectRightVertex to splice it appropriately). + */ + if (Geom.EdgeSign(dstUp, tess.event, isect) >= 0) { + RegionAbove(regUp).dirty = regUp.dirty = true; + if (Mesh.__gl_meshSplitEdge(eUp.Sym) == null) throw new RuntimeException(); + eUp.Org.s = tess.event.s; + eUp.Org.t = tess.event.t; + } + if (Geom.EdgeSign(dstLo, tess.event, isect) <= 0) { + regUp.dirty = regLo.dirty = true; + if (Mesh.__gl_meshSplitEdge(eLo.Sym) == null) throw new RuntimeException(); + eLo.Org.s = tess.event.s; + eLo.Org.t = tess.event.t; + } + /* leave the rest for ConnectRightVertex */ + return false; + } + + /* General case -- split both edges, splice into new vertex. + * When we do the splice operation, the order of the arguments is + * arbitrary as far as correctness goes. However, when the operation + * creates a new face, the work done is proportional to the size of + * the new face. We expect the faces in the processed part of + * the mesh (ie. eUp.Lface) to be smaller than the faces in the + * unprocessed original contours (which will be eLo.Sym.Lnext.Lface). + */ + if (Mesh.__gl_meshSplitEdge(eUp.Sym) == null) throw new RuntimeException(); + if (Mesh.__gl_meshSplitEdge(eLo.Sym) == null) throw new RuntimeException(); + if (!Mesh.__gl_meshSplice(eLo.Sym.Lnext, eUp)) throw new RuntimeException(); + eUp.Org.s = isect.s; + eUp.Org.t = isect.t; + eUp.Org.pqHandle = tess.pq.pqInsert(eUp.Org); /* __gl_pqSortInsert */ + if (eUp.Org.pqHandle == Long.MAX_VALUE) { + tess.pq.pqDeletePriorityQ(); /* __gl_pqSortDeletePriorityQ */ + tess.pq = null; + throw new RuntimeException(); + } + GetIntersectData(tess, eUp.Org, orgUp, dstUp, orgLo, dstLo); + RegionAbove(regUp).dirty = regUp.dirty = regLo.dirty = true; + return false; + } + + static void WalkDirtyRegions(GLUtessellatorImpl tess, ActiveRegion regUp) +/* + * When the upper or lower edge of any region changes, the region is + * marked "dirty". This routine walks through all the dirty regions + * and makes sure that the dictionary invariants are satisfied + * (see the comments at the beginning of this file). Of course + * new dirty regions can be created as we make changes to restore + * the invariants. + */ { + ActiveRegion regLo = RegionBelow(regUp); + GLUhalfEdge eUp, eLo; + + for (; ;) { + /* Find the lowest dirty region (we walk from the bottom up). */ + while (regLo.dirty) { + regUp = regLo; + regLo = RegionBelow(regLo); + } + if (!regUp.dirty) { + regLo = regUp; + regUp = RegionAbove(regUp); + if (regUp == null || !regUp.dirty) { + /* We've walked all the dirty regions */ + return; + } + } + regUp.dirty = false; + eUp = regUp.eUp; + eLo = regLo.eUp; + + if (eUp.Sym.Org != eLo.Sym.Org) { + /* Check that the edge ordering is obeyed at the Dst vertices. */ + if (CheckForLeftSplice(tess, regUp)) { + + /* If the upper or lower edge was marked fixUpperEdge, then + * we no longer need it (since these edges are needed only for + * vertices which otherwise have no right-going edges). + */ + if (regLo.fixUpperEdge) { + DeleteRegion(tess, regLo); + if (!Mesh.__gl_meshDelete(eLo)) throw new RuntimeException(); + regLo = RegionBelow(regUp); + eLo = regLo.eUp; + } else if (regUp.fixUpperEdge) { + DeleteRegion(tess, regUp); + if (!Mesh.__gl_meshDelete(eUp)) throw new RuntimeException(); + regUp = RegionAbove(regLo); + eUp = regUp.eUp; + } + } + } + if (eUp.Org != eLo.Org) { + if (eUp.Sym.Org != eLo.Sym.Org + && !regUp.fixUpperEdge && !regLo.fixUpperEdge + && (eUp.Sym.Org == tess.event || eLo.Sym.Org == tess.event)) { + /* When all else fails in CheckForIntersect(), it uses tess.event + * as the intersection location. To make this possible, it requires + * that tess.event lie between the upper and lower edges, and also + * that neither of these is marked fixUpperEdge (since in the worst + * case it might splice one of these edges into tess.event, and + * violate the invariant that fixable edges are the only right-going + * edge from their associated vertex). + */ + if (CheckForIntersect(tess, regUp)) { + /* WalkDirtyRegions() was called recursively; we're done */ + return; + } + } else { + /* Even though we can't use CheckForIntersect(), the Org vertices + * may violate the dictionary edge ordering. Check and correct this. + */ + CheckForRightSplice(tess, regUp); + } + } + if (eUp.Org == eLo.Org && eUp.Sym.Org == eLo.Sym.Org) { + /* A degenerate loop consisting of only two edges -- delete it. */ + AddWinding(eLo, eUp); + DeleteRegion(tess, regUp); + if (!Mesh.__gl_meshDelete(eUp)) throw new RuntimeException(); + regUp = RegionAbove(regLo); + } + } + } + + + static void ConnectRightVertex(GLUtessellatorImpl tess, ActiveRegion regUp, + GLUhalfEdge eBottomLeft) +/* + * Purpose: connect a "right" vertex vEvent (one where all edges go left) + * to the unprocessed portion of the mesh. Since there are no right-going + * edges, two regions (one above vEvent and one below) are being merged + * into one. "regUp" is the upper of these two regions. + * + * There are two reasons for doing this (adding a right-going edge): + * - if the two regions being merged are "inside", we must add an edge + * to keep them separated (the combined region would not be monotone). + * - in any case, we must leave some record of vEvent in the dictionary, + * so that we can merge vEvent with features that we have not seen yet. + * For example, maybe there is a vertical edge which passes just to + * the right of vEvent; we would like to splice vEvent into this edge. + * + * However, we don't want to connect vEvent to just any vertex. We don''t + * want the new edge to cross any other edges; otherwise we will create + * intersection vertices even when the input data had no self-intersections. + * (This is a bad thing; if the user's input data has no intersections, + * we don't want to generate any false intersections ourselves.) + * + * Our eventual goal is to connect vEvent to the leftmost unprocessed + * vertex of the combined region (the union of regUp and regLo). + * But because of unseen vertices with all right-going edges, and also + * new vertices which may be created by edge intersections, we don''t + * know where that leftmost unprocessed vertex is. In the meantime, we + * connect vEvent to the closest vertex of either chain, and mark the region + * as "fixUpperEdge". This flag says to delete and reconnect this edge + * to the next processed vertex on the boundary of the combined region. + * Quite possibly the vertex we connected to will turn out to be the + * closest one, in which case we won''t need to make any changes. + */ { + GLUhalfEdge eNew; + GLUhalfEdge eTopLeft = eBottomLeft.Onext; + ActiveRegion regLo = RegionBelow(regUp); + GLUhalfEdge eUp = regUp.eUp; + GLUhalfEdge eLo = regLo.eUp; + boolean degenerate = false; + + if (eUp.Sym.Org != eLo.Sym.Org) { + CheckForIntersect(tess, regUp); + } + + /* Possible new degeneracies: upper or lower edge of regUp may pass + * through vEvent, or may coincide with new intersection vertex + */ + if (Geom.VertEq(eUp.Org, tess.event)) { + if (!Mesh.__gl_meshSplice(eTopLeft.Sym.Lnext, eUp)) throw new RuntimeException(); + regUp = TopLeftRegion(regUp); + if (regUp == null) throw new RuntimeException(); + eTopLeft = RegionBelow(regUp).eUp; + FinishLeftRegions(tess, RegionBelow(regUp), regLo); + degenerate = true; + } + if (Geom.VertEq(eLo.Org, tess.event)) { + if (!Mesh.__gl_meshSplice(eBottomLeft, eLo.Sym.Lnext)) throw new RuntimeException(); + eBottomLeft = FinishLeftRegions(tess, regLo, null); + degenerate = true; + } + if (degenerate) { + AddRightEdges(tess, regUp, eBottomLeft.Onext, eTopLeft, eTopLeft, true); + return; + } + + /* Non-degenerate situation -- need to add a temporary, fixable edge. + * Connect to the closer of eLo.Org, eUp.Org. + */ + if (Geom.VertLeq(eLo.Org, eUp.Org)) { + eNew = eLo.Sym.Lnext; + } else { + eNew = eUp; + } + eNew = Mesh.__gl_meshConnect(eBottomLeft.Onext.Sym, eNew); + if (eNew == null) throw new RuntimeException(); + + /* Prevent cleanup, otherwise eNew might disappear before we've even + * had a chance to mark it as a temporary edge. + */ + AddRightEdges(tess, regUp, eNew, eNew.Onext, eNew.Onext, false); + eNew.Sym.activeRegion.fixUpperEdge = true; + WalkDirtyRegions(tess, regUp); + } + +/* Because vertices at exactly the same location are merged together + * before we process the sweep event, some degenerate cases can't occur. + * However if someone eventually makes the modifications required to + * merge features which are close together, the cases below marked + * TOLERANCE_NONZERO will be useful. They were debugged before the + * code to merge identical vertices in the main loop was added. + */ + private static final boolean TOLERANCE_NONZERO = false; + + static void ConnectLeftDegenerate(GLUtessellatorImpl tess, + ActiveRegion regUp, GLUvertex vEvent) +/* + * The event vertex lies exacty on an already-processed edge or vertex. + * Adding the new vertex involves splicing it into the already-processed + * part of the mesh. + */ { + GLUhalfEdge e, eTopLeft, eTopRight, eLast; + ActiveRegion reg; + + e = regUp.eUp; + if (Geom.VertEq(e.Org, vEvent)) { + /* e.Org is an unprocessed vertex - just combine them, and wait + * for e.Org to be pulled from the queue + */ + assert (TOLERANCE_NONZERO); + SpliceMergeVertices(tess, e, vEvent.anEdge); + return; + } + + if (!Geom.VertEq(e.Sym.Org, vEvent)) { + /* General case -- splice vEvent into edge e which passes through it */ + if (Mesh.__gl_meshSplitEdge(e.Sym) == null) throw new RuntimeException(); + if (regUp.fixUpperEdge) { + /* This edge was fixable -- delete unused portion of original edge */ + if (!Mesh.__gl_meshDelete(e.Onext)) throw new RuntimeException(); + regUp.fixUpperEdge = false; + } + if (!Mesh.__gl_meshSplice(vEvent.anEdge, e)) throw new RuntimeException(); + SweepEvent(tess, vEvent); /* recurse */ + return; + } + + /* vEvent coincides with e.Sym.Org, which has already been processed. + * Splice in the additional right-going edges. + */ + assert (TOLERANCE_NONZERO); + regUp = TopRightRegion(regUp); + reg = RegionBelow(regUp); + eTopRight = reg.eUp.Sym; + eTopLeft = eLast = eTopRight.Onext; + if (reg.fixUpperEdge) { + /* Here e.Sym.Org has only a single fixable edge going right. + * We can delete it since now we have some real right-going edges. + */ + assert (eTopLeft != eTopRight); /* there are some left edges too */ + DeleteRegion(tess, reg); + if (!Mesh.__gl_meshDelete(eTopRight)) throw new RuntimeException(); + eTopRight = eTopLeft.Sym.Lnext; + } + if (!Mesh.__gl_meshSplice(vEvent.anEdge, eTopRight)) throw new RuntimeException(); + if (!Geom.EdgeGoesLeft(eTopLeft)) { + /* e.Sym.Org had no left-going edges -- indicate this to AddRightEdges() */ + eTopLeft = null; + } + AddRightEdges(tess, regUp, eTopRight.Onext, eLast, eTopLeft, true); + } + + + static void ConnectLeftVertex(GLUtessellatorImpl tess, GLUvertex vEvent) +/* + * Purpose: connect a "left" vertex (one where both edges go right) + * to the processed portion of the mesh. Let R be the active region + * containing vEvent, and let U and L be the upper and lower edge + * chains of R. There are two possibilities: + * + * - the normal case: split R into two regions, by connecting vEvent to + * the rightmost vertex of U or L lying to the left of the sweep line + * + * - the degenerate case: if vEvent is close enough to U or L, we + * merge vEvent into that edge chain. The subcases are: + * - merging with the rightmost vertex of U or L + * - merging with the active edge of U or L + * - merging with an already-processed portion of U or L + */ { + ActiveRegion regUp, regLo, reg; + GLUhalfEdge eUp, eLo, eNew; + ActiveRegion tmp = new ActiveRegion(); + + /* assert ( vEvent.anEdge.Onext.Onext == vEvent.anEdge ); */ + + /* Get a pointer to the active region containing vEvent */ + tmp.eUp = vEvent.anEdge.Sym; + /* __GL_DICTLISTKEY */ /* __gl_dictListSearch */ + regUp = (ActiveRegion) Dict.dictKey(Dict.dictSearch(tess.dict, tmp)); + regLo = RegionBelow(regUp); + eUp = regUp.eUp; + eLo = regLo.eUp; + + /* Try merging with U or L first */ + if (Geom.EdgeSign(eUp.Sym.Org, vEvent, eUp.Org) == 0) { + ConnectLeftDegenerate(tess, regUp, vEvent); + return; + } + + /* Connect vEvent to rightmost processed vertex of either chain. + * e.Sym.Org is the vertex that we will connect to vEvent. + */ + reg = Geom.VertLeq(eLo.Sym.Org, eUp.Sym.Org) ? regUp : regLo; + + if (regUp.inside || reg.fixUpperEdge) { + if (reg == regUp) { + eNew = Mesh.__gl_meshConnect(vEvent.anEdge.Sym, eUp.Lnext); + if (eNew == null) throw new RuntimeException(); + } else { + GLUhalfEdge tempHalfEdge = Mesh.__gl_meshConnect(eLo.Sym.Onext.Sym, vEvent.anEdge); + if (tempHalfEdge == null) throw new RuntimeException(); + + eNew = tempHalfEdge.Sym; + } + if (reg.fixUpperEdge) { + if (!FixUpperEdge(reg, eNew)) throw new RuntimeException(); + } else { + ComputeWinding(tess, AddRegionBelow(tess, regUp, eNew)); + } + SweepEvent(tess, vEvent); + } else { + /* The new vertex is in a region which does not belong to the polygon. + * We don''t need to connect this vertex to the rest of the mesh. + */ + AddRightEdges(tess, regUp, vEvent.anEdge, vEvent.anEdge, null, true); + } + } + + + static void SweepEvent(GLUtessellatorImpl tess, GLUvertex vEvent) +/* + * Does everything necessary when the sweep line crosses a vertex. + * Updates the mesh and the edge dictionary. + */ { + ActiveRegion regUp, reg; + GLUhalfEdge e, eTopLeft, eBottomLeft; + + tess.event = vEvent; /* for access in EdgeLeq() */ + DebugEvent(tess); + + /* Check if this vertex is the right endpoint of an edge that is + * already in the dictionary. In this case we don't need to waste + * time searching for the location to insert new edges. + */ + e = vEvent.anEdge; + while (e.activeRegion == null) { + e = e.Onext; + if (e == vEvent.anEdge) { + /* All edges go right -- not incident to any processed edges */ + ConnectLeftVertex(tess, vEvent); + return; + } + } + + /* Processing consists of two phases: first we "finish" all the + * active regions where both the upper and lower edges terminate + * at vEvent (ie. vEvent is closing off these regions). + * We mark these faces "inside" or "outside" the polygon according + * to their winding number, and delete the edges from the dictionary. + * This takes care of all the left-going edges from vEvent. + */ + regUp = TopLeftRegion(e.activeRegion); + if (regUp == null) throw new RuntimeException(); + reg = RegionBelow(regUp); + eTopLeft = reg.eUp; + eBottomLeft = FinishLeftRegions(tess, reg, null); + + /* Next we process all the right-going edges from vEvent. This + * involves adding the edges to the dictionary, and creating the + * associated "active regions" which record information about the + * regions between adjacent dictionary edges. + */ + if (eBottomLeft.Onext == eTopLeft) { + /* No right-going edges -- add a temporary "fixable" edge */ + ConnectRightVertex(tess, regUp, eBottomLeft); + } else { + AddRightEdges(tess, regUp, eBottomLeft.Onext, eTopLeft, eTopLeft, true); + } + } + + +/* Make the sentinel coordinates big enough that they will never be + * merged with real input features. (Even with the largest possible + * input contour and the maximum tolerance of 1.0, no merging will be + * done with coordinates larger than 3 * GLU_TESS_MAX_COORD). + */ + private static final double SENTINEL_COORD = (4.0 * GLU_TESS_MAX_COORD); + + static void AddSentinel(GLUtessellatorImpl tess, double t) +/* + * We add two sentinel edges above and below all other edges, + * to avoid special cases at the top and bottom. + */ { + GLUhalfEdge e; + ActiveRegion reg = new ActiveRegion(); + if (reg == null) throw new RuntimeException(); + + e = Mesh.__gl_meshMakeEdge(tess.mesh); + if (e == null) throw new RuntimeException(); + + e.Org.s = SENTINEL_COORD; + e.Org.t = t; + e.Sym.Org.s = -SENTINEL_COORD; + e.Sym.Org.t = t; + tess.event = e.Sym.Org; /* initialize it */ + + reg.eUp = e; + reg.windingNumber = 0; + reg.inside = false; + reg.fixUpperEdge = false; + reg.sentinel = true; + reg.dirty = false; + reg.nodeUp = Dict.dictInsert(tess.dict, reg); /* __gl_dictListInsertBefore */ + if (reg.nodeUp == null) throw new RuntimeException(); + } + + + static void InitEdgeDict(final GLUtessellatorImpl tess) +/* + * We maintain an ordering of edge intersections with the sweep line. + * This order is maintained in a dynamic dictionary. + */ { + /* __gl_dictListNewDict */ + tess.dict = Dict.dictNewDict(tess, new Dict.DictLeq() { + public boolean leq(Object frame, Object key1, Object key2) { + return EdgeLeq(tess, (ActiveRegion) key1, (ActiveRegion) key2); + } + }); + if (tess.dict == null) throw new RuntimeException(); + + AddSentinel(tess, -SENTINEL_COORD); + AddSentinel(tess, SENTINEL_COORD); + } + + + static void DoneEdgeDict(GLUtessellatorImpl tess) { + ActiveRegion reg; + int fixedEdges = 0; + + /* __GL_DICTLISTKEY */ /* __GL_DICTLISTMIN */ + while ((reg = (ActiveRegion) Dict.dictKey(Dict.dictMin(tess.dict))) != null) { + /* + * At the end of all processing, the dictionary should contain + * only the two sentinel edges, plus at most one "fixable" edge + * created by ConnectRightVertex(). + */ + if (!reg.sentinel) { + assert (reg.fixUpperEdge); + assert (++fixedEdges == 1); + } + assert (reg.windingNumber == 0); + DeleteRegion(tess, reg); +/* __gl_meshDelete( reg.eUp );*/ + } + Dict.dictDeleteDict(tess.dict); /* __gl_dictListDeleteDict */ + } + + + static void RemoveDegenerateEdges(GLUtessellatorImpl tess) +/* + * Remove zero-length edges, and contours with fewer than 3 vertices. + */ { + GLUhalfEdge e, eNext, eLnext; + GLUhalfEdge eHead = tess.mesh.eHead; + + /*LINTED*/ + for (e = eHead.next; e != eHead; e = eNext) { + eNext = e.next; + eLnext = e.Lnext; + + if (Geom.VertEq(e.Org, e.Sym.Org) && e.Lnext.Lnext != e) { + /* Zero-length edge, contour has at least 3 edges */ + + SpliceMergeVertices(tess, eLnext, e); /* deletes e.Org */ + if (!Mesh.__gl_meshDelete(e)) throw new RuntimeException(); /* e is a self-loop */ + e = eLnext; + eLnext = e.Lnext; + } + if (eLnext.Lnext == e) { + /* Degenerate contour (one or two edges) */ + + if (eLnext != e) { + if (eLnext == eNext || eLnext == eNext.Sym) { + eNext = eNext.next; + } + if (!Mesh.__gl_meshDelete(eLnext)) throw new RuntimeException(); + } + if (e == eNext || e == eNext.Sym) { + eNext = eNext.next; + } + if (!Mesh.__gl_meshDelete(e)) throw new RuntimeException(); + } + } + } + + static boolean InitPriorityQ(GLUtessellatorImpl tess) +/* + * Insert all vertices into the priority queue which determines the + * order in which vertices cross the sweep line. + */ { + PriorityQ pq; + GLUvertex v, vHead; + + /* __gl_pqSortNewPriorityQ */ + pq = tess.pq = PriorityQ.pqNewPriorityQ(new PriorityQ.Leq() { + public boolean leq(Object key1, Object key2) { + return Geom.VertLeq(((GLUvertex) key1), (GLUvertex) key2); + } + }); + if (pq == null) return false; + + vHead = tess.mesh.vHead; + for (v = vHead.next; v != vHead; v = v.next) { + v.pqHandle = pq.pqInsert(v); /* __gl_pqSortInsert */ + if (v.pqHandle == Long.MAX_VALUE) break; + } + if (v != vHead || !pq.pqInit()) { /* __gl_pqSortInit */ + tess.pq.pqDeletePriorityQ(); /* __gl_pqSortDeletePriorityQ */ + tess.pq = null; + return false; + } + + return true; + } + + + static void DonePriorityQ(GLUtessellatorImpl tess) { + tess.pq.pqDeletePriorityQ(); /* __gl_pqSortDeletePriorityQ */ + } + + + static boolean RemoveDegenerateFaces(GLUmesh mesh) +/* + * Delete any degenerate faces with only two edges. WalkDirtyRegions() + * will catch almost all of these, but it won't catch degenerate faces + * produced by splice operations on already-processed edges. + * The two places this can happen are in FinishLeftRegions(), when + * we splice in a "temporary" edge produced by ConnectRightVertex(), + * and in CheckForLeftSplice(), where we splice already-processed + * edges to ensure that our dictionary invariants are not violated + * by numerical errors. + * + * In both these cases it is *very* dangerous to delete the offending + * edge at the time, since one of the routines further up the stack + * will sometimes be keeping a pointer to that edge. + */ { + GLUface f, fNext; + GLUhalfEdge e; + + /*LINTED*/ + for (f = mesh.fHead.next; f != mesh.fHead; f = fNext) { + fNext = f.next; + e = f.anEdge; + assert (e.Lnext != e); + + if (e.Lnext.Lnext == e) { + /* A face with only two edges */ + AddWinding(e.Onext, e); + if (!Mesh.__gl_meshDelete(e)) return false; + } + } + return true; + } + + public static boolean __gl_computeInterior(GLUtessellatorImpl tess) +/* + * __gl_computeInterior( tess ) computes the planar arrangement specified + * by the given contours, and further subdivides this arrangement + * into regions. Each region is marked "inside" if it belongs + * to the polygon, according to the rule given by tess.windingRule. + * Each interior region is guaranteed be monotone. + */ { + GLUvertex v, vNext; + + tess.fatalError = false; + + /* Each vertex defines an event for our sweep line. Start by inserting + * all the vertices in a priority queue. Events are processed in + * lexicographic order, ie. + * + * e1 < e2 iff e1.x < e2.x || (e1.x == e2.x && e1.y < e2.y) + */ + RemoveDegenerateEdges(tess); + if (!InitPriorityQ(tess)) return false; /* if error */ + InitEdgeDict(tess); + + /* __gl_pqSortExtractMin */ + while ((v = (GLUvertex) tess.pq.pqExtractMin()) != null) { + for (; ;) { + vNext = (GLUvertex) tess.pq.pqMinimum(); /* __gl_pqSortMinimum */ + if (vNext == null || !Geom.VertEq(vNext, v)) break; + + /* Merge together all vertices at exactly the same location. + * This is more efficient than processing them one at a time, + * simplifies the code (see ConnectLeftDegenerate), and is also + * important for correct handling of certain degenerate cases. + * For example, suppose there are two identical edges A and B + * that belong to different contours (so without this code they would + * be processed by separate sweep events). Suppose another edge C + * crosses A and B from above. When A is processed, we split it + * at its intersection point with C. However this also splits C, + * so when we insert B we may compute a slightly different + * intersection point. This might leave two edges with a small + * gap between them. This kind of error is especially obvious + * when using boundary extraction (GLU_TESS_BOUNDARY_ONLY). + */ + vNext = (GLUvertex) tess.pq.pqExtractMin(); /* __gl_pqSortExtractMin*/ + SpliceMergeVertices(tess, v.anEdge, vNext.anEdge); + } + SweepEvent(tess, v); + } + + /* Set tess.event for debugging purposes */ + /* __GL_DICTLISTKEY */ /* __GL_DICTLISTMIN */ + tess.event = ((ActiveRegion) Dict.dictKey(Dict.dictMin(tess.dict))).eUp.Org; + DebugEvent(tess); + DoneEdgeDict(tess); + DonePriorityQ(tess); + + if (!RemoveDegenerateFaces(tess.mesh)) return false; + Mesh.__gl_meshCheckMesh(tess.mesh); + + return true; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/TessMono.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/TessMono.java new file mode 100644 index 0000000..62aa72a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/TessMono.java @@ -0,0 +1,241 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* +* Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. +* All rights reserved. +*/ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** NOTE: The Original Code (as defined below) has been licensed to Sun +** Microsystems, Inc. ("Sun") under the SGI Free Software License B +** (Version 1.1), shown above ("SGI License"). Pursuant to Section +** 3.2(3) of the SGI License, Sun is distributing the Covered Code to +** you under an alternative license ("Alternative License"). This +** Alternative License includes all of the provisions of the SGI License +** except that Section 2.2 and 11 are omitted. Any differences between +** the Alternative License and the SGI License are offered solely by Sun +** and not by SGI. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +** Author: Eric Veach, July 1994 +** Java Port: Pepijn Van Eeckhoudt, July 2003 +** Java Port: Nathan Parker Burg, August 2003 +*/ +package org.lwjgl.util.glu.tessellation; + +class TessMono { +/* __gl_meshTessellateMonoRegion( face ) tessellates a monotone region + * (what else would it do??) The region must consist of a single + * loop of half-edges (see mesh.h) oriented CCW. "Monotone" in this + * case means that any vertical line intersects the interior of the + * region in a single interval. + * + * Tessellation consists of adding interior edges (actually pairs of + * half-edges), to split the region into non-overlapping triangles. + * + * The basic idea is explained in Preparata and Shamos (which I don''t + * have handy right now), although their implementation is more + * complicated than this one. The are two edge chains, an upper chain + * and a lower chain. We process all vertices from both chains in order, + * from right to left. + * + * The algorithm ensures that the following invariant holds after each + * vertex is processed: the untessellated region consists of two + * chains, where one chain (say the upper) is a single edge, and + * the other chain is concave. The left vertex of the single edge + * is always to the left of all vertices in the concave chain. + * + * Each step consists of adding the rightmost unprocessed vertex to one + * of the two chains, and forming a fan of triangles from the rightmost + * of two chain endpoints. Determining whether we can add each triangle + * to the fan is a simple orientation test. By making the fan as large + * as possible, we restore the invariant (check it yourself). + */ + static boolean __gl_meshTessellateMonoRegion(GLUface face) { + GLUhalfEdge up, lo; + + /* All edges are oriented CCW around the boundary of the region. + * First, find the half-edge whose origin vertex is rightmost. + * Since the sweep goes from left to right, face->anEdge should + * be close to the edge we want. + */ + up = face.anEdge; + assert (up.Lnext != up && up.Lnext.Lnext != up); + + for (; Geom.VertLeq(up.Sym.Org, up.Org); up = up.Onext.Sym) + ; + for (; Geom.VertLeq(up.Org, up.Sym.Org); up = up.Lnext) + ; + lo = up.Onext.Sym; + + while (up.Lnext != lo) { + if (Geom.VertLeq(up.Sym.Org, lo.Org)) { + /* up.Sym.Org is on the left. It is safe to form triangles from lo.Org. + * The EdgeGoesLeft test guarantees progress even when some triangles + * are CW, given that the upper and lower chains are truly monotone. + */ + while (lo.Lnext != up && (Geom.EdgeGoesLeft(lo.Lnext) + || Geom.EdgeSign(lo.Org, lo.Sym.Org, lo.Lnext.Sym.Org) <= 0)) { + GLUhalfEdge tempHalfEdge = Mesh.__gl_meshConnect(lo.Lnext, lo); + if (tempHalfEdge == null) return false; + lo = tempHalfEdge.Sym; + } + lo = lo.Onext.Sym; + } else { + /* lo.Org is on the left. We can make CCW triangles from up.Sym.Org. */ + while (lo.Lnext != up && (Geom.EdgeGoesRight(up.Onext.Sym) + || Geom.EdgeSign(up.Sym.Org, up.Org, up.Onext.Sym.Org) >= 0)) { + GLUhalfEdge tempHalfEdge = Mesh.__gl_meshConnect(up, up.Onext.Sym); + if (tempHalfEdge == null) return false; + up = tempHalfEdge.Sym; + } + up = up.Lnext; + } + } + + /* Now lo.Org == up.Sym.Org == the leftmost vertex. The remaining region + * can be tessellated in a fan from this leftmost vertex. + */ + assert (lo.Lnext != up); + while (lo.Lnext.Lnext != up) { + GLUhalfEdge tempHalfEdge = Mesh.__gl_meshConnect(lo.Lnext, lo); + if (tempHalfEdge == null) return false; + lo = tempHalfEdge.Sym; + } + + return true; + } + + +/* __gl_meshTessellateInterior( mesh ) tessellates each region of + * the mesh which is marked "inside" the polygon. Each such region + * must be monotone. + */ + public static boolean __gl_meshTessellateInterior(GLUmesh mesh) { + GLUface f, next; + + /*LINTED*/ + for (f = mesh.fHead.next; f != mesh.fHead; f = next) { + /* Make sure we don''t try to tessellate the new triangles. */ + next = f.next; + if (f.inside) { + if (!__gl_meshTessellateMonoRegion(f)) return false; + } + } + + return true; + } + + +/* __gl_meshDiscardExterior( mesh ) zaps (ie. sets to NULL) all faces + * which are not marked "inside" the polygon. Since further mesh operations + * on NULL faces are not allowed, the main purpose is to clean up the + * mesh so that exterior loops are not represented in the data structure. + */ + public static void __gl_meshDiscardExterior(GLUmesh mesh) { + GLUface f, next; + + /*LINTED*/ + for (f = mesh.fHead.next; f != mesh.fHead; f = next) { + /* Since f will be destroyed, save its next pointer. */ + next = f.next; + if (!f.inside) { + Mesh.__gl_meshZapFace(f); + } + } + } + +// private static final int MARKED_FOR_DELETION = 0x7fffffff; + +/* __gl_meshSetWindingNumber( mesh, value, keepOnlyBoundary ) resets the + * winding numbers on all edges so that regions marked "inside" the + * polygon have a winding number of "value", and regions outside + * have a winding number of 0. + * + * If keepOnlyBoundary is TRUE, it also deletes all edges which do not + * separate an interior region from an exterior one. + */ + public static boolean __gl_meshSetWindingNumber(GLUmesh mesh, int value, boolean keepOnlyBoundary) { + GLUhalfEdge e, eNext; + + for (e = mesh.eHead.next; e != mesh.eHead; e = eNext) { + eNext = e.next; + if (e.Sym.Lface.inside != e.Lface.inside) { + + /* This is a boundary edge (one side is interior, one is exterior). */ + e.winding = (e.Lface.inside) ? value : -value; + } else { + + /* Both regions are interior, or both are exterior. */ + if (!keepOnlyBoundary) { + e.winding = 0; + } else { + if (!Mesh.__gl_meshDelete(e)) return false; + } + } + } + return true; + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/TessState.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/TessState.java new file mode 100644 index 0000000..02e1ef7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/glu/tessellation/TessState.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* +* Portions Copyright (C) 2003-2006 Sun Microsystems, Inc. +* All rights reserved. +*/ + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** NOTE: The Original Code (as defined below) has been licensed to Sun +** Microsystems, Inc. ("Sun") under the SGI Free Software License B +** (Version 1.1), shown above ("SGI License"). Pursuant to Section +** 3.2(3) of the SGI License, Sun is distributing the Covered Code to +** you under an alternative license ("Alternative License"). This +** Alternative License includes all of the provisions of the SGI License +** except that Section 2.2 and 11 are omitted. Any differences between +** the Alternative License and the SGI License are offered solely by Sun +** and not by SGI. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: The application programming interfaces +** established by SGI in conjunction with the Original Code are The +** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released +** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version +** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X +** Window System(R) (Version 1.3), released October 19, 1998. This software +** was created using the OpenGL(R) version 1.2.1 Sample Implementation +** published by SGI, but has not been independently verified as being +** compliant with the OpenGL(R) version 1.2.1 Specification. +** +** Author: Eric Veach, July 1994 +** Java Port: Pepijn Van Eeckhoudt, July 2003 +** Java Port: Nathan Parker Burg, August 2003 +*/ +package org.lwjgl.util.glu.tessellation; + +class TessState { + public static final int T_DORMANT = 0; + public static final int T_IN_POLYGON = 1; + public static final int T_IN_CONTOUR = 2; +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/input/ControllerAdapter.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/input/ControllerAdapter.java new file mode 100644 index 0000000..8c1226a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/input/ControllerAdapter.java @@ -0,0 +1,340 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.input; + +import org.lwjgl.input.Controller; + +/** + * Adapter for the Controller interface. It can be used as placeholder + * Controller, which doesn't do anything (eg if Controllers.create() fails and + * you don't want to take care of that). + * + * @author Onyx, Aho and all the other aliases... + */ +public class ControllerAdapter implements Controller { + + /** + * Get the name assigned to this controller. + * + * @return The name assigned to this controller + */ + public String getName() { + return "Dummy Controller"; + } + + /** + * Get the index of this controller in the collection + * + * @return The index of this controller in the collection + */ + public int getIndex() { + return 0; //-1 maybe? + } + + /** + * Retrieve the number of buttons available on this controller + * + * @return The number of butotns available on this controller + */ + public int getButtonCount() { + return 0; + } + + /** + * Get the name of the specified button. Be warned, often this is as + * exciting as "Button X" + * + * @param index The index of the button whose name should be retrieved + * @return The name of the button requested + */ + public String getButtonName(int index) { + return "button n/a"; + } + + /** + * Check if a button is currently pressed + * + * @param index The button to check + * @return True if the button is currently pressed + */ + public boolean isButtonPressed(int index) { + return false; + } + + /** + * Poll the controller for new data. This will also update events + */ + public void poll() { + } + + /** + * Get the X-Axis value of the POV on this controller + * + * @return The X-Axis value of the POV on this controller + */ + public float getPovX() { + return 0f; + } + + /** + * Get the Y-Axis value of the POV on this controller + * + * @return The Y-Axis value of the POV on this controller + */ + public float getPovY() { + return 0f; + } + + /** + * Get the dead zone for a specified axis + * + * @param index The index of the axis for which to retrieve the dead zone + * @return The dead zone for the specified axis + */ + public float getDeadZone(int index) { + return 0f; + } + + /** + * Set the dead zone for the specified axis + * + * @param index The index of hte axis for which to set the dead zone + * @param zone The dead zone to use for the specified axis + */ + public void setDeadZone(int index, float zone) { + } + + /** + * Retrieve the number of axes available on this controller. + * + * @return The number of axes available on this controller. + */ + public int getAxisCount() { + return 0; + } + + /** + * Get the name that's given to the specified axis + * + * @param index The index of the axis whose name should be retrieved + * @return The name of the specified axis. + */ + public String getAxisName(int index) { + return "axis n/a"; + } + + /** + * Retrieve the value thats currently available on a specified axis. The + * value will always be between 1.0 and -1.0 and will calibrate as values + * are passed read. It may be useful to get the player to wiggle the + * joystick from side to side to get the calibration right. + * + * @param index The index of axis to be read + * @return The value from the specified axis. + */ + public float getAxisValue(int index) { + return 0f; + } + + /** + * Get the value from the X axis if there is one. If no X axis is defined a + * zero value will be returned. + * + * @return The value from the X axis + */ + public float getXAxisValue() { + return 0f; + } + + /** + * Get the dead zone for the X axis. + * + * @return The dead zone for the X axis + */ + public float getXAxisDeadZone() { + return 0f; + } + + /** + * Set the dead zone for the X axis + * + * @param zone The dead zone to use for the X axis + */ + public void setXAxisDeadZone(float zone) { + } + + /** + * Get the value from the Y axis if there is one. If no Y axis is defined a + * zero value will be returned. + * + * @return The value from the Y axis + */ + public float getYAxisValue() { + return 0f; + } + + /** + * Get the dead zone for the Y axis. + * + * @return The dead zone for the Y axis + */ + public float getYAxisDeadZone() { + return 0f; + } + + /** + * Set the dead zone for the Y axis + * + * @param zone The dead zone to use for the Y axis + */ + public void setYAxisDeadZone(float zone) { + } + + /** + * Get the value from the Z axis if there is one. If no Z axis is defined a + * zero value will be returned. + * + * @return The value from the Z axis + */ + public float getZAxisValue() { + return 0f; + } + + /** + * Get the dead zone for the Z axis. + * + * @return The dead zone for the Z axis + */ + public float getZAxisDeadZone() { + return 0f; + } + + /** + * Set the dead zone for the Z axis + * + * @param zone The dead zone to use for the Z axis + */ + public void setZAxisDeadZone(float zone) { + } + + /** + * Get the value from the RX axis if there is one. If no RX axis is defined + * a zero value will be returned. + * + * @return The value from the RX axis + */ + public float getRXAxisValue() { + return 0f; + } + + /** + * Get the dead zone for the RX axis. + * + * @return The dead zone for the RX axis + */ + public float getRXAxisDeadZone() { + return 0f; + } + + /** + * Set the dead zone for the RX axis + * + * @param zone The dead zone to use for the RX axis + */ + public void setRXAxisDeadZone(float zone) { + } + + /** + * Get the value from the RY axis if there is one. If no RY axis is defined + * a zero value will be returned. + * + * @return The value from the RY axis + */ + public float getRYAxisValue() { + return 0f; + } + + /** + * Get the dead zone for the RY axis. + * + * @return The dead zone for the RY axis + */ + public float getRYAxisDeadZone() { + return 0f; + } + + /** + * Set the dead zone for the RY axis + * + * @param zone The dead zone to use for the RY axis + */ + public void setRYAxisDeadZone(float zone) { + } + + /** + * Get the value from the RZ axis if there is one. If no RZ axis is defined + * a zero value will be returned. + * + * @return The value from the RZ axis + */ + public float getRZAxisValue() { + return 0f; + } + + /** + * Get the dead zone for the RZ axis. + * + * @return The dead zone for the RZ axis + */ + public float getRZAxisDeadZone() { + return 0f; + } + + /** + * Set the dead zone for the RZ axis + * + * @param zone The dead zone to use for the RZ axis + */ + public void setRZAxisDeadZone(float zone) { + } + + public int getRumblerCount() { + return 0; + } + + public String getRumblerName(int index) { + return "rumber n/a"; + } + + public void setRumblerStrength(int index, float strength) { + } +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/jinput/KeyMap.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/jinput/KeyMap.java new file mode 100644 index 0000000..2143e4a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/jinput/KeyMap.java @@ -0,0 +1,293 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.jinput; + +import org.lwjgl.input.Keyboard; +import net.java.games.input.Component; + +/** + * @author elias + */ +final class KeyMap { + public static Component.Identifier.Key map(int lwjgl_key_code) { + switch (lwjgl_key_code) { + case Keyboard.KEY_ESCAPE: + return Component.Identifier.Key.ESCAPE; + case Keyboard.KEY_1: + return Component.Identifier.Key._1; + case Keyboard.KEY_2: + return Component.Identifier.Key._2; + case Keyboard.KEY_3: + return Component.Identifier.Key._3; + case Keyboard.KEY_4: + return Component.Identifier.Key._4; + case Keyboard.KEY_5: + return Component.Identifier.Key._5; + case Keyboard.KEY_6: + return Component.Identifier.Key._6; + case Keyboard.KEY_7: + return Component.Identifier.Key._7; + case Keyboard.KEY_8: + return Component.Identifier.Key._8; + case Keyboard.KEY_9: + return Component.Identifier.Key._9; + case Keyboard.KEY_0: + return Component.Identifier.Key._0; + case Keyboard.KEY_MINUS: + return Component.Identifier.Key.MINUS; + case Keyboard.KEY_EQUALS: + return Component.Identifier.Key.EQUALS; + case Keyboard.KEY_BACK: + return Component.Identifier.Key.BACK; + case Keyboard.KEY_TAB: + return Component.Identifier.Key.TAB; + case Keyboard.KEY_Q: + return Component.Identifier.Key.Q; + case Keyboard.KEY_W: + return Component.Identifier.Key.W; + case Keyboard.KEY_E: + return Component.Identifier.Key.E; + case Keyboard.KEY_R: + return Component.Identifier.Key.R; + case Keyboard.KEY_T: + return Component.Identifier.Key.T; + case Keyboard.KEY_Y: + return Component.Identifier.Key.Y; + case Keyboard.KEY_U: + return Component.Identifier.Key.U; + case Keyboard.KEY_I: + return Component.Identifier.Key.I; + case Keyboard.KEY_O: + return Component.Identifier.Key.O; + case Keyboard.KEY_P: + return Component.Identifier.Key.P; + case Keyboard.KEY_LBRACKET: + return Component.Identifier.Key.LBRACKET; + case Keyboard.KEY_RBRACKET: + return Component.Identifier.Key.RBRACKET; + case Keyboard.KEY_RETURN: + return Component.Identifier.Key.RETURN; + case Keyboard.KEY_LCONTROL: + return Component.Identifier.Key.LCONTROL; + case Keyboard.KEY_A: + return Component.Identifier.Key.A; + case Keyboard.KEY_S: + return Component.Identifier.Key.S; + case Keyboard.KEY_D: + return Component.Identifier.Key.D; + case Keyboard.KEY_F: + return Component.Identifier.Key.F; + case Keyboard.KEY_G: + return Component.Identifier.Key.G; + case Keyboard.KEY_H: + return Component.Identifier.Key.H; + case Keyboard.KEY_J: + return Component.Identifier.Key.J; + case Keyboard.KEY_K: + return Component.Identifier.Key.K; + case Keyboard.KEY_L: + return Component.Identifier.Key.L; + case Keyboard.KEY_SEMICOLON: + return Component.Identifier.Key.SEMICOLON; + case Keyboard.KEY_APOSTROPHE: + return Component.Identifier.Key.APOSTROPHE; + case Keyboard.KEY_GRAVE: + return Component.Identifier.Key.GRAVE; + case Keyboard.KEY_LSHIFT: + return Component.Identifier.Key.LSHIFT; + case Keyboard.KEY_BACKSLASH: + return Component.Identifier.Key.BACKSLASH; + case Keyboard.KEY_Z: + return Component.Identifier.Key.Z; + case Keyboard.KEY_X: + return Component.Identifier.Key.X; + case Keyboard.KEY_C: + return Component.Identifier.Key.C; + case Keyboard.KEY_V: + return Component.Identifier.Key.V; + case Keyboard.KEY_B: + return Component.Identifier.Key.B; + case Keyboard.KEY_N: + return Component.Identifier.Key.N; + case Keyboard.KEY_M: + return Component.Identifier.Key.M; + case Keyboard.KEY_COMMA: + return Component.Identifier.Key.COMMA; + case Keyboard.KEY_PERIOD: + return Component.Identifier.Key.PERIOD; + case Keyboard.KEY_SLASH: + return Component.Identifier.Key.SLASH; + case Keyboard.KEY_RSHIFT: + return Component.Identifier.Key.RSHIFT; + case Keyboard.KEY_MULTIPLY: + return Component.Identifier.Key.MULTIPLY; + case Keyboard.KEY_LMENU: + return Component.Identifier.Key.LALT; + case Keyboard.KEY_SPACE: + return Component.Identifier.Key.SPACE; + case Keyboard.KEY_CAPITAL: + return Component.Identifier.Key.CAPITAL; + case Keyboard.KEY_F1: + return Component.Identifier.Key.F1; + case Keyboard.KEY_F2: + return Component.Identifier.Key.F2; + case Keyboard.KEY_F3: + return Component.Identifier.Key.F3; + case Keyboard.KEY_F4: + return Component.Identifier.Key.F4; + case Keyboard.KEY_F5: + return Component.Identifier.Key.F5; + case Keyboard.KEY_F6: + return Component.Identifier.Key.F6; + case Keyboard.KEY_F7: + return Component.Identifier.Key.F7; + case Keyboard.KEY_F8: + return Component.Identifier.Key.F8; + case Keyboard.KEY_F9: + return Component.Identifier.Key.F9; + case Keyboard.KEY_F10: + return Component.Identifier.Key.F10; + case Keyboard.KEY_NUMLOCK: + return Component.Identifier.Key.NUMLOCK; + case Keyboard.KEY_SCROLL: + return Component.Identifier.Key.SCROLL; + case Keyboard.KEY_NUMPAD7: + return Component.Identifier.Key.NUMPAD7; + case Keyboard.KEY_NUMPAD8: + return Component.Identifier.Key.NUMPAD8; + case Keyboard.KEY_NUMPAD9: + return Component.Identifier.Key.NUMPAD9; + case Keyboard.KEY_SUBTRACT: + return Component.Identifier.Key.SUBTRACT; + case Keyboard.KEY_NUMPAD4: + return Component.Identifier.Key.NUMPAD4; + case Keyboard.KEY_NUMPAD5: + return Component.Identifier.Key.NUMPAD5; + case Keyboard.KEY_NUMPAD6: + return Component.Identifier.Key.NUMPAD6; + case Keyboard.KEY_ADD: + return Component.Identifier.Key.ADD; + case Keyboard.KEY_NUMPAD1: + return Component.Identifier.Key.NUMPAD1; + case Keyboard.KEY_NUMPAD2: + return Component.Identifier.Key.NUMPAD2; + case Keyboard.KEY_NUMPAD3: + return Component.Identifier.Key.NUMPAD3; + case Keyboard.KEY_NUMPAD0: + return Component.Identifier.Key.NUMPAD0; + case Keyboard.KEY_DECIMAL: + return Component.Identifier.Key.DECIMAL; + case Keyboard.KEY_F11: + return Component.Identifier.Key.F11; + case Keyboard.KEY_F12: + return Component.Identifier.Key.F12; + case Keyboard.KEY_F13: + return Component.Identifier.Key.F13; + case Keyboard.KEY_F14: + return Component.Identifier.Key.F14; + case Keyboard.KEY_F15: + return Component.Identifier.Key.F15; + case Keyboard.KEY_KANA: + return Component.Identifier.Key.KANA; + case Keyboard.KEY_CONVERT: + return Component.Identifier.Key.CONVERT; + case Keyboard.KEY_NOCONVERT: + return Component.Identifier.Key.NOCONVERT; + case Keyboard.KEY_YEN: + return Component.Identifier.Key.YEN; + case Keyboard.KEY_NUMPADEQUALS: + return Component.Identifier.Key.NUMPADEQUAL; + case Keyboard.KEY_CIRCUMFLEX: + return Component.Identifier.Key.CIRCUMFLEX; + case Keyboard.KEY_AT: + return Component.Identifier.Key.AT; + case Keyboard.KEY_COLON: + return Component.Identifier.Key.COLON; + case Keyboard.KEY_UNDERLINE: + return Component.Identifier.Key.UNDERLINE; + case Keyboard.KEY_KANJI: + return Component.Identifier.Key.KANJI; + case Keyboard.KEY_STOP: + return Component.Identifier.Key.STOP; + case Keyboard.KEY_AX: + return Component.Identifier.Key.AX; + case Keyboard.KEY_UNLABELED: + return Component.Identifier.Key.UNLABELED; + case Keyboard.KEY_NUMPADENTER: + return Component.Identifier.Key.NUMPADENTER; + case Keyboard.KEY_RCONTROL: + return Component.Identifier.Key.RCONTROL; + case Keyboard.KEY_NUMPADCOMMA: + return Component.Identifier.Key.NUMPADCOMMA; + case Keyboard.KEY_DIVIDE: + return Component.Identifier.Key.DIVIDE; + case Keyboard.KEY_SYSRQ: + return Component.Identifier.Key.SYSRQ; + case Keyboard.KEY_RMENU: + return Component.Identifier.Key.RALT; + case Keyboard.KEY_PAUSE: + return Component.Identifier.Key.PAUSE; + case Keyboard.KEY_HOME: + return Component.Identifier.Key.HOME; + case Keyboard.KEY_UP: + return Component.Identifier.Key.UP; + case Keyboard.KEY_PRIOR: + return Component.Identifier.Key.PAGEUP; + case Keyboard.KEY_LEFT: + return Component.Identifier.Key.LEFT; + case Keyboard.KEY_RIGHT: + return Component.Identifier.Key.RIGHT; + case Keyboard.KEY_END: + return Component.Identifier.Key.END; + case Keyboard.KEY_DOWN: + return Component.Identifier.Key.DOWN; + case Keyboard.KEY_NEXT: + return Component.Identifier.Key.PAGEDOWN; + case Keyboard.KEY_INSERT: + return Component.Identifier.Key.INSERT; + case Keyboard.KEY_DELETE: + return Component.Identifier.Key.DELETE; + case Keyboard.KEY_LMETA: + return Component.Identifier.Key.LWIN; + case Keyboard.KEY_RMETA: + return Component.Identifier.Key.RWIN; + case Keyboard.KEY_APPS: + return Component.Identifier.Key.APPS; + case Keyboard.KEY_POWER: + return Component.Identifier.Key.POWER; + case Keyboard.KEY_SLEEP: + return Component.Identifier.Key.SLEEP; + default: + return Component.Identifier.Key.UNKNOWN; + } + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/jinput/LWJGLEnvironmentPlugin.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/jinput/LWJGLEnvironmentPlugin.java new file mode 100644 index 0000000..6f4b5f3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/jinput/LWJGLEnvironmentPlugin.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.jinput; + +import net.java.games.input.Controller; +import net.java.games.input.ControllerEnvironment; +import net.java.games.util.plugins.Plugin; + +/** + * @author elias + */ +public class LWJGLEnvironmentPlugin extends ControllerEnvironment implements Plugin { + private final Controller[] controllers; + + public LWJGLEnvironmentPlugin() { + this.controllers = new Controller[]{new LWJGLKeyboard(), new LWJGLMouse()}; + } + + public Controller[] getControllers() { + return controllers; + } + + public boolean isSupported() { + return true; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/jinput/LWJGLKeyboard.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/jinput/LWJGLKeyboard.java new file mode 100644 index 0000000..5a0671d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/jinput/LWJGLKeyboard.java @@ -0,0 +1,130 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.jinput; + +import net.java.games.input.AbstractComponent; +import net.java.games.input.Keyboard; +import net.java.games.input.Component; +import net.java.games.input.Controller; +import net.java.games.input.Rumbler; +import net.java.games.input.Event; +import java.util.List; +import java.util.ArrayList; + +import java.io.IOException; + +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; + +/** + * @author elias + */ +final class LWJGLKeyboard extends Keyboard { + LWJGLKeyboard() { + super("LWJGLKeyboard", createComponents(), new Controller[]{}, new Rumbler[]{}); + } + + private static Component[] createComponents() { + List components = new ArrayList(); + Field[] vkey_fields = org.lwjgl.input.Keyboard.class.getFields(); + for ( Field vkey_field : vkey_fields ) { + try { + if (Modifier.isStatic(vkey_field.getModifiers()) && vkey_field.getType() == int.class && + vkey_field.getName().startsWith("KEY_")) { + int vkey_code = vkey_field.getInt(null); + Component.Identifier.Key key_id = KeyMap.map(vkey_code); + if (key_id != Component.Identifier.Key.UNKNOWN) + components.add(new Key(key_id, vkey_code)); + } + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } + return components.toArray(new Component[components.size()]); + } + + public synchronized void pollDevice() throws IOException { + if (!org.lwjgl.input.Keyboard.isCreated()) + return; + org.lwjgl.input.Keyboard.poll(); + for ( Component component : getComponents() ) { + Key key = (Key)component; + key.update(); + } + } + + protected synchronized boolean getNextDeviceEvent(Event event) throws IOException { + if (!org.lwjgl.input.Keyboard.isCreated()) + return false; + if (!org.lwjgl.input.Keyboard.next()) + return false; + int lwjgl_key = org.lwjgl.input.Keyboard.getEventKey(); + if (lwjgl_key == org.lwjgl.input.Keyboard.KEY_NONE) + return false; + Component.Identifier.Key key_id = KeyMap.map(lwjgl_key); + if (key_id == null) + return false; + Component key = getComponent(key_id); + if (key == null) + return false; + float value = org.lwjgl.input.Keyboard.getEventKeyState() ? 1 : 0; + event.set(key, value, org.lwjgl.input.Keyboard.getEventNanoseconds()); + return true; + } + + + private static final class Key extends AbstractComponent { + private final int lwjgl_key; + private float value; + + Key(Component.Identifier.Key key_id, int lwjgl_key) { + super(key_id.getName(), key_id); + this.lwjgl_key = lwjgl_key; + } + + public void update() { + this.value = org.lwjgl.input.Keyboard.isKeyDown(lwjgl_key) ? 1 : 0; + } + + protected float poll() { + return value; + } + + public boolean isRelative() { + return false; + } + + public boolean isAnalog() { + return false; + } + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/jinput/LWJGLMouse.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/jinput/LWJGLMouse.java new file mode 100644 index 0000000..8516c14 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/jinput/LWJGLMouse.java @@ -0,0 +1,191 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.jinput; + +import java.io.IOException; + +import net.java.games.input.AbstractComponent; +import net.java.games.input.Component; +import net.java.games.input.Controller; +import net.java.games.input.Event; +import net.java.games.input.Mouse; +import net.java.games.input.Rumbler; + +/** + * @author elias + */ +final class LWJGLMouse extends Mouse { + private static final int EVENT_X = 1; + private static final int EVENT_Y = 2; + private static final int EVENT_WHEEL = 3; + private static final int EVENT_BUTTON = 4; + private static final int EVENT_DONE = 5; + + private int event_state = EVENT_DONE; + + LWJGLMouse() { + super("LWJGLMouse", createComponents(), new Controller[]{}, new Rumbler[]{}); + } + + private static Component[] createComponents() { + return new Component[]{new Axis(Component.Identifier.Axis.X), + new Axis(Component.Identifier.Axis.Y), + new Axis(Component.Identifier.Axis.Z), + new Button(Component.Identifier.Button.LEFT), + new Button(Component.Identifier.Button.MIDDLE), + new Button(Component.Identifier.Button.RIGHT)}; + } + + public synchronized void pollDevice() throws IOException { + if (!org.lwjgl.input.Mouse.isCreated()) + return; + org.lwjgl.input.Mouse.poll(); + for (int i = 0; i < 3; i++) + setButtonState(i); + } + + private Button map(int lwjgl_button) { + switch (lwjgl_button) { + case 0: + return (Button)getLeft(); + case 1: + return (Button)getRight(); + case 2: + return (Button)getMiddle(); + default: + return null; + } + } + + private void setButtonState(int lwjgl_button) { + Button button = map(lwjgl_button); + if (button != null) + button.setValue(org.lwjgl.input.Mouse.isButtonDown(lwjgl_button) ? 1 : 0); + } + + protected synchronized boolean getNextDeviceEvent(Event event) throws IOException { + if (!org.lwjgl.input.Mouse.isCreated()) + return false; + while (true) { + long nanos = org.lwjgl.input.Mouse.getEventNanoseconds(); + switch (event_state) { + case EVENT_X: + event_state = EVENT_Y; + int dx = org.lwjgl.input.Mouse.getEventDX(); + if (dx != 0) { + event.set(getX(), dx, nanos); + return true; + } + break; + case EVENT_Y: + event_state = EVENT_WHEEL; + /* We must negate the y coord since lwjgl uses the + * OpenGL coordinate system + */ + int dy = -org.lwjgl.input.Mouse.getEventDY(); + if (dy != 0) { + event.set(getY(), dy, nanos); + return true; + } + break; + case EVENT_WHEEL: + event_state = EVENT_BUTTON; + int dwheel = org.lwjgl.input.Mouse.getEventDWheel(); + if (dwheel != 0) { + event.set(getWheel(), dwheel, nanos); + return true; + } + break; + case EVENT_BUTTON: + event_state = EVENT_DONE; + int lwjgl_button = org.lwjgl.input.Mouse.getEventButton(); + if (lwjgl_button != -1) { + Button button = map(lwjgl_button); + if (button != null) { + event.set(button, org.lwjgl.input.Mouse.getEventButtonState() ? 1f : 0f, nanos); + return true; + } + } + break; + case EVENT_DONE: + if (!org.lwjgl.input.Mouse.next()) + return false; + event_state = EVENT_X; + break; + default: + break; + } + } + } + + static final class Axis extends AbstractComponent { + Axis(Component.Identifier.Axis axis_id) { + super(axis_id.getName(), axis_id); + } + + public boolean isRelative() { + return true; + } + + protected float poll() throws IOException { + return 0; + } + + public boolean isAnalog() { + return true; + } + } + + static final class Button extends AbstractComponent { + private float value; + + Button(Component.Identifier.Button button_id) { + super(button_id.getName(), button_id); + } + + void setValue(float value) { + this.value = value; + } + + protected float poll() throws IOException { + return value; + } + + public boolean isRelative() { + return false; + } + + public boolean isAnalog() { + return false; + } + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/CacheLinePad.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/CacheLinePad.java new file mode 100644 index 0000000..6ad2ab0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/CacheLinePad.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.mapped; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * When this annotation is used on a field, automatic cache-line-sized padding + * will be inserted around the field. This is useful in multi-threaded algorithms + * to avoid cache line false sharing. The annotation defaults to padding after + * the field, but can be changed to before or both before and after. It can be + * applied to both mapped object fields and POJO primitive fields. + * + * @author Spasi + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface CacheLinePad { + + /** + * When true, cache-line padding will be inserted before the field. + * + * @return + */ + boolean before() default false; + + /** + * When true, cache-line padding will be inserted after the field. + * + * @return + */ + boolean after() default true; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/CacheLineSize.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/CacheLineSize.java new file mode 100644 index 0000000..fef93f7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/CacheLineSize.java @@ -0,0 +1,141 @@ +package org.lwjgl.util.mapped; + +import org.lwjgl.LWJGLUtil; +import org.lwjgl.MemoryUtil; + +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.nio.IntBuffer; +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutorCompletionService; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + +import static org.lwjgl.util.mapped.MappedHelper.*; + +/** + * This micro-benchmark tries to detect the CPU's cache line size. This is + * done by exploiting cache line false sharing in multi-threaded code: + * When 2 threads simultaneously access the same cache line (and at least + * 1 access is a write), performance drops considerably. We detect this + * performance drop while decreasing the memory padding in every test step. + * + * @author Spasi + */ +final class CacheLineSize { + + private CacheLineSize() { + } + + static int getCacheLineSize() { + final int THREADS = 2; + final int REPEATS = 100000 * THREADS; + final int LOCAL_REPEATS = REPEATS / THREADS; + + // Detection will start from CacheLineMaxSize bytes. + final int MAX_SIZE = LWJGLUtil.getPrivilegedInteger("org.lwjgl.util.mapped.CacheLineMaxSize", 1024) / 4; // in # of integers + // Detection will stop when the execution time increases by more than CacheLineTimeThreshold %. + final double TIME_THRESHOLD = 1.0 + LWJGLUtil.getPrivilegedInteger("org.lwjgl.util.mapped.CacheLineTimeThreshold", 50) / 100.0; + + final ExecutorService executorService = Executors.newFixedThreadPool(THREADS); + final ExecutorCompletionService completionService = new ExecutorCompletionService(executorService); + + try { + // We need to use a NIO buffer in order to guarantee memory alignment. + final IntBuffer memory = getMemory(MAX_SIZE); + + // -- WARMUP -- + + final int WARMUP = 10; + for ( int i = 0; i < WARMUP; i++ ) + doTest(THREADS, LOCAL_REPEATS, 0, memory, completionService); + + // -- CACHE LINE SIZE DETECTION -- + + long totalTime = 0; + int count = 0; + int cacheLineSize = 64; // fallback to the most common size these days + boolean found = false; + for ( int i = MAX_SIZE; i >= 1; i >>= 1 ) { + final long time = doTest(THREADS, LOCAL_REPEATS, i, memory, completionService); + if ( totalTime > 0 ) { // Ignore first run + final long avgTime = totalTime / count; + if ( (double)time / (double)avgTime > TIME_THRESHOLD ) { // Try to detect a noticeable jump in execution time + cacheLineSize = (i << 1) * 4; + found = true; + break; + } + } + totalTime += time; + count++; + } + + if ( LWJGLUtil.DEBUG ) { + if ( found ) + LWJGLUtil.log("Cache line size detected: " + cacheLineSize + " bytes"); + else + LWJGLUtil.log("Failed to detect cache line size, assuming " + cacheLineSize + " bytes"); + } + + return cacheLineSize; + } finally { + executorService.shutdown(); + } + } + + public static void main(String[] args) { + CacheUtil.getCacheLineSize(); + } + + static long memoryLoop(final int index, final int repeats, final IntBuffer memory, final int padding) { + final long address = MemoryUtil.getAddress(memory) + (index * padding * 4); + + final long time = System.nanoTime(); + for ( int i = 0; i < repeats; i++ ) { + // Use volatile access to avoid server VM optimizations. + ivput(ivget(address) + 1, address); + } + + return System.nanoTime() - time; + } + + private static IntBuffer getMemory(final int START_SIZE) { + final int PAGE_SIZE = MappedObjectUnsafe.INSTANCE.pageSize(); + + final ByteBuffer buffer = ByteBuffer.allocateDirect((START_SIZE * 4) + PAGE_SIZE).order(ByteOrder.nativeOrder()); + + // Align to page and, consequently, to cache line. Otherwise results will be inconsistent. + if ( MemoryUtil.getAddress(buffer) % PAGE_SIZE != 0 ) { + // Round up to page boundary + buffer.position(PAGE_SIZE - (int)(MemoryUtil.getAddress(buffer) & (PAGE_SIZE - 1))); + } + + return buffer.asIntBuffer(); + } + + private static long doTest(final int threads, final int repeats, final int padding, final IntBuffer memory, final ExecutorCompletionService completionService) { + for ( int i = 0; i < threads; i++ ) + submitTest(completionService, i, repeats, memory, padding); + return waitForResults(threads, completionService); + } + + private static void submitTest(final ExecutorCompletionService completionService, final int index, final int repeats, final IntBuffer memory, final int padding) { + completionService.submit(new Callable() { + public Long call() throws Exception { + return memoryLoop(index, repeats, memory, padding); + } + }); + } + + private static long waitForResults(final int count, final ExecutorCompletionService completionService) { + try { + long totalTime = 0; + for ( int i = 0; i < count; i++ ) + totalTime += completionService.take().get(); + return totalTime; + } catch (Exception e) { + throw new RuntimeException(e); + } + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/CacheUtil.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/CacheUtil.java new file mode 100644 index 0000000..53ef6da --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/CacheUtil.java @@ -0,0 +1,193 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.mapped; + +import org.lwjgl.LWJGLUtil; +import org.lwjgl.MemoryUtil; +import org.lwjgl.PointerBuffer; + +import java.nio.*; + +/** + * This class provides utility methods for allocating cache-line-aligned + * NIO buffers. The CPU cache line size is detected using a micro-benchmark + * that exploits the performation degredation that occurs when different + * threads write to different locations of the same cache line. The detection + * should be reasonably robust on both the server and client VM, but there + * are a few system properties that can be used to tune it. + * + * @author Spasi + */ +public final class CacheUtil { + + private static final int CACHE_LINE_SIZE; + + static { + final Integer size = LWJGLUtil.getPrivilegedInteger("org.lwjgl.util.mapped.CacheLineSize"); // forces a specific cache line size + + if ( size != null ) { + if ( size < 1 ) + throw new IllegalStateException("Invalid CacheLineSize specified: " + size); + CACHE_LINE_SIZE = size; + } else if ( Runtime.getRuntime().availableProcessors() == 1 ) { // We cannot use false sharing to detect it + /* + Spasi: + + I have implemented a single-threaded benchmark for this, but it requires + lots of memory allocations and could not tune it for both the client and + server VM. It's not a big deal anyway, 64 bytes should be ok for any + single-core CPU. + */ + if ( LWJGLUtil.DEBUG ) + LWJGLUtil.log("Cannot detect cache line size on single-core CPUs, assuming 64 bytes."); + CACHE_LINE_SIZE = 64; + } else + CACHE_LINE_SIZE = CacheLineSize.getCacheLineSize(); + } + + private CacheUtil() { + } + + /** + * Returns the CPU cache line size, in number of bytes. + * + * @return the cache line size + */ + public static int getCacheLineSize() { + return CACHE_LINE_SIZE; + } + + /** + * Construct a direct, native-ordered and cache-line-aligned bytebuffer with the specified size. + * + * @param size The size, in bytes + * + * @return a ByteBuffer + */ + public static ByteBuffer createByteBuffer(int size) { + ByteBuffer buffer = ByteBuffer.allocateDirect(size + CACHE_LINE_SIZE); + + // Align to cache line. + if ( MemoryUtil.getAddress(buffer) % CACHE_LINE_SIZE != 0 ) { + // Round up to cache line boundary + buffer.position(CACHE_LINE_SIZE - (int)(MemoryUtil.getAddress(buffer) & (CACHE_LINE_SIZE - 1))); + } + + buffer.limit(buffer.position() + size); + return buffer.slice().order(ByteOrder.nativeOrder()); + } + + /** + * Construct a direct, native-ordered and cache-line-aligned shortbuffer with the specified number + * of elements. + * + * @param size The size, in shorts + * + * @return a ShortBuffer + */ + public static ShortBuffer createShortBuffer(int size) { + return createByteBuffer(size << 1).asShortBuffer(); + } + + /** + * Construct a direct, native-ordered and cache-line-aligned charbuffer with the specified number + * of elements. + * + * @param size The size, in chars + * + * @return an CharBuffer + */ + public static CharBuffer createCharBuffer(int size) { + return createByteBuffer(size << 1).asCharBuffer(); + } + + /** + * Construct a direct, native-ordered and cache-line-aligned intbuffer with the specified number + * of elements. + * + * @param size The size, in ints + * + * @return an IntBuffer + */ + public static IntBuffer createIntBuffer(int size) { + return createByteBuffer(size << 2).asIntBuffer(); + } + + /** + * Construct a direct, native-ordered and cache-line-aligned longbuffer with the specified number + * of elements. + * + * @param size The size, in longs + * + * @return an LongBuffer + */ + public static LongBuffer createLongBuffer(int size) { + return createByteBuffer(size << 3).asLongBuffer(); + } + + /** + * Construct a direct, native-ordered and cache-line-aligned floatbuffer with the specified number + * of elements. + * + * @param size The size, in floats + * + * @return a FloatBuffer + */ + public static FloatBuffer createFloatBuffer(int size) { + return createByteBuffer(size << 2).asFloatBuffer(); + } + + /** + * Construct a direct, native-ordered and cache-line-aligned doublebuffer with the specified number + * of elements. + * + * @param size The size, in floats + * + * @return a FloatBuffer + */ + public static DoubleBuffer createDoubleBuffer(int size) { + return createByteBuffer(size << 3).asDoubleBuffer(); + } + + /** + * Construct a cache-line-aligned PointerBuffer with the specified number + * of elements. + * + * @param size The size, in memory addresses + * + * @return a PointerBuffer + */ + public static PointerBuffer createPointerBuffer(int size) { + return new PointerBuffer(createByteBuffer(size * PointerBuffer.getPointerSize())); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedField.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedField.java new file mode 100644 index 0000000..f280e88 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedField.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.mapped; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * This annotation can be used on fields of {@link MappedObject} subclasses, + * to manually specify byte offsets and lengths. This is useful when the + * mapped fields require custom alignment. {@link java.nio.ByteBuffer} + * fields are required to have this annotation with a hardcoded byte length. + * + * @author Riven + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface MappedField { + + /** + * Specifies the field byte offset within the mapped object. + * + * @return the field byte offset + */ + long byteOffset() default -1; + + /** + * Specifies the field byte length. Required for {@link java.nio.ByteBuffer} fields. + * + * @return the field byte length + */ + long byteLength() default -1; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedForeach.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedForeach.java new file mode 100644 index 0000000..ed75d3d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedForeach.java @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.mapped; + +import java.util.Iterator; + +/** + * Iterable implementation for {@link MappedObject}. + * + * @author Riven + */ +final class MappedForeach implements Iterable { + + final T mapped; + final int elementCount; + + MappedForeach(T mapped, int elementCount) { + this.mapped = mapped; + this.elementCount = elementCount; + } + + public Iterator iterator() { + return new Iterator() { + + private int index; + + public boolean hasNext() { + return this.index < (MappedForeach.this.elementCount); + } + + public T next() { + mapped.setViewAddress(mapped.getViewAddress(this.index++)); + return mapped; + } + + public void remove() { + throw new UnsupportedOperationException(); + } + }; + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedHelper.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedHelper.java new file mode 100644 index 0000000..9002d89 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedHelper.java @@ -0,0 +1,392 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.mapped; + +import org.lwjgl.LWJGLUtil; +import org.lwjgl.MemoryUtil; + +import java.nio.ByteBuffer; + +import static org.lwjgl.util.mapped.MappedObjectUnsafe.*; + +/** + * [INTERNAL USE ONLY] + *

+ * Helper class used by the bytecode transformer. + * + * @author Riven + */ +public class MappedHelper { + + public static void setup(MappedObject mo, ByteBuffer buffer, int align, int sizeof) { + if ( LWJGLUtil.CHECKS && mo.baseAddress != 0L ) + throw new IllegalStateException("this method should not be called by user-code"); + + if ( LWJGLUtil.CHECKS && !buffer.isDirect() ) + throw new IllegalArgumentException("bytebuffer must be direct"); + mo.preventGC = buffer; + + if ( LWJGLUtil.CHECKS && align <= 0 ) + throw new IllegalArgumentException("invalid alignment"); + + if ( LWJGLUtil.CHECKS && (sizeof <= 0 || sizeof % align != 0) ) + throw new IllegalStateException("sizeof not a multiple of alignment"); + + long addr = MemoryUtil.getAddress(buffer); + if ( LWJGLUtil.CHECKS && addr % align != 0 ) + throw new IllegalStateException("buffer address not aligned on " + align + " bytes"); + + mo.baseAddress = mo.viewAddress = addr; + } + + public static void checkAddress(long viewAddress, MappedObject mapped) { + mapped.checkAddress(viewAddress); + } + + public static void put_views(MappedSet2 set, int view) { + set.view(view); + } + + public static void put_views(MappedSet3 set, int view) { + set.view(view); + } + + public static void put_views(MappedSet4 set, int view) { + set.view(view); + } + + public static void put_view(MappedObject mapped, int view, int sizeof) { + mapped.setViewAddress(mapped.baseAddress + view * sizeof); + } + + public static int get_view(MappedObject mapped, int sizeof) { + return (int)(mapped.viewAddress - mapped.baseAddress) / sizeof; + } + + public static void put_view_shift(MappedObject mapped, int view, int sizeof_shift) { + mapped.setViewAddress(mapped.baseAddress + (view << sizeof_shift)); + } + + public static int get_view_shift(MappedObject mapped, int sizeof_shift) { + return ((int)(mapped.viewAddress - mapped.baseAddress)) >> sizeof_shift; + } + + public static void put_view_next(MappedObject mapped, int sizeof) { + mapped.setViewAddress(mapped.viewAddress + sizeof); + } + + public static MappedObject dup(MappedObject src, MappedObject dst) { + dst.baseAddress = src.baseAddress; + dst.viewAddress = src.viewAddress; + dst.preventGC = src.preventGC; + return dst; + } + + public static MappedObject slice(MappedObject src, MappedObject dst) { + dst.baseAddress = src.viewAddress; // ! + dst.viewAddress = src.viewAddress; + dst.preventGC = src.preventGC; + return dst; + } + + public static void copy(MappedObject src, MappedObject dst, int bytes) { + if ( MappedObject.CHECKS ) { + src.checkRange(bytes); + dst.checkRange(bytes); + } + + INSTANCE.copyMemory(src.viewAddress, dst.viewAddress, bytes); + } + + public static ByteBuffer newBuffer(long address, int capacity) { + return MappedObjectUnsafe.newBuffer(address, capacity); + } + + // ---- primitive fields read/write + + // byte + + public static void bput(byte value, long addr) { + INSTANCE.putByte(addr, value); + } + + public static void bput(MappedObject mapped, byte value, int fieldOffset) { + INSTANCE.putByte(mapped.viewAddress + fieldOffset, value); + } + + public static byte bget(long addr) { + return INSTANCE.getByte(addr); + } + + public static byte bget(MappedObject mapped, int fieldOffset) { + return INSTANCE.getByte(mapped.viewAddress + fieldOffset); + } + + public static void bvput(byte value, long addr) { + INSTANCE.putByteVolatile(null, addr, value); + } + + public static void bvput(MappedObject mapped, byte value, int fieldOffset) { + INSTANCE.putByteVolatile(null, mapped.viewAddress + fieldOffset, value); + } + + public static byte bvget(long addr) { + return INSTANCE.getByteVolatile(null, addr); + } + + public static byte bvget(MappedObject mapped, int fieldOffset) { + return INSTANCE.getByteVolatile(null, mapped.viewAddress + fieldOffset); + } + + // short + + public static void sput(short value, long addr) { + INSTANCE.putShort(addr, value); + } + + public static void sput(MappedObject mapped, short value, int fieldOffset) { + INSTANCE.putShort(mapped.viewAddress + fieldOffset, value); + } + + public static short sget(long addr) { + return INSTANCE.getShort(addr); + } + + public static short sget(MappedObject mapped, int fieldOffset) { + return INSTANCE.getShort(mapped.viewAddress + fieldOffset); + } + + public static void svput(short value, long addr) { + INSTANCE.putShortVolatile(null, addr, value); + } + + public static void svput(MappedObject mapped, short value, int fieldOffset) { + INSTANCE.putShortVolatile(null, mapped.viewAddress + fieldOffset, value); + } + + public static short svget(long addr) { + return INSTANCE.getShortVolatile(null, addr); + } + + public static short svget(MappedObject mapped, int fieldOffset) { + return INSTANCE.getShortVolatile(null, mapped.viewAddress + fieldOffset); + } + + // char + + public static void cput(char value, long addr) { + INSTANCE.putChar(addr, value); + } + + public static void cput(MappedObject mapped, char value, int fieldOffset) { + INSTANCE.putChar(mapped.viewAddress + fieldOffset, value); + } + + public static char cget(long addr) { + return INSTANCE.getChar(addr); + } + + public static char cget(MappedObject mapped, int fieldOffset) { + return INSTANCE.getChar(mapped.viewAddress + fieldOffset); + } + + public static void cvput(char value, long addr) { + INSTANCE.putCharVolatile(null, addr, value); + } + + public static void cvput(MappedObject mapped, char value, int fieldOffset) { + INSTANCE.putCharVolatile(null, mapped.viewAddress + fieldOffset, value); + } + + public static char cvget(long addr) { + return INSTANCE.getCharVolatile(null, addr); + } + + public static char cvget(MappedObject mapped, int fieldOffset) { + return INSTANCE.getCharVolatile(null, mapped.viewAddress + fieldOffset); + } + + // int + + public static void iput(int value, long addr) { + INSTANCE.putInt(addr, value); + } + + public static void iput(MappedObject mapped, int value, int fieldOffset) { + INSTANCE.putInt(mapped.viewAddress + fieldOffset, value); + } + + public static int iget(long address) { + return INSTANCE.getInt(address); + } + + public static int iget(MappedObject mapped, int fieldOffset) { + return INSTANCE.getInt(mapped.viewAddress + fieldOffset); + } + + public static void ivput(int value, long addr) { + INSTANCE.putIntVolatile(null, addr, value); + } + + public static void ivput(MappedObject mapped, int value, int fieldOffset) { + INSTANCE.putIntVolatile(null, mapped.viewAddress + fieldOffset, value); + } + + public static int ivget(long address) { + return INSTANCE.getIntVolatile(null, address); + } + + public static int ivget(MappedObject mapped, int fieldOffset) { + return INSTANCE.getIntVolatile(null, mapped.viewAddress + fieldOffset); + } + + // float + + public static void fput(float value, long addr) { + INSTANCE.putFloat(addr, value); + } + + public static void fput(MappedObject mapped, float value, int fieldOffset) { + INSTANCE.putFloat(mapped.viewAddress + fieldOffset, value); + } + + public static float fget(long addr) { + return INSTANCE.getFloat(addr); + } + + public static float fget(MappedObject mapped, int fieldOffset) { + return INSTANCE.getFloat(mapped.viewAddress + fieldOffset); + } + + public static void fvput(float value, long addr) { + INSTANCE.putFloatVolatile(null, addr, value); + } + + public static void fvput(MappedObject mapped, float value, int fieldOffset) { + INSTANCE.putFloatVolatile(null, mapped.viewAddress + fieldOffset, value); + } + + public static float fvget(long addr) { + return INSTANCE.getFloatVolatile(null, addr); + } + + public static float fvget(MappedObject mapped, int fieldOffset) { + return INSTANCE.getFloatVolatile(null, mapped.viewAddress + fieldOffset); + } + + // long + + public static void jput(long value, long addr) { + INSTANCE.putLong(addr, value); + } + + public static void jput(MappedObject mapped, long value, int fieldOffset) { + INSTANCE.putLong(mapped.viewAddress + fieldOffset, value); + } + + public static long jget(long addr) { + return INSTANCE.getLong(addr); + } + + public static long jget(MappedObject mapped, int fieldOffset) { + return INSTANCE.getLong(mapped.viewAddress + fieldOffset); + } + + public static void jvput(long value, long addr) { + INSTANCE.putLongVolatile(null, addr, value); + } + + public static void jvput(MappedObject mapped, long value, int fieldOffset) { + INSTANCE.putLongVolatile(null, mapped.viewAddress + fieldOffset, value); + } + + public static long jvget(long addr) { + return INSTANCE.getLongVolatile(null, addr); + } + + public static long jvget(MappedObject mapped, int fieldOffset) { + return INSTANCE.getLongVolatile(null, mapped.viewAddress + fieldOffset); + } + + // address + + public static void aput(long value, long addr) { + INSTANCE.putAddress(addr, value); + } + + public static void aput(MappedObject mapped, long value, int fieldOffset) { + INSTANCE.putAddress(mapped.viewAddress + fieldOffset, value); + } + + public static long aget(long addr) { + return INSTANCE.getAddress(addr); + } + + public static long aget(MappedObject mapped, int fieldOffset) { + return INSTANCE.getAddress(mapped.viewAddress + fieldOffset); + } + + // double + + public static void dput(double value, long addr) { + INSTANCE.putDouble(addr, value); + } + + public static void dput(MappedObject mapped, double value, int fieldOffset) { + INSTANCE.putDouble(mapped.viewAddress + fieldOffset, value); + } + + public static double dget(long addr) { + return INSTANCE.getDouble(addr); + } + + public static double dget(MappedObject mapped, int fieldOffset) { + return INSTANCE.getDouble(mapped.viewAddress + fieldOffset); + } + + public static void dvput(double value, long addr) { + INSTANCE.putDoubleVolatile(null, addr, value); + } + + public static void dvput(MappedObject mapped, double value, int fieldOffset) { + INSTANCE.putDoubleVolatile(null, mapped.viewAddress + fieldOffset, value); + } + + public static double dvget(long addr) { + return INSTANCE.getDoubleVolatile(null, addr); + } + + public static double dvget(MappedObject mapped, int fieldOffset) { + return INSTANCE.getDoubleVolatile(null, mapped.viewAddress + fieldOffset); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedObject.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedObject.java new file mode 100644 index 0000000..2d5a17c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedObject.java @@ -0,0 +1,287 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.mapped; + +import org.lwjgl.LWJGLUtil; +import org.lwjgl.MemoryUtil; + +import java.nio.BufferOverflowException; +import java.nio.ByteBuffer; + +/** + * Base superclass of all mapped objects. Classes that require + * data mapping should extend this class and registered with + * {@link MappedObjectTransformer#register(Class)}. + *

+ * Subclasses may only specify the default constructor. Any code + * inside that constructor is optional, but will not run when the + * view is instantiated, see {@link #runViewConstructor()}. + *

+ * Bounds checking may be enabled through a JVM system property: org.lwjgl.util.mapped.Checks=true + * + * @author Riven + */ +public abstract class MappedObject { + + static final boolean CHECKS = LWJGLUtil.getPrivilegedBoolean("org.lwjgl.util.mapped.Checks"); + + protected MappedObject() { + // + } + + /** The mapped object base memory address, in bytes. Read-only. */ + public long baseAddress; + + /** The mapped object view memory address, in bytes. Read-only. */ + public long viewAddress; + + /** The mapped buffer. */ + ByteBuffer preventGC; + + /** + * Holds the value of sizeof of the sub-type of this MappedObject
+ *
+ * The behavior of this (transformed) method does not follow the normal Java behavior.
+ * Vec2.SIZEOF will yield 8 (2 floats)
+ * Vec3.SIZEOF will yield 12 (3 floats)
+ * This (required) notation might cause compiler warnings, which can be suppressed with @SuppressWarnings("static-access").
+ * Using Java 5.0's static-import on this method will break functionality. + */ + public static int SIZEOF = -1; // any method that calls these field will have its call-site modified ('final' per subtype) + + /** + * The mapped object view offset, in elements. Read/write. + * This is a virtual field, used as a convenient getter/setter for {@see viewAddress}. + */ + public int view; + + protected final long getViewAddress(final int view) { + // No call-site modification for this, we override in every subclass instead, + // so that we can use it in MappedForeach. + throw new InternalError("type not registered"); + } + + public final void setViewAddress(final long address) { + if ( CHECKS ) + checkAddress(address); + this.viewAddress = address; + } + + final void checkAddress(final long address) { + final long base = MemoryUtil.getAddress0(preventGC); + final int offset = (int)(address - base); + if ( address < base || preventGC.capacity() < (offset + getSizeof()) ) + throw new IndexOutOfBoundsException(Integer.toString(offset / getSizeof())); + } + + final void checkRange(final int bytes) { + if ( bytes < 0 ) + throw new IllegalArgumentException(); + + if ( preventGC.capacity() < (viewAddress - MemoryUtil.getAddress0(preventGC) + bytes) ) + throw new BufferOverflowException(); + } + + /** The mapped object memory alignment, in bytes. Read-only. */ + /** + * Returns the mapped object memory alignment, in bytes. + * + * @return the memory alignment + */ + public final int getAlign() { + // No call-site modification for this, we override in every subclass instead. + throw new InternalError("type not registered"); + } + + /** + * Returns the mapped object memory sizeof, in bytes. + * + * @return the sizeof value + */ + public final int getSizeof() { + // No call-site modification for this, we override in every subclass instead. + throw new InternalError("type not registered"); + } + + /** + * Returns the number of mapped objects that fit in the mapped buffer. + * + * @return the mapped object capacity + */ + public final int capacity() { + // No call-site modification for this, we override in every subclass instead. + throw new InternalError("type not registered"); + } + + /** + * Creates a MappedObject instance, mapping the memory region of the specified direct ByteBuffer. + *

+ * The behavior of this (transformed) method does not follow the normal Java behavior.
+ * Vec2.map(buffer) will return a mapped Vec2 instance.
+ * Vec3.map(buffer) will return a mapped Vec3 instance.
+ * This (required) notation might cause compiler warnings, which can be suppressed with @SuppressWarnings("static-access").
+ * Using Java 5.0's static-import on this method will break functionality. + */ + @SuppressWarnings("unused") + public static T map(ByteBuffer bb) { + // any method that calls this method will have its call-site modified + throw new InternalError("type not registered"); + } + + /** + * Creates a MappedObject instance, mapping the memory region specified. This is useful for mapping + * arbitrary regions in memory, e.g. OpenCL CLMem objects, without creating a ByteBuffer first. + *

+ * The behavior of this (transformed) method does not follow the normal Java behavior.
+ * Vec2.map(buffer) will return a mapped Vec2 instance.
+ * Vec3.map(buffer) will return a mapped Vec3 instance.
+ * This (required) notation might cause compiler warnings, which can be suppressed with @SuppressWarnings("static-access").
+ * Using Java 5.0's static-import on this method will break functionality. + */ + @SuppressWarnings("unused") + public static T map(long address, int capacity) { + // any method that calls this method will have its call-site modified + throw new InternalError("type not registered"); + } + + /** + * Creates a MappedObject instance, mapping the memory region of an allocated direct ByteBuffer with a capacity of elementCount*SIZEOF + *

+ * The behavior of this (transformed) method does not follow the normal Java behavior.
+ * Vec2.malloc(int) will return a mapped Vec2 instance.
+ * Vec3.malloc(int) will return a mapped Vec3 instance.
+ * This (required) notation might cause compiler warnings, which can be suppressed with @SuppressWarnings("static-access").
+ * Using Java 5.0's static-import on this method will break functionality. + */ + @SuppressWarnings("unused") + public static T malloc(int elementCount) { + // any method that calls this method will have its call-site modified + throw new InternalError("type not registered"); + } + + /** + * Creates an identical new MappedObject instance, comparable to the + * contract of {@link java.nio.ByteBuffer#duplicate}. This is useful when more than one + * views of the mapped object are required at the same time, e.g. in + * multithreaded access. + */ + public final T dup() { + // any method that calls this method will have its call-site modified + throw new InternalError("type not registered"); + } + + /** + * Creates a new MappedObject instance, with a base offset equal to + * the offset of the current view, comparable to the contract of {@link java.nio.ByteBuffer#slice}. + */ + public final T slice() { + // any method that calls this method will have its call-site modified + throw new InternalError("type not registered"); + } + + /** + * Any code in the default constructor will not run automatically. This method + * can be used to execute that code on the current view. + */ + public final void runViewConstructor() { + // any method that calls this method will have its call-site modified + throw new InternalError("type not registered"); + } + + /** Moves the current view to the next element. */ + public final void next() { + // No call-site modification for this, we override in every subclass instead, + // so that we can use it in MappedSetX. + throw new InternalError("type not registered"); + } + + /** + * Copies and amount of SIZEOF - padding bytes, from the current + * mapped object, to the specified mapped object. + */ + @SuppressWarnings("unused") + public final void copyTo(T target) { + // any method that calls this method will have its call-site modified + throw new InternalError("type not registered"); + } + + /** + * Copies and amount of SIZEOF * instances bytes, from the + * current mapped object, to the specified mapped object. Note that + * this includes any padding bytes that are part of SIZEOF. + */ + @SuppressWarnings("unused") + public final void copyRange(T target, int instances) { + // any method that calls this method will have its call-site modified + throw new InternalError("type not registered"); + } + + /** + * Creates an {@link Iterable} that will step through + * capacity() views, leaving the view at + * the last valid value.
+ *

+ * For convenience you are encouraged to static-import this specific method: + * import static org.lwjgl.util.mapped.MappedObject.foreach; + */ + public static Iterable foreach(T mapped) { + return foreach(mapped, mapped.capacity()); + } + + /** + * Creates an {@link Iterable} that will step through + * elementCount views, leaving the view at + * the last valid value.
+ *

+ * For convenience you are encouraged to static-import this specific method: + * import static org.lwjgl.util.mapped.MappedObject.foreach; + */ + public static Iterable foreach(T mapped, int elementCount) { + return new MappedForeach(mapped, elementCount); + } + + @SuppressWarnings("unused") + public final T[] asArray() { + // any method that calls this method will have its call-site modified + throw new InternalError("type not registered"); + } + + /** + * Returns the {@link java.nio.ByteBuffer} that backs this mapped object. + * + * @return the backing buffer + */ + public final ByteBuffer backingByteBuffer() { + return this.preventGC; + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedObjectClassLoader.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedObjectClassLoader.java new file mode 100644 index 0000000..89aa7ec --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedObjectClassLoader.java @@ -0,0 +1,193 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.mapped; + +import org.lwjgl.LWJGLUtil; + +import java.io.IOException; +import java.io.InputStream; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.net.URLClassLoader; + +/** + * This classloader is responsible for applying the bytecode transformation to mapped objects. + * The transformation can either be applied using a Java agent, or with the convenient {@link #fork} method. + * + * @author Riven + */ +public class MappedObjectClassLoader extends URLClassLoader { + + static final String MAPPEDOBJECT_PACKAGE_PREFIX = MappedObjectClassLoader.class.getPackage().getName() + "."; + + static boolean FORKED; + + /** + * Forks the specified class containing a main method, passing the specified arguments. See + * {@link org.lwjgl.test.mapped.TestMappedObject} for example usage. + * + * @param mainClass the class containing the main method + * @param args the arguments to pass + * + * @return true if the fork was successful. + */ + public static boolean fork(Class mainClass, String[] args) { + if ( FORKED ) { + return false; + } + + FORKED = true; + + try { + MappedObjectClassLoader loader = new MappedObjectClassLoader(mainClass); + loader.loadMappedObject(); + + Class replacedMainClass = loader.loadClass(mainClass.getName()); + Method mainMethod = replacedMainClass.getMethod("main", String[].class); + mainMethod.invoke(null, new Object[] { args }); + } catch (InvocationTargetException exc) { + Thread.currentThread().getUncaughtExceptionHandler().uncaughtException(Thread.currentThread(), exc.getCause()); + } catch (Throwable cause) { + throw new Error("failed to fork", cause); + } + + return true; + } + + private MappedObjectClassLoader(Class mainClass) { + super(((URLClassLoader)mainClass.getClassLoader()).getURLs()); + } + + protected synchronized Class loadMappedObject() throws ClassNotFoundException { + final String name = MappedObject.class.getName(); + String className = name.replace('.', '/'); + + byte[] bytecode = readStream(this.getResourceAsStream(className.concat(".class"))); + + long t0 = System.nanoTime(); + bytecode = MappedObjectTransformer.transformMappedObject(bytecode); + long t1 = System.nanoTime(); + total_time_transforming += (t1 - t0); + + if ( MappedObjectTransformer.PRINT_ACTIVITY ) + printActivity(className, t0, t1); + + Class clazz = super.defineClass(name, bytecode, 0, bytecode.length); + resolveClass(clazz); + return clazz; + } + + private static long total_time_transforming; + + @Override + protected synchronized Class loadClass(String name, boolean resolve) throws ClassNotFoundException { + if ( name.startsWith("java.") + || name.startsWith("javax.") + || name.startsWith("sun.") + || name.startsWith("sunw.") + || name.startsWith("org.objectweb.asm.") + ) + return super.loadClass(name, resolve); + + final String className = name.replace('.', '/'); + final boolean inThisPackage = name.startsWith(MAPPEDOBJECT_PACKAGE_PREFIX); + + if ( inThisPackage && ( + name.equals(MappedObjectClassLoader.class.getName()) + || name.equals((MappedObjectTransformer.class.getName())) + || name.equals((CacheUtil.class.getName())) + ) ) + return super.loadClass(name, resolve); + + byte[] bytecode = readStream(this.getResourceAsStream(className.concat(".class"))); + + // Classes in this package do not get transformed, but need to go through here because we have transformed MappedObject. + if ( !(inThisPackage && name.substring(MAPPEDOBJECT_PACKAGE_PREFIX.length()).indexOf('.') == -1) ) { + long t0 = System.nanoTime(); + final byte[] newBytecode = MappedObjectTransformer.transformMappedAPI(className, bytecode); + long t1 = System.nanoTime(); + + total_time_transforming += (t1 - t0); + + if ( bytecode != newBytecode ) { + bytecode = newBytecode; + if ( MappedObjectTransformer.PRINT_ACTIVITY ) + printActivity(className, t0, t1); + } + } + + Class clazz = super.defineClass(name, bytecode, 0, bytecode.length); + if ( resolve ) + resolveClass(clazz); + return clazz; + } + + private static void printActivity(final String className, final long t0, final long t1) { + final StringBuilder msg = new StringBuilder(MappedObjectClassLoader.class.getSimpleName() + ": " + className); + + if ( MappedObjectTransformer.PRINT_TIMING ) + msg.append("\n\ttransforming took " + (t1 - t0) / 1000 + " micros (total: " + (total_time_transforming / 1000 / 1000) + "ms)"); + + LWJGLUtil.log(msg); + } + + private static byte[] readStream(InputStream in) { + byte[] bytecode = new byte[256]; + int len = 0; + try { + while ( true ) { + if ( bytecode.length == len ) + bytecode = copyOf(bytecode, len * 2); + int got = in.read(bytecode, len, bytecode.length - len); + if ( got == -1 ) + break; + len += got; + } + } catch (IOException exc) { + // stop! + } finally { + try { + in.close(); + } catch (IOException exc) { + // ignore... + } + } + return copyOf(bytecode, len); + } + + private static byte[] copyOf(byte[] original, int newLength) { + byte[] copy = new byte[newLength]; + System.arraycopy(original, 0, copy, 0, Math.min(original.length, newLength)); + return copy; + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedObjectTransformer.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedObjectTransformer.java new file mode 100644 index 0000000..cf2aac8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedObjectTransformer.java @@ -0,0 +1,1319 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.mapped; + +import org.lwjgl.BufferUtils; +import org.lwjgl.LWJGLUtil; +import org.lwjgl.MemoryUtil; +import org.objectweb.asm.*; +import org.objectweb.asm.tree.*; +import org.objectweb.asm.tree.analysis.*; +import org.objectweb.asm.tree.analysis.Frame; +import org.objectweb.asm.util.TraceClassVisitor; + +import java.io.PrintWriter; +import java.io.StringWriter; +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; +import java.nio.Buffer; +import java.nio.ByteBuffer; +import java.util.HashMap; +import java.util.Map; + +import static org.objectweb.asm.ClassWriter.*; +import static org.objectweb.asm.Opcodes.*; + +/** + * This class implements the bytecode transformation that mapped object go through. + * Mapped object classes need to first be registered with the transformer, see {@link #register(Class)}. + *

+ * The transformer supports some debugging tools, enabled through JVM system properties:
+ * org.lwjgl.util.mapped.PrintTiming=true, prints timing information for the transformation step.
+ * org.lwjgl.util.mapped.PrintActivity=true, prints activity information.
+ * org.lwjgl.util.mapped.PrintBytecode=true, prints the transformed bytecode.
+ * org.lwjgl.util.Debug must also be set to true for the above to work. + * + * @author Riven + */ +public class MappedObjectTransformer { + + static final boolean PRINT_ACTIVITY = LWJGLUtil.DEBUG && LWJGLUtil.getPrivilegedBoolean("org.lwjgl.util.mapped.PrintActivity"); + static final boolean PRINT_TIMING = PRINT_ACTIVITY && LWJGLUtil.getPrivilegedBoolean("org.lwjgl.util.mapped.PrintTiming"); + static final boolean PRINT_BYTECODE = LWJGLUtil.DEBUG && LWJGLUtil.getPrivilegedBoolean("org.lwjgl.util.mapped.PrintBytecode"); + + static final Map className_to_subtype; + + static final String MAPPED_OBJECT_JVM = jvmClassName(MappedObject.class); + static final String MAPPED_HELPER_JVM = jvmClassName(MappedHelper.class); + + static final String MAPPEDSET_PREFIX = jvmClassName(MappedSet.class); + static final String MAPPED_SET2_JVM = jvmClassName(MappedSet2.class); + static final String MAPPED_SET3_JVM = jvmClassName(MappedSet3.class); + static final String MAPPED_SET4_JVM = jvmClassName(MappedSet4.class); + + static final String CACHE_LINE_PAD_JVM = "L" + jvmClassName(CacheLinePad.class) + ";"; + + // Public methods + static final String VIEWADDRESS_METHOD_NAME = "getViewAddress"; + static final String NEXT_METHOD_NAME = "next"; + static final String ALIGN_METHOD_NAME = "getAlign"; + static final String SIZEOF_METHOD_NAME = "getSizeof"; + static final String CAPACITY_METHOD_NAME = "capacity"; // Used for .asArray().length + + // Internal methods + static final String VIEW_CONSTRUCTOR_NAME = "constructView$LWJGL"; // Used by runViewConstructor + + static final Map OPCODE_TO_NAME = new HashMap(); + static final Map INSNTYPE_TO_NAME = new HashMap(); + + static boolean is_currently_computing_frames; + + static { + getClassEnums(Opcodes.class, OPCODE_TO_NAME, "V1_", "ACC_", "T_", "F_", "MH_"); + getClassEnums(AbstractInsnNode.class, INSNTYPE_TO_NAME); + + className_to_subtype = new HashMap(); + + { + // HACK: required for mapped.view++ + // + // because the compiler generates: + // => GETFIELD MappedObject.view + // => ICONST_1 + // => IADD + // => PUTFIELD MyMappedType.view + // + // instead of: + // => GETFIELD MyMappedType.view + // => ICONST_1 + // => IADD + // => PUTFIELD MyMappedType.view + // + className_to_subtype.put(MAPPED_OBJECT_JVM, new MappedSubtypeInfo(MAPPED_OBJECT_JVM, null, -1, -1, -1, false)); + } + + final String vmName = System.getProperty("java.vm.name"); + if ( vmName != null && !vmName.contains("Server") ) { + System.err.println("Warning: " + MappedObject.class.getSimpleName() + "s have inferiour performance on Client VMs, please consider switching to a Server VM."); + } + } + + /** + * Registers a class as a mapped object. + * The class must extend {@link org.lwjgl.util.mapped.MappedObject} and be annotated with {@link org.lwjgl.util.mapped.MappedField}. + * + * @param type the mapped object class. + */ + public static void register(Class type) { + if ( MappedObjectClassLoader.FORKED ) + return; + + final MappedType mapped = type.getAnnotation(MappedType.class); + + if ( mapped != null && mapped.padding() < 0 ) + throw new ClassFormatError("Invalid mapped type padding: " + mapped.padding()); + + if ( type.getEnclosingClass() != null && !Modifier.isStatic(type.getModifiers()) ) + throw new InternalError("only top-level or static inner classes are allowed"); + + final String className = jvmClassName(type); + final Map fields = new HashMap(); + + long sizeof = 0; + for ( Field field : type.getDeclaredFields() ) { + FieldInfo fieldInfo = registerField(mapped == null || mapped.autoGenerateOffsets(), className, sizeof, field); + if ( fieldInfo == null ) + continue; + + fields.put(field.getName(), fieldInfo); + + sizeof = Math.max(sizeof, fieldInfo.offset + fieldInfo.lengthPadded); + } + + int align = 4; + int padding = 0; + boolean cacheLinePadded = false; + + if ( mapped != null ) { + align = mapped.align(); + if ( mapped.cacheLinePadding() ) { + if ( mapped.padding() != 0 ) + throw new ClassFormatError("Mapped type padding cannot be specified together with cacheLinePadding."); + + final int cacheLineMod = (int)(sizeof % CacheUtil.getCacheLineSize()); + if ( cacheLineMod != 0 ) + padding = CacheUtil.getCacheLineSize() - cacheLineMod; + + cacheLinePadded = true; + } else + padding = mapped.padding(); + } + + sizeof += padding; + + final MappedSubtypeInfo mappedType = new MappedSubtypeInfo(className, fields, (int)sizeof, align, padding, cacheLinePadded); + if ( className_to_subtype.put(className, mappedType) != null ) + throw new InternalError("duplicate mapped type: " + mappedType.className); + } + + private static FieldInfo registerField(final boolean autoGenerateOffsets, final String className, long advancingOffset, final Field field) { + if ( Modifier.isStatic(field.getModifiers()) ) // static fields are never mapped + return null; + + // we only support primitives and ByteBuffers + if ( !field.getType().isPrimitive() && field.getType() != ByteBuffer.class ) + throw new ClassFormatError("field '" + className + "." + field.getName() + "' not supported: " + field.getType()); + + MappedField meta = field.getAnnotation(MappedField.class); + if ( meta == null && !autoGenerateOffsets ) + throw new ClassFormatError("field '" + className + "." + field.getName() + "' missing annotation " + MappedField.class.getName() + ": " + className); + + Pointer pointer = field.getAnnotation(Pointer.class); + if ( pointer != null && field.getType() != long.class ) + throw new ClassFormatError("The @Pointer annotation can only be used on long fields. @Pointer field found: " + className + "." + field.getName() + ": " + field.getType()); + + if ( Modifier.isVolatile(field.getModifiers()) && (pointer != null || field.getType() == ByteBuffer.class) ) + throw new ClassFormatError("The volatile keyword is not supported for @Pointer or ByteBuffer fields. Volatile field found: " + className + "." + field.getName() + ": " + field.getType()); + + // quick hack + long byteLength; + if ( field.getType() == long.class || field.getType() == double.class ) { + if ( pointer == null ) + byteLength = 8; + else + byteLength = MappedObjectUnsafe.INSTANCE.addressSize(); + } else if ( field.getType() == double.class ) + byteLength = 8; + else if ( field.getType() == int.class || field.getType() == float.class ) + byteLength = 4; + else if ( field.getType() == char.class || field.getType() == short.class ) + byteLength = 2; + else if ( field.getType() == byte.class ) + byteLength = 1; + else if ( field.getType() == ByteBuffer.class ) { + byteLength = meta.byteLength(); + if ( byteLength < 0 ) + throw new IllegalStateException("invalid byte length for mapped ByteBuffer field: " + className + "." + field.getName() + " [length=" + byteLength + "]"); + } else + throw new ClassFormatError(field.getType().getName()); + + if ( field.getType() != ByteBuffer.class && (advancingOffset % byteLength) != 0 ) + throw new IllegalStateException("misaligned mapped type: " + className + "." + field.getName()); + + CacheLinePad pad = field.getAnnotation(CacheLinePad.class); + + long byteOffset = advancingOffset; + if ( meta != null && meta.byteOffset() != -1 ) { + if ( meta.byteOffset() < 0 ) + throw new ClassFormatError("Invalid field byte offset: " + className + "." + field.getName() + " [byteOffset=" + meta.byteOffset() + "]"); + if ( pad != null ) + throw new ClassFormatError("A field byte offset cannot be specified together with cache-line padding: " + className + "." + field.getName()); + + byteOffset = meta.byteOffset(); + } + + long byteLengthPadded = byteLength; + if ( pad != null ) { + // Pad before + if ( pad.before() && byteOffset % CacheUtil.getCacheLineSize() != 0 ) + byteOffset += CacheUtil.getCacheLineSize() - (byteOffset & (CacheUtil.getCacheLineSize() - 1)); + + // Pad after + if ( pad.after() && (byteOffset + byteLength) % CacheUtil.getCacheLineSize() != 0 ) + byteLengthPadded += CacheUtil.getCacheLineSize() - (byteOffset + byteLength) % CacheUtil.getCacheLineSize(); + + assert !pad.before() || (byteOffset % CacheUtil.getCacheLineSize() == 0); + assert !pad.after() || ((byteOffset + byteLengthPadded) % CacheUtil.getCacheLineSize() == 0); + } + + if ( PRINT_ACTIVITY ) + LWJGLUtil.log(MappedObjectTransformer.class.getSimpleName() + ": " + className + "." + field.getName() + " [type=" + field.getType().getSimpleName() + ", offset=" + byteOffset + "]"); + + return new FieldInfo(byteOffset, byteLength, byteLengthPadded, Type.getType(field.getType()), Modifier.isVolatile(field.getModifiers()), pointer != null); + } + + /** Removes final from methods that will be overriden by subclasses. */ + static byte[] transformMappedObject(byte[] bytecode) { + final ClassWriter cw = new ClassWriter(0); + + ClassVisitor cv = new ClassAdapter(cw) { + + private final String[] DEFINALIZE_LIST = { + VIEWADDRESS_METHOD_NAME, + NEXT_METHOD_NAME, + ALIGN_METHOD_NAME, + SIZEOF_METHOD_NAME, + CAPACITY_METHOD_NAME, + }; + + public MethodVisitor visitMethod(int access, final String name, final String desc, final String signature, final String[] exceptions) { + for ( String method : DEFINALIZE_LIST ) { + if ( name.equals(method) ) { + access &= ~ACC_FINAL; + break; + } + } + return super.visitMethod(access, name, desc, signature, exceptions); + } + }; + + new ClassReader(bytecode).accept(cv, 0); + return cw.toByteArray(); + } + + static byte[] transformMappedAPI(final String className, byte[] bytecode) { + final ClassWriter cw = new ClassWriter(COMPUTE_FRAMES) { + + @Override + protected String getCommonSuperClass(String a, String b) { + // HACK: prevent user-code static-initialization-blocks to be executed + if ( is_currently_computing_frames && !a.startsWith("java/") || !b.startsWith("java/") ) + return "java/lang/Object"; + + return super.getCommonSuperClass(a, b); + } + + }; + + final TransformationAdapter ta = new TransformationAdapter(cw, className); + + ClassVisitor cv = ta; + if ( className_to_subtype.containsKey(className) ) // Do a first pass to generate address getters + cv = getMethodGenAdapter(className, cv); + + new ClassReader(bytecode).accept(cv, ClassReader.SKIP_FRAMES); + + if ( !ta.transformed ) + return bytecode; + + bytecode = cw.toByteArray(); + if ( PRINT_BYTECODE ) + printBytecode(bytecode); + + return bytecode; + } + + private static ClassAdapter getMethodGenAdapter(final String className, final ClassVisitor cv) { + return new ClassAdapter(cv) { + + @Override + public void visitEnd() { + final MappedSubtypeInfo mappedSubtype = className_to_subtype.get(className); + + generateViewAddressGetter(); + generateCapacity(); + generateAlignGetter(mappedSubtype); + generateSizeofGetter(); + generateNext(); + + for ( String fieldName : mappedSubtype.fields.keySet() ) { + final FieldInfo field = mappedSubtype.fields.get(fieldName); + + if ( field.type.getDescriptor().length() > 1 ) { // ByteBuffer, getter only + generateByteBufferGetter(fieldName, field); + } else { + generateFieldGetter(fieldName, field); + generateFieldSetter(fieldName, field); + } + } + + super.visitEnd(); + } + + private void generateViewAddressGetter() { + MethodVisitor mv = super.visitMethod(ACC_PUBLIC, VIEWADDRESS_METHOD_NAME, "(I)J", null, null); + mv.visitCode(); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, MAPPED_OBJECT_JVM, "baseAddress", "J"); + mv.visitVarInsn(ILOAD, 1); + mv.visitFieldInsn(GETSTATIC, className, "SIZEOF", "I"); + mv.visitInsn(IMUL); + mv.visitInsn(I2L); + mv.visitInsn(LADD); + if ( MappedObject.CHECKS ) { + mv.visitInsn(DUP2); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESTATIC, MAPPED_HELPER_JVM, "checkAddress", "(JL" + MAPPED_OBJECT_JVM + ";)V"); + } + mv.visitInsn(LRETURN); + mv.visitMaxs(3, 2); + mv.visitEnd(); + } + + private void generateCapacity() { + // return (backingByteBuffer().capacity() + (int)(MemoryUtil.getAddress0(backingByteBuffer()) - baseAddress)) / SIZEOF; + MethodVisitor mv = super.visitMethod(ACC_PUBLIC, CAPACITY_METHOD_NAME, "()I", null, null); + mv.visitCode(); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKEVIRTUAL, MAPPED_OBJECT_JVM, "backingByteBuffer", "()L" + jvmClassName(ByteBuffer.class) + ";"); + mv.visitInsn(DUP); + mv.visitMethodInsn(INVOKEVIRTUAL, jvmClassName(ByteBuffer.class), "capacity", "()I"); + mv.visitInsn(SWAP); + mv.visitMethodInsn(INVOKESTATIC, jvmClassName(MemoryUtil.class), "getAddress0", "(L" + jvmClassName(Buffer.class) + ";)J"); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, MAPPED_OBJECT_JVM, "baseAddress", "J"); + mv.visitInsn(LSUB); + mv.visitInsn(L2I); + mv.visitInsn(IADD); + mv.visitFieldInsn(GETSTATIC, className, "SIZEOF", "I"); + mv.visitInsn(IDIV); + mv.visitInsn(IRETURN); + mv.visitMaxs(3, 1); + mv.visitEnd(); + } + + private void generateAlignGetter(final MappedSubtypeInfo mappedSubtype) { + MethodVisitor mv = super.visitMethod(ACC_PUBLIC, ALIGN_METHOD_NAME, "()I", null, null); + mv.visitCode(); + visitIntNode(mv, mappedSubtype.sizeof); + mv.visitInsn(IRETURN); + mv.visitMaxs(1, 1); + mv.visitEnd(); + } + + private void generateSizeofGetter() { + MethodVisitor mv = super.visitMethod(ACC_PUBLIC, SIZEOF_METHOD_NAME, "()I", null, null); + mv.visitCode(); + mv.visitFieldInsn(GETSTATIC, className, "SIZEOF", "I"); + mv.visitInsn(IRETURN); + mv.visitMaxs(1, 1); + mv.visitEnd(); + } + + private void generateNext() { + MethodVisitor mv = super.visitMethod(ACC_PUBLIC, NEXT_METHOD_NAME, "()V", null, null); + mv.visitCode(); + mv.visitVarInsn(ALOAD, 0); + mv.visitInsn(DUP); + mv.visitFieldInsn(GETFIELD, MAPPED_OBJECT_JVM, "viewAddress", "J"); + mv.visitFieldInsn(GETSTATIC, className, "SIZEOF", "I"); + mv.visitInsn(I2L); + mv.visitInsn(LADD); + mv.visitMethodInsn(INVOKEVIRTUAL, className, "setViewAddress", "(J)V"); + mv.visitInsn(RETURN); + mv.visitMaxs(3, 1); + mv.visitEnd(); + } + + private void generateByteBufferGetter(final String fieldName, final FieldInfo field) { + MethodVisitor mv = super.visitMethod(ACC_PUBLIC | ACC_STATIC, getterName(fieldName), "(L" + className + ";I)" + field.type.getDescriptor(), null, null); + mv.visitCode(); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ILOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, className, VIEWADDRESS_METHOD_NAME, "(I)J"); + visitIntNode(mv, (int)field.offset); + mv.visitInsn(I2L); + mv.visitInsn(LADD); + visitIntNode(mv, (int)field.length); + mv.visitMethodInsn(INVOKESTATIC, MAPPED_HELPER_JVM, "newBuffer", "(JI)L" + jvmClassName(ByteBuffer.class) + ";"); + mv.visitInsn(ARETURN); + mv.visitMaxs(3, 2); + mv.visitEnd(); + } + + private void generateFieldGetter(final String fieldName, final FieldInfo field) { + MethodVisitor mv = super.visitMethod(ACC_PUBLIC | ACC_STATIC, getterName(fieldName), "(L" + className + ";I)" + field.type.getDescriptor(), null, null); + mv.visitCode(); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ILOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, className, VIEWADDRESS_METHOD_NAME, "(I)J"); + visitIntNode(mv, (int)field.offset); + mv.visitInsn(I2L); + mv.visitInsn(LADD); + mv.visitMethodInsn(INVOKESTATIC, MAPPED_HELPER_JVM, field.getAccessType() + "get", "(J)" + field.type.getDescriptor()); + mv.visitInsn(field.type.getOpcode(IRETURN)); + mv.visitMaxs(3, 2); + mv.visitEnd(); + } + + private void generateFieldSetter(final String fieldName, final FieldInfo field) { + MethodVisitor mv = super.visitMethod(ACC_PUBLIC | ACC_STATIC, setterName(fieldName), "(L" + className + ";I" + field.type.getDescriptor() + ")V", null, null); + mv.visitCode(); + int load = 0; + switch ( field.type.getSort() ) { + case Type.BOOLEAN: + case Type.CHAR: + case Type.BYTE: + case Type.SHORT: + case Type.INT: + load = ILOAD; + break; + case Type.FLOAT: + load = FLOAD; + break; + case Type.LONG: + load = LLOAD; + break; + case Type.DOUBLE: + load = DLOAD; + break; + } + mv.visitVarInsn(load, 2); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ILOAD, 1); + mv.visitMethodInsn(INVOKEVIRTUAL, className, VIEWADDRESS_METHOD_NAME, "(I)J"); + visitIntNode(mv, (int)field.offset); + mv.visitInsn(I2L); + mv.visitInsn(LADD); + mv.visitMethodInsn(INVOKESTATIC, MAPPED_HELPER_JVM, field.getAccessType() + "put", "(" + field.type.getDescriptor() + "J)V"); + mv.visitInsn(RETURN); + mv.visitMaxs(4, 4); + mv.visitEnd(); + } + + }; + } + + private static class TransformationAdapter extends ClassAdapter { + + final String className; + + boolean transformed; + + TransformationAdapter(final ClassVisitor cv, final String className) { + super(cv); + this.className = className; + } + + @Override + public FieldVisitor visitField(final int access, final String name, final String desc, final String signature, final Object value) { + // remove redirected fields + final MappedSubtypeInfo mappedSubtype = className_to_subtype.get(className); + if ( mappedSubtype != null && mappedSubtype.fields.containsKey(name) ) { + if ( PRINT_ACTIVITY ) + LWJGLUtil.log(MappedObjectTransformer.class.getSimpleName() + ": discarding field: " + className + "." + name + ":" + desc); + return null; + } + + if ( (access & ACC_STATIC) == 0 ) { + return new FieldNode(access, name, desc, signature, value) { + public void visitEnd() { + if ( visibleAnnotations == null ) { // early-out + accept(cv); + return; + } + + boolean before = false; + boolean after = false; + int byteLength = 0; + for ( AnnotationNode pad : visibleAnnotations ) { + if ( CACHE_LINE_PAD_JVM.equals(pad.desc) ) { + if ( "J".equals(desc) || "D".equals(desc) ) + byteLength = 8; + else if ( "I".equals(desc) || "F".equals(desc) ) + byteLength = 4; + else if ( "S".equals(desc) || "C".equals(desc) ) + byteLength = 2; + else if ( "B".equals(desc) || "Z".equals(desc) ) + byteLength = 1; + else + throw new ClassFormatError("The @CacheLinePad annotation cannot be used on non-primitive fields: " + className + "." + name); + + transformed = true; + + after = true; + if ( pad.values != null ) { + for ( int i = 0; i < pad.values.size(); i += 2 ) { + final boolean value = pad.values.get(i + 1).equals(Boolean.TRUE); + if ( "before".equals(pad.values.get(i)) ) + before = value; + else + after = value; + } + } + break; + } + } + + /* + We make the fields public to force the JVM to keep the fields in the object. + Instead of using only longs or integers, we use the same type as the original + field. That's because modern JVMs usually reorder fields by type: + longs, then doubles, then integers, then booleans, etc. This way it's more + likely that the padding will work as expected. + */ + + if ( before ) { + final int count = CacheUtil.getCacheLineSize() / byteLength - 1; + for ( int i = count; i >= 1; i-- ) + cv.visitField(access | ACC_PUBLIC | ACC_SYNTHETIC, name + "$PAD_" + i, desc, signature, null); + } + + accept(cv); + + if ( after ) { + final int count = CacheUtil.getCacheLineSize() / byteLength - 1; + for ( int i = 1; i <= count; i++ ) + cv.visitField(access | ACC_PUBLIC | ACC_SYNTHETIC, name + "$PAD" + i, desc, signature, null); + } + } + }; + } else + return super.visitField(access, name, desc, signature, value); + } + + @Override + public MethodVisitor visitMethod(final int access, String name, final String desc, final String signature, final String[] exceptions) { + // Move MappedSubtype constructors to another method + if ( "".equals(name) ) { + final MappedSubtypeInfo mappedSubtype = className_to_subtype.get(className); + if ( mappedSubtype != null ) { + if ( !"()V".equals(desc) ) + throw new ClassFormatError(className + " can only have a default constructor, found: " + desc); + + final MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions); + mv.visitVarInsn(ALOAD, 0); + mv.visitMethodInsn(INVOKESPECIAL, MAPPED_OBJECT_JVM, "", "()V"); + mv.visitInsn(RETURN); + mv.visitMaxs(0, 0); + + // put the method body in another method + name = VIEW_CONSTRUCTOR_NAME; + } + } + + final MethodVisitor mv = super.visitMethod(access, name, desc, signature, exceptions); + return new MethodNode(access, name, desc, signature, exceptions) { + + /** When true, the method has touched a mapped object and needs to be transformed. We track this + * so we can skip the expensive frame analysis and tree API usage. */ + boolean needsTransformation; + + @Override + public void visitMaxs(int a, int b) { + try { + is_currently_computing_frames = true; + super.visitMaxs(a, b); + } finally { + is_currently_computing_frames = false; + } + } + + @Override + public void visitFieldInsn(final int opcode, final String owner, final String name, final String desc) { + if ( className_to_subtype.containsKey(owner) || owner.startsWith(MAPPEDSET_PREFIX) ) + needsTransformation = true; + + super.visitFieldInsn(opcode, owner, name, desc); + } + + @Override + public void visitMethodInsn(final int opcode, final String owner, final String name, final String desc) { + if ( className_to_subtype.containsKey(owner) ) + needsTransformation = true; + + super.visitMethodInsn(opcode, owner, name, desc); + } + + @Override + public void visitEnd() { + if ( needsTransformation ) { // Early-out for methods that do not touch a mapped object. + //System.err.println("\nTRANSFORMING: " + className + "." + name + desc); + transformed = true; + try { + transformMethod(analyse()); + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + // Pass the instruction stream to the adapter's MethodVisitor + accept(mv); + } + + private Frame[] analyse() throws AnalyzerException { + final Analyzer a = new Analyzer(new SimpleVerifier()); + a.analyze(className, this); + return a.getFrames(); + } + + private void transformMethod(final Frame[] frames) { + final InsnList instructions = this.instructions; + + final Map arrayVars = new HashMap(); + + /* + We need this map because we insert/remove instructions from the stream and we need a way + to match each original instruction with the corresponding frame. + TODO: Can we keep track of everything more efficiently without a map? + */ + final Map> frameMap = new HashMap>(); + for ( int i = 0; i < frames.length; i++ ) + frameMap.put(instructions.get(i), frames[i]); + + for ( int i = 0; i < instructions.size(); i++ ) { // f is a separate cursor for frames + final AbstractInsnNode instruction = instructions.get(i); + + //System.out.println("MAIN LOOP #" + i + " - " + getOpcodeName(instruction)); + + switch ( instruction.getType() ) { + case AbstractInsnNode.VAR_INSN: + if ( instruction.getOpcode() == ALOAD ) { + VarInsnNode varInsn = (VarInsnNode)instruction; + final MappedSubtypeInfo mappedSubtype = arrayVars.get(varInsn.var); + if ( mappedSubtype != null ) + i = transformArrayAccess(instructions, i, frameMap, varInsn, mappedSubtype, varInsn.var); + } + break; + case AbstractInsnNode.FIELD_INSN: + FieldInsnNode fieldInsn = (FieldInsnNode)instruction; + + final InsnList list = transformFieldAccess(fieldInsn); + if ( list != null ) + i = replace(instructions, i, instruction, list); + + break; + case AbstractInsnNode.METHOD_INSN: + MethodInsnNode methodInsn = (MethodInsnNode)instruction; + final MappedSubtypeInfo mappedType = className_to_subtype.get(methodInsn.owner); + if ( mappedType != null ) + i = transformMethodCall(instructions, i, frameMap, methodInsn, mappedType, arrayVars); + break; + } + } + } + }; + } + } + + static int transformMethodCall(final InsnList instructions, int i, final Map> frameMap, final MethodInsnNode methodInsn, final MappedSubtypeInfo mappedType, final Map arrayVars) { + switch ( methodInsn.getOpcode() ) { + case INVOKEVIRTUAL: + if ( "asArray".equals(methodInsn.name) && methodInsn.desc.equals("()[L" + MAPPED_OBJECT_JVM + ";") ) { + // Go forward and store the local variable index. + // We only allow this pattern: INVOKEVIRTUAL -> CHECKCAST -> ASTORE. + // We remove the first two and store the target MappedSubtype in the ASTORE variable + AbstractInsnNode nextInstruction; + checkInsnAfterIsArray(nextInstruction = methodInsn.getNext(), CHECKCAST); + checkInsnAfterIsArray(nextInstruction = nextInstruction.getNext(), ASTORE); + + final Frame frame = frameMap.get(nextInstruction); + final String targetType = frame.getStack(frame.getStackSize() - 1).getType().getElementType().getInternalName(); + if ( !methodInsn.owner.equals(targetType) ) { + /* + This may happen with the current API, like so: + MappedA foo = MappedA.malloc(...); + MappedB[] cursor = foo.asArray(); + We have to parameterize MappedObject to avoid this. + */ + throw new ClassCastException("Source: " + methodInsn.owner + " - Target: " + targetType); + } + + final VarInsnNode varInstruction = (VarInsnNode)nextInstruction; + + arrayVars.put(varInstruction.var, mappedType); + + instructions.remove(methodInsn.getNext()); // Remove CHECKCAST + instructions.remove(methodInsn); // Remove INVOKEVIRTUAL + } + + if ( "dup".equals(methodInsn.name) && methodInsn.desc.equals("()L" + MAPPED_OBJECT_JVM + ";") ) { + i = replace(instructions, i, methodInsn, generateDupInstructions(methodInsn)); + break; + } + + if ( "slice".equals(methodInsn.name) && methodInsn.desc.equals("()L" + MAPPED_OBJECT_JVM + ";") ) { + i = replace(instructions, i, methodInsn, generateSliceInstructions(methodInsn)); + break; + } + + if ( "runViewConstructor".equals(methodInsn.name) && "()V".equals(methodInsn.desc) ) { + i = replace(instructions, i, methodInsn, generateRunViewConstructorInstructions(methodInsn)); + break; + } + + if ( "copyTo".equals(methodInsn.name) && methodInsn.desc.equals("(L" + MAPPED_OBJECT_JVM + ";)V") ) { + i = replace(instructions, i, methodInsn, generateCopyToInstructions(mappedType)); + break; + } + + if ( "copyRange".equals(methodInsn.name) && methodInsn.desc.equals("(L" + MAPPED_OBJECT_JVM + ";I)V") ) { + i = replace(instructions, i, methodInsn, generateCopyRangeInstructions(mappedType)); + break; + } + + break; + case INVOKESPECIAL: + // super() in VIEW_CONSTRUCTOR_NAME, remove + if ( methodInsn.owner.equals(MAPPED_OBJECT_JVM) && "".equals(methodInsn.name) && "()V".equals(methodInsn.desc) ) { + instructions.remove(methodInsn.getPrevious()); // ALOAD + instructions.remove(methodInsn); // INVOKESPECIAL + + i -= 2; + } + break; + case INVOKESTATIC: + boolean isMapDirectMethod = "map".equals(methodInsn.name) && methodInsn.desc.equals("(JI)L" + MAPPED_OBJECT_JVM + ";"); + boolean isMapBufferMethod = "map".equals(methodInsn.name) && methodInsn.desc.equals("(Ljava/nio/ByteBuffer;)L" + MAPPED_OBJECT_JVM + ";"); + boolean isMallocMethod = "malloc".equals(methodInsn.name) && methodInsn.desc.equals("(I)L" + MAPPED_OBJECT_JVM + ";"); + + if ( (isMapDirectMethod || isMapBufferMethod) || isMallocMethod ) + i = replace(instructions, i, methodInsn, generateMapInstructions(mappedType, methodInsn.owner, isMapDirectMethod, isMallocMethod)); + break; + } + + return i; + } + + private static InsnList generateCopyRangeInstructions(final MappedSubtypeInfo mappedType) { + final InsnList list = new InsnList(); + + // stack: instances, target, this + list.add(getIntNode(mappedType.sizeof)); + // stack: sizeof, instances, target, this + list.add(new InsnNode(IMUL)); + // stack: bytes, target, this + list.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, "copy", "(L" + MAPPED_OBJECT_JVM + ";L" + MAPPED_OBJECT_JVM + ";I)V")); + // stack: - + + return list; + } + + private static InsnList generateCopyToInstructions(final MappedSubtypeInfo mappedType) { + final InsnList list = new InsnList(); + + // stack: target, this + list.add(getIntNode(mappedType.sizeof - mappedType.padding)); + // stack: sizeof, target, this + list.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, "copy", "(L" + MAPPED_OBJECT_JVM + ";L" + MAPPED_OBJECT_JVM + ";I)V")); + // stack: - + + return list; + } + + private static InsnList generateRunViewConstructorInstructions(final MethodInsnNode methodInsn) { + final InsnList list = new InsnList(); + + // stack: this + list.add(new InsnNode(DUP)); + // stack: this, this + list.add(new MethodInsnNode(INVOKEVIRTUAL, methodInsn.owner, VIEW_CONSTRUCTOR_NAME, "()V")); + // stack: this + + return list; + } + + private static InsnList generateSliceInstructions(final MethodInsnNode methodInsn) { + final InsnList list = new InsnList(); + + // stack: this + list.add(new TypeInsnNode(NEW, methodInsn.owner)); + // stack: new, this + list.add(new InsnNode(DUP)); + // stack: new, new, this + list.add(new MethodInsnNode(INVOKESPECIAL, methodInsn.owner, "", "()V")); + // stack: new, this + list.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, "slice", "(L" + MAPPED_OBJECT_JVM + ";L" + MAPPED_OBJECT_JVM + ";)L" + MAPPED_OBJECT_JVM + ";")); + // stack: new + + return list; + } + + private static InsnList generateDupInstructions(final MethodInsnNode methodInsn) { + final InsnList list = new InsnList(); + + // stack: this + list.add(new TypeInsnNode(NEW, methodInsn.owner)); + // stack: new, this + list.add(new InsnNode(DUP)); + // stack: new, new, this + list.add(new MethodInsnNode(INVOKESPECIAL, methodInsn.owner, "", "()V")); + // stack: new, this + list.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, "dup", "(L" + MAPPED_OBJECT_JVM + ";L" + MAPPED_OBJECT_JVM + ";)L" + MAPPED_OBJECT_JVM + ";")); + // stack: new + + return list; + } + + private static InsnList generateMapInstructions(final MappedSubtypeInfo mappedType, final String className, final boolean mapDirectMethod, final boolean mallocMethod) { + final InsnList trg = new InsnList(); + + if ( mallocMethod ) { + // stack: count + trg.add(getIntNode(mappedType.sizeof)); + // stack: sizeof, count + trg.add(new InsnNode(IMUL)); + // stack: bytes + trg.add(new MethodInsnNode(INVOKESTATIC, mappedType.cacheLinePadded ? jvmClassName(CacheUtil.class) : jvmClassName(BufferUtils.class), "createByteBuffer", "(I)L" + jvmClassName(ByteBuffer.class) + ";")); + // stack: buffer + } else if ( mapDirectMethod ) { + // stack: capacity, address + trg.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, "newBuffer", "(JI)L" + jvmClassName(ByteBuffer.class) + ";")); + // stack: buffer + } + + // stack: buffer + trg.add(new TypeInsnNode(NEW, className)); + // stack: new, buffer + trg.add(new InsnNode(DUP)); + // stack: new, new, buffer + trg.add(new MethodInsnNode(INVOKESPECIAL, className, "", "()V")); + // stack: new, buffer + trg.add(new InsnNode(DUP_X1)); + // stack: new, buffer, new + trg.add(new InsnNode(SWAP)); + // stack: buffer, new, new + trg.add(getIntNode(mappedType.align)); + // stack: int, buffer, new, new + trg.add(getIntNode(mappedType.sizeof)); + // stack: int, int, buffer, new, new + trg.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, "setup", "(L" + MAPPED_OBJECT_JVM + ";Ljava/nio/ByteBuffer;II)V")); + // stack: new + + return trg; + } + + static InsnList transformFieldAccess(final FieldInsnNode fieldInsn) { + final MappedSubtypeInfo mappedSubtype; + mappedSubtype = className_to_subtype.get(fieldInsn.owner); + if ( mappedSubtype == null ) { // early out + // MappedSet.view + outer: + if ( "view".equals(fieldInsn.name) && fieldInsn.owner.startsWith(MAPPEDSET_PREFIX) ) + return generateSetViewInstructions(fieldInsn); + + return null; // early out + } + + if ( "SIZEOF".equals(fieldInsn.name) ) + return generateSIZEOFInstructions(fieldInsn, mappedSubtype); + + if ( "view".equals(fieldInsn.name) ) + return generateViewInstructions(fieldInsn, mappedSubtype); + + if ( "baseAddress".equals(fieldInsn.name) || "viewAddress".equals(fieldInsn.name) ) { + return generateAddressInstructions(fieldInsn); + } + + final FieldInfo field = mappedSubtype.fields.get(fieldInsn.name); + if ( field == null ) // early out + return null; + + // now we're going to transform ByteBuffer-typed field access + if ( fieldInsn.desc.equals("L" + jvmClassName(ByteBuffer.class) + ";") ) + return generateByteBufferInstructions(fieldInsn, mappedSubtype, field.offset); + + // we're now going to transform the field access + return generateFieldInstructions(fieldInsn, field); + } + + private static InsnList generateSetViewInstructions(final FieldInsnNode fieldInsn) { + if ( fieldInsn.getOpcode() == GETFIELD ) + throwAccessErrorOnReadOnlyField(fieldInsn.owner, fieldInsn.name); + if ( fieldInsn.getOpcode() != PUTFIELD ) + throw new InternalError(); + + final InsnList list = new InsnList(); + + // stack: index, this + if ( MAPPED_SET2_JVM.equals(fieldInsn.owner) ) + list.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, "put_views", "(L" + MAPPED_SET2_JVM + ";I)V")); + else if ( MAPPED_SET3_JVM.equals(fieldInsn.owner) ) + list.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, "put_views", "(L" + MAPPED_SET3_JVM + ";I)V")); + else if ( MAPPED_SET4_JVM.equals(fieldInsn.owner) ) + list.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, "put_views", "(L" + MAPPED_SET4_JVM + ";I)V")); + else + throw new InternalError(); + // stack: - + + return list; + } + + private static InsnList generateSIZEOFInstructions(final FieldInsnNode fieldInsn, final MappedSubtypeInfo mappedSubtype) { + if ( !"I".equals(fieldInsn.desc) ) + throw new InternalError(); + + final InsnList list = new InsnList(); + + if ( fieldInsn.getOpcode() == GETSTATIC ) { + list.add(getIntNode(mappedSubtype.sizeof)); + return list; + } + + if ( fieldInsn.getOpcode() == PUTSTATIC ) + throwAccessErrorOnReadOnlyField(fieldInsn.owner, fieldInsn.name); + + throw new InternalError(); + } + + private static InsnList generateViewInstructions(final FieldInsnNode fieldInsn, final MappedSubtypeInfo mappedSubtype) { + if ( !"I".equals(fieldInsn.desc) ) + throw new InternalError(); + + final InsnList list = new InsnList(); + + if ( fieldInsn.getOpcode() == GETFIELD ) { + if ( mappedSubtype.sizeof_shift != 0 ) { + // stack: instance + list.add(getIntNode(mappedSubtype.sizeof_shift)); + // stack: sizeof, instance + list.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, "get_view_shift", "(L" + MAPPED_OBJECT_JVM + ";I)I")); + // stack: view + } else { + // stack: instance + list.add(getIntNode(mappedSubtype.sizeof)); + // stack: sizeof, instance + list.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, "get_view", "(L" + MAPPED_OBJECT_JVM + ";I)I")); + // stack: view + } + return list; + } + + if ( fieldInsn.getOpcode() == PUTFIELD ) { + if ( mappedSubtype.sizeof_shift != 0 ) { + // stack: view, instance + list.add(getIntNode(mappedSubtype.sizeof_shift)); + // stack: sizeof, view, instance + list.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, "put_view_shift", "(L" + MAPPED_OBJECT_JVM + ";II)V")); + // stack: - + } else { + // stack: view, instance + list.add(getIntNode(mappedSubtype.sizeof)); + // stack: sizeof, view, instance + list.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, "put_view", "(L" + MAPPED_OBJECT_JVM + ";II)V")); + // stack: - + } + return list; + } + + throw new InternalError(); + } + + private static InsnList generateAddressInstructions(final FieldInsnNode fieldInsn) { + if ( !"J".equals(fieldInsn.desc) ) + throw new IllegalStateException(); + + if ( fieldInsn.getOpcode() == GETFIELD ) // do not change a thing + return null; + + if ( fieldInsn.getOpcode() == PUTFIELD ) + throwAccessErrorOnReadOnlyField(fieldInsn.owner, fieldInsn.name); + + throw new InternalError(); + } + + private static InsnList generateByteBufferInstructions(final FieldInsnNode fieldInsn, final MappedSubtypeInfo mappedSubtype, final long fieldOffset) { + if ( fieldInsn.getOpcode() == PUTFIELD ) + throwAccessErrorOnReadOnlyField(fieldInsn.owner, fieldInsn.name); + + if ( fieldInsn.getOpcode() == GETFIELD ) { + final InsnList list = new InsnList(); + + // stack: ref + list.add(new FieldInsnNode(GETFIELD, mappedSubtype.className, "viewAddress", "J")); + // stack: long + list.add(new LdcInsnNode(fieldOffset)); + // stack: long, long + list.add(new InsnNode(LADD)); + // stack: long + list.add(new LdcInsnNode(mappedSubtype.fields.get(fieldInsn.name).length)); + // stack: long, long + list.add(new InsnNode(L2I)); + // stack: int, long + list.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, "newBuffer", "(JI)L" + jvmClassName(ByteBuffer.class) + ";")); + // stack: buffer + + return list; + } + + throw new InternalError(); + } + + private static InsnList generateFieldInstructions(final FieldInsnNode fieldInsn, final FieldInfo field) { + final InsnList list = new InsnList(); + + if ( fieldInsn.getOpcode() == PUTFIELD ) { + // stack: value, ref + list.add(getIntNode((int)field.offset)); + // stack: fieldOffset, value, ref + list.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, field.getAccessType() + "put", "(L" + MAPPED_OBJECT_JVM + ";" + fieldInsn.desc + "I)V")); + // stack - + return list; + } + + if ( fieldInsn.getOpcode() == GETFIELD ) { + // stack: ref + list.add(getIntNode((int)field.offset)); + // stack: fieldOffset, ref + list.add(new MethodInsnNode(INVOKESTATIC, MAPPED_HELPER_JVM, field.getAccessType() + "get", "(L" + MAPPED_OBJECT_JVM + ";I)" + fieldInsn.desc)); + // stack: - + return list; + } + + throw new InternalError(); + } + + static int transformArrayAccess(final InsnList instructions, int i, final Map> frameMap, final VarInsnNode loadInsn, final MappedSubtypeInfo mappedSubtype, final int var) { + // We need to go forward in time to find how we use the array var + final int loadStackSize = frameMap.get(loadInsn).getStackSize() + 1; + + AbstractInsnNode nextInsn = loadInsn; + + while ( true ) { + nextInsn = nextInsn.getNext(); + if ( nextInsn == null ) + throw new InternalError(); + + Frame frame = frameMap.get(nextInsn); + if ( frame == null ) + continue; + + int stackSize = frame.getStackSize(); + + if ( stackSize == loadStackSize + 1 && nextInsn.getOpcode() == AALOAD ) { + final AbstractInsnNode aaLoadInsn = nextInsn; + + while ( true ) { + nextInsn = nextInsn.getNext(); + if ( nextInsn == null ) + break; + + frame = frameMap.get(nextInsn); + if ( frame == null ) + continue; + stackSize = frame.getStackSize(); + + if ( stackSize == loadStackSize + 1 && nextInsn.getOpcode() == PUTFIELD ) { + final FieldInsnNode fieldInsn = (FieldInsnNode)nextInsn; + + // stack: value, view, ref + instructions.insert(nextInsn, new MethodInsnNode(INVOKESTATIC, mappedSubtype.className, setterName(fieldInsn.name), "(L" + mappedSubtype.className + ";I" + fieldInsn.desc + ")V")); + // stack: - + instructions.remove(nextInsn); + + break; + } else if ( stackSize == loadStackSize && nextInsn.getOpcode() == GETFIELD ) { + final FieldInsnNode fieldInsn = (FieldInsnNode)nextInsn; + + // stack: view, ref + instructions.insert(nextInsn, new MethodInsnNode(INVOKESTATIC, mappedSubtype.className, getterName(fieldInsn.name), "(L" + mappedSubtype.className + ";I)" + fieldInsn.desc)); + // stack: value + instructions.remove(nextInsn); + + break; + } else if ( stackSize == loadStackSize && nextInsn.getOpcode() == DUP && nextInsn.getNext().getOpcode() == GETFIELD ) { + // May happen with operator+assignment (e.g. cursor[i].value += 10) + final FieldInsnNode fieldInsn = (FieldInsnNode)nextInsn.getNext(); + + final MethodInsnNode getter = new MethodInsnNode(INVOKESTATIC, mappedSubtype.className, getterName(fieldInsn.name), "(L" + mappedSubtype.className + ";I)" + fieldInsn.desc); + + // stack: view, ref + instructions.insert(nextInsn, new InsnNode(DUP2)); + // stack: view, ref, view, ref + instructions.insert(nextInsn.getNext(), getter); + // stack: value, view, ref + + instructions.remove(nextInsn); + instructions.remove(fieldInsn); + + nextInsn = getter; + continue; + } else if ( stackSize < loadStackSize ) + throw new ClassFormatError("Invalid " + mappedSubtype.className + " view array usage detected: " + getOpcodeName(nextInsn)); + } + + instructions.remove(aaLoadInsn); + + return i; + } else if ( stackSize == loadStackSize && nextInsn.getOpcode() == ARRAYLENGTH ) { + if ( LWJGLUtil.DEBUG && loadInsn.getNext() != nextInsn ) + throw new InternalError(); + + instructions.remove(nextInsn); + loadInsn.var = var; + instructions.insert(loadInsn, new MethodInsnNode(INVOKEVIRTUAL, mappedSubtype.className, CAPACITY_METHOD_NAME, "()I")); + + return i + 1; + } else if ( stackSize < loadStackSize ) // Consumed by something other than AALOAD or ARRAYLENGTH + throw new ClassFormatError("Invalid " + mappedSubtype.className + " view array usage detected: " + getOpcodeName(nextInsn)); + } + } + + private static class FieldInfo { + + final long offset; + final long length; + final long lengthPadded; + final Type type; + final boolean isVolatile; + final boolean isPointer; + + FieldInfo(final long offset, final long length, final long lengthPadded, final Type type, final boolean isVolatile, final boolean isPointer) { + this.offset = offset; + this.length = length; + this.lengthPadded = lengthPadded; + this.type = type; + this.isVolatile = isVolatile; + this.isPointer = isPointer; + } + + String getAccessType() { + return isPointer ? "a" : type.getDescriptor().toLowerCase() + (isVolatile ? "v" : ""); + } + + } + + private static class MappedSubtypeInfo { + + final String className; + + final int sizeof; + final int sizeof_shift; + final int align; + final int padding; + final boolean cacheLinePadded; + + final Map fields; + + MappedSubtypeInfo(String className, Map fields, int sizeof, int align, int padding, final boolean cacheLinePadded) { + this.className = className; + + this.sizeof = sizeof; + if ( ((sizeof - 1) & sizeof) == 0 ) + this.sizeof_shift = getPoT(sizeof); + else + this.sizeof_shift = 0; + this.align = align; + this.padding = padding; + this.cacheLinePadded = cacheLinePadded; + + this.fields = fields; + } + + private static int getPoT(int value) { + int pot = -1; + while ( value > 0 ) { + pot++; + value >>= 1; + } + return pot; + } + + } + + // ------------------------------------------------------- + // -------------------[ MACROS & UTILS ]------------------ + // ------------------------------------------------------- + + private static void getClassEnums(final Class clazz, final Map map, final String... prefixFilters) { + try { + OUTER: + for ( Field field : clazz.getFields() ) { + if ( !Modifier.isStatic(field.getModifiers()) || field.getType() != int.class ) + continue; + + for ( String filter : prefixFilters ) { + if ( field.getName().startsWith(filter) ) + continue OUTER; + } + + if ( map.put((Integer)field.get(null), field.getName()) != null ) + throw new IllegalStateException(); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + static String getOpcodeName(final AbstractInsnNode insn) { + final String op = OPCODE_TO_NAME.get(insn.getOpcode()); + return INSNTYPE_TO_NAME.get(insn.getType()) + ": " + insn.getOpcode() + (op == null ? "" : " [" + OPCODE_TO_NAME.get(insn.getOpcode()) + "]"); + } + + static String jvmClassName(Class type) { + return type.getName().replace('.', '/'); + } + + static String getterName(final String fieldName) { + return "get$" + Character.toUpperCase(fieldName.charAt(0)) + fieldName.substring(1) + "$LWJGL"; + } + + static String setterName(final String fieldName) { + return "set$" + Character.toUpperCase(fieldName.charAt(0)) + fieldName.substring(1) + "$LWJGL"; + } + + private static void checkInsnAfterIsArray(final AbstractInsnNode instruction, final int opcode) { + if ( instruction == null ) + throw new ClassFormatError("Unexpected end of instructions after .asArray() method."); + + if ( instruction.getOpcode() != opcode ) + throw new ClassFormatError("The result of .asArray() must be stored to a local variable. Found: " + getOpcodeName(instruction)); + } + + static AbstractInsnNode getIntNode(final int value) { + if ( value <= 5 && -1 <= value ) + return new InsnNode(ICONST_M1 + value + 1); + + if ( value >= Byte.MIN_VALUE && value <= Byte.MAX_VALUE ) + return new IntInsnNode(BIPUSH, value); + + if ( value >= Short.MIN_VALUE && value <= Short.MAX_VALUE ) + return new IntInsnNode(SIPUSH, value); + + return new LdcInsnNode(value); + } + + static void visitIntNode(final MethodVisitor mv, final int value) { + if ( value <= 5 && -1 <= value ) + mv.visitInsn(ICONST_M1 + value + 1); + else if ( value >= Byte.MIN_VALUE && value <= Byte.MAX_VALUE ) + mv.visitIntInsn(BIPUSH, value); + else if ( value >= Short.MIN_VALUE && value <= Short.MAX_VALUE ) + mv.visitIntInsn(SIPUSH, value); + else + mv.visitLdcInsn(value); + } + + /** Replace an instruction with a list of instructions. */ + static int replace(final InsnList instructions, final int i, final AbstractInsnNode location, final InsnList list) { + final int size = list.size(); + + instructions.insert(location, list); + instructions.remove(location); + + return i + (size - 1); + } + + private static void throwAccessErrorOnReadOnlyField(String className, String fieldName) { + throw new IllegalAccessError("The " + className + "." + fieldName + " field is final."); + } + + private static void printBytecode(byte[] bytecode) { + StringWriter sw = new StringWriter(); + ClassVisitor tracer = new TraceClassVisitor(new ClassWriter(0), new PrintWriter(sw)); + new ClassReader(bytecode).accept(tracer, 0); + String dump = sw.toString(); + + LWJGLUtil.log(dump); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedObjectUnsafe.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedObjectUnsafe.java new file mode 100644 index 0000000..2f25f48 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedObjectUnsafe.java @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.mapped; + +import java.lang.reflect.Field; +import java.lang.reflect.Modifier; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +import sun.misc.Unsafe; + +/** + * [INTERNAL USE ONLY] + * + * @author Riven + */ +final class MappedObjectUnsafe { + + static final Unsafe INSTANCE = getUnsafeInstance(); + + private static final long BUFFER_ADDRESS_OFFSET = getObjectFieldOffset(ByteBuffer.class, "address"); + private static final long BUFFER_CAPACITY_OFFSET = getObjectFieldOffset(ByteBuffer.class, "capacity"); + + private static final ByteBuffer global = ByteBuffer.allocateDirect(4 * 1024); + + static ByteBuffer newBuffer(long address, int capacity) { + if ( address <= 0L || capacity < 0 ) + throw new IllegalStateException("you almost crashed the jvm"); + + ByteBuffer buffer = global.duplicate().order(ByteOrder.nativeOrder()); + INSTANCE.putLong(buffer, BUFFER_ADDRESS_OFFSET, address); + INSTANCE.putInt(buffer, BUFFER_CAPACITY_OFFSET, capacity); + buffer.position(0); + buffer.limit(capacity); + return buffer; + } + + private static long getObjectFieldOffset(Class type, String fieldName) { + while ( type != null ) { + try { + return INSTANCE.objectFieldOffset(type.getDeclaredField(fieldName)); + } catch (Throwable t) { + type = type.getSuperclass(); + } + } + + throw new UnsupportedOperationException(); + } + + private static Unsafe getUnsafeInstance() { + final Field[] fields = Unsafe.class.getDeclaredFields(); + + /* + Different runtimes use different names for the Unsafe singleton, + so we cannot use .getDeclaredField and we scan instead. For example: + + Oracle: theUnsafe + PERC : m_unsafe_instance + Android: THE_ONE + */ + for ( Field field : fields ) { + if ( !field.getType().equals(Unsafe.class) ) + continue; + + final int modifiers = field.getModifiers(); + if ( !(Modifier.isStatic(modifiers) && Modifier.isFinal(modifiers)) ) + continue; + + field.setAccessible(true); + try { + return (Unsafe)field.get(null); + } catch (IllegalAccessException e) { + // ignore + } + break; + } + + throw new UnsupportedOperationException(); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedSet.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedSet.java new file mode 100644 index 0000000..925ac15 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedSet.java @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.mapped; + +/** + * Factory for mapped sets. A mapped set can be used as a Structure of Arrays by + * linking together the view of two or more mapped objects. Changing the view + * of the mapped set, changes the corresponding view of all the mapped objects in + * the set. + */ +public class MappedSet { + + /** + * Creates a MappedSet by linking the specified MappedObjects. + * + * @return the mapped set. + */ + public static MappedSet2 create(MappedObject a, MappedObject b) { + return new MappedSet2(a, b); + } + + /** + * Creates a MappedSet by linking the specified MappedObjects. + * + * @return the mapped set. + */ + public static MappedSet3 create(MappedObject a, MappedObject b, MappedObject c) { + return new MappedSet3(a, b, c); + } + + /** + * Creates a MappedSet by linking the specified MappedObjects. + * + * @return the mapped set. + */ + public static MappedSet4 create(MappedObject a, MappedObject b, MappedObject c, MappedObject d) { + return new MappedSet4(a, b, c, d); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedSet2.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedSet2.java new file mode 100644 index 0000000..aedaaff --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedSet2.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.mapped; + +/** MappedSet implementation for two MappedObjects. */ +public class MappedSet2 { + + private final MappedObject a, b; + + MappedSet2(MappedObject a, MappedObject b) { + this.a = a; + this.b = b; + } + + public int view; + + void view(int view) { + a.setViewAddress(a.getViewAddress(view)); + b.setViewAddress(b.getViewAddress(view)); + } + + public void next() { + this.a.next(); + this.b.next(); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedSet3.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedSet3.java new file mode 100644 index 0000000..a2f3369 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedSet3.java @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.mapped; + +/** MappedSet implementation for three MappedObjects. */ +public class MappedSet3 { + + private final MappedObject a, b, c; + + MappedSet3(MappedObject a, MappedObject b, MappedObject c) { + this.a = a; + this.b = b; + this.c = c; + } + + public int view; + + void view(int view) { + a.setViewAddress(a.getViewAddress(view)); + b.setViewAddress(b.getViewAddress(view)); + c.setViewAddress(c.getViewAddress(view)); + } + + public void next() { + this.a.next(); + this.b.next(); + this.c.next(); + } + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedSet4.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedSet4.java new file mode 100644 index 0000000..749fc6a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedSet4.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.mapped; + +/** MappedSet implementation for four MappedObjects. */ +public class MappedSet4 { + + private final MappedObject a, b, c, d; + + MappedSet4(MappedObject a, MappedObject b, MappedObject c, MappedObject d) { + this.a = a; + this.b = b; + this.c = c; + this.d = d; + } + + public int view; + + void view(int view) { + a.setViewAddress(a.getViewAddress(view)); + b.setViewAddress(b.getViewAddress(view)); + c.setViewAddress(c.getViewAddress(view)); + d.setViewAddress(d.getViewAddress(view)); + } + + public void next() { + this.a.next(); + this.b.next(); + this.c.next(); + this.d.next(); + } +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedType.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedType.java new file mode 100644 index 0000000..a059010 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/MappedType.java @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.mapped; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * This annotation marks a class as a mapped object, which will go under bytecode + * transformation at runtime. Mapped objects cannot be instantiated directly; a data + * buffer must be mapped first and the mapped object instance will then be used as a + * view on top of the buffer. Instead of a separate instance per "element" in the buffer, + * only a single instance is used to manage everything. See {@link MappedObject} + * for API details and {@link org.lwjgl.test.mapped.TestMappedObject} for examples. + *

+ * The instance fields of the annotated class should only be limited to primitive types or + * {@link java.nio.ByteBuffer}. Static fields are supported and they can have any type. + *

+ * The purpose of mapped objects is to reduce the memory requirements required for the type + * of data that are often used in OpenGL/OpenCL programming, while at the same time enabling + * clean Java code. There are also performance benefits related to not having to copy data + * between buffers and Java objects and the removal of bounds checking when accessing + * buffer data. + * + * @author Riven + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +public @interface MappedType { + + /** + * The number of bytes to add to the total byte size. + * SIZEOF will be calculated as SIZEOF = max(field_offset + field_length) + padding. + *

+ * Cannot be used with {@link #cacheLinePadding()}. + * + * @return the padding amount + */ + int padding() default 0; + + /** + * When true, SIZEOF will be increased (if necessary) so that it's a multiple of the CPU cache line size. + * Additionally, {@link MappedObject#malloc(int)} on the mapped object type will automatically use + * {@link CacheUtil#createByteBuffer(int)} instead of the unaligned {@link org.lwjgl.BufferUtils#createByteBuffer(int)}. + *

+ * Cannot be used with {@link #padding()}. + * + * @return if cache-line padding should be applied + * + * @see CacheUtil + */ + boolean cacheLinePadding() default false; + + /** + * The mapped data memory alignment, in bytes. + * + * @return the memory alignment + */ + int align() default 4; + + /** + * When autoGenerateOffsets is true, byte offsets of the mapped fields will + * be generated automatically. This is convenient for packed data. For manually + * aligned data, autoGenerateOffsets must be set to false and the user needs + * to manually specify byte offsets using the {@link MappedField} annotation. + * + * @return true if automatic byte offset generation is required. + */ + boolean autoGenerateOffsets() default true; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/Pointer.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/Pointer.java new file mode 100644 index 0000000..9b55b24 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/mapped/Pointer.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.mapped; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * This annotation can be used on long fields of {@link MappedObject} subclasses, + * to specify that the long value should be interpreted as a pointer. This + * will determine the actual byte size of the field at runtime (4 or 8 bytes). + * + * @author Spasi + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.FIELD) +public @interface Pointer { + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/Matrix.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/Matrix.java new file mode 100644 index 0000000..cb8f8fb --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/Matrix.java @@ -0,0 +1,134 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.vector; + +import java.io.Serializable; +import java.nio.FloatBuffer; + +/** + * + * Base class for matrices. When a matrix is constructed it will be the identity + * matrix unless otherwise stated. + * + * @author cix_foo + * @version $Revision$ + * $Id$ + */ +public abstract class Matrix implements Serializable { + + /** + * Constructor for Matrix. + */ + protected Matrix() { + super(); + } + + /** + * Set this matrix to be the identity matrix. + * @return this + */ + public abstract Matrix setIdentity(); + + + /** + * Invert this matrix + * @return this + */ + public abstract Matrix invert(); + + + /** + * Load from a float buffer. The buffer stores the matrix in column major + * (OpenGL) order. + * + * @param buf A float buffer to read from + * @return this + */ + public abstract Matrix load(FloatBuffer buf); + + + /** + * Load from a float buffer. The buffer stores the matrix in row major + * (mathematical) order. + * + * @param buf A float buffer to read from + * @return this + */ + public abstract Matrix loadTranspose(FloatBuffer buf); + + + /** + * Negate this matrix + * @return this + */ + public abstract Matrix negate(); + + + /** + * Store this matrix in a float buffer. The matrix is stored in column + * major (openGL) order. + * @param buf The buffer to store this matrix in + * @return this + */ + public abstract Matrix store(FloatBuffer buf); + + + /** + * Store this matrix in a float buffer. The matrix is stored in row + * major (maths) order. + * @param buf The buffer to store this matrix in + * @return this + */ + public abstract Matrix storeTranspose(FloatBuffer buf); + + + /** + * Transpose this matrix + * @return this + */ + public abstract Matrix transpose(); + + + /** + * Set this matrix to 0. + * @return this + */ + public abstract Matrix setZero(); + + + /** + * @return the determinant of the matrix + */ + public abstract float determinant(); + + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/Matrix2f.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/Matrix2f.java new file mode 100644 index 0000000..aee8566 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/Matrix2f.java @@ -0,0 +1,400 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.vector; + +import java.io.Serializable; +import java.nio.FloatBuffer; + +/** + * + * Holds a 2x2 matrix + * + * @author cix_foo + * @version $Revision$ + * $Id$ + */ + +public class Matrix2f extends Matrix implements Serializable { + + private static final long serialVersionUID = 1L; + + public float m00, m01, m10, m11; + + /** + * Constructor for Matrix2f. The matrix is initialised to the identity. + */ + public Matrix2f() { + setIdentity(); + } + + /** + * Constructor + */ + public Matrix2f(Matrix2f src) { + load(src); + } + + /** + * Load from another matrix + * @param src The source matrix + * @return this + */ + public Matrix2f load(Matrix2f src) { + return load(src, this); + } + + /** + * Copy the source matrix to the destination matrix. + * @param src The source matrix + * @param dest The destination matrix, or null if a new one should be created. + * @return The copied matrix + */ + public static Matrix2f load(Matrix2f src, Matrix2f dest) { + if (dest == null) + dest = new Matrix2f(); + + dest.m00 = src.m00; + dest.m01 = src.m01; + dest.m10 = src.m10; + dest.m11 = src.m11; + + return dest; + } + + /** + * Load from a float buffer. The buffer stores the matrix in column major + * (OpenGL) order. + * + * @param buf A float buffer to read from + * @return this + */ + public Matrix load(FloatBuffer buf) { + + m00 = buf.get(); + m01 = buf.get(); + m10 = buf.get(); + m11 = buf.get(); + + return this; + } + + /** + * Load from a float buffer. The buffer stores the matrix in row major + * (mathematical) order. + * + * @param buf A float buffer to read from + * @return this + */ + public Matrix loadTranspose(FloatBuffer buf) { + + m00 = buf.get(); + m10 = buf.get(); + m01 = buf.get(); + m11 = buf.get(); + + return this; + } + + /** + * Store this matrix in a float buffer. The matrix is stored in column + * major (openGL) order. + * @param buf The buffer to store this matrix in + */ + public Matrix store(FloatBuffer buf) { + buf.put(m00); + buf.put(m01); + buf.put(m10); + buf.put(m11); + return this; + } + + /** + * Store this matrix in a float buffer. The matrix is stored in row + * major (maths) order. + * @param buf The buffer to store this matrix in + */ + public Matrix storeTranspose(FloatBuffer buf) { + buf.put(m00); + buf.put(m10); + buf.put(m01); + buf.put(m11); + return this; + } + + + + /** + * Add two matrices together and place the result in a third matrix. + * @param left The left source matrix + * @param right The right source matrix + * @param dest The destination matrix, or null if a new one is to be created + * @return the destination matrix + */ + public static Matrix2f add(Matrix2f left, Matrix2f right, Matrix2f dest) { + if (dest == null) + dest = new Matrix2f(); + + dest.m00 = left.m00 + right.m00; + dest.m01 = left.m01 + right.m01; + dest.m10 = left.m10 + right.m10; + dest.m11 = left.m11 + right.m11; + + return dest; + } + + /** + * Subtract the right matrix from the left and place the result in a third matrix. + * @param left The left source matrix + * @param right The right source matrix + * @param dest The destination matrix, or null if a new one is to be created + * @return the destination matrix + */ + public static Matrix2f sub(Matrix2f left, Matrix2f right, Matrix2f dest) { + if (dest == null) + dest = new Matrix2f(); + + dest.m00 = left.m00 - right.m00; + dest.m01 = left.m01 - right.m01; + dest.m10 = left.m10 - right.m10; + dest.m11 = left.m11 - right.m11; + + return dest; + } + + /** + * Multiply the right matrix by the left and place the result in a third matrix. + * @param left The left source matrix + * @param right The right source matrix + * @param dest The destination matrix, or null if a new one is to be created + * @return the destination matrix + */ + public static Matrix2f mul(Matrix2f left, Matrix2f right, Matrix2f dest) { + if (dest == null) + dest = new Matrix2f(); + + float m00 = left.m00 * right.m00 + left.m10 * right.m01; + float m01 = left.m01 * right.m00 + left.m11 * right.m01; + float m10 = left.m00 * right.m10 + left.m10 * right.m11; + float m11 = left.m01 * right.m10 + left.m11 * right.m11; + + dest.m00 = m00; + dest.m01 = m01; + dest.m10 = m10; + dest.m11 = m11; + + return dest; + } + + /** + * Transform a Vector by a matrix and return the result in a destination + * vector. + * @param left The left matrix + * @param right The right vector + * @param dest The destination vector, or null if a new one is to be created + * @return the destination vector + */ + public static Vector2f transform(Matrix2f left, Vector2f right, Vector2f dest) { + if (dest == null) + dest = new Vector2f(); + + float x = left.m00 * right.x + left.m10 * right.y; + float y = left.m01 * right.x + left.m11 * right.y; + + dest.x = x; + dest.y = y; + + return dest; + } + + /** + * Transpose this matrix + * @return this + */ + public Matrix transpose() { + return transpose(this); + } + + /** + * Transpose this matrix and place the result in another matrix. + * @param dest The destination matrix or null if a new matrix is to be created + * @return the transposed matrix + */ + public Matrix2f transpose(Matrix2f dest) { + return transpose(this, dest); + } + + /** + * Transpose the source matrix and place the result in the destination matrix. + * @param src The source matrix or null if a new matrix is to be created + * @param dest The destination matrix or null if a new matrix is to be created + * @return the transposed matrix + */ + public static Matrix2f transpose(Matrix2f src, Matrix2f dest) { + if (dest == null) + dest = new Matrix2f(); + + float m01 = src.m10; + float m10 = src.m01; + + dest.m01 = m01; + dest.m10 = m10; + + return dest; + } + + /** + * Invert this matrix + * @return this if successful, null otherwise + */ + public Matrix invert() { + return invert(this, this); + } + + /** + * Invert the source matrix and place the result in the destination matrix. + * @param src The source matrix to be inverted + * @param dest The destination matrix or null if a new matrix is to be created + * @return The inverted matrix, or null if source can't be reverted. + */ + public static Matrix2f invert(Matrix2f src, Matrix2f dest) { + /* + *inv(A) = 1/det(A) * adj(A); + */ + + float determinant = src.determinant(); + if (determinant != 0) { + if (dest == null) + dest = new Matrix2f(); + float determinant_inv = 1f/determinant; + float t00 = src.m11*determinant_inv; + float t01 = -src.m01*determinant_inv; + float t11 = src.m00*determinant_inv; + float t10 = -src.m10*determinant_inv; + + dest.m00 = t00; + dest.m01 = t01; + dest.m10 = t10; + dest.m11 = t11; + return dest; + } else + return null; + } + + /** + * Returns a string representation of this matrix + */ + public String toString() { + StringBuilder buf = new StringBuilder(); + buf.append(m00).append(' ').append(m10).append(' ').append('\n'); + buf.append(m01).append(' ').append(m11).append(' ').append('\n'); + return buf.toString(); + } + + /** + * Negate this matrix + * @return this + */ + public Matrix negate() { + return negate(this); + } + + /** + * Negate this matrix and stash the result in another matrix. + * @param dest The destination matrix, or null if a new matrix is to be created + * @return the negated matrix + */ + public Matrix2f negate(Matrix2f dest) { + return negate(this, dest); + } + + /** + * Negate the source matrix and stash the result in the destination matrix. + * @param src The source matrix to be negated + * @param dest The destination matrix, or null if a new matrix is to be created + * @return the negated matrix + */ + public static Matrix2f negate(Matrix2f src, Matrix2f dest) { + if (dest == null) + dest = new Matrix2f(); + + dest.m00 = -src.m00; + dest.m01 = -src.m01; + dest.m10 = -src.m10; + dest.m11 = -src.m11; + + return dest; + } + + /** + * Set this matrix to be the identity matrix. + * @return this + */ + public Matrix setIdentity() { + return setIdentity(this); + } + + /** + * Set the source matrix to be the identity matrix. + * @param src The matrix to set to the identity. + * @return The source matrix + */ + public static Matrix2f setIdentity(Matrix2f src) { + src.m00 = 1.0f; + src.m01 = 0.0f; + src.m10 = 0.0f; + src.m11 = 1.0f; + return src; + } + + /** + * Set this matrix to 0. + * @return this + */ + public Matrix setZero() { + return setZero(this); + } + + public static Matrix2f setZero(Matrix2f src) { + src.m00 = 0.0f; + src.m01 = 0.0f; + src.m10 = 0.0f; + src.m11 = 0.0f; + return src; + } + + /* (non-Javadoc) + * @see org.lwjgl.vector.Matrix#determinant() + */ + public float determinant() { + return m00 * m11 - m01*m10; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/Matrix3f.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/Matrix3f.java new file mode 100644 index 0000000..01c55dc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/Matrix3f.java @@ -0,0 +1,510 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.vector; + +import java.io.Serializable; +import java.nio.FloatBuffer; + +/** + * + * Holds a 3x3 matrix. + * + * @author cix_foo + * @version $Revision$ + * $Id$ + */ + +public class Matrix3f extends Matrix implements Serializable { + + private static final long serialVersionUID = 1L; + + public float m00, + m01, + m02, + m10, + m11, + m12, + m20, + m21, + m22; + + /** + * Constructor for Matrix3f. Matrix is initialised to the identity. + */ + public Matrix3f() { + super(); + setIdentity(); + } + + /** + * Load from another matrix + * @param src The source matrix + * @return this + */ + public Matrix3f load(Matrix3f src) { + return load(src, this); + } + + /** + * Copy source matrix to destination matrix + * @param src The source matrix + * @param dest The destination matrix, or null of a new matrix is to be created + * @return The copied matrix + */ + public static Matrix3f load(Matrix3f src, Matrix3f dest) { + if (dest == null) + dest = new Matrix3f(); + + dest.m00 = src.m00; + dest.m10 = src.m10; + dest.m20 = src.m20; + dest.m01 = src.m01; + dest.m11 = src.m11; + dest.m21 = src.m21; + dest.m02 = src.m02; + dest.m12 = src.m12; + dest.m22 = src.m22; + + return dest; + } + + /** + * Load from a float buffer. The buffer stores the matrix in column major + * (OpenGL) order. + * + * @param buf A float buffer to read from + * @return this + */ + public Matrix load(FloatBuffer buf) { + + m00 = buf.get(); + m01 = buf.get(); + m02 = buf.get(); + m10 = buf.get(); + m11 = buf.get(); + m12 = buf.get(); + m20 = buf.get(); + m21 = buf.get(); + m22 = buf.get(); + + return this; + } + + /** + * Load from a float buffer. The buffer stores the matrix in row major + * (maths) order. + * + * @param buf A float buffer to read from + * @return this + */ + public Matrix loadTranspose(FloatBuffer buf) { + + m00 = buf.get(); + m10 = buf.get(); + m20 = buf.get(); + m01 = buf.get(); + m11 = buf.get(); + m21 = buf.get(); + m02 = buf.get(); + m12 = buf.get(); + m22 = buf.get(); + + return this; + } + + /** + * Store this matrix in a float buffer. The matrix is stored in column + * major (openGL) order. + * @param buf The buffer to store this matrix in + */ + public Matrix store(FloatBuffer buf) { + buf.put(m00); + buf.put(m01); + buf.put(m02); + buf.put(m10); + buf.put(m11); + buf.put(m12); + buf.put(m20); + buf.put(m21); + buf.put(m22); + return this; + } + + /** + * Store this matrix in a float buffer. The matrix is stored in row + * major (maths) order. + * @param buf The buffer to store this matrix in + */ + public Matrix storeTranspose(FloatBuffer buf) { + buf.put(m00); + buf.put(m10); + buf.put(m20); + buf.put(m01); + buf.put(m11); + buf.put(m21); + buf.put(m02); + buf.put(m12); + buf.put(m22); + return this; + } + + /** + * Add two matrices together and place the result in a third matrix. + * @param left The left source matrix + * @param right The right source matrix + * @param dest The destination matrix, or null if a new one is to be created + * @return the destination matrix + */ + public static Matrix3f add(Matrix3f left, Matrix3f right, Matrix3f dest) { + if (dest == null) + dest = new Matrix3f(); + + dest.m00 = left.m00 + right.m00; + dest.m01 = left.m01 + right.m01; + dest.m02 = left.m02 + right.m02; + dest.m10 = left.m10 + right.m10; + dest.m11 = left.m11 + right.m11; + dest.m12 = left.m12 + right.m12; + dest.m20 = left.m20 + right.m20; + dest.m21 = left.m21 + right.m21; + dest.m22 = left.m22 + right.m22; + + return dest; + } + + /** + * Subtract the right matrix from the left and place the result in a third matrix. + * @param left The left source matrix + * @param right The right source matrix + * @param dest The destination matrix, or null if a new one is to be created + * @return the destination matrix + */ + public static Matrix3f sub(Matrix3f left, Matrix3f right, Matrix3f dest) { + if (dest == null) + dest = new Matrix3f(); + + dest.m00 = left.m00 - right.m00; + dest.m01 = left.m01 - right.m01; + dest.m02 = left.m02 - right.m02; + dest.m10 = left.m10 - right.m10; + dest.m11 = left.m11 - right.m11; + dest.m12 = left.m12 - right.m12; + dest.m20 = left.m20 - right.m20; + dest.m21 = left.m21 - right.m21; + dest.m22 = left.m22 - right.m22; + + return dest; + } + + /** + * Multiply the right matrix by the left and place the result in a third matrix. + * @param left The left source matrix + * @param right The right source matrix + * @param dest The destination matrix, or null if a new one is to be created + * @return the destination matrix + */ + public static Matrix3f mul(Matrix3f left, Matrix3f right, Matrix3f dest) { + if (dest == null) + dest = new Matrix3f(); + + float m00 = + left.m00 * right.m00 + left.m10 * right.m01 + left.m20 * right.m02; + float m01 = + left.m01 * right.m00 + left.m11 * right.m01 + left.m21 * right.m02; + float m02 = + left.m02 * right.m00 + left.m12 * right.m01 + left.m22 * right.m02; + float m10 = + left.m00 * right.m10 + left.m10 * right.m11 + left.m20 * right.m12; + float m11 = + left.m01 * right.m10 + left.m11 * right.m11 + left.m21 * right.m12; + float m12 = + left.m02 * right.m10 + left.m12 * right.m11 + left.m22 * right.m12; + float m20 = + left.m00 * right.m20 + left.m10 * right.m21 + left.m20 * right.m22; + float m21 = + left.m01 * right.m20 + left.m11 * right.m21 + left.m21 * right.m22; + float m22 = + left.m02 * right.m20 + left.m12 * right.m21 + left.m22 * right.m22; + + dest.m00 = m00; + dest.m01 = m01; + dest.m02 = m02; + dest.m10 = m10; + dest.m11 = m11; + dest.m12 = m12; + dest.m20 = m20; + dest.m21 = m21; + dest.m22 = m22; + + return dest; + } + + /** + * Transform a Vector by a matrix and return the result in a destination + * vector. + * @param left The left matrix + * @param right The right vector + * @param dest The destination vector, or null if a new one is to be created + * @return the destination vector + */ + public static Vector3f transform(Matrix3f left, Vector3f right, Vector3f dest) { + if (dest == null) + dest = new Vector3f(); + + float x = left.m00 * right.x + left.m10 * right.y + left.m20 * right.z; + float y = left.m01 * right.x + left.m11 * right.y + left.m21 * right.z; + float z = left.m02 * right.x + left.m12 * right.y + left.m22 * right.z; + + dest.x = x; + dest.y = y; + dest.z = z; + + return dest; + } + + /** + * Transpose this matrix + * @return this + */ + public Matrix transpose() { + return transpose(this, this); + } + + /** + * Transpose this matrix and place the result in another matrix + * @param dest The destination matrix or null if a new matrix is to be created + * @return the transposed matrix + */ + public Matrix3f transpose(Matrix3f dest) { + return transpose(this, dest); + } + + /** + * Transpose the source matrix and place the result into the destination matrix + * @param src The source matrix to be transposed + * @param dest The destination matrix or null if a new matrix is to be created + * @return the transposed matrix + */ + public static Matrix3f transpose(Matrix3f src, Matrix3f dest) { + if (dest == null) + dest = new Matrix3f(); + float m00 = src.m00; + float m01 = src.m10; + float m02 = src.m20; + float m10 = src.m01; + float m11 = src.m11; + float m12 = src.m21; + float m20 = src.m02; + float m21 = src.m12; + float m22 = src.m22; + + dest.m00 = m00; + dest.m01 = m01; + dest.m02 = m02; + dest.m10 = m10; + dest.m11 = m11; + dest.m12 = m12; + dest.m20 = m20; + dest.m21 = m21; + dest.m22 = m22; + return dest; + } + + /** + * @return the determinant of the matrix + */ + public float determinant() { + float f = + m00 * (m11 * m22 - m12 * m21) + + m01 * (m12 * m20 - m10 * m22) + + m02 * (m10 * m21 - m11 * m20); + return f; + } + + /** + * Returns a string representation of this matrix + */ + public String toString() { + StringBuilder buf = new StringBuilder(); + buf.append(m00).append(' ').append(m10).append(' ').append(m20).append(' ').append('\n'); + buf.append(m01).append(' ').append(m11).append(' ').append(m21).append(' ').append('\n'); + buf.append(m02).append(' ').append(m12).append(' ').append(m22).append(' ').append('\n'); + return buf.toString(); + } + + /** + * Invert this matrix + * @return this if successful, null otherwise + */ + public Matrix invert() { + return invert(this, this); + } + + /** + * Invert the source matrix and put the result into the destination matrix + * @param src The source matrix to be inverted + * @param dest The destination matrix, or null if a new one is to be created + * @return The inverted matrix if successful, null otherwise + */ + public static Matrix3f invert(Matrix3f src, Matrix3f dest) { + float determinant = src.determinant(); + + if (determinant != 0) { + if (dest == null) + dest = new Matrix3f(); + /* do it the ordinary way + * + * inv(A) = 1/det(A) * adj(T), where adj(T) = transpose(Conjugate Matrix) + * + * m00 m01 m02 + * m10 m11 m12 + * m20 m21 m22 + */ + float determinant_inv = 1f/determinant; + + // get the conjugate matrix + float t00 = src.m11 * src.m22 - src.m12* src.m21; + float t01 = - src.m10 * src.m22 + src.m12 * src.m20; + float t02 = src.m10 * src.m21 - src.m11 * src.m20; + float t10 = - src.m01 * src.m22 + src.m02 * src.m21; + float t11 = src.m00 * src.m22 - src.m02 * src.m20; + float t12 = - src.m00 * src.m21 + src.m01 * src.m20; + float t20 = src.m01 * src.m12 - src.m02 * src.m11; + float t21 = -src.m00 * src.m12 + src.m02 * src.m10; + float t22 = src.m00 * src.m11 - src.m01 * src.m10; + + dest.m00 = t00*determinant_inv; + dest.m11 = t11*determinant_inv; + dest.m22 = t22*determinant_inv; + dest.m01 = t10*determinant_inv; + dest.m10 = t01*determinant_inv; + dest.m20 = t02*determinant_inv; + dest.m02 = t20*determinant_inv; + dest.m12 = t21*determinant_inv; + dest.m21 = t12*determinant_inv; + return dest; + } else + return null; + } + + + /** + * Negate this matrix + * @return this + */ + public Matrix negate() { + return negate(this); + } + + /** + * Negate this matrix and place the result in a destination matrix. + * @param dest The destination matrix, or null if a new matrix is to be created + * @return the negated matrix + */ + public Matrix3f negate(Matrix3f dest) { + return negate(this, dest); + } + + /** + * Negate the source matrix and place the result in the destination matrix. + * @param src The source matrix + * @param dest The destination matrix, or null if a new matrix is to be created + * @return the negated matrix + */ + public static Matrix3f negate(Matrix3f src, Matrix3f dest) { + if (dest == null) + dest = new Matrix3f(); + + dest.m00 = -src.m00; + dest.m01 = -src.m02; + dest.m02 = -src.m01; + dest.m10 = -src.m10; + dest.m11 = -src.m12; + dest.m12 = -src.m11; + dest.m20 = -src.m20; + dest.m21 = -src.m22; + dest.m22 = -src.m21; + return dest; + } + + /** + * Set this matrix to be the identity matrix. + * @return this + */ + public Matrix setIdentity() { + return setIdentity(this); + } + + /** + * Set the matrix to be the identity matrix. + * @param m The matrix to be set to the identity + * @return m + */ + public static Matrix3f setIdentity(Matrix3f m) { + m.m00 = 1.0f; + m.m01 = 0.0f; + m.m02 = 0.0f; + m.m10 = 0.0f; + m.m11 = 1.0f; + m.m12 = 0.0f; + m.m20 = 0.0f; + m.m21 = 0.0f; + m.m22 = 1.0f; + return m; + } + + /** + * Set this matrix to 0. + * @return this + */ + public Matrix setZero() { + return setZero(this); + } + + /** + * Set the matrix matrix to 0. + * @param m The matrix to be set to 0 + * @return m + */ + public static Matrix3f setZero(Matrix3f m) { + m.m00 = 0.0f; + m.m01 = 0.0f; + m.m02 = 0.0f; + m.m10 = 0.0f; + m.m11 = 0.0f; + m.m12 = 0.0f; + m.m20 = 0.0f; + m.m21 = 0.0f; + m.m22 = 0.0f; + return m; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/Matrix4f.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/Matrix4f.java new file mode 100644 index 0000000..3a291b3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/Matrix4f.java @@ -0,0 +1,849 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.vector; + +import java.io.Serializable; +import java.nio.FloatBuffer; + +/** + * Holds a 4x4 float matrix. + * + * @author foo + */ +public class Matrix4f extends Matrix implements Serializable { + private static final long serialVersionUID = 1L; + + public float m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33; + + /** + * Construct a new matrix, initialized to the identity. + */ + public Matrix4f() { + super(); + setIdentity(); + } + + public Matrix4f(final Matrix4f src) { + super(); + load(src); + } + + /** + * Returns a string representation of this matrix + */ + public String toString() { + StringBuilder buf = new StringBuilder(); + buf.append(m00).append(' ').append(m10).append(' ').append(m20).append(' ').append(m30).append('\n'); + buf.append(m01).append(' ').append(m11).append(' ').append(m21).append(' ').append(m31).append('\n'); + buf.append(m02).append(' ').append(m12).append(' ').append(m22).append(' ').append(m32).append('\n'); + buf.append(m03).append(' ').append(m13).append(' ').append(m23).append(' ').append(m33).append('\n'); + return buf.toString(); + } + + /** + * Set this matrix to be the identity matrix. + * @return this + */ + public Matrix setIdentity() { + return setIdentity(this); + } + + /** + * Set the given matrix to be the identity matrix. + * @param m The matrix to set to the identity + * @return m + */ + public static Matrix4f setIdentity(Matrix4f m) { + m.m00 = 1.0f; + m.m01 = 0.0f; + m.m02 = 0.0f; + m.m03 = 0.0f; + m.m10 = 0.0f; + m.m11 = 1.0f; + m.m12 = 0.0f; + m.m13 = 0.0f; + m.m20 = 0.0f; + m.m21 = 0.0f; + m.m22 = 1.0f; + m.m23 = 0.0f; + m.m30 = 0.0f; + m.m31 = 0.0f; + m.m32 = 0.0f; + m.m33 = 1.0f; + + return m; + } + + /** + * Set this matrix to 0. + * @return this + */ + public Matrix setZero() { + return setZero(this); + } + + /** + * Set the given matrix to 0. + * @param m The matrix to set to 0 + * @return m + */ + public static Matrix4f setZero(Matrix4f m) { + m.m00 = 0.0f; + m.m01 = 0.0f; + m.m02 = 0.0f; + m.m03 = 0.0f; + m.m10 = 0.0f; + m.m11 = 0.0f; + m.m12 = 0.0f; + m.m13 = 0.0f; + m.m20 = 0.0f; + m.m21 = 0.0f; + m.m22 = 0.0f; + m.m23 = 0.0f; + m.m30 = 0.0f; + m.m31 = 0.0f; + m.m32 = 0.0f; + m.m33 = 0.0f; + + return m; + } + + /** + * Load from another matrix4f + * @param src The source matrix + * @return this + */ + public Matrix4f load(Matrix4f src) { + return load(src, this); + } + + /** + * Copy the source matrix to the destination matrix + * @param src The source matrix + * @param dest The destination matrix, or null of a new one is to be created + * @return The copied matrix + */ + public static Matrix4f load(Matrix4f src, Matrix4f dest) { + if (dest == null) + dest = new Matrix4f(); + dest.m00 = src.m00; + dest.m01 = src.m01; + dest.m02 = src.m02; + dest.m03 = src.m03; + dest.m10 = src.m10; + dest.m11 = src.m11; + dest.m12 = src.m12; + dest.m13 = src.m13; + dest.m20 = src.m20; + dest.m21 = src.m21; + dest.m22 = src.m22; + dest.m23 = src.m23; + dest.m30 = src.m30; + dest.m31 = src.m31; + dest.m32 = src.m32; + dest.m33 = src.m33; + + return dest; + } + + /** + * Load from a float buffer. The buffer stores the matrix in column major + * (OpenGL) order. + * + * @param buf A float buffer to read from + * @return this + */ + public Matrix load(FloatBuffer buf) { + + m00 = buf.get(); + m01 = buf.get(); + m02 = buf.get(); + m03 = buf.get(); + m10 = buf.get(); + m11 = buf.get(); + m12 = buf.get(); + m13 = buf.get(); + m20 = buf.get(); + m21 = buf.get(); + m22 = buf.get(); + m23 = buf.get(); + m30 = buf.get(); + m31 = buf.get(); + m32 = buf.get(); + m33 = buf.get(); + + return this; + } + + /** + * Load from a float buffer. The buffer stores the matrix in row major + * (maths) order. + * + * @param buf A float buffer to read from + * @return this + */ + public Matrix loadTranspose(FloatBuffer buf) { + + m00 = buf.get(); + m10 = buf.get(); + m20 = buf.get(); + m30 = buf.get(); + m01 = buf.get(); + m11 = buf.get(); + m21 = buf.get(); + m31 = buf.get(); + m02 = buf.get(); + m12 = buf.get(); + m22 = buf.get(); + m32 = buf.get(); + m03 = buf.get(); + m13 = buf.get(); + m23 = buf.get(); + m33 = buf.get(); + + return this; + } + + /** + * Store this matrix in a float buffer. The matrix is stored in column + * major (openGL) order. + * @param buf The buffer to store this matrix in + */ + public Matrix store(FloatBuffer buf) { + buf.put(m00); + buf.put(m01); + buf.put(m02); + buf.put(m03); + buf.put(m10); + buf.put(m11); + buf.put(m12); + buf.put(m13); + buf.put(m20); + buf.put(m21); + buf.put(m22); + buf.put(m23); + buf.put(m30); + buf.put(m31); + buf.put(m32); + buf.put(m33); + return this; + } + + /** + * Store this matrix in a float buffer. The matrix is stored in row + * major (maths) order. + * @param buf The buffer to store this matrix in + */ + public Matrix storeTranspose(FloatBuffer buf) { + buf.put(m00); + buf.put(m10); + buf.put(m20); + buf.put(m30); + buf.put(m01); + buf.put(m11); + buf.put(m21); + buf.put(m31); + buf.put(m02); + buf.put(m12); + buf.put(m22); + buf.put(m32); + buf.put(m03); + buf.put(m13); + buf.put(m23); + buf.put(m33); + return this; + } + + /** + * Store the rotation portion of this matrix in a float buffer. The matrix is stored in column + * major (openGL) order. + * @param buf The buffer to store this matrix in + */ + public Matrix store3f(FloatBuffer buf) { + buf.put(m00); + buf.put(m01); + buf.put(m02); + buf.put(m10); + buf.put(m11); + buf.put(m12); + buf.put(m20); + buf.put(m21); + buf.put(m22); + return this; + } + + /** + * Add two matrices together and place the result in a third matrix. + * @param left The left source matrix + * @param right The right source matrix + * @param dest The destination matrix, or null if a new one is to be created + * @return the destination matrix + */ + public static Matrix4f add(Matrix4f left, Matrix4f right, Matrix4f dest) { + if (dest == null) + dest = new Matrix4f(); + + dest.m00 = left.m00 + right.m00; + dest.m01 = left.m01 + right.m01; + dest.m02 = left.m02 + right.m02; + dest.m03 = left.m03 + right.m03; + dest.m10 = left.m10 + right.m10; + dest.m11 = left.m11 + right.m11; + dest.m12 = left.m12 + right.m12; + dest.m13 = left.m13 + right.m13; + dest.m20 = left.m20 + right.m20; + dest.m21 = left.m21 + right.m21; + dest.m22 = left.m22 + right.m22; + dest.m23 = left.m23 + right.m23; + dest.m30 = left.m30 + right.m30; + dest.m31 = left.m31 + right.m31; + dest.m32 = left.m32 + right.m32; + dest.m33 = left.m33 + right.m33; + + return dest; + } + + /** + * Subtract the right matrix from the left and place the result in a third matrix. + * @param left The left source matrix + * @param right The right source matrix + * @param dest The destination matrix, or null if a new one is to be created + * @return the destination matrix + */ + public static Matrix4f sub(Matrix4f left, Matrix4f right, Matrix4f dest) { + if (dest == null) + dest = new Matrix4f(); + + dest.m00 = left.m00 - right.m00; + dest.m01 = left.m01 - right.m01; + dest.m02 = left.m02 - right.m02; + dest.m03 = left.m03 - right.m03; + dest.m10 = left.m10 - right.m10; + dest.m11 = left.m11 - right.m11; + dest.m12 = left.m12 - right.m12; + dest.m13 = left.m13 - right.m13; + dest.m20 = left.m20 - right.m20; + dest.m21 = left.m21 - right.m21; + dest.m22 = left.m22 - right.m22; + dest.m23 = left.m23 - right.m23; + dest.m30 = left.m30 - right.m30; + dest.m31 = left.m31 - right.m31; + dest.m32 = left.m32 - right.m32; + dest.m33 = left.m33 - right.m33; + + return dest; + } + + /** + * Multiply the right matrix by the left and place the result in a third matrix. + * @param left The left source matrix + * @param right The right source matrix + * @param dest The destination matrix, or null if a new one is to be created + * @return the destination matrix + */ + public static Matrix4f mul(Matrix4f left, Matrix4f right, Matrix4f dest) { + if (dest == null) + dest = new Matrix4f(); + + float m00 = left.m00 * right.m00 + left.m10 * right.m01 + left.m20 * right.m02 + left.m30 * right.m03; + float m01 = left.m01 * right.m00 + left.m11 * right.m01 + left.m21 * right.m02 + left.m31 * right.m03; + float m02 = left.m02 * right.m00 + left.m12 * right.m01 + left.m22 * right.m02 + left.m32 * right.m03; + float m03 = left.m03 * right.m00 + left.m13 * right.m01 + left.m23 * right.m02 + left.m33 * right.m03; + float m10 = left.m00 * right.m10 + left.m10 * right.m11 + left.m20 * right.m12 + left.m30 * right.m13; + float m11 = left.m01 * right.m10 + left.m11 * right.m11 + left.m21 * right.m12 + left.m31 * right.m13; + float m12 = left.m02 * right.m10 + left.m12 * right.m11 + left.m22 * right.m12 + left.m32 * right.m13; + float m13 = left.m03 * right.m10 + left.m13 * right.m11 + left.m23 * right.m12 + left.m33 * right.m13; + float m20 = left.m00 * right.m20 + left.m10 * right.m21 + left.m20 * right.m22 + left.m30 * right.m23; + float m21 = left.m01 * right.m20 + left.m11 * right.m21 + left.m21 * right.m22 + left.m31 * right.m23; + float m22 = left.m02 * right.m20 + left.m12 * right.m21 + left.m22 * right.m22 + left.m32 * right.m23; + float m23 = left.m03 * right.m20 + left.m13 * right.m21 + left.m23 * right.m22 + left.m33 * right.m23; + float m30 = left.m00 * right.m30 + left.m10 * right.m31 + left.m20 * right.m32 + left.m30 * right.m33; + float m31 = left.m01 * right.m30 + left.m11 * right.m31 + left.m21 * right.m32 + left.m31 * right.m33; + float m32 = left.m02 * right.m30 + left.m12 * right.m31 + left.m22 * right.m32 + left.m32 * right.m33; + float m33 = left.m03 * right.m30 + left.m13 * right.m31 + left.m23 * right.m32 + left.m33 * right.m33; + + dest.m00 = m00; + dest.m01 = m01; + dest.m02 = m02; + dest.m03 = m03; + dest.m10 = m10; + dest.m11 = m11; + dest.m12 = m12; + dest.m13 = m13; + dest.m20 = m20; + dest.m21 = m21; + dest.m22 = m22; + dest.m23 = m23; + dest.m30 = m30; + dest.m31 = m31; + dest.m32 = m32; + dest.m33 = m33; + + return dest; + } + + /** + * Transform a Vector by a matrix and return the result in a destination + * vector. + * @param left The left matrix + * @param right The right vector + * @param dest The destination vector, or null if a new one is to be created + * @return the destination vector + */ + public static Vector4f transform(Matrix4f left, Vector4f right, Vector4f dest) { + if (dest == null) + dest = new Vector4f(); + + float x = left.m00 * right.x + left.m10 * right.y + left.m20 * right.z + left.m30 * right.w; + float y = left.m01 * right.x + left.m11 * right.y + left.m21 * right.z + left.m31 * right.w; + float z = left.m02 * right.x + left.m12 * right.y + left.m22 * right.z + left.m32 * right.w; + float w = left.m03 * right.x + left.m13 * right.y + left.m23 * right.z + left.m33 * right.w; + + dest.x = x; + dest.y = y; + dest.z = z; + dest.w = w; + + return dest; + } + + /** + * Transpose this matrix + * @return this + */ + public Matrix transpose() { + return transpose(this); + } + + /** + * Translate this matrix + * @param vec The vector to translate by + * @return this + */ + public Matrix4f translate(Vector2f vec) { + return translate(vec, this); + } + + /** + * Translate this matrix + * @param vec The vector to translate by + * @return this + */ + public Matrix4f translate(Vector3f vec) { + return translate(vec, this); + } + + /** + * Scales this matrix + * @param vec The vector to scale by + * @return this + */ + public Matrix4f scale(Vector3f vec) { + return scale(vec, this, this); + } + + /** + * Scales the source matrix and put the result in the destination matrix + * @param vec The vector to scale by + * @param src The source matrix + * @param dest The destination matrix, or null if a new matrix is to be created + * @return The scaled matrix + */ + public static Matrix4f scale(Vector3f vec, Matrix4f src, Matrix4f dest) { + if (dest == null) + dest = new Matrix4f(); + dest.m00 = src.m00 * vec.x; + dest.m01 = src.m01 * vec.x; + dest.m02 = src.m02 * vec.x; + dest.m03 = src.m03 * vec.x; + dest.m10 = src.m10 * vec.y; + dest.m11 = src.m11 * vec.y; + dest.m12 = src.m12 * vec.y; + dest.m13 = src.m13 * vec.y; + dest.m20 = src.m20 * vec.z; + dest.m21 = src.m21 * vec.z; + dest.m22 = src.m22 * vec.z; + dest.m23 = src.m23 * vec.z; + return dest; + } + + /** + * Rotates the matrix around the given axis the specified angle + * @param angle the angle, in radians. + * @param axis The vector representing the rotation axis. Must be normalized. + * @return this + */ + public Matrix4f rotate(float angle, Vector3f axis) { + return rotate(angle, axis, this); + } + + /** + * Rotates the matrix around the given axis the specified angle + * @param angle the angle, in radians. + * @param axis The vector representing the rotation axis. Must be normalized. + * @param dest The matrix to put the result, or null if a new matrix is to be created + * @return The rotated matrix + */ + public Matrix4f rotate(float angle, Vector3f axis, Matrix4f dest) { + return rotate(angle, axis, this, dest); + } + + /** + * Rotates the source matrix around the given axis the specified angle and + * put the result in the destination matrix. + * @param angle the angle, in radians. + * @param axis The vector representing the rotation axis. Must be normalized. + * @param src The matrix to rotate + * @param dest The matrix to put the result, or null if a new matrix is to be created + * @return The rotated matrix + */ + public static Matrix4f rotate(float angle, Vector3f axis, Matrix4f src, Matrix4f dest) { + if (dest == null) + dest = new Matrix4f(); + float c = (float) Math.cos(angle); + float s = (float) Math.sin(angle); + float oneminusc = 1.0f - c; + float xy = axis.x*axis.y; + float yz = axis.y*axis.z; + float xz = axis.x*axis.z; + float xs = axis.x*s; + float ys = axis.y*s; + float zs = axis.z*s; + + float f00 = axis.x*axis.x*oneminusc+c; + float f01 = xy*oneminusc+zs; + float f02 = xz*oneminusc-ys; + // n[3] not used + float f10 = xy*oneminusc-zs; + float f11 = axis.y*axis.y*oneminusc+c; + float f12 = yz*oneminusc+xs; + // n[7] not used + float f20 = xz*oneminusc+ys; + float f21 = yz*oneminusc-xs; + float f22 = axis.z*axis.z*oneminusc+c; + + float t00 = src.m00 * f00 + src.m10 * f01 + src.m20 * f02; + float t01 = src.m01 * f00 + src.m11 * f01 + src.m21 * f02; + float t02 = src.m02 * f00 + src.m12 * f01 + src.m22 * f02; + float t03 = src.m03 * f00 + src.m13 * f01 + src.m23 * f02; + float t10 = src.m00 * f10 + src.m10 * f11 + src.m20 * f12; + float t11 = src.m01 * f10 + src.m11 * f11 + src.m21 * f12; + float t12 = src.m02 * f10 + src.m12 * f11 + src.m22 * f12; + float t13 = src.m03 * f10 + src.m13 * f11 + src.m23 * f12; + dest.m20 = src.m00 * f20 + src.m10 * f21 + src.m20 * f22; + dest.m21 = src.m01 * f20 + src.m11 * f21 + src.m21 * f22; + dest.m22 = src.m02 * f20 + src.m12 * f21 + src.m22 * f22; + dest.m23 = src.m03 * f20 + src.m13 * f21 + src.m23 * f22; + dest.m00 = t00; + dest.m01 = t01; + dest.m02 = t02; + dest.m03 = t03; + dest.m10 = t10; + dest.m11 = t11; + dest.m12 = t12; + dest.m13 = t13; + return dest; + } + + /** + * Translate this matrix and stash the result in another matrix + * @param vec The vector to translate by + * @param dest The destination matrix or null if a new matrix is to be created + * @return the translated matrix + */ + public Matrix4f translate(Vector3f vec, Matrix4f dest) { + return translate(vec, this, dest); + } + + /** + * Translate the source matrix and stash the result in the destination matrix + * @param vec The vector to translate by + * @param src The source matrix + * @param dest The destination matrix or null if a new matrix is to be created + * @return The translated matrix + */ + public static Matrix4f translate(Vector3f vec, Matrix4f src, Matrix4f dest) { + if (dest == null) + dest = new Matrix4f(); + + dest.m30 += src.m00 * vec.x + src.m10 * vec.y + src.m20 * vec.z; + dest.m31 += src.m01 * vec.x + src.m11 * vec.y + src.m21 * vec.z; + dest.m32 += src.m02 * vec.x + src.m12 * vec.y + src.m22 * vec.z; + dest.m33 += src.m03 * vec.x + src.m13 * vec.y + src.m23 * vec.z; + + return dest; + } + + /** + * Translate this matrix and stash the result in another matrix + * @param vec The vector to translate by + * @param dest The destination matrix or null if a new matrix is to be created + * @return the translated matrix + */ + public Matrix4f translate(Vector2f vec, Matrix4f dest) { + return translate(vec, this, dest); + } + + /** + * Translate the source matrix and stash the result in the destination matrix + * @param vec The vector to translate by + * @param src The source matrix + * @param dest The destination matrix or null if a new matrix is to be created + * @return The translated matrix + */ + public static Matrix4f translate(Vector2f vec, Matrix4f src, Matrix4f dest) { + if (dest == null) + dest = new Matrix4f(); + + dest.m30 += src.m00 * vec.x + src.m10 * vec.y; + dest.m31 += src.m01 * vec.x + src.m11 * vec.y; + dest.m32 += src.m02 * vec.x + src.m12 * vec.y; + dest.m33 += src.m03 * vec.x + src.m13 * vec.y; + + return dest; + } + + /** + * Transpose this matrix and place the result in another matrix + * @param dest The destination matrix or null if a new matrix is to be created + * @return the transposed matrix + */ + public Matrix4f transpose(Matrix4f dest) { + return transpose(this, dest); + } + + /** + * Transpose the source matrix and place the result in the destination matrix + * @param src The source matrix + * @param dest The destination matrix or null if a new matrix is to be created + * @return the transposed matrix + */ + public static Matrix4f transpose(Matrix4f src, Matrix4f dest) { + if (dest == null) + dest = new Matrix4f(); + float m00 = src.m00; + float m01 = src.m10; + float m02 = src.m20; + float m03 = src.m30; + float m10 = src.m01; + float m11 = src.m11; + float m12 = src.m21; + float m13 = src.m31; + float m20 = src.m02; + float m21 = src.m12; + float m22 = src.m22; + float m23 = src.m32; + float m30 = src.m03; + float m31 = src.m13; + float m32 = src.m23; + float m33 = src.m33; + + dest.m00 = m00; + dest.m01 = m01; + dest.m02 = m02; + dest.m03 = m03; + dest.m10 = m10; + dest.m11 = m11; + dest.m12 = m12; + dest.m13 = m13; + dest.m20 = m20; + dest.m21 = m21; + dest.m22 = m22; + dest.m23 = m23; + dest.m30 = m30; + dest.m31 = m31; + dest.m32 = m32; + dest.m33 = m33; + + return dest; + } + + /** + * @return the determinant of the matrix + */ + public float determinant() { + float f = + m00 + * ((m11 * m22 * m33 + m12 * m23 * m31 + m13 * m21 * m32) + - m13 * m22 * m31 + - m11 * m23 * m32 + - m12 * m21 * m33); + f -= m01 + * ((m10 * m22 * m33 + m12 * m23 * m30 + m13 * m20 * m32) + - m13 * m22 * m30 + - m10 * m23 * m32 + - m12 * m20 * m33); + f += m02 + * ((m10 * m21 * m33 + m11 * m23 * m30 + m13 * m20 * m31) + - m13 * m21 * m30 + - m10 * m23 * m31 + - m11 * m20 * m33); + f -= m03 + * ((m10 * m21 * m32 + m11 * m22 * m30 + m12 * m20 * m31) + - m12 * m21 * m30 + - m10 * m22 * m31 + - m11 * m20 * m32); + return f; + } + + /** + * Calculate the determinant of a 3x3 matrix + * @return result + */ + + private static float determinant3x3(float t00, float t01, float t02, + float t10, float t11, float t12, + float t20, float t21, float t22) + { + return t00 * (t11 * t22 - t12 * t21) + + t01 * (t12 * t20 - t10 * t22) + + t02 * (t10 * t21 - t11 * t20); + } + + /** + * Invert this matrix + * @return this if successful, null otherwise + */ + public Matrix invert() { + return invert(this, this); + } + + /** + * Invert the source matrix and put the result in the destination + * @param src The source matrix + * @param dest The destination matrix, or null if a new matrix is to be created + * @return The inverted matrix if successful, null otherwise + */ + public static Matrix4f invert(Matrix4f src, Matrix4f dest) { + float determinant = src.determinant(); + + if (determinant != 0) { + /* + * m00 m01 m02 m03 + * m10 m11 m12 m13 + * m20 m21 m22 m23 + * m30 m31 m32 m33 + */ + if (dest == null) + dest = new Matrix4f(); + float determinant_inv = 1f/determinant; + + // first row + float t00 = determinant3x3(src.m11, src.m12, src.m13, src.m21, src.m22, src.m23, src.m31, src.m32, src.m33); + float t01 = -determinant3x3(src.m10, src.m12, src.m13, src.m20, src.m22, src.m23, src.m30, src.m32, src.m33); + float t02 = determinant3x3(src.m10, src.m11, src.m13, src.m20, src.m21, src.m23, src.m30, src.m31, src.m33); + float t03 = -determinant3x3(src.m10, src.m11, src.m12, src.m20, src.m21, src.m22, src.m30, src.m31, src.m32); + // second row + float t10 = -determinant3x3(src.m01, src.m02, src.m03, src.m21, src.m22, src.m23, src.m31, src.m32, src.m33); + float t11 = determinant3x3(src.m00, src.m02, src.m03, src.m20, src.m22, src.m23, src.m30, src.m32, src.m33); + float t12 = -determinant3x3(src.m00, src.m01, src.m03, src.m20, src.m21, src.m23, src.m30, src.m31, src.m33); + float t13 = determinant3x3(src.m00, src.m01, src.m02, src.m20, src.m21, src.m22, src.m30, src.m31, src.m32); + // third row + float t20 = determinant3x3(src.m01, src.m02, src.m03, src.m11, src.m12, src.m13, src.m31, src.m32, src.m33); + float t21 = -determinant3x3(src.m00, src.m02, src.m03, src.m10, src.m12, src.m13, src.m30, src.m32, src.m33); + float t22 = determinant3x3(src.m00, src.m01, src.m03, src.m10, src.m11, src.m13, src.m30, src.m31, src.m33); + float t23 = -determinant3x3(src.m00, src.m01, src.m02, src.m10, src.m11, src.m12, src.m30, src.m31, src.m32); + // fourth row + float t30 = -determinant3x3(src.m01, src.m02, src.m03, src.m11, src.m12, src.m13, src.m21, src.m22, src.m23); + float t31 = determinant3x3(src.m00, src.m02, src.m03, src.m10, src.m12, src.m13, src.m20, src.m22, src.m23); + float t32 = -determinant3x3(src.m00, src.m01, src.m03, src.m10, src.m11, src.m13, src.m20, src.m21, src.m23); + float t33 = determinant3x3(src.m00, src.m01, src.m02, src.m10, src.m11, src.m12, src.m20, src.m21, src.m22); + + // transpose and divide by the determinant + dest.m00 = t00*determinant_inv; + dest.m11 = t11*determinant_inv; + dest.m22 = t22*determinant_inv; + dest.m33 = t33*determinant_inv; + dest.m01 = t10*determinant_inv; + dest.m10 = t01*determinant_inv; + dest.m20 = t02*determinant_inv; + dest.m02 = t20*determinant_inv; + dest.m12 = t21*determinant_inv; + dest.m21 = t12*determinant_inv; + dest.m03 = t30*determinant_inv; + dest.m30 = t03*determinant_inv; + dest.m13 = t31*determinant_inv; + dest.m31 = t13*determinant_inv; + dest.m32 = t23*determinant_inv; + dest.m23 = t32*determinant_inv; + return dest; + } else + return null; + } + + /** + * Negate this matrix + * @return this + */ + public Matrix negate() { + return negate(this); + } + + /** + * Negate this matrix and place the result in a destination matrix. + * @param dest The destination matrix, or null if a new matrix is to be created + * @return the negated matrix + */ + public Matrix4f negate(Matrix4f dest) { + return negate(this, dest); + } + + /** + * Negate this matrix and place the result in a destination matrix. + * @param src The source matrix + * @param dest The destination matrix, or null if a new matrix is to be created + * @return The negated matrix + */ + public static Matrix4f negate(Matrix4f src, Matrix4f dest) { + if (dest == null) + dest = new Matrix4f(); + + dest.m00 = -src.m00; + dest.m01 = -src.m01; + dest.m02 = -src.m02; + dest.m03 = -src.m03; + dest.m10 = -src.m10; + dest.m11 = -src.m11; + dest.m12 = -src.m12; + dest.m13 = -src.m13; + dest.m20 = -src.m20; + dest.m21 = -src.m21; + dest.m22 = -src.m22; + dest.m23 = -src.m23; + dest.m30 = -src.m30; + dest.m31 = -src.m31; + dest.m32 = -src.m32; + dest.m33 = -src.m33; + + return dest; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/Quaternion.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/Quaternion.java new file mode 100644 index 0000000..f81340c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/Quaternion.java @@ -0,0 +1,530 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.vector; + +/** + * + * Quaternions for LWJGL! + * + * @author fbi + * @version $Revision$ + * $Id$ + */ + +import java.nio.FloatBuffer; + +public class Quaternion extends Vector implements ReadableVector4f { + private static final long serialVersionUID = 1L; + + public float x, y, z, w; + + /** + * C'tor. The quaternion will be initialized to the identity. + */ + public Quaternion() { + super(); + setIdentity(); + } + + /** + * C'tor + * + * @param src + */ + public Quaternion(ReadableVector4f src) { + set(src); + } + + /** + * C'tor + * + */ + public Quaternion(float x, float y, float z, float w) { + set(x, y, z, w); + } + + /* + * (non-Javadoc) + * + * @see org.lwjgl.util.vector.WritableVector2f#set(float, float) + */ + public void set(float x, float y) { + this.x = x; + this.y = y; + } + + /* + * (non-Javadoc) + * + * @see org.lwjgl.util.vector.WritableVector3f#set(float, float, float) + */ + public void set(float x, float y, float z) { + this.x = x; + this.y = y; + this.z = z; + } + + /* + * (non-Javadoc) + * + * @see org.lwjgl.util.vector.WritableVector4f#set(float, float, float, + * float) + */ + public void set(float x, float y, float z, float w) { + this.x = x; + this.y = y; + this.z = z; + this.w = w; + } + + /** + * Load from another Vector4f + * + * @param src + * The source vector + * @return this + */ + public Quaternion set(ReadableVector4f src) { + x = src.getX(); + y = src.getY(); + z = src.getZ(); + w = src.getW(); + return this; + } + + /** + * Set this quaternion to the multiplication identity. + * @return this + */ + public Quaternion setIdentity() { + return setIdentity(this); + } + + /** + * Set the given quaternion to the multiplication identity. + * @param q The quaternion + * @return q + */ + public static Quaternion setIdentity(Quaternion q) { + q.x = 0; + q.y = 0; + q.z = 0; + q.w = 1; + return q; + } + + /** + * @return the length squared of the quaternion + */ + public float lengthSquared() { + return x * x + y * y + z * z + w * w; + } + + /** + * Normalise the source quaternion and place the result in another quaternion. + * + * @param src + * The source quaternion + * @param dest + * The destination quaternion, or null if a new quaternion is to be + * created + * @return The normalised quaternion + */ + public static Quaternion normalise(Quaternion src, Quaternion dest) { + float inv_l = 1f/src.length(); + + if (dest == null) + dest = new Quaternion(); + + dest.set(src.x * inv_l, src.y * inv_l, src.z * inv_l, src.w * inv_l); + + return dest; + } + + /** + * Normalise this quaternion and place the result in another quaternion. + * + * @param dest + * The destination quaternion, or null if a new quaternion is to be + * created + * @return the normalised quaternion + */ + public Quaternion normalise(Quaternion dest) { + return normalise(this, dest); + } + + /** + * The dot product of two quaternions + * + * @param left + * The LHS quat + * @param right + * The RHS quat + * @return left dot right + */ + public static float dot(Quaternion left, Quaternion right) { + return left.x * right.x + left.y * right.y + left.z * right.z + left.w + * right.w; + } + + /** + * Calculate the conjugate of this quaternion and put it into the given one + * + * @param dest + * The quaternion which should be set to the conjugate of this + * quaternion + */ + public Quaternion negate(Quaternion dest) { + return negate(this, dest); + } + + /** + * Calculate the conjugate of this quaternion and put it into the given one + * + * @param src + * The source quaternion + * @param dest + * The quaternion which should be set to the conjugate of this + * quaternion + */ + public static Quaternion negate(Quaternion src, Quaternion dest) { + if (dest == null) + dest = new Quaternion(); + + dest.x = -src.x; + dest.y = -src.y; + dest.z = -src.z; + dest.w = src.w; + + return dest; + } + + /** + * Calculate the conjugate of this quaternion + */ + public Vector negate() { + return negate(this, this); + } + + /* (non-Javadoc) + * @see org.lwjgl.util.vector.Vector#load(java.nio.FloatBuffer) + */ + public Vector load(FloatBuffer buf) { + x = buf.get(); + y = buf.get(); + z = buf.get(); + w = buf.get(); + return this; + } + + /* + * (non-Javadoc) + * + * @see org.lwjgl.vector.Vector#scale(float) + */ + public Vector scale(float scale) { + return scale(scale, this, this); + } + + /** + * Scale the source quaternion by scale and put the result in the destination + * @param scale The amount to scale by + * @param src The source quaternion + * @param dest The destination quaternion, or null if a new quaternion is to be created + * @return The scaled quaternion + */ + public static Quaternion scale(float scale, Quaternion src, Quaternion dest) { + if (dest == null) + dest = new Quaternion(); + dest.x = src.x * scale; + dest.y = src.y * scale; + dest.z = src.z * scale; + dest.w = src.w * scale; + return dest; + } + + /* (non-Javadoc) + * @see org.lwjgl.util.vector.ReadableVector#store(java.nio.FloatBuffer) + */ + public Vector store(FloatBuffer buf) { + buf.put(x); + buf.put(y); + buf.put(z); + buf.put(w); + + return this; + } + + /** + * @return x + */ + public final float getX() { + return x; + } + + /** + * @return y + */ + public final float getY() { + return y; + } + + /** + * Set X + * + * @param x + */ + public final void setX(float x) { + this.x = x; + } + + /** + * Set Y + * + * @param y + */ + public final void setY(float y) { + this.y = y; + } + + /** + * Set Z + * + * @param z + */ + public void setZ(float z) { + this.z = z; + } + + /* + * (Overrides) + * + * @see org.lwjgl.vector.ReadableVector3f#getZ() + */ + public float getZ() { + return z; + } + + /** + * Set W + * + * @param w + */ + public void setW(float w) { + this.w = w; + } + + /* + * (Overrides) + * + * @see org.lwjgl.vector.ReadableVector3f#getW() + */ + public float getW() { + return w; + } + + public String toString() { + return "Quaternion: " + x + " " + y + " " + z + " " + w; + } + + /** + * Sets the value of this quaternion to the quaternion product of + * quaternions left and right (this = left * right). Note that this is safe + * for aliasing (e.g. this can be left or right). + * + * @param left + * the first quaternion + * @param right + * the second quaternion + */ + public static Quaternion mul(Quaternion left, Quaternion right, + Quaternion dest) { + if (dest == null) + dest = new Quaternion(); + dest.set(left.x * right.w + left.w * right.x + left.y * right.z + - left.z * right.y, left.y * right.w + left.w * right.y + + left.z * right.x - left.x * right.z, left.z * right.w + + left.w * right.z + left.x * right.y - left.y * right.x, + left.w * right.w - left.x * right.x - left.y * right.y + - left.z * right.z); + return dest; + } + + /** + * + * Multiplies quaternion left by the inverse of quaternion right and places + * the value into this quaternion. The value of both argument quaternions is + * preservered (this = left * right^-1). + * + * @param left + * the left quaternion + * @param right + * the right quaternion + */ + public static Quaternion mulInverse(Quaternion left, Quaternion right, + Quaternion dest) { + float n = right.lengthSquared(); + // zero-div may occur. + n = (n == 0.0 ? n : 1 / n); + // store on stack once for aliasing-safty + if (dest == null) + dest = new Quaternion(); + dest + .set((left.x * right.w - left.w * right.x - left.y + * right.z + left.z * right.y) + * n, (left.y * right.w - left.w * right.y - left.z + * right.x + left.x * right.z) + * n, (left.z * right.w - left.w * right.z - left.x + * right.y + left.y * right.x) + * n, (left.w * right.w + left.x * right.x + left.y + * right.y + left.z * right.z) + * n); + + return dest; + } + + /** + * Sets the value of this quaternion to the equivalent rotation of the + * Axis-Angle argument. + * + * @param a1 + * the axis-angle: (x,y,z) is the axis and w is the angle + */ + public final void setFromAxisAngle(Vector4f a1) { + x = a1.x; + y = a1.y; + z = a1.z; + float n = (float) Math.sqrt(x * x + y * y + z * z); + // zero-div may occur. + float s = (float) (Math.sin(0.5 * a1.w) / n); + x *= s; + y *= s; + z *= s; + w = (float) Math.cos(0.5 * a1.w); + } + + /** + * Sets the value of this quaternion using the rotational component of the + * passed matrix. + * + * @param m + * The matrix + * @return this + */ + public final Quaternion setFromMatrix(Matrix4f m) { + return setFromMatrix(m, this); + } + + /** + * Sets the value of the source quaternion using the rotational component of the + * passed matrix. + * + * @param m + * The source matrix + * @param q + * The destination quaternion, or null if a new quaternion is to be created + * @return q + */ + public static Quaternion setFromMatrix(Matrix4f m, Quaternion q) { + return q.setFromMat(m.m00, m.m01, m.m02, m.m10, m.m11, m.m12, m.m20, + m.m21, m.m22); + } + + /** + * Sets the value of this quaternion using the rotational component of the + * passed matrix. + * + * @param m + * The source matrix + */ + public final Quaternion setFromMatrix(Matrix3f m) { + return setFromMatrix(m, this); + } + + /** + * Sets the value of the source quaternion using the rotational component of the + * passed matrix. + * + * @param m + * The source matrix + * @param q + * The destination quaternion, or null if a new quaternion is to be created + * @return q + */ + public static Quaternion setFromMatrix(Matrix3f m, Quaternion q) { + return q.setFromMat(m.m00, m.m01, m.m02, m.m10, m.m11, m.m12, m.m20, + m.m21, m.m22); + } + + /** + * Private method to perform the matrix-to-quaternion conversion + */ + private Quaternion setFromMat(float m00, float m01, float m02, float m10, + float m11, float m12, float m20, float m21, float m22) { + + float s; + float tr = m00 + m11 + m22; + if (tr >= 0.0) { + s = (float) Math.sqrt(tr + 1.0); + w = s * 0.5f; + s = 0.5f / s; + x = (m21 - m12) * s; + y = (m02 - m20) * s; + z = (m10 - m01) * s; + } else { + float max = Math.max(Math.max(m00, m11), m22); + if (max == m00) { + s = (float) Math.sqrt(m00 - (m11 + m22) + 1.0); + x = s * 0.5f; + s = 0.5f / s; + y = (m01 + m10) * s; + z = (m20 + m02) * s; + w = (m21 - m12) * s; + } else if (max == m11) { + s = (float) Math.sqrt(m11 - (m22 + m00) + 1.0); + y = s * 0.5f; + s = 0.5f / s; + z = (m12 + m21) * s; + x = (m01 + m10) * s; + w = (m02 - m20) * s; + } else { + s = (float) Math.sqrt(m22 - (m00 + m11) + 1.0); + z = s * 0.5f; + s = 0.5f / s; + x = (m20 + m02) * s; + y = (m12 + m21) * s; + w = (m10 - m01) * s; + } + } + return this; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/ReadableVector.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/ReadableVector.java new file mode 100644 index 0000000..e9e3df4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/ReadableVector.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.vector; + +import java.nio.FloatBuffer; + +/** + * @author foo + */ +public interface ReadableVector { + /** + * @return the length of the vector + */ + float length(); + /** + * @return the length squared of the vector + */ + float lengthSquared(); + /** + * Store this vector in a FloatBuffer + * @param buf The buffer to store it in, at the current position + * @return this + */ + Vector store(FloatBuffer buf); +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/ReadableVector2f.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/ReadableVector2f.java new file mode 100644 index 0000000..1a3be3a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/ReadableVector2f.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.vector; + +/** + * @author foo + */ +public interface ReadableVector2f extends ReadableVector { + /** + * @return x + */ + float getX(); + /** + * @return y + */ + float getY(); +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/ReadableVector3f.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/ReadableVector3f.java new file mode 100644 index 0000000..c6b967d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/ReadableVector3f.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.vector; + +/** + * @author foo + */ +public interface ReadableVector3f extends ReadableVector2f { + /** + * @return z + */ + float getZ(); +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/ReadableVector4f.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/ReadableVector4f.java new file mode 100644 index 0000000..d766b44 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/ReadableVector4f.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.vector; + +/** + * @author foo + */ +public interface ReadableVector4f extends ReadableVector3f { + + /** + * @return w + */ + float getW(); + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/Vector.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/Vector.java new file mode 100644 index 0000000..64cc757 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/Vector.java @@ -0,0 +1,112 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.vector; + +import java.io.Serializable; +import java.nio.FloatBuffer; + +/** + * + * Base class for vectors. + * + * @author cix_foo + * @version $Revision$ + * $Id$ + */ +public abstract class Vector implements Serializable, ReadableVector { + + /** + * Constructor for Vector. + */ + protected Vector() { + super(); + } + + /** + * @return the length of the vector + */ + public final float length() { + return (float) Math.sqrt(lengthSquared()); + } + + + /** + * @return the length squared of the vector + */ + public abstract float lengthSquared(); + + /** + * Load this vector from a FloatBuffer + * @param buf The buffer to load it from, at the current position + * @return this + */ + public abstract Vector load(FloatBuffer buf); + + /** + * Negate a vector + * @return this + */ + public abstract Vector negate(); + + + /** + * Normalise this vector + * @return this + */ + public final Vector normalise() { + float len = length(); + if (len != 0.0f) { + float l = 1.0f / len; + return scale(l); + } else + throw new IllegalStateException("Zero length vector"); + } + + + /** + * Store this vector in a FloatBuffer + * @param buf The buffer to store it in, at the current position + * @return this + */ + public abstract Vector store(FloatBuffer buf); + + + /** + * Scale this vector + * @param scale The scale factor + * @return this + */ + public abstract Vector scale(float scale); + + + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/Vector2f.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/Vector2f.java new file mode 100644 index 0000000..d4836fd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/Vector2f.java @@ -0,0 +1,303 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.vector; + +import java.io.Serializable; +import java.nio.FloatBuffer; + +import org.lwjgl.util.vector.Vector2f; + +/** + * + * Holds a 2-tuple vector. + * + * @author cix_foo + * @version $Revision$ + * $Id$ + */ + +public class Vector2f extends Vector implements Serializable, ReadableVector2f, WritableVector2f { + + private static final long serialVersionUID = 1L; + + public float x, y; + + /** + * Constructor for Vector3f. + */ + public Vector2f() { + super(); + } + + /** + * Constructor + */ + public Vector2f(ReadableVector2f src) { + set(src); + } + + /** + * Constructor + */ + public Vector2f(float x, float y) { + set(x, y); + } + + /* (non-Javadoc) + * @see org.lwjgl.util.vector.WritableVector2f#set(float, float) + */ + public void set(float x, float y) { + this.x = x; + this.y = y; + } + + /** + * Load from another Vector2f + * @param src The source vector + * @return this + */ + public Vector2f set(ReadableVector2f src) { + x = src.getX(); + y = src.getY(); + return this; + } + + /** + * @return the length squared of the vector + */ + public float lengthSquared() { + return x * x + y * y; + } + + /** + * Translate a vector + * @param x The translation in x + * @param y the translation in y + * @return this + */ + public Vector2f translate(float x, float y) { + this.x += x; + this.y += y; + return this; + } + + /** + * Negate a vector + * @return this + */ + public Vector negate() { + x = -x; + y = -y; + return this; + } + + /** + * Negate a vector and place the result in a destination vector. + * @param dest The destination vector or null if a new vector is to be created + * @return the negated vector + */ + public Vector2f negate(Vector2f dest) { + if (dest == null) + dest = new Vector2f(); + dest.x = -x; + dest.y = -y; + return dest; + } + + + /** + * Normalise this vector and place the result in another vector. + * @param dest The destination vector, or null if a new vector is to be created + * @return the normalised vector + */ + public Vector2f normalise(Vector2f dest) { + float l = length(); + + if (dest == null) + dest = new Vector2f(x / l, y / l); + else + dest.set(x / l, y / l); + + return dest; + } + + /** + * The dot product of two vectors is calculated as + * v1.x * v2.x + v1.y * v2.y + v1.z * v2.z + * @param left The LHS vector + * @param right The RHS vector + * @return left dot right + */ + public static float dot(Vector2f left, Vector2f right) { + return left.x * right.x + left.y * right.y; + } + + + + /** + * Calculate the angle between two vectors, in radians + * @param a A vector + * @param b The other vector + * @return the angle between the two vectors, in radians + */ + public static float angle(Vector2f a, Vector2f b) { + float dls = dot(a, b) / (a.length() * b.length()); + if (dls < -1f) + dls = -1f; + else if (dls > 1.0f) + dls = 1.0f; + return (float)Math.acos(dls); + } + + /** + * Add a vector to another vector and place the result in a destination + * vector. + * @param left The LHS vector + * @param right The RHS vector + * @param dest The destination vector, or null if a new vector is to be created + * @return the sum of left and right in dest + */ + public static Vector2f add(Vector2f left, Vector2f right, Vector2f dest) { + if (dest == null) + return new Vector2f(left.x + right.x, left.y + right.y); + else { + dest.set(left.x + right.x, left.y + right.y); + return dest; + } + } + + /** + * Subtract a vector from another vector and place the result in a destination + * vector. + * @param left The LHS vector + * @param right The RHS vector + * @param dest The destination vector, or null if a new vector is to be created + * @return left minus right in dest + */ + public static Vector2f sub(Vector2f left, Vector2f right, Vector2f dest) { + if (dest == null) + return new Vector2f(left.x - right.x, left.y - right.y); + else { + dest.set(left.x - right.x, left.y - right.y); + return dest; + } + } + + /** + * Store this vector in a FloatBuffer + * @param buf The buffer to store it in, at the current position + * @return this + */ + public Vector store(FloatBuffer buf) { + buf.put(x); + buf.put(y); + return this; + } + + /** + * Load this vector from a FloatBuffer + * @param buf The buffer to load it from, at the current position + * @return this + */ + public Vector load(FloatBuffer buf) { + x = buf.get(); + y = buf.get(); + return this; + } + + /* (non-Javadoc) + * @see org.lwjgl.vector.Vector#scale(float) + */ + public Vector scale(float scale) { + + x *= scale; + y *= scale; + + return this; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + public String toString() { + StringBuilder sb = new StringBuilder(64); + + sb.append("Vector2f["); + sb.append(x); + sb.append(", "); + sb.append(y); + sb.append(']'); + return sb.toString(); + } + + /** + * @return x + */ + public final float getX() { + return x; + } + + /** + * @return y + */ + public final float getY() { + return y; + } + + /** + * Set X + * @param x + */ + public final void setX(float x) { + this.x = x; + } + + /** + * Set Y + * @param y + */ + public final void setY(float y) { + this.y = y; + } + + public boolean equals(Object obj) { + if (this == obj) return true; + if (obj == null) return false; + if (getClass() != obj.getClass()) return false; + Vector2f other = (Vector2f)obj; + + if (x == other.x && y == other.y) return true; + + return false; + } + +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/Vector3f.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/Vector3f.java new file mode 100644 index 0000000..f5a0717 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/Vector3f.java @@ -0,0 +1,360 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.vector; + +import java.io.Serializable; +import java.nio.FloatBuffer; + +import org.lwjgl.util.vector.Vector3f; + +/** + * + * Holds a 3-tuple vector. + * + * @author cix_foo + * @version $Revision$ + * $Id$ + */ + +public class Vector3f extends Vector implements Serializable, ReadableVector3f, WritableVector3f { + + private static final long serialVersionUID = 1L; + + public float x, y, z; + + /** + * Constructor for Vector3f. + */ + public Vector3f() { + super(); + } + + /** + * Constructor + */ + public Vector3f(ReadableVector3f src) { + set(src); + } + + /** + * Constructor + */ + public Vector3f(float x, float y, float z) { + set(x, y, z); + } + + /* (non-Javadoc) + * @see org.lwjgl.util.vector.WritableVector2f#set(float, float) + */ + public void set(float x, float y) { + this.x = x; + this.y = y; + } + + /* (non-Javadoc) + * @see org.lwjgl.util.vector.WritableVector3f#set(float, float, float) + */ + public void set(float x, float y, float z) { + this.x = x; + this.y = y; + this.z = z; + } + + /** + * Load from another Vector3f + * @param src The source vector + * @return this + */ + public Vector3f set(ReadableVector3f src) { + x = src.getX(); + y = src.getY(); + z = src.getZ(); + return this; + } + + /** + * @return the length squared of the vector + */ + public float lengthSquared() { + return x * x + y * y + z * z; + } + + /** + * Translate a vector + * @param x The translation in x + * @param y the translation in y + * @return this + */ + public Vector3f translate(float x, float y, float z) { + this.x += x; + this.y += y; + this.z += z; + return this; + } + + /** + * Add a vector to another vector and place the result in a destination + * vector. + * @param left The LHS vector + * @param right The RHS vector + * @param dest The destination vector, or null if a new vector is to be created + * @return the sum of left and right in dest + */ + public static Vector3f add(Vector3f left, Vector3f right, Vector3f dest) { + if (dest == null) + return new Vector3f(left.x + right.x, left.y + right.y, left.z + right.z); + else { + dest.set(left.x + right.x, left.y + right.y, left.z + right.z); + return dest; + } + } + + /** + * Subtract a vector from another vector and place the result in a destination + * vector. + * @param left The LHS vector + * @param right The RHS vector + * @param dest The destination vector, or null if a new vector is to be created + * @return left minus right in dest + */ + public static Vector3f sub(Vector3f left, Vector3f right, Vector3f dest) { + if (dest == null) + return new Vector3f(left.x - right.x, left.y - right.y, left.z - right.z); + else { + dest.set(left.x - right.x, left.y - right.y, left.z - right.z); + return dest; + } + } + + /** + * The cross product of two vectors. + * + * @param left The LHS vector + * @param right The RHS vector + * @param dest The destination result, or null if a new vector is to be created + * @return left cross right + */ + public static Vector3f cross( + Vector3f left, + Vector3f right, + Vector3f dest) + { + + if (dest == null) + dest = new Vector3f(); + + dest.set( + left.y * right.z - left.z * right.y, + right.x * left.z - right.z * left.x, + left.x * right.y - left.y * right.x + ); + + return dest; + } + + + + /** + * Negate a vector + * @return this + */ + public Vector negate() { + x = -x; + y = -y; + z = -z; + return this; + } + + /** + * Negate a vector and place the result in a destination vector. + * @param dest The destination vector or null if a new vector is to be created + * @return the negated vector + */ + public Vector3f negate(Vector3f dest) { + if (dest == null) + dest = new Vector3f(); + dest.x = -x; + dest.y = -y; + dest.z = -z; + return dest; + } + + + /** + * Normalise this vector and place the result in another vector. + * @param dest The destination vector, or null if a new vector is to be created + * @return the normalised vector + */ + public Vector3f normalise(Vector3f dest) { + float l = length(); + + if (dest == null) + dest = new Vector3f(x / l, y / l, z / l); + else + dest.set(x / l, y / l, z / l); + + return dest; + } + + /** + * The dot product of two vectors is calculated as + * v1.x * v2.x + v1.y * v2.y + v1.z * v2.z + * @param left The LHS vector + * @param right The RHS vector + * @return left dot right + */ + public static float dot(Vector3f left, Vector3f right) { + return left.x * right.x + left.y * right.y + left.z * right.z; + } + + /** + * Calculate the angle between two vectors, in radians + * @param a A vector + * @param b The other vector + * @return the angle between the two vectors, in radians + */ + public static float angle(Vector3f a, Vector3f b) { + float dls = dot(a, b) / (a.length() * b.length()); + if (dls < -1f) + dls = -1f; + else if (dls > 1.0f) + dls = 1.0f; + return (float)Math.acos(dls); + } + + /* (non-Javadoc) + * @see org.lwjgl.vector.Vector#load(FloatBuffer) + */ + public Vector load(FloatBuffer buf) { + x = buf.get(); + y = buf.get(); + z = buf.get(); + return this; + } + + /* (non-Javadoc) + * @see org.lwjgl.vector.Vector#scale(float) + */ + public Vector scale(float scale) { + + x *= scale; + y *= scale; + z *= scale; + + return this; + + } + + /* (non-Javadoc) + * @see org.lwjgl.vector.Vector#store(FloatBuffer) + */ + public Vector store(FloatBuffer buf) { + + buf.put(x); + buf.put(y); + buf.put(z); + + return this; + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + public String toString() { + StringBuilder sb = new StringBuilder(64); + + sb.append("Vector3f["); + sb.append(x); + sb.append(", "); + sb.append(y); + sb.append(", "); + sb.append(z); + sb.append(']'); + return sb.toString(); + } + + /** + * @return x + */ + public final float getX() { + return x; + } + + /** + * @return y + */ + public final float getY() { + return y; + } + + /** + * Set X + * @param x + */ + public final void setX(float x) { + this.x = x; + } + + /** + * Set Y + * @param y + */ + public final void setY(float y) { + this.y = y; + } + + /** + * Set Z + * @param z + */ + public void setZ(float z) { + this.z = z; + } + + /* (Overrides) + * @see org.lwjgl.vector.ReadableVector3f#getZ() + */ + public float getZ() { + return z; + } + + public boolean equals(Object obj) { + if (this == obj) return true; + if (obj == null) return false; + if (getClass() != obj.getClass()) return false; + Vector3f other = (Vector3f)obj; + + if (x == other.x && y == other.y && z == other.z) return true; + + return false; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/Vector4f.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/Vector4f.java new file mode 100644 index 0000000..06af940 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/Vector4f.java @@ -0,0 +1,351 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.vector; + +import java.io.Serializable; +import java.nio.FloatBuffer; + +import org.lwjgl.util.vector.Vector4f; + +/** + * + * Holds a 4-tuple vector. + * + * @author cix_foo + * @version $Revision$ + * $Id$ + */ + +public class Vector4f extends Vector implements Serializable, ReadableVector4f, WritableVector4f { + + private static final long serialVersionUID = 1L; + + public float x, y, z, w; + + /** + * Constructor for Vector4f. + */ + public Vector4f() { + super(); + } + + /** + * Constructor + */ + public Vector4f(ReadableVector4f src) { + set(src); + } + + /** + * Constructor + */ + public Vector4f(float x, float y, float z, float w) { + set(x, y, z, w); + } + + /* (non-Javadoc) + * @see org.lwjgl.util.vector.WritableVector2f#set(float, float) + */ + public void set(float x, float y) { + this.x = x; + this.y = y; + } + + /* (non-Javadoc) + * @see org.lwjgl.util.vector.WritableVector3f#set(float, float, float) + */ + public void set(float x, float y, float z) { + this.x = x; + this.y = y; + this.z = z; + } + + /* (non-Javadoc) + * @see org.lwjgl.util.vector.WritableVector4f#set(float, float, float, float) + */ + public void set(float x, float y, float z, float w) { + this.x = x; + this.y = y; + this.z = z; + this.w = w; + } + + /** + * Load from another Vector4f + * @param src The source vector + * @return this + */ + public Vector4f set(ReadableVector4f src) { + x = src.getX(); + y = src.getY(); + z = src.getZ(); + w = src.getW(); + return this; + } + + /** + * @return the length squared of the vector + */ + public float lengthSquared() { + return x * x + y * y + z * z + w * w; + } + + /** + * Translate a vector + * @param x The translation in x + * @param y the translation in y + * @return this + */ + public Vector4f translate(float x, float y, float z, float w) { + this.x += x; + this.y += y; + this.z += z; + this.w += w; + return this; + } + + /** + * Add a vector to another vector and place the result in a destination + * vector. + * @param left The LHS vector + * @param right The RHS vector + * @param dest The destination vector, or null if a new vector is to be created + * @return the sum of left and right in dest + */ + public static Vector4f add(Vector4f left, Vector4f right, Vector4f dest) { + if (dest == null) + return new Vector4f(left.x + right.x, left.y + right.y, left.z + right.z, left.w + right.w); + else { + dest.set(left.x + right.x, left.y + right.y, left.z + right.z, left.w + right.w); + return dest; + } + } + + /** + * Subtract a vector from another vector and place the result in a destination + * vector. + * @param left The LHS vector + * @param right The RHS vector + * @param dest The destination vector, or null if a new vector is to be created + * @return left minus right in dest + */ + public static Vector4f sub(Vector4f left, Vector4f right, Vector4f dest) { + if (dest == null) + return new Vector4f(left.x - right.x, left.y - right.y, left.z - right.z, left.w - right.w); + else { + dest.set(left.x - right.x, left.y - right.y, left.z - right.z, left.w - right.w); + return dest; + } + } + + + /** + * Negate a vector + * @return this + */ + public Vector negate() { + x = -x; + y = -y; + z = -z; + w = -w; + return this; + } + + /** + * Negate a vector and place the result in a destination vector. + * @param dest The destination vector or null if a new vector is to be created + * @return the negated vector + */ + public Vector4f negate(Vector4f dest) { + if (dest == null) + dest = new Vector4f(); + dest.x = -x; + dest.y = -y; + dest.z = -z; + dest.w = -w; + return dest; + } + + + /** + * Normalise this vector and place the result in another vector. + * @param dest The destination vector, or null if a new vector is to be created + * @return the normalised vector + */ + public Vector4f normalise(Vector4f dest) { + float l = length(); + + if (dest == null) + dest = new Vector4f(x / l, y / l, z / l, w / l); + else + dest.set(x / l, y / l, z / l, w / l); + + return dest; + } + + /** + * The dot product of two vectors is calculated as + * v1.x * v2.x + v1.y * v2.y + v1.z * v2.z + v1.w * v2.w + * @param left The LHS vector + * @param right The RHS vector + * @return left dot right + */ + public static float dot(Vector4f left, Vector4f right) { + return left.x * right.x + left.y * right.y + left.z * right.z + left.w * right.w; + } + + /** + * Calculate the angle between two vectors, in radians + * @param a A vector + * @param b The other vector + * @return the angle between the two vectors, in radians + */ + public static float angle(Vector4f a, Vector4f b) { + float dls = dot(a, b) / (a.length() * b.length()); + if (dls < -1f) + dls = -1f; + else if (dls > 1.0f) + dls = 1.0f; + return (float)Math.acos(dls); + } + + /* (non-Javadoc) + * @see org.lwjgl.vector.Vector#load(FloatBuffer) + */ + public Vector load(FloatBuffer buf) { + x = buf.get(); + y = buf.get(); + z = buf.get(); + w = buf.get(); + return this; + } + + /* (non-Javadoc) + * @see org.lwjgl.vector.Vector#scale(float) + */ + public Vector scale(float scale) { + x *= scale; + y *= scale; + z *= scale; + w *= scale; + return this; + } + + /* (non-Javadoc) + * @see org.lwjgl.vector.Vector#store(FloatBuffer) + */ + public Vector store(FloatBuffer buf) { + + buf.put(x); + buf.put(y); + buf.put(z); + buf.put(w); + + return this; + } + + public String toString() { + return "Vector4f: " + x + " " + y + " " + z + " " + w; + } + + /** + * @return x + */ + public final float getX() { + return x; + } + + /** + * @return y + */ + public final float getY() { + return y; + } + + /** + * Set X + * @param x + */ + public final void setX(float x) { + this.x = x; + } + + /** + * Set Y + * @param y + */ + public final void setY(float y) { + this.y = y; + } + + /** + * Set Z + * @param z + */ + public void setZ(float z) { + this.z = z; + } + + + /* (Overrides) + * @see org.lwjgl.vector.ReadableVector3f#getZ() + */ + public float getZ() { + return z; + } + + /** + * Set W + * @param w + */ + public void setW(float w) { + this.w = w; + } + + /* (Overrides) + * @see org.lwjgl.vector.ReadableVector3f#getZ() + */ + public float getW() { + return w; + } + + public boolean equals(Object obj) { + if (this == obj) return true; + if (obj == null) return false; + if (getClass() != obj.getClass()) return false; + Vector4f other = (Vector4f)obj; + + if (x == other.x && y == other.y && z == other.z && w == other.w) return true; + + return false; + } +} diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/WritableVector2f.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/WritableVector2f.java new file mode 100644 index 0000000..ea171a8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/WritableVector2f.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.vector; + +/** + * Writable interface to Vector2fs + * @author $author$ + * @version $revision$ + * $Id$ + */ +public interface WritableVector2f { + + /** + * Set the X value + * @param x + */ + void setX(float x); + + /** + * Set the Y value + * @param y + */ + void setY(float y); + + /** + * Set the X,Y values + * @param x + * @param y + */ + void set(float x, float y); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/WritableVector3f.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/WritableVector3f.java new file mode 100644 index 0000000..3e660a8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/WritableVector3f.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.vector; + +/** + * Writable interface to Vector3fs + * @author $author$ + * @version $revision$ + * $Id$ + */ +public interface WritableVector3f extends WritableVector2f { + + /** + * Set the Z value + * @param z + */ + void setZ(float z); + + /** + * Set the X,Y,Z values + * @param x + * @param y + * @param z + */ + void set(float x, float y, float z); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/WritableVector4f.java b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/WritableVector4f.java new file mode 100644 index 0000000..b060b85 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/java/org/lwjgl/util/vector/WritableVector4f.java @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.util.vector; + +/** + * Writable interface to Vector4fs + * @author $author$ + * @version $revision$ + * $Id$ + */ +public interface WritableVector4f extends WritableVector3f { + + /** + * Set the W value + * @param w + */ + void setW(float w); + + /** + * Set the X,Y,Z,W values + * @param x + * @param y + * @param z + * @param w + */ + void set(float x, float y, float z, float w); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/lwjgl-git.iml b/etc/lwjgl-2.9.1/src/lwjgl-git.iml new file mode 100644 index 0000000..fc25338 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/lwjgl-git.iml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/etc/lwjgl-2.9.1/src/native/common/CL/cl.h b/etc/lwjgl-2.9.1/src/native/common/CL/cl.h new file mode 100644 index 0000000..1a0e29c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/CL/cl.h @@ -0,0 +1,998 @@ +/******************************************************************************* + * Copyright (c) 2008-2010 The Khronos Group Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and/or associated documentation files (the + * "Materials"), to deal in the Materials without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Materials, and to + * permit persons to whom the Materials are furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Materials. + * + * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + ******************************************************************************/ + +/* $Revision: 11985 $ on $Date: 2010-07-15 11:16:06 -0700 (Thu, 15 Jul 2010) $ */ + +#ifndef __OPENCL_CL_H +#define __OPENCL_CL_H + +#ifdef __APPLE__ +#include +#else +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/******************************************************************************/ + +typedef struct _cl_platform_id * cl_platform_id; +typedef struct _cl_device_id * cl_device_id; +typedef struct _cl_context * cl_context; +typedef struct _cl_command_queue * cl_command_queue; +typedef struct _cl_mem * cl_mem; +typedef struct _cl_program * cl_program; +typedef struct _cl_kernel * cl_kernel; +typedef struct _cl_event * cl_event; +typedef struct _cl_sampler * cl_sampler; + +typedef cl_uint cl_bool; /* WARNING! Unlike cl_ types in cl_platform.h, cl_bool is not guaranteed to be the same size as the bool in kernels. */ +typedef cl_ulong cl_bitfield; +typedef cl_bitfield cl_device_type; +typedef cl_uint cl_platform_info; +typedef cl_uint cl_device_info; +typedef cl_bitfield cl_device_fp_config; +typedef cl_uint cl_device_mem_cache_type; +typedef cl_uint cl_device_local_mem_type; +typedef cl_bitfield cl_device_exec_capabilities; +typedef cl_bitfield cl_command_queue_properties; + +typedef intptr_t cl_context_properties; +typedef cl_uint cl_context_info; +typedef cl_uint cl_command_queue_info; +typedef cl_uint cl_channel_order; +typedef cl_uint cl_channel_type; +typedef cl_bitfield cl_mem_flags; +typedef cl_uint cl_mem_object_type; +typedef cl_uint cl_mem_info; +typedef cl_uint cl_image_info; +typedef cl_uint cl_buffer_create_type; +typedef cl_uint cl_addressing_mode; +typedef cl_uint cl_filter_mode; +typedef cl_uint cl_sampler_info; +typedef cl_bitfield cl_map_flags; +typedef cl_uint cl_program_info; +typedef cl_uint cl_program_build_info; +typedef cl_int cl_build_status; +typedef cl_uint cl_kernel_info; +typedef cl_uint cl_kernel_work_group_info; +typedef cl_uint cl_event_info; +typedef cl_uint cl_command_type; +typedef cl_uint cl_profiling_info; + +typedef struct _cl_image_format { + cl_channel_order image_channel_order; + cl_channel_type image_channel_data_type; +} cl_image_format; + + +typedef struct _cl_buffer_region { + size_t origin; + size_t size; +} cl_buffer_region; + +/******************************************************************************/ + +/* Error Codes */ +#define CL_SUCCESS 0 +#define CL_DEVICE_NOT_FOUND -1 +#define CL_DEVICE_NOT_AVAILABLE -2 +#define CL_COMPILER_NOT_AVAILABLE -3 +#define CL_MEM_OBJECT_ALLOCATION_FAILURE -4 +#define CL_OUT_OF_RESOURCES -5 +#define CL_OUT_OF_HOST_MEMORY -6 +#define CL_PROFILING_INFO_NOT_AVAILABLE -7 +#define CL_MEM_COPY_OVERLAP -8 +#define CL_IMAGE_FORMAT_MISMATCH -9 +#define CL_IMAGE_FORMAT_NOT_SUPPORTED -10 +#define CL_BUILD_PROGRAM_FAILURE -11 +#define CL_MAP_FAILURE -12 +#define CL_MISALIGNED_SUB_BUFFER_OFFSET -13 +#define CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST -14 + +#define CL_INVALID_VALUE -30 +#define CL_INVALID_DEVICE_TYPE -31 +#define CL_INVALID_PLATFORM -32 +#define CL_INVALID_DEVICE -33 +#define CL_INVALID_CONTEXT -34 +#define CL_INVALID_QUEUE_PROPERTIES -35 +#define CL_INVALID_COMMAND_QUEUE -36 +#define CL_INVALID_HOST_PTR -37 +#define CL_INVALID_MEM_OBJECT -38 +#define CL_INVALID_IMAGE_FORMAT_DESCRIPTOR -39 +#define CL_INVALID_IMAGE_SIZE -40 +#define CL_INVALID_SAMPLER -41 +#define CL_INVALID_BINARY -42 +#define CL_INVALID_BUILD_OPTIONS -43 +#define CL_INVALID_PROGRAM -44 +#define CL_INVALID_PROGRAM_EXECUTABLE -45 +#define CL_INVALID_KERNEL_NAME -46 +#define CL_INVALID_KERNEL_DEFINITION -47 +#define CL_INVALID_KERNEL -48 +#define CL_INVALID_ARG_INDEX -49 +#define CL_INVALID_ARG_VALUE -50 +#define CL_INVALID_ARG_SIZE -51 +#define CL_INVALID_KERNEL_ARGS -52 +#define CL_INVALID_WORK_DIMENSION -53 +#define CL_INVALID_WORK_GROUP_SIZE -54 +#define CL_INVALID_WORK_ITEM_SIZE -55 +#define CL_INVALID_GLOBAL_OFFSET -56 +#define CL_INVALID_EVENT_WAIT_LIST -57 +#define CL_INVALID_EVENT -58 +#define CL_INVALID_OPERATION -59 +#define CL_INVALID_GL_OBJECT -60 +#define CL_INVALID_BUFFER_SIZE -61 +#define CL_INVALID_MIP_LEVEL -62 +#define CL_INVALID_GLOBAL_WORK_SIZE -63 +#define CL_INVALID_PROPERTY -64 + +/* OpenCL Version */ +#define CL_VERSION_1_0 1 +#define CL_VERSION_1_1 1 + +/* cl_bool */ +#define CL_FALSE 0 +#define CL_TRUE 1 + +/* cl_platform_info */ +#define CL_PLATFORM_PROFILE 0x0900 +#define CL_PLATFORM_VERSION 0x0901 +#define CL_PLATFORM_NAME 0x0902 +#define CL_PLATFORM_VENDOR 0x0903 +#define CL_PLATFORM_EXTENSIONS 0x0904 + +/* cl_device_type - bitfield */ +#define CL_DEVICE_TYPE_DEFAULT (1 << 0) +#define CL_DEVICE_TYPE_CPU (1 << 1) +#define CL_DEVICE_TYPE_GPU (1 << 2) +#define CL_DEVICE_TYPE_ACCELERATOR (1 << 3) +#define CL_DEVICE_TYPE_ALL 0xFFFFFFFF + +/* cl_device_info */ +#define CL_DEVICE_TYPE 0x1000 +#define CL_DEVICE_VENDOR_ID 0x1001 +#define CL_DEVICE_MAX_COMPUTE_UNITS 0x1002 +#define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS 0x1003 +#define CL_DEVICE_MAX_WORK_GROUP_SIZE 0x1004 +#define CL_DEVICE_MAX_WORK_ITEM_SIZES 0x1005 +#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR 0x1006 +#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT 0x1007 +#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT 0x1008 +#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG 0x1009 +#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT 0x100A +#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE 0x100B +#define CL_DEVICE_MAX_CLOCK_FREQUENCY 0x100C +#define CL_DEVICE_ADDRESS_BITS 0x100D +#define CL_DEVICE_MAX_READ_IMAGE_ARGS 0x100E +#define CL_DEVICE_MAX_WRITE_IMAGE_ARGS 0x100F +#define CL_DEVICE_MAX_MEM_ALLOC_SIZE 0x1010 +#define CL_DEVICE_IMAGE2D_MAX_WIDTH 0x1011 +#define CL_DEVICE_IMAGE2D_MAX_HEIGHT 0x1012 +#define CL_DEVICE_IMAGE3D_MAX_WIDTH 0x1013 +#define CL_DEVICE_IMAGE3D_MAX_HEIGHT 0x1014 +#define CL_DEVICE_IMAGE3D_MAX_DEPTH 0x1015 +#define CL_DEVICE_IMAGE_SUPPORT 0x1016 +#define CL_DEVICE_MAX_PARAMETER_SIZE 0x1017 +#define CL_DEVICE_MAX_SAMPLERS 0x1018 +#define CL_DEVICE_MEM_BASE_ADDR_ALIGN 0x1019 +#define CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE 0x101A +#define CL_DEVICE_SINGLE_FP_CONFIG 0x101B +#define CL_DEVICE_GLOBAL_MEM_CACHE_TYPE 0x101C +#define CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE 0x101D +#define CL_DEVICE_GLOBAL_MEM_CACHE_SIZE 0x101E +#define CL_DEVICE_GLOBAL_MEM_SIZE 0x101F +#define CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE 0x1020 +#define CL_DEVICE_MAX_CONSTANT_ARGS 0x1021 +#define CL_DEVICE_LOCAL_MEM_TYPE 0x1022 +#define CL_DEVICE_LOCAL_MEM_SIZE 0x1023 +#define CL_DEVICE_ERROR_CORRECTION_SUPPORT 0x1024 +#define CL_DEVICE_PROFILING_TIMER_RESOLUTION 0x1025 +#define CL_DEVICE_ENDIAN_LITTLE 0x1026 +#define CL_DEVICE_AVAILABLE 0x1027 +#define CL_DEVICE_COMPILER_AVAILABLE 0x1028 +#define CL_DEVICE_EXECUTION_CAPABILITIES 0x1029 +#define CL_DEVICE_QUEUE_PROPERTIES 0x102A +#define CL_DEVICE_NAME 0x102B +#define CL_DEVICE_VENDOR 0x102C +#define CL_DRIVER_VERSION 0x102D +#define CL_DEVICE_PROFILE 0x102E +#define CL_DEVICE_VERSION 0x102F +#define CL_DEVICE_EXTENSIONS 0x1030 +#define CL_DEVICE_PLATFORM 0x1031 +/* 0x1032 reserved for CL_DEVICE_DOUBLE_FP_CONFIG */ +/* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG */ +#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034 +#define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035 +#define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036 +#define CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT 0x1037 +#define CL_DEVICE_NATIVE_VECTOR_WIDTH_INT 0x1038 +#define CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG 0x1039 +#define CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT 0x103A +#define CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE 0x103B +#define CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF 0x103C +#define CL_DEVICE_OPENCL_C_VERSION 0x103D + +/* cl_device_fp_config - bitfield */ +#define CL_FP_DENORM (1 << 0) +#define CL_FP_INF_NAN (1 << 1) +#define CL_FP_ROUND_TO_NEAREST (1 << 2) +#define CL_FP_ROUND_TO_ZERO (1 << 3) +#define CL_FP_ROUND_TO_INF (1 << 4) +#define CL_FP_FMA (1 << 5) +#define CL_FP_SOFT_FLOAT (1 << 6) + +/* cl_device_mem_cache_type */ +#define CL_NONE 0x0 +#define CL_READ_ONLY_CACHE 0x1 +#define CL_READ_WRITE_CACHE 0x2 + +/* cl_device_local_mem_type */ +#define CL_LOCAL 0x1 +#define CL_GLOBAL 0x2 + +/* cl_device_exec_capabilities - bitfield */ +#define CL_EXEC_KERNEL (1 << 0) +#define CL_EXEC_NATIVE_KERNEL (1 << 1) + +/* cl_command_queue_properties - bitfield */ +#define CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE (1 << 0) +#define CL_QUEUE_PROFILING_ENABLE (1 << 1) + +/* cl_context_info */ +#define CL_CONTEXT_REFERENCE_COUNT 0x1080 +#define CL_CONTEXT_DEVICES 0x1081 +#define CL_CONTEXT_PROPERTIES 0x1082 +#define CL_CONTEXT_NUM_DEVICES 0x1083 + +/* cl_context_info + cl_context_properties */ +#define CL_CONTEXT_PLATFORM 0x1084 + +/* cl_command_queue_info */ +#define CL_QUEUE_CONTEXT 0x1090 +#define CL_QUEUE_DEVICE 0x1091 +#define CL_QUEUE_REFERENCE_COUNT 0x1092 +#define CL_QUEUE_PROPERTIES 0x1093 + +/* cl_mem_flags - bitfield */ +#define CL_MEM_READ_WRITE (1 << 0) +#define CL_MEM_WRITE_ONLY (1 << 1) +#define CL_MEM_READ_ONLY (1 << 2) +#define CL_MEM_USE_HOST_PTR (1 << 3) +#define CL_MEM_ALLOC_HOST_PTR (1 << 4) +#define CL_MEM_COPY_HOST_PTR (1 << 5) + +/* cl_channel_order */ +#define CL_R 0x10B0 +#define CL_A 0x10B1 +#define CL_RG 0x10B2 +#define CL_RA 0x10B3 +#define CL_RGB 0x10B4 +#define CL_RGBA 0x10B5 +#define CL_BGRA 0x10B6 +#define CL_ARGB 0x10B7 +#define CL_INTENSITY 0x10B8 +#define CL_LUMINANCE 0x10B9 +#define CL_Rx 0x10BA +#define CL_RGx 0x10BB +#define CL_RGBx 0x10BC + +/* cl_channel_type */ +#define CL_SNORM_INT8 0x10D0 +#define CL_SNORM_INT16 0x10D1 +#define CL_UNORM_INT8 0x10D2 +#define CL_UNORM_INT16 0x10D3 +#define CL_UNORM_SHORT_565 0x10D4 +#define CL_UNORM_SHORT_555 0x10D5 +#define CL_UNORM_INT_101010 0x10D6 +#define CL_SIGNED_INT8 0x10D7 +#define CL_SIGNED_INT16 0x10D8 +#define CL_SIGNED_INT32 0x10D9 +#define CL_UNSIGNED_INT8 0x10DA +#define CL_UNSIGNED_INT16 0x10DB +#define CL_UNSIGNED_INT32 0x10DC +#define CL_HALF_FLOAT 0x10DD +#define CL_FLOAT 0x10DE + +/* cl_mem_object_type */ +#define CL_MEM_OBJECT_BUFFER 0x10F0 +#define CL_MEM_OBJECT_IMAGE2D 0x10F1 +#define CL_MEM_OBJECT_IMAGE3D 0x10F2 + +/* cl_mem_info */ +#define CL_MEM_TYPE 0x1100 +#define CL_MEM_FLAGS 0x1101 +#define CL_MEM_SIZE 0x1102 +#define CL_MEM_HOST_PTR 0x1103 +#define CL_MEM_MAP_COUNT 0x1104 +#define CL_MEM_REFERENCE_COUNT 0x1105 +#define CL_MEM_CONTEXT 0x1106 +#define CL_MEM_ASSOCIATED_MEMOBJECT 0x1107 +#define CL_MEM_OFFSET 0x1108 + +/* cl_image_info */ +#define CL_IMAGE_FORMAT 0x1110 +#define CL_IMAGE_ELEMENT_SIZE 0x1111 +#define CL_IMAGE_ROW_PITCH 0x1112 +#define CL_IMAGE_SLICE_PITCH 0x1113 +#define CL_IMAGE_WIDTH 0x1114 +#define CL_IMAGE_HEIGHT 0x1115 +#define CL_IMAGE_DEPTH 0x1116 + +/* cl_addressing_mode */ +#define CL_ADDRESS_NONE 0x1130 +#define CL_ADDRESS_CLAMP_TO_EDGE 0x1131 +#define CL_ADDRESS_CLAMP 0x1132 +#define CL_ADDRESS_REPEAT 0x1133 +#define CL_ADDRESS_MIRRORED_REPEAT 0x1134 + +/* cl_filter_mode */ +#define CL_FILTER_NEAREST 0x1140 +#define CL_FILTER_LINEAR 0x1141 + +/* cl_sampler_info */ +#define CL_SAMPLER_REFERENCE_COUNT 0x1150 +#define CL_SAMPLER_CONTEXT 0x1151 +#define CL_SAMPLER_NORMALIZED_COORDS 0x1152 +#define CL_SAMPLER_ADDRESSING_MODE 0x1153 +#define CL_SAMPLER_FILTER_MODE 0x1154 + +/* cl_map_flags - bitfield */ +#define CL_MAP_READ (1 << 0) +#define CL_MAP_WRITE (1 << 1) + +/* cl_program_info */ +#define CL_PROGRAM_REFERENCE_COUNT 0x1160 +#define CL_PROGRAM_CONTEXT 0x1161 +#define CL_PROGRAM_NUM_DEVICES 0x1162 +#define CL_PROGRAM_DEVICES 0x1163 +#define CL_PROGRAM_SOURCE 0x1164 +#define CL_PROGRAM_BINARY_SIZES 0x1165 +#define CL_PROGRAM_BINARIES 0x1166 + +/* cl_program_build_info */ +#define CL_PROGRAM_BUILD_STATUS 0x1181 +#define CL_PROGRAM_BUILD_OPTIONS 0x1182 +#define CL_PROGRAM_BUILD_LOG 0x1183 + +/* cl_build_status */ +#define CL_BUILD_SUCCESS 0 +#define CL_BUILD_NONE -1 +#define CL_BUILD_ERROR -2 +#define CL_BUILD_IN_PROGRESS -3 + +/* cl_kernel_info */ +#define CL_KERNEL_FUNCTION_NAME 0x1190 +#define CL_KERNEL_NUM_ARGS 0x1191 +#define CL_KERNEL_REFERENCE_COUNT 0x1192 +#define CL_KERNEL_CONTEXT 0x1193 +#define CL_KERNEL_PROGRAM 0x1194 + +/* cl_kernel_work_group_info */ +#define CL_KERNEL_WORK_GROUP_SIZE 0x11B0 +#define CL_KERNEL_COMPILE_WORK_GROUP_SIZE 0x11B1 +#define CL_KERNEL_LOCAL_MEM_SIZE 0x11B2 +#define CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x11B3 +#define CL_KERNEL_PRIVATE_MEM_SIZE 0x11B4 + +/* cl_event_info */ +#define CL_EVENT_COMMAND_QUEUE 0x11D0 +#define CL_EVENT_COMMAND_TYPE 0x11D1 +#define CL_EVENT_REFERENCE_COUNT 0x11D2 +#define CL_EVENT_COMMAND_EXECUTION_STATUS 0x11D3 +#define CL_EVENT_CONTEXT 0x11D4 + +/* cl_command_type */ +#define CL_COMMAND_NDRANGE_KERNEL 0x11F0 +#define CL_COMMAND_TASK 0x11F1 +#define CL_COMMAND_NATIVE_KERNEL 0x11F2 +#define CL_COMMAND_READ_BUFFER 0x11F3 +#define CL_COMMAND_WRITE_BUFFER 0x11F4 +#define CL_COMMAND_COPY_BUFFER 0x11F5 +#define CL_COMMAND_READ_IMAGE 0x11F6 +#define CL_COMMAND_WRITE_IMAGE 0x11F7 +#define CL_COMMAND_COPY_IMAGE 0x11F8 +#define CL_COMMAND_COPY_IMAGE_TO_BUFFER 0x11F9 +#define CL_COMMAND_COPY_BUFFER_TO_IMAGE 0x11FA +#define CL_COMMAND_MAP_BUFFER 0x11FB +#define CL_COMMAND_MAP_IMAGE 0x11FC +#define CL_COMMAND_UNMAP_MEM_OBJECT 0x11FD +#define CL_COMMAND_MARKER 0x11FE +#define CL_COMMAND_ACQUIRE_GL_OBJECTS 0x11FF +#define CL_COMMAND_RELEASE_GL_OBJECTS 0x1200 +#define CL_COMMAND_READ_BUFFER_RECT 0x1201 +#define CL_COMMAND_WRITE_BUFFER_RECT 0x1202 +#define CL_COMMAND_COPY_BUFFER_RECT 0x1203 +#define CL_COMMAND_USER 0x1204 + +/* command execution status */ +#define CL_COMPLETE 0x0 +#define CL_RUNNING 0x1 +#define CL_SUBMITTED 0x2 +#define CL_QUEUED 0x3 + +/* cl_buffer_create_type */ +#define CL_BUFFER_CREATE_TYPE_REGION 0x1220 + +/* cl_profiling_info */ +#define CL_PROFILING_COMMAND_QUEUED 0x1280 +#define CL_PROFILING_COMMAND_SUBMIT 0x1281 +#define CL_PROFILING_COMMAND_START 0x1282 +#define CL_PROFILING_COMMAND_END 0x1283 + +/********************************************************************************************************/ + +/* Platform API */ +extern CL_API_ENTRY cl_int CL_API_CALL +clGetPlatformIDs(cl_uint /* num_entries */, + cl_platform_id * /* platforms */, + cl_uint * /* num_platforms */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetPlatformInfo(cl_platform_id /* platform */, + cl_platform_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +/* Device APIs */ +extern CL_API_ENTRY cl_int CL_API_CALL +clGetDeviceIDs(cl_platform_id /* platform */, + cl_device_type /* device_type */, + cl_uint /* num_entries */, + cl_device_id * /* devices */, + cl_uint * /* num_devices */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetDeviceInfo(cl_device_id /* device */, + cl_device_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +/* Context APIs */ +extern CL_API_ENTRY cl_context CL_API_CALL +clCreateContext(const cl_context_properties * /* properties */, + cl_uint /* num_devices */, + const cl_device_id * /* devices */, + void (CL_CALLBACK * /* pfn_notify */)(const char *, const void *, size_t, void *), + void * /* user_data */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_context CL_API_CALL +clCreateContextFromType(const cl_context_properties * /* properties */, + cl_device_type /* device_type */, + void (CL_CALLBACK * /* pfn_notify*/ )(const char *, const void *, size_t, void *), + void * /* user_data */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clRetainContext(cl_context /* context */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clReleaseContext(cl_context /* context */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetContextInfo(cl_context /* context */, + cl_context_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +/* Command Queue APIs */ +extern CL_API_ENTRY cl_command_queue CL_API_CALL +clCreateCommandQueue(cl_context /* context */, + cl_device_id /* device */, + cl_command_queue_properties /* properties */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clRetainCommandQueue(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clReleaseCommandQueue(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetCommandQueueInfo(cl_command_queue /* command_queue */, + cl_command_queue_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +#ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS +#warning CL_USE_DEPRECATED_OPENCL_1_0_APIS is defined. These APIs are unsupported and untested in OpenCL 1.1! +/* + * WARNING: + * This API introduces mutable state into the OpenCL implementation. It has been REMOVED + * to better facilitate thread safety. The 1.0 API is not thread safe. It is not tested by the + * OpenCL 1.1 conformance test, and consequently may not work or may not work dependably. + * It is likely to be non-performant. Use of this API is not advised. Use at your own risk. + * + * Software developers previously relying on this API are instructed to set the command queue + * properties when creating the queue, instead. + */ +extern CL_API_ENTRY cl_int CL_API_CALL +clSetCommandQueueProperty(cl_command_queue /* command_queue */, + cl_command_queue_properties /* properties */, + cl_bool /* enable */, + cl_command_queue_properties * /* old_properties */) CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED; +#endif /* CL_USE_DEPRECATED_OPENCL_1_0_APIS */ + +/* Memory Object APIs */ +extern CL_API_ENTRY cl_mem CL_API_CALL +clCreateBuffer(cl_context /* context */, + cl_mem_flags /* flags */, + size_t /* size */, + void * /* host_ptr */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_mem CL_API_CALL +clCreateSubBuffer(cl_mem /* buffer */, + cl_mem_flags /* flags */, + cl_buffer_create_type /* buffer_create_type */, + const void * /* buffer_create_info */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1; + +extern CL_API_ENTRY cl_mem CL_API_CALL +clCreateImage2D(cl_context /* context */, + cl_mem_flags /* flags */, + const cl_image_format * /* image_format */, + size_t /* image_width */, + size_t /* image_height */, + size_t /* image_row_pitch */, + void * /* host_ptr */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_mem CL_API_CALL +clCreateImage3D(cl_context /* context */, + cl_mem_flags /* flags */, + const cl_image_format * /* image_format */, + size_t /* image_width */, + size_t /* image_height */, + size_t /* image_depth */, + size_t /* image_row_pitch */, + size_t /* image_slice_pitch */, + void * /* host_ptr */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clRetainMemObject(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clReleaseMemObject(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetSupportedImageFormats(cl_context /* context */, + cl_mem_flags /* flags */, + cl_mem_object_type /* image_type */, + cl_uint /* num_entries */, + cl_image_format * /* image_formats */, + cl_uint * /* num_image_formats */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetMemObjectInfo(cl_mem /* memobj */, + cl_mem_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetImageInfo(cl_mem /* image */, + cl_image_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clSetMemObjectDestructorCallback( cl_mem /* memobj */, + void (CL_CALLBACK * /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/), + void * /*user_data */ ) CL_API_SUFFIX__VERSION_1_1; + +/* Sampler APIs */ +extern CL_API_ENTRY cl_sampler CL_API_CALL +clCreateSampler(cl_context /* context */, + cl_bool /* normalized_coords */, + cl_addressing_mode /* addressing_mode */, + cl_filter_mode /* filter_mode */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clRetainSampler(cl_sampler /* sampler */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clReleaseSampler(cl_sampler /* sampler */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetSamplerInfo(cl_sampler /* sampler */, + cl_sampler_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +/* Program Object APIs */ +extern CL_API_ENTRY cl_program CL_API_CALL +clCreateProgramWithSource(cl_context /* context */, + cl_uint /* count */, + const char ** /* strings */, + const size_t * /* lengths */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_program CL_API_CALL +clCreateProgramWithBinary(cl_context /* context */, + cl_uint /* num_devices */, + const cl_device_id * /* device_list */, + const size_t * /* lengths */, + const unsigned char ** /* binaries */, + cl_int * /* binary_status */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clRetainProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clReleaseProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clBuildProgram(cl_program /* program */, + cl_uint /* num_devices */, + const cl_device_id * /* device_list */, + const char * /* options */, + void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */), + void * /* user_data */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clUnloadCompiler(void) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetProgramInfo(cl_program /* program */, + cl_program_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetProgramBuildInfo(cl_program /* program */, + cl_device_id /* device */, + cl_program_build_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +/* Kernel Object APIs */ +extern CL_API_ENTRY cl_kernel CL_API_CALL +clCreateKernel(cl_program /* program */, + const char * /* kernel_name */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clCreateKernelsInProgram(cl_program /* program */, + cl_uint /* num_kernels */, + cl_kernel * /* kernels */, + cl_uint * /* num_kernels_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clRetainKernel(cl_kernel /* kernel */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clReleaseKernel(cl_kernel /* kernel */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clSetKernelArg(cl_kernel /* kernel */, + cl_uint /* arg_index */, + size_t /* arg_size */, + const void * /* arg_value */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetKernelInfo(cl_kernel /* kernel */, + cl_kernel_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetKernelWorkGroupInfo(cl_kernel /* kernel */, + cl_device_id /* device */, + cl_kernel_work_group_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +/* Event Object APIs */ +extern CL_API_ENTRY cl_int CL_API_CALL +clWaitForEvents(cl_uint /* num_events */, + const cl_event * /* event_list */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetEventInfo(cl_event /* event */, + cl_event_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_event CL_API_CALL +clCreateUserEvent(cl_context /* context */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1; + +extern CL_API_ENTRY cl_int CL_API_CALL +clRetainEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clReleaseEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clSetUserEventStatus(cl_event /* event */, + cl_int /* execution_status */) CL_API_SUFFIX__VERSION_1_1; + +extern CL_API_ENTRY cl_int CL_API_CALL +clSetEventCallback( cl_event /* event */, + cl_int /* command_exec_callback_type */, + void (CL_CALLBACK * /* pfn_notify */)(cl_event, cl_int, void *), + void * /* user_data */) CL_API_SUFFIX__VERSION_1_1; + +/* Profiling APIs */ +extern CL_API_ENTRY cl_int CL_API_CALL +clGetEventProfilingInfo(cl_event /* event */, + cl_profiling_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +/* Flush and Finish APIs */ +extern CL_API_ENTRY cl_int CL_API_CALL +clFlush(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clFinish(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0; + +/* Enqueued Commands APIs */ +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueReadBuffer(cl_command_queue /* command_queue */, + cl_mem /* buffer */, + cl_bool /* blocking_read */, + size_t /* offset */, + size_t /* cb */, + void * /* ptr */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueReadBufferRect(cl_command_queue /* command_queue */, + cl_mem /* buffer */, + cl_bool /* blocking_read */, + const size_t * /* buffer_origin */, + const size_t * /* host_origin */, + const size_t * /* region */, + size_t /* buffer_row_pitch */, + size_t /* buffer_slice_pitch */, + size_t /* host_row_pitch */, + size_t /* host_slice_pitch */, + void * /* ptr */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueWriteBuffer(cl_command_queue /* command_queue */, + cl_mem /* buffer */, + cl_bool /* blocking_write */, + size_t /* offset */, + size_t /* cb */, + const void * /* ptr */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueWriteBufferRect(cl_command_queue /* command_queue */, + cl_mem /* buffer */, + cl_bool /* blocking_write */, + const size_t * /* buffer_origin */, + const size_t * /* host_origin */, + const size_t * /* region */, + size_t /* buffer_row_pitch */, + size_t /* buffer_slice_pitch */, + size_t /* host_row_pitch */, + size_t /* host_slice_pitch */, + const void * /* ptr */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueCopyBuffer(cl_command_queue /* command_queue */, + cl_mem /* src_buffer */, + cl_mem /* dst_buffer */, + size_t /* src_offset */, + size_t /* dst_offset */, + size_t /* cb */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueCopyBufferRect(cl_command_queue /* command_queue */, + cl_mem /* src_buffer */, + cl_mem /* dst_buffer */, + const size_t * /* src_origin */, + const size_t * /* dst_origin */, + const size_t * /* region */, + size_t /* src_row_pitch */, + size_t /* src_slice_pitch */, + size_t /* dst_row_pitch */, + size_t /* dst_slice_pitch */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_1; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueReadImage(cl_command_queue /* command_queue */, + cl_mem /* image */, + cl_bool /* blocking_read */, + const size_t * /* origin[3] */, + const size_t * /* region[3] */, + size_t /* row_pitch */, + size_t /* slice_pitch */, + void * /* ptr */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueWriteImage(cl_command_queue /* command_queue */, + cl_mem /* image */, + cl_bool /* blocking_write */, + const size_t * /* origin[3] */, + const size_t * /* region[3] */, + size_t /* input_row_pitch */, + size_t /* input_slice_pitch */, + const void * /* ptr */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueCopyImage(cl_command_queue /* command_queue */, + cl_mem /* src_image */, + cl_mem /* dst_image */, + const size_t * /* src_origin[3] */, + const size_t * /* dst_origin[3] */, + const size_t * /* region[3] */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueCopyImageToBuffer(cl_command_queue /* command_queue */, + cl_mem /* src_image */, + cl_mem /* dst_buffer */, + const size_t * /* src_origin[3] */, + const size_t * /* region[3] */, + size_t /* dst_offset */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueCopyBufferToImage(cl_command_queue /* command_queue */, + cl_mem /* src_buffer */, + cl_mem /* dst_image */, + size_t /* src_offset */, + const size_t * /* dst_origin[3] */, + const size_t * /* region[3] */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY void * CL_API_CALL +clEnqueueMapBuffer(cl_command_queue /* command_queue */, + cl_mem /* buffer */, + cl_bool /* blocking_map */, + cl_map_flags /* map_flags */, + size_t /* offset */, + size_t /* cb */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY void * CL_API_CALL +clEnqueueMapImage(cl_command_queue /* command_queue */, + cl_mem /* image */, + cl_bool /* blocking_map */, + cl_map_flags /* map_flags */, + const size_t * /* origin[3] */, + const size_t * /* region[3] */, + size_t * /* image_row_pitch */, + size_t * /* image_slice_pitch */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueUnmapMemObject(cl_command_queue /* command_queue */, + cl_mem /* memobj */, + void * /* mapped_ptr */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueNDRangeKernel(cl_command_queue /* command_queue */, + cl_kernel /* kernel */, + cl_uint /* work_dim */, + const size_t * /* global_work_offset */, + const size_t * /* global_work_size */, + const size_t * /* local_work_size */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueTask(cl_command_queue /* command_queue */, + cl_kernel /* kernel */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueNativeKernel(cl_command_queue /* command_queue */, + void (*user_func)(void *), + void * /* args */, + size_t /* cb_args */, + cl_uint /* num_mem_objects */, + const cl_mem * /* mem_list */, + const void ** /* args_mem_loc */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueMarker(cl_command_queue /* command_queue */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueWaitForEvents(cl_command_queue /* command_queue */, + cl_uint /* num_events */, + const cl_event * /* event_list */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueBarrier(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0; + +/* Extension function access + * + * Returns the extension function address for the given function name, + * or NULL if a valid function can not be found. The client must + * check to make sure the address is not NULL, before using or + * calling the returned function address. + */ +extern CL_API_ENTRY void * CL_API_CALL clGetExtensionFunctionAddress(const char * /* func_name */) CL_API_SUFFIX__VERSION_1_0; + +#ifdef __cplusplus +} +#endif + +#endif /* __OPENCL_CL_H */ + diff --git a/etc/lwjgl-2.9.1/src/native/common/CL/cl_d3d10.h b/etc/lwjgl-2.9.1/src/native/common/CL/cl_d3d10.h new file mode 100644 index 0000000..374d507 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/CL/cl_d3d10.h @@ -0,0 +1,126 @@ +/********************************************************************************** + * Copyright (c) 2008-2010 The Khronos Group Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and/or associated documentation files (the + * "Materials"), to deal in the Materials without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Materials, and to + * permit persons to whom the Materials are furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Materials. + * + * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + **********************************************************************************/ + +/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */ + +#ifndef __OPENCL_CL_D3D10_H +#define __OPENCL_CL_D3D10_H + +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/****************************************************************************** + * cl_khr_d3d10_sharing */ +#define cl_khr_d3d10_sharing 1 + +typedef cl_uint cl_d3d10_device_source_khr; +typedef cl_uint cl_d3d10_device_set_khr; + +/******************************************************************************/ + +// Error Codes +#define CL_INVALID_D3D10_DEVICE_KHR -1002 +#define CL_INVALID_D3D10_RESOURCE_KHR -1003 +#define CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR -1004 +#define CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR -1005 + +// cl_d3d10_device_source_nv +#define CL_D3D10_DEVICE_KHR 0x4010 +#define CL_D3D10_DXGI_ADAPTER_KHR 0x4011 + +// cl_d3d10_device_set_nv +#define CL_PREFERRED_DEVICES_FOR_D3D10_KHR 0x4012 +#define CL_ALL_DEVICES_FOR_D3D10_KHR 0x4013 + +// cl_context_info +#define CL_CONTEXT_D3D10_DEVICE_KHR 0x4014 +#define CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR 0x402C + +// cl_mem_info +#define CL_MEM_D3D10_RESOURCE_KHR 0x4015 + +// cl_image_info +#define CL_IMAGE_D3D10_SUBRESOURCE_KHR 0x4016 + +// cl_command_type +#define CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR 0x4017 +#define CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR 0x4018 + +/******************************************************************************/ + +typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D10KHR_fn)( + cl_platform_id platform, + cl_d3d10_device_source_khr d3d_device_source, + void * d3d_object, + cl_d3d10_device_set_khr d3d_device_set, + cl_uint num_entries, + cl_device_id * devices, + cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_0; + +typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10BufferKHR_fn)( + cl_context context, + cl_mem_flags flags, + ID3D10Buffer * resource, + cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; + +typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture2DKHR_fn)( + cl_context context, + cl_mem_flags flags, + ID3D10Texture2D * resource, + UINT subresource, + cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; + +typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture3DKHR_fn)( + cl_context context, + cl_mem_flags flags, + ID3D10Texture3D * resource, + UINT subresource, + cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0; + +typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D10ObjectsKHR_fn)( + cl_command_queue command_queue, + cl_uint num_objects, + const cl_mem * mem_objects, + cl_uint num_events_in_wait_list, + const cl_event * event_wait_list, + cl_event * event) CL_API_SUFFIX__VERSION_1_0; + +typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D10ObjectsKHR_fn)( + cl_command_queue command_queue, + cl_uint num_objects, + cl_mem * mem_objects, + cl_uint num_events_in_wait_list, + const cl_event * event_wait_list, + cl_event * event) CL_API_SUFFIX__VERSION_1_0; + +#ifdef __cplusplus +} +#endif + +#endif // __OPENCL_CL_D3D10_H + diff --git a/etc/lwjgl-2.9.1/src/native/common/CL/cl_ext.h b/etc/lwjgl-2.9.1/src/native/common/CL/cl_ext.h new file mode 100644 index 0000000..59e11e8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/CL/cl_ext.h @@ -0,0 +1,213 @@ +/******************************************************************************* + * Copyright (c) 2008-2010 The Khronos Group Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and/or associated documentation files (the + * "Materials"), to deal in the Materials without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Materials, and to + * permit persons to whom the Materials are furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Materials. + * + * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + ******************************************************************************/ + +/* $Revision: 11928 $ on $Date: 2010-07-13 09:04:56 -0700 (Tue, 13 Jul 2010) $ */ + +/* cl_ext.h contains OpenCL extensions which don't have external */ +/* (OpenGL, D3D) dependencies. */ + +#ifndef __CL_EXT_H +#define __CL_EXT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __APPLE__ + #include + #include +#else + #include +#endif + +/* cl_khr_fp64 extension - no extension #define since it has no functions */ +#define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032 + +/* cl_khr_fp16 extension - no extension #define since it has no functions */ +#define CL_DEVICE_HALF_FP_CONFIG 0x1033 + +/* Memory object destruction + * + * Apple extension for use to manage externally allocated buffers used with cl_mem objects with CL_MEM_USE_HOST_PTR + * + * Registers a user callback function that will be called when the memory object is deleted and its resources + * freed. Each call to clSetMemObjectCallbackFn registers the specified user callback function on a callback + * stack associated with memobj. The registered user callback functions are called in the reverse order in + * which they were registered. The user callback functions are called and then the memory object is deleted + * and its resources freed. This provides a mechanism for the application (and libraries) using memobj to be + * notified when the memory referenced by host_ptr, specified when the memory object is created and used as + * the storage bits for the memory object, can be reused or freed. + * + * The application may not call CL api's with the cl_mem object passed to the pfn_notify. + * + * Please check for the "cl_APPLE_SetMemObjectDestructor" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS) + * before using. + */ +#define cl_APPLE_SetMemObjectDestructor 1 +cl_int CL_API_ENTRY clSetMemObjectDestructorAPPLE( cl_mem /* memobj */, + void (* /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/), + void * /*user_data */ ) CL_EXT_SUFFIX__VERSION_1_0; + + +/* Context Logging Functions + * + * The next three convenience functions are intended to be used as the pfn_notify parameter to clCreateContext(). + * Please check for the "cl_APPLE_ContextLoggingFunctions" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS) + * before using. + * + * clLogMessagesToSystemLog fowards on all log messages to the Apple System Logger + */ +#define cl_APPLE_ContextLoggingFunctions 1 +extern void CL_API_ENTRY clLogMessagesToSystemLogAPPLE( const char * /* errstr */, + const void * /* private_info */, + size_t /* cb */, + void * /* user_data */ ) CL_EXT_SUFFIX__VERSION_1_0; + +/* clLogMessagesToStdout sends all log messages to the file descriptor stdout */ +extern void CL_API_ENTRY clLogMessagesToStdoutAPPLE( const char * /* errstr */, + const void * /* private_info */, + size_t /* cb */, + void * /* user_data */ ) CL_EXT_SUFFIX__VERSION_1_0; + +/* clLogMessagesToStderr sends all log messages to the file descriptor stderr */ +extern void CL_API_ENTRY clLogMessagesToStderrAPPLE( const char * /* errstr */, + const void * /* private_info */, + size_t /* cb */, + void * /* user_data */ ) CL_EXT_SUFFIX__VERSION_1_0; + + +/************************ +* cl_khr_icd extension * +************************/ +#define cl_khr_icd 1 + +/* cl_platform_info */ +#define CL_PLATFORM_ICD_SUFFIX_KHR 0x0920 + +/* Additional Error Codes */ +#define CL_PLATFORM_NOT_FOUND_KHR -1001 + +extern CL_API_ENTRY cl_int CL_API_CALL +clIcdGetPlatformIDsKHR(cl_uint /* num_entries */, + cl_platform_id * /* platforms */, + cl_uint * /* num_platforms */); + +typedef CL_API_ENTRY cl_int (CL_API_CALL *clIcdGetPlatformIDsKHR_fn)( + cl_uint /* num_entries */, + cl_platform_id * /* platforms */, + cl_uint * /* num_platforms */); + + +/****************************************** +* cl_nv_device_attribute_query extension * +******************************************/ +/* cl_nv_device_attribute_query extension - no extension #define since it has no functions */ +#define CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV 0x4000 +#define CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV 0x4001 +#define CL_DEVICE_REGISTERS_PER_BLOCK_NV 0x4002 +#define CL_DEVICE_WARP_SIZE_NV 0x4003 +#define CL_DEVICE_GPU_OVERLAP_NV 0x4004 +#define CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV 0x4005 +#define CL_DEVICE_INTEGRATED_MEMORY_NV 0x4006 + + +/********************************* +* cl_amd_device_attribute_query * +*********************************/ +#define CL_DEVICE_PROFILING_TIMER_OFFSET_AMD 0x4036 + + +#ifdef CL_VERSION_1_1 + /*********************************** + * cl_ext_device_fission extension * + ***********************************/ + #define cl_ext_device_fission 1 + + extern CL_API_ENTRY cl_int CL_API_CALL + clReleaseDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1; + + typedef CL_API_ENTRY cl_int + (CL_API_CALL *clReleaseDeviceEXT_fn)( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1; + + extern CL_API_ENTRY cl_int CL_API_CALL + clRetainDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1; + + typedef CL_API_ENTRY cl_int + (CL_API_CALL *clRetainDeviceEXT_fn)( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1; + + typedef cl_ulong cl_device_partition_property_ext; + extern CL_API_ENTRY cl_int CL_API_CALL + clCreateSubDevicesEXT( cl_device_id /*in_device*/, + const cl_device_partition_property_ext * /* properties */, + cl_uint /*num_entries*/, + cl_device_id * /*out_devices*/, + cl_uint * /*num_devices*/ ) CL_EXT_SUFFIX__VERSION_1_1; + + typedef CL_API_ENTRY cl_int + ( CL_API_CALL * clCreateSubDevicesEXT_fn)( cl_device_id /*in_device*/, + const cl_device_partition_property_ext * /* properties */, + cl_uint /*num_entries*/, + cl_device_id * /*out_devices*/, + cl_uint * /*num_devices*/ ) CL_EXT_SUFFIX__VERSION_1_1; + + /* cl_device_partition_property_ext */ + #define CL_DEVICE_PARTITION_EQUALLY_EXT 0x4050 + #define CL_DEVICE_PARTITION_BY_COUNTS_EXT 0x4051 + #define CL_DEVICE_PARTITION_BY_NAMES_EXT 0x4052 + #define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN_EXT 0x4053 + + /* clDeviceGetInfo selectors */ + #define CL_DEVICE_PARENT_DEVICE_EXT 0x4054 + #define CL_DEVICE_PARTITION_TYPES_EXT 0x4055 + #define CL_DEVICE_AFFINITY_DOMAINS_EXT 0x4056 + #define CL_DEVICE_REFERENCE_COUNT_EXT 0x4057 + #define CL_DEVICE_PARTITION_STYLE_EXT 0x4058 + + /* error codes */ + #define CL_DEVICE_PARTITION_FAILED_EXT -1057 + #define CL_INVALID_PARTITION_COUNT_EXT -1058 + #define CL_INVALID_PARTITION_NAME_EXT -1059 + + /* CL_AFFINITY_DOMAINs */ + #define CL_AFFINITY_DOMAIN_L1_CACHE_EXT 0x1 + #define CL_AFFINITY_DOMAIN_L2_CACHE_EXT 0x2 + #define CL_AFFINITY_DOMAIN_L3_CACHE_EXT 0x3 + #define CL_AFFINITY_DOMAIN_L4_CACHE_EXT 0x4 + #define CL_AFFINITY_DOMAIN_NUMA_EXT 0x10 + #define CL_AFFINITY_DOMAIN_NEXT_FISSIONABLE_EXT 0x100 + + /* cl_device_partition_property_ext list terminators */ + #define CL_PROPERTIES_LIST_END_EXT ((cl_device_partition_property_ext) 0) + #define CL_PARTITION_BY_COUNTS_LIST_END_EXT ((cl_device_partition_property_ext) 0) + #define CL_PARTITION_BY_NAMES_LIST_END_EXT ((cl_device_partition_property_ext) 0 - 1) + + + +#endif /* CL_VERSION_1_1 */ + +#ifdef __cplusplus +} +#endif + + +#endif /* __CL_EXT_H */ diff --git a/etc/lwjgl-2.9.1/src/native/common/CL/cl_gl.h b/etc/lwjgl-2.9.1/src/native/common/CL/cl_gl.h new file mode 100644 index 0000000..e296bc8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/CL/cl_gl.h @@ -0,0 +1,155 @@ +/********************************************************************************** + * Copyright (c) 2008-2010 The Khronos Group Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and/or associated documentation files (the + * "Materials"), to deal in the Materials without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Materials, and to + * permit persons to whom the Materials are furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Materials. + * + * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + **********************************************************************************/ + +/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */ + +/* + * cl_gl.h contains Khronos-approved (KHR) OpenCL extensions which have + * OpenGL dependencies. The application is responsible for #including + * OpenGL or OpenGL ES headers before #including cl_gl.h. + */ + +#ifndef __OPENCL_CL_GL_H +#define __OPENCL_CL_GL_H + +#ifdef __APPLE__ +#include +#include +#else +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +typedef cl_uint cl_gl_object_type; +typedef cl_uint cl_gl_texture_info; +typedef cl_uint cl_gl_platform_info; +typedef struct __GLsync *cl_GLsync; + +/* cl_gl_object_type */ +#define CL_GL_OBJECT_BUFFER 0x2000 +#define CL_GL_OBJECT_TEXTURE2D 0x2001 +#define CL_GL_OBJECT_TEXTURE3D 0x2002 +#define CL_GL_OBJECT_RENDERBUFFER 0x2003 + +/* cl_gl_texture_info */ +#define CL_GL_TEXTURE_TARGET 0x2004 +#define CL_GL_MIPMAP_LEVEL 0x2005 + +extern CL_API_ENTRY cl_mem CL_API_CALL +clCreateFromGLBuffer(cl_context /* context */, + cl_mem_flags /* flags */, + cl_GLuint /* bufobj */, + int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_mem CL_API_CALL +clCreateFromGLTexture2D(cl_context /* context */, + cl_mem_flags /* flags */, + cl_GLenum /* target */, + cl_GLint /* miplevel */, + cl_GLuint /* texture */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_mem CL_API_CALL +clCreateFromGLTexture3D(cl_context /* context */, + cl_mem_flags /* flags */, + cl_GLenum /* target */, + cl_GLint /* miplevel */, + cl_GLuint /* texture */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_mem CL_API_CALL +clCreateFromGLRenderbuffer(cl_context /* context */, + cl_mem_flags /* flags */, + cl_GLuint /* renderbuffer */, + cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetGLObjectInfo(cl_mem /* memobj */, + cl_gl_object_type * /* gl_object_type */, + cl_GLuint * /* gl_object_name */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetGLTextureInfo(cl_mem /* memobj */, + cl_gl_texture_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueAcquireGLObjects(cl_command_queue /* command_queue */, + cl_uint /* num_objects */, + const cl_mem * /* mem_objects */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; + +extern CL_API_ENTRY cl_int CL_API_CALL +clEnqueueReleaseGLObjects(cl_command_queue /* command_queue */, + cl_uint /* num_objects */, + const cl_mem * /* mem_objects */, + cl_uint /* num_events_in_wait_list */, + const cl_event * /* event_wait_list */, + cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0; + +/* cl_khr_gl_sharing extension */ + +#define cl_khr_gl_sharing 1 + +typedef cl_uint cl_gl_context_info; + +/* Additional Error Codes */ +#define CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR -1000 + +/* cl_gl_context_info */ +#define CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR 0x2006 +#define CL_DEVICES_FOR_GL_CONTEXT_KHR 0x2007 + +/* Additional cl_context_properties */ +#define CL_GL_CONTEXT_KHR 0x2008 +#define CL_EGL_DISPLAY_KHR 0x2009 +#define CL_GLX_DISPLAY_KHR 0x200A +#define CL_WGL_HDC_KHR 0x200B +#define CL_CGL_SHAREGROUP_KHR 0x200C + +extern CL_API_ENTRY cl_int CL_API_CALL +clGetGLContextInfoKHR(const cl_context_properties * /* properties */, + cl_gl_context_info /* param_name */, + size_t /* param_value_size */, + void * /* param_value */, + size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0; + +typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetGLContextInfoKHR_fn)( + const cl_context_properties * properties, + cl_gl_context_info param_name, + size_t param_value_size, + void * param_value, + size_t * param_value_size_ret); + +#ifdef __cplusplus +} +#endif + +#endif /* __OPENCL_CL_GL_H */ diff --git a/etc/lwjgl-2.9.1/src/native/common/CL/cl_gl_ext.h b/etc/lwjgl-2.9.1/src/native/common/CL/cl_gl_ext.h new file mode 100644 index 0000000..670acb2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/CL/cl_gl_ext.h @@ -0,0 +1,69 @@ +/********************************************************************************** + * Copyright (c) 2008-2010 The Khronos Group Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and/or associated documentation files (the + * "Materials"), to deal in the Materials without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Materials, and to + * permit persons to whom the Materials are furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Materials. + * + * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + **********************************************************************************/ + +/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */ + +/* cl_gl_ext.h contains vendor (non-KHR) OpenCL extensions which have */ +/* OpenGL dependencies. */ + +#ifndef __OPENCL_CL_GL_EXT_H +#define __OPENCL_CL_GL_EXT_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __APPLE__ + #include +#else + #include +#endif + +/* + * For each extension, follow this template + * /* cl_VEN_extname extension */ +/* #define cl_VEN_extname 1 + * ... define new types, if any + * ... define new tokens, if any + * ... define new APIs, if any + * + * If you need GLtypes here, mirror them with a cl_GLtype, rather than including a GL header + * This allows us to avoid having to decide whether to include GL headers or GLES here. + */ + +/* + * cl_khr_gl_event extension + * See section 9.9 in the OpenCL 1.1 spec for more information + */ +#define CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR 0x200D + +extern CL_API_ENTRY cl_event CL_API_CALL +clCreateEventFromGLsyncKHR(cl_context /* context */, + cl_GLsync /* cl_GLsync */, + cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1; + +#ifdef __cplusplus +} +#endif + +#endif /* __OPENCL_CL_GL_EXT_H */ diff --git a/etc/lwjgl-2.9.1/src/native/common/CL/cl_platform.h b/etc/lwjgl-2.9.1/src/native/common/CL/cl_platform.h new file mode 100644 index 0000000..b87fba3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/CL/cl_platform.h @@ -0,0 +1,1198 @@ +/********************************************************************************** + * Copyright (c) 2008-2010 The Khronos Group Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and/or associated documentation files (the + * "Materials"), to deal in the Materials without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Materials, and to + * permit persons to whom the Materials are furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Materials. + * + * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + **********************************************************************************/ + +/* $Revision: 11803 $ on $Date: 2010-06-25 10:02:12 -0700 (Fri, 25 Jun 2010) $ */ + +#ifndef __CL_PLATFORM_H +#define __CL_PLATFORM_H + +#ifdef __APPLE__ + /* Contains #defines for AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER below */ + #include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(_WIN32) + #define CL_API_ENTRY + #define CL_API_CALL __stdcall + #define CL_CALLBACK __stdcall +#else + #define CL_API_ENTRY + #define CL_API_CALL + #define CL_CALLBACK +#endif + +#ifdef __APPLE__ + #define CL_EXTENSION_WEAK_LINK __attribute__((weak_import)) + #define CL_API_SUFFIX__VERSION_1_0 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER + #define CL_EXT_SUFFIX__VERSION_1_0 CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER + #define CL_API_SUFFIX__VERSION_1_1 CL_EXTENSION_WEAK_LINK + #define CL_EXT_SUFFIX__VERSION_1_1 CL_EXTENSION_WEAK_LINK + #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER +#else + #define CL_EXTENSION_WEAK_LINK + #define CL_API_SUFFIX__VERSION_1_0 + #define CL_EXT_SUFFIX__VERSION_1_0 + #define CL_API_SUFFIX__VERSION_1_1 + #define CL_EXT_SUFFIX__VERSION_1_1 + #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED +#endif + +#if (defined (_WIN32) && defined(_MSC_VER)) + +/* scalar types */ +typedef signed __int8 cl_char; +typedef unsigned __int8 cl_uchar; +typedef signed __int16 cl_short; +typedef unsigned __int16 cl_ushort; +typedef signed __int32 cl_int; +typedef unsigned __int32 cl_uint; +typedef signed __int64 cl_long; +typedef unsigned __int64 cl_ulong; + +typedef unsigned __int16 cl_half; +typedef float cl_float; +typedef double cl_double; + +/* Macro names and corresponding values defined by OpenCL */ +#define CL_CHAR_BIT 8 +#define CL_SCHAR_MAX 127 +#define CL_SCHAR_MIN (-127-1) +#define CL_CHAR_MAX CL_SCHAR_MAX +#define CL_CHAR_MIN CL_SCHAR_MIN +#define CL_UCHAR_MAX 255 +#define CL_SHRT_MAX 32767 +#define CL_SHRT_MIN (-32767-1) +#define CL_USHRT_MAX 65535 +#define CL_INT_MAX 2147483647 +#define CL_INT_MIN (-2147483647-1) +#define CL_UINT_MAX 0xffffffffU +#define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL) +#define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL) +#define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL) + +#define CL_FLT_DIG 6 +#define CL_FLT_MANT_DIG 24 +#define CL_FLT_MAX_10_EXP +38 +#define CL_FLT_MAX_EXP +128 +#define CL_FLT_MIN_10_EXP -37 +#define CL_FLT_MIN_EXP -125 +#define CL_FLT_RADIX 2 +#define CL_FLT_MAX 340282346638528859811704183484516925440.0f +#define CL_FLT_MIN 1.175494350822287507969e-38f +#define CL_FLT_EPSILON 0x1.0p-23f + +#define CL_DBL_DIG 15 +#define CL_DBL_MANT_DIG 53 +#define CL_DBL_MAX_10_EXP +308 +#define CL_DBL_MAX_EXP +1024 +#define CL_DBL_MIN_10_EXP -307 +#define CL_DBL_MIN_EXP -1021 +#define CL_DBL_RADIX 2 +#define CL_DBL_MAX 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0 +#define CL_DBL_MIN 2.225073858507201383090e-308 +#define CL_DBL_EPSILON 2.220446049250313080847e-16 + +#define CL_M_E 2.718281828459045090796 +#define CL_M_LOG2E 1.442695040888963387005 +#define CL_M_LOG10E 0.434294481903251816668 +#define CL_M_LN2 0.693147180559945286227 +#define CL_M_LN10 2.302585092994045901094 +#define CL_M_PI 3.141592653589793115998 +#define CL_M_PI_2 1.570796326794896557999 +#define CL_M_PI_4 0.785398163397448278999 +#define CL_M_1_PI 0.318309886183790691216 +#define CL_M_2_PI 0.636619772367581382433 +#define CL_M_2_SQRTPI 1.128379167095512558561 +#define CL_M_SQRT2 1.414213562373095145475 +#define CL_M_SQRT1_2 0.707106781186547572737 + +#define CL_M_E_F 2.71828174591064f +#define CL_M_LOG2E_F 1.44269502162933f +#define CL_M_LOG10E_F 0.43429449200630f +#define CL_M_LN2_F 0.69314718246460f +#define CL_M_LN10_F 2.30258512496948f +#define CL_M_PI_F 3.14159274101257f +#define CL_M_PI_2_F 1.57079637050629f +#define CL_M_PI_4_F 0.78539818525314f +#define CL_M_1_PI_F 0.31830987334251f +#define CL_M_2_PI_F 0.63661974668503f +#define CL_M_2_SQRTPI_F 1.12837922573090f +#define CL_M_SQRT2_F 1.41421353816986f +#define CL_M_SQRT1_2_F 0.70710676908493f + +#define CL_NAN (CL_INFINITY - CL_INFINITY) +#define CL_HUGE_VALF ((cl_float) 1e50) +#define CL_HUGE_VAL ((cl_double) 1e500) +#define CL_MAXFLOAT CL_FLT_MAX +#define CL_INFINITY CL_HUGE_VALF + +#else + +#include + +/* scalar types */ +typedef int8_t cl_char; +typedef uint8_t cl_uchar; +typedef int16_t cl_short __attribute__((aligned(2))); +typedef uint16_t cl_ushort __attribute__((aligned(2))); +typedef int32_t cl_int __attribute__((aligned(4))); +typedef uint32_t cl_uint __attribute__((aligned(4))); +typedef int64_t cl_long __attribute__((aligned(8))); +typedef uint64_t cl_ulong __attribute__((aligned(8))); + +typedef uint16_t cl_half __attribute__((aligned(2))); +typedef float cl_float __attribute__((aligned(4))); +typedef double cl_double __attribute__((aligned(8))); + +/* Macro names and corresponding values defined by OpenCL */ +#define CL_CHAR_BIT 8 +#define CL_SCHAR_MAX 127 +#define CL_SCHAR_MIN (-127-1) +#define CL_CHAR_MAX CL_SCHAR_MAX +#define CL_CHAR_MIN CL_SCHAR_MIN +#define CL_UCHAR_MAX 255 +#define CL_SHRT_MAX 32767 +#define CL_SHRT_MIN (-32767-1) +#define CL_USHRT_MAX 65535 +#define CL_INT_MAX 2147483647 +#define CL_INT_MIN (-2147483647-1) +#define CL_UINT_MAX 0xffffffffU +#define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL) +#define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL) +#define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL) + +#define CL_FLT_DIG 6 +#define CL_FLT_MANT_DIG 24 +#define CL_FLT_MAX_10_EXP +38 +#define CL_FLT_MAX_EXP +128 +#define CL_FLT_MIN_10_EXP -37 +#define CL_FLT_MIN_EXP -125 +#define CL_FLT_RADIX 2 +#define CL_FLT_MAX 0x1.fffffep127f +#define CL_FLT_MIN 0x1.0p-126f +#define CL_FLT_EPSILON 0x1.0p-23f + +#define CL_DBL_DIG 15 +#define CL_DBL_MANT_DIG 53 +#define CL_DBL_MAX_10_EXP +308 +#define CL_DBL_MAX_EXP +1024 +#define CL_DBL_MIN_10_EXP -307 +#define CL_DBL_MIN_EXP -1021 +#define CL_DBL_RADIX 2 +#define CL_DBL_MAX 0x1.fffffffffffffp1023 +#define CL_DBL_MIN 0x1.0p-1022 +#define CL_DBL_EPSILON 0x1.0p-52 + +#define CL_M_E 2.718281828459045090796 +#define CL_M_LOG2E 1.442695040888963387005 +#define CL_M_LOG10E 0.434294481903251816668 +#define CL_M_LN2 0.693147180559945286227 +#define CL_M_LN10 2.302585092994045901094 +#define CL_M_PI 3.141592653589793115998 +#define CL_M_PI_2 1.570796326794896557999 +#define CL_M_PI_4 0.785398163397448278999 +#define CL_M_1_PI 0.318309886183790691216 +#define CL_M_2_PI 0.636619772367581382433 +#define CL_M_2_SQRTPI 1.128379167095512558561 +#define CL_M_SQRT2 1.414213562373095145475 +#define CL_M_SQRT1_2 0.707106781186547572737 + +#define CL_M_E_F 2.71828174591064f +#define CL_M_LOG2E_F 1.44269502162933f +#define CL_M_LOG10E_F 0.43429449200630f +#define CL_M_LN2_F 0.69314718246460f +#define CL_M_LN10_F 2.30258512496948f +#define CL_M_PI_F 3.14159274101257f +#define CL_M_PI_2_F 1.57079637050629f +#define CL_M_PI_4_F 0.78539818525314f +#define CL_M_1_PI_F 0.31830987334251f +#define CL_M_2_PI_F 0.63661974668503f +#define CL_M_2_SQRTPI_F 1.12837922573090f +#define CL_M_SQRT2_F 1.41421353816986f +#define CL_M_SQRT1_2_F 0.70710676908493f + +#if defined( __GNUC__ ) + #define CL_HUGE_VALF __builtin_huge_valf() + #define CL_HUGE_VAL __builtin_huge_val() + #define CL_NAN __builtin_nanf( "" ) +#else + #define CL_HUGE_VALF ((cl_float) 1e50) + #define CL_HUGE_VAL ((cl_double) 1e500) + float nanf( const char * ); + #define CL_NAN nanf( "" ) +#endif +#define CL_MAXFLOAT CL_FLT_MAX +#define CL_INFINITY CL_HUGE_VALF + +#endif + +#include + +/* Mirror types to GL types. Mirror types allow us to avoid deciding which headers to load based on whether we are using GL or GLES here. */ +typedef unsigned int cl_GLuint; +typedef int cl_GLint; +typedef unsigned int cl_GLenum; + +/* + * Vector types + * + * Note: OpenCL requires that all types be naturally aligned. + * This means that vector types must be naturally aligned. + * For example, a vector of four floats must be aligned to + * a 16 byte boundary (calculated as 4 * the natural 4-byte + * alignment of the float). The alignment qualifiers here + * will only function properly if your compiler supports them + * and if you don't actively work to defeat them. For example, + * in order for a cl_float4 to be 16 byte aligned in a struct, + * the start of the struct must itself be 16-byte aligned. + * + * Maintaining proper alignment is the user's responsibility. + */ + +/* Define basic vector types */ +#if defined( __VEC__ ) + #include /* may be omitted depending on compiler. AltiVec spec provides no way to detect whether the header is required. */ + typedef vector unsigned char __cl_uchar16; + typedef vector signed char __cl_char16; + typedef vector unsigned short __cl_ushort8; + typedef vector signed short __cl_short8; + typedef vector unsigned int __cl_uint4; + typedef vector signed int __cl_int4; + typedef vector float __cl_float4; + #define __CL_UCHAR16__ 1 + #define __CL_CHAR16__ 1 + #define __CL_USHORT8__ 1 + #define __CL_SHORT8__ 1 + #define __CL_UINT4__ 1 + #define __CL_INT4__ 1 + #define __CL_FLOAT4__ 1 +#endif + +#if defined( __SSE__ ) + #if defined( __MINGW64__ ) + #include + #else + #include + #endif + #if defined( __GNUC__ ) + typedef float __cl_float4 __attribute__((vector_size(16))); + #else + typedef __m128 __cl_float4; + #endif + #define __CL_FLOAT4__ 1 +#endif + +#if defined( __SSE2__ ) + #if defined( __MINGW64__ ) + #include + #else + #include + #endif + #if defined( __GNUC__ ) + typedef cl_uchar __cl_uchar16 __attribute__((vector_size(16))); + typedef cl_char __cl_char16 __attribute__((vector_size(16))); + typedef cl_ushort __cl_ushort8 __attribute__((vector_size(16))); + typedef cl_short __cl_short8 __attribute__((vector_size(16))); + typedef cl_uint __cl_uint4 __attribute__((vector_size(16))); + typedef cl_int __cl_int4 __attribute__((vector_size(16))); + typedef cl_ulong __cl_ulong2 __attribute__((vector_size(16))); + typedef cl_long __cl_long2 __attribute__((vector_size(16))); + typedef cl_double __cl_double2 __attribute__((vector_size(16))); + #else + typedef __m128i __cl_uchar16; + typedef __m128i __cl_char16; + typedef __m128i __cl_ushort8; + typedef __m128i __cl_short8; + typedef __m128i __cl_uint4; + typedef __m128i __cl_int4; + typedef __m128i __cl_ulong2; + typedef __m128i __cl_long2; + typedef __m128d __cl_double2; + #endif + #define __CL_UCHAR16__ 1 + #define __CL_CHAR16__ 1 + #define __CL_USHORT8__ 1 + #define __CL_SHORT8__ 1 + #define __CL_INT4__ 1 + #define __CL_UINT4__ 1 + #define __CL_ULONG2__ 1 + #define __CL_LONG2__ 1 + #define __CL_DOUBLE2__ 1 +#endif + +#if defined( __MMX__ ) + #include + #if defined( __GNUC__ ) + typedef cl_uchar __cl_uchar8 __attribute__((vector_size(8))); + typedef cl_char __cl_char8 __attribute__((vector_size(8))); + typedef cl_ushort __cl_ushort4 __attribute__((vector_size(8))); + typedef cl_short __cl_short4 __attribute__((vector_size(8))); + typedef cl_uint __cl_uint2 __attribute__((vector_size(8))); + typedef cl_int __cl_int2 __attribute__((vector_size(8))); + typedef cl_ulong __cl_ulong1 __attribute__((vector_size(8))); + typedef cl_long __cl_long1 __attribute__((vector_size(8))); + typedef cl_float __cl_float2 __attribute__((vector_size(8))); + #else + typedef __m64 __cl_uchar8; + typedef __m64 __cl_char8; + typedef __m64 __cl_ushort4; + typedef __m64 __cl_short4; + typedef __m64 __cl_uint2; + typedef __m64 __cl_int2; + typedef __m64 __cl_ulong1; + typedef __m64 __cl_long1; + typedef __m64 __cl_float2; + #endif + #define __CL_UCHAR8__ 1 + #define __CL_CHAR8__ 1 + #define __CL_USHORT4__ 1 + #define __CL_SHORT4__ 1 + #define __CL_INT2__ 1 + #define __CL_UINT2__ 1 + #define __CL_ULONG1__ 1 + #define __CL_LONG1__ 1 + #define __CL_FLOAT2__ 1 +#endif + +#if defined( __AVX__ ) + #if defined( __MINGW64__ ) + #include + #else + #include + #endif + #if defined( __GNUC__ ) + typedef cl_float __cl_float8 __attribute__((vector_size(32))); + typedef cl_double __cl_double4 __attribute__((vector_size(32))); + #else + typedef __m256 __cl_float8; + typedef __m256d __cl_double4; + #endif + #define __CL_FLOAT8__ 1 + #define __CL_DOUBLE4__ 1 +#endif + +/* Define alignment keys */ +#if defined( __GNUC__ ) + #define CL_ALIGNED(_x) __attribute__ ((aligned(_x))) +#elif defined( _WIN32) && (_MSC_VER) + /* Alignment keys neutered on windows because MSVC can't swallow function arguments with alignment requirements */ + /* http://msdn.microsoft.com/en-us/library/373ak2y1%28VS.71%29.aspx */ + /* #include */ + /* #define CL_ALIGNED(_x) _CRT_ALIGN(_x) */ + #define CL_ALIGNED(_x) +#else + #warning Need to implement some method to align data here + #define CL_ALIGNED(_x) +#endif + +/* Indicate whether .xyzw, .s0123 and .hi.lo are supported */ +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + /* .xyzw and .s0123...{f|F} are supported */ + #define CL_HAS_NAMED_VECTOR_FIELDS 1 + /* .hi and .lo are supported */ + #define CL_HAS_HI_LO_VECTOR_FIELDS 1 +#endif + +/* Define cl_vector types */ + +/* ---- cl_charn ---- */ +typedef union +{ + cl_char CL_ALIGNED(2) s[2]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_char x, y; }; + __extension__ struct{ cl_char s0, s1; }; + __extension__ struct{ cl_char lo, hi; }; +#endif +#if defined( __CL_CHAR2__) + __cl_char2 v2; +#endif +}cl_char2; + +typedef union +{ + cl_char CL_ALIGNED(4) s[4]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_char x, y, z, w; }; + __extension__ struct{ cl_char s0, s1, s2, s3; }; + __extension__ struct{ cl_char2 lo, hi; }; +#endif +#if defined( __CL_CHAR2__) + __cl_char2 v2[2]; +#endif +#if defined( __CL_CHAR4__) + __cl_char4 v4; +#endif +}cl_char4; + +/* cl_char3 is identical in size, alignment and behavior to cl_char4. See section 6.1.5. */ +typedef cl_char4 cl_char3; + +typedef union +{ + cl_char CL_ALIGNED(8) s[8]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_char x, y, z, w; }; + __extension__ struct{ cl_char s0, s1, s2, s3, s4, s5, s6, s7; }; + __extension__ struct{ cl_char4 lo, hi; }; +#endif +#if defined( __CL_CHAR2__) + __cl_char2 v2[4]; +#endif +#if defined( __CL_CHAR4__) + __cl_char4 v4[2]; +#endif +#if defined( __CL_CHAR8__ ) + __cl_char8 v8; +#endif +}cl_char8; + +typedef union +{ + cl_char CL_ALIGNED(16) s[16]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_char x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; + __extension__ struct{ cl_char s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; + __extension__ struct{ cl_char8 lo, hi; }; +#endif +#if defined( __CL_CHAR2__) + __cl_char2 v2[8]; +#endif +#if defined( __CL_CHAR4__) + __cl_char4 v4[4]; +#endif +#if defined( __CL_CHAR8__ ) + __cl_char8 v8[2]; +#endif +#if defined( __CL_CHAR16__ ) + __cl_char16 v16; +#endif +}cl_char16; + + +/* ---- cl_ucharn ---- */ +typedef union +{ + cl_uchar CL_ALIGNED(2) s[2]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_uchar x, y; }; + __extension__ struct{ cl_uchar s0, s1; }; + __extension__ struct{ cl_uchar lo, hi; }; +#endif +#if defined( __cl_uchar2__) + __cl_uchar2 v2; +#endif +}cl_uchar2; + +typedef union +{ + cl_uchar CL_ALIGNED(4) s[4]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_uchar x, y, z, w; }; + __extension__ struct{ cl_uchar s0, s1, s2, s3; }; + __extension__ struct{ cl_uchar2 lo, hi; }; +#endif +#if defined( __CL_UCHAR2__) + __cl_uchar2 v2[2]; +#endif +#if defined( __CL_UCHAR4__) + __cl_uchar4 v4; +#endif +}cl_uchar4; + +/* cl_uchar3 is identical in size, alignment and behavior to cl_uchar4. See section 6.1.5. */ +typedef cl_uchar4 cl_uchar3; + +typedef union +{ + cl_uchar CL_ALIGNED(8) s[8]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_uchar x, y, z, w; }; + __extension__ struct{ cl_uchar s0, s1, s2, s3, s4, s5, s6, s7; }; + __extension__ struct{ cl_uchar4 lo, hi; }; +#endif +#if defined( __CL_UCHAR2__) + __cl_uchar2 v2[4]; +#endif +#if defined( __CL_UCHAR4__) + __cl_uchar4 v4[2]; +#endif +#if defined( __CL_UCHAR8__ ) + __cl_uchar8 v8; +#endif +}cl_uchar8; + +typedef union +{ + cl_uchar CL_ALIGNED(16) s[16]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_uchar x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; + __extension__ struct{ cl_uchar s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; + __extension__ struct{ cl_uchar8 lo, hi; }; +#endif +#if defined( __CL_UCHAR2__) + __cl_uchar2 v2[8]; +#endif +#if defined( __CL_UCHAR4__) + __cl_uchar4 v4[4]; +#endif +#if defined( __CL_UCHAR8__ ) + __cl_uchar8 v8[2]; +#endif +#if defined( __CL_UCHAR16__ ) + __cl_uchar16 v16; +#endif +}cl_uchar16; + + +/* ---- cl_shortn ---- */ +typedef union +{ + cl_short CL_ALIGNED(4) s[2]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_short x, y; }; + __extension__ struct{ cl_short s0, s1; }; + __extension__ struct{ cl_short lo, hi; }; +#endif +#if defined( __CL_SHORT2__) + __cl_short2 v2; +#endif +}cl_short2; + +typedef union +{ + cl_short CL_ALIGNED(8) s[4]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_short x, y, z, w; }; + __extension__ struct{ cl_short s0, s1, s2, s3; }; + __extension__ struct{ cl_short2 lo, hi; }; +#endif +#if defined( __CL_SHORT2__) + __cl_short2 v2[2]; +#endif +#if defined( __CL_SHORT4__) + __cl_short4 v4; +#endif +}cl_short4; + +/* cl_short3 is identical in size, alignment and behavior to cl_short4. See section 6.1.5. */ +typedef cl_short4 cl_short3; + +typedef union +{ + cl_short CL_ALIGNED(16) s[8]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_short x, y, z, w; }; + __extension__ struct{ cl_short s0, s1, s2, s3, s4, s5, s6, s7; }; + __extension__ struct{ cl_short4 lo, hi; }; +#endif +#if defined( __CL_SHORT2__) + __cl_short2 v2[4]; +#endif +#if defined( __CL_SHORT4__) + __cl_short4 v4[2]; +#endif +#if defined( __CL_SHORT8__ ) + __cl_short8 v8; +#endif +}cl_short8; + +typedef union +{ + cl_short CL_ALIGNED(32) s[16]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_short x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; + __extension__ struct{ cl_short s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; + __extension__ struct{ cl_short8 lo, hi; }; +#endif +#if defined( __CL_SHORT2__) + __cl_short2 v2[8]; +#endif +#if defined( __CL_SHORT4__) + __cl_short4 v4[4]; +#endif +#if defined( __CL_SHORT8__ ) + __cl_short8 v8[2]; +#endif +#if defined( __CL_SHORT16__ ) + __cl_short16 v16; +#endif +}cl_short16; + + +/* ---- cl_ushortn ---- */ +typedef union +{ + cl_ushort CL_ALIGNED(4) s[2]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_ushort x, y; }; + __extension__ struct{ cl_ushort s0, s1; }; + __extension__ struct{ cl_ushort lo, hi; }; +#endif +#if defined( __CL_USHORT2__) + __cl_ushort2 v2; +#endif +}cl_ushort2; + +typedef union +{ + cl_ushort CL_ALIGNED(8) s[4]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_ushort x, y, z, w; }; + __extension__ struct{ cl_ushort s0, s1, s2, s3; }; + __extension__ struct{ cl_ushort2 lo, hi; }; +#endif +#if defined( __CL_USHORT2__) + __cl_ushort2 v2[2]; +#endif +#if defined( __CL_USHORT4__) + __cl_ushort4 v4; +#endif +}cl_ushort4; + +/* cl_ushort3 is identical in size, alignment and behavior to cl_ushort4. See section 6.1.5. */ +typedef cl_ushort4 cl_ushort3; + +typedef union +{ + cl_ushort CL_ALIGNED(16) s[8]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_ushort x, y, z, w; }; + __extension__ struct{ cl_ushort s0, s1, s2, s3, s4, s5, s6, s7; }; + __extension__ struct{ cl_ushort4 lo, hi; }; +#endif +#if defined( __CL_USHORT2__) + __cl_ushort2 v2[4]; +#endif +#if defined( __CL_USHORT4__) + __cl_ushort4 v4[2]; +#endif +#if defined( __CL_USHORT8__ ) + __cl_ushort8 v8; +#endif +}cl_ushort8; + +typedef union +{ + cl_ushort CL_ALIGNED(32) s[16]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_ushort x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; + __extension__ struct{ cl_ushort s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; + __extension__ struct{ cl_ushort8 lo, hi; }; +#endif +#if defined( __CL_USHORT2__) + __cl_ushort2 v2[8]; +#endif +#if defined( __CL_USHORT4__) + __cl_ushort4 v4[4]; +#endif +#if defined( __CL_USHORT8__ ) + __cl_ushort8 v8[2]; +#endif +#if defined( __CL_USHORT16__ ) + __cl_ushort16 v16; +#endif +}cl_ushort16; + +/* ---- cl_intn ---- */ +typedef union +{ + cl_int CL_ALIGNED(8) s[2]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_int x, y; }; + __extension__ struct{ cl_int s0, s1; }; + __extension__ struct{ cl_int lo, hi; }; +#endif +#if defined( __CL_INT2__) + __cl_int2 v2; +#endif +}cl_int2; + +typedef union +{ + cl_int CL_ALIGNED(16) s[4]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_int x, y, z, w; }; + __extension__ struct{ cl_int s0, s1, s2, s3; }; + __extension__ struct{ cl_int2 lo, hi; }; +#endif +#if defined( __CL_INT2__) + __cl_int2 v2[2]; +#endif +#if defined( __CL_INT4__) + __cl_int4 v4; +#endif +}cl_int4; + +/* cl_int3 is identical in size, alignment and behavior to cl_int4. See section 6.1.5. */ +typedef cl_int4 cl_int3; + +typedef union +{ + cl_int CL_ALIGNED(32) s[8]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_int x, y, z, w; }; + __extension__ struct{ cl_int s0, s1, s2, s3, s4, s5, s6, s7; }; + __extension__ struct{ cl_int4 lo, hi; }; +#endif +#if defined( __CL_INT2__) + __cl_int2 v2[4]; +#endif +#if defined( __CL_INT4__) + __cl_int4 v4[2]; +#endif +#if defined( __CL_INT8__ ) + __cl_int8 v8; +#endif +}cl_int8; + +typedef union +{ + cl_int CL_ALIGNED(64) s[16]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_int x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; + __extension__ struct{ cl_int s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; + __extension__ struct{ cl_int8 lo, hi; }; +#endif +#if defined( __CL_INT2__) + __cl_int2 v2[8]; +#endif +#if defined( __CL_INT4__) + __cl_int4 v4[4]; +#endif +#if defined( __CL_INT8__ ) + __cl_int8 v8[2]; +#endif +#if defined( __CL_INT16__ ) + __cl_int16 v16; +#endif +}cl_int16; + + +/* ---- cl_uintn ---- */ +typedef union +{ + cl_uint CL_ALIGNED(8) s[2]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_uint x, y; }; + __extension__ struct{ cl_uint s0, s1; }; + __extension__ struct{ cl_uint lo, hi; }; +#endif +#if defined( __CL_UINT2__) + __cl_uint2 v2; +#endif +}cl_uint2; + +typedef union +{ + cl_uint CL_ALIGNED(16) s[4]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_uint x, y, z, w; }; + __extension__ struct{ cl_uint s0, s1, s2, s3; }; + __extension__ struct{ cl_uint2 lo, hi; }; +#endif +#if defined( __CL_UINT2__) + __cl_uint2 v2[2]; +#endif +#if defined( __CL_UINT4__) + __cl_uint4 v4; +#endif +}cl_uint4; + +/* cl_uint3 is identical in size, alignment and behavior to cl_uint4. See section 6.1.5. */ +typedef cl_uint4 cl_uint3; + +typedef union +{ + cl_uint CL_ALIGNED(32) s[8]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_uint x, y, z, w; }; + __extension__ struct{ cl_uint s0, s1, s2, s3, s4, s5, s6, s7; }; + __extension__ struct{ cl_uint4 lo, hi; }; +#endif +#if defined( __CL_UINT2__) + __cl_uint2 v2[4]; +#endif +#if defined( __CL_UINT4__) + __cl_uint4 v4[2]; +#endif +#if defined( __CL_UINT8__ ) + __cl_uint8 v8; +#endif +}cl_uint8; + +typedef union +{ + cl_uint CL_ALIGNED(64) s[16]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_uint x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; + __extension__ struct{ cl_uint s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; + __extension__ struct{ cl_uint8 lo, hi; }; +#endif +#if defined( __CL_UINT2__) + __cl_uint2 v2[8]; +#endif +#if defined( __CL_UINT4__) + __cl_uint4 v4[4]; +#endif +#if defined( __CL_UINT8__ ) + __cl_uint8 v8[2]; +#endif +#if defined( __CL_UINT16__ ) + __cl_uint16 v16; +#endif +}cl_uint16; + +/* ---- cl_longn ---- */ +typedef union +{ + cl_long CL_ALIGNED(16) s[2]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_long x, y; }; + __extension__ struct{ cl_long s0, s1; }; + __extension__ struct{ cl_long lo, hi; }; +#endif +#if defined( __CL_LONG2__) + __cl_long2 v2; +#endif +}cl_long2; + +typedef union +{ + cl_long CL_ALIGNED(32) s[4]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_long x, y, z, w; }; + __extension__ struct{ cl_long s0, s1, s2, s3; }; + __extension__ struct{ cl_long2 lo, hi; }; +#endif +#if defined( __CL_LONG2__) + __cl_long2 v2[2]; +#endif +#if defined( __CL_LONG4__) + __cl_long4 v4; +#endif +}cl_long4; + +/* cl_long3 is identical in size, alignment and behavior to cl_long4. See section 6.1.5. */ +typedef cl_long4 cl_long3; + +typedef union +{ + cl_long CL_ALIGNED(64) s[8]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_long x, y, z, w; }; + __extension__ struct{ cl_long s0, s1, s2, s3, s4, s5, s6, s7; }; + __extension__ struct{ cl_long4 lo, hi; }; +#endif +#if defined( __CL_LONG2__) + __cl_long2 v2[4]; +#endif +#if defined( __CL_LONG4__) + __cl_long4 v4[2]; +#endif +#if defined( __CL_LONG8__ ) + __cl_long8 v8; +#endif +}cl_long8; + +typedef union +{ + cl_long CL_ALIGNED(128) s[16]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_long x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; + __extension__ struct{ cl_long s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; + __extension__ struct{ cl_long8 lo, hi; }; +#endif +#if defined( __CL_LONG2__) + __cl_long2 v2[8]; +#endif +#if defined( __CL_LONG4__) + __cl_long4 v4[4]; +#endif +#if defined( __CL_LONG8__ ) + __cl_long8 v8[2]; +#endif +#if defined( __CL_LONG16__ ) + __cl_long16 v16; +#endif +}cl_long16; + + +/* ---- cl_ulongn ---- */ +typedef union +{ + cl_ulong CL_ALIGNED(16) s[2]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_ulong x, y; }; + __extension__ struct{ cl_ulong s0, s1; }; + __extension__ struct{ cl_ulong lo, hi; }; +#endif +#if defined( __CL_ULONG2__) + __cl_ulong2 v2; +#endif +}cl_ulong2; + +typedef union +{ + cl_ulong CL_ALIGNED(32) s[4]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_ulong x, y, z, w; }; + __extension__ struct{ cl_ulong s0, s1, s2, s3; }; + __extension__ struct{ cl_ulong2 lo, hi; }; +#endif +#if defined( __CL_ULONG2__) + __cl_ulong2 v2[2]; +#endif +#if defined( __CL_ULONG4__) + __cl_ulong4 v4; +#endif +}cl_ulong4; + +/* cl_ulong3 is identical in size, alignment and behavior to cl_ulong4. See section 6.1.5. */ +typedef cl_ulong4 cl_ulong3; + +typedef union +{ + cl_ulong CL_ALIGNED(64) s[8]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_ulong x, y, z, w; }; + __extension__ struct{ cl_ulong s0, s1, s2, s3, s4, s5, s6, s7; }; + __extension__ struct{ cl_ulong4 lo, hi; }; +#endif +#if defined( __CL_ULONG2__) + __cl_ulong2 v2[4]; +#endif +#if defined( __CL_ULONG4__) + __cl_ulong4 v4[2]; +#endif +#if defined( __CL_ULONG8__ ) + __cl_ulong8 v8; +#endif +}cl_ulong8; + +typedef union +{ + cl_ulong CL_ALIGNED(128) s[16]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_ulong x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; + __extension__ struct{ cl_ulong s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; + __extension__ struct{ cl_ulong8 lo, hi; }; +#endif +#if defined( __CL_ULONG2__) + __cl_ulong2 v2[8]; +#endif +#if defined( __CL_ULONG4__) + __cl_ulong4 v4[4]; +#endif +#if defined( __CL_ULONG8__ ) + __cl_ulong8 v8[2]; +#endif +#if defined( __CL_ULONG16__ ) + __cl_ulong16 v16; +#endif +}cl_ulong16; + + +/* --- cl_floatn ---- */ + +typedef union +{ + cl_float CL_ALIGNED(8) s[2]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_float x, y; }; + __extension__ struct{ cl_float s0, s1; }; + __extension__ struct{ cl_float lo, hi; }; +#endif +#if defined( __CL_FLOAT2__) + __cl_float2 v2; +#endif +}cl_float2; + +typedef union +{ + cl_float CL_ALIGNED(16) s[4]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_float x, y, z, w; }; + __extension__ struct{ cl_float s0, s1, s2, s3; }; + __extension__ struct{ cl_float2 lo, hi; }; +#endif +#if defined( __CL_FLOAT2__) + __cl_float2 v2[2]; +#endif +#if defined( __CL_FLOAT4__) + __cl_float4 v4; +#endif +}cl_float4; + +/* cl_float3 is identical in size, alignment and behavior to cl_float4. See section 6.1.5. */ +typedef cl_float4 cl_float3; + +typedef union +{ + cl_float CL_ALIGNED(32) s[8]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_float x, y, z, w; }; + __extension__ struct{ cl_float s0, s1, s2, s3, s4, s5, s6, s7; }; + __extension__ struct{ cl_float4 lo, hi; }; +#endif +#if defined( __CL_FLOAT2__) + __cl_float2 v2[4]; +#endif +#if defined( __CL_FLOAT4__) + __cl_float4 v4[2]; +#endif +#if defined( __CL_FLOAT8__ ) + __cl_float8 v8; +#endif +}cl_float8; + +typedef union +{ + cl_float CL_ALIGNED(64) s[16]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_float x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; + __extension__ struct{ cl_float s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; + __extension__ struct{ cl_float8 lo, hi; }; +#endif +#if defined( __CL_FLOAT2__) + __cl_float2 v2[8]; +#endif +#if defined( __CL_FLOAT4__) + __cl_float4 v4[4]; +#endif +#if defined( __CL_FLOAT8__ ) + __cl_float8 v8[2]; +#endif +#if defined( __CL_FLOAT16__ ) + __cl_float16 v16; +#endif +}cl_float16; + +/* --- cl_doublen ---- */ + +typedef union +{ + cl_double CL_ALIGNED(16) s[2]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_double x, y; }; + __extension__ struct{ cl_double s0, s1; }; + __extension__ struct{ cl_double lo, hi; }; +#endif +#if defined( __CL_DOUBLE2__) + __cl_double2 v2; +#endif +}cl_double2; + +typedef union +{ + cl_double CL_ALIGNED(32) s[4]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_double x, y, z, w; }; + __extension__ struct{ cl_double s0, s1, s2, s3; }; + __extension__ struct{ cl_double2 lo, hi; }; +#endif +#if defined( __CL_DOUBLE2__) + __cl_double2 v2[2]; +#endif +#if defined( __CL_DOUBLE4__) + __cl_double4 v4; +#endif +}cl_double4; + +/* cl_double3 is identical in size, alignment and behavior to cl_double4. See section 6.1.5. */ +typedef cl_double4 cl_double3; + +typedef union +{ + cl_double CL_ALIGNED(64) s[8]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_double x, y, z, w; }; + __extension__ struct{ cl_double s0, s1, s2, s3, s4, s5, s6, s7; }; + __extension__ struct{ cl_double4 lo, hi; }; +#endif +#if defined( __CL_DOUBLE2__) + __cl_double2 v2[4]; +#endif +#if defined( __CL_DOUBLE4__) + __cl_double4 v4[2]; +#endif +#if defined( __CL_DOUBLE8__ ) + __cl_double8 v8; +#endif +}cl_double8; + +typedef union +{ + cl_double CL_ALIGNED(128) s[16]; +#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ ) + __extension__ struct{ cl_double x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; }; + __extension__ struct{ cl_double s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; }; + __extension__ struct{ cl_double8 lo, hi; }; +#endif +#if defined( __CL_DOUBLE2__) + __cl_double2 v2[8]; +#endif +#if defined( __CL_DOUBLE4__) + __cl_double4 v4[4]; +#endif +#if defined( __CL_DOUBLE8__ ) + __cl_double8 v8[2]; +#endif +#if defined( __CL_DOUBLE16__ ) + __cl_double16 v16; +#endif +}cl_double16; + +/* Macro to facilitate debugging + * Usage: + * Place CL_PROGRAM_STRING_DEBUG_INFO on the line before the first line of your source. + * The first line ends with: CL_PROGRAM_STRING_BEGIN \" + * Each line thereafter of OpenCL C source must end with: \n\ + * The last line ends in "; + * + * Example: + * + * const char *my_program = CL_PROGRAM_STRING_BEGIN "\ + * kernel void foo( int a, float * b ) \n\ + * { \n\ + * // my comment \n\ + * *b[ get_global_id(0)] = a; \n\ + * } \n\ + * "; + * + * This should correctly set up the line, (column) and file information for your source + * string so you can do source level debugging. + */ +#define __CL_STRINGIFY( _x ) # _x +#define _CL_STRINGIFY( _x ) __CL_STRINGIFY( _x ) +#define CL_PROGRAM_STRING_DEBUG_INFO "#line " _CL_STRINGIFY(__LINE__) " \"" __FILE__ "\" \n\n" + +#ifdef __cplusplus +} +#endif + +#endif /* __CL_PLATFORM_H */ diff --git a/etc/lwjgl-2.9.1/src/native/common/EGL/egl.h b/etc/lwjgl-2.9.1/src/native/common/EGL/egl.h new file mode 100644 index 0000000..6d82073 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/EGL/egl.h @@ -0,0 +1,329 @@ +/* -*- mode: c; tab-width: 8; -*- */ +/* vi: set sw=4 ts=8: */ +/* Reference version of egl.h for EGL 1.4. + * $Revision: 9356 $ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $ + */ + +/* +** Copyright (c) 2007-2009 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +#ifndef __egl_h_ +#define __egl_h_ + +/* All platform-dependent types and macro boilerplate (such as EGLAPI + * and EGLAPIENTRY) should go in eglplatform.h. + */ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* EGL Types */ +/* EGLint is defined in eglplatform.h */ +typedef unsigned int EGLBoolean; +typedef unsigned int EGLenum; +typedef void *EGLConfig; +typedef void *EGLContext; +typedef void *EGLDisplay; +typedef void *EGLSurface; +typedef void *EGLClientBuffer; + +/* EGL Versioning */ +#define EGL_VERSION_1_0 1 +#define EGL_VERSION_1_1 1 +#define EGL_VERSION_1_2 1 +#define EGL_VERSION_1_3 1 +#define EGL_VERSION_1_4 1 + +/* EGL Enumerants. Bitmasks and other exceptional cases aside, most + * enums are assigned unique values starting at 0x3000. + */ + +/* EGL aliases */ +#define EGL_FALSE 0 +#define EGL_TRUE 1 + +/* Out-of-band handle values */ +#define EGL_DEFAULT_DISPLAY ((EGLNativeDisplayType)0) +#define EGL_NO_CONTEXT ((EGLContext)0) +#define EGL_NO_DISPLAY ((EGLDisplay)0) +#define EGL_NO_SURFACE ((EGLSurface)0) + +/* Out-of-band attribute value */ +#define EGL_DONT_CARE ((EGLint)-1) + +/* Errors / GetError return values */ +#define EGL_SUCCESS 0x3000 +#define EGL_NOT_INITIALIZED 0x3001 +#define EGL_BAD_ACCESS 0x3002 +#define EGL_BAD_ALLOC 0x3003 +#define EGL_BAD_ATTRIBUTE 0x3004 +#define EGL_BAD_CONFIG 0x3005 +#define EGL_BAD_CONTEXT 0x3006 +#define EGL_BAD_CURRENT_SURFACE 0x3007 +#define EGL_BAD_DISPLAY 0x3008 +#define EGL_BAD_MATCH 0x3009 +#define EGL_BAD_NATIVE_PIXMAP 0x300A +#define EGL_BAD_NATIVE_WINDOW 0x300B +#define EGL_BAD_PARAMETER 0x300C +#define EGL_BAD_SURFACE 0x300D +#define EGL_CONTEXT_LOST 0x300E /* EGL 1.1 - IMG_power_management */ + +/* Reserved 0x300F-0x301F for additional errors */ + +/* Config attributes */ +#define EGL_BUFFER_SIZE 0x3020 +#define EGL_ALPHA_SIZE 0x3021 +#define EGL_BLUE_SIZE 0x3022 +#define EGL_GREEN_SIZE 0x3023 +#define EGL_RED_SIZE 0x3024 +#define EGL_DEPTH_SIZE 0x3025 +#define EGL_STENCIL_SIZE 0x3026 +#define EGL_CONFIG_CAVEAT 0x3027 +#define EGL_CONFIG_ID 0x3028 +#define EGL_LEVEL 0x3029 +#define EGL_MAX_PBUFFER_HEIGHT 0x302A +#define EGL_MAX_PBUFFER_PIXELS 0x302B +#define EGL_MAX_PBUFFER_WIDTH 0x302C +#define EGL_NATIVE_RENDERABLE 0x302D +#define EGL_NATIVE_VISUAL_ID 0x302E +#define EGL_NATIVE_VISUAL_TYPE 0x302F +#define EGL_SAMPLES 0x3031 +#define EGL_SAMPLE_BUFFERS 0x3032 +#define EGL_SURFACE_TYPE 0x3033 +#define EGL_TRANSPARENT_TYPE 0x3034 +#define EGL_TRANSPARENT_BLUE_VALUE 0x3035 +#define EGL_TRANSPARENT_GREEN_VALUE 0x3036 +#define EGL_TRANSPARENT_RED_VALUE 0x3037 +#define EGL_NONE 0x3038 /* Attrib list terminator */ +#define EGL_BIND_TO_TEXTURE_RGB 0x3039 +#define EGL_BIND_TO_TEXTURE_RGBA 0x303A +#define EGL_MIN_SWAP_INTERVAL 0x303B +#define EGL_MAX_SWAP_INTERVAL 0x303C +#define EGL_LUMINANCE_SIZE 0x303D +#define EGL_ALPHA_MASK_SIZE 0x303E +#define EGL_COLOR_BUFFER_TYPE 0x303F +#define EGL_RENDERABLE_TYPE 0x3040 +#define EGL_MATCH_NATIVE_PIXMAP 0x3041 /* Pseudo-attribute (not queryable) */ +#define EGL_CONFORMANT 0x3042 + +/* Reserved 0x3041-0x304F for additional config attributes */ + +/* Config attribute values */ +#define EGL_SLOW_CONFIG 0x3050 /* EGL_CONFIG_CAVEAT value */ +#define EGL_NON_CONFORMANT_CONFIG 0x3051 /* EGL_CONFIG_CAVEAT value */ +#define EGL_TRANSPARENT_RGB 0x3052 /* EGL_TRANSPARENT_TYPE value */ +#define EGL_RGB_BUFFER 0x308E /* EGL_COLOR_BUFFER_TYPE value */ +#define EGL_LUMINANCE_BUFFER 0x308F /* EGL_COLOR_BUFFER_TYPE value */ + +/* More config attribute values, for EGL_TEXTURE_FORMAT */ +#define EGL_NO_TEXTURE 0x305C +#define EGL_TEXTURE_RGB 0x305D +#define EGL_TEXTURE_RGBA 0x305E +#define EGL_TEXTURE_2D 0x305F + +/* Config attribute mask bits */ +#define EGL_PBUFFER_BIT 0x0001 /* EGL_SURFACE_TYPE mask bits */ +#define EGL_PIXMAP_BIT 0x0002 /* EGL_SURFACE_TYPE mask bits */ +#define EGL_WINDOW_BIT 0x0004 /* EGL_SURFACE_TYPE mask bits */ +#define EGL_VG_COLORSPACE_LINEAR_BIT 0x0020 /* EGL_SURFACE_TYPE mask bits */ +#define EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040 /* EGL_SURFACE_TYPE mask bits */ +#define EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200 /* EGL_SURFACE_TYPE mask bits */ +#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400 /* EGL_SURFACE_TYPE mask bits */ + +#define EGL_OPENGL_ES_BIT 0x0001 /* EGL_RENDERABLE_TYPE mask bits */ +#define EGL_OPENVG_BIT 0x0002 /* EGL_RENDERABLE_TYPE mask bits */ +#define EGL_OPENGL_ES2_BIT 0x0004 /* EGL_RENDERABLE_TYPE mask bits */ +#define EGL_OPENGL_BIT 0x0008 /* EGL_RENDERABLE_TYPE mask bits */ + +/* QueryString targets */ +#define EGL_VENDOR 0x3053 +#define EGL_VERSION 0x3054 +#define EGL_EXTENSIONS 0x3055 +#define EGL_CLIENT_APIS 0x308D + +/* QuerySurface / SurfaceAttrib / CreatePbufferSurface targets */ +#define EGL_HEIGHT 0x3056 +#define EGL_WIDTH 0x3057 +#define EGL_LARGEST_PBUFFER 0x3058 +#define EGL_TEXTURE_FORMAT 0x3080 +#define EGL_TEXTURE_TARGET 0x3081 +#define EGL_MIPMAP_TEXTURE 0x3082 +#define EGL_MIPMAP_LEVEL 0x3083 +#define EGL_RENDER_BUFFER 0x3086 +#define EGL_VG_COLORSPACE 0x3087 +#define EGL_VG_ALPHA_FORMAT 0x3088 +#define EGL_HORIZONTAL_RESOLUTION 0x3090 +#define EGL_VERTICAL_RESOLUTION 0x3091 +#define EGL_PIXEL_ASPECT_RATIO 0x3092 +#define EGL_SWAP_BEHAVIOR 0x3093 +#define EGL_MULTISAMPLE_RESOLVE 0x3099 + +/* EGL_RENDER_BUFFER values / BindTexImage / ReleaseTexImage buffer targets */ +#define EGL_BACK_BUFFER 0x3084 +#define EGL_SINGLE_BUFFER 0x3085 + +/* OpenVG color spaces */ +#define EGL_VG_COLORSPACE_sRGB 0x3089 /* EGL_VG_COLORSPACE value */ +#define EGL_VG_COLORSPACE_LINEAR 0x308A /* EGL_VG_COLORSPACE value */ + +/* OpenVG alpha formats */ +#define EGL_VG_ALPHA_FORMAT_NONPRE 0x308B /* EGL_ALPHA_FORMAT value */ +#define EGL_VG_ALPHA_FORMAT_PRE 0x308C /* EGL_ALPHA_FORMAT value */ + +/* Constant scale factor by which fractional display resolutions & + * aspect ratio are scaled when queried as integer values. + */ +#define EGL_DISPLAY_SCALING 10000 + +/* Unknown display resolution/aspect ratio */ +#define EGL_UNKNOWN ((EGLint)-1) + +/* Back buffer swap behaviors */ +#define EGL_BUFFER_PRESERVED 0x3094 /* EGL_SWAP_BEHAVIOR value */ +#define EGL_BUFFER_DESTROYED 0x3095 /* EGL_SWAP_BEHAVIOR value */ + +/* CreatePbufferFromClientBuffer buffer types */ +#define EGL_OPENVG_IMAGE 0x3096 + +/* QueryContext targets */ +#define EGL_CONTEXT_CLIENT_TYPE 0x3097 + +/* CreateContext attributes */ +#define EGL_CONTEXT_CLIENT_VERSION 0x3098 + +/* Multisample resolution behaviors */ +#define EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A /* EGL_MULTISAMPLE_RESOLVE value */ +#define EGL_MULTISAMPLE_RESOLVE_BOX 0x309B /* EGL_MULTISAMPLE_RESOLVE value */ + +/* BindAPI/QueryAPI targets */ +#define EGL_OPENGL_ES_API 0x30A0 +#define EGL_OPENVG_API 0x30A1 +#define EGL_OPENGL_API 0x30A2 + +/* GetCurrentSurface targets */ +#define EGL_DRAW 0x3059 +#define EGL_READ 0x305A + +/* WaitNative engines */ +#define EGL_CORE_NATIVE_ENGINE 0x305B + +/* EGL 1.2 tokens renamed for consistency in EGL 1.3 */ +#define EGL_COLORSPACE EGL_VG_COLORSPACE +#define EGL_ALPHA_FORMAT EGL_VG_ALPHA_FORMAT +#define EGL_COLORSPACE_sRGB EGL_VG_COLORSPACE_sRGB +#define EGL_COLORSPACE_LINEAR EGL_VG_COLORSPACE_LINEAR +#define EGL_ALPHA_FORMAT_NONPRE EGL_VG_ALPHA_FORMAT_NONPRE +#define EGL_ALPHA_FORMAT_PRE EGL_VG_ALPHA_FORMAT_PRE + +/* EGL extensions must request enum blocks from the Khronos + * API Registrar, who maintains the enumerant registry. Submit + * a bug in Khronos Bugzilla against task "Registry". + */ + + + +/* EGL Functions */ + +EGLAPI EGLint EGLAPIENTRY eglGetError(void); + +EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id); +EGLAPI EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor); +EGLAPI EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy); + +EGLAPI const char * EGLAPIENTRY eglQueryString(EGLDisplay dpy, EGLint name); + +EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs(EGLDisplay dpy, EGLConfig *configs, + EGLint config_size, EGLint *num_config); +EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, + EGLConfig *configs, EGLint config_size, + EGLint *num_config); +EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, + EGLint attribute, EGLint *value); + +EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, + EGLNativeWindowType win, + const EGLint *attrib_list); +EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface(EGLDisplay dpy, EGLConfig config, + const EGLint *attrib_list); +EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface(EGLDisplay dpy, EGLConfig config, + EGLNativePixmapType pixmap, + const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface(EGLDisplay dpy, EGLSurface surface); +EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface(EGLDisplay dpy, EGLSurface surface, + EGLint attribute, EGLint *value); + +EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api); +EGLAPI EGLenum EGLAPIENTRY eglQueryAPI(void); + +EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient(void); + +EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread(void); + +EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer( + EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, + EGLConfig config, const EGLint *attrib_list); + +EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib(EGLDisplay dpy, EGLSurface surface, + EGLint attribute, EGLint value); +EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer); +EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage(EGLDisplay dpy, EGLSurface surface, EGLint buffer); + + +EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval); + + +EGLAPI EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy, EGLConfig config, + EGLContext share_context, + const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy, EGLContext ctx); +EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, + EGLSurface read, EGLContext ctx); + +EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext(void); +EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface(EGLint readdraw); +EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay(void); +EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext(EGLDisplay dpy, EGLContext ctx, + EGLint attribute, EGLint *value); + +EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL(void); +EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine); +EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface); +EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers(EGLDisplay dpy, EGLSurface surface, + EGLNativePixmapType target); + +/* This is a generic function pointer type, whose name indicates it must + * be cast to the proper type *and calling convention* before use. + */ +typedef void (*__eglMustCastToProperFunctionPointerType)(void); + +/* Now, define eglGetProcAddress using the generic function ptr. type */ +EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY + eglGetProcAddress(const char *procname); + +#ifdef __cplusplus +} +#endif + +#endif /* __egl_h_ */ diff --git a/etc/lwjgl-2.9.1/src/native/common/EGL/eglext.h b/etc/lwjgl-2.9.1/src/native/common/EGL/eglext.h new file mode 100644 index 0000000..a5aee11 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/EGL/eglext.h @@ -0,0 +1,230 @@ +#ifndef __eglext_h_ +#define __eglext_h_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright (c) 2007-2010 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +#include + +/*************************************************************/ + +/* Header file version number */ +/* Current version at http://www.khronos.org/registry/egl/ */ +/* $Revision: 11249 $ on $Date: 2010-05-05 09:54:28 -0700 (Wed, 05 May 2010) $ */ +#define EGL_EGLEXT_VERSION 5 + +#ifndef EGL_KHR_config_attribs +#define EGL_KHR_config_attribs 1 +#define EGL_CONFORMANT_KHR 0x3042 /* EGLConfig attribute */ +#define EGL_VG_COLORSPACE_LINEAR_BIT_KHR 0x0020 /* EGL_SURFACE_TYPE bitfield */ +#define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR 0x0040 /* EGL_SURFACE_TYPE bitfield */ +#endif + +#ifndef EGL_KHR_lock_surface +#define EGL_KHR_lock_surface 1 +#define EGL_READ_SURFACE_BIT_KHR 0x0001 /* EGL_LOCK_USAGE_HINT_KHR bitfield */ +#define EGL_WRITE_SURFACE_BIT_KHR 0x0002 /* EGL_LOCK_USAGE_HINT_KHR bitfield */ +#define EGL_LOCK_SURFACE_BIT_KHR 0x0080 /* EGL_SURFACE_TYPE bitfield */ +#define EGL_OPTIMAL_FORMAT_BIT_KHR 0x0100 /* EGL_SURFACE_TYPE bitfield */ +#define EGL_MATCH_FORMAT_KHR 0x3043 /* EGLConfig attribute */ +#define EGL_FORMAT_RGB_565_EXACT_KHR 0x30C0 /* EGL_MATCH_FORMAT_KHR value */ +#define EGL_FORMAT_RGB_565_KHR 0x30C1 /* EGL_MATCH_FORMAT_KHR value */ +#define EGL_FORMAT_RGBA_8888_EXACT_KHR 0x30C2 /* EGL_MATCH_FORMAT_KHR value */ +#define EGL_FORMAT_RGBA_8888_KHR 0x30C3 /* EGL_MATCH_FORMAT_KHR value */ +#define EGL_MAP_PRESERVE_PIXELS_KHR 0x30C4 /* eglLockSurfaceKHR attribute */ +#define EGL_LOCK_USAGE_HINT_KHR 0x30C5 /* eglLockSurfaceKHR attribute */ +#define EGL_BITMAP_POINTER_KHR 0x30C6 /* eglQuerySurface attribute */ +#define EGL_BITMAP_PITCH_KHR 0x30C7 /* eglQuerySurface attribute */ +#define EGL_BITMAP_ORIGIN_KHR 0x30C8 /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_RED_OFFSET_KHR 0x30C9 /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR 0x30CB /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC /* eglQuerySurface attribute */ +#define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD /* eglQuerySurface attribute */ +#define EGL_LOWER_LEFT_KHR 0x30CE /* EGL_BITMAP_ORIGIN_KHR value */ +#define EGL_UPPER_LEFT_KHR 0x30CF /* EGL_BITMAP_ORIGIN_KHR value */ +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay display, EGLSurface surface); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface, const EGLint *attrib_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay display, EGLSurface surface); +#endif + +#ifndef EGL_KHR_image +#define EGL_KHR_image 1 +#define EGL_NATIVE_PIXMAP_KHR 0x30B0 /* eglCreateImageKHR target */ +typedef void *EGLImageKHR; +#define EGL_NO_IMAGE_KHR ((EGLImageKHR)0) +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image); +#endif + +#ifndef EGL_KHR_vg_parent_image +#define EGL_KHR_vg_parent_image 1 +#define EGL_VG_PARENT_IMAGE_KHR 0x30BA /* eglCreateImageKHR target */ +#endif + +#ifndef EGL_KHR_gl_texture_2D_image +#define EGL_KHR_gl_texture_2D_image 1 +#define EGL_GL_TEXTURE_2D_KHR 0x30B1 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_LEVEL_KHR 0x30BC /* eglCreateImageKHR attribute */ +#endif + +#ifndef EGL_KHR_gl_texture_cubemap_image +#define EGL_KHR_gl_texture_cubemap_image 1 +#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8 /* eglCreateImageKHR target */ +#endif + +#ifndef EGL_KHR_gl_texture_3D_image +#define EGL_KHR_gl_texture_3D_image 1 +#define EGL_GL_TEXTURE_3D_KHR 0x30B2 /* eglCreateImageKHR target */ +#define EGL_GL_TEXTURE_ZOFFSET_KHR 0x30BD /* eglCreateImageKHR attribute */ +#endif + +#ifndef EGL_KHR_gl_renderbuffer_image +#define EGL_KHR_gl_renderbuffer_image 1 +#define EGL_GL_RENDERBUFFER_KHR 0x30B9 /* eglCreateImageKHR target */ +#endif + +#ifndef EGL_KHR_reusable_sync +#define EGL_KHR_reusable_sync 1 + +typedef void* EGLSyncKHR; +typedef khronos_utime_nanoseconds_t EGLTimeKHR; + +#define EGL_SYNC_STATUS_KHR 0x30F1 +#define EGL_SIGNALED_KHR 0x30F2 +#define EGL_UNSIGNALED_KHR 0x30F3 +#define EGL_TIMEOUT_EXPIRED_KHR 0x30F5 +#define EGL_CONDITION_SATISFIED_KHR 0x30F6 +#define EGL_SYNC_TYPE_KHR 0x30F7 +#define EGL_SYNC_REUSABLE_KHR 0x30FA +#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 0x0001 /* eglClientWaitSyncKHR bitfield */ +#define EGL_FOREVER_KHR 0xFFFFFFFFFFFFFFFFull +#define EGL_NO_SYNC_KHR ((EGLSyncKHR)0) +#ifdef EGL_EGLEXT_PROTOTYPES +EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR(EGLDisplay dpy, EGLenum type, const EGLint *attrib_list); +EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync); +EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); +EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); +EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync); +typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); +#endif + +#ifndef EGL_KHR_image_base +#define EGL_KHR_image_base 1 +/* Most interfaces defined by EGL_KHR_image_pixmap above */ +#define EGL_IMAGE_PRESERVED_KHR 0x30D2 /* eglCreateImageKHR attribute */ +#endif + +#ifndef EGL_KHR_image_pixmap +#define EGL_KHR_image_pixmap 1 +/* Interfaces defined by EGL_KHR_image above */ +#endif + +#ifndef EGL_IMG_context_priority +#define EGL_IMG_context_priority 1 +#define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3100 +#define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101 +#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG 0x3102 +#define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103 +#endif + +#ifndef EGL_NV_coverage_sample +#define EGL_NV_coverage_sample 1 +#define EGL_COVERAGE_BUFFERS_NV 0x30E0 +#define EGL_COVERAGE_SAMPLES_NV 0x30E1 +#endif + +#ifndef EGL_NV_depth_nonlinear +#define EGL_NV_depth_nonlinear 1 +#define EGL_DEPTH_ENCODING_NV 0x30E2 +#define EGL_DEPTH_ENCODING_NONE_NV 0 +#define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3 +#endif + +#ifndef EGL_NV_sync +#define EGL_NV_sync 1 +#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV 0x30E6 +#define EGL_SYNC_STATUS_NV 0x30E7 +#define EGL_SIGNALED_NV 0x30E8 +#define EGL_UNSIGNALED_NV 0x30E9 +#define EGL_SYNC_FLUSH_COMMANDS_BIT_NV 0x0001 +#define EGL_FOREVER_NV 0xFFFFFFFFFFFFFFFFull +#define EGL_ALREADY_SIGNALED_NV 0x30EA +#define EGL_TIMEOUT_EXPIRED_NV 0x30EB +#define EGL_CONDITION_SATISFIED_NV 0x30EC +#define EGL_SYNC_TYPE_NV 0x30ED +#define EGL_SYNC_CONDITION_NV 0x30EE +#define EGL_SYNC_FENCE_NV 0x30EF +#define EGL_NO_SYNC_NV ((EGLSyncNV)0) +typedef void* EGLSyncNV; +typedef unsigned long long EGLTimeNV; +#ifdef EGL_EGLEXT_PROTOTYPES +EGLSyncNV eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list); +EGLBoolean eglDestroySyncNV (EGLSyncNV sync); +EGLBoolean eglFenceNV (EGLSyncNV sync); +EGLint eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout); +EGLBoolean eglSignalSyncNV (EGLSyncNV sync, EGLenum mode); +EGLBoolean eglGetSyncAttribNV (EGLSyncNV sync, EGLint attribute, EGLint *value); +#endif /* EGL_EGLEXT_PROTOTYPES */ +typedef EGLSyncNV (EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLFENCENVPROC) (EGLSyncNV sync); +typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode); +typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value); +#endif + +#ifndef EGL_KHR_fence_sync +#define EGL_KHR_fence_sync 1 +/* Reuses most tokens and entry points from EGL_KHR_reusable_sync */ +#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 0x30F0 +#define EGL_SYNC_CONDITION_KHR 0x30F8 +#define EGL_SYNC_FENCE_KHR 0x30F9 +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/etc/lwjgl-2.9.1/src/native/common/EGL/eglplatform.h b/etc/lwjgl-2.9.1/src/native/common/EGL/eglplatform.h new file mode 100644 index 0000000..47a3292 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/EGL/eglplatform.h @@ -0,0 +1,110 @@ +#ifndef __eglplatform_h_ +#define __eglplatform_h_ + +/* +** Copyright (c) 2007-2009 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +/* Platform-specific types and definitions for egl.h + * $Revision: 9724 $ on $Date: 2009-12-02 02:05:33 -0800 (Wed, 02 Dec 2009) $ + * + * Adopters may modify khrplatform.h and this file to suit their platform. + * You are encouraged to submit all modifications to the Khronos group so that + * they can be included in future versions of this file. Please submit changes + * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) + * by filing a bug against product "EGL" component "Registry". + */ + +#include + +/* Macros used in EGL function prototype declarations. + * + * EGL functions should be prototyped as: + * + * EGLAPI return-type EGLAPIENTRY eglFunction(arguments); + * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments); + * + * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h + */ + +#ifndef EGLAPI +#define EGLAPI KHRONOS_APICALL +#endif + +#ifndef EGLAPIENTRY +#define EGLAPIENTRY KHRONOS_APIENTRY +#endif +#define EGLAPIENTRYP EGLAPIENTRY* + +/* The types NativeDisplayType, NativeWindowType, and NativePixmapType + * are aliases of window-system-dependent types, such as X Display * or + * Windows Device Context. They must be defined in platform-specific + * code below. The EGL-prefixed versions of Native*Type are the same + * types, renamed in EGL 1.3 so all types in the API start with "EGL". + */ + +#if defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */ +#ifndef WIN32_LEAN_AND_MEAN +#define WIN32_LEAN_AND_MEAN 1 +#endif +#include + +typedef HDC EGLNativeDisplayType; +typedef HBITMAP EGLNativePixmapType; +typedef HWND EGLNativeWindowType; + +#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */ + +typedef int EGLNativeDisplayType; +typedef void *EGLNativeWindowType; +typedef void *EGLNativePixmapType; + +#elif defined(__unix__) + +/* X11 (tentative) */ +#include +#include + +typedef Display *EGLNativeDisplayType; +typedef Pixmap EGLNativePixmapType; +typedef Window EGLNativeWindowType; + +#else +#error "Platform not recognized" +#endif + +/* EGL 1.2 types, renamed for consistency in EGL 1.3 */ +typedef EGLNativeDisplayType NativeDisplayType; +typedef EGLNativePixmapType NativePixmapType; +typedef EGLNativeWindowType NativeWindowType; + + +/* Define EGLint. This must be a signed integral type large enough to contain + * all legal attribute names and values passed into and out of EGL, whether + * their type is boolean, bitmask, enumerant (symbolic constant), integer, + * handle, or other. While in general a 32-bit integer will suffice, if + * handles are 64 bit types, then EGLint should be defined as a signed 64-bit + * integer type. + */ +typedef khronos_int32_t EGLint; + +#endif /* __eglplatform_h */ diff --git a/etc/lwjgl-2.9.1/src/native/common/GLES2/gl2.h b/etc/lwjgl-2.9.1/src/native/common/GLES2/gl2.h new file mode 100644 index 0000000..1149d25 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/GLES2/gl2.h @@ -0,0 +1,621 @@ +#ifndef __gl2_h_ +#define __gl2_h_ + +/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * This document is licensed under the SGI Free Software B License Version + * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . + */ + +/*------------------------------------------------------------------------- + * Data type definitions + *-----------------------------------------------------------------------*/ + +typedef void GLvoid; +typedef char GLchar; +typedef unsigned int GLenum; +typedef unsigned char GLboolean; +typedef unsigned int GLbitfield; +typedef khronos_int8_t GLbyte; +typedef short GLshort; +typedef int GLint; +typedef int GLsizei; +typedef khronos_uint8_t GLubyte; +typedef unsigned short GLushort; +typedef unsigned int GLuint; +typedef khronos_float_t GLfloat; +typedef khronos_float_t GLclampf; +typedef khronos_int32_t GLfixed; + +/* GL types for handling large vertex buffer objects */ +typedef khronos_intptr_t GLintptr; +typedef khronos_ssize_t GLsizeiptr; + +/* OpenGL ES core versions */ +#define GL_ES_VERSION_2_0 1 + +/* ClearBufferMask */ +#define GL_DEPTH_BUFFER_BIT 0x00000100 +#define GL_STENCIL_BUFFER_BIT 0x00000400 +#define GL_COLOR_BUFFER_BIT 0x00004000 + +/* Boolean */ +#define GL_FALSE 0 +#define GL_TRUE 1 + +/* BeginMode */ +#define GL_POINTS 0x0000 +#define GL_LINES 0x0001 +#define GL_LINE_LOOP 0x0002 +#define GL_LINE_STRIP 0x0003 +#define GL_TRIANGLES 0x0004 +#define GL_TRIANGLE_STRIP 0x0005 +#define GL_TRIANGLE_FAN 0x0006 + +/* AlphaFunction (not supported in ES20) */ +/* GL_NEVER */ +/* GL_LESS */ +/* GL_EQUAL */ +/* GL_LEQUAL */ +/* GL_GREATER */ +/* GL_NOTEQUAL */ +/* GL_GEQUAL */ +/* GL_ALWAYS */ + +/* BlendingFactorDest */ +#define GL_ZERO 0 +#define GL_ONE 1 +#define GL_SRC_COLOR 0x0300 +#define GL_ONE_MINUS_SRC_COLOR 0x0301 +#define GL_SRC_ALPHA 0x0302 +#define GL_ONE_MINUS_SRC_ALPHA 0x0303 +#define GL_DST_ALPHA 0x0304 +#define GL_ONE_MINUS_DST_ALPHA 0x0305 + +/* BlendingFactorSrc */ +/* GL_ZERO */ +/* GL_ONE */ +#define GL_DST_COLOR 0x0306 +#define GL_ONE_MINUS_DST_COLOR 0x0307 +#define GL_SRC_ALPHA_SATURATE 0x0308 +/* GL_SRC_ALPHA */ +/* GL_ONE_MINUS_SRC_ALPHA */ +/* GL_DST_ALPHA */ +/* GL_ONE_MINUS_DST_ALPHA */ + +/* BlendEquationSeparate */ +#define GL_FUNC_ADD 0x8006 +#define GL_BLEND_EQUATION 0x8009 +#define GL_BLEND_EQUATION_RGB 0x8009 /* same as BLEND_EQUATION */ +#define GL_BLEND_EQUATION_ALPHA 0x883D + +/* BlendSubtract */ +#define GL_FUNC_SUBTRACT 0x800A +#define GL_FUNC_REVERSE_SUBTRACT 0x800B + +/* Separate Blend Functions */ +#define GL_BLEND_DST_RGB 0x80C8 +#define GL_BLEND_SRC_RGB 0x80C9 +#define GL_BLEND_DST_ALPHA 0x80CA +#define GL_BLEND_SRC_ALPHA 0x80CB +#define GL_CONSTANT_COLOR 0x8001 +#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 +#define GL_CONSTANT_ALPHA 0x8003 +#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 +#define GL_BLEND_COLOR 0x8005 + +/* Buffer Objects */ +#define GL_ARRAY_BUFFER 0x8892 +#define GL_ELEMENT_ARRAY_BUFFER 0x8893 +#define GL_ARRAY_BUFFER_BINDING 0x8894 +#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 + +#define GL_STREAM_DRAW 0x88E0 +#define GL_STATIC_DRAW 0x88E4 +#define GL_DYNAMIC_DRAW 0x88E8 + +#define GL_BUFFER_SIZE 0x8764 +#define GL_BUFFER_USAGE 0x8765 + +#define GL_CURRENT_VERTEX_ATTRIB 0x8626 + +/* CullFaceMode */ +#define GL_FRONT 0x0404 +#define GL_BACK 0x0405 +#define GL_FRONT_AND_BACK 0x0408 + +/* DepthFunction */ +/* GL_NEVER */ +/* GL_LESS */ +/* GL_EQUAL */ +/* GL_LEQUAL */ +/* GL_GREATER */ +/* GL_NOTEQUAL */ +/* GL_GEQUAL */ +/* GL_ALWAYS */ + +/* EnableCap */ +#define GL_TEXTURE_2D 0x0DE1 +#define GL_CULL_FACE 0x0B44 +#define GL_BLEND 0x0BE2 +#define GL_DITHER 0x0BD0 +#define GL_STENCIL_TEST 0x0B90 +#define GL_DEPTH_TEST 0x0B71 +#define GL_SCISSOR_TEST 0x0C11 +#define GL_POLYGON_OFFSET_FILL 0x8037 +#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E +#define GL_SAMPLE_COVERAGE 0x80A0 + +/* ErrorCode */ +#define GL_NO_ERROR 0 +#define GL_INVALID_ENUM 0x0500 +#define GL_INVALID_VALUE 0x0501 +#define GL_INVALID_OPERATION 0x0502 +#define GL_OUT_OF_MEMORY 0x0505 + +/* FrontFaceDirection */ +#define GL_CW 0x0900 +#define GL_CCW 0x0901 + +/* GetPName */ +#define GL_LINE_WIDTH 0x0B21 +#define GL_ALIASED_POINT_SIZE_RANGE 0x846D +#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E +#define GL_CULL_FACE_MODE 0x0B45 +#define GL_FRONT_FACE 0x0B46 +#define GL_DEPTH_RANGE 0x0B70 +#define GL_DEPTH_WRITEMASK 0x0B72 +#define GL_DEPTH_CLEAR_VALUE 0x0B73 +#define GL_DEPTH_FUNC 0x0B74 +#define GL_STENCIL_CLEAR_VALUE 0x0B91 +#define GL_STENCIL_FUNC 0x0B92 +#define GL_STENCIL_FAIL 0x0B94 +#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 +#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 +#define GL_STENCIL_REF 0x0B97 +#define GL_STENCIL_VALUE_MASK 0x0B93 +#define GL_STENCIL_WRITEMASK 0x0B98 +#define GL_STENCIL_BACK_FUNC 0x8800 +#define GL_STENCIL_BACK_FAIL 0x8801 +#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 +#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 +#define GL_STENCIL_BACK_REF 0x8CA3 +#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 +#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 +#define GL_VIEWPORT 0x0BA2 +#define GL_SCISSOR_BOX 0x0C10 +/* GL_SCISSOR_TEST */ +#define GL_COLOR_CLEAR_VALUE 0x0C22 +#define GL_COLOR_WRITEMASK 0x0C23 +#define GL_UNPACK_ALIGNMENT 0x0CF5 +#define GL_PACK_ALIGNMENT 0x0D05 +#define GL_MAX_TEXTURE_SIZE 0x0D33 +#define GL_MAX_VIEWPORT_DIMS 0x0D3A +#define GL_SUBPIXEL_BITS 0x0D50 +#define GL_RED_BITS 0x0D52 +#define GL_GREEN_BITS 0x0D53 +#define GL_BLUE_BITS 0x0D54 +#define GL_ALPHA_BITS 0x0D55 +#define GL_DEPTH_BITS 0x0D56 +#define GL_STENCIL_BITS 0x0D57 +#define GL_POLYGON_OFFSET_UNITS 0x2A00 +/* GL_POLYGON_OFFSET_FILL */ +#define GL_POLYGON_OFFSET_FACTOR 0x8038 +#define GL_TEXTURE_BINDING_2D 0x8069 +#define GL_SAMPLE_BUFFERS 0x80A8 +#define GL_SAMPLES 0x80A9 +#define GL_SAMPLE_COVERAGE_VALUE 0x80AA +#define GL_SAMPLE_COVERAGE_INVERT 0x80AB + +/* GetTextureParameter */ +/* GL_TEXTURE_MAG_FILTER */ +/* GL_TEXTURE_MIN_FILTER */ +/* GL_TEXTURE_WRAP_S */ +/* GL_TEXTURE_WRAP_T */ + +#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 +#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 + +/* HintMode */ +#define GL_DONT_CARE 0x1100 +#define GL_FASTEST 0x1101 +#define GL_NICEST 0x1102 + +/* HintTarget */ +#define GL_GENERATE_MIPMAP_HINT 0x8192 + +/* DataType */ +#define GL_BYTE 0x1400 +#define GL_UNSIGNED_BYTE 0x1401 +#define GL_SHORT 0x1402 +#define GL_UNSIGNED_SHORT 0x1403 +#define GL_INT 0x1404 +#define GL_UNSIGNED_INT 0x1405 +#define GL_FLOAT 0x1406 +#define GL_FIXED 0x140C + +/* PixelFormat */ +#define GL_DEPTH_COMPONENT 0x1902 +#define GL_ALPHA 0x1906 +#define GL_RGB 0x1907 +#define GL_RGBA 0x1908 +#define GL_LUMINANCE 0x1909 +#define GL_LUMINANCE_ALPHA 0x190A + +/* PixelType */ +/* GL_UNSIGNED_BYTE */ +#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 +#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 +#define GL_UNSIGNED_SHORT_5_6_5 0x8363 + +/* Shaders */ +#define GL_FRAGMENT_SHADER 0x8B30 +#define GL_VERTEX_SHADER 0x8B31 +#define GL_MAX_VERTEX_ATTRIBS 0x8869 +#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB +#define GL_MAX_VARYING_VECTORS 0x8DFC +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D +#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C +#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 +#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD +#define GL_SHADER_TYPE 0x8B4F +#define GL_DELETE_STATUS 0x8B80 +#define GL_LINK_STATUS 0x8B82 +#define GL_VALIDATE_STATUS 0x8B83 +#define GL_ATTACHED_SHADERS 0x8B85 +#define GL_ACTIVE_UNIFORMS 0x8B86 +#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 +#define GL_ACTIVE_ATTRIBUTES 0x8B89 +#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A +#define GL_SHADING_LANGUAGE_VERSION 0x8B8C +#define GL_CURRENT_PROGRAM 0x8B8D + +/* StencilFunction */ +#define GL_NEVER 0x0200 +#define GL_LESS 0x0201 +#define GL_EQUAL 0x0202 +#define GL_LEQUAL 0x0203 +#define GL_GREATER 0x0204 +#define GL_NOTEQUAL 0x0205 +#define GL_GEQUAL 0x0206 +#define GL_ALWAYS 0x0207 + +/* StencilOp */ +/* GL_ZERO */ +#define GL_KEEP 0x1E00 +#define GL_REPLACE 0x1E01 +#define GL_INCR 0x1E02 +#define GL_DECR 0x1E03 +#define GL_INVERT 0x150A +#define GL_INCR_WRAP 0x8507 +#define GL_DECR_WRAP 0x8508 + +/* StringName */ +#define GL_VENDOR 0x1F00 +#define GL_RENDERER 0x1F01 +#define GL_VERSION 0x1F02 +#define GL_EXTENSIONS 0x1F03 + +/* TextureMagFilter */ +#define GL_NEAREST 0x2600 +#define GL_LINEAR 0x2601 + +/* TextureMinFilter */ +/* GL_NEAREST */ +/* GL_LINEAR */ +#define GL_NEAREST_MIPMAP_NEAREST 0x2700 +#define GL_LINEAR_MIPMAP_NEAREST 0x2701 +#define GL_NEAREST_MIPMAP_LINEAR 0x2702 +#define GL_LINEAR_MIPMAP_LINEAR 0x2703 + +/* TextureParameterName */ +#define GL_TEXTURE_MAG_FILTER 0x2800 +#define GL_TEXTURE_MIN_FILTER 0x2801 +#define GL_TEXTURE_WRAP_S 0x2802 +#define GL_TEXTURE_WRAP_T 0x2803 + +/* TextureTarget */ +/* GL_TEXTURE_2D */ +#define GL_TEXTURE 0x1702 + +#define GL_TEXTURE_CUBE_MAP 0x8513 +#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 +#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 +#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A +#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C + +/* TextureUnit */ +#define GL_TEXTURE0 0x84C0 +#define GL_TEXTURE1 0x84C1 +#define GL_TEXTURE2 0x84C2 +#define GL_TEXTURE3 0x84C3 +#define GL_TEXTURE4 0x84C4 +#define GL_TEXTURE5 0x84C5 +#define GL_TEXTURE6 0x84C6 +#define GL_TEXTURE7 0x84C7 +#define GL_TEXTURE8 0x84C8 +#define GL_TEXTURE9 0x84C9 +#define GL_TEXTURE10 0x84CA +#define GL_TEXTURE11 0x84CB +#define GL_TEXTURE12 0x84CC +#define GL_TEXTURE13 0x84CD +#define GL_TEXTURE14 0x84CE +#define GL_TEXTURE15 0x84CF +#define GL_TEXTURE16 0x84D0 +#define GL_TEXTURE17 0x84D1 +#define GL_TEXTURE18 0x84D2 +#define GL_TEXTURE19 0x84D3 +#define GL_TEXTURE20 0x84D4 +#define GL_TEXTURE21 0x84D5 +#define GL_TEXTURE22 0x84D6 +#define GL_TEXTURE23 0x84D7 +#define GL_TEXTURE24 0x84D8 +#define GL_TEXTURE25 0x84D9 +#define GL_TEXTURE26 0x84DA +#define GL_TEXTURE27 0x84DB +#define GL_TEXTURE28 0x84DC +#define GL_TEXTURE29 0x84DD +#define GL_TEXTURE30 0x84DE +#define GL_TEXTURE31 0x84DF +#define GL_ACTIVE_TEXTURE 0x84E0 + +/* TextureWrapMode */ +#define GL_REPEAT 0x2901 +#define GL_CLAMP_TO_EDGE 0x812F +#define GL_MIRRORED_REPEAT 0x8370 + +/* Uniform Types */ +#define GL_FLOAT_VEC2 0x8B50 +#define GL_FLOAT_VEC3 0x8B51 +#define GL_FLOAT_VEC4 0x8B52 +#define GL_INT_VEC2 0x8B53 +#define GL_INT_VEC3 0x8B54 +#define GL_INT_VEC4 0x8B55 +#define GL_BOOL 0x8B56 +#define GL_BOOL_VEC2 0x8B57 +#define GL_BOOL_VEC3 0x8B58 +#define GL_BOOL_VEC4 0x8B59 +#define GL_FLOAT_MAT2 0x8B5A +#define GL_FLOAT_MAT3 0x8B5B +#define GL_FLOAT_MAT4 0x8B5C +#define GL_SAMPLER_2D 0x8B5E +#define GL_SAMPLER_CUBE 0x8B60 + +/* Vertex Arrays */ +#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 +#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 +#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 +#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 +#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A +#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 +#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F + +/* Read Format */ +#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A +#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B + +/* Shader Source */ +#define GL_COMPILE_STATUS 0x8B81 +#define GL_INFO_LOG_LENGTH 0x8B84 +#define GL_SHADER_SOURCE_LENGTH 0x8B88 +#define GL_SHADER_COMPILER 0x8DFA + +/* Shader Binary */ +#define GL_SHADER_BINARY_FORMATS 0x8DF8 +#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 + +/* Shader Precision-Specified Types */ +#define GL_LOW_FLOAT 0x8DF0 +#define GL_MEDIUM_FLOAT 0x8DF1 +#define GL_HIGH_FLOAT 0x8DF2 +#define GL_LOW_INT 0x8DF3 +#define GL_MEDIUM_INT 0x8DF4 +#define GL_HIGH_INT 0x8DF5 + +/* Framebuffer Object. */ +#define GL_FRAMEBUFFER 0x8D40 +#define GL_RENDERBUFFER 0x8D41 + +#define GL_RGBA4 0x8056 +#define GL_RGB5_A1 0x8057 +#define GL_RGB565 0x8D62 +#define GL_DEPTH_COMPONENT16 0x81A5 +#define GL_STENCIL_INDEX 0x1901 +#define GL_STENCIL_INDEX8 0x8D48 + +#define GL_RENDERBUFFER_WIDTH 0x8D42 +#define GL_RENDERBUFFER_HEIGHT 0x8D43 +#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 +#define GL_RENDERBUFFER_RED_SIZE 0x8D50 +#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 +#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 +#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 +#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 +#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 + +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 +#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 + +#define GL_COLOR_ATTACHMENT0 0x8CE0 +#define GL_DEPTH_ATTACHMENT 0x8D00 +#define GL_STENCIL_ATTACHMENT 0x8D20 + +#define GL_NONE 0 + +#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 +#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 +#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 +#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9 +#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD + +#define GL_FRAMEBUFFER_BINDING 0x8CA6 +#define GL_RENDERBUFFER_BINDING 0x8CA7 +#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 + +#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 + +/*------------------------------------------------------------------------- + * GL core functions. + *-----------------------------------------------------------------------*/ + +GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture); +GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader); +GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar* name); +GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); +GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); +GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); +GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); +GL_APICALL void GL_APIENTRY glBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +GL_APICALL void GL_APIENTRY glBlendEquation ( GLenum mode ); +GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); +GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); +GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage); +GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data); +GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target); +GL_APICALL void GL_APIENTRY glClear (GLbitfield mask); +GL_APICALL void GL_APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +GL_APICALL void GL_APIENTRY glClearDepthf (GLclampf depth); +GL_APICALL void GL_APIENTRY glClearStencil (GLint s); +GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader); +GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data); +GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data); +GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL GLuint GL_APIENTRY glCreateProgram (void); +GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type); +GL_APICALL void GL_APIENTRY glCullFace (GLenum mode); +GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint* buffers); +GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint* framebuffers); +GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program); +GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint* renderbuffers); +GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader); +GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint* textures); +GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func); +GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag); +GL_APICALL void GL_APIENTRY glDepthRangef (GLclampf zNear, GLclampf zFar); +GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader); +GL_APICALL void GL_APIENTRY glDisable (GLenum cap); +GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index); +GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); +GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid* indices); +GL_APICALL void GL_APIENTRY glEnable (GLenum cap); +GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index); +GL_APICALL void GL_APIENTRY glFinish (void); +GL_APICALL void GL_APIENTRY glFlush (void); +GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode); +GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint* buffers); +GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target); +GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint* framebuffers); +GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint* renderbuffers); +GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint* textures); +GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); +GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name); +GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders); +GL_APICALL int GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar* name); +GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean* params); +GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint* params); +GL_APICALL GLenum GL_APIENTRY glGetError (void); +GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat* params); +GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint* params); +GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint* params); +GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint* params); +GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog); +GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint* params); +GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint* params); +GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog); +GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision); +GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source); +GL_APICALL const GLubyte* GL_APIENTRY glGetString (GLenum name); +GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat* params); +GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint* params); +GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat* params); +GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint* params); +GL_APICALL int GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar* name); +GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat* params); +GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint* params); +GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid** pointer); +GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode); +GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); +GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap); +GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer); +GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program); +GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer); +GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader); +GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture); +GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width); +GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program); +GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); +GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); +GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels); +GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void); +GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glSampleCoverage (GLclampf value, GLboolean invert); +GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length); +GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar** string, const GLint* length); +GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask); +GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); +GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); +GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum fail, GLenum zfail, GLenum zpass); +GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels); +GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); +GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat* params); +GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); +GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint* params); +GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels); +GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat x); +GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat* v); +GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint x); +GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint* v); +GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat x, GLfloat y); +GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat* v); +GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint x, GLint y); +GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint* v); +GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat x, GLfloat y, GLfloat z); +GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat* v); +GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint x, GLint y, GLint z); +GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint* v); +GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat* v); +GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint x, GLint y, GLint z, GLint w); +GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint* v); +GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat* value); +GL_APICALL void GL_APIENTRY glUseProgram (GLuint program); +GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program); +GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint indx, GLfloat x); +GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint indx, const GLfloat* values); +GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint indx, GLfloat x, GLfloat y); +GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint indx, const GLfloat* values); +GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint indx, GLfloat x, GLfloat y, GLfloat z); +GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint indx, const GLfloat* values); +GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint indx, const GLfloat* values); +GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr); +GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); + +#ifdef __cplusplus +} +#endif + +#endif /* __gl2_h_ */ diff --git a/etc/lwjgl-2.9.1/src/native/common/GLES2/gl2ext.h b/etc/lwjgl-2.9.1/src/native/common/GLES2/gl2ext.h new file mode 100644 index 0000000..f5e704f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/GLES2/gl2ext.h @@ -0,0 +1,803 @@ +#ifndef __gl2ext_h_ +#define __gl2ext_h_ + +/* $Revision: 10969 $ on $Date:: 2010-04-09 02:27:15 -0700 #$ */ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * This document is licensed under the SGI Free Software B License Version + * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . + */ + +#ifndef GL_APIENTRYP +# define GL_APIENTRYP GL_APIENTRY* +#endif + +/*------------------------------------------------------------------------* + * OES extension tokens + *------------------------------------------------------------------------*/ + +/* GL_OES_compressed_ETC1_RGB8_texture */ +#ifndef GL_OES_compressed_ETC1_RGB8_texture +#define GL_ETC1_RGB8_OES 0x8D64 +#endif + +/* GL_OES_compressed_paletted_texture */ +#ifndef GL_OES_compressed_paletted_texture +#define GL_PALETTE4_RGB8_OES 0x8B90 +#define GL_PALETTE4_RGBA8_OES 0x8B91 +#define GL_PALETTE4_R5_G6_B5_OES 0x8B92 +#define GL_PALETTE4_RGBA4_OES 0x8B93 +#define GL_PALETTE4_RGB5_A1_OES 0x8B94 +#define GL_PALETTE8_RGB8_OES 0x8B95 +#define GL_PALETTE8_RGBA8_OES 0x8B96 +#define GL_PALETTE8_R5_G6_B5_OES 0x8B97 +#define GL_PALETTE8_RGBA4_OES 0x8B98 +#define GL_PALETTE8_RGB5_A1_OES 0x8B99 +#endif + +/* GL_OES_depth24 */ +#ifndef GL_OES_depth24 +#define GL_DEPTH_COMPONENT24_OES 0x81A6 +#endif + +/* GL_OES_depth32 */ +#ifndef GL_OES_depth32 +#define GL_DEPTH_COMPONENT32_OES 0x81A7 +#endif + +/* GL_OES_depth_texture */ +/* No new tokens introduced by this extension. */ + +/* GL_OES_EGL_image */ +#ifndef GL_OES_EGL_image +typedef void* GLeglImageOES; +#endif + +/* GL_OES_element_index_uint */ +#ifndef GL_OES_element_index_uint +#define GL_UNSIGNED_INT 0x1405 +#endif + +/* GL_OES_get_program_binary */ +#ifndef GL_OES_get_program_binary +#define GL_PROGRAM_BINARY_LENGTH_OES 0x8741 +#define GL_NUM_PROGRAM_BINARY_FORMATS_OES 0x87FE +#define GL_PROGRAM_BINARY_FORMATS_OES 0x87FF +#endif + +/* GL_OES_mapbuffer */ +#ifndef GL_OES_mapbuffer +#define GL_WRITE_ONLY_OES 0x88B9 +#define GL_BUFFER_ACCESS_OES 0x88BB +#define GL_BUFFER_MAPPED_OES 0x88BC +#define GL_BUFFER_MAP_POINTER_OES 0x88BD +#endif + +/* GL_OES_packed_depth_stencil */ +#ifndef GL_OES_packed_depth_stencil +#define GL_DEPTH_STENCIL_OES 0x84F9 +#define GL_UNSIGNED_INT_24_8_OES 0x84FA +#define GL_DEPTH24_STENCIL8_OES 0x88F0 +#endif + +/* GL_OES_rgb8_rgba8 */ +#ifndef GL_OES_rgb8_rgba8 +#define GL_RGB8_OES 0x8051 +#define GL_RGBA8_OES 0x8058 +#endif + +/* GL_OES_standard_derivatives */ +#ifndef GL_OES_standard_derivatives +#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES 0x8B8B +#endif + +/* GL_OES_stencil1 */ +#ifndef GL_OES_stencil1 +#define GL_STENCIL_INDEX1_OES 0x8D46 +#endif + +/* GL_OES_stencil4 */ +#ifndef GL_OES_stencil4 +#define GL_STENCIL_INDEX4_OES 0x8D47 +#endif + +/* GL_OES_texture_3D */ +#ifndef GL_OES_texture_3D +#define GL_TEXTURE_WRAP_R_OES 0x8072 +#define GL_TEXTURE_3D_OES 0x806F +#define GL_TEXTURE_BINDING_3D_OES 0x806A +#define GL_MAX_3D_TEXTURE_SIZE_OES 0x8073 +#define GL_SAMPLER_3D_OES 0x8B5F +#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES 0x8CD4 +#endif + +/* GL_OES_texture_float */ +/* No new tokens introduced by this extension. */ + +/* GL_OES_texture_float_linear */ +/* No new tokens introduced by this extension. */ + +/* GL_OES_texture_half_float */ +#ifndef GL_OES_texture_half_float +#define GL_HALF_FLOAT_OES 0x8D61 +#endif + +/* GL_OES_texture_half_float_linear */ +/* No new tokens introduced by this extension. */ + +/* GL_OES_texture_npot */ +/* No new tokens introduced by this extension. */ + +/* GL_OES_vertex_array_object */ +#ifndef GL_OES_vertex_array_object +#define GL_VERTEX_ARRAY_BINDING_OES 0x85B5 +#endif + +/* GL_OES_vertex_half_float */ +/* GL_HALF_FLOAT_OES defined in GL_OES_texture_half_float already. */ + +/* GL_OES_vertex_type_10_10_10_2 */ +#ifndef GL_OES_vertex_type_10_10_10_2 +#define GL_UNSIGNED_INT_10_10_10_2_OES 0x8DF6 +#define GL_INT_10_10_10_2_OES 0x8DF7 +#endif + +/*------------------------------------------------------------------------* + * AMD extension tokens + *------------------------------------------------------------------------*/ + +/* GL_AMD_compressed_3DC_texture */ +#ifndef GL_AMD_compressed_3DC_texture +#define GL_3DC_X_AMD 0x87F9 +#define GL_3DC_XY_AMD 0x87FA +#endif + +/* GL_AMD_compressed_ATC_texture */ +#ifndef GL_AMD_compressed_ATC_texture +#define GL_ATC_RGB_AMD 0x8C92 +#define GL_ATC_RGBA_EXPLICIT_ALPHA_AMD 0x8C93 +#define GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD 0x87EE +#endif + +/* GL_AMD_performance_monitor */ +#ifndef GL_AMD_performance_monitor +#define GL_COUNTER_TYPE_AMD 0x8BC0 +#define GL_COUNTER_RANGE_AMD 0x8BC1 +#define GL_UNSIGNED_INT64_AMD 0x8BC2 +#define GL_PERCENTAGE_AMD 0x8BC3 +#define GL_PERFMON_RESULT_AVAILABLE_AMD 0x8BC4 +#define GL_PERFMON_RESULT_SIZE_AMD 0x8BC5 +#define GL_PERFMON_RESULT_AMD 0x8BC6 +#endif + +/* GL_AMD_program_binary_Z400 */ +#ifndef GL_AMD_program_binary_Z400 +#define GL_Z400_BINARY_AMD 0x8740 +#endif + +/*------------------------------------------------------------------------* + * EXT extension tokens + *------------------------------------------------------------------------*/ + +/* GL_EXT_blend_minmax */ +#ifndef GL_EXT_blend_minmax +#define GL_MIN_EXT 0x8007 +#define GL_MAX_EXT 0x8008 +#endif + +/* GL_EXT_discard_framebuffer */ +#ifndef GL_EXT_discard_framebuffer +#define GL_COLOR_EXT 0x1800 +#define GL_DEPTH_EXT 0x1801 +#define GL_STENCIL_EXT 0x1802 +#endif + +/* GL_EXT_multi_draw_arrays */ +/* No new tokens introduced by this extension. */ + +/* GL_EXT_read_format_bgra */ +#ifndef GL_EXT_read_format_bgra +#define GL_BGRA_EXT 0x80E1 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT 0x8365 +#define GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT 0x8366 +#endif + +/* GL_EXT_texture_filter_anisotropic */ +#ifndef GL_EXT_texture_filter_anisotropic +#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE +#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF +#endif + +/* GL_EXT_texture_format_BGRA8888 */ +#ifndef GL_EXT_texture_format_BGRA8888 +#define GL_BGRA_EXT 0x80E1 +#endif + +/* GL_EXT_texture_type_2_10_10_10_REV */ +#ifndef GL_EXT_texture_type_2_10_10_10_REV +#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368 +#endif + +/* GL_EXT_texture_compression_dxt1 */ +#ifndef GL_EXT_texture_compression_dxt1 +#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0 +#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1 +#endif + +/*------------------------------------------------------------------------* + * IMG extension tokens + *------------------------------------------------------------------------*/ + +/* GL_IMG_program_binary */ +#ifndef GL_IMG_program_binary +#define GL_SGX_PROGRAM_BINARY_IMG 0x9130 +#endif + +/* GL_IMG_read_format */ +#ifndef GL_IMG_read_format +#define GL_BGRA_IMG 0x80E1 +#define GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG 0x8365 +#endif + +/* GL_IMG_shader_binary */ +#ifndef GL_IMG_shader_binary +#define GL_SGX_BINARY_IMG 0x8C0A +#endif + +/* GL_IMG_texture_compression_pvrtc */ +#ifndef GL_IMG_texture_compression_pvrtc +#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00 +#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01 +#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02 +#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03 +#endif + +/* GL_IMG_multisampled_render_to_texture */ +#ifndef GL_IMG_multisampled_render_to_texture +#define GL_RENDERBUFFER_SAMPLES_IMG 0x9133 +#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG 0x9134 +#define GL_MAX_SAMPLES_IMG 0x9135 +#define GL_TEXTURE_SAMPLES_IMG 0x9136 +#endif + +/*------------------------------------------------------------------------* + * NV extension tokens + *------------------------------------------------------------------------*/ + +/* GL_NV_fence */ +#ifndef GL_NV_fence +#define GL_ALL_COMPLETED_NV 0x84F2 +#define GL_FENCE_STATUS_NV 0x84F3 +#define GL_FENCE_CONDITION_NV 0x84F4 +#endif + +/* GL_NV_coverage_sample */ +#ifndef GL_NV_coverage_sample +#define GL_COVERAGE_COMPONENT_NV 0x8ED0 +#define GL_COVERAGE_COMPONENT4_NV 0x8ED1 +#define GL_COVERAGE_ATTACHMENT_NV 0x8ED2 +#define GL_COVERAGE_BUFFERS_NV 0x8ED3 +#define GL_COVERAGE_SAMPLES_NV 0x8ED4 +#define GL_COVERAGE_ALL_FRAGMENTS_NV 0x8ED5 +#define GL_COVERAGE_EDGE_FRAGMENTS_NV 0x8ED6 +#define GL_COVERAGE_AUTOMATIC_NV 0x8ED7 +#define GL_COVERAGE_BUFFER_BIT_NV 0x8000 +#endif + +/* GL_NV_depth_nonlinear */ +#ifndef GL_NV_depth_nonlinear +#define GL_DEPTH_COMPONENT16_NONLINEAR_NV 0x8E2C +#endif + +/*------------------------------------------------------------------------* + * QCOM extension tokens + *------------------------------------------------------------------------*/ + +/* GL_QCOM_driver_control */ +/* No new tokens introduced by this extension. */ + +/* GL_QCOM_extended_get */ +#ifndef GL_QCOM_extended_get +#define GL_TEXTURE_WIDTH_QCOM 0x8BD2 +#define GL_TEXTURE_HEIGHT_QCOM 0x8BD3 +#define GL_TEXTURE_DEPTH_QCOM 0x8BD4 +#define GL_TEXTURE_INTERNAL_FORMAT_QCOM 0x8BD5 +#define GL_TEXTURE_FORMAT_QCOM 0x8BD6 +#define GL_TEXTURE_TYPE_QCOM 0x8BD7 +#define GL_TEXTURE_IMAGE_VALID_QCOM 0x8BD8 +#define GL_TEXTURE_NUM_LEVELS_QCOM 0x8BD9 +#define GL_TEXTURE_TARGET_QCOM 0x8BDA +#define GL_TEXTURE_OBJECT_VALID_QCOM 0x8BDB +#define GL_STATE_RESTORE 0x8BDC +#endif + +/* GL_QCOM_extended_get2 */ +/* No new tokens introduced by this extension. */ + +/* GL_QCOM_perfmon_global_mode */ +#ifndef GL_QCOM_perfmon_global_mode +#define GL_PERFMON_GLOBAL_MODE_QCOM 0x8FA0 +#endif + +/* GL_QCOM_writeonly_rendering */ +#ifndef GL_QCOM_writeonly_rendering +#define GL_WRITEONLY_RENDERING_QCOM 0x8823 +#endif + +/* GL_QCOM_tiled_rendering */ +#ifndef GL_QCOM_tiled_rendering +#define GL_COLOR_BUFFER_BIT0_QCOM 0x00000001 +#define GL_COLOR_BUFFER_BIT1_QCOM 0x00000002 +#define GL_COLOR_BUFFER_BIT2_QCOM 0x00000004 +#define GL_COLOR_BUFFER_BIT3_QCOM 0x00000008 +#define GL_COLOR_BUFFER_BIT4_QCOM 0x00000010 +#define GL_COLOR_BUFFER_BIT5_QCOM 0x00000020 +#define GL_COLOR_BUFFER_BIT6_QCOM 0x00000040 +#define GL_COLOR_BUFFER_BIT7_QCOM 0x00000080 +#define GL_DEPTH_BUFFER_BIT0_QCOM 0x00000100 +#define GL_DEPTH_BUFFER_BIT1_QCOM 0x00000200 +#define GL_DEPTH_BUFFER_BIT2_QCOM 0x00000400 +#define GL_DEPTH_BUFFER_BIT3_QCOM 0x00000800 +#define GL_DEPTH_BUFFER_BIT4_QCOM 0x00001000 +#define GL_DEPTH_BUFFER_BIT5_QCOM 0x00002000 +#define GL_DEPTH_BUFFER_BIT6_QCOM 0x00004000 +#define GL_DEPTH_BUFFER_BIT7_QCOM 0x00008000 +#define GL_STENCIL_BUFFER_BIT0_QCOM 0x00010000 +#define GL_STENCIL_BUFFER_BIT1_QCOM 0x00020000 +#define GL_STENCIL_BUFFER_BIT2_QCOM 0x00040000 +#define GL_STENCIL_BUFFER_BIT3_QCOM 0x00080000 +#define GL_STENCIL_BUFFER_BIT4_QCOM 0x00100000 +#define GL_STENCIL_BUFFER_BIT5_QCOM 0x00200000 +#define GL_STENCIL_BUFFER_BIT6_QCOM 0x00400000 +#define GL_STENCIL_BUFFER_BIT7_QCOM 0x00800000 +#define GL_MULTISAMPLE_BUFFER_BIT0_QCOM 0x01000000 +#define GL_MULTISAMPLE_BUFFER_BIT1_QCOM 0x02000000 +#define GL_MULTISAMPLE_BUFFER_BIT2_QCOM 0x04000000 +#define GL_MULTISAMPLE_BUFFER_BIT3_QCOM 0x08000000 +#define GL_MULTISAMPLE_BUFFER_BIT4_QCOM 0x10000000 +#define GL_MULTISAMPLE_BUFFER_BIT5_QCOM 0x20000000 +#define GL_MULTISAMPLE_BUFFER_BIT6_QCOM 0x40000000 +#define GL_MULTISAMPLE_BUFFER_BIT7_QCOM 0x80000000 +#endif + +/*------------------------------------------------------------------------* + * End of extension tokens, start of corresponding extension functions + *------------------------------------------------------------------------*/ + +/*------------------------------------------------------------------------* + * OES extension functions + *------------------------------------------------------------------------*/ + +/* GL_OES_compressed_ETC1_RGB8_texture */ +#ifndef GL_OES_compressed_ETC1_RGB8_texture +#define GL_OES_compressed_ETC1_RGB8_texture 1 +#endif + +/* GL_OES_compressed_paletted_texture */ +#ifndef GL_OES_compressed_paletted_texture +#define GL_OES_compressed_paletted_texture 1 +#endif + +/* GL_OES_depth24 */ +#ifndef GL_OES_depth24 +#define GL_OES_depth24 1 +#endif + +/* GL_OES_depth32 */ +#ifndef GL_OES_depth32 +#define GL_OES_depth32 1 +#endif + +/* GL_OES_depth_texture */ +#ifndef GL_OES_depth_texture +#define GL_OES_depth_texture 1 +#endif + +/* GL_OES_EGL_image */ +#ifndef GL_OES_EGL_image +#define GL_OES_EGL_image 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image); +GL_APICALL void GL_APIENTRY glEGLImageTargetRenderbufferStorageOES (GLenum target, GLeglImageOES image); +#endif +typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETTEXTURE2DOESPROC) (GLenum target, GLeglImageOES image); +typedef void (GL_APIENTRYP PFNGLEGLIMAGETARGETRENDERBUFFERSTORAGEOESPROC) (GLenum target, GLeglImageOES image); +#endif + +/* GL_OES_element_index_uint */ +#ifndef GL_OES_element_index_uint +#define GL_OES_element_index_uint 1 +#endif + +/* GL_OES_fbo_render_mipmap */ +#ifndef GL_OES_fbo_render_mipmap +#define GL_OES_fbo_render_mipmap 1 +#endif + +/* GL_OES_fragment_precision_high */ +#ifndef GL_OES_fragment_precision_high +#define GL_OES_fragment_precision_high 1 +#endif + +/* GL_OES_get_program_binary */ +#ifndef GL_OES_get_program_binary +#define GL_OES_get_program_binary 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glGetProgramBinaryOES (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); +GL_APICALL void GL_APIENTRY glProgramBinaryOES (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length); +#endif +typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYOESPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary); +typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYOESPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLint length); +#endif + +/* GL_OES_mapbuffer */ +#ifndef GL_OES_mapbuffer +#define GL_OES_mapbuffer 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void* GL_APIENTRY glMapBufferOES (GLenum target, GLenum access); +GL_APICALL GLboolean GL_APIENTRY glUnmapBufferOES (GLenum target); +GL_APICALL void GL_APIENTRY glGetBufferPointervOES (GLenum target, GLenum pname, GLvoid** params); +#endif +typedef void* (GL_APIENTRYP PFNGLMAPBUFFEROESPROC) (GLenum target, GLenum access); +typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFEROESPROC) (GLenum target); +typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVOESPROC) (GLenum target, GLenum pname, GLvoid** params); +#endif + +/* GL_OES_packed_depth_stencil */ +#ifndef GL_OES_packed_depth_stencil +#define GL_OES_packed_depth_stencil 1 +#endif + +/* GL_OES_rgb8_rgba8 */ +#ifndef GL_OES_rgb8_rgba8 +#define GL_OES_rgb8_rgba8 1 +#endif + +/* GL_OES_standard_derivatives */ +#ifndef GL_OES_standard_derivatives +#define GL_OES_standard_derivatives 1 +#endif + +/* GL_OES_stencil1 */ +#ifndef GL_OES_stencil1 +#define GL_OES_stencil1 1 +#endif + +/* GL_OES_stencil4 */ +#ifndef GL_OES_stencil4 +#define GL_OES_stencil4 1 +#endif + +/* GL_OES_texture_3D */ +#ifndef GL_OES_texture_3D +#define GL_OES_texture_3D 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels); +GL_APICALL void GL_APIENTRY glTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels); +GL_APICALL void GL_APIENTRY glCopyTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +GL_APICALL void GL_APIENTRY glCompressedTexImage3DOES (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data); +GL_APICALL void GL_APIENTRY glCompressedTexSubImage3DOES (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data); +GL_APICALL void GL_APIENTRY glFramebufferTexture3DOES (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +#endif +typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid* pixels); +typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid* pixels); +typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid* data); +typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid* data); +typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DOES) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +#endif + +/* GL_OES_texture_float */ +#ifndef GL_OES_texture_float +#define GL_OES_texture_float 1 +#endif + +/* GL_OES_texture_float_linear */ +#ifndef GL_OES_texture_float_linear +#define GL_OES_texture_float_linear 1 +#endif + +/* GL_OES_texture_half_float */ +#ifndef GL_OES_texture_half_float +#define GL_OES_texture_half_float 1 +#endif + +/* GL_OES_texture_half_float_linear */ +#ifndef GL_OES_texture_half_float_linear +#define GL_OES_texture_half_float_linear 1 +#endif + +/* GL_OES_texture_npot */ +#ifndef GL_OES_texture_npot +#define GL_OES_texture_npot 1 +#endif + +/* GL_OES_vertex_array_object */ +#ifndef GL_OES_vertex_array_object +#define GL_OES_vertex_array_object 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glBindVertexArrayOES (GLuint array); +GL_APICALL void GL_APIENTRY glDeleteVertexArraysOES (GLsizei n, const GLuint *arrays); +GL_APICALL void GL_APIENTRY glGenVertexArraysOES (GLsizei n, GLuint *arrays); +GL_APICALL GLboolean GL_APIENTRY glIsVertexArrayOES (GLuint array); +#endif +typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYOESPROC) (GLuint array); +typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSOESPROC) (GLsizei n, const GLuint *arrays); +typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSOESPROC) (GLsizei n, GLuint *arrays); +typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYOESPROC) (GLuint array); +#endif + +/* GL_OES_vertex_half_float */ +#ifndef GL_OES_vertex_half_float +#define GL_OES_vertex_half_float 1 +#endif + +/* GL_OES_vertex_type_10_10_10_2 */ +#ifndef GL_OES_vertex_type_10_10_10_2 +#define GL_OES_vertex_type_10_10_10_2 1 +#endif + +/*------------------------------------------------------------------------* + * AMD extension functions + *------------------------------------------------------------------------*/ + +/* GL_AMD_compressed_3DC_texture */ +#ifndef GL_AMD_compressed_3DC_texture +#define GL_AMD_compressed_3DC_texture 1 +#endif + +/* GL_AMD_compressed_ATC_texture */ +#ifndef GL_AMD_compressed_ATC_texture +#define GL_AMD_compressed_ATC_texture 1 +#endif + +/* AMD_performance_monitor */ +#ifndef GL_AMD_performance_monitor +#define GL_AMD_performance_monitor 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupsAMD (GLint *numGroups, GLsizei groupsSize, GLuint *groups); +GL_APICALL void GL_APIENTRY glGetPerfMonitorCountersAMD (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); +GL_APICALL void GL_APIENTRY glGetPerfMonitorGroupStringAMD (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); +GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterStringAMD (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); +GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterInfoAMD (GLuint group, GLuint counter, GLenum pname, GLvoid *data); +GL_APICALL void GL_APIENTRY glGenPerfMonitorsAMD (GLsizei n, GLuint *monitors); +GL_APICALL void GL_APIENTRY glDeletePerfMonitorsAMD (GLsizei n, GLuint *monitors); +GL_APICALL void GL_APIENTRY glSelectPerfMonitorCountersAMD (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList); +GL_APICALL void GL_APIENTRY glBeginPerfMonitorAMD (GLuint monitor); +GL_APICALL void GL_APIENTRY glEndPerfMonitorAMD (GLuint monitor); +GL_APICALL void GL_APIENTRY glGetPerfMonitorCounterDataAMD (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); +#endif +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSAMDPROC) (GLint *numGroups, GLsizei groupsSize, GLuint *groups); +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSAMDPROC) (GLuint group, GLint *numCounters, GLint *maxActiveCounters, GLsizei counterSize, GLuint *counters); +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORGROUPSTRINGAMDPROC) (GLuint group, GLsizei bufSize, GLsizei *length, GLchar *groupString); +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERSTRINGAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei *length, GLchar *counterString); +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERINFOAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid *data); +typedef void (GL_APIENTRYP PFNGLGENPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); +typedef void (GL_APIENTRYP PFNGLDELETEPERFMONITORSAMDPROC) (GLsizei n, GLuint *monitors); +typedef void (GL_APIENTRYP PFNGLSELECTPERFMONITORCOUNTERSAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint *countersList); +typedef void (GL_APIENTRYP PFNGLBEGINPERFMONITORAMDPROC) (GLuint monitor); +typedef void (GL_APIENTRYP PFNGLENDPERFMONITORAMDPROC) (GLuint monitor); +typedef void (GL_APIENTRYP PFNGLGETPERFMONITORCOUNTERDATAAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint *data, GLint *bytesWritten); +#endif + +/* GL_AMD_program_binary_Z400 */ +#ifndef GL_AMD_program_binary_Z400 +#define GL_AMD_program_binary_Z400 1 +#endif + +/*------------------------------------------------------------------------* + * EXT extension functions + *------------------------------------------------------------------------*/ + +/* GL_EXT_blend_minmax */ +#ifndef GL_EXT_blend_minmax +#define GL_EXT_blend_minmax 1 +#endif + +/* GL_EXT_discard_framebuffer */ +#ifndef GL_EXT_discard_framebuffer +#define GL_EXT_discard_framebuffer 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glDiscardFramebufferEXT (GLenum target, GLsizei numAttachments, const GLenum *attachments); +#endif +typedef void (GL_APIENTRYP PFNGLDISCARDFRAMEBUFFEREXTPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); +#endif + +#ifndef GL_EXT_multi_draw_arrays +#define GL_EXT_multi_draw_arrays 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glMultiDrawArraysEXT (GLenum, GLint *, GLsizei *, GLsizei); +GL_APICALL void GL_APIENTRY glMultiDrawElementsEXT (GLenum, const GLsizei *, GLenum, const GLvoid* *, GLsizei); +#endif /* GL_GLEXT_PROTOTYPES */ +typedef void (GL_APIENTRYP PFNGLMULTIDRAWARRAYSEXTPROC) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); +typedef void (GL_APIENTRYP PFNGLMULTIDRAWELEMENTSEXTPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); +#endif + +/* GL_EXT_read_format_bgra */ +#ifndef GL_EXT_read_format_bgra +#define GL_EXT_read_format_bgra 1 +#endif + +/* GL_EXT_texture_filter_anisotropic */ +#ifndef GL_EXT_texture_filter_anisotropic +#define GL_EXT_texture_filter_anisotropic 1 +#endif + +/* GL_EXT_texture_format_BGRA8888 */ +#ifndef GL_EXT_texture_format_BGRA8888 +#define GL_EXT_texture_format_BGRA8888 1 +#endif + +/* GL_EXT_texture_type_2_10_10_10_REV */ +#ifndef GL_EXT_texture_type_2_10_10_10_REV +#define GL_EXT_texture_type_2_10_10_10_REV 1 +#endif + +/* GL_EXT_texture_compression_dxt1 */ +#ifndef GL_EXT_texture_compression_dxt1 +#define GL_EXT_texture_compression_dxt1 1 +#endif + +/*------------------------------------------------------------------------* + * IMG extension functions + *------------------------------------------------------------------------*/ + +/* GL_IMG_program_binary */ +#ifndef GL_IMG_program_binary +#define GL_IMG_program_binary 1 +#endif + +/* GL_IMG_read_format */ +#ifndef GL_IMG_read_format +#define GL_IMG_read_format 1 +#endif + +/* GL_IMG_shader_binary */ +#ifndef GL_IMG_shader_binary +#define GL_IMG_shader_binary 1 +#endif + +/* GL_IMG_texture_compression_pvrtc */ +#ifndef GL_IMG_texture_compression_pvrtc +#define GL_IMG_texture_compression_pvrtc 1 +#endif + +/* GL_IMG_multisampled_render_to_texture */ +#ifndef GL_IMG_multisampled_render_to_texture +#define GL_IMG_multisampled_render_to_texture 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisampleIMG (GLenum, GLsizei, GLenum, GLsizei, GLsizei); +GL_APICALL void GL_APIENTRY glFramebufferTexture2DMultisampleIMG (GLenum, GLenum, GLenum, GLuint, GLint, GLsizei); +#endif +typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (GL_APIENTRYP PFNGLCLIPPLANEXIMG) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); +#endif + +/*------------------------------------------------------------------------* + * NV extension functions + *------------------------------------------------------------------------*/ + +/* GL_NV_fence */ +#ifndef GL_NV_fence +#define GL_NV_fence 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glDeleteFencesNV (GLsizei, const GLuint *); +GL_APICALL void GL_APIENTRY glGenFencesNV (GLsizei, GLuint *); +GL_APICALL GLboolean GL_APIENTRY glIsFenceNV (GLuint); +GL_APICALL GLboolean GL_APIENTRY glTestFenceNV (GLuint); +GL_APICALL void GL_APIENTRY glGetFenceivNV (GLuint, GLenum, GLint *); +GL_APICALL void GL_APIENTRY glFinishFenceNV (GLuint); +GL_APICALL void GL_APIENTRY glSetFenceNV (GLuint, GLenum); +#endif +typedef void (GL_APIENTRYP PFNGLDELETEFENCESNVPROC) (GLsizei n, const GLuint *fences); +typedef void (GL_APIENTRYP PFNGLGENFENCESNVPROC) (GLsizei n, GLuint *fences); +typedef GLboolean (GL_APIENTRYP PFNGLISFENCENVPROC) (GLuint fence); +typedef GLboolean (GL_APIENTRYP PFNGLTESTFENCENVPROC) (GLuint fence); +typedef void (GL_APIENTRYP PFNGLGETFENCEIVNVPROC) (GLuint fence, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLFINISHFENCENVPROC) (GLuint fence); +typedef void (GL_APIENTRYP PFNGLSETFENCENVPROC) (GLuint fence, GLenum condition); +#endif + +/* GL_NV_coverage_sample */ +#ifndef GL_NV_coverage_sample +#define GL_NV_coverage_sample 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glCoverageMaskNV (GLboolean mask); +GL_APICALL void GL_APIENTRY glCoverageOperationNV (GLenum operation); +#endif +typedef void (GL_APIENTRYP PFNGLCOVERAGEMASKNVPROC) (GLboolean mask); +typedef void (GL_APIENTRYP PFNGLCOVERAGEOPERATIONNVPROC) (GLenum operation); +#endif + +/* GL_NV_depth_nonlinear */ +#ifndef GL_NV_depth_nonlinear +#define GL_NV_depth_nonlinear 1 +#endif + +/*------------------------------------------------------------------------* + * QCOM extension functions + *------------------------------------------------------------------------*/ + +/* GL_QCOM_driver_control */ +#ifndef GL_QCOM_driver_control +#define GL_QCOM_driver_control 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glGetDriverControlsQCOM (GLint *num, GLsizei size, GLuint *driverControls); +GL_APICALL void GL_APIENTRY glGetDriverControlStringQCOM (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); +GL_APICALL void GL_APIENTRY glEnableDriverControlQCOM (GLuint driverControl); +GL_APICALL void GL_APIENTRY glDisableDriverControlQCOM (GLuint driverControl); +#endif +typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSQCOMPROC) (GLint *num, GLsizei size, GLuint *driverControls); +typedef void (GL_APIENTRYP PFNGLGETDRIVERCONTROLSTRINGQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString); +typedef void (GL_APIENTRYP PFNGLENABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); +typedef void (GL_APIENTRYP PFNGLDISABLEDRIVERCONTROLQCOMPROC) (GLuint driverControl); +#endif + +/* GL_QCOM_extended_get */ +#ifndef GL_QCOM_extended_get +#define GL_QCOM_extended_get 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glExtGetTexturesQCOM (GLuint *textures, GLint maxTextures, GLint *numTextures); +GL_APICALL void GL_APIENTRY glExtGetBuffersQCOM (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); +GL_APICALL void GL_APIENTRY glExtGetRenderbuffersQCOM (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); +GL_APICALL void GL_APIENTRY glExtGetFramebuffersQCOM (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); +GL_APICALL void GL_APIENTRY glExtGetTexLevelParameterivQCOM (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); +GL_APICALL void GL_APIENTRY glExtTexObjectStateOverrideiQCOM (GLenum target, GLenum pname, GLint param); +GL_APICALL void GL_APIENTRY glExtGetTexSubImageQCOM (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels); +GL_APICALL void GL_APIENTRY glExtGetBufferPointervQCOM (GLenum target, GLvoid **params); +#endif +typedef void (GL_APIENTRYP PFNGLEXTGETTEXTURESQCOMPROC) (GLuint *textures, GLint maxTextures, GLint *numTextures); +typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERSQCOMPROC) (GLuint *buffers, GLint maxBuffers, GLint *numBuffers); +typedef void (GL_APIENTRYP PFNGLEXTGETRENDERBUFFERSQCOMPROC) (GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers); +typedef void (GL_APIENTRYP PFNGLEXTGETFRAMEBUFFERSQCOMPROC) (GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers); +typedef void (GL_APIENTRYP PFNGLEXTGETTEXLEVELPARAMETERIVQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params); +typedef void (GL_APIENTRYP PFNGLEXTTEXOBJECTSTATEOVERRIDEIQCOMPROC) (GLenum target, GLenum pname, GLint param); +typedef void (GL_APIENTRYP PFNGLEXTGETTEXSUBIMAGEQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels); +typedef void (GL_APIENTRYP PFNGLEXTGETBUFFERPOINTERVQCOMPROC) (GLenum target, GLvoid **params); +#endif + +/* GL_QCOM_extended_get2 */ +#ifndef GL_QCOM_extended_get2 +#define GL_QCOM_extended_get2 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glExtGetShadersQCOM (GLuint *shaders, GLint maxShaders, GLint *numShaders); +GL_APICALL void GL_APIENTRY glExtGetProgramsQCOM (GLuint *programs, GLint maxPrograms, GLint *numPrograms); +GL_APICALL GLboolean GL_APIENTRY glExtIsProgramBinaryQCOM (GLuint program); +GL_APICALL void GL_APIENTRY glExtGetProgramBinarySourceQCOM (GLuint program, GLenum shadertype, GLchar *source, GLint *length); +#endif +typedef void (GL_APIENTRYP PFNGLEXTGETSHADERSQCOMPROC) (GLuint *shaders, GLint maxShaders, GLint *numShaders); +typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMSQCOMPROC) (GLuint *programs, GLint maxPrograms, GLint *numPrograms); +typedef GLboolean (GL_APIENTRYP PFNGLEXTISPROGRAMBINARYQCOMPROC) (GLuint program); +typedef void (GL_APIENTRYP PFNGLEXTGETPROGRAMBINARYSOURCEQCOMPROC) (GLuint program, GLenum shadertype, GLchar *source, GLint *length); +#endif + +/* GL_QCOM_perfmon_global_mode */ +#ifndef GL_QCOM_perfmon_global_mode +#define GL_QCOM_perfmon_global_mode 1 +#endif + +/* GL_QCOM_writeonly_rendering */ +#ifndef GL_QCOM_writeonly_rendering +#define GL_QCOM_writeonly_rendering 1 +#endif + +/* GL_QCOM_tiled_rendering */ +#ifndef GL_QCOM_tiled_rendering +#define GL_QCOM_tiled_rendering 1 +#ifdef GL_GLEXT_PROTOTYPES +GL_APICALL void GL_APIENTRY glStartTilingQCOM (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); +GL_APICALL void GL_APIENTRY glEndTilingQCOM (GLbitfield preserveMask); +#endif +typedef void (GL_APIENTRYP PFNGLSTARTTILINGQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); +typedef void (GL_APIENTRYP PFNGLENDTILINGQCOMPROC) (GLbitfield preserveMask); +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* __gl2ext_h_ */ diff --git a/etc/lwjgl-2.9.1/src/native/common/GLES2/gl2extimg.h b/etc/lwjgl-2.9.1/src/native/common/GLES2/gl2extimg.h new file mode 100644 index 0000000..d9c76da --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/GLES2/gl2extimg.h @@ -0,0 +1,51 @@ +#ifndef __gl2extimg_h_ +#define __gl2extimg_h_ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*------------------------------------------------------------------------* + * IMG extension tokens + *------------------------------------------------------------------------*/ + +/* GL_IMG_binary_shader */ +#ifndef GL_IMG_binary_shader +#define GL_SGX_BINARY_IMG 0x8C0A +#endif + +/* GL_IMG_texture_compression_pvrtc */ +#ifndef GL_IMG_texture_compression_pvrtc +#define GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG 0x8C00 +#define GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG 0x8C01 +#define GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG 0x8C02 +#define GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG 0x8C03 +#endif + + +/* GL_IMG_texture_format_BGRA8888 */ +#define GL_BGRA 0x80E1 + + +/*------------------------------------------------------------------------* + * IMG extension functions + *------------------------------------------------------------------------*/ + +/* GL_IMG_binary_shader */ +#ifndef GL_IMG_binary_shader +#define GL_IMG_binary_shader 1 +#endif + +/* GL_IMG_texture_compression_pvrtc */ +#ifndef GL_IMG_texture_compression_pvrtc +#define GL_IMG_texture_compression_pvrtc 1 +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* __gl2extimg_h_ */ diff --git a/etc/lwjgl-2.9.1/src/native/common/GLES2/gl2platform.h b/etc/lwjgl-2.9.1/src/native/common/GLES2/gl2platform.h new file mode 100644 index 0000000..38cb3b7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/GLES2/gl2platform.h @@ -0,0 +1,30 @@ +#ifndef __gl2platform_h_ +#define __gl2platform_h_ + +/* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */ + +/* + * This document is licensed under the SGI Free Software B License Version + * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . + */ + +/* Platform-specific types and definitions for OpenGL ES 2.X gl2.h + * + * Adopters may modify khrplatform.h and this file to suit their platform. + * You are encouraged to submit all modifications to the Khronos group so that + * they can be included in future versions of this file. Please submit changes + * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) + * by filing a bug against product "OpenGL-ES" component "Registry". + */ + +#include + +#ifndef GL_APICALL +#define GL_APICALL KHRONOS_APICALL +#endif + +#ifndef GL_APIENTRY +#define GL_APIENTRY KHRONOS_APIENTRY +#endif + +#endif /* __gl2platform_h_ */ diff --git a/etc/lwjgl-2.9.1/src/native/common/KHR/khrplatform.h b/etc/lwjgl-2.9.1/src/native/common/KHR/khrplatform.h new file mode 100644 index 0000000..1e323ed --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/KHR/khrplatform.h @@ -0,0 +1,269 @@ +#ifndef __khrplatform_h_ +#define __khrplatform_h_ + +/* +** Copyright (c) 2008-2009 The Khronos Group Inc. +** +** Permission is hereby granted, free of charge, to any person obtaining a +** copy of this software and/or associated documentation files (the +** "Materials"), to deal in the Materials without restriction, including +** without limitation the rights to use, copy, modify, merge, publish, +** distribute, sublicense, and/or sell copies of the Materials, and to +** permit persons to whom the Materials are furnished to do so, subject to +** the following conditions: +** +** The above copyright notice and this permission notice shall be included +** in all copies or substantial portions of the Materials. +** +** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. +*/ + +/* Khronos platform-specific types and definitions. + * + * $Revision: 9356 $ on $Date: 2009-10-21 02:52:25 -0700 (Wed, 21 Oct 2009) $ + * + * Adopters may modify this file to suit their platform. Adopters are + * encouraged to submit platform specific modifications to the Khronos + * group so that they can be included in future versions of this file. + * Please submit changes by sending them to the public Khronos Bugzilla + * (http://khronos.org/bugzilla) by filing a bug against product + * "Khronos (general)" component "Registry". + * + * A predefined template which fills in some of the bug fields can be + * reached using http://tinyurl.com/khrplatform-h-bugreport, but you + * must create a Bugzilla login first. + * + * + * See the Implementer's Guidelines for information about where this file + * should be located on your system and for more details of its use: + * http://www.khronos.org/registry/implementers_guide.pdf + * + * This file should be included as + * #include + * by Khronos client API header files that use its types and defines. + * + * The types in khrplatform.h should only be used to define API-specific types. + * + * Types defined in khrplatform.h: + * khronos_int8_t signed 8 bit + * khronos_uint8_t unsigned 8 bit + * khronos_int16_t signed 16 bit + * khronos_uint16_t unsigned 16 bit + * khronos_int32_t signed 32 bit + * khronos_uint32_t unsigned 32 bit + * khronos_int64_t signed 64 bit + * khronos_uint64_t unsigned 64 bit + * khronos_intptr_t signed same number of bits as a pointer + * khronos_uintptr_t unsigned same number of bits as a pointer + * khronos_ssize_t signed size + * khronos_usize_t unsigned size + * khronos_float_t signed 32 bit floating point + * khronos_time_ns_t unsigned 64 bit time in nanoseconds + * khronos_utime_nanoseconds_t unsigned time interval or absolute time in + * nanoseconds + * khronos_stime_nanoseconds_t signed time interval in nanoseconds + * khronos_boolean_enum_t enumerated boolean type. This should + * only be used as a base type when a client API's boolean type is + * an enum. Client APIs which use an integer or other type for + * booleans cannot use this as the base type for their boolean. + * + * Tokens defined in khrplatform.h: + * + * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values. + * + * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0. + * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0. + * + * Calling convention macros defined in this file: + * KHRONOS_APICALL + * KHRONOS_APIENTRY + * KHRONOS_APIATTRIBUTES + * + * These may be used in function prototypes as: + * + * KHRONOS_APICALL void KHRONOS_APIENTRY funcname( + * int arg1, + * int arg2) KHRONOS_APIATTRIBUTES; + */ + +/*------------------------------------------------------------------------- + * Definition of KHRONOS_APICALL + *------------------------------------------------------------------------- + * This precedes the return type of the function in the function prototype. + */ +#if defined(_WIN32) && !defined(__SCITECH_SNAP__) +# define KHRONOS_APICALL __declspec(dllimport) +#elif defined (__SYMBIAN32__) +# define KHRONOS_APICALL IMPORT_C +#else +# define KHRONOS_APICALL +#endif + +/*------------------------------------------------------------------------- + * Definition of KHRONOS_APIENTRY + *------------------------------------------------------------------------- + * This follows the return type of the function and precedes the function + * name in the function prototype. + */ +#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) + /* Win32 but not WinCE */ +# define KHRONOS_APIENTRY __stdcall +#else +# define KHRONOS_APIENTRY +#endif + +/*------------------------------------------------------------------------- + * Definition of KHRONOS_APIATTRIBUTES + *------------------------------------------------------------------------- + * This follows the closing parenthesis of the function prototype arguments. + */ +#if defined (__ARMCC_2__) +#define KHRONOS_APIATTRIBUTES __softfp +#else +#define KHRONOS_APIATTRIBUTES +#endif + +/*------------------------------------------------------------------------- + * basic type definitions + *-----------------------------------------------------------------------*/ +#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__) + + +/* + * Using + */ +#include +typedef int32_t khronos_int32_t; +typedef uint32_t khronos_uint32_t; +typedef int64_t khronos_int64_t; +typedef uint64_t khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif defined(__VMS ) || defined(__sgi) + +/* + * Using + */ +#include +typedef int32_t khronos_int32_t; +typedef uint32_t khronos_uint32_t; +typedef int64_t khronos_int64_t; +typedef uint64_t khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif defined(_WIN32) && !defined(__SCITECH_SNAP__) + +/* + * Win32 + */ +typedef __int32 khronos_int32_t; +typedef unsigned __int32 khronos_uint32_t; +typedef __int64 khronos_int64_t; +typedef unsigned __int64 khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif defined(__sun__) || defined(__digital__) + +/* + * Sun or Digital + */ +typedef int khronos_int32_t; +typedef unsigned int khronos_uint32_t; +#if defined(__arch64__) || defined(_LP64) +typedef long int khronos_int64_t; +typedef unsigned long int khronos_uint64_t; +#else +typedef long long int khronos_int64_t; +typedef unsigned long long int khronos_uint64_t; +#endif /* __arch64__ */ +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#elif 0 + +/* + * Hypothetical platform with no float or int64 support + */ +typedef int khronos_int32_t; +typedef unsigned int khronos_uint32_t; +#define KHRONOS_SUPPORT_INT64 0 +#define KHRONOS_SUPPORT_FLOAT 0 + +#else + +/* + * Generic fallback + */ +#include +typedef int32_t khronos_int32_t; +typedef uint32_t khronos_uint32_t; +typedef int64_t khronos_int64_t; +typedef uint64_t khronos_uint64_t; +#define KHRONOS_SUPPORT_INT64 1 +#define KHRONOS_SUPPORT_FLOAT 1 + +#endif + + +/* + * Types that are (so far) the same on all platforms + */ +typedef signed char khronos_int8_t; +typedef unsigned char khronos_uint8_t; +typedef signed short int khronos_int16_t; +typedef unsigned short int khronos_uint16_t; +typedef signed long int khronos_intptr_t; +typedef unsigned long int khronos_uintptr_t; +typedef signed long int khronos_ssize_t; +typedef unsigned long int khronos_usize_t; + +#if KHRONOS_SUPPORT_FLOAT +/* + * Float type + */ +typedef float khronos_float_t; +#endif + +#if KHRONOS_SUPPORT_INT64 +/* Time types + * + * These types can be used to represent a time interval in nanoseconds or + * an absolute Unadjusted System Time. Unadjusted System Time is the number + * of nanoseconds since some arbitrary system event (e.g. since the last + * time the system booted). The Unadjusted System Time is an unsigned + * 64 bit value that wraps back to 0 every 584 years. Time intervals + * may be either signed or unsigned. + */ +typedef khronos_uint64_t khronos_utime_nanoseconds_t; +typedef khronos_int64_t khronos_stime_nanoseconds_t; +#endif + +/* + * Dummy value used to pad enum types to 32 bits. + */ +#ifndef KHRONOS_MAX_ENUM +#define KHRONOS_MAX_ENUM 0x7FFFFFFF +#endif + +/* + * Enumerated boolean type + * + * Values other than zero should be considered to be true. Therefore + * comparisons should not be made against KHRONOS_TRUE. + */ +typedef enum { + KHRONOS_FALSE = 0, + KHRONOS_TRUE = 1, + KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM +} khronos_boolean_enum_t; + +#endif /* __khrplatform_h_ */ diff --git a/etc/lwjgl-2.9.1/src/native/common/OpenCL/cl_platform.h b/etc/lwjgl-2.9.1/src/native/common/OpenCL/cl_platform.h new file mode 100644 index 0000000..5d85ded --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/OpenCL/cl_platform.h @@ -0,0 +1,296 @@ +/********************************************************************************** + * Copyright (c) 2008-2009 The Khronos Group Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and/or associated documentation files (the + * "Materials"), to deal in the Materials without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Materials, and to + * permit persons to whom the Materials are furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Materials. + * + * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + **********************************************************************************/ + +#ifndef __CL_PLATFORM_H +#define __CL_PLATFORM_H + +#ifdef __APPLE__ + /* Contains #defines for AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER below */ + #include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#define CL_API_ENTRY +#define CL_API_CALL +#ifdef __APPLE__ +#define CL_API_SUFFIX__VERSION_1_0 AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER +#define CL_EXTENSION_WEAK_LINK __attribute__((weak_import)) +#else +#define CL_API_SUFFIX__VERSION_1_0 +#define CL_EXTENSION_WEAK_LINK +#endif + +#if (defined (WIN32) && (_MSC_VER)) + +/* scalar types */ +typedef signed __int8 cl_char; +typedef unsigned __int8 cl_uchar; +typedef signed __int16 cl_short; +typedef unsigned __int16 cl_ushort; +typedef signed __int32 cl_int; +typedef unsigned __int32 cl_uint; +typedef signed __int64 cl_long; +typedef unsigned __int64 cl_ulong; + +typedef unsigned __int16 cl_half; +typedef float cl_float; +typedef double cl_double; + + +/* + * Vector types + * + * Note: OpenCL requires that all types be naturally aligned. + * This means that vector types must be naturally aligned. + * For example, a vector of four floats must be aligned to + * a 16 byte boundary (calculated as 4 * the natural 4-byte + * alignment of the float). The alignment qualifiers here + * will only function properly if your compiler supports them + * and if you don't actively work to defeat them. For example, + * in order for a cl_float4 to be 16 byte aligned in a struct, + * the start of the struct must itself be 16-byte aligned. + * + * Maintaining proper alignment is the user's responsibility. + */ +typedef signed __int8 cl_char2[2]; +typedef signed __int8 cl_char4[4]; +typedef signed __int8 cl_char8[8]; +typedef signed __int8 cl_char16[16]; +typedef unsigned __int8 cl_uchar2[2]; +typedef unsigned __int8 cl_uchar4[4]; +typedef unsigned __int8 cl_uchar8[8]; +typedef unsigned __int8 cl_uchar16[16]; + +typedef signed __int16 cl_short2[2]; +typedef signed __int16 cl_short4[4]; +typedef signed __int16 cl_short8[8]; +typedef signed __int16 cl_short16[16]; +typedef unsigned __int16 cl_ushort2[2]; +typedef unsigned __int16 cl_ushort4[4]; +typedef unsigned __int16 cl_ushort8[8]; +typedef unsigned __int16 cl_ushort16[16]; + +typedef signed __int32 cl_int2[2]; +typedef signed __int32 cl_int4[4]; +typedef signed __int32 cl_int8[8]; +typedef signed __int32 cl_int16[16]; +typedef unsigned __int32 cl_uint2[2]; +typedef unsigned __int32 cl_uint4[4]; +typedef unsigned __int32 cl_uint8[8]; +typedef unsigned __int32 cl_uint16[16]; + +typedef signed __int64 cl_long2[2]; +typedef signed __int64 cl_long4[4]; +typedef signed __int64 cl_long8[8]; +typedef signed __int64 cl_long16[16]; +typedef unsigned __int64 cl_ulong2[2]; +typedef unsigned __int64 cl_ulong4[4]; +typedef unsigned __int64 cl_ulong8[8]; +typedef unsigned __int64 cl_ulong16[16]; + +typedef float cl_float2[2]; +typedef float cl_float4[4]; +typedef float cl_float8[8]; +typedef float cl_float16[16]; + +typedef double cl_double2[2]; +typedef double cl_double4[4]; +typedef double cl_double8[8]; +typedef double cl_double16[16]; +/* There are no vector types for half */ + +#define CL_CHAR_BIT 8 +#define CL_SCHAR_MAX 127 +#define CL_SCHAR_MIN (-127-1) +#define CL_CHAR_MAX CL_SCHAR_MAX +#define CL_CHAR_MIN CL_SCHAR_MIN +#define CL_UCHAR_MAX 255 +#define CL_SHRT_MAX 32767 +#define CL_SHRT_MIN (-32767-1) +#define CL_USHRT_MAX 65535 +#define CL_INT_MAX 2147483647 +#define CL_INT_MIN (-2147483647-1) +#define CL_UINT_MAX 0xffffffffU +#define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL) +#define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL) +#define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL) + +#define CL_FLT_DIG 6 +#define CL_FLT_MANT_DIG 24 +#define CL_FLT_MAX_10_EXP +38 +#define CL_FLT_MAX_EXP +128 +#define CL_FLT_MIN_10_EXP -37 +#define CL_FLT_MIN_EXP -125 +#define CL_FLT_RADIX 2 +#define CL_FLT_MAX 340282346638528859811704183484516925440.0f +#define CL_FLT_MIN 1.175494350822287507969e-38f +#define CL_FLT_EPSILON 0x1.0p-23f + +#define CL_DBL_DIG 15 +#define CL_DBL_MANT_DIG 53 +#define CL_DBL_MAX_10_EXP +308 +#define CL_DBL_MAX_EXP +1024 +#define CL_DBL_MIN_10_EXP -307 +#define CL_DBL_MIN_EXP -1021 +#define CL_DBL_RADIX 2 +#define CL_DBL_MAX 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0 +#define CL_DBL_MIN 2.225073858507201383090e-308 +#define CL_DBL_EPSILON 2.220446049250313080847e-16 + + +#else + +#include + +/* scalar types */ +typedef int8_t cl_char; +typedef uint8_t cl_uchar; +typedef int16_t cl_short __attribute__((aligned(2))); +typedef uint16_t cl_ushort __attribute__((aligned(2))); +typedef int32_t cl_int __attribute__((aligned(4))); +typedef uint32_t cl_uint __attribute__((aligned(4))); +typedef int64_t cl_long __attribute__((aligned(8))); +typedef uint64_t cl_ulong __attribute__((aligned(8))); + +typedef uint16_t cl_half __attribute__((aligned(2))); +typedef float cl_float __attribute__((aligned(4))); +typedef double cl_double __attribute__((aligned(8))); + +/* + * Vector types + * + * Note: OpenCL requires that all types be naturally aligned. + * This means that vector types must be naturally aligned. + * For example, a vector of four floats must be aligned to + * a 16 byte boundary (calculated as 4 * the natural 4-byte + * alignment of the float). The alignment qualifiers here + * will only function properly if your compiler supports them + * and if you don't actively work to defeat them. For example, + * in order for a cl_float4 to be 16 byte aligned in a struct, + * the start of the struct must itself be 16-byte aligned. + * + * Maintaining proper alignment is the user's responsibility. + */ +typedef int8_t cl_char2[2] __attribute__((aligned(2))); +typedef int8_t cl_char4[4] __attribute__((aligned(4))); +typedef int8_t cl_char8[8] __attribute__((aligned(8))); +typedef int8_t cl_char16[16] __attribute__((aligned(16))); +typedef uint8_t cl_uchar2[2] __attribute__((aligned(2))); +typedef uint8_t cl_uchar4[4] __attribute__((aligned(4))); +typedef uint8_t cl_uchar8[8] __attribute__((aligned(8))); +typedef uint8_t cl_uchar16[16] __attribute__((aligned(16))); + +typedef int16_t cl_short2[2] __attribute__((aligned(4))); +typedef int16_t cl_short4[4] __attribute__((aligned(8))); +typedef int16_t cl_short8[8] __attribute__((aligned(16))); +typedef int16_t cl_short16[16] __attribute__((aligned(32))); +typedef uint16_t cl_ushort2[2] __attribute__((aligned(4))); +typedef uint16_t cl_ushort4[4] __attribute__((aligned(8))); +typedef uint16_t cl_ushort8[8] __attribute__((aligned(16))); +typedef uint16_t cl_ushort16[16] __attribute__((aligned(32))); + +typedef int32_t cl_int2[2] __attribute__((aligned(8))); +typedef int32_t cl_int4[4] __attribute__((aligned(16))); +typedef int32_t cl_int8[8] __attribute__((aligned(32))); +typedef int32_t cl_int16[16] __attribute__((aligned(64))); +typedef uint32_t cl_uint2[2] __attribute__((aligned(8))); +typedef uint32_t cl_uint4[4] __attribute__((aligned(16))); +typedef uint32_t cl_uint8[8] __attribute__((aligned(32))); +typedef uint32_t cl_uint16[16] __attribute__((aligned(64))); + +typedef int64_t cl_long2[2] __attribute__((aligned(16))); +typedef int64_t cl_long4[4] __attribute__((aligned(32))); +typedef int64_t cl_long8[8] __attribute__((aligned(64))); +typedef int64_t cl_long16[16] __attribute__((aligned(128))); +typedef uint64_t cl_ulong2[2] __attribute__((aligned(16))); +typedef uint64_t cl_ulong4[4] __attribute__((aligned(32))); +typedef uint64_t cl_ulong8[8] __attribute__((aligned(64))); +typedef uint64_t cl_ulong16[16] __attribute__((aligned(128))); + +typedef float cl_float2[2] __attribute__((aligned(8))); +typedef float cl_float4[4] __attribute__((aligned(16))); +typedef float cl_float8[8] __attribute__((aligned(32))); +typedef float cl_float16[16] __attribute__((aligned(64))); + +typedef double cl_double2[2] __attribute__((aligned(16))); +typedef double cl_double4[4] __attribute__((aligned(32))); +typedef double cl_double8[8] __attribute__((aligned(64))); +typedef double cl_double16[16] __attribute__((aligned(128))); + +/* There are no vector types for half */ + +/******************************************************************************/ + +// Macro names and corresponding values defined by OpenCL + +#define CL_CHAR_BIT 8 +#define CL_SCHAR_MAX 127 +#define CL_SCHAR_MIN (-127-1) +#define CL_CHAR_MAX CL_SCHAR_MAX +#define CL_CHAR_MIN CL_SCHAR_MIN +#define CL_UCHAR_MAX 255 +#define CL_SHRT_MAX 32767 +#define CL_SHRT_MIN (-32767-1) +#define CL_USHRT_MAX 65535 +#define CL_INT_MAX 2147483647 +#define CL_INT_MIN (-2147483647-1) +#define CL_UINT_MAX 0xffffffffU +#define CL_LONG_MAX ((cl_long) 0x7FFFFFFFFFFFFFFFLL) +#define CL_LONG_MIN ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL) +#define CL_ULONG_MAX ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL) + +#define CL_FLT_DIG 6 +#define CL_FLT_MANT_DIG 24 +#define CL_FLT_MAX_10_EXP +38 +#define CL_FLT_MAX_EXP +128 +#define CL_FLT_MIN_10_EXP -37 +#define CL_FLT_MIN_EXP -125 +#define CL_FLT_RADIX 2 +#define CL_FLT_MAX 0x1.fffffep127f +#define CL_FLT_MIN 0x1.0p-126f +#define CL_FLT_EPSILON 0x1.0p-23f + +#define CL_DBL_DIG 15 +#define CL_DBL_MANT_DIG 53 +#define CL_DBL_MAX_10_EXP +308 +#define CL_DBL_MAX_EXP +1024 +#define CL_DBL_MIN_10_EXP -307 +#define CL_DBL_MIN_EXP -1021 +#define CL_DBL_RADIX 2 +#define CL_DBL_MAX 0x1.fffffffffffffp1023 +#define CL_DBL_MIN 0x1.0p-1022 +#define CL_DBL_EPSILON 0x1.0p-52 + +#endif + +#include + + +#ifdef __cplusplus +} +#endif + +#endif // __CL_PLATFORM_H diff --git a/etc/lwjgl-2.9.1/src/native/common/awt_tools.h b/etc/lwjgl-2.9.1/src/native/common/awt_tools.h new file mode 100644 index 0000000..84622f9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/awt_tools.h @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * @author elias_naur + * @version $Revision$ + */ + +#ifndef __LWJGL_AWT_TOOLS_H +#define __LWJGL_AWT_TOOLS_H + +#include +#include + +typedef struct { + JAWT awt; + JAWT_DrawingSurface* ds; + JAWT_DrawingSurfaceInfo *dsi; +} AWTSurfaceLock; + +#endif + diff --git a/etc/lwjgl-2.9.1/src/native/common/common_tools.c b/etc/lwjgl-2.9.1/src/native/common/common_tools.c new file mode 100644 index 0000000..d0720d2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/common_tools.c @@ -0,0 +1,398 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * @author elias_naur + * @version $Revision$ + */ + +#include +#include +#include "common_tools.h" +#include "org_lwjgl_DefaultSysImplementation.h" + +static bool debug = false; +static JavaVM *jvm; + +static jmethodID mByteBuffer_asReadOnlyBuffer; +static jmethodID mPointerWrapper_getPointer; + +void initAttribList(attrib_list_t *list) { + list->current_index = 0; +} + +void putAttrib(attrib_list_t *list, int attrib) { + if (list->current_index == ATTRIB_LIST_SIZE) { + printfDebug("Ignoring attrib %d: attrib list size too small", attrib); + return; + } + list->attribs[list->current_index] = attrib; + list->current_index++; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_DefaultSysImplementation_getPointerSize(JNIEnv *env, jclass clazz) { + return (jint)sizeof(void *); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_DefaultSysImplementation_setDebug + (JNIEnv *env, jobject ignored, jboolean enable) { + debug = enable == JNI_TRUE ? true : false; +} + +bool isDebugEnabled(void) { + return debug; +} + +static int do_vsnprintf(char* buffer, size_t buffer_size, const char *format, va_list ap) { +#ifdef _MSC_VER + return vsnprintf_s(buffer, buffer_size, _TRUNCATE, format, ap); +#else + va_list cp_ap; + va_copy(cp_ap, ap); + int res = vsnprintf(buffer, buffer_size, format, cp_ap); + va_end(cp_ap); + return res; +#endif +} + +static jstring sprintfJavaString(JNIEnv *env, const char *format, va_list ap) { + int buffer_size = 2048; + char *buffer; + jstring str; + int str_size; + buffer = (char *)malloc(sizeof(char)*buffer_size); + if (buffer == NULL) + return NULL; + str_size = do_vsnprintf(buffer, buffer_size, format, ap); + if (str_size > buffer_size) { + free(buffer); + buffer_size = str_size + 1; + buffer = (char *)malloc(sizeof(char)*buffer_size); + if (buffer == NULL) + return NULL; + do_vsnprintf(buffer, buffer_size, format, ap); + } + str = (*env)->NewStringUTF(env, buffer); + free(buffer); + return str; +} + +void printfDebugJava(JNIEnv *env, const char *format, ...) { + jstring str; + jclass org_lwjgl_LWJGLUtil_class; + jmethodID log_method; + va_list ap; + if (isDebugEnabled() && !(*env)->ExceptionOccurred(env)) { + va_start(ap, format); + str = sprintfJavaString(env, format, ap); + va_end(ap); + org_lwjgl_LWJGLUtil_class = (*env)->FindClass(env, "org/lwjgl/LWJGLUtil"); + if (org_lwjgl_LWJGLUtil_class == NULL) + return; + log_method = (*env)->GetStaticMethodID(env, org_lwjgl_LWJGLUtil_class, "log", "(Ljava/lang/CharSequence;)V"); + if (log_method == NULL) + return; + (*env)->CallStaticVoidMethod(env, org_lwjgl_LWJGLUtil_class, log_method, str); + } +} + +void printfDebug(const char *format, ...) { + va_list ap; + va_start(ap, format); + if (isDebugEnabled()) + vfprintf(stderr, format, ap); + va_end(ap); +} + +static void throwFormattedGeneralException(JNIEnv * env, const char *exception_name, const char *format, va_list ap) { + jclass cls; + jstring str; + jmethodID exception_constructor; + jobject exception; + + if ((*env)->ExceptionCheck(env) == JNI_TRUE) + return; // The JVM crashes if we try to throw two exceptions from one native call + str = sprintfJavaString(env, format, ap); + cls = (*env)->FindClass(env, exception_name); + exception_constructor = (*env)->GetMethodID(env, cls, "", "(Ljava/lang/String;)V"); + exception = (*env)->NewObject(env, cls, exception_constructor, str); + (*env)->Throw(env, exception); +} + +void throwGeneralException(JNIEnv * env, const char *exception_name, const char * err) { + jclass cls; + + if ((*env)->ExceptionCheck(env) == JNI_TRUE) + return; // The JVM crashes if we try to throw two exceptions from one native call + cls = (*env)->FindClass(env, exception_name); + (*env)->ThrowNew(env, cls, err); +} + +void throwFMODException(JNIEnv * env, const char * err) { + throwGeneralException(env, "org/lwjgl/fmod3/FMODException", err); +} + +void throwFormattedRuntimeException(JNIEnv * env, const char *format, ...) { + va_list ap; + va_start(ap, format); + throwFormattedGeneralException(env, "java/lang/RuntimeException", format, ap); + va_end(ap); +} + +void throwFormattedException(JNIEnv * env, const char *format, ...) { + va_list ap; + va_start(ap, format); + throwFormattedGeneralException(env, "org/lwjgl/LWJGLException", format, ap); + va_end(ap); +} + +void throwException(JNIEnv * env, const char * err) { + throwGeneralException(env, "org/lwjgl/LWJGLException", err); +} + +// retrieves the locale-specific C string +char * GetStringNativeChars(JNIEnv *env, jstring jstr) { + jbyteArray bytes = 0; + jthrowable exc; + char *result = 0; + jclass jcls_str; + jmethodID MID_String_getBytes; + + /* out of memory error? */ + if ((*env)->EnsureLocalCapacity(env, 2) < 0) { + return 0; + } + + // aquire getBytes method + jcls_str = (*env)->FindClass(env, "java/lang/String"); + MID_String_getBytes = (*env)->GetMethodID(env, jcls_str, "getBytes", "()[B"); + + // get the bytes + bytes = (jbyteArray) (*env)->CallObjectMethod(env, jstr, MID_String_getBytes); + exc = (*env)->ExceptionOccurred(env); + + // if no exception occured while getting bytes - continue + if (!exc) { + jint len = (*env)->GetArrayLength(env, bytes); + result = (char *) malloc(len + 1); + if (result == 0) { + throwGeneralException(env, "java/lang/OutOfMemoryError", NULL); + (*env)->DeleteLocalRef(env, bytes); + return 0; + } + (*env)->GetByteArrayRegion(env, bytes, 0, len, (jbyte *) result); + result[len] = 0; /* NULL-terminate */ + } else { + (*env)->DeleteLocalRef(env, exc); + } + (*env)->DeleteLocalRef(env, bytes); + return (char*) result; +} + +/* creates locale specific string, unsigned argument to + * match GLuchar and ALuchar types + */ +jstring NewStringNativeUnsigned(JNIEnv *env, const unsigned char *ustr) { + const char *str = (const char *)ustr; + if (str == NULL) + return NULL; + return NewStringNativeWithLength(env, str, (jsize)strlen(str)); +} + +// creates locale specific string +jstring NewStringNativeWithLength(JNIEnv *env, const char *str, jsize length) { + jclass jcls_str; + jmethodID jmethod_str; + jstring result; + jbyteArray bytes; + if (str==NULL) { + return NULL; + } + + jcls_str = (*env)->FindClass(env,"java/lang/String"); + if (jcls_str == NULL) + return NULL; + jmethod_str = (*env)->GetMethodID(env,jcls_str, "", "([B)V"); + if (jmethod_str == NULL) + return NULL; + + bytes = 0; + + if ((*env)->EnsureLocalCapacity(env,2) < 0) { + return NULL; /* out of memory error */ + } + + bytes = (*env)->NewByteArray(env,length); + if (bytes != NULL) { + (*env)->SetByteArrayRegion(env,bytes, 0, length, (jbyte *)str); + result = (jstring)(*env)->NewObject(env,jcls_str, jmethod_str, bytes); + (*env)->DeleteLocalRef(env,bytes); + return result; + } /* else fall through */ + return NULL; +} + +bool ext_InitializeFunctions(ExtGetProcAddressPROC gpa, int num_functions, ExtFunction *functions) { + int i; + void **ext_function_pointer_pointer; + for (i = 0; i < num_functions; i++) { + ExtFunction *function = functions + i; + if (function->ext_function_name != NULL) { + void *ext_func_pointer = gpa(function->ext_function_name); + if (ext_func_pointer == NULL) + return false; + ext_function_pointer_pointer = function->ext_function_pointer; + *ext_function_pointer_pointer = ext_func_pointer; + } + } + return true; +} + +jobject NewReadOnlyDirectByteBuffer(JNIEnv* env, const void* address, jlong capacity) { + jobject buffer = (*env)->NewDirectByteBuffer(env, (void *)address, capacity); + return (*env)->CallObjectMethod(env, buffer, mByteBuffer_asReadOnlyBuffer); +} + +jobject newJavaManagedByteBuffer(JNIEnv *env, const int size) { + jclass bufferutils_class = (*env)->FindClass(env, "org/lwjgl/BufferUtils"); + jmethodID createByteBuffer = (*env)->GetStaticMethodID(env, bufferutils_class, "createByteBuffer", "(I)Ljava/nio/ByteBuffer;"); + jobject buffer = (*env)->CallStaticObjectMethod(env, bufferutils_class, createByteBuffer, size); + return buffer; +} + +void ext_InitializeClass(JNIEnv *env, jclass clazz, ExtGetProcAddressPROC gpa, int num_functions, JavaMethodAndExtFunction *functions) { + JNINativeMethod *methods; + JavaMethodAndExtFunction *function; + void *ext_func_pointer; + void **ext_function_pointer_pointer; + JNINativeMethod *method; + int i, num_natives = 0; + if (clazz == NULL) { + throwException(env, "Null class"); + return; + } + methods = (JNINativeMethod *)malloc(num_functions*sizeof(JNINativeMethod)); + for (i = 0; i < num_functions; i++) { + function = functions + i; + if (function->ext_function_name != NULL) { + ext_func_pointer = gpa(function->ext_function_name); + if (ext_func_pointer == NULL) { + if ( function->optional ) + continue; + + free(methods); + throwException(env, "Missing driver symbols"); + return; + } + ext_function_pointer_pointer = function->ext_function_pointer; + *ext_function_pointer_pointer = ext_func_pointer; + } + method = methods + num_natives; + method->name = function->method_name; + method->signature = function->signature; + method->fnPtr = function->method_pointer; + + num_natives++; + } + (*env)->RegisterNatives(env, clazz, methods, num_natives); + free(methods); +} + +bool getBooleanProperty(JNIEnv *env, const char* propertyName) { + jstring property = NewStringNativeWithLength(env, propertyName, (jsize)strlen(propertyName)); + jclass org_lwjgl_LWJGLUtil_class; + jmethodID getBoolean; + if (property == NULL) + return false; + org_lwjgl_LWJGLUtil_class = (*env)->FindClass(env, "org/lwjgl/LWJGLUtil"); + if (org_lwjgl_LWJGLUtil_class == NULL) + return false; + getBoolean = (*env)->GetStaticMethodID(env, org_lwjgl_LWJGLUtil_class, "getPrivilegedBoolean", "(Ljava/lang/String;)Z"); + if (getBoolean == NULL) + return false; + return (*env)->CallStaticBooleanMethod(env, org_lwjgl_LWJGLUtil_class, getBoolean, property) ? true : false; +} + +jlong getPointerWrapperAddress(JNIEnv *env, jobject wrapper) { + return (*env)->CallLongMethod(env, wrapper, mPointerWrapper_getPointer); +} + +JNIEnv *getThreadEnv() { + JNIEnv *env; + (*jvm)->GetEnv(jvm, (void *)&env, JNI_VERSION_1_4); + return env; +} + +JNIEnv *attachCurrentThread() { + JNIEnv *env; + (*jvm)->AttachCurrentThread(jvm, (void **)&env, NULL); + return env; +} + +void detachCurrentThread() { + (*jvm)->DetachCurrentThread(jvm); +} + +JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *vm, void *reserved) { + JNIEnv *env; + jclass clazz; + + jvm = vm; + env = getThreadEnv(); + + clazz = (*env)->FindClass(env, "java/nio/ByteBuffer"); + mByteBuffer_asReadOnlyBuffer = (*env)->GetMethodID(env, clazz, "asReadOnlyBuffer", "()Ljava/nio/ByteBuffer;"); + + clazz = (*env)->FindClass(env, "org/lwjgl/PointerWrapper"); + mPointerWrapper_getPointer = (*env)->GetMethodID(env, clazz, "getPointer", "()J"); + + return JNI_VERSION_1_4; +} + +JNIEXPORT void JNICALL JNI_OnUnload(JavaVM *vm, void *reserved) { +} + +bool positionBuffer(JNIEnv *env, jobject buffer, jint position) { + jclass buffer_class; + jmethodID position_method; + + buffer_class = (*env)->GetObjectClass(env, buffer); + if (buffer_class == NULL) + return false; + position_method = (*env)->GetMethodID(env, buffer_class, "position", "(I)Ljava/nio/Buffer;"); + if (position_method == NULL) + return false; + (*env)->CallObjectMethod(env, buffer, position_method, position); + return true; +} diff --git a/etc/lwjgl-2.9.1/src/native/common/common_tools.h b/etc/lwjgl-2.9.1/src/native/common/common_tools.h new file mode 100644 index 0000000..a47ba94 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/common_tools.h @@ -0,0 +1,159 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * @author elias_naur + * @version $Revision$ + */ + +#ifndef _COMMON_TOOLS_H +#define _COMMON_TOOLS_H + +#include +#include +#include + +#define ATTRIB_LIST_SIZE (256) + +typedef struct { + int current_index; + int attribs[ATTRIB_LIST_SIZE]; +} attrib_list_t; + +#ifndef __cplusplus +#ifndef bool +typedef enum {false, true} bool; +#endif +#endif + +#ifdef _MSC_VER +#define inline __inline +#include +#else +#include +#endif + +static inline void * safeGetBufferAddress(JNIEnv *env, jobject buffer) { + if (buffer != NULL) { +#ifdef __cplusplus + return (void *)((char *)env->GetDirectBufferAddress(buffer)); +#else + return (void *)((char *)(*env)->GetDirectBufferAddress(env, buffer)); +#endif + } else + return NULL; +} + +static inline jobject safeNewBuffer(JNIEnv *env, void *p, jlong capacity) { + if (p != NULL) { +#ifdef __cplusplus + return env->NewDirectByteBuffer(p, capacity); +#else + return (*env)->NewDirectByteBuffer(env, p, capacity); +#endif + } else + return NULL; +} + +static inline jobject safeNewBufferCached(JNIEnv *env, void *p, jlong size, jobject old_buffer) { + if (old_buffer != NULL) { + void *old_buffer_address = (*env)->GetDirectBufferAddress(env, old_buffer); + jlong capacity = (*env)->GetDirectBufferCapacity(env, old_buffer); + if (old_buffer_address == p && capacity == size) + return old_buffer; + } + return safeNewBuffer(env, p, size); + +} + +static inline void *offsetToPointer(jlong offset) { + return (char *)NULL + offset; +} + +typedef void *(* ExtGetProcAddressPROC) (const char *func_name); +typedef struct { + char *method_name; + char *signature; + void *method_pointer; + + char *ext_function_name; + void **ext_function_pointer; + bool optional; +} JavaMethodAndExtFunction; + +typedef struct { + char *ext_function_name; + void **ext_function_pointer; +} ExtFunction; + +#define NUMFUNCTIONS(x) (sizeof(x)/sizeof(JavaMethodAndExtFunction)); + +#ifdef __cplusplus +extern "C" { +#endif + +extern JNIEnv *getThreadEnv(); +extern JNIEnv *attachCurrentThread(); +extern void detachCurrentThread(); +extern void initAttribList(attrib_list_t *list); +extern void putAttrib(attrib_list_t *list, int attrib); + +extern bool isDebugEnabled(void); +extern jstring getVersionString(JNIEnv *env); +extern void throwGeneralException(JNIEnv * env, const char *exception_name, const char * err); +extern void throwFormattedRuntimeException(JNIEnv * env, const char *format, ...); +extern void throwException(JNIEnv *env, const char *msg); +extern void throwFormattedException(JNIEnv * env, const char *format, ...); +extern void throwFMODException(JNIEnv * env, const char * err); +extern void setDebugEnabled(bool enable); +extern void printfDebugJava(JNIEnv *env, const char *format, ...); +extern void printfDebug(const char *format, ...); +extern bool getBooleanProperty(JNIEnv *env, const char* propertyName); +extern char * GetStringNativeChars(JNIEnv *env, jstring jstr); +extern jstring NewStringNativeWithLength(JNIEnv *env, const char *str, jsize length); +extern jstring NewStringNativeUnsigned(JNIEnv *env, const unsigned char *str); +extern jobject NewReadOnlyDirectByteBuffer(JNIEnv* env, const void* address, jlong capacity); +extern jobject newJavaManagedByteBuffer(JNIEnv *env, const int size); +extern bool positionBuffer(JNIEnv *env, jobject buffer, jint position); +extern jlong getPointerWrapperAddress(JNIEnv *env, jobject wrapper); + +extern void ext_InitializeClass(JNIEnv *env, jclass clazz, ExtGetProcAddressPROC gpa, int num_functions, JavaMethodAndExtFunction *functions); +extern bool ext_InitializeFunctions(ExtGetProcAddressPROC gpa, int num_functions, ExtFunction *functions); + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/etc/lwjgl-2.9.1/src/native/common/extal.c b/etc/lwjgl-2.9.1/src/native/common/extal.c new file mode 100644 index 0000000..0a63d97 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/extal.c @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include "extal.h" + +typedef ALvoid* (ALAPIENTRY *alGetProcAddressPROC)(const ALubyte* fname); +/* alGetProcAddress is commented out, since we don't use it anyway */ +//static alGetProcAddressPROC alGetProcAddress = NULL; + +/** + * Initializes OpenAL by loading the library + */ +/*void InitializeOpenAL(JNIEnv *env, jstring oalPath) { + //load our library + if (!extal_LoadLibrary(env, oalPath)) { + throwException(env, "Could not load openal library."); + return; + } + alGetProcAddress = (alGetProcAddressPROC)extal_NativeGetFunctionPointer("alGetProcAddress"); + if (alGetProcAddress == NULL) { + extal_UnloadLibrary(); + throwException(env, "Could not load alGetProcAddress function pointer."); + return; + } +}*/ + +/** + * Retrieves a pointer to the named function + * + * @param function Name of function + * @return pointer to named function, or NULL if not found + */ +void* extal_GetProcAddress(const char* function) { + void *p; +/* p = alGetProcAddress((const ALubyte*)function); + if (p == NULL) {*/ + p = extal_NativeGetFunctionPointer(function); + if (p == NULL) { + printfDebug("Could not locate symbol %s\n", function); + } +// } + return p; +} + +void extal_InitializeClass(JNIEnv *env, jclass clazz, int num_functions, JavaMethodAndExtFunction *functions) { + ext_InitializeClass(env, clazz, &extal_GetProcAddress, num_functions, functions); +} + diff --git a/etc/lwjgl-2.9.1/src/native/common/extal.h b/etc/lwjgl-2.9.1/src/native/common/extal.h new file mode 100644 index 0000000..dc69316 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/extal.h @@ -0,0 +1,172 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef _AL_TEST_H +#define _AL_TEST_H + +#ifdef _WIN32 +#include +#endif + +#include +#include "common_tools.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#if defined(_WIN32) + #ifdef _OPENAL32LIB + #define ALCAPI __declspec(dllexport) + #else + #define ALCAPI __declspec(dllimport) + #endif + + #define ALCAPIENTRY __cdecl +#else + #define ALCAPI + #define ALCAPIENTRY + +#endif + +#ifdef _WIN32 + #ifdef _OPENAL32LIB + #define ALAPI __declspec(dllexport) + #else + #define ALAPI __declspec(dllimport) + #endif + #define ALAPIENTRY __cdecl + #define AL_CALLBACK +#else + #define ALAPI + #define ALAPIENTRY + #define AL_CALLBACK +#endif + +#define INITGUID +#define OPENAL + +// ALC typedefs +typedef struct ALCdevice_struct ALCdevice; +typedef struct ALCcontext_struct ALCcontext; +/** 8-bit boolean */ +typedef char ALCboolean; + +/** character */ +typedef char ALCchar; + +/** signed 8-bit 2's complement integer */ +typedef char ALCbyte; + +/** unsigned 8-bit integer */ +typedef unsigned char ALCubyte; + +/** signed 16-bit 2's complement integer */ +typedef short ALCshort; + +/** unsigned 16-bit integer */ +typedef unsigned short ALCushort; + +/** signed 32-bit 2's complement integer */ +typedef int ALCint; + +/** unsigned 32-bit integer */ +typedef unsigned int ALCuint; + +/** non-negative 32-bit binary integer size */ +typedef int ALCsizei; + +/** enumerated 32-bit value */ +typedef int ALCenum; + +/** 32-bit IEEE754 floating-point */ +typedef float ALCfloat; + +/** 64-bit IEEE754 floating-point */ +typedef double ALCdouble; + +/** void type (for opaque pointers only) */ +typedef void ALCvoid; + +// AL typedefs +/** 8-bit boolean */ +typedef char ALboolean; + +/** character */ +typedef char ALchar; + +/** signed 8-bit 2's complement integer */ +typedef char ALbyte; + +/** unsigned 8-bit integer */ +typedef unsigned char ALubyte; + +/** signed 16-bit 2's complement integer */ +typedef short ALshort; + +/** unsigned 16-bit integer */ +typedef unsigned short ALushort; + +/** signed 32-bit 2's complement integer */ +typedef int ALint; + +/** unsigned 32-bit integer */ +typedef unsigned int ALuint; + +/** non-negative 32-bit binary integer size */ +typedef int ALsizei; + +/** enumerated 32-bit value */ +typedef int ALenum; + +/** 32-bit IEEE754 floating-point */ +typedef float ALfloat; + +/** 64-bit IEEE754 floating-point */ +typedef double ALdouble; + +/** void type (for opaque pointers only) */ +typedef void ALvoid; + +void* extal_GetProcAddress(const char* function); +void extal_InitializeClass(JNIEnv *env, jclass clazz, int num_functions, JavaMethodAndExtFunction *functions); + +/* Platform dependent functions */ +void *extal_NativeGetFunctionPointer(const char *function); +void extal_LoadLibrary(JNIEnv *env, jstring path); +void extal_UnloadLibrary(); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/etc/lwjgl-2.9.1/src/native/common/extcl.c b/etc/lwjgl-2.9.1/src/native/common/extcl.c new file mode 100644 index 0000000..c87e068 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/extcl.c @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include "extcl.h" + +typedef CL_API_ENTRY void * (CL_API_CALL *clGetExtensionFunctionAddressPROC) (const char * func_name); +static clGetExtensionFunctionAddressPROC clGetExtensionFunctionAddress; + +/** + * Retrieves a pointer to the named function + * + * @param function Name of function + * @return pointer to named function, or NULL if not found + */ +void* extcl_GetProcAddress(const char * function) { + void *p = NULL; + + if ( clGetExtensionFunctionAddress == NULL ) + clGetExtensionFunctionAddress = extcl_NativeGetFunctionPointer("clGetExtensionFunctionAddress"); + + p = clGetExtensionFunctionAddress(function); + if ( p == NULL ) + p = extcl_NativeGetFunctionPointer(function); + + return p; +} + +void extcl_InitializeClass(JNIEnv *env, jclass clazz, int num_functions, JavaMethodAndExtFunction *functions) { + ext_InitializeClass(env, clazz, &extcl_GetProcAddress, num_functions, functions); +} + +size_t extcl_CalculateImageSize(const size_t *region, size_t row_pitch, size_t slice_pitch) { + if ( slice_pitch == 0 ) + return region[1] * row_pitch; + else + return region[2] * slice_pitch; +} diff --git a/etc/lwjgl-2.9.1/src/native/common/extcl.h b/etc/lwjgl-2.9.1/src/native/common/extcl.h new file mode 100644 index 0000000..20f10f7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/extcl.h @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef __EXTCL_H__ +#define __EXTCL_H__ + +#include + +#ifdef __APPLE__ + #include +#else + #include +#endif + +#include "common_tools.h" + +#ifdef __cplusplus +extern "C" { +#endif + +#include "extgl_types.h" +#include "extcl_types.h" + +// -----------------[ OpenGL-dependent typedefs ]----------------- +typedef GLsync cl_GLsync; + +// -----------------[ Callback function typedefs ]----------------- + +#ifndef CL_CALLBACK + #define CL_CALLBACK +#endif + +typedef void (CL_CALLBACK * cl_create_context_callback)(const char *errinfo, const void *private_info, size_t cb, void *user_data); +typedef void (CL_CALLBACK * cl_mem_object_destructor_callback)(cl_mem memobj, void *user_data); +typedef void (CL_CALLBACK * cl_program_callback)(cl_program program, void *user_data); +typedef void (CL_CALLBACK * cl_event_callback)(cl_event event, cl_int event_command_exec_status, void *user_data); +typedef void (CL_CALLBACK * cl_native_kernel_func)(void *args); +typedef void (CL_CALLBACK * cl_printf_callback)(cl_context context, cl_uint printf_data_len, char *printf_data_ptr, void *user_data); + +// -----------------[ Cross-platform functions ]----------------- + +void* extcl_GetProcAddress(const char* function); +void extcl_InitializeClass(JNIEnv *env, jclass clazz, int num_functions, JavaMethodAndExtFunction *functions); +size_t extcl_CalculateImageSize(const size_t *region, size_t row_pitch, size_t slice_pitch); + +// -----------------[ Platform dependent functions ]----------------- + +void *extcl_NativeGetFunctionPointer(const char *function); +void extcl_LoadLibrary(JNIEnv *env, jstring path); +void extcl_UnloadLibrary(); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/etc/lwjgl-2.9.1/src/native/common/extcl_types.h b/etc/lwjgl-2.9.1/src/native/common/extcl_types.h new file mode 100644 index 0000000..940ba4a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/extcl_types.h @@ -0,0 +1,95 @@ +// -----------------[ Core typedefs ]----------------- + +typedef struct _cl_platform_id * cl_platform_id; +typedef struct _cl_device_id * cl_device_id; +typedef struct _cl_context * cl_context; +typedef struct _cl_command_queue * cl_command_queue; +typedef struct _cl_mem * cl_mem; +typedef struct _cl_program * cl_program; +typedef struct _cl_kernel * cl_kernel; +typedef struct _cl_event * cl_event; +typedef struct _cl_sampler * cl_sampler; + +typedef cl_uint cl_bool; /* WARNING! Unlike cl_ types in cl_platform.h, cl_bool is not guaranteed to be the same size as the bool in kernels. */ +typedef cl_ulong cl_bitfield; +typedef cl_bitfield cl_device_type; +typedef cl_uint cl_platform_info; +typedef cl_uint cl_device_info; +typedef cl_bitfield cl_device_fp_config; +typedef cl_uint cl_device_mem_cache_type; +typedef cl_uint cl_device_local_mem_type; +typedef cl_bitfield cl_device_exec_capabilities; +typedef cl_bitfield cl_command_queue_properties; +typedef intptr_t cl_device_partition_property; +typedef cl_bitfield cl_device_affinity_domain; + +typedef intptr_t cl_context_properties; +typedef cl_uint cl_context_info; +typedef cl_uint cl_command_queue_info; +typedef cl_uint cl_channel_order; +typedef cl_uint cl_channel_type; +typedef cl_bitfield cl_mem_flags; +typedef cl_uint cl_mem_object_type; +typedef cl_uint cl_mem_info; +typedef cl_bitfield cl_mem_migration_flags; +typedef cl_uint cl_image_info; +typedef cl_uint cl_buffer_create_type; +typedef cl_uint cl_addressing_mode; +typedef cl_uint cl_filter_mode; +typedef cl_uint cl_sampler_info; +typedef cl_bitfield cl_map_flags; +typedef cl_uint cl_program_info; +typedef cl_uint cl_program_build_info; +typedef cl_uint cl_program_binary_type; +typedef cl_int cl_build_status; +typedef cl_uint cl_kernel_info; +typedef cl_uint cl_kernel_arg_info; +typedef cl_uint cl_kernel_arg_address_qualifier; +typedef cl_uint cl_kernel_arg_access_qualifier; +typedef cl_uint cl_kernel_work_group_info; +typedef cl_uint cl_event_info; +typedef cl_uint cl_command_type; +typedef cl_uint cl_profiling_info; + +typedef struct _cl_image_format { + cl_channel_order image_channel_order; + cl_channel_type image_channel_data_type; +} cl_image_format; + +typedef struct _cl_image_desc { + cl_mem_object_type image_type; + size_t image_width; + size_t image_height; + size_t image_depth; + size_t image_array_size; + size_t image_row_pitch; + size_t image_slice_pitch; + cl_uint num_mip_levels; + cl_uint num_samples; + cl_mem buffer; +} cl_image_desc; + +typedef struct _cl_buffer_region { + size_t origin; + size_t size; +} cl_buffer_region; + +// cl_gl.h +typedef cl_uint cl_gl_platform_info; +typedef cl_uint cl_gl_context_info; +typedef cl_uint cl_gl_object_type; +typedef cl_uint cl_gl_texture_info; + +// -----------------[ Extension typedefs ]----------------- + +// EXT_device_fission +typedef cl_ulong cl_device_partition_property_ext; +// EXT_migrate_memobject +typedef cl_bitfield cl_mem_migration_flags_ext; + +// KHR_subgroups +typedef cl_uint cl_kernel_sub_group_info; + +// -----------------[ Convenience typedefs ]----------------- + +typedef void cl_void; diff --git a/etc/lwjgl-2.9.1/src/native/common/opencl.h b/etc/lwjgl-2.9.1/src/native/common/opencl.h new file mode 100644 index 0000000..68b41e1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opencl.h @@ -0,0 +1,56 @@ +/******************************************************************************* + * Copyright (c) 2008-2010 The Khronos Group Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and/or associated documentation files (the + * "Materials"), to deal in the Materials without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sublicense, and/or sell copies of the Materials, and to + * permit persons to whom the Materials are furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Materials. + * + * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. + ******************************************************************************/ + +/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */ + +#ifndef __OPENCL_H +#define __OPENCL_H + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef __APPLE__ + +#include +#include +#include +#include + +#else + +#include +#include +#include +#include + +#endif + +#include "common_tools.h" + +#ifdef __cplusplus +} +#endif + +#endif /* __OPENCL_H */ + diff --git a/etc/lwjgl-2.9.1/src/native/common/opengl/extgl.c b/etc/lwjgl-2.9.1/src/native/common/opengl/extgl.c new file mode 100644 index 0000000..c965ede --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengl/extgl.c @@ -0,0 +1,83 @@ +/* ---------------------------------------------------------------------------- +Copyright (c) 2001-2002, Lev Povalahev +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * The name of the author may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. +------------------------------------------------------------------------------*/ +/* + Lev Povalahev + + levp@gmx.net + + http://www.uni-karlsruhe.de/~uli2/ + +*/ + +#include +#include +#include "extgl.h" +#include "common_tools.h" + +void extgl_InitializeClass(JNIEnv *env, jclass clazz, int num_functions, JavaMethodAndExtFunction *functions) { + ext_InitializeClass(env, clazz, &extgl_GetProcAddress, num_functions, functions); +} + +bool extgl_InitializeFunctions(int num_functions, ExtFunction *functions) { + return ext_InitializeFunctions(&extgl_GetProcAddress, num_functions, functions); +} + +bool extgl_QueryExtension(const GLubyte*extensions, const char *name) +{ + const GLubyte *start; + GLubyte *where, *terminator; + + if (extensions == NULL) { + printfDebug("NULL extension string\n"); + return false; + } + + /* Extension names should not have spaces. */ + where = (GLubyte *) strchr(name, ' '); + if (where || *name == '\0') + return false; + + /* It takes a bit of care to be fool-proof about parsing the + OpenGL extensions string. Don't be fooled by sub-strings, + etc. */ + start = extensions; + for (;;) + { + where = (GLubyte *) strstr((const char *) start, name); + if (!where) + break; + terminator = where + strlen(name); + if (where == start || *(where - 1) == ' ') + if (*terminator == ' ' || *terminator == '\0') { + return true; + } + start = terminator; + } + return false; + +} + diff --git a/etc/lwjgl-2.9.1/src/native/common/opengl/extgl.h b/etc/lwjgl-2.9.1/src/native/common/opengl/extgl.h new file mode 100644 index 0000000..c9382df --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengl/extgl.h @@ -0,0 +1,124 @@ +/* Small parts were taken from Mesa's glext.h and gl.h, here's the license: */ + +/* + * Mesa 3-D graphics library + * Version: 6.5.1 + * + * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/* Some parts derived from files copyright (c) 2001-2002 Lev Povalahev under this license: */ + +/* ---------------------------------------------------------------------------- +Copyright (c) 2002, Lev Povalahev +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * The name of the author may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. +------------------------------------------------------------------------------*/ +/* + GL_draw_range_elements support added by Benjamin Karaban + + Lev Povalahev contact information: + + levp@gmx.net + + http://www.uni-karlsruhe.de/~uli2/ +*/ + +#ifndef __EXTGL_H__ +#define __EXTGL_H__ + +#include + +#include +#include + +#ifdef __APPLE__ + #include +#else + #include +#endif + +#include "common_tools.h" + +#if defined(_WIN32) || defined(_WIN64) + #include // fix APIENTRY macro redefinition +#endif + +#ifndef APIENTRY + #define APIENTRY +#endif + +#include "extcl_types.h" +#include "extgl_types.h" + +/* AMD_debug_output callback function pointer. */ +typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id, GLenum category, GLenum severity, GLsizei length, const GLchar* message, GLvoid* userParam); + +/* ARB_debug_output callback function pointer. */ +typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, GLvoid* userParam); + +/* KHR_debug callback function pointer. */ +typedef void (APIENTRY *GLDEBUGPROC)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, GLvoid* userParam); + +/* initializes everything, call this right after the rc is created. the function returns true if successful */ +extern bool extgl_Open(JNIEnv *env); +extern void extgl_Close(void); +extern void extgl_InitializeClass(JNIEnv *env, jclass clazz, int num_functions, JavaMethodAndExtFunction *functions); +extern bool extgl_InitializeFunctions(int num_functions, ExtFunction *functions); +extern bool extgl_QueryExtension(const GLubyte*extensions, const char *name); +extern void *extgl_GetProcAddress(const char *name); + + +#ifndef __APPLE__ + /* NV_present_video functions (GLX & WGL only) */ + extern jint extgl_EnumerateVideoDevicesNV(JNIEnv *env, jobject peer_info_handle, jobject devices, jint devices_position); + extern jboolean extgl_BindVideoDeviceNV(JNIEnv *env, jobject peer_info_handle, jint video_slot, jlong video_device, jobject attrib_list, jint attrib_list_position); + extern jboolean extgl_QueryContextNV(JNIEnv *env, jobject peer_info_handle, jobject context_handle, jint attrib, jobject value, jint value_position); + + /* NV_video_capture functions (GLX & WGL only) */ + extern jboolean extgl_BindVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jint video_slot, jlong device); + extern jint extgl_EnumerateVideoCaptureDevicesNV(JNIEnv *env, jobject peer_info_handle, jobject devices, jint devices_position); + extern jboolean extgl_LockVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device); + extern jboolean extgl_QueryVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device, jint attribute, jobject value, jint value_position); + extern jboolean extgl_ReleaseVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device); +#endif + +#endif /* __EXTGL_H__ */ diff --git a/etc/lwjgl-2.9.1/src/native/common/opengl/extgl_types.h b/etc/lwjgl-2.9.1/src/native/common/opengl/extgl_types.h new file mode 100644 index 0000000..c8d92dc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengl/extgl_types.h @@ -0,0 +1,55 @@ +#if defined(_WIN32) || defined(_WIN64) + #define int64_t __int64 + #define uint64_t unsigned __int64 +#endif + +#ifdef _MACOSX + typedef unsigned long GLenum; + typedef unsigned char GLboolean; + typedef unsigned long GLbitfield; + typedef signed char GLbyte; + typedef short GLshort; + typedef long GLint; + typedef long GLsizei; + typedef unsigned char GLubyte; + typedef unsigned short GLushort; + typedef unsigned long GLuint; + typedef float GLfloat; + typedef float GLclampf; + typedef double GLdouble; + typedef double GLclampd; + typedef void GLvoid; +#else + typedef unsigned int GLenum; + typedef unsigned char GLboolean; + typedef unsigned int GLbitfield; + typedef void GLvoid; + typedef signed char GLbyte; /* 1-byte signed */ + typedef short GLshort; /* 2-byte signed */ + typedef int GLint; /* 4-byte signed */ + typedef unsigned char GLubyte; /* 1-byte unsigned */ + typedef unsigned short GLushort; /* 2-byte unsigned */ + typedef unsigned int GLuint; /* 4-byte unsigned */ + typedef int GLsizei; /* 4-byte signed */ + typedef float GLfloat; /* single precision float */ + typedef float GLclampf; /* single precision float in [0,1] */ + typedef double GLdouble; /* double precision float */ + typedef double GLclampd; /* double precision float in [0,1] */ +#endif + +typedef char GLchar; /* native character */ + +typedef ptrdiff_t GLintptr; +typedef ptrdiff_t GLsizeiptr; +typedef ptrdiff_t GLintptrARB; +typedef ptrdiff_t GLsizeiptrARB; +typedef char GLcharARB; /* native character */ +typedef unsigned int GLhandleARB; /* shader object handle */ +typedef unsigned short GLhalfARB; +typedef unsigned short GLhalfNV; +typedef unsigned short GLhalf; +typedef int64_t GLint64EXT; +typedef uint64_t GLuint64EXT; +typedef int64_t GLint64; +typedef uint64_t GLuint64; +typedef struct __GLsync * GLsync; \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_CallbackUtil.c b/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_CallbackUtil.c new file mode 100644 index 0000000..9b49e08 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_CallbackUtil.c @@ -0,0 +1,143 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * JNI implementation of the ARB/AMD_debug_output & KHR_debug function callbacks. + * + * @author Spasi + */ + +#include +#include "common_tools.h" +#include "extgl.h" +#include "org_lwjgl_opengl_CallbackUtil.h" + +static jmethodID debugOutputCallbackARBJ; +static jmethodID debugOutputCallbackAMDJ; +static jmethodID debugCallbackKHRJ; + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_CallbackUtil_ncreateGlobalRef(JNIEnv *env, jclass clazz, jobject obj) { + return (jlong)(intptr_t)(*env)->NewGlobalRef(env, obj); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CallbackUtil_deleteGlobalRef(JNIEnv *env, jclass clazz, jlong globalRef) { + (*env)->DeleteGlobalRef(env, (jobject)(intptr_t)globalRef); +} + +// ----------------- [ ARB_debug_output ] ----------------- + +static void APIENTRY debugOutputCallbackARB(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, GLvoid* userParam) { + JNIEnv *env = attachCurrentThread(); + + if ( env != NULL && !(*env)->ExceptionOccurred(env) && debugOutputCallbackARBJ != NULL ) { + (*env)->CallVoidMethod(env, (jobject)userParam, debugOutputCallbackARBJ, + (jint)source, + (jint)type, + (jint)id, + (jint)severity, + NewStringNativeWithLength(env, message, length) + ); + } + + detachCurrentThread(); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_CallbackUtil_getDebugOutputCallbackARB(JNIEnv *env, jclass clazz) { + // Cache the callback methodID + jclass callbackClass; + if ( debugOutputCallbackARBJ == NULL ) { + callbackClass = (*env)->FindClass(env, "org/lwjgl/opengl/ARBDebugOutputCallback$Handler"); + if ( callbackClass != NULL ) + debugOutputCallbackARBJ = (*env)->GetMethodID(env, callbackClass, "handleMessage", "(IIIILjava/lang/String;)V"); + } + + return (jlong)(intptr_t)&debugOutputCallbackARB; +} + +// ----------------- [ AMD_debug_output ] ----------------- + +static void APIENTRY debugOutputCallbackAMD(GLuint id, GLenum category, GLenum severity, GLsizei length, const GLchar* message, GLvoid* userParam) { + JNIEnv *env = attachCurrentThread(); + + if ( env != NULL && !(*env)->ExceptionOccurred(env) && debugOutputCallbackAMDJ != NULL ) { + (*env)->CallVoidMethod(env, (jobject)userParam, debugOutputCallbackAMDJ, + (jint)id, + (jint)category, + (jint)severity, + NewStringNativeWithLength(env, message, length) + ); + } + + detachCurrentThread(); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_CallbackUtil_getDebugOutputCallbackAMD(JNIEnv *env, jclass clazz) { + // Cache the callback methodID + jclass callbackClass; + if ( debugOutputCallbackAMDJ == NULL ) { + callbackClass = (*env)->FindClass(env, "org/lwjgl/opengl/AMDDebugOutputCallback$Handler"); + if ( callbackClass != NULL ) + debugOutputCallbackAMDJ = (*env)->GetMethodID(env, callbackClass, "handleMessage", "(IIILjava/lang/String;)V"); + } + + return (jlong)(intptr_t)&debugOutputCallbackAMD; +} + +// ----------------- [ KHR_debug ] ----------------- + +static void APIENTRY debugCallbackKHR(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, GLvoid* userParam) { + JNIEnv *env = attachCurrentThread(); + + if ( env != NULL && !(*env)->ExceptionOccurred(env) && debugCallbackKHRJ != NULL ) { + (*env)->CallVoidMethod(env, (jobject)userParam, debugCallbackKHRJ, + (jint)source, + (jint)type, + (jint)id, + (jint)severity, + NewStringNativeWithLength(env, message, length) + ); + } + + detachCurrentThread(); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_CallbackUtil_getDebugCallbackKHR(JNIEnv *env, jclass clazz) { + // Cache the callback methodID + jclass callbackClass; + if ( debugCallbackKHRJ == NULL ) { + callbackClass = (*env)->FindClass(env, "org/lwjgl/opengl/KHRDebugCallback$Handler"); + if ( callbackClass != NULL ) + debugCallbackKHRJ = (*env)->GetMethodID(env, callbackClass, "handleMessage", "(IIIILjava/lang/String;)V"); + } + + return (jlong)(intptr_t)&debugCallbackKHR; +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_CallbackUtil.h b/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_CallbackUtil.h new file mode 100644 index 0000000..247fc27 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_CallbackUtil.h @@ -0,0 +1,53 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_CallbackUtil */ + +#ifndef _Included_org_lwjgl_opengl_CallbackUtil +#define _Included_org_lwjgl_opengl_CallbackUtil +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_lwjgl_opengl_CallbackUtil + * Method: ncreateGlobalRef + * Signature: (Ljava/lang/Object;)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_CallbackUtil_ncreateGlobalRef + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_CallbackUtil + * Method: deleteGlobalRef + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CallbackUtil_deleteGlobalRef + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengl_CallbackUtil + * Method: getDebugOutputCallbackARB + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_CallbackUtil_getDebugOutputCallbackARB + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengl_CallbackUtil + * Method: getDebugOutputCallbackAMD + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_CallbackUtil_getDebugOutputCallbackAMD + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengl_CallbackUtil + * Method: getDebugCallbackKHR + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_CallbackUtil_getDebugCallbackKHR + (JNIEnv *, jclass); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_GLContext.c b/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_GLContext.c new file mode 100644 index 0000000..3e336c5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_GLContext.c @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include "common_tools.h" +#include "org_lwjgl_opengl_GLContext.h" +#include "extgl.h" + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_GLContext_ngetFunctionAddress(JNIEnv *env, jclass clazz, jlong function_name) { + return (jlong)(intptr_t)extgl_GetProcAddress((char *)(intptr_t)function_name); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLContext_nLoadOpenGLLibrary(JNIEnv * env, jclass clazz) { + extgl_Open(env); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLContext_nUnloadOpenGLLibrary(JNIEnv * env, jclass clazz) { + extgl_Close(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLContext_resetNativeStubs(JNIEnv *env, jclass clazz, jclass gl_class) { + (*env)->UnregisterNatives(env, gl_class); +} diff --git a/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_GLContext.h b/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_GLContext.h new file mode 100644 index 0000000..54d4879 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_GLContext.h @@ -0,0 +1,45 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_GLContext */ + +#ifndef _Included_org_lwjgl_opengl_GLContext +#define _Included_org_lwjgl_opengl_GLContext +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_lwjgl_opengl_GLContext + * Method: ngetFunctionAddress + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_GLContext_ngetFunctionAddress + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengl_GLContext + * Method: nLoadOpenGLLibrary + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLContext_nLoadOpenGLLibrary + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengl_GLContext + * Method: nUnloadOpenGLLibrary + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLContext_nUnloadOpenGLLibrary + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengl_GLContext + * Method: resetNativeStubs + * Signature: (Ljava/lang/Class;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GLContext_resetNativeStubs + (JNIEnv *, jclass, jclass); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_GLContext_CapabilitiesCacheEntry.h b/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_GLContext_CapabilitiesCacheEntry.h new file mode 100644 index 0000000..eae0b71 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_GLContext_CapabilitiesCacheEntry.h @@ -0,0 +1,13 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_GLContext_CapabilitiesCacheEntry */ + +#ifndef _Included_org_lwjgl_opengl_GLContext_CapabilitiesCacheEntry +#define _Included_org_lwjgl_opengl_GLContext_CapabilitiesCacheEntry +#ifdef __cplusplus +extern "C" { +#endif +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_NVPresentVideoUtil.c b/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_NVPresentVideoUtil.c new file mode 100644 index 0000000..3e84287 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_NVPresentVideoUtil.c @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * JNI implementation of the NVPresentVideoUtil class (GLX & WGL only). + * + * @author Spasi + */ + +#include +#include "common_tools.h" +#include "extgl.h" +#include "org_lwjgl_opengl_NVPresentVideoUtil.h" + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_NVPresentVideoUtil_nglEnumerateVideoDevicesNV( + JNIEnv *env, jclass clazz, jobject peer_info, jobject devices, jint devices_position +) { + #ifdef __APPLE__ + return 0; + #else + return extgl_EnumerateVideoDevicesNV(env, peer_info, devices, devices_position); + #endif +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVPresentVideoUtil_nglBindVideoDeviceNV( + JNIEnv *env, jclass clazz, jobject peer_info, jint video_slot, jlong video_device, jobject attrib_list, jint attrib_list_position +) { + #ifdef __APPLE__ + return false; + #else + return extgl_BindVideoDeviceNV(env, peer_info, video_slot, video_device, attrib_list, attrib_list_position); + #endif +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVPresentVideoUtil_nglQueryContextNV(JNIEnv *env, jclass clazz, jobject peer_info, jobject context_handle, jint attrib, jobject value, jint value_position) { + #ifdef __APPLE__ + return false; + #else + return extgl_QueryContextNV(env, peer_info, context_handle, attrib, value, value_position); + #endif +} diff --git a/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_NVPresentVideoUtil.h b/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_NVPresentVideoUtil.h new file mode 100644 index 0000000..79bf87e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_NVPresentVideoUtil.h @@ -0,0 +1,37 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_NVPresentVideoUtil */ + +#ifndef _Included_org_lwjgl_opengl_NVPresentVideoUtil +#define _Included_org_lwjgl_opengl_NVPresentVideoUtil +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_lwjgl_opengl_NVPresentVideoUtil + * Method: nglEnumerateVideoDevicesNV + * Signature: (Ljava/nio/ByteBuffer;Ljava/nio/LongBuffer;I)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_NVPresentVideoUtil_nglEnumerateVideoDevicesNV + (JNIEnv *, jclass, jobject, jobject, jint); + +/* + * Class: org_lwjgl_opengl_NVPresentVideoUtil + * Method: nglBindVideoDeviceNV + * Signature: (Ljava/nio/ByteBuffer;IJLjava/nio/IntBuffer;I)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVPresentVideoUtil_nglBindVideoDeviceNV + (JNIEnv *, jclass, jobject, jint, jlong, jobject, jint); + +/* + * Class: org_lwjgl_opengl_NVPresentVideoUtil + * Method: nglQueryContextNV + * Signature: (Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;ILjava/nio/IntBuffer;I)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVPresentVideoUtil_nglQueryContextNV + (JNIEnv *, jclass, jobject, jobject, jint, jobject, jint); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_NVVideoCaptureUtil.c b/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_NVVideoCaptureUtil.c new file mode 100644 index 0000000..ce663de --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_NVVideoCaptureUtil.c @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * JNI implementation of the NVVideoCaptureUtil class (GLX & WGL only). + * + * @author Spasi + */ + +#include +#include "common_tools.h" +#include "extgl.h" +#include "org_lwjgl_opengl_NVVideoCaptureUtil.h" + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVVideoCaptureUtil_nglBindVideoCaptureDeviceNV(JNIEnv *env, jclass clazz, jobject peer_info, jint video_slot, jlong device) { + #ifdef __APPLE__ + return false; + #else + return extgl_BindVideoCaptureDeviceNV(env, peer_info, video_slot, device); + #endif +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_NVVideoCaptureUtil_nglEnumerateVideoCaptureDevicesNV(JNIEnv *env, jclass clazz, jobject peer_info, jobject devices, jint devices_position) { + #ifdef __APPLE__ + return 0; + #else + return extgl_EnumerateVideoCaptureDevicesNV(env, peer_info, devices, devices_position); + #endif +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVVideoCaptureUtil_nglLockVideoCaptureDeviceNV(JNIEnv *env, jclass clazz, jobject peer_info, jlong device) { + #ifdef __APPLE__ + return false; + #else + return extgl_LockVideoCaptureDeviceNV(env, peer_info, device); + #endif +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVVideoCaptureUtil_nglQueryVideoCaptureDeviceNV(JNIEnv *env, jclass clazz, jobject peer_info, jlong device, jint attribute, jobject value, jint value_position) { + #ifdef __APPLE__ + return false; + #else + return extgl_QueryVideoCaptureDeviceNV(env, peer_info, device, attribute, value, value_position); + #endif +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVVideoCaptureUtil_nglReleaseVideoCaptureDeviceNV(JNIEnv *env, jclass clazz, jobject peer_info, jlong device) { + #ifdef __APPLE__ + return false; + #else + return extgl_ReleaseVideoCaptureDeviceNV(env, peer_info, device); + #endif +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_NVVideoCaptureUtil.h b/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_NVVideoCaptureUtil.h new file mode 100644 index 0000000..1aea21b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_NVVideoCaptureUtil.h @@ -0,0 +1,53 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_NVVideoCaptureUtil */ + +#ifndef _Included_org_lwjgl_opengl_NVVideoCaptureUtil +#define _Included_org_lwjgl_opengl_NVVideoCaptureUtil +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_lwjgl_opengl_NVVideoCaptureUtil + * Method: nglBindVideoCaptureDeviceNV + * Signature: (Ljava/nio/ByteBuffer;IJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVVideoCaptureUtil_nglBindVideoCaptureDeviceNV + (JNIEnv *, jclass, jobject, jint, jlong); + +/* + * Class: org_lwjgl_opengl_NVVideoCaptureUtil + * Method: nglEnumerateVideoCaptureDevicesNV + * Signature: (Ljava/nio/ByteBuffer;Ljava/nio/LongBuffer;I)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_NVVideoCaptureUtil_nglEnumerateVideoCaptureDevicesNV + (JNIEnv *, jclass, jobject, jobject, jint); + +/* + * Class: org_lwjgl_opengl_NVVideoCaptureUtil + * Method: nglLockVideoCaptureDeviceNV + * Signature: (Ljava/nio/ByteBuffer;J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVVideoCaptureUtil_nglLockVideoCaptureDeviceNV + (JNIEnv *, jclass, jobject, jlong); + +/* + * Class: org_lwjgl_opengl_NVVideoCaptureUtil + * Method: nglQueryVideoCaptureDeviceNV + * Signature: (Ljava/nio/ByteBuffer;JILjava/nio/IntBuffer;I)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVVideoCaptureUtil_nglQueryVideoCaptureDeviceNV + (JNIEnv *, jclass, jobject, jlong, jint, jobject, jint); + +/* + * Class: org_lwjgl_opengl_NVVideoCaptureUtil + * Method: nglReleaseVideoCaptureDeviceNV + * Signature: (Ljava/nio/ByteBuffer;J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVVideoCaptureUtil_nglReleaseVideoCaptureDeviceNV + (JNIEnv *, jclass, jobject, jlong); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_Pbuffer.h b/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_Pbuffer.h new file mode 100644 index 0000000..d1c25be --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengl/org_lwjgl_opengl_Pbuffer.h @@ -0,0 +1,47 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_Pbuffer */ + +#ifndef _Included_org_lwjgl_opengl_Pbuffer +#define _Included_org_lwjgl_opengl_Pbuffer +#ifdef __cplusplus +extern "C" { +#endif +#undef org_lwjgl_opengl_Pbuffer_PBUFFER_SUPPORTED +#define org_lwjgl_opengl_Pbuffer_PBUFFER_SUPPORTED 1L +#undef org_lwjgl_opengl_Pbuffer_RENDER_TEXTURE_SUPPORTED +#define org_lwjgl_opengl_Pbuffer_RENDER_TEXTURE_SUPPORTED 2L +#undef org_lwjgl_opengl_Pbuffer_RENDER_TEXTURE_RECTANGLE_SUPPORTED +#define org_lwjgl_opengl_Pbuffer_RENDER_TEXTURE_RECTANGLE_SUPPORTED 4L +#undef org_lwjgl_opengl_Pbuffer_RENDER_DEPTH_TEXTURE_SUPPORTED +#define org_lwjgl_opengl_Pbuffer_RENDER_DEPTH_TEXTURE_SUPPORTED 8L +#undef org_lwjgl_opengl_Pbuffer_MIPMAP_LEVEL +#define org_lwjgl_opengl_Pbuffer_MIPMAP_LEVEL 8315L +#undef org_lwjgl_opengl_Pbuffer_CUBE_MAP_FACE +#define org_lwjgl_opengl_Pbuffer_CUBE_MAP_FACE 8316L +#undef org_lwjgl_opengl_Pbuffer_TEXTURE_CUBE_MAP_POSITIVE_X +#define org_lwjgl_opengl_Pbuffer_TEXTURE_CUBE_MAP_POSITIVE_X 8317L +#undef org_lwjgl_opengl_Pbuffer_TEXTURE_CUBE_MAP_NEGATIVE_X +#define org_lwjgl_opengl_Pbuffer_TEXTURE_CUBE_MAP_NEGATIVE_X 8318L +#undef org_lwjgl_opengl_Pbuffer_TEXTURE_CUBE_MAP_POSITIVE_Y +#define org_lwjgl_opengl_Pbuffer_TEXTURE_CUBE_MAP_POSITIVE_Y 8319L +#undef org_lwjgl_opengl_Pbuffer_TEXTURE_CUBE_MAP_NEGATIVE_Y +#define org_lwjgl_opengl_Pbuffer_TEXTURE_CUBE_MAP_NEGATIVE_Y 8320L +#undef org_lwjgl_opengl_Pbuffer_TEXTURE_CUBE_MAP_POSITIVE_Z +#define org_lwjgl_opengl_Pbuffer_TEXTURE_CUBE_MAP_POSITIVE_Z 8321L +#undef org_lwjgl_opengl_Pbuffer_TEXTURE_CUBE_MAP_NEGATIVE_Z +#define org_lwjgl_opengl_Pbuffer_TEXTURE_CUBE_MAP_NEGATIVE_Z 8322L +#undef org_lwjgl_opengl_Pbuffer_FRONT_LEFT_BUFFER +#define org_lwjgl_opengl_Pbuffer_FRONT_LEFT_BUFFER 8323L +#undef org_lwjgl_opengl_Pbuffer_FRONT_RIGHT_BUFFER +#define org_lwjgl_opengl_Pbuffer_FRONT_RIGHT_BUFFER 8324L +#undef org_lwjgl_opengl_Pbuffer_BACK_LEFT_BUFFER +#define org_lwjgl_opengl_Pbuffer_BACK_LEFT_BUFFER 8325L +#undef org_lwjgl_opengl_Pbuffer_BACK_RIGHT_BUFFER +#define org_lwjgl_opengl_Pbuffer_BACK_RIGHT_BUFFER 8326L +#undef org_lwjgl_opengl_Pbuffer_DEPTH_BUFFER +#define org_lwjgl_opengl_Pbuffer_DEPTH_BUFFER 8359L +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/common/opengles/extgl.c b/etc/lwjgl-2.9.1/src/native/common/opengles/extgl.c new file mode 100644 index 0000000..3da9bd2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengles/extgl.c @@ -0,0 +1,83 @@ +/* ---------------------------------------------------------------------------- +Copyright (c) 2001-2002, Lev Povalahev +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * The name of the author may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. +------------------------------------------------------------------------------*/ +/* + Lev Povalahev + + levp@gmx.net + + http://www.uni-karlsruhe.de/~uli2/ + +*/ + +#include +#include +#include "extgl.h" +#include "common_tools.h" + +void extgl_InitializeClass(JNIEnv *env, jclass clazz, int num_functions, JavaMethodAndExtFunction *functions) { + ext_InitializeClass(env, clazz, &extgl_GetProcAddress, num_functions, functions); +} + +bool extgl_InitializeFunctions(int num_functions, ExtFunction *functions) { + return ext_InitializeFunctions(&extgl_GetProcAddress, num_functions, functions); +} + +bool extgl_QueryExtension(const char *extensions, const char *name) +{ + const char *start; + char *where, *terminator; + + if (extensions == NULL) { + printfDebug("NULL extension string\n"); + return false; + } + + /* Extension names should not have spaces. */ + where = (char *) strchr(name, ' '); + if (where || *name == '\0') + return false; + + /* It takes a bit of care to be fool-proof about parsing the + OpenGL extensions string. Don't be fooled by sub-strings, + etc. */ + start = extensions; + for (;;) + { + where = (char *) strstr((const char *) start, name); + if (!where) + break; + terminator = where + strlen(name); + if (where == start || *(where - 1) == ' ') + if (*terminator == ' ' || *terminator == '\0') { + return true; + } + start = terminator; + } + return false; + +} + diff --git a/etc/lwjgl-2.9.1/src/native/common/opengles/extgl.h b/etc/lwjgl-2.9.1/src/native/common/opengles/extgl.h new file mode 100644 index 0000000..124d748 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengles/extgl.h @@ -0,0 +1,92 @@ +/* Small parts were taken from Mesa's glext.h and gl.h, here's the license: */ + +/* + * Mesa 3-D graphics library + * Version: 6.5.1 + * + * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included + * in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + +/* Some parts derived from files copyright (c) 2001-2002 Lev Povalahev under this license: */ + +/* ---------------------------------------------------------------------------- +Copyright (c) 2002, Lev Povalahev +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * The name of the author may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. +------------------------------------------------------------------------------*/ +/* + GL_draw_range_elements support added by Benjamin Karaban + + Lev Povalahev contact information: + + levp@gmx.net + + http://www.uni-karlsruhe.de/~uli2/ +*/ + +#ifndef __EXTGL_H__ +#define __EXTGL_H__ + +#include + +#include +#include + +#include "common_tools.h" + +#include +//#include +#include + +#include "extgl_types.h" + +/* KHR_debug callback function pointer. */ +typedef void (GL_APIENTRY *GLDEBUGPROC)(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, GLvoid* userParam); + +/* initializes everything, call this right after the rc is created. the function returns true if successful */ +extern bool extgl_Open(JNIEnv *env); +extern void extgl_Close(void); +extern void extgl_InitializeClass(JNIEnv *env, jclass clazz, int num_functions, JavaMethodAndExtFunction *functions); +extern bool extgl_InitializeFunctions(int num_functions, ExtFunction *functions); +extern bool extgl_QueryExtension(const char *extensions, const char *name); +extern void *extgl_GetProcAddress(const char *name); + +#endif /* __EXTGL_H__ */ diff --git a/etc/lwjgl-2.9.1/src/native/common/opengles/extgl_egl.c b/etc/lwjgl-2.9.1/src/native/common/opengles/extgl_egl.c new file mode 100644 index 0000000..f2c782b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengles/extgl_egl.c @@ -0,0 +1,106 @@ +/* +* Copyright (c) 2002-2011 LWJGL Project +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are +* met: +* +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* +* * Neither the name of 'LWJGL' nor the names of +* its contributors may be used to endorse or promote products derived +* from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ +#include "extgl_egl.h" + +static void extgl_InitEGLKHRLockSurface(EGLExtensions *extensions) { + ExtFunction functions[] = { + { "eglLockSurfaceKHR", (void *)&extensions->eglLockSurfaceKHR }, + { "eglUnlockSurfaceKHR", (void *)&extensions->eglUnlockSurfaceKHR } + }; + if ( extensions->EGLKHRLockSurface ) + extensions->EGLKHRLockSurface = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); +} + +static void extgl_InitEGLKHRImageBase(EGLExtensions *extensions) { + ExtFunction functions[] = { + { "eglCreateImageKHR", (void *)&extensions->eglCreateImageKHR }, + { "eglDestroyImageKHR", (void *)&extensions->eglDestroyImageKHR } + }; + if ( extensions->EGLKHRImageBase ) + extensions->EGLKHRImageBase = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); +} + +static void extgl_InitEGLKHRFenceSync(EGLExtensions *extensions) { + ExtFunction functions[] = { + { "eglCreateSyncKHR", (void *)&extensions->eglCreateSyncKHR }, + { "eglDestroySyncKHR", (void *)&extensions->eglDestroySyncKHR }, + { "eglClientWaitSyncKHR", (void *)&extensions->eglClientWaitSyncKHR }, + { "eglSignalSyncKHR", (void *)&extensions->eglSignalSyncKHR }, + { "eglGetSyncAttribKHR", (void *)&extensions->eglGetSyncAttribKHR } + }; + if (extensions->EGLKHRFenceSync) + extensions->EGLKHRFenceSync = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); +} + +static void extgl_InitEGLNVSync(EGLExtensions *extensions) { + ExtFunction functions[] = { + { "eglCreateFenceSyncNV", (void *)&extensions->eglCreateFenceSyncNV }, + { "eglDestroySyncNV", (void *)&extensions->eglDestroySyncNV }, + { "eglFenceNV", (void *)&extensions->eglFenceNV }, + { "eglClientWaitSyncNV", (void *)&extensions->eglClientWaitSyncNV }, + { "eglSignalSyncNV", (void *)&extensions->eglSignalSyncNV }, + { "eglGetSyncAttribNV", (void *)&extensions->eglGetSyncAttribNV } + + }; + if (extensions->EGLNVSync) + extensions->EGLNVSync = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); +} + +static void extgl_InitSupportedEGLExtensions(EGLDisplay dpy, EGLExtensions *extensions) { + const char *extension_string = eglQueryString(dpy, EGL_EXTENSIONS); + + extensions->EGLKHRConfigAttribs = extgl_QueryExtension(extension_string, "EGL_KHR_config_attribs"); + extensions->EGLKHRLockSurface = extgl_QueryExtension(extension_string, "EGL_KHR_lock_surface"); + extensions->EGLKHRImage = extgl_QueryExtension(extension_string, "EGL_KHR_image"); + extensions->EGLKHRVGParentImage = extgl_QueryExtension(extension_string, "EGL_KHR_vg_parent_image"); + extensions->EGLKHRGLTexture2DImage = extgl_QueryExtension(extension_string, "EGL_KHR_gl_texture_2D_image"); + extensions->EGLKHRGLTextureCubemapImage = extgl_QueryExtension(extension_string, "EGL_KHR_gl_texture_cubemap_image"); + extensions->EGLKHRGLTexture3DImage = extgl_QueryExtension(extension_string, "EGL_KHR_gl_texture_3D_image"); + extensions->EGLKHRGLRenderbufferImage = extgl_QueryExtension(extension_string, "EGL_KHR_gl_renderbuffer_image"); + extensions->EGLKHRReusableSync = extgl_QueryExtension(extension_string, "EGL_KHR_reusable_sync"); + extensions->EGLKHRImageBase = extgl_QueryExtension(extension_string, "EGL_KHR_image_base"); + extensions->EGLKHRImagePixmap = extgl_QueryExtension(extension_string, "EGL_KHR_image_pixmap"); + extensions->EGLIMGContextPriority = extgl_QueryExtension(extension_string, "EGL_IMG_context_priority"); + extensions->EGLNVCoverageSample = extgl_QueryExtension(extension_string, "EGL_NV_coverage_sample"); + extensions->EGLNVDepthNonlinear = extgl_QueryExtension(extension_string, "EGL_NV_depth_nonlinear"); + extensions->EGLNVSync = extgl_QueryExtension(extension_string, "EGL_NV_sync"); + extensions->EGLKHRFenceSync = extgl_QueryExtension(extension_string, "EGL_KHR_fence_sync"); +} + +void extgl_InitEGL(EGLDisplay dpy, EGLExtensions *extensions) { + extgl_InitSupportedEGLExtensions(dpy, extensions); + + extgl_InitEGLKHRLockSurface(extensions); + extgl_InitEGLKHRImageBase(extensions); + extgl_InitEGLKHRFenceSync(extensions); + extgl_InitEGLNVSync(extensions); +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/native/common/opengles/extgl_egl.h b/etc/lwjgl-2.9.1/src/native/common/opengles/extgl_egl.h new file mode 100644 index 0000000..e8711d4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengles/extgl_egl.h @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef _EXTGL_EGL_H +#define _EXTGL_EGL_H + +#include "extgl.h" +#include "common_tools.h" + +#include + +typedef struct { + bool EGLKHRConfigAttribs; + bool EGLKHRLockSurface; + bool EGLKHRImage; + bool EGLKHRVGParentImage; + bool EGLKHRGLTexture2DImage; + bool EGLKHRGLTextureCubemapImage; + bool EGLKHRGLTexture3DImage; + bool EGLKHRGLRenderbufferImage; + bool EGLKHRFenceSync; + bool EGLKHRReusableSync; + bool EGLKHRImageBase; + bool EGLKHRImagePixmap; + bool EGLIMGContextPriority; + bool EGLNVCoverageSample; + bool EGLNVDepthNonlinear; + bool EGLNVSync; + + PFNEGLLOCKSURFACEKHRPROC eglLockSurfaceKHR; + PFNEGLUNLOCKSURFACEKHRPROC eglUnlockSurfaceKHR; + + PFNEGLCREATEIMAGEKHRPROC eglCreateImageKHR; + PFNEGLDESTROYIMAGEKHRPROC eglDestroyImageKHR; + + PFNEGLCREATESYNCKHRPROC eglCreateSyncKHR; + PFNEGLDESTROYSYNCKHRPROC eglDestroySyncKHR; + PFNEGLCLIENTWAITSYNCKHRPROC eglClientWaitSyncKHR; + PFNEGLSIGNALSYNCKHRPROC eglSignalSyncKHR; + PFNEGLGETSYNCATTRIBKHRPROC eglGetSyncAttribKHR; + + PFNEGLCREATEFENCESYNCNVPROC eglCreateFenceSyncNV; + PFNEGLDESTROYSYNCNVPROC eglDestroySyncNV; + PFNEGLFENCENVPROC eglFenceNV; + PFNEGLCLIENTWAITSYNCNVPROC eglClientWaitSyncNV; + PFNEGLSIGNALSYNCNVPROC eglSignalSyncNV; + PFNEGLGETSYNCATTRIBNVPROC eglGetSyncAttribNV; +} EGLExtensions; + +extern void extgl_InitEGL(EGLDisplay dpy, EGLExtensions *extensions); + +#endif diff --git a/etc/lwjgl-2.9.1/src/native/common/opengles/extgl_types.h b/etc/lwjgl-2.9.1/src/native/common/opengles/extgl_types.h new file mode 100644 index 0000000..d459a1c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengles/extgl_types.h @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#ifndef _EXTGL_TYPES_H +#define _EXTGL_TYPES_H + +#include + +/*------------------------------------------------------------------------- + * Data type definitions + *-----------------------------------------------------------------------*/ + +typedef void GLvoid; +typedef char GLchar; +typedef unsigned int GLenum; +typedef unsigned char GLboolean; +typedef unsigned int GLbitfield; +typedef khronos_int8_t GLbyte; +typedef short GLshort; +typedef int GLint; +typedef int GLsizei; +typedef khronos_uint8_t GLubyte; +typedef unsigned short GLushort; +typedef unsigned int GLuint; +typedef khronos_float_t GLfloat; +typedef khronos_float_t GLclampf; +typedef khronos_int32_t GLfixed; + +// OpenGL ES 3.0 +typedef unsigned short GLhalf; +typedef khronos_int64_t GLint64; +typedef khronos_uint64_t GLuint64; +typedef struct __GLsync *GLsync; + +/* GL types for handling large vertex buffer objects */ +typedef khronos_intptr_t GLintptr; +typedef khronos_ssize_t GLsizeiptr; + +typedef khronos_int64_t EGLint64NV; +typedef khronos_uint64_t EGLuint64NV; + +// EGL_image_OES +typedef void* GLeglImageOES; + +#endif \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_CallbackUtil.c b/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_CallbackUtil.c new file mode 100644 index 0000000..514483e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_CallbackUtil.c @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * JNI implementation of the ARB/AMD_debug_output & KHR_debug function callbacks. + * + * @author Spasi + */ + +#include +#include "common_tools.h" +#include "extgl.h" +#include "org_lwjgl_opengles_CallbackUtil.h" + +static jmethodID debugCallbackKHRJ; + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_CallbackUtil_ncreateGlobalRef(JNIEnv *env, jclass clazz, jobject obj) { + return (jlong)(intptr_t)(*env)->NewGlobalRef(env, obj); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_CallbackUtil_deleteGlobalRef(JNIEnv *env, jclass clazz, jlong globalRef) { + (*env)->DeleteGlobalRef(env, (jobject)(intptr_t)globalRef); +} + +// ----------------- [ KHR_debug ] ----------------- + +static void APIENTRY debugCallbackKHR(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, GLvoid* userParam) { + JNIEnv *env = attachCurrentThread(); + + if ( env != NULL && !(*env)->ExceptionOccurred(env) && debugCallbackKHRJ != NULL ) { + (*env)->CallVoidMethod(env, (jobject)userParam, debugCallbackKHRJ, + (jint)source, + (jint)type, + (jint)id, + (jint)severity, + NewStringNativeWithLength(env, message, length) + ); + } + + detachCurrentThread(); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_CallbackUtil_getDebugCallbackKHR(JNIEnv *env, jclass clazz) { + // Cache the callback methodID + jclass callbackClass; + if ( debugCallbackKHRJ == NULL ) { + callbackClass = (*env)->FindClass(env, "org/lwjgl/opengles/KHRDebugCallback$Handler"); + if ( callbackClass != NULL ) + debugCallbackKHRJ = (*env)->GetMethodID(env, callbackClass, "handleMessage", "(IIIILjava/lang/String;)V"); + } + + return (jlong)(intptr_t)&debugCallbackKHRJ; +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_CallbackUtil.h b/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_CallbackUtil.h new file mode 100644 index 0000000..61cb23c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_CallbackUtil.h @@ -0,0 +1,37 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengles_CallbackUtil */ + +#ifndef _Included_org_lwjgl_opengles_CallbackUtil +#define _Included_org_lwjgl_opengles_CallbackUtil +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_lwjgl_opengles_CallbackUtil + * Method: ncreateGlobalRef + * Signature: (Ljava/lang/Object;)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengles_CallbackUtil_ncreateGlobalRef + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengles_CallbackUtil + * Method: deleteGlobalRef + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_CallbackUtil_deleteGlobalRef + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengles_CallbackUtil + * Method: getDebugCallbackKHR + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengles_CallbackUtil_getDebugCallbackKHR + (JNIEnv *, jclass); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_EGL.c b/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_EGL.c new file mode 100644 index 0000000..1dcfb49 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_EGL.c @@ -0,0 +1,211 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include "common_tools.h" +#include "org_lwjgl_opengles_EGL.h" +#include "extgl_egl.h" + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengles_EGL_eglGetError(JNIEnv *env, jclass clazz) { + return eglGetError(); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengles_EGL_neglGetDisplay(JNIEnv *env, jclass clazz, jlong display_id) { + return (intptr_t)eglGetDisplay((EGLNativeDisplayType)(intptr_t)display_id); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_neglInitialize(JNIEnv *env, jclass clazz, jlong dpy_ptr, jlong version) { + EGLDisplay dpy = (EGLDisplay)(intptr_t)dpy_ptr; + EGLint *version_address = (EGLint *)(intptr_t)version; + + return eglInitialize(dpy, version_address, version_address + 1); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_neglTerminate(JNIEnv *env, jclass clazz, jlong dpy_ptr) { + EGLDisplay dpy = (EGLDisplay)(intptr_t)dpy_ptr; + + return eglTerminate(dpy); +} + +JNIEXPORT jstring JNICALL Java_org_lwjgl_opengles_EGL_neglQueryString(JNIEnv *env, jclass clazz, jlong dpy_ptr, jint name) { + EGLDisplay dpy = (EGLDisplay)(intptr_t)dpy_ptr; + const char * __result = eglQueryString(dpy, name); + if ( __result == NULL ) + return NULL; + + return NewStringNativeWithLength(env, __result, (jsize)strlen(__result)); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_neglGetConfigs(JNIEnv *env, jclass clazz, jlong dpy_ptr, jlong configs, jint config_size, jlong num_config) { + EGLDisplay dpy = (EGLDisplay)(intptr_t)dpy_ptr; + EGLConfig *configs_address = (EGLConfig *)(intptr_t)configs; + EGLint *num_config_address = (EGLint *)(intptr_t)num_config; + + return eglGetConfigs(dpy, configs_address, config_size, num_config_address); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_neglChooseConfig(JNIEnv *env, jclass clazz, jlong dpy_ptr, jlong attrib_list, jlong configs, jint config_size, jlong num_config) { + EGLDisplay dpy = (EGLDisplay)(intptr_t)dpy_ptr; + const EGLint *attrib_list_address = (EGLint *)(intptr_t)attrib_list; + EGLConfig *configs_address = (EGLConfig *)(intptr_t)configs; + EGLint *num_config_address = (EGLint *)(intptr_t)num_config; + + return eglChooseConfig(dpy, attrib_list_address, configs_address, config_size, num_config_address); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_neglGetConfigAttrib(JNIEnv *env, jclass clazz, jlong dpy_ptr, jlong config_ptr, jint attribute, jlong value) { + EGLDisplay dpy = (EGLDisplay)(intptr_t)dpy_ptr; + EGLConfig config = (EGLConfig)(intptr_t)config_ptr; + EGLint *value_address = (EGLint *)(intptr_t)value; + + return eglGetConfigAttrib(dpy, config, attribute, value_address); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengles_EGL_neglCreateWindowSurface(JNIEnv *env, jclass clazz, jlong dpy_ptr, jlong config_ptr, jlong win, jlong attrib_list) { + EGLDisplay dpy = (EGLDisplay)(intptr_t)dpy_ptr; + EGLConfig config = (EGLConfig)(intptr_t)config_ptr; + const EGLint *attrib_list_address = (EGLint *)(intptr_t)attrib_list; + + return (intptr_t)eglCreateWindowSurface(dpy, config, (EGLNativeWindowType)(intptr_t)win, attrib_list_address); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengles_EGL_neglCreatePbufferSurface(JNIEnv *env, jclass clazz, jlong dpy_ptr, jlong config_ptr, jlong attrib_list) { + EGLDisplay dpy = (EGLDisplay)(intptr_t)dpy_ptr; + EGLConfig config = (EGLConfig)(intptr_t)config_ptr; + const EGLint *attrib_list_address = (EGLint *)(intptr_t)attrib_list; + + return (intptr_t)eglCreatePbufferSurface(dpy, config, attrib_list_address); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_neglDestroySurface(JNIEnv *env, jclass clazz, jlong dpy_ptr, jlong surface_ptr) { + EGLDisplay dpy = (EGLDisplay)(intptr_t)dpy_ptr; + EGLSurface surface = (EGLSurface)(intptr_t)surface_ptr; + + return eglDestroySurface(dpy, surface); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_neglSurfaceAttrib(JNIEnv *env, jclass clazz, jlong dpy_ptr, jlong surface_ptr, jint attribute, jint value) { + EGLDisplay dpy = (EGLDisplay)(intptr_t)dpy_ptr; + EGLSurface surface = (EGLSurface)(intptr_t)surface_ptr; + + return eglSurfaceAttrib(dpy, surface, attribute, value); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_neglQuerySurface(JNIEnv *env, jclass clazz, jlong dpy_ptr, jlong surface_ptr, jint attribute, jlong value) { + EGLDisplay dpy = (EGLDisplay)(intptr_t)dpy_ptr; + EGLSurface surface = (EGLSurface)(intptr_t)surface_ptr; + EGLint *value_address = (EGLint *)(intptr_t)value; + + return eglQuerySurface(dpy, surface, attribute, value_address); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_eglBindAPI(JNIEnv *env, jclass clazz, jint api) { + return eglBindAPI(api); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengles_EGL_eglQueryAPI(JNIEnv *env, jclass clazz) { + return eglQueryAPI(); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_eglReleaseThread(JNIEnv *env, jclass clazz) { + return eglReleaseThread(); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_neglSwapInterval(JNIEnv *env, jclass clazz, jlong dpy_ptr, jint interval) { + EGLDisplay dpy = (EGLDisplay)(intptr_t)dpy_ptr; + return eglSwapInterval(dpy, interval); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengles_EGL_neglCreateContext(JNIEnv *env, jclass clazz, jlong dpy_ptr, jlong config_ptr, jlong share_context_ptr, jlong attrib_list) { + EGLDisplay dpy = (EGLDisplay)(intptr_t)dpy_ptr; + EGLConfig config = (EGLConfig)(intptr_t)config_ptr; + EGLContext share_context = (EGLContext)(intptr_t)share_context_ptr; + const EGLint *attrib_list_address = (EGLint *)(intptr_t)attrib_list; + + return (intptr_t)eglCreateContext(dpy, config, share_context, attrib_list_address); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_neglDestroyContext(JNIEnv *env, jclass clazz, jlong dpy_ptr, jlong ctx_ptr) { + EGLDisplay dpy = (EGLDisplay)(intptr_t)dpy_ptr; + EGLContext ctx = (EGLContext)(intptr_t)ctx_ptr; + + return eglDestroyContext(dpy, ctx); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_neglMakeCurrent(JNIEnv *env, jclass clazz, jlong dpy_ptr, jlong draw_ptr, jlong read_ptr, jlong ctx_ptr) { + EGLDisplay dpy = (EGLDisplay)(intptr_t)dpy_ptr; + EGLSurface draw = (EGLSurface)(intptr_t)draw_ptr; + EGLSurface read = (EGLSurface)(intptr_t)read_ptr; + EGLContext ctx = (EGLContext)(intptr_t)ctx_ptr; + + return eglMakeCurrent(dpy, draw, read, ctx); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengles_EGL_neglGetCurrentContext(JNIEnv *env, jclass clazz) { + return (intptr_t)eglGetCurrentContext(); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengles_EGL_neglGetCurrentSurface(JNIEnv *env, jclass clazz, jint readdraw) { + return (intptr_t)eglGetCurrentSurface(readdraw); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengles_EGL_neglGetCurrentDisplay(JNIEnv *env, jclass clazz) { + return (intptr_t)eglGetCurrentDisplay(); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_neglQueryContext(JNIEnv *env, jclass clazz, jlong dpy_ptr, jlong ctx_ptr, jint attribute, jlong value) { + EGLDisplay dpy = (EGLDisplay)(intptr_t)dpy_ptr; + EGLContext ctx = (EGLContext)(intptr_t)ctx_ptr; + EGLint *value_address = (EGLint *)(intptr_t)value; + + return eglQueryContext(dpy, ctx, attribute, value_address); + +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_eglWaitClient(JNIEnv *env, jclass clazz) { + return eglWaitClient(); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_eglWaitGL(JNIEnv *env, jclass clazz) { + return eglWaitGL(); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_eglWaitNative(JNIEnv *env, jclass clazz, jint engine) { + return eglWaitNative(engine); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_neglSwapBuffers(JNIEnv *env, jclass clazz, jlong dpy_ptr, jlong surface_ptr) { + EGLDisplay dpy = (EGLDisplay)(intptr_t)dpy_ptr; + EGLSurface surface = (EGLSurface)(intptr_t)surface_ptr; + + return eglSwapBuffers(dpy, surface); +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_EGL.h b/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_EGL.h new file mode 100644 index 0000000..4253aee --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_EGL.h @@ -0,0 +1,469 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengles_EGL */ + +#ifndef _Included_org_lwjgl_opengles_EGL +#define _Included_org_lwjgl_opengles_EGL +#ifdef __cplusplus +extern "C" { +#endif +#undef org_lwjgl_opengles_EGL_EGL_FALSE +#define org_lwjgl_opengles_EGL_EGL_FALSE 0L +#undef org_lwjgl_opengles_EGL_EGL_TRUE +#define org_lwjgl_opengles_EGL_EGL_TRUE 1L +#undef org_lwjgl_opengles_EGL_EGL_DEFAULT_DISPLAY +#define org_lwjgl_opengles_EGL_EGL_DEFAULT_DISPLAY 0L +#undef org_lwjgl_opengles_EGL_EGL_NO_CONTEXT +#define org_lwjgl_opengles_EGL_EGL_NO_CONTEXT 0L +#undef org_lwjgl_opengles_EGL_EGL_NO_DISPLAY +#define org_lwjgl_opengles_EGL_EGL_NO_DISPLAY 0L +#undef org_lwjgl_opengles_EGL_EGL_NO_SURFACE +#define org_lwjgl_opengles_EGL_EGL_NO_SURFACE 0L +#undef org_lwjgl_opengles_EGL_EGL_DONT_CARE +#define org_lwjgl_opengles_EGL_EGL_DONT_CARE -1L +#undef org_lwjgl_opengles_EGL_EGL_SUCCESS +#define org_lwjgl_opengles_EGL_EGL_SUCCESS 12288L +#undef org_lwjgl_opengles_EGL_EGL_NOT_INITIALIZED +#define org_lwjgl_opengles_EGL_EGL_NOT_INITIALIZED 12289L +#undef org_lwjgl_opengles_EGL_EGL_BAD_ACCESS +#define org_lwjgl_opengles_EGL_EGL_BAD_ACCESS 12290L +#undef org_lwjgl_opengles_EGL_EGL_BAD_ALLOC +#define org_lwjgl_opengles_EGL_EGL_BAD_ALLOC 12291L +#undef org_lwjgl_opengles_EGL_EGL_BAD_ATTRIBUTE +#define org_lwjgl_opengles_EGL_EGL_BAD_ATTRIBUTE 12292L +#undef org_lwjgl_opengles_EGL_EGL_BAD_CONFIG +#define org_lwjgl_opengles_EGL_EGL_BAD_CONFIG 12293L +#undef org_lwjgl_opengles_EGL_EGL_BAD_CONTEXT +#define org_lwjgl_opengles_EGL_EGL_BAD_CONTEXT 12294L +#undef org_lwjgl_opengles_EGL_EGL_BAD_CURRENT_SURFACE +#define org_lwjgl_opengles_EGL_EGL_BAD_CURRENT_SURFACE 12295L +#undef org_lwjgl_opengles_EGL_EGL_BAD_DISPLAY +#define org_lwjgl_opengles_EGL_EGL_BAD_DISPLAY 12296L +#undef org_lwjgl_opengles_EGL_EGL_BAD_MATCH +#define org_lwjgl_opengles_EGL_EGL_BAD_MATCH 12297L +#undef org_lwjgl_opengles_EGL_EGL_BAD_NATIVE_PIXMAP +#define org_lwjgl_opengles_EGL_EGL_BAD_NATIVE_PIXMAP 12298L +#undef org_lwjgl_opengles_EGL_EGL_BAD_NATIVE_WINDOW +#define org_lwjgl_opengles_EGL_EGL_BAD_NATIVE_WINDOW 12299L +#undef org_lwjgl_opengles_EGL_EGL_BAD_PARAMETER +#define org_lwjgl_opengles_EGL_EGL_BAD_PARAMETER 12300L +#undef org_lwjgl_opengles_EGL_EGL_BAD_SURFACE +#define org_lwjgl_opengles_EGL_EGL_BAD_SURFACE 12301L +#undef org_lwjgl_opengles_EGL_EGL_CONTEXT_LOST +#define org_lwjgl_opengles_EGL_EGL_CONTEXT_LOST 12302L +#undef org_lwjgl_opengles_EGL_EGL_BUFFER_SIZE +#define org_lwjgl_opengles_EGL_EGL_BUFFER_SIZE 12320L +#undef org_lwjgl_opengles_EGL_EGL_ALPHA_SIZE +#define org_lwjgl_opengles_EGL_EGL_ALPHA_SIZE 12321L +#undef org_lwjgl_opengles_EGL_EGL_BLUE_SIZE +#define org_lwjgl_opengles_EGL_EGL_BLUE_SIZE 12322L +#undef org_lwjgl_opengles_EGL_EGL_GREEN_SIZE +#define org_lwjgl_opengles_EGL_EGL_GREEN_SIZE 12323L +#undef org_lwjgl_opengles_EGL_EGL_RED_SIZE +#define org_lwjgl_opengles_EGL_EGL_RED_SIZE 12324L +#undef org_lwjgl_opengles_EGL_EGL_DEPTH_SIZE +#define org_lwjgl_opengles_EGL_EGL_DEPTH_SIZE 12325L +#undef org_lwjgl_opengles_EGL_EGL_STENCIL_SIZE +#define org_lwjgl_opengles_EGL_EGL_STENCIL_SIZE 12326L +#undef org_lwjgl_opengles_EGL_EGL_CONFIG_CAVEAT +#define org_lwjgl_opengles_EGL_EGL_CONFIG_CAVEAT 12327L +#undef org_lwjgl_opengles_EGL_EGL_CONFIG_ID +#define org_lwjgl_opengles_EGL_EGL_CONFIG_ID 12328L +#undef org_lwjgl_opengles_EGL_EGL_LEVEL +#define org_lwjgl_opengles_EGL_EGL_LEVEL 12329L +#undef org_lwjgl_opengles_EGL_EGL_MAX_PBUFFER_HEIGHT +#define org_lwjgl_opengles_EGL_EGL_MAX_PBUFFER_HEIGHT 12330L +#undef org_lwjgl_opengles_EGL_EGL_MAX_PBUFFER_PIXELS +#define org_lwjgl_opengles_EGL_EGL_MAX_PBUFFER_PIXELS 12331L +#undef org_lwjgl_opengles_EGL_EGL_MAX_PBUFFER_WIDTH +#define org_lwjgl_opengles_EGL_EGL_MAX_PBUFFER_WIDTH 12332L +#undef org_lwjgl_opengles_EGL_EGL_NATIVE_RENDERABLE +#define org_lwjgl_opengles_EGL_EGL_NATIVE_RENDERABLE 12333L +#undef org_lwjgl_opengles_EGL_EGL_NATIVE_VISUAL_ID +#define org_lwjgl_opengles_EGL_EGL_NATIVE_VISUAL_ID 12334L +#undef org_lwjgl_opengles_EGL_EGL_NATIVE_VISUAL_TYPE +#define org_lwjgl_opengles_EGL_EGL_NATIVE_VISUAL_TYPE 12335L +#undef org_lwjgl_opengles_EGL_EGL_SAMPLES +#define org_lwjgl_opengles_EGL_EGL_SAMPLES 12337L +#undef org_lwjgl_opengles_EGL_EGL_SAMPLE_BUFFERS +#define org_lwjgl_opengles_EGL_EGL_SAMPLE_BUFFERS 12338L +#undef org_lwjgl_opengles_EGL_EGL_SURFACE_TYPE +#define org_lwjgl_opengles_EGL_EGL_SURFACE_TYPE 12339L +#undef org_lwjgl_opengles_EGL_EGL_TRANSPARENT_TYPE +#define org_lwjgl_opengles_EGL_EGL_TRANSPARENT_TYPE 12340L +#undef org_lwjgl_opengles_EGL_EGL_TRANSPARENT_BLUE_VALUE +#define org_lwjgl_opengles_EGL_EGL_TRANSPARENT_BLUE_VALUE 12341L +#undef org_lwjgl_opengles_EGL_EGL_TRANSPARENT_GREEN_VALUE +#define org_lwjgl_opengles_EGL_EGL_TRANSPARENT_GREEN_VALUE 12342L +#undef org_lwjgl_opengles_EGL_EGL_TRANSPARENT_RED_VALUE +#define org_lwjgl_opengles_EGL_EGL_TRANSPARENT_RED_VALUE 12343L +#undef org_lwjgl_opengles_EGL_EGL_NONE +#define org_lwjgl_opengles_EGL_EGL_NONE 12344L +#undef org_lwjgl_opengles_EGL_EGL_BIND_TO_TEXTURE_RGB +#define org_lwjgl_opengles_EGL_EGL_BIND_TO_TEXTURE_RGB 12345L +#undef org_lwjgl_opengles_EGL_EGL_BIND_TO_TEXTURE_RGBA +#define org_lwjgl_opengles_EGL_EGL_BIND_TO_TEXTURE_RGBA 12346L +#undef org_lwjgl_opengles_EGL_EGL_MIN_SWAP_INTERVAL +#define org_lwjgl_opengles_EGL_EGL_MIN_SWAP_INTERVAL 12347L +#undef org_lwjgl_opengles_EGL_EGL_MAX_SWAP_INTERVAL +#define org_lwjgl_opengles_EGL_EGL_MAX_SWAP_INTERVAL 12348L +#undef org_lwjgl_opengles_EGL_EGL_LUMINANCE_SIZE +#define org_lwjgl_opengles_EGL_EGL_LUMINANCE_SIZE 12349L +#undef org_lwjgl_opengles_EGL_EGL_ALPHA_MASK_SIZE +#define org_lwjgl_opengles_EGL_EGL_ALPHA_MASK_SIZE 12350L +#undef org_lwjgl_opengles_EGL_EGL_COLOR_BUFFER_TYPE +#define org_lwjgl_opengles_EGL_EGL_COLOR_BUFFER_TYPE 12351L +#undef org_lwjgl_opengles_EGL_EGL_RENDERABLE_TYPE +#define org_lwjgl_opengles_EGL_EGL_RENDERABLE_TYPE 12352L +#undef org_lwjgl_opengles_EGL_EGL_MATCH_NATIVE_PIXMAP +#define org_lwjgl_opengles_EGL_EGL_MATCH_NATIVE_PIXMAP 12353L +#undef org_lwjgl_opengles_EGL_EGL_CONFORMANT +#define org_lwjgl_opengles_EGL_EGL_CONFORMANT 12354L +#undef org_lwjgl_opengles_EGL_EGL_SLOW_CONFIG +#define org_lwjgl_opengles_EGL_EGL_SLOW_CONFIG 12368L +#undef org_lwjgl_opengles_EGL_EGL_NON_CONFORMANT_CONFIG +#define org_lwjgl_opengles_EGL_EGL_NON_CONFORMANT_CONFIG 12369L +#undef org_lwjgl_opengles_EGL_EGL_TRANSPARENT_RGB +#define org_lwjgl_opengles_EGL_EGL_TRANSPARENT_RGB 12370L +#undef org_lwjgl_opengles_EGL_EGL_RGB_BUFFER +#define org_lwjgl_opengles_EGL_EGL_RGB_BUFFER 12430L +#undef org_lwjgl_opengles_EGL_EGL_LUMINANCE_BUFFER +#define org_lwjgl_opengles_EGL_EGL_LUMINANCE_BUFFER 12431L +#undef org_lwjgl_opengles_EGL_EGL_NO_TEXTURE +#define org_lwjgl_opengles_EGL_EGL_NO_TEXTURE 12380L +#undef org_lwjgl_opengles_EGL_EGL_TEXTURE_RGB +#define org_lwjgl_opengles_EGL_EGL_TEXTURE_RGB 12381L +#undef org_lwjgl_opengles_EGL_EGL_TEXTURE_RGBA +#define org_lwjgl_opengles_EGL_EGL_TEXTURE_RGBA 12382L +#undef org_lwjgl_opengles_EGL_EGL_TEXTURE_2D +#define org_lwjgl_opengles_EGL_EGL_TEXTURE_2D 12383L +#undef org_lwjgl_opengles_EGL_EGL_PBUFFER_BIT +#define org_lwjgl_opengles_EGL_EGL_PBUFFER_BIT 1L +#undef org_lwjgl_opengles_EGL_EGL_PIXMAP_BIT +#define org_lwjgl_opengles_EGL_EGL_PIXMAP_BIT 2L +#undef org_lwjgl_opengles_EGL_EGL_WINDOW_BIT +#define org_lwjgl_opengles_EGL_EGL_WINDOW_BIT 4L +#undef org_lwjgl_opengles_EGL_EGL_VG_COLORSPACE_LINEAR_BIT +#define org_lwjgl_opengles_EGL_EGL_VG_COLORSPACE_LINEAR_BIT 32L +#undef org_lwjgl_opengles_EGL_EGL_VG_ALPHA_FORMAT_PRE_BIT +#define org_lwjgl_opengles_EGL_EGL_VG_ALPHA_FORMAT_PRE_BIT 64L +#undef org_lwjgl_opengles_EGL_EGL_MULTISAMPLE_RESOLVE_BOX_BIT +#define org_lwjgl_opengles_EGL_EGL_MULTISAMPLE_RESOLVE_BOX_BIT 512L +#undef org_lwjgl_opengles_EGL_EGL_SWAP_BEHAVIOR_PRESERVED_BIT +#define org_lwjgl_opengles_EGL_EGL_SWAP_BEHAVIOR_PRESERVED_BIT 1024L +#undef org_lwjgl_opengles_EGL_EGL_OPENGL_ES_BIT +#define org_lwjgl_opengles_EGL_EGL_OPENGL_ES_BIT 1L +#undef org_lwjgl_opengles_EGL_EGL_OPENVG_BIT +#define org_lwjgl_opengles_EGL_EGL_OPENVG_BIT 2L +#undef org_lwjgl_opengles_EGL_EGL_OPENGL_ES2_BIT +#define org_lwjgl_opengles_EGL_EGL_OPENGL_ES2_BIT 4L +#undef org_lwjgl_opengles_EGL_EGL_OPENGL_BIT +#define org_lwjgl_opengles_EGL_EGL_OPENGL_BIT 8L +#undef org_lwjgl_opengles_EGL_EGL_VENDOR +#define org_lwjgl_opengles_EGL_EGL_VENDOR 12371L +#undef org_lwjgl_opengles_EGL_EGL_VERSION +#define org_lwjgl_opengles_EGL_EGL_VERSION 12372L +#undef org_lwjgl_opengles_EGL_EGL_EXTENSIONS +#define org_lwjgl_opengles_EGL_EGL_EXTENSIONS 12373L +#undef org_lwjgl_opengles_EGL_EGL_CLIENT_APIS +#define org_lwjgl_opengles_EGL_EGL_CLIENT_APIS 12429L +#undef org_lwjgl_opengles_EGL_EGL_HEIGHT +#define org_lwjgl_opengles_EGL_EGL_HEIGHT 12374L +#undef org_lwjgl_opengles_EGL_EGL_WIDTH +#define org_lwjgl_opengles_EGL_EGL_WIDTH 12375L +#undef org_lwjgl_opengles_EGL_EGL_LARGEST_PBUFFER +#define org_lwjgl_opengles_EGL_EGL_LARGEST_PBUFFER 12376L +#undef org_lwjgl_opengles_EGL_EGL_TEXTURE_FORMAT +#define org_lwjgl_opengles_EGL_EGL_TEXTURE_FORMAT 12416L +#undef org_lwjgl_opengles_EGL_EGL_TEXTURE_TARGET +#define org_lwjgl_opengles_EGL_EGL_TEXTURE_TARGET 12417L +#undef org_lwjgl_opengles_EGL_EGL_MIPMAP_TEXTURE +#define org_lwjgl_opengles_EGL_EGL_MIPMAP_TEXTURE 12418L +#undef org_lwjgl_opengles_EGL_EGL_MIPMAP_LEVEL +#define org_lwjgl_opengles_EGL_EGL_MIPMAP_LEVEL 12419L +#undef org_lwjgl_opengles_EGL_EGL_RENDER_BUFFER +#define org_lwjgl_opengles_EGL_EGL_RENDER_BUFFER 12422L +#undef org_lwjgl_opengles_EGL_EGL_VG_COLORSPACE +#define org_lwjgl_opengles_EGL_EGL_VG_COLORSPACE 12423L +#undef org_lwjgl_opengles_EGL_EGL_VG_ALPHA_FORMAT +#define org_lwjgl_opengles_EGL_EGL_VG_ALPHA_FORMAT 12424L +#undef org_lwjgl_opengles_EGL_EGL_HORIZONTAL_RESOLUTION +#define org_lwjgl_opengles_EGL_EGL_HORIZONTAL_RESOLUTION 12432L +#undef org_lwjgl_opengles_EGL_EGL_VERTICAL_RESOLUTION +#define org_lwjgl_opengles_EGL_EGL_VERTICAL_RESOLUTION 12433L +#undef org_lwjgl_opengles_EGL_EGL_PIXEL_ASPECT_RATIO +#define org_lwjgl_opengles_EGL_EGL_PIXEL_ASPECT_RATIO 12434L +#undef org_lwjgl_opengles_EGL_EGL_SWAP_BEHAVIOR +#define org_lwjgl_opengles_EGL_EGL_SWAP_BEHAVIOR 12435L +#undef org_lwjgl_opengles_EGL_EGL_MULTISAMPLE_RESOLVE +#define org_lwjgl_opengles_EGL_EGL_MULTISAMPLE_RESOLVE 12441L +#undef org_lwjgl_opengles_EGL_EGL_BACK_BUFFER +#define org_lwjgl_opengles_EGL_EGL_BACK_BUFFER 12420L +#undef org_lwjgl_opengles_EGL_EGL_SINGLE_BUFFER +#define org_lwjgl_opengles_EGL_EGL_SINGLE_BUFFER 12421L +#undef org_lwjgl_opengles_EGL_EGL_VG_COLORSPACE_sRGB +#define org_lwjgl_opengles_EGL_EGL_VG_COLORSPACE_sRGB 12425L +#undef org_lwjgl_opengles_EGL_EGL_VG_COLORSPACE_LINEAR +#define org_lwjgl_opengles_EGL_EGL_VG_COLORSPACE_LINEAR 12426L +#undef org_lwjgl_opengles_EGL_EGL_VG_ALPHA_FORMAT_NONPRE +#define org_lwjgl_opengles_EGL_EGL_VG_ALPHA_FORMAT_NONPRE 12427L +#undef org_lwjgl_opengles_EGL_EGL_VG_ALPHA_FORMAT_PRE +#define org_lwjgl_opengles_EGL_EGL_VG_ALPHA_FORMAT_PRE 12428L +#undef org_lwjgl_opengles_EGL_EGL_DISPLAY_SCALING +#define org_lwjgl_opengles_EGL_EGL_DISPLAY_SCALING 10000L +#undef org_lwjgl_opengles_EGL_EGL_UNKNOWN +#define org_lwjgl_opengles_EGL_EGL_UNKNOWN -1L +#undef org_lwjgl_opengles_EGL_EGL_BUFFER_PRESERVED +#define org_lwjgl_opengles_EGL_EGL_BUFFER_PRESERVED 12436L +#undef org_lwjgl_opengles_EGL_EGL_BUFFER_DESTROYED +#define org_lwjgl_opengles_EGL_EGL_BUFFER_DESTROYED 12437L +#undef org_lwjgl_opengles_EGL_EGL_OPENVG_IMAGE +#define org_lwjgl_opengles_EGL_EGL_OPENVG_IMAGE 12438L +#undef org_lwjgl_opengles_EGL_EGL_CONTEXT_CLIENT_TYPE +#define org_lwjgl_opengles_EGL_EGL_CONTEXT_CLIENT_TYPE 12439L +#undef org_lwjgl_opengles_EGL_EGL_CONTEXT_CLIENT_VERSION +#define org_lwjgl_opengles_EGL_EGL_CONTEXT_CLIENT_VERSION 12440L +#undef org_lwjgl_opengles_EGL_EGL_MULTISAMPLE_RESOLVE_DEFAULT +#define org_lwjgl_opengles_EGL_EGL_MULTISAMPLE_RESOLVE_DEFAULT 12442L +#undef org_lwjgl_opengles_EGL_EGL_MULTISAMPLE_RESOLVE_BOX +#define org_lwjgl_opengles_EGL_EGL_MULTISAMPLE_RESOLVE_BOX 12443L +#undef org_lwjgl_opengles_EGL_EGL_OPENGL_ES_API +#define org_lwjgl_opengles_EGL_EGL_OPENGL_ES_API 12448L +#undef org_lwjgl_opengles_EGL_EGL_OPENVG_API +#define org_lwjgl_opengles_EGL_EGL_OPENVG_API 12449L +#undef org_lwjgl_opengles_EGL_EGL_OPENGL_API +#define org_lwjgl_opengles_EGL_EGL_OPENGL_API 12450L +#undef org_lwjgl_opengles_EGL_EGL_DRAW +#define org_lwjgl_opengles_EGL_EGL_DRAW 12377L +#undef org_lwjgl_opengles_EGL_EGL_READ +#define org_lwjgl_opengles_EGL_EGL_READ 12378L +#undef org_lwjgl_opengles_EGL_EGL_CORE_NATIVE_ENGINE +#define org_lwjgl_opengles_EGL_EGL_CORE_NATIVE_ENGINE 12379L +/* + * Class: org_lwjgl_opengles_EGL + * Method: eglGetError + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengles_EGL_eglGetError + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengles_EGL + * Method: neglGetDisplay + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengles_EGL_neglGetDisplay + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengles_EGL + * Method: neglInitialize + * Signature: (JJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_neglInitialize + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_lwjgl_opengles_EGL + * Method: neglTerminate + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_neglTerminate + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengles_EGL + * Method: neglQueryString + * Signature: (JI)Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_org_lwjgl_opengles_EGL_neglQueryString + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: org_lwjgl_opengles_EGL + * Method: neglGetConfigs + * Signature: (JJIJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_neglGetConfigs + (JNIEnv *, jclass, jlong, jlong, jint, jlong); + +/* + * Class: org_lwjgl_opengles_EGL + * Method: neglChooseConfig + * Signature: (JJJIJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_neglChooseConfig + (JNIEnv *, jclass, jlong, jlong, jlong, jint, jlong); + +/* + * Class: org_lwjgl_opengles_EGL + * Method: neglGetConfigAttrib + * Signature: (JJIJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_neglGetConfigAttrib + (JNIEnv *, jclass, jlong, jlong, jint, jlong); + +/* + * Class: org_lwjgl_opengles_EGL + * Method: neglCreateWindowSurface + * Signature: (JJJJ)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengles_EGL_neglCreateWindowSurface + (JNIEnv *, jclass, jlong, jlong, jlong, jlong); + +/* + * Class: org_lwjgl_opengles_EGL + * Method: neglCreatePbufferSurface + * Signature: (JJJ)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengles_EGL_neglCreatePbufferSurface + (JNIEnv *, jclass, jlong, jlong, jlong); + +/* + * Class: org_lwjgl_opengles_EGL + * Method: neglSurfaceAttrib + * Signature: (JJII)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_neglSurfaceAttrib + (JNIEnv *, jclass, jlong, jlong, jint, jint); + +/* + * Class: org_lwjgl_opengles_EGL + * Method: neglDestroySurface + * Signature: (JJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_neglDestroySurface + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_lwjgl_opengles_EGL + * Method: neglQuerySurface + * Signature: (JJIJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_neglQuerySurface + (JNIEnv *, jclass, jlong, jlong, jint, jlong); + +/* + * Class: org_lwjgl_opengles_EGL + * Method: eglBindAPI + * Signature: (I)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_eglBindAPI + (JNIEnv *, jclass, jint); + +/* + * Class: org_lwjgl_opengles_EGL + * Method: eglQueryAPI + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengles_EGL_eglQueryAPI + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengles_EGL + * Method: eglReleaseThread + * Signature: ()Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_eglReleaseThread + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengles_EGL + * Method: neglSwapInterval + * Signature: (JI)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_neglSwapInterval + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: org_lwjgl_opengles_EGL + * Method: neglCreateContext + * Signature: (JJJJ)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengles_EGL_neglCreateContext + (JNIEnv *, jclass, jlong, jlong, jlong, jlong); + +/* + * Class: org_lwjgl_opengles_EGL + * Method: neglDestroyContext + * Signature: (JJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_neglDestroyContext + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_lwjgl_opengles_EGL + * Method: neglMakeCurrent + * Signature: (JJJJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_neglMakeCurrent + (JNIEnv *, jclass, jlong, jlong, jlong, jlong); + +/* + * Class: org_lwjgl_opengles_EGL + * Method: neglGetCurrentContext + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengles_EGL_neglGetCurrentContext + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengles_EGL + * Method: neglGetCurrentSurface + * Signature: (I)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengles_EGL_neglGetCurrentSurface + (JNIEnv *, jclass, jint); + +/* + * Class: org_lwjgl_opengles_EGL + * Method: neglGetCurrentDisplay + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengles_EGL_neglGetCurrentDisplay + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengles_EGL + * Method: neglQueryContext + * Signature: (JJIJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_neglQueryContext + (JNIEnv *, jclass, jlong, jlong, jint, jlong); + +/* + * Class: org_lwjgl_opengles_EGL + * Method: eglWaitClient + * Signature: ()Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_eglWaitClient + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengles_EGL + * Method: eglWaitGL + * Signature: ()Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_eglWaitGL + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengles_EGL + * Method: eglWaitNative + * Signature: (I)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_eglWaitNative + (JNIEnv *, jclass, jint); + +/* + * Class: org_lwjgl_opengles_EGL + * Method: neglSwapBuffers + * Signature: (JJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGL_neglSwapBuffers + (JNIEnv *, jclass, jlong, jlong); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_EGLKHRFenceSync.c b/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_EGLKHRFenceSync.c new file mode 100644 index 0000000..9183513 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_EGLKHRFenceSync.c @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include "common_tools.h" +#include "org_lwjgl_opengles_EGLKHRFenceSync.h" +#include "extgl_egl.h" + +static PFNEGLCREATESYNCKHRPROC eglCreateSyncKHR; +static PFNEGLDESTROYSYNCKHRPROC eglDestroySyncKHR; +static PFNEGLCLIENTWAITSYNCKHRPROC eglClientWaitSyncKHR; +static PFNEGLGETSYNCATTRIBKHRPROC eglGetSyncAttribKHR; + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengles_EGLKHRFenceSync_neglCreateSyncKHR(JNIEnv *env, jclass clazz, jlong dpy_ptr, jint type, jlong attrib_list) { + EGLDisplay dpy = (EGLDisplay)(intptr_t)dpy_ptr; + const EGLint *attrib_list_address = (EGLint *)(intptr_t)attrib_list; + + return (intptr_t)eglCreateSyncKHR(dpy, type, attrib_list_address); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGLKHRFenceSync_neglDestroySyncKHR(JNIEnv *env, jclass clazz, jlong dpy_ptr, jlong sync_ptr) { + EGLDisplay dpy = (EGLDisplay)(intptr_t)dpy_ptr; + EGLSyncKHR sync = (EGLSyncKHR)(intptr_t)sync_ptr; + + return eglDestroySyncKHR(dpy, sync); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengles_EGLKHRFenceSync_neglClientWaitSyncKHR(JNIEnv *env, jclass clazz, jlong dpy_ptr, jlong sync_ptr, jint flags, jlong timeout) { + EGLDisplay dpy = (EGLDisplay)(intptr_t)dpy_ptr; + EGLSyncKHR sync = (EGLSyncKHR)(intptr_t)sync_ptr; + + return eglClientWaitSyncKHR(dpy, sync, flags, timeout); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGLKHRFenceSync_neglGetSyncAttribKHR(JNIEnv *env, jclass clazz, jlong dpy_ptr, jlong sync_ptr, jint attribute, jlong value) { + EGLDisplay dpy = (EGLDisplay)(intptr_t)dpy_ptr; + EGLSyncKHR sync = (EGLSyncKHR)(intptr_t)sync_ptr; + EGLint *value_address = (EGLint *)(intptr_t)value; + + return eglGetSyncAttribKHR(dpy, sync, attribute, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_EGLKHRFenceSync_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"neglCreateSyncKHR", "(JIJ)J", (void *)&Java_org_lwjgl_opengles_EGLKHRFenceSync_neglCreateSyncKHR, "eglCreateSyncKHR", (void *)&eglCreateSyncKHR, false}, + {"neglDestroySyncKHR", "(JJ)Z", (void *)&Java_org_lwjgl_opengles_EGLKHRFenceSync_neglDestroySyncKHR, "eglDestroySyncKHR", (void *)&eglDestroySyncKHR, false}, + {"neglClientWaitSyncKHR", "(JJIJ)I", (void *)&Java_org_lwjgl_opengles_EGLKHRFenceSync_neglClientWaitSyncKHR, "eglClientWaitSyncKHR", (void *)&eglClientWaitSyncKHR, false}, + {"neglGetSyncAttribKHR", "(JJIJ)Z", (void *)&Java_org_lwjgl_opengles_EGLKHRFenceSync_neglGetSyncAttribKHR, "eglGetSyncAttribKHR", (void *)&eglGetSyncAttribKHR, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_EGLKHRFenceSync.h b/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_EGLKHRFenceSync.h new file mode 100644 index 0000000..28e767a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_EGLKHRFenceSync.h @@ -0,0 +1,77 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengles_EGLKHRFenceSync */ + +#ifndef _Included_org_lwjgl_opengles_EGLKHRFenceSync +#define _Included_org_lwjgl_opengles_EGLKHRFenceSync +#ifdef __cplusplus +extern "C" { +#endif +#undef org_lwjgl_opengles_EGLKHRFenceSync_EGL_SYNC_FENCE_KHR +#define org_lwjgl_opengles_EGLKHRFenceSync_EGL_SYNC_FENCE_KHR 12537L +#undef org_lwjgl_opengles_EGLKHRFenceSync_EGL_SYNC_TYPE_KHR +#define org_lwjgl_opengles_EGLKHRFenceSync_EGL_SYNC_TYPE_KHR 12535L +#undef org_lwjgl_opengles_EGLKHRFenceSync_EGL_SYNC_STATUS_KHR +#define org_lwjgl_opengles_EGLKHRFenceSync_EGL_SYNC_STATUS_KHR 12529L +#undef org_lwjgl_opengles_EGLKHRFenceSync_EGL_SYNC_CONDITION_KHR +#define org_lwjgl_opengles_EGLKHRFenceSync_EGL_SYNC_CONDITION_KHR 12536L +#undef org_lwjgl_opengles_EGLKHRFenceSync_EGL_SIGNALED_KHR +#define org_lwjgl_opengles_EGLKHRFenceSync_EGL_SIGNALED_KHR 12530L +#undef org_lwjgl_opengles_EGLKHRFenceSync_EGL_UNSIGNALED_KHR +#define org_lwjgl_opengles_EGLKHRFenceSync_EGL_UNSIGNALED_KHR 12531L +#undef org_lwjgl_opengles_EGLKHRFenceSync_EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR +#define org_lwjgl_opengles_EGLKHRFenceSync_EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 12528L +#undef org_lwjgl_opengles_EGLKHRFenceSync_EGL_SYNC_FLUSH_COMMANDS_BIT_KHR +#define org_lwjgl_opengles_EGLKHRFenceSync_EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 1L +#undef org_lwjgl_opengles_EGLKHRFenceSync_EGL_FOREVER_KHR +#define org_lwjgl_opengles_EGLKHRFenceSync_EGL_FOREVER_KHR -1i64 +#undef org_lwjgl_opengles_EGLKHRFenceSync_EGL_TIMEOUT_EXPIRED_KHR +#define org_lwjgl_opengles_EGLKHRFenceSync_EGL_TIMEOUT_EXPIRED_KHR 12533L +#undef org_lwjgl_opengles_EGLKHRFenceSync_EGL_CONDITION_SATISFIED_KHR +#define org_lwjgl_opengles_EGLKHRFenceSync_EGL_CONDITION_SATISFIED_KHR 12534L +#undef org_lwjgl_opengles_EGLKHRFenceSync_EGL_NO_SYNC_KHR +#define org_lwjgl_opengles_EGLKHRFenceSync_EGL_NO_SYNC_KHR 0i64 +/* + * Class: org_lwjgl_opengles_EGLKHRFenceSync + * Method: initNativeStubs + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_EGLKHRFenceSync_initNativeStubs + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengles_EGLKHRFenceSync + * Method: neglCreateSyncKHR + * Signature: (JIJ)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengles_EGLKHRFenceSync_neglCreateSyncKHR + (JNIEnv *, jclass, jlong, jint, jlong); + +/* + * Class: org_lwjgl_opengles_EGLKHRFenceSync + * Method: neglDestroySyncKHR + * Signature: (JJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGLKHRFenceSync_neglDestroySyncKHR + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_lwjgl_opengles_EGLKHRFenceSync + * Method: neglClientWaitSyncKHR + * Signature: (JJIJ)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengles_EGLKHRFenceSync_neglClientWaitSyncKHR + (JNIEnv *, jclass, jlong, jlong, jint, jlong); + +/* + * Class: org_lwjgl_opengles_EGLKHRFenceSync + * Method: neglGetSyncAttribKHR + * Signature: (JJIJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGLKHRFenceSync_neglGetSyncAttribKHR + (JNIEnv *, jclass, jlong, jlong, jint, jlong); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_EGLKHRReusableSync.c b/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_EGLKHRReusableSync.c new file mode 100644 index 0000000..971e092 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_EGLKHRReusableSync.c @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include "common_tools.h" +#include "org_lwjgl_opengles_EGLKHRReusableSync.h" +#include "extgl_egl.h" + +static PFNEGLSIGNALSYNCKHRPROC eglSignalSyncKHR; + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGLKHRReusableSync_neglSignalSyncKHR(JNIEnv *env, jclass clazz, jlong dpy_ptr, jlong sync_ptr, jint mode) { + EGLDisplay dpy = (EGLDisplay)(intptr_t)dpy_ptr; + EGLSyncKHR sync = (EGLSyncKHR)(intptr_t)sync_ptr; + return eglSignalSyncKHR(dpy, sync, mode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_EGLKHRReusableSync_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"neglSignalSyncKHR", "(JJI)Z", (void *)&Java_org_lwjgl_opengles_EGLKHRReusableSync_neglSignalSyncKHR, "eglSignalSyncKHR", (void *)&eglSignalSyncKHR, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_EGLKHRReusableSync.h b/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_EGLKHRReusableSync.h new file mode 100644 index 0000000..21118e2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_EGLKHRReusableSync.h @@ -0,0 +1,49 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengles_EGLKHRReusableSync */ + +#ifndef _Included_org_lwjgl_opengles_EGLKHRReusableSync +#define _Included_org_lwjgl_opengles_EGLKHRReusableSync +#ifdef __cplusplus +extern "C" { +#endif +#undef org_lwjgl_opengles_EGLKHRReusableSync_EGL_SYNC_REUSABLE_KHR +#define org_lwjgl_opengles_EGLKHRReusableSync_EGL_SYNC_REUSABLE_KHR 12538L +#undef org_lwjgl_opengles_EGLKHRReusableSync_EGL_SYNC_TYPE_KHR +#define org_lwjgl_opengles_EGLKHRReusableSync_EGL_SYNC_TYPE_KHR 12535L +#undef org_lwjgl_opengles_EGLKHRReusableSync_EGL_SYNC_STATUS_KHR +#define org_lwjgl_opengles_EGLKHRReusableSync_EGL_SYNC_STATUS_KHR 12529L +#undef org_lwjgl_opengles_EGLKHRReusableSync_EGL_SIGNALED_KHR +#define org_lwjgl_opengles_EGLKHRReusableSync_EGL_SIGNALED_KHR 12530L +#undef org_lwjgl_opengles_EGLKHRReusableSync_EGL_UNSIGNALED_KHR +#define org_lwjgl_opengles_EGLKHRReusableSync_EGL_UNSIGNALED_KHR 12531L +#undef org_lwjgl_opengles_EGLKHRReusableSync_EGL_SYNC_FLUSH_COMMANDS_BIT_KHR +#define org_lwjgl_opengles_EGLKHRReusableSync_EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 1L +#undef org_lwjgl_opengles_EGLKHRReusableSync_EGL_FOREVER_KHR +#define org_lwjgl_opengles_EGLKHRReusableSync_EGL_FOREVER_KHR -1i64 +#undef org_lwjgl_opengles_EGLKHRReusableSync_EGL_TIMEOUT_EXPIRED_KHR +#define org_lwjgl_opengles_EGLKHRReusableSync_EGL_TIMEOUT_EXPIRED_KHR 12533L +#undef org_lwjgl_opengles_EGLKHRReusableSync_EGL_CONDITION_SATISFIED_KHR +#define org_lwjgl_opengles_EGLKHRReusableSync_EGL_CONDITION_SATISFIED_KHR 12534L +#undef org_lwjgl_opengles_EGLKHRReusableSync_EGL_NO_SYNC_KHR +#define org_lwjgl_opengles_EGLKHRReusableSync_EGL_NO_SYNC_KHR 0i64 +/* + * Class: org_lwjgl_opengles_EGLKHRReusableSync + * Method: initNativeStubs + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_EGLKHRReusableSync_initNativeStubs + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengles_EGLKHRReusableSync + * Method: neglSignalSyncKHR + * Signature: (JJI)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGLKHRReusableSync_neglSignalSyncKHR + (JNIEnv *, jclass, jlong, jlong, jint); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_EGLNVSync.c b/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_EGLNVSync.c new file mode 100644 index 0000000..655a848 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_EGLNVSync.c @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include "common_tools.h" +#include "org_lwjgl_opengles_EGLNVSync.h" +#include "extgl_egl.h" + +static PFNEGLCREATEFENCESYNCNVPROC eglCreateFenceSyncNV; +static PFNEGLDESTROYSYNCNVPROC eglDestroySyncNV; +static PFNEGLFENCENVPROC eglFenceNV; +static PFNEGLCLIENTWAITSYNCNVPROC eglClientWaitSyncNV; +static PFNEGLSIGNALSYNCNVPROC eglSignalSyncNV; +static PFNEGLGETSYNCATTRIBNVPROC eglGetSyncAttribNV; + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengles_EGLNVSync_neglCreateFenceSyncNV(JNIEnv *env, jclass clazz, jlong dpy_ptr, jint condition, jlong attrib_list) { + EGLDisplay dpy = (EGLDisplay)(intptr_t)dpy_ptr; + const EGLint *attrib_list_address = (EGLint *)(intptr_t)attrib_list; + + return (intptr_t)eglCreateFenceSyncNV(dpy, condition, attrib_list_address); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGLNVSync_neglDestroySyncNV(JNIEnv *env, jclass clazz, jlong sync_ptr) { + EGLSyncNV sync = (EGLSyncNV)(intptr_t)sync_ptr; + + return eglDestroySyncNV(sync); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGLNVSync_neglFenceNV(JNIEnv *env, jclass clazz, jlong sync_ptr) { + EGLSyncNV sync = (EGLSyncNV)(intptr_t)sync_ptr; + + return eglFenceNV(sync); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengles_EGLNVSync_neglClientWaitSyncNV(JNIEnv *env, jclass clazz, jlong sync_ptr, jint flags, jlong timeout) { + EGLSyncNV sync = (EGLSyncNV)(intptr_t)sync_ptr; + + return eglClientWaitSyncNV(sync, flags, timeout); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGLNVSync_neglSignalSyncNV(JNIEnv *env, jclass clazz, jlong sync_ptr, jint mode) { + EGLSyncNV sync = (EGLSyncNV)(intptr_t)sync_ptr; + + return eglSignalSyncNV(sync, mode); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGLNVSync_neglGetSyncAttribNV(JNIEnv *env, jclass clazz, jlong sync_ptr, jint attribute, jlong value) { + EGLSyncNV sync = (EGLSyncNV)(intptr_t)sync_ptr; + EGLint *value_address = (EGLint *)(intptr_t)value; + + return eglGetSyncAttribNV(sync, attribute, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_EGLNVSync_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"neglCreateFenceSyncNV", "(JIJ)J", (void *)&Java_org_lwjgl_opengles_EGLNVSync_neglCreateFenceSyncNV, "eglCreateFenceSyncNV", (void *)&eglCreateFenceSyncNV, false}, + {"neglDestroySyncNV", "(J)Z", (void *)&Java_org_lwjgl_opengles_EGLNVSync_neglDestroySyncNV, "eglDestroySyncNV", (void *)&eglDestroySyncNV, false}, + {"neglFenceNV", "(J)Z", (void *)&Java_org_lwjgl_opengles_EGLNVSync_neglFenceNV, "eglFenceNV", (void *)&eglFenceNV, false}, + {"neglClientWaitSyncNV", "(JIJ)I", (void *)&Java_org_lwjgl_opengles_EGLNVSync_neglClientWaitSyncNV, "eglClientWaitSyncNV", (void *)&eglClientWaitSyncNV, false}, + {"neglSignalSyncNV", "(JI)Z", (void *)&Java_org_lwjgl_opengles_EGLNVSync_neglSignalSyncNV, "eglSignalSyncNV", (void *)&eglSignalSyncNV, false}, + {"neglGetSyncAttribNV", "(JIJ)Z", (void *)&Java_org_lwjgl_opengles_EGLNVSync_neglGetSyncAttribNV, "eglGetSyncAttribNV", (void *)&eglGetSyncAttribNV, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_EGLNVSync.h b/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_EGLNVSync.h new file mode 100644 index 0000000..e5566b4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_EGLNVSync.h @@ -0,0 +1,95 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengles_EGLNVSync */ + +#ifndef _Included_org_lwjgl_opengles_EGLNVSync +#define _Included_org_lwjgl_opengles_EGLNVSync +#ifdef __cplusplus +extern "C" { +#endif +#undef org_lwjgl_opengles_EGLNVSync_EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV +#define org_lwjgl_opengles_EGLNVSync_EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV 12518L +#undef org_lwjgl_opengles_EGLNVSync_EGL_SYNC_STATUS_NV +#define org_lwjgl_opengles_EGLNVSync_EGL_SYNC_STATUS_NV 12519L +#undef org_lwjgl_opengles_EGLNVSync_EGL_SIGNALED_NV +#define org_lwjgl_opengles_EGLNVSync_EGL_SIGNALED_NV 12520L +#undef org_lwjgl_opengles_EGLNVSync_EGL_UNSIGNALED_NV +#define org_lwjgl_opengles_EGLNVSync_EGL_UNSIGNALED_NV 12521L +#undef org_lwjgl_opengles_EGLNVSync_EGL_SYNC_FLUSH_COMMANDS_BIT_NV +#define org_lwjgl_opengles_EGLNVSync_EGL_SYNC_FLUSH_COMMANDS_BIT_NV 1L +#undef org_lwjgl_opengles_EGLNVSync_EGL_FOREVER_NV +#define org_lwjgl_opengles_EGLNVSync_EGL_FOREVER_NV -1i64 +#undef org_lwjgl_opengles_EGLNVSync_EGL_ALREADY_SIGNALED_NV +#define org_lwjgl_opengles_EGLNVSync_EGL_ALREADY_SIGNALED_NV 12522L +#undef org_lwjgl_opengles_EGLNVSync_EGL_TIMEOUT_EXPIRED_NV +#define org_lwjgl_opengles_EGLNVSync_EGL_TIMEOUT_EXPIRED_NV 12523L +#undef org_lwjgl_opengles_EGLNVSync_EGL_CONDITION_SATISFIED_NV +#define org_lwjgl_opengles_EGLNVSync_EGL_CONDITION_SATISFIED_NV 12524L +#undef org_lwjgl_opengles_EGLNVSync_EGL_SYNC_TYPE_NV +#define org_lwjgl_opengles_EGLNVSync_EGL_SYNC_TYPE_NV 12525L +#undef org_lwjgl_opengles_EGLNVSync_EGL_SYNC_CONDITION_NV +#define org_lwjgl_opengles_EGLNVSync_EGL_SYNC_CONDITION_NV 12526L +#undef org_lwjgl_opengles_EGLNVSync_EGL_SYNC_FENCE_NV +#define org_lwjgl_opengles_EGLNVSync_EGL_SYNC_FENCE_NV 12527L +#undef org_lwjgl_opengles_EGLNVSync_EGL_NO_SYNC_NV +#define org_lwjgl_opengles_EGLNVSync_EGL_NO_SYNC_NV 0i64 +/* + * Class: org_lwjgl_opengles_EGLNVSync + * Method: initNativeStubs + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_EGLNVSync_initNativeStubs + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengles_EGLNVSync + * Method: neglCreateFenceSyncNV + * Signature: (JIJ)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengles_EGLNVSync_neglCreateFenceSyncNV + (JNIEnv *, jclass, jlong, jint, jlong); + +/* + * Class: org_lwjgl_opengles_EGLNVSync + * Method: neglDestroySyncNV + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGLNVSync_neglDestroySyncNV + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengles_EGLNVSync + * Method: neglFenceNV + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGLNVSync_neglFenceNV + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengles_EGLNVSync + * Method: neglClientWaitSyncNV + * Signature: (JIJ)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengles_EGLNVSync_neglClientWaitSyncNV + (JNIEnv *, jclass, jlong, jint, jlong); + +/* + * Class: org_lwjgl_opengles_EGLNVSync + * Method: neglSignalSyncNV + * Signature: (JI)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGLNVSync_neglSignalSyncNV + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: org_lwjgl_opengles_EGLNVSync + * Method: neglGetSyncAttribNV + * Signature: (JIJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengles_EGLNVSync_neglGetSyncAttribNV + (JNIEnv *, jclass, jlong, jint, jlong); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_GLContext.c b/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_GLContext.c new file mode 100644 index 0000000..f7273f3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_GLContext.c @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include "common_tools.h" +#include "org_lwjgl_opengles_GLContext.h" +#include "extgl.h" + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_GLContext_nLoadOpenGLLibrary(JNIEnv * env, jclass clazz) { + extgl_Open(env); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_GLContext_nUnloadOpenGLLibrary(JNIEnv * env, jclass clazz) { + extgl_Close(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_GLContext_resetNativeStubs(JNIEnv *env, jclass clazz, jclass gl_class) { + //(*env)->UnregisterNatives(env, gl_class); +} diff --git a/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_GLContext.h b/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_GLContext.h new file mode 100644 index 0000000..5365e5a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_GLContext.h @@ -0,0 +1,37 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengles_GLContext */ + +#ifndef _Included_org_lwjgl_opengles_GLContext +#define _Included_org_lwjgl_opengles_GLContext +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_lwjgl_opengles_GLContext + * Method: nLoadOpenGLLibrary + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_GLContext_nLoadOpenGLLibrary + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengles_GLContext + * Method: nUnloadOpenGLLibrary + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_GLContext_nUnloadOpenGLLibrary + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengles_GLContext + * Method: resetNativeStubs + * Signature: (Ljava/lang/Class;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_GLContext_resetNativeStubs + (JNIEnv *, jclass, jclass); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_GLContext_CapabilitiesCacheEntry.h b/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_GLContext_CapabilitiesCacheEntry.h new file mode 100644 index 0000000..91d93aa --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/opengles/org_lwjgl_opengles_GLContext_CapabilitiesCacheEntry.h @@ -0,0 +1,13 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengles_GLContext_CapabilitiesCacheEntry */ + +#ifndef _Included_org_lwjgl_opengles_GLContext_CapabilitiesCacheEntry +#define _Included_org_lwjgl_opengles_GLContext_CapabilitiesCacheEntry +#ifdef __cplusplus +extern "C" { +#endif +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_BufferUtils.c b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_BufferUtils.c new file mode 100644 index 0000000..be80123 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_BufferUtils.c @@ -0,0 +1,10 @@ +#include "org_lwjgl_BufferUtils.h" +#include "common_tools.h" + +JNIEXPORT void JNICALL Java_org_lwjgl_BufferUtils_zeroBuffer0(JNIEnv *env, jclass clazz, jobject buffer, jlong offset, jlong size) { + memset((char*)(*env)->GetDirectBufferAddress(env, buffer) + (size_t)offset, 0, (size_t)size); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_BufferUtils_getBufferAddress(JNIEnv *env, jclass clazz, jobject buffer) { + return (intptr_t)(*env)->GetDirectBufferAddress(env, buffer); +} diff --git a/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_BufferUtils.h b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_BufferUtils.h new file mode 100644 index 0000000..021b058 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_BufferUtils.h @@ -0,0 +1,29 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_BufferUtils */ + +#ifndef _Included_org_lwjgl_BufferUtils +#define _Included_org_lwjgl_BufferUtils +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_lwjgl_BufferUtils + * Method: zeroBuffer0 + * Signature: (Ljava/nio/Buffer;JJ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_BufferUtils_zeroBuffer0 + (JNIEnv *, jclass, jobject, jlong, jlong); + +/* + * Class: org_lwjgl_BufferUtils + * Method: getBufferAddress + * Signature: (Ljava/nio/Buffer;)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_BufferUtils_getBufferAddress + (JNIEnv *, jclass, jobject); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_DefaultSysImplementation.h b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_DefaultSysImplementation.h new file mode 100644 index 0000000..6e79d59 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_DefaultSysImplementation.h @@ -0,0 +1,37 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_DefaultSysImplementation */ + +#ifndef _Included_org_lwjgl_DefaultSysImplementation +#define _Included_org_lwjgl_DefaultSysImplementation +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_lwjgl_DefaultSysImplementation + * Method: getJNIVersion + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_DefaultSysImplementation_getJNIVersion + (JNIEnv *, jobject); + +/* + * Class: org_lwjgl_DefaultSysImplementation + * Method: getPointerSize + * Signature: ()I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_DefaultSysImplementation_getPointerSize + (JNIEnv *, jobject); + +/* + * Class: org_lwjgl_DefaultSysImplementation + * Method: setDebug + * Signature: (Z)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_DefaultSysImplementation_setDebug + (JNIEnv *, jobject, jboolean); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_input_Cursor.h b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_input_Cursor.h new file mode 100644 index 0000000..237a511 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_input_Cursor.h @@ -0,0 +1,19 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_input_Cursor */ + +#ifndef _Included_org_lwjgl_input_Cursor +#define _Included_org_lwjgl_input_Cursor +#ifdef __cplusplus +extern "C" { +#endif +#undef org_lwjgl_input_Cursor_CURSOR_ONE_BIT_TRANSPARENCY +#define org_lwjgl_input_Cursor_CURSOR_ONE_BIT_TRANSPARENCY 1L +#undef org_lwjgl_input_Cursor_CURSOR_8_BIT_ALPHA +#define org_lwjgl_input_Cursor_CURSOR_8_BIT_ALPHA 2L +#undef org_lwjgl_input_Cursor_CURSOR_ANIMATION +#define org_lwjgl_input_Cursor_CURSOR_ANIMATION 4L +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_input_Cursor_CursorElement.h b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_input_Cursor_CursorElement.h new file mode 100644 index 0000000..85d73b3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_input_Cursor_CursorElement.h @@ -0,0 +1,13 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_input_Cursor_CursorElement */ + +#ifndef _Included_org_lwjgl_input_Cursor_CursorElement +#define _Included_org_lwjgl_input_Cursor_CursorElement +#ifdef __cplusplus +extern "C" { +#endif +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_input_Keyboard.h b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_input_Keyboard.h new file mode 100644 index 0000000..b3e61c6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_input_Keyboard.h @@ -0,0 +1,287 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_input_Keyboard */ + +#ifndef _Included_org_lwjgl_input_Keyboard +#define _Included_org_lwjgl_input_Keyboard +#ifdef __cplusplus +extern "C" { +#endif +#undef org_lwjgl_input_Keyboard_EVENT_SIZE +#define org_lwjgl_input_Keyboard_EVENT_SIZE 18L +#undef org_lwjgl_input_Keyboard_CHAR_NONE +#define org_lwjgl_input_Keyboard_CHAR_NONE 0L +#undef org_lwjgl_input_Keyboard_KEY_NONE +#define org_lwjgl_input_Keyboard_KEY_NONE 0L +#undef org_lwjgl_input_Keyboard_KEY_ESCAPE +#define org_lwjgl_input_Keyboard_KEY_ESCAPE 1L +#undef org_lwjgl_input_Keyboard_KEY_1 +#define org_lwjgl_input_Keyboard_KEY_1 2L +#undef org_lwjgl_input_Keyboard_KEY_2 +#define org_lwjgl_input_Keyboard_KEY_2 3L +#undef org_lwjgl_input_Keyboard_KEY_3 +#define org_lwjgl_input_Keyboard_KEY_3 4L +#undef org_lwjgl_input_Keyboard_KEY_4 +#define org_lwjgl_input_Keyboard_KEY_4 5L +#undef org_lwjgl_input_Keyboard_KEY_5 +#define org_lwjgl_input_Keyboard_KEY_5 6L +#undef org_lwjgl_input_Keyboard_KEY_6 +#define org_lwjgl_input_Keyboard_KEY_6 7L +#undef org_lwjgl_input_Keyboard_KEY_7 +#define org_lwjgl_input_Keyboard_KEY_7 8L +#undef org_lwjgl_input_Keyboard_KEY_8 +#define org_lwjgl_input_Keyboard_KEY_8 9L +#undef org_lwjgl_input_Keyboard_KEY_9 +#define org_lwjgl_input_Keyboard_KEY_9 10L +#undef org_lwjgl_input_Keyboard_KEY_0 +#define org_lwjgl_input_Keyboard_KEY_0 11L +#undef org_lwjgl_input_Keyboard_KEY_MINUS +#define org_lwjgl_input_Keyboard_KEY_MINUS 12L +#undef org_lwjgl_input_Keyboard_KEY_EQUALS +#define org_lwjgl_input_Keyboard_KEY_EQUALS 13L +#undef org_lwjgl_input_Keyboard_KEY_BACK +#define org_lwjgl_input_Keyboard_KEY_BACK 14L +#undef org_lwjgl_input_Keyboard_KEY_TAB +#define org_lwjgl_input_Keyboard_KEY_TAB 15L +#undef org_lwjgl_input_Keyboard_KEY_Q +#define org_lwjgl_input_Keyboard_KEY_Q 16L +#undef org_lwjgl_input_Keyboard_KEY_W +#define org_lwjgl_input_Keyboard_KEY_W 17L +#undef org_lwjgl_input_Keyboard_KEY_E +#define org_lwjgl_input_Keyboard_KEY_E 18L +#undef org_lwjgl_input_Keyboard_KEY_R +#define org_lwjgl_input_Keyboard_KEY_R 19L +#undef org_lwjgl_input_Keyboard_KEY_T +#define org_lwjgl_input_Keyboard_KEY_T 20L +#undef org_lwjgl_input_Keyboard_KEY_Y +#define org_lwjgl_input_Keyboard_KEY_Y 21L +#undef org_lwjgl_input_Keyboard_KEY_U +#define org_lwjgl_input_Keyboard_KEY_U 22L +#undef org_lwjgl_input_Keyboard_KEY_I +#define org_lwjgl_input_Keyboard_KEY_I 23L +#undef org_lwjgl_input_Keyboard_KEY_O +#define org_lwjgl_input_Keyboard_KEY_O 24L +#undef org_lwjgl_input_Keyboard_KEY_P +#define org_lwjgl_input_Keyboard_KEY_P 25L +#undef org_lwjgl_input_Keyboard_KEY_LBRACKET +#define org_lwjgl_input_Keyboard_KEY_LBRACKET 26L +#undef org_lwjgl_input_Keyboard_KEY_RBRACKET +#define org_lwjgl_input_Keyboard_KEY_RBRACKET 27L +#undef org_lwjgl_input_Keyboard_KEY_RETURN +#define org_lwjgl_input_Keyboard_KEY_RETURN 28L +#undef org_lwjgl_input_Keyboard_KEY_LCONTROL +#define org_lwjgl_input_Keyboard_KEY_LCONTROL 29L +#undef org_lwjgl_input_Keyboard_KEY_A +#define org_lwjgl_input_Keyboard_KEY_A 30L +#undef org_lwjgl_input_Keyboard_KEY_S +#define org_lwjgl_input_Keyboard_KEY_S 31L +#undef org_lwjgl_input_Keyboard_KEY_D +#define org_lwjgl_input_Keyboard_KEY_D 32L +#undef org_lwjgl_input_Keyboard_KEY_F +#define org_lwjgl_input_Keyboard_KEY_F 33L +#undef org_lwjgl_input_Keyboard_KEY_G +#define org_lwjgl_input_Keyboard_KEY_G 34L +#undef org_lwjgl_input_Keyboard_KEY_H +#define org_lwjgl_input_Keyboard_KEY_H 35L +#undef org_lwjgl_input_Keyboard_KEY_J +#define org_lwjgl_input_Keyboard_KEY_J 36L +#undef org_lwjgl_input_Keyboard_KEY_K +#define org_lwjgl_input_Keyboard_KEY_K 37L +#undef org_lwjgl_input_Keyboard_KEY_L +#define org_lwjgl_input_Keyboard_KEY_L 38L +#undef org_lwjgl_input_Keyboard_KEY_SEMICOLON +#define org_lwjgl_input_Keyboard_KEY_SEMICOLON 39L +#undef org_lwjgl_input_Keyboard_KEY_APOSTROPHE +#define org_lwjgl_input_Keyboard_KEY_APOSTROPHE 40L +#undef org_lwjgl_input_Keyboard_KEY_GRAVE +#define org_lwjgl_input_Keyboard_KEY_GRAVE 41L +#undef org_lwjgl_input_Keyboard_KEY_LSHIFT +#define org_lwjgl_input_Keyboard_KEY_LSHIFT 42L +#undef org_lwjgl_input_Keyboard_KEY_BACKSLASH +#define org_lwjgl_input_Keyboard_KEY_BACKSLASH 43L +#undef org_lwjgl_input_Keyboard_KEY_Z +#define org_lwjgl_input_Keyboard_KEY_Z 44L +#undef org_lwjgl_input_Keyboard_KEY_X +#define org_lwjgl_input_Keyboard_KEY_X 45L +#undef org_lwjgl_input_Keyboard_KEY_C +#define org_lwjgl_input_Keyboard_KEY_C 46L +#undef org_lwjgl_input_Keyboard_KEY_V +#define org_lwjgl_input_Keyboard_KEY_V 47L +#undef org_lwjgl_input_Keyboard_KEY_B +#define org_lwjgl_input_Keyboard_KEY_B 48L +#undef org_lwjgl_input_Keyboard_KEY_N +#define org_lwjgl_input_Keyboard_KEY_N 49L +#undef org_lwjgl_input_Keyboard_KEY_M +#define org_lwjgl_input_Keyboard_KEY_M 50L +#undef org_lwjgl_input_Keyboard_KEY_COMMA +#define org_lwjgl_input_Keyboard_KEY_COMMA 51L +#undef org_lwjgl_input_Keyboard_KEY_PERIOD +#define org_lwjgl_input_Keyboard_KEY_PERIOD 52L +#undef org_lwjgl_input_Keyboard_KEY_SLASH +#define org_lwjgl_input_Keyboard_KEY_SLASH 53L +#undef org_lwjgl_input_Keyboard_KEY_RSHIFT +#define org_lwjgl_input_Keyboard_KEY_RSHIFT 54L +#undef org_lwjgl_input_Keyboard_KEY_MULTIPLY +#define org_lwjgl_input_Keyboard_KEY_MULTIPLY 55L +#undef org_lwjgl_input_Keyboard_KEY_LMENU +#define org_lwjgl_input_Keyboard_KEY_LMENU 56L +#undef org_lwjgl_input_Keyboard_KEY_SPACE +#define org_lwjgl_input_Keyboard_KEY_SPACE 57L +#undef org_lwjgl_input_Keyboard_KEY_CAPITAL +#define org_lwjgl_input_Keyboard_KEY_CAPITAL 58L +#undef org_lwjgl_input_Keyboard_KEY_F1 +#define org_lwjgl_input_Keyboard_KEY_F1 59L +#undef org_lwjgl_input_Keyboard_KEY_F2 +#define org_lwjgl_input_Keyboard_KEY_F2 60L +#undef org_lwjgl_input_Keyboard_KEY_F3 +#define org_lwjgl_input_Keyboard_KEY_F3 61L +#undef org_lwjgl_input_Keyboard_KEY_F4 +#define org_lwjgl_input_Keyboard_KEY_F4 62L +#undef org_lwjgl_input_Keyboard_KEY_F5 +#define org_lwjgl_input_Keyboard_KEY_F5 63L +#undef org_lwjgl_input_Keyboard_KEY_F6 +#define org_lwjgl_input_Keyboard_KEY_F6 64L +#undef org_lwjgl_input_Keyboard_KEY_F7 +#define org_lwjgl_input_Keyboard_KEY_F7 65L +#undef org_lwjgl_input_Keyboard_KEY_F8 +#define org_lwjgl_input_Keyboard_KEY_F8 66L +#undef org_lwjgl_input_Keyboard_KEY_F9 +#define org_lwjgl_input_Keyboard_KEY_F9 67L +#undef org_lwjgl_input_Keyboard_KEY_F10 +#define org_lwjgl_input_Keyboard_KEY_F10 68L +#undef org_lwjgl_input_Keyboard_KEY_NUMLOCK +#define org_lwjgl_input_Keyboard_KEY_NUMLOCK 69L +#undef org_lwjgl_input_Keyboard_KEY_SCROLL +#define org_lwjgl_input_Keyboard_KEY_SCROLL 70L +#undef org_lwjgl_input_Keyboard_KEY_NUMPAD7 +#define org_lwjgl_input_Keyboard_KEY_NUMPAD7 71L +#undef org_lwjgl_input_Keyboard_KEY_NUMPAD8 +#define org_lwjgl_input_Keyboard_KEY_NUMPAD8 72L +#undef org_lwjgl_input_Keyboard_KEY_NUMPAD9 +#define org_lwjgl_input_Keyboard_KEY_NUMPAD9 73L +#undef org_lwjgl_input_Keyboard_KEY_SUBTRACT +#define org_lwjgl_input_Keyboard_KEY_SUBTRACT 74L +#undef org_lwjgl_input_Keyboard_KEY_NUMPAD4 +#define org_lwjgl_input_Keyboard_KEY_NUMPAD4 75L +#undef org_lwjgl_input_Keyboard_KEY_NUMPAD5 +#define org_lwjgl_input_Keyboard_KEY_NUMPAD5 76L +#undef org_lwjgl_input_Keyboard_KEY_NUMPAD6 +#define org_lwjgl_input_Keyboard_KEY_NUMPAD6 77L +#undef org_lwjgl_input_Keyboard_KEY_ADD +#define org_lwjgl_input_Keyboard_KEY_ADD 78L +#undef org_lwjgl_input_Keyboard_KEY_NUMPAD1 +#define org_lwjgl_input_Keyboard_KEY_NUMPAD1 79L +#undef org_lwjgl_input_Keyboard_KEY_NUMPAD2 +#define org_lwjgl_input_Keyboard_KEY_NUMPAD2 80L +#undef org_lwjgl_input_Keyboard_KEY_NUMPAD3 +#define org_lwjgl_input_Keyboard_KEY_NUMPAD3 81L +#undef org_lwjgl_input_Keyboard_KEY_NUMPAD0 +#define org_lwjgl_input_Keyboard_KEY_NUMPAD0 82L +#undef org_lwjgl_input_Keyboard_KEY_DECIMAL +#define org_lwjgl_input_Keyboard_KEY_DECIMAL 83L +#undef org_lwjgl_input_Keyboard_KEY_F11 +#define org_lwjgl_input_Keyboard_KEY_F11 87L +#undef org_lwjgl_input_Keyboard_KEY_F12 +#define org_lwjgl_input_Keyboard_KEY_F12 88L +#undef org_lwjgl_input_Keyboard_KEY_F13 +#define org_lwjgl_input_Keyboard_KEY_F13 100L +#undef org_lwjgl_input_Keyboard_KEY_F14 +#define org_lwjgl_input_Keyboard_KEY_F14 101L +#undef org_lwjgl_input_Keyboard_KEY_F15 +#define org_lwjgl_input_Keyboard_KEY_F15 102L +#undef org_lwjgl_input_Keyboard_KEY_F16 +#define org_lwjgl_input_Keyboard_KEY_F16 103L +#undef org_lwjgl_input_Keyboard_KEY_F17 +#define org_lwjgl_input_Keyboard_KEY_F17 104L +#undef org_lwjgl_input_Keyboard_KEY_F18 +#define org_lwjgl_input_Keyboard_KEY_F18 105L +#undef org_lwjgl_input_Keyboard_KEY_KANA +#define org_lwjgl_input_Keyboard_KEY_KANA 112L +#undef org_lwjgl_input_Keyboard_KEY_F19 +#define org_lwjgl_input_Keyboard_KEY_F19 113L +#undef org_lwjgl_input_Keyboard_KEY_CONVERT +#define org_lwjgl_input_Keyboard_KEY_CONVERT 121L +#undef org_lwjgl_input_Keyboard_KEY_NOCONVERT +#define org_lwjgl_input_Keyboard_KEY_NOCONVERT 123L +#undef org_lwjgl_input_Keyboard_KEY_YEN +#define org_lwjgl_input_Keyboard_KEY_YEN 125L +#undef org_lwjgl_input_Keyboard_KEY_NUMPADEQUALS +#define org_lwjgl_input_Keyboard_KEY_NUMPADEQUALS 141L +#undef org_lwjgl_input_Keyboard_KEY_CIRCUMFLEX +#define org_lwjgl_input_Keyboard_KEY_CIRCUMFLEX 144L +#undef org_lwjgl_input_Keyboard_KEY_AT +#define org_lwjgl_input_Keyboard_KEY_AT 145L +#undef org_lwjgl_input_Keyboard_KEY_COLON +#define org_lwjgl_input_Keyboard_KEY_COLON 146L +#undef org_lwjgl_input_Keyboard_KEY_UNDERLINE +#define org_lwjgl_input_Keyboard_KEY_UNDERLINE 147L +#undef org_lwjgl_input_Keyboard_KEY_KANJI +#define org_lwjgl_input_Keyboard_KEY_KANJI 148L +#undef org_lwjgl_input_Keyboard_KEY_STOP +#define org_lwjgl_input_Keyboard_KEY_STOP 149L +#undef org_lwjgl_input_Keyboard_KEY_AX +#define org_lwjgl_input_Keyboard_KEY_AX 150L +#undef org_lwjgl_input_Keyboard_KEY_UNLABELED +#define org_lwjgl_input_Keyboard_KEY_UNLABELED 151L +#undef org_lwjgl_input_Keyboard_KEY_NUMPADENTER +#define org_lwjgl_input_Keyboard_KEY_NUMPADENTER 156L +#undef org_lwjgl_input_Keyboard_KEY_RCONTROL +#define org_lwjgl_input_Keyboard_KEY_RCONTROL 157L +#undef org_lwjgl_input_Keyboard_KEY_SECTION +#define org_lwjgl_input_Keyboard_KEY_SECTION 167L +#undef org_lwjgl_input_Keyboard_KEY_NUMPADCOMMA +#define org_lwjgl_input_Keyboard_KEY_NUMPADCOMMA 179L +#undef org_lwjgl_input_Keyboard_KEY_DIVIDE +#define org_lwjgl_input_Keyboard_KEY_DIVIDE 181L +#undef org_lwjgl_input_Keyboard_KEY_SYSRQ +#define org_lwjgl_input_Keyboard_KEY_SYSRQ 183L +#undef org_lwjgl_input_Keyboard_KEY_RMENU +#define org_lwjgl_input_Keyboard_KEY_RMENU 184L +#undef org_lwjgl_input_Keyboard_KEY_FUNCTION +#define org_lwjgl_input_Keyboard_KEY_FUNCTION 196L +#undef org_lwjgl_input_Keyboard_KEY_PAUSE +#define org_lwjgl_input_Keyboard_KEY_PAUSE 197L +#undef org_lwjgl_input_Keyboard_KEY_HOME +#define org_lwjgl_input_Keyboard_KEY_HOME 199L +#undef org_lwjgl_input_Keyboard_KEY_UP +#define org_lwjgl_input_Keyboard_KEY_UP 200L +#undef org_lwjgl_input_Keyboard_KEY_PRIOR +#define org_lwjgl_input_Keyboard_KEY_PRIOR 201L +#undef org_lwjgl_input_Keyboard_KEY_LEFT +#define org_lwjgl_input_Keyboard_KEY_LEFT 203L +#undef org_lwjgl_input_Keyboard_KEY_RIGHT +#define org_lwjgl_input_Keyboard_KEY_RIGHT 205L +#undef org_lwjgl_input_Keyboard_KEY_END +#define org_lwjgl_input_Keyboard_KEY_END 207L +#undef org_lwjgl_input_Keyboard_KEY_DOWN +#define org_lwjgl_input_Keyboard_KEY_DOWN 208L +#undef org_lwjgl_input_Keyboard_KEY_NEXT +#define org_lwjgl_input_Keyboard_KEY_NEXT 209L +#undef org_lwjgl_input_Keyboard_KEY_INSERT +#define org_lwjgl_input_Keyboard_KEY_INSERT 210L +#undef org_lwjgl_input_Keyboard_KEY_DELETE +#define org_lwjgl_input_Keyboard_KEY_DELETE 211L +#undef org_lwjgl_input_Keyboard_KEY_CLEAR +#define org_lwjgl_input_Keyboard_KEY_CLEAR 218L +#undef org_lwjgl_input_Keyboard_KEY_LMETA +#define org_lwjgl_input_Keyboard_KEY_LMETA 219L +#undef org_lwjgl_input_Keyboard_KEY_LWIN +#define org_lwjgl_input_Keyboard_KEY_LWIN 219L +#undef org_lwjgl_input_Keyboard_KEY_RMETA +#define org_lwjgl_input_Keyboard_KEY_RMETA 220L +#undef org_lwjgl_input_Keyboard_KEY_RWIN +#define org_lwjgl_input_Keyboard_KEY_RWIN 220L +#undef org_lwjgl_input_Keyboard_KEY_APPS +#define org_lwjgl_input_Keyboard_KEY_APPS 221L +#undef org_lwjgl_input_Keyboard_KEY_POWER +#define org_lwjgl_input_Keyboard_KEY_POWER 222L +#undef org_lwjgl_input_Keyboard_KEY_SLEEP +#define org_lwjgl_input_Keyboard_KEY_SLEEP 223L +#undef org_lwjgl_input_Keyboard_KEYBOARD_SIZE +#define org_lwjgl_input_Keyboard_KEYBOARD_SIZE 256L +#undef org_lwjgl_input_Keyboard_BUFFER_SIZE +#define org_lwjgl_input_Keyboard_BUFFER_SIZE 50L +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_input_Keyboard_KeyEvent.h b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_input_Keyboard_KeyEvent.h new file mode 100644 index 0000000..01044d5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_input_Keyboard_KeyEvent.h @@ -0,0 +1,13 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_input_Keyboard_KeyEvent */ + +#ifndef _Included_org_lwjgl_input_Keyboard_KeyEvent +#define _Included_org_lwjgl_input_Keyboard_KeyEvent +#ifdef __cplusplus +extern "C" { +#endif +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_input_Mouse.h b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_input_Mouse.h new file mode 100644 index 0000000..f23a453 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_input_Mouse.h @@ -0,0 +1,17 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_input_Mouse */ + +#ifndef _Included_org_lwjgl_input_Mouse +#define _Included_org_lwjgl_input_Mouse +#ifdef __cplusplus +extern "C" { +#endif +#undef org_lwjgl_input_Mouse_EVENT_SIZE +#define org_lwjgl_input_Mouse_EVENT_SIZE 22L +#undef org_lwjgl_input_Mouse_BUFFER_SIZE +#define org_lwjgl_input_Mouse_BUFFER_SIZE 50L +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_openal_AL.c b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_openal_AL.c new file mode 100644 index 0000000..8963f92 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_openal_AL.c @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include "org_lwjgl_openal_AL.h" +#include "extal.h" + +JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL_nCreate(JNIEnv *env, jclass clazz, jstring oalPath) { + extal_LoadLibrary(env, oalPath); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL_nDestroy(JNIEnv *env, jclass clazz) { + extal_UnloadLibrary(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL_resetNativeStubs(JNIEnv *env, jclass clazz, jclass al_class) { + (*env)->UnregisterNatives(env, al_class); +} diff --git a/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_openal_AL.h b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_openal_AL.h new file mode 100644 index 0000000..8844807 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_openal_AL.h @@ -0,0 +1,45 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_openal_AL */ + +#ifndef _Included_org_lwjgl_openal_AL +#define _Included_org_lwjgl_openal_AL +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_lwjgl_openal_AL + * Method: nCreate + * Signature: (Ljava/lang/String;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL_nCreate + (JNIEnv *, jclass, jstring); + +/* + * Class: org_lwjgl_openal_AL + * Method: nCreateDefault + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL_nCreateDefault + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_openal_AL + * Method: nDestroy + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL_nDestroy + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_openal_AL + * Method: resetNativeStubs + * Signature: (Ljava/lang/Class;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL_resetNativeStubs + (JNIEnv *, jclass, jclass); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_openal_ALC10.c b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_openal_ALC10.c new file mode 100644 index 0000000..6764ef6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_openal_ALC10.c @@ -0,0 +1,287 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id: org_lwjgl_openal_ALC.c 2279 2006-02-23 19:22:00Z elias_naur $ + * + * This is the actual JNI implementation of the OpenAL context/device library. + * + * @author Brian Matzon + * @version $Revision: 2279 $ + */ + +/* OpenAL includes */ +#include "extal.h" + +//alc +typedef ALCubyte* (ALCAPIENTRY *alcGetStringPROC)(ALCdevice *device,ALCenum param); +typedef ALCvoid (ALCAPIENTRY *alcGetIntegervPROC)(ALCdevice *device,ALCenum param,ALCsizei size,ALCint *data); +typedef ALCdevice* (ALCAPIENTRY *alcOpenDevicePROC)(ALCubyte *deviceName); +typedef ALCboolean (ALCAPIENTRY *alcCloseDevicePROC)(ALCdevice *device); +typedef ALCcontext* (ALCAPIENTRY *alcCreateContextPROC)(ALCdevice *device,ALCint *attrList); +typedef ALCenum (ALCAPIENTRY *alcMakeContextCurrentPROC)(ALCcontext *context); +typedef ALCvoid (ALCAPIENTRY *alcProcessContextPROC)(ALCcontext *context); +typedef ALCdevice* (ALCAPIENTRY *alcGetContextsDevicePROC)(ALCcontext *context); +typedef ALCvoid (ALCAPIENTRY *alcSuspendContextPROC)(ALCcontext *context); +typedef ALCvoid (ALCAPIENTRY *alcDestroyContextPROC)(ALCcontext *context); +typedef ALCenum (ALCAPIENTRY *alcGetErrorPROC)(ALCdevice *device); +typedef ALCboolean (ALCAPIENTRY *alcIsExtensionPresentPROC)(ALCdevice *device,ALCubyte *extName); +//typedef ALCvoid* (ALCAPIENTRY *alcGetProcAddressPROC)(ALCdevice *device,ALCubyte *funcName); +typedef ALCenum (ALCAPIENTRY *alcGetEnumValuePROC)(ALCdevice *device,ALCubyte *enumName); +typedef ALCcontext* (ALCAPIENTRY *alcGetCurrentContextPROC)(ALCvoid); + +static alcGetCurrentContextPROC alcGetCurrentContext = NULL; +static alcGetStringPROC alcGetString; +static alcGetIntegervPROC alcGetIntegerv; +static alcOpenDevicePROC alcOpenDevice; +static alcCloseDevicePROC alcCloseDevice; +static alcCreateContextPROC alcCreateContext; +static alcMakeContextCurrentPROC alcMakeContextCurrent; +static alcProcessContextPROC alcProcessContext; +static alcGetContextsDevicePROC alcGetContextsDevice; +static alcSuspendContextPROC alcSuspendContext; +static alcDestroyContextPROC alcDestroyContext; +static alcGetErrorPROC alcGetError; +static alcIsExtensionPresentPROC alcIsExtensionPresent; +//static alcGetProcAddressPROC alcGetProcAddress; +static alcGetEnumValuePROC alcGetEnumValue; + +/** + * This function returns strings related to the context. + * + * C Specification: + * ALubyte * alcGetString(ALCdevice *device, ALenum token); + */ +static jobject JNICALL Java_org_lwjgl_openal_ALC10_nalcGetString (JNIEnv *env, jclass clazz, jlong deviceaddress, jint token) { + char* alcString = (char*) alcGetString((ALCdevice*)((intptr_t)deviceaddress), (ALenum) token); + size_t length; + int i=1; + + if (alcString == NULL) { + return NULL; + } + + // Special treatment of enumeration tokens + // These are encoded using \0 between elements and a finishing \0\0 + switch(token) { + case 0x1005: // ALC_DEVICE_SPECIFIER + case 0x310: // ALC_CAPTURE_DEVICE_SPECIFIER + // If deviceaddress is not 0, OpenAL returns a single device terminated by a + // single \0 character, if token is ALC_DEVICE_SPECIFIER or + // ALC_CAPTURE_DEVICE_SPECIFIER. + if (deviceaddress != 0) { + length = strlen(alcString); + break; + } + case 0x1013: // ALC_ALL_DEVICES_SPECIFIER + while (alcString[i - 1] != '\0' || alcString[i] != '\0') { + i++; + } + length = i + 1; + break; + default: // e.g. ALC_DEFAULT_ALL_DEVICES_SPECIFIER + length = strlen(alcString); + } + //return NewStringNativeWithLength(env, alcString, length); + return safeNewBuffer(env, alcString, length); +} + +/** + * This function returns integers related to the context. + * + * C Specification: + * ALvoid alcGetIntegerv(ALCdevice *device, ALenum token, ALsizei size, ALint *dest); + */ +static void JNICALL Java_org_lwjgl_openal_ALC10_nalcGetIntegerv (JNIEnv *env, jclass clazz, jlong deviceaddress, jint token, jint size, jlong dest) { + ALint* dest_address = (ALint*)(intptr_t)dest; + alcGetIntegerv((ALCdevice*)((intptr_t)deviceaddress), (ALenum) token, (ALsizei) size, dest_address); +} + +/** + * This function opens a device by name. + * + * C Specification: + * ALCdevice *alcOpenDevice( const ALubyte *tokstr ); + */ +static jlong JNICALL Java_org_lwjgl_openal_ALC10_nalcOpenDevice (JNIEnv *env, jclass clazz, jlong tokstr) { + return (jlong)(intptr_t)alcOpenDevice((ALubyte *)(intptr_t)tokstr); +} + +/** + * This function closes a device by name. + * + * C Specification: + * bool alcCloseDevice( ALCdevice *dev ); + */ +static jboolean JNICALL Java_org_lwjgl_openal_ALC10_nalcCloseDevice (JNIEnv *env, jclass clazz, jlong deviceaddress) { + return alcCloseDevice((ALCdevice*)((intptr_t)deviceaddress)); +} + +/** + * This function creates a context using a specified device. + * + * C Specification: + * ALCcontext* alcCreateContext( ALCdevice *dev, ALint* attrlist ); + */ +static jlong JNICALL Java_org_lwjgl_openal_ALC10_nalcCreateContext (JNIEnv *env, jclass clazz, jlong deviceaddress, jlong attrlist) { + ALint* attrlist_address = (ALint*)(intptr_t)attrlist; + ALCcontext* context; + + context = alcCreateContext((ALCdevice*)((intptr_t)deviceaddress), attrlist_address); + + return (jlong)((intptr_t)context); +} + +/** + * This function makes a specified context the current context. + * + * C Specification: + * ALCboolean alcMakeContextCurrent(ALCcontext *context); + */ +static jint JNICALL Java_org_lwjgl_openal_ALC10_nalcMakeContextCurrent (JNIEnv *env, jclass clazz, jlong contextaddress) { + ALCcontext* context = (ALCcontext*)((intptr_t)contextaddress); + return alcMakeContextCurrent(context); +} + +/** + * This function tells a context to begin processing. + * + * C Specification: + * void alcProcessContext(ALCcontext *context); + */ +static void JNICALL Java_org_lwjgl_openal_ALC10_nalcProcessContext (JNIEnv *env, jclass clazz, jlong contextaddress) { + alcProcessContext((ALCcontext*)((intptr_t)contextaddress)); +} + +/** + * This function retrieves the current context. + * + * C Specification: + * ALCcontext* alcGetCurrentContext( ALvoid ); + */ +static jlong JNICALL Java_org_lwjgl_openal_ALC10_nalcGetCurrentContext (JNIEnv *env, jclass clazz) { + ALCcontext* context = alcGetCurrentContext(); + return (jlong)((intptr_t)context); +} + +/** + * This function retrieves the specified contexts device + * + * C Specification: + * ALCdevice* alcGetContextsDevice(ALCcontext *context); + */ +static jlong JNICALL Java_org_lwjgl_openal_ALC10_nalcGetContextsDevice (JNIEnv *env, jclass clazz, jlong contextaddress) { + ALCdevice* device = alcGetContextsDevice((ALCcontext*)((intptr_t)contextaddress)); + return (jlong)((intptr_t)device); +} + +/** + * This function suspends processing on a specified context. + * + * C Specification: + * void alcSuspendContext(ALCcontext *context); + */ +static void JNICALL Java_org_lwjgl_openal_ALC10_nalcSuspendContext (JNIEnv *env, jclass clazz, jlong contextaddress) { + alcSuspendContext((ALCcontext*)((intptr_t)contextaddress)); +} + +/** + * This function destroys a context. + * + * C Specification: + * void alcDestroyContext(ALCcontext *context); + */ +static void JNICALL Java_org_lwjgl_openal_ALC10_nalcDestroyContext (JNIEnv *env, jclass clazz, jlong contextaddress) { + alcDestroyContext((ALCcontext*)((intptr_t)contextaddress)); +} + +/** + * This function retrieves the specified devices context error state. + * + * C Specification: + * ALCenum alcGetError(ALCdevice *device); + */ +static jint JNICALL Java_org_lwjgl_openal_ALC10_nalcGetError (JNIEnv *env, jclass clazz, jlong deviceaddress) { + return alcGetError((ALCdevice*)((intptr_t)deviceaddress)); +} + +/** + * This function queries if a specified context extension is available. + * + * C Specification: + * ALboolean alcIsExtensionPresent(ALCdevice *device, ALubyte *extName); + */ +static jboolean JNICALL Java_org_lwjgl_openal_ALC10_nalcIsExtensionPresent (JNIEnv *env, jclass clazz, jlong deviceaddress, jlong extName) { + return (jboolean) alcIsExtensionPresent((ALCdevice*)((intptr_t)deviceaddress), (ALubyte*)(intptr_t)extName); +} + +/** + * This function retrieves the enum value for a specified enumeration name. + * + * C Specification: + * ALenum alcGetEnumValue(ALCdevice *device, ALubyte *enumName); + */ +static jint JNICALL Java_org_lwjgl_openal_ALC10_nalcGetEnumValue (JNIEnv *env, jclass clazz, jlong deviceaddress, jlong enumName) { + return (jint) alcGetEnumValue((ALCdevice*)((intptr_t)deviceaddress), (ALubyte*)(intptr_t)enumName); +} + +/** + * Loads the context OpenAL functions + * + * @return true if all methods were loaded, false if one of the methods could not be loaded + */ +#ifdef __cplusplus +extern "C" { +#endif +JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALC10_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nalcGetString", "(JI)Ljava/nio/ByteBuffer;", (void*)&Java_org_lwjgl_openal_ALC10_nalcGetString, "alcGetString", (void*)&alcGetString, false}, + {"nalcGetIntegerv", "(JIIJ)V", (void*)&Java_org_lwjgl_openal_ALC10_nalcGetIntegerv, "alcGetIntegerv", (void*)&alcGetIntegerv, false}, + {"nalcOpenDevice", "(J)J", (void*)&Java_org_lwjgl_openal_ALC10_nalcOpenDevice, "alcOpenDevice", (void*)&alcOpenDevice, false}, + {"nalcCloseDevice", "(J)Z", (void*)&Java_org_lwjgl_openal_ALC10_nalcCloseDevice, "alcCloseDevice", (void*)&alcCloseDevice, false}, + {"nalcCreateContext", "(JJ)J", (void*)&Java_org_lwjgl_openal_ALC10_nalcCreateContext, "alcCreateContext", (void*)&alcCreateContext, false}, + {"nalcMakeContextCurrent", "(J)I", (void*)&Java_org_lwjgl_openal_ALC10_nalcMakeContextCurrent, "alcMakeContextCurrent", (void*)&alcMakeContextCurrent, false}, + {"nalcProcessContext", "(J)V", (void*)&Java_org_lwjgl_openal_ALC10_nalcProcessContext, "alcProcessContext", (void*)&alcProcessContext, false}, + {"nalcGetCurrentContext", "()J", (void*)&Java_org_lwjgl_openal_ALC10_nalcGetCurrentContext, "alcGetCurrentContext", (void*)&alcGetCurrentContext, false}, + {"nalcGetContextsDevice", "(J)J", (void*)&Java_org_lwjgl_openal_ALC10_nalcGetContextsDevice, "alcGetContextsDevice", (void*)&alcGetContextsDevice, false}, + {"nalcSuspendContext", "(J)V", (void*)&Java_org_lwjgl_openal_ALC10_nalcSuspendContext, "alcSuspendContext", (void*)&alcSuspendContext, false}, + {"nalcDestroyContext", "(J)V", (void*)&Java_org_lwjgl_openal_ALC10_nalcDestroyContext, "alcDestroyContext", (void*)&alcDestroyContext, false}, + {"nalcGetError", "(J)I", (void*)&Java_org_lwjgl_openal_ALC10_nalcGetError, "alcGetError", (void*)&alcGetError, false}, + {"nalcIsExtensionPresent", "(JJ)Z", (void*)&Java_org_lwjgl_openal_ALC10_nalcIsExtensionPresent, "alcIsExtensionPresent", (void*)&alcIsExtensionPresent, false}, + {"nalcGetEnumValue", "(JJ)I", (void*)&Java_org_lwjgl_openal_ALC10_nalcGetEnumValue, "alcGetEnumValue", (void*)&alcGetEnumValue, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extal_InitializeClass(env, clazz, num_functions, functions); +} +#ifdef __cplusplus +} +#endif diff --git a/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_openal_ALC11.c b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_openal_ALC11.c new file mode 100644 index 0000000..38b157c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_openal_ALC11.c @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id: org_lwjgl_openal_ALC.c 2279 2006-02-23 19:22:00Z elias_naur $ + * + * This is the actual JNI implementation of the OpenAL context/device library. + * + * @author Brian Matzon + * @version $Revision: 2279 $ + */ + +/* OpenAL includes */ +#include "extal.h" + +//alc +typedef ALCdevice * (ALCAPIENTRY *alcCaptureOpenDevicePROC)( const ALCchar *devicename, ALCuint frequency, ALCenum format, ALCsizei buffersize ); +typedef ALCboolean (ALCAPIENTRY *alcCaptureCloseDevicePROC)( ALCdevice *device ); +typedef void (ALCAPIENTRY *alcCaptureStartPROC)( ALCdevice *device ); +typedef void (ALCAPIENTRY *alcCaptureStopPROC)( ALCdevice *device ); +typedef void (ALCAPIENTRY *alcCaptureSamplesPROC)( ALCdevice *device, ALCvoid *buffer, ALCsizei samples ); + +static alcCaptureOpenDevicePROC alcCaptureOpenDevice; +static alcCaptureCloseDevicePROC alcCaptureCloseDevice; +static alcCaptureStartPROC alcCaptureStart; +static alcCaptureStopPROC alcCaptureStop; +static alcCaptureSamplesPROC alcCaptureSamples; + +/* + * Class: org_lwjgl_openal_ALC11 + * Method: nalcCaptureOpenDevice + * Signature: (Ljava/lang/String;III)J + */ +static jlong JNICALL Java_org_lwjgl_openal_ALC11_nalcCaptureOpenDevice(JNIEnv *env, jclass clazz, jlong devicename, jint frequency, jint format, jint buffersize) { + return (jlong)(intptr_t)alcCaptureOpenDevice((const char *)(intptr_t)devicename, (unsigned int) frequency, format, buffersize); +} + +/* + * Class: org_lwjgl_openal_ALC11 + * Method: nalcCaptureCloseDevice + * Signature: (J)Z + */ +static jboolean JNICALL Java_org_lwjgl_openal_ALC11_nalcCaptureCloseDevice(JNIEnv *env, jclass clazz, jlong device) { + return (jboolean) alcCaptureCloseDevice((ALCdevice*) ((intptr_t)device)); +} + +/* + * Class: org_lwjgl_openal_ALC11 + * Method: nalcCaptureStart + * Signature: (J)V + */ +static void JNICALL Java_org_lwjgl_openal_ALC11_nalcCaptureStart(JNIEnv *env, jclass clazz, jlong device) { + alcCaptureStart((ALCdevice*) ((intptr_t)device)); +} + +/* + * Class: org_lwjgl_openal_ALC11 + * Method: nalcCaptureStop + * Signature: (J)V + */ +static void JNICALL Java_org_lwjgl_openal_ALC11_nalcCaptureStop(JNIEnv * env, jclass clazz, jlong device) { + alcCaptureStop((ALCdevice*) ((intptr_t)device)); +} + +/* + * Class: org_lwjgl_openal_ALC11 + * Method: nalcCaptureSamples + * Signature: (JLjava/nio/ByteBuffer;I)V + */ +static void JNICALL Java_org_lwjgl_openal_ALC11_nalcCaptureSamples(JNIEnv *env, jclass clazz, jlong device, jlong buffer, jint samples) { + ALvoid *buffer_address = (ALbyte *)(intptr_t)buffer; + alcCaptureSamples((ALCdevice*) ((intptr_t)device), buffer_address, samples); +} + +/** + * Loads the context OpenAL functions + * + * @return true if all methods were loaded, false if one of the methods could not be loaded + */ +#ifdef __cplusplus +extern "C" { +#endif +JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALC11_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nalcCaptureOpenDevice", "(JIII)J", (void*)&Java_org_lwjgl_openal_ALC11_nalcCaptureOpenDevice, "alcCaptureOpenDevice", (void*)&alcCaptureOpenDevice, false}, + {"nalcCaptureCloseDevice", "(J)Z", (void*)&Java_org_lwjgl_openal_ALC11_nalcCaptureCloseDevice, "alcCaptureCloseDevice", (void*)&alcCaptureCloseDevice, false}, + {"nalcCaptureStart", "(J)V", (void*)&Java_org_lwjgl_openal_ALC11_nalcCaptureStart, "alcCaptureStart", (void*)&alcCaptureStart, false}, + {"nalcCaptureStop", "(J)V", (void*)&Java_org_lwjgl_openal_ALC11_nalcCaptureStop, "alcCaptureStop", (void*)&alcCaptureStop, false}, + {"nalcCaptureSamples", "(JJI)V", (void*)&Java_org_lwjgl_openal_ALC11_nalcCaptureSamples, "alcCaptureSamples", (void*)&alcCaptureSamples, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extal_InitializeClass(env, clazz, num_functions, functions); +} +#ifdef __cplusplus +} +#endif diff --git a/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_opencl_CL.c b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_opencl_CL.c new file mode 100644 index 0000000..3f72503 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_opencl_CL.c @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include "org_lwjgl_opencl_CL.h" +#include "extcl.h" + +JNIEXPORT void JNICALL Java_org_lwjgl_opencl_CL_nCreate(JNIEnv *env, jclass clazz, jstring oclPath) { + extcl_LoadLibrary(env, oclPath); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opencl_CL_nDestroy(JNIEnv *env, jclass clazz) { + extcl_UnloadLibrary(); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CL_ngetFunctionAddress(JNIEnv *env, jclass clazz, jlong function_name) { + return (jlong)(intptr_t)extcl_GetProcAddress((char *)(intptr_t)function_name); +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opencl_CL_getHostBuffer(JNIEnv *env, jclass clazz, jlong address, jint size) { + return safeNewBuffer(env, (void *)(intptr_t)address, size); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opencl_CL_resetNativeStubs(JNIEnv *env, jclass clazz, jclass cl_class) { + (*env)->UnregisterNatives(env, cl_class); +} diff --git a/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_opencl_CL.h b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_opencl_CL.h new file mode 100644 index 0000000..ba64517 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_opencl_CL.h @@ -0,0 +1,61 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opencl_CL */ + +#ifndef _Included_org_lwjgl_opencl_CL +#define _Included_org_lwjgl_opencl_CL +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_lwjgl_opencl_CL + * Method: nCreate + * Signature: (Ljava/lang/String;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opencl_CL_nCreate + (JNIEnv *, jclass, jstring); + +/* + * Class: org_lwjgl_opencl_CL + * Method: nCreateDefault + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opencl_CL_nCreateDefault + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opencl_CL + * Method: nDestroy + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opencl_CL_nDestroy + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opencl_CL + * Method: ngetFunctionAddress + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CL_ngetFunctionAddress + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opencl_CL + * Method: getHostBuffer + * Signature: (JI)Ljava/nio/ByteBuffer; + */ +JNIEXPORT jobject JNICALL Java_org_lwjgl_opencl_CL_getHostBuffer + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: org_lwjgl_opencl_CL + * Method: resetNativeStubs + * Signature: (Ljava/lang/Class;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opencl_CL_resetNativeStubs + (JNIEnv *, jclass, jclass); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_opencl_CallbackUtil.c b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_opencl_CallbackUtil.c new file mode 100644 index 0000000..17d937d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_opencl_CallbackUtil.c @@ -0,0 +1,256 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * JNI implementation of the OpenCL function callbacks. + * + * @author Spasi + */ + +#include +#include "common_tools.h" +#include "extcl.h" +#include "org_lwjgl_opencl_CallbackUtil.h" + +static jmethodID contextCallbackJ; +static jmethodID memObjectDestructorCallbackJ; +static jmethodID programCallbackJ; +static jmethodID nativeKernelCallbackJ; +static jmethodID eventCallbackJ; +static jmethodID printfCallbackJ; + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CallbackUtil_ncreateGlobalRef(JNIEnv *env, jclass clazz, jobject obj) { + return (intptr_t)(*env)->NewGlobalRef(env, obj); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opencl_CallbackUtil_deleteGlobalRef(JNIEnv *env, jclass clazz, jlong globalRef) { + (*env)->DeleteGlobalRef(env, (jobject)(intptr_t)globalRef); +} + +// ----------------- [ CONTEXT CALLBACK ] ----------------- + +static void CL_CALLBACK contextCallback(const char *errinfo, const void *private_info, size_t cb, void *user_data) { + JNIEnv *env = attachCurrentThread(); + jobject private_info_buffer = NULL; + + if ( env != NULL && !(*env)->ExceptionOccurred(env) && contextCallbackJ != NULL ) { + if ( private_info != NULL ) + private_info_buffer = NewReadOnlyDirectByteBuffer(env, private_info, cb); + + (*env)->CallVoidMethod(env, (jobject)user_data, contextCallbackJ, + NewStringNativeWithLength(env, errinfo, (jsize)strlen(errinfo)), + private_info_buffer + ); + } + + detachCurrentThread(); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CallbackUtil_getContextCallback(JNIEnv *env, jclass clazz) { + // Cache the callback methodID + jclass callbackClass; + if ( contextCallbackJ == NULL ) { + callbackClass = (*env)->FindClass(env, "org/lwjgl/opencl/CLContextCallback"); + if ( callbackClass != NULL ) + contextCallbackJ = (*env)->GetMethodID(env, callbackClass, "handleMessage", "(Ljava/lang/String;Ljava/nio/ByteBuffer;)V"); + } + + return (jlong)(intptr_t)&contextCallback; +} + +// ----------------- [ MEM OBJECT DESTRUCTOR CALLBACK ] ----------------- + +static void CL_CALLBACK memObjectDestructorCallback(cl_mem memobj, void *user_data) { + JNIEnv *env = attachCurrentThread(); + + if ( env != NULL && !(*env)->ExceptionOccurred(env) && memObjectDestructorCallbackJ != NULL ) { + (*env)->CallVoidMethod(env, (jobject)user_data, memObjectDestructorCallbackJ, + (jlong)(intptr_t)memobj + ); + (*env)->DeleteGlobalRef(env, (jobject)user_data); + } + + detachCurrentThread(); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CallbackUtil_getMemObjectDestructorCallback(JNIEnv *env, jclass clazz) { + // Cache the callback methodID + jclass callbackClass; + if ( memObjectDestructorCallbackJ == NULL ) { + callbackClass = (*env)->FindClass(env, "org/lwjgl/opencl/CLMemObjectDestructorCallback"); + if ( callbackClass != NULL ) + memObjectDestructorCallbackJ = (*env)->GetMethodID(env, callbackClass, "handleMessage", "(J)V"); + } + + return (jlong)(intptr_t)&memObjectDestructorCallback; +} + +// ----------------- [ PROGRAM CALLBACK ] ----------------- + +static void CL_CALLBACK programCallback(cl_program program, void *user_data) { + JNIEnv *env = attachCurrentThread(); + + if ( env != NULL && !(*env)->ExceptionOccurred(env) && programCallbackJ != NULL ) { + (*env)->CallVoidMethod(env, (jobject)user_data, programCallbackJ, + (jlong)(intptr_t)program + ); + (*env)->DeleteGlobalRef(env, (jobject)user_data); + } + + detachCurrentThread(); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CallbackUtil_getProgramCallback(JNIEnv *env, jclass clazz) { + // Cache the callback methodID + jclass callbackClass; + if ( programCallbackJ == NULL ) { + callbackClass = (*env)->FindClass(env, "org/lwjgl/opencl/CLProgramCallback"); + if ( callbackClass != NULL ) + programCallbackJ = (*env)->GetMethodID(env, callbackClass, "handleMessage", "(J)V"); + } + + return (jlong)(intptr_t)&programCallback; +} + +// ----------------- [ NATIVE KERNEL CALLBACK ] ----------------- + +static void CL_CALLBACK nativeKernelCallback(void *args) { + JNIEnv *env = attachCurrentThread(); + jobject user_func = (jobject)(intptr_t)*(jlong *)args; + jsize num_mem_objects = *(jsize *)((char *)args + 8); + jobjectArray memobjs = NULL; + jobject buffer; + jsize i; + + if ( env != NULL && !(*env)->ExceptionOccurred(env) && nativeKernelCallbackJ != NULL ) { + if ( num_mem_objects > 0 ) { + memobjs = (*env)->NewObjectArray(env, num_mem_objects, (*env)->FindClass(env, "java/nio/ByteBuffer"), NULL); + for ( i = 0; i < num_mem_objects; i++ ) { + buffer = (*env)->NewDirectByteBuffer(env, + // Pointer to cl_mem buffer + (void *)((char *)args + (12 + 4 + (i * (4 + sizeof(void *))))), + // cl_mem buffer size + *((jint *)((char *)args + (12 + (i * (4 + sizeof(void *)))))) + ); + (*env)->SetObjectArrayElement(env, memobjs, i, buffer); + } + } + + (*env)->CallVoidMethod(env, user_func, nativeKernelCallbackJ, memobjs); + + if ( num_mem_objects > 0 ) + (*env)->DeleteLocalRef(env, memobjs); + (*env)->DeleteGlobalRef(env, user_func); + } + + detachCurrentThread(); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CallbackUtil_getNativeKernelCallback(JNIEnv *env, jclass clazz) { + // Cache the callback methodID + jclass callbackClass; + if ( nativeKernelCallbackJ == NULL ) { + callbackClass = (*env)->FindClass(env, "org/lwjgl/opencl/CLNativeKernel"); + if ( callbackClass != NULL ) + nativeKernelCallbackJ = (*env)->GetMethodID(env, callbackClass, "execute", "([Ljava/nio/ByteBuffer;)V"); + } + + return (jlong)(intptr_t)&nativeKernelCallback; +} + +// ----------------- [ EVENT CALLBACK ] ----------------- + +static void CL_CALLBACK eventCallback(cl_event event, cl_int event_command_exec_status, void *user_data) { + JNIEnv *env = attachCurrentThread(); + + if ( env != NULL && !(*env)->ExceptionOccurred(env) && eventCallbackJ != NULL ) { + (*env)->CallVoidMethod(env, (jobject)user_data, eventCallbackJ, + (jlong)(intptr_t)event, + event_command_exec_status + ); + (*env)->DeleteGlobalRef(env, (jobject)user_data); + } + + detachCurrentThread(); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CallbackUtil_getEventCallback(JNIEnv *env, jclass clazz) { + // Cache the callback methodID + jclass callbackClass; + if ( eventCallbackJ == NULL ) { + callbackClass = (*env)->FindClass(env, "org/lwjgl/opencl/CLEventCallback"); + if ( callbackClass != NULL ) + eventCallbackJ = (*env)->GetMethodID(env, callbackClass, "handleMessage", "(JI)V"); + } + + return (jlong)(intptr_t)&eventCallback; +} + +// ----------------- [ PRINTF CALLBACK ] ----------------- + +static void CL_CALLBACK printfCallback(cl_context context, cl_uint printf_data_len, char *printf_data_ptr, void *user_data) { + JNIEnv *env = attachCurrentThread(); + + if ( env != NULL && !(*env)->ExceptionOccurred(env) && printfCallbackJ != NULL ) { + (*env)->CallVoidMethod(env, (jobject)user_data, printfCallbackJ, + NewStringNativeWithLength(env, printf_data_ptr, printf_data_len) + ); + } + + detachCurrentThread(); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CallbackUtil_getPrintfCallback(JNIEnv *env, jclass clazz) { + // Cache the callback methodID + jclass callbackClass; + if ( printfCallbackJ == NULL ) { + callbackClass = (*env)->FindClass(env, "org/lwjgl/opencl/CLPrintfCallback"); + if ( callbackClass != NULL ) + printfCallbackJ = (*env)->GetMethodID(env, callbackClass, "handleMessage", "(Ljava/lang/String;)V"); + } + + return (jlong)(intptr_t)&printfCallback; +} + +// ----------------- [ APPLE_ContextLoggingFunctions CALLBACKS ] ----------------- + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CallbackUtil_getLogMessageToSystemLogAPPLE(JNIEnv *env, jclass clazz) { + return (jlong)(intptr_t)extcl_GetProcAddress("clLogMessagesToSystemLogAPPLE"); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CallbackUtil_getLogMessageToStdoutAPPLE(JNIEnv *env, jclass clazz) { + return (jlong)(intptr_t)extcl_GetProcAddress("getLogMessageToStdoutAPPLE"); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CallbackUtil_getLogMessageToStderrAPPLE(JNIEnv *env, jclass clazz) { + return (jlong)(intptr_t)extcl_GetProcAddress("getLogMessageToStderrAPPLE"); +} diff --git a/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_opencl_CallbackUtil.h b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_opencl_CallbackUtil.h new file mode 100644 index 0000000..234a916 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_opencl_CallbackUtil.h @@ -0,0 +1,101 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opencl_CallbackUtil */ + +#ifndef _Included_org_lwjgl_opencl_CallbackUtil +#define _Included_org_lwjgl_opencl_CallbackUtil +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_lwjgl_opencl_CallbackUtil + * Method: ncreateGlobalRef + * Signature: (Ljava/lang/Object;)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CallbackUtil_ncreateGlobalRef + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opencl_CallbackUtil + * Method: deleteGlobalRef + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opencl_CallbackUtil_deleteGlobalRef + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opencl_CallbackUtil + * Method: getContextCallback + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CallbackUtil_getContextCallback + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opencl_CallbackUtil + * Method: getMemObjectDestructorCallback + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CallbackUtil_getMemObjectDestructorCallback + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opencl_CallbackUtil + * Method: getProgramCallback + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CallbackUtil_getProgramCallback + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opencl_CallbackUtil + * Method: getNativeKernelCallback + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CallbackUtil_getNativeKernelCallback + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opencl_CallbackUtil + * Method: getEventCallback + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CallbackUtil_getEventCallback + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opencl_CallbackUtil + * Method: getPrintfCallback + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CallbackUtil_getPrintfCallback + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opencl_CallbackUtil + * Method: getLogMessageToSystemLogAPPLE + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CallbackUtil_getLogMessageToSystemLogAPPLE + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opencl_CallbackUtil + * Method: getLogMessageToStdoutAPPLE + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CallbackUtil_getLogMessageToStdoutAPPLE + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opencl_CallbackUtil + * Method: getLogMessageToStderrAPPLE + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CallbackUtil_getLogMessageToStderrAPPLE + (JNIEnv *, jclass); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_opengl_AWTSurfaceLock.c b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_opengl_AWTSurfaceLock.c new file mode 100644 index 0000000..bb557ce --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_opengl_AWTSurfaceLock.c @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * @author elias_naur + * @author kappaOne + * @version $Revision$ + */ + +#include +#ifdef __MACH__ +#include +#else +#include +#endif +#include "org_lwjgl_opengl_AWTSurfaceLock.h" +#include "awt_tools.h" +#include "common_tools.h" + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_AWTSurfaceLock_createHandle + (JNIEnv *env, jclass clazz) { + return newJavaManagedByteBuffer(env, sizeof(AWTSurfaceLock)); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_AWTSurfaceLock_lockAndInitHandle + (JNIEnv *env, jclass clazz, jobject lock_buffer_handle, jobject canvas) { + JAWT awt; + JAWT_DrawingSurface* ds; + JAWT_DrawingSurfaceInfo *dsi; + AWTSurfaceLock *awt_lock = (AWTSurfaceLock *)(*env)->GetDirectBufferAddress(env, lock_buffer_handle); + + jboolean result = JNI_FALSE; + + #ifdef __MACH__ + // try get JAWT with JAWT_MACOSX_USE_CALAYER Opt In + awt.version = JAWT_VERSION_1_4 | 0x80000000;//JAWT_MACOSX_USE_CALAYER; + result = JAWT_GetAWT(env, &awt); + #endif + + if (result == JNI_FALSE) { + // now try without CALAYER + awt.version = JAWT_VERSION_1_4; + if (JAWT_GetAWT(env, &awt) == JNI_FALSE) { + throwException(env, "Could not get the JAWT interface"); + return JNI_FALSE; + } + } + + ds = awt.GetDrawingSurface(env, canvas); + if (ds == NULL) { + throwException(env, "Could not get the drawing surface"); + return JNI_FALSE; + } + + if((ds->Lock(ds) & JAWT_LOCK_ERROR) != 0) { + awt.FreeDrawingSurface(ds); + throwException(env, "Could not lock the drawing surface"); + return JNI_FALSE; + } + + dsi = ds->GetDrawingSurfaceInfo(ds); + if (dsi != NULL) { + awt_lock->awt = awt; + awt_lock->ds = ds; + awt_lock->dsi = dsi; + return JNI_TRUE; + } + ds->Unlock(ds); + awt.FreeDrawingSurface(ds); + return JNI_FALSE; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AWTSurfaceLock_nUnlock + (JNIEnv *env, jclass clazz, jobject lock_buffer_handle) { + AWTSurfaceLock *awt_lock = (AWTSurfaceLock *)(*env)->GetDirectBufferAddress(env, lock_buffer_handle); + awt_lock->ds->FreeDrawingSurfaceInfo(awt_lock->dsi); + awt_lock->ds->Unlock(awt_lock->ds); + awt_lock->awt.FreeDrawingSurface(awt_lock->ds); +} + diff --git a/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_opengl_AWTSurfaceLock.h b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_opengl_AWTSurfaceLock.h new file mode 100644 index 0000000..11d66ab --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/common/org_lwjgl_opengl_AWTSurfaceLock.h @@ -0,0 +1,39 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_AWTSurfaceLock */ + +#ifndef _Included_org_lwjgl_opengl_AWTSurfaceLock +#define _Included_org_lwjgl_opengl_AWTSurfaceLock +#ifdef __cplusplus +extern "C" { +#endif +#undef org_lwjgl_opengl_AWTSurfaceLock_WAIT_DELAY_MILLIS +#define org_lwjgl_opengl_AWTSurfaceLock_WAIT_DELAY_MILLIS 100L +/* + * Class: org_lwjgl_opengl_AWTSurfaceLock + * Method: createHandle + * Signature: ()Ljava/nio/ByteBuffer; + */ +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_AWTSurfaceLock_createHandle + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengl_AWTSurfaceLock + * Method: lockAndInitHandle + * Signature: (Ljava/nio/ByteBuffer;Ljava/awt/Canvas;)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_AWTSurfaceLock_lockAndInitHandle + (JNIEnv *, jclass, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_AWTSurfaceLock + * Method: nUnlock + * Signature: (Ljava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AWTSurfaceLock_nUnlock + (JNIEnv *, jclass, jobject); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/generated/openal/org_lwjgl_openal_AL10.c b/etc/lwjgl-2.9.1/src/native/generated/openal/org_lwjgl_openal_AL10.c new file mode 100644 index 0000000..27ee64d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/openal/org_lwjgl_openal_AL10.c @@ -0,0 +1,444 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extal.h" + +typedef ALvoid (ALAPIENTRY *alEnablePROC) (ALint capability); +typedef ALvoid (ALAPIENTRY *alDisablePROC) (ALenum capability); +typedef ALboolean (ALAPIENTRY *alIsEnabledPROC) (ALenum capability); +typedef ALboolean (ALAPIENTRY *alGetBooleanPROC) (ALenum pname); +typedef ALint (ALAPIENTRY *alGetIntegerPROC) (ALenum pname); +typedef ALfloat (ALAPIENTRY *alGetFloatPROC) (ALenum pname); +typedef ALdouble (ALAPIENTRY *alGetDoublePROC) (ALenum pname); +typedef ALvoid (ALAPIENTRY *alGetIntegervPROC) (ALenum pname, ALint * data); +typedef ALvoid (ALAPIENTRY *alGetFloatvPROC) (ALenum pname, ALfloat * data); +typedef ALvoid (ALAPIENTRY *alGetDoublevPROC) (ALenum pname, ALdouble * data); +typedef ALubyte * (ALAPIENTRY *alGetStringPROC) (ALenum pname); +typedef ALenum (ALAPIENTRY *alGetErrorPROC) (); +typedef ALboolean (ALAPIENTRY *alIsExtensionPresentPROC) (ALubyte * fname); +typedef ALenum (ALAPIENTRY *alGetEnumValuePROC) (ALubyte * ename); +typedef ALvoid (ALAPIENTRY *alListeneriPROC) (ALenum pname, ALint value); +typedef ALvoid (ALAPIENTRY *alListenerfPROC) (ALenum pname, ALfloat value); +typedef ALvoid (ALAPIENTRY *alListenerfvPROC) (ALenum pname, const ALfloat * value); +typedef ALvoid (ALAPIENTRY *alListener3fPROC) (ALenum pname, ALfloat v1, ALfloat v2, ALfloat v3); +typedef void (ALAPIENTRY *alGetListeneriPROC) (ALenum pname, ALint* value); +typedef void (ALAPIENTRY *alGetListenerfPROC) (ALenum pname, ALfloat* value); +typedef ALvoid (ALAPIENTRY *alGetListenerfvPROC) (ALenum pname, ALfloat * floatdata); +typedef ALvoid (ALAPIENTRY *alGenSourcesPROC) (ALsizei n, ALuint * sources); +typedef ALvoid (ALAPIENTRY *alDeleteSourcesPROC) (ALsizei n, ALuint * sources); +typedef ALboolean (ALAPIENTRY *alIsSourcePROC) (ALuint id); +typedef ALvoid (ALAPIENTRY *alSourceiPROC) (ALuint source, ALenum pname, ALint value); +typedef ALvoid (ALAPIENTRY *alSourcefPROC) (ALuint source, ALenum pname, ALfloat value); +typedef ALvoid (ALAPIENTRY *alSourcefvPROC) (ALuint source, ALenum pname, const ALfloat * value); +typedef ALvoid (ALAPIENTRY *alSource3fPROC) (ALuint source, ALenum pname, ALfloat v1, ALfloat v2, ALfloat v3); +typedef ALvoid (ALAPIENTRY *alGetSourceiPROC) (ALuint source, ALenum pname, ALint* value); +typedef ALvoid (ALAPIENTRY *alGetSourcefPROC) (ALuint source, ALenum pname, ALfloat* value); +typedef ALvoid (ALAPIENTRY *alGetSourcefvPROC) (ALuint source, ALenum pname, ALfloat * floatdata); +typedef ALvoid (ALAPIENTRY *alSourcePlayvPROC) (ALsizei n, ALuint * sources); +typedef ALvoid (ALAPIENTRY *alSourcePausevPROC) (ALsizei n, ALuint * sources); +typedef ALvoid (ALAPIENTRY *alSourceStopvPROC) (ALsizei n, ALuint * sources); +typedef ALvoid (ALAPIENTRY *alSourceRewindvPROC) (ALsizei n, ALuint * sources); +typedef ALvoid (ALAPIENTRY *alSourcePlayPROC) (ALuint source); +typedef ALvoid (ALAPIENTRY *alSourcePausePROC) (ALuint source); +typedef ALvoid (ALAPIENTRY *alSourceStopPROC) (ALuint source); +typedef ALvoid (ALAPIENTRY *alSourceRewindPROC) (ALuint source); +typedef ALvoid (ALAPIENTRY *alGenBuffersPROC) (ALsizei n, ALuint * buffers); +typedef ALvoid (ALAPIENTRY *alDeleteBuffersPROC) (ALsizei n, ALuint * buffers); +typedef ALboolean (ALAPIENTRY *alIsBufferPROC) (ALuint buffer); +typedef ALvoid (ALAPIENTRY *alBufferDataPROC) (ALuint buffer, ALenum format, ALvoid * data, ALsizei size, ALsizei freq); +typedef ALvoid (ALAPIENTRY *alGetBufferiPROC) (ALuint buffer, ALenum pname, ALint* value); +typedef ALvoid (ALAPIENTRY *alGetBufferfPROC) (ALuint buffer, ALenum pname, ALfloat* value); +typedef ALvoid (ALAPIENTRY *alSourceQueueBuffersPROC) (ALuint source, ALsizei n, ALuint * buffers); +typedef ALvoid (ALAPIENTRY *alSourceUnqueueBuffersPROC) (ALuint source, ALsizei n, ALuint * buffers); +typedef ALvoid (ALAPIENTRY *alDistanceModelPROC) (ALenum value); +typedef ALvoid (ALAPIENTRY *alDopplerFactorPROC) (ALfloat value); +typedef ALvoid (ALAPIENTRY *alDopplerVelocityPROC) (ALfloat value); + +static alEnablePROC alEnable; +static alDisablePROC alDisable; +static alIsEnabledPROC alIsEnabled; +static alGetBooleanPROC alGetBoolean; +static alGetIntegerPROC alGetInteger; +static alGetFloatPROC alGetFloat; +static alGetDoublePROC alGetDouble; +static alGetIntegervPROC alGetIntegerv; +static alGetFloatvPROC alGetFloatv; +static alGetDoublevPROC alGetDoublev; +static alGetStringPROC alGetString; +static alGetErrorPROC alGetError; +static alIsExtensionPresentPROC alIsExtensionPresent; +static alGetEnumValuePROC alGetEnumValue; +static alListeneriPROC alListeneri; +static alListenerfPROC alListenerf; +static alListenerfvPROC alListenerfv; +static alListener3fPROC alListener3f; +static alGetListeneriPROC alGetListeneri; +static alGetListenerfPROC alGetListenerf; +static alGetListenerfvPROC alGetListenerfv; +static alGenSourcesPROC alGenSources; +static alDeleteSourcesPROC alDeleteSources; +static alIsSourcePROC alIsSource; +static alSourceiPROC alSourcei; +static alSourcefPROC alSourcef; +static alSourcefvPROC alSourcefv; +static alSource3fPROC alSource3f; +static alGetSourceiPROC alGetSourcei; +static alGetSourcefPROC alGetSourcef; +static alGetSourcefvPROC alGetSourcefv; +static alSourcePlayvPROC alSourcePlayv; +static alSourcePausevPROC alSourcePausev; +static alSourceStopvPROC alSourceStopv; +static alSourceRewindvPROC alSourceRewindv; +static alSourcePlayPROC alSourcePlay; +static alSourcePausePROC alSourcePause; +static alSourceStopPROC alSourceStop; +static alSourceRewindPROC alSourceRewind; +static alGenBuffersPROC alGenBuffers; +static alDeleteBuffersPROC alDeleteBuffers; +static alIsBufferPROC alIsBuffer; +static alBufferDataPROC alBufferData; +static alGetBufferiPROC alGetBufferi; +static alGetBufferfPROC alGetBufferf; +static alSourceQueueBuffersPROC alSourceQueueBuffers; +static alSourceUnqueueBuffersPROC alSourceUnqueueBuffers; +static alDistanceModelPROC alDistanceModel; +static alDopplerFactorPROC alDopplerFactor; +static alDopplerVelocityPROC alDopplerVelocity; + +static void JNICALL Java_org_lwjgl_openal_AL10_nalEnable(JNIEnv *env, jclass clazz, jint capability) { + alEnable(capability); +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalDisable(JNIEnv *env, jclass clazz, jint capability) { + alDisable(capability); +} + +static jboolean JNICALL Java_org_lwjgl_openal_AL10_nalIsEnabled(JNIEnv *env, jclass clazz, jint capability) { + ALboolean __result = alIsEnabled(capability); + return __result; +} + +static jboolean JNICALL Java_org_lwjgl_openal_AL10_nalGetBoolean(JNIEnv *env, jclass clazz, jint pname) { + ALboolean __result = alGetBoolean(pname); + return __result; +} + +static jint JNICALL Java_org_lwjgl_openal_AL10_nalGetInteger(JNIEnv *env, jclass clazz, jint pname) { + ALint __result = alGetInteger(pname); + return __result; +} + +static jfloat JNICALL Java_org_lwjgl_openal_AL10_nalGetFloat(JNIEnv *env, jclass clazz, jint pname) { + ALfloat __result = alGetFloat(pname); + return __result; +} + +static jdouble JNICALL Java_org_lwjgl_openal_AL10_nalGetDouble(JNIEnv *env, jclass clazz, jint pname) { + ALdouble __result = alGetDouble(pname); + return __result; +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalGetIntegerv(JNIEnv *env, jclass clazz, jint pname, jlong data) { + ALint *data_address = (ALint *)(intptr_t)data; + alGetIntegerv(pname, data_address); +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalGetFloatv(JNIEnv *env, jclass clazz, jint pname, jlong data) { + ALfloat *data_address = (ALfloat *)(intptr_t)data; + alGetFloatv(pname, data_address); +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalGetDoublev(JNIEnv *env, jclass clazz, jint pname, jlong data) { + ALdouble *data_address = (ALdouble *)(intptr_t)data; + alGetDoublev(pname, data_address); +} + +static jobject JNICALL Java_org_lwjgl_openal_AL10_nalGetString(JNIEnv *env, jclass clazz, jint pname) { + ALubyte * __result = alGetString(pname); + return NewStringNativeUnsigned(env, __result); +} + +static jint JNICALL Java_org_lwjgl_openal_AL10_nalGetError(JNIEnv *env, jclass clazz) { + ALenum __result = alGetError(); + return __result; +} + +static jboolean JNICALL Java_org_lwjgl_openal_AL10_nalIsExtensionPresent(JNIEnv *env, jclass clazz, jobject fname) { + ALubyte *fname_address = (ALubyte *)(intptr_t)GetStringNativeChars(env, fname); + ALboolean __result = alIsExtensionPresent(fname_address); + free(fname_address); + return __result; +} + +static jint JNICALL Java_org_lwjgl_openal_AL10_nalGetEnumValue(JNIEnv *env, jclass clazz, jobject ename) { + ALubyte *ename_address = (ALubyte *)(intptr_t)GetStringNativeChars(env, ename); + ALenum __result = alGetEnumValue(ename_address); + free(ename_address); + return __result; +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalListeneri(JNIEnv *env, jclass clazz, jint pname, jint value) { + alListeneri(pname, value); +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalListenerf(JNIEnv *env, jclass clazz, jint pname, jfloat value) { + alListenerf(pname, value); +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalListenerfv(JNIEnv *env, jclass clazz, jint pname, jlong value) { + const ALfloat *value_address = (const ALfloat *)(intptr_t)value; + alListenerfv(pname, value_address); +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalListener3f(JNIEnv *env, jclass clazz, jint pname, jfloat v1, jfloat v2, jfloat v3) { + alListener3f(pname, v1, v2, v3); +} + +static jint JNICALL Java_org_lwjgl_openal_AL10_nalGetListeneri(JNIEnv *env, jclass clazz, jint pname) { + ALint __result; + alGetListeneri(pname, &__result); + return __result; +} + +static jfloat JNICALL Java_org_lwjgl_openal_AL10_nalGetListenerf(JNIEnv *env, jclass clazz, jint pname) { + ALfloat __result; + alGetListenerf(pname, &__result); + return __result; +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalGetListenerfv(JNIEnv *env, jclass clazz, jint pname, jlong floatdata) { + ALfloat *floatdata_address = (ALfloat *)(intptr_t)floatdata; + alGetListenerfv(pname, floatdata_address); +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalGenSources(JNIEnv *env, jclass clazz, jint n, jlong sources) { + ALuint *sources_address = (ALuint *)(intptr_t)sources; + alGenSources(n, sources_address); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_openal_AL10_nalGenSources2(JNIEnv *env, jclass clazz, jint n) { + ALuint __result; + alGenSources(n, &__result); + return __result; +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalDeleteSources(JNIEnv *env, jclass clazz, jint n, jlong sources) { + ALuint *sources_address = (ALuint *)(intptr_t)sources; + alDeleteSources(n, sources_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalDeleteSources2(JNIEnv *env, jclass clazz, jint n, jint source) { + alDeleteSources(n, (ALuint*)&source); +} + +static jboolean JNICALL Java_org_lwjgl_openal_AL10_nalIsSource(JNIEnv *env, jclass clazz, jint id) { + ALboolean __result = alIsSource(id); + return __result; +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalSourcei(JNIEnv *env, jclass clazz, jint source, jint pname, jint value) { + alSourcei(source, pname, value); +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalSourcef(JNIEnv *env, jclass clazz, jint source, jint pname, jfloat value) { + alSourcef(source, pname, value); +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalSourcefv(JNIEnv *env, jclass clazz, jint source, jint pname, jlong value) { + const ALfloat *value_address = (const ALfloat *)(intptr_t)value; + alSourcefv(source, pname, value_address); +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalSource3f(JNIEnv *env, jclass clazz, jint source, jint pname, jfloat v1, jfloat v2, jfloat v3) { + alSource3f(source, pname, v1, v2, v3); +} + +static jint JNICALL Java_org_lwjgl_openal_AL10_nalGetSourcei(JNIEnv *env, jclass clazz, jint source, jint pname) { + ALint __result; + alGetSourcei(source, pname, &__result); + return __result; +} + +static jfloat JNICALL Java_org_lwjgl_openal_AL10_nalGetSourcef(JNIEnv *env, jclass clazz, jint source, jint pname) { + ALfloat __result; + alGetSourcef(source, pname, &__result); + return __result; +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalGetSourcefv(JNIEnv *env, jclass clazz, jint source, jint pname, jlong floatdata) { + ALfloat *floatdata_address = (ALfloat *)(intptr_t)floatdata; + alGetSourcefv(source, pname, floatdata_address); +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalSourcePlayv(JNIEnv *env, jclass clazz, jint n, jlong sources) { + ALuint *sources_address = (ALuint *)(intptr_t)sources; + alSourcePlayv(n, sources_address); +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalSourcePausev(JNIEnv *env, jclass clazz, jint n, jlong sources) { + ALuint *sources_address = (ALuint *)(intptr_t)sources; + alSourcePausev(n, sources_address); +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalSourceStopv(JNIEnv *env, jclass clazz, jint n, jlong sources) { + ALuint *sources_address = (ALuint *)(intptr_t)sources; + alSourceStopv(n, sources_address); +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalSourceRewindv(JNIEnv *env, jclass clazz, jint n, jlong sources) { + ALuint *sources_address = (ALuint *)(intptr_t)sources; + alSourceRewindv(n, sources_address); +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalSourcePlay(JNIEnv *env, jclass clazz, jint source) { + alSourcePlay(source); +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalSourcePause(JNIEnv *env, jclass clazz, jint source) { + alSourcePause(source); +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalSourceStop(JNIEnv *env, jclass clazz, jint source) { + alSourceStop(source); +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalSourceRewind(JNIEnv *env, jclass clazz, jint source) { + alSourceRewind(source); +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalGenBuffers(JNIEnv *env, jclass clazz, jint n, jlong buffers) { + ALuint *buffers_address = (ALuint *)(intptr_t)buffers; + alGenBuffers(n, buffers_address); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_openal_AL10_nalGenBuffers2(JNIEnv *env, jclass clazz, jint n) { + ALuint __result; + alGenBuffers(n, &__result); + return __result; +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalDeleteBuffers(JNIEnv *env, jclass clazz, jint n, jlong buffers) { + ALuint *buffers_address = (ALuint *)(intptr_t)buffers; + alDeleteBuffers(n, buffers_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalDeleteBuffers2(JNIEnv *env, jclass clazz, jint n, jint buffer) { + alDeleteBuffers(n, (ALuint*)&buffer); +} + +static jboolean JNICALL Java_org_lwjgl_openal_AL10_nalIsBuffer(JNIEnv *env, jclass clazz, jint buffer) { + ALboolean __result = alIsBuffer(buffer); + return __result; +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalBufferData(JNIEnv *env, jclass clazz, jint buffer, jint format, jlong data, jint size, jint freq) { + ALvoid *data_address = (ALvoid *)(intptr_t)data; + alBufferData(buffer, format, data_address, size, freq); +} + +static jint JNICALL Java_org_lwjgl_openal_AL10_nalGetBufferi(JNIEnv *env, jclass clazz, jint buffer, jint pname) { + ALint __result; + alGetBufferi(buffer, pname, &__result); + return __result; +} + +static jfloat JNICALL Java_org_lwjgl_openal_AL10_nalGetBufferf(JNIEnv *env, jclass clazz, jint buffer, jint pname) { + ALfloat __result; + alGetBufferf(buffer, pname, &__result); + return __result; +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalSourceQueueBuffers(JNIEnv *env, jclass clazz, jint source, jint n, jlong buffers) { + ALuint *buffers_address = (ALuint *)(intptr_t)buffers; + alSourceQueueBuffers(source, n, buffers_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_nalSourceQueueBuffers2(JNIEnv *env, jclass clazz, jint source, jint n, jint buffer) { + alSourceQueueBuffers(source, n, (ALuint*)&buffer); +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalSourceUnqueueBuffers(JNIEnv *env, jclass clazz, jint source, jint n, jlong buffers) { + ALuint *buffers_address = (ALuint *)(intptr_t)buffers; + alSourceUnqueueBuffers(source, n, buffers_address); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_openal_AL10_nalSourceUnqueueBuffers2(JNIEnv *env, jclass clazz, jint source, jint n) { + ALuint __result; + alSourceUnqueueBuffers(source, n, &__result); + return __result; +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalDistanceModel(JNIEnv *env, jclass clazz, jint value) { + alDistanceModel(value); +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalDopplerFactor(JNIEnv *env, jclass clazz, jfloat value) { + alDopplerFactor(value); +} + +static void JNICALL Java_org_lwjgl_openal_AL10_nalDopplerVelocity(JNIEnv *env, jclass clazz, jfloat value) { + alDopplerVelocity(value); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL10_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nalEnable", "(I)V", (void *)&Java_org_lwjgl_openal_AL10_nalEnable, "alEnable", (void *)&alEnable, false}, + {"nalDisable", "(I)V", (void *)&Java_org_lwjgl_openal_AL10_nalDisable, "alDisable", (void *)&alDisable, false}, + {"nalIsEnabled", "(I)Z", (void *)&Java_org_lwjgl_openal_AL10_nalIsEnabled, "alIsEnabled", (void *)&alIsEnabled, false}, + {"nalGetBoolean", "(I)Z", (void *)&Java_org_lwjgl_openal_AL10_nalGetBoolean, "alGetBoolean", (void *)&alGetBoolean, false}, + {"nalGetInteger", "(I)I", (void *)&Java_org_lwjgl_openal_AL10_nalGetInteger, "alGetInteger", (void *)&alGetInteger, false}, + {"nalGetFloat", "(I)F", (void *)&Java_org_lwjgl_openal_AL10_nalGetFloat, "alGetFloat", (void *)&alGetFloat, false}, + {"nalGetDouble", "(I)D", (void *)&Java_org_lwjgl_openal_AL10_nalGetDouble, "alGetDouble", (void *)&alGetDouble, false}, + {"nalGetIntegerv", "(IJ)V", (void *)&Java_org_lwjgl_openal_AL10_nalGetIntegerv, "alGetIntegerv", (void *)&alGetIntegerv, false}, + {"nalGetFloatv", "(IJ)V", (void *)&Java_org_lwjgl_openal_AL10_nalGetFloatv, "alGetFloatv", (void *)&alGetFloatv, false}, + {"nalGetDoublev", "(IJ)V", (void *)&Java_org_lwjgl_openal_AL10_nalGetDoublev, "alGetDoublev", (void *)&alGetDoublev, false}, + {"nalGetString", "(I)Ljava/lang/String;", (void *)&Java_org_lwjgl_openal_AL10_nalGetString, "alGetString", (void *)&alGetString, false}, + {"nalGetError", "()I", (void *)&Java_org_lwjgl_openal_AL10_nalGetError, "alGetError", (void *)&alGetError, false}, + {"nalIsExtensionPresent", "(Ljava/lang/String;)Z", (void *)&Java_org_lwjgl_openal_AL10_nalIsExtensionPresent, "alIsExtensionPresent", (void *)&alIsExtensionPresent, false}, + {"nalGetEnumValue", "(Ljava/lang/String;)I", (void *)&Java_org_lwjgl_openal_AL10_nalGetEnumValue, "alGetEnumValue", (void *)&alGetEnumValue, false}, + {"nalListeneri", "(II)V", (void *)&Java_org_lwjgl_openal_AL10_nalListeneri, "alListeneri", (void *)&alListeneri, false}, + {"nalListenerf", "(IF)V", (void *)&Java_org_lwjgl_openal_AL10_nalListenerf, "alListenerf", (void *)&alListenerf, false}, + {"nalListenerfv", "(IJ)V", (void *)&Java_org_lwjgl_openal_AL10_nalListenerfv, "alListenerfv", (void *)&alListenerfv, false}, + {"nalListener3f", "(IFFF)V", (void *)&Java_org_lwjgl_openal_AL10_nalListener3f, "alListener3f", (void *)&alListener3f, false}, + {"nalGetListeneri", "(I)I", (void *)&Java_org_lwjgl_openal_AL10_nalGetListeneri, "alGetListeneri", (void *)&alGetListeneri, false}, + {"nalGetListenerf", "(I)F", (void *)&Java_org_lwjgl_openal_AL10_nalGetListenerf, "alGetListenerf", (void *)&alGetListenerf, false}, + {"nalGetListenerfv", "(IJ)V", (void *)&Java_org_lwjgl_openal_AL10_nalGetListenerfv, "alGetListenerfv", (void *)&alGetListenerfv, false}, + {"nalGenSources", "(IJ)V", (void *)&Java_org_lwjgl_openal_AL10_nalGenSources, "alGenSources", (void *)&alGenSources, false}, + {"nalGenSources2", "(I)I", (void *)&Java_org_lwjgl_openal_AL10_nalGenSources2, "alGenSources", (void *)&alGenSources, false}, + {"nalDeleteSources", "(IJ)V", (void *)&Java_org_lwjgl_openal_AL10_nalDeleteSources, "alDeleteSources", (void *)&alDeleteSources, false}, + {"nalDeleteSources2", "(II)V", (void *)&Java_org_lwjgl_openal_AL10_nalDeleteSources2, "alDeleteSources", (void *)&alDeleteSources, false}, + {"nalIsSource", "(I)Z", (void *)&Java_org_lwjgl_openal_AL10_nalIsSource, "alIsSource", (void *)&alIsSource, false}, + {"nalSourcei", "(III)V", (void *)&Java_org_lwjgl_openal_AL10_nalSourcei, "alSourcei", (void *)&alSourcei, false}, + {"nalSourcef", "(IIF)V", (void *)&Java_org_lwjgl_openal_AL10_nalSourcef, "alSourcef", (void *)&alSourcef, false}, + {"nalSourcefv", "(IIJ)V", (void *)&Java_org_lwjgl_openal_AL10_nalSourcefv, "alSourcefv", (void *)&alSourcefv, false}, + {"nalSource3f", "(IIFFF)V", (void *)&Java_org_lwjgl_openal_AL10_nalSource3f, "alSource3f", (void *)&alSource3f, false}, + {"nalGetSourcei", "(II)I", (void *)&Java_org_lwjgl_openal_AL10_nalGetSourcei, "alGetSourcei", (void *)&alGetSourcei, false}, + {"nalGetSourcef", "(II)F", (void *)&Java_org_lwjgl_openal_AL10_nalGetSourcef, "alGetSourcef", (void *)&alGetSourcef, false}, + {"nalGetSourcefv", "(IIJ)V", (void *)&Java_org_lwjgl_openal_AL10_nalGetSourcefv, "alGetSourcefv", (void *)&alGetSourcefv, false}, + {"nalSourcePlayv", "(IJ)V", (void *)&Java_org_lwjgl_openal_AL10_nalSourcePlayv, "alSourcePlayv", (void *)&alSourcePlayv, false}, + {"nalSourcePausev", "(IJ)V", (void *)&Java_org_lwjgl_openal_AL10_nalSourcePausev, "alSourcePausev", (void *)&alSourcePausev, false}, + {"nalSourceStopv", "(IJ)V", (void *)&Java_org_lwjgl_openal_AL10_nalSourceStopv, "alSourceStopv", (void *)&alSourceStopv, false}, + {"nalSourceRewindv", "(IJ)V", (void *)&Java_org_lwjgl_openal_AL10_nalSourceRewindv, "alSourceRewindv", (void *)&alSourceRewindv, false}, + {"nalSourcePlay", "(I)V", (void *)&Java_org_lwjgl_openal_AL10_nalSourcePlay, "alSourcePlay", (void *)&alSourcePlay, false}, + {"nalSourcePause", "(I)V", (void *)&Java_org_lwjgl_openal_AL10_nalSourcePause, "alSourcePause", (void *)&alSourcePause, false}, + {"nalSourceStop", "(I)V", (void *)&Java_org_lwjgl_openal_AL10_nalSourceStop, "alSourceStop", (void *)&alSourceStop, false}, + {"nalSourceRewind", "(I)V", (void *)&Java_org_lwjgl_openal_AL10_nalSourceRewind, "alSourceRewind", (void *)&alSourceRewind, false}, + {"nalGenBuffers", "(IJ)V", (void *)&Java_org_lwjgl_openal_AL10_nalGenBuffers, "alGenBuffers", (void *)&alGenBuffers, false}, + {"nalGenBuffers2", "(I)I", (void *)&Java_org_lwjgl_openal_AL10_nalGenBuffers2, "alGenBuffers", (void *)&alGenBuffers, false}, + {"nalDeleteBuffers", "(IJ)V", (void *)&Java_org_lwjgl_openal_AL10_nalDeleteBuffers, "alDeleteBuffers", (void *)&alDeleteBuffers, false}, + {"nalDeleteBuffers2", "(II)V", (void *)&Java_org_lwjgl_openal_AL10_nalDeleteBuffers2, "alDeleteBuffers", (void *)&alDeleteBuffers, false}, + {"nalIsBuffer", "(I)Z", (void *)&Java_org_lwjgl_openal_AL10_nalIsBuffer, "alIsBuffer", (void *)&alIsBuffer, false}, + {"nalBufferData", "(IIJII)V", (void *)&Java_org_lwjgl_openal_AL10_nalBufferData, "alBufferData", (void *)&alBufferData, false}, + {"nalGetBufferi", "(II)I", (void *)&Java_org_lwjgl_openal_AL10_nalGetBufferi, "alGetBufferi", (void *)&alGetBufferi, false}, + {"nalGetBufferf", "(II)F", (void *)&Java_org_lwjgl_openal_AL10_nalGetBufferf, "alGetBufferf", (void *)&alGetBufferf, false}, + {"nalSourceQueueBuffers", "(IIJ)V", (void *)&Java_org_lwjgl_openal_AL10_nalSourceQueueBuffers, "alSourceQueueBuffers", (void *)&alSourceQueueBuffers, false}, + {"nalSourceQueueBuffers2", "(III)V", (void *)&Java_org_lwjgl_openal_AL10_nalSourceQueueBuffers2, "alSourceQueueBuffers", (void *)&alSourceQueueBuffers, false}, + {"nalSourceUnqueueBuffers", "(IIJ)V", (void *)&Java_org_lwjgl_openal_AL10_nalSourceUnqueueBuffers, "alSourceUnqueueBuffers", (void *)&alSourceUnqueueBuffers, false}, + {"nalSourceUnqueueBuffers2", "(II)I", (void *)&Java_org_lwjgl_openal_AL10_nalSourceUnqueueBuffers2, "alSourceUnqueueBuffers", (void *)&alSourceUnqueueBuffers, false}, + {"nalDistanceModel", "(I)V", (void *)&Java_org_lwjgl_openal_AL10_nalDistanceModel, "alDistanceModel", (void *)&alDistanceModel, false}, + {"nalDopplerFactor", "(F)V", (void *)&Java_org_lwjgl_openal_AL10_nalDopplerFactor, "alDopplerFactor", (void *)&alDopplerFactor, false}, + {"nalDopplerVelocity", "(F)V", (void *)&Java_org_lwjgl_openal_AL10_nalDopplerVelocity, "alDopplerVelocity", (void *)&alDopplerVelocity, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extal_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/openal/org_lwjgl_openal_AL11.c b/etc/lwjgl-2.9.1/src/native/generated/openal/org_lwjgl_openal_AL11.c new file mode 100644 index 0000000..7aac982 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/openal/org_lwjgl_openal_AL11.c @@ -0,0 +1,128 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extal.h" + +typedef ALvoid (ALAPIENTRY *alListener3iPROC) (ALenum pname, ALint v1, ALint v2, ALint v3); +typedef ALvoid (ALAPIENTRY *alGetListenerivPROC) (ALenum pname, ALfloat * intdata); +typedef ALvoid (ALAPIENTRY *alSource3iPROC) (ALuint source, ALenum pname, ALint v1, ALint v2, ALint v3); +typedef ALvoid (ALAPIENTRY *alSourceivPROC) (ALuint source, ALenum pname, const ALint * value); +typedef ALvoid (ALAPIENTRY *alBufferfPROC) (ALuint buffer, ALenum pname, ALfloat value); +typedef ALvoid (ALAPIENTRY *alBuffer3fPROC) (ALuint buffer, ALenum pname, ALfloat v1, ALfloat v2, ALfloat v3); +typedef ALvoid (ALAPIENTRY *alBufferfvPROC) (ALuint buffer, ALenum pname, const ALfloat * value); +typedef ALvoid (ALAPIENTRY *alBufferiPROC) (ALuint buffer, ALenum pname, ALint value); +typedef ALvoid (ALAPIENTRY *alBuffer3iPROC) (ALuint buffer, ALenum pname, ALint v1, ALint v2, ALint v3); +typedef ALvoid (ALAPIENTRY *alBufferivPROC) (ALuint buffer, ALenum pname, const ALint * value); +typedef ALvoid (ALAPIENTRY *alGetBufferiPROC) (ALuint buffer, ALenum pname, ALint* value); +typedef ALvoid (ALAPIENTRY *alGetBufferivPROC) (ALuint buffer, ALenum pname, ALint * values); +typedef ALvoid (ALAPIENTRY *alGetBufferfPROC) (ALuint buffer, ALenum pname, ALfloat* value); +typedef ALvoid (ALAPIENTRY *alGetBufferfvPROC) (ALuint buffer, ALenum pname, ALfloat * values); +typedef ALvoid (ALAPIENTRY *alSpeedOfSoundPROC) (ALfloat value); + +static alListener3iPROC alListener3i; +static alGetListenerivPROC alGetListeneriv; +static alSource3iPROC alSource3i; +static alSourceivPROC alSourceiv; +static alBufferfPROC alBufferf; +static alBuffer3fPROC alBuffer3f; +static alBufferfvPROC alBufferfv; +static alBufferiPROC alBufferi; +static alBuffer3iPROC alBuffer3i; +static alBufferivPROC alBufferiv; +static alGetBufferiPROC alGetBufferi; +static alGetBufferivPROC alGetBufferiv; +static alGetBufferfPROC alGetBufferf; +static alGetBufferfvPROC alGetBufferfv; +static alSpeedOfSoundPROC alSpeedOfSound; + +static void JNICALL Java_org_lwjgl_openal_AL11_nalListener3i(JNIEnv *env, jclass clazz, jint pname, jint v1, jint v2, jint v3) { + alListener3i(pname, v1, v2, v3); +} + +static void JNICALL Java_org_lwjgl_openal_AL11_nalGetListeneriv(JNIEnv *env, jclass clazz, jint pname, jlong intdata) { + ALfloat *intdata_address = (ALfloat *)(intptr_t)intdata; + alGetListeneriv(pname, intdata_address); +} + +static void JNICALL Java_org_lwjgl_openal_AL11_nalSource3i(JNIEnv *env, jclass clazz, jint source, jint pname, jint v1, jint v2, jint v3) { + alSource3i(source, pname, v1, v2, v3); +} + +static void JNICALL Java_org_lwjgl_openal_AL11_nalSourceiv(JNIEnv *env, jclass clazz, jint source, jint pname, jlong value) { + const ALint *value_address = (const ALint *)(intptr_t)value; + alSourceiv(source, pname, value_address); +} + +static void JNICALL Java_org_lwjgl_openal_AL11_nalBufferf(JNIEnv *env, jclass clazz, jint buffer, jint pname, jfloat value) { + alBufferf(buffer, pname, value); +} + +static void JNICALL Java_org_lwjgl_openal_AL11_nalBuffer3f(JNIEnv *env, jclass clazz, jint buffer, jint pname, jfloat v1, jfloat v2, jfloat v3) { + alBuffer3f(buffer, pname, v1, v2, v3); +} + +static void JNICALL Java_org_lwjgl_openal_AL11_nalBufferfv(JNIEnv *env, jclass clazz, jint buffer, jint pname, jlong value) { + const ALfloat *value_address = (const ALfloat *)(intptr_t)value; + alBufferfv(buffer, pname, value_address); +} + +static void JNICALL Java_org_lwjgl_openal_AL11_nalBufferi(JNIEnv *env, jclass clazz, jint buffer, jint pname, jint value) { + alBufferi(buffer, pname, value); +} + +static void JNICALL Java_org_lwjgl_openal_AL11_nalBuffer3i(JNIEnv *env, jclass clazz, jint buffer, jint pname, jint v1, jint v2, jint v3) { + alBuffer3i(buffer, pname, v1, v2, v3); +} + +static void JNICALL Java_org_lwjgl_openal_AL11_nalBufferiv(JNIEnv *env, jclass clazz, jint buffer, jint pname, jlong value) { + const ALint *value_address = (const ALint *)(intptr_t)value; + alBufferiv(buffer, pname, value_address); +} + +static jint JNICALL Java_org_lwjgl_openal_AL11_nalGetBufferi(JNIEnv *env, jclass clazz, jint buffer, jint pname) { + ALint __result; + alGetBufferi(buffer, pname, &__result); + return __result; +} + +static void JNICALL Java_org_lwjgl_openal_AL11_nalGetBufferiv(JNIEnv *env, jclass clazz, jint buffer, jint pname, jlong values) { + ALint *values_address = (ALint *)(intptr_t)values; + alGetBufferiv(buffer, pname, values_address); +} + +static jfloat JNICALL Java_org_lwjgl_openal_AL11_nalGetBufferf(JNIEnv *env, jclass clazz, jint buffer, jint pname) { + ALfloat __result; + alGetBufferf(buffer, pname, &__result); + return __result; +} + +static void JNICALL Java_org_lwjgl_openal_AL11_nalGetBufferfv(JNIEnv *env, jclass clazz, jint buffer, jint pname, jlong values) { + ALfloat *values_address = (ALfloat *)(intptr_t)values; + alGetBufferfv(buffer, pname, values_address); +} + +static void JNICALL Java_org_lwjgl_openal_AL11_nalSpeedOfSound(JNIEnv *env, jclass clazz, jfloat value) { + alSpeedOfSound(value); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL11_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nalListener3i", "(IIII)V", (void *)&Java_org_lwjgl_openal_AL11_nalListener3i, "alListener3i", (void *)&alListener3i, false}, + {"nalGetListeneriv", "(IJ)V", (void *)&Java_org_lwjgl_openal_AL11_nalGetListeneriv, "alGetListeneriv", (void *)&alGetListeneriv, false}, + {"nalSource3i", "(IIIII)V", (void *)&Java_org_lwjgl_openal_AL11_nalSource3i, "alSource3i", (void *)&alSource3i, false}, + {"nalSourceiv", "(IIJ)V", (void *)&Java_org_lwjgl_openal_AL11_nalSourceiv, "alSourceiv", (void *)&alSourceiv, false}, + {"nalBufferf", "(IIF)V", (void *)&Java_org_lwjgl_openal_AL11_nalBufferf, "alBufferf", (void *)&alBufferf, false}, + {"nalBuffer3f", "(IIFFF)V", (void *)&Java_org_lwjgl_openal_AL11_nalBuffer3f, "alBuffer3f", (void *)&alBuffer3f, false}, + {"nalBufferfv", "(IIJ)V", (void *)&Java_org_lwjgl_openal_AL11_nalBufferfv, "alBufferfv", (void *)&alBufferfv, false}, + {"nalBufferi", "(III)V", (void *)&Java_org_lwjgl_openal_AL11_nalBufferi, "alBufferi", (void *)&alBufferi, false}, + {"nalBuffer3i", "(IIIII)V", (void *)&Java_org_lwjgl_openal_AL11_nalBuffer3i, "alBuffer3i", (void *)&alBuffer3i, false}, + {"nalBufferiv", "(IIJ)V", (void *)&Java_org_lwjgl_openal_AL11_nalBufferiv, "alBufferiv", (void *)&alBufferiv, false}, + {"nalGetBufferi", "(II)I", (void *)&Java_org_lwjgl_openal_AL11_nalGetBufferi, "alGetBufferi", (void *)&alGetBufferi, false}, + {"nalGetBufferiv", "(IIJ)V", (void *)&Java_org_lwjgl_openal_AL11_nalGetBufferiv, "alGetBufferiv", (void *)&alGetBufferiv, false}, + {"nalGetBufferf", "(II)F", (void *)&Java_org_lwjgl_openal_AL11_nalGetBufferf, "alGetBufferf", (void *)&alGetBufferf, false}, + {"nalGetBufferfv", "(IIJ)V", (void *)&Java_org_lwjgl_openal_AL11_nalGetBufferfv, "alGetBufferfv", (void *)&alGetBufferfv, false}, + {"nalSpeedOfSound", "(F)V", (void *)&Java_org_lwjgl_openal_AL11_nalSpeedOfSound, "alSpeedOfSound", (void *)&alSpeedOfSound, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extal_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/openal/org_lwjgl_openal_EFX10.c b/etc/lwjgl-2.9.1/src/native/generated/openal/org_lwjgl_openal_EFX10.c new file mode 100644 index 0000000..b29c0b7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/openal/org_lwjgl_openal_EFX10.c @@ -0,0 +1,313 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extal.h" + +typedef ALvoid (ALAPIENTRY *alGenAuxiliaryEffectSlotsPROC) (ALsizei n, ALuint * auxiliaryeffectslots); +typedef ALvoid (ALAPIENTRY *alDeleteAuxiliaryEffectSlotsPROC) (ALsizei n, ALuint * auxiliaryeffectslots); +typedef ALboolean (ALAPIENTRY *alIsAuxiliaryEffectSlotPROC) (ALuint auxiliaryeffectslot); +typedef ALvoid (ALAPIENTRY *alAuxiliaryEffectSlotiPROC) (ALuint auxiliaryeffectslot, ALenum param, ALint value); +typedef ALvoid (ALAPIENTRY *alAuxiliaryEffectSlotivPROC) (ALuint auxiliaryeffectslot, ALenum param, const ALint * values); +typedef ALvoid (ALAPIENTRY *alAuxiliaryEffectSlotfPROC) (ALuint auxiliaryeffectslot, ALenum param, ALfloat value); +typedef ALvoid (ALAPIENTRY *alAuxiliaryEffectSlotfvPROC) (ALuint auxiliaryeffectslot, ALenum param, const ALfloat * values); +typedef ALvoid (ALAPIENTRY *alGetAuxiliaryEffectSlotiPROC) (ALuint auxiliaryeffectslot, ALenum param, ALint* value); +typedef ALvoid (ALAPIENTRY *alGetAuxiliaryEffectSlotivPROC) (ALuint auxiliaryeffectslot, ALenum param, ALint * intdata); +typedef ALvoid (ALAPIENTRY *alGetAuxiliaryEffectSlotfPROC) (ALuint auxiliaryeffectslot, ALenum param, ALfloat* value); +typedef ALvoid (ALAPIENTRY *alGetAuxiliaryEffectSlotfvPROC) (ALuint auxiliaryeffectslot, ALenum param, ALfloat * floatdata); +typedef ALvoid (ALAPIENTRY *alGenEffectsPROC) (ALsizei n, ALuint * effects); +typedef ALvoid (ALAPIENTRY *alDeleteEffectsPROC) (ALsizei n, ALuint * effects); +typedef ALboolean (ALAPIENTRY *alIsEffectPROC) (ALuint effect); +typedef ALvoid (ALAPIENTRY *alEffectiPROC) (ALuint effect, ALenum param, ALint value); +typedef ALvoid (ALAPIENTRY *alEffectivPROC) (ALuint effect, ALenum param, const ALint * values); +typedef ALvoid (ALAPIENTRY *alEffectfPROC) (ALuint effect, ALenum param, ALfloat value); +typedef ALvoid (ALAPIENTRY *alEffectfvPROC) (ALuint effect, ALenum param, const ALfloat * values); +typedef ALvoid (ALAPIENTRY *alGetEffectiPROC) (ALuint effect, ALenum param, ALint* value); +typedef ALvoid (ALAPIENTRY *alGetEffectivPROC) (ALuint effect, ALenum param, ALint * intdata); +typedef ALvoid (ALAPIENTRY *alGetEffectfPROC) (ALuint effect, ALenum param, ALfloat* value); +typedef ALvoid (ALAPIENTRY *alGetEffectfvPROC) (ALuint effect, ALenum param, ALfloat * floatdata); +typedef ALvoid (ALAPIENTRY *alGenFiltersPROC) (ALsizei n, ALuint * filters); +typedef ALvoid (ALAPIENTRY *alDeleteFiltersPROC) (ALsizei n, ALuint * filters); +typedef ALboolean (ALAPIENTRY *alIsFilterPROC) (ALuint filter); +typedef ALvoid (ALAPIENTRY *alFilteriPROC) (ALuint filter, ALenum param, ALint value); +typedef ALvoid (ALAPIENTRY *alFilterivPROC) (ALuint filter, ALenum param, const ALint * values); +typedef ALvoid (ALAPIENTRY *alFilterfPROC) (ALuint filter, ALenum param, ALfloat value); +typedef ALvoid (ALAPIENTRY *alFilterfvPROC) (ALuint filter, ALenum param, const ALfloat * values); +typedef ALvoid (ALAPIENTRY *alGetFilteriPROC) (ALuint filter, ALenum param, ALint* value); +typedef ALvoid (ALAPIENTRY *alGetFilterivPROC) (ALuint filter, ALenum param, ALint * intdata); +typedef ALvoid (ALAPIENTRY *alGetFilterfPROC) (ALuint filter, ALenum param, ALfloat* value); +typedef ALvoid (ALAPIENTRY *alGetFilterfvPROC) (ALuint filter, ALenum param, ALfloat * floatdata); + +static alGenAuxiliaryEffectSlotsPROC alGenAuxiliaryEffectSlots; +static alDeleteAuxiliaryEffectSlotsPROC alDeleteAuxiliaryEffectSlots; +static alIsAuxiliaryEffectSlotPROC alIsAuxiliaryEffectSlot; +static alAuxiliaryEffectSlotiPROC alAuxiliaryEffectSloti; +static alAuxiliaryEffectSlotivPROC alAuxiliaryEffectSlotiv; +static alAuxiliaryEffectSlotfPROC alAuxiliaryEffectSlotf; +static alAuxiliaryEffectSlotfvPROC alAuxiliaryEffectSlotfv; +static alGetAuxiliaryEffectSlotiPROC alGetAuxiliaryEffectSloti; +static alGetAuxiliaryEffectSlotivPROC alGetAuxiliaryEffectSlotiv; +static alGetAuxiliaryEffectSlotfPROC alGetAuxiliaryEffectSlotf; +static alGetAuxiliaryEffectSlotfvPROC alGetAuxiliaryEffectSlotfv; +static alGenEffectsPROC alGenEffects; +static alDeleteEffectsPROC alDeleteEffects; +static alIsEffectPROC alIsEffect; +static alEffectiPROC alEffecti; +static alEffectivPROC alEffectiv; +static alEffectfPROC alEffectf; +static alEffectfvPROC alEffectfv; +static alGetEffectiPROC alGetEffecti; +static alGetEffectivPROC alGetEffectiv; +static alGetEffectfPROC alGetEffectf; +static alGetEffectfvPROC alGetEffectfv; +static alGenFiltersPROC alGenFilters; +static alDeleteFiltersPROC alDeleteFilters; +static alIsFilterPROC alIsFilter; +static alFilteriPROC alFilteri; +static alFilterivPROC alFilteriv; +static alFilterfPROC alFilterf; +static alFilterfvPROC alFilterfv; +static alGetFilteriPROC alGetFilteri; +static alGetFilterivPROC alGetFilteriv; +static alGetFilterfPROC alGetFilterf; +static alGetFilterfvPROC alGetFilterfv; + +static void JNICALL Java_org_lwjgl_openal_EFX10_nalGenAuxiliaryEffectSlots(JNIEnv *env, jclass clazz, jint n, jlong auxiliaryeffectslots) { + ALuint *auxiliaryeffectslots_address = (ALuint *)(intptr_t)auxiliaryeffectslots; + alGenAuxiliaryEffectSlots(n, auxiliaryeffectslots_address); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_openal_EFX10_nalGenAuxiliaryEffectSlots2(JNIEnv *env, jclass clazz, jint n) { + ALuint __result; + alGenAuxiliaryEffectSlots(n, &__result); + return __result; +} + +static void JNICALL Java_org_lwjgl_openal_EFX10_nalDeleteAuxiliaryEffectSlots(JNIEnv *env, jclass clazz, jint n, jlong auxiliaryeffectslots) { + ALuint *auxiliaryeffectslots_address = (ALuint *)(intptr_t)auxiliaryeffectslots; + alDeleteAuxiliaryEffectSlots(n, auxiliaryeffectslots_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_openal_EFX10_nalDeleteAuxiliaryEffectSlots2(JNIEnv *env, jclass clazz, jint n, jint auxiliaryeffectslot) { + alDeleteAuxiliaryEffectSlots(n, (ALuint*)&auxiliaryeffectslot); +} + +static jboolean JNICALL Java_org_lwjgl_openal_EFX10_nalIsAuxiliaryEffectSlot(JNIEnv *env, jclass clazz, jint auxiliaryeffectslot) { + ALboolean __result = alIsAuxiliaryEffectSlot(auxiliaryeffectslot); + return __result; +} + +static void JNICALL Java_org_lwjgl_openal_EFX10_nalAuxiliaryEffectSloti(JNIEnv *env, jclass clazz, jint auxiliaryeffectslot, jint param, jint value) { + alAuxiliaryEffectSloti(auxiliaryeffectslot, param, value); +} + +static void JNICALL Java_org_lwjgl_openal_EFX10_nalAuxiliaryEffectSlotiv(JNIEnv *env, jclass clazz, jint auxiliaryeffectslot, jint param, jlong values) { + const ALint *values_address = (const ALint *)(intptr_t)values; + alAuxiliaryEffectSlotiv(auxiliaryeffectslot, param, values_address); +} + +static void JNICALL Java_org_lwjgl_openal_EFX10_nalAuxiliaryEffectSlotf(JNIEnv *env, jclass clazz, jint auxiliaryeffectslot, jint param, jfloat value) { + alAuxiliaryEffectSlotf(auxiliaryeffectslot, param, value); +} + +static void JNICALL Java_org_lwjgl_openal_EFX10_nalAuxiliaryEffectSlotfv(JNIEnv *env, jclass clazz, jint auxiliaryeffectslot, jint param, jlong values) { + const ALfloat *values_address = (const ALfloat *)(intptr_t)values; + alAuxiliaryEffectSlotfv(auxiliaryeffectslot, param, values_address); +} + +static jint JNICALL Java_org_lwjgl_openal_EFX10_nalGetAuxiliaryEffectSloti(JNIEnv *env, jclass clazz, jint auxiliaryeffectslot, jint param) { + ALint __result; + alGetAuxiliaryEffectSloti(auxiliaryeffectslot, param, &__result); + return __result; +} + +static void JNICALL Java_org_lwjgl_openal_EFX10_nalGetAuxiliaryEffectSlotiv(JNIEnv *env, jclass clazz, jint auxiliaryeffectslot, jint param, jlong intdata) { + ALint *intdata_address = (ALint *)(intptr_t)intdata; + alGetAuxiliaryEffectSlotiv(auxiliaryeffectslot, param, intdata_address); +} + +static jfloat JNICALL Java_org_lwjgl_openal_EFX10_nalGetAuxiliaryEffectSlotf(JNIEnv *env, jclass clazz, jint auxiliaryeffectslot, jint param) { + ALfloat __result; + alGetAuxiliaryEffectSlotf(auxiliaryeffectslot, param, &__result); + return __result; +} + +static void JNICALL Java_org_lwjgl_openal_EFX10_nalGetAuxiliaryEffectSlotfv(JNIEnv *env, jclass clazz, jint auxiliaryeffectslot, jint param, jlong floatdata) { + ALfloat *floatdata_address = (ALfloat *)(intptr_t)floatdata; + alGetAuxiliaryEffectSlotfv(auxiliaryeffectslot, param, floatdata_address); +} + +static void JNICALL Java_org_lwjgl_openal_EFX10_nalGenEffects(JNIEnv *env, jclass clazz, jint n, jlong effects) { + ALuint *effects_address = (ALuint *)(intptr_t)effects; + alGenEffects(n, effects_address); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_openal_EFX10_nalGenEffects2(JNIEnv *env, jclass clazz, jint n) { + ALuint __result; + alGenEffects(n, &__result); + return __result; +} + +static void JNICALL Java_org_lwjgl_openal_EFX10_nalDeleteEffects(JNIEnv *env, jclass clazz, jint n, jlong effects) { + ALuint *effects_address = (ALuint *)(intptr_t)effects; + alDeleteEffects(n, effects_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_openal_EFX10_nalDeleteEffects2(JNIEnv *env, jclass clazz, jint n, jint effect) { + alDeleteEffects(n, (ALuint*)&effect); +} + +static jboolean JNICALL Java_org_lwjgl_openal_EFX10_nalIsEffect(JNIEnv *env, jclass clazz, jint effect) { + ALboolean __result = alIsEffect(effect); + return __result; +} + +static void JNICALL Java_org_lwjgl_openal_EFX10_nalEffecti(JNIEnv *env, jclass clazz, jint effect, jint param, jint value) { + alEffecti(effect, param, value); +} + +static void JNICALL Java_org_lwjgl_openal_EFX10_nalEffectiv(JNIEnv *env, jclass clazz, jint effect, jint param, jlong values) { + const ALint *values_address = (const ALint *)(intptr_t)values; + alEffectiv(effect, param, values_address); +} + +static void JNICALL Java_org_lwjgl_openal_EFX10_nalEffectf(JNIEnv *env, jclass clazz, jint effect, jint param, jfloat value) { + alEffectf(effect, param, value); +} + +static void JNICALL Java_org_lwjgl_openal_EFX10_nalEffectfv(JNIEnv *env, jclass clazz, jint effect, jint param, jlong values) { + const ALfloat *values_address = (const ALfloat *)(intptr_t)values; + alEffectfv(effect, param, values_address); +} + +static jint JNICALL Java_org_lwjgl_openal_EFX10_nalGetEffecti(JNIEnv *env, jclass clazz, jint effect, jint param) { + ALint __result; + alGetEffecti(effect, param, &__result); + return __result; +} + +static void JNICALL Java_org_lwjgl_openal_EFX10_nalGetEffectiv(JNIEnv *env, jclass clazz, jint effect, jint param, jlong intdata) { + ALint *intdata_address = (ALint *)(intptr_t)intdata; + alGetEffectiv(effect, param, intdata_address); +} + +static jfloat JNICALL Java_org_lwjgl_openal_EFX10_nalGetEffectf(JNIEnv *env, jclass clazz, jint effect, jint param) { + ALfloat __result; + alGetEffectf(effect, param, &__result); + return __result; +} + +static void JNICALL Java_org_lwjgl_openal_EFX10_nalGetEffectfv(JNIEnv *env, jclass clazz, jint effect, jint param, jlong floatdata) { + ALfloat *floatdata_address = (ALfloat *)(intptr_t)floatdata; + alGetEffectfv(effect, param, floatdata_address); +} + +static void JNICALL Java_org_lwjgl_openal_EFX10_nalGenFilters(JNIEnv *env, jclass clazz, jint n, jlong filters) { + ALuint *filters_address = (ALuint *)(intptr_t)filters; + alGenFilters(n, filters_address); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_openal_EFX10_nalGenFilters2(JNIEnv *env, jclass clazz, jint n) { + ALuint __result; + alGenFilters(n, &__result); + return __result; +} + +static void JNICALL Java_org_lwjgl_openal_EFX10_nalDeleteFilters(JNIEnv *env, jclass clazz, jint n, jlong filters) { + ALuint *filters_address = (ALuint *)(intptr_t)filters; + alDeleteFilters(n, filters_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_openal_EFX10_nalDeleteFilters2(JNIEnv *env, jclass clazz, jint n, jint filter) { + alDeleteFilters(n, (ALuint*)&filter); +} + +static jboolean JNICALL Java_org_lwjgl_openal_EFX10_nalIsFilter(JNIEnv *env, jclass clazz, jint filter) { + ALboolean __result = alIsFilter(filter); + return __result; +} + +static void JNICALL Java_org_lwjgl_openal_EFX10_nalFilteri(JNIEnv *env, jclass clazz, jint filter, jint param, jint value) { + alFilteri(filter, param, value); +} + +static void JNICALL Java_org_lwjgl_openal_EFX10_nalFilteriv(JNIEnv *env, jclass clazz, jint filter, jint param, jlong values) { + const ALint *values_address = (const ALint *)(intptr_t)values; + alFilteriv(filter, param, values_address); +} + +static void JNICALL Java_org_lwjgl_openal_EFX10_nalFilterf(JNIEnv *env, jclass clazz, jint filter, jint param, jfloat value) { + alFilterf(filter, param, value); +} + +static void JNICALL Java_org_lwjgl_openal_EFX10_nalFilterfv(JNIEnv *env, jclass clazz, jint filter, jint param, jlong values) { + const ALfloat *values_address = (const ALfloat *)(intptr_t)values; + alFilterfv(filter, param, values_address); +} + +static jint JNICALL Java_org_lwjgl_openal_EFX10_nalGetFilteri(JNIEnv *env, jclass clazz, jint filter, jint param) { + ALint __result; + alGetFilteri(filter, param, &__result); + return __result; +} + +static void JNICALL Java_org_lwjgl_openal_EFX10_nalGetFilteriv(JNIEnv *env, jclass clazz, jint filter, jint param, jlong intdata) { + ALint *intdata_address = (ALint *)(intptr_t)intdata; + alGetFilteriv(filter, param, intdata_address); +} + +static jfloat JNICALL Java_org_lwjgl_openal_EFX10_nalGetFilterf(JNIEnv *env, jclass clazz, jint filter, jint param) { + ALfloat __result; + alGetFilterf(filter, param, &__result); + return __result; +} + +static void JNICALL Java_org_lwjgl_openal_EFX10_nalGetFilterfv(JNIEnv *env, jclass clazz, jint filter, jint param, jlong floatdata) { + ALfloat *floatdata_address = (ALfloat *)(intptr_t)floatdata; + alGetFilterfv(filter, param, floatdata_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_openal_EFX10_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nalGenAuxiliaryEffectSlots", "(IJ)V", (void *)&Java_org_lwjgl_openal_EFX10_nalGenAuxiliaryEffectSlots, "alGenAuxiliaryEffectSlots", (void *)&alGenAuxiliaryEffectSlots, false}, + {"nalGenAuxiliaryEffectSlots2", "(I)I", (void *)&Java_org_lwjgl_openal_EFX10_nalGenAuxiliaryEffectSlots2, "alGenAuxiliaryEffectSlots", (void *)&alGenAuxiliaryEffectSlots, false}, + {"nalDeleteAuxiliaryEffectSlots", "(IJ)V", (void *)&Java_org_lwjgl_openal_EFX10_nalDeleteAuxiliaryEffectSlots, "alDeleteAuxiliaryEffectSlots", (void *)&alDeleteAuxiliaryEffectSlots, false}, + {"nalDeleteAuxiliaryEffectSlots2", "(II)V", (void *)&Java_org_lwjgl_openal_EFX10_nalDeleteAuxiliaryEffectSlots2, "alDeleteAuxiliaryEffectSlots", (void *)&alDeleteAuxiliaryEffectSlots, false}, + {"nalIsAuxiliaryEffectSlot", "(I)Z", (void *)&Java_org_lwjgl_openal_EFX10_nalIsAuxiliaryEffectSlot, "alIsAuxiliaryEffectSlot", (void *)&alIsAuxiliaryEffectSlot, false}, + {"nalAuxiliaryEffectSloti", "(III)V", (void *)&Java_org_lwjgl_openal_EFX10_nalAuxiliaryEffectSloti, "alAuxiliaryEffectSloti", (void *)&alAuxiliaryEffectSloti, false}, + {"nalAuxiliaryEffectSlotiv", "(IIJ)V", (void *)&Java_org_lwjgl_openal_EFX10_nalAuxiliaryEffectSlotiv, "alAuxiliaryEffectSlotiv", (void *)&alAuxiliaryEffectSlotiv, false}, + {"nalAuxiliaryEffectSlotf", "(IIF)V", (void *)&Java_org_lwjgl_openal_EFX10_nalAuxiliaryEffectSlotf, "alAuxiliaryEffectSlotf", (void *)&alAuxiliaryEffectSlotf, false}, + {"nalAuxiliaryEffectSlotfv", "(IIJ)V", (void *)&Java_org_lwjgl_openal_EFX10_nalAuxiliaryEffectSlotfv, "alAuxiliaryEffectSlotfv", (void *)&alAuxiliaryEffectSlotfv, false}, + {"nalGetAuxiliaryEffectSloti", "(II)I", (void *)&Java_org_lwjgl_openal_EFX10_nalGetAuxiliaryEffectSloti, "alGetAuxiliaryEffectSloti", (void *)&alGetAuxiliaryEffectSloti, false}, + {"nalGetAuxiliaryEffectSlotiv", "(IIJ)V", (void *)&Java_org_lwjgl_openal_EFX10_nalGetAuxiliaryEffectSlotiv, "alGetAuxiliaryEffectSlotiv", (void *)&alGetAuxiliaryEffectSlotiv, false}, + {"nalGetAuxiliaryEffectSlotf", "(II)F", (void *)&Java_org_lwjgl_openal_EFX10_nalGetAuxiliaryEffectSlotf, "alGetAuxiliaryEffectSlotf", (void *)&alGetAuxiliaryEffectSlotf, false}, + {"nalGetAuxiliaryEffectSlotfv", "(IIJ)V", (void *)&Java_org_lwjgl_openal_EFX10_nalGetAuxiliaryEffectSlotfv, "alGetAuxiliaryEffectSlotfv", (void *)&alGetAuxiliaryEffectSlotfv, false}, + {"nalGenEffects", "(IJ)V", (void *)&Java_org_lwjgl_openal_EFX10_nalGenEffects, "alGenEffects", (void *)&alGenEffects, false}, + {"nalGenEffects2", "(I)I", (void *)&Java_org_lwjgl_openal_EFX10_nalGenEffects2, "alGenEffects", (void *)&alGenEffects, false}, + {"nalDeleteEffects", "(IJ)V", (void *)&Java_org_lwjgl_openal_EFX10_nalDeleteEffects, "alDeleteEffects", (void *)&alDeleteEffects, false}, + {"nalDeleteEffects2", "(II)V", (void *)&Java_org_lwjgl_openal_EFX10_nalDeleteEffects2, "alDeleteEffects", (void *)&alDeleteEffects, false}, + {"nalIsEffect", "(I)Z", (void *)&Java_org_lwjgl_openal_EFX10_nalIsEffect, "alIsEffect", (void *)&alIsEffect, false}, + {"nalEffecti", "(III)V", (void *)&Java_org_lwjgl_openal_EFX10_nalEffecti, "alEffecti", (void *)&alEffecti, false}, + {"nalEffectiv", "(IIJ)V", (void *)&Java_org_lwjgl_openal_EFX10_nalEffectiv, "alEffectiv", (void *)&alEffectiv, false}, + {"nalEffectf", "(IIF)V", (void *)&Java_org_lwjgl_openal_EFX10_nalEffectf, "alEffectf", (void *)&alEffectf, false}, + {"nalEffectfv", "(IIJ)V", (void *)&Java_org_lwjgl_openal_EFX10_nalEffectfv, "alEffectfv", (void *)&alEffectfv, false}, + {"nalGetEffecti", "(II)I", (void *)&Java_org_lwjgl_openal_EFX10_nalGetEffecti, "alGetEffecti", (void *)&alGetEffecti, false}, + {"nalGetEffectiv", "(IIJ)V", (void *)&Java_org_lwjgl_openal_EFX10_nalGetEffectiv, "alGetEffectiv", (void *)&alGetEffectiv, false}, + {"nalGetEffectf", "(II)F", (void *)&Java_org_lwjgl_openal_EFX10_nalGetEffectf, "alGetEffectf", (void *)&alGetEffectf, false}, + {"nalGetEffectfv", "(IIJ)V", (void *)&Java_org_lwjgl_openal_EFX10_nalGetEffectfv, "alGetEffectfv", (void *)&alGetEffectfv, false}, + {"nalGenFilters", "(IJ)V", (void *)&Java_org_lwjgl_openal_EFX10_nalGenFilters, "alGenFilters", (void *)&alGenFilters, false}, + {"nalGenFilters2", "(I)I", (void *)&Java_org_lwjgl_openal_EFX10_nalGenFilters2, "alGenFilters", (void *)&alGenFilters, false}, + {"nalDeleteFilters", "(IJ)V", (void *)&Java_org_lwjgl_openal_EFX10_nalDeleteFilters, "alDeleteFilters", (void *)&alDeleteFilters, false}, + {"nalDeleteFilters2", "(II)V", (void *)&Java_org_lwjgl_openal_EFX10_nalDeleteFilters2, "alDeleteFilters", (void *)&alDeleteFilters, false}, + {"nalIsFilter", "(I)Z", (void *)&Java_org_lwjgl_openal_EFX10_nalIsFilter, "alIsFilter", (void *)&alIsFilter, false}, + {"nalFilteri", "(III)V", (void *)&Java_org_lwjgl_openal_EFX10_nalFilteri, "alFilteri", (void *)&alFilteri, false}, + {"nalFilteriv", "(IIJ)V", (void *)&Java_org_lwjgl_openal_EFX10_nalFilteriv, "alFilteriv", (void *)&alFilteriv, false}, + {"nalFilterf", "(IIF)V", (void *)&Java_org_lwjgl_openal_EFX10_nalFilterf, "alFilterf", (void *)&alFilterf, false}, + {"nalFilterfv", "(IIJ)V", (void *)&Java_org_lwjgl_openal_EFX10_nalFilterfv, "alFilterfv", (void *)&alFilterfv, false}, + {"nalGetFilteri", "(II)I", (void *)&Java_org_lwjgl_openal_EFX10_nalGetFilteri, "alGetFilteri", (void *)&alGetFilteri, false}, + {"nalGetFilteriv", "(IIJ)V", (void *)&Java_org_lwjgl_openal_EFX10_nalGetFilteriv, "alGetFilteriv", (void *)&alGetFilteriv, false}, + {"nalGetFilterf", "(II)F", (void *)&Java_org_lwjgl_openal_EFX10_nalGetFilterf, "alGetFilterf", (void *)&alGetFilterf, false}, + {"nalGetFilterfv", "(IIJ)V", (void *)&Java_org_lwjgl_openal_EFX10_nalGetFilterfv, "alGetFilterfv", (void *)&alGetFilterfv, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extal_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_APPLEContextLoggingFunctions.c b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_APPLEContextLoggingFunctions.c new file mode 100644 index 0000000..a369557 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_APPLEContextLoggingFunctions.c @@ -0,0 +1,33 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extcl.h" + +typedef CL_API_ENTRY void (CL_API_CALL *clLogMessagesToSystemLogAPPLEPROC) (const cl_char * errstr, const cl_void * private_info, size_t cb, cl_void * user_data); +typedef CL_API_ENTRY void (CL_API_CALL *clLogMessagesToStdoutAPPLEPROC) (const cl_char * errstr, const cl_void * private_info, size_t cb, cl_void * user_data); +typedef CL_API_ENTRY void (CL_API_CALL *clLogMessagesToStderrAPPLEPROC) (const cl_char * errstr, const cl_void * private_info, size_t cb, cl_void * user_data); + +JNIEXPORT void JNICALL Java_org_lwjgl_opencl_APPLEContextLoggingFunctions_nclLogMessagesToSystemLogAPPLE(JNIEnv *env, jclass clazz, jlong errstr, jlong private_info, jlong cb, jlong user_data, jlong function_pointer) { + const cl_char *errstr_address = (const cl_char *)(intptr_t)errstr; + const cl_void *private_info_address = (const cl_void *)(intptr_t)private_info; + cl_void *user_data_address = (cl_void *)(intptr_t)user_data; + clLogMessagesToSystemLogAPPLEPROC clLogMessagesToSystemLogAPPLE = (clLogMessagesToSystemLogAPPLEPROC)((intptr_t)function_pointer); + clLogMessagesToSystemLogAPPLE(errstr_address, private_info_address, cb, user_data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opencl_APPLEContextLoggingFunctions_nclLogMessagesToStdoutAPPLE(JNIEnv *env, jclass clazz, jlong errstr, jlong private_info, jlong cb, jlong user_data, jlong function_pointer) { + const cl_char *errstr_address = (const cl_char *)(intptr_t)errstr; + const cl_void *private_info_address = (const cl_void *)(intptr_t)private_info; + cl_void *user_data_address = (cl_void *)(intptr_t)user_data; + clLogMessagesToStdoutAPPLEPROC clLogMessagesToStdoutAPPLE = (clLogMessagesToStdoutAPPLEPROC)((intptr_t)function_pointer); + clLogMessagesToStdoutAPPLE(errstr_address, private_info_address, cb, user_data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opencl_APPLEContextLoggingFunctions_nclLogMessagesToStderrAPPLE(JNIEnv *env, jclass clazz, jlong errstr, jlong private_info, jlong cb, jlong user_data, jlong function_pointer) { + const cl_char *errstr_address = (const cl_char *)(intptr_t)errstr; + const cl_void *private_info_address = (const cl_void *)(intptr_t)private_info; + cl_void *user_data_address = (cl_void *)(intptr_t)user_data; + clLogMessagesToStderrAPPLEPROC clLogMessagesToStderrAPPLE = (clLogMessagesToStderrAPPLEPROC)((intptr_t)function_pointer); + clLogMessagesToStderrAPPLE(errstr_address, private_info_address, cb, user_data_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_APPLEGLSharing.c b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_APPLEGLSharing.c new file mode 100644 index 0000000..072c0f7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_APPLEGLSharing.c @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extcl.h" + +typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetGLContextInfoAPPLEPROC) (cl_context context, cl_void * platform_gl_ctx, cl_gl_platform_info param_name, size_t param_value_size, cl_void * param_value, size_t * param_value_size_ret); + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_APPLEGLSharing_nclGetGLContextInfoAPPLE(JNIEnv *env, jclass clazz, jlong context, jlong platform_gl_ctx, jint param_name, jlong param_value_size, jlong param_value, jlong param_value_size_ret, jlong function_pointer) { + cl_void *platform_gl_ctx_address = (cl_void *)(intptr_t)platform_gl_ctx; + cl_void *param_value_address = (cl_void *)(intptr_t)param_value; + size_t *param_value_size_ret_address = (size_t *)(intptr_t)param_value_size_ret; + clGetGLContextInfoAPPLEPROC clGetGLContextInfoAPPLE = (clGetGLContextInfoAPPLEPROC)((intptr_t)function_pointer); + cl_int __result = clGetGLContextInfoAPPLE((cl_context)(intptr_t)context, platform_gl_ctx_address, param_name, param_value_size, param_value_address, param_value_size_ret_address); + return __result; +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_APPLESetMemObjectDestructor.c b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_APPLESetMemObjectDestructor.c new file mode 100644 index 0000000..b87063c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_APPLESetMemObjectDestructor.c @@ -0,0 +1,13 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extcl.h" + +typedef CL_API_ENTRY cl_int (CL_API_CALL *clSetMemObjectDestructorAPPLEPROC) (cl_mem memobj, cl_mem_object_destructor_callback pfn_notify, void * user_data); + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_APPLESetMemObjectDestructor_nclSetMemObjectDestructorAPPLE(JNIEnv *env, jclass clazz, jlong memobj, jlong pfn_notify, jlong user_data, jlong function_pointer) { + clSetMemObjectDestructorAPPLEPROC clSetMemObjectDestructorAPPLE = (clSetMemObjectDestructorAPPLEPROC)((intptr_t)function_pointer); + cl_int __result = clSetMemObjectDestructorAPPLE((cl_mem)(intptr_t)memobj, (cl_mem_object_destructor_callback)(intptr_t)pfn_notify, (void *)(intptr_t)user_data); + return __result; +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_CL10.c b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_CL10.c new file mode 100644 index 0000000..845efe6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_CL10.c @@ -0,0 +1,732 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extcl.h" + +typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetPlatformIDsPROC) (cl_uint num_entries, cl_platform_id * platforms, cl_uint * num_platforms); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetPlatformInfoPROC) (cl_platform_id platform, cl_platform_info param_name, size_t param_value_size, cl_void * param_value, size_t * param_value_size_ret); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsPROC) (cl_platform_id platform, cl_device_type device_type, cl_uint num_entries, cl_device_id * devices, cl_uint * num_devices); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceInfoPROC) (cl_device_id device, cl_device_info param_name, size_t param_value_size, cl_void * param_value, size_t * param_value_size_ret); +typedef CL_API_ENTRY cl_context (CL_API_CALL *clCreateContextPROC) (const cl_context_properties * properties, cl_uint num_devices, const cl_device_id * devices, cl_create_context_callback pfn_notify, void * user_data, cl_int * errcode_ret); +typedef CL_API_ENTRY cl_context (CL_API_CALL *clCreateContextFromTypePROC) (const cl_context_properties * properties, cl_device_type device_type, cl_create_context_callback pfn_notify, void * user_data, cl_int * errcode_ret); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clRetainContextPROC) (cl_context context); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clReleaseContextPROC) (cl_context context); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetContextInfoPROC) (cl_context context, cl_context_info param_name, size_t param_value_size, cl_void * param_value, size_t * param_value_size_ret); +typedef CL_API_ENTRY cl_command_queue (CL_API_CALL *clCreateCommandQueuePROC) (cl_context context, cl_device_id device, cl_command_queue_properties properties, cl_int * errcode_ret); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clRetainCommandQueuePROC) (cl_command_queue command_queue); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clReleaseCommandQueuePROC) (cl_command_queue command_queue); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetCommandQueueInfoPROC) (cl_command_queue command_queue, cl_command_queue_info param_name, size_t param_value_size, cl_void * param_value, size_t * param_value_size_ret); +typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateBufferPROC) (cl_context context, cl_mem_flags flags, size_t size, cl_void * host_ptr, cl_int * errcode_ret); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReadBufferPROC) (cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read, size_t offset, size_t size, cl_void * ptr, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueWriteBufferPROC) (cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_write, size_t offset, size_t size, const cl_void * ptr, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueCopyBufferPROC) (cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_buffer, size_t src_offset, size_t dst_offset, size_t size, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); +typedef CL_API_ENTRY cl_void * (CL_API_CALL *clEnqueueMapBufferPROC) (cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_map, cl_map_flags map_flags, size_t offset, size_t size, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event, cl_int * errcode_ret); +typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateImage2DPROC) (cl_context context, cl_mem_flags flags, const cl_image_format * image_format, size_t image_width, size_t image_height, size_t image_row_pitch, cl_void * host_ptr, cl_int * errcode_ret); +typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateImage3DPROC) (cl_context context, cl_mem_flags flags, const cl_image_format * image_format, size_t image_width, size_t image_height, size_t image_depth, size_t image_row_pitch, size_t image_slice_pitch, cl_void * host_ptr, cl_int * errcode_ret); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetSupportedImageFormatsPROC) (cl_context context, cl_mem_flags flags, cl_mem_object_type image_type, cl_uint num_entries, cl_image_format * image_formats, cl_uint * num_image_formats); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReadImagePROC) (cl_command_queue command_queue, cl_mem image, cl_bool blocking_read, const size_t * origin, const size_t * region, size_t row_pitch, size_t slice_pitch, cl_void * ptr, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueWriteImagePROC) (cl_command_queue command_queue, cl_mem image, cl_bool blocking_write, const size_t * origin, const size_t * region, size_t input_row_pitch, size_t input_slice_pitch, const cl_void * ptr, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueCopyImagePROC) (cl_command_queue command_queue, cl_mem src_image, cl_mem dst_image, const size_t * src_origin, const size_t * dst_origin, const size_t * region, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueCopyImageToBufferPROC) (cl_command_queue command_queue, cl_mem src_image, cl_mem dst_buffer, const size_t * src_origin, const size_t * region, size_t dst_offset, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueCopyBufferToImagePROC) (cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_image, size_t src_offset, const size_t * dst_origin, const size_t * region, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); +typedef CL_API_ENTRY cl_void * (CL_API_CALL *clEnqueueMapImagePROC) (cl_command_queue command_queue, cl_mem image, cl_bool blocking_map, cl_map_flags map_flags, const size_t * origin, const size_t * region, size_t * image_row_pitch, size_t * image_slice_pitch, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event, cl_int * errcode_ret); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetImageInfoPROC) (cl_mem image, cl_image_info param_name, size_t param_value_size, cl_void * param_value, size_t * param_value_size_ret); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clRetainMemObjectPROC) (cl_mem memobj); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clReleaseMemObjectPROC) (cl_mem memobj); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueUnmapMemObjectPROC) (cl_command_queue command_queue, cl_mem memobj, cl_void * mapped_ptr, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetMemObjectInfoPROC) (cl_mem memobj, cl_mem_info param_name, size_t param_value_size, cl_void * param_value, size_t * param_value_size_ret); +typedef CL_API_ENTRY cl_sampler (CL_API_CALL *clCreateSamplerPROC) (cl_context context, cl_bool normalized_coords, cl_addressing_mode addressing_mode, cl_filter_mode filter_mode, cl_int * errcode_ret); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clRetainSamplerPROC) (cl_sampler sampler); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clReleaseSamplerPROC) (cl_sampler sampler); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetSamplerInfoPROC) (cl_sampler sampler, cl_sampler_info param_name, size_t param_value_size, cl_void * param_value, size_t * param_value_size_ret); +typedef CL_API_ENTRY cl_program (CL_API_CALL *clCreateProgramWithSourcePROC) (cl_context context, cl_uint count, const cl_char ** string, const size_t* lengths, cl_int * errcode_ret); +typedef CL_API_ENTRY cl_program (CL_API_CALL *clCreateProgramWithBinaryPROC) (cl_context context, cl_uint num_devices, const cl_device_id* device, const size_t* lengths, const cl_uchar ** binary, cl_int * binary_status, cl_int * errcode_ret); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clRetainProgramPROC) (cl_program program); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clReleaseProgramPROC) (cl_program program); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clBuildProgramPROC) (cl_program program, cl_uint num_devices, const cl_device_id * device_list, const cl_char * options, cl_program_callback pfn_notify, void * user_data); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clUnloadCompilerPROC) (); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetProgramInfoPROC) (cl_program program, cl_program_info param_name, size_t param_value_size, cl_void * param_value, size_t * param_value_size_ret); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetProgramBuildInfoPROC) (cl_program program, cl_device_id device, cl_program_build_info param_name, size_t param_value_size, cl_void * param_value, size_t * param_value_size_ret); +typedef CL_API_ENTRY cl_kernel (CL_API_CALL *clCreateKernelPROC) (cl_program program, const cl_char * kernel_name, cl_int * errcode_ret); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clCreateKernelsInProgramPROC) (cl_program program, cl_uint num_kernels, cl_kernel * kernels, cl_uint * num_kernels_ret); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clRetainKernelPROC) (cl_kernel kernel); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clReleaseKernelPROC) (cl_kernel kernel); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clSetKernelArgPROC) (cl_kernel kernel, cl_uint arg_index, size_t arg_size, const cl_void * arg_value); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetKernelInfoPROC) (cl_kernel kernel, cl_kernel_info param_name, size_t param_value_size, cl_void * param_value, size_t * param_value_size_ret); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetKernelWorkGroupInfoPROC) (cl_kernel kernel, cl_device_id device, cl_kernel_work_group_info param_name, size_t param_value_size, cl_void * param_value, size_t * param_value_size_ret); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueNDRangeKernelPROC) (cl_command_queue command_queue, cl_kernel kernel, cl_uint work_dim, const size_t * global_work_offset, const size_t * global_work_size, const size_t * local_work_size, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueTaskPROC) (cl_command_queue command_queue, cl_kernel kernel, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueNativeKernelPROC) (cl_command_queue command_queue, cl_native_kernel_func user_func, cl_void * args, size_t cb_args, cl_uint num_mem_objects, const cl_mem* mem_list, const cl_void ** args_mem_loc, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clWaitForEventsPROC) (cl_uint num_events, const cl_event * event_list); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetEventInfoPROC) (cl_event event, cl_event_info param_name, size_t param_value_size, cl_void * param_value, size_t * param_value_size_ret); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clRetainEventPROC) (cl_event event); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clReleaseEventPROC) (cl_event event); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueMarkerPROC) (cl_command_queue command_queue, cl_event * event); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueBarrierPROC) (cl_command_queue command_queue); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueWaitForEventsPROC) (cl_command_queue command_queue, cl_uint num_events, const cl_event * event_list); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetEventProfilingInfoPROC) (cl_event event, cl_profiling_info param_name, size_t param_value_size, cl_void * param_value, size_t * param_value_size_ret); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clFlushPROC) (cl_command_queue command_queue); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clFinishPROC) (cl_command_queue command_queue); +typedef CL_API_ENTRY void * (CL_API_CALL *clGetExtensionFunctionAddressPROC) (const cl_char * func_name); + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclGetPlatformIDs(JNIEnv *env, jclass clazz, jint num_entries, jlong platforms, jlong num_platforms, jlong function_pointer) { + cl_platform_id *platforms_address = (cl_platform_id *)(intptr_t)platforms; + cl_uint *num_platforms_address = (cl_uint *)(intptr_t)num_platforms; + clGetPlatformIDsPROC clGetPlatformIDs = (clGetPlatformIDsPROC)((intptr_t)function_pointer); + cl_int __result = clGetPlatformIDs(num_entries, platforms_address, num_platforms_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclGetPlatformInfo(JNIEnv *env, jclass clazz, jlong platform, jint param_name, jlong param_value_size, jlong param_value, jlong param_value_size_ret, jlong function_pointer) { + cl_void *param_value_address = (cl_void *)(intptr_t)param_value; + size_t *param_value_size_ret_address = (size_t *)(intptr_t)param_value_size_ret; + clGetPlatformInfoPROC clGetPlatformInfo = (clGetPlatformInfoPROC)((intptr_t)function_pointer); + cl_int __result = clGetPlatformInfo((cl_platform_id)(intptr_t)platform, param_name, param_value_size, param_value_address, param_value_size_ret_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclGetDeviceIDs(JNIEnv *env, jclass clazz, jlong platform, jlong device_type, jint num_entries, jlong devices, jlong num_devices, jlong function_pointer) { + cl_device_id *devices_address = (cl_device_id *)(intptr_t)devices; + cl_uint *num_devices_address = (cl_uint *)(intptr_t)num_devices; + clGetDeviceIDsPROC clGetDeviceIDs = (clGetDeviceIDsPROC)((intptr_t)function_pointer); + cl_int __result = clGetDeviceIDs((cl_platform_id)(intptr_t)platform, device_type, num_entries, devices_address, num_devices_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclGetDeviceInfo(JNIEnv *env, jclass clazz, jlong device, jint param_name, jlong param_value_size, jlong param_value, jlong param_value_size_ret, jlong function_pointer) { + cl_void *param_value_address = (cl_void *)(intptr_t)param_value; + size_t *param_value_size_ret_address = (size_t *)(intptr_t)param_value_size_ret; + clGetDeviceInfoPROC clGetDeviceInfo = (clGetDeviceInfoPROC)((intptr_t)function_pointer); + cl_int __result = clGetDeviceInfo((cl_device_id)(intptr_t)device, param_name, param_value_size, param_value_address, param_value_size_ret_address); + return __result; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CL10_nclCreateContext(JNIEnv *env, jclass clazz, jlong properties, jint num_devices, jlong devices, jlong pfn_notify, jlong user_data, jlong errcode_ret, jlong function_pointer) { + const cl_context_properties *properties_address = (const cl_context_properties *)(intptr_t)properties; + const cl_device_id *devices_address = (const cl_device_id *)(intptr_t)devices; + cl_int *errcode_ret_address = (cl_int *)(intptr_t)errcode_ret; + clCreateContextPROC clCreateContext = (clCreateContextPROC)((intptr_t)function_pointer); + cl_context __result = clCreateContext(properties_address, num_devices, devices_address, (cl_create_context_callback)(intptr_t)pfn_notify, (void *)(intptr_t)user_data, errcode_ret_address); + return (intptr_t)__result; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CL10_nclCreateContextFromType(JNIEnv *env, jclass clazz, jlong properties, jlong device_type, jlong pfn_notify, jlong user_data, jlong errcode_ret, jlong function_pointer) { + const cl_context_properties *properties_address = (const cl_context_properties *)(intptr_t)properties; + cl_int *errcode_ret_address = (cl_int *)(intptr_t)errcode_ret; + clCreateContextFromTypePROC clCreateContextFromType = (clCreateContextFromTypePROC)((intptr_t)function_pointer); + cl_context __result = clCreateContextFromType(properties_address, device_type, (cl_create_context_callback)(intptr_t)pfn_notify, (void *)(intptr_t)user_data, errcode_ret_address); + return (intptr_t)__result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclRetainContext(JNIEnv *env, jclass clazz, jlong context, jlong function_pointer) { + clRetainContextPROC clRetainContext = (clRetainContextPROC)((intptr_t)function_pointer); + cl_int __result = clRetainContext((cl_context)(intptr_t)context); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclReleaseContext(JNIEnv *env, jclass clazz, jlong context, jlong function_pointer) { + clReleaseContextPROC clReleaseContext = (clReleaseContextPROC)((intptr_t)function_pointer); + cl_int __result = clReleaseContext((cl_context)(intptr_t)context); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclGetContextInfo(JNIEnv *env, jclass clazz, jlong context, jint param_name, jlong param_value_size, jlong param_value, jlong param_value_size_ret, jlong function_pointer) { + cl_void *param_value_address = (cl_void *)(intptr_t)param_value; + size_t *param_value_size_ret_address = (size_t *)(intptr_t)param_value_size_ret; + clGetContextInfoPROC clGetContextInfo = (clGetContextInfoPROC)((intptr_t)function_pointer); + cl_int __result = clGetContextInfo((cl_context)(intptr_t)context, param_name, param_value_size, param_value_address, param_value_size_ret_address); + return __result; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CL10_nclCreateCommandQueue(JNIEnv *env, jclass clazz, jlong context, jlong device, jlong properties, jlong errcode_ret, jlong function_pointer) { + cl_int *errcode_ret_address = (cl_int *)(intptr_t)errcode_ret; + clCreateCommandQueuePROC clCreateCommandQueue = (clCreateCommandQueuePROC)((intptr_t)function_pointer); + cl_command_queue __result = clCreateCommandQueue((cl_context)(intptr_t)context, (cl_device_id)(intptr_t)device, properties, errcode_ret_address); + return (intptr_t)__result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclRetainCommandQueue(JNIEnv *env, jclass clazz, jlong command_queue, jlong function_pointer) { + clRetainCommandQueuePROC clRetainCommandQueue = (clRetainCommandQueuePROC)((intptr_t)function_pointer); + cl_int __result = clRetainCommandQueue((cl_command_queue)(intptr_t)command_queue); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclReleaseCommandQueue(JNIEnv *env, jclass clazz, jlong command_queue, jlong function_pointer) { + clReleaseCommandQueuePROC clReleaseCommandQueue = (clReleaseCommandQueuePROC)((intptr_t)function_pointer); + cl_int __result = clReleaseCommandQueue((cl_command_queue)(intptr_t)command_queue); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclGetCommandQueueInfo(JNIEnv *env, jclass clazz, jlong command_queue, jint param_name, jlong param_value_size, jlong param_value, jlong param_value_size_ret, jlong function_pointer) { + cl_void *param_value_address = (cl_void *)(intptr_t)param_value; + size_t *param_value_size_ret_address = (size_t *)(intptr_t)param_value_size_ret; + clGetCommandQueueInfoPROC clGetCommandQueueInfo = (clGetCommandQueueInfoPROC)((intptr_t)function_pointer); + cl_int __result = clGetCommandQueueInfo((cl_command_queue)(intptr_t)command_queue, param_name, param_value_size, param_value_address, param_value_size_ret_address); + return __result; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CL10_nclCreateBuffer(JNIEnv *env, jclass clazz, jlong context, jlong flags, jlong size, jlong host_ptr, jlong errcode_ret, jlong function_pointer) { + cl_void *host_ptr_address = (cl_void *)(intptr_t)host_ptr; + cl_int *errcode_ret_address = (cl_int *)(intptr_t)errcode_ret; + clCreateBufferPROC clCreateBuffer = (clCreateBufferPROC)((intptr_t)function_pointer); + cl_mem __result = clCreateBuffer((cl_context)(intptr_t)context, flags, size, host_ptr_address, errcode_ret_address); + return (intptr_t)__result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclEnqueueReadBuffer(JNIEnv *env, jclass clazz, jlong command_queue, jlong buffer, jint blocking_read, jlong offset, jlong size, jlong ptr, jint num_events_in_wait_list, jlong event_wait_list, jlong event, jlong function_pointer) { + cl_void *ptr_address = (cl_void *)(intptr_t)ptr; + const cl_event *event_wait_list_address = (const cl_event *)(intptr_t)event_wait_list; + cl_event *event_address = (cl_event *)(intptr_t)event; + clEnqueueReadBufferPROC clEnqueueReadBuffer = (clEnqueueReadBufferPROC)((intptr_t)function_pointer); + cl_int __result = clEnqueueReadBuffer((cl_command_queue)(intptr_t)command_queue, (cl_mem)(intptr_t)buffer, blocking_read, offset, size, ptr_address, num_events_in_wait_list, event_wait_list_address, event_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclEnqueueWriteBuffer(JNIEnv *env, jclass clazz, jlong command_queue, jlong buffer, jint blocking_write, jlong offset, jlong size, jlong ptr, jint num_events_in_wait_list, jlong event_wait_list, jlong event, jlong function_pointer) { + const cl_void *ptr_address = (const cl_void *)(intptr_t)ptr; + const cl_event *event_wait_list_address = (const cl_event *)(intptr_t)event_wait_list; + cl_event *event_address = (cl_event *)(intptr_t)event; + clEnqueueWriteBufferPROC clEnqueueWriteBuffer = (clEnqueueWriteBufferPROC)((intptr_t)function_pointer); + cl_int __result = clEnqueueWriteBuffer((cl_command_queue)(intptr_t)command_queue, (cl_mem)(intptr_t)buffer, blocking_write, offset, size, ptr_address, num_events_in_wait_list, event_wait_list_address, event_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclEnqueueCopyBuffer(JNIEnv *env, jclass clazz, jlong command_queue, jlong src_buffer, jlong dst_buffer, jlong src_offset, jlong dst_offset, jlong size, jint num_events_in_wait_list, jlong event_wait_list, jlong event, jlong function_pointer) { + const cl_event *event_wait_list_address = (const cl_event *)(intptr_t)event_wait_list; + cl_event *event_address = (cl_event *)(intptr_t)event; + clEnqueueCopyBufferPROC clEnqueueCopyBuffer = (clEnqueueCopyBufferPROC)((intptr_t)function_pointer); + cl_int __result = clEnqueueCopyBuffer((cl_command_queue)(intptr_t)command_queue, (cl_mem)(intptr_t)src_buffer, (cl_mem)(intptr_t)dst_buffer, src_offset, dst_offset, size, num_events_in_wait_list, event_wait_list_address, event_address); + return __result; +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opencl_CL10_nclEnqueueMapBuffer(JNIEnv *env, jclass clazz, jlong command_queue, jlong buffer, jint blocking_map, jlong map_flags, jlong offset, jlong size, jint num_events_in_wait_list, jlong event_wait_list, jlong event, jlong errcode_ret, jlong result_size, jlong function_pointer) { + const cl_event *event_wait_list_address = (const cl_event *)(intptr_t)event_wait_list; + cl_event *event_address = (cl_event *)(intptr_t)event; + cl_int *errcode_ret_address = (cl_int *)(intptr_t)errcode_ret; + clEnqueueMapBufferPROC clEnqueueMapBuffer = (clEnqueueMapBufferPROC)((intptr_t)function_pointer); + cl_void * __result = clEnqueueMapBuffer((cl_command_queue)(intptr_t)command_queue, (cl_mem)(intptr_t)buffer, blocking_map, map_flags, offset, size, num_events_in_wait_list, event_wait_list_address, event_address, errcode_ret_address); + return safeNewBuffer(env, __result, result_size); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CL10_nclCreateImage2D(JNIEnv *env, jclass clazz, jlong context, jlong flags, jlong image_format, jlong image_width, jlong image_height, jlong image_row_pitch, jlong host_ptr, jlong errcode_ret, jlong function_pointer) { + const cl_image_format *image_format_address = (const cl_image_format *)(intptr_t)image_format; + cl_void *host_ptr_address = (cl_void *)(intptr_t)host_ptr; + cl_int *errcode_ret_address = (cl_int *)(intptr_t)errcode_ret; + clCreateImage2DPROC clCreateImage2D = (clCreateImage2DPROC)((intptr_t)function_pointer); + cl_mem __result = clCreateImage2D((cl_context)(intptr_t)context, flags, image_format_address, image_width, image_height, image_row_pitch, host_ptr_address, errcode_ret_address); + return (intptr_t)__result; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CL10_nclCreateImage3D(JNIEnv *env, jclass clazz, jlong context, jlong flags, jlong image_format, jlong image_width, jlong image_height, jlong image_depth, jlong image_row_pitch, jlong image_slice_pitch, jlong host_ptr, jlong errcode_ret, jlong function_pointer) { + const cl_image_format *image_format_address = (const cl_image_format *)(intptr_t)image_format; + cl_void *host_ptr_address = (cl_void *)(intptr_t)host_ptr; + cl_int *errcode_ret_address = (cl_int *)(intptr_t)errcode_ret; + clCreateImage3DPROC clCreateImage3D = (clCreateImage3DPROC)((intptr_t)function_pointer); + cl_mem __result = clCreateImage3D((cl_context)(intptr_t)context, flags, image_format_address, image_width, image_height, image_depth, image_row_pitch, image_slice_pitch, host_ptr_address, errcode_ret_address); + return (intptr_t)__result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclGetSupportedImageFormats(JNIEnv *env, jclass clazz, jlong context, jlong flags, jint image_type, jint num_entries, jlong image_formats, jlong num_image_formats, jlong function_pointer) { + cl_image_format *image_formats_address = (cl_image_format *)(intptr_t)image_formats; + cl_uint *num_image_formats_address = (cl_uint *)(intptr_t)num_image_formats; + clGetSupportedImageFormatsPROC clGetSupportedImageFormats = (clGetSupportedImageFormatsPROC)((intptr_t)function_pointer); + cl_int __result = clGetSupportedImageFormats((cl_context)(intptr_t)context, flags, image_type, num_entries, image_formats_address, num_image_formats_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclEnqueueReadImage(JNIEnv *env, jclass clazz, jlong command_queue, jlong image, jint blocking_read, jlong origin, jlong region, jlong row_pitch, jlong slice_pitch, jlong ptr, jint num_events_in_wait_list, jlong event_wait_list, jlong event, jlong function_pointer) { + const size_t *origin_address = (const size_t *)(intptr_t)origin; + const size_t *region_address = (const size_t *)(intptr_t)region; + cl_void *ptr_address = (cl_void *)(intptr_t)ptr; + const cl_event *event_wait_list_address = (const cl_event *)(intptr_t)event_wait_list; + cl_event *event_address = (cl_event *)(intptr_t)event; + clEnqueueReadImagePROC clEnqueueReadImage = (clEnqueueReadImagePROC)((intptr_t)function_pointer); + cl_int __result = clEnqueueReadImage((cl_command_queue)(intptr_t)command_queue, (cl_mem)(intptr_t)image, blocking_read, origin_address, region_address, row_pitch, slice_pitch, ptr_address, num_events_in_wait_list, event_wait_list_address, event_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclEnqueueWriteImage(JNIEnv *env, jclass clazz, jlong command_queue, jlong image, jint blocking_write, jlong origin, jlong region, jlong input_row_pitch, jlong input_slice_pitch, jlong ptr, jint num_events_in_wait_list, jlong event_wait_list, jlong event, jlong function_pointer) { + const size_t *origin_address = (const size_t *)(intptr_t)origin; + const size_t *region_address = (const size_t *)(intptr_t)region; + const cl_void *ptr_address = (const cl_void *)(intptr_t)ptr; + const cl_event *event_wait_list_address = (const cl_event *)(intptr_t)event_wait_list; + cl_event *event_address = (cl_event *)(intptr_t)event; + clEnqueueWriteImagePROC clEnqueueWriteImage = (clEnqueueWriteImagePROC)((intptr_t)function_pointer); + cl_int __result = clEnqueueWriteImage((cl_command_queue)(intptr_t)command_queue, (cl_mem)(intptr_t)image, blocking_write, origin_address, region_address, input_row_pitch, input_slice_pitch, ptr_address, num_events_in_wait_list, event_wait_list_address, event_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclEnqueueCopyImage(JNIEnv *env, jclass clazz, jlong command_queue, jlong src_image, jlong dst_image, jlong src_origin, jlong dst_origin, jlong region, jint num_events_in_wait_list, jlong event_wait_list, jlong event, jlong function_pointer) { + const size_t *src_origin_address = (const size_t *)(intptr_t)src_origin; + const size_t *dst_origin_address = (const size_t *)(intptr_t)dst_origin; + const size_t *region_address = (const size_t *)(intptr_t)region; + const cl_event *event_wait_list_address = (const cl_event *)(intptr_t)event_wait_list; + cl_event *event_address = (cl_event *)(intptr_t)event; + clEnqueueCopyImagePROC clEnqueueCopyImage = (clEnqueueCopyImagePROC)((intptr_t)function_pointer); + cl_int __result = clEnqueueCopyImage((cl_command_queue)(intptr_t)command_queue, (cl_mem)(intptr_t)src_image, (cl_mem)(intptr_t)dst_image, src_origin_address, dst_origin_address, region_address, num_events_in_wait_list, event_wait_list_address, event_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclEnqueueCopyImageToBuffer(JNIEnv *env, jclass clazz, jlong command_queue, jlong src_image, jlong dst_buffer, jlong src_origin, jlong region, jlong dst_offset, jint num_events_in_wait_list, jlong event_wait_list, jlong event, jlong function_pointer) { + const size_t *src_origin_address = (const size_t *)(intptr_t)src_origin; + const size_t *region_address = (const size_t *)(intptr_t)region; + const cl_event *event_wait_list_address = (const cl_event *)(intptr_t)event_wait_list; + cl_event *event_address = (cl_event *)(intptr_t)event; + clEnqueueCopyImageToBufferPROC clEnqueueCopyImageToBuffer = (clEnqueueCopyImageToBufferPROC)((intptr_t)function_pointer); + cl_int __result = clEnqueueCopyImageToBuffer((cl_command_queue)(intptr_t)command_queue, (cl_mem)(intptr_t)src_image, (cl_mem)(intptr_t)dst_buffer, src_origin_address, region_address, dst_offset, num_events_in_wait_list, event_wait_list_address, event_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclEnqueueCopyBufferToImage(JNIEnv *env, jclass clazz, jlong command_queue, jlong src_buffer, jlong dst_image, jlong src_offset, jlong dst_origin, jlong region, jint num_events_in_wait_list, jlong event_wait_list, jlong event, jlong function_pointer) { + const size_t *dst_origin_address = (const size_t *)(intptr_t)dst_origin; + const size_t *region_address = (const size_t *)(intptr_t)region; + const cl_event *event_wait_list_address = (const cl_event *)(intptr_t)event_wait_list; + cl_event *event_address = (cl_event *)(intptr_t)event; + clEnqueueCopyBufferToImagePROC clEnqueueCopyBufferToImage = (clEnqueueCopyBufferToImagePROC)((intptr_t)function_pointer); + cl_int __result = clEnqueueCopyBufferToImage((cl_command_queue)(intptr_t)command_queue, (cl_mem)(intptr_t)src_buffer, (cl_mem)(intptr_t)dst_image, src_offset, dst_origin_address, region_address, num_events_in_wait_list, event_wait_list_address, event_address); + return __result; +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opencl_CL10_nclEnqueueMapImage(JNIEnv *env, jclass clazz, jlong command_queue, jlong image, jint blocking_map, jlong map_flags, jlong origin, jlong region, jlong image_row_pitch, jlong image_slice_pitch, jint num_events_in_wait_list, jlong event_wait_list, jlong event, jlong errcode_ret, jlong function_pointer) { + const size_t *origin_address = (const size_t *)(intptr_t)origin; + const size_t *region_address = (const size_t *)(intptr_t)region; + size_t *image_row_pitch_address = (size_t *)(intptr_t)image_row_pitch; + size_t *image_slice_pitch_address = (size_t *)(intptr_t)image_slice_pitch; + const cl_event *event_wait_list_address = (const cl_event *)(intptr_t)event_wait_list; + cl_event *event_address = (cl_event *)(intptr_t)event; + cl_int *errcode_ret_address = (cl_int *)(intptr_t)errcode_ret; + clEnqueueMapImagePROC clEnqueueMapImage = (clEnqueueMapImagePROC)((intptr_t)function_pointer); + cl_void * __result = clEnqueueMapImage((cl_command_queue)(intptr_t)command_queue, (cl_mem)(intptr_t)image, blocking_map, map_flags, origin_address, region_address, image_row_pitch_address, image_slice_pitch_address, num_events_in_wait_list, event_wait_list_address, event_address, errcode_ret_address); + return safeNewBuffer(env, __result, extcl_CalculateImageSize(region_address, *image_row_pitch_address, image_slice_pitch_address == NULL ? 0 : *image_slice_pitch_address)); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclGetImageInfo(JNIEnv *env, jclass clazz, jlong image, jint param_name, jlong param_value_size, jlong param_value, jlong param_value_size_ret, jlong function_pointer) { + cl_void *param_value_address = (cl_void *)(intptr_t)param_value; + size_t *param_value_size_ret_address = (size_t *)(intptr_t)param_value_size_ret; + clGetImageInfoPROC clGetImageInfo = (clGetImageInfoPROC)((intptr_t)function_pointer); + cl_int __result = clGetImageInfo((cl_mem)(intptr_t)image, param_name, param_value_size, param_value_address, param_value_size_ret_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclRetainMemObject(JNIEnv *env, jclass clazz, jlong memobj, jlong function_pointer) { + clRetainMemObjectPROC clRetainMemObject = (clRetainMemObjectPROC)((intptr_t)function_pointer); + cl_int __result = clRetainMemObject((cl_mem)(intptr_t)memobj); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclReleaseMemObject(JNIEnv *env, jclass clazz, jlong memobj, jlong function_pointer) { + clReleaseMemObjectPROC clReleaseMemObject = (clReleaseMemObjectPROC)((intptr_t)function_pointer); + cl_int __result = clReleaseMemObject((cl_mem)(intptr_t)memobj); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclEnqueueUnmapMemObject(JNIEnv *env, jclass clazz, jlong command_queue, jlong memobj, jlong mapped_ptr, jint num_events_in_wait_list, jlong event_wait_list, jlong event, jlong function_pointer) { + cl_void *mapped_ptr_address = (cl_void *)(intptr_t)mapped_ptr; + const cl_event *event_wait_list_address = (const cl_event *)(intptr_t)event_wait_list; + cl_event *event_address = (cl_event *)(intptr_t)event; + clEnqueueUnmapMemObjectPROC clEnqueueUnmapMemObject = (clEnqueueUnmapMemObjectPROC)((intptr_t)function_pointer); + cl_int __result = clEnqueueUnmapMemObject((cl_command_queue)(intptr_t)command_queue, (cl_mem)(intptr_t)memobj, mapped_ptr_address, num_events_in_wait_list, event_wait_list_address, event_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclGetMemObjectInfo(JNIEnv *env, jclass clazz, jlong memobj, jint param_name, jlong param_value_size, jlong param_value, jlong param_value_size_ret, jlong function_pointer) { + cl_void *param_value_address = (cl_void *)(intptr_t)param_value; + size_t *param_value_size_ret_address = (size_t *)(intptr_t)param_value_size_ret; + clGetMemObjectInfoPROC clGetMemObjectInfo = (clGetMemObjectInfoPROC)((intptr_t)function_pointer); + cl_int __result = clGetMemObjectInfo((cl_mem)(intptr_t)memobj, param_name, param_value_size, param_value_address, param_value_size_ret_address); + return __result; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CL10_nclCreateSampler(JNIEnv *env, jclass clazz, jlong context, jint normalized_coords, jint addressing_mode, jint filter_mode, jlong errcode_ret, jlong function_pointer) { + cl_int *errcode_ret_address = (cl_int *)(intptr_t)errcode_ret; + clCreateSamplerPROC clCreateSampler = (clCreateSamplerPROC)((intptr_t)function_pointer); + cl_sampler __result = clCreateSampler((cl_context)(intptr_t)context, normalized_coords, addressing_mode, filter_mode, errcode_ret_address); + return (intptr_t)__result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclRetainSampler(JNIEnv *env, jclass clazz, jlong sampler, jlong function_pointer) { + clRetainSamplerPROC clRetainSampler = (clRetainSamplerPROC)((intptr_t)function_pointer); + cl_int __result = clRetainSampler((cl_sampler)(intptr_t)sampler); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclReleaseSampler(JNIEnv *env, jclass clazz, jlong sampler, jlong function_pointer) { + clReleaseSamplerPROC clReleaseSampler = (clReleaseSamplerPROC)((intptr_t)function_pointer); + cl_int __result = clReleaseSampler((cl_sampler)(intptr_t)sampler); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclGetSamplerInfo(JNIEnv *env, jclass clazz, jlong sampler, jint param_name, jlong param_value_size, jlong param_value, jlong param_value_size_ret, jlong function_pointer) { + cl_void *param_value_address = (cl_void *)(intptr_t)param_value; + size_t *param_value_size_ret_address = (size_t *)(intptr_t)param_value_size_ret; + clGetSamplerInfoPROC clGetSamplerInfo = (clGetSamplerInfoPROC)((intptr_t)function_pointer); + cl_int __result = clGetSamplerInfo((cl_sampler)(intptr_t)sampler, param_name, param_value_size, param_value_address, param_value_size_ret_address); + return __result; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CL10_nclCreateProgramWithSource(JNIEnv *env, jclass clazz, jlong context, jint count, jlong string, jlong lengths, jlong errcode_ret, jlong function_pointer) { + const cl_char *string_address = (const cl_char *)(intptr_t)string; + cl_int *errcode_ret_address = (cl_int *)(intptr_t)errcode_ret; + clCreateProgramWithSourcePROC clCreateProgramWithSource = (clCreateProgramWithSourcePROC)((intptr_t)function_pointer); + cl_program __result = clCreateProgramWithSource((cl_context)(intptr_t)context, count, (const cl_char **)&string_address, (const size_t*)&lengths, errcode_ret_address); + return (intptr_t)__result; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CL10_nclCreateProgramWithSource2(JNIEnv *env, jclass clazz, jlong context, jint count, jlong strings, jlong lengths, jlong errcode_ret, jlong function_pointer) { + const cl_char *strings_address = (const cl_char *)(intptr_t)strings; + int _str_i; + cl_char *_str_address; + cl_char **strings_str = (cl_char **) malloc(count * sizeof(cl_char *)); + const size_t *lengths_address = (const size_t *)(intptr_t)lengths; + cl_int *errcode_ret_address = (cl_int *)(intptr_t)errcode_ret; + clCreateProgramWithSourcePROC clCreateProgramWithSource = (clCreateProgramWithSourcePROC)((intptr_t)function_pointer); + cl_program __result; + _str_i = 0; + _str_address = (cl_char *)strings_address; + while ( _str_i < count ) { + strings_str[_str_i] = _str_address; + _str_address += lengths_address[_str_i++]; + } + __result = clCreateProgramWithSource((cl_context)(intptr_t)context, count, (const cl_char **)strings_str, lengths_address, errcode_ret_address); + free(strings_str); + return (intptr_t)__result; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CL10_nclCreateProgramWithSource3(JNIEnv *env, jclass clazz, jlong context, jint count, jobjectArray strings, jlong lengths, jlong errcode_ret, jlong function_pointer) { + int _ptr_i; + jobject _ptr_object; + cl_char **strings_ptr = (cl_char **) malloc(count * sizeof(cl_char *)); + const size_t *lengths_address = (const size_t *)(intptr_t)lengths; + cl_int *errcode_ret_address = (cl_int *)(intptr_t)errcode_ret; + clCreateProgramWithSourcePROC clCreateProgramWithSource = (clCreateProgramWithSourcePROC)((intptr_t)function_pointer); + cl_program __result; + _ptr_i = 0; + while ( _ptr_i < count ) { + _ptr_object = (*env)->GetObjectArrayElement(env, strings, _ptr_i); + strings_ptr[_ptr_i++] = (cl_char *)(*env)->GetDirectBufferAddress(env, _ptr_object); + } + __result = clCreateProgramWithSource((cl_context)(intptr_t)context, count, (const cl_char **)strings_ptr, lengths_address, errcode_ret_address); + free(strings_ptr); + return (intptr_t)__result; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CL10_nclCreateProgramWithSource4(JNIEnv *env, jclass clazz, jlong context, jint count, jlong strings, jlong lengths, jlong errcode_ret, jlong function_pointer) { + const cl_char *strings_address = (const cl_char *)(intptr_t)strings; + int _str_i; + cl_char *_str_address; + cl_char **strings_str = (cl_char **) malloc(count * sizeof(cl_char *)); + const size_t *lengths_address = (const size_t *)(intptr_t)lengths; + cl_int *errcode_ret_address = (cl_int *)(intptr_t)errcode_ret; + clCreateProgramWithSourcePROC clCreateProgramWithSource = (clCreateProgramWithSourcePROC)((intptr_t)function_pointer); + cl_program __result; + _str_i = 0; + _str_address = (cl_char *)strings_address; + while ( _str_i < count ) { + strings_str[_str_i] = _str_address; + _str_address += lengths_address[_str_i++]; + } + __result = clCreateProgramWithSource((cl_context)(intptr_t)context, count, (const cl_char **)strings_str, lengths_address, errcode_ret_address); + free(strings_str); + return (intptr_t)__result; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CL10_nclCreateProgramWithBinary(JNIEnv *env, jclass clazz, jlong context, jint num_devices, jlong device, jlong lengths, jlong binary, jlong binary_status, jlong errcode_ret, jlong function_pointer) { + const cl_uchar *binary_address = (const cl_uchar *)(intptr_t)binary; + cl_int *binary_status_address = (cl_int *)(intptr_t)binary_status; + cl_int *errcode_ret_address = (cl_int *)(intptr_t)errcode_ret; + clCreateProgramWithBinaryPROC clCreateProgramWithBinary = (clCreateProgramWithBinaryPROC)((intptr_t)function_pointer); + cl_program __result = clCreateProgramWithBinary((cl_context)(intptr_t)context, num_devices, (const cl_device_id*)(cl_device_id)(intptr_t)&device, (const size_t*)&lengths, (const cl_uchar **)&binary_address, binary_status_address, errcode_ret_address); + return (intptr_t)__result; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CL10_nclCreateProgramWithBinary2(JNIEnv *env, jclass clazz, jlong context, jint num_devices, jlong device_list, jlong lengths, jlong binaries, jlong binary_status, jlong errcode_ret, jlong function_pointer) { + const cl_device_id *device_list_address = (const cl_device_id *)(intptr_t)device_list; + const size_t *lengths_address = (const size_t *)(intptr_t)lengths; + const cl_uchar *binaries_address = (const cl_uchar *)(intptr_t)binaries; + int _str_i; + cl_uchar *_str_address; + cl_uchar **binaries_str = (cl_uchar **) malloc(num_devices * sizeof(cl_uchar *)); + cl_int *binary_status_address = (cl_int *)(intptr_t)binary_status; + cl_int *errcode_ret_address = (cl_int *)(intptr_t)errcode_ret; + clCreateProgramWithBinaryPROC clCreateProgramWithBinary = (clCreateProgramWithBinaryPROC)((intptr_t)function_pointer); + cl_program __result; + _str_i = 0; + _str_address = (cl_uchar *)binaries_address; + while ( _str_i < num_devices ) { + binaries_str[_str_i] = _str_address; + _str_address += lengths_address[_str_i++]; + } + __result = clCreateProgramWithBinary((cl_context)(intptr_t)context, num_devices, device_list_address, lengths_address, (const cl_uchar **)binaries_str, binary_status_address, errcode_ret_address); + free(binaries_str); + return (intptr_t)__result; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CL10_nclCreateProgramWithBinary3(JNIEnv *env, jclass clazz, jlong context, jint num_devices, jlong device_list, jlong lengths, jobjectArray binaries, jlong binary_status, jlong errcode_ret, jlong function_pointer) { + const cl_device_id *device_list_address = (const cl_device_id *)(intptr_t)device_list; + const size_t *lengths_address = (const size_t *)(intptr_t)lengths; + int _ptr_i; + jobject _ptr_object; + cl_uchar **binaries_ptr = (cl_uchar **) malloc(num_devices * sizeof(cl_uchar *)); + cl_int *binary_status_address = (cl_int *)(intptr_t)binary_status; + cl_int *errcode_ret_address = (cl_int *)(intptr_t)errcode_ret; + clCreateProgramWithBinaryPROC clCreateProgramWithBinary = (clCreateProgramWithBinaryPROC)((intptr_t)function_pointer); + cl_program __result; + _ptr_i = 0; + while ( _ptr_i < num_devices ) { + _ptr_object = (*env)->GetObjectArrayElement(env, binaries, _ptr_i); + binaries_ptr[_ptr_i++] = (cl_uchar *)(*env)->GetDirectBufferAddress(env, _ptr_object); + } + __result = clCreateProgramWithBinary((cl_context)(intptr_t)context, num_devices, device_list_address, lengths_address, (const cl_uchar **)binaries_ptr, binary_status_address, errcode_ret_address); + free(binaries_ptr); + return (intptr_t)__result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclRetainProgram(JNIEnv *env, jclass clazz, jlong program, jlong function_pointer) { + clRetainProgramPROC clRetainProgram = (clRetainProgramPROC)((intptr_t)function_pointer); + cl_int __result = clRetainProgram((cl_program)(intptr_t)program); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclReleaseProgram(JNIEnv *env, jclass clazz, jlong program, jlong function_pointer) { + clReleaseProgramPROC clReleaseProgram = (clReleaseProgramPROC)((intptr_t)function_pointer); + cl_int __result = clReleaseProgram((cl_program)(intptr_t)program); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclBuildProgram(JNIEnv *env, jclass clazz, jlong program, jint num_devices, jlong device_list, jlong options, jlong pfn_notify, jlong user_data, jlong function_pointer) { + const cl_device_id *device_list_address = (const cl_device_id *)(intptr_t)device_list; + const cl_char *options_address = (const cl_char *)(intptr_t)options; + clBuildProgramPROC clBuildProgram = (clBuildProgramPROC)((intptr_t)function_pointer); + cl_int __result = clBuildProgram((cl_program)(intptr_t)program, num_devices, device_list_address, options_address, (cl_program_callback)(intptr_t)pfn_notify, (void *)(intptr_t)user_data); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclUnloadCompiler(JNIEnv *env, jclass clazz, jlong function_pointer) { + clUnloadCompilerPROC clUnloadCompiler = (clUnloadCompilerPROC)((intptr_t)function_pointer); + cl_int __result = clUnloadCompiler(); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclGetProgramInfo(JNIEnv *env, jclass clazz, jlong program, jint param_name, jlong param_value_size, jlong param_value, jlong param_value_size_ret, jlong function_pointer) { + cl_void *param_value_address = (cl_void *)(intptr_t)param_value; + size_t *param_value_size_ret_address = (size_t *)(intptr_t)param_value_size_ret; + clGetProgramInfoPROC clGetProgramInfo = (clGetProgramInfoPROC)((intptr_t)function_pointer); + cl_int __result = clGetProgramInfo((cl_program)(intptr_t)program, param_name, param_value_size, param_value_address, param_value_size_ret_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclGetProgramInfo2(JNIEnv *env, jclass clazz, jlong program, jint param_name, jlong sizes_len, jlong sizes, jlong param_value, jlong param_value_size_ret, jlong function_pointer) { + const size_t *sizes_address = (const size_t *)(intptr_t)sizes; + cl_uchar *param_value_address = (cl_uchar *)(intptr_t)param_value; + int _str_i; + cl_uchar *_str_address; + cl_uchar **param_value_str = (cl_uchar **) malloc(sizes_len * sizeof(cl_uchar *)); + size_t *param_value_size_ret_address = (size_t *)(intptr_t)param_value_size_ret; + clGetProgramInfoPROC clGetProgramInfo = (clGetProgramInfoPROC)((intptr_t)function_pointer); + cl_int __result; + _str_i = 0; + _str_address = (cl_uchar *)param_value_address; + while ( _str_i < sizes_len ) { + param_value_str[_str_i] = _str_address; + _str_address += sizes_address[_str_i++]; + } + __result = clGetProgramInfo((cl_program)(intptr_t)program, param_name, sizes_len * sizeof(cl_uchar *), (cl_uchar **)param_value_str, param_value_size_ret_address); + free(param_value_str); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclGetProgramInfo3(JNIEnv *env, jclass clazz, jlong program, jint param_name, jlong param_value_len, jobjectArray param_value, jlong param_value_size_ret, jlong function_pointer) { + int _ptr_i; + jobject _ptr_object; + cl_uchar **param_value_ptr = (cl_uchar **) malloc(param_value_len * sizeof(cl_uchar *)); + size_t *param_value_size_ret_address = (size_t *)(intptr_t)param_value_size_ret; + clGetProgramInfoPROC clGetProgramInfo = (clGetProgramInfoPROC)((intptr_t)function_pointer); + cl_int __result; + _ptr_i = 0; + while ( _ptr_i < param_value_len ) { + _ptr_object = (*env)->GetObjectArrayElement(env, param_value, _ptr_i); + param_value_ptr[_ptr_i++] = (cl_uchar *)(*env)->GetDirectBufferAddress(env, _ptr_object); + } + __result = clGetProgramInfo((cl_program)(intptr_t)program, param_name, param_value_len * sizeof(cl_uchar *), (cl_uchar **)param_value_ptr, param_value_size_ret_address); + free(param_value_ptr); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclGetProgramBuildInfo(JNIEnv *env, jclass clazz, jlong program, jlong device, jint param_name, jlong param_value_size, jlong param_value, jlong param_value_size_ret, jlong function_pointer) { + cl_void *param_value_address = (cl_void *)(intptr_t)param_value; + size_t *param_value_size_ret_address = (size_t *)(intptr_t)param_value_size_ret; + clGetProgramBuildInfoPROC clGetProgramBuildInfo = (clGetProgramBuildInfoPROC)((intptr_t)function_pointer); + cl_int __result = clGetProgramBuildInfo((cl_program)(intptr_t)program, (cl_device_id)(intptr_t)device, param_name, param_value_size, param_value_address, param_value_size_ret_address); + return __result; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CL10_nclCreateKernel(JNIEnv *env, jclass clazz, jlong program, jlong kernel_name, jlong errcode_ret, jlong function_pointer) { + const cl_char *kernel_name_address = (const cl_char *)(intptr_t)kernel_name; + cl_int *errcode_ret_address = (cl_int *)(intptr_t)errcode_ret; + clCreateKernelPROC clCreateKernel = (clCreateKernelPROC)((intptr_t)function_pointer); + cl_kernel __result = clCreateKernel((cl_program)(intptr_t)program, kernel_name_address, errcode_ret_address); + return (intptr_t)__result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclCreateKernelsInProgram(JNIEnv *env, jclass clazz, jlong program, jint num_kernels, jlong kernels, jlong num_kernels_ret, jlong function_pointer) { + cl_kernel *kernels_address = (cl_kernel *)(intptr_t)kernels; + cl_uint *num_kernels_ret_address = (cl_uint *)(intptr_t)num_kernels_ret; + clCreateKernelsInProgramPROC clCreateKernelsInProgram = (clCreateKernelsInProgramPROC)((intptr_t)function_pointer); + cl_int __result = clCreateKernelsInProgram((cl_program)(intptr_t)program, num_kernels, kernels_address, num_kernels_ret_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclRetainKernel(JNIEnv *env, jclass clazz, jlong kernel, jlong function_pointer) { + clRetainKernelPROC clRetainKernel = (clRetainKernelPROC)((intptr_t)function_pointer); + cl_int __result = clRetainKernel((cl_kernel)(intptr_t)kernel); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclReleaseKernel(JNIEnv *env, jclass clazz, jlong kernel, jlong function_pointer) { + clReleaseKernelPROC clReleaseKernel = (clReleaseKernelPROC)((intptr_t)function_pointer); + cl_int __result = clReleaseKernel((cl_kernel)(intptr_t)kernel); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclSetKernelArg(JNIEnv *env, jclass clazz, jlong kernel, jint arg_index, jlong arg_size, jlong arg_value, jlong function_pointer) { + const cl_void *arg_value_address = (const cl_void *)(intptr_t)arg_value; + clSetKernelArgPROC clSetKernelArg = (clSetKernelArgPROC)((intptr_t)function_pointer); + cl_int __result = clSetKernelArg((cl_kernel)(intptr_t)kernel, arg_index, arg_size, arg_value_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclGetKernelInfo(JNIEnv *env, jclass clazz, jlong kernel, jint param_name, jlong param_value_size, jlong param_value, jlong param_value_size_ret, jlong function_pointer) { + cl_void *param_value_address = (cl_void *)(intptr_t)param_value; + size_t *param_value_size_ret_address = (size_t *)(intptr_t)param_value_size_ret; + clGetKernelInfoPROC clGetKernelInfo = (clGetKernelInfoPROC)((intptr_t)function_pointer); + cl_int __result = clGetKernelInfo((cl_kernel)(intptr_t)kernel, param_name, param_value_size, param_value_address, param_value_size_ret_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclGetKernelWorkGroupInfo(JNIEnv *env, jclass clazz, jlong kernel, jlong device, jint param_name, jlong param_value_size, jlong param_value, jlong param_value_size_ret, jlong function_pointer) { + cl_void *param_value_address = (cl_void *)(intptr_t)param_value; + size_t *param_value_size_ret_address = (size_t *)(intptr_t)param_value_size_ret; + clGetKernelWorkGroupInfoPROC clGetKernelWorkGroupInfo = (clGetKernelWorkGroupInfoPROC)((intptr_t)function_pointer); + cl_int __result = clGetKernelWorkGroupInfo((cl_kernel)(intptr_t)kernel, (cl_device_id)(intptr_t)device, param_name, param_value_size, param_value_address, param_value_size_ret_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclEnqueueNDRangeKernel(JNIEnv *env, jclass clazz, jlong command_queue, jlong kernel, jint work_dim, jlong global_work_offset, jlong global_work_size, jlong local_work_size, jint num_events_in_wait_list, jlong event_wait_list, jlong event, jlong function_pointer) { + const size_t *global_work_offset_address = (const size_t *)(intptr_t)global_work_offset; + const size_t *global_work_size_address = (const size_t *)(intptr_t)global_work_size; + const size_t *local_work_size_address = (const size_t *)(intptr_t)local_work_size; + const cl_event *event_wait_list_address = (const cl_event *)(intptr_t)event_wait_list; + cl_event *event_address = (cl_event *)(intptr_t)event; + clEnqueueNDRangeKernelPROC clEnqueueNDRangeKernel = (clEnqueueNDRangeKernelPROC)((intptr_t)function_pointer); + cl_int __result = clEnqueueNDRangeKernel((cl_command_queue)(intptr_t)command_queue, (cl_kernel)(intptr_t)kernel, work_dim, global_work_offset_address, global_work_size_address, local_work_size_address, num_events_in_wait_list, event_wait_list_address, event_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclEnqueueTask(JNIEnv *env, jclass clazz, jlong command_queue, jlong kernel, jint num_events_in_wait_list, jlong event_wait_list, jlong event, jlong function_pointer) { + const cl_event *event_wait_list_address = (const cl_event *)(intptr_t)event_wait_list; + cl_event *event_address = (cl_event *)(intptr_t)event; + clEnqueueTaskPROC clEnqueueTask = (clEnqueueTaskPROC)((intptr_t)function_pointer); + cl_int __result = clEnqueueTask((cl_command_queue)(intptr_t)command_queue, (cl_kernel)(intptr_t)kernel, num_events_in_wait_list, event_wait_list_address, event_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclEnqueueNativeKernel(JNIEnv *env, jclass clazz, jlong command_queue, jlong user_func, jlong args, jlong cb_args, jint num_mem_objects, jobjectArray mem_list, jint num_events_in_wait_list, jlong event_wait_list, jlong event, jlong function_pointer) { + cl_void *args_address = (cl_void *)(intptr_t)args; + int _ptr_i; + jobject _ptr_object; + cl_mem *mem_list_ptr = num_mem_objects == 0 ? NULL : (cl_mem *) malloc(num_mem_objects * sizeof(cl_mem )); + const cl_event *event_wait_list_address = (const cl_event *)(intptr_t)event_wait_list; + cl_event *event_address = (cl_event *)(intptr_t)event; + clEnqueueNativeKernelPROC clEnqueueNativeKernel = (clEnqueueNativeKernelPROC)((intptr_t)function_pointer); + cl_int __result; + void **args_mem_loc = num_mem_objects == 0 ? NULL : (void **)malloc(num_mem_objects * sizeof(void *)); + _ptr_i = 0; + while ( _ptr_i < num_mem_objects ) { + _ptr_object = (*env)->GetObjectArrayElement(env, mem_list, _ptr_i); + mem_list_ptr[_ptr_i++] = (cl_mem)(intptr_t)getPointerWrapperAddress(env, _ptr_object); + } + _ptr_i = 0; + while ( _ptr_i < num_mem_objects ) { + args_mem_loc[_ptr_i] = (cl_void *)((char *)args_address + (12 + 4 + _ptr_i * (4 + sizeof(void *)))); + _ptr_i++; + } + __result = clEnqueueNativeKernel((cl_command_queue)(intptr_t)command_queue, (cl_native_kernel_func)(intptr_t)user_func, args_address, cb_args, num_mem_objects, (const cl_mem*)mem_list_ptr, (const void**)args_mem_loc, num_events_in_wait_list, event_wait_list_address, event_address); + free(args_mem_loc); + free(mem_list_ptr); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclWaitForEvents(JNIEnv *env, jclass clazz, jint num_events, jlong event_list, jlong function_pointer) { + const cl_event *event_list_address = (const cl_event *)(intptr_t)event_list; + clWaitForEventsPROC clWaitForEvents = (clWaitForEventsPROC)((intptr_t)function_pointer); + cl_int __result = clWaitForEvents(num_events, event_list_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclGetEventInfo(JNIEnv *env, jclass clazz, jlong event, jint param_name, jlong param_value_size, jlong param_value, jlong param_value_size_ret, jlong function_pointer) { + cl_void *param_value_address = (cl_void *)(intptr_t)param_value; + size_t *param_value_size_ret_address = (size_t *)(intptr_t)param_value_size_ret; + clGetEventInfoPROC clGetEventInfo = (clGetEventInfoPROC)((intptr_t)function_pointer); + cl_int __result = clGetEventInfo((cl_event)(intptr_t)event, param_name, param_value_size, param_value_address, param_value_size_ret_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclRetainEvent(JNIEnv *env, jclass clazz, jlong event, jlong function_pointer) { + clRetainEventPROC clRetainEvent = (clRetainEventPROC)((intptr_t)function_pointer); + cl_int __result = clRetainEvent((cl_event)(intptr_t)event); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclReleaseEvent(JNIEnv *env, jclass clazz, jlong event, jlong function_pointer) { + clReleaseEventPROC clReleaseEvent = (clReleaseEventPROC)((intptr_t)function_pointer); + cl_int __result = clReleaseEvent((cl_event)(intptr_t)event); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclEnqueueMarker(JNIEnv *env, jclass clazz, jlong command_queue, jlong event, jlong function_pointer) { + cl_event *event_address = (cl_event *)(intptr_t)event; + clEnqueueMarkerPROC clEnqueueMarker = (clEnqueueMarkerPROC)((intptr_t)function_pointer); + cl_int __result = clEnqueueMarker((cl_command_queue)(intptr_t)command_queue, event_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclEnqueueBarrier(JNIEnv *env, jclass clazz, jlong command_queue, jlong function_pointer) { + clEnqueueBarrierPROC clEnqueueBarrier = (clEnqueueBarrierPROC)((intptr_t)function_pointer); + cl_int __result = clEnqueueBarrier((cl_command_queue)(intptr_t)command_queue); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclEnqueueWaitForEvents(JNIEnv *env, jclass clazz, jlong command_queue, jint num_events, jlong event_list, jlong function_pointer) { + const cl_event *event_list_address = (const cl_event *)(intptr_t)event_list; + clEnqueueWaitForEventsPROC clEnqueueWaitForEvents = (clEnqueueWaitForEventsPROC)((intptr_t)function_pointer); + cl_int __result = clEnqueueWaitForEvents((cl_command_queue)(intptr_t)command_queue, num_events, event_list_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclGetEventProfilingInfo(JNIEnv *env, jclass clazz, jlong event, jint param_name, jlong param_value_size, jlong param_value, jlong param_value_size_ret, jlong function_pointer) { + cl_void *param_value_address = (cl_void *)(intptr_t)param_value; + size_t *param_value_size_ret_address = (size_t *)(intptr_t)param_value_size_ret; + clGetEventProfilingInfoPROC clGetEventProfilingInfo = (clGetEventProfilingInfoPROC)((intptr_t)function_pointer); + cl_int __result = clGetEventProfilingInfo((cl_event)(intptr_t)event, param_name, param_value_size, param_value_address, param_value_size_ret_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclFlush(JNIEnv *env, jclass clazz, jlong command_queue, jlong function_pointer) { + clFlushPROC clFlush = (clFlushPROC)((intptr_t)function_pointer); + cl_int __result = clFlush((cl_command_queue)(intptr_t)command_queue); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10_nclFinish(JNIEnv *env, jclass clazz, jlong command_queue, jlong function_pointer) { + clFinishPROC clFinish = (clFinishPROC)((intptr_t)function_pointer); + cl_int __result = clFinish((cl_command_queue)(intptr_t)command_queue); + return __result; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CL10_nclGetExtensionFunctionAddress(JNIEnv *env, jclass clazz, jlong func_name, jlong function_pointer) { + const cl_char *func_name_address = (const cl_char *)(intptr_t)func_name; + clGetExtensionFunctionAddressPROC clGetExtensionFunctionAddress = (clGetExtensionFunctionAddressPROC)((intptr_t)function_pointer); + void * __result = clGetExtensionFunctionAddress(func_name_address); + return (intptr_t)__result; +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_CL10GL.c b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_CL10GL.c new file mode 100644 index 0000000..39fb836 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_CL10GL.c @@ -0,0 +1,76 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extcl.h" + +typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromGLBufferPROC) (cl_context context, cl_mem_flags flags, GLuint bufobj, cl_int * errcode_ret); +typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromGLTexture2DPROC) (cl_context context, cl_mem_flags flags, GLenum target, GLint miplevel, GLuint texture, cl_int * errcode_ret); +typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromGLTexture3DPROC) (cl_context context, cl_mem_flags flags, GLenum target, GLint miplevel, GLuint texture, cl_int * errcode_ret); +typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromGLRenderbufferPROC) (cl_context context, cl_mem_flags flags, GLuint renderbuffer, cl_int * errcode_ret); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetGLObjectInfoPROC) (cl_mem memobj, cl_gl_object_type * gl_object_type, GLuint * gl_object_name); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetGLTextureInfoPROC) (cl_mem memobj, cl_gl_texture_info param_name, size_t param_value_size, cl_void * param_value, size_t * param_value_size_ret); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireGLObjectsPROC) (cl_command_queue command_queue, cl_uint num_objects, const cl_mem * mem_objects, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseGLObjectsPROC) (cl_command_queue command_queue, cl_uint num_objects, const cl_mem * mem_objects, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CL10GL_nclCreateFromGLBuffer(JNIEnv *env, jclass clazz, jlong context, jlong flags, jint bufobj, jlong errcode_ret, jlong function_pointer) { + cl_int *errcode_ret_address = (cl_int *)(intptr_t)errcode_ret; + clCreateFromGLBufferPROC clCreateFromGLBuffer = (clCreateFromGLBufferPROC)((intptr_t)function_pointer); + cl_mem __result = clCreateFromGLBuffer((cl_context)(intptr_t)context, flags, bufobj, errcode_ret_address); + return (intptr_t)__result; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CL10GL_nclCreateFromGLTexture2D(JNIEnv *env, jclass clazz, jlong context, jlong flags, jint target, jint miplevel, jint texture, jlong errcode_ret, jlong function_pointer) { + cl_int *errcode_ret_address = (cl_int *)(intptr_t)errcode_ret; + clCreateFromGLTexture2DPROC clCreateFromGLTexture2D = (clCreateFromGLTexture2DPROC)((intptr_t)function_pointer); + cl_mem __result = clCreateFromGLTexture2D((cl_context)(intptr_t)context, flags, target, miplevel, texture, errcode_ret_address); + return (intptr_t)__result; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CL10GL_nclCreateFromGLTexture3D(JNIEnv *env, jclass clazz, jlong context, jlong flags, jint target, jint miplevel, jint texture, jlong errcode_ret, jlong function_pointer) { + cl_int *errcode_ret_address = (cl_int *)(intptr_t)errcode_ret; + clCreateFromGLTexture3DPROC clCreateFromGLTexture3D = (clCreateFromGLTexture3DPROC)((intptr_t)function_pointer); + cl_mem __result = clCreateFromGLTexture3D((cl_context)(intptr_t)context, flags, target, miplevel, texture, errcode_ret_address); + return (intptr_t)__result; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CL10GL_nclCreateFromGLRenderbuffer(JNIEnv *env, jclass clazz, jlong context, jlong flags, jint renderbuffer, jlong errcode_ret, jlong function_pointer) { + cl_int *errcode_ret_address = (cl_int *)(intptr_t)errcode_ret; + clCreateFromGLRenderbufferPROC clCreateFromGLRenderbuffer = (clCreateFromGLRenderbufferPROC)((intptr_t)function_pointer); + cl_mem __result = clCreateFromGLRenderbuffer((cl_context)(intptr_t)context, flags, renderbuffer, errcode_ret_address); + return (intptr_t)__result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10GL_nclGetGLObjectInfo(JNIEnv *env, jclass clazz, jlong memobj, jlong gl_object_type, jlong gl_object_name, jlong function_pointer) { + cl_gl_object_type *gl_object_type_address = (cl_gl_object_type *)(intptr_t)gl_object_type; + GLuint *gl_object_name_address = (GLuint *)(intptr_t)gl_object_name; + clGetGLObjectInfoPROC clGetGLObjectInfo = (clGetGLObjectInfoPROC)((intptr_t)function_pointer); + cl_int __result = clGetGLObjectInfo((cl_mem)(intptr_t)memobj, gl_object_type_address, gl_object_name_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10GL_nclGetGLTextureInfo(JNIEnv *env, jclass clazz, jlong memobj, jint param_name, jlong param_value_size, jlong param_value, jlong param_value_size_ret, jlong function_pointer) { + cl_void *param_value_address = (cl_void *)(intptr_t)param_value; + size_t *param_value_size_ret_address = (size_t *)(intptr_t)param_value_size_ret; + clGetGLTextureInfoPROC clGetGLTextureInfo = (clGetGLTextureInfoPROC)((intptr_t)function_pointer); + cl_int __result = clGetGLTextureInfo((cl_mem)(intptr_t)memobj, param_name, param_value_size, param_value_address, param_value_size_ret_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10GL_nclEnqueueAcquireGLObjects(JNIEnv *env, jclass clazz, jlong command_queue, jint num_objects, jlong mem_objects, jint num_events_in_wait_list, jlong event_wait_list, jlong event, jlong function_pointer) { + const cl_mem *mem_objects_address = (const cl_mem *)(intptr_t)mem_objects; + const cl_event *event_wait_list_address = (const cl_event *)(intptr_t)event_wait_list; + cl_event *event_address = (cl_event *)(intptr_t)event; + clEnqueueAcquireGLObjectsPROC clEnqueueAcquireGLObjects = (clEnqueueAcquireGLObjectsPROC)((intptr_t)function_pointer); + cl_int __result = clEnqueueAcquireGLObjects((cl_command_queue)(intptr_t)command_queue, num_objects, mem_objects_address, num_events_in_wait_list, event_wait_list_address, event_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL10GL_nclEnqueueReleaseGLObjects(JNIEnv *env, jclass clazz, jlong command_queue, jint num_objects, jlong mem_objects, jint num_events_in_wait_list, jlong event_wait_list, jlong event, jlong function_pointer) { + const cl_mem *mem_objects_address = (const cl_mem *)(intptr_t)mem_objects; + const cl_event *event_wait_list_address = (const cl_event *)(intptr_t)event_wait_list; + cl_event *event_address = (cl_event *)(intptr_t)event; + clEnqueueReleaseGLObjectsPROC clEnqueueReleaseGLObjects = (clEnqueueReleaseGLObjectsPROC)((intptr_t)function_pointer); + cl_int __result = clEnqueueReleaseGLObjects((cl_command_queue)(intptr_t)command_queue, num_objects, mem_objects_address, num_events_in_wait_list, event_wait_list_address, event_address); + return __result; +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_CL11.c b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_CL11.c new file mode 100644 index 0000000..44cb07b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_CL11.c @@ -0,0 +1,82 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extcl.h" + +typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateSubBufferPROC) (cl_mem buffer, cl_mem_flags flags, cl_buffer_create_type buffer_create_type, const cl_void * buffer_create_info, cl_int * errcode_ret); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clSetMemObjectDestructorCallbackPROC) (cl_mem memobj, cl_mem_object_destructor_callback pfn_notify, void * user_data); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReadBufferRectPROC) (cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read, const size_t * buffer_offset, const size_t * host_offset, const size_t * region, size_t buffer_row_pitch, size_t buffer_slice_pitch, size_t host_row_pitch, size_t host_slice_pitch, cl_void * ptr, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueWriteBufferRectPROC) (cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_write, const size_t * buffer_offset, const size_t * host_offset, const size_t * region, size_t buffer_row_pitch, size_t buffer_slice_pitch, size_t host_row_pitch, size_t host_slice_pitch, const cl_void * ptr, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueCopyBufferRectPROC) (cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_buffer, const size_t * src_origin, const size_t * dst_origin, const size_t * region, size_t src_row_pitch, size_t src_slice_pitch, size_t dst_row_pitch, size_t dst_slice_pitch, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); +typedef CL_API_ENTRY cl_event (CL_API_CALL *clCreateUserEventPROC) (cl_context context, cl_int * errcode_ret); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clSetUserEventStatusPROC) (cl_event event, cl_int execution_status); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clSetEventCallbackPROC) (cl_event event, cl_int command_exec_callback_type, cl_event_callback pfn_notify, void * user_data); + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CL11_nclCreateSubBuffer(JNIEnv *env, jclass clazz, jlong buffer, jlong flags, jint buffer_create_type, jlong buffer_create_info, jlong errcode_ret, jlong function_pointer) { + const cl_void *buffer_create_info_address = (const cl_void *)(intptr_t)buffer_create_info; + cl_int *errcode_ret_address = (cl_int *)(intptr_t)errcode_ret; + clCreateSubBufferPROC clCreateSubBuffer = (clCreateSubBufferPROC)((intptr_t)function_pointer); + cl_mem __result = clCreateSubBuffer((cl_mem)(intptr_t)buffer, flags, buffer_create_type, buffer_create_info_address, errcode_ret_address); + return (intptr_t)__result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL11_nclSetMemObjectDestructorCallback(JNIEnv *env, jclass clazz, jlong memobj, jlong pfn_notify, jlong user_data, jlong function_pointer) { + clSetMemObjectDestructorCallbackPROC clSetMemObjectDestructorCallback = (clSetMemObjectDestructorCallbackPROC)((intptr_t)function_pointer); + cl_int __result = clSetMemObjectDestructorCallback((cl_mem)(intptr_t)memobj, (cl_mem_object_destructor_callback)(intptr_t)pfn_notify, (void *)(intptr_t)user_data); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL11_nclEnqueueReadBufferRect(JNIEnv *env, jclass clazz, jlong command_queue, jlong buffer, jint blocking_read, jlong buffer_offset, jlong host_offset, jlong region, jlong buffer_row_pitch, jlong buffer_slice_pitch, jlong host_row_pitch, jlong host_slice_pitch, jlong ptr, jint num_events_in_wait_list, jlong event_wait_list, jlong event, jlong function_pointer) { + const size_t *buffer_offset_address = (const size_t *)(intptr_t)buffer_offset; + const size_t *host_offset_address = (const size_t *)(intptr_t)host_offset; + const size_t *region_address = (const size_t *)(intptr_t)region; + cl_void *ptr_address = (cl_void *)(intptr_t)ptr; + const cl_event *event_wait_list_address = (const cl_event *)(intptr_t)event_wait_list; + cl_event *event_address = (cl_event *)(intptr_t)event; + clEnqueueReadBufferRectPROC clEnqueueReadBufferRect = (clEnqueueReadBufferRectPROC)((intptr_t)function_pointer); + cl_int __result = clEnqueueReadBufferRect((cl_command_queue)(intptr_t)command_queue, (cl_mem)(intptr_t)buffer, blocking_read, buffer_offset_address, host_offset_address, region_address, buffer_row_pitch, buffer_slice_pitch, host_row_pitch, host_slice_pitch, ptr_address, num_events_in_wait_list, event_wait_list_address, event_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL11_nclEnqueueWriteBufferRect(JNIEnv *env, jclass clazz, jlong command_queue, jlong buffer, jint blocking_write, jlong buffer_offset, jlong host_offset, jlong region, jlong buffer_row_pitch, jlong buffer_slice_pitch, jlong host_row_pitch, jlong host_slice_pitch, jlong ptr, jint num_events_in_wait_list, jlong event_wait_list, jlong event, jlong function_pointer) { + const size_t *buffer_offset_address = (const size_t *)(intptr_t)buffer_offset; + const size_t *host_offset_address = (const size_t *)(intptr_t)host_offset; + const size_t *region_address = (const size_t *)(intptr_t)region; + const cl_void *ptr_address = (const cl_void *)(intptr_t)ptr; + const cl_event *event_wait_list_address = (const cl_event *)(intptr_t)event_wait_list; + cl_event *event_address = (cl_event *)(intptr_t)event; + clEnqueueWriteBufferRectPROC clEnqueueWriteBufferRect = (clEnqueueWriteBufferRectPROC)((intptr_t)function_pointer); + cl_int __result = clEnqueueWriteBufferRect((cl_command_queue)(intptr_t)command_queue, (cl_mem)(intptr_t)buffer, blocking_write, buffer_offset_address, host_offset_address, region_address, buffer_row_pitch, buffer_slice_pitch, host_row_pitch, host_slice_pitch, ptr_address, num_events_in_wait_list, event_wait_list_address, event_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL11_nclEnqueueCopyBufferRect(JNIEnv *env, jclass clazz, jlong command_queue, jlong src_buffer, jlong dst_buffer, jlong src_origin, jlong dst_origin, jlong region, jlong src_row_pitch, jlong src_slice_pitch, jlong dst_row_pitch, jlong dst_slice_pitch, jint num_events_in_wait_list, jlong event_wait_list, jlong event, jlong function_pointer) { + const size_t *src_origin_address = (const size_t *)(intptr_t)src_origin; + const size_t *dst_origin_address = (const size_t *)(intptr_t)dst_origin; + const size_t *region_address = (const size_t *)(intptr_t)region; + const cl_event *event_wait_list_address = (const cl_event *)(intptr_t)event_wait_list; + cl_event *event_address = (cl_event *)(intptr_t)event; + clEnqueueCopyBufferRectPROC clEnqueueCopyBufferRect = (clEnqueueCopyBufferRectPROC)((intptr_t)function_pointer); + cl_int __result = clEnqueueCopyBufferRect((cl_command_queue)(intptr_t)command_queue, (cl_mem)(intptr_t)src_buffer, (cl_mem)(intptr_t)dst_buffer, src_origin_address, dst_origin_address, region_address, src_row_pitch, src_slice_pitch, dst_row_pitch, dst_slice_pitch, num_events_in_wait_list, event_wait_list_address, event_address); + return __result; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CL11_nclCreateUserEvent(JNIEnv *env, jclass clazz, jlong context, jlong errcode_ret, jlong function_pointer) { + cl_int *errcode_ret_address = (cl_int *)(intptr_t)errcode_ret; + clCreateUserEventPROC clCreateUserEvent = (clCreateUserEventPROC)((intptr_t)function_pointer); + cl_event __result = clCreateUserEvent((cl_context)(intptr_t)context, errcode_ret_address); + return (intptr_t)__result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL11_nclSetUserEventStatus(JNIEnv *env, jclass clazz, jlong event, jint execution_status, jlong function_pointer) { + clSetUserEventStatusPROC clSetUserEventStatus = (clSetUserEventStatusPROC)((intptr_t)function_pointer); + cl_int __result = clSetUserEventStatus((cl_event)(intptr_t)event, execution_status); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL11_nclSetEventCallback(JNIEnv *env, jclass clazz, jlong event, jint command_exec_callback_type, jlong pfn_notify, jlong user_data, jlong function_pointer) { + clSetEventCallbackPROC clSetEventCallback = (clSetEventCallbackPROC)((intptr_t)function_pointer); + cl_int __result = clSetEventCallback((cl_event)(intptr_t)event, command_exec_callback_type, (cl_event_callback)(intptr_t)pfn_notify, (void *)(intptr_t)user_data); + return __result; +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_CL12.c b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_CL12.c new file mode 100644 index 0000000..6665fb6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_CL12.c @@ -0,0 +1,194 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extcl.h" + +typedef CL_API_ENTRY cl_int (CL_API_CALL *clRetainDevicePROC) (cl_device_id device); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clReleaseDevicePROC) (cl_device_id device); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clCreateSubDevicesPROC) (cl_device_id in_device, const cl_device_partition_property * properties, cl_uint num_devices, cl_device_id * out_devices, cl_uint * num_devices_ret); +typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateImagePROC) (cl_context context, cl_mem_flags flags, const cl_image_format * image_format, const cl_image_desc * image_desc, cl_void * host_ptr, cl_int * errcode_ret); +typedef CL_API_ENTRY cl_program (CL_API_CALL *clCreateProgramWithBuiltInKernelsPROC) (cl_context context, cl_uint num_devices, const cl_device_id * device_list, const cl_char * kernel_names, cl_int * errcode_ret); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clCompileProgramPROC) (cl_program program, cl_uint num_devices, const cl_device_id * device_list, const cl_char * options, cl_uint num_input_headers, const cl_program * input_header, const cl_char ** header_include_name, cl_program_callback pfn_notify, void * user_data); +typedef CL_API_ENTRY cl_program (CL_API_CALL *clLinkProgramPROC) (cl_context context, cl_uint num_devices, const cl_device_id * device_list, const cl_char * options, cl_uint num_input_programs, const cl_program * input_programs, cl_program_callback pfn_notify, void * user_data, cl_int * errcode_ret); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clUnloadPlatformCompilerPROC) (cl_platform_id platform); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetKernelArgInfoPROC) (cl_kernel kernel, cl_uint arg_indx, cl_kernel_arg_info param_name, size_t param_value_size, cl_void * param_value, size_t * param_value_size_ret); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueFillBufferPROC) (cl_command_queue command_queue, cl_mem buffer, const cl_void * pattern, size_t pattern_size, size_t offset, size_t size, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueFillImagePROC) (cl_command_queue command_queue, cl_mem image, const cl_void * fill_color, const size_t * origin, const size_t * region, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueMigrateMemObjectsPROC) (cl_command_queue command_queue, cl_uint num_mem_objects, const cl_mem * mem_objects, cl_mem_migration_flags flags, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueMarkerWithWaitListPROC) (cl_command_queue command_queue, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueBarrierWithWaitListPROC) (cl_command_queue command_queue, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clSetPrintfCallbackPROC) (cl_context context, cl_printf_callback pfn_notify, void * user_data); +typedef CL_API_ENTRY void * (CL_API_CALL *clGetExtensionFunctionAddressForPlatformPROC) (cl_platform_id platform, const cl_char * func_name); + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL12_nclRetainDevice(JNIEnv *env, jclass clazz, jlong device, jlong function_pointer) { + clRetainDevicePROC clRetainDevice = (clRetainDevicePROC)((intptr_t)function_pointer); + cl_int __result = clRetainDevice((cl_device_id)(intptr_t)device); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL12_nclReleaseDevice(JNIEnv *env, jclass clazz, jlong device, jlong function_pointer) { + clReleaseDevicePROC clReleaseDevice = (clReleaseDevicePROC)((intptr_t)function_pointer); + cl_int __result = clReleaseDevice((cl_device_id)(intptr_t)device); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL12_nclCreateSubDevices(JNIEnv *env, jclass clazz, jlong in_device, jlong properties, jint num_devices, jlong out_devices, jlong num_devices_ret, jlong function_pointer) { + const cl_device_partition_property *properties_address = (const cl_device_partition_property *)(intptr_t)properties; + cl_device_id *out_devices_address = (cl_device_id *)(intptr_t)out_devices; + cl_uint *num_devices_ret_address = (cl_uint *)(intptr_t)num_devices_ret; + clCreateSubDevicesPROC clCreateSubDevices = (clCreateSubDevicesPROC)((intptr_t)function_pointer); + cl_int __result = clCreateSubDevices((cl_device_id)(intptr_t)in_device, properties_address, num_devices, out_devices_address, num_devices_ret_address); + return __result; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CL12_nclCreateImage(JNIEnv *env, jclass clazz, jlong context, jlong flags, jlong image_format, jlong image_desc, jlong host_ptr, jlong errcode_ret, jlong function_pointer) { + const cl_image_format *image_format_address = (const cl_image_format *)(intptr_t)image_format; + const cl_image_desc *image_desc_address = (const cl_image_desc *)(intptr_t)image_desc; + cl_void *host_ptr_address = (cl_void *)(intptr_t)host_ptr; + cl_int *errcode_ret_address = (cl_int *)(intptr_t)errcode_ret; + clCreateImagePROC clCreateImage = (clCreateImagePROC)((intptr_t)function_pointer); + cl_mem __result = clCreateImage((cl_context)(intptr_t)context, flags, image_format_address, image_desc_address, host_ptr_address, errcode_ret_address); + return (intptr_t)__result; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CL12_nclCreateProgramWithBuiltInKernels(JNIEnv *env, jclass clazz, jlong context, jint num_devices, jlong device_list, jlong kernel_names, jlong errcode_ret, jlong function_pointer) { + const cl_device_id *device_list_address = (const cl_device_id *)(intptr_t)device_list; + const cl_char *kernel_names_address = (const cl_char *)(intptr_t)kernel_names; + cl_int *errcode_ret_address = (cl_int *)(intptr_t)errcode_ret; + clCreateProgramWithBuiltInKernelsPROC clCreateProgramWithBuiltInKernels = (clCreateProgramWithBuiltInKernelsPROC)((intptr_t)function_pointer); + cl_program __result = clCreateProgramWithBuiltInKernels((cl_context)(intptr_t)context, num_devices, device_list_address, kernel_names_address, errcode_ret_address); + return (intptr_t)__result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL12_nclCompileProgram(JNIEnv *env, jclass clazz, jlong program, jint num_devices, jlong device_list, jlong options, jint num_input_headers, jlong input_header, jlong header_include_name, jlong pfn_notify, jlong user_data, jlong function_pointer) { + const cl_device_id *device_list_address = (const cl_device_id *)(intptr_t)device_list; + const cl_char *options_address = (const cl_char *)(intptr_t)options; + const cl_program *input_header_address = (const cl_program *)(intptr_t)input_header; + const cl_char *header_include_name_address = (const cl_char *)(intptr_t)header_include_name; + clCompileProgramPROC clCompileProgram = (clCompileProgramPROC)((intptr_t)function_pointer); + cl_int __result = clCompileProgram((cl_program)(intptr_t)program, num_devices, device_list_address, options_address, num_input_headers, input_header_address, (const cl_char **)&header_include_name_address, (cl_program_callback)(intptr_t)pfn_notify, (void *)(intptr_t)user_data); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL12_nclCompileProgramMulti(JNIEnv *env, jclass clazz, jlong program, jint num_devices, jlong device_list, jlong options, jint num_input_headers, jlong input_headers, jlong header_include_names, jlong pfn_notify, jlong user_data, jlong function_pointer) { + const cl_device_id *device_list_address = (const cl_device_id *)(intptr_t)device_list; + const cl_char *options_address = (const cl_char *)(intptr_t)options; + const cl_program *input_headers_address = (const cl_program *)(intptr_t)input_headers; + const cl_char *header_include_names_address = (const cl_char *)(intptr_t)header_include_names; + int _str_i; + cl_char *_str_address; + cl_char **header_include_names_str = (cl_char **) malloc(num_input_headers * sizeof(cl_char *)); + clCompileProgramPROC clCompileProgram = (clCompileProgramPROC)((intptr_t)function_pointer); + cl_int __result; + _str_i = 0; + _str_address = (cl_char *)header_include_names_address; + while ( _str_i < num_input_headers ) { + header_include_names_str[_str_i++] = _str_address; + _str_address += strlen(_str_address) + 1; + } + __result = clCompileProgram((cl_program)(intptr_t)program, num_devices, device_list_address, options_address, num_input_headers, input_headers_address, (const cl_char **)&header_include_names_str, (cl_program_callback)(intptr_t)pfn_notify, (void *)(intptr_t)user_data); + free(header_include_names_str); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL12_nclCompileProgram3(JNIEnv *env, jclass clazz, jlong program, jint num_devices, jlong device_list, jlong options, jint num_input_headers, jlong input_headers, jobjectArray header_include_names, jlong pfn_notify, jlong user_data, jlong function_pointer) { + const cl_device_id *device_list_address = (const cl_device_id *)(intptr_t)device_list; + const cl_char *options_address = (const cl_char *)(intptr_t)options; + const cl_program *input_headers_address = (const cl_program *)(intptr_t)input_headers; + int _ptr_i; + jobject _ptr_object; + cl_char **header_include_names_ptr = (cl_char **) malloc(num_input_headers * sizeof(cl_char *)); + clCompileProgramPROC clCompileProgram = (clCompileProgramPROC)((intptr_t)function_pointer); + cl_int __result; + _ptr_i = 0; + while ( _ptr_i < num_input_headers ) { + _ptr_object = (*env)->GetObjectArrayElement(env, header_include_names, _ptr_i); + header_include_names_ptr[_ptr_i++] = (cl_char *)(*env)->GetDirectBufferAddress(env, _ptr_object); + } + __result = clCompileProgram((cl_program)(intptr_t)program, num_devices, device_list_address, options_address, num_input_headers, input_headers_address, (const cl_char **)header_include_names_ptr, (cl_program_callback)(intptr_t)pfn_notify, (void *)(intptr_t)user_data); + free(header_include_names_ptr); + return __result; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CL12_nclLinkProgram(JNIEnv *env, jclass clazz, jlong context, jint num_devices, jlong device_list, jlong options, jint num_input_programs, jlong input_programs, jlong pfn_notify, jlong user_data, jlong errcode_ret, jlong function_pointer) { + const cl_device_id *device_list_address = (const cl_device_id *)(intptr_t)device_list; + const cl_char *options_address = (const cl_char *)(intptr_t)options; + const cl_program *input_programs_address = (const cl_program *)(intptr_t)input_programs; + cl_int *errcode_ret_address = (cl_int *)(intptr_t)errcode_ret; + clLinkProgramPROC clLinkProgram = (clLinkProgramPROC)((intptr_t)function_pointer); + cl_program __result = clLinkProgram((cl_context)(intptr_t)context, num_devices, device_list_address, options_address, num_input_programs, input_programs_address, (cl_program_callback)(intptr_t)pfn_notify, (void *)(intptr_t)user_data, errcode_ret_address); + return (intptr_t)__result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL12_nclUnloadPlatformCompiler(JNIEnv *env, jclass clazz, jlong platform, jlong function_pointer) { + clUnloadPlatformCompilerPROC clUnloadPlatformCompiler = (clUnloadPlatformCompilerPROC)((intptr_t)function_pointer); + cl_int __result = clUnloadPlatformCompiler((cl_platform_id)(intptr_t)platform); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL12_nclGetKernelArgInfo(JNIEnv *env, jclass clazz, jlong kernel, jint arg_indx, jint param_name, jlong param_value_size, jlong param_value, jlong param_value_size_ret, jlong function_pointer) { + cl_void *param_value_address = (cl_void *)(intptr_t)param_value; + size_t *param_value_size_ret_address = (size_t *)(intptr_t)param_value_size_ret; + clGetKernelArgInfoPROC clGetKernelArgInfo = (clGetKernelArgInfoPROC)((intptr_t)function_pointer); + cl_int __result = clGetKernelArgInfo((cl_kernel)(intptr_t)kernel, arg_indx, param_name, param_value_size, param_value_address, param_value_size_ret_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL12_nclEnqueueFillBuffer(JNIEnv *env, jclass clazz, jlong command_queue, jlong buffer, jlong pattern, jlong pattern_size, jlong offset, jlong size, jint num_events_in_wait_list, jlong event_wait_list, jlong event, jlong function_pointer) { + const cl_void *pattern_address = (const cl_void *)(intptr_t)pattern; + const cl_event *event_wait_list_address = (const cl_event *)(intptr_t)event_wait_list; + cl_event *event_address = (cl_event *)(intptr_t)event; + clEnqueueFillBufferPROC clEnqueueFillBuffer = (clEnqueueFillBufferPROC)((intptr_t)function_pointer); + cl_int __result = clEnqueueFillBuffer((cl_command_queue)(intptr_t)command_queue, (cl_mem)(intptr_t)buffer, pattern_address, pattern_size, offset, size, num_events_in_wait_list, event_wait_list_address, event_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL12_nclEnqueueFillImage(JNIEnv *env, jclass clazz, jlong command_queue, jlong image, jlong fill_color, jlong origin, jlong region, jint num_events_in_wait_list, jlong event_wait_list, jlong event, jlong function_pointer) { + const cl_void *fill_color_address = (const cl_void *)(intptr_t)fill_color; + const size_t *origin_address = (const size_t *)(intptr_t)origin; + const size_t *region_address = (const size_t *)(intptr_t)region; + const cl_event *event_wait_list_address = (const cl_event *)(intptr_t)event_wait_list; + cl_event *event_address = (cl_event *)(intptr_t)event; + clEnqueueFillImagePROC clEnqueueFillImage = (clEnqueueFillImagePROC)((intptr_t)function_pointer); + cl_int __result = clEnqueueFillImage((cl_command_queue)(intptr_t)command_queue, (cl_mem)(intptr_t)image, fill_color_address, origin_address, region_address, num_events_in_wait_list, event_wait_list_address, event_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL12_nclEnqueueMigrateMemObjects(JNIEnv *env, jclass clazz, jlong command_queue, jint num_mem_objects, jlong mem_objects, jlong flags, jint num_events_in_wait_list, jlong event_wait_list, jlong event, jlong function_pointer) { + const cl_mem *mem_objects_address = (const cl_mem *)(intptr_t)mem_objects; + const cl_event *event_wait_list_address = (const cl_event *)(intptr_t)event_wait_list; + cl_event *event_address = (cl_event *)(intptr_t)event; + clEnqueueMigrateMemObjectsPROC clEnqueueMigrateMemObjects = (clEnqueueMigrateMemObjectsPROC)((intptr_t)function_pointer); + cl_int __result = clEnqueueMigrateMemObjects((cl_command_queue)(intptr_t)command_queue, num_mem_objects, mem_objects_address, flags, num_events_in_wait_list, event_wait_list_address, event_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL12_nclEnqueueMarkerWithWaitList(JNIEnv *env, jclass clazz, jlong command_queue, jint num_events_in_wait_list, jlong event_wait_list, jlong event, jlong function_pointer) { + const cl_event *event_wait_list_address = (const cl_event *)(intptr_t)event_wait_list; + cl_event *event_address = (cl_event *)(intptr_t)event; + clEnqueueMarkerWithWaitListPROC clEnqueueMarkerWithWaitList = (clEnqueueMarkerWithWaitListPROC)((intptr_t)function_pointer); + cl_int __result = clEnqueueMarkerWithWaitList((cl_command_queue)(intptr_t)command_queue, num_events_in_wait_list, event_wait_list_address, event_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL12_nclEnqueueBarrierWithWaitList(JNIEnv *env, jclass clazz, jlong command_queue, jint num_events_in_wait_list, jlong event_wait_list, jlong event, jlong function_pointer) { + const cl_event *event_wait_list_address = (const cl_event *)(intptr_t)event_wait_list; + cl_event *event_address = (cl_event *)(intptr_t)event; + clEnqueueBarrierWithWaitListPROC clEnqueueBarrierWithWaitList = (clEnqueueBarrierWithWaitListPROC)((intptr_t)function_pointer); + cl_int __result = clEnqueueBarrierWithWaitList((cl_command_queue)(intptr_t)command_queue, num_events_in_wait_list, event_wait_list_address, event_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_CL12_nclSetPrintfCallback(JNIEnv *env, jclass clazz, jlong context, jlong pfn_notify, jlong user_data, jlong function_pointer) { + clSetPrintfCallbackPROC clSetPrintfCallback = (clSetPrintfCallbackPROC)((intptr_t)function_pointer); + cl_int __result = clSetPrintfCallback((cl_context)(intptr_t)context, (cl_printf_callback)(intptr_t)pfn_notify, (void *)(intptr_t)user_data); + return __result; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CL12_nclGetExtensionFunctionAddressForPlatform(JNIEnv *env, jclass clazz, jlong platform, jlong func_name, jlong function_pointer) { + const cl_char *func_name_address = (const cl_char *)(intptr_t)func_name; + clGetExtensionFunctionAddressForPlatformPROC clGetExtensionFunctionAddressForPlatform = (clGetExtensionFunctionAddressForPlatformPROC)((intptr_t)function_pointer); + void * __result = clGetExtensionFunctionAddressForPlatform((cl_platform_id)(intptr_t)platform, func_name_address); + return (intptr_t)__result; +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_CL12GL.c b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_CL12GL.c new file mode 100644 index 0000000..9690b8e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_CL12GL.c @@ -0,0 +1,14 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extcl.h" + +typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromGLTexturePROC) (cl_context context, cl_mem_flags flags, GLenum target, GLint miplevel, GLuint texture, cl_int * errcode_ret); + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_CL12GL_nclCreateFromGLTexture(JNIEnv *env, jclass clazz, jlong context, jlong flags, jint target, jint miplevel, jint texture, jlong errcode_ret, jlong function_pointer) { + cl_int *errcode_ret_address = (cl_int *)(intptr_t)errcode_ret; + clCreateFromGLTexturePROC clCreateFromGLTexture = (clCreateFromGLTexturePROC)((intptr_t)function_pointer); + cl_mem __result = clCreateFromGLTexture((cl_context)(intptr_t)context, flags, target, miplevel, texture, errcode_ret_address); + return (intptr_t)__result; +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_EXTDeviceFission.c b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_EXTDeviceFission.c new file mode 100644 index 0000000..7138ced --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_EXTDeviceFission.c @@ -0,0 +1,30 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extcl.h" + +typedef CL_API_ENTRY cl_int (CL_API_CALL *clRetainDeviceEXTPROC) (cl_device_id device); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clReleaseDeviceEXTPROC) (cl_device_id device); +typedef CL_API_ENTRY cl_int (CL_API_CALL *clCreateSubDevicesEXTPROC) (cl_device_id in_device, const cl_device_partition_property_ext * properties, cl_uint num_entries, cl_device_id * out_devices, cl_uint * num_devices); + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_EXTDeviceFission_nclRetainDeviceEXT(JNIEnv *env, jclass clazz, jlong device, jlong function_pointer) { + clRetainDeviceEXTPROC clRetainDeviceEXT = (clRetainDeviceEXTPROC)((intptr_t)function_pointer); + cl_int __result = clRetainDeviceEXT((cl_device_id)(intptr_t)device); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_EXTDeviceFission_nclReleaseDeviceEXT(JNIEnv *env, jclass clazz, jlong device, jlong function_pointer) { + clReleaseDeviceEXTPROC clReleaseDeviceEXT = (clReleaseDeviceEXTPROC)((intptr_t)function_pointer); + cl_int __result = clReleaseDeviceEXT((cl_device_id)(intptr_t)device); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_EXTDeviceFission_nclCreateSubDevicesEXT(JNIEnv *env, jclass clazz, jlong in_device, jlong properties, jint num_entries, jlong out_devices, jlong num_devices, jlong function_pointer) { + const cl_device_partition_property_ext *properties_address = (const cl_device_partition_property_ext *)(intptr_t)properties; + cl_device_id *out_devices_address = (cl_device_id *)(intptr_t)out_devices; + cl_uint *num_devices_address = (cl_uint *)(intptr_t)num_devices; + clCreateSubDevicesEXTPROC clCreateSubDevicesEXT = (clCreateSubDevicesEXTPROC)((intptr_t)function_pointer); + cl_int __result = clCreateSubDevicesEXT((cl_device_id)(intptr_t)in_device, properties_address, num_entries, out_devices_address, num_devices_address); + return __result; +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_EXTMigrateMemobject.c b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_EXTMigrateMemobject.c new file mode 100644 index 0000000..d555432 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_EXTMigrateMemobject.c @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extcl.h" + +typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueMigrateMemObjectEXTPROC) (cl_command_queue command_queue, cl_uint num_mem_objects, const cl_mem * mem_objects, cl_mem_migration_flags_ext flags, cl_uint num_events_in_wait_list, const cl_event * event_wait_list, cl_event * event); + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_EXTMigrateMemobject_nclEnqueueMigrateMemObjectEXT(JNIEnv *env, jclass clazz, jlong command_queue, jint num_mem_objects, jlong mem_objects, jlong flags, jint num_events_in_wait_list, jlong event_wait_list, jlong event, jlong function_pointer) { + const cl_mem *mem_objects_address = (const cl_mem *)(intptr_t)mem_objects; + const cl_event *event_wait_list_address = (const cl_event *)(intptr_t)event_wait_list; + cl_event *event_address = (cl_event *)(intptr_t)event; + clEnqueueMigrateMemObjectEXTPROC clEnqueueMigrateMemObjectEXT = (clEnqueueMigrateMemObjectEXTPROC)((intptr_t)function_pointer); + cl_int __result = clEnqueueMigrateMemObjectEXT((cl_command_queue)(intptr_t)command_queue, num_mem_objects, mem_objects_address, flags, num_events_in_wait_list, event_wait_list_address, event_address); + return __result; +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_KHRGLEvent.c b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_KHRGLEvent.c new file mode 100644 index 0000000..271b8e9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_KHRGLEvent.c @@ -0,0 +1,14 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extcl.h" + +typedef CL_API_ENTRY cl_event (CL_API_CALL *clCreateEventFromGLsyncKHRPROC) (cl_context context, cl_GLsync sync, cl_int * errcode_ret); + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opencl_KHRGLEvent_nclCreateEventFromGLsyncKHR(JNIEnv *env, jclass clazz, jlong context, jlong sync, jlong errcode_ret, jlong function_pointer) { + cl_int *errcode_ret_address = (cl_int *)(intptr_t)errcode_ret; + clCreateEventFromGLsyncKHRPROC clCreateEventFromGLsyncKHR = (clCreateEventFromGLsyncKHRPROC)((intptr_t)function_pointer); + cl_event __result = clCreateEventFromGLsyncKHR((cl_context)(intptr_t)context, (cl_GLsync)(intptr_t)sync, errcode_ret_address); + return (intptr_t)__result; +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_KHRGLSharing.c b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_KHRGLSharing.c new file mode 100644 index 0000000..1363be1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_KHRGLSharing.c @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extcl.h" + +typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetGLContextInfoKHRPROC) (const cl_context_properties * properties, cl_gl_context_info param_name, size_t param_value_size, cl_void * param_value, size_t * param_value_size_ret); + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_KHRGLSharing_nclGetGLContextInfoKHR(JNIEnv *env, jclass clazz, jlong properties, jint param_name, jlong param_value_size, jlong param_value, jlong param_value_size_ret, jlong function_pointer) { + const cl_context_properties *properties_address = (const cl_context_properties *)(intptr_t)properties; + cl_void *param_value_address = (cl_void *)(intptr_t)param_value; + size_t *param_value_size_ret_address = (size_t *)(intptr_t)param_value_size_ret; + clGetGLContextInfoKHRPROC clGetGLContextInfoKHR = (clGetGLContextInfoKHRPROC)((intptr_t)function_pointer); + cl_int __result = clGetGLContextInfoKHR(properties_address, param_name, param_value_size, param_value_address, param_value_size_ret_address); + return __result; +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_KHRICD.c b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_KHRICD.c new file mode 100644 index 0000000..66a06e8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_KHRICD.c @@ -0,0 +1,15 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extcl.h" + +typedef CL_API_ENTRY cl_int (CL_API_CALL *clIcdGetPlatformIDsKHRPROC) (cl_uint num_entries, cl_platform_id * platforms, cl_uint * num_platforms); + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_KHRICD_nclIcdGetPlatformIDsKHR(JNIEnv *env, jclass clazz, jint num_entries, jlong platforms, jlong num_platforms, jlong function_pointer) { + cl_platform_id *platforms_address = (cl_platform_id *)(intptr_t)platforms; + cl_uint *num_platforms_address = (cl_uint *)(intptr_t)num_platforms; + clIcdGetPlatformIDsKHRPROC clIcdGetPlatformIDsKHR = (clIcdGetPlatformIDsKHRPROC)((intptr_t)function_pointer); + cl_int __result = clIcdGetPlatformIDsKHR(num_entries, platforms_address, num_platforms_address); + return __result; +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_KHRSubgroups.c b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_KHRSubgroups.c new file mode 100644 index 0000000..117380c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_KHRSubgroups.c @@ -0,0 +1,16 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extcl.h" + +typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetKernelSubGroupInfoKHRPROC) (cl_kernel kernel, cl_device_id device, cl_kernel_sub_group_info param_name, size_t input_value_size, const cl_void * input_value, size_t param_value_size, cl_void * param_value, size_t * param_value_size_ret); + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_KHRSubgroups_nclGetKernelSubGroupInfoKHR(JNIEnv *env, jclass clazz, jlong kernel, jlong device, jint param_name, jlong input_value_size, jlong input_value, jlong param_value_size, jlong param_value, jlong param_value_size_ret, jlong function_pointer) { + const cl_void *input_value_address = (const cl_void *)(intptr_t)input_value; + cl_void *param_value_address = (cl_void *)(intptr_t)param_value; + size_t *param_value_size_ret_address = (size_t *)(intptr_t)param_value_size_ret; + clGetKernelSubGroupInfoKHRPROC clGetKernelSubGroupInfoKHR = (clGetKernelSubGroupInfoKHRPROC)((intptr_t)function_pointer); + cl_int __result = clGetKernelSubGroupInfoKHR((cl_kernel)(intptr_t)kernel, (cl_device_id)(intptr_t)device, param_name, input_value_size, input_value_address, param_value_size, param_value_address, param_value_size_ret_address); + return __result; +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_KHRTerminateContext.c b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_KHRTerminateContext.c new file mode 100644 index 0000000..c93e951 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opencl/org_lwjgl_opencl_KHRTerminateContext.c @@ -0,0 +1,13 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extcl.h" + +typedef CL_API_ENTRY cl_int (CL_API_CALL *clTerminateContextKHRPROC) (cl_context context); + +JNIEXPORT jint JNICALL Java_org_lwjgl_opencl_KHRTerminateContext_nclTerminateContextKHR(JNIEnv *env, jclass clazz, jlong context, jlong function_pointer) { + clTerminateContextKHRPROC clTerminateContextKHR = (clTerminateContextKHRPROC)((intptr_t)function_pointer); + cl_int __result = clTerminateContextKHR((cl_context)(intptr_t)context); + return __result; +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDDebugOutput.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDDebugOutput.c new file mode 100644 index 0000000..9e57122 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDDebugOutput.c @@ -0,0 +1,38 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glDebugMessageEnableAMDPROC) (GLenum category, GLenum severity, GLsizei count, const GLuint * ids, GLboolean enabled); +typedef void (APIENTRY *glDebugMessageInsertAMDPROC) (GLenum category, GLenum severity, GLuint id, GLsizei length, const GLchar * buf); +typedef void (APIENTRY *glDebugMessageCallbackAMDPROC) (GLDEBUGPROCAMD callback, GLvoid * userParam); +typedef GLuint (APIENTRY *glGetDebugMessageLogAMDPROC) (GLuint count, GLsizei logSize, GLenum * categories, GLuint * severities, GLuint * ids, GLsizei * lengths, GLchar * messageLog); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDDebugOutput_nglDebugMessageEnableAMD(JNIEnv *env, jclass clazz, jint category, jint severity, jint count, jlong ids, jboolean enabled, jlong function_pointer) { + const GLuint *ids_address = (const GLuint *)(intptr_t)ids; + glDebugMessageEnableAMDPROC glDebugMessageEnableAMD = (glDebugMessageEnableAMDPROC)((intptr_t)function_pointer); + glDebugMessageEnableAMD(category, severity, count, ids_address, enabled); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDDebugOutput_nglDebugMessageInsertAMD(JNIEnv *env, jclass clazz, jint category, jint severity, jint id, jint length, jlong buf, jlong function_pointer) { + const GLchar *buf_address = (const GLchar *)(intptr_t)buf; + glDebugMessageInsertAMDPROC glDebugMessageInsertAMD = (glDebugMessageInsertAMDPROC)((intptr_t)function_pointer); + glDebugMessageInsertAMD(category, severity, id, length, buf_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDDebugOutput_nglDebugMessageCallbackAMD(JNIEnv *env, jclass clazz, jlong callback, jlong userParam, jlong function_pointer) { + glDebugMessageCallbackAMDPROC glDebugMessageCallbackAMD = (glDebugMessageCallbackAMDPROC)((intptr_t)function_pointer); + glDebugMessageCallbackAMD((GLDEBUGPROCAMD)(intptr_t)callback, (GLvoid *)(intptr_t)userParam); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_AMDDebugOutput_nglGetDebugMessageLogAMD(JNIEnv *env, jclass clazz, jint count, jint logSize, jlong categories, jlong severities, jlong ids, jlong lengths, jlong messageLog, jlong function_pointer) { + GLenum *categories_address = (GLenum *)(intptr_t)categories; + GLuint *severities_address = (GLuint *)(intptr_t)severities; + GLuint *ids_address = (GLuint *)(intptr_t)ids; + GLsizei *lengths_address = (GLsizei *)(intptr_t)lengths; + GLchar *messageLog_address = (GLchar *)(intptr_t)messageLog; + glGetDebugMessageLogAMDPROC glGetDebugMessageLogAMD = (glGetDebugMessageLogAMDPROC)((intptr_t)function_pointer); + GLuint __result = glGetDebugMessageLogAMD(count, logSize, categories_address, severities_address, ids_address, lengths_address, messageLog_address); + return __result; +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDDrawBuffersBlend.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDDrawBuffersBlend.c new file mode 100644 index 0000000..8dc070e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDDrawBuffersBlend.c @@ -0,0 +1,30 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glBlendFuncIndexedAMDPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void (APIENTRY *glBlendFuncSeparateIndexedAMDPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +typedef void (APIENTRY *glBlendEquationIndexedAMDPROC) (GLuint buf, GLenum mode); +typedef void (APIENTRY *glBlendEquationSeparateIndexedAMDPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDDrawBuffersBlend_nglBlendFuncIndexedAMD(JNIEnv *env, jclass clazz, jint buf, jint src, jint dst, jlong function_pointer) { + glBlendFuncIndexedAMDPROC glBlendFuncIndexedAMD = (glBlendFuncIndexedAMDPROC)((intptr_t)function_pointer); + glBlendFuncIndexedAMD(buf, src, dst); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDDrawBuffersBlend_nglBlendFuncSeparateIndexedAMD(JNIEnv *env, jclass clazz, jint buf, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha, jlong function_pointer) { + glBlendFuncSeparateIndexedAMDPROC glBlendFuncSeparateIndexedAMD = (glBlendFuncSeparateIndexedAMDPROC)((intptr_t)function_pointer); + glBlendFuncSeparateIndexedAMD(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDDrawBuffersBlend_nglBlendEquationIndexedAMD(JNIEnv *env, jclass clazz, jint buf, jint mode, jlong function_pointer) { + glBlendEquationIndexedAMDPROC glBlendEquationIndexedAMD = (glBlendEquationIndexedAMDPROC)((intptr_t)function_pointer); + glBlendEquationIndexedAMD(buf, mode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDDrawBuffersBlend_nglBlendEquationSeparateIndexedAMD(JNIEnv *env, jclass clazz, jint buf, jint modeRGB, jint modeAlpha, jlong function_pointer) { + glBlendEquationSeparateIndexedAMDPROC glBlendEquationSeparateIndexedAMD = (glBlendEquationSeparateIndexedAMDPROC)((intptr_t)function_pointer); + glBlendEquationSeparateIndexedAMD(buf, modeRGB, modeAlpha); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDInterleavedElements.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDInterleavedElements.c new file mode 100644 index 0000000..93005c8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDInterleavedElements.c @@ -0,0 +1,12 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glVertexAttribParameteriAMDPROC) (GLuint index, GLenum pname, GLint param); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDInterleavedElements_nglVertexAttribParameteriAMD(JNIEnv *env, jclass clazz, jint index, jint pname, jint param, jlong function_pointer) { + glVertexAttribParameteriAMDPROC glVertexAttribParameteriAMD = (glVertexAttribParameteriAMDPROC)((intptr_t)function_pointer); + glVertexAttribParameteriAMD(index, pname, param); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDMultiDrawIndirect.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDMultiDrawIndirect.c new file mode 100644 index 0000000..5f87daf --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDMultiDrawIndirect.c @@ -0,0 +1,32 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glMultiDrawArraysIndirectAMDPROC) (GLenum mode, const GLvoid * indirect, GLsizei primcount, GLsizei stride); +typedef void (APIENTRY *glMultiDrawElementsIndirectAMDPROC) (GLenum mode, GLenum type, const GLvoid * indirect, GLsizei primcount, GLsizei stride); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDMultiDrawIndirect_nglMultiDrawArraysIndirectAMD(JNIEnv *env, jclass clazz, jint mode, jlong indirect, jint primcount, jint stride, jlong function_pointer) { + const GLvoid *indirect_address = (const GLvoid *)(intptr_t)indirect; + glMultiDrawArraysIndirectAMDPROC glMultiDrawArraysIndirectAMD = (glMultiDrawArraysIndirectAMDPROC)((intptr_t)function_pointer); + glMultiDrawArraysIndirectAMD(mode, indirect_address, primcount, stride); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDMultiDrawIndirect_nglMultiDrawArraysIndirectAMDBO(JNIEnv *env, jclass clazz, jint mode, jlong indirect_buffer_offset, jint primcount, jint stride, jlong function_pointer) { + const GLvoid *indirect_address = (const GLvoid *)(intptr_t)offsetToPointer(indirect_buffer_offset); + glMultiDrawArraysIndirectAMDPROC glMultiDrawArraysIndirectAMD = (glMultiDrawArraysIndirectAMDPROC)((intptr_t)function_pointer); + glMultiDrawArraysIndirectAMD(mode, indirect_address, primcount, stride); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDMultiDrawIndirect_nglMultiDrawElementsIndirectAMD(JNIEnv *env, jclass clazz, jint mode, jint type, jlong indirect, jint primcount, jint stride, jlong function_pointer) { + const GLvoid *indirect_address = (const GLvoid *)(intptr_t)indirect; + glMultiDrawElementsIndirectAMDPROC glMultiDrawElementsIndirectAMD = (glMultiDrawElementsIndirectAMDPROC)((intptr_t)function_pointer); + glMultiDrawElementsIndirectAMD(mode, type, indirect_address, primcount, stride); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDMultiDrawIndirect_nglMultiDrawElementsIndirectAMDBO(JNIEnv *env, jclass clazz, jint mode, jint type, jlong indirect_buffer_offset, jint primcount, jint stride, jlong function_pointer) { + const GLvoid *indirect_address = (const GLvoid *)(intptr_t)offsetToPointer(indirect_buffer_offset); + glMultiDrawElementsIndirectAMDPROC glMultiDrawElementsIndirectAMD = (glMultiDrawElementsIndirectAMDPROC)((intptr_t)function_pointer); + glMultiDrawElementsIndirectAMD(mode, type, indirect_address, primcount, stride); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDNameGenDelete.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDNameGenDelete.c new file mode 100644 index 0000000..50ec023 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDNameGenDelete.c @@ -0,0 +1,27 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glGenNamesAMDPROC) (GLenum identifier, GLuint num, GLuint * names); +typedef void (APIENTRY *glDeleteNamesAMDPROC) (GLenum identifier, GLsizei num, const GLuint * names); +typedef GLboolean (APIENTRY *glIsNameAMDPROC) (GLenum identifier, GLuint name); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDNameGenDelete_nglGenNamesAMD(JNIEnv *env, jclass clazz, jint identifier, jint num, jlong names, jlong function_pointer) { + GLuint *names_address = (GLuint *)(intptr_t)names; + glGenNamesAMDPROC glGenNamesAMD = (glGenNamesAMDPROC)((intptr_t)function_pointer); + glGenNamesAMD(identifier, num, names_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDNameGenDelete_nglDeleteNamesAMD(JNIEnv *env, jclass clazz, jint identifier, jint num, jlong names, jlong function_pointer) { + const GLuint *names_address = (const GLuint *)(intptr_t)names; + glDeleteNamesAMDPROC glDeleteNamesAMD = (glDeleteNamesAMDPROC)((intptr_t)function_pointer); + glDeleteNamesAMD(identifier, num, names_address); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_AMDNameGenDelete_nglIsNameAMD(JNIEnv *env, jclass clazz, jint identifier, jint name, jlong function_pointer) { + glIsNameAMDPROC glIsNameAMD = (glIsNameAMDPROC)((intptr_t)function_pointer); + GLboolean __result = glIsNameAMD(identifier, name); + return __result; +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDPerformanceMonitor.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDPerformanceMonitor.c new file mode 100644 index 0000000..1211370 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDPerformanceMonitor.c @@ -0,0 +1,87 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glGetPerfMonitorGroupsAMDPROC) (GLint * numGroups, GLsizei groupsSize, GLuint * groups); +typedef void (APIENTRY *glGetPerfMonitorCountersAMDPROC) (GLuint group, GLint * numCounters, GLint * maxActiveCounters, GLsizei countersSize, GLuint * counters); +typedef void (APIENTRY *glGetPerfMonitorGroupStringAMDPROC) (GLuint group, GLsizei bufSize, GLsizei * length, GLchar * groupString); +typedef void (APIENTRY *glGetPerfMonitorCounterStringAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei * length, GLchar * counterString); +typedef void (APIENTRY *glGetPerfMonitorCounterInfoAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid * data); +typedef void (APIENTRY *glGenPerfMonitorsAMDPROC) (GLsizei n, GLuint * monitors); +typedef void (APIENTRY *glDeletePerfMonitorsAMDPROC) (GLsizei n, GLuint * monitors); +typedef void (APIENTRY *glSelectPerfMonitorCountersAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint * counterList); +typedef void (APIENTRY *glBeginPerfMonitorAMDPROC) (GLuint monitor); +typedef void (APIENTRY *glEndPerfMonitorAMDPROC) (GLuint monitor); +typedef void (APIENTRY *glGetPerfMonitorCounterDataAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint * data, GLint * bytesWritten); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDPerformanceMonitor_nglGetPerfMonitorGroupsAMD(JNIEnv *env, jclass clazz, jlong numGroups, jint groupsSize, jlong groups, jlong function_pointer) { + GLint *numGroups_address = (GLint *)(intptr_t)numGroups; + GLuint *groups_address = (GLuint *)(intptr_t)groups; + glGetPerfMonitorGroupsAMDPROC glGetPerfMonitorGroupsAMD = (glGetPerfMonitorGroupsAMDPROC)((intptr_t)function_pointer); + glGetPerfMonitorGroupsAMD(numGroups_address, groupsSize, groups_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDPerformanceMonitor_nglGetPerfMonitorCountersAMD(JNIEnv *env, jclass clazz, jint group, jlong numCounters, jlong maxActiveCounters, jint countersSize, jlong counters, jlong function_pointer) { + GLint *numCounters_address = (GLint *)(intptr_t)numCounters; + GLint *maxActiveCounters_address = (GLint *)(intptr_t)maxActiveCounters; + GLuint *counters_address = (GLuint *)(intptr_t)counters; + glGetPerfMonitorCountersAMDPROC glGetPerfMonitorCountersAMD = (glGetPerfMonitorCountersAMDPROC)((intptr_t)function_pointer); + glGetPerfMonitorCountersAMD(group, numCounters_address, maxActiveCounters_address, countersSize, counters_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDPerformanceMonitor_nglGetPerfMonitorGroupStringAMD(JNIEnv *env, jclass clazz, jint group, jint bufSize, jlong length, jlong groupString, jlong function_pointer) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLchar *groupString_address = (GLchar *)(intptr_t)groupString; + glGetPerfMonitorGroupStringAMDPROC glGetPerfMonitorGroupStringAMD = (glGetPerfMonitorGroupStringAMDPROC)((intptr_t)function_pointer); + glGetPerfMonitorGroupStringAMD(group, bufSize, length_address, groupString_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDPerformanceMonitor_nglGetPerfMonitorCounterStringAMD(JNIEnv *env, jclass clazz, jint group, jint counter, jint bufSize, jlong length, jlong counterString, jlong function_pointer) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLchar *counterString_address = (GLchar *)(intptr_t)counterString; + glGetPerfMonitorCounterStringAMDPROC glGetPerfMonitorCounterStringAMD = (glGetPerfMonitorCounterStringAMDPROC)((intptr_t)function_pointer); + glGetPerfMonitorCounterStringAMD(group, counter, bufSize, length_address, counterString_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDPerformanceMonitor_nglGetPerfMonitorCounterInfoAMD(JNIEnv *env, jclass clazz, jint group, jint counter, jint pname, jlong data, jlong function_pointer) { + GLvoid *data_address = (GLvoid *)(intptr_t)data; + glGetPerfMonitorCounterInfoAMDPROC glGetPerfMonitorCounterInfoAMD = (glGetPerfMonitorCounterInfoAMDPROC)((intptr_t)function_pointer); + glGetPerfMonitorCounterInfoAMD(group, counter, pname, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDPerformanceMonitor_nglGenPerfMonitorsAMD(JNIEnv *env, jclass clazz, jint n, jlong monitors, jlong function_pointer) { + GLuint *monitors_address = (GLuint *)(intptr_t)monitors; + glGenPerfMonitorsAMDPROC glGenPerfMonitorsAMD = (glGenPerfMonitorsAMDPROC)((intptr_t)function_pointer); + glGenPerfMonitorsAMD(n, monitors_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDPerformanceMonitor_nglDeletePerfMonitorsAMD(JNIEnv *env, jclass clazz, jint n, jlong monitors, jlong function_pointer) { + GLuint *monitors_address = (GLuint *)(intptr_t)monitors; + glDeletePerfMonitorsAMDPROC glDeletePerfMonitorsAMD = (glDeletePerfMonitorsAMDPROC)((intptr_t)function_pointer); + glDeletePerfMonitorsAMD(n, monitors_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDPerformanceMonitor_nglSelectPerfMonitorCountersAMD(JNIEnv *env, jclass clazz, jint monitor, jboolean enable, jint group, jint numCounters, jlong counterList, jlong function_pointer) { + GLuint *counterList_address = (GLuint *)(intptr_t)counterList; + glSelectPerfMonitorCountersAMDPROC glSelectPerfMonitorCountersAMD = (glSelectPerfMonitorCountersAMDPROC)((intptr_t)function_pointer); + glSelectPerfMonitorCountersAMD(monitor, enable, group, numCounters, counterList_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDPerformanceMonitor_nglBeginPerfMonitorAMD(JNIEnv *env, jclass clazz, jint monitor, jlong function_pointer) { + glBeginPerfMonitorAMDPROC glBeginPerfMonitorAMD = (glBeginPerfMonitorAMDPROC)((intptr_t)function_pointer); + glBeginPerfMonitorAMD(monitor); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDPerformanceMonitor_nglEndPerfMonitorAMD(JNIEnv *env, jclass clazz, jint monitor, jlong function_pointer) { + glEndPerfMonitorAMDPROC glEndPerfMonitorAMD = (glEndPerfMonitorAMDPROC)((intptr_t)function_pointer); + glEndPerfMonitorAMD(monitor); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDPerformanceMonitor_nglGetPerfMonitorCounterDataAMD(JNIEnv *env, jclass clazz, jint monitor, jint pname, jint dataSize, jlong data, jlong bytesWritten, jlong function_pointer) { + GLuint *data_address = (GLuint *)(intptr_t)data; + GLint *bytesWritten_address = (GLint *)(intptr_t)bytesWritten; + glGetPerfMonitorCounterDataAMDPROC glGetPerfMonitorCounterDataAMD = (glGetPerfMonitorCounterDataAMDPROC)((intptr_t)function_pointer); + glGetPerfMonitorCounterDataAMD(monitor, pname, dataSize, data_address, bytesWritten_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDSamplePositions.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDSamplePositions.c new file mode 100644 index 0000000..1a10539 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDSamplePositions.c @@ -0,0 +1,13 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glSetMultisamplefvAMDPROC) (GLenum pname, GLuint index, const GLfloat * val); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDSamplePositions_nglSetMultisamplefvAMD(JNIEnv *env, jclass clazz, jint pname, jint index, jlong val, jlong function_pointer) { + const GLfloat *val_address = (const GLfloat *)(intptr_t)val; + glSetMultisamplefvAMDPROC glSetMultisamplefvAMD = (glSetMultisamplefvAMDPROC)((intptr_t)function_pointer); + glSetMultisamplefvAMD(pname, index, val_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDSparseTexture.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDSparseTexture.c new file mode 100644 index 0000000..11063ca --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDSparseTexture.c @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glTexStorageSparseAMDPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags); +typedef void (APIENTRY *glTextureStorageSparseAMDPROC) (GLuint texture, GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei layers, GLbitfield flags); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDSparseTexture_nglTexStorageSparseAMD(JNIEnv *env, jclass clazz, jint target, jint internalFormat, jint width, jint height, jint depth, jint layers, jint flags, jlong function_pointer) { + glTexStorageSparseAMDPROC glTexStorageSparseAMD = (glTexStorageSparseAMDPROC)((intptr_t)function_pointer); + glTexStorageSparseAMD(target, internalFormat, width, height, depth, layers, flags); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDSparseTexture_nglTextureStorageSparseAMD(JNIEnv *env, jclass clazz, jint texture, jint target, jint internalFormat, jint width, jint height, jint depth, jint layers, jint flags, jlong function_pointer) { + glTextureStorageSparseAMDPROC glTextureStorageSparseAMD = (glTextureStorageSparseAMDPROC)((intptr_t)function_pointer); + glTextureStorageSparseAMD(texture, target, internalFormat, width, height, depth, layers, flags); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDStencilOperationExtended.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDStencilOperationExtended.c new file mode 100644 index 0000000..70979d1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDStencilOperationExtended.c @@ -0,0 +1,12 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glStencilOpValueAMDPROC) (GLenum face, GLuint value); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDStencilOperationExtended_nglStencilOpValueAMD(JNIEnv *env, jclass clazz, jint face, jint value, jlong function_pointer) { + glStencilOpValueAMDPROC glStencilOpValueAMD = (glStencilOpValueAMDPROC)((intptr_t)function_pointer); + glStencilOpValueAMD(face, value); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDVertexShaderTessellator.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDVertexShaderTessellator.c new file mode 100644 index 0000000..46efc1d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_AMDVertexShaderTessellator.c @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glTessellationFactorAMDPROC) (GLfloat factor); +typedef void (APIENTRY *glTessellationModeAMDPROC) (GLenum mode); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDVertexShaderTessellator_nglTessellationFactorAMD(JNIEnv *env, jclass clazz, jfloat factor, jlong function_pointer) { + glTessellationFactorAMDPROC glTessellationFactorAMD = (glTessellationFactorAMDPROC)((intptr_t)function_pointer); + glTessellationFactorAMD(factor); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_AMDVertexShaderTessellator_nglTessellationModeAMD(JNIEnv *env, jclass clazz, jint mode, jlong function_pointer) { + glTessellationModeAMDPROC glTessellationModeAMD = (glTessellationModeAMDPROC)((intptr_t)function_pointer); + glTessellationModeAMD(mode); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_APPLEElementArray.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_APPLEElementArray.c new file mode 100644 index 0000000..a96c0b5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_APPLEElementArray.c @@ -0,0 +1,41 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glElementPointerAPPLEPROC) (GLenum type, const GLvoid * pointer); +typedef void (APIENTRY *glDrawElementArrayAPPLEPROC) (GLenum mode, GLint first, GLsizei count); +typedef void (APIENTRY *glDrawRangeElementArrayAPPLEPROC) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); +typedef void (APIENTRY *glMultiDrawElementArrayAPPLEPROC) (GLenum mode, const GLint * first, const GLsizei * count, GLsizei primcount); +typedef void (APIENTRY *glMultiDrawRangeElementArrayAPPLEPROC) (GLenum mode, GLuint start, GLuint end, const GLint * first, const GLsizei * count, GLsizei primcount); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_APPLEElementArray_nglElementPointerAPPLE(JNIEnv *env, jclass clazz, jint type, jlong pointer, jlong function_pointer) { + const GLvoid *pointer_address = (const GLvoid *)(intptr_t)pointer; + glElementPointerAPPLEPROC glElementPointerAPPLE = (glElementPointerAPPLEPROC)((intptr_t)function_pointer); + glElementPointerAPPLE(type, pointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_APPLEElementArray_nglDrawElementArrayAPPLE(JNIEnv *env, jclass clazz, jint mode, jint first, jint count, jlong function_pointer) { + glDrawElementArrayAPPLEPROC glDrawElementArrayAPPLE = (glDrawElementArrayAPPLEPROC)((intptr_t)function_pointer); + glDrawElementArrayAPPLE(mode, first, count); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_APPLEElementArray_nglDrawRangeElementArrayAPPLE(JNIEnv *env, jclass clazz, jint mode, jint start, jint end, jint first, jint count, jlong function_pointer) { + glDrawRangeElementArrayAPPLEPROC glDrawRangeElementArrayAPPLE = (glDrawRangeElementArrayAPPLEPROC)((intptr_t)function_pointer); + glDrawRangeElementArrayAPPLE(mode, start, end, first, count); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_APPLEElementArray_nglMultiDrawElementArrayAPPLE(JNIEnv *env, jclass clazz, jint mode, jlong first, jlong count, jint primcount, jlong function_pointer) { + const GLint *first_address = (const GLint *)(intptr_t)first; + const GLsizei *count_address = (const GLsizei *)(intptr_t)count; + glMultiDrawElementArrayAPPLEPROC glMultiDrawElementArrayAPPLE = (glMultiDrawElementArrayAPPLEPROC)((intptr_t)function_pointer); + glMultiDrawElementArrayAPPLE(mode, first_address, count_address, primcount); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_APPLEElementArray_nglMultiDrawRangeElementArrayAPPLE(JNIEnv *env, jclass clazz, jint mode, jint start, jint end, jlong first, jlong count, jint primcount, jlong function_pointer) { + const GLint *first_address = (const GLint *)(intptr_t)first; + const GLsizei *count_address = (const GLsizei *)(intptr_t)count; + glMultiDrawRangeElementArrayAPPLEPROC glMultiDrawRangeElementArrayAPPLE = (glMultiDrawRangeElementArrayAPPLEPROC)((intptr_t)function_pointer); + glMultiDrawRangeElementArrayAPPLE(mode, start, end, first_address, count_address, primcount); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_APPLEFence.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_APPLEFence.c new file mode 100644 index 0000000..bf8381a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_APPLEFence.c @@ -0,0 +1,59 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glGenFencesAPPLEPROC) (GLsizei n, GLuint * fences); +typedef void (APIENTRY *glDeleteFencesAPPLEPROC) (GLsizei n, const GLuint * fences); +typedef void (APIENTRY *glSetFenceAPPLEPROC) (GLuint fence); +typedef GLboolean (APIENTRY *glIsFenceAPPLEPROC) (GLuint fence); +typedef GLboolean (APIENTRY *glTestFenceAPPLEPROC) (GLuint fence); +typedef void (APIENTRY *glFinishFenceAPPLEPROC) (GLuint fence); +typedef GLboolean (APIENTRY *glTestObjectAPPLEPROC) (GLenum object, GLuint name); +typedef void (APIENTRY *glFinishObjectAPPLEPROC) (GLenum object, GLint name); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_APPLEFence_nglGenFencesAPPLE(JNIEnv *env, jclass clazz, jint n, jlong fences, jlong function_pointer) { + GLuint *fences_address = (GLuint *)(intptr_t)fences; + glGenFencesAPPLEPROC glGenFencesAPPLE = (glGenFencesAPPLEPROC)((intptr_t)function_pointer); + glGenFencesAPPLE(n, fences_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_APPLEFence_nglDeleteFencesAPPLE(JNIEnv *env, jclass clazz, jint n, jlong fences, jlong function_pointer) { + const GLuint *fences_address = (const GLuint *)(intptr_t)fences; + glDeleteFencesAPPLEPROC glDeleteFencesAPPLE = (glDeleteFencesAPPLEPROC)((intptr_t)function_pointer); + glDeleteFencesAPPLE(n, fences_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_APPLEFence_nglSetFenceAPPLE(JNIEnv *env, jclass clazz, jint fence, jlong function_pointer) { + glSetFenceAPPLEPROC glSetFenceAPPLE = (glSetFenceAPPLEPROC)((intptr_t)function_pointer); + glSetFenceAPPLE(fence); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_APPLEFence_nglIsFenceAPPLE(JNIEnv *env, jclass clazz, jint fence, jlong function_pointer) { + glIsFenceAPPLEPROC glIsFenceAPPLE = (glIsFenceAPPLEPROC)((intptr_t)function_pointer); + GLboolean __result = glIsFenceAPPLE(fence); + return __result; +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_APPLEFence_nglTestFenceAPPLE(JNIEnv *env, jclass clazz, jint fence, jlong function_pointer) { + glTestFenceAPPLEPROC glTestFenceAPPLE = (glTestFenceAPPLEPROC)((intptr_t)function_pointer); + GLboolean __result = glTestFenceAPPLE(fence); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_APPLEFence_nglFinishFenceAPPLE(JNIEnv *env, jclass clazz, jint fence, jlong function_pointer) { + glFinishFenceAPPLEPROC glFinishFenceAPPLE = (glFinishFenceAPPLEPROC)((intptr_t)function_pointer); + glFinishFenceAPPLE(fence); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_APPLEFence_nglTestObjectAPPLE(JNIEnv *env, jclass clazz, jint object, jint name, jlong function_pointer) { + glTestObjectAPPLEPROC glTestObjectAPPLE = (glTestObjectAPPLEPROC)((intptr_t)function_pointer); + GLboolean __result = glTestObjectAPPLE(object, name); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_APPLEFence_nglFinishObjectAPPLE(JNIEnv *env, jclass clazz, jint object, jint name, jlong function_pointer) { + glFinishObjectAPPLEPROC glFinishObjectAPPLE = (glFinishObjectAPPLEPROC)((intptr_t)function_pointer); + glFinishObjectAPPLE(object, name); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_APPLEFlushBufferRange.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_APPLEFlushBufferRange.c new file mode 100644 index 0000000..5c0f527 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_APPLEFlushBufferRange.c @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glBufferParameteriAPPLEPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRY *glFlushMappedBufferRangeAPPLEPROC) (GLenum target, GLintptr offset, GLsizeiptr size); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_APPLEFlushBufferRange_nglBufferParameteriAPPLE(JNIEnv *env, jclass clazz, jint target, jint pname, jint param, jlong function_pointer) { + glBufferParameteriAPPLEPROC glBufferParameteriAPPLE = (glBufferParameteriAPPLEPROC)((intptr_t)function_pointer); + glBufferParameteriAPPLE(target, pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_APPLEFlushBufferRange_nglFlushMappedBufferRangeAPPLE(JNIEnv *env, jclass clazz, jint target, jlong offset, jlong size, jlong function_pointer) { + glFlushMappedBufferRangeAPPLEPROC glFlushMappedBufferRangeAPPLE = (glFlushMappedBufferRangeAPPLEPROC)((intptr_t)function_pointer); + glFlushMappedBufferRangeAPPLE(target, offset, size); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_APPLEObjectPurgeable.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_APPLEObjectPurgeable.c new file mode 100644 index 0000000..bbe0c47 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_APPLEObjectPurgeable.c @@ -0,0 +1,27 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GLenum (APIENTRY *glObjectPurgeableAPPLEPROC) (GLenum objectType, GLuint name, GLenum option); +typedef GLenum (APIENTRY *glObjectUnpurgeableAPPLEPROC) (GLenum objectType, GLuint name, GLenum option); +typedef void (APIENTRY *glGetObjectParameterivAPPLEPROC) (GLenum objectType, GLuint name, GLenum pname, GLint * params); + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_APPLEObjectPurgeable_nglObjectPurgeableAPPLE(JNIEnv *env, jclass clazz, jint objectType, jint name, jint option, jlong function_pointer) { + glObjectPurgeableAPPLEPROC glObjectPurgeableAPPLE = (glObjectPurgeableAPPLEPROC)((intptr_t)function_pointer); + GLenum __result = glObjectPurgeableAPPLE(objectType, name, option); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_APPLEObjectPurgeable_nglObjectUnpurgeableAPPLE(JNIEnv *env, jclass clazz, jint objectType, jint name, jint option, jlong function_pointer) { + glObjectUnpurgeableAPPLEPROC glObjectUnpurgeableAPPLE = (glObjectUnpurgeableAPPLEPROC)((intptr_t)function_pointer); + GLenum __result = glObjectUnpurgeableAPPLE(objectType, name, option); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_APPLEObjectPurgeable_nglGetObjectParameterivAPPLE(JNIEnv *env, jclass clazz, jint objectType, jint name, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetObjectParameterivAPPLEPROC glGetObjectParameterivAPPLE = (glGetObjectParameterivAPPLEPROC)((intptr_t)function_pointer); + glGetObjectParameterivAPPLE(objectType, name, pname, params_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_APPLETextureRange.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_APPLETextureRange.c new file mode 100644 index 0000000..fcac8d6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_APPLETextureRange.c @@ -0,0 +1,21 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glTextureRangeAPPLEPROC) (GLenum target, GLsizei length, GLvoid * pointer); +typedef void (APIENTRY *glGetTexParameterPointervAPPLEPROC) (GLenum target, GLenum pname, GLvoid ** params); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_APPLETextureRange_nglTextureRangeAPPLE(JNIEnv *env, jclass clazz, jint target, jint length, jlong pointer, jlong function_pointer) { + GLvoid *pointer_address = (GLvoid *)(intptr_t)pointer; + glTextureRangeAPPLEPROC glTextureRangeAPPLE = (glTextureRangeAPPLEPROC)((intptr_t)function_pointer); + glTextureRangeAPPLE(target, length, pointer_address); +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_APPLETextureRange_nglGetTexParameterPointervAPPLE(JNIEnv *env, jclass clazz, jint target, jint pname, jlong result_size, jlong function_pointer) { + glGetTexParameterPointervAPPLEPROC glGetTexParameterPointervAPPLE = (glGetTexParameterPointervAPPLEPROC)((intptr_t)function_pointer); + GLvoid * __result; + glGetTexParameterPointervAPPLE(target, pname, &__result); + return safeNewBuffer(env, __result, result_size); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_APPLEVertexArrayObject.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_APPLEVertexArrayObject.c new file mode 100644 index 0000000..51eb9ad --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_APPLEVertexArrayObject.c @@ -0,0 +1,33 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glBindVertexArrayAPPLEPROC) (GLuint array); +typedef void (APIENTRY *glDeleteVertexArraysAPPLEPROC) (GLsizei n, const GLuint * arrays); +typedef void (APIENTRY *glGenVertexArraysAPPLEPROC) (GLsizei n, GLuint * arrays); +typedef GLboolean (APIENTRY *glIsVertexArrayAPPLEPROC) (GLuint array); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_APPLEVertexArrayObject_nglBindVertexArrayAPPLE(JNIEnv *env, jclass clazz, jint array, jlong function_pointer) { + glBindVertexArrayAPPLEPROC glBindVertexArrayAPPLE = (glBindVertexArrayAPPLEPROC)((intptr_t)function_pointer); + glBindVertexArrayAPPLE(array); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_APPLEVertexArrayObject_nglDeleteVertexArraysAPPLE(JNIEnv *env, jclass clazz, jint n, jlong arrays, jlong function_pointer) { + const GLuint *arrays_address = (const GLuint *)(intptr_t)arrays; + glDeleteVertexArraysAPPLEPROC glDeleteVertexArraysAPPLE = (glDeleteVertexArraysAPPLEPROC)((intptr_t)function_pointer); + glDeleteVertexArraysAPPLE(n, arrays_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_APPLEVertexArrayObject_nglGenVertexArraysAPPLE(JNIEnv *env, jclass clazz, jint n, jlong arrays, jlong function_pointer) { + GLuint *arrays_address = (GLuint *)(intptr_t)arrays; + glGenVertexArraysAPPLEPROC glGenVertexArraysAPPLE = (glGenVertexArraysAPPLEPROC)((intptr_t)function_pointer); + glGenVertexArraysAPPLE(n, arrays_address); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_APPLEVertexArrayObject_nglIsVertexArrayAPPLE(JNIEnv *env, jclass clazz, jint array, jlong function_pointer) { + glIsVertexArrayAPPLEPROC glIsVertexArrayAPPLE = (glIsVertexArrayAPPLEPROC)((intptr_t)function_pointer); + GLboolean __result = glIsVertexArrayAPPLE(array); + return __result; +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_APPLEVertexArrayRange.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_APPLEVertexArrayRange.c new file mode 100644 index 0000000..b791f03 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_APPLEVertexArrayRange.c @@ -0,0 +1,26 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glVertexArrayRangeAPPLEPROC) (GLsizei length, GLvoid * pointer); +typedef void (APIENTRY *glFlushVertexArrayRangeAPPLEPROC) (GLsizei length, GLvoid * pointer); +typedef void (APIENTRY *glVertexArrayParameteriAPPLEPROC) (GLenum pname, GLint param); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_APPLEVertexArrayRange_nglVertexArrayRangeAPPLE(JNIEnv *env, jclass clazz, jint length, jlong pointer, jlong function_pointer) { + GLvoid *pointer_address = (GLvoid *)(intptr_t)pointer; + glVertexArrayRangeAPPLEPROC glVertexArrayRangeAPPLE = (glVertexArrayRangeAPPLEPROC)((intptr_t)function_pointer); + glVertexArrayRangeAPPLE(length, pointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_APPLEVertexArrayRange_nglFlushVertexArrayRangeAPPLE(JNIEnv *env, jclass clazz, jint length, jlong pointer, jlong function_pointer) { + GLvoid *pointer_address = (GLvoid *)(intptr_t)pointer; + glFlushVertexArrayRangeAPPLEPROC glFlushVertexArrayRangeAPPLE = (glFlushVertexArrayRangeAPPLEPROC)((intptr_t)function_pointer); + glFlushVertexArrayRangeAPPLE(length, pointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_APPLEVertexArrayRange_nglVertexArrayParameteriAPPLE(JNIEnv *env, jclass clazz, jint pname, jint param, jlong function_pointer) { + glVertexArrayParameteriAPPLEPROC glVertexArrayParameteriAPPLE = (glVertexArrayParameteriAPPLEPROC)((intptr_t)function_pointer); + glVertexArrayParameteriAPPLE(pname, param); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_APPLEVertexProgramEvaluators.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_APPLEVertexProgramEvaluators.c new file mode 100644 index 0000000..bc8910b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_APPLEVertexProgramEvaluators.c @@ -0,0 +1,53 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glEnableVertexAttribAPPLEPROC) (GLuint index, GLenum pname); +typedef void (APIENTRY *glDisableVertexAttribAPPLEPROC) (GLuint index, GLenum pname); +typedef GLboolean (APIENTRY *glIsVertexAttribEnabledAPPLEPROC) (GLuint index, GLenum pname); +typedef void (APIENTRY *glMapVertexAttrib1dAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble * points); +typedef void (APIENTRY *glMapVertexAttrib1fAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat * points); +typedef void (APIENTRY *glMapVertexAttrib2dAPPLEPROC) (GLuint index, GLuint size, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble * points); +typedef void (APIENTRY *glMapVertexAttrib2fAPPLEPROC) (GLuint index, GLuint size, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat * points); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_APPLEVertexProgramEvaluators_nglEnableVertexAttribAPPLE(JNIEnv *env, jclass clazz, jint index, jint pname, jlong function_pointer) { + glEnableVertexAttribAPPLEPROC glEnableVertexAttribAPPLE = (glEnableVertexAttribAPPLEPROC)((intptr_t)function_pointer); + glEnableVertexAttribAPPLE(index, pname); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_APPLEVertexProgramEvaluators_nglDisableVertexAttribAPPLE(JNIEnv *env, jclass clazz, jint index, jint pname, jlong function_pointer) { + glDisableVertexAttribAPPLEPROC glDisableVertexAttribAPPLE = (glDisableVertexAttribAPPLEPROC)((intptr_t)function_pointer); + glDisableVertexAttribAPPLE(index, pname); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_APPLEVertexProgramEvaluators_nglIsVertexAttribEnabledAPPLE(JNIEnv *env, jclass clazz, jint index, jint pname, jlong function_pointer) { + glIsVertexAttribEnabledAPPLEPROC glIsVertexAttribEnabledAPPLE = (glIsVertexAttribEnabledAPPLEPROC)((intptr_t)function_pointer); + GLboolean __result = glIsVertexAttribEnabledAPPLE(index, pname); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_APPLEVertexProgramEvaluators_nglMapVertexAttrib1dAPPLE(JNIEnv *env, jclass clazz, jint index, jint size, jdouble u1, jdouble u2, jint stride, jint order, jlong points, jlong function_pointer) { + const GLdouble *points_address = (const GLdouble *)(intptr_t)points; + glMapVertexAttrib1dAPPLEPROC glMapVertexAttrib1dAPPLE = (glMapVertexAttrib1dAPPLEPROC)((intptr_t)function_pointer); + glMapVertexAttrib1dAPPLE(index, size, u1, u2, stride, order, points_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_APPLEVertexProgramEvaluators_nglMapVertexAttrib1fAPPLE(JNIEnv *env, jclass clazz, jint index, jint size, jfloat u1, jfloat u2, jint stride, jint order, jlong points, jlong function_pointer) { + const GLfloat *points_address = (const GLfloat *)(intptr_t)points; + glMapVertexAttrib1fAPPLEPROC glMapVertexAttrib1fAPPLE = (glMapVertexAttrib1fAPPLEPROC)((intptr_t)function_pointer); + glMapVertexAttrib1fAPPLE(index, size, u1, u2, stride, order, points_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_APPLEVertexProgramEvaluators_nglMapVertexAttrib2dAPPLE(JNIEnv *env, jclass clazz, jint index, jint size, jdouble u1, jdouble u2, jint ustride, jint uorder, jdouble v1, jdouble v2, jint vstride, jint vorder, jlong points, jlong function_pointer) { + const GLdouble *points_address = (const GLdouble *)(intptr_t)points; + glMapVertexAttrib2dAPPLEPROC glMapVertexAttrib2dAPPLE = (glMapVertexAttrib2dAPPLEPROC)((intptr_t)function_pointer); + glMapVertexAttrib2dAPPLE(index, size, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_APPLEVertexProgramEvaluators_nglMapVertexAttrib2fAPPLE(JNIEnv *env, jclass clazz, jint index, jint size, jfloat u1, jfloat u2, jint ustride, jint uorder, jfloat v1, jfloat v2, jint vstride, jint vorder, jlong points, jlong function_pointer) { + const GLfloat *points_address = (const GLfloat *)(intptr_t)points; + glMapVertexAttrib2fAPPLEPROC glMapVertexAttrib2fAPPLE = (glMapVertexAttrib2fAPPLEPROC)((intptr_t)function_pointer); + glMapVertexAttrib2fAPPLE(index, size, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBBindlessTexture.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBBindlessTexture.c new file mode 100644 index 0000000..968ebf3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBBindlessTexture.c @@ -0,0 +1,111 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GLuint64 (APIENTRY *glGetTextureHandleARBPROC) (GLuint texture); +typedef GLuint64 (APIENTRY *glGetTextureSamplerHandleARBPROC) (GLuint texture, GLuint sampler); +typedef void (APIENTRY *glMakeTextureHandleResidentARBPROC) (GLuint64 handle); +typedef void (APIENTRY *glMakeTextureHandleNonResidentARBPROC) (GLuint64 handle); +typedef GLuint64 (APIENTRY *glGetImageHandleARBPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); +typedef void (APIENTRY *glMakeImageHandleResidentARBPROC) (GLuint64 handle, GLenum access); +typedef void (APIENTRY *glMakeImageHandleNonResidentARBPROC) (GLuint64 handle); +typedef void (APIENTRY *glUniformHandleui64ARBPROC) (GLint location, GLuint64 value); +typedef void (APIENTRY *glUniformHandleui64vARBPROC) (GLint location, GLsizei count, const GLuint64 * value); +typedef void (APIENTRY *glProgramUniformHandleui64ARBPROC) (GLuint program, GLint location, GLuint64 value); +typedef void (APIENTRY *glProgramUniformHandleui64vARBPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 * values); +typedef GLboolean (APIENTRY *glIsTextureHandleResidentARBPROC) (GLuint64 handle); +typedef GLboolean (APIENTRY *glIsImageHandleResidentARBPROC) (GLuint64 handle); +typedef void (APIENTRY *glVertexAttribL1ui64ARBPROC) (GLuint index, GLuint64EXT x); +typedef void (APIENTRY *glVertexAttribL1ui64vARBPROC) (GLuint index, const GLuint64EXT * v); +typedef void (APIENTRY *glGetVertexAttribLui64vARBPROC) (GLuint index, GLenum pname, GLuint64EXT * params); + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_nglGetTextureHandleARB(JNIEnv *env, jclass clazz, jint texture, jlong function_pointer) { + glGetTextureHandleARBPROC glGetTextureHandleARB = (glGetTextureHandleARBPROC)((intptr_t)function_pointer); + GLuint64 __result = glGetTextureHandleARB(texture); + return __result; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_nglGetTextureSamplerHandleARB(JNIEnv *env, jclass clazz, jint texture, jint sampler, jlong function_pointer) { + glGetTextureSamplerHandleARBPROC glGetTextureSamplerHandleARB = (glGetTextureSamplerHandleARBPROC)((intptr_t)function_pointer); + GLuint64 __result = glGetTextureSamplerHandleARB(texture, sampler); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_nglMakeTextureHandleResidentARB(JNIEnv *env, jclass clazz, jlong handle, jlong function_pointer) { + glMakeTextureHandleResidentARBPROC glMakeTextureHandleResidentARB = (glMakeTextureHandleResidentARBPROC)((intptr_t)function_pointer); + glMakeTextureHandleResidentARB(handle); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_nglMakeTextureHandleNonResidentARB(JNIEnv *env, jclass clazz, jlong handle, jlong function_pointer) { + glMakeTextureHandleNonResidentARBPROC glMakeTextureHandleNonResidentARB = (glMakeTextureHandleNonResidentARBPROC)((intptr_t)function_pointer); + glMakeTextureHandleNonResidentARB(handle); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_nglGetImageHandleARB(JNIEnv *env, jclass clazz, jint texture, jint level, jboolean layered, jint layer, jint format, jlong function_pointer) { + glGetImageHandleARBPROC glGetImageHandleARB = (glGetImageHandleARBPROC)((intptr_t)function_pointer); + GLuint64 __result = glGetImageHandleARB(texture, level, layered, layer, format); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_nglMakeImageHandleResidentARB(JNIEnv *env, jclass clazz, jlong handle, jint access, jlong function_pointer) { + glMakeImageHandleResidentARBPROC glMakeImageHandleResidentARB = (glMakeImageHandleResidentARBPROC)((intptr_t)function_pointer); + glMakeImageHandleResidentARB(handle, access); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_nglMakeImageHandleNonResidentARB(JNIEnv *env, jclass clazz, jlong handle, jlong function_pointer) { + glMakeImageHandleNonResidentARBPROC glMakeImageHandleNonResidentARB = (glMakeImageHandleNonResidentARBPROC)((intptr_t)function_pointer); + glMakeImageHandleNonResidentARB(handle); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_nglUniformHandleui64ARB(JNIEnv *env, jclass clazz, jint location, jlong value, jlong function_pointer) { + glUniformHandleui64ARBPROC glUniformHandleui64ARB = (glUniformHandleui64ARBPROC)((intptr_t)function_pointer); + glUniformHandleui64ARB(location, value); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_nglUniformHandleui64vARB(JNIEnv *env, jclass clazz, jint location, jint count, jlong value, jlong function_pointer) { + const GLuint64 *value_address = (const GLuint64 *)(intptr_t)value; + glUniformHandleui64vARBPROC glUniformHandleui64vARB = (glUniformHandleui64vARBPROC)((intptr_t)function_pointer); + glUniformHandleui64vARB(location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_nglProgramUniformHandleui64ARB(JNIEnv *env, jclass clazz, jint program, jint location, jlong value, jlong function_pointer) { + glProgramUniformHandleui64ARBPROC glProgramUniformHandleui64ARB = (glProgramUniformHandleui64ARBPROC)((intptr_t)function_pointer); + glProgramUniformHandleui64ARB(program, location, value); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_nglProgramUniformHandleui64vARB(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong values, jlong function_pointer) { + const GLuint64 *values_address = (const GLuint64 *)(intptr_t)values; + glProgramUniformHandleui64vARBPROC glProgramUniformHandleui64vARB = (glProgramUniformHandleui64vARBPROC)((intptr_t)function_pointer); + glProgramUniformHandleui64vARB(program, location, count, values_address); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_nglIsTextureHandleResidentARB(JNIEnv *env, jclass clazz, jlong handle, jlong function_pointer) { + glIsTextureHandleResidentARBPROC glIsTextureHandleResidentARB = (glIsTextureHandleResidentARBPROC)((intptr_t)function_pointer); + GLboolean __result = glIsTextureHandleResidentARB(handle); + return __result; +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_nglIsImageHandleResidentARB(JNIEnv *env, jclass clazz, jlong handle, jlong function_pointer) { + glIsImageHandleResidentARBPROC glIsImageHandleResidentARB = (glIsImageHandleResidentARBPROC)((intptr_t)function_pointer); + GLboolean __result = glIsImageHandleResidentARB(handle); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_nglVertexAttribL1ui64ARB(JNIEnv *env, jclass clazz, jint index, jlong x, jlong function_pointer) { + glVertexAttribL1ui64ARBPROC glVertexAttribL1ui64ARB = (glVertexAttribL1ui64ARBPROC)((intptr_t)function_pointer); + glVertexAttribL1ui64ARB(index, x); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_nglVertexAttribL1ui64vARB(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLuint64EXT *v_address = (const GLuint64EXT *)(intptr_t)v; + glVertexAttribL1ui64vARBPROC glVertexAttribL1ui64vARB = (glVertexAttribL1ui64vARBPROC)((intptr_t)function_pointer); + glVertexAttribL1ui64vARB(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBindlessTexture_nglGetVertexAttribLui64vARB(JNIEnv *env, jclass clazz, jint index, jint pname, jlong params, jlong function_pointer) { + GLuint64EXT *params_address = (GLuint64EXT *)(intptr_t)params; + glGetVertexAttribLui64vARBPROC glGetVertexAttribLui64vARB = (glGetVertexAttribLui64vARBPROC)((intptr_t)function_pointer); + glGetVertexAttribLui64vARB(index, pname, params_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBBufferObject.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBBufferObject.c new file mode 100644 index 0000000..e90df4d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBBufferObject.c @@ -0,0 +1,83 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glBindBufferARBPROC) (GLenum target, GLuint buffer); +typedef void (APIENTRY *glDeleteBuffersARBPROC) (GLsizei n, const GLuint * buffers); +typedef void (APIENTRY *glGenBuffersARBPROC) (GLsizei n, GLuint * buffers); +typedef GLboolean (APIENTRY *glIsBufferARBPROC) (GLuint buffer); +typedef void (APIENTRY *glBufferDataARBPROC) (GLenum target, GLsizeiptrARB size, const GLvoid * data, GLenum usage); +typedef void (APIENTRY *glBufferSubDataARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid * data); +typedef void (APIENTRY *glGetBufferSubDataARBPROC) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid * data); +typedef GLvoid * (APIENTRY *glMapBufferARBPROC) (GLenum target, GLenum access); +typedef GLboolean (APIENTRY *glUnmapBufferARBPROC) (GLenum target); +typedef void (APIENTRY *glGetBufferParameterivARBPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetBufferPointervARBPROC) (GLenum target, GLenum pname, GLvoid ** pointer); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBufferObject_nglBindBufferARB(JNIEnv *env, jclass clazz, jint target, jint buffer, jlong function_pointer) { + glBindBufferARBPROC glBindBufferARB = (glBindBufferARBPROC)((intptr_t)function_pointer); + glBindBufferARB(target, buffer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBufferObject_nglDeleteBuffersARB(JNIEnv *env, jclass clazz, jint n, jlong buffers, jlong function_pointer) { + const GLuint *buffers_address = (const GLuint *)(intptr_t)buffers; + glDeleteBuffersARBPROC glDeleteBuffersARB = (glDeleteBuffersARBPROC)((intptr_t)function_pointer); + glDeleteBuffersARB(n, buffers_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBufferObject_nglGenBuffersARB(JNIEnv *env, jclass clazz, jint n, jlong buffers, jlong function_pointer) { + GLuint *buffers_address = (GLuint *)(intptr_t)buffers; + glGenBuffersARBPROC glGenBuffersARB = (glGenBuffersARBPROC)((intptr_t)function_pointer); + glGenBuffersARB(n, buffers_address); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_ARBBufferObject_nglIsBufferARB(JNIEnv *env, jclass clazz, jint buffer, jlong function_pointer) { + glIsBufferARBPROC glIsBufferARB = (glIsBufferARBPROC)((intptr_t)function_pointer); + GLboolean __result = glIsBufferARB(buffer); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBufferObject_nglBufferDataARB(JNIEnv *env, jclass clazz, jint target, jlong size, jlong data, jint usage, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glBufferDataARBPROC glBufferDataARB = (glBufferDataARBPROC)((intptr_t)function_pointer); + glBufferDataARB(target, size, data_address, usage); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBufferObject_nglBufferSubDataARB(JNIEnv *env, jclass clazz, jint target, jlong offset, jlong size, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glBufferSubDataARBPROC glBufferSubDataARB = (glBufferSubDataARBPROC)((intptr_t)function_pointer); + glBufferSubDataARB(target, offset, size, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBufferObject_nglGetBufferSubDataARB(JNIEnv *env, jclass clazz, jint target, jlong offset, jlong size, jlong data, jlong function_pointer) { + GLvoid *data_address = (GLvoid *)(intptr_t)data; + glGetBufferSubDataARBPROC glGetBufferSubDataARB = (glGetBufferSubDataARBPROC)((intptr_t)function_pointer); + glGetBufferSubDataARB(target, offset, size, data_address); +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_ARBBufferObject_nglMapBufferARB(JNIEnv *env, jclass clazz, jint target, jint access, jlong result_size, jobject old_buffer, jlong function_pointer) { + glMapBufferARBPROC glMapBufferARB = (glMapBufferARBPROC)((intptr_t)function_pointer); + GLvoid * __result = glMapBufferARB(target, access); + return safeNewBufferCached(env, __result, result_size, old_buffer); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_ARBBufferObject_nglUnmapBufferARB(JNIEnv *env, jclass clazz, jint target, jlong function_pointer) { + glUnmapBufferARBPROC glUnmapBufferARB = (glUnmapBufferARBPROC)((intptr_t)function_pointer); + GLboolean __result = glUnmapBufferARB(target); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBufferObject_nglGetBufferParameterivARB(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetBufferParameterivARBPROC glGetBufferParameterivARB = (glGetBufferParameterivARBPROC)((intptr_t)function_pointer); + glGetBufferParameterivARB(target, pname, params_address); +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_ARBBufferObject_nglGetBufferPointervARB(JNIEnv *env, jclass clazz, jint target, jint pname, jlong result_size, jlong function_pointer) { + glGetBufferPointervARBPROC glGetBufferPointervARB = (glGetBufferPointervARBPROC)((intptr_t)function_pointer); + GLvoid * __result; + glGetBufferPointervARB(target, pname, &__result); + return safeNewBuffer(env, __result, result_size); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBBufferStorage.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBBufferStorage.c new file mode 100644 index 0000000..959f23b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBBufferStorage.c @@ -0,0 +1,13 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glNamedBufferStorageEXTPROC) (GLuint buffer, GLsizeiptr size, const GLvoid * data, GLbitfield flags); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBBufferStorage_nglNamedBufferStorageEXT(JNIEnv *env, jclass clazz, jint buffer, jlong size, jlong data, jint flags, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glNamedBufferStorageEXTPROC glNamedBufferStorageEXT = (glNamedBufferStorageEXTPROC)((intptr_t)function_pointer); + glNamedBufferStorageEXT(buffer, size, data_address, flags); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBCLEvent.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBCLEvent.c new file mode 100644 index 0000000..d071e9a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBCLEvent.c @@ -0,0 +1,13 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GLsync (APIENTRY *glCreateSyncFromCLeventARBPROC) (cl_context context, cl_event event, GLbitfield flags); + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_ARBCLEvent_nglCreateSyncFromCLeventARB(JNIEnv *env, jclass clazz, jlong context, jlong event, jint flags, jlong function_pointer) { + glCreateSyncFromCLeventARBPROC glCreateSyncFromCLeventARB = (glCreateSyncFromCLeventARBPROC)((intptr_t)function_pointer); + GLsync __result = glCreateSyncFromCLeventARB((cl_context)(intptr_t)context, (cl_event)(intptr_t)event, flags); + return (intptr_t)__result; +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBClearBufferObject.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBClearBufferObject.c new file mode 100644 index 0000000..2250d94 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBClearBufferObject.c @@ -0,0 +1,20 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glClearNamedBufferDataEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const GLvoid * data); +typedef void (APIENTRY *glClearNamedBufferSubDataEXTPROC) (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const GLvoid * data); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBClearBufferObject_nglClearNamedBufferDataEXT(JNIEnv *env, jclass clazz, jint buffer, jint internalformat, jint format, jint type, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glClearNamedBufferDataEXTPROC glClearNamedBufferDataEXT = (glClearNamedBufferDataEXTPROC)((intptr_t)function_pointer); + glClearNamedBufferDataEXT(buffer, internalformat, format, type, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBClearBufferObject_nglClearNamedBufferSubDataEXT(JNIEnv *env, jclass clazz, jint buffer, jint internalformat, jlong offset, jlong size, jint format, jint type, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glClearNamedBufferSubDataEXTPROC glClearNamedBufferSubDataEXT = (glClearNamedBufferSubDataEXTPROC)((intptr_t)function_pointer); + glClearNamedBufferSubDataEXT(buffer, internalformat, offset, size, format, type, data_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBColorBufferFloat.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBColorBufferFloat.c new file mode 100644 index 0000000..9f781ce --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBColorBufferFloat.c @@ -0,0 +1,12 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glClampColorARBPROC) (GLenum target, GLenum clamp); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBColorBufferFloat_nglClampColorARB(JNIEnv *env, jclass clazz, jint target, jint clamp, jlong function_pointer) { + glClampColorARBPROC glClampColorARB = (glClampColorARBPROC)((intptr_t)function_pointer); + glClampColorARB(target, clamp); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBComputeVariableGroupSize.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBComputeVariableGroupSize.c new file mode 100644 index 0000000..38769f0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBComputeVariableGroupSize.c @@ -0,0 +1,12 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glDispatchComputeGroupSizeARBPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z, GLuint group_size_x, GLuint group_size_y, GLuint group_size_z); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBComputeVariableGroupSize_nglDispatchComputeGroupSizeARB(JNIEnv *env, jclass clazz, jint num_groups_x, jint num_groups_y, jint num_groups_z, jint group_size_x, jint group_size_y, jint group_size_z, jlong function_pointer) { + glDispatchComputeGroupSizeARBPROC glDispatchComputeGroupSizeARB = (glDispatchComputeGroupSizeARBPROC)((intptr_t)function_pointer); + glDispatchComputeGroupSizeARB(num_groups_x, num_groups_y, num_groups_z, group_size_x, group_size_y, group_size_z); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBDebugOutput.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBDebugOutput.c new file mode 100644 index 0000000..ad31202 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBDebugOutput.c @@ -0,0 +1,39 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glDebugMessageControlARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint * ids, GLboolean enabled); +typedef void (APIENTRY *glDebugMessageInsertARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf); +typedef void (APIENTRY *glDebugMessageCallbackARBPROC) (GLDEBUGPROCARB callback, GLvoid * userParam); +typedef GLuint (APIENTRY *glGetDebugMessageLogARBPROC) (GLuint count, GLsizei logSize, GLenum * sources, GLenum * types, GLuint * ids, GLenum * severities, GLsizei * lengths, GLchar * messageLog); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBDebugOutput_nglDebugMessageControlARB(JNIEnv *env, jclass clazz, jint source, jint type, jint severity, jint count, jlong ids, jboolean enabled, jlong function_pointer) { + const GLuint *ids_address = (const GLuint *)(intptr_t)ids; + glDebugMessageControlARBPROC glDebugMessageControlARB = (glDebugMessageControlARBPROC)((intptr_t)function_pointer); + glDebugMessageControlARB(source, type, severity, count, ids_address, enabled); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBDebugOutput_nglDebugMessageInsertARB(JNIEnv *env, jclass clazz, jint source, jint type, jint id, jint severity, jint length, jlong buf, jlong function_pointer) { + const GLchar *buf_address = (const GLchar *)(intptr_t)buf; + glDebugMessageInsertARBPROC glDebugMessageInsertARB = (glDebugMessageInsertARBPROC)((intptr_t)function_pointer); + glDebugMessageInsertARB(source, type, id, severity, length, buf_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBDebugOutput_nglDebugMessageCallbackARB(JNIEnv *env, jclass clazz, jlong callback, jlong userParam, jlong function_pointer) { + glDebugMessageCallbackARBPROC glDebugMessageCallbackARB = (glDebugMessageCallbackARBPROC)((intptr_t)function_pointer); + glDebugMessageCallbackARB((GLDEBUGPROCARB)(intptr_t)callback, (GLvoid *)(intptr_t)userParam); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_ARBDebugOutput_nglGetDebugMessageLogARB(JNIEnv *env, jclass clazz, jint count, jint logSize, jlong sources, jlong types, jlong ids, jlong severities, jlong lengths, jlong messageLog, jlong function_pointer) { + GLenum *sources_address = (GLenum *)(intptr_t)sources; + GLenum *types_address = (GLenum *)(intptr_t)types; + GLuint *ids_address = (GLuint *)(intptr_t)ids; + GLenum *severities_address = (GLenum *)(intptr_t)severities; + GLsizei *lengths_address = (GLsizei *)(intptr_t)lengths; + GLchar *messageLog_address = (GLchar *)(intptr_t)messageLog; + glGetDebugMessageLogARBPROC glGetDebugMessageLogARB = (glGetDebugMessageLogARBPROC)((intptr_t)function_pointer); + GLuint __result = glGetDebugMessageLogARB(count, logSize, sources_address, types_address, ids_address, severities_address, lengths_address, messageLog_address); + return __result; +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBDrawBuffers.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBDrawBuffers.c new file mode 100644 index 0000000..2504445 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBDrawBuffers.c @@ -0,0 +1,13 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glDrawBuffersARBPROC) (GLsizei size, const GLenum * buffers); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBDrawBuffers_nglDrawBuffersARB(JNIEnv *env, jclass clazz, jint size, jlong buffers, jlong function_pointer) { + const GLenum *buffers_address = (const GLenum *)(intptr_t)buffers; + glDrawBuffersARBPROC glDrawBuffersARB = (glDrawBuffersARBPROC)((intptr_t)function_pointer); + glDrawBuffersARB(size, buffers_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBDrawBuffersBlend.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBDrawBuffersBlend.c new file mode 100644 index 0000000..64bff1e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBDrawBuffersBlend.c @@ -0,0 +1,30 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glBlendEquationiARBPROC) (GLuint buf, GLenum mode); +typedef void (APIENTRY *glBlendEquationSeparateiARBPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +typedef void (APIENTRY *glBlendFunciARBPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void (APIENTRY *glBlendFuncSeparateiARBPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBDrawBuffersBlend_nglBlendEquationiARB(JNIEnv *env, jclass clazz, jint buf, jint mode, jlong function_pointer) { + glBlendEquationiARBPROC glBlendEquationiARB = (glBlendEquationiARBPROC)((intptr_t)function_pointer); + glBlendEquationiARB(buf, mode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBDrawBuffersBlend_nglBlendEquationSeparateiARB(JNIEnv *env, jclass clazz, jint buf, jint modeRGB, jint modeAlpha, jlong function_pointer) { + glBlendEquationSeparateiARBPROC glBlendEquationSeparateiARB = (glBlendEquationSeparateiARBPROC)((intptr_t)function_pointer); + glBlendEquationSeparateiARB(buf, modeRGB, modeAlpha); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBDrawBuffersBlend_nglBlendFunciARB(JNIEnv *env, jclass clazz, jint buf, jint src, jint dst, jlong function_pointer) { + glBlendFunciARBPROC glBlendFunciARB = (glBlendFunciARBPROC)((intptr_t)function_pointer); + glBlendFunciARB(buf, src, dst); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBDrawBuffersBlend_nglBlendFuncSeparateiARB(JNIEnv *env, jclass clazz, jint buf, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha, jlong function_pointer) { + glBlendFuncSeparateiARBPROC glBlendFuncSeparateiARB = (glBlendFuncSeparateiARBPROC)((intptr_t)function_pointer); + glBlendFuncSeparateiARB(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBDrawInstanced.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBDrawInstanced.c new file mode 100644 index 0000000..f25c023 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBDrawInstanced.c @@ -0,0 +1,25 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glDrawArraysInstancedARBPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +typedef void (APIENTRY *glDrawElementsInstancedARBPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid * indices, GLsizei primcount); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBDrawInstanced_nglDrawArraysInstancedARB(JNIEnv *env, jclass clazz, jint mode, jint first, jint count, jint primcount, jlong function_pointer) { + glDrawArraysInstancedARBPROC glDrawArraysInstancedARB = (glDrawArraysInstancedARBPROC)((intptr_t)function_pointer); + glDrawArraysInstancedARB(mode, first, count, primcount); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBDrawInstanced_nglDrawElementsInstancedARB(JNIEnv *env, jclass clazz, jint mode, jint count, jint type, jlong indices, jint primcount, jlong function_pointer) { + const GLvoid *indices_address = (const GLvoid *)(intptr_t)indices; + glDrawElementsInstancedARBPROC glDrawElementsInstancedARB = (glDrawElementsInstancedARBPROC)((intptr_t)function_pointer); + glDrawElementsInstancedARB(mode, count, type, indices_address, primcount); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBDrawInstanced_nglDrawElementsInstancedARBBO(JNIEnv *env, jclass clazz, jint mode, jint count, jint type, jlong indices_buffer_offset, jint primcount, jlong function_pointer) { + const GLvoid *indices_address = (const GLvoid *)(intptr_t)offsetToPointer(indices_buffer_offset); + glDrawElementsInstancedARBPROC glDrawElementsInstancedARB = (glDrawElementsInstancedARBPROC)((intptr_t)function_pointer); + glDrawElementsInstancedARB(mode, count, type, indices_address, primcount); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBFramebufferNoAttachments.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBFramebufferNoAttachments.c new file mode 100644 index 0000000..e81b5fb --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBFramebufferNoAttachments.c @@ -0,0 +1,19 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glNamedFramebufferParameteriEXTPROC) (GLuint framebuffer, GLenum pname, GLint param); +typedef void (APIENTRY *glGetNamedFramebufferParameterivEXTPROC) (GLuint framebuffer, GLenum pname, GLint * params); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBFramebufferNoAttachments_nglNamedFramebufferParameteriEXT(JNIEnv *env, jclass clazz, jint framebuffer, jint pname, jint param, jlong function_pointer) { + glNamedFramebufferParameteriEXTPROC glNamedFramebufferParameteriEXT = (glNamedFramebufferParameteriEXTPROC)((intptr_t)function_pointer); + glNamedFramebufferParameteriEXT(framebuffer, pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBFramebufferNoAttachments_nglGetNamedFramebufferParameterivEXT(JNIEnv *env, jclass clazz, jint framebuffer, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetNamedFramebufferParameterivEXTPROC glGetNamedFramebufferParameterivEXT = (glGetNamedFramebufferParameterivEXTPROC)((intptr_t)function_pointer); + glGetNamedFramebufferParameterivEXT(framebuffer, pname, params_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBGeometryShader4.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBGeometryShader4.c new file mode 100644 index 0000000..50cfcd7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBGeometryShader4.c @@ -0,0 +1,30 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glProgramParameteriARBPROC) (GLuint program, GLenum pname, GLint value); +typedef void (APIENTRY *glFramebufferTextureARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +typedef void (APIENTRY *glFramebufferTextureLayerARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void (APIENTRY *glFramebufferTextureFaceARBPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGeometryShader4_nglProgramParameteriARB(JNIEnv *env, jclass clazz, jint program, jint pname, jint value, jlong function_pointer) { + glProgramParameteriARBPROC glProgramParameteriARB = (glProgramParameteriARBPROC)((intptr_t)function_pointer); + glProgramParameteriARB(program, pname, value); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGeometryShader4_nglFramebufferTextureARB(JNIEnv *env, jclass clazz, jint target, jint attachment, jint texture, jint level, jlong function_pointer) { + glFramebufferTextureARBPROC glFramebufferTextureARB = (glFramebufferTextureARBPROC)((intptr_t)function_pointer); + glFramebufferTextureARB(target, attachment, texture, level); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGeometryShader4_nglFramebufferTextureLayerARB(JNIEnv *env, jclass clazz, jint target, jint attachment, jint texture, jint level, jint layer, jlong function_pointer) { + glFramebufferTextureLayerARBPROC glFramebufferTextureLayerARB = (glFramebufferTextureLayerARBPROC)((intptr_t)function_pointer); + glFramebufferTextureLayerARB(target, attachment, texture, level, layer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGeometryShader4_nglFramebufferTextureFaceARB(JNIEnv *env, jclass clazz, jint target, jint attachment, jint texture, jint level, jint face, jlong function_pointer) { + glFramebufferTextureFaceARBPROC glFramebufferTextureFaceARB = (glFramebufferTextureFaceARBPROC)((intptr_t)function_pointer); + glFramebufferTextureFaceARB(target, attachment, texture, level, face); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBGpuShaderFp64.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBGpuShaderFp64.c new file mode 100644 index 0000000..29a57ed --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBGpuShaderFp64.c @@ -0,0 +1,121 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glProgramUniform1dEXTPROC) (GLuint program, GLint location, GLdouble x); +typedef void (APIENTRY *glProgramUniform2dEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y); +typedef void (APIENTRY *glProgramUniform3dEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRY *glProgramUniform4dEXTPROC) (GLuint program, GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRY *glProgramUniform1dvEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble * value); +typedef void (APIENTRY *glProgramUniform2dvEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble * value); +typedef void (APIENTRY *glProgramUniform3dvEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble * value); +typedef void (APIENTRY *glProgramUniform4dvEXTPROC) (GLuint program, GLint location, GLsizei count, const GLdouble * value); +typedef void (APIENTRY *glProgramUniformMatrix2dvEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (APIENTRY *glProgramUniformMatrix3dvEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (APIENTRY *glProgramUniformMatrix4dvEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (APIENTRY *glProgramUniformMatrix2x3dvEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (APIENTRY *glProgramUniformMatrix2x4dvEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (APIENTRY *glProgramUniformMatrix3x2dvEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (APIENTRY *glProgramUniformMatrix3x4dvEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (APIENTRY *glProgramUniformMatrix4x2dvEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (APIENTRY *glProgramUniformMatrix4x3dvEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGpuShaderFp64_nglProgramUniform1dEXT(JNIEnv *env, jclass clazz, jint program, jint location, jdouble x, jlong function_pointer) { + glProgramUniform1dEXTPROC glProgramUniform1dEXT = (glProgramUniform1dEXTPROC)((intptr_t)function_pointer); + glProgramUniform1dEXT(program, location, x); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGpuShaderFp64_nglProgramUniform2dEXT(JNIEnv *env, jclass clazz, jint program, jint location, jdouble x, jdouble y, jlong function_pointer) { + glProgramUniform2dEXTPROC glProgramUniform2dEXT = (glProgramUniform2dEXTPROC)((intptr_t)function_pointer); + glProgramUniform2dEXT(program, location, x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGpuShaderFp64_nglProgramUniform3dEXT(JNIEnv *env, jclass clazz, jint program, jint location, jdouble x, jdouble y, jdouble z, jlong function_pointer) { + glProgramUniform3dEXTPROC glProgramUniform3dEXT = (glProgramUniform3dEXTPROC)((intptr_t)function_pointer); + glProgramUniform3dEXT(program, location, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGpuShaderFp64_nglProgramUniform4dEXT(JNIEnv *env, jclass clazz, jint program, jint location, jdouble x, jdouble y, jdouble z, jdouble w, jlong function_pointer) { + glProgramUniform4dEXTPROC glProgramUniform4dEXT = (glProgramUniform4dEXTPROC)((intptr_t)function_pointer); + glProgramUniform4dEXT(program, location, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGpuShaderFp64_nglProgramUniform1dvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glProgramUniform1dvEXTPROC glProgramUniform1dvEXT = (glProgramUniform1dvEXTPROC)((intptr_t)function_pointer); + glProgramUniform1dvEXT(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGpuShaderFp64_nglProgramUniform2dvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glProgramUniform2dvEXTPROC glProgramUniform2dvEXT = (glProgramUniform2dvEXTPROC)((intptr_t)function_pointer); + glProgramUniform2dvEXT(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGpuShaderFp64_nglProgramUniform3dvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glProgramUniform3dvEXTPROC glProgramUniform3dvEXT = (glProgramUniform3dvEXTPROC)((intptr_t)function_pointer); + glProgramUniform3dvEXT(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGpuShaderFp64_nglProgramUniform4dvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glProgramUniform4dvEXTPROC glProgramUniform4dvEXT = (glProgramUniform4dvEXTPROC)((intptr_t)function_pointer); + glProgramUniform4dvEXT(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGpuShaderFp64_nglProgramUniformMatrix2dvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glProgramUniformMatrix2dvEXTPROC glProgramUniformMatrix2dvEXT = (glProgramUniformMatrix2dvEXTPROC)((intptr_t)function_pointer); + glProgramUniformMatrix2dvEXT(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGpuShaderFp64_nglProgramUniformMatrix3dvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glProgramUniformMatrix3dvEXTPROC glProgramUniformMatrix3dvEXT = (glProgramUniformMatrix3dvEXTPROC)((intptr_t)function_pointer); + glProgramUniformMatrix3dvEXT(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGpuShaderFp64_nglProgramUniformMatrix4dvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glProgramUniformMatrix4dvEXTPROC glProgramUniformMatrix4dvEXT = (glProgramUniformMatrix4dvEXTPROC)((intptr_t)function_pointer); + glProgramUniformMatrix4dvEXT(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGpuShaderFp64_nglProgramUniformMatrix2x3dvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glProgramUniformMatrix2x3dvEXTPROC glProgramUniformMatrix2x3dvEXT = (glProgramUniformMatrix2x3dvEXTPROC)((intptr_t)function_pointer); + glProgramUniformMatrix2x3dvEXT(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGpuShaderFp64_nglProgramUniformMatrix2x4dvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glProgramUniformMatrix2x4dvEXTPROC glProgramUniformMatrix2x4dvEXT = (glProgramUniformMatrix2x4dvEXTPROC)((intptr_t)function_pointer); + glProgramUniformMatrix2x4dvEXT(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGpuShaderFp64_nglProgramUniformMatrix3x2dvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glProgramUniformMatrix3x2dvEXTPROC glProgramUniformMatrix3x2dvEXT = (glProgramUniformMatrix3x2dvEXTPROC)((intptr_t)function_pointer); + glProgramUniformMatrix3x2dvEXT(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGpuShaderFp64_nglProgramUniformMatrix3x4dvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glProgramUniformMatrix3x4dvEXTPROC glProgramUniformMatrix3x4dvEXT = (glProgramUniformMatrix3x4dvEXTPROC)((intptr_t)function_pointer); + glProgramUniformMatrix3x4dvEXT(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGpuShaderFp64_nglProgramUniformMatrix4x2dvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glProgramUniformMatrix4x2dvEXTPROC glProgramUniformMatrix4x2dvEXT = (glProgramUniformMatrix4x2dvEXTPROC)((intptr_t)function_pointer); + glProgramUniformMatrix4x2dvEXT(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBGpuShaderFp64_nglProgramUniformMatrix4x3dvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glProgramUniformMatrix4x3dvEXTPROC glProgramUniformMatrix4x3dvEXT = (glProgramUniformMatrix4x3dvEXTPROC)((intptr_t)function_pointer); + glProgramUniformMatrix4x3dvEXT(program, location, count, transpose, value_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBImaging.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBImaging.c new file mode 100644 index 0000000..c95b100 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBImaging.c @@ -0,0 +1,280 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glColorTablePROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid * data); +typedef void (APIENTRY *glColorSubTablePROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data); +typedef void (APIENTRY *glColorTableParameterivPROC) (GLenum target, GLenum pname, const GLint * params); +typedef void (APIENTRY *glColorTableParameterfvPROC) (GLenum target, GLenum pname, const GLfloat * params); +typedef void (APIENTRY *glCopyColorSubTablePROC) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); +typedef void (APIENTRY *glCopyColorTablePROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRY *glGetColorTablePROC) (GLenum target, GLenum format, GLenum type, GLvoid * data); +typedef void (APIENTRY *glGetColorTableParameterivPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetColorTableParameterfvPROC) (GLenum target, GLenum pname, GLfloat * params); +typedef void (APIENTRY *glHistogramPROC) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); +typedef void (APIENTRY *glResetHistogramPROC) (GLenum target); +typedef void (APIENTRY *glGetHistogramPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid * values); +typedef void (APIENTRY *glGetHistogramParameterfvPROC) (GLenum target, GLenum pname, GLfloat * params); +typedef void (APIENTRY *glGetHistogramParameterivPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRY *glMinmaxPROC) (GLenum target, GLenum internalformat, GLboolean sink); +typedef void (APIENTRY *glResetMinmaxPROC) (GLenum target); +typedef void (APIENTRY *glGetMinmaxPROC) (GLenum target, GLboolean reset, GLenum format, GLenum types, GLvoid * values); +typedef void (APIENTRY *glGetMinmaxParameterfvPROC) (GLenum target, GLenum pname, GLfloat * params); +typedef void (APIENTRY *glGetMinmaxParameterivPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRY *glConvolutionFilter1DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid * image); +typedef void (APIENTRY *glConvolutionFilter2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * image); +typedef void (APIENTRY *glConvolutionParameterfPROC) (GLenum target, GLenum pname, GLfloat params); +typedef void (APIENTRY *glConvolutionParameterfvPROC) (GLenum target, GLenum pname, const GLfloat * params); +typedef void (APIENTRY *glConvolutionParameteriPROC) (GLenum target, GLenum pname, GLint params); +typedef void (APIENTRY *glConvolutionParameterivPROC) (GLenum target, GLenum pname, const GLint * params); +typedef void (APIENTRY *glCopyConvolutionFilter1DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); +typedef void (APIENTRY *glCopyConvolutionFilter2DPROC) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRY *glGetConvolutionFilterPROC) (GLenum target, GLenum format, GLenum type, GLvoid * image); +typedef void (APIENTRY *glGetConvolutionParameterfvPROC) (GLenum target, GLenum pname, GLfloat * params); +typedef void (APIENTRY *glGetConvolutionParameterivPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRY *glSeparableFilter2DPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * row, const GLvoid * column); +typedef void (APIENTRY *glGetSeparableFilterPROC) (GLenum target, GLenum format, GLenum type, GLvoid * row, GLvoid * column, GLvoid * span); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglColorTable(JNIEnv *env, jclass clazz, jint target, jint internalFormat, jint width, jint format, jint type, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glColorTablePROC glColorTable = (glColorTablePROC)((intptr_t)function_pointer); + glColorTable(target, internalFormat, width, format, type, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglColorTableBO(JNIEnv *env, jclass clazz, jint target, jint internalFormat, jint width, jint format, jint type, jlong data_buffer_offset, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)offsetToPointer(data_buffer_offset); + glColorTablePROC glColorTable = (glColorTablePROC)((intptr_t)function_pointer); + glColorTable(target, internalFormat, width, format, type, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglColorSubTable(JNIEnv *env, jclass clazz, jint target, jint start, jint count, jint format, jint type, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glColorSubTablePROC glColorSubTable = (glColorSubTablePROC)((intptr_t)function_pointer); + glColorSubTable(target, start, count, format, type, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglColorSubTableBO(JNIEnv *env, jclass clazz, jint target, jint start, jint count, jint format, jint type, jlong data_buffer_offset, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)offsetToPointer(data_buffer_offset); + glColorSubTablePROC glColorSubTable = (glColorSubTablePROC)((intptr_t)function_pointer); + glColorSubTable(target, start, count, format, type, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglColorTableParameteriv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + const GLint *params_address = (const GLint *)(intptr_t)params; + glColorTableParameterivPROC glColorTableParameteriv = (glColorTableParameterivPROC)((intptr_t)function_pointer); + glColorTableParameteriv(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglColorTableParameterfv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + const GLfloat *params_address = (const GLfloat *)(intptr_t)params; + glColorTableParameterfvPROC glColorTableParameterfv = (glColorTableParameterfvPROC)((intptr_t)function_pointer); + glColorTableParameterfv(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglCopyColorSubTable(JNIEnv *env, jclass clazz, jint target, jint start, jint x, jint y, jint width, jlong function_pointer) { + glCopyColorSubTablePROC glCopyColorSubTable = (glCopyColorSubTablePROC)((intptr_t)function_pointer); + glCopyColorSubTable(target, start, x, y, width); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglCopyColorTable(JNIEnv *env, jclass clazz, jint target, jint internalformat, jint x, jint y, jint width, jlong function_pointer) { + glCopyColorTablePROC glCopyColorTable = (glCopyColorTablePROC)((intptr_t)function_pointer); + glCopyColorTable(target, internalformat, x, y, width); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetColorTable(JNIEnv *env, jclass clazz, jint target, jint format, jint type, jlong data, jlong function_pointer) { + GLvoid *data_address = (GLvoid *)(intptr_t)data; + glGetColorTablePROC glGetColorTable = (glGetColorTablePROC)((intptr_t)function_pointer); + glGetColorTable(target, format, type, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetColorTableParameteriv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetColorTableParameterivPROC glGetColorTableParameteriv = (glGetColorTableParameterivPROC)((intptr_t)function_pointer); + glGetColorTableParameteriv(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetColorTableParameterfv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetColorTableParameterfvPROC glGetColorTableParameterfv = (glGetColorTableParameterfvPROC)((intptr_t)function_pointer); + glGetColorTableParameterfv(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglHistogram(JNIEnv *env, jclass clazz, jint target, jint width, jint internalformat, jboolean sink, jlong function_pointer) { + glHistogramPROC glHistogram = (glHistogramPROC)((intptr_t)function_pointer); + glHistogram(target, width, internalformat, sink); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglResetHistogram(JNIEnv *env, jclass clazz, jint target, jlong function_pointer) { + glResetHistogramPROC glResetHistogram = (glResetHistogramPROC)((intptr_t)function_pointer); + glResetHistogram(target); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetHistogram(JNIEnv *env, jclass clazz, jint target, jboolean reset, jint format, jint type, jlong values, jlong function_pointer) { + GLvoid *values_address = (GLvoid *)(intptr_t)values; + glGetHistogramPROC glGetHistogram = (glGetHistogramPROC)((intptr_t)function_pointer); + glGetHistogram(target, reset, format, type, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetHistogramBO(JNIEnv *env, jclass clazz, jint target, jboolean reset, jint format, jint type, jlong values_buffer_offset, jlong function_pointer) { + GLvoid *values_address = (GLvoid *)(intptr_t)offsetToPointer(values_buffer_offset); + glGetHistogramPROC glGetHistogram = (glGetHistogramPROC)((intptr_t)function_pointer); + glGetHistogram(target, reset, format, type, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetHistogramParameterfv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetHistogramParameterfvPROC glGetHistogramParameterfv = (glGetHistogramParameterfvPROC)((intptr_t)function_pointer); + glGetHistogramParameterfv(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetHistogramParameteriv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetHistogramParameterivPROC glGetHistogramParameteriv = (glGetHistogramParameterivPROC)((intptr_t)function_pointer); + glGetHistogramParameteriv(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglMinmax(JNIEnv *env, jclass clazz, jint target, jint internalformat, jboolean sink, jlong function_pointer) { + glMinmaxPROC glMinmax = (glMinmaxPROC)((intptr_t)function_pointer); + glMinmax(target, internalformat, sink); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglResetMinmax(JNIEnv *env, jclass clazz, jint target, jlong function_pointer) { + glResetMinmaxPROC glResetMinmax = (glResetMinmaxPROC)((intptr_t)function_pointer); + glResetMinmax(target); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetMinmax(JNIEnv *env, jclass clazz, jint target, jboolean reset, jint format, jint types, jlong values, jlong function_pointer) { + GLvoid *values_address = (GLvoid *)(intptr_t)values; + glGetMinmaxPROC glGetMinmax = (glGetMinmaxPROC)((intptr_t)function_pointer); + glGetMinmax(target, reset, format, types, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetMinmaxBO(JNIEnv *env, jclass clazz, jint target, jboolean reset, jint format, jint types, jlong values_buffer_offset, jlong function_pointer) { + GLvoid *values_address = (GLvoid *)(intptr_t)offsetToPointer(values_buffer_offset); + glGetMinmaxPROC glGetMinmax = (glGetMinmaxPROC)((intptr_t)function_pointer); + glGetMinmax(target, reset, format, types, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetMinmaxParameterfv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetMinmaxParameterfvPROC glGetMinmaxParameterfv = (glGetMinmaxParameterfvPROC)((intptr_t)function_pointer); + glGetMinmaxParameterfv(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetMinmaxParameteriv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetMinmaxParameterivPROC glGetMinmaxParameteriv = (glGetMinmaxParameterivPROC)((intptr_t)function_pointer); + glGetMinmaxParameteriv(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglConvolutionFilter1D(JNIEnv *env, jclass clazz, jint target, jint internalformat, jint width, jint format, jint type, jlong image, jlong function_pointer) { + const GLvoid *image_address = (const GLvoid *)(intptr_t)image; + glConvolutionFilter1DPROC glConvolutionFilter1D = (glConvolutionFilter1DPROC)((intptr_t)function_pointer); + glConvolutionFilter1D(target, internalformat, width, format, type, image_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglConvolutionFilter1DBO(JNIEnv *env, jclass clazz, jint target, jint internalformat, jint width, jint format, jint type, jlong image_buffer_offset, jlong function_pointer) { + const GLvoid *image_address = (const GLvoid *)(intptr_t)offsetToPointer(image_buffer_offset); + glConvolutionFilter1DPROC glConvolutionFilter1D = (glConvolutionFilter1DPROC)((intptr_t)function_pointer); + glConvolutionFilter1D(target, internalformat, width, format, type, image_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglConvolutionFilter2D(JNIEnv *env, jclass clazz, jint target, jint internalformat, jint width, jint height, jint format, jint type, jlong image, jlong function_pointer) { + const GLvoid *image_address = (const GLvoid *)(intptr_t)image; + glConvolutionFilter2DPROC glConvolutionFilter2D = (glConvolutionFilter2DPROC)((intptr_t)function_pointer); + glConvolutionFilter2D(target, internalformat, width, height, format, type, image_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglConvolutionFilter2DBO(JNIEnv *env, jclass clazz, jint target, jint internalformat, jint width, jint height, jint format, jint type, jlong image_buffer_offset, jlong function_pointer) { + const GLvoid *image_address = (const GLvoid *)(intptr_t)offsetToPointer(image_buffer_offset); + glConvolutionFilter2DPROC glConvolutionFilter2D = (glConvolutionFilter2DPROC)((intptr_t)function_pointer); + glConvolutionFilter2D(target, internalformat, width, height, format, type, image_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglConvolutionParameterf(JNIEnv *env, jclass clazz, jint target, jint pname, jfloat params, jlong function_pointer) { + glConvolutionParameterfPROC glConvolutionParameterf = (glConvolutionParameterfPROC)((intptr_t)function_pointer); + glConvolutionParameterf(target, pname, params); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglConvolutionParameterfv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + const GLfloat *params_address = (const GLfloat *)(intptr_t)params; + glConvolutionParameterfvPROC glConvolutionParameterfv = (glConvolutionParameterfvPROC)((intptr_t)function_pointer); + glConvolutionParameterfv(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglConvolutionParameteri(JNIEnv *env, jclass clazz, jint target, jint pname, jint params, jlong function_pointer) { + glConvolutionParameteriPROC glConvolutionParameteri = (glConvolutionParameteriPROC)((intptr_t)function_pointer); + glConvolutionParameteri(target, pname, params); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglConvolutionParameteriv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + const GLint *params_address = (const GLint *)(intptr_t)params; + glConvolutionParameterivPROC glConvolutionParameteriv = (glConvolutionParameterivPROC)((intptr_t)function_pointer); + glConvolutionParameteriv(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglCopyConvolutionFilter1D(JNIEnv *env, jclass clazz, jint target, jint internalformat, jint x, jint y, jint width, jlong function_pointer) { + glCopyConvolutionFilter1DPROC glCopyConvolutionFilter1D = (glCopyConvolutionFilter1DPROC)((intptr_t)function_pointer); + glCopyConvolutionFilter1D(target, internalformat, x, y, width); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglCopyConvolutionFilter2D(JNIEnv *env, jclass clazz, jint target, jint internalformat, jint x, jint y, jint width, jint height, jlong function_pointer) { + glCopyConvolutionFilter2DPROC glCopyConvolutionFilter2D = (glCopyConvolutionFilter2DPROC)((intptr_t)function_pointer); + glCopyConvolutionFilter2D(target, internalformat, x, y, width, height); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetConvolutionFilter(JNIEnv *env, jclass clazz, jint target, jint format, jint type, jlong image, jlong function_pointer) { + GLvoid *image_address = (GLvoid *)(intptr_t)image; + glGetConvolutionFilterPROC glGetConvolutionFilter = (glGetConvolutionFilterPROC)((intptr_t)function_pointer); + glGetConvolutionFilter(target, format, type, image_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetConvolutionFilterBO(JNIEnv *env, jclass clazz, jint target, jint format, jint type, jlong image_buffer_offset, jlong function_pointer) { + GLvoid *image_address = (GLvoid *)(intptr_t)offsetToPointer(image_buffer_offset); + glGetConvolutionFilterPROC glGetConvolutionFilter = (glGetConvolutionFilterPROC)((intptr_t)function_pointer); + glGetConvolutionFilter(target, format, type, image_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetConvolutionParameterfv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetConvolutionParameterfvPROC glGetConvolutionParameterfv = (glGetConvolutionParameterfvPROC)((intptr_t)function_pointer); + glGetConvolutionParameterfv(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetConvolutionParameteriv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetConvolutionParameterivPROC glGetConvolutionParameteriv = (glGetConvolutionParameterivPROC)((intptr_t)function_pointer); + glGetConvolutionParameteriv(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglSeparableFilter2D(JNIEnv *env, jclass clazz, jint target, jint internalformat, jint width, jint height, jint format, jint type, jlong row, jlong column, jlong function_pointer) { + const GLvoid *row_address = (const GLvoid *)(intptr_t)row; + const GLvoid *column_address = (const GLvoid *)(intptr_t)column; + glSeparableFilter2DPROC glSeparableFilter2D = (glSeparableFilter2DPROC)((intptr_t)function_pointer); + glSeparableFilter2D(target, internalformat, width, height, format, type, row_address, column_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglSeparableFilter2DBO(JNIEnv *env, jclass clazz, jint target, jint internalformat, jint width, jint height, jint format, jint type, jlong row_buffer_offset, jlong column_buffer_offset, jlong function_pointer) { + const GLvoid *row_address = (const GLvoid *)(intptr_t)offsetToPointer(row_buffer_offset); + const GLvoid *column_address = (const GLvoid *)(intptr_t)offsetToPointer(column_buffer_offset); + glSeparableFilter2DPROC glSeparableFilter2D = (glSeparableFilter2DPROC)((intptr_t)function_pointer); + glSeparableFilter2D(target, internalformat, width, height, format, type, row_address, column_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetSeparableFilter(JNIEnv *env, jclass clazz, jint target, jint format, jint type, jlong row, jlong column, jlong span, jlong function_pointer) { + GLvoid *row_address = (GLvoid *)(intptr_t)row; + GLvoid *column_address = (GLvoid *)(intptr_t)column; + GLvoid *span_address = (GLvoid *)(intptr_t)span; + glGetSeparableFilterPROC glGetSeparableFilter = (glGetSeparableFilterPROC)((intptr_t)function_pointer); + glGetSeparableFilter(target, format, type, row_address, column_address, span_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBImaging_nglGetSeparableFilterBO(JNIEnv *env, jclass clazz, jint target, jint format, jint type, jlong row_buffer_offset, jlong column_buffer_offset, jlong span_buffer_offset, jlong function_pointer) { + GLvoid *row_address = (GLvoid *)(intptr_t)offsetToPointer(row_buffer_offset); + GLvoid *column_address = (GLvoid *)(intptr_t)offsetToPointer(column_buffer_offset); + GLvoid *span_address = (GLvoid *)(intptr_t)offsetToPointer(span_buffer_offset); + glGetSeparableFilterPROC glGetSeparableFilter = (glGetSeparableFilterPROC)((intptr_t)function_pointer); + glGetSeparableFilter(target, format, type, row_address, column_address, span_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBIndirectParameters.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBIndirectParameters.c new file mode 100644 index 0000000..d7738da --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBIndirectParameters.c @@ -0,0 +1,32 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glMultiDrawArraysIndirectCountARBPROC) (GLenum mode, const GLvoid * indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); +typedef void (APIENTRY *glMultiDrawElementsIndirectCountARBPROC) (GLenum mode, GLenum type, const GLvoid * indirect, GLintptr drawcount, GLsizei maxdrawcount, GLsizei stride); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBIndirectParameters_nglMultiDrawArraysIndirectCountARB(JNIEnv *env, jclass clazz, jint mode, jlong indirect, jlong drawcount, jint maxdrawcount, jint stride, jlong function_pointer) { + const GLvoid *indirect_address = (const GLvoid *)(intptr_t)indirect; + glMultiDrawArraysIndirectCountARBPROC glMultiDrawArraysIndirectCountARB = (glMultiDrawArraysIndirectCountARBPROC)((intptr_t)function_pointer); + glMultiDrawArraysIndirectCountARB(mode, indirect_address, drawcount, maxdrawcount, stride); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBIndirectParameters_nglMultiDrawArraysIndirectCountARBBO(JNIEnv *env, jclass clazz, jint mode, jlong indirect_buffer_offset, jlong drawcount, jint maxdrawcount, jint stride, jlong function_pointer) { + const GLvoid *indirect_address = (const GLvoid *)(intptr_t)offsetToPointer(indirect_buffer_offset); + glMultiDrawArraysIndirectCountARBPROC glMultiDrawArraysIndirectCountARB = (glMultiDrawArraysIndirectCountARBPROC)((intptr_t)function_pointer); + glMultiDrawArraysIndirectCountARB(mode, indirect_address, drawcount, maxdrawcount, stride); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBIndirectParameters_nglMultiDrawElementsIndirectCountARB(JNIEnv *env, jclass clazz, jint mode, jint type, jlong indirect, jlong drawcount, jint maxdrawcount, jint stride, jlong function_pointer) { + const GLvoid *indirect_address = (const GLvoid *)(intptr_t)indirect; + glMultiDrawElementsIndirectCountARBPROC glMultiDrawElementsIndirectCountARB = (glMultiDrawElementsIndirectCountARBPROC)((intptr_t)function_pointer); + glMultiDrawElementsIndirectCountARB(mode, type, indirect_address, drawcount, maxdrawcount, stride); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBIndirectParameters_nglMultiDrawElementsIndirectCountARBBO(JNIEnv *env, jclass clazz, jint mode, jint type, jlong indirect_buffer_offset, jlong drawcount, jint maxdrawcount, jint stride, jlong function_pointer) { + const GLvoid *indirect_address = (const GLvoid *)(intptr_t)offsetToPointer(indirect_buffer_offset); + glMultiDrawElementsIndirectCountARBPROC glMultiDrawElementsIndirectCountARB = (glMultiDrawElementsIndirectCountARBPROC)((intptr_t)function_pointer); + glMultiDrawElementsIndirectCountARB(mode, type, indirect_address, drawcount, maxdrawcount, stride); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBInstancedArrays.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBInstancedArrays.c new file mode 100644 index 0000000..a670a75 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBInstancedArrays.c @@ -0,0 +1,12 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glVertexAttribDivisorARBPROC) (GLuint index, GLuint divisor); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBInstancedArrays_nglVertexAttribDivisorARB(JNIEnv *env, jclass clazz, jint index, jint divisor, jlong function_pointer) { + glVertexAttribDivisorARBPROC glVertexAttribDivisorARB = (glVertexAttribDivisorARBPROC)((intptr_t)function_pointer); + glVertexAttribDivisorARB(index, divisor); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBMatrixPalette.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBMatrixPalette.c new file mode 100644 index 0000000..e4a49bd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBMatrixPalette.c @@ -0,0 +1,46 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glCurrentPaletteMatrixARBPROC) (GLint index); +typedef void (APIENTRY *glMatrixIndexPointerARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid * pPointer); +typedef void (APIENTRY *glMatrixIndexubvARBPROC) (GLint size, GLubyte * pIndices); +typedef void (APIENTRY *glMatrixIndexusvARBPROC) (GLint size, GLushort * pIndices); +typedef void (APIENTRY *glMatrixIndexuivARBPROC) (GLint size, GLuint * pIndices); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMatrixPalette_nglCurrentPaletteMatrixARB(JNIEnv *env, jclass clazz, jint index, jlong function_pointer) { + glCurrentPaletteMatrixARBPROC glCurrentPaletteMatrixARB = (glCurrentPaletteMatrixARBPROC)((intptr_t)function_pointer); + glCurrentPaletteMatrixARB(index); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMatrixPalette_nglMatrixIndexPointerARB(JNIEnv *env, jclass clazz, jint size, jint type, jint stride, jlong pPointer, jlong function_pointer) { + const GLvoid *pPointer_address = (const GLvoid *)(intptr_t)pPointer; + glMatrixIndexPointerARBPROC glMatrixIndexPointerARB = (glMatrixIndexPointerARBPROC)((intptr_t)function_pointer); + glMatrixIndexPointerARB(size, type, stride, pPointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMatrixPalette_nglMatrixIndexPointerARBBO(JNIEnv *env, jclass clazz, jint size, jint type, jint stride, jlong pPointer_buffer_offset, jlong function_pointer) { + const GLvoid *pPointer_address = (const GLvoid *)(intptr_t)offsetToPointer(pPointer_buffer_offset); + glMatrixIndexPointerARBPROC glMatrixIndexPointerARB = (glMatrixIndexPointerARBPROC)((intptr_t)function_pointer); + glMatrixIndexPointerARB(size, type, stride, pPointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMatrixPalette_nglMatrixIndexubvARB(JNIEnv *env, jclass clazz, jint size, jlong pIndices, jlong function_pointer) { + GLubyte *pIndices_address = (GLubyte *)(intptr_t)pIndices; + glMatrixIndexubvARBPROC glMatrixIndexubvARB = (glMatrixIndexubvARBPROC)((intptr_t)function_pointer); + glMatrixIndexubvARB(size, pIndices_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMatrixPalette_nglMatrixIndexusvARB(JNIEnv *env, jclass clazz, jint size, jlong pIndices, jlong function_pointer) { + GLushort *pIndices_address = (GLushort *)(intptr_t)pIndices; + glMatrixIndexusvARBPROC glMatrixIndexusvARB = (glMatrixIndexusvARBPROC)((intptr_t)function_pointer); + glMatrixIndexusvARB(size, pIndices_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMatrixPalette_nglMatrixIndexuivARB(JNIEnv *env, jclass clazz, jint size, jlong pIndices, jlong function_pointer) { + GLuint *pIndices_address = (GLuint *)(intptr_t)pIndices; + glMatrixIndexuivARBPROC glMatrixIndexuivARB = (glMatrixIndexuivARBPROC)((intptr_t)function_pointer); + glMatrixIndexuivARB(size, pIndices_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBMultisample.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBMultisample.c new file mode 100644 index 0000000..cce6bb0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBMultisample.c @@ -0,0 +1,12 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glSampleCoverageARBPROC) (GLclampf value, GLboolean invert); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultisample_nglSampleCoverageARB(JNIEnv *env, jclass clazz, jfloat value, jboolean invert, jlong function_pointer) { + glSampleCoverageARBPROC glSampleCoverageARB = (glSampleCoverageARBPROC)((intptr_t)function_pointer); + glSampleCoverageARB(value, invert); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBMultitexture.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBMultitexture.c new file mode 100644 index 0000000..4631e3e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBMultitexture.c @@ -0,0 +1,114 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glClientActiveTextureARBPROC) (GLenum texture); +typedef void (APIENTRY *glActiveTextureARBPROC) (GLenum texture); +typedef void (APIENTRY *glMultiTexCoord1fARBPROC) (GLenum target, GLfloat s); +typedef void (APIENTRY *glMultiTexCoord1dARBPROC) (GLenum target, GLdouble s); +typedef void (APIENTRY *glMultiTexCoord1iARBPROC) (GLenum target, GLint s); +typedef void (APIENTRY *glMultiTexCoord1sARBPROC) (GLenum target, GLshort s); +typedef void (APIENTRY *glMultiTexCoord2fARBPROC) (GLenum target, GLfloat s, GLfloat t); +typedef void (APIENTRY *glMultiTexCoord2dARBPROC) (GLenum target, GLdouble s, GLdouble t); +typedef void (APIENTRY *glMultiTexCoord2iARBPROC) (GLenum target, GLint s, GLint t); +typedef void (APIENTRY *glMultiTexCoord2sARBPROC) (GLenum target, GLshort s, GLshort t); +typedef void (APIENTRY *glMultiTexCoord3fARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); +typedef void (APIENTRY *glMultiTexCoord3dARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); +typedef void (APIENTRY *glMultiTexCoord3iARBPROC) (GLenum target, GLint s, GLint t, GLint r); +typedef void (APIENTRY *glMultiTexCoord3sARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r); +typedef void (APIENTRY *glMultiTexCoord4fARBPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +typedef void (APIENTRY *glMultiTexCoord4dARBPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +typedef void (APIENTRY *glMultiTexCoord4iARBPROC) (GLenum target, GLint s, GLint t, GLint r, GLint q); +typedef void (APIENTRY *glMultiTexCoord4sARBPROC) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglClientActiveTextureARB(JNIEnv *env, jclass clazz, jint texture, jlong function_pointer) { + glClientActiveTextureARBPROC glClientActiveTextureARB = (glClientActiveTextureARBPROC)((intptr_t)function_pointer); + glClientActiveTextureARB(texture); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglActiveTextureARB(JNIEnv *env, jclass clazz, jint texture, jlong function_pointer) { + glActiveTextureARBPROC glActiveTextureARB = (glActiveTextureARBPROC)((intptr_t)function_pointer); + glActiveTextureARB(texture); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord1fARB(JNIEnv *env, jclass clazz, jint target, jfloat s, jlong function_pointer) { + glMultiTexCoord1fARBPROC glMultiTexCoord1fARB = (glMultiTexCoord1fARBPROC)((intptr_t)function_pointer); + glMultiTexCoord1fARB(target, s); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord1dARB(JNIEnv *env, jclass clazz, jint target, jdouble s, jlong function_pointer) { + glMultiTexCoord1dARBPROC glMultiTexCoord1dARB = (glMultiTexCoord1dARBPROC)((intptr_t)function_pointer); + glMultiTexCoord1dARB(target, s); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord1iARB(JNIEnv *env, jclass clazz, jint target, jint s, jlong function_pointer) { + glMultiTexCoord1iARBPROC glMultiTexCoord1iARB = (glMultiTexCoord1iARBPROC)((intptr_t)function_pointer); + glMultiTexCoord1iARB(target, s); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord1sARB(JNIEnv *env, jclass clazz, jint target, jshort s, jlong function_pointer) { + glMultiTexCoord1sARBPROC glMultiTexCoord1sARB = (glMultiTexCoord1sARBPROC)((intptr_t)function_pointer); + glMultiTexCoord1sARB(target, s); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord2fARB(JNIEnv *env, jclass clazz, jint target, jfloat s, jfloat t, jlong function_pointer) { + glMultiTexCoord2fARBPROC glMultiTexCoord2fARB = (glMultiTexCoord2fARBPROC)((intptr_t)function_pointer); + glMultiTexCoord2fARB(target, s, t); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord2dARB(JNIEnv *env, jclass clazz, jint target, jdouble s, jdouble t, jlong function_pointer) { + glMultiTexCoord2dARBPROC glMultiTexCoord2dARB = (glMultiTexCoord2dARBPROC)((intptr_t)function_pointer); + glMultiTexCoord2dARB(target, s, t); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord2iARB(JNIEnv *env, jclass clazz, jint target, jint s, jint t, jlong function_pointer) { + glMultiTexCoord2iARBPROC glMultiTexCoord2iARB = (glMultiTexCoord2iARBPROC)((intptr_t)function_pointer); + glMultiTexCoord2iARB(target, s, t); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord2sARB(JNIEnv *env, jclass clazz, jint target, jshort s, jshort t, jlong function_pointer) { + glMultiTexCoord2sARBPROC glMultiTexCoord2sARB = (glMultiTexCoord2sARBPROC)((intptr_t)function_pointer); + glMultiTexCoord2sARB(target, s, t); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord3fARB(JNIEnv *env, jclass clazz, jint target, jfloat s, jfloat t, jfloat r, jlong function_pointer) { + glMultiTexCoord3fARBPROC glMultiTexCoord3fARB = (glMultiTexCoord3fARBPROC)((intptr_t)function_pointer); + glMultiTexCoord3fARB(target, s, t, r); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord3dARB(JNIEnv *env, jclass clazz, jint target, jdouble s, jdouble t, jdouble r, jlong function_pointer) { + glMultiTexCoord3dARBPROC glMultiTexCoord3dARB = (glMultiTexCoord3dARBPROC)((intptr_t)function_pointer); + glMultiTexCoord3dARB(target, s, t, r); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord3iARB(JNIEnv *env, jclass clazz, jint target, jint s, jint t, jint r, jlong function_pointer) { + glMultiTexCoord3iARBPROC glMultiTexCoord3iARB = (glMultiTexCoord3iARBPROC)((intptr_t)function_pointer); + glMultiTexCoord3iARB(target, s, t, r); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord3sARB(JNIEnv *env, jclass clazz, jint target, jshort s, jshort t, jshort r, jlong function_pointer) { + glMultiTexCoord3sARBPROC glMultiTexCoord3sARB = (glMultiTexCoord3sARBPROC)((intptr_t)function_pointer); + glMultiTexCoord3sARB(target, s, t, r); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord4fARB(JNIEnv *env, jclass clazz, jint target, jfloat s, jfloat t, jfloat r, jfloat q, jlong function_pointer) { + glMultiTexCoord4fARBPROC glMultiTexCoord4fARB = (glMultiTexCoord4fARBPROC)((intptr_t)function_pointer); + glMultiTexCoord4fARB(target, s, t, r, q); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord4dARB(JNIEnv *env, jclass clazz, jint target, jdouble s, jdouble t, jdouble r, jdouble q, jlong function_pointer) { + glMultiTexCoord4dARBPROC glMultiTexCoord4dARB = (glMultiTexCoord4dARBPROC)((intptr_t)function_pointer); + glMultiTexCoord4dARB(target, s, t, r, q); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord4iARB(JNIEnv *env, jclass clazz, jint target, jint s, jint t, jint r, jint q, jlong function_pointer) { + glMultiTexCoord4iARBPROC glMultiTexCoord4iARB = (glMultiTexCoord4iARBPROC)((intptr_t)function_pointer); + glMultiTexCoord4iARB(target, s, t, r, q); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBMultitexture_nglMultiTexCoord4sARB(JNIEnv *env, jclass clazz, jint target, jshort s, jshort t, jshort r, jshort q, jlong function_pointer) { + glMultiTexCoord4sARBPROC glMultiTexCoord4sARB = (glMultiTexCoord4sARBPROC)((intptr_t)function_pointer); + glMultiTexCoord4sARB(target, s, t, r, q); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBOcclusionQuery.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBOcclusionQuery.c new file mode 100644 index 0000000..b2e61e6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBOcclusionQuery.c @@ -0,0 +1,60 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glGenQueriesARBPROC) (GLsizei n, GLuint * ids); +typedef void (APIENTRY *glDeleteQueriesARBPROC) (GLsizei n, GLuint * ids); +typedef GLboolean (APIENTRY *glIsQueryARBPROC) (GLuint id); +typedef void (APIENTRY *glBeginQueryARBPROC) (GLenum target, GLuint id); +typedef void (APIENTRY *glEndQueryARBPROC) (GLenum target); +typedef void (APIENTRY *glGetQueryivARBPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetQueryObjectivARBPROC) (GLuint id, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetQueryObjectuivARBPROC) (GLuint id, GLenum pname, GLint * params); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBOcclusionQuery_nglGenQueriesARB(JNIEnv *env, jclass clazz, jint n, jlong ids, jlong function_pointer) { + GLuint *ids_address = (GLuint *)(intptr_t)ids; + glGenQueriesARBPROC glGenQueriesARB = (glGenQueriesARBPROC)((intptr_t)function_pointer); + glGenQueriesARB(n, ids_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBOcclusionQuery_nglDeleteQueriesARB(JNIEnv *env, jclass clazz, jint n, jlong ids, jlong function_pointer) { + GLuint *ids_address = (GLuint *)(intptr_t)ids; + glDeleteQueriesARBPROC glDeleteQueriesARB = (glDeleteQueriesARBPROC)((intptr_t)function_pointer); + glDeleteQueriesARB(n, ids_address); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_ARBOcclusionQuery_nglIsQueryARB(JNIEnv *env, jclass clazz, jint id, jlong function_pointer) { + glIsQueryARBPROC glIsQueryARB = (glIsQueryARBPROC)((intptr_t)function_pointer); + GLboolean __result = glIsQueryARB(id); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBOcclusionQuery_nglBeginQueryARB(JNIEnv *env, jclass clazz, jint target, jint id, jlong function_pointer) { + glBeginQueryARBPROC glBeginQueryARB = (glBeginQueryARBPROC)((intptr_t)function_pointer); + glBeginQueryARB(target, id); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBOcclusionQuery_nglEndQueryARB(JNIEnv *env, jclass clazz, jint target, jlong function_pointer) { + glEndQueryARBPROC glEndQueryARB = (glEndQueryARBPROC)((intptr_t)function_pointer); + glEndQueryARB(target); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBOcclusionQuery_nglGetQueryivARB(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetQueryivARBPROC glGetQueryivARB = (glGetQueryivARBPROC)((intptr_t)function_pointer); + glGetQueryivARB(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBOcclusionQuery_nglGetQueryObjectivARB(JNIEnv *env, jclass clazz, jint id, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetQueryObjectivARBPROC glGetQueryObjectivARB = (glGetQueryObjectivARBPROC)((intptr_t)function_pointer); + glGetQueryObjectivARB(id, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBOcclusionQuery_nglGetQueryObjectuivARB(JNIEnv *env, jclass clazz, jint id, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetQueryObjectuivARBPROC glGetQueryObjectuivARB = (glGetQueryObjectuivARBPROC)((intptr_t)function_pointer); + glGetQueryObjectuivARB(id, pname, params_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBPointParameters.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBPointParameters.c new file mode 100644 index 0000000..f602835 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBPointParameters.c @@ -0,0 +1,19 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glPointParameterfARBPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRY *glPointParameterfvARBPROC) (GLenum pname, const GLfloat * pfParams); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBPointParameters_nglPointParameterfARB(JNIEnv *env, jclass clazz, jint pname, jfloat param, jlong function_pointer) { + glPointParameterfARBPROC glPointParameterfARB = (glPointParameterfARBPROC)((intptr_t)function_pointer); + glPointParameterfARB(pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBPointParameters_nglPointParameterfvARB(JNIEnv *env, jclass clazz, jint pname, jlong pfParams, jlong function_pointer) { + const GLfloat *pfParams_address = (const GLfloat *)(intptr_t)pfParams; + glPointParameterfvARBPROC glPointParameterfvARB = (glPointParameterfvARBPROC)((intptr_t)function_pointer); + glPointParameterfvARB(pname, pfParams_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBProgram.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBProgram.c new file mode 100644 index 0000000..323b939 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBProgram.c @@ -0,0 +1,134 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glProgramStringARBPROC) (GLenum target, GLenum format, GLsizei length, const GLvoid * string); +typedef void (APIENTRY *glBindProgramARBPROC) (GLenum target, GLuint program); +typedef void (APIENTRY *glDeleteProgramsARBPROC) (GLsizei n, const GLuint * programs); +typedef void (APIENTRY *glGenProgramsARBPROC) (GLsizei n, GLuint * programs); +typedef void (APIENTRY *glProgramEnvParameter4fARBPROC) (GLint target, GLint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRY *glProgramEnvParameter4dARBPROC) (GLint target, GLint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRY *glProgramEnvParameter4fvARBPROC) (GLenum target, GLuint index, const GLfloat * params); +typedef void (APIENTRY *glProgramEnvParameter4dvARBPROC) (GLenum target, GLuint index, const GLdouble * params); +typedef void (APIENTRY *glProgramLocalParameter4fARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRY *glProgramLocalParameter4dARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRY *glProgramLocalParameter4fvARBPROC) (GLenum target, GLuint index, const GLfloat * params); +typedef void (APIENTRY *glProgramLocalParameter4dvARBPROC) (GLenum target, GLuint index, const GLdouble * params); +typedef void (APIENTRY *glGetProgramEnvParameterfvARBPROC) (GLenum target, GLuint index, GLfloat * params); +typedef void (APIENTRY *glGetProgramEnvParameterdvARBPROC) (GLenum target, GLuint index, GLdouble * params); +typedef void (APIENTRY *glGetProgramLocalParameterfvARBPROC) (GLenum target, GLuint index, GLfloat * params); +typedef void (APIENTRY *glGetProgramLocalParameterdvARBPROC) (GLenum target, GLuint index, GLdouble * params); +typedef void (APIENTRY *glGetProgramivARBPROC) (GLenum target, GLenum parameterName, GLint * params); +typedef void (APIENTRY *glGetProgramStringARBPROC) (GLenum target, GLenum parameterName, GLvoid * paramString); +typedef GLboolean (APIENTRY *glIsProgramARBPROC) (GLuint program); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBProgram_nglProgramStringARB(JNIEnv *env, jclass clazz, jint target, jint format, jint length, jlong string, jlong function_pointer) { + const GLvoid *string_address = (const GLvoid *)(intptr_t)string; + glProgramStringARBPROC glProgramStringARB = (glProgramStringARBPROC)((intptr_t)function_pointer); + glProgramStringARB(target, format, length, string_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBProgram_nglBindProgramARB(JNIEnv *env, jclass clazz, jint target, jint program, jlong function_pointer) { + glBindProgramARBPROC glBindProgramARB = (glBindProgramARBPROC)((intptr_t)function_pointer); + glBindProgramARB(target, program); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBProgram_nglDeleteProgramsARB(JNIEnv *env, jclass clazz, jint n, jlong programs, jlong function_pointer) { + const GLuint *programs_address = (const GLuint *)(intptr_t)programs; + glDeleteProgramsARBPROC glDeleteProgramsARB = (glDeleteProgramsARBPROC)((intptr_t)function_pointer); + glDeleteProgramsARB(n, programs_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBProgram_nglGenProgramsARB(JNIEnv *env, jclass clazz, jint n, jlong programs, jlong function_pointer) { + GLuint *programs_address = (GLuint *)(intptr_t)programs; + glGenProgramsARBPROC glGenProgramsARB = (glGenProgramsARBPROC)((intptr_t)function_pointer); + glGenProgramsARB(n, programs_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBProgram_nglProgramEnvParameter4fARB(JNIEnv *env, jclass clazz, jint target, jint index, jfloat x, jfloat y, jfloat z, jfloat w, jlong function_pointer) { + glProgramEnvParameter4fARBPROC glProgramEnvParameter4fARB = (glProgramEnvParameter4fARBPROC)((intptr_t)function_pointer); + glProgramEnvParameter4fARB(target, index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBProgram_nglProgramEnvParameter4dARB(JNIEnv *env, jclass clazz, jint target, jint index, jdouble x, jdouble y, jdouble z, jdouble w, jlong function_pointer) { + glProgramEnvParameter4dARBPROC glProgramEnvParameter4dARB = (glProgramEnvParameter4dARBPROC)((intptr_t)function_pointer); + glProgramEnvParameter4dARB(target, index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBProgram_nglProgramEnvParameter4fvARB(JNIEnv *env, jclass clazz, jint target, jint index, jlong params, jlong function_pointer) { + const GLfloat *params_address = (const GLfloat *)(intptr_t)params; + glProgramEnvParameter4fvARBPROC glProgramEnvParameter4fvARB = (glProgramEnvParameter4fvARBPROC)((intptr_t)function_pointer); + glProgramEnvParameter4fvARB(target, index, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBProgram_nglProgramEnvParameter4dvARB(JNIEnv *env, jclass clazz, jint target, jint index, jlong params, jlong function_pointer) { + const GLdouble *params_address = (const GLdouble *)(intptr_t)params; + glProgramEnvParameter4dvARBPROC glProgramEnvParameter4dvARB = (glProgramEnvParameter4dvARBPROC)((intptr_t)function_pointer); + glProgramEnvParameter4dvARB(target, index, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBProgram_nglProgramLocalParameter4fARB(JNIEnv *env, jclass clazz, jint target, jint index, jfloat x, jfloat y, jfloat z, jfloat w, jlong function_pointer) { + glProgramLocalParameter4fARBPROC glProgramLocalParameter4fARB = (glProgramLocalParameter4fARBPROC)((intptr_t)function_pointer); + glProgramLocalParameter4fARB(target, index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBProgram_nglProgramLocalParameter4dARB(JNIEnv *env, jclass clazz, jint target, jint index, jdouble x, jdouble y, jdouble z, jdouble w, jlong function_pointer) { + glProgramLocalParameter4dARBPROC glProgramLocalParameter4dARB = (glProgramLocalParameter4dARBPROC)((intptr_t)function_pointer); + glProgramLocalParameter4dARB(target, index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBProgram_nglProgramLocalParameter4fvARB(JNIEnv *env, jclass clazz, jint target, jint index, jlong params, jlong function_pointer) { + const GLfloat *params_address = (const GLfloat *)(intptr_t)params; + glProgramLocalParameter4fvARBPROC glProgramLocalParameter4fvARB = (glProgramLocalParameter4fvARBPROC)((intptr_t)function_pointer); + glProgramLocalParameter4fvARB(target, index, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBProgram_nglProgramLocalParameter4dvARB(JNIEnv *env, jclass clazz, jint target, jint index, jlong params, jlong function_pointer) { + const GLdouble *params_address = (const GLdouble *)(intptr_t)params; + glProgramLocalParameter4dvARBPROC glProgramLocalParameter4dvARB = (glProgramLocalParameter4dvARBPROC)((intptr_t)function_pointer); + glProgramLocalParameter4dvARB(target, index, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBProgram_nglGetProgramEnvParameterfvARB(JNIEnv *env, jclass clazz, jint target, jint index, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetProgramEnvParameterfvARBPROC glGetProgramEnvParameterfvARB = (glGetProgramEnvParameterfvARBPROC)((intptr_t)function_pointer); + glGetProgramEnvParameterfvARB(target, index, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBProgram_nglGetProgramEnvParameterdvARB(JNIEnv *env, jclass clazz, jint target, jint index, jlong params, jlong function_pointer) { + GLdouble *params_address = (GLdouble *)(intptr_t)params; + glGetProgramEnvParameterdvARBPROC glGetProgramEnvParameterdvARB = (glGetProgramEnvParameterdvARBPROC)((intptr_t)function_pointer); + glGetProgramEnvParameterdvARB(target, index, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBProgram_nglGetProgramLocalParameterfvARB(JNIEnv *env, jclass clazz, jint target, jint index, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetProgramLocalParameterfvARBPROC glGetProgramLocalParameterfvARB = (glGetProgramLocalParameterfvARBPROC)((intptr_t)function_pointer); + glGetProgramLocalParameterfvARB(target, index, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBProgram_nglGetProgramLocalParameterdvARB(JNIEnv *env, jclass clazz, jint target, jint index, jlong params, jlong function_pointer) { + GLdouble *params_address = (GLdouble *)(intptr_t)params; + glGetProgramLocalParameterdvARBPROC glGetProgramLocalParameterdvARB = (glGetProgramLocalParameterdvARBPROC)((intptr_t)function_pointer); + glGetProgramLocalParameterdvARB(target, index, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBProgram_nglGetProgramivARB(JNIEnv *env, jclass clazz, jint target, jint parameterName, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetProgramivARBPROC glGetProgramivARB = (glGetProgramivARBPROC)((intptr_t)function_pointer); + glGetProgramivARB(target, parameterName, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBProgram_nglGetProgramStringARB(JNIEnv *env, jclass clazz, jint target, jint parameterName, jlong paramString, jlong function_pointer) { + GLvoid *paramString_address = (GLvoid *)(intptr_t)paramString; + glGetProgramStringARBPROC glGetProgramStringARB = (glGetProgramStringARBPROC)((intptr_t)function_pointer); + glGetProgramStringARB(target, parameterName, paramString_address); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_ARBProgram_nglIsProgramARB(JNIEnv *env, jclass clazz, jint program, jlong function_pointer) { + glIsProgramARBPROC glIsProgramARB = (glIsProgramARBPROC)((intptr_t)function_pointer); + GLboolean __result = glIsProgramARB(program); + return __result; +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBRobustness.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBRobustness.c new file mode 100644 index 0000000..f279d20 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBRobustness.c @@ -0,0 +1,192 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GLenum (APIENTRY *glGetGraphicsResetStatusARBPROC) (); +typedef void (APIENTRY *glGetnMapdvARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLdouble * v); +typedef void (APIENTRY *glGetnMapfvARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLfloat * v); +typedef void (APIENTRY *glGetnMapivARBPROC) (GLenum target, GLenum query, GLsizei bufSize, GLint * v); +typedef void (APIENTRY *glGetnPixelMapfvARBPROC) (GLenum map, GLsizei bufSize, GLfloat * values); +typedef void (APIENTRY *glGetnPixelMapuivARBPROC) (GLenum map, GLsizei bufSize, GLuint * values); +typedef void (APIENTRY *glGetnPixelMapusvARBPROC) (GLenum map, GLsizei bufSize, GLushort * values); +typedef void (APIENTRY *glGetnPolygonStippleARBPROC) (GLsizei bufSize, GLubyte * pattern); +typedef void (APIENTRY *glGetnTexImageARBPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid * img); +typedef void (APIENTRY *glReadnPixelsARBPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid * data); +typedef void (APIENTRY *glGetnColorTableARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid * table); +typedef void (APIENTRY *glGetnConvolutionFilterARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei bufSize, GLvoid * image); +typedef void (APIENTRY *glGetnSeparableFilterARBPROC) (GLenum target, GLenum format, GLenum type, GLsizei rowBufSize, GLvoid * row, GLsizei columnBufSize, GLvoid * column, GLvoid * span); +typedef void (APIENTRY *glGetnHistogramARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid * values); +typedef void (APIENTRY *glGetnMinmaxARBPROC) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLsizei bufSize, GLvoid * values); +typedef void (APIENTRY *glGetnCompressedTexImageARBPROC) (GLenum target, GLint lod, GLsizei bufSize, GLvoid * img); +typedef void (APIENTRY *glGetnUniformfvARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat * params); +typedef void (APIENTRY *glGetnUniformivARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint * params); +typedef void (APIENTRY *glGetnUniformuivARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint * params); +typedef void (APIENTRY *glGetnUniformdvARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble * params); + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetGraphicsResetStatusARB(JNIEnv *env, jclass clazz, jlong function_pointer) { + glGetGraphicsResetStatusARBPROC glGetGraphicsResetStatusARB = (glGetGraphicsResetStatusARBPROC)((intptr_t)function_pointer); + GLenum __result = glGetGraphicsResetStatusARB(); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnMapdvARB(JNIEnv *env, jclass clazz, jint target, jint query, jint bufSize, jlong v, jlong function_pointer) { + GLdouble *v_address = (GLdouble *)(intptr_t)v; + glGetnMapdvARBPROC glGetnMapdvARB = (glGetnMapdvARBPROC)((intptr_t)function_pointer); + glGetnMapdvARB(target, query, bufSize, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnMapfvARB(JNIEnv *env, jclass clazz, jint target, jint query, jint bufSize, jlong v, jlong function_pointer) { + GLfloat *v_address = (GLfloat *)(intptr_t)v; + glGetnMapfvARBPROC glGetnMapfvARB = (glGetnMapfvARBPROC)((intptr_t)function_pointer); + glGetnMapfvARB(target, query, bufSize, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnMapivARB(JNIEnv *env, jclass clazz, jint target, jint query, jint bufSize, jlong v, jlong function_pointer) { + GLint *v_address = (GLint *)(intptr_t)v; + glGetnMapivARBPROC glGetnMapivARB = (glGetnMapivARBPROC)((intptr_t)function_pointer); + glGetnMapivARB(target, query, bufSize, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnPixelMapfvARB(JNIEnv *env, jclass clazz, jint map, jint bufSize, jlong values, jlong function_pointer) { + GLfloat *values_address = (GLfloat *)(intptr_t)values; + glGetnPixelMapfvARBPROC glGetnPixelMapfvARB = (glGetnPixelMapfvARBPROC)((intptr_t)function_pointer); + glGetnPixelMapfvARB(map, bufSize, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnPixelMapuivARB(JNIEnv *env, jclass clazz, jint map, jint bufSize, jlong values, jlong function_pointer) { + GLuint *values_address = (GLuint *)(intptr_t)values; + glGetnPixelMapuivARBPROC glGetnPixelMapuivARB = (glGetnPixelMapuivARBPROC)((intptr_t)function_pointer); + glGetnPixelMapuivARB(map, bufSize, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnPixelMapusvARB(JNIEnv *env, jclass clazz, jint map, jint bufSize, jlong values, jlong function_pointer) { + GLushort *values_address = (GLushort *)(intptr_t)values; + glGetnPixelMapusvARBPROC glGetnPixelMapusvARB = (glGetnPixelMapusvARBPROC)((intptr_t)function_pointer); + glGetnPixelMapusvARB(map, bufSize, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnPolygonStippleARB(JNIEnv *env, jclass clazz, jint bufSize, jlong pattern, jlong function_pointer) { + GLubyte *pattern_address = (GLubyte *)(intptr_t)pattern; + glGetnPolygonStippleARBPROC glGetnPolygonStippleARB = (glGetnPolygonStippleARBPROC)((intptr_t)function_pointer); + glGetnPolygonStippleARB(bufSize, pattern_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnTexImageARB(JNIEnv *env, jclass clazz, jint target, jint level, jint format, jint type, jint bufSize, jlong img, jlong function_pointer) { + GLvoid *img_address = (GLvoid *)(intptr_t)img; + glGetnTexImageARBPROC glGetnTexImageARB = (glGetnTexImageARBPROC)((intptr_t)function_pointer); + glGetnTexImageARB(target, level, format, type, bufSize, img_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnTexImageARBBO(JNIEnv *env, jclass clazz, jint target, jint level, jint format, jint type, jint bufSize, jlong img_buffer_offset, jlong function_pointer) { + GLvoid *img_address = (GLvoid *)(intptr_t)offsetToPointer(img_buffer_offset); + glGetnTexImageARBPROC glGetnTexImageARB = (glGetnTexImageARBPROC)((intptr_t)function_pointer); + glGetnTexImageARB(target, level, format, type, bufSize, img_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglReadnPixelsARB(JNIEnv *env, jclass clazz, jint x, jint y, jint width, jint height, jint format, jint type, jint bufSize, jlong data, jlong function_pointer) { + GLvoid *data_address = (GLvoid *)(intptr_t)data; + glReadnPixelsARBPROC glReadnPixelsARB = (glReadnPixelsARBPROC)((intptr_t)function_pointer); + glReadnPixelsARB(x, y, width, height, format, type, bufSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglReadnPixelsARBBO(JNIEnv *env, jclass clazz, jint x, jint y, jint width, jint height, jint format, jint type, jint bufSize, jlong data_buffer_offset, jlong function_pointer) { + GLvoid *data_address = (GLvoid *)(intptr_t)offsetToPointer(data_buffer_offset); + glReadnPixelsARBPROC glReadnPixelsARB = (glReadnPixelsARBPROC)((intptr_t)function_pointer); + glReadnPixelsARB(x, y, width, height, format, type, bufSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnColorTableARB(JNIEnv *env, jclass clazz, jint target, jint format, jint type, jint bufSize, jlong table, jlong function_pointer) { + GLvoid *table_address = (GLvoid *)(intptr_t)table; + glGetnColorTableARBPROC glGetnColorTableARB = (glGetnColorTableARBPROC)((intptr_t)function_pointer); + glGetnColorTableARB(target, format, type, bufSize, table_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnConvolutionFilterARB(JNIEnv *env, jclass clazz, jint target, jint format, jint type, jint bufSize, jlong image, jlong function_pointer) { + GLvoid *image_address = (GLvoid *)(intptr_t)image; + glGetnConvolutionFilterARBPROC glGetnConvolutionFilterARB = (glGetnConvolutionFilterARBPROC)((intptr_t)function_pointer); + glGetnConvolutionFilterARB(target, format, type, bufSize, image_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnConvolutionFilterARBBO(JNIEnv *env, jclass clazz, jint target, jint format, jint type, jint bufSize, jlong image_buffer_offset, jlong function_pointer) { + GLvoid *image_address = (GLvoid *)(intptr_t)offsetToPointer(image_buffer_offset); + glGetnConvolutionFilterARBPROC glGetnConvolutionFilterARB = (glGetnConvolutionFilterARBPROC)((intptr_t)function_pointer); + glGetnConvolutionFilterARB(target, format, type, bufSize, image_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnSeparableFilterARB(JNIEnv *env, jclass clazz, jint target, jint format, jint type, jint rowBufSize, jlong row, jint columnBufSize, jlong column, jlong span, jlong function_pointer) { + GLvoid *row_address = (GLvoid *)(intptr_t)row; + GLvoid *column_address = (GLvoid *)(intptr_t)column; + GLvoid *span_address = (GLvoid *)(intptr_t)span; + glGetnSeparableFilterARBPROC glGetnSeparableFilterARB = (glGetnSeparableFilterARBPROC)((intptr_t)function_pointer); + glGetnSeparableFilterARB(target, format, type, rowBufSize, row_address, columnBufSize, column_address, span_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnSeparableFilterARBBO(JNIEnv *env, jclass clazz, jint target, jint format, jint type, jint rowBufSize, jlong row_buffer_offset, jint columnBufSize, jlong column_buffer_offset, jlong span_buffer_offset, jlong function_pointer) { + GLvoid *row_address = (GLvoid *)(intptr_t)offsetToPointer(row_buffer_offset); + GLvoid *column_address = (GLvoid *)(intptr_t)offsetToPointer(column_buffer_offset); + GLvoid *span_address = (GLvoid *)(intptr_t)offsetToPointer(span_buffer_offset); + glGetnSeparableFilterARBPROC glGetnSeparableFilterARB = (glGetnSeparableFilterARBPROC)((intptr_t)function_pointer); + glGetnSeparableFilterARB(target, format, type, rowBufSize, row_address, columnBufSize, column_address, span_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnHistogramARB(JNIEnv *env, jclass clazz, jint target, jboolean reset, jint format, jint type, jint bufSize, jlong values, jlong function_pointer) { + GLvoid *values_address = (GLvoid *)(intptr_t)values; + glGetnHistogramARBPROC glGetnHistogramARB = (glGetnHistogramARBPROC)((intptr_t)function_pointer); + glGetnHistogramARB(target, reset, format, type, bufSize, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnHistogramARBBO(JNIEnv *env, jclass clazz, jint target, jboolean reset, jint format, jint type, jint bufSize, jlong values_buffer_offset, jlong function_pointer) { + GLvoid *values_address = (GLvoid *)(intptr_t)offsetToPointer(values_buffer_offset); + glGetnHistogramARBPROC glGetnHistogramARB = (glGetnHistogramARBPROC)((intptr_t)function_pointer); + glGetnHistogramARB(target, reset, format, type, bufSize, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnMinmaxARB(JNIEnv *env, jclass clazz, jint target, jboolean reset, jint format, jint type, jint bufSize, jlong values, jlong function_pointer) { + GLvoid *values_address = (GLvoid *)(intptr_t)values; + glGetnMinmaxARBPROC glGetnMinmaxARB = (glGetnMinmaxARBPROC)((intptr_t)function_pointer); + glGetnMinmaxARB(target, reset, format, type, bufSize, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnMinmaxARBBO(JNIEnv *env, jclass clazz, jint target, jboolean reset, jint format, jint type, jint bufSize, jlong values_buffer_offset, jlong function_pointer) { + GLvoid *values_address = (GLvoid *)(intptr_t)offsetToPointer(values_buffer_offset); + glGetnMinmaxARBPROC glGetnMinmaxARB = (glGetnMinmaxARBPROC)((intptr_t)function_pointer); + glGetnMinmaxARB(target, reset, format, type, bufSize, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnCompressedTexImageARB(JNIEnv *env, jclass clazz, jint target, jint lod, jint bufSize, jlong img, jlong function_pointer) { + GLvoid *img_address = (GLvoid *)(intptr_t)img; + glGetnCompressedTexImageARBPROC glGetnCompressedTexImageARB = (glGetnCompressedTexImageARBPROC)((intptr_t)function_pointer); + glGetnCompressedTexImageARB(target, lod, bufSize, img_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnCompressedTexImageARBBO(JNIEnv *env, jclass clazz, jint target, jint lod, jint bufSize, jlong img_buffer_offset, jlong function_pointer) { + GLvoid *img_address = (GLvoid *)(intptr_t)offsetToPointer(img_buffer_offset); + glGetnCompressedTexImageARBPROC glGetnCompressedTexImageARB = (glGetnCompressedTexImageARBPROC)((intptr_t)function_pointer); + glGetnCompressedTexImageARB(target, lod, bufSize, img_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnUniformfvARB(JNIEnv *env, jclass clazz, jint program, jint location, jint bufSize, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetnUniformfvARBPROC glGetnUniformfvARB = (glGetnUniformfvARBPROC)((intptr_t)function_pointer); + glGetnUniformfvARB(program, location, bufSize, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnUniformivARB(JNIEnv *env, jclass clazz, jint program, jint location, jint bufSize, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetnUniformivARBPROC glGetnUniformivARB = (glGetnUniformivARBPROC)((intptr_t)function_pointer); + glGetnUniformivARB(program, location, bufSize, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnUniformuivARB(JNIEnv *env, jclass clazz, jint program, jint location, jint bufSize, jlong params, jlong function_pointer) { + GLuint *params_address = (GLuint *)(intptr_t)params; + glGetnUniformuivARBPROC glGetnUniformuivARB = (glGetnUniformuivARBPROC)((intptr_t)function_pointer); + glGetnUniformuivARB(program, location, bufSize, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBRobustness_nglGetnUniformdvARB(JNIEnv *env, jclass clazz, jint program, jint location, jint bufSize, jlong params, jlong function_pointer) { + GLdouble *params_address = (GLdouble *)(intptr_t)params; + glGetnUniformdvARBPROC glGetnUniformdvARB = (glGetnUniformdvARBPROC)((intptr_t)function_pointer); + glGetnUniformdvARB(program, location, bufSize, params_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBSampleShading.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBSampleShading.c new file mode 100644 index 0000000..dbd79b3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBSampleShading.c @@ -0,0 +1,12 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glMinSampleShadingARBPROC) (GLclampf value); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBSampleShading_nglMinSampleShadingARB(JNIEnv *env, jclass clazz, jfloat value, jlong function_pointer) { + glMinSampleShadingARBPROC glMinSampleShadingARB = (glMinSampleShadingARBPROC)((intptr_t)function_pointer); + glMinSampleShadingARB(value); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBShaderObjects.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBShaderObjects.c new file mode 100644 index 0000000..6593e36 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBShaderObjects.c @@ -0,0 +1,288 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glDeleteObjectARBPROC) (GLhandleARB obj); +typedef GLhandleARB (APIENTRY *glGetHandleARBPROC) (GLenum pname); +typedef void (APIENTRY *glDetachObjectARBPROC) (GLhandleARB containerObj, GLhandleARB attachedObj); +typedef GLhandleARB (APIENTRY *glCreateShaderObjectARBPROC) (GLenum shaderType); +typedef void (APIENTRY *glShaderSourceARBPROC) (GLhandleARB shader, GLsizei count, const GLcharARB ** string, const GLint* length); +typedef void (APIENTRY *glCompileShaderARBPROC) (GLhandleARB shaderObj); +typedef GLhandleARB (APIENTRY *glCreateProgramObjectARBPROC) (); +typedef void (APIENTRY *glAttachObjectARBPROC) (GLhandleARB containerObj, GLhandleARB obj); +typedef void (APIENTRY *glLinkProgramARBPROC) (GLhandleARB programObj); +typedef void (APIENTRY *glUseProgramObjectARBPROC) (GLhandleARB programObj); +typedef void (APIENTRY *glValidateProgramARBPROC) (GLhandleARB programObj); +typedef void (APIENTRY *glUniform1fARBPROC) (GLint location, GLfloat v0); +typedef void (APIENTRY *glUniform2fARBPROC) (GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRY *glUniform3fARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRY *glUniform4fARBPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRY *glUniform1iARBPROC) (GLint location, GLint v0); +typedef void (APIENTRY *glUniform2iARBPROC) (GLint location, GLint v0, GLint v1); +typedef void (APIENTRY *glUniform3iARBPROC) (GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRY *glUniform4iARBPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRY *glUniform1fvARBPROC) (GLint location, GLsizei count, const GLfloat * values); +typedef void (APIENTRY *glUniform2fvARBPROC) (GLint location, GLsizei count, const GLfloat * values); +typedef void (APIENTRY *glUniform3fvARBPROC) (GLint location, GLsizei count, const GLfloat * values); +typedef void (APIENTRY *glUniform4fvARBPROC) (GLint location, GLsizei count, const GLfloat * values); +typedef void (APIENTRY *glUniform1ivARBPROC) (GLint location, GLsizei count, const GLint * values); +typedef void (APIENTRY *glUniform2ivARBPROC) (GLint location, GLsizei count, const GLint * values); +typedef void (APIENTRY *glUniform3ivARBPROC) (GLint location, GLsizei count, const GLint * values); +typedef void (APIENTRY *glUniform4ivARBPROC) (GLint location, GLsizei count, const GLint * values); +typedef void (APIENTRY *glUniformMatrix2fvARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat * matrices); +typedef void (APIENTRY *glUniformMatrix3fvARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat * matrices); +typedef void (APIENTRY *glUniformMatrix4fvARBPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat * matrices); +typedef void (APIENTRY *glGetObjectParameterfvARBPROC) (GLhandleARB obj, GLenum pname, GLfloat * params); +typedef void (APIENTRY *glGetObjectParameterivARBPROC) (GLhandleARB obj, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetInfoLogARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei * length, GLcharARB * infoLog); +typedef void (APIENTRY *glGetAttachedObjectsARBPROC) (GLhandleARB containerObj, GLsizei maxCount, GLsizei * count, GLhandleARB * obj); +typedef GLint (APIENTRY *glGetUniformLocationARBPROC) (GLhandleARB programObj, const GLcharARB * name); +typedef void (APIENTRY *glGetActiveUniformARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name); +typedef void (APIENTRY *glGetUniformfvARBPROC) (GLhandleARB programObj, GLint location, GLfloat * params); +typedef void (APIENTRY *glGetUniformivARBPROC) (GLhandleARB programObj, GLint location, GLint * params); +typedef void (APIENTRY *glGetShaderSourceARBPROC) (GLhandleARB obj, GLsizei maxLength, GLsizei * length, GLcharARB * source); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglDeleteObjectARB(JNIEnv *env, jclass clazz, jint obj, jlong function_pointer) { + glDeleteObjectARBPROC glDeleteObjectARB = (glDeleteObjectARBPROC)((intptr_t)function_pointer); + glDeleteObjectARB(obj); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglGetHandleARB(JNIEnv *env, jclass clazz, jint pname, jlong function_pointer) { + glGetHandleARBPROC glGetHandleARB = (glGetHandleARBPROC)((intptr_t)function_pointer); + GLhandleARB __result = glGetHandleARB(pname); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglDetachObjectARB(JNIEnv *env, jclass clazz, jint containerObj, jint attachedObj, jlong function_pointer) { + glDetachObjectARBPROC glDetachObjectARB = (glDetachObjectARBPROC)((intptr_t)function_pointer); + glDetachObjectARB(containerObj, attachedObj); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglCreateShaderObjectARB(JNIEnv *env, jclass clazz, jint shaderType, jlong function_pointer) { + glCreateShaderObjectARBPROC glCreateShaderObjectARB = (glCreateShaderObjectARBPROC)((intptr_t)function_pointer); + GLhandleARB __result = glCreateShaderObjectARB(shaderType); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglShaderSourceARB(JNIEnv *env, jclass clazz, jint shader, jint count, jlong string, jint length, jlong function_pointer) { + const GLcharARB *string_address = (const GLcharARB *)(intptr_t)string; + glShaderSourceARBPROC glShaderSourceARB = (glShaderSourceARBPROC)((intptr_t)function_pointer); + glShaderSourceARB(shader, count, (const GLcharARB **)&string_address, (const GLint*)&length); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglShaderSourceARB3(JNIEnv *env, jclass clazz, jint shader, jint count, jlong strings, jlong length, jlong function_pointer) { + const GLchar *strings_address = (const GLchar *)(intptr_t)strings; + int _str_i; + GLchar *_str_address; + GLchar **strings_str = (GLchar **) malloc(count * sizeof(GLchar *)); + const GLint *length_address = (const GLint *)(intptr_t)length; + glShaderSourceARBPROC glShaderSourceARB = (glShaderSourceARBPROC)((intptr_t)function_pointer); + _str_i = 0; + _str_address = (GLchar *)strings_address; + while ( _str_i < count ) { + strings_str[_str_i] = _str_address; + _str_address += length_address[_str_i++]; + } + glShaderSourceARB(shader, count, (const GLchar **)strings_str, length_address); + free(strings_str); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglCompileShaderARB(JNIEnv *env, jclass clazz, jint shaderObj, jlong function_pointer) { + glCompileShaderARBPROC glCompileShaderARB = (glCompileShaderARBPROC)((intptr_t)function_pointer); + glCompileShaderARB(shaderObj); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglCreateProgramObjectARB(JNIEnv *env, jclass clazz, jlong function_pointer) { + glCreateProgramObjectARBPROC glCreateProgramObjectARB = (glCreateProgramObjectARBPROC)((intptr_t)function_pointer); + GLhandleARB __result = glCreateProgramObjectARB(); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglAttachObjectARB(JNIEnv *env, jclass clazz, jint containerObj, jint obj, jlong function_pointer) { + glAttachObjectARBPROC glAttachObjectARB = (glAttachObjectARBPROC)((intptr_t)function_pointer); + glAttachObjectARB(containerObj, obj); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglLinkProgramARB(JNIEnv *env, jclass clazz, jint programObj, jlong function_pointer) { + glLinkProgramARBPROC glLinkProgramARB = (glLinkProgramARBPROC)((intptr_t)function_pointer); + glLinkProgramARB(programObj); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUseProgramObjectARB(JNIEnv *env, jclass clazz, jint programObj, jlong function_pointer) { + glUseProgramObjectARBPROC glUseProgramObjectARB = (glUseProgramObjectARBPROC)((intptr_t)function_pointer); + glUseProgramObjectARB(programObj); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglValidateProgramARB(JNIEnv *env, jclass clazz, jint programObj, jlong function_pointer) { + glValidateProgramARBPROC glValidateProgramARB = (glValidateProgramARBPROC)((intptr_t)function_pointer); + glValidateProgramARB(programObj); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniform1fARB(JNIEnv *env, jclass clazz, jint location, jfloat v0, jlong function_pointer) { + glUniform1fARBPROC glUniform1fARB = (glUniform1fARBPROC)((intptr_t)function_pointer); + glUniform1fARB(location, v0); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniform2fARB(JNIEnv *env, jclass clazz, jint location, jfloat v0, jfloat v1, jlong function_pointer) { + glUniform2fARBPROC glUniform2fARB = (glUniform2fARBPROC)((intptr_t)function_pointer); + glUniform2fARB(location, v0, v1); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniform3fARB(JNIEnv *env, jclass clazz, jint location, jfloat v0, jfloat v1, jfloat v2, jlong function_pointer) { + glUniform3fARBPROC glUniform3fARB = (glUniform3fARBPROC)((intptr_t)function_pointer); + glUniform3fARB(location, v0, v1, v2); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniform4fARB(JNIEnv *env, jclass clazz, jint location, jfloat v0, jfloat v1, jfloat v2, jfloat v3, jlong function_pointer) { + glUniform4fARBPROC glUniform4fARB = (glUniform4fARBPROC)((intptr_t)function_pointer); + glUniform4fARB(location, v0, v1, v2, v3); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniform1iARB(JNIEnv *env, jclass clazz, jint location, jint v0, jlong function_pointer) { + glUniform1iARBPROC glUniform1iARB = (glUniform1iARBPROC)((intptr_t)function_pointer); + glUniform1iARB(location, v0); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniform2iARB(JNIEnv *env, jclass clazz, jint location, jint v0, jint v1, jlong function_pointer) { + glUniform2iARBPROC glUniform2iARB = (glUniform2iARBPROC)((intptr_t)function_pointer); + glUniform2iARB(location, v0, v1); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniform3iARB(JNIEnv *env, jclass clazz, jint location, jint v0, jint v1, jint v2, jlong function_pointer) { + glUniform3iARBPROC glUniform3iARB = (glUniform3iARBPROC)((intptr_t)function_pointer); + glUniform3iARB(location, v0, v1, v2); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniform4iARB(JNIEnv *env, jclass clazz, jint location, jint v0, jint v1, jint v2, jint v3, jlong function_pointer) { + glUniform4iARBPROC glUniform4iARB = (glUniform4iARBPROC)((intptr_t)function_pointer); + glUniform4iARB(location, v0, v1, v2, v3); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniform1fvARB(JNIEnv *env, jclass clazz, jint location, jint count, jlong values, jlong function_pointer) { + const GLfloat *values_address = (const GLfloat *)(intptr_t)values; + glUniform1fvARBPROC glUniform1fvARB = (glUniform1fvARBPROC)((intptr_t)function_pointer); + glUniform1fvARB(location, count, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniform2fvARB(JNIEnv *env, jclass clazz, jint location, jint count, jlong values, jlong function_pointer) { + const GLfloat *values_address = (const GLfloat *)(intptr_t)values; + glUniform2fvARBPROC glUniform2fvARB = (glUniform2fvARBPROC)((intptr_t)function_pointer); + glUniform2fvARB(location, count, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniform3fvARB(JNIEnv *env, jclass clazz, jint location, jint count, jlong values, jlong function_pointer) { + const GLfloat *values_address = (const GLfloat *)(intptr_t)values; + glUniform3fvARBPROC glUniform3fvARB = (glUniform3fvARBPROC)((intptr_t)function_pointer); + glUniform3fvARB(location, count, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniform4fvARB(JNIEnv *env, jclass clazz, jint location, jint count, jlong values, jlong function_pointer) { + const GLfloat *values_address = (const GLfloat *)(intptr_t)values; + glUniform4fvARBPROC glUniform4fvARB = (glUniform4fvARBPROC)((intptr_t)function_pointer); + glUniform4fvARB(location, count, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniform1ivARB(JNIEnv *env, jclass clazz, jint location, jint count, jlong values, jlong function_pointer) { + const GLint *values_address = (const GLint *)(intptr_t)values; + glUniform1ivARBPROC glUniform1ivARB = (glUniform1ivARBPROC)((intptr_t)function_pointer); + glUniform1ivARB(location, count, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniform2ivARB(JNIEnv *env, jclass clazz, jint location, jint count, jlong values, jlong function_pointer) { + const GLint *values_address = (const GLint *)(intptr_t)values; + glUniform2ivARBPROC glUniform2ivARB = (glUniform2ivARBPROC)((intptr_t)function_pointer); + glUniform2ivARB(location, count, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniform3ivARB(JNIEnv *env, jclass clazz, jint location, jint count, jlong values, jlong function_pointer) { + const GLint *values_address = (const GLint *)(intptr_t)values; + glUniform3ivARBPROC glUniform3ivARB = (glUniform3ivARBPROC)((intptr_t)function_pointer); + glUniform3ivARB(location, count, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniform4ivARB(JNIEnv *env, jclass clazz, jint location, jint count, jlong values, jlong function_pointer) { + const GLint *values_address = (const GLint *)(intptr_t)values; + glUniform4ivARBPROC glUniform4ivARB = (glUniform4ivARBPROC)((intptr_t)function_pointer); + glUniform4ivARB(location, count, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniformMatrix2fvARB(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong matrices, jlong function_pointer) { + const GLfloat *matrices_address = (const GLfloat *)(intptr_t)matrices; + glUniformMatrix2fvARBPROC glUniformMatrix2fvARB = (glUniformMatrix2fvARBPROC)((intptr_t)function_pointer); + glUniformMatrix2fvARB(location, count, transpose, matrices_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniformMatrix3fvARB(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong matrices, jlong function_pointer) { + const GLfloat *matrices_address = (const GLfloat *)(intptr_t)matrices; + glUniformMatrix3fvARBPROC glUniformMatrix3fvARB = (glUniformMatrix3fvARBPROC)((intptr_t)function_pointer); + glUniformMatrix3fvARB(location, count, transpose, matrices_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglUniformMatrix4fvARB(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong matrices, jlong function_pointer) { + const GLfloat *matrices_address = (const GLfloat *)(intptr_t)matrices; + glUniformMatrix4fvARBPROC glUniformMatrix4fvARB = (glUniformMatrix4fvARBPROC)((intptr_t)function_pointer); + glUniformMatrix4fvARB(location, count, transpose, matrices_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglGetObjectParameterfvARB(JNIEnv *env, jclass clazz, jint obj, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetObjectParameterfvARBPROC glGetObjectParameterfvARB = (glGetObjectParameterfvARBPROC)((intptr_t)function_pointer); + glGetObjectParameterfvARB(obj, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglGetObjectParameterivARB(JNIEnv *env, jclass clazz, jint obj, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetObjectParameterivARBPROC glGetObjectParameterivARB = (glGetObjectParameterivARBPROC)((intptr_t)function_pointer); + glGetObjectParameterivARB(obj, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglGetInfoLogARB(JNIEnv *env, jclass clazz, jint obj, jint maxLength, jlong length, jlong infoLog, jlong function_pointer) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLcharARB *infoLog_address = (GLcharARB *)(intptr_t)infoLog; + glGetInfoLogARBPROC glGetInfoLogARB = (glGetInfoLogARBPROC)((intptr_t)function_pointer); + glGetInfoLogARB(obj, maxLength, length_address, infoLog_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglGetAttachedObjectsARB(JNIEnv *env, jclass clazz, jint containerObj, jint maxCount, jlong count, jlong obj, jlong function_pointer) { + GLsizei *count_address = (GLsizei *)(intptr_t)count; + GLhandleARB *obj_address = (GLhandleARB *)(intptr_t)obj; + glGetAttachedObjectsARBPROC glGetAttachedObjectsARB = (glGetAttachedObjectsARBPROC)((intptr_t)function_pointer); + glGetAttachedObjectsARB(containerObj, maxCount, count_address, obj_address); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglGetUniformLocationARB(JNIEnv *env, jclass clazz, jint programObj, jlong name, jlong function_pointer) { + const GLcharARB *name_address = (const GLcharARB *)(intptr_t)name; + glGetUniformLocationARBPROC glGetUniformLocationARB = (glGetUniformLocationARBPROC)((intptr_t)function_pointer); + GLint __result = glGetUniformLocationARB(programObj, name_address); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglGetActiveUniformARB(JNIEnv *env, jclass clazz, jint programObj, jint index, jint maxLength, jlong length, jlong size, jlong type, jlong name, jlong function_pointer) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLint *size_address = (GLint *)(intptr_t)size; + GLenum *type_address = (GLenum *)(intptr_t)type; + GLcharARB *name_address = (GLcharARB *)(intptr_t)name; + glGetActiveUniformARBPROC glGetActiveUniformARB = (glGetActiveUniformARBPROC)((intptr_t)function_pointer); + glGetActiveUniformARB(programObj, index, maxLength, length_address, size_address, type_address, name_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglGetUniformfvARB(JNIEnv *env, jclass clazz, jint programObj, jint location, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetUniformfvARBPROC glGetUniformfvARB = (glGetUniformfvARBPROC)((intptr_t)function_pointer); + glGetUniformfvARB(programObj, location, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglGetUniformivARB(JNIEnv *env, jclass clazz, jint programObj, jint location, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetUniformivARBPROC glGetUniformivARB = (glGetUniformivARBPROC)((intptr_t)function_pointer); + glGetUniformivARB(programObj, location, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShaderObjects_nglGetShaderSourceARB(JNIEnv *env, jclass clazz, jint obj, jint maxLength, jlong length, jlong source, jlong function_pointer) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLcharARB *source_address = (GLcharARB *)(intptr_t)source; + glGetShaderSourceARBPROC glGetShaderSourceARB = (glGetShaderSourceARBPROC)((intptr_t)function_pointer); + glGetShaderSourceARB(obj, maxLength, length_address, source_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBShadingLanguageInclude.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBShadingLanguageInclude.c new file mode 100644 index 0000000..68c31ba --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBShadingLanguageInclude.c @@ -0,0 +1,81 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glNamedStringARBPROC) (GLenum type, GLint namelen, const GLchar * name, GLint stringlen, const GLchar * string); +typedef void (APIENTRY *glDeleteNamedStringARBPROC) (GLint namelen, const GLchar * name); +typedef void (APIENTRY *glCompileShaderIncludeARBPROC) (GLuint shader, GLsizei count, const GLchar ** path, const GLint * length); +typedef GLboolean (APIENTRY *glIsNamedStringARBPROC) (GLint namelen, const GLchar * name); +typedef void (APIENTRY *glGetNamedStringARBPROC) (GLint namelen, const GLchar * name, GLsizei bufSize, GLint * stringlen, GLchar * string); +typedef void (APIENTRY *glGetNamedStringivARBPROC) (GLint namelen, const GLchar * name, GLenum pname, GLint * params); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShadingLanguageInclude_nglNamedStringARB(JNIEnv *env, jclass clazz, jint type, jint namelen, jlong name, jint stringlen, jlong string, jlong function_pointer) { + const GLchar *name_address = (const GLchar *)(intptr_t)name; + const GLchar *string_address = (const GLchar *)(intptr_t)string; + glNamedStringARBPROC glNamedStringARB = (glNamedStringARBPROC)((intptr_t)function_pointer); + glNamedStringARB(type, namelen, name_address, stringlen, string_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShadingLanguageInclude_nglDeleteNamedStringARB(JNIEnv *env, jclass clazz, jint namelen, jlong name, jlong function_pointer) { + const GLchar *name_address = (const GLchar *)(intptr_t)name; + glDeleteNamedStringARBPROC glDeleteNamedStringARB = (glDeleteNamedStringARBPROC)((intptr_t)function_pointer); + glDeleteNamedStringARB(namelen, name_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShadingLanguageInclude_nglCompileShaderIncludeARB(JNIEnv *env, jclass clazz, jint shader, jint count, jlong path, jlong length, jlong function_pointer) { + const GLchar *path_address = (const GLchar *)(intptr_t)path; + int _str_i; + GLchar *_str_address; + GLchar **path_str = (GLchar **) malloc(count * sizeof(GLchar *)); + const GLint *length_address = (const GLint *)(intptr_t)length; + glCompileShaderIncludeARBPROC glCompileShaderIncludeARB = (glCompileShaderIncludeARBPROC)((intptr_t)function_pointer); + _str_i = 0; + _str_address = (GLchar *)path_address; + while ( _str_i < count ) { + path_str[_str_i++] = _str_address; + _str_address += strlen(_str_address) + 1; + } + glCompileShaderIncludeARB(shader, count, (const GLchar **)path_str, length_address); + free(path_str); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShadingLanguageInclude_nglCompileShaderIncludeARB2(JNIEnv *env, jclass clazz, jint shader, jint count, jlong path, jlong length, jlong function_pointer) { + const GLchar *path_address = (const GLchar *)(intptr_t)path; + int _str_i; + GLchar *_str_address; + GLchar **path_str = (GLchar **) malloc(count * sizeof(GLchar *)); + const GLint *length_address = (const GLint *)(intptr_t)length; + glCompileShaderIncludeARBPROC glCompileShaderIncludeARB = (glCompileShaderIncludeARBPROC)((intptr_t)function_pointer); + _str_i = 0; + _str_address = (GLchar *)path_address; + while ( _str_i < count ) { + path_str[_str_i] = _str_address; + _str_address += length_address[_str_i++]; + } + glCompileShaderIncludeARB(shader, count, (const GLchar **)path_str, length_address); + free(path_str); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_ARBShadingLanguageInclude_nglIsNamedStringARB(JNIEnv *env, jclass clazz, jint namelen, jlong name, jlong function_pointer) { + const GLchar *name_address = (const GLchar *)(intptr_t)name; + glIsNamedStringARBPROC glIsNamedStringARB = (glIsNamedStringARBPROC)((intptr_t)function_pointer); + GLboolean __result = glIsNamedStringARB(namelen, name_address); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShadingLanguageInclude_nglGetNamedStringARB(JNIEnv *env, jclass clazz, jint namelen, jlong name, jint bufSize, jlong stringlen, jlong string, jlong function_pointer) { + const GLchar *name_address = (const GLchar *)(intptr_t)name; + GLint *stringlen_address = (GLint *)(intptr_t)stringlen; + GLchar *string_address = (GLchar *)(intptr_t)string; + glGetNamedStringARBPROC glGetNamedStringARB = (glGetNamedStringARBPROC)((intptr_t)function_pointer); + glGetNamedStringARB(namelen, name_address, bufSize, stringlen_address, string_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBShadingLanguageInclude_nglGetNamedStringivARB(JNIEnv *env, jclass clazz, jint namelen, jlong name, jint pname, jlong params, jlong function_pointer) { + const GLchar *name_address = (const GLchar *)(intptr_t)name; + GLint *params_address = (GLint *)(intptr_t)params; + glGetNamedStringivARBPROC glGetNamedStringivARB = (glGetNamedStringivARBPROC)((intptr_t)function_pointer); + glGetNamedStringivARB(namelen, name_address, pname, params_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBSparseTexture.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBSparseTexture.c new file mode 100644 index 0000000..921de08 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBSparseTexture.c @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glTexPageCommitmentARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); +typedef void (APIENTRY *glTexturePageCommitmentEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBSparseTexture_nglTexPageCommitmentARB(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jboolean commit, jlong function_pointer) { + glTexPageCommitmentARBPROC glTexPageCommitmentARB = (glTexPageCommitmentARBPROC)((intptr_t)function_pointer); + glTexPageCommitmentARB(target, level, xoffset, yoffset, zoffset, width, height, depth, commit); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBSparseTexture_nglTexturePageCommitmentEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jboolean commit, jlong function_pointer) { + glTexturePageCommitmentEXTPROC glTexturePageCommitmentEXT = (glTexturePageCommitmentEXTPROC)((intptr_t)function_pointer); + glTexturePageCommitmentEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, commit); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBTextureBufferObject.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBTextureBufferObject.c new file mode 100644 index 0000000..f0a3d1d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBTextureBufferObject.c @@ -0,0 +1,12 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glTexBufferARBPROC) (GLenum target, GLenum internalformat, GLuint buffer); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureBufferObject_nglTexBufferARB(JNIEnv *env, jclass clazz, jint target, jint internalformat, jint buffer, jlong function_pointer) { + glTexBufferARBPROC glTexBufferARB = (glTexBufferARBPROC)((intptr_t)function_pointer); + glTexBufferARB(target, internalformat, buffer); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBTextureBufferRange.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBTextureBufferRange.c new file mode 100644 index 0000000..758b44b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBTextureBufferRange.c @@ -0,0 +1,12 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glTextureBufferRangeEXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureBufferRange_nglTextureBufferRangeEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint internalformat, jint buffer, jlong offset, jlong size, jlong function_pointer) { + glTextureBufferRangeEXTPROC glTextureBufferRangeEXT = (glTextureBufferRangeEXTPROC)((intptr_t)function_pointer); + glTextureBufferRangeEXT(texture, target, internalformat, buffer, offset, size); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBTextureCompression.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBTextureCompression.c new file mode 100644 index 0000000..133cf5a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBTextureCompression.c @@ -0,0 +1,97 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glCompressedTexImage1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * pData); +typedef void (APIENTRY *glCompressedTexImage2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * pData); +typedef void (APIENTRY *glCompressedTexImage3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * pData); +typedef void (APIENTRY *glCompressedTexSubImage1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * pData); +typedef void (APIENTRY *glCompressedTexSubImage2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * pData); +typedef void (APIENTRY *glCompressedTexSubImage3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * pData); +typedef void (APIENTRY *glGetCompressedTexImageARBPROC) (GLenum target, GLint lod, GLvoid * pImg); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage1DARB(JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint border, jint imageSize, jlong pData, jlong function_pointer) { + const GLvoid *pData_address = (const GLvoid *)(intptr_t)pData; + glCompressedTexImage1DARBPROC glCompressedTexImage1DARB = (glCompressedTexImage1DARBPROC)((intptr_t)function_pointer); + glCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, pData_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage1DARBBO(JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint border, jint imageSize, jlong pData_buffer_offset, jlong function_pointer) { + const GLvoid *pData_address = (const GLvoid *)(intptr_t)offsetToPointer(pData_buffer_offset); + glCompressedTexImage1DARBPROC glCompressedTexImage1DARB = (glCompressedTexImage1DARBPROC)((intptr_t)function_pointer); + glCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, pData_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage2DARB(JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jlong pData, jlong function_pointer) { + const GLvoid *pData_address = (const GLvoid *)(intptr_t)pData; + glCompressedTexImage2DARBPROC glCompressedTexImage2DARB = (glCompressedTexImage2DARBPROC)((intptr_t)function_pointer); + glCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, pData_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage2DARBBO(JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jlong pData_buffer_offset, jlong function_pointer) { + const GLvoid *pData_address = (const GLvoid *)(intptr_t)offsetToPointer(pData_buffer_offset); + glCompressedTexImage2DARBPROC glCompressedTexImage2DARB = (glCompressedTexImage2DARBPROC)((intptr_t)function_pointer); + glCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, pData_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage3DARB(JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jlong pData, jlong function_pointer) { + const GLvoid *pData_address = (const GLvoid *)(intptr_t)pData; + glCompressedTexImage3DARBPROC glCompressedTexImage3DARB = (glCompressedTexImage3DARBPROC)((intptr_t)function_pointer); + glCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, pData_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexImage3DARBBO(JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jlong pData_buffer_offset, jlong function_pointer) { + const GLvoid *pData_address = (const GLvoid *)(intptr_t)offsetToPointer(pData_buffer_offset); + glCompressedTexImage3DARBPROC glCompressedTexImage3DARB = (glCompressedTexImage3DARBPROC)((intptr_t)function_pointer); + glCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, pData_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage1DARB(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint width, jint format, jint imageSize, jlong pData, jlong function_pointer) { + const GLvoid *pData_address = (const GLvoid *)(intptr_t)pData; + glCompressedTexSubImage1DARBPROC glCompressedTexSubImage1DARB = (glCompressedTexSubImage1DARBPROC)((intptr_t)function_pointer); + glCompressedTexSubImage1DARB(target, level, xoffset, width, format, imageSize, pData_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage1DARBBO(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint width, jint format, jint imageSize, jlong pData_buffer_offset, jlong function_pointer) { + const GLvoid *pData_address = (const GLvoid *)(intptr_t)offsetToPointer(pData_buffer_offset); + glCompressedTexSubImage1DARBPROC glCompressedTexSubImage1DARB = (glCompressedTexSubImage1DARBPROC)((intptr_t)function_pointer); + glCompressedTexSubImage1DARB(target, level, xoffset, width, format, imageSize, pData_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage2DARB(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jlong pData, jlong function_pointer) { + const GLvoid *pData_address = (const GLvoid *)(intptr_t)pData; + glCompressedTexSubImage2DARBPROC glCompressedTexSubImage2DARB = (glCompressedTexSubImage2DARBPROC)((intptr_t)function_pointer); + glCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, format, imageSize, pData_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage2DARBBO(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jlong pData_buffer_offset, jlong function_pointer) { + const GLvoid *pData_address = (const GLvoid *)(intptr_t)offsetToPointer(pData_buffer_offset); + glCompressedTexSubImage2DARBPROC glCompressedTexSubImage2DARB = (glCompressedTexSubImage2DARBPROC)((intptr_t)function_pointer); + glCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, format, imageSize, pData_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage3DARB(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imageSize, jlong pData, jlong function_pointer) { + const GLvoid *pData_address = (const GLvoid *)(intptr_t)pData; + glCompressedTexSubImage3DARBPROC glCompressedTexSubImage3DARB = (glCompressedTexSubImage3DARBPROC)((intptr_t)function_pointer); + glCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, pData_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglCompressedTexSubImage3DARBBO(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imageSize, jlong pData_buffer_offset, jlong function_pointer) { + const GLvoid *pData_address = (const GLvoid *)(intptr_t)offsetToPointer(pData_buffer_offset); + glCompressedTexSubImage3DARBPROC glCompressedTexSubImage3DARB = (glCompressedTexSubImage3DARBPROC)((intptr_t)function_pointer); + glCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, pData_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglGetCompressedTexImageARB(JNIEnv *env, jclass clazz, jint target, jint lod, jlong pImg, jlong function_pointer) { + GLvoid *pImg_address = (GLvoid *)(intptr_t)pImg; + glGetCompressedTexImageARBPROC glGetCompressedTexImageARB = (glGetCompressedTexImageARBPROC)((intptr_t)function_pointer); + glGetCompressedTexImageARB(target, lod, pImg_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureCompression_nglGetCompressedTexImageARBBO(JNIEnv *env, jclass clazz, jint target, jint lod, jlong pImg_buffer_offset, jlong function_pointer) { + GLvoid *pImg_address = (GLvoid *)(intptr_t)offsetToPointer(pImg_buffer_offset); + glGetCompressedTexImageARBPROC glGetCompressedTexImageARB = (glGetCompressedTexImageARBPROC)((intptr_t)function_pointer); + glGetCompressedTexImageARB(target, lod, pImg_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBTextureStorage.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBTextureStorage.c new file mode 100644 index 0000000..e188ca2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBTextureStorage.c @@ -0,0 +1,24 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glTextureStorage1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +typedef void (APIENTRY *glTextureStorage2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRY *glTextureStorage3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureStorage_nglTextureStorage1DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint levels, jint internalformat, jint width, jlong function_pointer) { + glTextureStorage1DEXTPROC glTextureStorage1DEXT = (glTextureStorage1DEXTPROC)((intptr_t)function_pointer); + glTextureStorage1DEXT(texture, target, levels, internalformat, width); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureStorage_nglTextureStorage2DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint levels, jint internalformat, jint width, jint height, jlong function_pointer) { + glTextureStorage2DEXTPROC glTextureStorage2DEXT = (glTextureStorage2DEXTPROC)((intptr_t)function_pointer); + glTextureStorage2DEXT(texture, target, levels, internalformat, width, height); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureStorage_nglTextureStorage3DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint levels, jint internalformat, jint width, jint height, jint depth, jlong function_pointer) { + glTextureStorage3DEXTPROC glTextureStorage3DEXT = (glTextureStorage3DEXTPROC)((intptr_t)function_pointer); + glTextureStorage3DEXT(texture, target, levels, internalformat, width, height, depth); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBTextureStorageMultisample.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBTextureStorageMultisample.c new file mode 100644 index 0000000..74e87d4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBTextureStorageMultisample.c @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glTextureStorage2DMultisampleEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +typedef void (APIENTRY *glTextureStorage3DMultisampleEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureStorageMultisample_nglTextureStorage2DMultisampleEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint samples, jint internalformat, jint width, jint height, jboolean fixedsamplelocations, jlong function_pointer) { + glTextureStorage2DMultisampleEXTPROC glTextureStorage2DMultisampleEXT = (glTextureStorage2DMultisampleEXTPROC)((intptr_t)function_pointer); + glTextureStorage2DMultisampleEXT(texture, target, samples, internalformat, width, height, fixedsamplelocations); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTextureStorageMultisample_nglTextureStorage3DMultisampleEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint samples, jint internalformat, jint width, jint height, jint depth, jboolean fixedsamplelocations, jlong function_pointer) { + glTextureStorage3DMultisampleEXTPROC glTextureStorage3DMultisampleEXT = (glTextureStorage3DMultisampleEXTPROC)((intptr_t)function_pointer); + glTextureStorage3DMultisampleEXT(texture, target, samples, internalformat, width, height, depth, fixedsamplelocations); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBTransposeMatrix.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBTransposeMatrix.c new file mode 100644 index 0000000..b945419 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBTransposeMatrix.c @@ -0,0 +1,20 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glLoadTransposeMatrixfARBPROC) (const GLfloat * pfMtx); +typedef void (APIENTRY *glMultTransposeMatrixfARBPROC) (const GLfloat * pfMtx); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTransposeMatrix_nglLoadTransposeMatrixfARB(JNIEnv *env, jclass clazz, jlong pfMtx, jlong function_pointer) { + const GLfloat *pfMtx_address = (const GLfloat *)(intptr_t)pfMtx; + glLoadTransposeMatrixfARBPROC glLoadTransposeMatrixfARB = (glLoadTransposeMatrixfARBPROC)((intptr_t)function_pointer); + glLoadTransposeMatrixfARB(pfMtx_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBTransposeMatrix_nglMultTransposeMatrixfARB(JNIEnv *env, jclass clazz, jlong pfMtx, jlong function_pointer) { + const GLfloat *pfMtx_address = (const GLfloat *)(intptr_t)pfMtx; + glMultTransposeMatrixfARBPROC glMultTransposeMatrixfARB = (glMultTransposeMatrixfARBPROC)((intptr_t)function_pointer); + glMultTransposeMatrixfARB(pfMtx_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBVertexAttrib64bit.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBVertexAttrib64bit.c new file mode 100644 index 0000000..31eb33c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBVertexAttrib64bit.c @@ -0,0 +1,12 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glVertexArrayVertexAttribLOffsetEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexAttrib64bit_nglVertexArrayVertexAttribLOffsetEXT(JNIEnv *env, jclass clazz, jint vaobj, jint buffer, jint index, jint size, jint type, jint stride, jlong offset, jlong function_pointer) { + glVertexArrayVertexAttribLOffsetEXTPROC glVertexArrayVertexAttribLOffsetEXT = (glVertexArrayVertexAttribLOffsetEXTPROC)((intptr_t)function_pointer); + glVertexArrayVertexAttribLOffsetEXT(vaobj, buffer, index, size, type, stride, offset); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBVertexBlend.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBVertexBlend.c new file mode 100644 index 0000000..4e2d26d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBVertexBlend.c @@ -0,0 +1,81 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glWeightbvARBPROC) (GLint size, GLbyte * pWeights); +typedef void (APIENTRY *glWeightsvARBPROC) (GLint size, GLshort * pWeights); +typedef void (APIENTRY *glWeightivARBPROC) (GLint size, GLint * pWeights); +typedef void (APIENTRY *glWeightfvARBPROC) (GLint size, GLfloat * pWeights); +typedef void (APIENTRY *glWeightdvARBPROC) (GLint size, GLdouble * pWeights); +typedef void (APIENTRY *glWeightubvARBPROC) (GLint size, GLubyte * pWeights); +typedef void (APIENTRY *glWeightusvARBPROC) (GLint size, GLushort * pWeights); +typedef void (APIENTRY *glWeightuivARBPROC) (GLint size, GLuint * pWeights); +typedef void (APIENTRY *glWeightPointerARBPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid * pPointer); +typedef void (APIENTRY *glVertexBlendARBPROC) (GLint count); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexBlend_nglWeightbvARB(JNIEnv *env, jclass clazz, jint size, jlong pWeights, jlong function_pointer) { + GLbyte *pWeights_address = (GLbyte *)(intptr_t)pWeights; + glWeightbvARBPROC glWeightbvARB = (glWeightbvARBPROC)((intptr_t)function_pointer); + glWeightbvARB(size, pWeights_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexBlend_nglWeightsvARB(JNIEnv *env, jclass clazz, jint size, jlong pWeights, jlong function_pointer) { + GLshort *pWeights_address = (GLshort *)(intptr_t)pWeights; + glWeightsvARBPROC glWeightsvARB = (glWeightsvARBPROC)((intptr_t)function_pointer); + glWeightsvARB(size, pWeights_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexBlend_nglWeightivARB(JNIEnv *env, jclass clazz, jint size, jlong pWeights, jlong function_pointer) { + GLint *pWeights_address = (GLint *)(intptr_t)pWeights; + glWeightivARBPROC glWeightivARB = (glWeightivARBPROC)((intptr_t)function_pointer); + glWeightivARB(size, pWeights_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexBlend_nglWeightfvARB(JNIEnv *env, jclass clazz, jint size, jlong pWeights, jlong function_pointer) { + GLfloat *pWeights_address = (GLfloat *)(intptr_t)pWeights; + glWeightfvARBPROC glWeightfvARB = (glWeightfvARBPROC)((intptr_t)function_pointer); + glWeightfvARB(size, pWeights_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexBlend_nglWeightdvARB(JNIEnv *env, jclass clazz, jint size, jlong pWeights, jlong function_pointer) { + GLdouble *pWeights_address = (GLdouble *)(intptr_t)pWeights; + glWeightdvARBPROC glWeightdvARB = (glWeightdvARBPROC)((intptr_t)function_pointer); + glWeightdvARB(size, pWeights_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexBlend_nglWeightubvARB(JNIEnv *env, jclass clazz, jint size, jlong pWeights, jlong function_pointer) { + GLubyte *pWeights_address = (GLubyte *)(intptr_t)pWeights; + glWeightubvARBPROC glWeightubvARB = (glWeightubvARBPROC)((intptr_t)function_pointer); + glWeightubvARB(size, pWeights_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexBlend_nglWeightusvARB(JNIEnv *env, jclass clazz, jint size, jlong pWeights, jlong function_pointer) { + GLushort *pWeights_address = (GLushort *)(intptr_t)pWeights; + glWeightusvARBPROC glWeightusvARB = (glWeightusvARBPROC)((intptr_t)function_pointer); + glWeightusvARB(size, pWeights_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexBlend_nglWeightuivARB(JNIEnv *env, jclass clazz, jint size, jlong pWeights, jlong function_pointer) { + GLuint *pWeights_address = (GLuint *)(intptr_t)pWeights; + glWeightuivARBPROC glWeightuivARB = (glWeightuivARBPROC)((intptr_t)function_pointer); + glWeightuivARB(size, pWeights_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexBlend_nglWeightPointerARB(JNIEnv *env, jclass clazz, jint size, jint type, jint stride, jlong pPointer, jlong function_pointer) { + const GLvoid *pPointer_address = (const GLvoid *)(intptr_t)pPointer; + glWeightPointerARBPROC glWeightPointerARB = (glWeightPointerARBPROC)((intptr_t)function_pointer); + glWeightPointerARB(size, type, stride, pPointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexBlend_nglWeightPointerARBBO(JNIEnv *env, jclass clazz, jint size, jint type, jint stride, jlong pPointer_buffer_offset, jlong function_pointer) { + const GLvoid *pPointer_address = (const GLvoid *)(intptr_t)offsetToPointer(pPointer_buffer_offset); + glWeightPointerARBPROC glWeightPointerARB = (glWeightPointerARBPROC)((intptr_t)function_pointer); + glWeightPointerARB(size, type, stride, pPointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexBlend_nglVertexBlendARB(JNIEnv *env, jclass clazz, jint count, jlong function_pointer) { + glVertexBlendARBPROC glVertexBlendARB = (glVertexBlendARBPROC)((intptr_t)function_pointer); + glVertexBlendARB(count); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBVertexShader.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBVertexShader.c new file mode 100644 index 0000000..728c6fd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBVertexShader.c @@ -0,0 +1,163 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glVertexAttrib1sARBPROC) (GLuint index, GLshort v0); +typedef void (APIENTRY *glVertexAttrib1fARBPROC) (GLuint index, GLfloat v0); +typedef void (APIENTRY *glVertexAttrib1dARBPROC) (GLuint index, GLdouble v0); +typedef void (APIENTRY *glVertexAttrib2sARBPROC) (GLuint index, GLshort v0, GLshort v1); +typedef void (APIENTRY *glVertexAttrib2fARBPROC) (GLuint index, GLfloat v0, GLfloat v1); +typedef void (APIENTRY *glVertexAttrib2dARBPROC) (GLuint index, GLdouble v0, GLdouble v1); +typedef void (APIENTRY *glVertexAttrib3sARBPROC) (GLuint index, GLshort v0, GLshort v1, GLshort v2); +typedef void (APIENTRY *glVertexAttrib3fARBPROC) (GLuint index, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRY *glVertexAttrib3dARBPROC) (GLuint index, GLdouble v0, GLdouble v1, GLdouble v2); +typedef void (APIENTRY *glVertexAttrib4sARBPROC) (GLuint index, GLshort v0, GLshort v1, GLshort v2, GLshort v3); +typedef void (APIENTRY *glVertexAttrib4fARBPROC) (GLuint index, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRY *glVertexAttrib4dARBPROC) (GLuint index, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); +typedef void (APIENTRY *glVertexAttrib4NubARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (APIENTRY *glVertexAttribPointerARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * buffer); +typedef void (APIENTRY *glEnableVertexAttribArrayARBPROC) (GLuint index); +typedef void (APIENTRY *glDisableVertexAttribArrayARBPROC) (GLuint index); +typedef void (APIENTRY *glBindAttribLocationARBPROC) (GLhandleARB programObj, GLuint index, const GLcharARB * name); +typedef void (APIENTRY *glGetActiveAttribARBPROC) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei * length, GLint * size, GLenum * type, GLcharARB * name); +typedef GLint (APIENTRY *glGetAttribLocationARBPROC) (GLhandleARB programObj, const GLcharARB * name); +typedef void (APIENTRY *glGetVertexAttribfvARBPROC) (GLuint index, GLenum pname, GLfloat * params); +typedef void (APIENTRY *glGetVertexAttribdvARBPROC) (GLuint index, GLenum pname, GLdouble * params); +typedef void (APIENTRY *glGetVertexAttribivARBPROC) (GLuint index, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetVertexAttribPointervARBPROC) (GLuint index, GLenum pname, GLvoid ** result); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib1sARB(JNIEnv *env, jclass clazz, jint index, jshort v0, jlong function_pointer) { + glVertexAttrib1sARBPROC glVertexAttrib1sARB = (glVertexAttrib1sARBPROC)((intptr_t)function_pointer); + glVertexAttrib1sARB(index, v0); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib1fARB(JNIEnv *env, jclass clazz, jint index, jfloat v0, jlong function_pointer) { + glVertexAttrib1fARBPROC glVertexAttrib1fARB = (glVertexAttrib1fARBPROC)((intptr_t)function_pointer); + glVertexAttrib1fARB(index, v0); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib1dARB(JNIEnv *env, jclass clazz, jint index, jdouble v0, jlong function_pointer) { + glVertexAttrib1dARBPROC glVertexAttrib1dARB = (glVertexAttrib1dARBPROC)((intptr_t)function_pointer); + glVertexAttrib1dARB(index, v0); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib2sARB(JNIEnv *env, jclass clazz, jint index, jshort v0, jshort v1, jlong function_pointer) { + glVertexAttrib2sARBPROC glVertexAttrib2sARB = (glVertexAttrib2sARBPROC)((intptr_t)function_pointer); + glVertexAttrib2sARB(index, v0, v1); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib2fARB(JNIEnv *env, jclass clazz, jint index, jfloat v0, jfloat v1, jlong function_pointer) { + glVertexAttrib2fARBPROC glVertexAttrib2fARB = (glVertexAttrib2fARBPROC)((intptr_t)function_pointer); + glVertexAttrib2fARB(index, v0, v1); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib2dARB(JNIEnv *env, jclass clazz, jint index, jdouble v0, jdouble v1, jlong function_pointer) { + glVertexAttrib2dARBPROC glVertexAttrib2dARB = (glVertexAttrib2dARBPROC)((intptr_t)function_pointer); + glVertexAttrib2dARB(index, v0, v1); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib3sARB(JNIEnv *env, jclass clazz, jint index, jshort v0, jshort v1, jshort v2, jlong function_pointer) { + glVertexAttrib3sARBPROC glVertexAttrib3sARB = (glVertexAttrib3sARBPROC)((intptr_t)function_pointer); + glVertexAttrib3sARB(index, v0, v1, v2); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib3fARB(JNIEnv *env, jclass clazz, jint index, jfloat v0, jfloat v1, jfloat v2, jlong function_pointer) { + glVertexAttrib3fARBPROC glVertexAttrib3fARB = (glVertexAttrib3fARBPROC)((intptr_t)function_pointer); + glVertexAttrib3fARB(index, v0, v1, v2); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib3dARB(JNIEnv *env, jclass clazz, jint index, jdouble v0, jdouble v1, jdouble v2, jlong function_pointer) { + glVertexAttrib3dARBPROC glVertexAttrib3dARB = (glVertexAttrib3dARBPROC)((intptr_t)function_pointer); + glVertexAttrib3dARB(index, v0, v1, v2); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib4sARB(JNIEnv *env, jclass clazz, jint index, jshort v0, jshort v1, jshort v2, jshort v3, jlong function_pointer) { + glVertexAttrib4sARBPROC glVertexAttrib4sARB = (glVertexAttrib4sARBPROC)((intptr_t)function_pointer); + glVertexAttrib4sARB(index, v0, v1, v2, v3); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib4fARB(JNIEnv *env, jclass clazz, jint index, jfloat v0, jfloat v1, jfloat v2, jfloat v3, jlong function_pointer) { + glVertexAttrib4fARBPROC glVertexAttrib4fARB = (glVertexAttrib4fARBPROC)((intptr_t)function_pointer); + glVertexAttrib4fARB(index, v0, v1, v2, v3); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib4dARB(JNIEnv *env, jclass clazz, jint index, jdouble v0, jdouble v1, jdouble v2, jdouble v3, jlong function_pointer) { + glVertexAttrib4dARBPROC glVertexAttrib4dARB = (glVertexAttrib4dARBPROC)((intptr_t)function_pointer); + glVertexAttrib4dARB(index, v0, v1, v2, v3); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttrib4NubARB(JNIEnv *env, jclass clazz, jint index, jbyte x, jbyte y, jbyte z, jbyte w, jlong function_pointer) { + glVertexAttrib4NubARBPROC glVertexAttrib4NubARB = (glVertexAttrib4NubARBPROC)((intptr_t)function_pointer); + glVertexAttrib4NubARB(index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttribPointerARB(JNIEnv *env, jclass clazz, jint index, jint size, jint type, jboolean normalized, jint stride, jlong buffer, jlong function_pointer) { + const GLvoid *buffer_address = (const GLvoid *)(intptr_t)buffer; + glVertexAttribPointerARBPROC glVertexAttribPointerARB = (glVertexAttribPointerARBPROC)((intptr_t)function_pointer); + glVertexAttribPointerARB(index, size, type, normalized, stride, buffer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglVertexAttribPointerARBBO(JNIEnv *env, jclass clazz, jint index, jint size, jint type, jboolean normalized, jint stride, jlong buffer_buffer_offset, jlong function_pointer) { + const GLvoid *buffer_address = (const GLvoid *)(intptr_t)offsetToPointer(buffer_buffer_offset); + glVertexAttribPointerARBPROC glVertexAttribPointerARB = (glVertexAttribPointerARBPROC)((intptr_t)function_pointer); + glVertexAttribPointerARB(index, size, type, normalized, stride, buffer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglEnableVertexAttribArrayARB(JNIEnv *env, jclass clazz, jint index, jlong function_pointer) { + glEnableVertexAttribArrayARBPROC glEnableVertexAttribArrayARB = (glEnableVertexAttribArrayARBPROC)((intptr_t)function_pointer); + glEnableVertexAttribArrayARB(index); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglDisableVertexAttribArrayARB(JNIEnv *env, jclass clazz, jint index, jlong function_pointer) { + glDisableVertexAttribArrayARBPROC glDisableVertexAttribArrayARB = (glDisableVertexAttribArrayARBPROC)((intptr_t)function_pointer); + glDisableVertexAttribArrayARB(index); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglBindAttribLocationARB(JNIEnv *env, jclass clazz, jint programObj, jint index, jlong name, jlong function_pointer) { + const GLcharARB *name_address = (const GLcharARB *)(intptr_t)name; + glBindAttribLocationARBPROC glBindAttribLocationARB = (glBindAttribLocationARBPROC)((intptr_t)function_pointer); + glBindAttribLocationARB(programObj, index, name_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglGetActiveAttribARB(JNIEnv *env, jclass clazz, jint programObj, jint index, jint maxLength, jlong length, jlong size, jlong type, jlong name, jlong function_pointer) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLint *size_address = (GLint *)(intptr_t)size; + GLenum *type_address = (GLenum *)(intptr_t)type; + GLcharARB *name_address = (GLcharARB *)(intptr_t)name; + glGetActiveAttribARBPROC glGetActiveAttribARB = (glGetActiveAttribARBPROC)((intptr_t)function_pointer); + glGetActiveAttribARB(programObj, index, maxLength, length_address, size_address, type_address, name_address); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglGetAttribLocationARB(JNIEnv *env, jclass clazz, jint programObj, jlong name, jlong function_pointer) { + const GLcharARB *name_address = (const GLcharARB *)(intptr_t)name; + glGetAttribLocationARBPROC glGetAttribLocationARB = (glGetAttribLocationARBPROC)((intptr_t)function_pointer); + GLint __result = glGetAttribLocationARB(programObj, name_address); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglGetVertexAttribfvARB(JNIEnv *env, jclass clazz, jint index, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetVertexAttribfvARBPROC glGetVertexAttribfvARB = (glGetVertexAttribfvARBPROC)((intptr_t)function_pointer); + glGetVertexAttribfvARB(index, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglGetVertexAttribdvARB(JNIEnv *env, jclass clazz, jint index, jint pname, jlong params, jlong function_pointer) { + GLdouble *params_address = (GLdouble *)(intptr_t)params; + glGetVertexAttribdvARBPROC glGetVertexAttribdvARB = (glGetVertexAttribdvARBPROC)((intptr_t)function_pointer); + glGetVertexAttribdvARB(index, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglGetVertexAttribivARB(JNIEnv *env, jclass clazz, jint index, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetVertexAttribivARBPROC glGetVertexAttribivARB = (glGetVertexAttribivARBPROC)((intptr_t)function_pointer); + glGetVertexAttribivARB(index, pname, params_address); +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_ARBVertexShader_nglGetVertexAttribPointervARB(JNIEnv *env, jclass clazz, jint index, jint pname, jlong result_size, jlong function_pointer) { + glGetVertexAttribPointervARBPROC glGetVertexAttribPointervARB = (glGetVertexAttribPointervARBPROC)((intptr_t)function_pointer); + GLvoid * __result; + glGetVertexAttribPointervARB(index, pname, &__result); + return safeNewBuffer(env, __result, result_size); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBWindowPos.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBWindowPos.c new file mode 100644 index 0000000..68862db --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ARBWindowPos.c @@ -0,0 +1,54 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glWindowPos2fARBPROC) (GLfloat x, GLfloat y); +typedef void (APIENTRY *glWindowPos2dARBPROC) (GLdouble x, GLdouble y); +typedef void (APIENTRY *glWindowPos2iARBPROC) (GLint x, GLint y); +typedef void (APIENTRY *glWindowPos2sARBPROC) (GLshort x, GLshort y); +typedef void (APIENTRY *glWindowPos3fARBPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRY *glWindowPos3dARBPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRY *glWindowPos3iARBPROC) (GLint x, GLint y, GLint z); +typedef void (APIENTRY *glWindowPos3sARBPROC) (GLshort x, GLshort y, GLshort z); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBWindowPos_nglWindowPos2fARB(JNIEnv *env, jclass clazz, jfloat x, jfloat y, jlong function_pointer) { + glWindowPos2fARBPROC glWindowPos2fARB = (glWindowPos2fARBPROC)((intptr_t)function_pointer); + glWindowPos2fARB(x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBWindowPos_nglWindowPos2dARB(JNIEnv *env, jclass clazz, jdouble x, jdouble y, jlong function_pointer) { + glWindowPos2dARBPROC glWindowPos2dARB = (glWindowPos2dARBPROC)((intptr_t)function_pointer); + glWindowPos2dARB(x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBWindowPos_nglWindowPos2iARB(JNIEnv *env, jclass clazz, jint x, jint y, jlong function_pointer) { + glWindowPos2iARBPROC glWindowPos2iARB = (glWindowPos2iARBPROC)((intptr_t)function_pointer); + glWindowPos2iARB(x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBWindowPos_nglWindowPos2sARB(JNIEnv *env, jclass clazz, jshort x, jshort y, jlong function_pointer) { + glWindowPos2sARBPROC glWindowPos2sARB = (glWindowPos2sARBPROC)((intptr_t)function_pointer); + glWindowPos2sARB(x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBWindowPos_nglWindowPos3fARB(JNIEnv *env, jclass clazz, jfloat x, jfloat y, jfloat z, jlong function_pointer) { + glWindowPos3fARBPROC glWindowPos3fARB = (glWindowPos3fARBPROC)((intptr_t)function_pointer); + glWindowPos3fARB(x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBWindowPos_nglWindowPos3dARB(JNIEnv *env, jclass clazz, jdouble x, jdouble y, jdouble z, jlong function_pointer) { + glWindowPos3dARBPROC glWindowPos3dARB = (glWindowPos3dARBPROC)((intptr_t)function_pointer); + glWindowPos3dARB(x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBWindowPos_nglWindowPos3iARB(JNIEnv *env, jclass clazz, jint x, jint y, jint z, jlong function_pointer) { + glWindowPos3iARBPROC glWindowPos3iARB = (glWindowPos3iARBPROC)((intptr_t)function_pointer); + glWindowPos3iARB(x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ARBWindowPos_nglWindowPos3sARB(JNIEnv *env, jclass clazz, jshort x, jshort y, jshort z, jlong function_pointer) { + glWindowPos3sARBPROC glWindowPos3sARB = (glWindowPos3sARBPROC)((intptr_t)function_pointer); + glWindowPos3sARB(x, y, z); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATIDrawBuffers.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATIDrawBuffers.c new file mode 100644 index 0000000..48b900a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATIDrawBuffers.c @@ -0,0 +1,13 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glDrawBuffersATIPROC) (GLsizei size, const GLenum * buffers); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIDrawBuffers_nglDrawBuffersATI(JNIEnv *env, jclass clazz, jint size, jlong buffers, jlong function_pointer) { + const GLenum *buffers_address = (const GLenum *)(intptr_t)buffers; + glDrawBuffersATIPROC glDrawBuffersATI = (glDrawBuffersATIPROC)((intptr_t)function_pointer); + glDrawBuffersATI(size, buffers_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATIElementArray.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATIElementArray.c new file mode 100644 index 0000000..7598486 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATIElementArray.c @@ -0,0 +1,25 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glElementPointerATIPROC) (GLenum type, const GLvoid * pPointer); +typedef void (APIENTRY *glDrawElementArrayATIPROC) (GLenum mode, GLsizei count); +typedef void (APIENTRY *glDrawRangeElementArrayATIPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIElementArray_nglElementPointerATI(JNIEnv *env, jclass clazz, jint type, jlong pPointer, jlong function_pointer) { + const GLvoid *pPointer_address = (const GLvoid *)(intptr_t)pPointer; + glElementPointerATIPROC glElementPointerATI = (glElementPointerATIPROC)((intptr_t)function_pointer); + glElementPointerATI(type, pPointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIElementArray_nglDrawElementArrayATI(JNIEnv *env, jclass clazz, jint mode, jint count, jlong function_pointer) { + glDrawElementArrayATIPROC glDrawElementArrayATI = (glDrawElementArrayATIPROC)((intptr_t)function_pointer); + glDrawElementArrayATI(mode, count); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIElementArray_nglDrawRangeElementArrayATI(JNIEnv *env, jclass clazz, jint mode, jint start, jint end, jint count, jlong function_pointer) { + glDrawRangeElementArrayATIPROC glDrawRangeElementArrayATI = (glDrawRangeElementArrayATIPROC)((intptr_t)function_pointer); + glDrawRangeElementArrayATI(mode, start, end, count); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATIEnvmapBumpmap.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATIEnvmapBumpmap.c new file mode 100644 index 0000000..b13211b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATIEnvmapBumpmap.c @@ -0,0 +1,34 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glTexBumpParameterfvATIPROC) (GLenum pname, const GLfloat * param); +typedef void (APIENTRY *glTexBumpParameterivATIPROC) (GLenum pname, const GLint * param); +typedef void (APIENTRY *glGetTexBumpParameterfvATIPROC) (GLenum pname, GLfloat * param); +typedef void (APIENTRY *glGetTexBumpParameterivATIPROC) (GLenum pname, GLint * param); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIEnvmapBumpmap_nglTexBumpParameterfvATI(JNIEnv *env, jclass clazz, jint pname, jlong param, jlong function_pointer) { + const GLfloat *param_address = (const GLfloat *)(intptr_t)param; + glTexBumpParameterfvATIPROC glTexBumpParameterfvATI = (glTexBumpParameterfvATIPROC)((intptr_t)function_pointer); + glTexBumpParameterfvATI(pname, param_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIEnvmapBumpmap_nglTexBumpParameterivATI(JNIEnv *env, jclass clazz, jint pname, jlong param, jlong function_pointer) { + const GLint *param_address = (const GLint *)(intptr_t)param; + glTexBumpParameterivATIPROC glTexBumpParameterivATI = (glTexBumpParameterivATIPROC)((intptr_t)function_pointer); + glTexBumpParameterivATI(pname, param_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIEnvmapBumpmap_nglGetTexBumpParameterfvATI(JNIEnv *env, jclass clazz, jint pname, jlong param, jlong function_pointer) { + GLfloat *param_address = (GLfloat *)(intptr_t)param; + glGetTexBumpParameterfvATIPROC glGetTexBumpParameterfvATI = (glGetTexBumpParameterfvATIPROC)((intptr_t)function_pointer); + glGetTexBumpParameterfvATI(pname, param_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIEnvmapBumpmap_nglGetTexBumpParameterivATI(JNIEnv *env, jclass clazz, jint pname, jlong param, jlong function_pointer) { + GLint *param_address = (GLint *)(intptr_t)param; + glGetTexBumpParameterivATIPROC glGetTexBumpParameterivATI = (glGetTexBumpParameterivATIPROC)((intptr_t)function_pointer); + glGetTexBumpParameterivATI(pname, param_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATIFragmentShader.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATIFragmentShader.c new file mode 100644 index 0000000..abe1cf1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATIFragmentShader.c @@ -0,0 +1,92 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GLuint (APIENTRY *glGenFragmentShadersATIPROC) (GLuint range); +typedef void (APIENTRY *glBindFragmentShaderATIPROC) (GLuint id); +typedef void (APIENTRY *glDeleteFragmentShaderATIPROC) (GLuint id); +typedef void (APIENTRY *glBeginFragmentShaderATIPROC) (); +typedef void (APIENTRY *glEndFragmentShaderATIPROC) (); +typedef void (APIENTRY *glPassTexCoordATIPROC) (GLuint dst, GLuint coord, GLenum swizzle); +typedef void (APIENTRY *glSampleMapATIPROC) (GLuint dst, GLuint interp, GLenum swizzle); +typedef void (APIENTRY *glColorFragmentOp1ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +typedef void (APIENTRY *glColorFragmentOp2ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +typedef void (APIENTRY *glColorFragmentOp3ATIPROC) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +typedef void (APIENTRY *glAlphaFragmentOp1ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); +typedef void (APIENTRY *glAlphaFragmentOp2ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); +typedef void (APIENTRY *glAlphaFragmentOp3ATIPROC) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); +typedef void (APIENTRY *glSetFragmentShaderConstantATIPROC) (GLuint dst, const GLfloat * pfValue); + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_ATIFragmentShader_nglGenFragmentShadersATI(JNIEnv *env, jclass clazz, jint range, jlong function_pointer) { + glGenFragmentShadersATIPROC glGenFragmentShadersATI = (glGenFragmentShadersATIPROC)((intptr_t)function_pointer); + GLuint __result = glGenFragmentShadersATI(range); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIFragmentShader_nglBindFragmentShaderATI(JNIEnv *env, jclass clazz, jint id, jlong function_pointer) { + glBindFragmentShaderATIPROC glBindFragmentShaderATI = (glBindFragmentShaderATIPROC)((intptr_t)function_pointer); + glBindFragmentShaderATI(id); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIFragmentShader_nglDeleteFragmentShaderATI(JNIEnv *env, jclass clazz, jint id, jlong function_pointer) { + glDeleteFragmentShaderATIPROC glDeleteFragmentShaderATI = (glDeleteFragmentShaderATIPROC)((intptr_t)function_pointer); + glDeleteFragmentShaderATI(id); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIFragmentShader_nglBeginFragmentShaderATI(JNIEnv *env, jclass clazz, jlong function_pointer) { + glBeginFragmentShaderATIPROC glBeginFragmentShaderATI = (glBeginFragmentShaderATIPROC)((intptr_t)function_pointer); + glBeginFragmentShaderATI(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIFragmentShader_nglEndFragmentShaderATI(JNIEnv *env, jclass clazz, jlong function_pointer) { + glEndFragmentShaderATIPROC glEndFragmentShaderATI = (glEndFragmentShaderATIPROC)((intptr_t)function_pointer); + glEndFragmentShaderATI(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIFragmentShader_nglPassTexCoordATI(JNIEnv *env, jclass clazz, jint dst, jint coord, jint swizzle, jlong function_pointer) { + glPassTexCoordATIPROC glPassTexCoordATI = (glPassTexCoordATIPROC)((intptr_t)function_pointer); + glPassTexCoordATI(dst, coord, swizzle); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIFragmentShader_nglSampleMapATI(JNIEnv *env, jclass clazz, jint dst, jint interp, jint swizzle, jlong function_pointer) { + glSampleMapATIPROC glSampleMapATI = (glSampleMapATIPROC)((intptr_t)function_pointer); + glSampleMapATI(dst, interp, swizzle); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIFragmentShader_nglColorFragmentOp1ATI(JNIEnv *env, jclass clazz, jint op, jint dst, jint dstMask, jint dstMod, jint arg1, jint arg1Rep, jint arg1Mod, jlong function_pointer) { + glColorFragmentOp1ATIPROC glColorFragmentOp1ATI = (glColorFragmentOp1ATIPROC)((intptr_t)function_pointer); + glColorFragmentOp1ATI(op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIFragmentShader_nglColorFragmentOp2ATI(JNIEnv *env, jclass clazz, jint op, jint dst, jint dstMask, jint dstMod, jint arg1, jint arg1Rep, jint arg1Mod, jint arg2, jint arg2Rep, jint arg2Mod, jlong function_pointer) { + glColorFragmentOp2ATIPROC glColorFragmentOp2ATI = (glColorFragmentOp2ATIPROC)((intptr_t)function_pointer); + glColorFragmentOp2ATI(op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIFragmentShader_nglColorFragmentOp3ATI(JNIEnv *env, jclass clazz, jint op, jint dst, jint dstMask, jint dstMod, jint arg1, jint arg1Rep, jint arg1Mod, jint arg2, jint arg2Rep, jint arg2Mod, jint arg3, jint arg3Rep, jint arg3Mod, jlong function_pointer) { + glColorFragmentOp3ATIPROC glColorFragmentOp3ATI = (glColorFragmentOp3ATIPROC)((intptr_t)function_pointer); + glColorFragmentOp3ATI(op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIFragmentShader_nglAlphaFragmentOp1ATI(JNIEnv *env, jclass clazz, jint op, jint dst, jint dstMod, jint arg1, jint arg1Rep, jint arg1Mod, jlong function_pointer) { + glAlphaFragmentOp1ATIPROC glAlphaFragmentOp1ATI = (glAlphaFragmentOp1ATIPROC)((intptr_t)function_pointer); + glAlphaFragmentOp1ATI(op, dst, dstMod, arg1, arg1Rep, arg1Mod); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIFragmentShader_nglAlphaFragmentOp2ATI(JNIEnv *env, jclass clazz, jint op, jint dst, jint dstMod, jint arg1, jint arg1Rep, jint arg1Mod, jint arg2, jint arg2Rep, jint arg2Mod, jlong function_pointer) { + glAlphaFragmentOp2ATIPROC glAlphaFragmentOp2ATI = (glAlphaFragmentOp2ATIPROC)((intptr_t)function_pointer); + glAlphaFragmentOp2ATI(op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIFragmentShader_nglAlphaFragmentOp3ATI(JNIEnv *env, jclass clazz, jint op, jint dst, jint dstMod, jint arg1, jint arg1Rep, jint arg1Mod, jint arg2, jint arg2Rep, jint arg2Mod, jint arg3, jint arg3Rep, jint arg3Mod, jlong function_pointer) { + glAlphaFragmentOp3ATIPROC glAlphaFragmentOp3ATI = (glAlphaFragmentOp3ATIPROC)((intptr_t)function_pointer); + glAlphaFragmentOp3ATI(op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIFragmentShader_nglSetFragmentShaderConstantATI(JNIEnv *env, jclass clazz, jint dst, jlong pfValue, jlong function_pointer) { + const GLfloat *pfValue_address = (const GLfloat *)(intptr_t)pfValue; + glSetFragmentShaderConstantATIPROC glSetFragmentShaderConstantATI = (glSetFragmentShaderConstantATIPROC)((intptr_t)function_pointer); + glSetFragmentShaderConstantATI(dst, pfValue_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATIMapObjectBuffer.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATIMapObjectBuffer.c new file mode 100644 index 0000000..6750891 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATIMapObjectBuffer.c @@ -0,0 +1,19 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GLvoid * (APIENTRY *glMapObjectBufferATIPROC) (GLuint buffer); +typedef void (APIENTRY *glUnmapObjectBufferATIPROC) (GLuint buffer); + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_ATIMapObjectBuffer_nglMapObjectBufferATI(JNIEnv *env, jclass clazz, jint buffer, jlong result_size, jobject old_buffer, jlong function_pointer) { + glMapObjectBufferATIPROC glMapObjectBufferATI = (glMapObjectBufferATIPROC)((intptr_t)function_pointer); + GLvoid * __result = glMapObjectBufferATI(buffer); + return safeNewBufferCached(env, __result, result_size, old_buffer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIMapObjectBuffer_nglUnmapObjectBufferATI(JNIEnv *env, jclass clazz, jint buffer, jlong function_pointer) { + glUnmapObjectBufferATIPROC glUnmapObjectBufferATI = (glUnmapObjectBufferATIPROC)((intptr_t)function_pointer); + glUnmapObjectBufferATI(buffer); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATIPnTriangles.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATIPnTriangles.c new file mode 100644 index 0000000..fbf3819 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATIPnTriangles.c @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glPNTrianglesfATIPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRY *glPNTrianglesiATIPROC) (GLenum pname, GLint param); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIPnTriangles_nglPNTrianglesfATI(JNIEnv *env, jclass clazz, jint pname, jfloat param, jlong function_pointer) { + glPNTrianglesfATIPROC glPNTrianglesfATI = (glPNTrianglesfATIPROC)((intptr_t)function_pointer); + glPNTrianglesfATI(pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIPnTriangles_nglPNTrianglesiATI(JNIEnv *env, jclass clazz, jint pname, jint param, jlong function_pointer) { + glPNTrianglesiATIPROC glPNTrianglesiATI = (glPNTrianglesiATIPROC)((intptr_t)function_pointer); + glPNTrianglesiATI(pname, param); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATISeparateStencil.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATISeparateStencil.c new file mode 100644 index 0000000..ae1f2cd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATISeparateStencil.c @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glStencilOpSeparateATIPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +typedef void (APIENTRY *glStencilFuncSeparateATIPROC) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATISeparateStencil_nglStencilOpSeparateATI(JNIEnv *env, jclass clazz, jint face, jint sfail, jint dpfail, jint dppass, jlong function_pointer) { + glStencilOpSeparateATIPROC glStencilOpSeparateATI = (glStencilOpSeparateATIPROC)((intptr_t)function_pointer); + glStencilOpSeparateATI(face, sfail, dpfail, dppass); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATISeparateStencil_nglStencilFuncSeparateATI(JNIEnv *env, jclass clazz, jint frontfunc, jint backfunc, jint ref, jint mask, jlong function_pointer) { + glStencilFuncSeparateATIPROC glStencilFuncSeparateATI = (glStencilFuncSeparateATIPROC)((intptr_t)function_pointer); + glStencilFuncSeparateATI(frontfunc, backfunc, ref, mask); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATIVertexArrayObject.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATIVertexArrayObject.c new file mode 100644 index 0000000..3a99ffd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATIVertexArrayObject.c @@ -0,0 +1,88 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GLuint (APIENTRY *glNewObjectBufferATIPROC) (GLsizei size, const GLvoid * pPointer, GLenum usage); +typedef GLboolean (APIENTRY *glIsObjectBufferATIPROC) (GLuint buffer); +typedef void (APIENTRY *glUpdateObjectBufferATIPROC) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid * pPointer, GLenum preserve); +typedef void (APIENTRY *glGetObjectBufferfvATIPROC) (GLuint buffer, GLenum pname, GLfloat * params); +typedef void (APIENTRY *glGetObjectBufferivATIPROC) (GLuint buffer, GLenum pname, GLint * params); +typedef void (APIENTRY *glFreeObjectBufferATIPROC) (GLuint buffer); +typedef void (APIENTRY *glArrayObjectATIPROC) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +typedef void (APIENTRY *glGetArrayObjectfvATIPROC) (GLenum array, GLenum pname, GLfloat * params); +typedef void (APIENTRY *glGetArrayObjectivATIPROC) (GLenum array, GLenum pname, GLint * params); +typedef void (APIENTRY *glVariantArrayObjectATIPROC) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); +typedef void (APIENTRY *glGetVariantArrayObjectfvATIPROC) (GLuint id, GLenum pname, GLfloat * params); +typedef void (APIENTRY *glGetVariantArrayObjectivATIPROC) (GLuint id, GLenum pname, GLint * params); + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_ATIVertexArrayObject_nglNewObjectBufferATI(JNIEnv *env, jclass clazz, jint size, jlong pPointer, jint usage, jlong function_pointer) { + const GLvoid *pPointer_address = (const GLvoid *)(intptr_t)pPointer; + glNewObjectBufferATIPROC glNewObjectBufferATI = (glNewObjectBufferATIPROC)((intptr_t)function_pointer); + GLuint __result = glNewObjectBufferATI(size, pPointer_address, usage); + return __result; +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_ATIVertexArrayObject_nglIsObjectBufferATI(JNIEnv *env, jclass clazz, jint buffer, jlong function_pointer) { + glIsObjectBufferATIPROC glIsObjectBufferATI = (glIsObjectBufferATIPROC)((intptr_t)function_pointer); + GLboolean __result = glIsObjectBufferATI(buffer); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexArrayObject_nglUpdateObjectBufferATI(JNIEnv *env, jclass clazz, jint buffer, jint offset, jint size, jlong pPointer, jint preserve, jlong function_pointer) { + const GLvoid *pPointer_address = (const GLvoid *)(intptr_t)pPointer; + glUpdateObjectBufferATIPROC glUpdateObjectBufferATI = (glUpdateObjectBufferATIPROC)((intptr_t)function_pointer); + glUpdateObjectBufferATI(buffer, offset, size, pPointer_address, preserve); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexArrayObject_nglGetObjectBufferfvATI(JNIEnv *env, jclass clazz, jint buffer, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetObjectBufferfvATIPROC glGetObjectBufferfvATI = (glGetObjectBufferfvATIPROC)((intptr_t)function_pointer); + glGetObjectBufferfvATI(buffer, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexArrayObject_nglGetObjectBufferivATI(JNIEnv *env, jclass clazz, jint buffer, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetObjectBufferivATIPROC glGetObjectBufferivATI = (glGetObjectBufferivATIPROC)((intptr_t)function_pointer); + glGetObjectBufferivATI(buffer, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexArrayObject_nglFreeObjectBufferATI(JNIEnv *env, jclass clazz, jint buffer, jlong function_pointer) { + glFreeObjectBufferATIPROC glFreeObjectBufferATI = (glFreeObjectBufferATIPROC)((intptr_t)function_pointer); + glFreeObjectBufferATI(buffer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexArrayObject_nglArrayObjectATI(JNIEnv *env, jclass clazz, jint array, jint size, jint type, jint stride, jint buffer, jint offset, jlong function_pointer) { + glArrayObjectATIPROC glArrayObjectATI = (glArrayObjectATIPROC)((intptr_t)function_pointer); + glArrayObjectATI(array, size, type, stride, buffer, offset); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexArrayObject_nglGetArrayObjectfvATI(JNIEnv *env, jclass clazz, jint array, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetArrayObjectfvATIPROC glGetArrayObjectfvATI = (glGetArrayObjectfvATIPROC)((intptr_t)function_pointer); + glGetArrayObjectfvATI(array, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexArrayObject_nglGetArrayObjectivATI(JNIEnv *env, jclass clazz, jint array, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetArrayObjectivATIPROC glGetArrayObjectivATI = (glGetArrayObjectivATIPROC)((intptr_t)function_pointer); + glGetArrayObjectivATI(array, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexArrayObject_nglVariantArrayObjectATI(JNIEnv *env, jclass clazz, jint id, jint type, jint stride, jint buffer, jint offset, jlong function_pointer) { + glVariantArrayObjectATIPROC glVariantArrayObjectATI = (glVariantArrayObjectATIPROC)((intptr_t)function_pointer); + glVariantArrayObjectATI(id, type, stride, buffer, offset); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexArrayObject_nglGetVariantArrayObjectfvATI(JNIEnv *env, jclass clazz, jint id, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetVariantArrayObjectfvATIPROC glGetVariantArrayObjectfvATI = (glGetVariantArrayObjectfvATIPROC)((intptr_t)function_pointer); + glGetVariantArrayObjectfvATI(id, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexArrayObject_nglGetVariantArrayObjectivATI(JNIEnv *env, jclass clazz, jint id, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetVariantArrayObjectivATIPROC glGetVariantArrayObjectivATI = (glGetVariantArrayObjectivATIPROC)((intptr_t)function_pointer); + glGetVariantArrayObjectivATI(id, pname, params_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATIVertexAttribArrayObject.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATIVertexAttribArrayObject.c new file mode 100644 index 0000000..bc69207 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATIVertexAttribArrayObject.c @@ -0,0 +1,26 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glVertexAttribArrayObjectATIPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); +typedef void (APIENTRY *glGetVertexAttribArrayObjectfvATIPROC) (GLuint index, GLenum pname, GLfloat * params); +typedef void (APIENTRY *glGetVertexAttribArrayObjectivATIPROC) (GLuint index, GLenum pname, GLint * params); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexAttribArrayObject_nglVertexAttribArrayObjectATI(JNIEnv *env, jclass clazz, jint index, jint size, jint type, jboolean normalized, jint stride, jint buffer, jint offset, jlong function_pointer) { + glVertexAttribArrayObjectATIPROC glVertexAttribArrayObjectATI = (glVertexAttribArrayObjectATIPROC)((intptr_t)function_pointer); + glVertexAttribArrayObjectATI(index, size, type, normalized, stride, buffer, offset); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexAttribArrayObject_nglGetVertexAttribArrayObjectfvATI(JNIEnv *env, jclass clazz, jint index, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetVertexAttribArrayObjectfvATIPROC glGetVertexAttribArrayObjectfvATI = (glGetVertexAttribArrayObjectfvATIPROC)((intptr_t)function_pointer); + glGetVertexAttribArrayObjectfvATI(index, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexAttribArrayObject_nglGetVertexAttribArrayObjectivATI(JNIEnv *env, jclass clazz, jint index, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetVertexAttribArrayObjectivATIPROC glGetVertexAttribArrayObjectivATI = (glGetVertexAttribArrayObjectivATIPROC)((intptr_t)function_pointer); + glGetVertexAttribArrayObjectivATI(index, pname, params_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATIVertexStreams.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATIVertexStreams.c new file mode 100644 index 0000000..8820c6d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_ATIVertexStreams.c @@ -0,0 +1,126 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glVertexStream2fATIPROC) (GLenum stream, GLfloat x, GLfloat y); +typedef void (APIENTRY *glVertexStream2dATIPROC) (GLenum stream, GLdouble x, GLdouble y); +typedef void (APIENTRY *glVertexStream2iATIPROC) (GLenum stream, GLint x, GLint y); +typedef void (APIENTRY *glVertexStream2sATIPROC) (GLenum stream, GLshort x, GLshort y); +typedef void (APIENTRY *glVertexStream3fATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRY *glVertexStream3dATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRY *glVertexStream3iATIPROC) (GLenum stream, GLint x, GLint y, GLint z); +typedef void (APIENTRY *glVertexStream3sATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRY *glVertexStream4fATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRY *glVertexStream4dATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRY *glVertexStream4iATIPROC) (GLenum stream, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRY *glVertexStream4sATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRY *glNormalStream3bATIPROC) (GLenum stream, GLbyte x, GLbyte y, GLbyte z); +typedef void (APIENTRY *glNormalStream3fATIPROC) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRY *glNormalStream3dATIPROC) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRY *glNormalStream3iATIPROC) (GLenum stream, GLint x, GLint y, GLint z); +typedef void (APIENTRY *glNormalStream3sATIPROC) (GLenum stream, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRY *glClientActiveVertexStreamATIPROC) (GLenum stream); +typedef void (APIENTRY *glVertexBlendEnvfATIPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRY *glVertexBlendEnviATIPROC) (GLenum pname, GLint param); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexStreams_nglVertexStream2fATI(JNIEnv *env, jclass clazz, jint stream, jfloat x, jfloat y, jlong function_pointer) { + glVertexStream2fATIPROC glVertexStream2fATI = (glVertexStream2fATIPROC)((intptr_t)function_pointer); + glVertexStream2fATI(stream, x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexStreams_nglVertexStream2dATI(JNIEnv *env, jclass clazz, jint stream, jdouble x, jdouble y, jlong function_pointer) { + glVertexStream2dATIPROC glVertexStream2dATI = (glVertexStream2dATIPROC)((intptr_t)function_pointer); + glVertexStream2dATI(stream, x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexStreams_nglVertexStream2iATI(JNIEnv *env, jclass clazz, jint stream, jint x, jint y, jlong function_pointer) { + glVertexStream2iATIPROC glVertexStream2iATI = (glVertexStream2iATIPROC)((intptr_t)function_pointer); + glVertexStream2iATI(stream, x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexStreams_nglVertexStream2sATI(JNIEnv *env, jclass clazz, jint stream, jshort x, jshort y, jlong function_pointer) { + glVertexStream2sATIPROC glVertexStream2sATI = (glVertexStream2sATIPROC)((intptr_t)function_pointer); + glVertexStream2sATI(stream, x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexStreams_nglVertexStream3fATI(JNIEnv *env, jclass clazz, jint stream, jfloat x, jfloat y, jfloat z, jlong function_pointer) { + glVertexStream3fATIPROC glVertexStream3fATI = (glVertexStream3fATIPROC)((intptr_t)function_pointer); + glVertexStream3fATI(stream, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexStreams_nglVertexStream3dATI(JNIEnv *env, jclass clazz, jint stream, jdouble x, jdouble y, jdouble z, jlong function_pointer) { + glVertexStream3dATIPROC glVertexStream3dATI = (glVertexStream3dATIPROC)((intptr_t)function_pointer); + glVertexStream3dATI(stream, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexStreams_nglVertexStream3iATI(JNIEnv *env, jclass clazz, jint stream, jint x, jint y, jint z, jlong function_pointer) { + glVertexStream3iATIPROC glVertexStream3iATI = (glVertexStream3iATIPROC)((intptr_t)function_pointer); + glVertexStream3iATI(stream, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexStreams_nglVertexStream3sATI(JNIEnv *env, jclass clazz, jint stream, jshort x, jshort y, jshort z, jlong function_pointer) { + glVertexStream3sATIPROC glVertexStream3sATI = (glVertexStream3sATIPROC)((intptr_t)function_pointer); + glVertexStream3sATI(stream, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexStreams_nglVertexStream4fATI(JNIEnv *env, jclass clazz, jint stream, jfloat x, jfloat y, jfloat z, jfloat w, jlong function_pointer) { + glVertexStream4fATIPROC glVertexStream4fATI = (glVertexStream4fATIPROC)((intptr_t)function_pointer); + glVertexStream4fATI(stream, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexStreams_nglVertexStream4dATI(JNIEnv *env, jclass clazz, jint stream, jdouble x, jdouble y, jdouble z, jdouble w, jlong function_pointer) { + glVertexStream4dATIPROC glVertexStream4dATI = (glVertexStream4dATIPROC)((intptr_t)function_pointer); + glVertexStream4dATI(stream, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexStreams_nglVertexStream4iATI(JNIEnv *env, jclass clazz, jint stream, jint x, jint y, jint z, jint w, jlong function_pointer) { + glVertexStream4iATIPROC glVertexStream4iATI = (glVertexStream4iATIPROC)((intptr_t)function_pointer); + glVertexStream4iATI(stream, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexStreams_nglVertexStream4sATI(JNIEnv *env, jclass clazz, jint stream, jshort x, jshort y, jshort z, jshort w, jlong function_pointer) { + glVertexStream4sATIPROC glVertexStream4sATI = (glVertexStream4sATIPROC)((intptr_t)function_pointer); + glVertexStream4sATI(stream, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexStreams_nglNormalStream3bATI(JNIEnv *env, jclass clazz, jint stream, jbyte x, jbyte y, jbyte z, jlong function_pointer) { + glNormalStream3bATIPROC glNormalStream3bATI = (glNormalStream3bATIPROC)((intptr_t)function_pointer); + glNormalStream3bATI(stream, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexStreams_nglNormalStream3fATI(JNIEnv *env, jclass clazz, jint stream, jfloat x, jfloat y, jfloat z, jlong function_pointer) { + glNormalStream3fATIPROC glNormalStream3fATI = (glNormalStream3fATIPROC)((intptr_t)function_pointer); + glNormalStream3fATI(stream, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexStreams_nglNormalStream3dATI(JNIEnv *env, jclass clazz, jint stream, jdouble x, jdouble y, jdouble z, jlong function_pointer) { + glNormalStream3dATIPROC glNormalStream3dATI = (glNormalStream3dATIPROC)((intptr_t)function_pointer); + glNormalStream3dATI(stream, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexStreams_nglNormalStream3iATI(JNIEnv *env, jclass clazz, jint stream, jint x, jint y, jint z, jlong function_pointer) { + glNormalStream3iATIPROC glNormalStream3iATI = (glNormalStream3iATIPROC)((intptr_t)function_pointer); + glNormalStream3iATI(stream, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexStreams_nglNormalStream3sATI(JNIEnv *env, jclass clazz, jint stream, jshort x, jshort y, jshort z, jlong function_pointer) { + glNormalStream3sATIPROC glNormalStream3sATI = (glNormalStream3sATIPROC)((intptr_t)function_pointer); + glNormalStream3sATI(stream, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexStreams_nglClientActiveVertexStreamATI(JNIEnv *env, jclass clazz, jint stream, jlong function_pointer) { + glClientActiveVertexStreamATIPROC glClientActiveVertexStreamATI = (glClientActiveVertexStreamATIPROC)((intptr_t)function_pointer); + glClientActiveVertexStreamATI(stream); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexStreams_nglVertexBlendEnvfATI(JNIEnv *env, jclass clazz, jint pname, jfloat param, jlong function_pointer) { + glVertexBlendEnvfATIPROC glVertexBlendEnvfATI = (glVertexBlendEnvfATIPROC)((intptr_t)function_pointer); + glVertexBlendEnvfATI(pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_ATIVertexStreams_nglVertexBlendEnviATI(JNIEnv *env, jclass clazz, jint pname, jint param, jlong function_pointer) { + glVertexBlendEnviATIPROC glVertexBlendEnviATI = (glVertexBlendEnviATIPROC)((intptr_t)function_pointer); + glVertexBlendEnviATI(pname, param); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTBindableUniform.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTBindableUniform.c new file mode 100644 index 0000000..23bbfeb --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTBindableUniform.c @@ -0,0 +1,26 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glUniformBufferEXTPROC) (GLuint program, GLint location, GLuint buffer); +typedef GLint (APIENTRY *glGetUniformBufferSizeEXTPROC) (GLuint program, GLint location); +typedef GLintptr (APIENTRY *glGetUniformOffsetEXTPROC) (GLuint program, GLint location); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTBindableUniform_nglUniformBufferEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint buffer, jlong function_pointer) { + glUniformBufferEXTPROC glUniformBufferEXT = (glUniformBufferEXTPROC)((intptr_t)function_pointer); + glUniformBufferEXT(program, location, buffer); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_EXTBindableUniform_nglGetUniformBufferSizeEXT(JNIEnv *env, jclass clazz, jint program, jint location, jlong function_pointer) { + glGetUniformBufferSizeEXTPROC glGetUniformBufferSizeEXT = (glGetUniformBufferSizeEXTPROC)((intptr_t)function_pointer); + GLint __result = glGetUniformBufferSizeEXT(program, location); + return __result; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_EXTBindableUniform_nglGetUniformOffsetEXT(JNIEnv *env, jclass clazz, jint program, jint location, jlong function_pointer) { + glGetUniformOffsetEXTPROC glGetUniformOffsetEXT = (glGetUniformOffsetEXTPROC)((intptr_t)function_pointer); + GLintptr __result = glGetUniformOffsetEXT(program, location); + return __result; +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTBlendColor.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTBlendColor.c new file mode 100644 index 0000000..a10457e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTBlendColor.c @@ -0,0 +1,12 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glBlendColorEXTPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTBlendColor_nglBlendColorEXT(JNIEnv *env, jclass clazz, jfloat red, jfloat green, jfloat blue, jfloat alpha, jlong function_pointer) { + glBlendColorEXTPROC glBlendColorEXT = (glBlendColorEXTPROC)((intptr_t)function_pointer); + glBlendColorEXT(red, green, blue, alpha); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTBlendEquationSeparate.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTBlendEquationSeparate.c new file mode 100644 index 0000000..ab5f451 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTBlendEquationSeparate.c @@ -0,0 +1,12 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glBlendEquationSeparateEXTPROC) (GLenum modeRGB, GLenum modeAlpha); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTBlendEquationSeparate_nglBlendEquationSeparateEXT(JNIEnv *env, jclass clazz, jint modeRGB, jint modeAlpha, jlong function_pointer) { + glBlendEquationSeparateEXTPROC glBlendEquationSeparateEXT = (glBlendEquationSeparateEXTPROC)((intptr_t)function_pointer); + glBlendEquationSeparateEXT(modeRGB, modeAlpha); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTBlendFuncSeparate.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTBlendFuncSeparate.c new file mode 100644 index 0000000..9b32589 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTBlendFuncSeparate.c @@ -0,0 +1,12 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glBlendFuncSeparateEXTPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTBlendFuncSeparate_nglBlendFuncSeparateEXT(JNIEnv *env, jclass clazz, jint sfactorRGB, jint dfactorRGB, jint sfactorAlpha, jint dfactorAlpha, jlong function_pointer) { + glBlendFuncSeparateEXTPROC glBlendFuncSeparateEXT = (glBlendFuncSeparateEXTPROC)((intptr_t)function_pointer); + glBlendFuncSeparateEXT(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTBlendMinmax.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTBlendMinmax.c new file mode 100644 index 0000000..8caedb9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTBlendMinmax.c @@ -0,0 +1,12 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glBlendEquationEXTPROC) (GLenum mode); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTBlendMinmax_nglBlendEquationEXT(JNIEnv *env, jclass clazz, jint mode, jlong function_pointer) { + glBlendEquationEXTPROC glBlendEquationEXT = (glBlendEquationEXTPROC)((intptr_t)function_pointer); + glBlendEquationEXT(mode); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTCompiledVertexArray.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTCompiledVertexArray.c new file mode 100644 index 0000000..905a7b9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTCompiledVertexArray.c @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glLockArraysEXTPROC) (GLint first, GLsizei count); +typedef void (APIENTRY *glUnlockArraysEXTPROC) (); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTCompiledVertexArray_nglLockArraysEXT(JNIEnv *env, jclass clazz, jint first, jint count, jlong function_pointer) { + glLockArraysEXTPROC glLockArraysEXT = (glLockArraysEXTPROC)((intptr_t)function_pointer); + glLockArraysEXT(first, count); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTCompiledVertexArray_nglUnlockArraysEXT(JNIEnv *env, jclass clazz, jlong function_pointer) { + glUnlockArraysEXTPROC glUnlockArraysEXT = (glUnlockArraysEXTPROC)((intptr_t)function_pointer); + glUnlockArraysEXT(); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTDepthBoundsTest.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTDepthBoundsTest.c new file mode 100644 index 0000000..941e7ff --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTDepthBoundsTest.c @@ -0,0 +1,12 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glDepthBoundsEXTPROC) (GLclampd zmin, GLclampd zmax); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDepthBoundsTest_nglDepthBoundsEXT(JNIEnv *env, jclass clazz, jdouble zmin, jdouble zmax, jlong function_pointer) { + glDepthBoundsEXTPROC glDepthBoundsEXT = (glDepthBoundsEXTPROC)((intptr_t)function_pointer); + glDepthBoundsEXT(zmin, zmax); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTDirectStateAccess.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTDirectStateAccess.c new file mode 100644 index 0000000..856afe2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTDirectStateAccess.c @@ -0,0 +1,1588 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glClientAttribDefaultEXTPROC) (GLbitfield mask); +typedef void (APIENTRY *glPushClientAttribDefaultEXTPROC) (GLbitfield mask); +typedef void (APIENTRY *glMatrixLoadfEXTPROC) (GLenum matrixMode, const GLfloat * m); +typedef void (APIENTRY *glMatrixLoaddEXTPROC) (GLenum matrixMode, const GLdouble * m); +typedef void (APIENTRY *glMatrixMultfEXTPROC) (GLenum matrixMode, const GLfloat * m); +typedef void (APIENTRY *glMatrixMultdEXTPROC) (GLenum matrixMode, const GLdouble * m); +typedef void (APIENTRY *glMatrixLoadIdentityEXTPROC) (GLenum matrixMode); +typedef void (APIENTRY *glMatrixRotatefEXTPROC) (GLenum matrixMode, GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRY *glMatrixRotatedEXTPROC) (GLenum matrixMode, GLdouble angle, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRY *glMatrixScalefEXTPROC) (GLenum matrixMode, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRY *glMatrixScaledEXTPROC) (GLenum matrixMode, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRY *glMatrixTranslatefEXTPROC) (GLenum matrixMode, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRY *glMatrixTranslatedEXTPROC) (GLenum matrixMode, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRY *glMatrixOrthoEXTPROC) (GLenum matrixMode, GLdouble l, GLdouble r, GLdouble b, GLdouble t, GLdouble n, GLdouble f); +typedef void (APIENTRY *glMatrixFrustumEXTPROC) (GLenum matrixMode, GLdouble l, GLdouble r, GLdouble b, GLdouble t, GLdouble n, GLdouble f); +typedef void (APIENTRY *glMatrixPushEXTPROC) (GLenum matrixMode); +typedef void (APIENTRY *glMatrixPopEXTPROC) (GLenum matrixMode); +typedef void (APIENTRY *glTextureParameteriEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint param); +typedef void (APIENTRY *glTextureParameterivEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint * param); +typedef void (APIENTRY *glTextureParameterfEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRY *glTextureParameterfvEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLfloat * param); +typedef void (APIENTRY *glTextureImage1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels); +typedef void (APIENTRY *glTextureImage2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels); +typedef void (APIENTRY *glTextureSubImage1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels); +typedef void (APIENTRY *glTextureSubImage2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels); +typedef void (APIENTRY *glCopyTextureImage1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void (APIENTRY *glCopyTextureImage2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void (APIENTRY *glCopyTextureSubImage1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void (APIENTRY *glCopyTextureSubImage2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRY *glGetTextureImageEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels); +typedef void (APIENTRY *glGetTextureParameterfvEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLfloat * params); +typedef void (APIENTRY *glGetTextureParameterivEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetTextureLevelParameterfvEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLfloat * params); +typedef void (APIENTRY *glGetTextureLevelParameterivEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum pname, GLint * params); +typedef void (APIENTRY *glTextureImage3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels); +typedef void (APIENTRY *glTextureSubImage3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels); +typedef void (APIENTRY *glCopyTextureSubImage3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRY *glBindMultiTextureEXTPROC) (GLenum texunit, GLenum target, GLuint texture); +typedef void (APIENTRY *glMultiTexCoordPointerEXTPROC) (GLenum texunit, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); +typedef void (APIENTRY *glMultiTexEnvfEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRY *glMultiTexEnvfvEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat * params); +typedef void (APIENTRY *glMultiTexEnviEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); +typedef void (APIENTRY *glMultiTexEnvivEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint * params); +typedef void (APIENTRY *glMultiTexGendEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble param); +typedef void (APIENTRY *glMultiTexGendvEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLdouble * params); +typedef void (APIENTRY *glMultiTexGenfEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat param); +typedef void (APIENTRY *glMultiTexGenfvEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLfloat * params); +typedef void (APIENTRY *glMultiTexGeniEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint param); +typedef void (APIENTRY *glMultiTexGenivEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, const GLint * params); +typedef void (APIENTRY *glGetMultiTexEnvfvEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat * params); +typedef void (APIENTRY *glGetMultiTexEnvivEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetMultiTexGendvEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLdouble * params); +typedef void (APIENTRY *glGetMultiTexGenfvEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLfloat * params); +typedef void (APIENTRY *glGetMultiTexGenivEXTPROC) (GLenum texunit, GLenum coord, GLenum pname, GLint * params); +typedef void (APIENTRY *glMultiTexParameteriEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint param); +typedef void (APIENTRY *glMultiTexParameterivEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint * param); +typedef void (APIENTRY *glMultiTexParameterfEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRY *glMultiTexParameterfvEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLfloat * param); +typedef void (APIENTRY *glMultiTexImage1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels); +typedef void (APIENTRY *glMultiTexImage2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid * pixels); +typedef void (APIENTRY *glMultiTexSubImage1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels); +typedef void (APIENTRY *glMultiTexSubImage2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels); +typedef void (APIENTRY *glCopyMultiTexImage1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); +typedef void (APIENTRY *glCopyMultiTexImage2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void (APIENTRY *glCopyMultiTexSubImage1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void (APIENTRY *glCopyMultiTexSubImage2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRY *glGetMultiTexImageEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels); +typedef void (APIENTRY *glGetMultiTexParameterfvEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLfloat * params); +typedef void (APIENTRY *glGetMultiTexParameterivEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetMultiTexLevelParameterfvEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLfloat * params); +typedef void (APIENTRY *glGetMultiTexLevelParameterivEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum pname, GLint * params); +typedef void (APIENTRY *glMultiTexImage3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels); +typedef void (APIENTRY *glMultiTexSubImage3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels); +typedef void (APIENTRY *glCopyMultiTexSubImage3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRY *glEnableClientStateIndexedEXTPROC) (GLenum array, GLuint index); +typedef void (APIENTRY *glDisableClientStateIndexedEXTPROC) (GLenum array, GLuint index); +typedef void (APIENTRY *glEnableClientStateiEXTPROC) (GLenum array, GLuint index); +typedef void (APIENTRY *glDisableClientStateiEXTPROC) (GLenum array, GLuint index); +typedef void (APIENTRY *glGetFloatIndexedvEXTPROC) (GLenum pname, GLuint index, GLfloat * params); +typedef void (APIENTRY *glGetDoubleIndexedvEXTPROC) (GLenum pname, GLuint index, GLdouble * params); +typedef void (APIENTRY *glGetPointerIndexedvEXTPROC) (GLenum pname, GLuint index, GLvoid ** params); +typedef void (APIENTRY *glGetFloati_vEXTPROC) (GLenum pname, GLuint index, GLfloat * params); +typedef void (APIENTRY *glGetDoublei_vEXTPROC) (GLenum pname, GLuint index, GLdouble * params); +typedef void (APIENTRY *glGetPointeri_vEXTPROC) (GLenum pname, GLuint index, GLvoid ** params); +typedef void (APIENTRY *glNamedProgramStringEXTPROC) (GLuint program, GLenum target, GLenum format, GLsizei len, const GLvoid * string); +typedef void (APIENTRY *glNamedProgramLocalParameter4dEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRY *glNamedProgramLocalParameter4dvEXTPROC) (GLuint program, GLenum target, GLuint index, const GLdouble * params); +typedef void (APIENTRY *glNamedProgramLocalParameter4fEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRY *glNamedProgramLocalParameter4fvEXTPROC) (GLuint program, GLenum target, GLuint index, const GLfloat * params); +typedef void (APIENTRY *glGetNamedProgramLocalParameterdvEXTPROC) (GLuint program, GLenum target, GLuint index, GLdouble * params); +typedef void (APIENTRY *glGetNamedProgramLocalParameterfvEXTPROC) (GLuint program, GLenum target, GLuint index, GLfloat * params); +typedef void (APIENTRY *glGetNamedProgramivEXTPROC) (GLuint program, GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetNamedProgramStringEXTPROC) (GLuint program, GLenum target, GLenum pname, GLvoid * string); +typedef void (APIENTRY *glCompressedTextureImage3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRY *glCompressedTextureImage2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRY *glCompressedTextureImage1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRY *glCompressedTextureSubImage3DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRY *glCompressedTextureSubImage2DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRY *glCompressedTextureSubImage1DEXTPROC) (GLuint texture, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRY *glGetCompressedTextureImageEXTPROC) (GLuint texture, GLenum target, GLint level, GLvoid * img); +typedef void (APIENTRY *glCompressedMultiTexImage3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRY *glCompressedMultiTexImage2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRY *glCompressedMultiTexImage1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRY *glCompressedMultiTexSubImage3DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRY *glCompressedMultiTexSubImage2DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRY *glCompressedMultiTexSubImage1DEXTPROC) (GLenum texunit, GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRY *glGetCompressedMultiTexImageEXTPROC) (GLenum texunit, GLenum target, GLint level, GLvoid * img); +typedef void (APIENTRY *glMatrixLoadTransposefEXTPROC) (GLenum matrixMode, const GLfloat * m); +typedef void (APIENTRY *glMatrixLoadTransposedEXTPROC) (GLenum matrixMode, const GLdouble * m); +typedef void (APIENTRY *glMatrixMultTransposefEXTPROC) (GLenum matrixMode, const GLfloat * m); +typedef void (APIENTRY *glMatrixMultTransposedEXTPROC) (GLenum matrixMode, const GLdouble * m); +typedef void (APIENTRY *glNamedBufferDataEXTPROC) (GLuint buffer, GLsizeiptr size, const GLvoid * data, GLenum usage); +typedef void (APIENTRY *glNamedBufferSubDataEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const GLvoid * data); +typedef GLvoid * (APIENTRY *glMapNamedBufferEXTPROC) (GLuint buffer, GLenum access); +typedef GLboolean (APIENTRY *glUnmapNamedBufferEXTPROC) (GLuint buffer); +typedef void (APIENTRY *glGetNamedBufferParameterivEXTPROC) (GLuint buffer, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetNamedBufferPointervEXTPROC) (GLuint buffer, GLenum pname, GLvoid ** params); +typedef void (APIENTRY *glGetNamedBufferSubDataEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLvoid * data); +typedef void (APIENTRY *glProgramUniform1fEXTPROC) (GLuint program, GLint location, GLfloat v0); +typedef void (APIENTRY *glProgramUniform2fEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRY *glProgramUniform3fEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRY *glProgramUniform4fEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRY *glProgramUniform1iEXTPROC) (GLuint program, GLint location, GLint v0); +typedef void (APIENTRY *glProgramUniform2iEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1); +typedef void (APIENTRY *glProgramUniform3iEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRY *glProgramUniform4iEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRY *glProgramUniform1fvEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat * value); +typedef void (APIENTRY *glProgramUniform2fvEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat * value); +typedef void (APIENTRY *glProgramUniform3fvEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat * value); +typedef void (APIENTRY *glProgramUniform4fvEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat * value); +typedef void (APIENTRY *glProgramUniform1ivEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint * value); +typedef void (APIENTRY *glProgramUniform2ivEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint * value); +typedef void (APIENTRY *glProgramUniform3ivEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint * value); +typedef void (APIENTRY *glProgramUniform4ivEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint * value); +typedef void (APIENTRY *glProgramUniformMatrix2fvEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (APIENTRY *glProgramUniformMatrix3fvEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (APIENTRY *glProgramUniformMatrix4fvEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (APIENTRY *glProgramUniformMatrix2x3fvEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (APIENTRY *glProgramUniformMatrix3x2fvEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (APIENTRY *glProgramUniformMatrix2x4fvEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (APIENTRY *glProgramUniformMatrix4x2fvEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (APIENTRY *glProgramUniformMatrix3x4fvEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (APIENTRY *glProgramUniformMatrix4x3fvEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (APIENTRY *glTextureBufferEXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer); +typedef void (APIENTRY *glMultiTexBufferEXTPROC) (GLenum texunit, GLenum target, GLenum internalformat, GLuint buffer); +typedef void (APIENTRY *glTextureParameterIivEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLint * params); +typedef void (APIENTRY *glTextureParameterIuivEXTPROC) (GLuint texture, GLenum target, GLenum pname, const GLuint * params); +typedef void (APIENTRY *glGetTextureParameterIivEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetTextureParameterIuivEXTPROC) (GLuint texture, GLenum target, GLenum pname, GLuint * params); +typedef void (APIENTRY *glMultiTexParameterIivEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLint * params); +typedef void (APIENTRY *glMultiTexParameterIuivEXTPROC) (GLenum texunit, GLenum target, GLenum pname, const GLuint * params); +typedef void (APIENTRY *glGetMultiTexParameterIivEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetMultiTexParameterIuivEXTPROC) (GLenum texunit, GLenum target, GLenum pname, GLuint * params); +typedef void (APIENTRY *glProgramUniform1uiEXTPROC) (GLuint program, GLint location, GLuint v0); +typedef void (APIENTRY *glProgramUniform2uiEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); +typedef void (APIENTRY *glProgramUniform3uiEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (APIENTRY *glProgramUniform4uiEXTPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (APIENTRY *glProgramUniform1uivEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint * value); +typedef void (APIENTRY *glProgramUniform2uivEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint * value); +typedef void (APIENTRY *glProgramUniform3uivEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint * value); +typedef void (APIENTRY *glProgramUniform4uivEXTPROC) (GLuint program, GLint location, GLsizei count, const GLuint * value); +typedef void (APIENTRY *glNamedProgramLocalParameters4fvEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLfloat * params); +typedef void (APIENTRY *glNamedProgramLocalParameterI4iEXTPROC) (GLuint program, GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRY *glNamedProgramLocalParameterI4ivEXTPROC) (GLuint program, GLenum target, GLuint index, const GLint * params); +typedef void (APIENTRY *glNamedProgramLocalParametersI4ivEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLint * params); +typedef void (APIENTRY *glNamedProgramLocalParameterI4uiEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRY *glNamedProgramLocalParameterI4uivEXTPROC) (GLuint program, GLenum target, GLuint index, const GLuint * params); +typedef void (APIENTRY *glNamedProgramLocalParametersI4uivEXTPROC) (GLuint program, GLenum target, GLuint index, GLsizei count, const GLuint * params); +typedef void (APIENTRY *glGetNamedProgramLocalParameterIivEXTPROC) (GLuint program, GLenum target, GLuint index, GLint * params); +typedef void (APIENTRY *glGetNamedProgramLocalParameterIuivEXTPROC) (GLuint program, GLenum target, GLuint index, GLuint * params); +typedef void (APIENTRY *glNamedRenderbufferStorageEXTPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRY *glGetNamedRenderbufferParameterivEXTPROC) (GLuint renderbuffer, GLenum pname, GLint * params); +typedef void (APIENTRY *glNamedRenderbufferStorageMultisampleEXTPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRY *glNamedRenderbufferStorageMultisampleCoverageEXTPROC) (GLuint renderbuffer, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); +typedef GLenum (APIENTRY *glCheckNamedFramebufferStatusEXTPROC) (GLuint framebuffer, GLenum target); +typedef void (APIENTRY *glNamedFramebufferTexture1DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRY *glNamedFramebufferTexture2DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRY *glNamedFramebufferTexture3DEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void (APIENTRY *glNamedFramebufferRenderbufferEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (APIENTRY *glGetNamedFramebufferAttachmentParameterivEXTPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint * params); +typedef void (APIENTRY *glGenerateTextureMipmapEXTPROC) (GLuint texture, GLenum target); +typedef void (APIENTRY *glGenerateMultiTexMipmapEXTPROC) (GLenum texunit, GLenum target); +typedef void (APIENTRY *glFramebufferDrawBufferEXTPROC) (GLuint framebuffer, GLenum mode); +typedef void (APIENTRY *glFramebufferDrawBuffersEXTPROC) (GLuint framebuffer, GLsizei n, const GLenum * bufs); +typedef void (APIENTRY *glFramebufferReadBufferEXTPROC) (GLuint framebuffer, GLenum mode); +typedef void (APIENTRY *glGetFramebufferParameterivEXTPROC) (GLuint framebuffer, GLenum pname, GLint * param); +typedef void (APIENTRY *glNamedCopyBufferSubDataEXTPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readoffset, GLintptr writeoffset, GLsizeiptr size); +typedef void (APIENTRY *glNamedFramebufferTextureEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level); +typedef void (APIENTRY *glNamedFramebufferTextureLayerEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void (APIENTRY *glNamedFramebufferTextureFaceEXTPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLenum face); +typedef void (APIENTRY *glTextureRenderbufferEXTPROC) (GLuint texture, GLenum target, GLuint renderbuffer); +typedef void (APIENTRY *glMultiTexRenderbufferEXTPROC) (GLenum texunit, GLenum target, GLuint renderbuffer); +typedef void (APIENTRY *glVertexArrayVertexOffsetEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRY *glVertexArrayColorOffsetEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRY *glVertexArrayEdgeFlagOffsetEXTPROC) (GLuint vaobj, GLuint buffer, GLsizei stride, GLintptr offset); +typedef void (APIENTRY *glVertexArrayIndexOffsetEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRY *glVertexArrayNormalOffsetEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRY *glVertexArrayTexCoordOffsetEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRY *glVertexArrayMultiTexCoordOffsetEXTPROC) (GLuint vaobj, GLuint buffer, GLenum texunit, GLint size, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRY *glVertexArrayFogCoordOffsetEXTPROC) (GLuint vaobj, GLuint buffer, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRY *glVertexArraySecondaryColorOffsetEXTPROC) (GLuint vaobj, GLuint buffer, GLint size, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRY *glVertexArrayVertexAttribOffsetEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLintptr offset); +typedef void (APIENTRY *glVertexArrayVertexAttribIOffsetEXTPROC) (GLuint vaobj, GLuint buffer, GLuint index, GLint size, GLenum type, GLsizei stride, GLintptr offset); +typedef void (APIENTRY *glEnableVertexArrayEXTPROC) (GLuint vaobj, GLenum array); +typedef void (APIENTRY *glDisableVertexArrayEXTPROC) (GLuint vaobj, GLenum array); +typedef void (APIENTRY *glEnableVertexArrayAttribEXTPROC) (GLuint vaobj, GLuint index); +typedef void (APIENTRY *glDisableVertexArrayAttribEXTPROC) (GLuint vaobj, GLuint index); +typedef void (APIENTRY *glGetVertexArrayIntegervEXTPROC) (GLuint vaobj, GLenum pname, GLint * param); +typedef void (APIENTRY *glGetVertexArrayPointervEXTPROC) (GLuint vaobj, GLenum pname, GLvoid ** param); +typedef void (APIENTRY *glGetVertexArrayIntegeri_vEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint * param); +typedef void (APIENTRY *glGetVertexArrayPointeri_vEXTPROC) (GLuint vaobj, GLuint index, GLenum pname, GLvoid ** param); +typedef GLvoid * (APIENTRY *glMapNamedBufferRangeEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void (APIENTRY *glFlushMappedNamedBufferRangeEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglClientAttribDefaultEXT(JNIEnv *env, jclass clazz, jint mask, jlong function_pointer) { + glClientAttribDefaultEXTPROC glClientAttribDefaultEXT = (glClientAttribDefaultEXTPROC)((intptr_t)function_pointer); + glClientAttribDefaultEXT(mask); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglPushClientAttribDefaultEXT(JNIEnv *env, jclass clazz, jint mask, jlong function_pointer) { + glPushClientAttribDefaultEXTPROC glPushClientAttribDefaultEXT = (glPushClientAttribDefaultEXTPROC)((intptr_t)function_pointer); + glPushClientAttribDefaultEXT(mask); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixLoadfEXT(JNIEnv *env, jclass clazz, jint matrixMode, jlong m, jlong function_pointer) { + const GLfloat *m_address = (const GLfloat *)(intptr_t)m; + glMatrixLoadfEXTPROC glMatrixLoadfEXT = (glMatrixLoadfEXTPROC)((intptr_t)function_pointer); + glMatrixLoadfEXT(matrixMode, m_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixLoaddEXT(JNIEnv *env, jclass clazz, jint matrixMode, jlong m, jlong function_pointer) { + const GLdouble *m_address = (const GLdouble *)(intptr_t)m; + glMatrixLoaddEXTPROC glMatrixLoaddEXT = (glMatrixLoaddEXTPROC)((intptr_t)function_pointer); + glMatrixLoaddEXT(matrixMode, m_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixMultfEXT(JNIEnv *env, jclass clazz, jint matrixMode, jlong m, jlong function_pointer) { + const GLfloat *m_address = (const GLfloat *)(intptr_t)m; + glMatrixMultfEXTPROC glMatrixMultfEXT = (glMatrixMultfEXTPROC)((intptr_t)function_pointer); + glMatrixMultfEXT(matrixMode, m_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixMultdEXT(JNIEnv *env, jclass clazz, jint matrixMode, jlong m, jlong function_pointer) { + const GLdouble *m_address = (const GLdouble *)(intptr_t)m; + glMatrixMultdEXTPROC glMatrixMultdEXT = (glMatrixMultdEXTPROC)((intptr_t)function_pointer); + glMatrixMultdEXT(matrixMode, m_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixLoadIdentityEXT(JNIEnv *env, jclass clazz, jint matrixMode, jlong function_pointer) { + glMatrixLoadIdentityEXTPROC glMatrixLoadIdentityEXT = (glMatrixLoadIdentityEXTPROC)((intptr_t)function_pointer); + glMatrixLoadIdentityEXT(matrixMode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixRotatefEXT(JNIEnv *env, jclass clazz, jint matrixMode, jfloat angle, jfloat x, jfloat y, jfloat z, jlong function_pointer) { + glMatrixRotatefEXTPROC glMatrixRotatefEXT = (glMatrixRotatefEXTPROC)((intptr_t)function_pointer); + glMatrixRotatefEXT(matrixMode, angle, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixRotatedEXT(JNIEnv *env, jclass clazz, jint matrixMode, jdouble angle, jdouble x, jdouble y, jdouble z, jlong function_pointer) { + glMatrixRotatedEXTPROC glMatrixRotatedEXT = (glMatrixRotatedEXTPROC)((intptr_t)function_pointer); + glMatrixRotatedEXT(matrixMode, angle, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixScalefEXT(JNIEnv *env, jclass clazz, jint matrixMode, jfloat x, jfloat y, jfloat z, jlong function_pointer) { + glMatrixScalefEXTPROC glMatrixScalefEXT = (glMatrixScalefEXTPROC)((intptr_t)function_pointer); + glMatrixScalefEXT(matrixMode, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixScaledEXT(JNIEnv *env, jclass clazz, jint matrixMode, jdouble x, jdouble y, jdouble z, jlong function_pointer) { + glMatrixScaledEXTPROC glMatrixScaledEXT = (glMatrixScaledEXTPROC)((intptr_t)function_pointer); + glMatrixScaledEXT(matrixMode, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixTranslatefEXT(JNIEnv *env, jclass clazz, jint matrixMode, jfloat x, jfloat y, jfloat z, jlong function_pointer) { + glMatrixTranslatefEXTPROC glMatrixTranslatefEXT = (glMatrixTranslatefEXTPROC)((intptr_t)function_pointer); + glMatrixTranslatefEXT(matrixMode, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixTranslatedEXT(JNIEnv *env, jclass clazz, jint matrixMode, jdouble x, jdouble y, jdouble z, jlong function_pointer) { + glMatrixTranslatedEXTPROC glMatrixTranslatedEXT = (glMatrixTranslatedEXTPROC)((intptr_t)function_pointer); + glMatrixTranslatedEXT(matrixMode, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixOrthoEXT(JNIEnv *env, jclass clazz, jint matrixMode, jdouble l, jdouble r, jdouble b, jdouble t, jdouble n, jdouble f, jlong function_pointer) { + glMatrixOrthoEXTPROC glMatrixOrthoEXT = (glMatrixOrthoEXTPROC)((intptr_t)function_pointer); + glMatrixOrthoEXT(matrixMode, l, r, b, t, n, f); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixFrustumEXT(JNIEnv *env, jclass clazz, jint matrixMode, jdouble l, jdouble r, jdouble b, jdouble t, jdouble n, jdouble f, jlong function_pointer) { + glMatrixFrustumEXTPROC glMatrixFrustumEXT = (glMatrixFrustumEXTPROC)((intptr_t)function_pointer); + glMatrixFrustumEXT(matrixMode, l, r, b, t, n, f); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixPushEXT(JNIEnv *env, jclass clazz, jint matrixMode, jlong function_pointer) { + glMatrixPushEXTPROC glMatrixPushEXT = (glMatrixPushEXTPROC)((intptr_t)function_pointer); + glMatrixPushEXT(matrixMode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixPopEXT(JNIEnv *env, jclass clazz, jint matrixMode, jlong function_pointer) { + glMatrixPopEXTPROC glMatrixPopEXT = (glMatrixPopEXTPROC)((intptr_t)function_pointer); + glMatrixPopEXT(matrixMode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureParameteriEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint pname, jint param, jlong function_pointer) { + glTextureParameteriEXTPROC glTextureParameteriEXT = (glTextureParameteriEXTPROC)((intptr_t)function_pointer); + glTextureParameteriEXT(texture, target, pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureParameterivEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint pname, jlong param, jlong function_pointer) { + const GLint *param_address = (const GLint *)(intptr_t)param; + glTextureParameterivEXTPROC glTextureParameterivEXT = (glTextureParameterivEXTPROC)((intptr_t)function_pointer); + glTextureParameterivEXT(texture, target, pname, param_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureParameterfEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint pname, jfloat param, jlong function_pointer) { + glTextureParameterfEXTPROC glTextureParameterfEXT = (glTextureParameterfEXTPROC)((intptr_t)function_pointer); + glTextureParameterfEXT(texture, target, pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureParameterfvEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint pname, jlong param, jlong function_pointer) { + const GLfloat *param_address = (const GLfloat *)(intptr_t)param; + glTextureParameterfvEXTPROC glTextureParameterfvEXT = (glTextureParameterfvEXTPROC)((intptr_t)function_pointer); + glTextureParameterfvEXT(texture, target, pname, param_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureImage1DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint border, jint format, jint type, jlong pixels, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)pixels; + glTextureImage1DEXTPROC glTextureImage1DEXT = (glTextureImage1DEXTPROC)((intptr_t)function_pointer); + glTextureImage1DEXT(texture, target, level, internalformat, width, border, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureImage1DEXTBO(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint border, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)offsetToPointer(pixels_buffer_offset); + glTextureImage1DEXTPROC glTextureImage1DEXT = (glTextureImage1DEXTPROC)((intptr_t)function_pointer); + glTextureImage1DEXT(texture, target, level, internalformat, width, border, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureImage2DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint format, jint type, jlong pixels, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)pixels; + glTextureImage2DEXTPROC glTextureImage2DEXT = (glTextureImage2DEXTPROC)((intptr_t)function_pointer); + glTextureImage2DEXT(texture, target, level, internalformat, width, height, border, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureImage2DEXTBO(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)offsetToPointer(pixels_buffer_offset); + glTextureImage2DEXTPROC glTextureImage2DEXT = (glTextureImage2DEXTPROC)((intptr_t)function_pointer); + glTextureImage2DEXT(texture, target, level, internalformat, width, height, border, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureSubImage1DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint width, jint format, jint type, jlong pixels, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)pixels; + glTextureSubImage1DEXTPROC glTextureSubImage1DEXT = (glTextureSubImage1DEXTPROC)((intptr_t)function_pointer); + glTextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureSubImage1DEXTBO(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint width, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)offsetToPointer(pixels_buffer_offset); + glTextureSubImage1DEXTPROC glTextureSubImage1DEXT = (glTextureSubImage1DEXTPROC)((intptr_t)function_pointer); + glTextureSubImage1DEXT(texture, target, level, xoffset, width, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureSubImage2DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jlong pixels, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)pixels; + glTextureSubImage2DEXTPROC glTextureSubImage2DEXT = (glTextureSubImage2DEXTPROC)((intptr_t)function_pointer); + glTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureSubImage2DEXTBO(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)offsetToPointer(pixels_buffer_offset); + glTextureSubImage2DEXTPROC glTextureSubImage2DEXT = (glTextureSubImage2DEXTPROC)((intptr_t)function_pointer); + glTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCopyTextureImage1DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint x, jint y, jint width, jint border, jlong function_pointer) { + glCopyTextureImage1DEXTPROC glCopyTextureImage1DEXT = (glCopyTextureImage1DEXTPROC)((intptr_t)function_pointer); + glCopyTextureImage1DEXT(texture, target, level, internalformat, x, y, width, border); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCopyTextureImage2DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint x, jint y, jint width, jint height, jint border, jlong function_pointer) { + glCopyTextureImage2DEXTPROC glCopyTextureImage2DEXT = (glCopyTextureImage2DEXTPROC)((intptr_t)function_pointer); + glCopyTextureImage2DEXT(texture, target, level, internalformat, x, y, width, height, border); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCopyTextureSubImage1DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint x, jint y, jint width, jlong function_pointer) { + glCopyTextureSubImage1DEXTPROC glCopyTextureSubImage1DEXT = (glCopyTextureSubImage1DEXTPROC)((intptr_t)function_pointer); + glCopyTextureSubImage1DEXT(texture, target, level, xoffset, x, y, width); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCopyTextureSubImage2DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint yoffset, jint x, jint y, jint width, jint height, jlong function_pointer) { + glCopyTextureSubImage2DEXTPROC glCopyTextureSubImage2DEXT = (glCopyTextureSubImage2DEXTPROC)((intptr_t)function_pointer); + glCopyTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, x, y, width, height); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetTextureImageEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint format, jint type, jlong pixels, jlong function_pointer) { + GLvoid *pixels_address = (GLvoid *)(intptr_t)pixels; + glGetTextureImageEXTPROC glGetTextureImageEXT = (glGetTextureImageEXTPROC)((intptr_t)function_pointer); + glGetTextureImageEXT(texture, target, level, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetTextureImageEXTBO(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer) { + GLvoid *pixels_address = (GLvoid *)(intptr_t)offsetToPointer(pixels_buffer_offset); + glGetTextureImageEXTPROC glGetTextureImageEXT = (glGetTextureImageEXTPROC)((intptr_t)function_pointer); + glGetTextureImageEXT(texture, target, level, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetTextureParameterfvEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetTextureParameterfvEXTPROC glGetTextureParameterfvEXT = (glGetTextureParameterfvEXTPROC)((intptr_t)function_pointer); + glGetTextureParameterfvEXT(texture, target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetTextureParameterivEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetTextureParameterivEXTPROC glGetTextureParameterivEXT = (glGetTextureParameterivEXTPROC)((intptr_t)function_pointer); + glGetTextureParameterivEXT(texture, target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetTextureLevelParameterfvEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetTextureLevelParameterfvEXTPROC glGetTextureLevelParameterfvEXT = (glGetTextureLevelParameterfvEXTPROC)((intptr_t)function_pointer); + glGetTextureLevelParameterfvEXT(texture, target, level, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetTextureLevelParameterivEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetTextureLevelParameterivEXTPROC glGetTextureLevelParameterivEXT = (glGetTextureLevelParameterivEXTPROC)((intptr_t)function_pointer); + glGetTextureLevelParameterivEXT(texture, target, level, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureImage3DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint format, jint type, jlong pixels, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)pixels; + glTextureImage3DEXTPROC glTextureImage3DEXT = (glTextureImage3DEXTPROC)((intptr_t)function_pointer); + glTextureImage3DEXT(texture, target, level, internalformat, width, height, depth, border, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureImage3DEXTBO(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)offsetToPointer(pixels_buffer_offset); + glTextureImage3DEXTPROC glTextureImage3DEXT = (glTextureImage3DEXTPROC)((intptr_t)function_pointer); + glTextureImage3DEXT(texture, target, level, internalformat, width, height, depth, border, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureSubImage3DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jlong pixels, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)pixels; + glTextureSubImage3DEXTPROC glTextureSubImage3DEXT = (glTextureSubImage3DEXTPROC)((intptr_t)function_pointer); + glTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureSubImage3DEXTBO(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)offsetToPointer(pixels_buffer_offset); + glTextureSubImage3DEXTPROC glTextureSubImage3DEXT = (glTextureSubImage3DEXTPROC)((intptr_t)function_pointer); + glTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCopyTextureSubImage3DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint x, jint y, jint width, jint height, jlong function_pointer) { + glCopyTextureSubImage3DEXTPROC glCopyTextureSubImage3DEXT = (glCopyTextureSubImage3DEXTPROC)((intptr_t)function_pointer); + glCopyTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, x, y, width, height); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglBindMultiTextureEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint texture, jlong function_pointer) { + glBindMultiTextureEXTPROC glBindMultiTextureEXT = (glBindMultiTextureEXTPROC)((intptr_t)function_pointer); + glBindMultiTextureEXT(texunit, target, texture); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexCoordPointerEXT(JNIEnv *env, jclass clazz, jint texunit, jint size, jint type, jint stride, jlong pointer, jlong function_pointer) { + const GLvoid *pointer_address = (const GLvoid *)(intptr_t)pointer; + glMultiTexCoordPointerEXTPROC glMultiTexCoordPointerEXT = (glMultiTexCoordPointerEXTPROC)((intptr_t)function_pointer); + glMultiTexCoordPointerEXT(texunit, size, type, stride, pointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexCoordPointerEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint size, jint type, jint stride, jlong pointer_buffer_offset, jlong function_pointer) { + const GLvoid *pointer_address = (const GLvoid *)(intptr_t)offsetToPointer(pointer_buffer_offset); + glMultiTexCoordPointerEXTPROC glMultiTexCoordPointerEXT = (glMultiTexCoordPointerEXTPROC)((intptr_t)function_pointer); + glMultiTexCoordPointerEXT(texunit, size, type, stride, pointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexEnvfEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jfloat param, jlong function_pointer) { + glMultiTexEnvfEXTPROC glMultiTexEnvfEXT = (glMultiTexEnvfEXTPROC)((intptr_t)function_pointer); + glMultiTexEnvfEXT(texunit, target, pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexEnvfvEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jlong params, jlong function_pointer) { + const GLfloat *params_address = (const GLfloat *)(intptr_t)params; + glMultiTexEnvfvEXTPROC glMultiTexEnvfvEXT = (glMultiTexEnvfvEXTPROC)((intptr_t)function_pointer); + glMultiTexEnvfvEXT(texunit, target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexEnviEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jint param, jlong function_pointer) { + glMultiTexEnviEXTPROC glMultiTexEnviEXT = (glMultiTexEnviEXTPROC)((intptr_t)function_pointer); + glMultiTexEnviEXT(texunit, target, pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexEnvivEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jlong params, jlong function_pointer) { + const GLint *params_address = (const GLint *)(intptr_t)params; + glMultiTexEnvivEXTPROC glMultiTexEnvivEXT = (glMultiTexEnvivEXTPROC)((intptr_t)function_pointer); + glMultiTexEnvivEXT(texunit, target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexGendEXT(JNIEnv *env, jclass clazz, jint texunit, jint coord, jint pname, jdouble param, jlong function_pointer) { + glMultiTexGendEXTPROC glMultiTexGendEXT = (glMultiTexGendEXTPROC)((intptr_t)function_pointer); + glMultiTexGendEXT(texunit, coord, pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexGendvEXT(JNIEnv *env, jclass clazz, jint texunit, jint coord, jint pname, jlong params, jlong function_pointer) { + const GLdouble *params_address = (const GLdouble *)(intptr_t)params; + glMultiTexGendvEXTPROC glMultiTexGendvEXT = (glMultiTexGendvEXTPROC)((intptr_t)function_pointer); + glMultiTexGendvEXT(texunit, coord, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexGenfEXT(JNIEnv *env, jclass clazz, jint texunit, jint coord, jint pname, jfloat param, jlong function_pointer) { + glMultiTexGenfEXTPROC glMultiTexGenfEXT = (glMultiTexGenfEXTPROC)((intptr_t)function_pointer); + glMultiTexGenfEXT(texunit, coord, pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexGenfvEXT(JNIEnv *env, jclass clazz, jint texunit, jint coord, jint pname, jlong params, jlong function_pointer) { + const GLfloat *params_address = (const GLfloat *)(intptr_t)params; + glMultiTexGenfvEXTPROC glMultiTexGenfvEXT = (glMultiTexGenfvEXTPROC)((intptr_t)function_pointer); + glMultiTexGenfvEXT(texunit, coord, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexGeniEXT(JNIEnv *env, jclass clazz, jint texunit, jint coord, jint pname, jint param, jlong function_pointer) { + glMultiTexGeniEXTPROC glMultiTexGeniEXT = (glMultiTexGeniEXTPROC)((intptr_t)function_pointer); + glMultiTexGeniEXT(texunit, coord, pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexGenivEXT(JNIEnv *env, jclass clazz, jint texunit, jint coord, jint pname, jlong params, jlong function_pointer) { + const GLint *params_address = (const GLint *)(intptr_t)params; + glMultiTexGenivEXTPROC glMultiTexGenivEXT = (glMultiTexGenivEXTPROC)((intptr_t)function_pointer); + glMultiTexGenivEXT(texunit, coord, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexEnvfvEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetMultiTexEnvfvEXTPROC glGetMultiTexEnvfvEXT = (glGetMultiTexEnvfvEXTPROC)((intptr_t)function_pointer); + glGetMultiTexEnvfvEXT(texunit, target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexEnvivEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetMultiTexEnvivEXTPROC glGetMultiTexEnvivEXT = (glGetMultiTexEnvivEXTPROC)((intptr_t)function_pointer); + glGetMultiTexEnvivEXT(texunit, target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexGendvEXT(JNIEnv *env, jclass clazz, jint texunit, jint coord, jint pname, jlong params, jlong function_pointer) { + GLdouble *params_address = (GLdouble *)(intptr_t)params; + glGetMultiTexGendvEXTPROC glGetMultiTexGendvEXT = (glGetMultiTexGendvEXTPROC)((intptr_t)function_pointer); + glGetMultiTexGendvEXT(texunit, coord, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexGenfvEXT(JNIEnv *env, jclass clazz, jint texunit, jint coord, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetMultiTexGenfvEXTPROC glGetMultiTexGenfvEXT = (glGetMultiTexGenfvEXTPROC)((intptr_t)function_pointer); + glGetMultiTexGenfvEXT(texunit, coord, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexGenivEXT(JNIEnv *env, jclass clazz, jint texunit, jint coord, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetMultiTexGenivEXTPROC glGetMultiTexGenivEXT = (glGetMultiTexGenivEXTPROC)((intptr_t)function_pointer); + glGetMultiTexGenivEXT(texunit, coord, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexParameteriEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jint param, jlong function_pointer) { + glMultiTexParameteriEXTPROC glMultiTexParameteriEXT = (glMultiTexParameteriEXTPROC)((intptr_t)function_pointer); + glMultiTexParameteriEXT(texunit, target, pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexParameterivEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jlong param, jlong function_pointer) { + const GLint *param_address = (const GLint *)(intptr_t)param; + glMultiTexParameterivEXTPROC glMultiTexParameterivEXT = (glMultiTexParameterivEXTPROC)((intptr_t)function_pointer); + glMultiTexParameterivEXT(texunit, target, pname, param_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexParameterfEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jfloat param, jlong function_pointer) { + glMultiTexParameterfEXTPROC glMultiTexParameterfEXT = (glMultiTexParameterfEXTPROC)((intptr_t)function_pointer); + glMultiTexParameterfEXT(texunit, target, pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexParameterfvEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jlong param, jlong function_pointer) { + const GLfloat *param_address = (const GLfloat *)(intptr_t)param; + glMultiTexParameterfvEXTPROC glMultiTexParameterfvEXT = (glMultiTexParameterfvEXTPROC)((intptr_t)function_pointer); + glMultiTexParameterfvEXT(texunit, target, pname, param_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexImage1DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint border, jint format, jint type, jlong pixels, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)pixels; + glMultiTexImage1DEXTPROC glMultiTexImage1DEXT = (glMultiTexImage1DEXTPROC)((intptr_t)function_pointer); + glMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexImage1DEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint border, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)offsetToPointer(pixels_buffer_offset); + glMultiTexImage1DEXTPROC glMultiTexImage1DEXT = (glMultiTexImage1DEXTPROC)((intptr_t)function_pointer); + glMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexImage2DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint format, jint type, jlong pixels, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)pixels; + glMultiTexImage2DEXTPROC glMultiTexImage2DEXT = (glMultiTexImage2DEXTPROC)((intptr_t)function_pointer); + glMultiTexImage2DEXT(texunit, target, level, internalformat, width, height, border, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexImage2DEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)offsetToPointer(pixels_buffer_offset); + glMultiTexImage2DEXTPROC glMultiTexImage2DEXT = (glMultiTexImage2DEXTPROC)((intptr_t)function_pointer); + glMultiTexImage2DEXT(texunit, target, level, internalformat, width, height, border, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexSubImage1DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint width, jint format, jint type, jlong pixels, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)pixels; + glMultiTexSubImage1DEXTPROC glMultiTexSubImage1DEXT = (glMultiTexSubImage1DEXTPROC)((intptr_t)function_pointer); + glMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexSubImage1DEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint width, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)offsetToPointer(pixels_buffer_offset); + glMultiTexSubImage1DEXTPROC glMultiTexSubImage1DEXT = (glMultiTexSubImage1DEXTPROC)((intptr_t)function_pointer); + glMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexSubImage2DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jlong pixels, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)pixels; + glMultiTexSubImage2DEXTPROC glMultiTexSubImage2DEXT = (glMultiTexSubImage2DEXTPROC)((intptr_t)function_pointer); + glMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexSubImage2DEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)offsetToPointer(pixels_buffer_offset); + glMultiTexSubImage2DEXTPROC glMultiTexSubImage2DEXT = (glMultiTexSubImage2DEXTPROC)((intptr_t)function_pointer); + glMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCopyMultiTexImage1DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint x, jint y, jint width, jint border, jlong function_pointer) { + glCopyMultiTexImage1DEXTPROC glCopyMultiTexImage1DEXT = (glCopyMultiTexImage1DEXTPROC)((intptr_t)function_pointer); + glCopyMultiTexImage1DEXT(texunit, target, level, internalformat, x, y, width, border); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCopyMultiTexImage2DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint x, jint y, jint width, jint height, jint border, jlong function_pointer) { + glCopyMultiTexImage2DEXTPROC glCopyMultiTexImage2DEXT = (glCopyMultiTexImage2DEXTPROC)((intptr_t)function_pointer); + glCopyMultiTexImage2DEXT(texunit, target, level, internalformat, x, y, width, height, border); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCopyMultiTexSubImage1DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint x, jint y, jint width, jlong function_pointer) { + glCopyMultiTexSubImage1DEXTPROC glCopyMultiTexSubImage1DEXT = (glCopyMultiTexSubImage1DEXTPROC)((intptr_t)function_pointer); + glCopyMultiTexSubImage1DEXT(texunit, target, level, xoffset, x, y, width); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCopyMultiTexSubImage2DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint yoffset, jint x, jint y, jint width, jint height, jlong function_pointer) { + glCopyMultiTexSubImage2DEXTPROC glCopyMultiTexSubImage2DEXT = (glCopyMultiTexSubImage2DEXTPROC)((intptr_t)function_pointer); + glCopyMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, x, y, width, height); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexImageEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint format, jint type, jlong pixels, jlong function_pointer) { + GLvoid *pixels_address = (GLvoid *)(intptr_t)pixels; + glGetMultiTexImageEXTPROC glGetMultiTexImageEXT = (glGetMultiTexImageEXTPROC)((intptr_t)function_pointer); + glGetMultiTexImageEXT(texunit, target, level, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexImageEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer) { + GLvoid *pixels_address = (GLvoid *)(intptr_t)offsetToPointer(pixels_buffer_offset); + glGetMultiTexImageEXTPROC glGetMultiTexImageEXT = (glGetMultiTexImageEXTPROC)((intptr_t)function_pointer); + glGetMultiTexImageEXT(texunit, target, level, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexParameterfvEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetMultiTexParameterfvEXTPROC glGetMultiTexParameterfvEXT = (glGetMultiTexParameterfvEXTPROC)((intptr_t)function_pointer); + glGetMultiTexParameterfvEXT(texunit, target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexParameterivEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetMultiTexParameterivEXTPROC glGetMultiTexParameterivEXT = (glGetMultiTexParameterivEXTPROC)((intptr_t)function_pointer); + glGetMultiTexParameterivEXT(texunit, target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexLevelParameterfvEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetMultiTexLevelParameterfvEXTPROC glGetMultiTexLevelParameterfvEXT = (glGetMultiTexLevelParameterfvEXTPROC)((intptr_t)function_pointer); + glGetMultiTexLevelParameterfvEXT(texunit, target, level, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexLevelParameterivEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetMultiTexLevelParameterivEXTPROC glGetMultiTexLevelParameterivEXT = (glGetMultiTexLevelParameterivEXTPROC)((intptr_t)function_pointer); + glGetMultiTexLevelParameterivEXT(texunit, target, level, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexImage3DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint format, jint type, jlong pixels, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)pixels; + glMultiTexImage3DEXTPROC glMultiTexImage3DEXT = (glMultiTexImage3DEXTPROC)((intptr_t)function_pointer); + glMultiTexImage3DEXT(texunit, target, level, internalformat, width, height, depth, border, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexImage3DEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)offsetToPointer(pixels_buffer_offset); + glMultiTexImage3DEXTPROC glMultiTexImage3DEXT = (glMultiTexImage3DEXTPROC)((intptr_t)function_pointer); + glMultiTexImage3DEXT(texunit, target, level, internalformat, width, height, depth, border, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexSubImage3DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jlong pixels, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)pixels; + glMultiTexSubImage3DEXTPROC glMultiTexSubImage3DEXT = (glMultiTexSubImage3DEXTPROC)((intptr_t)function_pointer); + glMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexSubImage3DEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)offsetToPointer(pixels_buffer_offset); + glMultiTexSubImage3DEXTPROC glMultiTexSubImage3DEXT = (glMultiTexSubImage3DEXTPROC)((intptr_t)function_pointer); + glMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCopyMultiTexSubImage3DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint x, jint y, jint width, jint height, jlong function_pointer) { + glCopyMultiTexSubImage3DEXTPROC glCopyMultiTexSubImage3DEXT = (glCopyMultiTexSubImage3DEXTPROC)((intptr_t)function_pointer); + glCopyMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, x, y, width, height); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglEnableClientStateIndexedEXT(JNIEnv *env, jclass clazz, jint array, jint index, jlong function_pointer) { + glEnableClientStateIndexedEXTPROC glEnableClientStateIndexedEXT = (glEnableClientStateIndexedEXTPROC)((intptr_t)function_pointer); + glEnableClientStateIndexedEXT(array, index); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglDisableClientStateIndexedEXT(JNIEnv *env, jclass clazz, jint array, jint index, jlong function_pointer) { + glDisableClientStateIndexedEXTPROC glDisableClientStateIndexedEXT = (glDisableClientStateIndexedEXTPROC)((intptr_t)function_pointer); + glDisableClientStateIndexedEXT(array, index); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglEnableClientStateiEXT(JNIEnv *env, jclass clazz, jint array, jint index, jlong function_pointer) { + glEnableClientStateiEXTPROC glEnableClientStateiEXT = (glEnableClientStateiEXTPROC)((intptr_t)function_pointer); + glEnableClientStateiEXT(array, index); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglDisableClientStateiEXT(JNIEnv *env, jclass clazz, jint array, jint index, jlong function_pointer) { + glDisableClientStateiEXTPROC glDisableClientStateiEXT = (glDisableClientStateiEXTPROC)((intptr_t)function_pointer); + glDisableClientStateiEXT(array, index); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetFloatIndexedvEXT(JNIEnv *env, jclass clazz, jint pname, jint index, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetFloatIndexedvEXTPROC glGetFloatIndexedvEXT = (glGetFloatIndexedvEXTPROC)((intptr_t)function_pointer); + glGetFloatIndexedvEXT(pname, index, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetDoubleIndexedvEXT(JNIEnv *env, jclass clazz, jint pname, jint index, jlong params, jlong function_pointer) { + GLdouble *params_address = (GLdouble *)(intptr_t)params; + glGetDoubleIndexedvEXTPROC glGetDoubleIndexedvEXT = (glGetDoubleIndexedvEXTPROC)((intptr_t)function_pointer); + glGetDoubleIndexedvEXT(pname, index, params_address); +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetPointerIndexedvEXT(JNIEnv *env, jclass clazz, jint pname, jint index, jlong result_size, jlong function_pointer) { + glGetPointerIndexedvEXTPROC glGetPointerIndexedvEXT = (glGetPointerIndexedvEXTPROC)((intptr_t)function_pointer); + GLvoid * __result; + glGetPointerIndexedvEXT(pname, index, &__result); + return safeNewBuffer(env, __result, result_size); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetFloati_1vEXT(JNIEnv *env, jclass clazz, jint pname, jint index, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetFloati_vEXTPROC glGetFloati_vEXT = (glGetFloati_vEXTPROC)((intptr_t)function_pointer); + glGetFloati_vEXT(pname, index, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetDoublei_1vEXT(JNIEnv *env, jclass clazz, jint pname, jint index, jlong params, jlong function_pointer) { + GLdouble *params_address = (GLdouble *)(intptr_t)params; + glGetDoublei_vEXTPROC glGetDoublei_vEXT = (glGetDoublei_vEXTPROC)((intptr_t)function_pointer); + glGetDoublei_vEXT(pname, index, params_address); +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetPointeri_1vEXT(JNIEnv *env, jclass clazz, jint pname, jint index, jlong result_size, jlong function_pointer) { + glGetPointeri_vEXTPROC glGetPointeri_vEXT = (glGetPointeri_vEXTPROC)((intptr_t)function_pointer); + GLvoid * __result; + glGetPointeri_vEXT(pname, index, &__result); + return safeNewBuffer(env, __result, result_size); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramStringEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint format, jint len, jlong string, jlong function_pointer) { + const GLvoid *string_address = (const GLvoid *)(intptr_t)string; + glNamedProgramStringEXTPROC glNamedProgramStringEXT = (glNamedProgramStringEXTPROC)((intptr_t)function_pointer); + glNamedProgramStringEXT(program, target, format, len, string_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramLocalParameter4dEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jdouble x, jdouble y, jdouble z, jdouble w, jlong function_pointer) { + glNamedProgramLocalParameter4dEXTPROC glNamedProgramLocalParameter4dEXT = (glNamedProgramLocalParameter4dEXTPROC)((intptr_t)function_pointer); + glNamedProgramLocalParameter4dEXT(program, target, index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramLocalParameter4dvEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jlong params, jlong function_pointer) { + const GLdouble *params_address = (const GLdouble *)(intptr_t)params; + glNamedProgramLocalParameter4dvEXTPROC glNamedProgramLocalParameter4dvEXT = (glNamedProgramLocalParameter4dvEXTPROC)((intptr_t)function_pointer); + glNamedProgramLocalParameter4dvEXT(program, target, index, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramLocalParameter4fEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jfloat x, jfloat y, jfloat z, jfloat w, jlong function_pointer) { + glNamedProgramLocalParameter4fEXTPROC glNamedProgramLocalParameter4fEXT = (glNamedProgramLocalParameter4fEXTPROC)((intptr_t)function_pointer); + glNamedProgramLocalParameter4fEXT(program, target, index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramLocalParameter4fvEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jlong params, jlong function_pointer) { + const GLfloat *params_address = (const GLfloat *)(intptr_t)params; + glNamedProgramLocalParameter4fvEXTPROC glNamedProgramLocalParameter4fvEXT = (glNamedProgramLocalParameter4fvEXTPROC)((intptr_t)function_pointer); + glNamedProgramLocalParameter4fvEXT(program, target, index, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedProgramLocalParameterdvEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jlong params, jlong function_pointer) { + GLdouble *params_address = (GLdouble *)(intptr_t)params; + glGetNamedProgramLocalParameterdvEXTPROC glGetNamedProgramLocalParameterdvEXT = (glGetNamedProgramLocalParameterdvEXTPROC)((intptr_t)function_pointer); + glGetNamedProgramLocalParameterdvEXT(program, target, index, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedProgramLocalParameterfvEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetNamedProgramLocalParameterfvEXTPROC glGetNamedProgramLocalParameterfvEXT = (glGetNamedProgramLocalParameterfvEXTPROC)((intptr_t)function_pointer); + glGetNamedProgramLocalParameterfvEXT(program, target, index, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedProgramivEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetNamedProgramivEXTPROC glGetNamedProgramivEXT = (glGetNamedProgramivEXTPROC)((intptr_t)function_pointer); + glGetNamedProgramivEXT(program, target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedProgramStringEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint pname, jlong string, jlong function_pointer) { + GLvoid *string_address = (GLvoid *)(intptr_t)string; + glGetNamedProgramStringEXTPROC glGetNamedProgramStringEXT = (glGetNamedProgramStringEXTPROC)((intptr_t)function_pointer); + glGetNamedProgramStringEXT(program, target, pname, string_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureImage3DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glCompressedTextureImage3DEXTPROC glCompressedTextureImage3DEXT = (glCompressedTextureImage3DEXTPROC)((intptr_t)function_pointer); + glCompressedTextureImage3DEXT(texture, target, level, internalformat, width, height, depth, border, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureImage3DEXTBO(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jlong data_buffer_offset, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)offsetToPointer(data_buffer_offset); + glCompressedTextureImage3DEXTPROC glCompressedTextureImage3DEXT = (glCompressedTextureImage3DEXTPROC)((intptr_t)function_pointer); + glCompressedTextureImage3DEXT(texture, target, level, internalformat, width, height, depth, border, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureImage2DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glCompressedTextureImage2DEXTPROC glCompressedTextureImage2DEXT = (glCompressedTextureImage2DEXTPROC)((intptr_t)function_pointer); + glCompressedTextureImage2DEXT(texture, target, level, internalformat, width, height, border, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureImage2DEXTBO(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jlong data_buffer_offset, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)offsetToPointer(data_buffer_offset); + glCompressedTextureImage2DEXTPROC glCompressedTextureImage2DEXT = (glCompressedTextureImage2DEXTPROC)((intptr_t)function_pointer); + glCompressedTextureImage2DEXT(texture, target, level, internalformat, width, height, border, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureImage1DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint border, jint imageSize, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glCompressedTextureImage1DEXTPROC glCompressedTextureImage1DEXT = (glCompressedTextureImage1DEXTPROC)((intptr_t)function_pointer); + glCompressedTextureImage1DEXT(texture, target, level, internalformat, width, border, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureImage1DEXTBO(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint internalformat, jint width, jint border, jint imageSize, jlong data_buffer_offset, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)offsetToPointer(data_buffer_offset); + glCompressedTextureImage1DEXTPROC glCompressedTextureImage1DEXT = (glCompressedTextureImage1DEXTPROC)((intptr_t)function_pointer); + glCompressedTextureImage1DEXT(texture, target, level, internalformat, width, border, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureSubImage3DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imageSize, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glCompressedTextureSubImage3DEXTPROC glCompressedTextureSubImage3DEXT = (glCompressedTextureSubImage3DEXTPROC)((intptr_t)function_pointer); + glCompressedTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureSubImage3DEXTBO(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imageSize, jlong data_buffer_offset, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)offsetToPointer(data_buffer_offset); + glCompressedTextureSubImage3DEXTPROC glCompressedTextureSubImage3DEXT = (glCompressedTextureSubImage3DEXTPROC)((intptr_t)function_pointer); + glCompressedTextureSubImage3DEXT(texture, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureSubImage2DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glCompressedTextureSubImage2DEXTPROC glCompressedTextureSubImage2DEXT = (glCompressedTextureSubImage2DEXTPROC)((intptr_t)function_pointer); + glCompressedTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureSubImage2DEXTBO(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jlong data_buffer_offset, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)offsetToPointer(data_buffer_offset); + glCompressedTextureSubImage2DEXTPROC glCompressedTextureSubImage2DEXT = (glCompressedTextureSubImage2DEXTPROC)((intptr_t)function_pointer); + glCompressedTextureSubImage2DEXT(texture, target, level, xoffset, yoffset, width, height, format, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureSubImage1DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint width, jint format, jint imageSize, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glCompressedTextureSubImage1DEXTPROC glCompressedTextureSubImage1DEXT = (glCompressedTextureSubImage1DEXTPROC)((intptr_t)function_pointer); + glCompressedTextureSubImage1DEXT(texture, target, level, xoffset, width, format, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedTextureSubImage1DEXTBO(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jint xoffset, jint width, jint format, jint imageSize, jlong data_buffer_offset, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)offsetToPointer(data_buffer_offset); + glCompressedTextureSubImage1DEXTPROC glCompressedTextureSubImage1DEXT = (glCompressedTextureSubImage1DEXTPROC)((intptr_t)function_pointer); + glCompressedTextureSubImage1DEXT(texture, target, level, xoffset, width, format, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetCompressedTextureImageEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jlong img, jlong function_pointer) { + GLvoid *img_address = (GLvoid *)(intptr_t)img; + glGetCompressedTextureImageEXTPROC glGetCompressedTextureImageEXT = (glGetCompressedTextureImageEXTPROC)((intptr_t)function_pointer); + glGetCompressedTextureImageEXT(texture, target, level, img_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetCompressedTextureImageEXTBO(JNIEnv *env, jclass clazz, jint texture, jint target, jint level, jlong img_buffer_offset, jlong function_pointer) { + GLvoid *img_address = (GLvoid *)(intptr_t)offsetToPointer(img_buffer_offset); + glGetCompressedTextureImageEXTPROC glGetCompressedTextureImageEXT = (glGetCompressedTextureImageEXTPROC)((intptr_t)function_pointer); + glGetCompressedTextureImageEXT(texture, target, level, img_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexImage3DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glCompressedMultiTexImage3DEXTPROC glCompressedMultiTexImage3DEXT = (glCompressedMultiTexImage3DEXTPROC)((intptr_t)function_pointer); + glCompressedMultiTexImage3DEXT(texunit, target, level, internalformat, width, height, depth, border, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexImage3DEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jlong data_buffer_offset, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)offsetToPointer(data_buffer_offset); + glCompressedMultiTexImage3DEXTPROC glCompressedMultiTexImage3DEXT = (glCompressedMultiTexImage3DEXTPROC)((intptr_t)function_pointer); + glCompressedMultiTexImage3DEXT(texunit, target, level, internalformat, width, height, depth, border, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexImage2DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glCompressedMultiTexImage2DEXTPROC glCompressedMultiTexImage2DEXT = (glCompressedMultiTexImage2DEXTPROC)((intptr_t)function_pointer); + glCompressedMultiTexImage2DEXT(texunit, target, level, internalformat, width, height, border, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexImage2DEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jlong data_buffer_offset, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)offsetToPointer(data_buffer_offset); + glCompressedMultiTexImage2DEXTPROC glCompressedMultiTexImage2DEXT = (glCompressedMultiTexImage2DEXTPROC)((intptr_t)function_pointer); + glCompressedMultiTexImage2DEXT(texunit, target, level, internalformat, width, height, border, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexImage1DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint border, jint imageSize, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glCompressedMultiTexImage1DEXTPROC glCompressedMultiTexImage1DEXT = (glCompressedMultiTexImage1DEXTPROC)((intptr_t)function_pointer); + glCompressedMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexImage1DEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint internalformat, jint width, jint border, jint imageSize, jlong data_buffer_offset, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)offsetToPointer(data_buffer_offset); + glCompressedMultiTexImage1DEXTPROC glCompressedMultiTexImage1DEXT = (glCompressedMultiTexImage1DEXTPROC)((intptr_t)function_pointer); + glCompressedMultiTexImage1DEXT(texunit, target, level, internalformat, width, border, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexSubImage3DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imageSize, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glCompressedMultiTexSubImage3DEXTPROC glCompressedMultiTexSubImage3DEXT = (glCompressedMultiTexSubImage3DEXTPROC)((intptr_t)function_pointer); + glCompressedMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexSubImage3DEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imageSize, jlong data_buffer_offset, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)offsetToPointer(data_buffer_offset); + glCompressedMultiTexSubImage3DEXTPROC glCompressedMultiTexSubImage3DEXT = (glCompressedMultiTexSubImage3DEXTPROC)((intptr_t)function_pointer); + glCompressedMultiTexSubImage3DEXT(texunit, target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexSubImage2DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glCompressedMultiTexSubImage2DEXTPROC glCompressedMultiTexSubImage2DEXT = (glCompressedMultiTexSubImage2DEXTPROC)((intptr_t)function_pointer); + glCompressedMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexSubImage2DEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jlong data_buffer_offset, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)offsetToPointer(data_buffer_offset); + glCompressedMultiTexSubImage2DEXTPROC glCompressedMultiTexSubImage2DEXT = (glCompressedMultiTexSubImage2DEXTPROC)((intptr_t)function_pointer); + glCompressedMultiTexSubImage2DEXT(texunit, target, level, xoffset, yoffset, width, height, format, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexSubImage1DEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint width, jint format, jint imageSize, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glCompressedMultiTexSubImage1DEXTPROC glCompressedMultiTexSubImage1DEXT = (glCompressedMultiTexSubImage1DEXTPROC)((intptr_t)function_pointer); + glCompressedMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCompressedMultiTexSubImage1DEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jint xoffset, jint width, jint format, jint imageSize, jlong data_buffer_offset, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)offsetToPointer(data_buffer_offset); + glCompressedMultiTexSubImage1DEXTPROC glCompressedMultiTexSubImage1DEXT = (glCompressedMultiTexSubImage1DEXTPROC)((intptr_t)function_pointer); + glCompressedMultiTexSubImage1DEXT(texunit, target, level, xoffset, width, format, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetCompressedMultiTexImageEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jlong img, jlong function_pointer) { + GLvoid *img_address = (GLvoid *)(intptr_t)img; + glGetCompressedMultiTexImageEXTPROC glGetCompressedMultiTexImageEXT = (glGetCompressedMultiTexImageEXTPROC)((intptr_t)function_pointer); + glGetCompressedMultiTexImageEXT(texunit, target, level, img_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetCompressedMultiTexImageEXTBO(JNIEnv *env, jclass clazz, jint texunit, jint target, jint level, jlong img_buffer_offset, jlong function_pointer) { + GLvoid *img_address = (GLvoid *)(intptr_t)offsetToPointer(img_buffer_offset); + glGetCompressedMultiTexImageEXTPROC glGetCompressedMultiTexImageEXT = (glGetCompressedMultiTexImageEXTPROC)((intptr_t)function_pointer); + glGetCompressedMultiTexImageEXT(texunit, target, level, img_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixLoadTransposefEXT(JNIEnv *env, jclass clazz, jint matrixMode, jlong m, jlong function_pointer) { + const GLfloat *m_address = (const GLfloat *)(intptr_t)m; + glMatrixLoadTransposefEXTPROC glMatrixLoadTransposefEXT = (glMatrixLoadTransposefEXTPROC)((intptr_t)function_pointer); + glMatrixLoadTransposefEXT(matrixMode, m_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixLoadTransposedEXT(JNIEnv *env, jclass clazz, jint matrixMode, jlong m, jlong function_pointer) { + const GLdouble *m_address = (const GLdouble *)(intptr_t)m; + glMatrixLoadTransposedEXTPROC glMatrixLoadTransposedEXT = (glMatrixLoadTransposedEXTPROC)((intptr_t)function_pointer); + glMatrixLoadTransposedEXT(matrixMode, m_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixMultTransposefEXT(JNIEnv *env, jclass clazz, jint matrixMode, jlong m, jlong function_pointer) { + const GLfloat *m_address = (const GLfloat *)(intptr_t)m; + glMatrixMultTransposefEXTPROC glMatrixMultTransposefEXT = (glMatrixMultTransposefEXTPROC)((intptr_t)function_pointer); + glMatrixMultTransposefEXT(matrixMode, m_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMatrixMultTransposedEXT(JNIEnv *env, jclass clazz, jint matrixMode, jlong m, jlong function_pointer) { + const GLdouble *m_address = (const GLdouble *)(intptr_t)m; + glMatrixMultTransposedEXTPROC glMatrixMultTransposedEXT = (glMatrixMultTransposedEXTPROC)((intptr_t)function_pointer); + glMatrixMultTransposedEXT(matrixMode, m_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedBufferDataEXT(JNIEnv *env, jclass clazz, jint buffer, jlong size, jlong data, jint usage, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glNamedBufferDataEXTPROC glNamedBufferDataEXT = (glNamedBufferDataEXTPROC)((intptr_t)function_pointer); + glNamedBufferDataEXT(buffer, size, data_address, usage); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedBufferSubDataEXT(JNIEnv *env, jclass clazz, jint buffer, jlong offset, jlong size, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glNamedBufferSubDataEXTPROC glNamedBufferSubDataEXT = (glNamedBufferSubDataEXTPROC)((intptr_t)function_pointer); + glNamedBufferSubDataEXT(buffer, offset, size, data_address); +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMapNamedBufferEXT(JNIEnv *env, jclass clazz, jint buffer, jint access, jlong result_size, jobject old_buffer, jlong function_pointer) { + glMapNamedBufferEXTPROC glMapNamedBufferEXT = (glMapNamedBufferEXTPROC)((intptr_t)function_pointer); + GLvoid * __result = glMapNamedBufferEXT(buffer, access); + return safeNewBufferCached(env, __result, result_size, old_buffer); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglUnmapNamedBufferEXT(JNIEnv *env, jclass clazz, jint buffer, jlong function_pointer) { + glUnmapNamedBufferEXTPROC glUnmapNamedBufferEXT = (glUnmapNamedBufferEXTPROC)((intptr_t)function_pointer); + GLboolean __result = glUnmapNamedBufferEXT(buffer); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedBufferParameterivEXT(JNIEnv *env, jclass clazz, jint buffer, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetNamedBufferParameterivEXTPROC glGetNamedBufferParameterivEXT = (glGetNamedBufferParameterivEXTPROC)((intptr_t)function_pointer); + glGetNamedBufferParameterivEXT(buffer, pname, params_address); +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedBufferPointervEXT(JNIEnv *env, jclass clazz, jint buffer, jint pname, jlong result_size, jlong function_pointer) { + glGetNamedBufferPointervEXTPROC glGetNamedBufferPointervEXT = (glGetNamedBufferPointervEXTPROC)((intptr_t)function_pointer); + GLvoid * __result; + glGetNamedBufferPointervEXT(buffer, pname, &__result); + return safeNewBuffer(env, __result, result_size); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedBufferSubDataEXT(JNIEnv *env, jclass clazz, jint buffer, jlong offset, jlong size, jlong data, jlong function_pointer) { + GLvoid *data_address = (GLvoid *)(intptr_t)data; + glGetNamedBufferSubDataEXTPROC glGetNamedBufferSubDataEXT = (glGetNamedBufferSubDataEXTPROC)((intptr_t)function_pointer); + glGetNamedBufferSubDataEXT(buffer, offset, size, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform1fEXT(JNIEnv *env, jclass clazz, jint program, jint location, jfloat v0, jlong function_pointer) { + glProgramUniform1fEXTPROC glProgramUniform1fEXT = (glProgramUniform1fEXTPROC)((intptr_t)function_pointer); + glProgramUniform1fEXT(program, location, v0); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform2fEXT(JNIEnv *env, jclass clazz, jint program, jint location, jfloat v0, jfloat v1, jlong function_pointer) { + glProgramUniform2fEXTPROC glProgramUniform2fEXT = (glProgramUniform2fEXTPROC)((intptr_t)function_pointer); + glProgramUniform2fEXT(program, location, v0, v1); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform3fEXT(JNIEnv *env, jclass clazz, jint program, jint location, jfloat v0, jfloat v1, jfloat v2, jlong function_pointer) { + glProgramUniform3fEXTPROC glProgramUniform3fEXT = (glProgramUniform3fEXTPROC)((intptr_t)function_pointer); + glProgramUniform3fEXT(program, location, v0, v1, v2); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform4fEXT(JNIEnv *env, jclass clazz, jint program, jint location, jfloat v0, jfloat v1, jfloat v2, jfloat v3, jlong function_pointer) { + glProgramUniform4fEXTPROC glProgramUniform4fEXT = (glProgramUniform4fEXTPROC)((intptr_t)function_pointer); + glProgramUniform4fEXT(program, location, v0, v1, v2, v3); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform1iEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint v0, jlong function_pointer) { + glProgramUniform1iEXTPROC glProgramUniform1iEXT = (glProgramUniform1iEXTPROC)((intptr_t)function_pointer); + glProgramUniform1iEXT(program, location, v0); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform2iEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint v0, jint v1, jlong function_pointer) { + glProgramUniform2iEXTPROC glProgramUniform2iEXT = (glProgramUniform2iEXTPROC)((intptr_t)function_pointer); + glProgramUniform2iEXT(program, location, v0, v1); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform3iEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint v0, jint v1, jint v2, jlong function_pointer) { + glProgramUniform3iEXTPROC glProgramUniform3iEXT = (glProgramUniform3iEXTPROC)((intptr_t)function_pointer); + glProgramUniform3iEXT(program, location, v0, v1, v2); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform4iEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint v0, jint v1, jint v2, jint v3, jlong function_pointer) { + glProgramUniform4iEXTPROC glProgramUniform4iEXT = (glProgramUniform4iEXTPROC)((intptr_t)function_pointer); + glProgramUniform4iEXT(program, location, v0, v1, v2, v3); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform1fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniform1fvEXTPROC glProgramUniform1fvEXT = (glProgramUniform1fvEXTPROC)((intptr_t)function_pointer); + glProgramUniform1fvEXT(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform2fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniform2fvEXTPROC glProgramUniform2fvEXT = (glProgramUniform2fvEXTPROC)((intptr_t)function_pointer); + glProgramUniform2fvEXT(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform3fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniform3fvEXTPROC glProgramUniform3fvEXT = (glProgramUniform3fvEXTPROC)((intptr_t)function_pointer); + glProgramUniform3fvEXT(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform4fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniform4fvEXTPROC glProgramUniform4fvEXT = (glProgramUniform4fvEXTPROC)((intptr_t)function_pointer); + glProgramUniform4fvEXT(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform1ivEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLint *value_address = (const GLint *)(intptr_t)value; + glProgramUniform1ivEXTPROC glProgramUniform1ivEXT = (glProgramUniform1ivEXTPROC)((intptr_t)function_pointer); + glProgramUniform1ivEXT(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform2ivEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLint *value_address = (const GLint *)(intptr_t)value; + glProgramUniform2ivEXTPROC glProgramUniform2ivEXT = (glProgramUniform2ivEXTPROC)((intptr_t)function_pointer); + glProgramUniform2ivEXT(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform3ivEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLint *value_address = (const GLint *)(intptr_t)value; + glProgramUniform3ivEXTPROC glProgramUniform3ivEXT = (glProgramUniform3ivEXTPROC)((intptr_t)function_pointer); + glProgramUniform3ivEXT(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform4ivEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLint *value_address = (const GLint *)(intptr_t)value; + glProgramUniform4ivEXTPROC glProgramUniform4ivEXT = (glProgramUniform4ivEXTPROC)((intptr_t)function_pointer); + glProgramUniform4ivEXT(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniformMatrix2fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniformMatrix2fvEXTPROC glProgramUniformMatrix2fvEXT = (glProgramUniformMatrix2fvEXTPROC)((intptr_t)function_pointer); + glProgramUniformMatrix2fvEXT(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniformMatrix3fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniformMatrix3fvEXTPROC glProgramUniformMatrix3fvEXT = (glProgramUniformMatrix3fvEXTPROC)((intptr_t)function_pointer); + glProgramUniformMatrix3fvEXT(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniformMatrix4fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniformMatrix4fvEXTPROC glProgramUniformMatrix4fvEXT = (glProgramUniformMatrix4fvEXTPROC)((intptr_t)function_pointer); + glProgramUniformMatrix4fvEXT(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniformMatrix2x3fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniformMatrix2x3fvEXTPROC glProgramUniformMatrix2x3fvEXT = (glProgramUniformMatrix2x3fvEXTPROC)((intptr_t)function_pointer); + glProgramUniformMatrix2x3fvEXT(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniformMatrix3x2fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniformMatrix3x2fvEXTPROC glProgramUniformMatrix3x2fvEXT = (glProgramUniformMatrix3x2fvEXTPROC)((intptr_t)function_pointer); + glProgramUniformMatrix3x2fvEXT(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniformMatrix2x4fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniformMatrix2x4fvEXTPROC glProgramUniformMatrix2x4fvEXT = (glProgramUniformMatrix2x4fvEXTPROC)((intptr_t)function_pointer); + glProgramUniformMatrix2x4fvEXT(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniformMatrix4x2fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniformMatrix4x2fvEXTPROC glProgramUniformMatrix4x2fvEXT = (glProgramUniformMatrix4x2fvEXTPROC)((intptr_t)function_pointer); + glProgramUniformMatrix4x2fvEXT(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniformMatrix3x4fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniformMatrix3x4fvEXTPROC glProgramUniformMatrix3x4fvEXT = (glProgramUniformMatrix3x4fvEXTPROC)((intptr_t)function_pointer); + glProgramUniformMatrix3x4fvEXT(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniformMatrix4x3fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniformMatrix4x3fvEXTPROC glProgramUniformMatrix4x3fvEXT = (glProgramUniformMatrix4x3fvEXTPROC)((intptr_t)function_pointer); + glProgramUniformMatrix4x3fvEXT(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureBufferEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint internalformat, jint buffer, jlong function_pointer) { + glTextureBufferEXTPROC glTextureBufferEXT = (glTextureBufferEXTPROC)((intptr_t)function_pointer); + glTextureBufferEXT(texture, target, internalformat, buffer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexBufferEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint internalformat, jint buffer, jlong function_pointer) { + glMultiTexBufferEXTPROC glMultiTexBufferEXT = (glMultiTexBufferEXTPROC)((intptr_t)function_pointer); + glMultiTexBufferEXT(texunit, target, internalformat, buffer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureParameterIivEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint pname, jlong params, jlong function_pointer) { + const GLint *params_address = (const GLint *)(intptr_t)params; + glTextureParameterIivEXTPROC glTextureParameterIivEXT = (glTextureParameterIivEXTPROC)((intptr_t)function_pointer); + glTextureParameterIivEXT(texture, target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureParameterIuivEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint pname, jlong params, jlong function_pointer) { + const GLuint *params_address = (const GLuint *)(intptr_t)params; + glTextureParameterIuivEXTPROC glTextureParameterIuivEXT = (glTextureParameterIuivEXTPROC)((intptr_t)function_pointer); + glTextureParameterIuivEXT(texture, target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetTextureParameterIivEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetTextureParameterIivEXTPROC glGetTextureParameterIivEXT = (glGetTextureParameterIivEXTPROC)((intptr_t)function_pointer); + glGetTextureParameterIivEXT(texture, target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetTextureParameterIuivEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint pname, jlong params, jlong function_pointer) { + GLuint *params_address = (GLuint *)(intptr_t)params; + glGetTextureParameterIuivEXTPROC glGetTextureParameterIuivEXT = (glGetTextureParameterIuivEXTPROC)((intptr_t)function_pointer); + glGetTextureParameterIuivEXT(texture, target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexParameterIivEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jlong params, jlong function_pointer) { + const GLint *params_address = (const GLint *)(intptr_t)params; + glMultiTexParameterIivEXTPROC glMultiTexParameterIivEXT = (glMultiTexParameterIivEXTPROC)((intptr_t)function_pointer); + glMultiTexParameterIivEXT(texunit, target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexParameterIuivEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jlong params, jlong function_pointer) { + const GLuint *params_address = (const GLuint *)(intptr_t)params; + glMultiTexParameterIuivEXTPROC glMultiTexParameterIuivEXT = (glMultiTexParameterIuivEXTPROC)((intptr_t)function_pointer); + glMultiTexParameterIuivEXT(texunit, target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexParameterIivEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetMultiTexParameterIivEXTPROC glGetMultiTexParameterIivEXT = (glGetMultiTexParameterIivEXTPROC)((intptr_t)function_pointer); + glGetMultiTexParameterIivEXT(texunit, target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetMultiTexParameterIuivEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint pname, jlong params, jlong function_pointer) { + GLuint *params_address = (GLuint *)(intptr_t)params; + glGetMultiTexParameterIuivEXTPROC glGetMultiTexParameterIuivEXT = (glGetMultiTexParameterIuivEXTPROC)((intptr_t)function_pointer); + glGetMultiTexParameterIuivEXT(texunit, target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform1uiEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint v0, jlong function_pointer) { + glProgramUniform1uiEXTPROC glProgramUniform1uiEXT = (glProgramUniform1uiEXTPROC)((intptr_t)function_pointer); + glProgramUniform1uiEXT(program, location, v0); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform2uiEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint v0, jint v1, jlong function_pointer) { + glProgramUniform2uiEXTPROC glProgramUniform2uiEXT = (glProgramUniform2uiEXTPROC)((intptr_t)function_pointer); + glProgramUniform2uiEXT(program, location, v0, v1); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform3uiEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint v0, jint v1, jint v2, jlong function_pointer) { + glProgramUniform3uiEXTPROC glProgramUniform3uiEXT = (glProgramUniform3uiEXTPROC)((intptr_t)function_pointer); + glProgramUniform3uiEXT(program, location, v0, v1, v2); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform4uiEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint v0, jint v1, jint v2, jint v3, jlong function_pointer) { + glProgramUniform4uiEXTPROC glProgramUniform4uiEXT = (glProgramUniform4uiEXTPROC)((intptr_t)function_pointer); + glProgramUniform4uiEXT(program, location, v0, v1, v2, v3); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform1uivEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLuint *value_address = (const GLuint *)(intptr_t)value; + glProgramUniform1uivEXTPROC glProgramUniform1uivEXT = (glProgramUniform1uivEXTPROC)((intptr_t)function_pointer); + glProgramUniform1uivEXT(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform2uivEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLuint *value_address = (const GLuint *)(intptr_t)value; + glProgramUniform2uivEXTPROC glProgramUniform2uivEXT = (glProgramUniform2uivEXTPROC)((intptr_t)function_pointer); + glProgramUniform2uivEXT(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform3uivEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLuint *value_address = (const GLuint *)(intptr_t)value; + glProgramUniform3uivEXTPROC glProgramUniform3uivEXT = (glProgramUniform3uivEXTPROC)((intptr_t)function_pointer); + glProgramUniform3uivEXT(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglProgramUniform4uivEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLuint *value_address = (const GLuint *)(intptr_t)value; + glProgramUniform4uivEXTPROC glProgramUniform4uivEXT = (glProgramUniform4uivEXTPROC)((intptr_t)function_pointer); + glProgramUniform4uivEXT(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramLocalParameters4fvEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jint count, jlong params, jlong function_pointer) { + const GLfloat *params_address = (const GLfloat *)(intptr_t)params; + glNamedProgramLocalParameters4fvEXTPROC glNamedProgramLocalParameters4fvEXT = (glNamedProgramLocalParameters4fvEXTPROC)((intptr_t)function_pointer); + glNamedProgramLocalParameters4fvEXT(program, target, index, count, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramLocalParameterI4iEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jint x, jint y, jint z, jint w, jlong function_pointer) { + glNamedProgramLocalParameterI4iEXTPROC glNamedProgramLocalParameterI4iEXT = (glNamedProgramLocalParameterI4iEXTPROC)((intptr_t)function_pointer); + glNamedProgramLocalParameterI4iEXT(program, target, index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramLocalParameterI4ivEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jlong params, jlong function_pointer) { + const GLint *params_address = (const GLint *)(intptr_t)params; + glNamedProgramLocalParameterI4ivEXTPROC glNamedProgramLocalParameterI4ivEXT = (glNamedProgramLocalParameterI4ivEXTPROC)((intptr_t)function_pointer); + glNamedProgramLocalParameterI4ivEXT(program, target, index, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramLocalParametersI4ivEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jint count, jlong params, jlong function_pointer) { + const GLint *params_address = (const GLint *)(intptr_t)params; + glNamedProgramLocalParametersI4ivEXTPROC glNamedProgramLocalParametersI4ivEXT = (glNamedProgramLocalParametersI4ivEXTPROC)((intptr_t)function_pointer); + glNamedProgramLocalParametersI4ivEXT(program, target, index, count, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramLocalParameterI4uiEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jint x, jint y, jint z, jint w, jlong function_pointer) { + glNamedProgramLocalParameterI4uiEXTPROC glNamedProgramLocalParameterI4uiEXT = (glNamedProgramLocalParameterI4uiEXTPROC)((intptr_t)function_pointer); + glNamedProgramLocalParameterI4uiEXT(program, target, index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramLocalParameterI4uivEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jlong params, jlong function_pointer) { + const GLuint *params_address = (const GLuint *)(intptr_t)params; + glNamedProgramLocalParameterI4uivEXTPROC glNamedProgramLocalParameterI4uivEXT = (glNamedProgramLocalParameterI4uivEXTPROC)((intptr_t)function_pointer); + glNamedProgramLocalParameterI4uivEXT(program, target, index, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedProgramLocalParametersI4uivEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jint count, jlong params, jlong function_pointer) { + const GLuint *params_address = (const GLuint *)(intptr_t)params; + glNamedProgramLocalParametersI4uivEXTPROC glNamedProgramLocalParametersI4uivEXT = (glNamedProgramLocalParametersI4uivEXTPROC)((intptr_t)function_pointer); + glNamedProgramLocalParametersI4uivEXT(program, target, index, count, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedProgramLocalParameterIivEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetNamedProgramLocalParameterIivEXTPROC glGetNamedProgramLocalParameterIivEXT = (glGetNamedProgramLocalParameterIivEXTPROC)((intptr_t)function_pointer); + glGetNamedProgramLocalParameterIivEXT(program, target, index, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedProgramLocalParameterIuivEXT(JNIEnv *env, jclass clazz, jint program, jint target, jint index, jlong params, jlong function_pointer) { + GLuint *params_address = (GLuint *)(intptr_t)params; + glGetNamedProgramLocalParameterIuivEXTPROC glGetNamedProgramLocalParameterIuivEXT = (glGetNamedProgramLocalParameterIuivEXTPROC)((intptr_t)function_pointer); + glGetNamedProgramLocalParameterIuivEXT(program, target, index, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedRenderbufferStorageEXT(JNIEnv *env, jclass clazz, jint renderbuffer, jint internalformat, jint width, jint height, jlong function_pointer) { + glNamedRenderbufferStorageEXTPROC glNamedRenderbufferStorageEXT = (glNamedRenderbufferStorageEXTPROC)((intptr_t)function_pointer); + glNamedRenderbufferStorageEXT(renderbuffer, internalformat, width, height); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedRenderbufferParameterivEXT(JNIEnv *env, jclass clazz, jint renderbuffer, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetNamedRenderbufferParameterivEXTPROC glGetNamedRenderbufferParameterivEXT = (glGetNamedRenderbufferParameterivEXTPROC)((intptr_t)function_pointer); + glGetNamedRenderbufferParameterivEXT(renderbuffer, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedRenderbufferStorageMultisampleEXT(JNIEnv *env, jclass clazz, jint renderbuffer, jint samples, jint internalformat, jint width, jint height, jlong function_pointer) { + glNamedRenderbufferStorageMultisampleEXTPROC glNamedRenderbufferStorageMultisampleEXT = (glNamedRenderbufferStorageMultisampleEXTPROC)((intptr_t)function_pointer); + glNamedRenderbufferStorageMultisampleEXT(renderbuffer, samples, internalformat, width, height); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedRenderbufferStorageMultisampleCoverageEXT(JNIEnv *env, jclass clazz, jint renderbuffer, jint coverageSamples, jint colorSamples, jint internalformat, jint width, jint height, jlong function_pointer) { + glNamedRenderbufferStorageMultisampleCoverageEXTPROC glNamedRenderbufferStorageMultisampleCoverageEXT = (glNamedRenderbufferStorageMultisampleCoverageEXTPROC)((intptr_t)function_pointer); + glNamedRenderbufferStorageMultisampleCoverageEXT(renderbuffer, coverageSamples, colorSamples, internalformat, width, height); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglCheckNamedFramebufferStatusEXT(JNIEnv *env, jclass clazz, jint framebuffer, jint target, jlong function_pointer) { + glCheckNamedFramebufferStatusEXTPROC glCheckNamedFramebufferStatusEXT = (glCheckNamedFramebufferStatusEXTPROC)((intptr_t)function_pointer); + GLenum __result = glCheckNamedFramebufferStatusEXT(framebuffer, target); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedFramebufferTexture1DEXT(JNIEnv *env, jclass clazz, jint framebuffer, jint attachment, jint textarget, jint texture, jint level, jlong function_pointer) { + glNamedFramebufferTexture1DEXTPROC glNamedFramebufferTexture1DEXT = (glNamedFramebufferTexture1DEXTPROC)((intptr_t)function_pointer); + glNamedFramebufferTexture1DEXT(framebuffer, attachment, textarget, texture, level); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedFramebufferTexture2DEXT(JNIEnv *env, jclass clazz, jint framebuffer, jint attachment, jint textarget, jint texture, jint level, jlong function_pointer) { + glNamedFramebufferTexture2DEXTPROC glNamedFramebufferTexture2DEXT = (glNamedFramebufferTexture2DEXTPROC)((intptr_t)function_pointer); + glNamedFramebufferTexture2DEXT(framebuffer, attachment, textarget, texture, level); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedFramebufferTexture3DEXT(JNIEnv *env, jclass clazz, jint framebuffer, jint attachment, jint textarget, jint texture, jint level, jint zoffset, jlong function_pointer) { + glNamedFramebufferTexture3DEXTPROC glNamedFramebufferTexture3DEXT = (glNamedFramebufferTexture3DEXTPROC)((intptr_t)function_pointer); + glNamedFramebufferTexture3DEXT(framebuffer, attachment, textarget, texture, level, zoffset); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedFramebufferRenderbufferEXT(JNIEnv *env, jclass clazz, jint framebuffer, jint attachment, jint renderbuffertarget, jint renderbuffer, jlong function_pointer) { + glNamedFramebufferRenderbufferEXTPROC glNamedFramebufferRenderbufferEXT = (glNamedFramebufferRenderbufferEXTPROC)((intptr_t)function_pointer); + glNamedFramebufferRenderbufferEXT(framebuffer, attachment, renderbuffertarget, renderbuffer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetNamedFramebufferAttachmentParameterivEXT(JNIEnv *env, jclass clazz, jint framebuffer, jint attachment, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetNamedFramebufferAttachmentParameterivEXTPROC glGetNamedFramebufferAttachmentParameterivEXT = (glGetNamedFramebufferAttachmentParameterivEXTPROC)((intptr_t)function_pointer); + glGetNamedFramebufferAttachmentParameterivEXT(framebuffer, attachment, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGenerateTextureMipmapEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jlong function_pointer) { + glGenerateTextureMipmapEXTPROC glGenerateTextureMipmapEXT = (glGenerateTextureMipmapEXTPROC)((intptr_t)function_pointer); + glGenerateTextureMipmapEXT(texture, target); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGenerateMultiTexMipmapEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jlong function_pointer) { + glGenerateMultiTexMipmapEXTPROC glGenerateMultiTexMipmapEXT = (glGenerateMultiTexMipmapEXTPROC)((intptr_t)function_pointer); + glGenerateMultiTexMipmapEXT(texunit, target); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglFramebufferDrawBufferEXT(JNIEnv *env, jclass clazz, jint framebuffer, jint mode, jlong function_pointer) { + glFramebufferDrawBufferEXTPROC glFramebufferDrawBufferEXT = (glFramebufferDrawBufferEXTPROC)((intptr_t)function_pointer); + glFramebufferDrawBufferEXT(framebuffer, mode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglFramebufferDrawBuffersEXT(JNIEnv *env, jclass clazz, jint framebuffer, jint n, jlong bufs, jlong function_pointer) { + const GLenum *bufs_address = (const GLenum *)(intptr_t)bufs; + glFramebufferDrawBuffersEXTPROC glFramebufferDrawBuffersEXT = (glFramebufferDrawBuffersEXTPROC)((intptr_t)function_pointer); + glFramebufferDrawBuffersEXT(framebuffer, n, bufs_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglFramebufferReadBufferEXT(JNIEnv *env, jclass clazz, jint framebuffer, jint mode, jlong function_pointer) { + glFramebufferReadBufferEXTPROC glFramebufferReadBufferEXT = (glFramebufferReadBufferEXTPROC)((intptr_t)function_pointer); + glFramebufferReadBufferEXT(framebuffer, mode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetFramebufferParameterivEXT(JNIEnv *env, jclass clazz, jint framebuffer, jint pname, jlong param, jlong function_pointer) { + GLint *param_address = (GLint *)(intptr_t)param; + glGetFramebufferParameterivEXTPROC glGetFramebufferParameterivEXT = (glGetFramebufferParameterivEXTPROC)((intptr_t)function_pointer); + glGetFramebufferParameterivEXT(framebuffer, pname, param_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedCopyBufferSubDataEXT(JNIEnv *env, jclass clazz, jint readBuffer, jint writeBuffer, jlong readoffset, jlong writeoffset, jlong size, jlong function_pointer) { + glNamedCopyBufferSubDataEXTPROC glNamedCopyBufferSubDataEXT = (glNamedCopyBufferSubDataEXTPROC)((intptr_t)function_pointer); + glNamedCopyBufferSubDataEXT(readBuffer, writeBuffer, readoffset, writeoffset, size); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedFramebufferTextureEXT(JNIEnv *env, jclass clazz, jint framebuffer, jint attachment, jint texture, jint level, jlong function_pointer) { + glNamedFramebufferTextureEXTPROC glNamedFramebufferTextureEXT = (glNamedFramebufferTextureEXTPROC)((intptr_t)function_pointer); + glNamedFramebufferTextureEXT(framebuffer, attachment, texture, level); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedFramebufferTextureLayerEXT(JNIEnv *env, jclass clazz, jint framebuffer, jint attachment, jint texture, jint level, jint layer, jlong function_pointer) { + glNamedFramebufferTextureLayerEXTPROC glNamedFramebufferTextureLayerEXT = (glNamedFramebufferTextureLayerEXTPROC)((intptr_t)function_pointer); + glNamedFramebufferTextureLayerEXT(framebuffer, attachment, texture, level, layer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglNamedFramebufferTextureFaceEXT(JNIEnv *env, jclass clazz, jint framebuffer, jint attachment, jint texture, jint level, jint face, jlong function_pointer) { + glNamedFramebufferTextureFaceEXTPROC glNamedFramebufferTextureFaceEXT = (glNamedFramebufferTextureFaceEXTPROC)((intptr_t)function_pointer); + glNamedFramebufferTextureFaceEXT(framebuffer, attachment, texture, level, face); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglTextureRenderbufferEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint renderbuffer, jlong function_pointer) { + glTextureRenderbufferEXTPROC glTextureRenderbufferEXT = (glTextureRenderbufferEXTPROC)((intptr_t)function_pointer); + glTextureRenderbufferEXT(texture, target, renderbuffer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMultiTexRenderbufferEXT(JNIEnv *env, jclass clazz, jint texunit, jint target, jint renderbuffer, jlong function_pointer) { + glMultiTexRenderbufferEXTPROC glMultiTexRenderbufferEXT = (glMultiTexRenderbufferEXTPROC)((intptr_t)function_pointer); + glMultiTexRenderbufferEXT(texunit, target, renderbuffer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglVertexArrayVertexOffsetEXT(JNIEnv *env, jclass clazz, jint vaobj, jint buffer, jint size, jint type, jint stride, jlong offset, jlong function_pointer) { + glVertexArrayVertexOffsetEXTPROC glVertexArrayVertexOffsetEXT = (glVertexArrayVertexOffsetEXTPROC)((intptr_t)function_pointer); + glVertexArrayVertexOffsetEXT(vaobj, buffer, size, type, stride, offset); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglVertexArrayColorOffsetEXT(JNIEnv *env, jclass clazz, jint vaobj, jint buffer, jint size, jint type, jint stride, jlong offset, jlong function_pointer) { + glVertexArrayColorOffsetEXTPROC glVertexArrayColorOffsetEXT = (glVertexArrayColorOffsetEXTPROC)((intptr_t)function_pointer); + glVertexArrayColorOffsetEXT(vaobj, buffer, size, type, stride, offset); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglVertexArrayEdgeFlagOffsetEXT(JNIEnv *env, jclass clazz, jint vaobj, jint buffer, jint stride, jlong offset, jlong function_pointer) { + glVertexArrayEdgeFlagOffsetEXTPROC glVertexArrayEdgeFlagOffsetEXT = (glVertexArrayEdgeFlagOffsetEXTPROC)((intptr_t)function_pointer); + glVertexArrayEdgeFlagOffsetEXT(vaobj, buffer, stride, offset); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglVertexArrayIndexOffsetEXT(JNIEnv *env, jclass clazz, jint vaobj, jint buffer, jint type, jint stride, jlong offset, jlong function_pointer) { + glVertexArrayIndexOffsetEXTPROC glVertexArrayIndexOffsetEXT = (glVertexArrayIndexOffsetEXTPROC)((intptr_t)function_pointer); + glVertexArrayIndexOffsetEXT(vaobj, buffer, type, stride, offset); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglVertexArrayNormalOffsetEXT(JNIEnv *env, jclass clazz, jint vaobj, jint buffer, jint type, jint stride, jlong offset, jlong function_pointer) { + glVertexArrayNormalOffsetEXTPROC glVertexArrayNormalOffsetEXT = (glVertexArrayNormalOffsetEXTPROC)((intptr_t)function_pointer); + glVertexArrayNormalOffsetEXT(vaobj, buffer, type, stride, offset); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglVertexArrayTexCoordOffsetEXT(JNIEnv *env, jclass clazz, jint vaobj, jint buffer, jint size, jint type, jint stride, jlong offset, jlong function_pointer) { + glVertexArrayTexCoordOffsetEXTPROC glVertexArrayTexCoordOffsetEXT = (glVertexArrayTexCoordOffsetEXTPROC)((intptr_t)function_pointer); + glVertexArrayTexCoordOffsetEXT(vaobj, buffer, size, type, stride, offset); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglVertexArrayMultiTexCoordOffsetEXT(JNIEnv *env, jclass clazz, jint vaobj, jint buffer, jint texunit, jint size, jint type, jint stride, jlong offset, jlong function_pointer) { + glVertexArrayMultiTexCoordOffsetEXTPROC glVertexArrayMultiTexCoordOffsetEXT = (glVertexArrayMultiTexCoordOffsetEXTPROC)((intptr_t)function_pointer); + glVertexArrayMultiTexCoordOffsetEXT(vaobj, buffer, texunit, size, type, stride, offset); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglVertexArrayFogCoordOffsetEXT(JNIEnv *env, jclass clazz, jint vaobj, jint buffer, jint type, jint stride, jlong offset, jlong function_pointer) { + glVertexArrayFogCoordOffsetEXTPROC glVertexArrayFogCoordOffsetEXT = (glVertexArrayFogCoordOffsetEXTPROC)((intptr_t)function_pointer); + glVertexArrayFogCoordOffsetEXT(vaobj, buffer, type, stride, offset); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglVertexArraySecondaryColorOffsetEXT(JNIEnv *env, jclass clazz, jint vaobj, jint buffer, jint size, jint type, jint stride, jlong offset, jlong function_pointer) { + glVertexArraySecondaryColorOffsetEXTPROC glVertexArraySecondaryColorOffsetEXT = (glVertexArraySecondaryColorOffsetEXTPROC)((intptr_t)function_pointer); + glVertexArraySecondaryColorOffsetEXT(vaobj, buffer, size, type, stride, offset); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglVertexArrayVertexAttribOffsetEXT(JNIEnv *env, jclass clazz, jint vaobj, jint buffer, jint index, jint size, jint type, jboolean normalized, jint stride, jlong offset, jlong function_pointer) { + glVertexArrayVertexAttribOffsetEXTPROC glVertexArrayVertexAttribOffsetEXT = (glVertexArrayVertexAttribOffsetEXTPROC)((intptr_t)function_pointer); + glVertexArrayVertexAttribOffsetEXT(vaobj, buffer, index, size, type, normalized, stride, offset); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglVertexArrayVertexAttribIOffsetEXT(JNIEnv *env, jclass clazz, jint vaobj, jint buffer, jint index, jint size, jint type, jint stride, jlong offset, jlong function_pointer) { + glVertexArrayVertexAttribIOffsetEXTPROC glVertexArrayVertexAttribIOffsetEXT = (glVertexArrayVertexAttribIOffsetEXTPROC)((intptr_t)function_pointer); + glVertexArrayVertexAttribIOffsetEXT(vaobj, buffer, index, size, type, stride, offset); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglEnableVertexArrayEXT(JNIEnv *env, jclass clazz, jint vaobj, jint array, jlong function_pointer) { + glEnableVertexArrayEXTPROC glEnableVertexArrayEXT = (glEnableVertexArrayEXTPROC)((intptr_t)function_pointer); + glEnableVertexArrayEXT(vaobj, array); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglDisableVertexArrayEXT(JNIEnv *env, jclass clazz, jint vaobj, jint array, jlong function_pointer) { + glDisableVertexArrayEXTPROC glDisableVertexArrayEXT = (glDisableVertexArrayEXTPROC)((intptr_t)function_pointer); + glDisableVertexArrayEXT(vaobj, array); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglEnableVertexArrayAttribEXT(JNIEnv *env, jclass clazz, jint vaobj, jint index, jlong function_pointer) { + glEnableVertexArrayAttribEXTPROC glEnableVertexArrayAttribEXT = (glEnableVertexArrayAttribEXTPROC)((intptr_t)function_pointer); + glEnableVertexArrayAttribEXT(vaobj, index); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglDisableVertexArrayAttribEXT(JNIEnv *env, jclass clazz, jint vaobj, jint index, jlong function_pointer) { + glDisableVertexArrayAttribEXTPROC glDisableVertexArrayAttribEXT = (glDisableVertexArrayAttribEXTPROC)((intptr_t)function_pointer); + glDisableVertexArrayAttribEXT(vaobj, index); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetVertexArrayIntegervEXT(JNIEnv *env, jclass clazz, jint vaobj, jint pname, jlong param, jlong function_pointer) { + GLint *param_address = (GLint *)(intptr_t)param; + glGetVertexArrayIntegervEXTPROC glGetVertexArrayIntegervEXT = (glGetVertexArrayIntegervEXTPROC)((intptr_t)function_pointer); + glGetVertexArrayIntegervEXT(vaobj, pname, param_address); +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetVertexArrayPointervEXT(JNIEnv *env, jclass clazz, jint vaobj, jint pname, jlong result_size, jlong function_pointer) { + glGetVertexArrayPointervEXTPROC glGetVertexArrayPointervEXT = (glGetVertexArrayPointervEXTPROC)((intptr_t)function_pointer); + GLvoid * __result; + glGetVertexArrayPointervEXT(vaobj, pname, &__result); + return safeNewBuffer(env, __result, result_size); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetVertexArrayIntegeri_1vEXT(JNIEnv *env, jclass clazz, jint vaobj, jint index, jint pname, jlong param, jlong function_pointer) { + GLint *param_address = (GLint *)(intptr_t)param; + glGetVertexArrayIntegeri_vEXTPROC glGetVertexArrayIntegeri_vEXT = (glGetVertexArrayIntegeri_vEXTPROC)((intptr_t)function_pointer); + glGetVertexArrayIntegeri_vEXT(vaobj, index, pname, param_address); +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglGetVertexArrayPointeri_1vEXT(JNIEnv *env, jclass clazz, jint vaobj, jint index, jint pname, jlong result_size, jlong function_pointer) { + glGetVertexArrayPointeri_vEXTPROC glGetVertexArrayPointeri_vEXT = (glGetVertexArrayPointeri_vEXTPROC)((intptr_t)function_pointer); + GLvoid * __result; + glGetVertexArrayPointeri_vEXT(vaobj, index, pname, &__result); + return safeNewBuffer(env, __result, result_size); +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglMapNamedBufferRangeEXT(JNIEnv *env, jclass clazz, jint buffer, jlong offset, jlong length, jint access, jobject old_buffer, jlong function_pointer) { + glMapNamedBufferRangeEXTPROC glMapNamedBufferRangeEXT = (glMapNamedBufferRangeEXTPROC)((intptr_t)function_pointer); + GLvoid * __result = glMapNamedBufferRangeEXT(buffer, offset, length, access); + return safeNewBufferCached(env, __result, length, old_buffer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDirectStateAccess_nglFlushMappedNamedBufferRangeEXT(JNIEnv *env, jclass clazz, jint buffer, jlong offset, jlong length, jlong function_pointer) { + glFlushMappedNamedBufferRangeEXTPROC glFlushMappedNamedBufferRangeEXT = (glFlushMappedNamedBufferRangeEXTPROC)((intptr_t)function_pointer); + glFlushMappedNamedBufferRangeEXT(buffer, offset, length); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTDrawBuffers2.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTDrawBuffers2.c new file mode 100644 index 0000000..83008bd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTDrawBuffers2.c @@ -0,0 +1,45 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glColorMaskIndexedEXTPROC) (GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +typedef void (APIENTRY *glGetBooleanIndexedvEXTPROC) (GLenum value, GLuint index, GLboolean * data); +typedef void (APIENTRY *glGetIntegerIndexedvEXTPROC) (GLenum value, GLuint index, GLint * data); +typedef void (APIENTRY *glEnableIndexedEXTPROC) (GLenum target, GLuint index); +typedef void (APIENTRY *glDisableIndexedEXTPROC) (GLenum target, GLuint index); +typedef GLboolean (APIENTRY *glIsEnabledIndexedEXTPROC) (GLenum target, GLuint index); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDrawBuffers2_nglColorMaskIndexedEXT(JNIEnv *env, jclass clazz, jint buf, jboolean r, jboolean g, jboolean b, jboolean a, jlong function_pointer) { + glColorMaskIndexedEXTPROC glColorMaskIndexedEXT = (glColorMaskIndexedEXTPROC)((intptr_t)function_pointer); + glColorMaskIndexedEXT(buf, r, g, b, a); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDrawBuffers2_nglGetBooleanIndexedvEXT(JNIEnv *env, jclass clazz, jint value, jint index, jlong data, jlong function_pointer) { + GLboolean *data_address = (GLboolean *)(intptr_t)data; + glGetBooleanIndexedvEXTPROC glGetBooleanIndexedvEXT = (glGetBooleanIndexedvEXTPROC)((intptr_t)function_pointer); + glGetBooleanIndexedvEXT(value, index, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDrawBuffers2_nglGetIntegerIndexedvEXT(JNIEnv *env, jclass clazz, jint value, jint index, jlong data, jlong function_pointer) { + GLint *data_address = (GLint *)(intptr_t)data; + glGetIntegerIndexedvEXTPROC glGetIntegerIndexedvEXT = (glGetIntegerIndexedvEXTPROC)((intptr_t)function_pointer); + glGetIntegerIndexedvEXT(value, index, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDrawBuffers2_nglEnableIndexedEXT(JNIEnv *env, jclass clazz, jint target, jint index, jlong function_pointer) { + glEnableIndexedEXTPROC glEnableIndexedEXT = (glEnableIndexedEXTPROC)((intptr_t)function_pointer); + glEnableIndexedEXT(target, index); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDrawBuffers2_nglDisableIndexedEXT(JNIEnv *env, jclass clazz, jint target, jint index, jlong function_pointer) { + glDisableIndexedEXTPROC glDisableIndexedEXT = (glDisableIndexedEXTPROC)((intptr_t)function_pointer); + glDisableIndexedEXT(target, index); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_EXTDrawBuffers2_nglIsEnabledIndexedEXT(JNIEnv *env, jclass clazz, jint target, jint index, jlong function_pointer) { + glIsEnabledIndexedEXTPROC glIsEnabledIndexedEXT = (glIsEnabledIndexedEXTPROC)((intptr_t)function_pointer); + GLboolean __result = glIsEnabledIndexedEXT(target, index); + return __result; +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTDrawInstanced.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTDrawInstanced.c new file mode 100644 index 0000000..5e489aa --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTDrawInstanced.c @@ -0,0 +1,25 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glDrawArraysInstancedEXTPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +typedef void (APIENTRY *glDrawElementsInstancedEXTPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid * indices, GLsizei primcount); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDrawInstanced_nglDrawArraysInstancedEXT(JNIEnv *env, jclass clazz, jint mode, jint first, jint count, jint primcount, jlong function_pointer) { + glDrawArraysInstancedEXTPROC glDrawArraysInstancedEXT = (glDrawArraysInstancedEXTPROC)((intptr_t)function_pointer); + glDrawArraysInstancedEXT(mode, first, count, primcount); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDrawInstanced_nglDrawElementsInstancedEXT(JNIEnv *env, jclass clazz, jint mode, jint count, jint type, jlong indices, jint primcount, jlong function_pointer) { + const GLvoid *indices_address = (const GLvoid *)(intptr_t)indices; + glDrawElementsInstancedEXTPROC glDrawElementsInstancedEXT = (glDrawElementsInstancedEXTPROC)((intptr_t)function_pointer); + glDrawElementsInstancedEXT(mode, count, type, indices_address, primcount); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDrawInstanced_nglDrawElementsInstancedEXTBO(JNIEnv *env, jclass clazz, jint mode, jint count, jint type, jlong indices_buffer_offset, jint primcount, jlong function_pointer) { + const GLvoid *indices_address = (const GLvoid *)(intptr_t)offsetToPointer(indices_buffer_offset); + glDrawElementsInstancedEXTPROC glDrawElementsInstancedEXT = (glDrawElementsInstancedEXTPROC)((intptr_t)function_pointer); + glDrawElementsInstancedEXT(mode, count, type, indices_address, primcount); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTDrawRangeElements.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTDrawRangeElements.c new file mode 100644 index 0000000..0a34069 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTDrawRangeElements.c @@ -0,0 +1,19 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glDrawRangeElementsEXTPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * pIndices); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDrawRangeElements_nglDrawRangeElementsEXT(JNIEnv *env, jclass clazz, jint mode, jint start, jint end, jint count, jint type, jlong pIndices, jlong function_pointer) { + const GLvoid *pIndices_address = (const GLvoid *)(intptr_t)pIndices; + glDrawRangeElementsEXTPROC glDrawRangeElementsEXT = (glDrawRangeElementsEXTPROC)((intptr_t)function_pointer); + glDrawRangeElementsEXT(mode, start, end, count, type, pIndices_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTDrawRangeElements_nglDrawRangeElementsEXTBO(JNIEnv *env, jclass clazz, jint mode, jint start, jint end, jint count, jint type, jlong pIndices_buffer_offset, jlong function_pointer) { + const GLvoid *pIndices_address = (const GLvoid *)(intptr_t)offsetToPointer(pIndices_buffer_offset); + glDrawRangeElementsEXTPROC glDrawRangeElementsEXT = (glDrawRangeElementsEXTPROC)((intptr_t)function_pointer); + glDrawRangeElementsEXT(mode, start, end, count, type, pIndices_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTFogCoord.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTFogCoord.c new file mode 100644 index 0000000..9209732 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTFogCoord.c @@ -0,0 +1,31 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glFogCoordfEXTPROC) (GLfloat coord); +typedef void (APIENTRY *glFogCoorddEXTPROC) (GLdouble coord); +typedef void (APIENTRY *glFogCoordPointerEXTPROC) (GLenum type, GLsizei stride, const GLvoid * data); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFogCoord_nglFogCoordfEXT(JNIEnv *env, jclass clazz, jfloat coord, jlong function_pointer) { + glFogCoordfEXTPROC glFogCoordfEXT = (glFogCoordfEXTPROC)((intptr_t)function_pointer); + glFogCoordfEXT(coord); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFogCoord_nglFogCoorddEXT(JNIEnv *env, jclass clazz, jdouble coord, jlong function_pointer) { + glFogCoorddEXTPROC glFogCoorddEXT = (glFogCoorddEXTPROC)((intptr_t)function_pointer); + glFogCoorddEXT(coord); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFogCoord_nglFogCoordPointerEXT(JNIEnv *env, jclass clazz, jint type, jint stride, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glFogCoordPointerEXTPROC glFogCoordPointerEXT = (glFogCoordPointerEXTPROC)((intptr_t)function_pointer); + glFogCoordPointerEXT(type, stride, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFogCoord_nglFogCoordPointerEXTBO(JNIEnv *env, jclass clazz, jint type, jint stride, jlong data_buffer_offset, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)offsetToPointer(data_buffer_offset); + glFogCoordPointerEXTPROC glFogCoordPointerEXT = (glFogCoordPointerEXTPROC)((intptr_t)function_pointer); + glFogCoordPointerEXT(type, stride, data_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTFramebufferBlit.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTFramebufferBlit.c new file mode 100644 index 0000000..9407c40 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTFramebufferBlit.c @@ -0,0 +1,12 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glBlitFramebufferEXTPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferBlit_nglBlitFramebufferEXT(JNIEnv *env, jclass clazz, jint srcX0, jint srcY0, jint srcX1, jint srcY1, jint dstX0, jint dstY0, jint dstX1, jint dstY1, jint mask, jint filter, jlong function_pointer) { + glBlitFramebufferEXTPROC glBlitFramebufferEXT = (glBlitFramebufferEXTPROC)((intptr_t)function_pointer); + glBlitFramebufferEXT(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTFramebufferMultisample.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTFramebufferMultisample.c new file mode 100644 index 0000000..cf49fe5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTFramebufferMultisample.c @@ -0,0 +1,12 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glRenderbufferStorageMultisampleEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferMultisample_nglRenderbufferStorageMultisampleEXT(JNIEnv *env, jclass clazz, jint target, jint samples, jint internalformat, jint width, jint height, jlong function_pointer) { + glRenderbufferStorageMultisampleEXTPROC glRenderbufferStorageMultisampleEXT = (glRenderbufferStorageMultisampleEXTPROC)((intptr_t)function_pointer); + glRenderbufferStorageMultisampleEXT(target, samples, internalformat, width, height); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTFramebufferObject.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTFramebufferObject.c new file mode 100644 index 0000000..9d5777a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTFramebufferObject.c @@ -0,0 +1,117 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GLboolean (APIENTRY *glIsRenderbufferEXTPROC) (GLuint renderbuffer); +typedef void (APIENTRY *glBindRenderbufferEXTPROC) (GLenum target, GLuint renderbuffer); +typedef void (APIENTRY *glDeleteRenderbuffersEXTPROC) (GLint n, const GLuint * renderbuffers); +typedef void (APIENTRY *glGenRenderbuffersEXTPROC) (GLint n, GLuint * renderbuffers); +typedef void (APIENTRY *glRenderbufferStorageEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRY *glGetRenderbufferParameterivEXTPROC) (GLenum target, GLenum pname, GLint * params); +typedef GLboolean (APIENTRY *glIsFramebufferEXTPROC) (GLuint framebuffer); +typedef void (APIENTRY *glBindFramebufferEXTPROC) (GLenum target, GLuint framebuffer); +typedef void (APIENTRY *glDeleteFramebuffersEXTPROC) (GLint n, const GLuint * framebuffers); +typedef void (APIENTRY *glGenFramebuffersEXTPROC) (GLint n, GLuint * framebuffers); +typedef GLenum (APIENTRY *glCheckFramebufferStatusEXTPROC) (GLenum target); +typedef void (APIENTRY *glFramebufferTexture1DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRY *glFramebufferTexture2DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRY *glFramebufferTexture3DEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void (APIENTRY *glFramebufferRenderbufferEXTPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (APIENTRY *glGetFramebufferAttachmentParameterivEXTPROC) (GLenum target, GLenum attachment, GLenum pname, GLint * params); +typedef void (APIENTRY *glGenerateMipmapEXTPROC) (GLenum target); + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_nglIsRenderbufferEXT(JNIEnv *env, jclass clazz, jint renderbuffer, jlong function_pointer) { + glIsRenderbufferEXTPROC glIsRenderbufferEXT = (glIsRenderbufferEXTPROC)((intptr_t)function_pointer); + GLboolean __result = glIsRenderbufferEXT(renderbuffer); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_nglBindRenderbufferEXT(JNIEnv *env, jclass clazz, jint target, jint renderbuffer, jlong function_pointer) { + glBindRenderbufferEXTPROC glBindRenderbufferEXT = (glBindRenderbufferEXTPROC)((intptr_t)function_pointer); + glBindRenderbufferEXT(target, renderbuffer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_nglDeleteRenderbuffersEXT(JNIEnv *env, jclass clazz, jint n, jlong renderbuffers, jlong function_pointer) { + const GLuint *renderbuffers_address = (const GLuint *)(intptr_t)renderbuffers; + glDeleteRenderbuffersEXTPROC glDeleteRenderbuffersEXT = (glDeleteRenderbuffersEXTPROC)((intptr_t)function_pointer); + glDeleteRenderbuffersEXT(n, renderbuffers_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_nglGenRenderbuffersEXT(JNIEnv *env, jclass clazz, jint n, jlong renderbuffers, jlong function_pointer) { + GLuint *renderbuffers_address = (GLuint *)(intptr_t)renderbuffers; + glGenRenderbuffersEXTPROC glGenRenderbuffersEXT = (glGenRenderbuffersEXTPROC)((intptr_t)function_pointer); + glGenRenderbuffersEXT(n, renderbuffers_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_nglRenderbufferStorageEXT(JNIEnv *env, jclass clazz, jint target, jint internalformat, jint width, jint height, jlong function_pointer) { + glRenderbufferStorageEXTPROC glRenderbufferStorageEXT = (glRenderbufferStorageEXTPROC)((intptr_t)function_pointer); + glRenderbufferStorageEXT(target, internalformat, width, height); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_nglGetRenderbufferParameterivEXT(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetRenderbufferParameterivEXTPROC glGetRenderbufferParameterivEXT = (glGetRenderbufferParameterivEXTPROC)((intptr_t)function_pointer); + glGetRenderbufferParameterivEXT(target, pname, params_address); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_nglIsFramebufferEXT(JNIEnv *env, jclass clazz, jint framebuffer, jlong function_pointer) { + glIsFramebufferEXTPROC glIsFramebufferEXT = (glIsFramebufferEXTPROC)((intptr_t)function_pointer); + GLboolean __result = glIsFramebufferEXT(framebuffer); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_nglBindFramebufferEXT(JNIEnv *env, jclass clazz, jint target, jint framebuffer, jlong function_pointer) { + glBindFramebufferEXTPROC glBindFramebufferEXT = (glBindFramebufferEXTPROC)((intptr_t)function_pointer); + glBindFramebufferEXT(target, framebuffer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_nglDeleteFramebuffersEXT(JNIEnv *env, jclass clazz, jint n, jlong framebuffers, jlong function_pointer) { + const GLuint *framebuffers_address = (const GLuint *)(intptr_t)framebuffers; + glDeleteFramebuffersEXTPROC glDeleteFramebuffersEXT = (glDeleteFramebuffersEXTPROC)((intptr_t)function_pointer); + glDeleteFramebuffersEXT(n, framebuffers_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_nglGenFramebuffersEXT(JNIEnv *env, jclass clazz, jint n, jlong framebuffers, jlong function_pointer) { + GLuint *framebuffers_address = (GLuint *)(intptr_t)framebuffers; + glGenFramebuffersEXTPROC glGenFramebuffersEXT = (glGenFramebuffersEXTPROC)((intptr_t)function_pointer); + glGenFramebuffersEXT(n, framebuffers_address); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_nglCheckFramebufferStatusEXT(JNIEnv *env, jclass clazz, jint target, jlong function_pointer) { + glCheckFramebufferStatusEXTPROC glCheckFramebufferStatusEXT = (glCheckFramebufferStatusEXTPROC)((intptr_t)function_pointer); + GLenum __result = glCheckFramebufferStatusEXT(target); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_nglFramebufferTexture1DEXT(JNIEnv *env, jclass clazz, jint target, jint attachment, jint textarget, jint texture, jint level, jlong function_pointer) { + glFramebufferTexture1DEXTPROC glFramebufferTexture1DEXT = (glFramebufferTexture1DEXTPROC)((intptr_t)function_pointer); + glFramebufferTexture1DEXT(target, attachment, textarget, texture, level); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_nglFramebufferTexture2DEXT(JNIEnv *env, jclass clazz, jint target, jint attachment, jint textarget, jint texture, jint level, jlong function_pointer) { + glFramebufferTexture2DEXTPROC glFramebufferTexture2DEXT = (glFramebufferTexture2DEXTPROC)((intptr_t)function_pointer); + glFramebufferTexture2DEXT(target, attachment, textarget, texture, level); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_nglFramebufferTexture3DEXT(JNIEnv *env, jclass clazz, jint target, jint attachment, jint textarget, jint texture, jint level, jint zoffset, jlong function_pointer) { + glFramebufferTexture3DEXTPROC glFramebufferTexture3DEXT = (glFramebufferTexture3DEXTPROC)((intptr_t)function_pointer); + glFramebufferTexture3DEXT(target, attachment, textarget, texture, level, zoffset); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_nglFramebufferRenderbufferEXT(JNIEnv *env, jclass clazz, jint target, jint attachment, jint renderbuffertarget, jint renderbuffer, jlong function_pointer) { + glFramebufferRenderbufferEXTPROC glFramebufferRenderbufferEXT = (glFramebufferRenderbufferEXTPROC)((intptr_t)function_pointer); + glFramebufferRenderbufferEXT(target, attachment, renderbuffertarget, renderbuffer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_nglGetFramebufferAttachmentParameterivEXT(JNIEnv *env, jclass clazz, jint target, jint attachment, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetFramebufferAttachmentParameterivEXTPROC glGetFramebufferAttachmentParameterivEXT = (glGetFramebufferAttachmentParameterivEXTPROC)((intptr_t)function_pointer); + glGetFramebufferAttachmentParameterivEXT(target, attachment, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTFramebufferObject_nglGenerateMipmapEXT(JNIEnv *env, jclass clazz, jint target, jlong function_pointer) { + glGenerateMipmapEXTPROC glGenerateMipmapEXT = (glGenerateMipmapEXTPROC)((intptr_t)function_pointer); + glGenerateMipmapEXT(target); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTGeometryShader4.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTGeometryShader4.c new file mode 100644 index 0000000..1bb7839 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTGeometryShader4.c @@ -0,0 +1,30 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glProgramParameteriEXTPROC) (GLuint program, GLenum pname, GLint value); +typedef void (APIENTRY *glFramebufferTextureEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +typedef void (APIENTRY *glFramebufferTextureLayerEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void (APIENTRY *glFramebufferTextureFaceEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLenum face); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGeometryShader4_nglProgramParameteriEXT(JNIEnv *env, jclass clazz, jint program, jint pname, jint value, jlong function_pointer) { + glProgramParameteriEXTPROC glProgramParameteriEXT = (glProgramParameteriEXTPROC)((intptr_t)function_pointer); + glProgramParameteriEXT(program, pname, value); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGeometryShader4_nglFramebufferTextureEXT(JNIEnv *env, jclass clazz, jint target, jint attachment, jint texture, jint level, jlong function_pointer) { + glFramebufferTextureEXTPROC glFramebufferTextureEXT = (glFramebufferTextureEXTPROC)((intptr_t)function_pointer); + glFramebufferTextureEXT(target, attachment, texture, level); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGeometryShader4_nglFramebufferTextureLayerEXT(JNIEnv *env, jclass clazz, jint target, jint attachment, jint texture, jint level, jint layer, jlong function_pointer) { + glFramebufferTextureLayerEXTPROC glFramebufferTextureLayerEXT = (glFramebufferTextureLayerEXTPROC)((intptr_t)function_pointer); + glFramebufferTextureLayerEXT(target, attachment, texture, level, layer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGeometryShader4_nglFramebufferTextureFaceEXT(JNIEnv *env, jclass clazz, jint target, jint attachment, jint texture, jint level, jint face, jlong function_pointer) { + glFramebufferTextureFaceEXTPROC glFramebufferTextureFaceEXT = (glFramebufferTextureFaceEXTPROC)((intptr_t)function_pointer); + glFramebufferTextureFaceEXT(target, attachment, texture, level, face); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTGpuProgramParameters.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTGpuProgramParameters.c new file mode 100644 index 0000000..7484d7a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTGpuProgramParameters.c @@ -0,0 +1,20 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glProgramEnvParameters4fvEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat * params); +typedef void (APIENTRY *glProgramLocalParameters4fvEXTPROC) (GLenum target, GLuint index, GLsizei count, const GLfloat * params); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuProgramParameters_nglProgramEnvParameters4fvEXT(JNIEnv *env, jclass clazz, jint target, jint index, jint count, jlong params, jlong function_pointer) { + const GLfloat *params_address = (const GLfloat *)(intptr_t)params; + glProgramEnvParameters4fvEXTPROC glProgramEnvParameters4fvEXT = (glProgramEnvParameters4fvEXTPROC)((intptr_t)function_pointer); + glProgramEnvParameters4fvEXT(target, index, count, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuProgramParameters_nglProgramLocalParameters4fvEXT(JNIEnv *env, jclass clazz, jint target, jint index, jint count, jlong params, jlong function_pointer) { + const GLfloat *params_address = (const GLfloat *)(intptr_t)params; + glProgramLocalParameters4fvEXTPROC glProgramLocalParameters4fvEXT = (glProgramLocalParameters4fvEXTPROC)((intptr_t)function_pointer); + glProgramLocalParameters4fvEXT(target, index, count, params_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTGpuShader4.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTGpuShader4.c new file mode 100644 index 0000000..b4f938d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTGpuShader4.c @@ -0,0 +1,239 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glVertexAttribI1iEXTPROC) (GLuint index, GLint x); +typedef void (APIENTRY *glVertexAttribI2iEXTPROC) (GLuint index, GLint x, GLint y); +typedef void (APIENTRY *glVertexAttribI3iEXTPROC) (GLuint index, GLint x, GLint y, GLint z); +typedef void (APIENTRY *glVertexAttribI4iEXTPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRY *glVertexAttribI1uiEXTPROC) (GLuint index, GLuint x); +typedef void (APIENTRY *glVertexAttribI2uiEXTPROC) (GLuint index, GLuint x, GLuint y); +typedef void (APIENTRY *glVertexAttribI3uiEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z); +typedef void (APIENTRY *glVertexAttribI4uiEXTPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRY *glVertexAttribI1ivEXTPROC) (GLuint index, const GLint * v); +typedef void (APIENTRY *glVertexAttribI2ivEXTPROC) (GLuint index, const GLint * v); +typedef void (APIENTRY *glVertexAttribI3ivEXTPROC) (GLuint index, const GLint * v); +typedef void (APIENTRY *glVertexAttribI4ivEXTPROC) (GLuint index, const GLint * v); +typedef void (APIENTRY *glVertexAttribI1uivEXTPROC) (GLuint index, const GLuint * v); +typedef void (APIENTRY *glVertexAttribI2uivEXTPROC) (GLuint index, const GLuint * v); +typedef void (APIENTRY *glVertexAttribI3uivEXTPROC) (GLuint index, const GLuint * v); +typedef void (APIENTRY *glVertexAttribI4uivEXTPROC) (GLuint index, const GLuint * v); +typedef void (APIENTRY *glVertexAttribI4bvEXTPROC) (GLuint index, const GLbyte * v); +typedef void (APIENTRY *glVertexAttribI4svEXTPROC) (GLuint index, const GLshort * v); +typedef void (APIENTRY *glVertexAttribI4ubvEXTPROC) (GLuint index, const GLubyte * v); +typedef void (APIENTRY *glVertexAttribI4usvEXTPROC) (GLuint index, const GLushort * v); +typedef void (APIENTRY *glVertexAttribIPointerEXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * buffer); +typedef void (APIENTRY *glGetVertexAttribIivEXTPROC) (GLuint index, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetVertexAttribIuivEXTPROC) (GLuint index, GLenum pname, GLuint * params); +typedef void (APIENTRY *glUniform1uiEXTPROC) (GLint location, GLuint v0); +typedef void (APIENTRY *glUniform2uiEXTPROC) (GLint location, GLuint v0, GLuint v1); +typedef void (APIENTRY *glUniform3uiEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (APIENTRY *glUniform4uiEXTPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (APIENTRY *glUniform1uivEXTPROC) (GLint location, GLsizei count, const GLuint * value); +typedef void (APIENTRY *glUniform2uivEXTPROC) (GLint location, GLsizei count, const GLuint * value); +typedef void (APIENTRY *glUniform3uivEXTPROC) (GLint location, GLsizei count, const GLuint * value); +typedef void (APIENTRY *glUniform4uivEXTPROC) (GLint location, GLsizei count, const GLuint * value); +typedef void (APIENTRY *glGetUniformuivEXTPROC) (GLuint program, GLint location, GLuint * params); +typedef void (APIENTRY *glBindFragDataLocationEXTPROC) (GLuint program, GLuint colorNumber, const GLchar * name); +typedef GLint (APIENTRY *glGetFragDataLocationEXTPROC) (GLuint program, const GLchar * name); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglVertexAttribI1iEXT(JNIEnv *env, jclass clazz, jint index, jint x, jlong function_pointer) { + glVertexAttribI1iEXTPROC glVertexAttribI1iEXT = (glVertexAttribI1iEXTPROC)((intptr_t)function_pointer); + glVertexAttribI1iEXT(index, x); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglVertexAttribI2iEXT(JNIEnv *env, jclass clazz, jint index, jint x, jint y, jlong function_pointer) { + glVertexAttribI2iEXTPROC glVertexAttribI2iEXT = (glVertexAttribI2iEXTPROC)((intptr_t)function_pointer); + glVertexAttribI2iEXT(index, x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglVertexAttribI3iEXT(JNIEnv *env, jclass clazz, jint index, jint x, jint y, jint z, jlong function_pointer) { + glVertexAttribI3iEXTPROC glVertexAttribI3iEXT = (glVertexAttribI3iEXTPROC)((intptr_t)function_pointer); + glVertexAttribI3iEXT(index, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglVertexAttribI4iEXT(JNIEnv *env, jclass clazz, jint index, jint x, jint y, jint z, jint w, jlong function_pointer) { + glVertexAttribI4iEXTPROC glVertexAttribI4iEXT = (glVertexAttribI4iEXTPROC)((intptr_t)function_pointer); + glVertexAttribI4iEXT(index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglVertexAttribI1uiEXT(JNIEnv *env, jclass clazz, jint index, jint x, jlong function_pointer) { + glVertexAttribI1uiEXTPROC glVertexAttribI1uiEXT = (glVertexAttribI1uiEXTPROC)((intptr_t)function_pointer); + glVertexAttribI1uiEXT(index, x); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglVertexAttribI2uiEXT(JNIEnv *env, jclass clazz, jint index, jint x, jint y, jlong function_pointer) { + glVertexAttribI2uiEXTPROC glVertexAttribI2uiEXT = (glVertexAttribI2uiEXTPROC)((intptr_t)function_pointer); + glVertexAttribI2uiEXT(index, x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglVertexAttribI3uiEXT(JNIEnv *env, jclass clazz, jint index, jint x, jint y, jint z, jlong function_pointer) { + glVertexAttribI3uiEXTPROC glVertexAttribI3uiEXT = (glVertexAttribI3uiEXTPROC)((intptr_t)function_pointer); + glVertexAttribI3uiEXT(index, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglVertexAttribI4uiEXT(JNIEnv *env, jclass clazz, jint index, jint x, jint y, jint z, jint w, jlong function_pointer) { + glVertexAttribI4uiEXTPROC glVertexAttribI4uiEXT = (glVertexAttribI4uiEXTPROC)((intptr_t)function_pointer); + glVertexAttribI4uiEXT(index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglVertexAttribI1ivEXT(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLint *v_address = (const GLint *)(intptr_t)v; + glVertexAttribI1ivEXTPROC glVertexAttribI1ivEXT = (glVertexAttribI1ivEXTPROC)((intptr_t)function_pointer); + glVertexAttribI1ivEXT(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglVertexAttribI2ivEXT(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLint *v_address = (const GLint *)(intptr_t)v; + glVertexAttribI2ivEXTPROC glVertexAttribI2ivEXT = (glVertexAttribI2ivEXTPROC)((intptr_t)function_pointer); + glVertexAttribI2ivEXT(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglVertexAttribI3ivEXT(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLint *v_address = (const GLint *)(intptr_t)v; + glVertexAttribI3ivEXTPROC glVertexAttribI3ivEXT = (glVertexAttribI3ivEXTPROC)((intptr_t)function_pointer); + glVertexAttribI3ivEXT(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglVertexAttribI4ivEXT(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLint *v_address = (const GLint *)(intptr_t)v; + glVertexAttribI4ivEXTPROC glVertexAttribI4ivEXT = (glVertexAttribI4ivEXTPROC)((intptr_t)function_pointer); + glVertexAttribI4ivEXT(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglVertexAttribI1uivEXT(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLuint *v_address = (const GLuint *)(intptr_t)v; + glVertexAttribI1uivEXTPROC glVertexAttribI1uivEXT = (glVertexAttribI1uivEXTPROC)((intptr_t)function_pointer); + glVertexAttribI1uivEXT(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglVertexAttribI2uivEXT(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLuint *v_address = (const GLuint *)(intptr_t)v; + glVertexAttribI2uivEXTPROC glVertexAttribI2uivEXT = (glVertexAttribI2uivEXTPROC)((intptr_t)function_pointer); + glVertexAttribI2uivEXT(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglVertexAttribI3uivEXT(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLuint *v_address = (const GLuint *)(intptr_t)v; + glVertexAttribI3uivEXTPROC glVertexAttribI3uivEXT = (glVertexAttribI3uivEXTPROC)((intptr_t)function_pointer); + glVertexAttribI3uivEXT(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglVertexAttribI4uivEXT(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLuint *v_address = (const GLuint *)(intptr_t)v; + glVertexAttribI4uivEXTPROC glVertexAttribI4uivEXT = (glVertexAttribI4uivEXTPROC)((intptr_t)function_pointer); + glVertexAttribI4uivEXT(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglVertexAttribI4bvEXT(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLbyte *v_address = (const GLbyte *)(intptr_t)v; + glVertexAttribI4bvEXTPROC glVertexAttribI4bvEXT = (glVertexAttribI4bvEXTPROC)((intptr_t)function_pointer); + glVertexAttribI4bvEXT(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglVertexAttribI4svEXT(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLshort *v_address = (const GLshort *)(intptr_t)v; + glVertexAttribI4svEXTPROC glVertexAttribI4svEXT = (glVertexAttribI4svEXTPROC)((intptr_t)function_pointer); + glVertexAttribI4svEXT(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglVertexAttribI4ubvEXT(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLubyte *v_address = (const GLubyte *)(intptr_t)v; + glVertexAttribI4ubvEXTPROC glVertexAttribI4ubvEXT = (glVertexAttribI4ubvEXTPROC)((intptr_t)function_pointer); + glVertexAttribI4ubvEXT(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglVertexAttribI4usvEXT(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLushort *v_address = (const GLushort *)(intptr_t)v; + glVertexAttribI4usvEXTPROC glVertexAttribI4usvEXT = (glVertexAttribI4usvEXTPROC)((intptr_t)function_pointer); + glVertexAttribI4usvEXT(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglVertexAttribIPointerEXT(JNIEnv *env, jclass clazz, jint index, jint size, jint type, jint stride, jlong buffer, jlong function_pointer) { + const GLvoid *buffer_address = (const GLvoid *)(intptr_t)buffer; + glVertexAttribIPointerEXTPROC glVertexAttribIPointerEXT = (glVertexAttribIPointerEXTPROC)((intptr_t)function_pointer); + glVertexAttribIPointerEXT(index, size, type, stride, buffer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglVertexAttribIPointerEXTBO(JNIEnv *env, jclass clazz, jint index, jint size, jint type, jint stride, jlong buffer_buffer_offset, jlong function_pointer) { + const GLvoid *buffer_address = (const GLvoid *)(intptr_t)offsetToPointer(buffer_buffer_offset); + glVertexAttribIPointerEXTPROC glVertexAttribIPointerEXT = (glVertexAttribIPointerEXTPROC)((intptr_t)function_pointer); + glVertexAttribIPointerEXT(index, size, type, stride, buffer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglGetVertexAttribIivEXT(JNIEnv *env, jclass clazz, jint index, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetVertexAttribIivEXTPROC glGetVertexAttribIivEXT = (glGetVertexAttribIivEXTPROC)((intptr_t)function_pointer); + glGetVertexAttribIivEXT(index, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglGetVertexAttribIuivEXT(JNIEnv *env, jclass clazz, jint index, jint pname, jlong params, jlong function_pointer) { + GLuint *params_address = (GLuint *)(intptr_t)params; + glGetVertexAttribIuivEXTPROC glGetVertexAttribIuivEXT = (glGetVertexAttribIuivEXTPROC)((intptr_t)function_pointer); + glGetVertexAttribIuivEXT(index, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglUniform1uiEXT(JNIEnv *env, jclass clazz, jint location, jint v0, jlong function_pointer) { + glUniform1uiEXTPROC glUniform1uiEXT = (glUniform1uiEXTPROC)((intptr_t)function_pointer); + glUniform1uiEXT(location, v0); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglUniform2uiEXT(JNIEnv *env, jclass clazz, jint location, jint v0, jint v1, jlong function_pointer) { + glUniform2uiEXTPROC glUniform2uiEXT = (glUniform2uiEXTPROC)((intptr_t)function_pointer); + glUniform2uiEXT(location, v0, v1); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglUniform3uiEXT(JNIEnv *env, jclass clazz, jint location, jint v0, jint v1, jint v2, jlong function_pointer) { + glUniform3uiEXTPROC glUniform3uiEXT = (glUniform3uiEXTPROC)((intptr_t)function_pointer); + glUniform3uiEXT(location, v0, v1, v2); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglUniform4uiEXT(JNIEnv *env, jclass clazz, jint location, jint v0, jint v1, jint v2, jint v3, jlong function_pointer) { + glUniform4uiEXTPROC glUniform4uiEXT = (glUniform4uiEXTPROC)((intptr_t)function_pointer); + glUniform4uiEXT(location, v0, v1, v2, v3); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglUniform1uivEXT(JNIEnv *env, jclass clazz, jint location, jint count, jlong value, jlong function_pointer) { + const GLuint *value_address = (const GLuint *)(intptr_t)value; + glUniform1uivEXTPROC glUniform1uivEXT = (glUniform1uivEXTPROC)((intptr_t)function_pointer); + glUniform1uivEXT(location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglUniform2uivEXT(JNIEnv *env, jclass clazz, jint location, jint count, jlong value, jlong function_pointer) { + const GLuint *value_address = (const GLuint *)(intptr_t)value; + glUniform2uivEXTPROC glUniform2uivEXT = (glUniform2uivEXTPROC)((intptr_t)function_pointer); + glUniform2uivEXT(location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglUniform3uivEXT(JNIEnv *env, jclass clazz, jint location, jint count, jlong value, jlong function_pointer) { + const GLuint *value_address = (const GLuint *)(intptr_t)value; + glUniform3uivEXTPROC glUniform3uivEXT = (glUniform3uivEXTPROC)((intptr_t)function_pointer); + glUniform3uivEXT(location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglUniform4uivEXT(JNIEnv *env, jclass clazz, jint location, jint count, jlong value, jlong function_pointer) { + const GLuint *value_address = (const GLuint *)(intptr_t)value; + glUniform4uivEXTPROC glUniform4uivEXT = (glUniform4uivEXTPROC)((intptr_t)function_pointer); + glUniform4uivEXT(location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglGetUniformuivEXT(JNIEnv *env, jclass clazz, jint program, jint location, jlong params, jlong function_pointer) { + GLuint *params_address = (GLuint *)(intptr_t)params; + glGetUniformuivEXTPROC glGetUniformuivEXT = (glGetUniformuivEXTPROC)((intptr_t)function_pointer); + glGetUniformuivEXT(program, location, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglBindFragDataLocationEXT(JNIEnv *env, jclass clazz, jint program, jint colorNumber, jlong name, jlong function_pointer) { + const GLchar *name_address = (const GLchar *)(intptr_t)name; + glBindFragDataLocationEXTPROC glBindFragDataLocationEXT = (glBindFragDataLocationEXTPROC)((intptr_t)function_pointer); + glBindFragDataLocationEXT(program, colorNumber, name_address); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_EXTGpuShader4_nglGetFragDataLocationEXT(JNIEnv *env, jclass clazz, jint program, jlong name, jlong function_pointer) { + const GLchar *name_address = (const GLchar *)(intptr_t)name; + glGetFragDataLocationEXTPROC glGetFragDataLocationEXT = (glGetFragDataLocationEXTPROC)((intptr_t)function_pointer); + GLint __result = glGetFragDataLocationEXT(program, name_address); + return __result; +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTMultiDrawArrays.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTMultiDrawArrays.c new file mode 100644 index 0000000..af37de1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTMultiDrawArrays.c @@ -0,0 +1,14 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glMultiDrawArraysEXTPROC) (GLenum mode, GLint * piFirst, GLsizei * piCount, GLint primcount); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTMultiDrawArrays_nglMultiDrawArraysEXT(JNIEnv *env, jclass clazz, jint mode, jlong piFirst, jlong piCount, jint primcount, jlong function_pointer) { + GLint *piFirst_address = (GLint *)(intptr_t)piFirst; + GLsizei *piCount_address = (GLsizei *)(intptr_t)piCount; + glMultiDrawArraysEXTPROC glMultiDrawArraysEXT = (glMultiDrawArraysEXTPROC)((intptr_t)function_pointer); + glMultiDrawArraysEXT(mode, piFirst_address, piCount_address, primcount); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTPalettedTexture.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTPalettedTexture.c new file mode 100644 index 0000000..f50997a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTPalettedTexture.c @@ -0,0 +1,41 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glColorTableEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid * data); +typedef void (APIENTRY *glColorSubTableEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid * data); +typedef void (APIENTRY *glGetColorTableEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid * data); +typedef void (APIENTRY *glGetColorTableParameterivEXTPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetColorTableParameterfvEXTPROC) (GLenum target, GLenum pname, GLfloat * params); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTPalettedTexture_nglColorTableEXT(JNIEnv *env, jclass clazz, jint target, jint internalFormat, jint width, jint format, jint type, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glColorTableEXTPROC glColorTableEXT = (glColorTableEXTPROC)((intptr_t)function_pointer); + glColorTableEXT(target, internalFormat, width, format, type, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTPalettedTexture_nglColorSubTableEXT(JNIEnv *env, jclass clazz, jint target, jint start, jint count, jint format, jint type, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glColorSubTableEXTPROC glColorSubTableEXT = (glColorSubTableEXTPROC)((intptr_t)function_pointer); + glColorSubTableEXT(target, start, count, format, type, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTPalettedTexture_nglGetColorTableEXT(JNIEnv *env, jclass clazz, jint target, jint format, jint type, jlong data, jlong function_pointer) { + GLvoid *data_address = (GLvoid *)(intptr_t)data; + glGetColorTableEXTPROC glGetColorTableEXT = (glGetColorTableEXTPROC)((intptr_t)function_pointer); + glGetColorTableEXT(target, format, type, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTPalettedTexture_nglGetColorTableParameterivEXT(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetColorTableParameterivEXTPROC glGetColorTableParameterivEXT = (glGetColorTableParameterivEXTPROC)((intptr_t)function_pointer); + glGetColorTableParameterivEXT(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTPalettedTexture_nglGetColorTableParameterfvEXT(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetColorTableParameterfvEXTPROC glGetColorTableParameterfvEXT = (glGetColorTableParameterfvEXTPROC)((intptr_t)function_pointer); + glGetColorTableParameterfvEXT(target, pname, params_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTPointParameters.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTPointParameters.c new file mode 100644 index 0000000..e0411e2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTPointParameters.c @@ -0,0 +1,19 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glPointParameterfEXTPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRY *glPointParameterfvEXTPROC) (GLenum pname, const GLfloat * pfParams); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTPointParameters_nglPointParameterfEXT(JNIEnv *env, jclass clazz, jint pname, jfloat param, jlong function_pointer) { + glPointParameterfEXTPROC glPointParameterfEXT = (glPointParameterfEXTPROC)((intptr_t)function_pointer); + glPointParameterfEXT(pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTPointParameters_nglPointParameterfvEXT(JNIEnv *env, jclass clazz, jint pname, jlong pfParams, jlong function_pointer) { + const GLfloat *pfParams_address = (const GLfloat *)(intptr_t)pfParams; + glPointParameterfvEXTPROC glPointParameterfvEXT = (glPointParameterfvEXTPROC)((intptr_t)function_pointer); + glPointParameterfvEXT(pname, pfParams_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTProvokingVertex.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTProvokingVertex.c new file mode 100644 index 0000000..6f7ce54 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTProvokingVertex.c @@ -0,0 +1,12 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glProvokingVertexEXTPROC) (GLenum mode); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTProvokingVertex_nglProvokingVertexEXT(JNIEnv *env, jclass clazz, jint mode, jlong function_pointer) { + glProvokingVertexEXTPROC glProvokingVertexEXT = (glProvokingVertexEXTPROC)((intptr_t)function_pointer); + glProvokingVertexEXT(mode); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTSecondaryColor.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTSecondaryColor.c new file mode 100644 index 0000000..8d371c1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTSecondaryColor.c @@ -0,0 +1,43 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glSecondaryColor3bEXTPROC) (GLbyte red, GLbyte green, GLbyte blue); +typedef void (APIENTRY *glSecondaryColor3fEXTPROC) (GLfloat red, GLfloat green, GLfloat blue); +typedef void (APIENTRY *glSecondaryColor3dEXTPROC) (GLdouble red, GLdouble green, GLdouble blue); +typedef void (APIENTRY *glSecondaryColor3ubEXTPROC) (GLubyte red, GLubyte green, GLubyte blue); +typedef void (APIENTRY *glSecondaryColorPointerEXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid * pPointer); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSecondaryColor_nglSecondaryColor3bEXT(JNIEnv *env, jclass clazz, jbyte red, jbyte green, jbyte blue, jlong function_pointer) { + glSecondaryColor3bEXTPROC glSecondaryColor3bEXT = (glSecondaryColor3bEXTPROC)((intptr_t)function_pointer); + glSecondaryColor3bEXT(red, green, blue); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSecondaryColor_nglSecondaryColor3fEXT(JNIEnv *env, jclass clazz, jfloat red, jfloat green, jfloat blue, jlong function_pointer) { + glSecondaryColor3fEXTPROC glSecondaryColor3fEXT = (glSecondaryColor3fEXTPROC)((intptr_t)function_pointer); + glSecondaryColor3fEXT(red, green, blue); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSecondaryColor_nglSecondaryColor3dEXT(JNIEnv *env, jclass clazz, jdouble red, jdouble green, jdouble blue, jlong function_pointer) { + glSecondaryColor3dEXTPROC glSecondaryColor3dEXT = (glSecondaryColor3dEXTPROC)((intptr_t)function_pointer); + glSecondaryColor3dEXT(red, green, blue); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSecondaryColor_nglSecondaryColor3ubEXT(JNIEnv *env, jclass clazz, jbyte red, jbyte green, jbyte blue, jlong function_pointer) { + glSecondaryColor3ubEXTPROC glSecondaryColor3ubEXT = (glSecondaryColor3ubEXTPROC)((intptr_t)function_pointer); + glSecondaryColor3ubEXT(red, green, blue); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSecondaryColor_nglSecondaryColorPointerEXT(JNIEnv *env, jclass clazz, jint size, jint type, jint stride, jlong pPointer, jlong function_pointer) { + const GLvoid *pPointer_address = (const GLvoid *)(intptr_t)pPointer; + glSecondaryColorPointerEXTPROC glSecondaryColorPointerEXT = (glSecondaryColorPointerEXTPROC)((intptr_t)function_pointer); + glSecondaryColorPointerEXT(size, type, stride, pPointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSecondaryColor_nglSecondaryColorPointerEXTBO(JNIEnv *env, jclass clazz, jint size, jint type, jint stride, jlong pPointer_buffer_offset, jlong function_pointer) { + const GLvoid *pPointer_address = (const GLvoid *)(intptr_t)offsetToPointer(pPointer_buffer_offset); + glSecondaryColorPointerEXTPROC glSecondaryColorPointerEXT = (glSecondaryColorPointerEXTPROC)((intptr_t)function_pointer); + glSecondaryColorPointerEXT(size, type, stride, pPointer_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTSeparateShaderObjects.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTSeparateShaderObjects.c new file mode 100644 index 0000000..28257d4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTSeparateShaderObjects.c @@ -0,0 +1,26 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glUseShaderProgramEXTPROC) (GLenum type, GLuint program); +typedef void (APIENTRY *glActiveProgramEXTPROC) (GLuint program); +typedef GLuint (APIENTRY *glCreateShaderProgramEXTPROC) (GLenum type, const GLchar * string); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSeparateShaderObjects_nglUseShaderProgramEXT(JNIEnv *env, jclass clazz, jint type, jint program, jlong function_pointer) { + glUseShaderProgramEXTPROC glUseShaderProgramEXT = (glUseShaderProgramEXTPROC)((intptr_t)function_pointer); + glUseShaderProgramEXT(type, program); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTSeparateShaderObjects_nglActiveProgramEXT(JNIEnv *env, jclass clazz, jint program, jlong function_pointer) { + glActiveProgramEXTPROC glActiveProgramEXT = (glActiveProgramEXTPROC)((intptr_t)function_pointer); + glActiveProgramEXT(program); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_EXTSeparateShaderObjects_nglCreateShaderProgramEXT(JNIEnv *env, jclass clazz, jint type, jlong string, jlong function_pointer) { + const GLchar *string_address = (const GLchar *)(intptr_t)string; + glCreateShaderProgramEXTPROC glCreateShaderProgramEXT = (glCreateShaderProgramEXTPROC)((intptr_t)function_pointer); + GLuint __result = glCreateShaderProgramEXT(type, string_address); + return __result; +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTShaderImageLoadStore.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTShaderImageLoadStore.c new file mode 100644 index 0000000..9fb4b4e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTShaderImageLoadStore.c @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glBindImageTextureEXTPROC) (GLuint index, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLint format); +typedef void (APIENTRY *glMemoryBarrierEXTPROC) (GLbitfield barriers); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTShaderImageLoadStore_nglBindImageTextureEXT(JNIEnv *env, jclass clazz, jint index, jint texture, jint level, jboolean layered, jint layer, jint access, jint format, jlong function_pointer) { + glBindImageTextureEXTPROC glBindImageTextureEXT = (glBindImageTextureEXTPROC)((intptr_t)function_pointer); + glBindImageTextureEXT(index, texture, level, layered, layer, access, format); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTShaderImageLoadStore_nglMemoryBarrierEXT(JNIEnv *env, jclass clazz, jint barriers, jlong function_pointer) { + glMemoryBarrierEXTPROC glMemoryBarrierEXT = (glMemoryBarrierEXTPROC)((intptr_t)function_pointer); + glMemoryBarrierEXT(barriers); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTStencilClearTag.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTStencilClearTag.c new file mode 100644 index 0000000..9b7dbbf --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTStencilClearTag.c @@ -0,0 +1,12 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glStencilClearTagEXTPROC) (GLsizei stencilTagBits, GLuint stencilClearTag); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTStencilClearTag_nglStencilClearTagEXT(JNIEnv *env, jclass clazz, jint stencilTagBits, jint stencilClearTag, jlong function_pointer) { + glStencilClearTagEXTPROC glStencilClearTagEXT = (glStencilClearTagEXTPROC)((intptr_t)function_pointer); + glStencilClearTagEXT(stencilTagBits, stencilClearTag); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTStencilTwoSide.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTStencilTwoSide.c new file mode 100644 index 0000000..9ea402a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTStencilTwoSide.c @@ -0,0 +1,12 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glActiveStencilFaceEXTPROC) (GLenum face); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTStencilTwoSide_nglActiveStencilFaceEXT(JNIEnv *env, jclass clazz, jint face, jlong function_pointer) { + glActiveStencilFaceEXTPROC glActiveStencilFaceEXT = (glActiveStencilFaceEXTPROC)((intptr_t)function_pointer); + glActiveStencilFaceEXT(face); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTTextureBufferObject.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTTextureBufferObject.c new file mode 100644 index 0000000..301d2e1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTTextureBufferObject.c @@ -0,0 +1,12 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glTexBufferEXTPROC) (GLenum target, GLenum internalformat, GLuint buffer); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTextureBufferObject_nglTexBufferEXT(JNIEnv *env, jclass clazz, jint target, jint internalformat, jint buffer, jlong function_pointer) { + glTexBufferEXTPROC glTexBufferEXT = (glTexBufferEXTPROC)((intptr_t)function_pointer); + glTexBufferEXT(target, internalformat, buffer); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTTextureInteger.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTTextureInteger.c new file mode 100644 index 0000000..5f57930 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTTextureInteger.c @@ -0,0 +1,46 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glClearColorIiEXTPROC) (GLint r, GLint g, GLint b, GLint a); +typedef void (APIENTRY *glClearColorIuiEXTPROC) (GLuint r, GLuint g, GLuint b, GLuint a); +typedef void (APIENTRY *glTexParameterIivEXTPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRY *glTexParameterIuivEXTPROC) (GLenum target, GLenum pname, GLuint * params); +typedef void (APIENTRY *glGetTexParameterIivEXTPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetTexParameterIuivEXTPROC) (GLenum target, GLenum pname, GLuint * params); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTextureInteger_nglClearColorIiEXT(JNIEnv *env, jclass clazz, jint r, jint g, jint b, jint a, jlong function_pointer) { + glClearColorIiEXTPROC glClearColorIiEXT = (glClearColorIiEXTPROC)((intptr_t)function_pointer); + glClearColorIiEXT(r, g, b, a); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTextureInteger_nglClearColorIuiEXT(JNIEnv *env, jclass clazz, jint r, jint g, jint b, jint a, jlong function_pointer) { + glClearColorIuiEXTPROC glClearColorIuiEXT = (glClearColorIuiEXTPROC)((intptr_t)function_pointer); + glClearColorIuiEXT(r, g, b, a); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTextureInteger_nglTexParameterIivEXT(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glTexParameterIivEXTPROC glTexParameterIivEXT = (glTexParameterIivEXTPROC)((intptr_t)function_pointer); + glTexParameterIivEXT(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTextureInteger_nglTexParameterIuivEXT(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + GLuint *params_address = (GLuint *)(intptr_t)params; + glTexParameterIuivEXTPROC glTexParameterIuivEXT = (glTexParameterIuivEXTPROC)((intptr_t)function_pointer); + glTexParameterIuivEXT(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTextureInteger_nglGetTexParameterIivEXT(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetTexParameterIivEXTPROC glGetTexParameterIivEXT = (glGetTexParameterIivEXTPROC)((intptr_t)function_pointer); + glGetTexParameterIivEXT(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTextureInteger_nglGetTexParameterIuivEXT(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + GLuint *params_address = (GLuint *)(intptr_t)params; + glGetTexParameterIuivEXTPROC glGetTexParameterIuivEXT = (glGetTexParameterIuivEXTPROC)((intptr_t)function_pointer); + glGetTexParameterIuivEXT(target, pname, params_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTTimerQuery.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTTimerQuery.c new file mode 100644 index 0000000..a07db7f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTTimerQuery.c @@ -0,0 +1,20 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glGetQueryObjecti64vEXTPROC) (GLuint id, GLenum pname, GLint64EXT * params); +typedef void (APIENTRY *glGetQueryObjectui64vEXTPROC) (GLuint id, GLenum pname, GLuint64EXT * params); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTimerQuery_nglGetQueryObjecti64vEXT(JNIEnv *env, jclass clazz, jint id, jint pname, jlong params, jlong function_pointer) { + GLint64EXT *params_address = (GLint64EXT *)(intptr_t)params; + glGetQueryObjecti64vEXTPROC glGetQueryObjecti64vEXT = (glGetQueryObjecti64vEXTPROC)((intptr_t)function_pointer); + glGetQueryObjecti64vEXT(id, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTimerQuery_nglGetQueryObjectui64vEXT(JNIEnv *env, jclass clazz, jint id, jint pname, jlong params, jlong function_pointer) { + GLuint64EXT *params_address = (GLuint64EXT *)(intptr_t)params; + glGetQueryObjectui64vEXTPROC glGetQueryObjectui64vEXT = (glGetQueryObjectui64vEXTPROC)((intptr_t)function_pointer); + glGetQueryObjectui64vEXT(id, pname, params_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTTransformFeedback.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTTransformFeedback.c new file mode 100644 index 0000000..3b0a744 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTTransformFeedback.c @@ -0,0 +1,63 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glBindBufferRangeEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRY *glBindBufferOffsetEXTPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +typedef void (APIENTRY *glBindBufferBaseEXTPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void (APIENTRY *glBeginTransformFeedbackEXTPROC) (GLenum primitiveMode); +typedef void (APIENTRY *glEndTransformFeedbackEXTPROC) (); +typedef void (APIENTRY *glTransformFeedbackVaryingsEXTPROC) (GLuint program, GLsizei count, const GLchar ** varyings, GLenum bufferMode); +typedef void (APIENTRY *glGetTransformFeedbackVaryingEXTPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTransformFeedback_nglBindBufferRangeEXT(JNIEnv *env, jclass clazz, jint target, jint index, jint buffer, jlong offset, jlong size, jlong function_pointer) { + glBindBufferRangeEXTPROC glBindBufferRangeEXT = (glBindBufferRangeEXTPROC)((intptr_t)function_pointer); + glBindBufferRangeEXT(target, index, buffer, offset, size); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTransformFeedback_nglBindBufferOffsetEXT(JNIEnv *env, jclass clazz, jint target, jint index, jint buffer, jlong offset, jlong function_pointer) { + glBindBufferOffsetEXTPROC glBindBufferOffsetEXT = (glBindBufferOffsetEXTPROC)((intptr_t)function_pointer); + glBindBufferOffsetEXT(target, index, buffer, offset); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTransformFeedback_nglBindBufferBaseEXT(JNIEnv *env, jclass clazz, jint target, jint index, jint buffer, jlong function_pointer) { + glBindBufferBaseEXTPROC glBindBufferBaseEXT = (glBindBufferBaseEXTPROC)((intptr_t)function_pointer); + glBindBufferBaseEXT(target, index, buffer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTransformFeedback_nglBeginTransformFeedbackEXT(JNIEnv *env, jclass clazz, jint primitiveMode, jlong function_pointer) { + glBeginTransformFeedbackEXTPROC glBeginTransformFeedbackEXT = (glBeginTransformFeedbackEXTPROC)((intptr_t)function_pointer); + glBeginTransformFeedbackEXT(primitiveMode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTransformFeedback_nglEndTransformFeedbackEXT(JNIEnv *env, jclass clazz, jlong function_pointer) { + glEndTransformFeedbackEXTPROC glEndTransformFeedbackEXT = (glEndTransformFeedbackEXTPROC)((intptr_t)function_pointer); + glEndTransformFeedbackEXT(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTransformFeedback_nglTransformFeedbackVaryingsEXT(JNIEnv *env, jclass clazz, jint program, jint count, jlong varyings, jint bufferMode, jlong function_pointer) { + const GLchar *varyings_address = (const GLchar *)(intptr_t)varyings; + int _str_i; + GLchar *_str_address; + GLchar **varyings_str = (GLchar **) malloc(count * sizeof(GLchar *)); + glTransformFeedbackVaryingsEXTPROC glTransformFeedbackVaryingsEXT = (glTransformFeedbackVaryingsEXTPROC)((intptr_t)function_pointer); + _str_i = 0; + _str_address = (GLchar *)varyings_address; + while ( _str_i < count ) { + varyings_str[_str_i++] = _str_address; + _str_address += strlen(_str_address) + 1; + } + glTransformFeedbackVaryingsEXT(program, count, (const GLchar **)varyings_str, bufferMode); + free(varyings_str); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTTransformFeedback_nglGetTransformFeedbackVaryingEXT(JNIEnv *env, jclass clazz, jint program, jint index, jint bufSize, jlong length, jlong size, jlong type, jlong name, jlong function_pointer) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLsizei *size_address = (GLsizei *)(intptr_t)size; + GLenum *type_address = (GLenum *)(intptr_t)type; + GLchar *name_address = (GLchar *)(intptr_t)name; + glGetTransformFeedbackVaryingEXTPROC glGetTransformFeedbackVaryingEXT = (glGetTransformFeedbackVaryingEXTPROC)((intptr_t)function_pointer); + glGetTransformFeedbackVaryingEXT(program, index, bufSize, length_address, size_address, type_address, name_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTVertexAttrib64bit.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTVertexAttrib64bit.c new file mode 100644 index 0000000..738352d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTVertexAttrib64bit.c @@ -0,0 +1,78 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glVertexAttribL1dEXTPROC) (GLuint index, GLdouble x); +typedef void (APIENTRY *glVertexAttribL2dEXTPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRY *glVertexAttribL3dEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRY *glVertexAttribL4dEXTPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRY *glVertexAttribL1dvEXTPROC) (GLuint index, const GLdouble * v); +typedef void (APIENTRY *glVertexAttribL2dvEXTPROC) (GLuint index, const GLdouble * v); +typedef void (APIENTRY *glVertexAttribL3dvEXTPROC) (GLuint index, const GLdouble * v); +typedef void (APIENTRY *glVertexAttribL4dvEXTPROC) (GLuint index, const GLdouble * v); +typedef void (APIENTRY *glVertexAttribLPointerEXTPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); +typedef void (APIENTRY *glGetVertexAttribLdvEXTPROC) (GLuint index, GLenum pname, GLdouble * params); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexAttrib64bit_nglVertexAttribL1dEXT(JNIEnv *env, jclass clazz, jint index, jdouble x, jlong function_pointer) { + glVertexAttribL1dEXTPROC glVertexAttribL1dEXT = (glVertexAttribL1dEXTPROC)((intptr_t)function_pointer); + glVertexAttribL1dEXT(index, x); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexAttrib64bit_nglVertexAttribL2dEXT(JNIEnv *env, jclass clazz, jint index, jdouble x, jdouble y, jlong function_pointer) { + glVertexAttribL2dEXTPROC glVertexAttribL2dEXT = (glVertexAttribL2dEXTPROC)((intptr_t)function_pointer); + glVertexAttribL2dEXT(index, x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexAttrib64bit_nglVertexAttribL3dEXT(JNIEnv *env, jclass clazz, jint index, jdouble x, jdouble y, jdouble z, jlong function_pointer) { + glVertexAttribL3dEXTPROC glVertexAttribL3dEXT = (glVertexAttribL3dEXTPROC)((intptr_t)function_pointer); + glVertexAttribL3dEXT(index, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexAttrib64bit_nglVertexAttribL4dEXT(JNIEnv *env, jclass clazz, jint index, jdouble x, jdouble y, jdouble z, jdouble w, jlong function_pointer) { + glVertexAttribL4dEXTPROC glVertexAttribL4dEXT = (glVertexAttribL4dEXTPROC)((intptr_t)function_pointer); + glVertexAttribL4dEXT(index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexAttrib64bit_nglVertexAttribL1dvEXT(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLdouble *v_address = (const GLdouble *)(intptr_t)v; + glVertexAttribL1dvEXTPROC glVertexAttribL1dvEXT = (glVertexAttribL1dvEXTPROC)((intptr_t)function_pointer); + glVertexAttribL1dvEXT(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexAttrib64bit_nglVertexAttribL2dvEXT(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLdouble *v_address = (const GLdouble *)(intptr_t)v; + glVertexAttribL2dvEXTPROC glVertexAttribL2dvEXT = (glVertexAttribL2dvEXTPROC)((intptr_t)function_pointer); + glVertexAttribL2dvEXT(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexAttrib64bit_nglVertexAttribL3dvEXT(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLdouble *v_address = (const GLdouble *)(intptr_t)v; + glVertexAttribL3dvEXTPROC glVertexAttribL3dvEXT = (glVertexAttribL3dvEXTPROC)((intptr_t)function_pointer); + glVertexAttribL3dvEXT(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexAttrib64bit_nglVertexAttribL4dvEXT(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLdouble *v_address = (const GLdouble *)(intptr_t)v; + glVertexAttribL4dvEXTPROC glVertexAttribL4dvEXT = (glVertexAttribL4dvEXTPROC)((intptr_t)function_pointer); + glVertexAttribL4dvEXT(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexAttrib64bit_nglVertexAttribLPointerEXT(JNIEnv *env, jclass clazz, jint index, jint size, jint type, jint stride, jlong pointer, jlong function_pointer) { + const GLvoid *pointer_address = (const GLvoid *)(intptr_t)pointer; + glVertexAttribLPointerEXTPROC glVertexAttribLPointerEXT = (glVertexAttribLPointerEXTPROC)((intptr_t)function_pointer); + glVertexAttribLPointerEXT(index, size, type, stride, pointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexAttrib64bit_nglVertexAttribLPointerEXTBO(JNIEnv *env, jclass clazz, jint index, jint size, jint type, jint stride, jlong pointer_buffer_offset, jlong function_pointer) { + const GLvoid *pointer_address = (const GLvoid *)(intptr_t)offsetToPointer(pointer_buffer_offset); + glVertexAttribLPointerEXTPROC glVertexAttribLPointerEXT = (glVertexAttribLPointerEXTPROC)((intptr_t)function_pointer); + glVertexAttribLPointerEXT(index, size, type, stride, pointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexAttrib64bit_nglGetVertexAttribLdvEXT(JNIEnv *env, jclass clazz, jint index, jint pname, jlong params, jlong function_pointer) { + GLdouble *params_address = (GLdouble *)(intptr_t)params; + glGetVertexAttribLdvEXTPROC glGetVertexAttribLdvEXT = (glGetVertexAttribLdvEXTPROC)((intptr_t)function_pointer); + glGetVertexAttribLdvEXT(index, pname, params_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTVertexShader.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTVertexShader.c new file mode 100644 index 0000000..220e99e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTVertexShader.c @@ -0,0 +1,294 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glBeginVertexShaderEXTPROC) (); +typedef void (APIENTRY *glEndVertexShaderEXTPROC) (); +typedef void (APIENTRY *glBindVertexShaderEXTPROC) (GLuint id); +typedef GLuint (APIENTRY *glGenVertexShadersEXTPROC) (GLuint range); +typedef void (APIENTRY *glDeleteVertexShaderEXTPROC) (GLuint id); +typedef void (APIENTRY *glShaderOp1EXTPROC) (GLenum op, GLuint res, GLuint arg1); +typedef void (APIENTRY *glShaderOp2EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2); +typedef void (APIENTRY *glShaderOp3EXTPROC) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); +typedef void (APIENTRY *glSwizzleEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +typedef void (APIENTRY *glWriteMaskEXTPROC) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); +typedef void (APIENTRY *glInsertComponentEXTPROC) (GLuint res, GLuint src, GLuint num); +typedef void (APIENTRY *glExtractComponentEXTPROC) (GLuint res, GLuint src, GLuint num); +typedef GLuint (APIENTRY *glGenSymbolsEXTPROC) (GLenum dataType, GLenum storageType, GLenum range, GLuint components); +typedef void (APIENTRY *glSetInvariantEXTPROC) (GLuint id, GLenum type, const GLvoid * pAddr); +typedef void (APIENTRY *glSetLocalConstantEXTPROC) (GLuint id, GLenum type, const GLvoid * pAddr); +typedef void (APIENTRY *glVariantbvEXTPROC) (GLuint id, const GLbyte * pAddr); +typedef void (APIENTRY *glVariantsvEXTPROC) (GLuint id, const GLshort * pAddr); +typedef void (APIENTRY *glVariantivEXTPROC) (GLuint id, const GLint * pAddr); +typedef void (APIENTRY *glVariantfvEXTPROC) (GLuint id, const GLfloat * pAddr); +typedef void (APIENTRY *glVariantdvEXTPROC) (GLuint id, const GLdouble * pAddr); +typedef void (APIENTRY *glVariantubvEXTPROC) (GLuint id, const GLubyte * pAddr); +typedef void (APIENTRY *glVariantusvEXTPROC) (GLuint id, const GLushort * pAddr); +typedef void (APIENTRY *glVariantuivEXTPROC) (GLuint id, const GLuint * pAddr); +typedef void (APIENTRY *glVariantPointerEXTPROC) (GLuint id, GLenum type, GLuint stride, const GLvoid * pAddr); +typedef void (APIENTRY *glEnableVariantClientStateEXTPROC) (GLuint id); +typedef void (APIENTRY *glDisableVariantClientStateEXTPROC) (GLuint id); +typedef GLuint (APIENTRY *glBindLightParameterEXTPROC) (GLenum light, GLenum value); +typedef GLuint (APIENTRY *glBindMaterialParameterEXTPROC) (GLenum face, GLenum value); +typedef GLuint (APIENTRY *glBindTexGenParameterEXTPROC) (GLenum unit, GLenum coord, GLenum value); +typedef GLuint (APIENTRY *glBindTextureUnitParameterEXTPROC) (GLenum unit, GLenum value); +typedef GLuint (APIENTRY *glBindParameterEXTPROC) (GLenum value); +typedef GLboolean (APIENTRY *glIsVariantEnabledEXTPROC) (GLuint id, GLenum cap); +typedef void (APIENTRY *glGetVariantBooleanvEXTPROC) (GLuint id, GLenum value, GLbyte * pbData); +typedef void (APIENTRY *glGetVariantIntegervEXTPROC) (GLuint id, GLenum value, GLint * pbData); +typedef void (APIENTRY *glGetVariantFloatvEXTPROC) (GLuint id, GLenum value, GLfloat * pbData); +typedef void (APIENTRY *glGetVariantPointervEXTPROC) (GLuint id, GLenum value, GLvoid ** pbData); +typedef void (APIENTRY *glGetInvariantBooleanvEXTPROC) (GLuint id, GLenum value, GLbyte * pbData); +typedef void (APIENTRY *glGetInvariantIntegervEXTPROC) (GLuint id, GLenum value, GLint * pbData); +typedef void (APIENTRY *glGetInvariantFloatvEXTPROC) (GLuint id, GLenum value, GLfloat * pbData); +typedef void (APIENTRY *glGetLocalConstantBooleanvEXTPROC) (GLuint id, GLenum value, GLbyte * pbData); +typedef void (APIENTRY *glGetLocalConstantIntegervEXTPROC) (GLuint id, GLenum value, GLint * pbData); +typedef void (APIENTRY *glGetLocalConstantFloatvEXTPROC) (GLuint id, GLenum value, GLfloat * pbData); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglBeginVertexShaderEXT(JNIEnv *env, jclass clazz, jlong function_pointer) { + glBeginVertexShaderEXTPROC glBeginVertexShaderEXT = (glBeginVertexShaderEXTPROC)((intptr_t)function_pointer); + glBeginVertexShaderEXT(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglEndVertexShaderEXT(JNIEnv *env, jclass clazz, jlong function_pointer) { + glEndVertexShaderEXTPROC glEndVertexShaderEXT = (glEndVertexShaderEXTPROC)((intptr_t)function_pointer); + glEndVertexShaderEXT(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglBindVertexShaderEXT(JNIEnv *env, jclass clazz, jint id, jlong function_pointer) { + glBindVertexShaderEXTPROC glBindVertexShaderEXT = (glBindVertexShaderEXTPROC)((intptr_t)function_pointer); + glBindVertexShaderEXT(id); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglGenVertexShadersEXT(JNIEnv *env, jclass clazz, jint range, jlong function_pointer) { + glGenVertexShadersEXTPROC glGenVertexShadersEXT = (glGenVertexShadersEXTPROC)((intptr_t)function_pointer); + GLuint __result = glGenVertexShadersEXT(range); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglDeleteVertexShaderEXT(JNIEnv *env, jclass clazz, jint id, jlong function_pointer) { + glDeleteVertexShaderEXTPROC glDeleteVertexShaderEXT = (glDeleteVertexShaderEXTPROC)((intptr_t)function_pointer); + glDeleteVertexShaderEXT(id); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglShaderOp1EXT(JNIEnv *env, jclass clazz, jint op, jint res, jint arg1, jlong function_pointer) { + glShaderOp1EXTPROC glShaderOp1EXT = (glShaderOp1EXTPROC)((intptr_t)function_pointer); + glShaderOp1EXT(op, res, arg1); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglShaderOp2EXT(JNIEnv *env, jclass clazz, jint op, jint res, jint arg1, jint arg2, jlong function_pointer) { + glShaderOp2EXTPROC glShaderOp2EXT = (glShaderOp2EXTPROC)((intptr_t)function_pointer); + glShaderOp2EXT(op, res, arg1, arg2); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglShaderOp3EXT(JNIEnv *env, jclass clazz, jint op, jint res, jint arg1, jint arg2, jint arg3, jlong function_pointer) { + glShaderOp3EXTPROC glShaderOp3EXT = (glShaderOp3EXTPROC)((intptr_t)function_pointer); + glShaderOp3EXT(op, res, arg1, arg2, arg3); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglSwizzleEXT(JNIEnv *env, jclass clazz, jint res, jint in, jint outX, jint outY, jint outZ, jint outW, jlong function_pointer) { + glSwizzleEXTPROC glSwizzleEXT = (glSwizzleEXTPROC)((intptr_t)function_pointer); + glSwizzleEXT(res, in, outX, outY, outZ, outW); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglWriteMaskEXT(JNIEnv *env, jclass clazz, jint res, jint in, jint outX, jint outY, jint outZ, jint outW, jlong function_pointer) { + glWriteMaskEXTPROC glWriteMaskEXT = (glWriteMaskEXTPROC)((intptr_t)function_pointer); + glWriteMaskEXT(res, in, outX, outY, outZ, outW); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglInsertComponentEXT(JNIEnv *env, jclass clazz, jint res, jint src, jint num, jlong function_pointer) { + glInsertComponentEXTPROC glInsertComponentEXT = (glInsertComponentEXTPROC)((intptr_t)function_pointer); + glInsertComponentEXT(res, src, num); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglExtractComponentEXT(JNIEnv *env, jclass clazz, jint res, jint src, jint num, jlong function_pointer) { + glExtractComponentEXTPROC glExtractComponentEXT = (glExtractComponentEXTPROC)((intptr_t)function_pointer); + glExtractComponentEXT(res, src, num); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglGenSymbolsEXT(JNIEnv *env, jclass clazz, jint dataType, jint storageType, jint range, jint components, jlong function_pointer) { + glGenSymbolsEXTPROC glGenSymbolsEXT = (glGenSymbolsEXTPROC)((intptr_t)function_pointer); + GLuint __result = glGenSymbolsEXT(dataType, storageType, range, components); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglSetInvariantEXT(JNIEnv *env, jclass clazz, jint id, jint type, jlong pAddr, jlong function_pointer) { + const GLvoid *pAddr_address = (const GLvoid *)(intptr_t)pAddr; + glSetInvariantEXTPROC glSetInvariantEXT = (glSetInvariantEXTPROC)((intptr_t)function_pointer); + glSetInvariantEXT(id, type, pAddr_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglSetLocalConstantEXT(JNIEnv *env, jclass clazz, jint id, jint type, jlong pAddr, jlong function_pointer) { + const GLvoid *pAddr_address = (const GLvoid *)(intptr_t)pAddr; + glSetLocalConstantEXTPROC glSetLocalConstantEXT = (glSetLocalConstantEXTPROC)((intptr_t)function_pointer); + glSetLocalConstantEXT(id, type, pAddr_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglVariantbvEXT(JNIEnv *env, jclass clazz, jint id, jlong pAddr, jlong function_pointer) { + const GLbyte *pAddr_address = (const GLbyte *)(intptr_t)pAddr; + glVariantbvEXTPROC glVariantbvEXT = (glVariantbvEXTPROC)((intptr_t)function_pointer); + glVariantbvEXT(id, pAddr_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglVariantsvEXT(JNIEnv *env, jclass clazz, jint id, jlong pAddr, jlong function_pointer) { + const GLshort *pAddr_address = (const GLshort *)(intptr_t)pAddr; + glVariantsvEXTPROC glVariantsvEXT = (glVariantsvEXTPROC)((intptr_t)function_pointer); + glVariantsvEXT(id, pAddr_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglVariantivEXT(JNIEnv *env, jclass clazz, jint id, jlong pAddr, jlong function_pointer) { + const GLint *pAddr_address = (const GLint *)(intptr_t)pAddr; + glVariantivEXTPROC glVariantivEXT = (glVariantivEXTPROC)((intptr_t)function_pointer); + glVariantivEXT(id, pAddr_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglVariantfvEXT(JNIEnv *env, jclass clazz, jint id, jlong pAddr, jlong function_pointer) { + const GLfloat *pAddr_address = (const GLfloat *)(intptr_t)pAddr; + glVariantfvEXTPROC glVariantfvEXT = (glVariantfvEXTPROC)((intptr_t)function_pointer); + glVariantfvEXT(id, pAddr_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglVariantdvEXT(JNIEnv *env, jclass clazz, jint id, jlong pAddr, jlong function_pointer) { + const GLdouble *pAddr_address = (const GLdouble *)(intptr_t)pAddr; + glVariantdvEXTPROC glVariantdvEXT = (glVariantdvEXTPROC)((intptr_t)function_pointer); + glVariantdvEXT(id, pAddr_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglVariantubvEXT(JNIEnv *env, jclass clazz, jint id, jlong pAddr, jlong function_pointer) { + const GLubyte *pAddr_address = (const GLubyte *)(intptr_t)pAddr; + glVariantubvEXTPROC glVariantubvEXT = (glVariantubvEXTPROC)((intptr_t)function_pointer); + glVariantubvEXT(id, pAddr_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglVariantusvEXT(JNIEnv *env, jclass clazz, jint id, jlong pAddr, jlong function_pointer) { + const GLushort *pAddr_address = (const GLushort *)(intptr_t)pAddr; + glVariantusvEXTPROC glVariantusvEXT = (glVariantusvEXTPROC)((intptr_t)function_pointer); + glVariantusvEXT(id, pAddr_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglVariantuivEXT(JNIEnv *env, jclass clazz, jint id, jlong pAddr, jlong function_pointer) { + const GLuint *pAddr_address = (const GLuint *)(intptr_t)pAddr; + glVariantuivEXTPROC glVariantuivEXT = (glVariantuivEXTPROC)((intptr_t)function_pointer); + glVariantuivEXT(id, pAddr_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglVariantPointerEXT(JNIEnv *env, jclass clazz, jint id, jint type, jint stride, jlong pAddr, jlong function_pointer) { + const GLvoid *pAddr_address = (const GLvoid *)(intptr_t)pAddr; + glVariantPointerEXTPROC glVariantPointerEXT = (glVariantPointerEXTPROC)((intptr_t)function_pointer); + glVariantPointerEXT(id, type, stride, pAddr_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglVariantPointerEXTBO(JNIEnv *env, jclass clazz, jint id, jint type, jint stride, jlong pAddr_buffer_offset, jlong function_pointer) { + const GLvoid *pAddr_address = (const GLvoid *)(intptr_t)offsetToPointer(pAddr_buffer_offset); + glVariantPointerEXTPROC glVariantPointerEXT = (glVariantPointerEXTPROC)((intptr_t)function_pointer); + glVariantPointerEXT(id, type, stride, pAddr_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglEnableVariantClientStateEXT(JNIEnv *env, jclass clazz, jint id, jlong function_pointer) { + glEnableVariantClientStateEXTPROC glEnableVariantClientStateEXT = (glEnableVariantClientStateEXTPROC)((intptr_t)function_pointer); + glEnableVariantClientStateEXT(id); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglDisableVariantClientStateEXT(JNIEnv *env, jclass clazz, jint id, jlong function_pointer) { + glDisableVariantClientStateEXTPROC glDisableVariantClientStateEXT = (glDisableVariantClientStateEXTPROC)((intptr_t)function_pointer); + glDisableVariantClientStateEXT(id); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglBindLightParameterEXT(JNIEnv *env, jclass clazz, jint light, jint value, jlong function_pointer) { + glBindLightParameterEXTPROC glBindLightParameterEXT = (glBindLightParameterEXTPROC)((intptr_t)function_pointer); + GLuint __result = glBindLightParameterEXT(light, value); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglBindMaterialParameterEXT(JNIEnv *env, jclass clazz, jint face, jint value, jlong function_pointer) { + glBindMaterialParameterEXTPROC glBindMaterialParameterEXT = (glBindMaterialParameterEXTPROC)((intptr_t)function_pointer); + GLuint __result = glBindMaterialParameterEXT(face, value); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglBindTexGenParameterEXT(JNIEnv *env, jclass clazz, jint unit, jint coord, jint value, jlong function_pointer) { + glBindTexGenParameterEXTPROC glBindTexGenParameterEXT = (glBindTexGenParameterEXTPROC)((intptr_t)function_pointer); + GLuint __result = glBindTexGenParameterEXT(unit, coord, value); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglBindTextureUnitParameterEXT(JNIEnv *env, jclass clazz, jint unit, jint value, jlong function_pointer) { + glBindTextureUnitParameterEXTPROC glBindTextureUnitParameterEXT = (glBindTextureUnitParameterEXTPROC)((intptr_t)function_pointer); + GLuint __result = glBindTextureUnitParameterEXT(unit, value); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglBindParameterEXT(JNIEnv *env, jclass clazz, jint value, jlong function_pointer) { + glBindParameterEXTPROC glBindParameterEXT = (glBindParameterEXTPROC)((intptr_t)function_pointer); + GLuint __result = glBindParameterEXT(value); + return __result; +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglIsVariantEnabledEXT(JNIEnv *env, jclass clazz, jint id, jint cap, jlong function_pointer) { + glIsVariantEnabledEXTPROC glIsVariantEnabledEXT = (glIsVariantEnabledEXTPROC)((intptr_t)function_pointer); + GLboolean __result = glIsVariantEnabledEXT(id, cap); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglGetVariantBooleanvEXT(JNIEnv *env, jclass clazz, jint id, jint value, jlong pbData, jlong function_pointer) { + GLbyte *pbData_address = (GLbyte *)(intptr_t)pbData; + glGetVariantBooleanvEXTPROC glGetVariantBooleanvEXT = (glGetVariantBooleanvEXTPROC)((intptr_t)function_pointer); + glGetVariantBooleanvEXT(id, value, pbData_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglGetVariantIntegervEXT(JNIEnv *env, jclass clazz, jint id, jint value, jlong pbData, jlong function_pointer) { + GLint *pbData_address = (GLint *)(intptr_t)pbData; + glGetVariantIntegervEXTPROC glGetVariantIntegervEXT = (glGetVariantIntegervEXTPROC)((intptr_t)function_pointer); + glGetVariantIntegervEXT(id, value, pbData_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglGetVariantFloatvEXT(JNIEnv *env, jclass clazz, jint id, jint value, jlong pbData, jlong function_pointer) { + GLfloat *pbData_address = (GLfloat *)(intptr_t)pbData; + glGetVariantFloatvEXTPROC glGetVariantFloatvEXT = (glGetVariantFloatvEXTPROC)((intptr_t)function_pointer); + glGetVariantFloatvEXT(id, value, pbData_address); +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglGetVariantPointervEXT(JNIEnv *env, jclass clazz, jint id, jint value, jlong result_size, jlong function_pointer) { + glGetVariantPointervEXTPROC glGetVariantPointervEXT = (glGetVariantPointervEXTPROC)((intptr_t)function_pointer); + GLvoid * __result; + glGetVariantPointervEXT(id, value, &__result); + return safeNewBuffer(env, __result, result_size); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglGetInvariantBooleanvEXT(JNIEnv *env, jclass clazz, jint id, jint value, jlong pbData, jlong function_pointer) { + GLbyte *pbData_address = (GLbyte *)(intptr_t)pbData; + glGetInvariantBooleanvEXTPROC glGetInvariantBooleanvEXT = (glGetInvariantBooleanvEXTPROC)((intptr_t)function_pointer); + glGetInvariantBooleanvEXT(id, value, pbData_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglGetInvariantIntegervEXT(JNIEnv *env, jclass clazz, jint id, jint value, jlong pbData, jlong function_pointer) { + GLint *pbData_address = (GLint *)(intptr_t)pbData; + glGetInvariantIntegervEXTPROC glGetInvariantIntegervEXT = (glGetInvariantIntegervEXTPROC)((intptr_t)function_pointer); + glGetInvariantIntegervEXT(id, value, pbData_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglGetInvariantFloatvEXT(JNIEnv *env, jclass clazz, jint id, jint value, jlong pbData, jlong function_pointer) { + GLfloat *pbData_address = (GLfloat *)(intptr_t)pbData; + glGetInvariantFloatvEXTPROC glGetInvariantFloatvEXT = (glGetInvariantFloatvEXTPROC)((intptr_t)function_pointer); + glGetInvariantFloatvEXT(id, value, pbData_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglGetLocalConstantBooleanvEXT(JNIEnv *env, jclass clazz, jint id, jint value, jlong pbData, jlong function_pointer) { + GLbyte *pbData_address = (GLbyte *)(intptr_t)pbData; + glGetLocalConstantBooleanvEXTPROC glGetLocalConstantBooleanvEXT = (glGetLocalConstantBooleanvEXTPROC)((intptr_t)function_pointer); + glGetLocalConstantBooleanvEXT(id, value, pbData_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglGetLocalConstantIntegervEXT(JNIEnv *env, jclass clazz, jint id, jint value, jlong pbData, jlong function_pointer) { + GLint *pbData_address = (GLint *)(intptr_t)pbData; + glGetLocalConstantIntegervEXTPROC glGetLocalConstantIntegervEXT = (glGetLocalConstantIntegervEXTPROC)((intptr_t)function_pointer); + glGetLocalConstantIntegervEXT(id, value, pbData_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexShader_nglGetLocalConstantFloatvEXT(JNIEnv *env, jclass clazz, jint id, jint value, jlong pbData, jlong function_pointer) { + GLfloat *pbData_address = (GLfloat *)(intptr_t)pbData; + glGetLocalConstantFloatvEXTPROC glGetLocalConstantFloatvEXT = (glGetLocalConstantFloatvEXTPROC)((intptr_t)function_pointer); + glGetLocalConstantFloatvEXT(id, value, pbData_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTVertexWeighting.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTVertexWeighting.c new file mode 100644 index 0000000..0fec001 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_EXTVertexWeighting.c @@ -0,0 +1,25 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glVertexWeightfEXTPROC) (GLfloat weight); +typedef void (APIENTRY *glVertexWeightPointerEXTPROC) (GLsizei size, GLenum type, GLsizei stride, const GLvoid * pPointer); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexWeighting_nglVertexWeightfEXT(JNIEnv *env, jclass clazz, jfloat weight, jlong function_pointer) { + glVertexWeightfEXTPROC glVertexWeightfEXT = (glVertexWeightfEXTPROC)((intptr_t)function_pointer); + glVertexWeightfEXT(weight); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexWeighting_nglVertexWeightPointerEXT(JNIEnv *env, jclass clazz, jint size, jint type, jint stride, jlong pPointer, jlong function_pointer) { + const GLvoid *pPointer_address = (const GLvoid *)(intptr_t)pPointer; + glVertexWeightPointerEXTPROC glVertexWeightPointerEXT = (glVertexWeightPointerEXTPROC)((intptr_t)function_pointer); + glVertexWeightPointerEXT(size, type, stride, pPointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_EXTVertexWeighting_nglVertexWeightPointerEXTBO(JNIEnv *env, jclass clazz, jint size, jint type, jint stride, jlong pPointer_buffer_offset, jlong function_pointer) { + const GLvoid *pPointer_address = (const GLvoid *)(intptr_t)offsetToPointer(pPointer_buffer_offset); + glVertexWeightPointerEXTPROC glVertexWeightPointerEXT = (glVertexWeightPointerEXTPROC)((intptr_t)function_pointer); + glVertexWeightPointerEXT(size, type, stride, pPointer_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL11.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL11.c new file mode 100644 index 0000000..718d068 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL11.c @@ -0,0 +1,1605 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glAccumPROC) (GLenum op, GLfloat value); +typedef void (APIENTRY *glAlphaFuncPROC) (GLenum func, GLfloat ref); +typedef void (APIENTRY *glClearColorPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +typedef void (APIENTRY *glClearAccumPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +typedef void (APIENTRY *glClearPROC) (GLbitfield mask); +typedef void (APIENTRY *glCallListsPROC) (GLsizei n, GLenum type, const GLvoid * lists); +typedef void (APIENTRY *glCallListPROC) (GLuint list); +typedef void (APIENTRY *glBlendFuncPROC) (GLenum sfactor, GLenum dfactor); +typedef void (APIENTRY *glBitmapPROC) (GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte * bitmap); +typedef void (APIENTRY *glBindTexturePROC) (GLenum target, GLuint texture); +typedef void (APIENTRY *glPrioritizeTexturesPROC) (GLsizei n, const GLuint * textures, const GLfloat * priorities); +typedef GLboolean (APIENTRY *glAreTexturesResidentPROC) (GLsizei n, const GLuint * textures, GLboolean * residences); +typedef void (APIENTRY *glBeginPROC) (GLenum mode); +typedef void (APIENTRY *glEndPROC) (); +typedef void (APIENTRY *glArrayElementPROC) (GLint i); +typedef void (APIENTRY *glClearDepthPROC) (GLdouble depth); +typedef void (APIENTRY *glDeleteListsPROC) (GLuint list, GLsizei range); +typedef void (APIENTRY *glDeleteTexturesPROC) (GLsizei n, const GLuint * textures); +typedef void (APIENTRY *glCullFacePROC) (GLenum mode); +typedef void (APIENTRY *glCopyTexSubImage2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRY *glCopyTexSubImage1DPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); +typedef void (APIENTRY *glCopyTexImage2DPROC) (GLenum target, GLint level, GLint internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef void (APIENTRY *glCopyTexImage1DPROC) (GLenum target, GLint level, GLint internalFormat, GLint x, GLint y, GLsizei width, GLint border); +typedef void (APIENTRY *glCopyPixelsPROC) (GLint x, GLint y, GLint width, GLint height, GLint type); +typedef void (APIENTRY *glColorPointerPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); +typedef void (APIENTRY *glColorMaterialPROC) (GLenum face, GLenum mode); +typedef void (APIENTRY *glColorMaskPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +typedef void (APIENTRY *glColor3bPROC) (GLbyte red, GLbyte green, GLbyte blue); +typedef void (APIENTRY *glColor3fPROC) (GLfloat red, GLfloat green, GLfloat blue); +typedef void (APIENTRY *glColor3dPROC) (GLdouble red, GLdouble green, GLdouble blue); +typedef void (APIENTRY *glColor3ubPROC) (GLubyte red, GLubyte green, GLubyte blue); +typedef void (APIENTRY *glColor4bPROC) (GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha); +typedef void (APIENTRY *glColor4fPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +typedef void (APIENTRY *glColor4dPROC) (GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha); +typedef void (APIENTRY *glColor4ubPROC) (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha); +typedef void (APIENTRY *glClipPlanePROC) (GLenum plane, const GLdouble * equation); +typedef void (APIENTRY *glClearStencilPROC) (GLint s); +typedef void (APIENTRY *glEvalPoint1PROC) (GLint i); +typedef void (APIENTRY *glEvalPoint2PROC) (GLint i, GLint j); +typedef void (APIENTRY *glEvalMesh1PROC) (GLenum mode, GLint i1, GLint i2); +typedef void (APIENTRY *glEvalMesh2PROC) (GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2); +typedef void (APIENTRY *glEvalCoord1fPROC) (GLfloat u); +typedef void (APIENTRY *glEvalCoord1dPROC) (GLdouble u); +typedef void (APIENTRY *glEvalCoord2fPROC) (GLfloat u, GLfloat v); +typedef void (APIENTRY *glEvalCoord2dPROC) (GLdouble u, GLdouble v); +typedef void (APIENTRY *glEnableClientStatePROC) (GLenum cap); +typedef void (APIENTRY *glDisableClientStatePROC) (GLenum cap); +typedef void (APIENTRY *glEnablePROC) (GLenum cap); +typedef void (APIENTRY *glDisablePROC) (GLenum cap); +typedef void (APIENTRY *glEdgeFlagPointerPROC) (GLint stride, const GLvoid * pointer); +typedef void (APIENTRY *glEdgeFlagPROC) (GLboolean flag); +typedef void (APIENTRY *glDrawPixelsPROC) (GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels); +typedef void (APIENTRY *glDrawElementsPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid * indices); +typedef void (APIENTRY *glDrawBufferPROC) (GLenum mode); +typedef void (APIENTRY *glDrawArraysPROC) (GLenum mode, GLint first, GLsizei count); +typedef void (APIENTRY *glDepthRangePROC) (GLdouble zNear, GLdouble zFar); +typedef void (APIENTRY *glDepthMaskPROC) (GLboolean flag); +typedef void (APIENTRY *glDepthFuncPROC) (GLenum func); +typedef void (APIENTRY *glFeedbackBufferPROC) (GLsizei size, GLenum type, GLfloat * buffer); +typedef void (APIENTRY *glGetPixelMapfvPROC) (GLenum map, GLfloat * values); +typedef void (APIENTRY *glGetPixelMapuivPROC) (GLenum map, GLuint * values); +typedef void (APIENTRY *glGetPixelMapusvPROC) (GLenum map, GLushort * values); +typedef void (APIENTRY *glGetMaterialfvPROC) (GLenum face, GLenum pname, GLfloat * params); +typedef void (APIENTRY *glGetMaterialivPROC) (GLenum face, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetMapfvPROC) (GLenum target, GLenum query, GLfloat * v); +typedef void (APIENTRY *glGetMapdvPROC) (GLenum target, GLenum query, GLdouble * v); +typedef void (APIENTRY *glGetMapivPROC) (GLenum target, GLenum query, GLint * v); +typedef void (APIENTRY *glGetLightfvPROC) (GLenum light, GLenum pname, GLfloat * params); +typedef void (APIENTRY *glGetLightivPROC) (GLenum light, GLenum pname, GLint * params); +typedef GLint (APIENTRY *glGetErrorPROC) (); +typedef void (APIENTRY *glGetClipPlanePROC) (GLenum plane, GLdouble * equation); +typedef void (APIENTRY *glGetBooleanvPROC) (GLenum pname, GLboolean * params); +typedef void (APIENTRY *glGetDoublevPROC) (GLenum pname, GLdouble * params); +typedef void (APIENTRY *glGetFloatvPROC) (GLenum pname, GLfloat * params); +typedef void (APIENTRY *glGetIntegervPROC) (GLenum pname, GLint * params); +typedef void (APIENTRY *glGenTexturesPROC) (GLsizei n, GLuint * textures); +typedef GLuint (APIENTRY *glGenListsPROC) (GLsizei range); +typedef void (APIENTRY *glFrustumPROC) (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +typedef void (APIENTRY *glFrontFacePROC) (GLenum mode); +typedef void (APIENTRY *glFogfPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRY *glFogiPROC) (GLenum pname, GLint param); +typedef void (APIENTRY *glFogfvPROC) (GLenum pname, const GLfloat * params); +typedef void (APIENTRY *glFogivPROC) (GLenum pname, const GLint * params); +typedef void (APIENTRY *glFlushPROC) (); +typedef void (APIENTRY *glFinishPROC) (); +typedef void (APIENTRY *glGetPointervPROC) (GLenum pname, GLvoid ** result); +typedef GLboolean (APIENTRY *glIsEnabledPROC) (GLenum cap); +typedef void (APIENTRY *glInterleavedArraysPROC) (GLenum format, GLsizei stride, const GLvoid * pointer); +typedef void (APIENTRY *glInitNamesPROC) (); +typedef void (APIENTRY *glHintPROC) (GLenum target, GLenum mode); +typedef void (APIENTRY *glGetTexParameterfvPROC) (GLenum target, GLenum pname, GLfloat * params); +typedef void (APIENTRY *glGetTexParameterivPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetTexLevelParameterfvPROC) (GLenum target, GLint level, GLenum pname, GLfloat * params); +typedef void (APIENTRY *glGetTexLevelParameterivPROC) (GLenum target, GLint level, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetTexImagePROC) (GLenum target, GLint level, GLenum format, GLenum type, GLvoid * pixels); +typedef void (APIENTRY *glGetTexGenivPROC) (GLenum coord, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetTexGenfvPROC) (GLenum coord, GLenum pname, GLfloat * params); +typedef void (APIENTRY *glGetTexGendvPROC) (GLenum coord, GLenum pname, GLdouble * params); +typedef void (APIENTRY *glGetTexEnvivPROC) (GLenum coord, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetTexEnvfvPROC) (GLenum coord, GLenum pname, GLfloat * params); +typedef const GLubyte * (APIENTRY *glGetStringPROC) (GLint name); +typedef void (APIENTRY *glGetPolygonStipplePROC) (GLubyte * mask); +typedef GLboolean (APIENTRY *glIsListPROC) (GLuint list); +typedef void (APIENTRY *glMaterialfPROC) (GLenum face, GLenum pname, GLfloat param); +typedef void (APIENTRY *glMaterialiPROC) (GLenum face, GLenum pname, GLint param); +typedef void (APIENTRY *glMaterialfvPROC) (GLenum face, GLenum pname, const GLfloat * params); +typedef void (APIENTRY *glMaterialivPROC) (GLenum face, GLenum pname, const GLint * params); +typedef void (APIENTRY *glMapGrid1fPROC) (GLint un, GLfloat u1, GLfloat u2); +typedef void (APIENTRY *glMapGrid1dPROC) (GLint un, GLdouble u1, GLdouble u2); +typedef void (APIENTRY *glMapGrid2fPROC) (GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2); +typedef void (APIENTRY *glMapGrid2dPROC) (GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2); +typedef void (APIENTRY *glMap2fPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat * points); +typedef void (APIENTRY *glMap2dPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble * points); +typedef void (APIENTRY *glMap1fPROC) (GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat * points); +typedef void (APIENTRY *glMap1dPROC) (GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble * points); +typedef void (APIENTRY *glLogicOpPROC) (GLenum opcode); +typedef void (APIENTRY *glLoadNamePROC) (GLuint name); +typedef void (APIENTRY *glLoadMatrixfPROC) (const GLfloat * m); +typedef void (APIENTRY *glLoadMatrixdPROC) (const GLdouble * m); +typedef void (APIENTRY *glLoadIdentityPROC) (); +typedef void (APIENTRY *glListBasePROC) (GLuint base); +typedef void (APIENTRY *glLineWidthPROC) (GLfloat width); +typedef void (APIENTRY *glLineStipplePROC) (GLint factor, GLushort pattern); +typedef void (APIENTRY *glLightModelfPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRY *glLightModeliPROC) (GLenum pname, GLint param); +typedef void (APIENTRY *glLightModelfvPROC) (GLenum pname, const GLfloat * params); +typedef void (APIENTRY *glLightModelivPROC) (GLenum pname, const GLint * params); +typedef void (APIENTRY *glLightfPROC) (GLenum light, GLenum pname, GLfloat param); +typedef void (APIENTRY *glLightiPROC) (GLenum light, GLenum pname, GLint param); +typedef void (APIENTRY *glLightfvPROC) (GLenum light, GLenum pname, const GLfloat * params); +typedef void (APIENTRY *glLightivPROC) (GLenum light, GLenum pname, const GLint * params); +typedef GLboolean (APIENTRY *glIsTexturePROC) (GLuint texture); +typedef void (APIENTRY *glMatrixModePROC) (GLenum mode); +typedef void (APIENTRY *glPolygonStipplePROC) (const GLubyte * mask); +typedef void (APIENTRY *glPolygonOffsetPROC) (GLfloat factor, GLfloat units); +typedef void (APIENTRY *glPolygonModePROC) (GLenum face, GLenum mode); +typedef void (APIENTRY *glPointSizePROC) (GLfloat size); +typedef void (APIENTRY *glPixelZoomPROC) (GLfloat xfactor, GLfloat yfactor); +typedef void (APIENTRY *glPixelTransferfPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRY *glPixelTransferiPROC) (GLenum pname, GLint param); +typedef void (APIENTRY *glPixelStorefPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRY *glPixelStoreiPROC) (GLenum pname, GLint param); +typedef void (APIENTRY *glPixelMapfvPROC) (GLenum map, GLsizei mapsize, const GLfloat * values); +typedef void (APIENTRY *glPixelMapuivPROC) (GLenum map, GLsizei mapsize, const GLuint * values); +typedef void (APIENTRY *glPixelMapusvPROC) (GLenum map, GLsizei mapsize, const GLushort * values); +typedef void (APIENTRY *glPassThroughPROC) (GLfloat token); +typedef void (APIENTRY *glOrthoPROC) (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar); +typedef void (APIENTRY *glNormalPointerPROC) (GLenum type, GLsizei stride, const GLvoid * pointer); +typedef void (APIENTRY *glNormal3bPROC) (GLbyte nx, GLbyte ny, GLbyte nz); +typedef void (APIENTRY *glNormal3fPROC) (GLfloat nx, GLfloat ny, GLfloat nz); +typedef void (APIENTRY *glNormal3dPROC) (GLdouble nx, GLdouble ny, GLdouble nz); +typedef void (APIENTRY *glNormal3iPROC) (GLint nx, GLint ny, GLint nz); +typedef void (APIENTRY *glNewListPROC) (GLuint list, GLenum mode); +typedef void (APIENTRY *glEndListPROC) (); +typedef void (APIENTRY *glMultMatrixfPROC) (const GLfloat * m); +typedef void (APIENTRY *glMultMatrixdPROC) (const GLdouble * m); +typedef void (APIENTRY *glShadeModelPROC) (GLenum mode); +typedef void (APIENTRY *glSelectBufferPROC) (GLsizei size, GLuint * buffer); +typedef void (APIENTRY *glScissorPROC) (GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRY *glScalefPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRY *glScaledPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRY *glRotatefPROC) (GLfloat angle, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRY *glRotatedPROC) (GLdouble angle, GLdouble x, GLdouble y, GLdouble z); +typedef GLint (APIENTRY *glRenderModePROC) (GLenum mode); +typedef void (APIENTRY *glRectfPROC) (GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2); +typedef void (APIENTRY *glRectdPROC) (GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2); +typedef void (APIENTRY *glRectiPROC) (GLint x1, GLint y1, GLint x2, GLint y2); +typedef void (APIENTRY *glReadPixelsPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels); +typedef void (APIENTRY *glReadBufferPROC) (GLenum mode); +typedef void (APIENTRY *glRasterPos2fPROC) (GLfloat x, GLfloat y); +typedef void (APIENTRY *glRasterPos2dPROC) (GLdouble x, GLdouble y); +typedef void (APIENTRY *glRasterPos2iPROC) (GLint x, GLint y); +typedef void (APIENTRY *glRasterPos3fPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRY *glRasterPos3dPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRY *glRasterPos3iPROC) (GLint x, GLint y, GLint z); +typedef void (APIENTRY *glRasterPos4fPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRY *glRasterPos4dPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRY *glRasterPos4iPROC) (GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRY *glPushNamePROC) (GLuint name); +typedef void (APIENTRY *glPopNamePROC) (); +typedef void (APIENTRY *glPushMatrixPROC) (); +typedef void (APIENTRY *glPopMatrixPROC) (); +typedef void (APIENTRY *glPushClientAttribPROC) (GLbitfield mask); +typedef void (APIENTRY *glPopClientAttribPROC) (); +typedef void (APIENTRY *glPushAttribPROC) (GLbitfield mask); +typedef void (APIENTRY *glPopAttribPROC) (); +typedef void (APIENTRY *glStencilFuncPROC) (GLenum func, GLint ref, GLuint mask); +typedef void (APIENTRY *glVertexPointerPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); +typedef void (APIENTRY *glVertex2fPROC) (GLfloat x, GLfloat y); +typedef void (APIENTRY *glVertex2dPROC) (GLdouble x, GLdouble y); +typedef void (APIENTRY *glVertex2iPROC) (GLint x, GLint y); +typedef void (APIENTRY *glVertex3fPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRY *glVertex3dPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRY *glVertex3iPROC) (GLint x, GLint y, GLint z); +typedef void (APIENTRY *glVertex4fPROC) (GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRY *glVertex4dPROC) (GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRY *glVertex4iPROC) (GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRY *glTranslatefPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRY *glTranslatedPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRY *glTexImage1DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid * pixels); +typedef void (APIENTRY *glTexImage2DPROC) (GLenum target, GLint level, GLint internalformat, GLint width, GLint height, GLint border, GLenum format, GLenum type, const GLvoid * pixels); +typedef void (APIENTRY *glTexSubImage1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid * pixels); +typedef void (APIENTRY *glTexSubImage2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels); +typedef void (APIENTRY *glTexParameterfPROC) (GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRY *glTexParameteriPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRY *glTexParameterfvPROC) (GLenum target, GLenum pname, const GLfloat * param); +typedef void (APIENTRY *glTexParameterivPROC) (GLenum target, GLenum pname, const GLint * param); +typedef void (APIENTRY *glTexGenfPROC) (GLenum coord, GLenum pname, GLfloat param); +typedef void (APIENTRY *glTexGendPROC) (GLenum coord, GLenum pname, GLdouble param); +typedef void (APIENTRY *glTexGenfvPROC) (GLenum coord, GLenum pname, const GLfloat * params); +typedef void (APIENTRY *glTexGendvPROC) (GLenum coord, GLenum pname, const GLdouble * params); +typedef void (APIENTRY *glTexGeniPROC) (GLenum coord, GLenum pname, GLint param); +typedef void (APIENTRY *glTexGenivPROC) (GLenum coord, GLenum pname, const GLint * params); +typedef void (APIENTRY *glTexEnvfPROC) (GLenum target, GLenum pname, GLfloat param); +typedef void (APIENTRY *glTexEnviPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRY *glTexEnvfvPROC) (GLenum target, GLenum pname, const GLfloat * params); +typedef void (APIENTRY *glTexEnvivPROC) (GLenum target, GLenum pname, const GLint * params); +typedef void (APIENTRY *glTexCoordPointerPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); +typedef void (APIENTRY *glTexCoord1fPROC) (GLfloat s); +typedef void (APIENTRY *glTexCoord1dPROC) (GLdouble s); +typedef void (APIENTRY *glTexCoord2fPROC) (GLfloat s, GLfloat t); +typedef void (APIENTRY *glTexCoord2dPROC) (GLdouble s, GLdouble t); +typedef void (APIENTRY *glTexCoord3fPROC) (GLfloat s, GLfloat t, GLfloat r); +typedef void (APIENTRY *glTexCoord3dPROC) (GLdouble s, GLdouble t, GLdouble r); +typedef void (APIENTRY *glTexCoord4fPROC) (GLfloat s, GLfloat t, GLfloat r, GLfloat q); +typedef void (APIENTRY *glTexCoord4dPROC) (GLdouble s, GLdouble t, GLdouble r, GLdouble q); +typedef void (APIENTRY *glStencilOpPROC) (GLenum fail, GLenum zfail, GLenum zpass); +typedef void (APIENTRY *glStencilMaskPROC) (GLuint mask); +typedef void (APIENTRY *glViewportPROC) (GLint x, GLint y, GLsizei width, GLsizei height); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglAccum(JNIEnv *env, jclass clazz, jint op, jfloat value, jlong function_pointer) { + glAccumPROC glAccum = (glAccumPROC)((intptr_t)function_pointer); + glAccum(op, value); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglAlphaFunc(JNIEnv *env, jclass clazz, jint func, jfloat ref, jlong function_pointer) { + glAlphaFuncPROC glAlphaFunc = (glAlphaFuncPROC)((intptr_t)function_pointer); + glAlphaFunc(func, ref); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglClearColor(JNIEnv *env, jclass clazz, jfloat red, jfloat green, jfloat blue, jfloat alpha, jlong function_pointer) { + glClearColorPROC glClearColor = (glClearColorPROC)((intptr_t)function_pointer); + glClearColor(red, green, blue, alpha); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglClearAccum(JNIEnv *env, jclass clazz, jfloat red, jfloat green, jfloat blue, jfloat alpha, jlong function_pointer) { + glClearAccumPROC glClearAccum = (glClearAccumPROC)((intptr_t)function_pointer); + glClearAccum(red, green, blue, alpha); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglClear(JNIEnv *env, jclass clazz, jint mask, jlong function_pointer) { + glClearPROC glClear = (glClearPROC)((intptr_t)function_pointer); + glClear(mask); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglCallLists(JNIEnv *env, jclass clazz, jint n, jint type, jlong lists, jlong function_pointer) { + const GLvoid *lists_address = (const GLvoid *)(intptr_t)lists; + glCallListsPROC glCallLists = (glCallListsPROC)((intptr_t)function_pointer); + glCallLists(n, type, lists_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglCallList(JNIEnv *env, jclass clazz, jint list, jlong function_pointer) { + glCallListPROC glCallList = (glCallListPROC)((intptr_t)function_pointer); + glCallList(list); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglBlendFunc(JNIEnv *env, jclass clazz, jint sfactor, jint dfactor, jlong function_pointer) { + glBlendFuncPROC glBlendFunc = (glBlendFuncPROC)((intptr_t)function_pointer); + glBlendFunc(sfactor, dfactor); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglBitmap(JNIEnv *env, jclass clazz, jint width, jint height, jfloat xorig, jfloat yorig, jfloat xmove, jfloat ymove, jlong bitmap, jlong function_pointer) { + const GLubyte *bitmap_address = (const GLubyte *)(intptr_t)bitmap; + glBitmapPROC glBitmap = (glBitmapPROC)((intptr_t)function_pointer); + glBitmap(width, height, xorig, yorig, xmove, ymove, bitmap_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglBitmapBO(JNIEnv *env, jclass clazz, jint width, jint height, jfloat xorig, jfloat yorig, jfloat xmove, jfloat ymove, jlong bitmap_buffer_offset, jlong function_pointer) { + const GLubyte *bitmap_address = (const GLubyte *)(intptr_t)offsetToPointer(bitmap_buffer_offset); + glBitmapPROC glBitmap = (glBitmapPROC)((intptr_t)function_pointer); + glBitmap(width, height, xorig, yorig, xmove, ymove, bitmap_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglBindTexture(JNIEnv *env, jclass clazz, jint target, jint texture, jlong function_pointer) { + glBindTexturePROC glBindTexture = (glBindTexturePROC)((intptr_t)function_pointer); + glBindTexture(target, texture); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPrioritizeTextures(JNIEnv *env, jclass clazz, jint n, jlong textures, jlong priorities, jlong function_pointer) { + const GLuint *textures_address = (const GLuint *)(intptr_t)textures; + const GLfloat *priorities_address = (const GLfloat *)(intptr_t)priorities; + glPrioritizeTexturesPROC glPrioritizeTextures = (glPrioritizeTexturesPROC)((intptr_t)function_pointer); + glPrioritizeTextures(n, textures_address, priorities_address); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL11_nglAreTexturesResident(JNIEnv *env, jclass clazz, jint n, jlong textures, jlong residences, jlong function_pointer) { + const GLuint *textures_address = (const GLuint *)(intptr_t)textures; + GLboolean *residences_address = (GLboolean *)(intptr_t)residences; + glAreTexturesResidentPROC glAreTexturesResident = (glAreTexturesResidentPROC)((intptr_t)function_pointer); + GLboolean __result = glAreTexturesResident(n, textures_address, residences_address); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglBegin(JNIEnv *env, jclass clazz, jint mode, jlong function_pointer) { + glBeginPROC glBegin = (glBeginPROC)((intptr_t)function_pointer); + glBegin(mode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglEnd(JNIEnv *env, jclass clazz, jlong function_pointer) { + glEndPROC glEnd = (glEndPROC)((intptr_t)function_pointer); + glEnd(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglArrayElement(JNIEnv *env, jclass clazz, jint i, jlong function_pointer) { + glArrayElementPROC glArrayElement = (glArrayElementPROC)((intptr_t)function_pointer); + glArrayElement(i); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglClearDepth(JNIEnv *env, jclass clazz, jdouble depth, jlong function_pointer) { + glClearDepthPROC glClearDepth = (glClearDepthPROC)((intptr_t)function_pointer); + glClearDepth(depth); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglDeleteLists(JNIEnv *env, jclass clazz, jint list, jint range, jlong function_pointer) { + glDeleteListsPROC glDeleteLists = (glDeleteListsPROC)((intptr_t)function_pointer); + glDeleteLists(list, range); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglDeleteTextures(JNIEnv *env, jclass clazz, jint n, jlong textures, jlong function_pointer) { + const GLuint *textures_address = (const GLuint *)(intptr_t)textures; + glDeleteTexturesPROC glDeleteTextures = (glDeleteTexturesPROC)((intptr_t)function_pointer); + glDeleteTextures(n, textures_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglCullFace(JNIEnv *env, jclass clazz, jint mode, jlong function_pointer) { + glCullFacePROC glCullFace = (glCullFacePROC)((intptr_t)function_pointer); + glCullFace(mode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglCopyTexSubImage2D(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint x, jint y, jint width, jint height, jlong function_pointer) { + glCopyTexSubImage2DPROC glCopyTexSubImage2D = (glCopyTexSubImage2DPROC)((intptr_t)function_pointer); + glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglCopyTexSubImage1D(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint x, jint y, jint width, jlong function_pointer) { + glCopyTexSubImage1DPROC glCopyTexSubImage1D = (glCopyTexSubImage1DPROC)((intptr_t)function_pointer); + glCopyTexSubImage1D(target, level, xoffset, x, y, width); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglCopyTexImage2D(JNIEnv *env, jclass clazz, jint target, jint level, jint internalFormat, jint x, jint y, jint width, jint height, jint border, jlong function_pointer) { + glCopyTexImage2DPROC glCopyTexImage2D = (glCopyTexImage2DPROC)((intptr_t)function_pointer); + glCopyTexImage2D(target, level, internalFormat, x, y, width, height, border); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglCopyTexImage1D(JNIEnv *env, jclass clazz, jint target, jint level, jint internalFormat, jint x, jint y, jint width, jint border, jlong function_pointer) { + glCopyTexImage1DPROC glCopyTexImage1D = (glCopyTexImage1DPROC)((intptr_t)function_pointer); + glCopyTexImage1D(target, level, internalFormat, x, y, width, border); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglCopyPixels(JNIEnv *env, jclass clazz, jint x, jint y, jint width, jint height, jint type, jlong function_pointer) { + glCopyPixelsPROC glCopyPixels = (glCopyPixelsPROC)((intptr_t)function_pointer); + glCopyPixels(x, y, width, height, type); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglColorPointer(JNIEnv *env, jclass clazz, jint size, jint type, jint stride, jlong pointer, jlong function_pointer) { + const GLvoid *pointer_address = (const GLvoid *)(intptr_t)pointer; + glColorPointerPROC glColorPointer = (glColorPointerPROC)((intptr_t)function_pointer); + glColorPointer(size, type, stride, pointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglColorPointerBO(JNIEnv *env, jclass clazz, jint size, jint type, jint stride, jlong pointer_buffer_offset, jlong function_pointer) { + const GLvoid *pointer_address = (const GLvoid *)(intptr_t)offsetToPointer(pointer_buffer_offset); + glColorPointerPROC glColorPointer = (glColorPointerPROC)((intptr_t)function_pointer); + glColorPointer(size, type, stride, pointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglColorMaterial(JNIEnv *env, jclass clazz, jint face, jint mode, jlong function_pointer) { + glColorMaterialPROC glColorMaterial = (glColorMaterialPROC)((intptr_t)function_pointer); + glColorMaterial(face, mode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglColorMask(JNIEnv *env, jclass clazz, jboolean red, jboolean green, jboolean blue, jboolean alpha, jlong function_pointer) { + glColorMaskPROC glColorMask = (glColorMaskPROC)((intptr_t)function_pointer); + glColorMask(red, green, blue, alpha); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglColor3b(JNIEnv *env, jclass clazz, jbyte red, jbyte green, jbyte blue, jlong function_pointer) { + glColor3bPROC glColor3b = (glColor3bPROC)((intptr_t)function_pointer); + glColor3b(red, green, blue); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglColor3f(JNIEnv *env, jclass clazz, jfloat red, jfloat green, jfloat blue, jlong function_pointer) { + glColor3fPROC glColor3f = (glColor3fPROC)((intptr_t)function_pointer); + glColor3f(red, green, blue); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglColor3d(JNIEnv *env, jclass clazz, jdouble red, jdouble green, jdouble blue, jlong function_pointer) { + glColor3dPROC glColor3d = (glColor3dPROC)((intptr_t)function_pointer); + glColor3d(red, green, blue); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglColor3ub(JNIEnv *env, jclass clazz, jbyte red, jbyte green, jbyte blue, jlong function_pointer) { + glColor3ubPROC glColor3ub = (glColor3ubPROC)((intptr_t)function_pointer); + glColor3ub(red, green, blue); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglColor4b(JNIEnv *env, jclass clazz, jbyte red, jbyte green, jbyte blue, jbyte alpha, jlong function_pointer) { + glColor4bPROC glColor4b = (glColor4bPROC)((intptr_t)function_pointer); + glColor4b(red, green, blue, alpha); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglColor4f(JNIEnv *env, jclass clazz, jfloat red, jfloat green, jfloat blue, jfloat alpha, jlong function_pointer) { + glColor4fPROC glColor4f = (glColor4fPROC)((intptr_t)function_pointer); + glColor4f(red, green, blue, alpha); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglColor4d(JNIEnv *env, jclass clazz, jdouble red, jdouble green, jdouble blue, jdouble alpha, jlong function_pointer) { + glColor4dPROC glColor4d = (glColor4dPROC)((intptr_t)function_pointer); + glColor4d(red, green, blue, alpha); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglColor4ub(JNIEnv *env, jclass clazz, jbyte red, jbyte green, jbyte blue, jbyte alpha, jlong function_pointer) { + glColor4ubPROC glColor4ub = (glColor4ubPROC)((intptr_t)function_pointer); + glColor4ub(red, green, blue, alpha); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglClipPlane(JNIEnv *env, jclass clazz, jint plane, jlong equation, jlong function_pointer) { + const GLdouble *equation_address = (const GLdouble *)(intptr_t)equation; + glClipPlanePROC glClipPlane = (glClipPlanePROC)((intptr_t)function_pointer); + glClipPlane(plane, equation_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglClearStencil(JNIEnv *env, jclass clazz, jint s, jlong function_pointer) { + glClearStencilPROC glClearStencil = (glClearStencilPROC)((intptr_t)function_pointer); + glClearStencil(s); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglEvalPoint1(JNIEnv *env, jclass clazz, jint i, jlong function_pointer) { + glEvalPoint1PROC glEvalPoint1 = (glEvalPoint1PROC)((intptr_t)function_pointer); + glEvalPoint1(i); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglEvalPoint2(JNIEnv *env, jclass clazz, jint i, jint j, jlong function_pointer) { + glEvalPoint2PROC glEvalPoint2 = (glEvalPoint2PROC)((intptr_t)function_pointer); + glEvalPoint2(i, j); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglEvalMesh1(JNIEnv *env, jclass clazz, jint mode, jint i1, jint i2, jlong function_pointer) { + glEvalMesh1PROC glEvalMesh1 = (glEvalMesh1PROC)((intptr_t)function_pointer); + glEvalMesh1(mode, i1, i2); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglEvalMesh2(JNIEnv *env, jclass clazz, jint mode, jint i1, jint i2, jint j1, jint j2, jlong function_pointer) { + glEvalMesh2PROC glEvalMesh2 = (glEvalMesh2PROC)((intptr_t)function_pointer); + glEvalMesh2(mode, i1, i2, j1, j2); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglEvalCoord1f(JNIEnv *env, jclass clazz, jfloat u, jlong function_pointer) { + glEvalCoord1fPROC glEvalCoord1f = (glEvalCoord1fPROC)((intptr_t)function_pointer); + glEvalCoord1f(u); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglEvalCoord1d(JNIEnv *env, jclass clazz, jdouble u, jlong function_pointer) { + glEvalCoord1dPROC glEvalCoord1d = (glEvalCoord1dPROC)((intptr_t)function_pointer); + glEvalCoord1d(u); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglEvalCoord2f(JNIEnv *env, jclass clazz, jfloat u, jfloat v, jlong function_pointer) { + glEvalCoord2fPROC glEvalCoord2f = (glEvalCoord2fPROC)((intptr_t)function_pointer); + glEvalCoord2f(u, v); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglEvalCoord2d(JNIEnv *env, jclass clazz, jdouble u, jdouble v, jlong function_pointer) { + glEvalCoord2dPROC glEvalCoord2d = (glEvalCoord2dPROC)((intptr_t)function_pointer); + glEvalCoord2d(u, v); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglEnableClientState(JNIEnv *env, jclass clazz, jint cap, jlong function_pointer) { + glEnableClientStatePROC glEnableClientState = (glEnableClientStatePROC)((intptr_t)function_pointer); + glEnableClientState(cap); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglDisableClientState(JNIEnv *env, jclass clazz, jint cap, jlong function_pointer) { + glDisableClientStatePROC glDisableClientState = (glDisableClientStatePROC)((intptr_t)function_pointer); + glDisableClientState(cap); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglEnable(JNIEnv *env, jclass clazz, jint cap, jlong function_pointer) { + glEnablePROC glEnable = (glEnablePROC)((intptr_t)function_pointer); + glEnable(cap); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglDisable(JNIEnv *env, jclass clazz, jint cap, jlong function_pointer) { + glDisablePROC glDisable = (glDisablePROC)((intptr_t)function_pointer); + glDisable(cap); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglEdgeFlagPointer(JNIEnv *env, jclass clazz, jint stride, jlong pointer, jlong function_pointer) { + const GLvoid *pointer_address = (const GLvoid *)(intptr_t)pointer; + glEdgeFlagPointerPROC glEdgeFlagPointer = (glEdgeFlagPointerPROC)((intptr_t)function_pointer); + glEdgeFlagPointer(stride, pointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglEdgeFlagPointerBO(JNIEnv *env, jclass clazz, jint stride, jlong pointer_buffer_offset, jlong function_pointer) { + const GLvoid *pointer_address = (const GLvoid *)(intptr_t)offsetToPointer(pointer_buffer_offset); + glEdgeFlagPointerPROC glEdgeFlagPointer = (glEdgeFlagPointerPROC)((intptr_t)function_pointer); + glEdgeFlagPointer(stride, pointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglEdgeFlag(JNIEnv *env, jclass clazz, jboolean flag, jlong function_pointer) { + glEdgeFlagPROC glEdgeFlag = (glEdgeFlagPROC)((intptr_t)function_pointer); + glEdgeFlag(flag); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglDrawPixels(JNIEnv *env, jclass clazz, jint width, jint height, jint format, jint type, jlong pixels, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)pixels; + glDrawPixelsPROC glDrawPixels = (glDrawPixelsPROC)((intptr_t)function_pointer); + glDrawPixels(width, height, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglDrawPixelsBO(JNIEnv *env, jclass clazz, jint width, jint height, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)offsetToPointer(pixels_buffer_offset); + glDrawPixelsPROC glDrawPixels = (glDrawPixelsPROC)((intptr_t)function_pointer); + glDrawPixels(width, height, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglDrawElements(JNIEnv *env, jclass clazz, jint mode, jint count, jint type, jlong indices, jlong function_pointer) { + const GLvoid *indices_address = (const GLvoid *)(intptr_t)indices; + glDrawElementsPROC glDrawElements = (glDrawElementsPROC)((intptr_t)function_pointer); + glDrawElements(mode, count, type, indices_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglDrawElementsBO(JNIEnv *env, jclass clazz, jint mode, jint count, jint type, jlong indices_buffer_offset, jlong function_pointer) { + const GLvoid *indices_address = (const GLvoid *)(intptr_t)offsetToPointer(indices_buffer_offset); + glDrawElementsPROC glDrawElements = (glDrawElementsPROC)((intptr_t)function_pointer); + glDrawElements(mode, count, type, indices_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglDrawBuffer(JNIEnv *env, jclass clazz, jint mode, jlong function_pointer) { + glDrawBufferPROC glDrawBuffer = (glDrawBufferPROC)((intptr_t)function_pointer); + glDrawBuffer(mode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglDrawArrays(JNIEnv *env, jclass clazz, jint mode, jint first, jint count, jlong function_pointer) { + glDrawArraysPROC glDrawArrays = (glDrawArraysPROC)((intptr_t)function_pointer); + glDrawArrays(mode, first, count); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglDepthRange(JNIEnv *env, jclass clazz, jdouble zNear, jdouble zFar, jlong function_pointer) { + glDepthRangePROC glDepthRange = (glDepthRangePROC)((intptr_t)function_pointer); + glDepthRange(zNear, zFar); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglDepthMask(JNIEnv *env, jclass clazz, jboolean flag, jlong function_pointer) { + glDepthMaskPROC glDepthMask = (glDepthMaskPROC)((intptr_t)function_pointer); + glDepthMask(flag); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglDepthFunc(JNIEnv *env, jclass clazz, jint func, jlong function_pointer) { + glDepthFuncPROC glDepthFunc = (glDepthFuncPROC)((intptr_t)function_pointer); + glDepthFunc(func); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglFeedbackBuffer(JNIEnv *env, jclass clazz, jint size, jint type, jlong buffer, jlong function_pointer) { + GLfloat *buffer_address = (GLfloat *)(intptr_t)buffer; + glFeedbackBufferPROC glFeedbackBuffer = (glFeedbackBufferPROC)((intptr_t)function_pointer); + glFeedbackBuffer(size, type, buffer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetPixelMapfv(JNIEnv *env, jclass clazz, jint map, jlong values, jlong function_pointer) { + GLfloat *values_address = (GLfloat *)(intptr_t)values; + glGetPixelMapfvPROC glGetPixelMapfv = (glGetPixelMapfvPROC)((intptr_t)function_pointer); + glGetPixelMapfv(map, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetPixelMapfvBO(JNIEnv *env, jclass clazz, jint map, jlong values_buffer_offset, jlong function_pointer) { + GLfloat *values_address = (GLfloat *)(intptr_t)offsetToPointer(values_buffer_offset); + glGetPixelMapfvPROC glGetPixelMapfv = (glGetPixelMapfvPROC)((intptr_t)function_pointer); + glGetPixelMapfv(map, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetPixelMapuiv(JNIEnv *env, jclass clazz, jint map, jlong values, jlong function_pointer) { + GLuint *values_address = (GLuint *)(intptr_t)values; + glGetPixelMapuivPROC glGetPixelMapuiv = (glGetPixelMapuivPROC)((intptr_t)function_pointer); + glGetPixelMapuiv(map, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetPixelMapuivBO(JNIEnv *env, jclass clazz, jint map, jlong values_buffer_offset, jlong function_pointer) { + GLuint *values_address = (GLuint *)(intptr_t)offsetToPointer(values_buffer_offset); + glGetPixelMapuivPROC glGetPixelMapuiv = (glGetPixelMapuivPROC)((intptr_t)function_pointer); + glGetPixelMapuiv(map, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetPixelMapusv(JNIEnv *env, jclass clazz, jint map, jlong values, jlong function_pointer) { + GLushort *values_address = (GLushort *)(intptr_t)values; + glGetPixelMapusvPROC glGetPixelMapusv = (glGetPixelMapusvPROC)((intptr_t)function_pointer); + glGetPixelMapusv(map, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetPixelMapusvBO(JNIEnv *env, jclass clazz, jint map, jlong values_buffer_offset, jlong function_pointer) { + GLushort *values_address = (GLushort *)(intptr_t)offsetToPointer(values_buffer_offset); + glGetPixelMapusvPROC glGetPixelMapusv = (glGetPixelMapusvPROC)((intptr_t)function_pointer); + glGetPixelMapusv(map, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetMaterialfv(JNIEnv *env, jclass clazz, jint face, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetMaterialfvPROC glGetMaterialfv = (glGetMaterialfvPROC)((intptr_t)function_pointer); + glGetMaterialfv(face, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetMaterialiv(JNIEnv *env, jclass clazz, jint face, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetMaterialivPROC glGetMaterialiv = (glGetMaterialivPROC)((intptr_t)function_pointer); + glGetMaterialiv(face, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetMapfv(JNIEnv *env, jclass clazz, jint target, jint query, jlong v, jlong function_pointer) { + GLfloat *v_address = (GLfloat *)(intptr_t)v; + glGetMapfvPROC glGetMapfv = (glGetMapfvPROC)((intptr_t)function_pointer); + glGetMapfv(target, query, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetMapdv(JNIEnv *env, jclass clazz, jint target, jint query, jlong v, jlong function_pointer) { + GLdouble *v_address = (GLdouble *)(intptr_t)v; + glGetMapdvPROC glGetMapdv = (glGetMapdvPROC)((intptr_t)function_pointer); + glGetMapdv(target, query, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetMapiv(JNIEnv *env, jclass clazz, jint target, jint query, jlong v, jlong function_pointer) { + GLint *v_address = (GLint *)(intptr_t)v; + glGetMapivPROC glGetMapiv = (glGetMapivPROC)((intptr_t)function_pointer); + glGetMapiv(target, query, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetLightfv(JNIEnv *env, jclass clazz, jint light, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetLightfvPROC glGetLightfv = (glGetLightfvPROC)((intptr_t)function_pointer); + glGetLightfv(light, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetLightiv(JNIEnv *env, jclass clazz, jint light, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetLightivPROC glGetLightiv = (glGetLightivPROC)((intptr_t)function_pointer); + glGetLightiv(light, pname, params_address); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL11_nglGetError(JNIEnv *env, jclass clazz, jlong function_pointer) { + glGetErrorPROC glGetError = (glGetErrorPROC)((intptr_t)function_pointer); + GLint __result = glGetError(); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetClipPlane(JNIEnv *env, jclass clazz, jint plane, jlong equation, jlong function_pointer) { + GLdouble *equation_address = (GLdouble *)(intptr_t)equation; + glGetClipPlanePROC glGetClipPlane = (glGetClipPlanePROC)((intptr_t)function_pointer); + glGetClipPlane(plane, equation_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetBooleanv(JNIEnv *env, jclass clazz, jint pname, jlong params, jlong function_pointer) { + GLboolean *params_address = (GLboolean *)(intptr_t)params; + glGetBooleanvPROC glGetBooleanv = (glGetBooleanvPROC)((intptr_t)function_pointer); + glGetBooleanv(pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetDoublev(JNIEnv *env, jclass clazz, jint pname, jlong params, jlong function_pointer) { + GLdouble *params_address = (GLdouble *)(intptr_t)params; + glGetDoublevPROC glGetDoublev = (glGetDoublevPROC)((intptr_t)function_pointer); + glGetDoublev(pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetFloatv(JNIEnv *env, jclass clazz, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetFloatvPROC glGetFloatv = (glGetFloatvPROC)((intptr_t)function_pointer); + glGetFloatv(pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetIntegerv(JNIEnv *env, jclass clazz, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetIntegervPROC glGetIntegerv = (glGetIntegervPROC)((intptr_t)function_pointer); + glGetIntegerv(pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGenTextures(JNIEnv *env, jclass clazz, jint n, jlong textures, jlong function_pointer) { + GLuint *textures_address = (GLuint *)(intptr_t)textures; + glGenTexturesPROC glGenTextures = (glGenTexturesPROC)((intptr_t)function_pointer); + glGenTextures(n, textures_address); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL11_nglGenLists(JNIEnv *env, jclass clazz, jint range, jlong function_pointer) { + glGenListsPROC glGenLists = (glGenListsPROC)((intptr_t)function_pointer); + GLuint __result = glGenLists(range); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglFrustum(JNIEnv *env, jclass clazz, jdouble left, jdouble right, jdouble bottom, jdouble top, jdouble zNear, jdouble zFar, jlong function_pointer) { + glFrustumPROC glFrustum = (glFrustumPROC)((intptr_t)function_pointer); + glFrustum(left, right, bottom, top, zNear, zFar); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglFrontFace(JNIEnv *env, jclass clazz, jint mode, jlong function_pointer) { + glFrontFacePROC glFrontFace = (glFrontFacePROC)((intptr_t)function_pointer); + glFrontFace(mode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglFogf(JNIEnv *env, jclass clazz, jint pname, jfloat param, jlong function_pointer) { + glFogfPROC glFogf = (glFogfPROC)((intptr_t)function_pointer); + glFogf(pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglFogi(JNIEnv *env, jclass clazz, jint pname, jint param, jlong function_pointer) { + glFogiPROC glFogi = (glFogiPROC)((intptr_t)function_pointer); + glFogi(pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglFogfv(JNIEnv *env, jclass clazz, jint pname, jlong params, jlong function_pointer) { + const GLfloat *params_address = (const GLfloat *)(intptr_t)params; + glFogfvPROC glFogfv = (glFogfvPROC)((intptr_t)function_pointer); + glFogfv(pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglFogiv(JNIEnv *env, jclass clazz, jint pname, jlong params, jlong function_pointer) { + const GLint *params_address = (const GLint *)(intptr_t)params; + glFogivPROC glFogiv = (glFogivPROC)((intptr_t)function_pointer); + glFogiv(pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglFlush(JNIEnv *env, jclass clazz, jlong function_pointer) { + glFlushPROC glFlush = (glFlushPROC)((intptr_t)function_pointer); + glFlush(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglFinish(JNIEnv *env, jclass clazz, jlong function_pointer) { + glFinishPROC glFinish = (glFinishPROC)((intptr_t)function_pointer); + glFinish(); +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_GL11_nglGetPointerv(JNIEnv *env, jclass clazz, jint pname, jlong result_size, jlong function_pointer) { + glGetPointervPROC glGetPointerv = (glGetPointervPROC)((intptr_t)function_pointer); + GLvoid * __result; + glGetPointerv(pname, &__result); + return safeNewBuffer(env, __result, result_size); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL11_nglIsEnabled(JNIEnv *env, jclass clazz, jint cap, jlong function_pointer) { + glIsEnabledPROC glIsEnabled = (glIsEnabledPROC)((intptr_t)function_pointer); + GLboolean __result = glIsEnabled(cap); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglInterleavedArrays(JNIEnv *env, jclass clazz, jint format, jint stride, jlong pointer, jlong function_pointer) { + const GLvoid *pointer_address = (const GLvoid *)(intptr_t)pointer; + glInterleavedArraysPROC glInterleavedArrays = (glInterleavedArraysPROC)((intptr_t)function_pointer); + glInterleavedArrays(format, stride, pointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglInterleavedArraysBO(JNIEnv *env, jclass clazz, jint format, jint stride, jlong pointer_buffer_offset, jlong function_pointer) { + const GLvoid *pointer_address = (const GLvoid *)(intptr_t)offsetToPointer(pointer_buffer_offset); + glInterleavedArraysPROC glInterleavedArrays = (glInterleavedArraysPROC)((intptr_t)function_pointer); + glInterleavedArrays(format, stride, pointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglInitNames(JNIEnv *env, jclass clazz, jlong function_pointer) { + glInitNamesPROC glInitNames = (glInitNamesPROC)((intptr_t)function_pointer); + glInitNames(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglHint(JNIEnv *env, jclass clazz, jint target, jint mode, jlong function_pointer) { + glHintPROC glHint = (glHintPROC)((intptr_t)function_pointer); + glHint(target, mode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetTexParameterfv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetTexParameterfvPROC glGetTexParameterfv = (glGetTexParameterfvPROC)((intptr_t)function_pointer); + glGetTexParameterfv(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetTexParameteriv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetTexParameterivPROC glGetTexParameteriv = (glGetTexParameterivPROC)((intptr_t)function_pointer); + glGetTexParameteriv(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetTexLevelParameterfv(JNIEnv *env, jclass clazz, jint target, jint level, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetTexLevelParameterfvPROC glGetTexLevelParameterfv = (glGetTexLevelParameterfvPROC)((intptr_t)function_pointer); + glGetTexLevelParameterfv(target, level, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetTexLevelParameteriv(JNIEnv *env, jclass clazz, jint target, jint level, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetTexLevelParameterivPROC glGetTexLevelParameteriv = (glGetTexLevelParameterivPROC)((intptr_t)function_pointer); + glGetTexLevelParameteriv(target, level, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetTexImage(JNIEnv *env, jclass clazz, jint target, jint level, jint format, jint type, jlong pixels, jlong function_pointer) { + GLvoid *pixels_address = (GLvoid *)(intptr_t)pixels; + glGetTexImagePROC glGetTexImage = (glGetTexImagePROC)((intptr_t)function_pointer); + glGetTexImage(target, level, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetTexImageBO(JNIEnv *env, jclass clazz, jint target, jint level, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer) { + GLvoid *pixels_address = (GLvoid *)(intptr_t)offsetToPointer(pixels_buffer_offset); + glGetTexImagePROC glGetTexImage = (glGetTexImagePROC)((intptr_t)function_pointer); + glGetTexImage(target, level, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetTexGeniv(JNIEnv *env, jclass clazz, jint coord, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetTexGenivPROC glGetTexGeniv = (glGetTexGenivPROC)((intptr_t)function_pointer); + glGetTexGeniv(coord, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetTexGenfv(JNIEnv *env, jclass clazz, jint coord, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetTexGenfvPROC glGetTexGenfv = (glGetTexGenfvPROC)((intptr_t)function_pointer); + glGetTexGenfv(coord, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetTexGendv(JNIEnv *env, jclass clazz, jint coord, jint pname, jlong params, jlong function_pointer) { + GLdouble *params_address = (GLdouble *)(intptr_t)params; + glGetTexGendvPROC glGetTexGendv = (glGetTexGendvPROC)((intptr_t)function_pointer); + glGetTexGendv(coord, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetTexEnviv(JNIEnv *env, jclass clazz, jint coord, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetTexEnvivPROC glGetTexEnviv = (glGetTexEnvivPROC)((intptr_t)function_pointer); + glGetTexEnviv(coord, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetTexEnvfv(JNIEnv *env, jclass clazz, jint coord, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetTexEnvfvPROC glGetTexEnvfv = (glGetTexEnvfvPROC)((intptr_t)function_pointer); + glGetTexEnvfv(coord, pname, params_address); +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_GL11_nglGetString(JNIEnv *env, jclass clazz, jint name, jlong function_pointer) { + glGetStringPROC glGetString = (glGetStringPROC)((intptr_t)function_pointer); + const GLubyte * __result = glGetString(name); + return NewStringNativeUnsigned(env, __result); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetPolygonStipple(JNIEnv *env, jclass clazz, jlong mask, jlong function_pointer) { + GLubyte *mask_address = (GLubyte *)(intptr_t)mask; + glGetPolygonStipplePROC glGetPolygonStipple = (glGetPolygonStipplePROC)((intptr_t)function_pointer); + glGetPolygonStipple(mask_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglGetPolygonStippleBO(JNIEnv *env, jclass clazz, jlong mask_buffer_offset, jlong function_pointer) { + GLubyte *mask_address = (GLubyte *)(intptr_t)offsetToPointer(mask_buffer_offset); + glGetPolygonStipplePROC glGetPolygonStipple = (glGetPolygonStipplePROC)((intptr_t)function_pointer); + glGetPolygonStipple(mask_address); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL11_nglIsList(JNIEnv *env, jclass clazz, jint list, jlong function_pointer) { + glIsListPROC glIsList = (glIsListPROC)((intptr_t)function_pointer); + GLboolean __result = glIsList(list); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglMaterialf(JNIEnv *env, jclass clazz, jint face, jint pname, jfloat param, jlong function_pointer) { + glMaterialfPROC glMaterialf = (glMaterialfPROC)((intptr_t)function_pointer); + glMaterialf(face, pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglMateriali(JNIEnv *env, jclass clazz, jint face, jint pname, jint param, jlong function_pointer) { + glMaterialiPROC glMateriali = (glMaterialiPROC)((intptr_t)function_pointer); + glMateriali(face, pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglMaterialfv(JNIEnv *env, jclass clazz, jint face, jint pname, jlong params, jlong function_pointer) { + const GLfloat *params_address = (const GLfloat *)(intptr_t)params; + glMaterialfvPROC glMaterialfv = (glMaterialfvPROC)((intptr_t)function_pointer); + glMaterialfv(face, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglMaterialiv(JNIEnv *env, jclass clazz, jint face, jint pname, jlong params, jlong function_pointer) { + const GLint *params_address = (const GLint *)(intptr_t)params; + glMaterialivPROC glMaterialiv = (glMaterialivPROC)((intptr_t)function_pointer); + glMaterialiv(face, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglMapGrid1f(JNIEnv *env, jclass clazz, jint un, jfloat u1, jfloat u2, jlong function_pointer) { + glMapGrid1fPROC glMapGrid1f = (glMapGrid1fPROC)((intptr_t)function_pointer); + glMapGrid1f(un, u1, u2); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglMapGrid1d(JNIEnv *env, jclass clazz, jint un, jdouble u1, jdouble u2, jlong function_pointer) { + glMapGrid1dPROC glMapGrid1d = (glMapGrid1dPROC)((intptr_t)function_pointer); + glMapGrid1d(un, u1, u2); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglMapGrid2f(JNIEnv *env, jclass clazz, jint un, jfloat u1, jfloat u2, jint vn, jfloat v1, jfloat v2, jlong function_pointer) { + glMapGrid2fPROC glMapGrid2f = (glMapGrid2fPROC)((intptr_t)function_pointer); + glMapGrid2f(un, u1, u2, vn, v1, v2); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglMapGrid2d(JNIEnv *env, jclass clazz, jint un, jdouble u1, jdouble u2, jint vn, jdouble v1, jdouble v2, jlong function_pointer) { + glMapGrid2dPROC glMapGrid2d = (glMapGrid2dPROC)((intptr_t)function_pointer); + glMapGrid2d(un, u1, u2, vn, v1, v2); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglMap2f(JNIEnv *env, jclass clazz, jint target, jfloat u1, jfloat u2, jint ustride, jint uorder, jfloat v1, jfloat v2, jint vstride, jint vorder, jlong points, jlong function_pointer) { + const GLfloat *points_address = (const GLfloat *)(intptr_t)points; + glMap2fPROC glMap2f = (glMap2fPROC)((intptr_t)function_pointer); + glMap2f(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglMap2d(JNIEnv *env, jclass clazz, jint target, jdouble u1, jdouble u2, jint ustride, jint uorder, jdouble v1, jdouble v2, jint vstride, jint vorder, jlong points, jlong function_pointer) { + const GLdouble *points_address = (const GLdouble *)(intptr_t)points; + glMap2dPROC glMap2d = (glMap2dPROC)((intptr_t)function_pointer); + glMap2d(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, points_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglMap1f(JNIEnv *env, jclass clazz, jint target, jfloat u1, jfloat u2, jint stride, jint order, jlong points, jlong function_pointer) { + const GLfloat *points_address = (const GLfloat *)(intptr_t)points; + glMap1fPROC glMap1f = (glMap1fPROC)((intptr_t)function_pointer); + glMap1f(target, u1, u2, stride, order, points_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglMap1d(JNIEnv *env, jclass clazz, jint target, jdouble u1, jdouble u2, jint stride, jint order, jlong points, jlong function_pointer) { + const GLdouble *points_address = (const GLdouble *)(intptr_t)points; + glMap1dPROC glMap1d = (glMap1dPROC)((intptr_t)function_pointer); + glMap1d(target, u1, u2, stride, order, points_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglLogicOp(JNIEnv *env, jclass clazz, jint opcode, jlong function_pointer) { + glLogicOpPROC glLogicOp = (glLogicOpPROC)((intptr_t)function_pointer); + glLogicOp(opcode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglLoadName(JNIEnv *env, jclass clazz, jint name, jlong function_pointer) { + glLoadNamePROC glLoadName = (glLoadNamePROC)((intptr_t)function_pointer); + glLoadName(name); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglLoadMatrixf(JNIEnv *env, jclass clazz, jlong m, jlong function_pointer) { + const GLfloat *m_address = (const GLfloat *)(intptr_t)m; + glLoadMatrixfPROC glLoadMatrixf = (glLoadMatrixfPROC)((intptr_t)function_pointer); + glLoadMatrixf(m_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglLoadMatrixd(JNIEnv *env, jclass clazz, jlong m, jlong function_pointer) { + const GLdouble *m_address = (const GLdouble *)(intptr_t)m; + glLoadMatrixdPROC glLoadMatrixd = (glLoadMatrixdPROC)((intptr_t)function_pointer); + glLoadMatrixd(m_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglLoadIdentity(JNIEnv *env, jclass clazz, jlong function_pointer) { + glLoadIdentityPROC glLoadIdentity = (glLoadIdentityPROC)((intptr_t)function_pointer); + glLoadIdentity(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglListBase(JNIEnv *env, jclass clazz, jint base, jlong function_pointer) { + glListBasePROC glListBase = (glListBasePROC)((intptr_t)function_pointer); + glListBase(base); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglLineWidth(JNIEnv *env, jclass clazz, jfloat width, jlong function_pointer) { + glLineWidthPROC glLineWidth = (glLineWidthPROC)((intptr_t)function_pointer); + glLineWidth(width); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglLineStipple(JNIEnv *env, jclass clazz, jint factor, jshort pattern, jlong function_pointer) { + glLineStipplePROC glLineStipple = (glLineStipplePROC)((intptr_t)function_pointer); + glLineStipple(factor, pattern); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglLightModelf(JNIEnv *env, jclass clazz, jint pname, jfloat param, jlong function_pointer) { + glLightModelfPROC glLightModelf = (glLightModelfPROC)((intptr_t)function_pointer); + glLightModelf(pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglLightModeli(JNIEnv *env, jclass clazz, jint pname, jint param, jlong function_pointer) { + glLightModeliPROC glLightModeli = (glLightModeliPROC)((intptr_t)function_pointer); + glLightModeli(pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglLightModelfv(JNIEnv *env, jclass clazz, jint pname, jlong params, jlong function_pointer) { + const GLfloat *params_address = (const GLfloat *)(intptr_t)params; + glLightModelfvPROC glLightModelfv = (glLightModelfvPROC)((intptr_t)function_pointer); + glLightModelfv(pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglLightModeliv(JNIEnv *env, jclass clazz, jint pname, jlong params, jlong function_pointer) { + const GLint *params_address = (const GLint *)(intptr_t)params; + glLightModelivPROC glLightModeliv = (glLightModelivPROC)((intptr_t)function_pointer); + glLightModeliv(pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglLightf(JNIEnv *env, jclass clazz, jint light, jint pname, jfloat param, jlong function_pointer) { + glLightfPROC glLightf = (glLightfPROC)((intptr_t)function_pointer); + glLightf(light, pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglLighti(JNIEnv *env, jclass clazz, jint light, jint pname, jint param, jlong function_pointer) { + glLightiPROC glLighti = (glLightiPROC)((intptr_t)function_pointer); + glLighti(light, pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglLightfv(JNIEnv *env, jclass clazz, jint light, jint pname, jlong params, jlong function_pointer) { + const GLfloat *params_address = (const GLfloat *)(intptr_t)params; + glLightfvPROC glLightfv = (glLightfvPROC)((intptr_t)function_pointer); + glLightfv(light, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglLightiv(JNIEnv *env, jclass clazz, jint light, jint pname, jlong params, jlong function_pointer) { + const GLint *params_address = (const GLint *)(intptr_t)params; + glLightivPROC glLightiv = (glLightivPROC)((intptr_t)function_pointer); + glLightiv(light, pname, params_address); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL11_nglIsTexture(JNIEnv *env, jclass clazz, jint texture, jlong function_pointer) { + glIsTexturePROC glIsTexture = (glIsTexturePROC)((intptr_t)function_pointer); + GLboolean __result = glIsTexture(texture); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglMatrixMode(JNIEnv *env, jclass clazz, jint mode, jlong function_pointer) { + glMatrixModePROC glMatrixMode = (glMatrixModePROC)((intptr_t)function_pointer); + glMatrixMode(mode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPolygonStipple(JNIEnv *env, jclass clazz, jlong mask, jlong function_pointer) { + const GLubyte *mask_address = (const GLubyte *)(intptr_t)mask; + glPolygonStipplePROC glPolygonStipple = (glPolygonStipplePROC)((intptr_t)function_pointer); + glPolygonStipple(mask_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPolygonStippleBO(JNIEnv *env, jclass clazz, jlong mask_buffer_offset, jlong function_pointer) { + const GLubyte *mask_address = (const GLubyte *)(intptr_t)offsetToPointer(mask_buffer_offset); + glPolygonStipplePROC glPolygonStipple = (glPolygonStipplePROC)((intptr_t)function_pointer); + glPolygonStipple(mask_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPolygonOffset(JNIEnv *env, jclass clazz, jfloat factor, jfloat units, jlong function_pointer) { + glPolygonOffsetPROC glPolygonOffset = (glPolygonOffsetPROC)((intptr_t)function_pointer); + glPolygonOffset(factor, units); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPolygonMode(JNIEnv *env, jclass clazz, jint face, jint mode, jlong function_pointer) { + glPolygonModePROC glPolygonMode = (glPolygonModePROC)((intptr_t)function_pointer); + glPolygonMode(face, mode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPointSize(JNIEnv *env, jclass clazz, jfloat size, jlong function_pointer) { + glPointSizePROC glPointSize = (glPointSizePROC)((intptr_t)function_pointer); + glPointSize(size); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPixelZoom(JNIEnv *env, jclass clazz, jfloat xfactor, jfloat yfactor, jlong function_pointer) { + glPixelZoomPROC glPixelZoom = (glPixelZoomPROC)((intptr_t)function_pointer); + glPixelZoom(xfactor, yfactor); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPixelTransferf(JNIEnv *env, jclass clazz, jint pname, jfloat param, jlong function_pointer) { + glPixelTransferfPROC glPixelTransferf = (glPixelTransferfPROC)((intptr_t)function_pointer); + glPixelTransferf(pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPixelTransferi(JNIEnv *env, jclass clazz, jint pname, jint param, jlong function_pointer) { + glPixelTransferiPROC glPixelTransferi = (glPixelTransferiPROC)((intptr_t)function_pointer); + glPixelTransferi(pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPixelStoref(JNIEnv *env, jclass clazz, jint pname, jfloat param, jlong function_pointer) { + glPixelStorefPROC glPixelStoref = (glPixelStorefPROC)((intptr_t)function_pointer); + glPixelStoref(pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPixelStorei(JNIEnv *env, jclass clazz, jint pname, jint param, jlong function_pointer) { + glPixelStoreiPROC glPixelStorei = (glPixelStoreiPROC)((intptr_t)function_pointer); + glPixelStorei(pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPixelMapfv(JNIEnv *env, jclass clazz, jint map, jint mapsize, jlong values, jlong function_pointer) { + const GLfloat *values_address = (const GLfloat *)(intptr_t)values; + glPixelMapfvPROC glPixelMapfv = (glPixelMapfvPROC)((intptr_t)function_pointer); + glPixelMapfv(map, mapsize, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPixelMapfvBO(JNIEnv *env, jclass clazz, jint map, jint mapsize, jlong values_buffer_offset, jlong function_pointer) { + const GLfloat *values_address = (const GLfloat *)(intptr_t)offsetToPointer(values_buffer_offset); + glPixelMapfvPROC glPixelMapfv = (glPixelMapfvPROC)((intptr_t)function_pointer); + glPixelMapfv(map, mapsize, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPixelMapuiv(JNIEnv *env, jclass clazz, jint map, jint mapsize, jlong values, jlong function_pointer) { + const GLuint *values_address = (const GLuint *)(intptr_t)values; + glPixelMapuivPROC glPixelMapuiv = (glPixelMapuivPROC)((intptr_t)function_pointer); + glPixelMapuiv(map, mapsize, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPixelMapuivBO(JNIEnv *env, jclass clazz, jint map, jint mapsize, jlong values_buffer_offset, jlong function_pointer) { + const GLuint *values_address = (const GLuint *)(intptr_t)offsetToPointer(values_buffer_offset); + glPixelMapuivPROC glPixelMapuiv = (glPixelMapuivPROC)((intptr_t)function_pointer); + glPixelMapuiv(map, mapsize, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPixelMapusv(JNIEnv *env, jclass clazz, jint map, jint mapsize, jlong values, jlong function_pointer) { + const GLushort *values_address = (const GLushort *)(intptr_t)values; + glPixelMapusvPROC glPixelMapusv = (glPixelMapusvPROC)((intptr_t)function_pointer); + glPixelMapusv(map, mapsize, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPixelMapusvBO(JNIEnv *env, jclass clazz, jint map, jint mapsize, jlong values_buffer_offset, jlong function_pointer) { + const GLushort *values_address = (const GLushort *)(intptr_t)offsetToPointer(values_buffer_offset); + glPixelMapusvPROC glPixelMapusv = (glPixelMapusvPROC)((intptr_t)function_pointer); + glPixelMapusv(map, mapsize, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPassThrough(JNIEnv *env, jclass clazz, jfloat token, jlong function_pointer) { + glPassThroughPROC glPassThrough = (glPassThroughPROC)((intptr_t)function_pointer); + glPassThrough(token); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglOrtho(JNIEnv *env, jclass clazz, jdouble left, jdouble right, jdouble bottom, jdouble top, jdouble zNear, jdouble zFar, jlong function_pointer) { + glOrthoPROC glOrtho = (glOrthoPROC)((intptr_t)function_pointer); + glOrtho(left, right, bottom, top, zNear, zFar); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglNormalPointer(JNIEnv *env, jclass clazz, jint type, jint stride, jlong pointer, jlong function_pointer) { + const GLvoid *pointer_address = (const GLvoid *)(intptr_t)pointer; + glNormalPointerPROC glNormalPointer = (glNormalPointerPROC)((intptr_t)function_pointer); + glNormalPointer(type, stride, pointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglNormalPointerBO(JNIEnv *env, jclass clazz, jint type, jint stride, jlong pointer_buffer_offset, jlong function_pointer) { + const GLvoid *pointer_address = (const GLvoid *)(intptr_t)offsetToPointer(pointer_buffer_offset); + glNormalPointerPROC glNormalPointer = (glNormalPointerPROC)((intptr_t)function_pointer); + glNormalPointer(type, stride, pointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglNormal3b(JNIEnv *env, jclass clazz, jbyte nx, jbyte ny, jbyte nz, jlong function_pointer) { + glNormal3bPROC glNormal3b = (glNormal3bPROC)((intptr_t)function_pointer); + glNormal3b(nx, ny, nz); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglNormal3f(JNIEnv *env, jclass clazz, jfloat nx, jfloat ny, jfloat nz, jlong function_pointer) { + glNormal3fPROC glNormal3f = (glNormal3fPROC)((intptr_t)function_pointer); + glNormal3f(nx, ny, nz); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglNormal3d(JNIEnv *env, jclass clazz, jdouble nx, jdouble ny, jdouble nz, jlong function_pointer) { + glNormal3dPROC glNormal3d = (glNormal3dPROC)((intptr_t)function_pointer); + glNormal3d(nx, ny, nz); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglNormal3i(JNIEnv *env, jclass clazz, jint nx, jint ny, jint nz, jlong function_pointer) { + glNormal3iPROC glNormal3i = (glNormal3iPROC)((intptr_t)function_pointer); + glNormal3i(nx, ny, nz); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglNewList(JNIEnv *env, jclass clazz, jint list, jint mode, jlong function_pointer) { + glNewListPROC glNewList = (glNewListPROC)((intptr_t)function_pointer); + glNewList(list, mode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglEndList(JNIEnv *env, jclass clazz, jlong function_pointer) { + glEndListPROC glEndList = (glEndListPROC)((intptr_t)function_pointer); + glEndList(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglMultMatrixf(JNIEnv *env, jclass clazz, jlong m, jlong function_pointer) { + const GLfloat *m_address = (const GLfloat *)(intptr_t)m; + glMultMatrixfPROC glMultMatrixf = (glMultMatrixfPROC)((intptr_t)function_pointer); + glMultMatrixf(m_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglMultMatrixd(JNIEnv *env, jclass clazz, jlong m, jlong function_pointer) { + const GLdouble *m_address = (const GLdouble *)(intptr_t)m; + glMultMatrixdPROC glMultMatrixd = (glMultMatrixdPROC)((intptr_t)function_pointer); + glMultMatrixd(m_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglShadeModel(JNIEnv *env, jclass clazz, jint mode, jlong function_pointer) { + glShadeModelPROC glShadeModel = (glShadeModelPROC)((intptr_t)function_pointer); + glShadeModel(mode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglSelectBuffer(JNIEnv *env, jclass clazz, jint size, jlong buffer, jlong function_pointer) { + GLuint *buffer_address = (GLuint *)(intptr_t)buffer; + glSelectBufferPROC glSelectBuffer = (glSelectBufferPROC)((intptr_t)function_pointer); + glSelectBuffer(size, buffer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglScissor(JNIEnv *env, jclass clazz, jint x, jint y, jint width, jint height, jlong function_pointer) { + glScissorPROC glScissor = (glScissorPROC)((intptr_t)function_pointer); + glScissor(x, y, width, height); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglScalef(JNIEnv *env, jclass clazz, jfloat x, jfloat y, jfloat z, jlong function_pointer) { + glScalefPROC glScalef = (glScalefPROC)((intptr_t)function_pointer); + glScalef(x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglScaled(JNIEnv *env, jclass clazz, jdouble x, jdouble y, jdouble z, jlong function_pointer) { + glScaledPROC glScaled = (glScaledPROC)((intptr_t)function_pointer); + glScaled(x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRotatef(JNIEnv *env, jclass clazz, jfloat angle, jfloat x, jfloat y, jfloat z, jlong function_pointer) { + glRotatefPROC glRotatef = (glRotatefPROC)((intptr_t)function_pointer); + glRotatef(angle, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRotated(JNIEnv *env, jclass clazz, jdouble angle, jdouble x, jdouble y, jdouble z, jlong function_pointer) { + glRotatedPROC glRotated = (glRotatedPROC)((intptr_t)function_pointer); + glRotated(angle, x, y, z); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL11_nglRenderMode(JNIEnv *env, jclass clazz, jint mode, jlong function_pointer) { + glRenderModePROC glRenderMode = (glRenderModePROC)((intptr_t)function_pointer); + GLint __result = glRenderMode(mode); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRectf(JNIEnv *env, jclass clazz, jfloat x1, jfloat y1, jfloat x2, jfloat y2, jlong function_pointer) { + glRectfPROC glRectf = (glRectfPROC)((intptr_t)function_pointer); + glRectf(x1, y1, x2, y2); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRectd(JNIEnv *env, jclass clazz, jdouble x1, jdouble y1, jdouble x2, jdouble y2, jlong function_pointer) { + glRectdPROC glRectd = (glRectdPROC)((intptr_t)function_pointer); + glRectd(x1, y1, x2, y2); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRecti(JNIEnv *env, jclass clazz, jint x1, jint y1, jint x2, jint y2, jlong function_pointer) { + glRectiPROC glRecti = (glRectiPROC)((intptr_t)function_pointer); + glRecti(x1, y1, x2, y2); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglReadPixels(JNIEnv *env, jclass clazz, jint x, jint y, jint width, jint height, jint format, jint type, jlong pixels, jlong function_pointer) { + GLvoid *pixels_address = (GLvoid *)(intptr_t)pixels; + glReadPixelsPROC glReadPixels = (glReadPixelsPROC)((intptr_t)function_pointer); + glReadPixels(x, y, width, height, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglReadPixelsBO(JNIEnv *env, jclass clazz, jint x, jint y, jint width, jint height, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer) { + GLvoid *pixels_address = (GLvoid *)(intptr_t)offsetToPointer(pixels_buffer_offset); + glReadPixelsPROC glReadPixels = (glReadPixelsPROC)((intptr_t)function_pointer); + glReadPixels(x, y, width, height, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglReadBuffer(JNIEnv *env, jclass clazz, jint mode, jlong function_pointer) { + glReadBufferPROC glReadBuffer = (glReadBufferPROC)((intptr_t)function_pointer); + glReadBuffer(mode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRasterPos2f(JNIEnv *env, jclass clazz, jfloat x, jfloat y, jlong function_pointer) { + glRasterPos2fPROC glRasterPos2f = (glRasterPos2fPROC)((intptr_t)function_pointer); + glRasterPos2f(x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRasterPos2d(JNIEnv *env, jclass clazz, jdouble x, jdouble y, jlong function_pointer) { + glRasterPos2dPROC glRasterPos2d = (glRasterPos2dPROC)((intptr_t)function_pointer); + glRasterPos2d(x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRasterPos2i(JNIEnv *env, jclass clazz, jint x, jint y, jlong function_pointer) { + glRasterPos2iPROC glRasterPos2i = (glRasterPos2iPROC)((intptr_t)function_pointer); + glRasterPos2i(x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRasterPos3f(JNIEnv *env, jclass clazz, jfloat x, jfloat y, jfloat z, jlong function_pointer) { + glRasterPos3fPROC glRasterPos3f = (glRasterPos3fPROC)((intptr_t)function_pointer); + glRasterPos3f(x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRasterPos3d(JNIEnv *env, jclass clazz, jdouble x, jdouble y, jdouble z, jlong function_pointer) { + glRasterPos3dPROC glRasterPos3d = (glRasterPos3dPROC)((intptr_t)function_pointer); + glRasterPos3d(x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRasterPos3i(JNIEnv *env, jclass clazz, jint x, jint y, jint z, jlong function_pointer) { + glRasterPos3iPROC glRasterPos3i = (glRasterPos3iPROC)((intptr_t)function_pointer); + glRasterPos3i(x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRasterPos4f(JNIEnv *env, jclass clazz, jfloat x, jfloat y, jfloat z, jfloat w, jlong function_pointer) { + glRasterPos4fPROC glRasterPos4f = (glRasterPos4fPROC)((intptr_t)function_pointer); + glRasterPos4f(x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRasterPos4d(JNIEnv *env, jclass clazz, jdouble x, jdouble y, jdouble z, jdouble w, jlong function_pointer) { + glRasterPos4dPROC glRasterPos4d = (glRasterPos4dPROC)((intptr_t)function_pointer); + glRasterPos4d(x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglRasterPos4i(JNIEnv *env, jclass clazz, jint x, jint y, jint z, jint w, jlong function_pointer) { + glRasterPos4iPROC glRasterPos4i = (glRasterPos4iPROC)((intptr_t)function_pointer); + glRasterPos4i(x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPushName(JNIEnv *env, jclass clazz, jint name, jlong function_pointer) { + glPushNamePROC glPushName = (glPushNamePROC)((intptr_t)function_pointer); + glPushName(name); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPopName(JNIEnv *env, jclass clazz, jlong function_pointer) { + glPopNamePROC glPopName = (glPopNamePROC)((intptr_t)function_pointer); + glPopName(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPushMatrix(JNIEnv *env, jclass clazz, jlong function_pointer) { + glPushMatrixPROC glPushMatrix = (glPushMatrixPROC)((intptr_t)function_pointer); + glPushMatrix(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPopMatrix(JNIEnv *env, jclass clazz, jlong function_pointer) { + glPopMatrixPROC glPopMatrix = (glPopMatrixPROC)((intptr_t)function_pointer); + glPopMatrix(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPushClientAttrib(JNIEnv *env, jclass clazz, jint mask, jlong function_pointer) { + glPushClientAttribPROC glPushClientAttrib = (glPushClientAttribPROC)((intptr_t)function_pointer); + glPushClientAttrib(mask); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPopClientAttrib(JNIEnv *env, jclass clazz, jlong function_pointer) { + glPopClientAttribPROC glPopClientAttrib = (glPopClientAttribPROC)((intptr_t)function_pointer); + glPopClientAttrib(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPushAttrib(JNIEnv *env, jclass clazz, jint mask, jlong function_pointer) { + glPushAttribPROC glPushAttrib = (glPushAttribPROC)((intptr_t)function_pointer); + glPushAttrib(mask); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglPopAttrib(JNIEnv *env, jclass clazz, jlong function_pointer) { + glPopAttribPROC glPopAttrib = (glPopAttribPROC)((intptr_t)function_pointer); + glPopAttrib(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglStencilFunc(JNIEnv *env, jclass clazz, jint func, jint ref, jint mask, jlong function_pointer) { + glStencilFuncPROC glStencilFunc = (glStencilFuncPROC)((intptr_t)function_pointer); + glStencilFunc(func, ref, mask); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglVertexPointer(JNIEnv *env, jclass clazz, jint size, jint type, jint stride, jlong pointer, jlong function_pointer) { + const GLvoid *pointer_address = (const GLvoid *)(intptr_t)pointer; + glVertexPointerPROC glVertexPointer = (glVertexPointerPROC)((intptr_t)function_pointer); + glVertexPointer(size, type, stride, pointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglVertexPointerBO(JNIEnv *env, jclass clazz, jint size, jint type, jint stride, jlong pointer_buffer_offset, jlong function_pointer) { + const GLvoid *pointer_address = (const GLvoid *)(intptr_t)offsetToPointer(pointer_buffer_offset); + glVertexPointerPROC glVertexPointer = (glVertexPointerPROC)((intptr_t)function_pointer); + glVertexPointer(size, type, stride, pointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglVertex2f(JNIEnv *env, jclass clazz, jfloat x, jfloat y, jlong function_pointer) { + glVertex2fPROC glVertex2f = (glVertex2fPROC)((intptr_t)function_pointer); + glVertex2f(x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglVertex2d(JNIEnv *env, jclass clazz, jdouble x, jdouble y, jlong function_pointer) { + glVertex2dPROC glVertex2d = (glVertex2dPROC)((intptr_t)function_pointer); + glVertex2d(x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglVertex2i(JNIEnv *env, jclass clazz, jint x, jint y, jlong function_pointer) { + glVertex2iPROC glVertex2i = (glVertex2iPROC)((intptr_t)function_pointer); + glVertex2i(x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglVertex3f(JNIEnv *env, jclass clazz, jfloat x, jfloat y, jfloat z, jlong function_pointer) { + glVertex3fPROC glVertex3f = (glVertex3fPROC)((intptr_t)function_pointer); + glVertex3f(x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglVertex3d(JNIEnv *env, jclass clazz, jdouble x, jdouble y, jdouble z, jlong function_pointer) { + glVertex3dPROC glVertex3d = (glVertex3dPROC)((intptr_t)function_pointer); + glVertex3d(x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglVertex3i(JNIEnv *env, jclass clazz, jint x, jint y, jint z, jlong function_pointer) { + glVertex3iPROC glVertex3i = (glVertex3iPROC)((intptr_t)function_pointer); + glVertex3i(x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglVertex4f(JNIEnv *env, jclass clazz, jfloat x, jfloat y, jfloat z, jfloat w, jlong function_pointer) { + glVertex4fPROC glVertex4f = (glVertex4fPROC)((intptr_t)function_pointer); + glVertex4f(x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglVertex4d(JNIEnv *env, jclass clazz, jdouble x, jdouble y, jdouble z, jdouble w, jlong function_pointer) { + glVertex4dPROC glVertex4d = (glVertex4dPROC)((intptr_t)function_pointer); + glVertex4d(x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglVertex4i(JNIEnv *env, jclass clazz, jint x, jint y, jint z, jint w, jlong function_pointer) { + glVertex4iPROC glVertex4i = (glVertex4iPROC)((intptr_t)function_pointer); + glVertex4i(x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTranslatef(JNIEnv *env, jclass clazz, jfloat x, jfloat y, jfloat z, jlong function_pointer) { + glTranslatefPROC glTranslatef = (glTranslatefPROC)((intptr_t)function_pointer); + glTranslatef(x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTranslated(JNIEnv *env, jclass clazz, jdouble x, jdouble y, jdouble z, jlong function_pointer) { + glTranslatedPROC glTranslated = (glTranslatedPROC)((intptr_t)function_pointer); + glTranslated(x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexImage1D(JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint border, jint format, jint type, jlong pixels, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)pixels; + glTexImage1DPROC glTexImage1D = (glTexImage1DPROC)((intptr_t)function_pointer); + glTexImage1D(target, level, internalformat, width, border, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexImage1DBO(JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint border, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)offsetToPointer(pixels_buffer_offset); + glTexImage1DPROC glTexImage1D = (glTexImage1DPROC)((intptr_t)function_pointer); + glTexImage1D(target, level, internalformat, width, border, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexImage2D(JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint format, jint type, jlong pixels, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)pixels; + glTexImage2DPROC glTexImage2D = (glTexImage2DPROC)((intptr_t)function_pointer); + glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexImage2DBO(JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)offsetToPointer(pixels_buffer_offset); + glTexImage2DPROC glTexImage2D = (glTexImage2DPROC)((intptr_t)function_pointer); + glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexSubImage1D(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint width, jint format, jint type, jlong pixels, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)pixels; + glTexSubImage1DPROC glTexSubImage1D = (glTexSubImage1DPROC)((intptr_t)function_pointer); + glTexSubImage1D(target, level, xoffset, width, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexSubImage1DBO(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint width, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)offsetToPointer(pixels_buffer_offset); + glTexSubImage1DPROC glTexSubImage1D = (glTexSubImage1DPROC)((intptr_t)function_pointer); + glTexSubImage1D(target, level, xoffset, width, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexSubImage2D(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jlong pixels, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)pixels; + glTexSubImage2DPROC glTexSubImage2D = (glTexSubImage2DPROC)((intptr_t)function_pointer); + glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexSubImage2DBO(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)offsetToPointer(pixels_buffer_offset); + glTexSubImage2DPROC glTexSubImage2D = (glTexSubImage2DPROC)((intptr_t)function_pointer); + glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexParameterf(JNIEnv *env, jclass clazz, jint target, jint pname, jfloat param, jlong function_pointer) { + glTexParameterfPROC glTexParameterf = (glTexParameterfPROC)((intptr_t)function_pointer); + glTexParameterf(target, pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexParameteri(JNIEnv *env, jclass clazz, jint target, jint pname, jint param, jlong function_pointer) { + glTexParameteriPROC glTexParameteri = (glTexParameteriPROC)((intptr_t)function_pointer); + glTexParameteri(target, pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexParameterfv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong param, jlong function_pointer) { + const GLfloat *param_address = (const GLfloat *)(intptr_t)param; + glTexParameterfvPROC glTexParameterfv = (glTexParameterfvPROC)((intptr_t)function_pointer); + glTexParameterfv(target, pname, param_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexParameteriv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong param, jlong function_pointer) { + const GLint *param_address = (const GLint *)(intptr_t)param; + glTexParameterivPROC glTexParameteriv = (glTexParameterivPROC)((intptr_t)function_pointer); + glTexParameteriv(target, pname, param_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexGenf(JNIEnv *env, jclass clazz, jint coord, jint pname, jfloat param, jlong function_pointer) { + glTexGenfPROC glTexGenf = (glTexGenfPROC)((intptr_t)function_pointer); + glTexGenf(coord, pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexGend(JNIEnv *env, jclass clazz, jint coord, jint pname, jdouble param, jlong function_pointer) { + glTexGendPROC glTexGend = (glTexGendPROC)((intptr_t)function_pointer); + glTexGend(coord, pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexGenfv(JNIEnv *env, jclass clazz, jint coord, jint pname, jlong params, jlong function_pointer) { + const GLfloat *params_address = (const GLfloat *)(intptr_t)params; + glTexGenfvPROC glTexGenfv = (glTexGenfvPROC)((intptr_t)function_pointer); + glTexGenfv(coord, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexGendv(JNIEnv *env, jclass clazz, jint coord, jint pname, jlong params, jlong function_pointer) { + const GLdouble *params_address = (const GLdouble *)(intptr_t)params; + glTexGendvPROC glTexGendv = (glTexGendvPROC)((intptr_t)function_pointer); + glTexGendv(coord, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexGeni(JNIEnv *env, jclass clazz, jint coord, jint pname, jint param, jlong function_pointer) { + glTexGeniPROC glTexGeni = (glTexGeniPROC)((intptr_t)function_pointer); + glTexGeni(coord, pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexGeniv(JNIEnv *env, jclass clazz, jint coord, jint pname, jlong params, jlong function_pointer) { + const GLint *params_address = (const GLint *)(intptr_t)params; + glTexGenivPROC glTexGeniv = (glTexGenivPROC)((intptr_t)function_pointer); + glTexGeniv(coord, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexEnvf(JNIEnv *env, jclass clazz, jint target, jint pname, jfloat param, jlong function_pointer) { + glTexEnvfPROC glTexEnvf = (glTexEnvfPROC)((intptr_t)function_pointer); + glTexEnvf(target, pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexEnvi(JNIEnv *env, jclass clazz, jint target, jint pname, jint param, jlong function_pointer) { + glTexEnviPROC glTexEnvi = (glTexEnviPROC)((intptr_t)function_pointer); + glTexEnvi(target, pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexEnvfv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + const GLfloat *params_address = (const GLfloat *)(intptr_t)params; + glTexEnvfvPROC glTexEnvfv = (glTexEnvfvPROC)((intptr_t)function_pointer); + glTexEnvfv(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexEnviv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + const GLint *params_address = (const GLint *)(intptr_t)params; + glTexEnvivPROC glTexEnviv = (glTexEnvivPROC)((intptr_t)function_pointer); + glTexEnviv(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexCoordPointer(JNIEnv *env, jclass clazz, jint size, jint type, jint stride, jlong pointer, jlong function_pointer) { + const GLvoid *pointer_address = (const GLvoid *)(intptr_t)pointer; + glTexCoordPointerPROC glTexCoordPointer = (glTexCoordPointerPROC)((intptr_t)function_pointer); + glTexCoordPointer(size, type, stride, pointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexCoordPointerBO(JNIEnv *env, jclass clazz, jint size, jint type, jint stride, jlong pointer_buffer_offset, jlong function_pointer) { + const GLvoid *pointer_address = (const GLvoid *)(intptr_t)offsetToPointer(pointer_buffer_offset); + glTexCoordPointerPROC glTexCoordPointer = (glTexCoordPointerPROC)((intptr_t)function_pointer); + glTexCoordPointer(size, type, stride, pointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexCoord1f(JNIEnv *env, jclass clazz, jfloat s, jlong function_pointer) { + glTexCoord1fPROC glTexCoord1f = (glTexCoord1fPROC)((intptr_t)function_pointer); + glTexCoord1f(s); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexCoord1d(JNIEnv *env, jclass clazz, jdouble s, jlong function_pointer) { + glTexCoord1dPROC glTexCoord1d = (glTexCoord1dPROC)((intptr_t)function_pointer); + glTexCoord1d(s); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexCoord2f(JNIEnv *env, jclass clazz, jfloat s, jfloat t, jlong function_pointer) { + glTexCoord2fPROC glTexCoord2f = (glTexCoord2fPROC)((intptr_t)function_pointer); + glTexCoord2f(s, t); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexCoord2d(JNIEnv *env, jclass clazz, jdouble s, jdouble t, jlong function_pointer) { + glTexCoord2dPROC glTexCoord2d = (glTexCoord2dPROC)((intptr_t)function_pointer); + glTexCoord2d(s, t); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexCoord3f(JNIEnv *env, jclass clazz, jfloat s, jfloat t, jfloat r, jlong function_pointer) { + glTexCoord3fPROC glTexCoord3f = (glTexCoord3fPROC)((intptr_t)function_pointer); + glTexCoord3f(s, t, r); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexCoord3d(JNIEnv *env, jclass clazz, jdouble s, jdouble t, jdouble r, jlong function_pointer) { + glTexCoord3dPROC glTexCoord3d = (glTexCoord3dPROC)((intptr_t)function_pointer); + glTexCoord3d(s, t, r); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexCoord4f(JNIEnv *env, jclass clazz, jfloat s, jfloat t, jfloat r, jfloat q, jlong function_pointer) { + glTexCoord4fPROC glTexCoord4f = (glTexCoord4fPROC)((intptr_t)function_pointer); + glTexCoord4f(s, t, r, q); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglTexCoord4d(JNIEnv *env, jclass clazz, jdouble s, jdouble t, jdouble r, jdouble q, jlong function_pointer) { + glTexCoord4dPROC glTexCoord4d = (glTexCoord4dPROC)((intptr_t)function_pointer); + glTexCoord4d(s, t, r, q); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglStencilOp(JNIEnv *env, jclass clazz, jint fail, jint zfail, jint zpass, jlong function_pointer) { + glStencilOpPROC glStencilOp = (glStencilOpPROC)((intptr_t)function_pointer); + glStencilOp(fail, zfail, zpass); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglStencilMask(JNIEnv *env, jclass clazz, jint mask, jlong function_pointer) { + glStencilMaskPROC glStencilMask = (glStencilMaskPROC)((intptr_t)function_pointer); + glStencilMask(mask); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL11_nglViewport(JNIEnv *env, jclass clazz, jint x, jint y, jint width, jint height, jlong function_pointer) { + glViewportPROC glViewport = (glViewportPROC)((intptr_t)function_pointer); + glViewport(x, y, width, height); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL12.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL12.c new file mode 100644 index 0000000..864b2a8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL12.c @@ -0,0 +1,51 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glDrawRangeElementsPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices); +typedef void (APIENTRY *glTexImage3DPROC) (GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels); +typedef void (APIENTRY *glTexSubImage3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels); +typedef void (APIENTRY *glCopyTexSubImage3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglDrawRangeElements(JNIEnv *env, jclass clazz, jint mode, jint start, jint end, jint count, jint type, jlong indices, jlong function_pointer) { + const GLvoid *indices_address = (const GLvoid *)(intptr_t)indices; + glDrawRangeElementsPROC glDrawRangeElements = (glDrawRangeElementsPROC)((intptr_t)function_pointer); + glDrawRangeElements(mode, start, end, count, type, indices_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglDrawRangeElementsBO(JNIEnv *env, jclass clazz, jint mode, jint start, jint end, jint count, jint type, jlong indices_buffer_offset, jlong function_pointer) { + const GLvoid *indices_address = (const GLvoid *)(intptr_t)offsetToPointer(indices_buffer_offset); + glDrawRangeElementsPROC glDrawRangeElements = (glDrawRangeElementsPROC)((intptr_t)function_pointer); + glDrawRangeElements(mode, start, end, count, type, indices_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglTexImage3D(JNIEnv *env, jclass clazz, jint target, jint level, jint internalFormat, jint width, jint height, jint depth, jint border, jint format, jint type, jlong pixels, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)pixels; + glTexImage3DPROC glTexImage3D = (glTexImage3DPROC)((intptr_t)function_pointer); + glTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglTexImage3DBO(JNIEnv *env, jclass clazz, jint target, jint level, jint internalFormat, jint width, jint height, jint depth, jint border, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)offsetToPointer(pixels_buffer_offset); + glTexImage3DPROC glTexImage3D = (glTexImage3DPROC)((intptr_t)function_pointer); + glTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglTexSubImage3D(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jlong pixels, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)pixels; + glTexSubImage3DPROC glTexSubImage3D = (glTexSubImage3DPROC)((intptr_t)function_pointer); + glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglTexSubImage3DBO(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jlong pixels_buffer_offset, jlong function_pointer) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)offsetToPointer(pixels_buffer_offset); + glTexSubImage3DPROC glTexSubImage3D = (glTexSubImage3DPROC)((intptr_t)function_pointer); + glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL12_nglCopyTexSubImage3D(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint x, jint y, jint width, jint height, jlong function_pointer) { + glCopyTexSubImage3DPROC glCopyTexSubImage3D = (glCopyTexSubImage3DPROC)((intptr_t)function_pointer); + glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL13.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL13.c new file mode 100644 index 0000000..26cbd2c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL13.c @@ -0,0 +1,191 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glActiveTexturePROC) (GLenum texture); +typedef void (APIENTRY *glClientActiveTexturePROC) (GLenum texture); +typedef void (APIENTRY *glCompressedTexImage1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRY *glCompressedTexImage2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRY *glCompressedTexImage3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRY *glCompressedTexSubImage1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRY *glCompressedTexSubImage2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRY *glCompressedTexSubImage3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data); +typedef void (APIENTRY *glGetCompressedTexImagePROC) (GLenum target, GLint lod, GLvoid * img); +typedef void (APIENTRY *glMultiTexCoord1fPROC) (GLenum target, GLfloat s); +typedef void (APIENTRY *glMultiTexCoord1dPROC) (GLenum target, GLdouble s); +typedef void (APIENTRY *glMultiTexCoord2fPROC) (GLenum target, GLfloat s, GLfloat t); +typedef void (APIENTRY *glMultiTexCoord2dPROC) (GLenum target, GLdouble s, GLdouble t); +typedef void (APIENTRY *glMultiTexCoord3fPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r); +typedef void (APIENTRY *glMultiTexCoord3dPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r); +typedef void (APIENTRY *glMultiTexCoord4fPROC) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); +typedef void (APIENTRY *glMultiTexCoord4dPROC) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); +typedef void (APIENTRY *glLoadTransposeMatrixfPROC) (const GLfloat * m); +typedef void (APIENTRY *glLoadTransposeMatrixdPROC) (const GLdouble * m); +typedef void (APIENTRY *glMultTransposeMatrixfPROC) (const GLfloat * m); +typedef void (APIENTRY *glMultTransposeMatrixdPROC) (const GLdouble * m); +typedef void (APIENTRY *glSampleCoveragePROC) (GLfloat value, GLboolean invert); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglActiveTexture(JNIEnv *env, jclass clazz, jint texture, jlong function_pointer) { + glActiveTexturePROC glActiveTexture = (glActiveTexturePROC)((intptr_t)function_pointer); + glActiveTexture(texture); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglClientActiveTexture(JNIEnv *env, jclass clazz, jint texture, jlong function_pointer) { + glClientActiveTexturePROC glClientActiveTexture = (glClientActiveTexturePROC)((intptr_t)function_pointer); + glClientActiveTexture(texture); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglCompressedTexImage1D(JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint border, jint imageSize, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glCompressedTexImage1DPROC glCompressedTexImage1D = (glCompressedTexImage1DPROC)((intptr_t)function_pointer); + glCompressedTexImage1D(target, level, internalformat, width, border, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglCompressedTexImage1DBO(JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint border, jint imageSize, jlong data_buffer_offset, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)offsetToPointer(data_buffer_offset); + glCompressedTexImage1DPROC glCompressedTexImage1D = (glCompressedTexImage1DPROC)((intptr_t)function_pointer); + glCompressedTexImage1D(target, level, internalformat, width, border, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglCompressedTexImage2D(JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glCompressedTexImage2DPROC glCompressedTexImage2D = (glCompressedTexImage2DPROC)((intptr_t)function_pointer); + glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglCompressedTexImage2DBO(JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jlong data_buffer_offset, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)offsetToPointer(data_buffer_offset); + glCompressedTexImage2DPROC glCompressedTexImage2D = (glCompressedTexImage2DPROC)((intptr_t)function_pointer); + glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglCompressedTexImage3D(JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glCompressedTexImage3DPROC glCompressedTexImage3D = (glCompressedTexImage3DPROC)((intptr_t)function_pointer); + glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglCompressedTexImage3DBO(JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jlong data_buffer_offset, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)offsetToPointer(data_buffer_offset); + glCompressedTexImage3DPROC glCompressedTexImage3D = (glCompressedTexImage3DPROC)((intptr_t)function_pointer); + glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglCompressedTexSubImage1D(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint width, jint format, jint imageSize, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glCompressedTexSubImage1DPROC glCompressedTexSubImage1D = (glCompressedTexSubImage1DPROC)((intptr_t)function_pointer); + glCompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglCompressedTexSubImage1DBO(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint width, jint format, jint imageSize, jlong data_buffer_offset, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)offsetToPointer(data_buffer_offset); + glCompressedTexSubImage1DPROC glCompressedTexSubImage1D = (glCompressedTexSubImage1DPROC)((intptr_t)function_pointer); + glCompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglCompressedTexSubImage2D(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glCompressedTexSubImage2DPROC glCompressedTexSubImage2D = (glCompressedTexSubImage2DPROC)((intptr_t)function_pointer); + glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglCompressedTexSubImage2DBO(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jlong data_buffer_offset, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)offsetToPointer(data_buffer_offset); + glCompressedTexSubImage2DPROC glCompressedTexSubImage2D = (glCompressedTexSubImage2DPROC)((intptr_t)function_pointer); + glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglCompressedTexSubImage3D(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imageSize, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glCompressedTexSubImage3DPROC glCompressedTexSubImage3D = (glCompressedTexSubImage3DPROC)((intptr_t)function_pointer); + glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglCompressedTexSubImage3DBO(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imageSize, jlong data_buffer_offset, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)offsetToPointer(data_buffer_offset); + glCompressedTexSubImage3DPROC glCompressedTexSubImage3D = (glCompressedTexSubImage3DPROC)((intptr_t)function_pointer); + glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglGetCompressedTexImage(JNIEnv *env, jclass clazz, jint target, jint lod, jlong img, jlong function_pointer) { + GLvoid *img_address = (GLvoid *)(intptr_t)img; + glGetCompressedTexImagePROC glGetCompressedTexImage = (glGetCompressedTexImagePROC)((intptr_t)function_pointer); + glGetCompressedTexImage(target, lod, img_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglGetCompressedTexImageBO(JNIEnv *env, jclass clazz, jint target, jint lod, jlong img_buffer_offset, jlong function_pointer) { + GLvoid *img_address = (GLvoid *)(intptr_t)offsetToPointer(img_buffer_offset); + glGetCompressedTexImagePROC glGetCompressedTexImage = (glGetCompressedTexImagePROC)((intptr_t)function_pointer); + glGetCompressedTexImage(target, lod, img_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglMultiTexCoord1f(JNIEnv *env, jclass clazz, jint target, jfloat s, jlong function_pointer) { + glMultiTexCoord1fPROC glMultiTexCoord1f = (glMultiTexCoord1fPROC)((intptr_t)function_pointer); + glMultiTexCoord1f(target, s); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglMultiTexCoord1d(JNIEnv *env, jclass clazz, jint target, jdouble s, jlong function_pointer) { + glMultiTexCoord1dPROC glMultiTexCoord1d = (glMultiTexCoord1dPROC)((intptr_t)function_pointer); + glMultiTexCoord1d(target, s); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglMultiTexCoord2f(JNIEnv *env, jclass clazz, jint target, jfloat s, jfloat t, jlong function_pointer) { + glMultiTexCoord2fPROC glMultiTexCoord2f = (glMultiTexCoord2fPROC)((intptr_t)function_pointer); + glMultiTexCoord2f(target, s, t); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglMultiTexCoord2d(JNIEnv *env, jclass clazz, jint target, jdouble s, jdouble t, jlong function_pointer) { + glMultiTexCoord2dPROC glMultiTexCoord2d = (glMultiTexCoord2dPROC)((intptr_t)function_pointer); + glMultiTexCoord2d(target, s, t); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglMultiTexCoord3f(JNIEnv *env, jclass clazz, jint target, jfloat s, jfloat t, jfloat r, jlong function_pointer) { + glMultiTexCoord3fPROC glMultiTexCoord3f = (glMultiTexCoord3fPROC)((intptr_t)function_pointer); + glMultiTexCoord3f(target, s, t, r); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglMultiTexCoord3d(JNIEnv *env, jclass clazz, jint target, jdouble s, jdouble t, jdouble r, jlong function_pointer) { + glMultiTexCoord3dPROC glMultiTexCoord3d = (glMultiTexCoord3dPROC)((intptr_t)function_pointer); + glMultiTexCoord3d(target, s, t, r); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglMultiTexCoord4f(JNIEnv *env, jclass clazz, jint target, jfloat s, jfloat t, jfloat r, jfloat q, jlong function_pointer) { + glMultiTexCoord4fPROC glMultiTexCoord4f = (glMultiTexCoord4fPROC)((intptr_t)function_pointer); + glMultiTexCoord4f(target, s, t, r, q); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglMultiTexCoord4d(JNIEnv *env, jclass clazz, jint target, jdouble s, jdouble t, jdouble r, jdouble q, jlong function_pointer) { + glMultiTexCoord4dPROC glMultiTexCoord4d = (glMultiTexCoord4dPROC)((intptr_t)function_pointer); + glMultiTexCoord4d(target, s, t, r, q); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglLoadTransposeMatrixf(JNIEnv *env, jclass clazz, jlong m, jlong function_pointer) { + const GLfloat *m_address = (const GLfloat *)(intptr_t)m; + glLoadTransposeMatrixfPROC glLoadTransposeMatrixf = (glLoadTransposeMatrixfPROC)((intptr_t)function_pointer); + glLoadTransposeMatrixf(m_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglLoadTransposeMatrixd(JNIEnv *env, jclass clazz, jlong m, jlong function_pointer) { + const GLdouble *m_address = (const GLdouble *)(intptr_t)m; + glLoadTransposeMatrixdPROC glLoadTransposeMatrixd = (glLoadTransposeMatrixdPROC)((intptr_t)function_pointer); + glLoadTransposeMatrixd(m_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglMultTransposeMatrixf(JNIEnv *env, jclass clazz, jlong m, jlong function_pointer) { + const GLfloat *m_address = (const GLfloat *)(intptr_t)m; + glMultTransposeMatrixfPROC glMultTransposeMatrixf = (glMultTransposeMatrixfPROC)((intptr_t)function_pointer); + glMultTransposeMatrixf(m_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglMultTransposeMatrixd(JNIEnv *env, jclass clazz, jlong m, jlong function_pointer) { + const GLdouble *m_address = (const GLdouble *)(intptr_t)m; + glMultTransposeMatrixdPROC glMultTransposeMatrixd = (glMultTransposeMatrixdPROC)((intptr_t)function_pointer); + glMultTransposeMatrixd(m_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL13_nglSampleCoverage(JNIEnv *env, jclass clazz, jfloat value, jboolean invert, jlong function_pointer) { + glSampleCoveragePROC glSampleCoverage = (glSampleCoveragePROC)((intptr_t)function_pointer); + glSampleCoverage(value, invert); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL14.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL14.c new file mode 100644 index 0000000..400f68b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL14.c @@ -0,0 +1,156 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glBlendEquationPROC) (GLenum mode); +typedef void (APIENTRY *glBlendColorPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); +typedef void (APIENTRY *glFogCoordfPROC) (GLfloat coord); +typedef void (APIENTRY *glFogCoorddPROC) (GLdouble coord); +typedef void (APIENTRY *glFogCoordPointerPROC) (GLenum type, GLsizei stride, const GLvoid * data); +typedef void (APIENTRY *glMultiDrawArraysPROC) (GLenum mode, GLint * piFirst, GLsizei * piCount, GLsizei primcount); +typedef void (APIENTRY *glPointParameteriPROC) (GLenum pname, GLint param); +typedef void (APIENTRY *glPointParameterfPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRY *glPointParameterivPROC) (GLenum pname, const GLint * params); +typedef void (APIENTRY *glPointParameterfvPROC) (GLenum pname, const GLfloat * params); +typedef void (APIENTRY *glSecondaryColor3bPROC) (GLbyte red, GLbyte green, GLbyte blue); +typedef void (APIENTRY *glSecondaryColor3fPROC) (GLfloat red, GLfloat green, GLfloat blue); +typedef void (APIENTRY *glSecondaryColor3dPROC) (GLdouble red, GLdouble green, GLdouble blue); +typedef void (APIENTRY *glSecondaryColor3ubPROC) (GLubyte red, GLubyte green, GLubyte blue); +typedef void (APIENTRY *glSecondaryColorPointerPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid * data); +typedef void (APIENTRY *glBlendFuncSeparatePROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); +typedef void (APIENTRY *glWindowPos2fPROC) (GLfloat x, GLfloat y); +typedef void (APIENTRY *glWindowPos2dPROC) (GLdouble x, GLdouble y); +typedef void (APIENTRY *glWindowPos2iPROC) (GLint x, GLint y); +typedef void (APIENTRY *glWindowPos3fPROC) (GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRY *glWindowPos3dPROC) (GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRY *glWindowPos3iPROC) (GLint x, GLint y, GLint z); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglBlendEquation(JNIEnv *env, jclass clazz, jint mode, jlong function_pointer) { + glBlendEquationPROC glBlendEquation = (glBlendEquationPROC)((intptr_t)function_pointer); + glBlendEquation(mode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglBlendColor(JNIEnv *env, jclass clazz, jfloat red, jfloat green, jfloat blue, jfloat alpha, jlong function_pointer) { + glBlendColorPROC glBlendColor = (glBlendColorPROC)((intptr_t)function_pointer); + glBlendColor(red, green, blue, alpha); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglFogCoordf(JNIEnv *env, jclass clazz, jfloat coord, jlong function_pointer) { + glFogCoordfPROC glFogCoordf = (glFogCoordfPROC)((intptr_t)function_pointer); + glFogCoordf(coord); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglFogCoordd(JNIEnv *env, jclass clazz, jdouble coord, jlong function_pointer) { + glFogCoorddPROC glFogCoordd = (glFogCoorddPROC)((intptr_t)function_pointer); + glFogCoordd(coord); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglFogCoordPointer(JNIEnv *env, jclass clazz, jint type, jint stride, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glFogCoordPointerPROC glFogCoordPointer = (glFogCoordPointerPROC)((intptr_t)function_pointer); + glFogCoordPointer(type, stride, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglFogCoordPointerBO(JNIEnv *env, jclass clazz, jint type, jint stride, jlong data_buffer_offset, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)offsetToPointer(data_buffer_offset); + glFogCoordPointerPROC glFogCoordPointer = (glFogCoordPointerPROC)((intptr_t)function_pointer); + glFogCoordPointer(type, stride, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglMultiDrawArrays(JNIEnv *env, jclass clazz, jint mode, jlong piFirst, jlong piCount, jint primcount, jlong function_pointer) { + GLint *piFirst_address = (GLint *)(intptr_t)piFirst; + GLsizei *piCount_address = (GLsizei *)(intptr_t)piCount; + glMultiDrawArraysPROC glMultiDrawArrays = (glMultiDrawArraysPROC)((intptr_t)function_pointer); + glMultiDrawArrays(mode, piFirst_address, piCount_address, primcount); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglPointParameteri(JNIEnv *env, jclass clazz, jint pname, jint param, jlong function_pointer) { + glPointParameteriPROC glPointParameteri = (glPointParameteriPROC)((intptr_t)function_pointer); + glPointParameteri(pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglPointParameterf(JNIEnv *env, jclass clazz, jint pname, jfloat param, jlong function_pointer) { + glPointParameterfPROC glPointParameterf = (glPointParameterfPROC)((intptr_t)function_pointer); + glPointParameterf(pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglPointParameteriv(JNIEnv *env, jclass clazz, jint pname, jlong params, jlong function_pointer) { + const GLint *params_address = (const GLint *)(intptr_t)params; + glPointParameterivPROC glPointParameteriv = (glPointParameterivPROC)((intptr_t)function_pointer); + glPointParameteriv(pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglPointParameterfv(JNIEnv *env, jclass clazz, jint pname, jlong params, jlong function_pointer) { + const GLfloat *params_address = (const GLfloat *)(intptr_t)params; + glPointParameterfvPROC glPointParameterfv = (glPointParameterfvPROC)((intptr_t)function_pointer); + glPointParameterfv(pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglSecondaryColor3b(JNIEnv *env, jclass clazz, jbyte red, jbyte green, jbyte blue, jlong function_pointer) { + glSecondaryColor3bPROC glSecondaryColor3b = (glSecondaryColor3bPROC)((intptr_t)function_pointer); + glSecondaryColor3b(red, green, blue); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglSecondaryColor3f(JNIEnv *env, jclass clazz, jfloat red, jfloat green, jfloat blue, jlong function_pointer) { + glSecondaryColor3fPROC glSecondaryColor3f = (glSecondaryColor3fPROC)((intptr_t)function_pointer); + glSecondaryColor3f(red, green, blue); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglSecondaryColor3d(JNIEnv *env, jclass clazz, jdouble red, jdouble green, jdouble blue, jlong function_pointer) { + glSecondaryColor3dPROC glSecondaryColor3d = (glSecondaryColor3dPROC)((intptr_t)function_pointer); + glSecondaryColor3d(red, green, blue); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglSecondaryColor3ub(JNIEnv *env, jclass clazz, jbyte red, jbyte green, jbyte blue, jlong function_pointer) { + glSecondaryColor3ubPROC glSecondaryColor3ub = (glSecondaryColor3ubPROC)((intptr_t)function_pointer); + glSecondaryColor3ub(red, green, blue); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglSecondaryColorPointer(JNIEnv *env, jclass clazz, jint size, jint type, jint stride, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glSecondaryColorPointerPROC glSecondaryColorPointer = (glSecondaryColorPointerPROC)((intptr_t)function_pointer); + glSecondaryColorPointer(size, type, stride, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglSecondaryColorPointerBO(JNIEnv *env, jclass clazz, jint size, jint type, jint stride, jlong data_buffer_offset, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)offsetToPointer(data_buffer_offset); + glSecondaryColorPointerPROC glSecondaryColorPointer = (glSecondaryColorPointerPROC)((intptr_t)function_pointer); + glSecondaryColorPointer(size, type, stride, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglBlendFuncSeparate(JNIEnv *env, jclass clazz, jint sfactorRGB, jint dfactorRGB, jint sfactorAlpha, jint dfactorAlpha, jlong function_pointer) { + glBlendFuncSeparatePROC glBlendFuncSeparate = (glBlendFuncSeparatePROC)((intptr_t)function_pointer); + glBlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglWindowPos2f(JNIEnv *env, jclass clazz, jfloat x, jfloat y, jlong function_pointer) { + glWindowPos2fPROC glWindowPos2f = (glWindowPos2fPROC)((intptr_t)function_pointer); + glWindowPos2f(x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglWindowPos2d(JNIEnv *env, jclass clazz, jdouble x, jdouble y, jlong function_pointer) { + glWindowPos2dPROC glWindowPos2d = (glWindowPos2dPROC)((intptr_t)function_pointer); + glWindowPos2d(x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglWindowPos2i(JNIEnv *env, jclass clazz, jint x, jint y, jlong function_pointer) { + glWindowPos2iPROC glWindowPos2i = (glWindowPos2iPROC)((intptr_t)function_pointer); + glWindowPos2i(x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglWindowPos3f(JNIEnv *env, jclass clazz, jfloat x, jfloat y, jfloat z, jlong function_pointer) { + glWindowPos3fPROC glWindowPos3f = (glWindowPos3fPROC)((intptr_t)function_pointer); + glWindowPos3f(x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglWindowPos3d(JNIEnv *env, jclass clazz, jdouble x, jdouble y, jdouble z, jlong function_pointer) { + glWindowPos3dPROC glWindowPos3d = (glWindowPos3dPROC)((intptr_t)function_pointer); + glWindowPos3d(x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL14_nglWindowPos3i(JNIEnv *env, jclass clazz, jint x, jint y, jint z, jlong function_pointer) { + glWindowPos3iPROC glWindowPos3i = (glWindowPos3iPROC)((intptr_t)function_pointer); + glWindowPos3i(x, y, z); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL15.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL15.c new file mode 100644 index 0000000..c7556d1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL15.c @@ -0,0 +1,137 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glBindBufferPROC) (GLenum target, GLuint buffer); +typedef void (APIENTRY *glDeleteBuffersPROC) (GLsizei n, const GLuint * buffers); +typedef void (APIENTRY *glGenBuffersPROC) (GLsizei n, GLuint * buffers); +typedef GLboolean (APIENTRY *glIsBufferPROC) (GLuint buffer); +typedef void (APIENTRY *glBufferDataPROC) (GLenum target, GLsizeiptr size, const GLvoid * data, GLenum usage); +typedef void (APIENTRY *glBufferSubDataPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid * data); +typedef void (APIENTRY *glGetBufferSubDataPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid * data); +typedef GLvoid * (APIENTRY *glMapBufferPROC) (GLenum target, GLenum access); +typedef GLboolean (APIENTRY *glUnmapBufferPROC) (GLenum target); +typedef void (APIENTRY *glGetBufferParameterivPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetBufferPointervPROC) (GLenum target, GLenum pname, GLvoid ** pointer); +typedef void (APIENTRY *glGenQueriesPROC) (GLsizei n, GLuint * ids); +typedef void (APIENTRY *glDeleteQueriesPROC) (GLsizei n, GLuint * ids); +typedef GLboolean (APIENTRY *glIsQueryPROC) (GLuint id); +typedef void (APIENTRY *glBeginQueryPROC) (GLenum target, GLuint id); +typedef void (APIENTRY *glEndQueryPROC) (GLenum target); +typedef void (APIENTRY *glGetQueryivPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetQueryObjectivPROC) (GLenum id, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetQueryObjectuivPROC) (GLenum id, GLenum pname, GLuint * params); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15_nglBindBuffer(JNIEnv *env, jclass clazz, jint target, jint buffer, jlong function_pointer) { + glBindBufferPROC glBindBuffer = (glBindBufferPROC)((intptr_t)function_pointer); + glBindBuffer(target, buffer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15_nglDeleteBuffers(JNIEnv *env, jclass clazz, jint n, jlong buffers, jlong function_pointer) { + const GLuint *buffers_address = (const GLuint *)(intptr_t)buffers; + glDeleteBuffersPROC glDeleteBuffers = (glDeleteBuffersPROC)((intptr_t)function_pointer); + glDeleteBuffers(n, buffers_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15_nglGenBuffers(JNIEnv *env, jclass clazz, jint n, jlong buffers, jlong function_pointer) { + GLuint *buffers_address = (GLuint *)(intptr_t)buffers; + glGenBuffersPROC glGenBuffers = (glGenBuffersPROC)((intptr_t)function_pointer); + glGenBuffers(n, buffers_address); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL15_nglIsBuffer(JNIEnv *env, jclass clazz, jint buffer, jlong function_pointer) { + glIsBufferPROC glIsBuffer = (glIsBufferPROC)((intptr_t)function_pointer); + GLboolean __result = glIsBuffer(buffer); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15_nglBufferData(JNIEnv *env, jclass clazz, jint target, jlong size, jlong data, jint usage, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glBufferDataPROC glBufferData = (glBufferDataPROC)((intptr_t)function_pointer); + glBufferData(target, size, data_address, usage); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15_nglBufferSubData(JNIEnv *env, jclass clazz, jint target, jlong offset, jlong size, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glBufferSubDataPROC glBufferSubData = (glBufferSubDataPROC)((intptr_t)function_pointer); + glBufferSubData(target, offset, size, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15_nglGetBufferSubData(JNIEnv *env, jclass clazz, jint target, jlong offset, jlong size, jlong data, jlong function_pointer) { + GLvoid *data_address = (GLvoid *)(intptr_t)data; + glGetBufferSubDataPROC glGetBufferSubData = (glGetBufferSubDataPROC)((intptr_t)function_pointer); + glGetBufferSubData(target, offset, size, data_address); +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_GL15_nglMapBuffer(JNIEnv *env, jclass clazz, jint target, jint access, jlong result_size, jobject old_buffer, jlong function_pointer) { + glMapBufferPROC glMapBuffer = (glMapBufferPROC)((intptr_t)function_pointer); + GLvoid * __result = glMapBuffer(target, access); + return safeNewBufferCached(env, __result, result_size, old_buffer); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL15_nglUnmapBuffer(JNIEnv *env, jclass clazz, jint target, jlong function_pointer) { + glUnmapBufferPROC glUnmapBuffer = (glUnmapBufferPROC)((intptr_t)function_pointer); + GLboolean __result = glUnmapBuffer(target); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15_nglGetBufferParameteriv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetBufferParameterivPROC glGetBufferParameteriv = (glGetBufferParameterivPROC)((intptr_t)function_pointer); + glGetBufferParameteriv(target, pname, params_address); +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_GL15_nglGetBufferPointerv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong result_size, jlong function_pointer) { + glGetBufferPointervPROC glGetBufferPointerv = (glGetBufferPointervPROC)((intptr_t)function_pointer); + GLvoid * __result; + glGetBufferPointerv(target, pname, &__result); + return safeNewBuffer(env, __result, result_size); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15_nglGenQueries(JNIEnv *env, jclass clazz, jint n, jlong ids, jlong function_pointer) { + GLuint *ids_address = (GLuint *)(intptr_t)ids; + glGenQueriesPROC glGenQueries = (glGenQueriesPROC)((intptr_t)function_pointer); + glGenQueries(n, ids_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15_nglDeleteQueries(JNIEnv *env, jclass clazz, jint n, jlong ids, jlong function_pointer) { + GLuint *ids_address = (GLuint *)(intptr_t)ids; + glDeleteQueriesPROC glDeleteQueries = (glDeleteQueriesPROC)((intptr_t)function_pointer); + glDeleteQueries(n, ids_address); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL15_nglIsQuery(JNIEnv *env, jclass clazz, jint id, jlong function_pointer) { + glIsQueryPROC glIsQuery = (glIsQueryPROC)((intptr_t)function_pointer); + GLboolean __result = glIsQuery(id); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15_nglBeginQuery(JNIEnv *env, jclass clazz, jint target, jint id, jlong function_pointer) { + glBeginQueryPROC glBeginQuery = (glBeginQueryPROC)((intptr_t)function_pointer); + glBeginQuery(target, id); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15_nglEndQuery(JNIEnv *env, jclass clazz, jint target, jlong function_pointer) { + glEndQueryPROC glEndQuery = (glEndQueryPROC)((intptr_t)function_pointer); + glEndQuery(target); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15_nglGetQueryiv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetQueryivPROC glGetQueryiv = (glGetQueryivPROC)((intptr_t)function_pointer); + glGetQueryiv(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15_nglGetQueryObjectiv(JNIEnv *env, jclass clazz, jint id, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetQueryObjectivPROC glGetQueryObjectiv = (glGetQueryObjectivPROC)((intptr_t)function_pointer); + glGetQueryObjectiv(id, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL15_nglGetQueryObjectuiv(JNIEnv *env, jclass clazz, jint id, jint pname, jlong params, jlong function_pointer) { + GLuint *params_address = (GLuint *)(intptr_t)params; + glGetQueryObjectuivPROC glGetQueryObjectuiv = (glGetQueryObjectuivPROC)((intptr_t)function_pointer); + glGetQueryObjectuiv(id, pname, params_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL20.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL20.c new file mode 100644 index 0000000..681debc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL20.c @@ -0,0 +1,503 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glShaderSourcePROC) (GLuint shader, GLsizei count, const GLchar ** string, const GLint* length); +typedef GLint (APIENTRY *glCreateShaderPROC) (GLuint type); +typedef GLboolean (APIENTRY *glIsShaderPROC) (GLuint shader); +typedef void (APIENTRY *glCompileShaderPROC) (GLuint shader); +typedef void (APIENTRY *glDeleteShaderPROC) (GLuint shader); +typedef GLint (APIENTRY *glCreateProgramPROC) (); +typedef GLboolean (APIENTRY *glIsProgramPROC) (GLint program); +typedef void (APIENTRY *glAttachShaderPROC) (GLuint program, GLuint shader); +typedef void (APIENTRY *glDetachShaderPROC) (GLuint program, GLuint shader); +typedef void (APIENTRY *glLinkProgramPROC) (GLuint program); +typedef void (APIENTRY *glUseProgramPROC) (GLuint program); +typedef void (APIENTRY *glValidateProgramPROC) (GLuint program); +typedef void (APIENTRY *glDeleteProgramPROC) (GLuint program); +typedef void (APIENTRY *glUniform1fPROC) (GLint location, GLfloat v0); +typedef void (APIENTRY *glUniform2fPROC) (GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRY *glUniform3fPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRY *glUniform4fPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRY *glUniform1iPROC) (GLint location, GLint v0); +typedef void (APIENTRY *glUniform2iPROC) (GLint location, GLint v0, GLint v1); +typedef void (APIENTRY *glUniform3iPROC) (GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRY *glUniform4iPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRY *glUniform1fvPROC) (GLint location, GLsizei count, const GLfloat * values); +typedef void (APIENTRY *glUniform2fvPROC) (GLint location, GLsizei count, const GLfloat * values); +typedef void (APIENTRY *glUniform3fvPROC) (GLint location, GLsizei count, const GLfloat * values); +typedef void (APIENTRY *glUniform4fvPROC) (GLint location, GLsizei count, const GLfloat * values); +typedef void (APIENTRY *glUniform1ivPROC) (GLint location, GLsizei count, const GLint * values); +typedef void (APIENTRY *glUniform2ivPROC) (GLint location, GLsizei count, const GLint * values); +typedef void (APIENTRY *glUniform3ivPROC) (GLint location, GLsizei count, const GLint * values); +typedef void (APIENTRY *glUniform4ivPROC) (GLint location, GLsizei count, const GLint * values); +typedef void (APIENTRY *glUniformMatrix2fvPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat * matrices); +typedef void (APIENTRY *glUniformMatrix3fvPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat * matrices); +typedef void (APIENTRY *glUniformMatrix4fvPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat * matrices); +typedef void (APIENTRY *glGetShaderivPROC) (GLuint shader, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetProgramivPROC) (GLuint program, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetShaderInfoLogPROC) (GLuint shader, GLsizei maxLength, GLsizei * length, GLchar * infoLog); +typedef void (APIENTRY *glGetProgramInfoLogPROC) (GLuint program, GLsizei maxLength, GLsizei * length, GLchar * infoLog); +typedef void (APIENTRY *glGetAttachedShadersPROC) (GLuint program, GLsizei maxCount, GLsizei * count, GLuint * shaders); +typedef GLint (APIENTRY *glGetUniformLocationPROC) (GLuint program, const GLchar * name); +typedef void (APIENTRY *glGetActiveUniformPROC) (GLuint program, GLuint index, GLsizei maxLength, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name); +typedef void (APIENTRY *glGetUniformfvPROC) (GLuint program, GLint location, GLfloat * params); +typedef void (APIENTRY *glGetUniformivPROC) (GLuint program, GLint location, GLint * params); +typedef void (APIENTRY *glGetShaderSourcePROC) (GLuint shader, GLsizei maxLength, GLsizei * length, GLchar * source); +typedef void (APIENTRY *glVertexAttrib1sPROC) (GLuint index, GLshort x); +typedef void (APIENTRY *glVertexAttrib1fPROC) (GLuint index, GLfloat x); +typedef void (APIENTRY *glVertexAttrib1dPROC) (GLuint index, GLdouble x); +typedef void (APIENTRY *glVertexAttrib2sPROC) (GLuint index, GLshort x, GLshort y); +typedef void (APIENTRY *glVertexAttrib2fPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (APIENTRY *glVertexAttrib2dPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRY *glVertexAttrib3sPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRY *glVertexAttrib3fPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRY *glVertexAttrib3dPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRY *glVertexAttrib4sPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRY *glVertexAttrib4fPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRY *glVertexAttrib4dPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRY *glVertexAttrib4NubPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (APIENTRY *glVertexAttribPointerPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * buffer); +typedef void (APIENTRY *glEnableVertexAttribArrayPROC) (GLuint index); +typedef void (APIENTRY *glDisableVertexAttribArrayPROC) (GLuint index); +typedef void (APIENTRY *glGetVertexAttribfvPROC) (GLuint index, GLenum pname, GLfloat * params); +typedef void (APIENTRY *glGetVertexAttribdvPROC) (GLuint index, GLenum pname, GLdouble * params); +typedef void (APIENTRY *glGetVertexAttribivPROC) (GLuint index, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetVertexAttribPointervPROC) (GLuint index, GLenum pname, GLvoid ** pointer); +typedef void (APIENTRY *glBindAttribLocationPROC) (GLuint program, GLuint index, const GLchar * name); +typedef void (APIENTRY *glGetActiveAttribPROC) (GLuint program, GLuint index, GLsizei maxLength, GLsizei * length, GLint * size, GLenum * type, GLchar * name); +typedef GLint (APIENTRY *glGetAttribLocationPROC) (GLuint program, const GLchar * name); +typedef void (APIENTRY *glDrawBuffersPROC) (GLsizei size, const GLenum * buffers); +typedef void (APIENTRY *glStencilOpSeparatePROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +typedef void (APIENTRY *glStencilFuncSeparatePROC) (GLenum face, GLenum func, GLint ref, GLuint mask); +typedef void (APIENTRY *glStencilMaskSeparatePROC) (GLenum face, GLuint mask); +typedef void (APIENTRY *glBlendEquationSeparatePROC) (GLenum modeRGB, GLenum modeAlpha); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglShaderSource(JNIEnv *env, jclass clazz, jint shader, jint count, jlong string, jint length, jlong function_pointer) { + const GLchar *string_address = (const GLchar *)(intptr_t)string; + glShaderSourcePROC glShaderSource = (glShaderSourcePROC)((intptr_t)function_pointer); + glShaderSource(shader, count, (const GLchar **)&string_address, (const GLint*)&length); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglShaderSource3(JNIEnv *env, jclass clazz, jint shader, jint count, jlong strings, jlong length, jlong function_pointer) { + const GLchar *strings_address = (const GLchar *)(intptr_t)strings; + int _str_i; + GLchar *_str_address; + GLchar **strings_str = (GLchar **) malloc(count * sizeof(GLchar *)); + const GLint *length_address = (const GLint *)(intptr_t)length; + glShaderSourcePROC glShaderSource = (glShaderSourcePROC)((intptr_t)function_pointer); + _str_i = 0; + _str_address = (GLchar *)strings_address; + while ( _str_i < count ) { + strings_str[_str_i] = _str_address; + _str_address += length_address[_str_i++]; + } + glShaderSource(shader, count, (const GLchar **)strings_str, length_address); + free(strings_str); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL20_nglCreateShader(JNIEnv *env, jclass clazz, jint type, jlong function_pointer) { + glCreateShaderPROC glCreateShader = (glCreateShaderPROC)((intptr_t)function_pointer); + GLint __result = glCreateShader(type); + return __result; +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL20_nglIsShader(JNIEnv *env, jclass clazz, jint shader, jlong function_pointer) { + glIsShaderPROC glIsShader = (glIsShaderPROC)((intptr_t)function_pointer); + GLboolean __result = glIsShader(shader); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglCompileShader(JNIEnv *env, jclass clazz, jint shader, jlong function_pointer) { + glCompileShaderPROC glCompileShader = (glCompileShaderPROC)((intptr_t)function_pointer); + glCompileShader(shader); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglDeleteShader(JNIEnv *env, jclass clazz, jint shader, jlong function_pointer) { + glDeleteShaderPROC glDeleteShader = (glDeleteShaderPROC)((intptr_t)function_pointer); + glDeleteShader(shader); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL20_nglCreateProgram(JNIEnv *env, jclass clazz, jlong function_pointer) { + glCreateProgramPROC glCreateProgram = (glCreateProgramPROC)((intptr_t)function_pointer); + GLint __result = glCreateProgram(); + return __result; +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL20_nglIsProgram(JNIEnv *env, jclass clazz, jint program, jlong function_pointer) { + glIsProgramPROC glIsProgram = (glIsProgramPROC)((intptr_t)function_pointer); + GLboolean __result = glIsProgram(program); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglAttachShader(JNIEnv *env, jclass clazz, jint program, jint shader, jlong function_pointer) { + glAttachShaderPROC glAttachShader = (glAttachShaderPROC)((intptr_t)function_pointer); + glAttachShader(program, shader); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglDetachShader(JNIEnv *env, jclass clazz, jint program, jint shader, jlong function_pointer) { + glDetachShaderPROC glDetachShader = (glDetachShaderPROC)((intptr_t)function_pointer); + glDetachShader(program, shader); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglLinkProgram(JNIEnv *env, jclass clazz, jint program, jlong function_pointer) { + glLinkProgramPROC glLinkProgram = (glLinkProgramPROC)((intptr_t)function_pointer); + glLinkProgram(program); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglUseProgram(JNIEnv *env, jclass clazz, jint program, jlong function_pointer) { + glUseProgramPROC glUseProgram = (glUseProgramPROC)((intptr_t)function_pointer); + glUseProgram(program); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglValidateProgram(JNIEnv *env, jclass clazz, jint program, jlong function_pointer) { + glValidateProgramPROC glValidateProgram = (glValidateProgramPROC)((intptr_t)function_pointer); + glValidateProgram(program); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglDeleteProgram(JNIEnv *env, jclass clazz, jint program, jlong function_pointer) { + glDeleteProgramPROC glDeleteProgram = (glDeleteProgramPROC)((intptr_t)function_pointer); + glDeleteProgram(program); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglUniform1f(JNIEnv *env, jclass clazz, jint location, jfloat v0, jlong function_pointer) { + glUniform1fPROC glUniform1f = (glUniform1fPROC)((intptr_t)function_pointer); + glUniform1f(location, v0); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglUniform2f(JNIEnv *env, jclass clazz, jint location, jfloat v0, jfloat v1, jlong function_pointer) { + glUniform2fPROC glUniform2f = (glUniform2fPROC)((intptr_t)function_pointer); + glUniform2f(location, v0, v1); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglUniform3f(JNIEnv *env, jclass clazz, jint location, jfloat v0, jfloat v1, jfloat v2, jlong function_pointer) { + glUniform3fPROC glUniform3f = (glUniform3fPROC)((intptr_t)function_pointer); + glUniform3f(location, v0, v1, v2); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglUniform4f(JNIEnv *env, jclass clazz, jint location, jfloat v0, jfloat v1, jfloat v2, jfloat v3, jlong function_pointer) { + glUniform4fPROC glUniform4f = (glUniform4fPROC)((intptr_t)function_pointer); + glUniform4f(location, v0, v1, v2, v3); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglUniform1i(JNIEnv *env, jclass clazz, jint location, jint v0, jlong function_pointer) { + glUniform1iPROC glUniform1i = (glUniform1iPROC)((intptr_t)function_pointer); + glUniform1i(location, v0); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglUniform2i(JNIEnv *env, jclass clazz, jint location, jint v0, jint v1, jlong function_pointer) { + glUniform2iPROC glUniform2i = (glUniform2iPROC)((intptr_t)function_pointer); + glUniform2i(location, v0, v1); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglUniform3i(JNIEnv *env, jclass clazz, jint location, jint v0, jint v1, jint v2, jlong function_pointer) { + glUniform3iPROC glUniform3i = (glUniform3iPROC)((intptr_t)function_pointer); + glUniform3i(location, v0, v1, v2); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglUniform4i(JNIEnv *env, jclass clazz, jint location, jint v0, jint v1, jint v2, jint v3, jlong function_pointer) { + glUniform4iPROC glUniform4i = (glUniform4iPROC)((intptr_t)function_pointer); + glUniform4i(location, v0, v1, v2, v3); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglUniform1fv(JNIEnv *env, jclass clazz, jint location, jint count, jlong values, jlong function_pointer) { + const GLfloat *values_address = (const GLfloat *)(intptr_t)values; + glUniform1fvPROC glUniform1fv = (glUniform1fvPROC)((intptr_t)function_pointer); + glUniform1fv(location, count, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglUniform2fv(JNIEnv *env, jclass clazz, jint location, jint count, jlong values, jlong function_pointer) { + const GLfloat *values_address = (const GLfloat *)(intptr_t)values; + glUniform2fvPROC glUniform2fv = (glUniform2fvPROC)((intptr_t)function_pointer); + glUniform2fv(location, count, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglUniform3fv(JNIEnv *env, jclass clazz, jint location, jint count, jlong values, jlong function_pointer) { + const GLfloat *values_address = (const GLfloat *)(intptr_t)values; + glUniform3fvPROC glUniform3fv = (glUniform3fvPROC)((intptr_t)function_pointer); + glUniform3fv(location, count, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglUniform4fv(JNIEnv *env, jclass clazz, jint location, jint count, jlong values, jlong function_pointer) { + const GLfloat *values_address = (const GLfloat *)(intptr_t)values; + glUniform4fvPROC glUniform4fv = (glUniform4fvPROC)((intptr_t)function_pointer); + glUniform4fv(location, count, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglUniform1iv(JNIEnv *env, jclass clazz, jint location, jint count, jlong values, jlong function_pointer) { + const GLint *values_address = (const GLint *)(intptr_t)values; + glUniform1ivPROC glUniform1iv = (glUniform1ivPROC)((intptr_t)function_pointer); + glUniform1iv(location, count, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglUniform2iv(JNIEnv *env, jclass clazz, jint location, jint count, jlong values, jlong function_pointer) { + const GLint *values_address = (const GLint *)(intptr_t)values; + glUniform2ivPROC glUniform2iv = (glUniform2ivPROC)((intptr_t)function_pointer); + glUniform2iv(location, count, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglUniform3iv(JNIEnv *env, jclass clazz, jint location, jint count, jlong values, jlong function_pointer) { + const GLint *values_address = (const GLint *)(intptr_t)values; + glUniform3ivPROC glUniform3iv = (glUniform3ivPROC)((intptr_t)function_pointer); + glUniform3iv(location, count, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglUniform4iv(JNIEnv *env, jclass clazz, jint location, jint count, jlong values, jlong function_pointer) { + const GLint *values_address = (const GLint *)(intptr_t)values; + glUniform4ivPROC glUniform4iv = (glUniform4ivPROC)((intptr_t)function_pointer); + glUniform4iv(location, count, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglUniformMatrix2fv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong matrices, jlong function_pointer) { + const GLfloat *matrices_address = (const GLfloat *)(intptr_t)matrices; + glUniformMatrix2fvPROC glUniformMatrix2fv = (glUniformMatrix2fvPROC)((intptr_t)function_pointer); + glUniformMatrix2fv(location, count, transpose, matrices_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglUniformMatrix3fv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong matrices, jlong function_pointer) { + const GLfloat *matrices_address = (const GLfloat *)(intptr_t)matrices; + glUniformMatrix3fvPROC glUniformMatrix3fv = (glUniformMatrix3fvPROC)((intptr_t)function_pointer); + glUniformMatrix3fv(location, count, transpose, matrices_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglUniformMatrix4fv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong matrices, jlong function_pointer) { + const GLfloat *matrices_address = (const GLfloat *)(intptr_t)matrices; + glUniformMatrix4fvPROC glUniformMatrix4fv = (glUniformMatrix4fvPROC)((intptr_t)function_pointer); + glUniformMatrix4fv(location, count, transpose, matrices_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglGetShaderiv(JNIEnv *env, jclass clazz, jint shader, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetShaderivPROC glGetShaderiv = (glGetShaderivPROC)((intptr_t)function_pointer); + glGetShaderiv(shader, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglGetProgramiv(JNIEnv *env, jclass clazz, jint program, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetProgramivPROC glGetProgramiv = (glGetProgramivPROC)((intptr_t)function_pointer); + glGetProgramiv(program, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglGetShaderInfoLog(JNIEnv *env, jclass clazz, jint shader, jint maxLength, jlong length, jlong infoLog, jlong function_pointer) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLchar *infoLog_address = (GLchar *)(intptr_t)infoLog; + glGetShaderInfoLogPROC glGetShaderInfoLog = (glGetShaderInfoLogPROC)((intptr_t)function_pointer); + glGetShaderInfoLog(shader, maxLength, length_address, infoLog_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglGetProgramInfoLog(JNIEnv *env, jclass clazz, jint program, jint maxLength, jlong length, jlong infoLog, jlong function_pointer) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLchar *infoLog_address = (GLchar *)(intptr_t)infoLog; + glGetProgramInfoLogPROC glGetProgramInfoLog = (glGetProgramInfoLogPROC)((intptr_t)function_pointer); + glGetProgramInfoLog(program, maxLength, length_address, infoLog_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglGetAttachedShaders(JNIEnv *env, jclass clazz, jint program, jint maxCount, jlong count, jlong shaders, jlong function_pointer) { + GLsizei *count_address = (GLsizei *)(intptr_t)count; + GLuint *shaders_address = (GLuint *)(intptr_t)shaders; + glGetAttachedShadersPROC glGetAttachedShaders = (glGetAttachedShadersPROC)((intptr_t)function_pointer); + glGetAttachedShaders(program, maxCount, count_address, shaders_address); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL20_nglGetUniformLocation(JNIEnv *env, jclass clazz, jint program, jlong name, jlong function_pointer) { + const GLchar *name_address = (const GLchar *)(intptr_t)name; + glGetUniformLocationPROC glGetUniformLocation = (glGetUniformLocationPROC)((intptr_t)function_pointer); + GLint __result = glGetUniformLocation(program, name_address); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglGetActiveUniform(JNIEnv *env, jclass clazz, jint program, jint index, jint maxLength, jlong length, jlong size, jlong type, jlong name, jlong function_pointer) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLsizei *size_address = (GLsizei *)(intptr_t)size; + GLenum *type_address = (GLenum *)(intptr_t)type; + GLchar *name_address = (GLchar *)(intptr_t)name; + glGetActiveUniformPROC glGetActiveUniform = (glGetActiveUniformPROC)((intptr_t)function_pointer); + glGetActiveUniform(program, index, maxLength, length_address, size_address, type_address, name_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglGetUniformfv(JNIEnv *env, jclass clazz, jint program, jint location, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetUniformfvPROC glGetUniformfv = (glGetUniformfvPROC)((intptr_t)function_pointer); + glGetUniformfv(program, location, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglGetUniformiv(JNIEnv *env, jclass clazz, jint program, jint location, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetUniformivPROC glGetUniformiv = (glGetUniformivPROC)((intptr_t)function_pointer); + glGetUniformiv(program, location, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglGetShaderSource(JNIEnv *env, jclass clazz, jint shader, jint maxLength, jlong length, jlong source, jlong function_pointer) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLchar *source_address = (GLchar *)(intptr_t)source; + glGetShaderSourcePROC glGetShaderSource = (glGetShaderSourcePROC)((intptr_t)function_pointer); + glGetShaderSource(shader, maxLength, length_address, source_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglVertexAttrib1s(JNIEnv *env, jclass clazz, jint index, jshort x, jlong function_pointer) { + glVertexAttrib1sPROC glVertexAttrib1s = (glVertexAttrib1sPROC)((intptr_t)function_pointer); + glVertexAttrib1s(index, x); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglVertexAttrib1f(JNIEnv *env, jclass clazz, jint index, jfloat x, jlong function_pointer) { + glVertexAttrib1fPROC glVertexAttrib1f = (glVertexAttrib1fPROC)((intptr_t)function_pointer); + glVertexAttrib1f(index, x); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglVertexAttrib1d(JNIEnv *env, jclass clazz, jint index, jdouble x, jlong function_pointer) { + glVertexAttrib1dPROC glVertexAttrib1d = (glVertexAttrib1dPROC)((intptr_t)function_pointer); + glVertexAttrib1d(index, x); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglVertexAttrib2s(JNIEnv *env, jclass clazz, jint index, jshort x, jshort y, jlong function_pointer) { + glVertexAttrib2sPROC glVertexAttrib2s = (glVertexAttrib2sPROC)((intptr_t)function_pointer); + glVertexAttrib2s(index, x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglVertexAttrib2f(JNIEnv *env, jclass clazz, jint index, jfloat x, jfloat y, jlong function_pointer) { + glVertexAttrib2fPROC glVertexAttrib2f = (glVertexAttrib2fPROC)((intptr_t)function_pointer); + glVertexAttrib2f(index, x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglVertexAttrib2d(JNIEnv *env, jclass clazz, jint index, jdouble x, jdouble y, jlong function_pointer) { + glVertexAttrib2dPROC glVertexAttrib2d = (glVertexAttrib2dPROC)((intptr_t)function_pointer); + glVertexAttrib2d(index, x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglVertexAttrib3s(JNIEnv *env, jclass clazz, jint index, jshort x, jshort y, jshort z, jlong function_pointer) { + glVertexAttrib3sPROC glVertexAttrib3s = (glVertexAttrib3sPROC)((intptr_t)function_pointer); + glVertexAttrib3s(index, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglVertexAttrib3f(JNIEnv *env, jclass clazz, jint index, jfloat x, jfloat y, jfloat z, jlong function_pointer) { + glVertexAttrib3fPROC glVertexAttrib3f = (glVertexAttrib3fPROC)((intptr_t)function_pointer); + glVertexAttrib3f(index, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglVertexAttrib3d(JNIEnv *env, jclass clazz, jint index, jdouble x, jdouble y, jdouble z, jlong function_pointer) { + glVertexAttrib3dPROC glVertexAttrib3d = (glVertexAttrib3dPROC)((intptr_t)function_pointer); + glVertexAttrib3d(index, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglVertexAttrib4s(JNIEnv *env, jclass clazz, jint index, jshort x, jshort y, jshort z, jshort w, jlong function_pointer) { + glVertexAttrib4sPROC glVertexAttrib4s = (glVertexAttrib4sPROC)((intptr_t)function_pointer); + glVertexAttrib4s(index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglVertexAttrib4f(JNIEnv *env, jclass clazz, jint index, jfloat x, jfloat y, jfloat z, jfloat w, jlong function_pointer) { + glVertexAttrib4fPROC glVertexAttrib4f = (glVertexAttrib4fPROC)((intptr_t)function_pointer); + glVertexAttrib4f(index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglVertexAttrib4d(JNIEnv *env, jclass clazz, jint index, jdouble x, jdouble y, jdouble z, jdouble w, jlong function_pointer) { + glVertexAttrib4dPROC glVertexAttrib4d = (glVertexAttrib4dPROC)((intptr_t)function_pointer); + glVertexAttrib4d(index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglVertexAttrib4Nub(JNIEnv *env, jclass clazz, jint index, jbyte x, jbyte y, jbyte z, jbyte w, jlong function_pointer) { + glVertexAttrib4NubPROC glVertexAttrib4Nub = (glVertexAttrib4NubPROC)((intptr_t)function_pointer); + glVertexAttrib4Nub(index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglVertexAttribPointer(JNIEnv *env, jclass clazz, jint index, jint size, jint type, jboolean normalized, jint stride, jlong buffer, jlong function_pointer) { + const GLvoid *buffer_address = (const GLvoid *)(intptr_t)buffer; + glVertexAttribPointerPROC glVertexAttribPointer = (glVertexAttribPointerPROC)((intptr_t)function_pointer); + glVertexAttribPointer(index, size, type, normalized, stride, buffer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglVertexAttribPointerBO(JNIEnv *env, jclass clazz, jint index, jint size, jint type, jboolean normalized, jint stride, jlong buffer_buffer_offset, jlong function_pointer) { + const GLvoid *buffer_address = (const GLvoid *)(intptr_t)offsetToPointer(buffer_buffer_offset); + glVertexAttribPointerPROC glVertexAttribPointer = (glVertexAttribPointerPROC)((intptr_t)function_pointer); + glVertexAttribPointer(index, size, type, normalized, stride, buffer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglEnableVertexAttribArray(JNIEnv *env, jclass clazz, jint index, jlong function_pointer) { + glEnableVertexAttribArrayPROC glEnableVertexAttribArray = (glEnableVertexAttribArrayPROC)((intptr_t)function_pointer); + glEnableVertexAttribArray(index); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglDisableVertexAttribArray(JNIEnv *env, jclass clazz, jint index, jlong function_pointer) { + glDisableVertexAttribArrayPROC glDisableVertexAttribArray = (glDisableVertexAttribArrayPROC)((intptr_t)function_pointer); + glDisableVertexAttribArray(index); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglGetVertexAttribfv(JNIEnv *env, jclass clazz, jint index, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetVertexAttribfvPROC glGetVertexAttribfv = (glGetVertexAttribfvPROC)((intptr_t)function_pointer); + glGetVertexAttribfv(index, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglGetVertexAttribdv(JNIEnv *env, jclass clazz, jint index, jint pname, jlong params, jlong function_pointer) { + GLdouble *params_address = (GLdouble *)(intptr_t)params; + glGetVertexAttribdvPROC glGetVertexAttribdv = (glGetVertexAttribdvPROC)((intptr_t)function_pointer); + glGetVertexAttribdv(index, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglGetVertexAttribiv(JNIEnv *env, jclass clazz, jint index, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetVertexAttribivPROC glGetVertexAttribiv = (glGetVertexAttribivPROC)((intptr_t)function_pointer); + glGetVertexAttribiv(index, pname, params_address); +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_GL20_nglGetVertexAttribPointerv(JNIEnv *env, jclass clazz, jint index, jint pname, jlong result_size, jlong function_pointer) { + glGetVertexAttribPointervPROC glGetVertexAttribPointerv = (glGetVertexAttribPointervPROC)((intptr_t)function_pointer); + GLvoid * __result; + glGetVertexAttribPointerv(index, pname, &__result); + return safeNewBuffer(env, __result, result_size); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglGetVertexAttribPointerv2(JNIEnv *env, jclass clazz, jint index, jint pname, jlong pointer, jlong function_pointer) { + GLvoid *pointer_address = (GLvoid *)(intptr_t)pointer; + glGetVertexAttribPointervPROC glGetVertexAttribPointerv = (glGetVertexAttribPointervPROC)((intptr_t)function_pointer); + glGetVertexAttribPointerv(index, pname, pointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglBindAttribLocation(JNIEnv *env, jclass clazz, jint program, jint index, jlong name, jlong function_pointer) { + const GLchar *name_address = (const GLchar *)(intptr_t)name; + glBindAttribLocationPROC glBindAttribLocation = (glBindAttribLocationPROC)((intptr_t)function_pointer); + glBindAttribLocation(program, index, name_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglGetActiveAttrib(JNIEnv *env, jclass clazz, jint program, jint index, jint maxLength, jlong length, jlong size, jlong type, jlong name, jlong function_pointer) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLint *size_address = (GLint *)(intptr_t)size; + GLenum *type_address = (GLenum *)(intptr_t)type; + GLchar *name_address = (GLchar *)(intptr_t)name; + glGetActiveAttribPROC glGetActiveAttrib = (glGetActiveAttribPROC)((intptr_t)function_pointer); + glGetActiveAttrib(program, index, maxLength, length_address, size_address, type_address, name_address); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL20_nglGetAttribLocation(JNIEnv *env, jclass clazz, jint program, jlong name, jlong function_pointer) { + const GLchar *name_address = (const GLchar *)(intptr_t)name; + glGetAttribLocationPROC glGetAttribLocation = (glGetAttribLocationPROC)((intptr_t)function_pointer); + GLint __result = glGetAttribLocation(program, name_address); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglDrawBuffers(JNIEnv *env, jclass clazz, jint size, jlong buffers, jlong function_pointer) { + const GLenum *buffers_address = (const GLenum *)(intptr_t)buffers; + glDrawBuffersPROC glDrawBuffers = (glDrawBuffersPROC)((intptr_t)function_pointer); + glDrawBuffers(size, buffers_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglStencilOpSeparate(JNIEnv *env, jclass clazz, jint face, jint sfail, jint dpfail, jint dppass, jlong function_pointer) { + glStencilOpSeparatePROC glStencilOpSeparate = (glStencilOpSeparatePROC)((intptr_t)function_pointer); + glStencilOpSeparate(face, sfail, dpfail, dppass); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglStencilFuncSeparate(JNIEnv *env, jclass clazz, jint face, jint func, jint ref, jint mask, jlong function_pointer) { + glStencilFuncSeparatePROC glStencilFuncSeparate = (glStencilFuncSeparatePROC)((intptr_t)function_pointer); + glStencilFuncSeparate(face, func, ref, mask); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglStencilMaskSeparate(JNIEnv *env, jclass clazz, jint face, jint mask, jlong function_pointer) { + glStencilMaskSeparatePROC glStencilMaskSeparate = (glStencilMaskSeparatePROC)((intptr_t)function_pointer); + glStencilMaskSeparate(face, mask); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL20_nglBlendEquationSeparate(JNIEnv *env, jclass clazz, jint modeRGB, jint modeAlpha, jlong function_pointer) { + glBlendEquationSeparatePROC glBlendEquationSeparate = (glBlendEquationSeparatePROC)((intptr_t)function_pointer); + glBlendEquationSeparate(modeRGB, modeAlpha); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL21.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL21.c new file mode 100644 index 0000000..aa48f7f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL21.c @@ -0,0 +1,48 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glUniformMatrix2x3fvPROC) (GLint location, GLsizei count, GLboolean transpose, GLfloat * matrices); +typedef void (APIENTRY *glUniformMatrix3x2fvPROC) (GLint location, GLsizei count, GLboolean transpose, GLfloat * matrices); +typedef void (APIENTRY *glUniformMatrix2x4fvPROC) (GLint location, GLsizei count, GLboolean transpose, GLfloat * matrices); +typedef void (APIENTRY *glUniformMatrix4x2fvPROC) (GLint location, GLsizei count, GLboolean transpose, GLfloat * matrices); +typedef void (APIENTRY *glUniformMatrix3x4fvPROC) (GLint location, GLsizei count, GLboolean transpose, GLfloat * matrices); +typedef void (APIENTRY *glUniformMatrix4x3fvPROC) (GLint location, GLsizei count, GLboolean transpose, GLfloat * matrices); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL21_nglUniformMatrix2x3fv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong matrices, jlong function_pointer) { + GLfloat *matrices_address = (GLfloat *)(intptr_t)matrices; + glUniformMatrix2x3fvPROC glUniformMatrix2x3fv = (glUniformMatrix2x3fvPROC)((intptr_t)function_pointer); + glUniformMatrix2x3fv(location, count, transpose, matrices_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL21_nglUniformMatrix3x2fv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong matrices, jlong function_pointer) { + GLfloat *matrices_address = (GLfloat *)(intptr_t)matrices; + glUniformMatrix3x2fvPROC glUniformMatrix3x2fv = (glUniformMatrix3x2fvPROC)((intptr_t)function_pointer); + glUniformMatrix3x2fv(location, count, transpose, matrices_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL21_nglUniformMatrix2x4fv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong matrices, jlong function_pointer) { + GLfloat *matrices_address = (GLfloat *)(intptr_t)matrices; + glUniformMatrix2x4fvPROC glUniformMatrix2x4fv = (glUniformMatrix2x4fvPROC)((intptr_t)function_pointer); + glUniformMatrix2x4fv(location, count, transpose, matrices_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL21_nglUniformMatrix4x2fv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong matrices, jlong function_pointer) { + GLfloat *matrices_address = (GLfloat *)(intptr_t)matrices; + glUniformMatrix4x2fvPROC glUniformMatrix4x2fv = (glUniformMatrix4x2fvPROC)((intptr_t)function_pointer); + glUniformMatrix4x2fv(location, count, transpose, matrices_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL21_nglUniformMatrix3x4fv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong matrices, jlong function_pointer) { + GLfloat *matrices_address = (GLfloat *)(intptr_t)matrices; + glUniformMatrix3x4fvPROC glUniformMatrix3x4fv = (glUniformMatrix3x4fvPROC)((intptr_t)function_pointer); + glUniformMatrix3x4fv(location, count, transpose, matrices_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL21_nglUniformMatrix4x3fv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong matrices, jlong function_pointer) { + GLfloat *matrices_address = (GLfloat *)(intptr_t)matrices; + glUniformMatrix4x3fvPROC glUniformMatrix4x3fv = (glUniformMatrix4x3fvPROC)((intptr_t)function_pointer); + glUniformMatrix4x3fv(location, count, transpose, matrices_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL30.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL30.c new file mode 100644 index 0000000..2b569e4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL30.c @@ -0,0 +1,578 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GLubyte * (APIENTRY *glGetStringiPROC) (GLenum name, GLuint index); +typedef void (APIENTRY *glClearBufferfvPROC) (GLenum buffer, GLint drawbuffer, const GLfloat * value); +typedef void (APIENTRY *glClearBufferivPROC) (GLenum buffer, GLint drawbuffer, const GLint * value); +typedef void (APIENTRY *glClearBufferuivPROC) (GLenum buffer, GLint drawbuffer, const GLint * value); +typedef void (APIENTRY *glClearBufferfiPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +typedef void (APIENTRY *glVertexAttribI1iPROC) (GLuint index, GLint x); +typedef void (APIENTRY *glVertexAttribI2iPROC) (GLuint index, GLint x, GLint y); +typedef void (APIENTRY *glVertexAttribI3iPROC) (GLuint index, GLint x, GLint y, GLint z); +typedef void (APIENTRY *glVertexAttribI4iPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRY *glVertexAttribI1uiPROC) (GLuint index, GLuint x); +typedef void (APIENTRY *glVertexAttribI2uiPROC) (GLuint index, GLuint x, GLuint y); +typedef void (APIENTRY *glVertexAttribI3uiPROC) (GLuint index, GLuint x, GLuint y, GLuint z); +typedef void (APIENTRY *glVertexAttribI4uiPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRY *glVertexAttribI1ivPROC) (GLuint index, const GLint * v); +typedef void (APIENTRY *glVertexAttribI2ivPROC) (GLuint index, const GLint * v); +typedef void (APIENTRY *glVertexAttribI3ivPROC) (GLuint index, const GLint * v); +typedef void (APIENTRY *glVertexAttribI4ivPROC) (GLuint index, const GLint * v); +typedef void (APIENTRY *glVertexAttribI1uivPROC) (GLuint index, const GLuint * v); +typedef void (APIENTRY *glVertexAttribI2uivPROC) (GLuint index, const GLuint * v); +typedef void (APIENTRY *glVertexAttribI3uivPROC) (GLuint index, const GLuint * v); +typedef void (APIENTRY *glVertexAttribI4uivPROC) (GLuint index, const GLuint * v); +typedef void (APIENTRY *glVertexAttribI4bvPROC) (GLuint index, const GLbyte * v); +typedef void (APIENTRY *glVertexAttribI4svPROC) (GLuint index, const GLshort * v); +typedef void (APIENTRY *glVertexAttribI4ubvPROC) (GLuint index, const GLubyte * v); +typedef void (APIENTRY *glVertexAttribI4usvPROC) (GLuint index, const GLushort * v); +typedef void (APIENTRY *glVertexAttribIPointerPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * buffer); +typedef void (APIENTRY *glGetVertexAttribIivPROC) (GLuint index, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetVertexAttribIuivPROC) (GLuint index, GLenum pname, GLuint * params); +typedef void (APIENTRY *glUniform1uiPROC) (GLint location, GLuint v0); +typedef void (APIENTRY *glUniform2uiPROC) (GLint location, GLuint v0, GLuint v1); +typedef void (APIENTRY *glUniform3uiPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef void (APIENTRY *glUniform4uiPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef void (APIENTRY *glUniform1uivPROC) (GLint location, GLsizei count, const GLuint * value); +typedef void (APIENTRY *glUniform2uivPROC) (GLint location, GLsizei count, const GLuint * value); +typedef void (APIENTRY *glUniform3uivPROC) (GLint location, GLsizei count, const GLuint * value); +typedef void (APIENTRY *glUniform4uivPROC) (GLint location, GLsizei count, const GLuint * value); +typedef void (APIENTRY *glGetUniformuivPROC) (GLuint program, GLint location, GLuint * params); +typedef void (APIENTRY *glBindFragDataLocationPROC) (GLuint program, GLuint colorNumber, const GLchar * name); +typedef GLint (APIENTRY *glGetFragDataLocationPROC) (GLuint program, const GLchar * name); +typedef void (APIENTRY *glBeginConditionalRenderPROC) (GLuint id, GLenum mode); +typedef void (APIENTRY *glEndConditionalRenderPROC) (); +typedef GLvoid * (APIENTRY *glMapBufferRangePROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef void (APIENTRY *glFlushMappedBufferRangePROC) (GLenum target, GLintptr offset, GLsizeiptr length); +typedef void (APIENTRY *glClampColorPROC) (GLenum target, GLenum clamp); +typedef GLboolean (APIENTRY *glIsRenderbufferPROC) (GLuint renderbuffer); +typedef void (APIENTRY *glBindRenderbufferPROC) (GLenum target, GLuint renderbuffer); +typedef void (APIENTRY *glDeleteRenderbuffersPROC) (GLint n, const GLuint * renderbuffers); +typedef void (APIENTRY *glGenRenderbuffersPROC) (GLint n, GLuint * renderbuffers); +typedef void (APIENTRY *glRenderbufferStoragePROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRY *glGetRenderbufferParameterivPROC) (GLenum target, GLenum pname, GLint * params); +typedef GLboolean (APIENTRY *glIsFramebufferPROC) (GLuint framebuffer); +typedef void (APIENTRY *glBindFramebufferPROC) (GLenum target, GLuint framebuffer); +typedef void (APIENTRY *glDeleteFramebuffersPROC) (GLint n, const GLuint * framebuffers); +typedef void (APIENTRY *glGenFramebuffersPROC) (GLint n, GLuint * framebuffers); +typedef GLenum (APIENTRY *glCheckFramebufferStatusPROC) (GLenum target); +typedef void (APIENTRY *glFramebufferTexture1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRY *glFramebufferTexture2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef void (APIENTRY *glFramebufferTexture3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); +typedef void (APIENTRY *glFramebufferRenderbufferPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef void (APIENTRY *glGetFramebufferAttachmentParameterivPROC) (GLenum target, GLenum attachment, GLenum pname, GLint * params); +typedef void (APIENTRY *glGenerateMipmapPROC) (GLenum target); +typedef void (APIENTRY *glRenderbufferStorageMultisamplePROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRY *glBlitFramebufferPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +typedef void (APIENTRY *glTexParameterIivPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRY *glTexParameterIuivPROC) (GLenum target, GLenum pname, GLuint * params); +typedef void (APIENTRY *glGetTexParameterIivPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetTexParameterIuivPROC) (GLenum target, GLenum pname, GLuint * params); +typedef void (APIENTRY *glFramebufferTextureLayerPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef void (APIENTRY *glColorMaskiPROC) (GLuint buf, GLboolean r, GLboolean g, GLboolean b, GLboolean a); +typedef void (APIENTRY *glGetBooleani_vPROC) (GLenum value, GLuint index, GLboolean * data); +typedef void (APIENTRY *glGetIntegeri_vPROC) (GLenum value, GLuint index, GLint * data); +typedef void (APIENTRY *glEnableiPROC) (GLenum target, GLuint index); +typedef void (APIENTRY *glDisableiPROC) (GLenum target, GLuint index); +typedef GLboolean (APIENTRY *glIsEnablediPROC) (GLenum target, GLuint index); +typedef void (APIENTRY *glBindBufferRangePROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRY *glBindBufferBasePROC) (GLenum target, GLuint index, GLuint buffer); +typedef void (APIENTRY *glBeginTransformFeedbackPROC) (GLenum primitiveMode); +typedef void (APIENTRY *glEndTransformFeedbackPROC) (); +typedef void (APIENTRY *glTransformFeedbackVaryingsPROC) (GLuint program, GLsizei count, const GLchar ** varyings, GLenum bufferMode); +typedef void (APIENTRY *glGetTransformFeedbackVaryingPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name); +typedef void (APIENTRY *glBindVertexArrayPROC) (GLuint array); +typedef void (APIENTRY *glDeleteVertexArraysPROC) (GLsizei n, const GLuint * arrays); +typedef void (APIENTRY *glGenVertexArraysPROC) (GLsizei n, GLuint * arrays); +typedef GLboolean (APIENTRY *glIsVertexArrayPROC) (GLuint array); + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_GL30_nglGetStringi(JNIEnv *env, jclass clazz, jint name, jint index, jlong function_pointer) { + glGetStringiPROC glGetStringi = (glGetStringiPROC)((intptr_t)function_pointer); + GLubyte * __result = glGetStringi(name, index); + return NewStringNativeUnsigned(env, __result); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglClearBufferfv(JNIEnv *env, jclass clazz, jint buffer, jint drawbuffer, jlong value, jlong function_pointer) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glClearBufferfvPROC glClearBufferfv = (glClearBufferfvPROC)((intptr_t)function_pointer); + glClearBufferfv(buffer, drawbuffer, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglClearBufferiv(JNIEnv *env, jclass clazz, jint buffer, jint drawbuffer, jlong value, jlong function_pointer) { + const GLint *value_address = (const GLint *)(intptr_t)value; + glClearBufferivPROC glClearBufferiv = (glClearBufferivPROC)((intptr_t)function_pointer); + glClearBufferiv(buffer, drawbuffer, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglClearBufferuiv(JNIEnv *env, jclass clazz, jint buffer, jint drawbuffer, jlong value, jlong function_pointer) { + const GLint *value_address = (const GLint *)(intptr_t)value; + glClearBufferuivPROC glClearBufferuiv = (glClearBufferuivPROC)((intptr_t)function_pointer); + glClearBufferuiv(buffer, drawbuffer, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglClearBufferfi(JNIEnv *env, jclass clazz, jint buffer, jint drawbuffer, jfloat depth, jint stencil, jlong function_pointer) { + glClearBufferfiPROC glClearBufferfi = (glClearBufferfiPROC)((intptr_t)function_pointer); + glClearBufferfi(buffer, drawbuffer, depth, stencil); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglVertexAttribI1i(JNIEnv *env, jclass clazz, jint index, jint x, jlong function_pointer) { + glVertexAttribI1iPROC glVertexAttribI1i = (glVertexAttribI1iPROC)((intptr_t)function_pointer); + glVertexAttribI1i(index, x); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglVertexAttribI2i(JNIEnv *env, jclass clazz, jint index, jint x, jint y, jlong function_pointer) { + glVertexAttribI2iPROC glVertexAttribI2i = (glVertexAttribI2iPROC)((intptr_t)function_pointer); + glVertexAttribI2i(index, x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglVertexAttribI3i(JNIEnv *env, jclass clazz, jint index, jint x, jint y, jint z, jlong function_pointer) { + glVertexAttribI3iPROC glVertexAttribI3i = (glVertexAttribI3iPROC)((intptr_t)function_pointer); + glVertexAttribI3i(index, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglVertexAttribI4i(JNIEnv *env, jclass clazz, jint index, jint x, jint y, jint z, jint w, jlong function_pointer) { + glVertexAttribI4iPROC glVertexAttribI4i = (glVertexAttribI4iPROC)((intptr_t)function_pointer); + glVertexAttribI4i(index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglVertexAttribI1ui(JNIEnv *env, jclass clazz, jint index, jint x, jlong function_pointer) { + glVertexAttribI1uiPROC glVertexAttribI1ui = (glVertexAttribI1uiPROC)((intptr_t)function_pointer); + glVertexAttribI1ui(index, x); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglVertexAttribI2ui(JNIEnv *env, jclass clazz, jint index, jint x, jint y, jlong function_pointer) { + glVertexAttribI2uiPROC glVertexAttribI2ui = (glVertexAttribI2uiPROC)((intptr_t)function_pointer); + glVertexAttribI2ui(index, x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglVertexAttribI3ui(JNIEnv *env, jclass clazz, jint index, jint x, jint y, jint z, jlong function_pointer) { + glVertexAttribI3uiPROC glVertexAttribI3ui = (glVertexAttribI3uiPROC)((intptr_t)function_pointer); + glVertexAttribI3ui(index, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglVertexAttribI4ui(JNIEnv *env, jclass clazz, jint index, jint x, jint y, jint z, jint w, jlong function_pointer) { + glVertexAttribI4uiPROC glVertexAttribI4ui = (glVertexAttribI4uiPROC)((intptr_t)function_pointer); + glVertexAttribI4ui(index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglVertexAttribI1iv(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLint *v_address = (const GLint *)(intptr_t)v; + glVertexAttribI1ivPROC glVertexAttribI1iv = (glVertexAttribI1ivPROC)((intptr_t)function_pointer); + glVertexAttribI1iv(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglVertexAttribI2iv(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLint *v_address = (const GLint *)(intptr_t)v; + glVertexAttribI2ivPROC glVertexAttribI2iv = (glVertexAttribI2ivPROC)((intptr_t)function_pointer); + glVertexAttribI2iv(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglVertexAttribI3iv(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLint *v_address = (const GLint *)(intptr_t)v; + glVertexAttribI3ivPROC glVertexAttribI3iv = (glVertexAttribI3ivPROC)((intptr_t)function_pointer); + glVertexAttribI3iv(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglVertexAttribI4iv(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLint *v_address = (const GLint *)(intptr_t)v; + glVertexAttribI4ivPROC glVertexAttribI4iv = (glVertexAttribI4ivPROC)((intptr_t)function_pointer); + glVertexAttribI4iv(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglVertexAttribI1uiv(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLuint *v_address = (const GLuint *)(intptr_t)v; + glVertexAttribI1uivPROC glVertexAttribI1uiv = (glVertexAttribI1uivPROC)((intptr_t)function_pointer); + glVertexAttribI1uiv(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglVertexAttribI2uiv(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLuint *v_address = (const GLuint *)(intptr_t)v; + glVertexAttribI2uivPROC glVertexAttribI2uiv = (glVertexAttribI2uivPROC)((intptr_t)function_pointer); + glVertexAttribI2uiv(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglVertexAttribI3uiv(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLuint *v_address = (const GLuint *)(intptr_t)v; + glVertexAttribI3uivPROC glVertexAttribI3uiv = (glVertexAttribI3uivPROC)((intptr_t)function_pointer); + glVertexAttribI3uiv(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglVertexAttribI4uiv(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLuint *v_address = (const GLuint *)(intptr_t)v; + glVertexAttribI4uivPROC glVertexAttribI4uiv = (glVertexAttribI4uivPROC)((intptr_t)function_pointer); + glVertexAttribI4uiv(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglVertexAttribI4bv(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLbyte *v_address = (const GLbyte *)(intptr_t)v; + glVertexAttribI4bvPROC glVertexAttribI4bv = (glVertexAttribI4bvPROC)((intptr_t)function_pointer); + glVertexAttribI4bv(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglVertexAttribI4sv(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLshort *v_address = (const GLshort *)(intptr_t)v; + glVertexAttribI4svPROC glVertexAttribI4sv = (glVertexAttribI4svPROC)((intptr_t)function_pointer); + glVertexAttribI4sv(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglVertexAttribI4ubv(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLubyte *v_address = (const GLubyte *)(intptr_t)v; + glVertexAttribI4ubvPROC glVertexAttribI4ubv = (glVertexAttribI4ubvPROC)((intptr_t)function_pointer); + glVertexAttribI4ubv(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglVertexAttribI4usv(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLushort *v_address = (const GLushort *)(intptr_t)v; + glVertexAttribI4usvPROC glVertexAttribI4usv = (glVertexAttribI4usvPROC)((intptr_t)function_pointer); + glVertexAttribI4usv(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglVertexAttribIPointer(JNIEnv *env, jclass clazz, jint index, jint size, jint type, jint stride, jlong buffer, jlong function_pointer) { + const GLvoid *buffer_address = (const GLvoid *)(intptr_t)buffer; + glVertexAttribIPointerPROC glVertexAttribIPointer = (glVertexAttribIPointerPROC)((intptr_t)function_pointer); + glVertexAttribIPointer(index, size, type, stride, buffer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglVertexAttribIPointerBO(JNIEnv *env, jclass clazz, jint index, jint size, jint type, jint stride, jlong buffer_buffer_offset, jlong function_pointer) { + const GLvoid *buffer_address = (const GLvoid *)(intptr_t)offsetToPointer(buffer_buffer_offset); + glVertexAttribIPointerPROC glVertexAttribIPointer = (glVertexAttribIPointerPROC)((intptr_t)function_pointer); + glVertexAttribIPointer(index, size, type, stride, buffer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglGetVertexAttribIiv(JNIEnv *env, jclass clazz, jint index, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetVertexAttribIivPROC glGetVertexAttribIiv = (glGetVertexAttribIivPROC)((intptr_t)function_pointer); + glGetVertexAttribIiv(index, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglGetVertexAttribIuiv(JNIEnv *env, jclass clazz, jint index, jint pname, jlong params, jlong function_pointer) { + GLuint *params_address = (GLuint *)(intptr_t)params; + glGetVertexAttribIuivPROC glGetVertexAttribIuiv = (glGetVertexAttribIuivPROC)((intptr_t)function_pointer); + glGetVertexAttribIuiv(index, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglUniform1ui(JNIEnv *env, jclass clazz, jint location, jint v0, jlong function_pointer) { + glUniform1uiPROC glUniform1ui = (glUniform1uiPROC)((intptr_t)function_pointer); + glUniform1ui(location, v0); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglUniform2ui(JNIEnv *env, jclass clazz, jint location, jint v0, jint v1, jlong function_pointer) { + glUniform2uiPROC glUniform2ui = (glUniform2uiPROC)((intptr_t)function_pointer); + glUniform2ui(location, v0, v1); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglUniform3ui(JNIEnv *env, jclass clazz, jint location, jint v0, jint v1, jint v2, jlong function_pointer) { + glUniform3uiPROC glUniform3ui = (glUniform3uiPROC)((intptr_t)function_pointer); + glUniform3ui(location, v0, v1, v2); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglUniform4ui(JNIEnv *env, jclass clazz, jint location, jint v0, jint v1, jint v2, jint v3, jlong function_pointer) { + glUniform4uiPROC glUniform4ui = (glUniform4uiPROC)((intptr_t)function_pointer); + glUniform4ui(location, v0, v1, v2, v3); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglUniform1uiv(JNIEnv *env, jclass clazz, jint location, jint count, jlong value, jlong function_pointer) { + const GLuint *value_address = (const GLuint *)(intptr_t)value; + glUniform1uivPROC glUniform1uiv = (glUniform1uivPROC)((intptr_t)function_pointer); + glUniform1uiv(location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglUniform2uiv(JNIEnv *env, jclass clazz, jint location, jint count, jlong value, jlong function_pointer) { + const GLuint *value_address = (const GLuint *)(intptr_t)value; + glUniform2uivPROC glUniform2uiv = (glUniform2uivPROC)((intptr_t)function_pointer); + glUniform2uiv(location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglUniform3uiv(JNIEnv *env, jclass clazz, jint location, jint count, jlong value, jlong function_pointer) { + const GLuint *value_address = (const GLuint *)(intptr_t)value; + glUniform3uivPROC glUniform3uiv = (glUniform3uivPROC)((intptr_t)function_pointer); + glUniform3uiv(location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglUniform4uiv(JNIEnv *env, jclass clazz, jint location, jint count, jlong value, jlong function_pointer) { + const GLuint *value_address = (const GLuint *)(intptr_t)value; + glUniform4uivPROC glUniform4uiv = (glUniform4uivPROC)((intptr_t)function_pointer); + glUniform4uiv(location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglGetUniformuiv(JNIEnv *env, jclass clazz, jint program, jint location, jlong params, jlong function_pointer) { + GLuint *params_address = (GLuint *)(intptr_t)params; + glGetUniformuivPROC glGetUniformuiv = (glGetUniformuivPROC)((intptr_t)function_pointer); + glGetUniformuiv(program, location, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglBindFragDataLocation(JNIEnv *env, jclass clazz, jint program, jint colorNumber, jlong name, jlong function_pointer) { + const GLchar *name_address = (const GLchar *)(intptr_t)name; + glBindFragDataLocationPROC glBindFragDataLocation = (glBindFragDataLocationPROC)((intptr_t)function_pointer); + glBindFragDataLocation(program, colorNumber, name_address); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL30_nglGetFragDataLocation(JNIEnv *env, jclass clazz, jint program, jlong name, jlong function_pointer) { + const GLchar *name_address = (const GLchar *)(intptr_t)name; + glGetFragDataLocationPROC glGetFragDataLocation = (glGetFragDataLocationPROC)((intptr_t)function_pointer); + GLint __result = glGetFragDataLocation(program, name_address); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglBeginConditionalRender(JNIEnv *env, jclass clazz, jint id, jint mode, jlong function_pointer) { + glBeginConditionalRenderPROC glBeginConditionalRender = (glBeginConditionalRenderPROC)((intptr_t)function_pointer); + glBeginConditionalRender(id, mode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglEndConditionalRender(JNIEnv *env, jclass clazz, jlong function_pointer) { + glEndConditionalRenderPROC glEndConditionalRender = (glEndConditionalRenderPROC)((intptr_t)function_pointer); + glEndConditionalRender(); +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_GL30_nglMapBufferRange(JNIEnv *env, jclass clazz, jint target, jlong offset, jlong length, jint access, jobject old_buffer, jlong function_pointer) { + glMapBufferRangePROC glMapBufferRange = (glMapBufferRangePROC)((intptr_t)function_pointer); + GLvoid * __result = glMapBufferRange(target, offset, length, access); + return safeNewBufferCached(env, __result, length, old_buffer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglFlushMappedBufferRange(JNIEnv *env, jclass clazz, jint target, jlong offset, jlong length, jlong function_pointer) { + glFlushMappedBufferRangePROC glFlushMappedBufferRange = (glFlushMappedBufferRangePROC)((intptr_t)function_pointer); + glFlushMappedBufferRange(target, offset, length); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglClampColor(JNIEnv *env, jclass clazz, jint target, jint clamp, jlong function_pointer) { + glClampColorPROC glClampColor = (glClampColorPROC)((intptr_t)function_pointer); + glClampColor(target, clamp); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL30_nglIsRenderbuffer(JNIEnv *env, jclass clazz, jint renderbuffer, jlong function_pointer) { + glIsRenderbufferPROC glIsRenderbuffer = (glIsRenderbufferPROC)((intptr_t)function_pointer); + GLboolean __result = glIsRenderbuffer(renderbuffer); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglBindRenderbuffer(JNIEnv *env, jclass clazz, jint target, jint renderbuffer, jlong function_pointer) { + glBindRenderbufferPROC glBindRenderbuffer = (glBindRenderbufferPROC)((intptr_t)function_pointer); + glBindRenderbuffer(target, renderbuffer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglDeleteRenderbuffers(JNIEnv *env, jclass clazz, jint n, jlong renderbuffers, jlong function_pointer) { + const GLuint *renderbuffers_address = (const GLuint *)(intptr_t)renderbuffers; + glDeleteRenderbuffersPROC glDeleteRenderbuffers = (glDeleteRenderbuffersPROC)((intptr_t)function_pointer); + glDeleteRenderbuffers(n, renderbuffers_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglGenRenderbuffers(JNIEnv *env, jclass clazz, jint n, jlong renderbuffers, jlong function_pointer) { + GLuint *renderbuffers_address = (GLuint *)(intptr_t)renderbuffers; + glGenRenderbuffersPROC glGenRenderbuffers = (glGenRenderbuffersPROC)((intptr_t)function_pointer); + glGenRenderbuffers(n, renderbuffers_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglRenderbufferStorage(JNIEnv *env, jclass clazz, jint target, jint internalformat, jint width, jint height, jlong function_pointer) { + glRenderbufferStoragePROC glRenderbufferStorage = (glRenderbufferStoragePROC)((intptr_t)function_pointer); + glRenderbufferStorage(target, internalformat, width, height); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglGetRenderbufferParameteriv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetRenderbufferParameterivPROC glGetRenderbufferParameteriv = (glGetRenderbufferParameterivPROC)((intptr_t)function_pointer); + glGetRenderbufferParameteriv(target, pname, params_address); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL30_nglIsFramebuffer(JNIEnv *env, jclass clazz, jint framebuffer, jlong function_pointer) { + glIsFramebufferPROC glIsFramebuffer = (glIsFramebufferPROC)((intptr_t)function_pointer); + GLboolean __result = glIsFramebuffer(framebuffer); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglBindFramebuffer(JNIEnv *env, jclass clazz, jint target, jint framebuffer, jlong function_pointer) { + glBindFramebufferPROC glBindFramebuffer = (glBindFramebufferPROC)((intptr_t)function_pointer); + glBindFramebuffer(target, framebuffer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglDeleteFramebuffers(JNIEnv *env, jclass clazz, jint n, jlong framebuffers, jlong function_pointer) { + const GLuint *framebuffers_address = (const GLuint *)(intptr_t)framebuffers; + glDeleteFramebuffersPROC glDeleteFramebuffers = (glDeleteFramebuffersPROC)((intptr_t)function_pointer); + glDeleteFramebuffers(n, framebuffers_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglGenFramebuffers(JNIEnv *env, jclass clazz, jint n, jlong framebuffers, jlong function_pointer) { + GLuint *framebuffers_address = (GLuint *)(intptr_t)framebuffers; + glGenFramebuffersPROC glGenFramebuffers = (glGenFramebuffersPROC)((intptr_t)function_pointer); + glGenFramebuffers(n, framebuffers_address); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL30_nglCheckFramebufferStatus(JNIEnv *env, jclass clazz, jint target, jlong function_pointer) { + glCheckFramebufferStatusPROC glCheckFramebufferStatus = (glCheckFramebufferStatusPROC)((intptr_t)function_pointer); + GLenum __result = glCheckFramebufferStatus(target); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglFramebufferTexture1D(JNIEnv *env, jclass clazz, jint target, jint attachment, jint textarget, jint texture, jint level, jlong function_pointer) { + glFramebufferTexture1DPROC glFramebufferTexture1D = (glFramebufferTexture1DPROC)((intptr_t)function_pointer); + glFramebufferTexture1D(target, attachment, textarget, texture, level); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglFramebufferTexture2D(JNIEnv *env, jclass clazz, jint target, jint attachment, jint textarget, jint texture, jint level, jlong function_pointer) { + glFramebufferTexture2DPROC glFramebufferTexture2D = (glFramebufferTexture2DPROC)((intptr_t)function_pointer); + glFramebufferTexture2D(target, attachment, textarget, texture, level); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglFramebufferTexture3D(JNIEnv *env, jclass clazz, jint target, jint attachment, jint textarget, jint texture, jint level, jint zoffset, jlong function_pointer) { + glFramebufferTexture3DPROC glFramebufferTexture3D = (glFramebufferTexture3DPROC)((intptr_t)function_pointer); + glFramebufferTexture3D(target, attachment, textarget, texture, level, zoffset); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglFramebufferRenderbuffer(JNIEnv *env, jclass clazz, jint target, jint attachment, jint renderbuffertarget, jint renderbuffer, jlong function_pointer) { + glFramebufferRenderbufferPROC glFramebufferRenderbuffer = (glFramebufferRenderbufferPROC)((intptr_t)function_pointer); + glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglGetFramebufferAttachmentParameteriv(JNIEnv *env, jclass clazz, jint target, jint attachment, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetFramebufferAttachmentParameterivPROC glGetFramebufferAttachmentParameteriv = (glGetFramebufferAttachmentParameterivPROC)((intptr_t)function_pointer); + glGetFramebufferAttachmentParameteriv(target, attachment, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglGenerateMipmap(JNIEnv *env, jclass clazz, jint target, jlong function_pointer) { + glGenerateMipmapPROC glGenerateMipmap = (glGenerateMipmapPROC)((intptr_t)function_pointer); + glGenerateMipmap(target); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglRenderbufferStorageMultisample(JNIEnv *env, jclass clazz, jint target, jint samples, jint internalformat, jint width, jint height, jlong function_pointer) { + glRenderbufferStorageMultisamplePROC glRenderbufferStorageMultisample = (glRenderbufferStorageMultisamplePROC)((intptr_t)function_pointer); + glRenderbufferStorageMultisample(target, samples, internalformat, width, height); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglBlitFramebuffer(JNIEnv *env, jclass clazz, jint srcX0, jint srcY0, jint srcX1, jint srcY1, jint dstX0, jint dstY0, jint dstX1, jint dstY1, jint mask, jint filter, jlong function_pointer) { + glBlitFramebufferPROC glBlitFramebuffer = (glBlitFramebufferPROC)((intptr_t)function_pointer); + glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglTexParameterIiv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glTexParameterIivPROC glTexParameterIiv = (glTexParameterIivPROC)((intptr_t)function_pointer); + glTexParameterIiv(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglTexParameterIuiv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + GLuint *params_address = (GLuint *)(intptr_t)params; + glTexParameterIuivPROC glTexParameterIuiv = (glTexParameterIuivPROC)((intptr_t)function_pointer); + glTexParameterIuiv(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglGetTexParameterIiv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetTexParameterIivPROC glGetTexParameterIiv = (glGetTexParameterIivPROC)((intptr_t)function_pointer); + glGetTexParameterIiv(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglGetTexParameterIuiv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + GLuint *params_address = (GLuint *)(intptr_t)params; + glGetTexParameterIuivPROC glGetTexParameterIuiv = (glGetTexParameterIuivPROC)((intptr_t)function_pointer); + glGetTexParameterIuiv(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglFramebufferTextureLayer(JNIEnv *env, jclass clazz, jint target, jint attachment, jint texture, jint level, jint layer, jlong function_pointer) { + glFramebufferTextureLayerPROC glFramebufferTextureLayer = (glFramebufferTextureLayerPROC)((intptr_t)function_pointer); + glFramebufferTextureLayer(target, attachment, texture, level, layer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglColorMaski(JNIEnv *env, jclass clazz, jint buf, jboolean r, jboolean g, jboolean b, jboolean a, jlong function_pointer) { + glColorMaskiPROC glColorMaski = (glColorMaskiPROC)((intptr_t)function_pointer); + glColorMaski(buf, r, g, b, a); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglGetBooleani_1v(JNIEnv *env, jclass clazz, jint value, jint index, jlong data, jlong function_pointer) { + GLboolean *data_address = (GLboolean *)(intptr_t)data; + glGetBooleani_vPROC glGetBooleani_v = (glGetBooleani_vPROC)((intptr_t)function_pointer); + glGetBooleani_v(value, index, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglGetIntegeri_1v(JNIEnv *env, jclass clazz, jint value, jint index, jlong data, jlong function_pointer) { + GLint *data_address = (GLint *)(intptr_t)data; + glGetIntegeri_vPROC glGetIntegeri_v = (glGetIntegeri_vPROC)((intptr_t)function_pointer); + glGetIntegeri_v(value, index, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglEnablei(JNIEnv *env, jclass clazz, jint target, jint index, jlong function_pointer) { + glEnableiPROC glEnablei = (glEnableiPROC)((intptr_t)function_pointer); + glEnablei(target, index); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglDisablei(JNIEnv *env, jclass clazz, jint target, jint index, jlong function_pointer) { + glDisableiPROC glDisablei = (glDisableiPROC)((intptr_t)function_pointer); + glDisablei(target, index); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL30_nglIsEnabledi(JNIEnv *env, jclass clazz, jint target, jint index, jlong function_pointer) { + glIsEnablediPROC glIsEnabledi = (glIsEnablediPROC)((intptr_t)function_pointer); + GLboolean __result = glIsEnabledi(target, index); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglBindBufferRange(JNIEnv *env, jclass clazz, jint target, jint index, jint buffer, jlong offset, jlong size, jlong function_pointer) { + glBindBufferRangePROC glBindBufferRange = (glBindBufferRangePROC)((intptr_t)function_pointer); + glBindBufferRange(target, index, buffer, offset, size); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglBindBufferBase(JNIEnv *env, jclass clazz, jint target, jint index, jint buffer, jlong function_pointer) { + glBindBufferBasePROC glBindBufferBase = (glBindBufferBasePROC)((intptr_t)function_pointer); + glBindBufferBase(target, index, buffer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglBeginTransformFeedback(JNIEnv *env, jclass clazz, jint primitiveMode, jlong function_pointer) { + glBeginTransformFeedbackPROC glBeginTransformFeedback = (glBeginTransformFeedbackPROC)((intptr_t)function_pointer); + glBeginTransformFeedback(primitiveMode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglEndTransformFeedback(JNIEnv *env, jclass clazz, jlong function_pointer) { + glEndTransformFeedbackPROC glEndTransformFeedback = (glEndTransformFeedbackPROC)((intptr_t)function_pointer); + glEndTransformFeedback(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglTransformFeedbackVaryings(JNIEnv *env, jclass clazz, jint program, jint count, jlong varyings, jint bufferMode, jlong function_pointer) { + const GLchar *varyings_address = (const GLchar *)(intptr_t)varyings; + int _str_i; + GLchar *_str_address; + GLchar **varyings_str = (GLchar **) malloc(count * sizeof(GLchar *)); + glTransformFeedbackVaryingsPROC glTransformFeedbackVaryings = (glTransformFeedbackVaryingsPROC)((intptr_t)function_pointer); + _str_i = 0; + _str_address = (GLchar *)varyings_address; + while ( _str_i < count ) { + varyings_str[_str_i++] = _str_address; + _str_address += strlen(_str_address) + 1; + } + glTransformFeedbackVaryings(program, count, (const GLchar **)varyings_str, bufferMode); + free(varyings_str); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglGetTransformFeedbackVarying(JNIEnv *env, jclass clazz, jint program, jint index, jint bufSize, jlong length, jlong size, jlong type, jlong name, jlong function_pointer) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLsizei *size_address = (GLsizei *)(intptr_t)size; + GLenum *type_address = (GLenum *)(intptr_t)type; + GLchar *name_address = (GLchar *)(intptr_t)name; + glGetTransformFeedbackVaryingPROC glGetTransformFeedbackVarying = (glGetTransformFeedbackVaryingPROC)((intptr_t)function_pointer); + glGetTransformFeedbackVarying(program, index, bufSize, length_address, size_address, type_address, name_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglBindVertexArray(JNIEnv *env, jclass clazz, jint array, jlong function_pointer) { + glBindVertexArrayPROC glBindVertexArray = (glBindVertexArrayPROC)((intptr_t)function_pointer); + glBindVertexArray(array); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglDeleteVertexArrays(JNIEnv *env, jclass clazz, jint n, jlong arrays, jlong function_pointer) { + const GLuint *arrays_address = (const GLuint *)(intptr_t)arrays; + glDeleteVertexArraysPROC glDeleteVertexArrays = (glDeleteVertexArraysPROC)((intptr_t)function_pointer); + glDeleteVertexArrays(n, arrays_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL30_nglGenVertexArrays(JNIEnv *env, jclass clazz, jint n, jlong arrays, jlong function_pointer) { + GLuint *arrays_address = (GLuint *)(intptr_t)arrays; + glGenVertexArraysPROC glGenVertexArrays = (glGenVertexArraysPROC)((intptr_t)function_pointer); + glGenVertexArrays(n, arrays_address); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL30_nglIsVertexArray(JNIEnv *env, jclass clazz, jint array, jlong function_pointer) { + glIsVertexArrayPROC glIsVertexArray = (glIsVertexArrayPROC)((intptr_t)function_pointer); + GLboolean __result = glIsVertexArray(array); + return __result; +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL31.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL31.c new file mode 100644 index 0000000..92013cf --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL31.c @@ -0,0 +1,106 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glDrawArraysInstancedPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +typedef void (APIENTRY *glDrawElementsInstancedPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid * indices, GLsizei primcount); +typedef void (APIENTRY *glCopyBufferSubDataPROC) (GLenum readtarget, GLenum writetarget, GLintptr readoffset, GLintptr writeoffset, GLsizeiptr size); +typedef void (APIENTRY *glPrimitiveRestartIndexPROC) (GLuint index); +typedef void (APIENTRY *glTexBufferPROC) (GLenum target, GLenum internalformat, GLuint buffer); +typedef void (APIENTRY *glGetUniformIndicesPROC) (GLuint program, GLsizei uniformCount, const GLchar ** uniformNames, GLuint * uniformIndices); +typedef void (APIENTRY *glGetActiveUniformsivPROC) (GLuint program, GLsizei uniformCount, const GLuint * uniformIndices, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetActiveUniformNamePROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei * length, GLchar * uniformName); +typedef GLuint (APIENTRY *glGetUniformBlockIndexPROC) (GLuint program, const GLchar * uniformBlockName); +typedef void (APIENTRY *glGetActiveUniformBlockivPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetActiveUniformBlockNamePROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei * length, GLchar * uniformBlockName); +typedef void (APIENTRY *glUniformBlockBindingPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL31_nglDrawArraysInstanced(JNIEnv *env, jclass clazz, jint mode, jint first, jint count, jint primcount, jlong function_pointer) { + glDrawArraysInstancedPROC glDrawArraysInstanced = (glDrawArraysInstancedPROC)((intptr_t)function_pointer); + glDrawArraysInstanced(mode, first, count, primcount); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL31_nglDrawElementsInstanced(JNIEnv *env, jclass clazz, jint mode, jint count, jint type, jlong indices, jint primcount, jlong function_pointer) { + const GLvoid *indices_address = (const GLvoid *)(intptr_t)indices; + glDrawElementsInstancedPROC glDrawElementsInstanced = (glDrawElementsInstancedPROC)((intptr_t)function_pointer); + glDrawElementsInstanced(mode, count, type, indices_address, primcount); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL31_nglDrawElementsInstancedBO(JNIEnv *env, jclass clazz, jint mode, jint count, jint type, jlong indices_buffer_offset, jint primcount, jlong function_pointer) { + const GLvoid *indices_address = (const GLvoid *)(intptr_t)offsetToPointer(indices_buffer_offset); + glDrawElementsInstancedPROC glDrawElementsInstanced = (glDrawElementsInstancedPROC)((intptr_t)function_pointer); + glDrawElementsInstanced(mode, count, type, indices_address, primcount); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL31_nglCopyBufferSubData(JNIEnv *env, jclass clazz, jint readtarget, jint writetarget, jlong readoffset, jlong writeoffset, jlong size, jlong function_pointer) { + glCopyBufferSubDataPROC glCopyBufferSubData = (glCopyBufferSubDataPROC)((intptr_t)function_pointer); + glCopyBufferSubData(readtarget, writetarget, readoffset, writeoffset, size); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL31_nglPrimitiveRestartIndex(JNIEnv *env, jclass clazz, jint index, jlong function_pointer) { + glPrimitiveRestartIndexPROC glPrimitiveRestartIndex = (glPrimitiveRestartIndexPROC)((intptr_t)function_pointer); + glPrimitiveRestartIndex(index); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL31_nglTexBuffer(JNIEnv *env, jclass clazz, jint target, jint internalformat, jint buffer, jlong function_pointer) { + glTexBufferPROC glTexBuffer = (glTexBufferPROC)((intptr_t)function_pointer); + glTexBuffer(target, internalformat, buffer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL31_nglGetUniformIndices(JNIEnv *env, jclass clazz, jint program, jint uniformCount, jlong uniformNames, jlong uniformIndices, jlong function_pointer) { + const GLchar *uniformNames_address = (const GLchar *)(intptr_t)uniformNames; + int _str_i; + GLchar *_str_address; + GLchar **uniformNames_str = (GLchar **) malloc(uniformCount * sizeof(GLchar *)); + GLuint *uniformIndices_address = (GLuint *)(intptr_t)uniformIndices; + glGetUniformIndicesPROC glGetUniformIndices = (glGetUniformIndicesPROC)((intptr_t)function_pointer); + _str_i = 0; + _str_address = (GLchar *)uniformNames_address; + while ( _str_i < uniformCount ) { + uniformNames_str[_str_i++] = _str_address; + _str_address += strlen(_str_address) + 1; + } + glGetUniformIndices(program, uniformCount, (const GLchar **)uniformNames_str, uniformIndices_address); + free(uniformNames_str); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL31_nglGetActiveUniformsiv(JNIEnv *env, jclass clazz, jint program, jint uniformCount, jlong uniformIndices, jint pname, jlong params, jlong function_pointer) { + const GLuint *uniformIndices_address = (const GLuint *)(intptr_t)uniformIndices; + GLint *params_address = (GLint *)(intptr_t)params; + glGetActiveUniformsivPROC glGetActiveUniformsiv = (glGetActiveUniformsivPROC)((intptr_t)function_pointer); + glGetActiveUniformsiv(program, uniformCount, uniformIndices_address, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL31_nglGetActiveUniformName(JNIEnv *env, jclass clazz, jint program, jint uniformIndex, jint bufSize, jlong length, jlong uniformName, jlong function_pointer) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLchar *uniformName_address = (GLchar *)(intptr_t)uniformName; + glGetActiveUniformNamePROC glGetActiveUniformName = (glGetActiveUniformNamePROC)((intptr_t)function_pointer); + glGetActiveUniformName(program, uniformIndex, bufSize, length_address, uniformName_address); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL31_nglGetUniformBlockIndex(JNIEnv *env, jclass clazz, jint program, jlong uniformBlockName, jlong function_pointer) { + const GLchar *uniformBlockName_address = (const GLchar *)(intptr_t)uniformBlockName; + glGetUniformBlockIndexPROC glGetUniformBlockIndex = (glGetUniformBlockIndexPROC)((intptr_t)function_pointer); + GLuint __result = glGetUniformBlockIndex(program, uniformBlockName_address); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL31_nglGetActiveUniformBlockiv(JNIEnv *env, jclass clazz, jint program, jint uniformBlockIndex, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetActiveUniformBlockivPROC glGetActiveUniformBlockiv = (glGetActiveUniformBlockivPROC)((intptr_t)function_pointer); + glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL31_nglGetActiveUniformBlockName(JNIEnv *env, jclass clazz, jint program, jint uniformBlockIndex, jint bufSize, jlong length, jlong uniformBlockName, jlong function_pointer) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLchar *uniformBlockName_address = (GLchar *)(intptr_t)uniformBlockName; + glGetActiveUniformBlockNamePROC glGetActiveUniformBlockName = (glGetActiveUniformBlockNamePROC)((intptr_t)function_pointer); + glGetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length_address, uniformBlockName_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL31_nglUniformBlockBinding(JNIEnv *env, jclass clazz, jint program, jint uniformBlockIndex, jint uniformBlockBinding, jlong function_pointer) { + glUniformBlockBindingPROC glUniformBlockBinding = (glUniformBlockBindingPROC)((intptr_t)function_pointer); + glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL32.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL32.c new file mode 100644 index 0000000..8714fe6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL32.c @@ -0,0 +1,144 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glGetBufferParameteri64vPROC) (GLenum target, GLenum pname, GLint64EXT * params); +typedef void (APIENTRY *glDrawElementsBaseVertexPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid * indices, GLint basevertex); +typedef void (APIENTRY *glDrawRangeElementsBaseVertexPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices, GLint basevertex); +typedef void (APIENTRY *glDrawElementsInstancedBaseVertexPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid * indices, GLsizei primcount, GLint basevertex); +typedef void (APIENTRY *glProvokingVertexPROC) (GLenum mode); +typedef void (APIENTRY *glTexImage2DMultisamplePROC) (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +typedef void (APIENTRY *glTexImage3DMultisamplePROC) (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +typedef void (APIENTRY *glGetMultisamplefvPROC) (GLenum pname, GLuint index, GLfloat * val); +typedef void (APIENTRY *glSampleMaskiPROC) (GLuint index, GLbitfield mask); +typedef void (APIENTRY *glFramebufferTexturePROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); +typedef GLsync (APIENTRY *glFenceSyncPROC) (GLenum condition, GLbitfield flags); +typedef GLboolean (APIENTRY *glIsSyncPROC) (GLsync sync); +typedef void (APIENTRY *glDeleteSyncPROC) (GLsync sync); +typedef GLenum (APIENTRY *glClientWaitSyncPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void (APIENTRY *glWaitSyncPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef void (APIENTRY *glGetInteger64vPROC) (GLenum pname, GLint64 * data); +typedef void (APIENTRY *glGetInteger64i_vPROC) (GLenum value, GLuint index, GLint64 * data); +typedef void (APIENTRY *glGetSyncivPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * values); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32_nglGetBufferParameteri64v(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + GLint64EXT *params_address = (GLint64EXT *)(intptr_t)params; + glGetBufferParameteri64vPROC glGetBufferParameteri64v = (glGetBufferParameteri64vPROC)((intptr_t)function_pointer); + glGetBufferParameteri64v(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32_nglDrawElementsBaseVertex(JNIEnv *env, jclass clazz, jint mode, jint count, jint type, jlong indices, jint basevertex, jlong function_pointer) { + const GLvoid *indices_address = (const GLvoid *)(intptr_t)indices; + glDrawElementsBaseVertexPROC glDrawElementsBaseVertex = (glDrawElementsBaseVertexPROC)((intptr_t)function_pointer); + glDrawElementsBaseVertex(mode, count, type, indices_address, basevertex); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32_nglDrawElementsBaseVertexBO(JNIEnv *env, jclass clazz, jint mode, jint count, jint type, jlong indices_buffer_offset, jint basevertex, jlong function_pointer) { + const GLvoid *indices_address = (const GLvoid *)(intptr_t)offsetToPointer(indices_buffer_offset); + glDrawElementsBaseVertexPROC glDrawElementsBaseVertex = (glDrawElementsBaseVertexPROC)((intptr_t)function_pointer); + glDrawElementsBaseVertex(mode, count, type, indices_address, basevertex); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32_nglDrawRangeElementsBaseVertex(JNIEnv *env, jclass clazz, jint mode, jint start, jint end, jint count, jint type, jlong indices, jint basevertex, jlong function_pointer) { + const GLvoid *indices_address = (const GLvoid *)(intptr_t)indices; + glDrawRangeElementsBaseVertexPROC glDrawRangeElementsBaseVertex = (glDrawRangeElementsBaseVertexPROC)((intptr_t)function_pointer); + glDrawRangeElementsBaseVertex(mode, start, end, count, type, indices_address, basevertex); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32_nglDrawRangeElementsBaseVertexBO(JNIEnv *env, jclass clazz, jint mode, jint start, jint end, jint count, jint type, jlong indices_buffer_offset, jint basevertex, jlong function_pointer) { + const GLvoid *indices_address = (const GLvoid *)(intptr_t)offsetToPointer(indices_buffer_offset); + glDrawRangeElementsBaseVertexPROC glDrawRangeElementsBaseVertex = (glDrawRangeElementsBaseVertexPROC)((intptr_t)function_pointer); + glDrawRangeElementsBaseVertex(mode, start, end, count, type, indices_address, basevertex); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32_nglDrawElementsInstancedBaseVertex(JNIEnv *env, jclass clazz, jint mode, jint count, jint type, jlong indices, jint primcount, jint basevertex, jlong function_pointer) { + const GLvoid *indices_address = (const GLvoid *)(intptr_t)indices; + glDrawElementsInstancedBaseVertexPROC glDrawElementsInstancedBaseVertex = (glDrawElementsInstancedBaseVertexPROC)((intptr_t)function_pointer); + glDrawElementsInstancedBaseVertex(mode, count, type, indices_address, primcount, basevertex); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32_nglDrawElementsInstancedBaseVertexBO(JNIEnv *env, jclass clazz, jint mode, jint count, jint type, jlong indices_buffer_offset, jint primcount, jint basevertex, jlong function_pointer) { + const GLvoid *indices_address = (const GLvoid *)(intptr_t)offsetToPointer(indices_buffer_offset); + glDrawElementsInstancedBaseVertexPROC glDrawElementsInstancedBaseVertex = (glDrawElementsInstancedBaseVertexPROC)((intptr_t)function_pointer); + glDrawElementsInstancedBaseVertex(mode, count, type, indices_address, primcount, basevertex); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32_nglProvokingVertex(JNIEnv *env, jclass clazz, jint mode, jlong function_pointer) { + glProvokingVertexPROC glProvokingVertex = (glProvokingVertexPROC)((intptr_t)function_pointer); + glProvokingVertex(mode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32_nglTexImage2DMultisample(JNIEnv *env, jclass clazz, jint target, jint samples, jint internalformat, jint width, jint height, jboolean fixedsamplelocations, jlong function_pointer) { + glTexImage2DMultisamplePROC glTexImage2DMultisample = (glTexImage2DMultisamplePROC)((intptr_t)function_pointer); + glTexImage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32_nglTexImage3DMultisample(JNIEnv *env, jclass clazz, jint target, jint samples, jint internalformat, jint width, jint height, jint depth, jboolean fixedsamplelocations, jlong function_pointer) { + glTexImage3DMultisamplePROC glTexImage3DMultisample = (glTexImage3DMultisamplePROC)((intptr_t)function_pointer); + glTexImage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32_nglGetMultisamplefv(JNIEnv *env, jclass clazz, jint pname, jint index, jlong val, jlong function_pointer) { + GLfloat *val_address = (GLfloat *)(intptr_t)val; + glGetMultisamplefvPROC glGetMultisamplefv = (glGetMultisamplefvPROC)((intptr_t)function_pointer); + glGetMultisamplefv(pname, index, val_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32_nglSampleMaski(JNIEnv *env, jclass clazz, jint index, jint mask, jlong function_pointer) { + glSampleMaskiPROC glSampleMaski = (glSampleMaskiPROC)((intptr_t)function_pointer); + glSampleMaski(index, mask); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32_nglFramebufferTexture(JNIEnv *env, jclass clazz, jint target, jint attachment, jint texture, jint level, jlong function_pointer) { + glFramebufferTexturePROC glFramebufferTexture = (glFramebufferTexturePROC)((intptr_t)function_pointer); + glFramebufferTexture(target, attachment, texture, level); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_GL32_nglFenceSync(JNIEnv *env, jclass clazz, jint condition, jint flags, jlong function_pointer) { + glFenceSyncPROC glFenceSync = (glFenceSyncPROC)((intptr_t)function_pointer); + GLsync __result = glFenceSync(condition, flags); + return (intptr_t)__result; +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL32_nglIsSync(JNIEnv *env, jclass clazz, jlong sync, jlong function_pointer) { + glIsSyncPROC glIsSync = (glIsSyncPROC)((intptr_t)function_pointer); + GLboolean __result = glIsSync((GLsync)(intptr_t)sync); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32_nglDeleteSync(JNIEnv *env, jclass clazz, jlong sync, jlong function_pointer) { + glDeleteSyncPROC glDeleteSync = (glDeleteSyncPROC)((intptr_t)function_pointer); + glDeleteSync((GLsync)(intptr_t)sync); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL32_nglClientWaitSync(JNIEnv *env, jclass clazz, jlong sync, jint flags, jlong timeout, jlong function_pointer) { + glClientWaitSyncPROC glClientWaitSync = (glClientWaitSyncPROC)((intptr_t)function_pointer); + GLenum __result = glClientWaitSync((GLsync)(intptr_t)sync, flags, timeout); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32_nglWaitSync(JNIEnv *env, jclass clazz, jlong sync, jint flags, jlong timeout, jlong function_pointer) { + glWaitSyncPROC glWaitSync = (glWaitSyncPROC)((intptr_t)function_pointer); + glWaitSync((GLsync)(intptr_t)sync, flags, timeout); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32_nglGetInteger64v(JNIEnv *env, jclass clazz, jint pname, jlong data, jlong function_pointer) { + GLint64 *data_address = (GLint64 *)(intptr_t)data; + glGetInteger64vPROC glGetInteger64v = (glGetInteger64vPROC)((intptr_t)function_pointer); + glGetInteger64v(pname, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32_nglGetInteger64i_1v(JNIEnv *env, jclass clazz, jint value, jint index, jlong data, jlong function_pointer) { + GLint64 *data_address = (GLint64 *)(intptr_t)data; + glGetInteger64i_vPROC glGetInteger64i_v = (glGetInteger64i_vPROC)((intptr_t)function_pointer); + glGetInteger64i_v(value, index, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL32_nglGetSynciv(JNIEnv *env, jclass clazz, jlong sync, jint pname, jint bufSize, jlong length, jlong values, jlong function_pointer) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLint *values_address = (GLint *)(intptr_t)values; + glGetSyncivPROC glGetSynciv = (glGetSyncivPROC)((intptr_t)function_pointer); + glGetSynciv((GLsync)(intptr_t)sync, pname, bufSize, length_address, values_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL33.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL33.c new file mode 100644 index 0000000..0694284 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL33.c @@ -0,0 +1,389 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glBindFragDataLocationIndexedPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar * name); +typedef GLint (APIENTRY *glGetFragDataIndexPROC) (GLuint program, const GLchar * name); +typedef void (APIENTRY *glGenSamplersPROC) (GLsizei count, GLuint * samplers); +typedef void (APIENTRY *glDeleteSamplersPROC) (GLsizei count, const GLuint * samplers); +typedef GLboolean (APIENTRY *glIsSamplerPROC) (GLuint sampler); +typedef void (APIENTRY *glBindSamplerPROC) (GLenum unit, GLuint sampler); +typedef void (APIENTRY *glSamplerParameteriPROC) (GLuint sampler, GLenum pname, GLint param); +typedef void (APIENTRY *glSamplerParameterfPROC) (GLuint sampler, GLenum pname, GLfloat param); +typedef void (APIENTRY *glSamplerParameterivPROC) (GLuint sampler, GLenum pname, const GLint * params); +typedef void (APIENTRY *glSamplerParameterfvPROC) (GLuint sampler, GLenum pname, const GLfloat * params); +typedef void (APIENTRY *glSamplerParameterIivPROC) (GLuint sampler, GLenum pname, const GLint * params); +typedef void (APIENTRY *glSamplerParameterIuivPROC) (GLuint sampler, GLenum pname, const GLuint * params); +typedef void (APIENTRY *glGetSamplerParameterivPROC) (GLuint sampler, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetSamplerParameterfvPROC) (GLuint sampler, GLenum pname, GLfloat * params); +typedef void (APIENTRY *glGetSamplerParameterIivPROC) (GLuint sampler, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetSamplerParameterIuivPROC) (GLuint sampler, GLenum pname, GLint * params); +typedef void (APIENTRY *glQueryCounterPROC) (GLuint id, GLenum target); +typedef void (APIENTRY *glGetQueryObjecti64vPROC) (GLuint id, GLenum pname, GLint64 * params); +typedef void (APIENTRY *glGetQueryObjectui64vPROC) (GLuint id, GLenum pname, GLuint64 * params); +typedef void (APIENTRY *glVertexAttribDivisorPROC) (GLuint index, GLuint divisor); +typedef void (APIENTRY *glVertexP2uiPROC) (GLenum type, GLuint value); +typedef void (APIENTRY *glVertexP3uiPROC) (GLenum type, GLuint value); +typedef void (APIENTRY *glVertexP4uiPROC) (GLenum type, GLuint value); +typedef void (APIENTRY *glVertexP2uivPROC) (GLenum type, const GLuint * value); +typedef void (APIENTRY *glVertexP3uivPROC) (GLenum type, const GLuint * value); +typedef void (APIENTRY *glVertexP4uivPROC) (GLenum type, const GLuint * value); +typedef void (APIENTRY *glTexCoordP1uiPROC) (GLenum type, GLuint coords); +typedef void (APIENTRY *glTexCoordP2uiPROC) (GLenum type, GLuint coords); +typedef void (APIENTRY *glTexCoordP3uiPROC) (GLenum type, GLuint coords); +typedef void (APIENTRY *glTexCoordP4uiPROC) (GLenum type, GLuint coords); +typedef void (APIENTRY *glTexCoordP1uivPROC) (GLenum type, const GLuint * coords); +typedef void (APIENTRY *glTexCoordP2uivPROC) (GLenum type, const GLuint * coords); +typedef void (APIENTRY *glTexCoordP3uivPROC) (GLenum type, const GLuint * coords); +typedef void (APIENTRY *glTexCoordP4uivPROC) (GLenum type, const GLuint * coords); +typedef void (APIENTRY *glMultiTexCoordP1uiPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void (APIENTRY *glMultiTexCoordP2uiPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void (APIENTRY *glMultiTexCoordP3uiPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void (APIENTRY *glMultiTexCoordP4uiPROC) (GLenum texture, GLenum type, GLuint coords); +typedef void (APIENTRY *glMultiTexCoordP1uivPROC) (GLenum texture, GLenum type, const GLuint * coords); +typedef void (APIENTRY *glMultiTexCoordP2uivPROC) (GLenum texture, GLenum type, const GLuint * coords); +typedef void (APIENTRY *glMultiTexCoordP3uivPROC) (GLenum texture, GLenum type, const GLuint * coords); +typedef void (APIENTRY *glMultiTexCoordP4uivPROC) (GLenum texture, GLenum type, const GLuint * coords); +typedef void (APIENTRY *glNormalP3uiPROC) (GLenum type, GLuint coords); +typedef void (APIENTRY *glNormalP3uivPROC) (GLenum type, const GLuint * coords); +typedef void (APIENTRY *glColorP3uiPROC) (GLenum type, GLuint color); +typedef void (APIENTRY *glColorP4uiPROC) (GLenum type, GLuint color); +typedef void (APIENTRY *glColorP3uivPROC) (GLenum type, const GLuint * color); +typedef void (APIENTRY *glColorP4uivPROC) (GLenum type, const GLuint * color); +typedef void (APIENTRY *glSecondaryColorP3uiPROC) (GLenum type, GLuint color); +typedef void (APIENTRY *glSecondaryColorP3uivPROC) (GLenum type, const GLuint * color); +typedef void (APIENTRY *glVertexAttribP1uiPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void (APIENTRY *glVertexAttribP2uiPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void (APIENTRY *glVertexAttribP3uiPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void (APIENTRY *glVertexAttribP4uiPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value); +typedef void (APIENTRY *glVertexAttribP1uivPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint * value); +typedef void (APIENTRY *glVertexAttribP2uivPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint * value); +typedef void (APIENTRY *glVertexAttribP3uivPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint * value); +typedef void (APIENTRY *glVertexAttribP4uivPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint * value); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglBindFragDataLocationIndexed(JNIEnv *env, jclass clazz, jint program, jint colorNumber, jint index, jlong name, jlong function_pointer) { + const GLchar *name_address = (const GLchar *)(intptr_t)name; + glBindFragDataLocationIndexedPROC glBindFragDataLocationIndexed = (glBindFragDataLocationIndexedPROC)((intptr_t)function_pointer); + glBindFragDataLocationIndexed(program, colorNumber, index, name_address); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL33_nglGetFragDataIndex(JNIEnv *env, jclass clazz, jint program, jlong name, jlong function_pointer) { + const GLchar *name_address = (const GLchar *)(intptr_t)name; + glGetFragDataIndexPROC glGetFragDataIndex = (glGetFragDataIndexPROC)((intptr_t)function_pointer); + GLint __result = glGetFragDataIndex(program, name_address); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglGenSamplers(JNIEnv *env, jclass clazz, jint count, jlong samplers, jlong function_pointer) { + GLuint *samplers_address = (GLuint *)(intptr_t)samplers; + glGenSamplersPROC glGenSamplers = (glGenSamplersPROC)((intptr_t)function_pointer); + glGenSamplers(count, samplers_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglDeleteSamplers(JNIEnv *env, jclass clazz, jint count, jlong samplers, jlong function_pointer) { + const GLuint *samplers_address = (const GLuint *)(intptr_t)samplers; + glDeleteSamplersPROC glDeleteSamplers = (glDeleteSamplersPROC)((intptr_t)function_pointer); + glDeleteSamplers(count, samplers_address); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL33_nglIsSampler(JNIEnv *env, jclass clazz, jint sampler, jlong function_pointer) { + glIsSamplerPROC glIsSampler = (glIsSamplerPROC)((intptr_t)function_pointer); + GLboolean __result = glIsSampler(sampler); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglBindSampler(JNIEnv *env, jclass clazz, jint unit, jint sampler, jlong function_pointer) { + glBindSamplerPROC glBindSampler = (glBindSamplerPROC)((intptr_t)function_pointer); + glBindSampler(unit, sampler); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglSamplerParameteri(JNIEnv *env, jclass clazz, jint sampler, jint pname, jint param, jlong function_pointer) { + glSamplerParameteriPROC glSamplerParameteri = (glSamplerParameteriPROC)((intptr_t)function_pointer); + glSamplerParameteri(sampler, pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglSamplerParameterf(JNIEnv *env, jclass clazz, jint sampler, jint pname, jfloat param, jlong function_pointer) { + glSamplerParameterfPROC glSamplerParameterf = (glSamplerParameterfPROC)((intptr_t)function_pointer); + glSamplerParameterf(sampler, pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglSamplerParameteriv(JNIEnv *env, jclass clazz, jint sampler, jint pname, jlong params, jlong function_pointer) { + const GLint *params_address = (const GLint *)(intptr_t)params; + glSamplerParameterivPROC glSamplerParameteriv = (glSamplerParameterivPROC)((intptr_t)function_pointer); + glSamplerParameteriv(sampler, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglSamplerParameterfv(JNIEnv *env, jclass clazz, jint sampler, jint pname, jlong params, jlong function_pointer) { + const GLfloat *params_address = (const GLfloat *)(intptr_t)params; + glSamplerParameterfvPROC glSamplerParameterfv = (glSamplerParameterfvPROC)((intptr_t)function_pointer); + glSamplerParameterfv(sampler, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglSamplerParameterIiv(JNIEnv *env, jclass clazz, jint sampler, jint pname, jlong params, jlong function_pointer) { + const GLint *params_address = (const GLint *)(intptr_t)params; + glSamplerParameterIivPROC glSamplerParameterIiv = (glSamplerParameterIivPROC)((intptr_t)function_pointer); + glSamplerParameterIiv(sampler, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglSamplerParameterIuiv(JNIEnv *env, jclass clazz, jint sampler, jint pname, jlong params, jlong function_pointer) { + const GLuint *params_address = (const GLuint *)(intptr_t)params; + glSamplerParameterIuivPROC glSamplerParameterIuiv = (glSamplerParameterIuivPROC)((intptr_t)function_pointer); + glSamplerParameterIuiv(sampler, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglGetSamplerParameteriv(JNIEnv *env, jclass clazz, jint sampler, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetSamplerParameterivPROC glGetSamplerParameteriv = (glGetSamplerParameterivPROC)((intptr_t)function_pointer); + glGetSamplerParameteriv(sampler, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglGetSamplerParameterfv(JNIEnv *env, jclass clazz, jint sampler, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetSamplerParameterfvPROC glGetSamplerParameterfv = (glGetSamplerParameterfvPROC)((intptr_t)function_pointer); + glGetSamplerParameterfv(sampler, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglGetSamplerParameterIiv(JNIEnv *env, jclass clazz, jint sampler, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetSamplerParameterIivPROC glGetSamplerParameterIiv = (glGetSamplerParameterIivPROC)((intptr_t)function_pointer); + glGetSamplerParameterIiv(sampler, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglGetSamplerParameterIuiv(JNIEnv *env, jclass clazz, jint sampler, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetSamplerParameterIuivPROC glGetSamplerParameterIuiv = (glGetSamplerParameterIuivPROC)((intptr_t)function_pointer); + glGetSamplerParameterIuiv(sampler, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglQueryCounter(JNIEnv *env, jclass clazz, jint id, jint target, jlong function_pointer) { + glQueryCounterPROC glQueryCounter = (glQueryCounterPROC)((intptr_t)function_pointer); + glQueryCounter(id, target); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglGetQueryObjecti64v(JNIEnv *env, jclass clazz, jint id, jint pname, jlong params, jlong function_pointer) { + GLint64 *params_address = (GLint64 *)(intptr_t)params; + glGetQueryObjecti64vPROC glGetQueryObjecti64v = (glGetQueryObjecti64vPROC)((intptr_t)function_pointer); + glGetQueryObjecti64v(id, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglGetQueryObjectui64v(JNIEnv *env, jclass clazz, jint id, jint pname, jlong params, jlong function_pointer) { + GLuint64 *params_address = (GLuint64 *)(intptr_t)params; + glGetQueryObjectui64vPROC glGetQueryObjectui64v = (glGetQueryObjectui64vPROC)((intptr_t)function_pointer); + glGetQueryObjectui64v(id, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglVertexAttribDivisor(JNIEnv *env, jclass clazz, jint index, jint divisor, jlong function_pointer) { + glVertexAttribDivisorPROC glVertexAttribDivisor = (glVertexAttribDivisorPROC)((intptr_t)function_pointer); + glVertexAttribDivisor(index, divisor); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglVertexP2ui(JNIEnv *env, jclass clazz, jint type, jint value, jlong function_pointer) { + glVertexP2uiPROC glVertexP2ui = (glVertexP2uiPROC)((intptr_t)function_pointer); + glVertexP2ui(type, value); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglVertexP3ui(JNIEnv *env, jclass clazz, jint type, jint value, jlong function_pointer) { + glVertexP3uiPROC glVertexP3ui = (glVertexP3uiPROC)((intptr_t)function_pointer); + glVertexP3ui(type, value); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglVertexP4ui(JNIEnv *env, jclass clazz, jint type, jint value, jlong function_pointer) { + glVertexP4uiPROC glVertexP4ui = (glVertexP4uiPROC)((intptr_t)function_pointer); + glVertexP4ui(type, value); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglVertexP2uiv(JNIEnv *env, jclass clazz, jint type, jlong value, jlong function_pointer) { + const GLuint *value_address = (const GLuint *)(intptr_t)value; + glVertexP2uivPROC glVertexP2uiv = (glVertexP2uivPROC)((intptr_t)function_pointer); + glVertexP2uiv(type, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglVertexP3uiv(JNIEnv *env, jclass clazz, jint type, jlong value, jlong function_pointer) { + const GLuint *value_address = (const GLuint *)(intptr_t)value; + glVertexP3uivPROC glVertexP3uiv = (glVertexP3uivPROC)((intptr_t)function_pointer); + glVertexP3uiv(type, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglVertexP4uiv(JNIEnv *env, jclass clazz, jint type, jlong value, jlong function_pointer) { + const GLuint *value_address = (const GLuint *)(intptr_t)value; + glVertexP4uivPROC glVertexP4uiv = (glVertexP4uivPROC)((intptr_t)function_pointer); + glVertexP4uiv(type, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglTexCoordP1ui(JNIEnv *env, jclass clazz, jint type, jint coords, jlong function_pointer) { + glTexCoordP1uiPROC glTexCoordP1ui = (glTexCoordP1uiPROC)((intptr_t)function_pointer); + glTexCoordP1ui(type, coords); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglTexCoordP2ui(JNIEnv *env, jclass clazz, jint type, jint coords, jlong function_pointer) { + glTexCoordP2uiPROC glTexCoordP2ui = (glTexCoordP2uiPROC)((intptr_t)function_pointer); + glTexCoordP2ui(type, coords); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglTexCoordP3ui(JNIEnv *env, jclass clazz, jint type, jint coords, jlong function_pointer) { + glTexCoordP3uiPROC glTexCoordP3ui = (glTexCoordP3uiPROC)((intptr_t)function_pointer); + glTexCoordP3ui(type, coords); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglTexCoordP4ui(JNIEnv *env, jclass clazz, jint type, jint coords, jlong function_pointer) { + glTexCoordP4uiPROC glTexCoordP4ui = (glTexCoordP4uiPROC)((intptr_t)function_pointer); + glTexCoordP4ui(type, coords); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglTexCoordP1uiv(JNIEnv *env, jclass clazz, jint type, jlong coords, jlong function_pointer) { + const GLuint *coords_address = (const GLuint *)(intptr_t)coords; + glTexCoordP1uivPROC glTexCoordP1uiv = (glTexCoordP1uivPROC)((intptr_t)function_pointer); + glTexCoordP1uiv(type, coords_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglTexCoordP2uiv(JNIEnv *env, jclass clazz, jint type, jlong coords, jlong function_pointer) { + const GLuint *coords_address = (const GLuint *)(intptr_t)coords; + glTexCoordP2uivPROC glTexCoordP2uiv = (glTexCoordP2uivPROC)((intptr_t)function_pointer); + glTexCoordP2uiv(type, coords_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglTexCoordP3uiv(JNIEnv *env, jclass clazz, jint type, jlong coords, jlong function_pointer) { + const GLuint *coords_address = (const GLuint *)(intptr_t)coords; + glTexCoordP3uivPROC glTexCoordP3uiv = (glTexCoordP3uivPROC)((intptr_t)function_pointer); + glTexCoordP3uiv(type, coords_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglTexCoordP4uiv(JNIEnv *env, jclass clazz, jint type, jlong coords, jlong function_pointer) { + const GLuint *coords_address = (const GLuint *)(intptr_t)coords; + glTexCoordP4uivPROC glTexCoordP4uiv = (glTexCoordP4uivPROC)((intptr_t)function_pointer); + glTexCoordP4uiv(type, coords_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglMultiTexCoordP1ui(JNIEnv *env, jclass clazz, jint texture, jint type, jint coords, jlong function_pointer) { + glMultiTexCoordP1uiPROC glMultiTexCoordP1ui = (glMultiTexCoordP1uiPROC)((intptr_t)function_pointer); + glMultiTexCoordP1ui(texture, type, coords); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglMultiTexCoordP2ui(JNIEnv *env, jclass clazz, jint texture, jint type, jint coords, jlong function_pointer) { + glMultiTexCoordP2uiPROC glMultiTexCoordP2ui = (glMultiTexCoordP2uiPROC)((intptr_t)function_pointer); + glMultiTexCoordP2ui(texture, type, coords); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglMultiTexCoordP3ui(JNIEnv *env, jclass clazz, jint texture, jint type, jint coords, jlong function_pointer) { + glMultiTexCoordP3uiPROC glMultiTexCoordP3ui = (glMultiTexCoordP3uiPROC)((intptr_t)function_pointer); + glMultiTexCoordP3ui(texture, type, coords); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglMultiTexCoordP4ui(JNIEnv *env, jclass clazz, jint texture, jint type, jint coords, jlong function_pointer) { + glMultiTexCoordP4uiPROC glMultiTexCoordP4ui = (glMultiTexCoordP4uiPROC)((intptr_t)function_pointer); + glMultiTexCoordP4ui(texture, type, coords); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglMultiTexCoordP1uiv(JNIEnv *env, jclass clazz, jint texture, jint type, jlong coords, jlong function_pointer) { + const GLuint *coords_address = (const GLuint *)(intptr_t)coords; + glMultiTexCoordP1uivPROC glMultiTexCoordP1uiv = (glMultiTexCoordP1uivPROC)((intptr_t)function_pointer); + glMultiTexCoordP1uiv(texture, type, coords_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglMultiTexCoordP2uiv(JNIEnv *env, jclass clazz, jint texture, jint type, jlong coords, jlong function_pointer) { + const GLuint *coords_address = (const GLuint *)(intptr_t)coords; + glMultiTexCoordP2uivPROC glMultiTexCoordP2uiv = (glMultiTexCoordP2uivPROC)((intptr_t)function_pointer); + glMultiTexCoordP2uiv(texture, type, coords_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglMultiTexCoordP3uiv(JNIEnv *env, jclass clazz, jint texture, jint type, jlong coords, jlong function_pointer) { + const GLuint *coords_address = (const GLuint *)(intptr_t)coords; + glMultiTexCoordP3uivPROC glMultiTexCoordP3uiv = (glMultiTexCoordP3uivPROC)((intptr_t)function_pointer); + glMultiTexCoordP3uiv(texture, type, coords_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglMultiTexCoordP4uiv(JNIEnv *env, jclass clazz, jint texture, jint type, jlong coords, jlong function_pointer) { + const GLuint *coords_address = (const GLuint *)(intptr_t)coords; + glMultiTexCoordP4uivPROC glMultiTexCoordP4uiv = (glMultiTexCoordP4uivPROC)((intptr_t)function_pointer); + glMultiTexCoordP4uiv(texture, type, coords_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglNormalP3ui(JNIEnv *env, jclass clazz, jint type, jint coords, jlong function_pointer) { + glNormalP3uiPROC glNormalP3ui = (glNormalP3uiPROC)((intptr_t)function_pointer); + glNormalP3ui(type, coords); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglNormalP3uiv(JNIEnv *env, jclass clazz, jint type, jlong coords, jlong function_pointer) { + const GLuint *coords_address = (const GLuint *)(intptr_t)coords; + glNormalP3uivPROC glNormalP3uiv = (glNormalP3uivPROC)((intptr_t)function_pointer); + glNormalP3uiv(type, coords_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglColorP3ui(JNIEnv *env, jclass clazz, jint type, jint color, jlong function_pointer) { + glColorP3uiPROC glColorP3ui = (glColorP3uiPROC)((intptr_t)function_pointer); + glColorP3ui(type, color); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglColorP4ui(JNIEnv *env, jclass clazz, jint type, jint color, jlong function_pointer) { + glColorP4uiPROC glColorP4ui = (glColorP4uiPROC)((intptr_t)function_pointer); + glColorP4ui(type, color); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglColorP3uiv(JNIEnv *env, jclass clazz, jint type, jlong color, jlong function_pointer) { + const GLuint *color_address = (const GLuint *)(intptr_t)color; + glColorP3uivPROC glColorP3uiv = (glColorP3uivPROC)((intptr_t)function_pointer); + glColorP3uiv(type, color_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglColorP4uiv(JNIEnv *env, jclass clazz, jint type, jlong color, jlong function_pointer) { + const GLuint *color_address = (const GLuint *)(intptr_t)color; + glColorP4uivPROC glColorP4uiv = (glColorP4uivPROC)((intptr_t)function_pointer); + glColorP4uiv(type, color_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglSecondaryColorP3ui(JNIEnv *env, jclass clazz, jint type, jint color, jlong function_pointer) { + glSecondaryColorP3uiPROC glSecondaryColorP3ui = (glSecondaryColorP3uiPROC)((intptr_t)function_pointer); + glSecondaryColorP3ui(type, color); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglSecondaryColorP3uiv(JNIEnv *env, jclass clazz, jint type, jlong color, jlong function_pointer) { + const GLuint *color_address = (const GLuint *)(intptr_t)color; + glSecondaryColorP3uivPROC glSecondaryColorP3uiv = (glSecondaryColorP3uivPROC)((intptr_t)function_pointer); + glSecondaryColorP3uiv(type, color_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglVertexAttribP1ui(JNIEnv *env, jclass clazz, jint index, jint type, jboolean normalized, jint value, jlong function_pointer) { + glVertexAttribP1uiPROC glVertexAttribP1ui = (glVertexAttribP1uiPROC)((intptr_t)function_pointer); + glVertexAttribP1ui(index, type, normalized, value); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglVertexAttribP2ui(JNIEnv *env, jclass clazz, jint index, jint type, jboolean normalized, jint value, jlong function_pointer) { + glVertexAttribP2uiPROC glVertexAttribP2ui = (glVertexAttribP2uiPROC)((intptr_t)function_pointer); + glVertexAttribP2ui(index, type, normalized, value); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglVertexAttribP3ui(JNIEnv *env, jclass clazz, jint index, jint type, jboolean normalized, jint value, jlong function_pointer) { + glVertexAttribP3uiPROC glVertexAttribP3ui = (glVertexAttribP3uiPROC)((intptr_t)function_pointer); + glVertexAttribP3ui(index, type, normalized, value); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglVertexAttribP4ui(JNIEnv *env, jclass clazz, jint index, jint type, jboolean normalized, jint value, jlong function_pointer) { + glVertexAttribP4uiPROC glVertexAttribP4ui = (glVertexAttribP4uiPROC)((intptr_t)function_pointer); + glVertexAttribP4ui(index, type, normalized, value); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglVertexAttribP1uiv(JNIEnv *env, jclass clazz, jint index, jint type, jboolean normalized, jlong value, jlong function_pointer) { + const GLuint *value_address = (const GLuint *)(intptr_t)value; + glVertexAttribP1uivPROC glVertexAttribP1uiv = (glVertexAttribP1uivPROC)((intptr_t)function_pointer); + glVertexAttribP1uiv(index, type, normalized, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglVertexAttribP2uiv(JNIEnv *env, jclass clazz, jint index, jint type, jboolean normalized, jlong value, jlong function_pointer) { + const GLuint *value_address = (const GLuint *)(intptr_t)value; + glVertexAttribP2uivPROC glVertexAttribP2uiv = (glVertexAttribP2uivPROC)((intptr_t)function_pointer); + glVertexAttribP2uiv(index, type, normalized, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglVertexAttribP3uiv(JNIEnv *env, jclass clazz, jint index, jint type, jboolean normalized, jlong value, jlong function_pointer) { + const GLuint *value_address = (const GLuint *)(intptr_t)value; + glVertexAttribP3uivPROC glVertexAttribP3uiv = (glVertexAttribP3uivPROC)((intptr_t)function_pointer); + glVertexAttribP3uiv(index, type, normalized, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL33_nglVertexAttribP4uiv(JNIEnv *env, jclass clazz, jint index, jint type, jboolean normalized, jlong value, jlong function_pointer) { + const GLuint *value_address = (const GLuint *)(intptr_t)value; + glVertexAttribP4uivPROC glVertexAttribP4uiv = (glVertexAttribP4uivPROC)((intptr_t)function_pointer); + glVertexAttribP4uiv(index, type, normalized, value_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL40.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL40.c new file mode 100644 index 0000000..fcc9150 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL40.c @@ -0,0 +1,327 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glBlendEquationiPROC) (GLuint buf, GLenum mode); +typedef void (APIENTRY *glBlendEquationSeparateiPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); +typedef void (APIENTRY *glBlendFunciPROC) (GLuint buf, GLenum src, GLenum dst); +typedef void (APIENTRY *glBlendFuncSeparateiPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +typedef void (APIENTRY *glDrawArraysIndirectPROC) (GLenum mode, const GLvoid * indirect); +typedef void (APIENTRY *glDrawElementsIndirectPROC) (GLenum mode, GLenum type, const GLvoid * indirect); +typedef void (APIENTRY *glUniform1dPROC) (GLint location, GLdouble x); +typedef void (APIENTRY *glUniform2dPROC) (GLint location, GLdouble x, GLdouble y); +typedef void (APIENTRY *glUniform3dPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRY *glUniform4dPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRY *glUniform1dvPROC) (GLint location, GLsizei count, const GLdouble * value); +typedef void (APIENTRY *glUniform2dvPROC) (GLint location, GLsizei count, const GLdouble * value); +typedef void (APIENTRY *glUniform3dvPROC) (GLint location, GLsizei count, const GLdouble * value); +typedef void (APIENTRY *glUniform4dvPROC) (GLint location, GLsizei count, const GLdouble * value); +typedef void (APIENTRY *glUniformMatrix2dvPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (APIENTRY *glUniformMatrix3dvPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (APIENTRY *glUniformMatrix4dvPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (APIENTRY *glUniformMatrix2x3dvPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (APIENTRY *glUniformMatrix2x4dvPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (APIENTRY *glUniformMatrix3x2dvPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (APIENTRY *glUniformMatrix3x4dvPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (APIENTRY *glUniformMatrix4x2dvPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (APIENTRY *glUniformMatrix4x3dvPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (APIENTRY *glGetUniformdvPROC) (GLuint program, GLint location, GLdouble * params); +typedef void (APIENTRY *glMinSampleShadingPROC) (GLfloat value); +typedef GLint (APIENTRY *glGetSubroutineUniformLocationPROC) (GLuint program, GLenum shadertype, const GLbyte * name); +typedef GLuint (APIENTRY *glGetSubroutineIndexPROC) (GLuint program, GLenum shadertype, const GLbyte * name); +typedef void (APIENTRY *glGetActiveSubroutineUniformivPROC) (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint * values); +typedef void (APIENTRY *glGetActiveSubroutineUniformNamePROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei * length, GLchar * name); +typedef void (APIENTRY *glGetActiveSubroutineNamePROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei * length, GLchar * name); +typedef void (APIENTRY *glUniformSubroutinesuivPROC) (GLenum shadertype, GLsizei count, const GLuint * indices); +typedef void (APIENTRY *glGetUniformSubroutineuivPROC) (GLenum shadertype, GLint location, GLuint * params); +typedef void (APIENTRY *glGetProgramStageivPROC) (GLuint program, GLenum shadertype, GLenum pname, GLint * values); +typedef void (APIENTRY *glPatchParameteriPROC) (GLenum pname, GLint value); +typedef void (APIENTRY *glPatchParameterfvPROC) (GLenum pname, const GLfloat * values); +typedef void (APIENTRY *glBindTransformFeedbackPROC) (GLenum target, GLuint id); +typedef void (APIENTRY *glDeleteTransformFeedbacksPROC) (GLsizei n, const GLuint * ids); +typedef void (APIENTRY *glGenTransformFeedbacksPROC) (GLsizei n, GLuint * ids); +typedef GLboolean (APIENTRY *glIsTransformFeedbackPROC) (GLuint id); +typedef void (APIENTRY *glPauseTransformFeedbackPROC) (); +typedef void (APIENTRY *glResumeTransformFeedbackPROC) (); +typedef void (APIENTRY *glDrawTransformFeedbackPROC) (GLenum mode, GLuint id); +typedef void (APIENTRY *glDrawTransformFeedbackStreamPROC) (GLenum mode, GLuint id, GLuint stream); +typedef void (APIENTRY *glBeginQueryIndexedPROC) (GLenum target, GLuint index, GLuint id); +typedef void (APIENTRY *glEndQueryIndexedPROC) (GLenum target, GLuint index); +typedef void (APIENTRY *glGetQueryIndexedivPROC) (GLenum target, GLuint index, GLenum pname, GLint * params); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglBlendEquationi(JNIEnv *env, jclass clazz, jint buf, jint mode, jlong function_pointer) { + glBlendEquationiPROC glBlendEquationi = (glBlendEquationiPROC)((intptr_t)function_pointer); + glBlendEquationi(buf, mode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglBlendEquationSeparatei(JNIEnv *env, jclass clazz, jint buf, jint modeRGB, jint modeAlpha, jlong function_pointer) { + glBlendEquationSeparateiPROC glBlendEquationSeparatei = (glBlendEquationSeparateiPROC)((intptr_t)function_pointer); + glBlendEquationSeparatei(buf, modeRGB, modeAlpha); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglBlendFunci(JNIEnv *env, jclass clazz, jint buf, jint src, jint dst, jlong function_pointer) { + glBlendFunciPROC glBlendFunci = (glBlendFunciPROC)((intptr_t)function_pointer); + glBlendFunci(buf, src, dst); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglBlendFuncSeparatei(JNIEnv *env, jclass clazz, jint buf, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha, jlong function_pointer) { + glBlendFuncSeparateiPROC glBlendFuncSeparatei = (glBlendFuncSeparateiPROC)((intptr_t)function_pointer); + glBlendFuncSeparatei(buf, srcRGB, dstRGB, srcAlpha, dstAlpha); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglDrawArraysIndirect(JNIEnv *env, jclass clazz, jint mode, jlong indirect, jlong function_pointer) { + const GLvoid *indirect_address = (const GLvoid *)(intptr_t)indirect; + glDrawArraysIndirectPROC glDrawArraysIndirect = (glDrawArraysIndirectPROC)((intptr_t)function_pointer); + glDrawArraysIndirect(mode, indirect_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglDrawArraysIndirectBO(JNIEnv *env, jclass clazz, jint mode, jlong indirect_buffer_offset, jlong function_pointer) { + const GLvoid *indirect_address = (const GLvoid *)(intptr_t)offsetToPointer(indirect_buffer_offset); + glDrawArraysIndirectPROC glDrawArraysIndirect = (glDrawArraysIndirectPROC)((intptr_t)function_pointer); + glDrawArraysIndirect(mode, indirect_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglDrawElementsIndirect(JNIEnv *env, jclass clazz, jint mode, jint type, jlong indirect, jlong function_pointer) { + const GLvoid *indirect_address = (const GLvoid *)(intptr_t)indirect; + glDrawElementsIndirectPROC glDrawElementsIndirect = (glDrawElementsIndirectPROC)((intptr_t)function_pointer); + glDrawElementsIndirect(mode, type, indirect_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglDrawElementsIndirectBO(JNIEnv *env, jclass clazz, jint mode, jint type, jlong indirect_buffer_offset, jlong function_pointer) { + const GLvoid *indirect_address = (const GLvoid *)(intptr_t)offsetToPointer(indirect_buffer_offset); + glDrawElementsIndirectPROC glDrawElementsIndirect = (glDrawElementsIndirectPROC)((intptr_t)function_pointer); + glDrawElementsIndirect(mode, type, indirect_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglUniform1d(JNIEnv *env, jclass clazz, jint location, jdouble x, jlong function_pointer) { + glUniform1dPROC glUniform1d = (glUniform1dPROC)((intptr_t)function_pointer); + glUniform1d(location, x); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglUniform2d(JNIEnv *env, jclass clazz, jint location, jdouble x, jdouble y, jlong function_pointer) { + glUniform2dPROC glUniform2d = (glUniform2dPROC)((intptr_t)function_pointer); + glUniform2d(location, x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglUniform3d(JNIEnv *env, jclass clazz, jint location, jdouble x, jdouble y, jdouble z, jlong function_pointer) { + glUniform3dPROC glUniform3d = (glUniform3dPROC)((intptr_t)function_pointer); + glUniform3d(location, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglUniform4d(JNIEnv *env, jclass clazz, jint location, jdouble x, jdouble y, jdouble z, jdouble w, jlong function_pointer) { + glUniform4dPROC glUniform4d = (glUniform4dPROC)((intptr_t)function_pointer); + glUniform4d(location, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglUniform1dv(JNIEnv *env, jclass clazz, jint location, jint count, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glUniform1dvPROC glUniform1dv = (glUniform1dvPROC)((intptr_t)function_pointer); + glUniform1dv(location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglUniform2dv(JNIEnv *env, jclass clazz, jint location, jint count, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glUniform2dvPROC glUniform2dv = (glUniform2dvPROC)((intptr_t)function_pointer); + glUniform2dv(location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglUniform3dv(JNIEnv *env, jclass clazz, jint location, jint count, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glUniform3dvPROC glUniform3dv = (glUniform3dvPROC)((intptr_t)function_pointer); + glUniform3dv(location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglUniform4dv(JNIEnv *env, jclass clazz, jint location, jint count, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glUniform4dvPROC glUniform4dv = (glUniform4dvPROC)((intptr_t)function_pointer); + glUniform4dv(location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglUniformMatrix2dv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glUniformMatrix2dvPROC glUniformMatrix2dv = (glUniformMatrix2dvPROC)((intptr_t)function_pointer); + glUniformMatrix2dv(location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglUniformMatrix3dv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glUniformMatrix3dvPROC glUniformMatrix3dv = (glUniformMatrix3dvPROC)((intptr_t)function_pointer); + glUniformMatrix3dv(location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglUniformMatrix4dv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glUniformMatrix4dvPROC glUniformMatrix4dv = (glUniformMatrix4dvPROC)((intptr_t)function_pointer); + glUniformMatrix4dv(location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglUniformMatrix2x3dv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glUniformMatrix2x3dvPROC glUniformMatrix2x3dv = (glUniformMatrix2x3dvPROC)((intptr_t)function_pointer); + glUniformMatrix2x3dv(location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglUniformMatrix2x4dv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glUniformMatrix2x4dvPROC glUniformMatrix2x4dv = (glUniformMatrix2x4dvPROC)((intptr_t)function_pointer); + glUniformMatrix2x4dv(location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglUniformMatrix3x2dv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glUniformMatrix3x2dvPROC glUniformMatrix3x2dv = (glUniformMatrix3x2dvPROC)((intptr_t)function_pointer); + glUniformMatrix3x2dv(location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglUniformMatrix3x4dv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glUniformMatrix3x4dvPROC glUniformMatrix3x4dv = (glUniformMatrix3x4dvPROC)((intptr_t)function_pointer); + glUniformMatrix3x4dv(location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglUniformMatrix4x2dv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glUniformMatrix4x2dvPROC glUniformMatrix4x2dv = (glUniformMatrix4x2dvPROC)((intptr_t)function_pointer); + glUniformMatrix4x2dv(location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglUniformMatrix4x3dv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glUniformMatrix4x3dvPROC glUniformMatrix4x3dv = (glUniformMatrix4x3dvPROC)((intptr_t)function_pointer); + glUniformMatrix4x3dv(location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglGetUniformdv(JNIEnv *env, jclass clazz, jint program, jint location, jlong params, jlong function_pointer) { + GLdouble *params_address = (GLdouble *)(intptr_t)params; + glGetUniformdvPROC glGetUniformdv = (glGetUniformdvPROC)((intptr_t)function_pointer); + glGetUniformdv(program, location, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglMinSampleShading(JNIEnv *env, jclass clazz, jfloat value, jlong function_pointer) { + glMinSampleShadingPROC glMinSampleShading = (glMinSampleShadingPROC)((intptr_t)function_pointer); + glMinSampleShading(value); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL40_nglGetSubroutineUniformLocation(JNIEnv *env, jclass clazz, jint program, jint shadertype, jlong name, jlong function_pointer) { + const GLbyte *name_address = (const GLbyte *)(intptr_t)name; + glGetSubroutineUniformLocationPROC glGetSubroutineUniformLocation = (glGetSubroutineUniformLocationPROC)((intptr_t)function_pointer); + GLint __result = glGetSubroutineUniformLocation(program, shadertype, name_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL40_nglGetSubroutineIndex(JNIEnv *env, jclass clazz, jint program, jint shadertype, jlong name, jlong function_pointer) { + const GLbyte *name_address = (const GLbyte *)(intptr_t)name; + glGetSubroutineIndexPROC glGetSubroutineIndex = (glGetSubroutineIndexPROC)((intptr_t)function_pointer); + GLuint __result = glGetSubroutineIndex(program, shadertype, name_address); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglGetActiveSubroutineUniformiv(JNIEnv *env, jclass clazz, jint program, jint shadertype, jint index, jint pname, jlong values, jlong function_pointer) { + GLint *values_address = (GLint *)(intptr_t)values; + glGetActiveSubroutineUniformivPROC glGetActiveSubroutineUniformiv = (glGetActiveSubroutineUniformivPROC)((intptr_t)function_pointer); + glGetActiveSubroutineUniformiv(program, shadertype, index, pname, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglGetActiveSubroutineUniformName(JNIEnv *env, jclass clazz, jint program, jint shadertype, jint index, jint bufsize, jlong length, jlong name, jlong function_pointer) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLchar *name_address = (GLchar *)(intptr_t)name; + glGetActiveSubroutineUniformNamePROC glGetActiveSubroutineUniformName = (glGetActiveSubroutineUniformNamePROC)((intptr_t)function_pointer); + glGetActiveSubroutineUniformName(program, shadertype, index, bufsize, length_address, name_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglGetActiveSubroutineName(JNIEnv *env, jclass clazz, jint program, jint shadertype, jint index, jint bufsize, jlong length, jlong name, jlong function_pointer) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLchar *name_address = (GLchar *)(intptr_t)name; + glGetActiveSubroutineNamePROC glGetActiveSubroutineName = (glGetActiveSubroutineNamePROC)((intptr_t)function_pointer); + glGetActiveSubroutineName(program, shadertype, index, bufsize, length_address, name_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglUniformSubroutinesuiv(JNIEnv *env, jclass clazz, jint shadertype, jint count, jlong indices, jlong function_pointer) { + const GLuint *indices_address = (const GLuint *)(intptr_t)indices; + glUniformSubroutinesuivPROC glUniformSubroutinesuiv = (glUniformSubroutinesuivPROC)((intptr_t)function_pointer); + glUniformSubroutinesuiv(shadertype, count, indices_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglGetUniformSubroutineuiv(JNIEnv *env, jclass clazz, jint shadertype, jint location, jlong params, jlong function_pointer) { + GLuint *params_address = (GLuint *)(intptr_t)params; + glGetUniformSubroutineuivPROC glGetUniformSubroutineuiv = (glGetUniformSubroutineuivPROC)((intptr_t)function_pointer); + glGetUniformSubroutineuiv(shadertype, location, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglGetProgramStageiv(JNIEnv *env, jclass clazz, jint program, jint shadertype, jint pname, jlong values, jlong function_pointer) { + GLint *values_address = (GLint *)(intptr_t)values; + glGetProgramStageivPROC glGetProgramStageiv = (glGetProgramStageivPROC)((intptr_t)function_pointer); + glGetProgramStageiv(program, shadertype, pname, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglPatchParameteri(JNIEnv *env, jclass clazz, jint pname, jint value, jlong function_pointer) { + glPatchParameteriPROC glPatchParameteri = (glPatchParameteriPROC)((intptr_t)function_pointer); + glPatchParameteri(pname, value); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglPatchParameterfv(JNIEnv *env, jclass clazz, jint pname, jlong values, jlong function_pointer) { + const GLfloat *values_address = (const GLfloat *)(intptr_t)values; + glPatchParameterfvPROC glPatchParameterfv = (glPatchParameterfvPROC)((intptr_t)function_pointer); + glPatchParameterfv(pname, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglBindTransformFeedback(JNIEnv *env, jclass clazz, jint target, jint id, jlong function_pointer) { + glBindTransformFeedbackPROC glBindTransformFeedback = (glBindTransformFeedbackPROC)((intptr_t)function_pointer); + glBindTransformFeedback(target, id); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglDeleteTransformFeedbacks(JNIEnv *env, jclass clazz, jint n, jlong ids, jlong function_pointer) { + const GLuint *ids_address = (const GLuint *)(intptr_t)ids; + glDeleteTransformFeedbacksPROC glDeleteTransformFeedbacks = (glDeleteTransformFeedbacksPROC)((intptr_t)function_pointer); + glDeleteTransformFeedbacks(n, ids_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglGenTransformFeedbacks(JNIEnv *env, jclass clazz, jint n, jlong ids, jlong function_pointer) { + GLuint *ids_address = (GLuint *)(intptr_t)ids; + glGenTransformFeedbacksPROC glGenTransformFeedbacks = (glGenTransformFeedbacksPROC)((intptr_t)function_pointer); + glGenTransformFeedbacks(n, ids_address); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL40_nglIsTransformFeedback(JNIEnv *env, jclass clazz, jint id, jlong function_pointer) { + glIsTransformFeedbackPROC glIsTransformFeedback = (glIsTransformFeedbackPROC)((intptr_t)function_pointer); + GLboolean __result = glIsTransformFeedback(id); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglPauseTransformFeedback(JNIEnv *env, jclass clazz, jlong function_pointer) { + glPauseTransformFeedbackPROC glPauseTransformFeedback = (glPauseTransformFeedbackPROC)((intptr_t)function_pointer); + glPauseTransformFeedback(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglResumeTransformFeedback(JNIEnv *env, jclass clazz, jlong function_pointer) { + glResumeTransformFeedbackPROC glResumeTransformFeedback = (glResumeTransformFeedbackPROC)((intptr_t)function_pointer); + glResumeTransformFeedback(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglDrawTransformFeedback(JNIEnv *env, jclass clazz, jint mode, jint id, jlong function_pointer) { + glDrawTransformFeedbackPROC glDrawTransformFeedback = (glDrawTransformFeedbackPROC)((intptr_t)function_pointer); + glDrawTransformFeedback(mode, id); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglDrawTransformFeedbackStream(JNIEnv *env, jclass clazz, jint mode, jint id, jint stream, jlong function_pointer) { + glDrawTransformFeedbackStreamPROC glDrawTransformFeedbackStream = (glDrawTransformFeedbackStreamPROC)((intptr_t)function_pointer); + glDrawTransformFeedbackStream(mode, id, stream); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglBeginQueryIndexed(JNIEnv *env, jclass clazz, jint target, jint index, jint id, jlong function_pointer) { + glBeginQueryIndexedPROC glBeginQueryIndexed = (glBeginQueryIndexedPROC)((intptr_t)function_pointer); + glBeginQueryIndexed(target, index, id); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglEndQueryIndexed(JNIEnv *env, jclass clazz, jint target, jint index, jlong function_pointer) { + glEndQueryIndexedPROC glEndQueryIndexed = (glEndQueryIndexedPROC)((intptr_t)function_pointer); + glEndQueryIndexed(target, index); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL40_nglGetQueryIndexediv(JNIEnv *env, jclass clazz, jint target, jint index, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetQueryIndexedivPROC glGetQueryIndexediv = (glGetQueryIndexedivPROC)((intptr_t)function_pointer); + glGetQueryIndexediv(target, index, pname, params_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL41.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL41.c new file mode 100644 index 0000000..b0baa64 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL41.c @@ -0,0 +1,637 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glReleaseShaderCompilerPROC) (); +typedef void (APIENTRY *glShaderBinaryPROC) (GLsizei count, const GLuint * shaders, GLenum binaryformat, const GLvoid * binary, GLsizei length); +typedef void (APIENTRY *glGetShaderPrecisionFormatPROC) (GLenum shadertype, GLenum precisiontype, GLint * range, GLint * precision); +typedef void (APIENTRY *glDepthRangefPROC) (GLfloat n, GLfloat f); +typedef void (APIENTRY *glClearDepthfPROC) (GLfloat d); +typedef void (APIENTRY *glGetProgramBinaryPROC) (GLuint program, GLsizei bufSize, GLsizei * length, GLenum * binaryFormat, GLvoid * binary); +typedef void (APIENTRY *glProgramBinaryPROC) (GLuint program, GLenum binaryFormat, const GLvoid * binary, GLsizei length); +typedef void (APIENTRY *glProgramParameteriPROC) (GLuint program, GLenum pname, GLint value); +typedef void (APIENTRY *glUseProgramStagesPROC) (GLuint pipeline, GLbitfield stages, GLuint program); +typedef void (APIENTRY *glActiveShaderProgramPROC) (GLuint pipeline, GLuint program); +typedef GLuint (APIENTRY *glCreateShaderProgramvPROC) (GLenum type, GLsizei count, const GLchar ** string); +typedef void (APIENTRY *glBindProgramPipelinePROC) (GLuint pipeline); +typedef void (APIENTRY *glDeleteProgramPipelinesPROC) (GLsizei n, const GLuint * pipelines); +typedef void (APIENTRY *glGenProgramPipelinesPROC) (GLsizei n, GLuint * pipelines); +typedef GLboolean (APIENTRY *glIsProgramPipelinePROC) (GLuint pipeline); +typedef void (APIENTRY *glGetProgramPipelineivPROC) (GLuint pipeline, GLenum pname, GLint * params); +typedef void (APIENTRY *glProgramUniform1iPROC) (GLuint program, GLint location, GLint v0); +typedef void (APIENTRY *glProgramUniform2iPROC) (GLuint program, GLint location, GLint v0, GLint v1); +typedef void (APIENTRY *glProgramUniform3iPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRY *glProgramUniform4iPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRY *glProgramUniform1fPROC) (GLuint program, GLint location, GLfloat v0); +typedef void (APIENTRY *glProgramUniform2fPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); +typedef void (APIENTRY *glProgramUniform3fPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef void (APIENTRY *glProgramUniform4fPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef void (APIENTRY *glProgramUniform1dPROC) (GLuint program, GLint location, GLdouble v0); +typedef void (APIENTRY *glProgramUniform2dPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1); +typedef void (APIENTRY *glProgramUniform3dPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2); +typedef void (APIENTRY *glProgramUniform4dPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3); +typedef void (APIENTRY *glProgramUniform1ivPROC) (GLuint program, GLint location, GLsizei count, const GLint * value); +typedef void (APIENTRY *glProgramUniform2ivPROC) (GLuint program, GLint location, GLsizei count, const GLint * value); +typedef void (APIENTRY *glProgramUniform3ivPROC) (GLuint program, GLint location, GLsizei count, const GLint * value); +typedef void (APIENTRY *glProgramUniform4ivPROC) (GLuint program, GLint location, GLsizei count, const GLint * value); +typedef void (APIENTRY *glProgramUniform1fvPROC) (GLuint program, GLint location, GLsizei count, const GLfloat * value); +typedef void (APIENTRY *glProgramUniform2fvPROC) (GLuint program, GLint location, GLsizei count, const GLfloat * value); +typedef void (APIENTRY *glProgramUniform3fvPROC) (GLuint program, GLint location, GLsizei count, const GLfloat * value); +typedef void (APIENTRY *glProgramUniform4fvPROC) (GLuint program, GLint location, GLsizei count, const GLfloat * value); +typedef void (APIENTRY *glProgramUniform1dvPROC) (GLuint program, GLint location, GLsizei count, const GLdouble * value); +typedef void (APIENTRY *glProgramUniform2dvPROC) (GLuint program, GLint location, GLsizei count, const GLdouble * value); +typedef void (APIENTRY *glProgramUniform3dvPROC) (GLuint program, GLint location, GLsizei count, const GLdouble * value); +typedef void (APIENTRY *glProgramUniform4dvPROC) (GLuint program, GLint location, GLsizei count, const GLdouble * value); +typedef void (APIENTRY *glProgramUniform1uiPROC) (GLuint program, GLint location, GLint v0); +typedef void (APIENTRY *glProgramUniform2uiPROC) (GLuint program, GLint location, GLint v0, GLint v1); +typedef void (APIENTRY *glProgramUniform3uiPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +typedef void (APIENTRY *glProgramUniform4uiPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef void (APIENTRY *glProgramUniform1uivPROC) (GLuint program, GLint location, GLsizei count, const GLint * value); +typedef void (APIENTRY *glProgramUniform2uivPROC) (GLuint program, GLint location, GLsizei count, const GLint * value); +typedef void (APIENTRY *glProgramUniform3uivPROC) (GLuint program, GLint location, GLsizei count, const GLint * value); +typedef void (APIENTRY *glProgramUniform4uivPROC) (GLuint program, GLint location, GLsizei count, const GLint * value); +typedef void (APIENTRY *glProgramUniformMatrix2fvPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (APIENTRY *glProgramUniformMatrix3fvPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (APIENTRY *glProgramUniformMatrix4fvPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (APIENTRY *glProgramUniformMatrix2dvPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (APIENTRY *glProgramUniformMatrix3dvPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (APIENTRY *glProgramUniformMatrix4dvPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (APIENTRY *glProgramUniformMatrix2x3fvPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (APIENTRY *glProgramUniformMatrix3x2fvPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (APIENTRY *glProgramUniformMatrix2x4fvPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (APIENTRY *glProgramUniformMatrix4x2fvPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (APIENTRY *glProgramUniformMatrix3x4fvPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (APIENTRY *glProgramUniformMatrix4x3fvPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef void (APIENTRY *glProgramUniformMatrix2x3dvPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (APIENTRY *glProgramUniformMatrix3x2dvPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (APIENTRY *glProgramUniformMatrix2x4dvPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (APIENTRY *glProgramUniformMatrix4x2dvPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (APIENTRY *glProgramUniformMatrix3x4dvPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (APIENTRY *glProgramUniformMatrix4x3dvPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble * value); +typedef void (APIENTRY *glValidateProgramPipelinePROC) (GLuint pipeline); +typedef void (APIENTRY *glGetProgramPipelineInfoLogPROC) (GLuint pipeline, GLsizei bufSize, GLsizei * length, GLchar * infoLog); +typedef void (APIENTRY *glVertexAttribL1dPROC) (GLuint index, GLdouble x); +typedef void (APIENTRY *glVertexAttribL2dPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRY *glVertexAttribL3dPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRY *glVertexAttribL4dPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRY *glVertexAttribL1dvPROC) (GLuint index, const GLdouble * v); +typedef void (APIENTRY *glVertexAttribL2dvPROC) (GLuint index, const GLdouble * v); +typedef void (APIENTRY *glVertexAttribL3dvPROC) (GLuint index, const GLdouble * v); +typedef void (APIENTRY *glVertexAttribL4dvPROC) (GLuint index, const GLdouble * v); +typedef void (APIENTRY *glVertexAttribLPointerPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * pointer); +typedef void (APIENTRY *glGetVertexAttribLdvPROC) (GLuint index, GLenum pname, GLdouble * params); +typedef void (APIENTRY *glViewportArrayvPROC) (GLuint first, GLsizei count, const GLfloat * v); +typedef void (APIENTRY *glViewportIndexedfPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h); +typedef void (APIENTRY *glViewportIndexedfvPROC) (GLuint index, const GLfloat * v); +typedef void (APIENTRY *glScissorArrayvPROC) (GLuint first, GLsizei count, const GLint * v); +typedef void (APIENTRY *glScissorIndexedPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height); +typedef void (APIENTRY *glScissorIndexedvPROC) (GLuint index, const GLint * v); +typedef void (APIENTRY *glDepthRangeArrayvPROC) (GLuint first, GLsizei count, const GLdouble * v); +typedef void (APIENTRY *glDepthRangeIndexedPROC) (GLuint index, GLdouble n, GLdouble f); +typedef void (APIENTRY *glGetFloati_vPROC) (GLenum target, GLuint index, GLfloat * data); +typedef void (APIENTRY *glGetDoublei_vPROC) (GLenum target, GLuint index, GLdouble * data); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglReleaseShaderCompiler(JNIEnv *env, jclass clazz, jlong function_pointer) { + glReleaseShaderCompilerPROC glReleaseShaderCompiler = (glReleaseShaderCompilerPROC)((intptr_t)function_pointer); + glReleaseShaderCompiler(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglShaderBinary(JNIEnv *env, jclass clazz, jint count, jlong shaders, jint binaryformat, jlong binary, jint length, jlong function_pointer) { + const GLuint *shaders_address = (const GLuint *)(intptr_t)shaders; + const GLvoid *binary_address = (const GLvoid *)(intptr_t)binary; + glShaderBinaryPROC glShaderBinary = (glShaderBinaryPROC)((intptr_t)function_pointer); + glShaderBinary(count, shaders_address, binaryformat, binary_address, length); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglGetShaderPrecisionFormat(JNIEnv *env, jclass clazz, jint shadertype, jint precisiontype, jlong range, jlong precision, jlong function_pointer) { + GLint *range_address = (GLint *)(intptr_t)range; + GLint *precision_address = (GLint *)(intptr_t)precision; + glGetShaderPrecisionFormatPROC glGetShaderPrecisionFormat = (glGetShaderPrecisionFormatPROC)((intptr_t)function_pointer); + glGetShaderPrecisionFormat(shadertype, precisiontype, range_address, precision_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglDepthRangef(JNIEnv *env, jclass clazz, jfloat n, jfloat f, jlong function_pointer) { + glDepthRangefPROC glDepthRangef = (glDepthRangefPROC)((intptr_t)function_pointer); + glDepthRangef(n, f); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglClearDepthf(JNIEnv *env, jclass clazz, jfloat d, jlong function_pointer) { + glClearDepthfPROC glClearDepthf = (glClearDepthfPROC)((intptr_t)function_pointer); + glClearDepthf(d); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglGetProgramBinary(JNIEnv *env, jclass clazz, jint program, jint bufSize, jlong length, jlong binaryFormat, jlong binary, jlong function_pointer) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLenum *binaryFormat_address = (GLenum *)(intptr_t)binaryFormat; + GLvoid *binary_address = (GLvoid *)(intptr_t)binary; + glGetProgramBinaryPROC glGetProgramBinary = (glGetProgramBinaryPROC)((intptr_t)function_pointer); + glGetProgramBinary(program, bufSize, length_address, binaryFormat_address, binary_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramBinary(JNIEnv *env, jclass clazz, jint program, jint binaryFormat, jlong binary, jint length, jlong function_pointer) { + const GLvoid *binary_address = (const GLvoid *)(intptr_t)binary; + glProgramBinaryPROC glProgramBinary = (glProgramBinaryPROC)((intptr_t)function_pointer); + glProgramBinary(program, binaryFormat, binary_address, length); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramParameteri(JNIEnv *env, jclass clazz, jint program, jint pname, jint value, jlong function_pointer) { + glProgramParameteriPROC glProgramParameteri = (glProgramParameteriPROC)((intptr_t)function_pointer); + glProgramParameteri(program, pname, value); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglUseProgramStages(JNIEnv *env, jclass clazz, jint pipeline, jint stages, jint program, jlong function_pointer) { + glUseProgramStagesPROC glUseProgramStages = (glUseProgramStagesPROC)((intptr_t)function_pointer); + glUseProgramStages(pipeline, stages, program); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglActiveShaderProgram(JNIEnv *env, jclass clazz, jint pipeline, jint program, jlong function_pointer) { + glActiveShaderProgramPROC glActiveShaderProgram = (glActiveShaderProgramPROC)((intptr_t)function_pointer); + glActiveShaderProgram(pipeline, program); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL41_nglCreateShaderProgramv(JNIEnv *env, jclass clazz, jint type, jint count, jlong string, jlong function_pointer) { + const GLchar *string_address = (const GLchar *)(intptr_t)string; + glCreateShaderProgramvPROC glCreateShaderProgramv = (glCreateShaderProgramvPROC)((intptr_t)function_pointer); + GLuint __result = glCreateShaderProgramv(type, count, (const GLchar **)&string_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL41_nglCreateShaderProgramv2(JNIEnv *env, jclass clazz, jint type, jint count, jlong strings, jlong function_pointer) { + const GLchar *strings_address = (const GLchar *)(intptr_t)strings; + int _str_i; + GLchar *_str_address; + GLchar **strings_str = (GLchar **) malloc(count * sizeof(GLchar *)); + glCreateShaderProgramvPROC glCreateShaderProgramv = (glCreateShaderProgramvPROC)((intptr_t)function_pointer); + GLuint __result; + _str_i = 0; + _str_address = (GLchar *)strings_address; + while ( _str_i < count ) { + strings_str[_str_i++] = _str_address; + _str_address += strlen(_str_address) + 1; + } + __result = glCreateShaderProgramv(type, count, (const GLchar **)&strings_str); + free(strings_str); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL41_nglCreateShaderProgramv3(JNIEnv *env, jclass clazz, jint type, jint count, jobjectArray strings, jlong function_pointer) { + int _ptr_i; + jobject _ptr_object; + GLchar **strings_ptr = (GLchar **) malloc(count * sizeof(GLchar *)); + glCreateShaderProgramvPROC glCreateShaderProgramv = (glCreateShaderProgramvPROC)((intptr_t)function_pointer); + GLuint __result; + _ptr_i = 0; + while ( _ptr_i < count ) { + _ptr_object = (*env)->GetObjectArrayElement(env, strings, _ptr_i); + strings_ptr[_ptr_i++] = (GLchar *)(*env)->GetDirectBufferAddress(env, _ptr_object); + } + __result = glCreateShaderProgramv(type, count, (const GLchar **)strings_ptr); + free(strings_ptr); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglBindProgramPipeline(JNIEnv *env, jclass clazz, jint pipeline, jlong function_pointer) { + glBindProgramPipelinePROC glBindProgramPipeline = (glBindProgramPipelinePROC)((intptr_t)function_pointer); + glBindProgramPipeline(pipeline); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglDeleteProgramPipelines(JNIEnv *env, jclass clazz, jint n, jlong pipelines, jlong function_pointer) { + const GLuint *pipelines_address = (const GLuint *)(intptr_t)pipelines; + glDeleteProgramPipelinesPROC glDeleteProgramPipelines = (glDeleteProgramPipelinesPROC)((intptr_t)function_pointer); + glDeleteProgramPipelines(n, pipelines_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglGenProgramPipelines(JNIEnv *env, jclass clazz, jint n, jlong pipelines, jlong function_pointer) { + GLuint *pipelines_address = (GLuint *)(intptr_t)pipelines; + glGenProgramPipelinesPROC glGenProgramPipelines = (glGenProgramPipelinesPROC)((intptr_t)function_pointer); + glGenProgramPipelines(n, pipelines_address); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_GL41_nglIsProgramPipeline(JNIEnv *env, jclass clazz, jint pipeline, jlong function_pointer) { + glIsProgramPipelinePROC glIsProgramPipeline = (glIsProgramPipelinePROC)((intptr_t)function_pointer); + GLboolean __result = glIsProgramPipeline(pipeline); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglGetProgramPipelineiv(JNIEnv *env, jclass clazz, jint pipeline, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetProgramPipelineivPROC glGetProgramPipelineiv = (glGetProgramPipelineivPROC)((intptr_t)function_pointer); + glGetProgramPipelineiv(pipeline, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform1i(JNIEnv *env, jclass clazz, jint program, jint location, jint v0, jlong function_pointer) { + glProgramUniform1iPROC glProgramUniform1i = (glProgramUniform1iPROC)((intptr_t)function_pointer); + glProgramUniform1i(program, location, v0); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform2i(JNIEnv *env, jclass clazz, jint program, jint location, jint v0, jint v1, jlong function_pointer) { + glProgramUniform2iPROC glProgramUniform2i = (glProgramUniform2iPROC)((intptr_t)function_pointer); + glProgramUniform2i(program, location, v0, v1); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform3i(JNIEnv *env, jclass clazz, jint program, jint location, jint v0, jint v1, jint v2, jlong function_pointer) { + glProgramUniform3iPROC glProgramUniform3i = (glProgramUniform3iPROC)((intptr_t)function_pointer); + glProgramUniform3i(program, location, v0, v1, v2); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform4i(JNIEnv *env, jclass clazz, jint program, jint location, jint v0, jint v1, jint v2, jint v3, jlong function_pointer) { + glProgramUniform4iPROC glProgramUniform4i = (glProgramUniform4iPROC)((intptr_t)function_pointer); + glProgramUniform4i(program, location, v0, v1, v2, v3); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform1f(JNIEnv *env, jclass clazz, jint program, jint location, jfloat v0, jlong function_pointer) { + glProgramUniform1fPROC glProgramUniform1f = (glProgramUniform1fPROC)((intptr_t)function_pointer); + glProgramUniform1f(program, location, v0); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform2f(JNIEnv *env, jclass clazz, jint program, jint location, jfloat v0, jfloat v1, jlong function_pointer) { + glProgramUniform2fPROC glProgramUniform2f = (glProgramUniform2fPROC)((intptr_t)function_pointer); + glProgramUniform2f(program, location, v0, v1); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform3f(JNIEnv *env, jclass clazz, jint program, jint location, jfloat v0, jfloat v1, jfloat v2, jlong function_pointer) { + glProgramUniform3fPROC glProgramUniform3f = (glProgramUniform3fPROC)((intptr_t)function_pointer); + glProgramUniform3f(program, location, v0, v1, v2); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform4f(JNIEnv *env, jclass clazz, jint program, jint location, jfloat v0, jfloat v1, jfloat v2, jfloat v3, jlong function_pointer) { + glProgramUniform4fPROC glProgramUniform4f = (glProgramUniform4fPROC)((intptr_t)function_pointer); + glProgramUniform4f(program, location, v0, v1, v2, v3); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform1d(JNIEnv *env, jclass clazz, jint program, jint location, jdouble v0, jlong function_pointer) { + glProgramUniform1dPROC glProgramUniform1d = (glProgramUniform1dPROC)((intptr_t)function_pointer); + glProgramUniform1d(program, location, v0); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform2d(JNIEnv *env, jclass clazz, jint program, jint location, jdouble v0, jdouble v1, jlong function_pointer) { + glProgramUniform2dPROC glProgramUniform2d = (glProgramUniform2dPROC)((intptr_t)function_pointer); + glProgramUniform2d(program, location, v0, v1); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform3d(JNIEnv *env, jclass clazz, jint program, jint location, jdouble v0, jdouble v1, jdouble v2, jlong function_pointer) { + glProgramUniform3dPROC glProgramUniform3d = (glProgramUniform3dPROC)((intptr_t)function_pointer); + glProgramUniform3d(program, location, v0, v1, v2); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform4d(JNIEnv *env, jclass clazz, jint program, jint location, jdouble v0, jdouble v1, jdouble v2, jdouble v3, jlong function_pointer) { + glProgramUniform4dPROC glProgramUniform4d = (glProgramUniform4dPROC)((intptr_t)function_pointer); + glProgramUniform4d(program, location, v0, v1, v2, v3); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform1iv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLint *value_address = (const GLint *)(intptr_t)value; + glProgramUniform1ivPROC glProgramUniform1iv = (glProgramUniform1ivPROC)((intptr_t)function_pointer); + glProgramUniform1iv(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform2iv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLint *value_address = (const GLint *)(intptr_t)value; + glProgramUniform2ivPROC glProgramUniform2iv = (glProgramUniform2ivPROC)((intptr_t)function_pointer); + glProgramUniform2iv(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform3iv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLint *value_address = (const GLint *)(intptr_t)value; + glProgramUniform3ivPROC glProgramUniform3iv = (glProgramUniform3ivPROC)((intptr_t)function_pointer); + glProgramUniform3iv(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform4iv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLint *value_address = (const GLint *)(intptr_t)value; + glProgramUniform4ivPROC glProgramUniform4iv = (glProgramUniform4ivPROC)((intptr_t)function_pointer); + glProgramUniform4iv(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform1fv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniform1fvPROC glProgramUniform1fv = (glProgramUniform1fvPROC)((intptr_t)function_pointer); + glProgramUniform1fv(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform2fv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniform2fvPROC glProgramUniform2fv = (glProgramUniform2fvPROC)((intptr_t)function_pointer); + glProgramUniform2fv(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform3fv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniform3fvPROC glProgramUniform3fv = (glProgramUniform3fvPROC)((intptr_t)function_pointer); + glProgramUniform3fv(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform4fv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniform4fvPROC glProgramUniform4fv = (glProgramUniform4fvPROC)((intptr_t)function_pointer); + glProgramUniform4fv(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform1dv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glProgramUniform1dvPROC glProgramUniform1dv = (glProgramUniform1dvPROC)((intptr_t)function_pointer); + glProgramUniform1dv(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform2dv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glProgramUniform2dvPROC glProgramUniform2dv = (glProgramUniform2dvPROC)((intptr_t)function_pointer); + glProgramUniform2dv(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform3dv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glProgramUniform3dvPROC glProgramUniform3dv = (glProgramUniform3dvPROC)((intptr_t)function_pointer); + glProgramUniform3dv(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform4dv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glProgramUniform4dvPROC glProgramUniform4dv = (glProgramUniform4dvPROC)((intptr_t)function_pointer); + glProgramUniform4dv(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform1ui(JNIEnv *env, jclass clazz, jint program, jint location, jint v0, jlong function_pointer) { + glProgramUniform1uiPROC glProgramUniform1ui = (glProgramUniform1uiPROC)((intptr_t)function_pointer); + glProgramUniform1ui(program, location, v0); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform2ui(JNIEnv *env, jclass clazz, jint program, jint location, jint v0, jint v1, jlong function_pointer) { + glProgramUniform2uiPROC glProgramUniform2ui = (glProgramUniform2uiPROC)((intptr_t)function_pointer); + glProgramUniform2ui(program, location, v0, v1); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform3ui(JNIEnv *env, jclass clazz, jint program, jint location, jint v0, jint v1, jint v2, jlong function_pointer) { + glProgramUniform3uiPROC glProgramUniform3ui = (glProgramUniform3uiPROC)((intptr_t)function_pointer); + glProgramUniform3ui(program, location, v0, v1, v2); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform4ui(JNIEnv *env, jclass clazz, jint program, jint location, jint v0, jint v1, jint v2, jint v3, jlong function_pointer) { + glProgramUniform4uiPROC glProgramUniform4ui = (glProgramUniform4uiPROC)((intptr_t)function_pointer); + glProgramUniform4ui(program, location, v0, v1, v2, v3); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform1uiv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLint *value_address = (const GLint *)(intptr_t)value; + glProgramUniform1uivPROC glProgramUniform1uiv = (glProgramUniform1uivPROC)((intptr_t)function_pointer); + glProgramUniform1uiv(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform2uiv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLint *value_address = (const GLint *)(intptr_t)value; + glProgramUniform2uivPROC glProgramUniform2uiv = (glProgramUniform2uivPROC)((intptr_t)function_pointer); + glProgramUniform2uiv(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform3uiv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLint *value_address = (const GLint *)(intptr_t)value; + glProgramUniform3uivPROC glProgramUniform3uiv = (glProgramUniform3uivPROC)((intptr_t)function_pointer); + glProgramUniform3uiv(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniform4uiv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLint *value_address = (const GLint *)(intptr_t)value; + glProgramUniform4uivPROC glProgramUniform4uiv = (glProgramUniform4uivPROC)((intptr_t)function_pointer); + glProgramUniform4uiv(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniformMatrix2fv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniformMatrix2fvPROC glProgramUniformMatrix2fv = (glProgramUniformMatrix2fvPROC)((intptr_t)function_pointer); + glProgramUniformMatrix2fv(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniformMatrix3fv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniformMatrix3fvPROC glProgramUniformMatrix3fv = (glProgramUniformMatrix3fvPROC)((intptr_t)function_pointer); + glProgramUniformMatrix3fv(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniformMatrix4fv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniformMatrix4fvPROC glProgramUniformMatrix4fv = (glProgramUniformMatrix4fvPROC)((intptr_t)function_pointer); + glProgramUniformMatrix4fv(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniformMatrix2dv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glProgramUniformMatrix2dvPROC glProgramUniformMatrix2dv = (glProgramUniformMatrix2dvPROC)((intptr_t)function_pointer); + glProgramUniformMatrix2dv(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniformMatrix3dv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glProgramUniformMatrix3dvPROC glProgramUniformMatrix3dv = (glProgramUniformMatrix3dvPROC)((intptr_t)function_pointer); + glProgramUniformMatrix3dv(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniformMatrix4dv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glProgramUniformMatrix4dvPROC glProgramUniformMatrix4dv = (glProgramUniformMatrix4dvPROC)((intptr_t)function_pointer); + glProgramUniformMatrix4dv(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniformMatrix2x3fv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniformMatrix2x3fvPROC glProgramUniformMatrix2x3fv = (glProgramUniformMatrix2x3fvPROC)((intptr_t)function_pointer); + glProgramUniformMatrix2x3fv(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniformMatrix3x2fv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniformMatrix3x2fvPROC glProgramUniformMatrix3x2fv = (glProgramUniformMatrix3x2fvPROC)((intptr_t)function_pointer); + glProgramUniformMatrix3x2fv(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniformMatrix2x4fv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniformMatrix2x4fvPROC glProgramUniformMatrix2x4fv = (glProgramUniformMatrix2x4fvPROC)((intptr_t)function_pointer); + glProgramUniformMatrix2x4fv(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniformMatrix4x2fv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniformMatrix4x2fvPROC glProgramUniformMatrix4x2fv = (glProgramUniformMatrix4x2fvPROC)((intptr_t)function_pointer); + glProgramUniformMatrix4x2fv(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniformMatrix3x4fv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniformMatrix3x4fvPROC glProgramUniformMatrix3x4fv = (glProgramUniformMatrix3x4fvPROC)((intptr_t)function_pointer); + glProgramUniformMatrix3x4fv(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniformMatrix4x3fv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniformMatrix4x3fvPROC glProgramUniformMatrix4x3fv = (glProgramUniformMatrix4x3fvPROC)((intptr_t)function_pointer); + glProgramUniformMatrix4x3fv(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniformMatrix2x3dv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glProgramUniformMatrix2x3dvPROC glProgramUniformMatrix2x3dv = (glProgramUniformMatrix2x3dvPROC)((intptr_t)function_pointer); + glProgramUniformMatrix2x3dv(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniformMatrix3x2dv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glProgramUniformMatrix3x2dvPROC glProgramUniformMatrix3x2dv = (glProgramUniformMatrix3x2dvPROC)((intptr_t)function_pointer); + glProgramUniformMatrix3x2dv(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniformMatrix2x4dv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glProgramUniformMatrix2x4dvPROC glProgramUniformMatrix2x4dv = (glProgramUniformMatrix2x4dvPROC)((intptr_t)function_pointer); + glProgramUniformMatrix2x4dv(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniformMatrix4x2dv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glProgramUniformMatrix4x2dvPROC glProgramUniformMatrix4x2dv = (glProgramUniformMatrix4x2dvPROC)((intptr_t)function_pointer); + glProgramUniformMatrix4x2dv(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniformMatrix3x4dv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glProgramUniformMatrix3x4dvPROC glProgramUniformMatrix3x4dv = (glProgramUniformMatrix3x4dvPROC)((intptr_t)function_pointer); + glProgramUniformMatrix3x4dv(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglProgramUniformMatrix4x3dv(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value, jlong function_pointer) { + const GLdouble *value_address = (const GLdouble *)(intptr_t)value; + glProgramUniformMatrix4x3dvPROC glProgramUniformMatrix4x3dv = (glProgramUniformMatrix4x3dvPROC)((intptr_t)function_pointer); + glProgramUniformMatrix4x3dv(program, location, count, transpose, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglValidateProgramPipeline(JNIEnv *env, jclass clazz, jint pipeline, jlong function_pointer) { + glValidateProgramPipelinePROC glValidateProgramPipeline = (glValidateProgramPipelinePROC)((intptr_t)function_pointer); + glValidateProgramPipeline(pipeline); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglGetProgramPipelineInfoLog(JNIEnv *env, jclass clazz, jint pipeline, jint bufSize, jlong length, jlong infoLog, jlong function_pointer) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLchar *infoLog_address = (GLchar *)(intptr_t)infoLog; + glGetProgramPipelineInfoLogPROC glGetProgramPipelineInfoLog = (glGetProgramPipelineInfoLogPROC)((intptr_t)function_pointer); + glGetProgramPipelineInfoLog(pipeline, bufSize, length_address, infoLog_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglVertexAttribL1d(JNIEnv *env, jclass clazz, jint index, jdouble x, jlong function_pointer) { + glVertexAttribL1dPROC glVertexAttribL1d = (glVertexAttribL1dPROC)((intptr_t)function_pointer); + glVertexAttribL1d(index, x); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglVertexAttribL2d(JNIEnv *env, jclass clazz, jint index, jdouble x, jdouble y, jlong function_pointer) { + glVertexAttribL2dPROC glVertexAttribL2d = (glVertexAttribL2dPROC)((intptr_t)function_pointer); + glVertexAttribL2d(index, x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglVertexAttribL3d(JNIEnv *env, jclass clazz, jint index, jdouble x, jdouble y, jdouble z, jlong function_pointer) { + glVertexAttribL3dPROC glVertexAttribL3d = (glVertexAttribL3dPROC)((intptr_t)function_pointer); + glVertexAttribL3d(index, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglVertexAttribL4d(JNIEnv *env, jclass clazz, jint index, jdouble x, jdouble y, jdouble z, jdouble w, jlong function_pointer) { + glVertexAttribL4dPROC glVertexAttribL4d = (glVertexAttribL4dPROC)((intptr_t)function_pointer); + glVertexAttribL4d(index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglVertexAttribL1dv(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLdouble *v_address = (const GLdouble *)(intptr_t)v; + glVertexAttribL1dvPROC glVertexAttribL1dv = (glVertexAttribL1dvPROC)((intptr_t)function_pointer); + glVertexAttribL1dv(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglVertexAttribL2dv(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLdouble *v_address = (const GLdouble *)(intptr_t)v; + glVertexAttribL2dvPROC glVertexAttribL2dv = (glVertexAttribL2dvPROC)((intptr_t)function_pointer); + glVertexAttribL2dv(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglVertexAttribL3dv(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLdouble *v_address = (const GLdouble *)(intptr_t)v; + glVertexAttribL3dvPROC glVertexAttribL3dv = (glVertexAttribL3dvPROC)((intptr_t)function_pointer); + glVertexAttribL3dv(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglVertexAttribL4dv(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLdouble *v_address = (const GLdouble *)(intptr_t)v; + glVertexAttribL4dvPROC glVertexAttribL4dv = (glVertexAttribL4dvPROC)((intptr_t)function_pointer); + glVertexAttribL4dv(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglVertexAttribLPointer(JNIEnv *env, jclass clazz, jint index, jint size, jint type, jint stride, jlong pointer, jlong function_pointer) { + const GLvoid *pointer_address = (const GLvoid *)(intptr_t)pointer; + glVertexAttribLPointerPROC glVertexAttribLPointer = (glVertexAttribLPointerPROC)((intptr_t)function_pointer); + glVertexAttribLPointer(index, size, type, stride, pointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglVertexAttribLPointerBO(JNIEnv *env, jclass clazz, jint index, jint size, jint type, jint stride, jlong pointer_buffer_offset, jlong function_pointer) { + const GLvoid *pointer_address = (const GLvoid *)(intptr_t)offsetToPointer(pointer_buffer_offset); + glVertexAttribLPointerPROC glVertexAttribLPointer = (glVertexAttribLPointerPROC)((intptr_t)function_pointer); + glVertexAttribLPointer(index, size, type, stride, pointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglGetVertexAttribLdv(JNIEnv *env, jclass clazz, jint index, jint pname, jlong params, jlong function_pointer) { + GLdouble *params_address = (GLdouble *)(intptr_t)params; + glGetVertexAttribLdvPROC glGetVertexAttribLdv = (glGetVertexAttribLdvPROC)((intptr_t)function_pointer); + glGetVertexAttribLdv(index, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglViewportArrayv(JNIEnv *env, jclass clazz, jint first, jint count, jlong v, jlong function_pointer) { + const GLfloat *v_address = (const GLfloat *)(intptr_t)v; + glViewportArrayvPROC glViewportArrayv = (glViewportArrayvPROC)((intptr_t)function_pointer); + glViewportArrayv(first, count, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglViewportIndexedf(JNIEnv *env, jclass clazz, jint index, jfloat x, jfloat y, jfloat w, jfloat h, jlong function_pointer) { + glViewportIndexedfPROC glViewportIndexedf = (glViewportIndexedfPROC)((intptr_t)function_pointer); + glViewportIndexedf(index, x, y, w, h); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglViewportIndexedfv(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLfloat *v_address = (const GLfloat *)(intptr_t)v; + glViewportIndexedfvPROC glViewportIndexedfv = (glViewportIndexedfvPROC)((intptr_t)function_pointer); + glViewportIndexedfv(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglScissorArrayv(JNIEnv *env, jclass clazz, jint first, jint count, jlong v, jlong function_pointer) { + const GLint *v_address = (const GLint *)(intptr_t)v; + glScissorArrayvPROC glScissorArrayv = (glScissorArrayvPROC)((intptr_t)function_pointer); + glScissorArrayv(first, count, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglScissorIndexed(JNIEnv *env, jclass clazz, jint index, jint left, jint bottom, jint width, jint height, jlong function_pointer) { + glScissorIndexedPROC glScissorIndexed = (glScissorIndexedPROC)((intptr_t)function_pointer); + glScissorIndexed(index, left, bottom, width, height); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglScissorIndexedv(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLint *v_address = (const GLint *)(intptr_t)v; + glScissorIndexedvPROC glScissorIndexedv = (glScissorIndexedvPROC)((intptr_t)function_pointer); + glScissorIndexedv(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglDepthRangeArrayv(JNIEnv *env, jclass clazz, jint first, jint count, jlong v, jlong function_pointer) { + const GLdouble *v_address = (const GLdouble *)(intptr_t)v; + glDepthRangeArrayvPROC glDepthRangeArrayv = (glDepthRangeArrayvPROC)((intptr_t)function_pointer); + glDepthRangeArrayv(first, count, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglDepthRangeIndexed(JNIEnv *env, jclass clazz, jint index, jdouble n, jdouble f, jlong function_pointer) { + glDepthRangeIndexedPROC glDepthRangeIndexed = (glDepthRangeIndexedPROC)((intptr_t)function_pointer); + glDepthRangeIndexed(index, n, f); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglGetFloati_1v(JNIEnv *env, jclass clazz, jint target, jint index, jlong data, jlong function_pointer) { + GLfloat *data_address = (GLfloat *)(intptr_t)data; + glGetFloati_vPROC glGetFloati_v = (glGetFloati_vPROC)((intptr_t)function_pointer); + glGetFloati_v(target, index, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL41_nglGetDoublei_1v(JNIEnv *env, jclass clazz, jint target, jint index, jlong data, jlong function_pointer) { + GLdouble *data_address = (GLdouble *)(intptr_t)data; + glGetDoublei_vPROC glGetDoublei_v = (glGetDoublei_vPROC)((intptr_t)function_pointer); + glGetDoublei_v(target, index, data_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL42.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL42.c new file mode 100644 index 0000000..4714419 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL42.c @@ -0,0 +1,94 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glGetActiveAtomicCounterBufferivPROC) (GLuint program, GLuint bufferIndex, GLenum pname, GLint * params); +typedef void (APIENTRY *glTexStorage1DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +typedef void (APIENTRY *glTexStorage2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef void (APIENTRY *glTexStorage3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +typedef void (APIENTRY *glDrawTransformFeedbackInstancedPROC) (GLenum mode, GLuint id, GLsizei primcount); +typedef void (APIENTRY *glDrawTransformFeedbackStreamInstancedPROC) (GLenum mode, GLuint id, GLuint stream, GLsizei primcount); +typedef void (APIENTRY *glDrawArraysInstancedBaseInstancePROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount, GLuint baseinstance); +typedef void (APIENTRY *glDrawElementsInstancedBaseInstancePROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid * indices, GLsizei primcount, GLuint baseinstance); +typedef void (APIENTRY *glDrawElementsInstancedBaseVertexBaseInstancePROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid * indices, GLsizei primcount, GLint basevertex, GLuint baseinstance); +typedef void (APIENTRY *glBindImageTexturePROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); +typedef void (APIENTRY *glMemoryBarrierPROC) (GLbitfield barriers); +typedef void (APIENTRY *glGetInternalformativPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint * params); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL42_nglGetActiveAtomicCounterBufferiv(JNIEnv *env, jclass clazz, jint program, jint bufferIndex, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetActiveAtomicCounterBufferivPROC glGetActiveAtomicCounterBufferiv = (glGetActiveAtomicCounterBufferivPROC)((intptr_t)function_pointer); + glGetActiveAtomicCounterBufferiv(program, bufferIndex, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL42_nglTexStorage1D(JNIEnv *env, jclass clazz, jint target, jint levels, jint internalformat, jint width, jlong function_pointer) { + glTexStorage1DPROC glTexStorage1D = (glTexStorage1DPROC)((intptr_t)function_pointer); + glTexStorage1D(target, levels, internalformat, width); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL42_nglTexStorage2D(JNIEnv *env, jclass clazz, jint target, jint levels, jint internalformat, jint width, jint height, jlong function_pointer) { + glTexStorage2DPROC glTexStorage2D = (glTexStorage2DPROC)((intptr_t)function_pointer); + glTexStorage2D(target, levels, internalformat, width, height); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL42_nglTexStorage3D(JNIEnv *env, jclass clazz, jint target, jint levels, jint internalformat, jint width, jint height, jint depth, jlong function_pointer) { + glTexStorage3DPROC glTexStorage3D = (glTexStorage3DPROC)((intptr_t)function_pointer); + glTexStorage3D(target, levels, internalformat, width, height, depth); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL42_nglDrawTransformFeedbackInstanced(JNIEnv *env, jclass clazz, jint mode, jint id, jint primcount, jlong function_pointer) { + glDrawTransformFeedbackInstancedPROC glDrawTransformFeedbackInstanced = (glDrawTransformFeedbackInstancedPROC)((intptr_t)function_pointer); + glDrawTransformFeedbackInstanced(mode, id, primcount); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL42_nglDrawTransformFeedbackStreamInstanced(JNIEnv *env, jclass clazz, jint mode, jint id, jint stream, jint primcount, jlong function_pointer) { + glDrawTransformFeedbackStreamInstancedPROC glDrawTransformFeedbackStreamInstanced = (glDrawTransformFeedbackStreamInstancedPROC)((intptr_t)function_pointer); + glDrawTransformFeedbackStreamInstanced(mode, id, stream, primcount); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL42_nglDrawArraysInstancedBaseInstance(JNIEnv *env, jclass clazz, jint mode, jint first, jint count, jint primcount, jint baseinstance, jlong function_pointer) { + glDrawArraysInstancedBaseInstancePROC glDrawArraysInstancedBaseInstance = (glDrawArraysInstancedBaseInstancePROC)((intptr_t)function_pointer); + glDrawArraysInstancedBaseInstance(mode, first, count, primcount, baseinstance); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL42_nglDrawElementsInstancedBaseInstance(JNIEnv *env, jclass clazz, jint mode, jint count, jint type, jlong indices, jint primcount, jint baseinstance, jlong function_pointer) { + const GLvoid *indices_address = (const GLvoid *)(intptr_t)indices; + glDrawElementsInstancedBaseInstancePROC glDrawElementsInstancedBaseInstance = (glDrawElementsInstancedBaseInstancePROC)((intptr_t)function_pointer); + glDrawElementsInstancedBaseInstance(mode, count, type, indices_address, primcount, baseinstance); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL42_nglDrawElementsInstancedBaseInstanceBO(JNIEnv *env, jclass clazz, jint mode, jint count, jint type, jlong indices_buffer_offset, jint primcount, jint baseinstance, jlong function_pointer) { + const GLvoid *indices_address = (const GLvoid *)(intptr_t)offsetToPointer(indices_buffer_offset); + glDrawElementsInstancedBaseInstancePROC glDrawElementsInstancedBaseInstance = (glDrawElementsInstancedBaseInstancePROC)((intptr_t)function_pointer); + glDrawElementsInstancedBaseInstance(mode, count, type, indices_address, primcount, baseinstance); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL42_nglDrawElementsInstancedBaseVertexBaseInstance(JNIEnv *env, jclass clazz, jint mode, jint count, jint type, jlong indices, jint primcount, jint basevertex, jint baseinstance, jlong function_pointer) { + const GLvoid *indices_address = (const GLvoid *)(intptr_t)indices; + glDrawElementsInstancedBaseVertexBaseInstancePROC glDrawElementsInstancedBaseVertexBaseInstance = (glDrawElementsInstancedBaseVertexBaseInstancePROC)((intptr_t)function_pointer); + glDrawElementsInstancedBaseVertexBaseInstance(mode, count, type, indices_address, primcount, basevertex, baseinstance); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL42_nglDrawElementsInstancedBaseVertexBaseInstanceBO(JNIEnv *env, jclass clazz, jint mode, jint count, jint type, jlong indices_buffer_offset, jint primcount, jint basevertex, jint baseinstance, jlong function_pointer) { + const GLvoid *indices_address = (const GLvoid *)(intptr_t)offsetToPointer(indices_buffer_offset); + glDrawElementsInstancedBaseVertexBaseInstancePROC glDrawElementsInstancedBaseVertexBaseInstance = (glDrawElementsInstancedBaseVertexBaseInstancePROC)((intptr_t)function_pointer); + glDrawElementsInstancedBaseVertexBaseInstance(mode, count, type, indices_address, primcount, basevertex, baseinstance); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL42_nglBindImageTexture(JNIEnv *env, jclass clazz, jint unit, jint texture, jint level, jboolean layered, jint layer, jint access, jint format, jlong function_pointer) { + glBindImageTexturePROC glBindImageTexture = (glBindImageTexturePROC)((intptr_t)function_pointer); + glBindImageTexture(unit, texture, level, layered, layer, access, format); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL42_nglMemoryBarrier(JNIEnv *env, jclass clazz, jint barriers, jlong function_pointer) { + glMemoryBarrierPROC glMemoryBarrier = (glMemoryBarrierPROC)((intptr_t)function_pointer); + glMemoryBarrier(barriers); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL42_nglGetInternalformativ(JNIEnv *env, jclass clazz, jint target, jint internalformat, jint pname, jint bufSize, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetInternalformativPROC glGetInternalformativ = (glGetInternalformativPROC)((intptr_t)function_pointer); + glGetInternalformativ(target, internalformat, pname, bufSize, params_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL43.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL43.c new file mode 100644 index 0000000..904121f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL43.c @@ -0,0 +1,312 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glClearBufferDataPROC) (GLenum target, GLenum internalformat, GLenum format, GLenum type, const GLvoid * data); +typedef void (APIENTRY *glClearBufferSubDataPROC) (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const GLvoid * data); +typedef void (APIENTRY *glDispatchComputePROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); +typedef void (APIENTRY *glDispatchComputeIndirectPROC) (GLintptr indirect); +typedef void (APIENTRY *glCopyImageSubDataPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); +typedef void (APIENTRY *glDebugMessageControlPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint * ids, GLboolean enabled); +typedef void (APIENTRY *glDebugMessageInsertPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf); +typedef void (APIENTRY *glDebugMessageCallbackPROC) (GLDEBUGPROC callback, GLvoid * userParam); +typedef GLuint (APIENTRY *glGetDebugMessageLogPROC) (GLuint count, GLsizei bufsize, GLenum * sources, GLenum * types, GLuint * ids, GLenum * severities, GLsizei * lengths, GLchar * messageLog); +typedef void (APIENTRY *glPushDebugGroupPROC) (GLenum source, GLuint id, GLsizei length, const GLchar * message); +typedef void (APIENTRY *glPopDebugGroupPROC) (); +typedef void (APIENTRY *glObjectLabelPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar * label); +typedef void (APIENTRY *glGetObjectLabelPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei * length, GLchar * label); +typedef void (APIENTRY *glObjectPtrLabelPROC) (GLvoid * ptr, GLsizei length, const GLchar * label); +typedef void (APIENTRY *glGetObjectPtrLabelPROC) (GLvoid * ptr, GLsizei bufSize, GLsizei * length, GLchar * label); +typedef void (APIENTRY *glFramebufferParameteriPROC) (GLenum target, GLenum pname, GLint param); +typedef void (APIENTRY *glGetFramebufferParameterivPROC) (GLenum target, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetInternalformati64vPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 * params); +typedef void (APIENTRY *glInvalidateTexSubImagePROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth); +typedef void (APIENTRY *glInvalidateTexImagePROC) (GLuint texture, GLint level); +typedef void (APIENTRY *glInvalidateBufferSubDataPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length); +typedef void (APIENTRY *glInvalidateBufferDataPROC) (GLuint buffer); +typedef void (APIENTRY *glInvalidateFramebufferPROC) (GLenum target, GLsizei numAttachments, const GLenum * attachments); +typedef void (APIENTRY *glInvalidateSubFramebufferPROC) (GLenum target, GLsizei numAttachments, const GLenum * attachments, GLint x, GLint y, GLsizei width, GLsizei height); +typedef void (APIENTRY *glMultiDrawArraysIndirectPROC) (GLenum mode, const GLvoid * indirect, GLsizei primcount, GLsizei stride); +typedef void (APIENTRY *glMultiDrawElementsIndirectPROC) (GLenum mode, GLenum type, const GLvoid * indirect, GLsizei primcount, GLsizei stride); +typedef void (APIENTRY *glGetProgramInterfaceivPROC) (GLuint program, GLenum programInterface, GLenum pname, GLint * params); +typedef GLuint (APIENTRY *glGetProgramResourceIndexPROC) (GLuint program, GLenum programInterface, const GLchar * name); +typedef void (APIENTRY *glGetProgramResourceNamePROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei * length, GLchar * name); +typedef void (APIENTRY *glGetProgramResourceivPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum * props, GLsizei bufSize, GLsizei * length, GLint * params); +typedef GLint (APIENTRY *glGetProgramResourceLocationPROC) (GLuint program, GLenum programInterface, const GLchar * name); +typedef GLint (APIENTRY *glGetProgramResourceLocationIndexPROC) (GLuint program, GLenum programInterface, const GLchar * name); +typedef void (APIENTRY *glShaderStorageBlockBindingPROC) (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding); +typedef void (APIENTRY *glTexBufferRangePROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRY *glTexStorage2DMultisamplePROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); +typedef void (APIENTRY *glTexStorage3DMultisamplePROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +typedef void (APIENTRY *glTextureViewPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers); +typedef void (APIENTRY *glBindVertexBufferPROC) (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); +typedef void (APIENTRY *glVertexAttribFormatPROC) (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); +typedef void (APIENTRY *glVertexAttribIFormatPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (APIENTRY *glVertexAttribLFormatPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); +typedef void (APIENTRY *glVertexAttribBindingPROC) (GLuint attribindex, GLuint bindingindex); +typedef void (APIENTRY *glVertexBindingDivisorPROC) (GLuint bindingindex, GLuint divisor); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglClearBufferData(JNIEnv *env, jclass clazz, jint target, jint internalformat, jint format, jint type, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glClearBufferDataPROC glClearBufferData = (glClearBufferDataPROC)((intptr_t)function_pointer); + glClearBufferData(target, internalformat, format, type, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglClearBufferSubData(JNIEnv *env, jclass clazz, jint target, jint internalformat, jlong offset, jlong size, jint format, jint type, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glClearBufferSubDataPROC glClearBufferSubData = (glClearBufferSubDataPROC)((intptr_t)function_pointer); + glClearBufferSubData(target, internalformat, offset, size, format, type, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglDispatchCompute(JNIEnv *env, jclass clazz, jint num_groups_x, jint num_groups_y, jint num_groups_z, jlong function_pointer) { + glDispatchComputePROC glDispatchCompute = (glDispatchComputePROC)((intptr_t)function_pointer); + glDispatchCompute(num_groups_x, num_groups_y, num_groups_z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglDispatchComputeIndirect(JNIEnv *env, jclass clazz, jlong indirect, jlong function_pointer) { + glDispatchComputeIndirectPROC glDispatchComputeIndirect = (glDispatchComputeIndirectPROC)((intptr_t)function_pointer); + glDispatchComputeIndirect(indirect); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglCopyImageSubData(JNIEnv *env, jclass clazz, jint srcName, jint srcTarget, jint srcLevel, jint srcX, jint srcY, jint srcZ, jint dstName, jint dstTarget, jint dstLevel, jint dstX, jint dstY, jint dstZ, jint srcWidth, jint srcHeight, jint srcDepth, jlong function_pointer) { + glCopyImageSubDataPROC glCopyImageSubData = (glCopyImageSubDataPROC)((intptr_t)function_pointer); + glCopyImageSubData(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, srcWidth, srcHeight, srcDepth); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglDebugMessageControl(JNIEnv *env, jclass clazz, jint source, jint type, jint severity, jint count, jlong ids, jboolean enabled, jlong function_pointer) { + const GLuint *ids_address = (const GLuint *)(intptr_t)ids; + glDebugMessageControlPROC glDebugMessageControl = (glDebugMessageControlPROC)((intptr_t)function_pointer); + glDebugMessageControl(source, type, severity, count, ids_address, enabled); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglDebugMessageInsert(JNIEnv *env, jclass clazz, jint source, jint type, jint id, jint severity, jint length, jlong buf, jlong function_pointer) { + const GLchar *buf_address = (const GLchar *)(intptr_t)buf; + glDebugMessageInsertPROC glDebugMessageInsert = (glDebugMessageInsertPROC)((intptr_t)function_pointer); + glDebugMessageInsert(source, type, id, severity, length, buf_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglDebugMessageCallback(JNIEnv *env, jclass clazz, jlong callback, jlong userParam, jlong function_pointer) { + glDebugMessageCallbackPROC glDebugMessageCallback = (glDebugMessageCallbackPROC)((intptr_t)function_pointer); + glDebugMessageCallback((GLDEBUGPROC)(intptr_t)callback, (GLvoid *)(intptr_t)userParam); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL43_nglGetDebugMessageLog(JNIEnv *env, jclass clazz, jint count, jint bufsize, jlong sources, jlong types, jlong ids, jlong severities, jlong lengths, jlong messageLog, jlong function_pointer) { + GLenum *sources_address = (GLenum *)(intptr_t)sources; + GLenum *types_address = (GLenum *)(intptr_t)types; + GLuint *ids_address = (GLuint *)(intptr_t)ids; + GLenum *severities_address = (GLenum *)(intptr_t)severities; + GLsizei *lengths_address = (GLsizei *)(intptr_t)lengths; + GLchar *messageLog_address = (GLchar *)(intptr_t)messageLog; + glGetDebugMessageLogPROC glGetDebugMessageLog = (glGetDebugMessageLogPROC)((intptr_t)function_pointer); + GLuint __result = glGetDebugMessageLog(count, bufsize, sources_address, types_address, ids_address, severities_address, lengths_address, messageLog_address); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglPushDebugGroup(JNIEnv *env, jclass clazz, jint source, jint id, jint length, jlong message, jlong function_pointer) { + const GLchar *message_address = (const GLchar *)(intptr_t)message; + glPushDebugGroupPROC glPushDebugGroup = (glPushDebugGroupPROC)((intptr_t)function_pointer); + glPushDebugGroup(source, id, length, message_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglPopDebugGroup(JNIEnv *env, jclass clazz, jlong function_pointer) { + glPopDebugGroupPROC glPopDebugGroup = (glPopDebugGroupPROC)((intptr_t)function_pointer); + glPopDebugGroup(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglObjectLabel(JNIEnv *env, jclass clazz, jint identifier, jint name, jint length, jlong label, jlong function_pointer) { + const GLchar *label_address = (const GLchar *)(intptr_t)label; + glObjectLabelPROC glObjectLabel = (glObjectLabelPROC)((intptr_t)function_pointer); + glObjectLabel(identifier, name, length, label_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglGetObjectLabel(JNIEnv *env, jclass clazz, jint identifier, jint name, jint bufSize, jlong length, jlong label, jlong function_pointer) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLchar *label_address = (GLchar *)(intptr_t)label; + glGetObjectLabelPROC glGetObjectLabel = (glGetObjectLabelPROC)((intptr_t)function_pointer); + glGetObjectLabel(identifier, name, bufSize, length_address, label_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglObjectPtrLabel(JNIEnv *env, jclass clazz, jlong ptr, jint length, jlong label, jlong function_pointer) { + const GLchar *label_address = (const GLchar *)(intptr_t)label; + glObjectPtrLabelPROC glObjectPtrLabel = (glObjectPtrLabelPROC)((intptr_t)function_pointer); + glObjectPtrLabel((GLvoid *)(intptr_t)ptr, length, label_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglGetObjectPtrLabel(JNIEnv *env, jclass clazz, jlong ptr, jint bufSize, jlong length, jlong label, jlong function_pointer) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLchar *label_address = (GLchar *)(intptr_t)label; + glGetObjectPtrLabelPROC glGetObjectPtrLabel = (glGetObjectPtrLabelPROC)((intptr_t)function_pointer); + glGetObjectPtrLabel((GLvoid *)(intptr_t)ptr, bufSize, length_address, label_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglFramebufferParameteri(JNIEnv *env, jclass clazz, jint target, jint pname, jint param, jlong function_pointer) { + glFramebufferParameteriPROC glFramebufferParameteri = (glFramebufferParameteriPROC)((intptr_t)function_pointer); + glFramebufferParameteri(target, pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglGetFramebufferParameteriv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetFramebufferParameterivPROC glGetFramebufferParameteriv = (glGetFramebufferParameterivPROC)((intptr_t)function_pointer); + glGetFramebufferParameteriv(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglGetInternalformati64v(JNIEnv *env, jclass clazz, jint target, jint internalformat, jint pname, jint bufSize, jlong params, jlong function_pointer) { + GLint64 *params_address = (GLint64 *)(intptr_t)params; + glGetInternalformati64vPROC glGetInternalformati64v = (glGetInternalformati64vPROC)((intptr_t)function_pointer); + glGetInternalformati64v(target, internalformat, pname, bufSize, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglInvalidateTexSubImage(JNIEnv *env, jclass clazz, jint texture, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jlong function_pointer) { + glInvalidateTexSubImagePROC glInvalidateTexSubImage = (glInvalidateTexSubImagePROC)((intptr_t)function_pointer); + glInvalidateTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglInvalidateTexImage(JNIEnv *env, jclass clazz, jint texture, jint level, jlong function_pointer) { + glInvalidateTexImagePROC glInvalidateTexImage = (glInvalidateTexImagePROC)((intptr_t)function_pointer); + glInvalidateTexImage(texture, level); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglInvalidateBufferSubData(JNIEnv *env, jclass clazz, jint buffer, jlong offset, jlong length, jlong function_pointer) { + glInvalidateBufferSubDataPROC glInvalidateBufferSubData = (glInvalidateBufferSubDataPROC)((intptr_t)function_pointer); + glInvalidateBufferSubData(buffer, offset, length); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglInvalidateBufferData(JNIEnv *env, jclass clazz, jint buffer, jlong function_pointer) { + glInvalidateBufferDataPROC glInvalidateBufferData = (glInvalidateBufferDataPROC)((intptr_t)function_pointer); + glInvalidateBufferData(buffer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglInvalidateFramebuffer(JNIEnv *env, jclass clazz, jint target, jint numAttachments, jlong attachments, jlong function_pointer) { + const GLenum *attachments_address = (const GLenum *)(intptr_t)attachments; + glInvalidateFramebufferPROC glInvalidateFramebuffer = (glInvalidateFramebufferPROC)((intptr_t)function_pointer); + glInvalidateFramebuffer(target, numAttachments, attachments_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglInvalidateSubFramebuffer(JNIEnv *env, jclass clazz, jint target, jint numAttachments, jlong attachments, jint x, jint y, jint width, jint height, jlong function_pointer) { + const GLenum *attachments_address = (const GLenum *)(intptr_t)attachments; + glInvalidateSubFramebufferPROC glInvalidateSubFramebuffer = (glInvalidateSubFramebufferPROC)((intptr_t)function_pointer); + glInvalidateSubFramebuffer(target, numAttachments, attachments_address, x, y, width, height); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglMultiDrawArraysIndirect(JNIEnv *env, jclass clazz, jint mode, jlong indirect, jint primcount, jint stride, jlong function_pointer) { + const GLvoid *indirect_address = (const GLvoid *)(intptr_t)indirect; + glMultiDrawArraysIndirectPROC glMultiDrawArraysIndirect = (glMultiDrawArraysIndirectPROC)((intptr_t)function_pointer); + glMultiDrawArraysIndirect(mode, indirect_address, primcount, stride); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglMultiDrawArraysIndirectBO(JNIEnv *env, jclass clazz, jint mode, jlong indirect_buffer_offset, jint primcount, jint stride, jlong function_pointer) { + const GLvoid *indirect_address = (const GLvoid *)(intptr_t)offsetToPointer(indirect_buffer_offset); + glMultiDrawArraysIndirectPROC glMultiDrawArraysIndirect = (glMultiDrawArraysIndirectPROC)((intptr_t)function_pointer); + glMultiDrawArraysIndirect(mode, indirect_address, primcount, stride); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglMultiDrawElementsIndirect(JNIEnv *env, jclass clazz, jint mode, jint type, jlong indirect, jint primcount, jint stride, jlong function_pointer) { + const GLvoid *indirect_address = (const GLvoid *)(intptr_t)indirect; + glMultiDrawElementsIndirectPROC glMultiDrawElementsIndirect = (glMultiDrawElementsIndirectPROC)((intptr_t)function_pointer); + glMultiDrawElementsIndirect(mode, type, indirect_address, primcount, stride); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglMultiDrawElementsIndirectBO(JNIEnv *env, jclass clazz, jint mode, jint type, jlong indirect_buffer_offset, jint primcount, jint stride, jlong function_pointer) { + const GLvoid *indirect_address = (const GLvoid *)(intptr_t)offsetToPointer(indirect_buffer_offset); + glMultiDrawElementsIndirectPROC glMultiDrawElementsIndirect = (glMultiDrawElementsIndirectPROC)((intptr_t)function_pointer); + glMultiDrawElementsIndirect(mode, type, indirect_address, primcount, stride); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglGetProgramInterfaceiv(JNIEnv *env, jclass clazz, jint program, jint programInterface, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetProgramInterfaceivPROC glGetProgramInterfaceiv = (glGetProgramInterfaceivPROC)((intptr_t)function_pointer); + glGetProgramInterfaceiv(program, programInterface, pname, params_address); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL43_nglGetProgramResourceIndex(JNIEnv *env, jclass clazz, jint program, jint programInterface, jlong name, jlong function_pointer) { + const GLchar *name_address = (const GLchar *)(intptr_t)name; + glGetProgramResourceIndexPROC glGetProgramResourceIndex = (glGetProgramResourceIndexPROC)((intptr_t)function_pointer); + GLuint __result = glGetProgramResourceIndex(program, programInterface, name_address); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglGetProgramResourceName(JNIEnv *env, jclass clazz, jint program, jint programInterface, jint index, jint bufSize, jlong length, jlong name, jlong function_pointer) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLchar *name_address = (GLchar *)(intptr_t)name; + glGetProgramResourceNamePROC glGetProgramResourceName = (glGetProgramResourceNamePROC)((intptr_t)function_pointer); + glGetProgramResourceName(program, programInterface, index, bufSize, length_address, name_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglGetProgramResourceiv(JNIEnv *env, jclass clazz, jint program, jint programInterface, jint index, jint propCount, jlong props, jint bufSize, jlong length, jlong params, jlong function_pointer) { + const GLenum *props_address = (const GLenum *)(intptr_t)props; + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLint *params_address = (GLint *)(intptr_t)params; + glGetProgramResourceivPROC glGetProgramResourceiv = (glGetProgramResourceivPROC)((intptr_t)function_pointer); + glGetProgramResourceiv(program, programInterface, index, propCount, props_address, bufSize, length_address, params_address); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL43_nglGetProgramResourceLocation(JNIEnv *env, jclass clazz, jint program, jint programInterface, jlong name, jlong function_pointer) { + const GLchar *name_address = (const GLchar *)(intptr_t)name; + glGetProgramResourceLocationPROC glGetProgramResourceLocation = (glGetProgramResourceLocationPROC)((intptr_t)function_pointer); + GLint __result = glGetProgramResourceLocation(program, programInterface, name_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_GL43_nglGetProgramResourceLocationIndex(JNIEnv *env, jclass clazz, jint program, jint programInterface, jlong name, jlong function_pointer) { + const GLchar *name_address = (const GLchar *)(intptr_t)name; + glGetProgramResourceLocationIndexPROC glGetProgramResourceLocationIndex = (glGetProgramResourceLocationIndexPROC)((intptr_t)function_pointer); + GLint __result = glGetProgramResourceLocationIndex(program, programInterface, name_address); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglShaderStorageBlockBinding(JNIEnv *env, jclass clazz, jint program, jint storageBlockIndex, jint storageBlockBinding, jlong function_pointer) { + glShaderStorageBlockBindingPROC glShaderStorageBlockBinding = (glShaderStorageBlockBindingPROC)((intptr_t)function_pointer); + glShaderStorageBlockBinding(program, storageBlockIndex, storageBlockBinding); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglTexBufferRange(JNIEnv *env, jclass clazz, jint target, jint internalformat, jint buffer, jlong offset, jlong size, jlong function_pointer) { + glTexBufferRangePROC glTexBufferRange = (glTexBufferRangePROC)((intptr_t)function_pointer); + glTexBufferRange(target, internalformat, buffer, offset, size); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglTexStorage2DMultisample(JNIEnv *env, jclass clazz, jint target, jint samples, jint internalformat, jint width, jint height, jboolean fixedsamplelocations, jlong function_pointer) { + glTexStorage2DMultisamplePROC glTexStorage2DMultisample = (glTexStorage2DMultisamplePROC)((intptr_t)function_pointer); + glTexStorage2DMultisample(target, samples, internalformat, width, height, fixedsamplelocations); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglTexStorage3DMultisample(JNIEnv *env, jclass clazz, jint target, jint samples, jint internalformat, jint width, jint height, jint depth, jboolean fixedsamplelocations, jlong function_pointer) { + glTexStorage3DMultisamplePROC glTexStorage3DMultisample = (glTexStorage3DMultisamplePROC)((intptr_t)function_pointer); + glTexStorage3DMultisample(target, samples, internalformat, width, height, depth, fixedsamplelocations); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglTextureView(JNIEnv *env, jclass clazz, jint texture, jint target, jint origtexture, jint internalformat, jint minlevel, jint numlevels, jint minlayer, jint numlayers, jlong function_pointer) { + glTextureViewPROC glTextureView = (glTextureViewPROC)((intptr_t)function_pointer); + glTextureView(texture, target, origtexture, internalformat, minlevel, numlevels, minlayer, numlayers); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglBindVertexBuffer(JNIEnv *env, jclass clazz, jint bindingindex, jint buffer, jlong offset, jint stride, jlong function_pointer) { + glBindVertexBufferPROC glBindVertexBuffer = (glBindVertexBufferPROC)((intptr_t)function_pointer); + glBindVertexBuffer(bindingindex, buffer, offset, stride); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglVertexAttribFormat(JNIEnv *env, jclass clazz, jint attribindex, jint size, jint type, jboolean normalized, jint relativeoffset, jlong function_pointer) { + glVertexAttribFormatPROC glVertexAttribFormat = (glVertexAttribFormatPROC)((intptr_t)function_pointer); + glVertexAttribFormat(attribindex, size, type, normalized, relativeoffset); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglVertexAttribIFormat(JNIEnv *env, jclass clazz, jint attribindex, jint size, jint type, jint relativeoffset, jlong function_pointer) { + glVertexAttribIFormatPROC glVertexAttribIFormat = (glVertexAttribIFormatPROC)((intptr_t)function_pointer); + glVertexAttribIFormat(attribindex, size, type, relativeoffset); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglVertexAttribLFormat(JNIEnv *env, jclass clazz, jint attribindex, jint size, jint type, jint relativeoffset, jlong function_pointer) { + glVertexAttribLFormatPROC glVertexAttribLFormat = (glVertexAttribLFormatPROC)((intptr_t)function_pointer); + glVertexAttribLFormat(attribindex, size, type, relativeoffset); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglVertexAttribBinding(JNIEnv *env, jclass clazz, jint attribindex, jint bindingindex, jlong function_pointer) { + glVertexAttribBindingPROC glVertexAttribBinding = (glVertexAttribBindingPROC)((intptr_t)function_pointer); + glVertexAttribBinding(attribindex, bindingindex); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL43_nglVertexBindingDivisor(JNIEnv *env, jclass clazz, jint bindingindex, jint divisor, jlong function_pointer) { + glVertexBindingDivisorPROC glVertexBindingDivisor = (glVertexBindingDivisorPROC)((intptr_t)function_pointer); + glVertexBindingDivisor(bindingindex, divisor); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL44.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL44.c new file mode 100644 index 0000000..e654aa2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GL44.c @@ -0,0 +1,73 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glBufferStoragePROC) (GLenum target, GLsizeiptr size, const GLvoid * data, GLbitfield flags); +typedef void (APIENTRY *glClearTexImagePROC) (GLuint texture, GLint level, GLenum format, GLenum type, const GLvoid * data); +typedef void (APIENTRY *glClearTexSubImagePROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * data); +typedef void (APIENTRY *glBindBuffersBasePROC) (GLenum target, GLuint first, GLsizei count, const GLuint * buffers); +typedef void (APIENTRY *glBindBuffersRangePROC) (GLenum target, GLuint first, GLsizei count, const GLuint * buffers, const GLintptr * offsets, const GLsizeiptr * sizes); +typedef void (APIENTRY *glBindTexturesPROC) (GLuint first, GLsizei count, const GLuint * textures); +typedef void (APIENTRY *glBindSamplersPROC) (GLuint first, GLsizei count, const GLuint * samplers); +typedef void (APIENTRY *glBindImageTexturesPROC) (GLuint first, GLsizei count, const GLuint * textures); +typedef void (APIENTRY *glBindVertexBuffersPROC) (GLuint first, GLsizei count, const GLuint * buffers, const GLintptr * offsets, const GLsizei * strides); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL44_nglBufferStorage(JNIEnv *env, jclass clazz, jint target, jlong size, jlong data, jint flags, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glBufferStoragePROC glBufferStorage = (glBufferStoragePROC)((intptr_t)function_pointer); + glBufferStorage(target, size, data_address, flags); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL44_nglClearTexImage(JNIEnv *env, jclass clazz, jint texture, jint level, jint format, jint type, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glClearTexImagePROC glClearTexImage = (glClearTexImagePROC)((intptr_t)function_pointer); + glClearTexImage(texture, level, format, type, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL44_nglClearTexSubImage(JNIEnv *env, jclass clazz, jint texture, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jlong data, jlong function_pointer) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glClearTexSubImagePROC glClearTexSubImage = (glClearTexSubImagePROC)((intptr_t)function_pointer); + glClearTexSubImage(texture, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL44_nglBindBuffersBase(JNIEnv *env, jclass clazz, jint target, jint first, jint count, jlong buffers, jlong function_pointer) { + const GLuint *buffers_address = (const GLuint *)(intptr_t)buffers; + glBindBuffersBasePROC glBindBuffersBase = (glBindBuffersBasePROC)((intptr_t)function_pointer); + glBindBuffersBase(target, first, count, buffers_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL44_nglBindBuffersRange(JNIEnv *env, jclass clazz, jint target, jint first, jint count, jlong buffers, jlong offsets, jlong sizes, jlong function_pointer) { + const GLuint *buffers_address = (const GLuint *)(intptr_t)buffers; + const GLintptr *offsets_address = (const GLintptr *)(intptr_t)offsets; + const GLsizeiptr *sizes_address = (const GLsizeiptr *)(intptr_t)sizes; + glBindBuffersRangePROC glBindBuffersRange = (glBindBuffersRangePROC)((intptr_t)function_pointer); + glBindBuffersRange(target, first, count, buffers_address, offsets_address, sizes_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL44_nglBindTextures(JNIEnv *env, jclass clazz, jint first, jint count, jlong textures, jlong function_pointer) { + const GLuint *textures_address = (const GLuint *)(intptr_t)textures; + glBindTexturesPROC glBindTextures = (glBindTexturesPROC)((intptr_t)function_pointer); + glBindTextures(first, count, textures_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL44_nglBindSamplers(JNIEnv *env, jclass clazz, jint first, jint count, jlong samplers, jlong function_pointer) { + const GLuint *samplers_address = (const GLuint *)(intptr_t)samplers; + glBindSamplersPROC glBindSamplers = (glBindSamplersPROC)((intptr_t)function_pointer); + glBindSamplers(first, count, samplers_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL44_nglBindImageTextures(JNIEnv *env, jclass clazz, jint first, jint count, jlong textures, jlong function_pointer) { + const GLuint *textures_address = (const GLuint *)(intptr_t)textures; + glBindImageTexturesPROC glBindImageTextures = (glBindImageTexturesPROC)((intptr_t)function_pointer); + glBindImageTextures(first, count, textures_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GL44_nglBindVertexBuffers(JNIEnv *env, jclass clazz, jint first, jint count, jlong buffers, jlong offsets, jlong strides, jlong function_pointer) { + const GLuint *buffers_address = (const GLuint *)(intptr_t)buffers; + const GLintptr *offsets_address = (const GLintptr *)(intptr_t)offsets; + const GLsizei *strides_address = (const GLsizei *)(intptr_t)strides; + glBindVertexBuffersPROC glBindVertexBuffers = (glBindVertexBuffersPROC)((intptr_t)function_pointer); + glBindVertexBuffers(first, count, buffers_address, offsets_address, strides_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GREMEDYFrameTerminator.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GREMEDYFrameTerminator.c new file mode 100644 index 0000000..46b8509 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GREMEDYFrameTerminator.c @@ -0,0 +1,12 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glFrameTerminatorGREMEDYPROC) (); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GREMEDYFrameTerminator_nglFrameTerminatorGREMEDY(JNIEnv *env, jclass clazz, jlong function_pointer) { + glFrameTerminatorGREMEDYPROC glFrameTerminatorGREMEDY = (glFrameTerminatorGREMEDYPROC)((intptr_t)function_pointer); + glFrameTerminatorGREMEDY(); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GREMEDYStringMarker.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GREMEDYStringMarker.c new file mode 100644 index 0000000..6bde87a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_GREMEDYStringMarker.c @@ -0,0 +1,13 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glStringMarkerGREMEDYPROC) (GLsizei len, const GLbyte * string); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_GREMEDYStringMarker_nglStringMarkerGREMEDY(JNIEnv *env, jclass clazz, jint len, jlong string, jlong function_pointer) { + const GLbyte *string_address = (const GLbyte *)(intptr_t)string; + glStringMarkerGREMEDYPROC glStringMarkerGREMEDY = (glStringMarkerGREMEDYPROC)((intptr_t)function_pointer); + glStringMarkerGREMEDY(len, string_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_INTELMapTexture.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_INTELMapTexture.c new file mode 100644 index 0000000..66d5229 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_INTELMapTexture.c @@ -0,0 +1,27 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GLvoid * (APIENTRY *glMapTexture2DINTELPROC) (GLuint texture, GLint level, GLbitfield access, GLint * stride, GLenum * layout); +typedef void (APIENTRY *glUnmapTexture2DINTELPROC) (GLuint texture, GLint level); +typedef void (APIENTRY *glSyncTextureINTELPROC) (GLuint texture); + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_INTELMapTexture_nglMapTexture2DINTEL(JNIEnv *env, jclass clazz, jint texture, jint level, jlong length, jint access, jlong stride, jlong layout, jobject old_buffer, jlong function_pointer) { + GLint *stride_address = (GLint *)(intptr_t)stride; + GLenum *layout_address = (GLenum *)(intptr_t)layout; + glMapTexture2DINTELPROC glMapTexture2DINTEL = (glMapTexture2DINTELPROC)((intptr_t)function_pointer); + GLvoid * __result = glMapTexture2DINTEL(texture, level, access, stride_address, layout_address); + return safeNewBufferCached(env, __result, length, old_buffer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_INTELMapTexture_nglUnmapTexture2DINTEL(JNIEnv *env, jclass clazz, jint texture, jint level, jlong function_pointer) { + glUnmapTexture2DINTELPROC glUnmapTexture2DINTEL = (glUnmapTexture2DINTELPROC)((intptr_t)function_pointer); + glUnmapTexture2DINTEL(texture, level); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_INTELMapTexture_nglSyncTextureINTEL(JNIEnv *env, jclass clazz, jint texture, jlong function_pointer) { + glSyncTextureINTELPROC glSyncTextureINTEL = (glSyncTextureINTELPROC)((intptr_t)function_pointer); + glSyncTextureINTEL(texture); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVBindlessMultiDrawIndirect.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVBindlessMultiDrawIndirect.c new file mode 100644 index 0000000..bca1268 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVBindlessMultiDrawIndirect.c @@ -0,0 +1,32 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glMultiDrawArraysIndirectBindlessNVPROC) (GLenum mode, const GLvoid * indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount); +typedef void (APIENTRY *glMultiDrawElementsIndirectBindlessNVPROC) (GLenum mode, GLenum type, const GLvoid * indirect, GLsizei drawCount, GLsizei stride, GLint vertexBufferCount); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVBindlessMultiDrawIndirect_nglMultiDrawArraysIndirectBindlessNV(JNIEnv *env, jclass clazz, jint mode, jlong indirect, jint drawCount, jint stride, jint vertexBufferCount, jlong function_pointer) { + const GLvoid *indirect_address = (const GLvoid *)(intptr_t)indirect; + glMultiDrawArraysIndirectBindlessNVPROC glMultiDrawArraysIndirectBindlessNV = (glMultiDrawArraysIndirectBindlessNVPROC)((intptr_t)function_pointer); + glMultiDrawArraysIndirectBindlessNV(mode, indirect_address, drawCount, stride, vertexBufferCount); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVBindlessMultiDrawIndirect_nglMultiDrawArraysIndirectBindlessNVBO(JNIEnv *env, jclass clazz, jint mode, jlong indirect_buffer_offset, jint drawCount, jint stride, jint vertexBufferCount, jlong function_pointer) { + const GLvoid *indirect_address = (const GLvoid *)(intptr_t)offsetToPointer(indirect_buffer_offset); + glMultiDrawArraysIndirectBindlessNVPROC glMultiDrawArraysIndirectBindlessNV = (glMultiDrawArraysIndirectBindlessNVPROC)((intptr_t)function_pointer); + glMultiDrawArraysIndirectBindlessNV(mode, indirect_address, drawCount, stride, vertexBufferCount); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVBindlessMultiDrawIndirect_nglMultiDrawElementsIndirectBindlessNV(JNIEnv *env, jclass clazz, jint mode, jint type, jlong indirect, jint drawCount, jint stride, jint vertexBufferCount, jlong function_pointer) { + const GLvoid *indirect_address = (const GLvoid *)(intptr_t)indirect; + glMultiDrawElementsIndirectBindlessNVPROC glMultiDrawElementsIndirectBindlessNV = (glMultiDrawElementsIndirectBindlessNVPROC)((intptr_t)function_pointer); + glMultiDrawElementsIndirectBindlessNV(mode, type, indirect_address, drawCount, stride, vertexBufferCount); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVBindlessMultiDrawIndirect_nglMultiDrawElementsIndirectBindlessNVBO(JNIEnv *env, jclass clazz, jint mode, jint type, jlong indirect_buffer_offset, jint drawCount, jint stride, jint vertexBufferCount, jlong function_pointer) { + const GLvoid *indirect_address = (const GLvoid *)(intptr_t)offsetToPointer(indirect_buffer_offset); + glMultiDrawElementsIndirectBindlessNVPROC glMultiDrawElementsIndirectBindlessNV = (glMultiDrawElementsIndirectBindlessNVPROC)((intptr_t)function_pointer); + glMultiDrawElementsIndirectBindlessNV(mode, type, indirect_address, drawCount, stride, vertexBufferCount); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVBindlessTexture.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVBindlessTexture.c new file mode 100644 index 0000000..0b98088 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVBindlessTexture.c @@ -0,0 +1,91 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GLuint64 (APIENTRY *glGetTextureHandleNVPROC) (GLuint texture); +typedef GLuint64 (APIENTRY *glGetTextureSamplerHandleNVPROC) (GLuint texture, GLuint sampler); +typedef void (APIENTRY *glMakeTextureHandleResidentNVPROC) (GLuint64 handle); +typedef void (APIENTRY *glMakeTextureHandleNonResidentNVPROC) (GLuint64 handle); +typedef GLuint64 (APIENTRY *glGetImageHandleNVPROC) (GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum format); +typedef void (APIENTRY *glMakeImageHandleResidentNVPROC) (GLuint64 handle, GLenum access); +typedef void (APIENTRY *glMakeImageHandleNonResidentNVPROC) (GLuint64 handle); +typedef void (APIENTRY *glUniformHandleui64NVPROC) (GLint location, GLuint64 value); +typedef void (APIENTRY *glUniformHandleui64vNVPROC) (GLint location, GLsizei count, const GLuint64 * value); +typedef void (APIENTRY *glProgramUniformHandleui64NVPROC) (GLuint program, GLint location, GLuint64 value); +typedef void (APIENTRY *glProgramUniformHandleui64vNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64 * values); +typedef GLboolean (APIENTRY *glIsTextureHandleResidentNVPROC) (GLuint64 handle); +typedef GLboolean (APIENTRY *glIsImageHandleResidentNVPROC) (GLuint64 handle); + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_NVBindlessTexture_nglGetTextureHandleNV(JNIEnv *env, jclass clazz, jint texture, jlong function_pointer) { + glGetTextureHandleNVPROC glGetTextureHandleNV = (glGetTextureHandleNVPROC)((intptr_t)function_pointer); + GLuint64 __result = glGetTextureHandleNV(texture); + return __result; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_NVBindlessTexture_nglGetTextureSamplerHandleNV(JNIEnv *env, jclass clazz, jint texture, jint sampler, jlong function_pointer) { + glGetTextureSamplerHandleNVPROC glGetTextureSamplerHandleNV = (glGetTextureSamplerHandleNVPROC)((intptr_t)function_pointer); + GLuint64 __result = glGetTextureSamplerHandleNV(texture, sampler); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVBindlessTexture_nglMakeTextureHandleResidentNV(JNIEnv *env, jclass clazz, jlong handle, jlong function_pointer) { + glMakeTextureHandleResidentNVPROC glMakeTextureHandleResidentNV = (glMakeTextureHandleResidentNVPROC)((intptr_t)function_pointer); + glMakeTextureHandleResidentNV(handle); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVBindlessTexture_nglMakeTextureHandleNonResidentNV(JNIEnv *env, jclass clazz, jlong handle, jlong function_pointer) { + glMakeTextureHandleNonResidentNVPROC glMakeTextureHandleNonResidentNV = (glMakeTextureHandleNonResidentNVPROC)((intptr_t)function_pointer); + glMakeTextureHandleNonResidentNV(handle); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_NVBindlessTexture_nglGetImageHandleNV(JNIEnv *env, jclass clazz, jint texture, jint level, jboolean layered, jint layer, jint format, jlong function_pointer) { + glGetImageHandleNVPROC glGetImageHandleNV = (glGetImageHandleNVPROC)((intptr_t)function_pointer); + GLuint64 __result = glGetImageHandleNV(texture, level, layered, layer, format); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVBindlessTexture_nglMakeImageHandleResidentNV(JNIEnv *env, jclass clazz, jlong handle, jint access, jlong function_pointer) { + glMakeImageHandleResidentNVPROC glMakeImageHandleResidentNV = (glMakeImageHandleResidentNVPROC)((intptr_t)function_pointer); + glMakeImageHandleResidentNV(handle, access); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVBindlessTexture_nglMakeImageHandleNonResidentNV(JNIEnv *env, jclass clazz, jlong handle, jlong function_pointer) { + glMakeImageHandleNonResidentNVPROC glMakeImageHandleNonResidentNV = (glMakeImageHandleNonResidentNVPROC)((intptr_t)function_pointer); + glMakeImageHandleNonResidentNV(handle); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVBindlessTexture_nglUniformHandleui64NV(JNIEnv *env, jclass clazz, jint location, jlong value, jlong function_pointer) { + glUniformHandleui64NVPROC glUniformHandleui64NV = (glUniformHandleui64NVPROC)((intptr_t)function_pointer); + glUniformHandleui64NV(location, value); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVBindlessTexture_nglUniformHandleui64vNV(JNIEnv *env, jclass clazz, jint location, jint count, jlong value, jlong function_pointer) { + const GLuint64 *value_address = (const GLuint64 *)(intptr_t)value; + glUniformHandleui64vNVPROC glUniformHandleui64vNV = (glUniformHandleui64vNVPROC)((intptr_t)function_pointer); + glUniformHandleui64vNV(location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVBindlessTexture_nglProgramUniformHandleui64NV(JNIEnv *env, jclass clazz, jint program, jint location, jlong value, jlong function_pointer) { + glProgramUniformHandleui64NVPROC glProgramUniformHandleui64NV = (glProgramUniformHandleui64NVPROC)((intptr_t)function_pointer); + glProgramUniformHandleui64NV(program, location, value); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVBindlessTexture_nglProgramUniformHandleui64vNV(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong values, jlong function_pointer) { + const GLuint64 *values_address = (const GLuint64 *)(intptr_t)values; + glProgramUniformHandleui64vNVPROC glProgramUniformHandleui64vNV = (glProgramUniformHandleui64vNVPROC)((intptr_t)function_pointer); + glProgramUniformHandleui64vNV(program, location, count, values_address); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVBindlessTexture_nglIsTextureHandleResidentNV(JNIEnv *env, jclass clazz, jlong handle, jlong function_pointer) { + glIsTextureHandleResidentNVPROC glIsTextureHandleResidentNV = (glIsTextureHandleResidentNVPROC)((intptr_t)function_pointer); + GLboolean __result = glIsTextureHandleResidentNV(handle); + return __result; +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVBindlessTexture_nglIsImageHandleResidentNV(JNIEnv *env, jclass clazz, jlong handle, jlong function_pointer) { + glIsImageHandleResidentNVPROC glIsImageHandleResidentNV = (glIsImageHandleResidentNVPROC)((intptr_t)function_pointer); + GLboolean __result = glIsImageHandleResidentNV(handle); + return __result; +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVBlendEquationAdvanced.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVBlendEquationAdvanced.c new file mode 100644 index 0000000..9eeece8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVBlendEquationAdvanced.c @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glBlendParameteriNVPROC) (GLenum pname, GLint value); +typedef void (APIENTRY *glBlendBarrierNVPROC) (); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVBlendEquationAdvanced_nglBlendParameteriNV(JNIEnv *env, jclass clazz, jint pname, jint value, jlong function_pointer) { + glBlendParameteriNVPROC glBlendParameteriNV = (glBlendParameteriNVPROC)((intptr_t)function_pointer); + glBlendParameteriNV(pname, value); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVBlendEquationAdvanced_nglBlendBarrierNV(JNIEnv *env, jclass clazz, jlong function_pointer) { + glBlendBarrierNVPROC glBlendBarrierNV = (glBlendBarrierNVPROC)((intptr_t)function_pointer); + glBlendBarrierNV(); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVConditionalRender.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVConditionalRender.c new file mode 100644 index 0000000..1026cdb --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVConditionalRender.c @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glBeginConditionalRenderNVPROC) (GLuint id, GLenum mode); +typedef void (APIENTRY *glEndConditionalRenderNVPROC) (); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVConditionalRender_nglBeginConditionalRenderNV(JNIEnv *env, jclass clazz, jint id, jint mode, jlong function_pointer) { + glBeginConditionalRenderNVPROC glBeginConditionalRenderNV = (glBeginConditionalRenderNVPROC)((intptr_t)function_pointer); + glBeginConditionalRenderNV(id, mode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVConditionalRender_nglEndConditionalRenderNV(JNIEnv *env, jclass clazz, jlong function_pointer) { + glEndConditionalRenderNVPROC glEndConditionalRenderNV = (glEndConditionalRenderNVPROC)((intptr_t)function_pointer); + glEndConditionalRenderNV(); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVCopyImage.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVCopyImage.c new file mode 100644 index 0000000..8008e77 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVCopyImage.c @@ -0,0 +1,12 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glCopyImageSubDataNVPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei width, GLsizei height, GLsizei depth); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVCopyImage_nglCopyImageSubDataNV(JNIEnv *env, jclass clazz, jint srcName, jint srcTarget, jint srcLevel, jint srcX, jint srcY, jint srcZ, jint dstName, jint dstTarget, jint dstLevel, jint dstX, jint dstY, jint dstZ, jint width, jint height, jint depth, jlong function_pointer) { + glCopyImageSubDataNVPROC glCopyImageSubDataNV = (glCopyImageSubDataNVPROC)((intptr_t)function_pointer); + glCopyImageSubDataNV(srcName, srcTarget, srcLevel, srcX, srcY, srcZ, dstName, dstTarget, dstLevel, dstX, dstY, dstZ, width, height, depth); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVDepthBufferFloat.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVDepthBufferFloat.c new file mode 100644 index 0000000..f7db3ee --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVDepthBufferFloat.c @@ -0,0 +1,24 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glDepthRangedNVPROC) (GLdouble n, GLdouble f); +typedef void (APIENTRY *glClearDepthdNVPROC) (GLdouble d); +typedef void (APIENTRY *glDepthBoundsdNVPROC) (GLdouble zmin, GLdouble zmax); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVDepthBufferFloat_nglDepthRangedNV(JNIEnv *env, jclass clazz, jdouble n, jdouble f, jlong function_pointer) { + glDepthRangedNVPROC glDepthRangedNV = (glDepthRangedNVPROC)((intptr_t)function_pointer); + glDepthRangedNV(n, f); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVDepthBufferFloat_nglClearDepthdNV(JNIEnv *env, jclass clazz, jdouble d, jlong function_pointer) { + glClearDepthdNVPROC glClearDepthdNV = (glClearDepthdNVPROC)((intptr_t)function_pointer); + glClearDepthdNV(d); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVDepthBufferFloat_nglDepthBoundsdNV(JNIEnv *env, jclass clazz, jdouble zmin, jdouble zmax, jlong function_pointer) { + glDepthBoundsdNVPROC glDepthBoundsdNV = (glDepthBoundsdNVPROC)((intptr_t)function_pointer); + glDepthBoundsdNV(zmin, zmax); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVDrawTexture.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVDrawTexture.c new file mode 100644 index 0000000..c8ca713 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVDrawTexture.c @@ -0,0 +1,12 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glDrawTextureNVPROC) (GLuint texture, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVDrawTexture_nglDrawTextureNV(JNIEnv *env, jclass clazz, jint texture, jint sampler, jfloat x0, jfloat y0, jfloat x1, jfloat y1, jfloat z, jfloat s0, jfloat t0, jfloat s1, jfloat t1, jlong function_pointer) { + glDrawTextureNVPROC glDrawTextureNV = (glDrawTextureNVPROC)((intptr_t)function_pointer); + glDrawTextureNV(texture, sampler, x0, y0, x1, y1, z, s0, t0, s1, t1); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVEvaluators.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVEvaluators.c new file mode 100644 index 0000000..edd31ee --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVEvaluators.c @@ -0,0 +1,68 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glGetMapControlPointsNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, const GLvoid * pPoints); +typedef void (APIENTRY *glMapControlPointsNVPROC) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid * pPoints); +typedef void (APIENTRY *glMapParameterfvNVPROC) (GLenum target, GLenum pname, const GLfloat * params); +typedef void (APIENTRY *glMapParameterivNVPROC) (GLenum target, GLenum pname, const GLint * params); +typedef void (APIENTRY *glGetMapParameterfvNVPROC) (GLenum target, GLenum pname, const GLfloat * params); +typedef void (APIENTRY *glGetMapParameterivNVPROC) (GLenum target, GLenum pname, const GLint * params); +typedef void (APIENTRY *glGetMapAttribParameterfvNVPROC) (GLenum target, GLuint index, GLenum pname, GLfloat * params); +typedef void (APIENTRY *glGetMapAttribParameterivNVPROC) (GLenum target, GLuint index, GLenum pname, GLint * params); +typedef void (APIENTRY *glEvalMapsNVPROC) (GLenum target, GLenum mode); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVEvaluators_nglGetMapControlPointsNV(JNIEnv *env, jclass clazz, jint target, jint index, jint type, jint ustride, jint vstride, jboolean packed, jlong pPoints, jlong function_pointer) { + const GLvoid *pPoints_address = (const GLvoid *)(intptr_t)pPoints; + glGetMapControlPointsNVPROC glGetMapControlPointsNV = (glGetMapControlPointsNVPROC)((intptr_t)function_pointer); + glGetMapControlPointsNV(target, index, type, ustride, vstride, packed, pPoints_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVEvaluators_nglMapControlPointsNV(JNIEnv *env, jclass clazz, jint target, jint index, jint type, jint ustride, jint vstride, jint uorder, jint vorder, jboolean packed, jlong pPoints, jlong function_pointer) { + const GLvoid *pPoints_address = (const GLvoid *)(intptr_t)pPoints; + glMapControlPointsNVPROC glMapControlPointsNV = (glMapControlPointsNVPROC)((intptr_t)function_pointer); + glMapControlPointsNV(target, index, type, ustride, vstride, uorder, vorder, packed, pPoints_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVEvaluators_nglMapParameterfvNV(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + const GLfloat *params_address = (const GLfloat *)(intptr_t)params; + glMapParameterfvNVPROC glMapParameterfvNV = (glMapParameterfvNVPROC)((intptr_t)function_pointer); + glMapParameterfvNV(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVEvaluators_nglMapParameterivNV(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + const GLint *params_address = (const GLint *)(intptr_t)params; + glMapParameterivNVPROC glMapParameterivNV = (glMapParameterivNVPROC)((intptr_t)function_pointer); + glMapParameterivNV(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVEvaluators_nglGetMapParameterfvNV(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + const GLfloat *params_address = (const GLfloat *)(intptr_t)params; + glGetMapParameterfvNVPROC glGetMapParameterfvNV = (glGetMapParameterfvNVPROC)((intptr_t)function_pointer); + glGetMapParameterfvNV(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVEvaluators_nglGetMapParameterivNV(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + const GLint *params_address = (const GLint *)(intptr_t)params; + glGetMapParameterivNVPROC glGetMapParameterivNV = (glGetMapParameterivNVPROC)((intptr_t)function_pointer); + glGetMapParameterivNV(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVEvaluators_nglGetMapAttribParameterfvNV(JNIEnv *env, jclass clazz, jint target, jint index, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetMapAttribParameterfvNVPROC glGetMapAttribParameterfvNV = (glGetMapAttribParameterfvNVPROC)((intptr_t)function_pointer); + glGetMapAttribParameterfvNV(target, index, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVEvaluators_nglGetMapAttribParameterivNV(JNIEnv *env, jclass clazz, jint target, jint index, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetMapAttribParameterivNVPROC glGetMapAttribParameterivNV = (glGetMapAttribParameterivNVPROC)((intptr_t)function_pointer); + glGetMapAttribParameterivNV(target, index, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVEvaluators_nglEvalMapsNV(JNIEnv *env, jclass clazz, jint target, jint mode, jlong function_pointer) { + glEvalMapsNVPROC glEvalMapsNV = (glEvalMapsNVPROC)((intptr_t)function_pointer); + glEvalMapsNV(target, mode); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVExplicitMultisample.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVExplicitMultisample.c new file mode 100644 index 0000000..554b778 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVExplicitMultisample.c @@ -0,0 +1,25 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glGetMultisamplefvNVPROC) (GLenum pname, GLuint index, GLfloat * val); +typedef void (APIENTRY *glSampleMaskIndexedNVPROC) (GLuint index, GLbitfield mask); +typedef void (APIENTRY *glTexRenderbufferNVPROC) (GLenum target, GLuint renderbuffer); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVExplicitMultisample_nglGetMultisamplefvNV(JNIEnv *env, jclass clazz, jint pname, jint index, jlong val, jlong function_pointer) { + GLfloat *val_address = (GLfloat *)(intptr_t)val; + glGetMultisamplefvNVPROC glGetMultisamplefvNV = (glGetMultisamplefvNVPROC)((intptr_t)function_pointer); + glGetMultisamplefvNV(pname, index, val_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVExplicitMultisample_nglSampleMaskIndexedNV(JNIEnv *env, jclass clazz, jint index, jint mask, jlong function_pointer) { + glSampleMaskIndexedNVPROC glSampleMaskIndexedNV = (glSampleMaskIndexedNVPROC)((intptr_t)function_pointer); + glSampleMaskIndexedNV(index, mask); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVExplicitMultisample_nglTexRenderbufferNV(JNIEnv *env, jclass clazz, jint target, jint renderbuffer, jlong function_pointer) { + glTexRenderbufferNVPROC glTexRenderbufferNV = (glTexRenderbufferNVPROC)((intptr_t)function_pointer); + glTexRenderbufferNV(target, renderbuffer); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVFence.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVFence.c new file mode 100644 index 0000000..9b754dd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVFence.c @@ -0,0 +1,53 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glGenFencesNVPROC) (GLsizei n, GLuint * piFences); +typedef void (APIENTRY *glDeleteFencesNVPROC) (GLsizei n, const GLuint * piFences); +typedef void (APIENTRY *glSetFenceNVPROC) (GLuint fence, GLenum condition); +typedef GLboolean (APIENTRY *glTestFenceNVPROC) (GLuint fence); +typedef void (APIENTRY *glFinishFenceNVPROC) (GLuint fence); +typedef GLboolean (APIENTRY *glIsFenceNVPROC) (GLuint fence); +typedef void (APIENTRY *glGetFenceivNVPROC) (GLuint fence, GLenum pname, GLint * piParams); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVFence_nglGenFencesNV(JNIEnv *env, jclass clazz, jint n, jlong piFences, jlong function_pointer) { + GLuint *piFences_address = (GLuint *)(intptr_t)piFences; + glGenFencesNVPROC glGenFencesNV = (glGenFencesNVPROC)((intptr_t)function_pointer); + glGenFencesNV(n, piFences_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVFence_nglDeleteFencesNV(JNIEnv *env, jclass clazz, jint n, jlong piFences, jlong function_pointer) { + const GLuint *piFences_address = (const GLuint *)(intptr_t)piFences; + glDeleteFencesNVPROC glDeleteFencesNV = (glDeleteFencesNVPROC)((intptr_t)function_pointer); + glDeleteFencesNV(n, piFences_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVFence_nglSetFenceNV(JNIEnv *env, jclass clazz, jint fence, jint condition, jlong function_pointer) { + glSetFenceNVPROC glSetFenceNV = (glSetFenceNVPROC)((intptr_t)function_pointer); + glSetFenceNV(fence, condition); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVFence_nglTestFenceNV(JNIEnv *env, jclass clazz, jint fence, jlong function_pointer) { + glTestFenceNVPROC glTestFenceNV = (glTestFenceNVPROC)((intptr_t)function_pointer); + GLboolean __result = glTestFenceNV(fence); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVFence_nglFinishFenceNV(JNIEnv *env, jclass clazz, jint fence, jlong function_pointer) { + glFinishFenceNVPROC glFinishFenceNV = (glFinishFenceNVPROC)((intptr_t)function_pointer); + glFinishFenceNV(fence); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVFence_nglIsFenceNV(JNIEnv *env, jclass clazz, jint fence, jlong function_pointer) { + glIsFenceNVPROC glIsFenceNV = (glIsFenceNVPROC)((intptr_t)function_pointer); + GLboolean __result = glIsFenceNV(fence); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVFence_nglGetFenceivNV(JNIEnv *env, jclass clazz, jint fence, jint pname, jlong piParams, jlong function_pointer) { + GLint *piParams_address = (GLint *)(intptr_t)piParams; + glGetFenceivNVPROC glGetFenceivNV = (glGetFenceivNVPROC)((intptr_t)function_pointer); + glGetFenceivNV(fence, pname, piParams_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVFragmentProgram.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVFragmentProgram.c new file mode 100644 index 0000000..efd086b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVFragmentProgram.c @@ -0,0 +1,36 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glProgramNamedParameter4fNVPROC) (GLuint id, GLsizei length, const GLubyte * name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRY *glProgramNamedParameter4dNVPROC) (GLuint id, GLsizei length, const GLubyte * name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRY *glGetProgramNamedParameterfvNVPROC) (GLuint id, GLsizei length, const GLubyte * name, GLfloat * params); +typedef void (APIENTRY *glGetProgramNamedParameterdvNVPROC) (GLuint id, GLsizei length, const GLubyte * name, GLdouble * params); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVFragmentProgram_nglProgramNamedParameter4fNV(JNIEnv *env, jclass clazz, jint id, jint length, jlong name, jfloat x, jfloat y, jfloat z, jfloat w, jlong function_pointer) { + const GLubyte *name_address = (const GLubyte *)(intptr_t)name; + glProgramNamedParameter4fNVPROC glProgramNamedParameter4fNV = (glProgramNamedParameter4fNVPROC)((intptr_t)function_pointer); + glProgramNamedParameter4fNV(id, length, name_address, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVFragmentProgram_nglProgramNamedParameter4dNV(JNIEnv *env, jclass clazz, jint id, jint length, jlong name, jdouble x, jdouble y, jdouble z, jdouble w, jlong function_pointer) { + const GLubyte *name_address = (const GLubyte *)(intptr_t)name; + glProgramNamedParameter4dNVPROC glProgramNamedParameter4dNV = (glProgramNamedParameter4dNVPROC)((intptr_t)function_pointer); + glProgramNamedParameter4dNV(id, length, name_address, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVFragmentProgram_nglGetProgramNamedParameterfvNV(JNIEnv *env, jclass clazz, jint id, jint length, jlong name, jlong params, jlong function_pointer) { + const GLubyte *name_address = (const GLubyte *)(intptr_t)name; + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetProgramNamedParameterfvNVPROC glGetProgramNamedParameterfvNV = (glGetProgramNamedParameterfvNVPROC)((intptr_t)function_pointer); + glGetProgramNamedParameterfvNV(id, length, name_address, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVFragmentProgram_nglGetProgramNamedParameterdvNV(JNIEnv *env, jclass clazz, jint id, jint length, jlong name, jlong params, jlong function_pointer) { + const GLubyte *name_address = (const GLubyte *)(intptr_t)name; + GLdouble *params_address = (GLdouble *)(intptr_t)params; + glGetProgramNamedParameterdvNVPROC glGetProgramNamedParameterdvNV = (glGetProgramNamedParameterdvNVPROC)((intptr_t)function_pointer); + glGetProgramNamedParameterdvNV(id, length, name_address, params_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVFramebufferMultisampleCoverage.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVFramebufferMultisampleCoverage.c new file mode 100644 index 0000000..a4a3545 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVFramebufferMultisampleCoverage.c @@ -0,0 +1,12 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glRenderbufferStorageMultisampleCoverageNVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLenum internalformat, GLsizei width, GLsizei height); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVFramebufferMultisampleCoverage_nglRenderbufferStorageMultisampleCoverageNV(JNIEnv *env, jclass clazz, jint target, jint coverageSamples, jint colorSamples, jint internalformat, jint width, jint height, jlong function_pointer) { + glRenderbufferStorageMultisampleCoverageNVPROC glRenderbufferStorageMultisampleCoverageNV = (glRenderbufferStorageMultisampleCoverageNVPROC)((intptr_t)function_pointer); + glRenderbufferStorageMultisampleCoverageNV(target, coverageSamples, colorSamples, internalformat, width, height); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVGeometryProgram4.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVGeometryProgram4.c new file mode 100644 index 0000000..0f23996 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVGeometryProgram4.c @@ -0,0 +1,12 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glProgramVertexLimitNVPROC) (GLenum target, GLint limit); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGeometryProgram4_nglProgramVertexLimitNV(JNIEnv *env, jclass clazz, jint target, jint limit, jlong function_pointer) { + glProgramVertexLimitNVPROC glProgramVertexLimitNV = (glProgramVertexLimitNVPROC)((intptr_t)function_pointer); + glProgramVertexLimitNV(target, limit); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVGpuProgram4.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVGpuProgram4.c new file mode 100644 index 0000000..f74de4c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVGpuProgram4.c @@ -0,0 +1,114 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glProgramLocalParameterI4iNVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRY *glProgramLocalParameterI4ivNVPROC) (GLenum target, GLuint index, const GLint * params); +typedef void (APIENTRY *glProgramLocalParametersI4ivNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint * params); +typedef void (APIENTRY *glProgramLocalParameterI4uiNVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRY *glProgramLocalParameterI4uivNVPROC) (GLenum target, GLuint index, const GLuint * params); +typedef void (APIENTRY *glProgramLocalParametersI4uivNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint * params); +typedef void (APIENTRY *glProgramEnvParameterI4iNVPROC) (GLenum target, GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef void (APIENTRY *glProgramEnvParameterI4ivNVPROC) (GLenum target, GLuint index, const GLint * params); +typedef void (APIENTRY *glProgramEnvParametersI4ivNVPROC) (GLenum target, GLuint index, GLsizei count, const GLint * params); +typedef void (APIENTRY *glProgramEnvParameterI4uiNVPROC) (GLenum target, GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef void (APIENTRY *glProgramEnvParameterI4uivNVPROC) (GLenum target, GLuint index, const GLuint * params); +typedef void (APIENTRY *glProgramEnvParametersI4uivNVPROC) (GLenum target, GLuint index, GLsizei count, const GLuint * params); +typedef void (APIENTRY *glGetProgramLocalParameterIivNVPROC) (GLenum target, GLuint index, GLint * params); +typedef void (APIENTRY *glGetProgramLocalParameterIuivNVPROC) (GLenum target, GLuint index, GLuint * params); +typedef void (APIENTRY *glGetProgramEnvParameterIivNVPROC) (GLenum target, GLuint index, GLint * params); +typedef void (APIENTRY *glGetProgramEnvParameterIuivNVPROC) (GLenum target, GLuint index, GLuint * params); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuProgram4_nglProgramLocalParameterI4iNV(JNIEnv *env, jclass clazz, jint target, jint index, jint x, jint y, jint z, jint w, jlong function_pointer) { + glProgramLocalParameterI4iNVPROC glProgramLocalParameterI4iNV = (glProgramLocalParameterI4iNVPROC)((intptr_t)function_pointer); + glProgramLocalParameterI4iNV(target, index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuProgram4_nglProgramLocalParameterI4ivNV(JNIEnv *env, jclass clazz, jint target, jint index, jlong params, jlong function_pointer) { + const GLint *params_address = (const GLint *)(intptr_t)params; + glProgramLocalParameterI4ivNVPROC glProgramLocalParameterI4ivNV = (glProgramLocalParameterI4ivNVPROC)((intptr_t)function_pointer); + glProgramLocalParameterI4ivNV(target, index, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuProgram4_nglProgramLocalParametersI4ivNV(JNIEnv *env, jclass clazz, jint target, jint index, jint count, jlong params, jlong function_pointer) { + const GLint *params_address = (const GLint *)(intptr_t)params; + glProgramLocalParametersI4ivNVPROC glProgramLocalParametersI4ivNV = (glProgramLocalParametersI4ivNVPROC)((intptr_t)function_pointer); + glProgramLocalParametersI4ivNV(target, index, count, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuProgram4_nglProgramLocalParameterI4uiNV(JNIEnv *env, jclass clazz, jint target, jint index, jint x, jint y, jint z, jint w, jlong function_pointer) { + glProgramLocalParameterI4uiNVPROC glProgramLocalParameterI4uiNV = (glProgramLocalParameterI4uiNVPROC)((intptr_t)function_pointer); + glProgramLocalParameterI4uiNV(target, index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuProgram4_nglProgramLocalParameterI4uivNV(JNIEnv *env, jclass clazz, jint target, jint index, jlong params, jlong function_pointer) { + const GLuint *params_address = (const GLuint *)(intptr_t)params; + glProgramLocalParameterI4uivNVPROC glProgramLocalParameterI4uivNV = (glProgramLocalParameterI4uivNVPROC)((intptr_t)function_pointer); + glProgramLocalParameterI4uivNV(target, index, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuProgram4_nglProgramLocalParametersI4uivNV(JNIEnv *env, jclass clazz, jint target, jint index, jint count, jlong params, jlong function_pointer) { + const GLuint *params_address = (const GLuint *)(intptr_t)params; + glProgramLocalParametersI4uivNVPROC glProgramLocalParametersI4uivNV = (glProgramLocalParametersI4uivNVPROC)((intptr_t)function_pointer); + glProgramLocalParametersI4uivNV(target, index, count, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuProgram4_nglProgramEnvParameterI4iNV(JNIEnv *env, jclass clazz, jint target, jint index, jint x, jint y, jint z, jint w, jlong function_pointer) { + glProgramEnvParameterI4iNVPROC glProgramEnvParameterI4iNV = (glProgramEnvParameterI4iNVPROC)((intptr_t)function_pointer); + glProgramEnvParameterI4iNV(target, index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuProgram4_nglProgramEnvParameterI4ivNV(JNIEnv *env, jclass clazz, jint target, jint index, jlong params, jlong function_pointer) { + const GLint *params_address = (const GLint *)(intptr_t)params; + glProgramEnvParameterI4ivNVPROC glProgramEnvParameterI4ivNV = (glProgramEnvParameterI4ivNVPROC)((intptr_t)function_pointer); + glProgramEnvParameterI4ivNV(target, index, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuProgram4_nglProgramEnvParametersI4ivNV(JNIEnv *env, jclass clazz, jint target, jint index, jint count, jlong params, jlong function_pointer) { + const GLint *params_address = (const GLint *)(intptr_t)params; + glProgramEnvParametersI4ivNVPROC glProgramEnvParametersI4ivNV = (glProgramEnvParametersI4ivNVPROC)((intptr_t)function_pointer); + glProgramEnvParametersI4ivNV(target, index, count, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuProgram4_nglProgramEnvParameterI4uiNV(JNIEnv *env, jclass clazz, jint target, jint index, jint x, jint y, jint z, jint w, jlong function_pointer) { + glProgramEnvParameterI4uiNVPROC glProgramEnvParameterI4uiNV = (glProgramEnvParameterI4uiNVPROC)((intptr_t)function_pointer); + glProgramEnvParameterI4uiNV(target, index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuProgram4_nglProgramEnvParameterI4uivNV(JNIEnv *env, jclass clazz, jint target, jint index, jlong params, jlong function_pointer) { + const GLuint *params_address = (const GLuint *)(intptr_t)params; + glProgramEnvParameterI4uivNVPROC glProgramEnvParameterI4uivNV = (glProgramEnvParameterI4uivNVPROC)((intptr_t)function_pointer); + glProgramEnvParameterI4uivNV(target, index, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuProgram4_nglProgramEnvParametersI4uivNV(JNIEnv *env, jclass clazz, jint target, jint index, jint count, jlong params, jlong function_pointer) { + const GLuint *params_address = (const GLuint *)(intptr_t)params; + glProgramEnvParametersI4uivNVPROC glProgramEnvParametersI4uivNV = (glProgramEnvParametersI4uivNVPROC)((intptr_t)function_pointer); + glProgramEnvParametersI4uivNV(target, index, count, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuProgram4_nglGetProgramLocalParameterIivNV(JNIEnv *env, jclass clazz, jint target, jint index, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetProgramLocalParameterIivNVPROC glGetProgramLocalParameterIivNV = (glGetProgramLocalParameterIivNVPROC)((intptr_t)function_pointer); + glGetProgramLocalParameterIivNV(target, index, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuProgram4_nglGetProgramLocalParameterIuivNV(JNIEnv *env, jclass clazz, jint target, jint index, jlong params, jlong function_pointer) { + GLuint *params_address = (GLuint *)(intptr_t)params; + glGetProgramLocalParameterIuivNVPROC glGetProgramLocalParameterIuivNV = (glGetProgramLocalParameterIuivNVPROC)((intptr_t)function_pointer); + glGetProgramLocalParameterIuivNV(target, index, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuProgram4_nglGetProgramEnvParameterIivNV(JNIEnv *env, jclass clazz, jint target, jint index, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetProgramEnvParameterIivNVPROC glGetProgramEnvParameterIivNV = (glGetProgramEnvParameterIivNVPROC)((intptr_t)function_pointer); + glGetProgramEnvParameterIivNV(target, index, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuProgram4_nglGetProgramEnvParameterIuivNV(JNIEnv *env, jclass clazz, jint target, jint index, jlong params, jlong function_pointer) { + GLuint *params_address = (GLuint *)(intptr_t)params; + glGetProgramEnvParameterIuivNVPROC glGetProgramEnvParameterIuivNV = (glGetProgramEnvParameterIuivNVPROC)((intptr_t)function_pointer); + glGetProgramEnvParameterIuivNV(target, index, params_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVGpuShader5.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVGpuShader5.c new file mode 100644 index 0000000..233bdbd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVGpuShader5.c @@ -0,0 +1,228 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glUniform1i64NVPROC) (GLint location, GLint64EXT x); +typedef void (APIENTRY *glUniform2i64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y); +typedef void (APIENTRY *glUniform3i64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void (APIENTRY *glUniform4i64NVPROC) (GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void (APIENTRY *glUniform1i64vNVPROC) (GLint location, GLsizei count, const GLint64EXT * value); +typedef void (APIENTRY *glUniform2i64vNVPROC) (GLint location, GLsizei count, const GLint64EXT * value); +typedef void (APIENTRY *glUniform3i64vNVPROC) (GLint location, GLsizei count, const GLint64EXT * value); +typedef void (APIENTRY *glUniform4i64vNVPROC) (GLint location, GLsizei count, const GLint64EXT * value); +typedef void (APIENTRY *glUniform1ui64NVPROC) (GLint location, GLuint64EXT x); +typedef void (APIENTRY *glUniform2ui64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y); +typedef void (APIENTRY *glUniform3ui64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void (APIENTRY *glUniform4ui64NVPROC) (GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void (APIENTRY *glUniform1ui64vNVPROC) (GLint location, GLsizei count, const GLuint64EXT * value); +typedef void (APIENTRY *glUniform2ui64vNVPROC) (GLint location, GLsizei count, const GLuint64EXT * value); +typedef void (APIENTRY *glUniform3ui64vNVPROC) (GLint location, GLsizei count, const GLuint64EXT * value); +typedef void (APIENTRY *glUniform4ui64vNVPROC) (GLint location, GLsizei count, const GLuint64EXT * value); +typedef void (APIENTRY *glGetUniformi64vNVPROC) (GLuint program, GLint location, GLint64EXT * params); +typedef void (APIENTRY *glGetUniformui64vNVPROC) (GLuint program, GLint location, GLuint64EXT * params); +typedef void (APIENTRY *glProgramUniform1i64NVPROC) (GLuint program, GLint location, GLint64EXT x); +typedef void (APIENTRY *glProgramUniform2i64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y); +typedef void (APIENTRY *glProgramUniform3i64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void (APIENTRY *glProgramUniform4i64NVPROC) (GLuint program, GLint location, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void (APIENTRY *glProgramUniform1i64vNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT * value); +typedef void (APIENTRY *glProgramUniform2i64vNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT * value); +typedef void (APIENTRY *glProgramUniform3i64vNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT * value); +typedef void (APIENTRY *glProgramUniform4i64vNVPROC) (GLuint program, GLint location, GLsizei count, const GLint64EXT * value); +typedef void (APIENTRY *glProgramUniform1ui64NVPROC) (GLuint program, GLint location, GLuint64EXT x); +typedef void (APIENTRY *glProgramUniform2ui64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y); +typedef void (APIENTRY *glProgramUniform3ui64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void (APIENTRY *glProgramUniform4ui64NVPROC) (GLuint program, GLint location, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void (APIENTRY *glProgramUniform1ui64vNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT * value); +typedef void (APIENTRY *glProgramUniform2ui64vNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT * value); +typedef void (APIENTRY *glProgramUniform3ui64vNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT * value); +typedef void (APIENTRY *glProgramUniform4ui64vNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT * value); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglUniform1i64NV(JNIEnv *env, jclass clazz, jint location, jlong x, jlong function_pointer) { + glUniform1i64NVPROC glUniform1i64NV = (glUniform1i64NVPROC)((intptr_t)function_pointer); + glUniform1i64NV(location, x); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglUniform2i64NV(JNIEnv *env, jclass clazz, jint location, jlong x, jlong y, jlong function_pointer) { + glUniform2i64NVPROC glUniform2i64NV = (glUniform2i64NVPROC)((intptr_t)function_pointer); + glUniform2i64NV(location, x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglUniform3i64NV(JNIEnv *env, jclass clazz, jint location, jlong x, jlong y, jlong z, jlong function_pointer) { + glUniform3i64NVPROC glUniform3i64NV = (glUniform3i64NVPROC)((intptr_t)function_pointer); + glUniform3i64NV(location, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglUniform4i64NV(JNIEnv *env, jclass clazz, jint location, jlong x, jlong y, jlong z, jlong w, jlong function_pointer) { + glUniform4i64NVPROC glUniform4i64NV = (glUniform4i64NVPROC)((intptr_t)function_pointer); + glUniform4i64NV(location, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglUniform1i64vNV(JNIEnv *env, jclass clazz, jint location, jint count, jlong value, jlong function_pointer) { + const GLint64EXT *value_address = (const GLint64EXT *)(intptr_t)value; + glUniform1i64vNVPROC glUniform1i64vNV = (glUniform1i64vNVPROC)((intptr_t)function_pointer); + glUniform1i64vNV(location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglUniform2i64vNV(JNIEnv *env, jclass clazz, jint location, jint count, jlong value, jlong function_pointer) { + const GLint64EXT *value_address = (const GLint64EXT *)(intptr_t)value; + glUniform2i64vNVPROC glUniform2i64vNV = (glUniform2i64vNVPROC)((intptr_t)function_pointer); + glUniform2i64vNV(location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglUniform3i64vNV(JNIEnv *env, jclass clazz, jint location, jint count, jlong value, jlong function_pointer) { + const GLint64EXT *value_address = (const GLint64EXT *)(intptr_t)value; + glUniform3i64vNVPROC glUniform3i64vNV = (glUniform3i64vNVPROC)((intptr_t)function_pointer); + glUniform3i64vNV(location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglUniform4i64vNV(JNIEnv *env, jclass clazz, jint location, jint count, jlong value, jlong function_pointer) { + const GLint64EXT *value_address = (const GLint64EXT *)(intptr_t)value; + glUniform4i64vNVPROC glUniform4i64vNV = (glUniform4i64vNVPROC)((intptr_t)function_pointer); + glUniform4i64vNV(location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglUniform1ui64NV(JNIEnv *env, jclass clazz, jint location, jlong x, jlong function_pointer) { + glUniform1ui64NVPROC glUniform1ui64NV = (glUniform1ui64NVPROC)((intptr_t)function_pointer); + glUniform1ui64NV(location, x); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglUniform2ui64NV(JNIEnv *env, jclass clazz, jint location, jlong x, jlong y, jlong function_pointer) { + glUniform2ui64NVPROC glUniform2ui64NV = (glUniform2ui64NVPROC)((intptr_t)function_pointer); + glUniform2ui64NV(location, x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglUniform3ui64NV(JNIEnv *env, jclass clazz, jint location, jlong x, jlong y, jlong z, jlong function_pointer) { + glUniform3ui64NVPROC glUniform3ui64NV = (glUniform3ui64NVPROC)((intptr_t)function_pointer); + glUniform3ui64NV(location, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglUniform4ui64NV(JNIEnv *env, jclass clazz, jint location, jlong x, jlong y, jlong z, jlong w, jlong function_pointer) { + glUniform4ui64NVPROC glUniform4ui64NV = (glUniform4ui64NVPROC)((intptr_t)function_pointer); + glUniform4ui64NV(location, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglUniform1ui64vNV(JNIEnv *env, jclass clazz, jint location, jint count, jlong value, jlong function_pointer) { + const GLuint64EXT *value_address = (const GLuint64EXT *)(intptr_t)value; + glUniform1ui64vNVPROC glUniform1ui64vNV = (glUniform1ui64vNVPROC)((intptr_t)function_pointer); + glUniform1ui64vNV(location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglUniform2ui64vNV(JNIEnv *env, jclass clazz, jint location, jint count, jlong value, jlong function_pointer) { + const GLuint64EXT *value_address = (const GLuint64EXT *)(intptr_t)value; + glUniform2ui64vNVPROC glUniform2ui64vNV = (glUniform2ui64vNVPROC)((intptr_t)function_pointer); + glUniform2ui64vNV(location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglUniform3ui64vNV(JNIEnv *env, jclass clazz, jint location, jint count, jlong value, jlong function_pointer) { + const GLuint64EXT *value_address = (const GLuint64EXT *)(intptr_t)value; + glUniform3ui64vNVPROC glUniform3ui64vNV = (glUniform3ui64vNVPROC)((intptr_t)function_pointer); + glUniform3ui64vNV(location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglUniform4ui64vNV(JNIEnv *env, jclass clazz, jint location, jint count, jlong value, jlong function_pointer) { + const GLuint64EXT *value_address = (const GLuint64EXT *)(intptr_t)value; + glUniform4ui64vNVPROC glUniform4ui64vNV = (glUniform4ui64vNVPROC)((intptr_t)function_pointer); + glUniform4ui64vNV(location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglGetUniformi64vNV(JNIEnv *env, jclass clazz, jint program, jint location, jlong params, jlong function_pointer) { + GLint64EXT *params_address = (GLint64EXT *)(intptr_t)params; + glGetUniformi64vNVPROC glGetUniformi64vNV = (glGetUniformi64vNVPROC)((intptr_t)function_pointer); + glGetUniformi64vNV(program, location, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglGetUniformui64vNV(JNIEnv *env, jclass clazz, jint program, jint location, jlong params, jlong function_pointer) { + GLuint64EXT *params_address = (GLuint64EXT *)(intptr_t)params; + glGetUniformui64vNVPROC glGetUniformui64vNV = (glGetUniformui64vNVPROC)((intptr_t)function_pointer); + glGetUniformui64vNV(program, location, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglProgramUniform1i64NV(JNIEnv *env, jclass clazz, jint program, jint location, jlong x, jlong function_pointer) { + glProgramUniform1i64NVPROC glProgramUniform1i64NV = (glProgramUniform1i64NVPROC)((intptr_t)function_pointer); + glProgramUniform1i64NV(program, location, x); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglProgramUniform2i64NV(JNIEnv *env, jclass clazz, jint program, jint location, jlong x, jlong y, jlong function_pointer) { + glProgramUniform2i64NVPROC glProgramUniform2i64NV = (glProgramUniform2i64NVPROC)((intptr_t)function_pointer); + glProgramUniform2i64NV(program, location, x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglProgramUniform3i64NV(JNIEnv *env, jclass clazz, jint program, jint location, jlong x, jlong y, jlong z, jlong function_pointer) { + glProgramUniform3i64NVPROC glProgramUniform3i64NV = (glProgramUniform3i64NVPROC)((intptr_t)function_pointer); + glProgramUniform3i64NV(program, location, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglProgramUniform4i64NV(JNIEnv *env, jclass clazz, jint program, jint location, jlong x, jlong y, jlong z, jlong w, jlong function_pointer) { + glProgramUniform4i64NVPROC glProgramUniform4i64NV = (glProgramUniform4i64NVPROC)((intptr_t)function_pointer); + glProgramUniform4i64NV(program, location, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglProgramUniform1i64vNV(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLint64EXT *value_address = (const GLint64EXT *)(intptr_t)value; + glProgramUniform1i64vNVPROC glProgramUniform1i64vNV = (glProgramUniform1i64vNVPROC)((intptr_t)function_pointer); + glProgramUniform1i64vNV(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglProgramUniform2i64vNV(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLint64EXT *value_address = (const GLint64EXT *)(intptr_t)value; + glProgramUniform2i64vNVPROC glProgramUniform2i64vNV = (glProgramUniform2i64vNVPROC)((intptr_t)function_pointer); + glProgramUniform2i64vNV(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglProgramUniform3i64vNV(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLint64EXT *value_address = (const GLint64EXT *)(intptr_t)value; + glProgramUniform3i64vNVPROC glProgramUniform3i64vNV = (glProgramUniform3i64vNVPROC)((intptr_t)function_pointer); + glProgramUniform3i64vNV(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglProgramUniform4i64vNV(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLint64EXT *value_address = (const GLint64EXT *)(intptr_t)value; + glProgramUniform4i64vNVPROC glProgramUniform4i64vNV = (glProgramUniform4i64vNVPROC)((intptr_t)function_pointer); + glProgramUniform4i64vNV(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglProgramUniform1ui64NV(JNIEnv *env, jclass clazz, jint program, jint location, jlong x, jlong function_pointer) { + glProgramUniform1ui64NVPROC glProgramUniform1ui64NV = (glProgramUniform1ui64NVPROC)((intptr_t)function_pointer); + glProgramUniform1ui64NV(program, location, x); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglProgramUniform2ui64NV(JNIEnv *env, jclass clazz, jint program, jint location, jlong x, jlong y, jlong function_pointer) { + glProgramUniform2ui64NVPROC glProgramUniform2ui64NV = (glProgramUniform2ui64NVPROC)((intptr_t)function_pointer); + glProgramUniform2ui64NV(program, location, x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglProgramUniform3ui64NV(JNIEnv *env, jclass clazz, jint program, jint location, jlong x, jlong y, jlong z, jlong function_pointer) { + glProgramUniform3ui64NVPROC glProgramUniform3ui64NV = (glProgramUniform3ui64NVPROC)((intptr_t)function_pointer); + glProgramUniform3ui64NV(program, location, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglProgramUniform4ui64NV(JNIEnv *env, jclass clazz, jint program, jint location, jlong x, jlong y, jlong z, jlong w, jlong function_pointer) { + glProgramUniform4ui64NVPROC glProgramUniform4ui64NV = (glProgramUniform4ui64NVPROC)((intptr_t)function_pointer); + glProgramUniform4ui64NV(program, location, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglProgramUniform1ui64vNV(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLuint64EXT *value_address = (const GLuint64EXT *)(intptr_t)value; + glProgramUniform1ui64vNVPROC glProgramUniform1ui64vNV = (glProgramUniform1ui64vNVPROC)((intptr_t)function_pointer); + glProgramUniform1ui64vNV(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglProgramUniform2ui64vNV(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLuint64EXT *value_address = (const GLuint64EXT *)(intptr_t)value; + glProgramUniform2ui64vNVPROC glProgramUniform2ui64vNV = (glProgramUniform2ui64vNVPROC)((intptr_t)function_pointer); + glProgramUniform2ui64vNV(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglProgramUniform3ui64vNV(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLuint64EXT *value_address = (const GLuint64EXT *)(intptr_t)value; + glProgramUniform3ui64vNVPROC glProgramUniform3ui64vNV = (glProgramUniform3ui64vNVPROC)((intptr_t)function_pointer); + glProgramUniform3ui64vNV(program, location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVGpuShader5_nglProgramUniform4ui64vNV(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLuint64EXT *value_address = (const GLuint64EXT *)(intptr_t)value; + glProgramUniform4ui64vNVPROC glProgramUniform4ui64vNV = (glProgramUniform4ui64vNVPROC)((intptr_t)function_pointer); + glProgramUniform4ui64vNV(program, location, count, value_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVHalfFloat.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVHalfFloat.c new file mode 100644 index 0000000..389d076 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVHalfFloat.c @@ -0,0 +1,160 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glVertex2hNVPROC) (GLhalf x, GLhalf y); +typedef void (APIENTRY *glVertex3hNVPROC) (GLhalf x, GLhalf y, GLhalf z); +typedef void (APIENTRY *glVertex4hNVPROC) (GLhalf x, GLhalf y, GLhalf z, GLhalf w); +typedef void (APIENTRY *glNormal3hNVPROC) (GLhalf nx, GLhalf ny, GLhalf nz); +typedef void (APIENTRY *glColor3hNVPROC) (GLhalf red, GLhalf green, GLhalf blue); +typedef void (APIENTRY *glColor4hNVPROC) (GLhalf red, GLhalf green, GLhalf blue, GLhalf alpha); +typedef void (APIENTRY *glTexCoord1hNVPROC) (GLhalf s); +typedef void (APIENTRY *glTexCoord2hNVPROC) (GLhalf s, GLhalf t); +typedef void (APIENTRY *glTexCoord3hNVPROC) (GLhalf s, GLhalf t, GLhalf r); +typedef void (APIENTRY *glTexCoord4hNVPROC) (GLhalf s, GLhalf t, GLhalf r, GLhalf q); +typedef void (APIENTRY *glMultiTexCoord1hNVPROC) (GLenum target, GLhalf s); +typedef void (APIENTRY *glMultiTexCoord2hNVPROC) (GLenum target, GLhalf s, GLhalf t); +typedef void (APIENTRY *glMultiTexCoord3hNVPROC) (GLenum target, GLhalf s, GLhalf t, GLhalf r); +typedef void (APIENTRY *glMultiTexCoord4hNVPROC) (GLenum target, GLhalf s, GLhalf t, GLhalf r, GLhalf q); +typedef void (APIENTRY *glFogCoordhNVPROC) (GLhalf fog); +typedef void (APIENTRY *glSecondaryColor3hNVPROC) (GLhalf red, GLhalf green, GLhalf blue); +typedef void (APIENTRY *glVertexWeighthNVPROC) (GLhalf weight); +typedef void (APIENTRY *glVertexAttrib1hNVPROC) (GLuint index, GLhalf x); +typedef void (APIENTRY *glVertexAttrib2hNVPROC) (GLuint index, GLhalf x, GLhalf y); +typedef void (APIENTRY *glVertexAttrib3hNVPROC) (GLuint index, GLhalf x, GLhalf y, GLhalf z); +typedef void (APIENTRY *glVertexAttrib4hNVPROC) (GLuint index, GLhalf x, GLhalf y, GLhalf z, GLhalf w); +typedef void (APIENTRY *glVertexAttribs1hvNVPROC) (GLuint index, GLsizei n, const GLhalf * attribs); +typedef void (APIENTRY *glVertexAttribs2hvNVPROC) (GLuint index, GLsizei n, const GLhalf * attribs); +typedef void (APIENTRY *glVertexAttribs3hvNVPROC) (GLuint index, GLsizei n, const GLhalf * attribs); +typedef void (APIENTRY *glVertexAttribs4hvNVPROC) (GLuint index, GLsizei n, const GLhalf * attribs); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglVertex2hNV(JNIEnv *env, jclass clazz, jshort x, jshort y, jlong function_pointer) { + glVertex2hNVPROC glVertex2hNV = (glVertex2hNVPROC)((intptr_t)function_pointer); + glVertex2hNV(x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglVertex3hNV(JNIEnv *env, jclass clazz, jshort x, jshort y, jshort z, jlong function_pointer) { + glVertex3hNVPROC glVertex3hNV = (glVertex3hNVPROC)((intptr_t)function_pointer); + glVertex3hNV(x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglVertex4hNV(JNIEnv *env, jclass clazz, jshort x, jshort y, jshort z, jshort w, jlong function_pointer) { + glVertex4hNVPROC glVertex4hNV = (glVertex4hNVPROC)((intptr_t)function_pointer); + glVertex4hNV(x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglNormal3hNV(JNIEnv *env, jclass clazz, jshort nx, jshort ny, jshort nz, jlong function_pointer) { + glNormal3hNVPROC glNormal3hNV = (glNormal3hNVPROC)((intptr_t)function_pointer); + glNormal3hNV(nx, ny, nz); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglColor3hNV(JNIEnv *env, jclass clazz, jshort red, jshort green, jshort blue, jlong function_pointer) { + glColor3hNVPROC glColor3hNV = (glColor3hNVPROC)((intptr_t)function_pointer); + glColor3hNV(red, green, blue); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglColor4hNV(JNIEnv *env, jclass clazz, jshort red, jshort green, jshort blue, jshort alpha, jlong function_pointer) { + glColor4hNVPROC glColor4hNV = (glColor4hNVPROC)((intptr_t)function_pointer); + glColor4hNV(red, green, blue, alpha); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglTexCoord1hNV(JNIEnv *env, jclass clazz, jshort s, jlong function_pointer) { + glTexCoord1hNVPROC glTexCoord1hNV = (glTexCoord1hNVPROC)((intptr_t)function_pointer); + glTexCoord1hNV(s); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglTexCoord2hNV(JNIEnv *env, jclass clazz, jshort s, jshort t, jlong function_pointer) { + glTexCoord2hNVPROC glTexCoord2hNV = (glTexCoord2hNVPROC)((intptr_t)function_pointer); + glTexCoord2hNV(s, t); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglTexCoord3hNV(JNIEnv *env, jclass clazz, jshort s, jshort t, jshort r, jlong function_pointer) { + glTexCoord3hNVPROC glTexCoord3hNV = (glTexCoord3hNVPROC)((intptr_t)function_pointer); + glTexCoord3hNV(s, t, r); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglTexCoord4hNV(JNIEnv *env, jclass clazz, jshort s, jshort t, jshort r, jshort q, jlong function_pointer) { + glTexCoord4hNVPROC glTexCoord4hNV = (glTexCoord4hNVPROC)((intptr_t)function_pointer); + glTexCoord4hNV(s, t, r, q); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglMultiTexCoord1hNV(JNIEnv *env, jclass clazz, jint target, jshort s, jlong function_pointer) { + glMultiTexCoord1hNVPROC glMultiTexCoord1hNV = (glMultiTexCoord1hNVPROC)((intptr_t)function_pointer); + glMultiTexCoord1hNV(target, s); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglMultiTexCoord2hNV(JNIEnv *env, jclass clazz, jint target, jshort s, jshort t, jlong function_pointer) { + glMultiTexCoord2hNVPROC glMultiTexCoord2hNV = (glMultiTexCoord2hNVPROC)((intptr_t)function_pointer); + glMultiTexCoord2hNV(target, s, t); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglMultiTexCoord3hNV(JNIEnv *env, jclass clazz, jint target, jshort s, jshort t, jshort r, jlong function_pointer) { + glMultiTexCoord3hNVPROC glMultiTexCoord3hNV = (glMultiTexCoord3hNVPROC)((intptr_t)function_pointer); + glMultiTexCoord3hNV(target, s, t, r); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglMultiTexCoord4hNV(JNIEnv *env, jclass clazz, jint target, jshort s, jshort t, jshort r, jshort q, jlong function_pointer) { + glMultiTexCoord4hNVPROC glMultiTexCoord4hNV = (glMultiTexCoord4hNVPROC)((intptr_t)function_pointer); + glMultiTexCoord4hNV(target, s, t, r, q); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglFogCoordhNV(JNIEnv *env, jclass clazz, jshort fog, jlong function_pointer) { + glFogCoordhNVPROC glFogCoordhNV = (glFogCoordhNVPROC)((intptr_t)function_pointer); + glFogCoordhNV(fog); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglSecondaryColor3hNV(JNIEnv *env, jclass clazz, jshort red, jshort green, jshort blue, jlong function_pointer) { + glSecondaryColor3hNVPROC glSecondaryColor3hNV = (glSecondaryColor3hNVPROC)((intptr_t)function_pointer); + glSecondaryColor3hNV(red, green, blue); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglVertexWeighthNV(JNIEnv *env, jclass clazz, jshort weight, jlong function_pointer) { + glVertexWeighthNVPROC glVertexWeighthNV = (glVertexWeighthNVPROC)((intptr_t)function_pointer); + glVertexWeighthNV(weight); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglVertexAttrib1hNV(JNIEnv *env, jclass clazz, jint index, jshort x, jlong function_pointer) { + glVertexAttrib1hNVPROC glVertexAttrib1hNV = (glVertexAttrib1hNVPROC)((intptr_t)function_pointer); + glVertexAttrib1hNV(index, x); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglVertexAttrib2hNV(JNIEnv *env, jclass clazz, jint index, jshort x, jshort y, jlong function_pointer) { + glVertexAttrib2hNVPROC glVertexAttrib2hNV = (glVertexAttrib2hNVPROC)((intptr_t)function_pointer); + glVertexAttrib2hNV(index, x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglVertexAttrib3hNV(JNIEnv *env, jclass clazz, jint index, jshort x, jshort y, jshort z, jlong function_pointer) { + glVertexAttrib3hNVPROC glVertexAttrib3hNV = (glVertexAttrib3hNVPROC)((intptr_t)function_pointer); + glVertexAttrib3hNV(index, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglVertexAttrib4hNV(JNIEnv *env, jclass clazz, jint index, jshort x, jshort y, jshort z, jshort w, jlong function_pointer) { + glVertexAttrib4hNVPROC glVertexAttrib4hNV = (glVertexAttrib4hNVPROC)((intptr_t)function_pointer); + glVertexAttrib4hNV(index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglVertexAttribs1hvNV(JNIEnv *env, jclass clazz, jint index, jint n, jlong attribs, jlong function_pointer) { + const GLhalf *attribs_address = (const GLhalf *)(intptr_t)attribs; + glVertexAttribs1hvNVPROC glVertexAttribs1hvNV = (glVertexAttribs1hvNVPROC)((intptr_t)function_pointer); + glVertexAttribs1hvNV(index, n, attribs_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglVertexAttribs2hvNV(JNIEnv *env, jclass clazz, jint index, jint n, jlong attribs, jlong function_pointer) { + const GLhalf *attribs_address = (const GLhalf *)(intptr_t)attribs; + glVertexAttribs2hvNVPROC glVertexAttribs2hvNV = (glVertexAttribs2hvNVPROC)((intptr_t)function_pointer); + glVertexAttribs2hvNV(index, n, attribs_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglVertexAttribs3hvNV(JNIEnv *env, jclass clazz, jint index, jint n, jlong attribs, jlong function_pointer) { + const GLhalf *attribs_address = (const GLhalf *)(intptr_t)attribs; + glVertexAttribs3hvNVPROC glVertexAttribs3hvNV = (glVertexAttribs3hvNVPROC)((intptr_t)function_pointer); + glVertexAttribs3hvNV(index, n, attribs_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVHalfFloat_nglVertexAttribs4hvNV(JNIEnv *env, jclass clazz, jint index, jint n, jlong attribs, jlong function_pointer) { + const GLhalf *attribs_address = (const GLhalf *)(intptr_t)attribs; + glVertexAttribs4hvNVPROC glVertexAttribs4hvNV = (glVertexAttribs4hvNVPROC)((intptr_t)function_pointer); + glVertexAttribs4hvNV(index, n, attribs_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVOcclusionQuery.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVOcclusionQuery.c new file mode 100644 index 0000000..38ecb0a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVOcclusionQuery.c @@ -0,0 +1,53 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glGenOcclusionQueriesNVPROC) (GLsizei n, GLuint * piIDs); +typedef void (APIENTRY *glDeleteOcclusionQueriesNVPROC) (GLsizei n, const GLuint * piIDs); +typedef GLboolean (APIENTRY *glIsOcclusionQueryNVPROC) (GLuint id); +typedef void (APIENTRY *glBeginOcclusionQueryNVPROC) (GLuint id); +typedef void (APIENTRY *glEndOcclusionQueryNVPROC) (); +typedef void (APIENTRY *glGetOcclusionQueryuivNVPROC) (GLuint id, GLenum pname, GLuint * params); +typedef void (APIENTRY *glGetOcclusionQueryivNVPROC) (GLuint id, GLenum pname, GLint * params); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVOcclusionQuery_nglGenOcclusionQueriesNV(JNIEnv *env, jclass clazz, jint n, jlong piIDs, jlong function_pointer) { + GLuint *piIDs_address = (GLuint *)(intptr_t)piIDs; + glGenOcclusionQueriesNVPROC glGenOcclusionQueriesNV = (glGenOcclusionQueriesNVPROC)((intptr_t)function_pointer); + glGenOcclusionQueriesNV(n, piIDs_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVOcclusionQuery_nglDeleteOcclusionQueriesNV(JNIEnv *env, jclass clazz, jint n, jlong piIDs, jlong function_pointer) { + const GLuint *piIDs_address = (const GLuint *)(intptr_t)piIDs; + glDeleteOcclusionQueriesNVPROC glDeleteOcclusionQueriesNV = (glDeleteOcclusionQueriesNVPROC)((intptr_t)function_pointer); + glDeleteOcclusionQueriesNV(n, piIDs_address); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVOcclusionQuery_nglIsOcclusionQueryNV(JNIEnv *env, jclass clazz, jint id, jlong function_pointer) { + glIsOcclusionQueryNVPROC glIsOcclusionQueryNV = (glIsOcclusionQueryNVPROC)((intptr_t)function_pointer); + GLboolean __result = glIsOcclusionQueryNV(id); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVOcclusionQuery_nglBeginOcclusionQueryNV(JNIEnv *env, jclass clazz, jint id, jlong function_pointer) { + glBeginOcclusionQueryNVPROC glBeginOcclusionQueryNV = (glBeginOcclusionQueryNVPROC)((intptr_t)function_pointer); + glBeginOcclusionQueryNV(id); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVOcclusionQuery_nglEndOcclusionQueryNV(JNIEnv *env, jclass clazz, jlong function_pointer) { + glEndOcclusionQueryNVPROC glEndOcclusionQueryNV = (glEndOcclusionQueryNVPROC)((intptr_t)function_pointer); + glEndOcclusionQueryNV(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVOcclusionQuery_nglGetOcclusionQueryuivNV(JNIEnv *env, jclass clazz, jint id, jint pname, jlong params, jlong function_pointer) { + GLuint *params_address = (GLuint *)(intptr_t)params; + glGetOcclusionQueryuivNVPROC glGetOcclusionQueryuivNV = (glGetOcclusionQueryuivNVPROC)((intptr_t)function_pointer); + glGetOcclusionQueryuivNV(id, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVOcclusionQuery_nglGetOcclusionQueryivNV(JNIEnv *env, jclass clazz, jint id, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetOcclusionQueryivNVPROC glGetOcclusionQueryivNV = (glGetOcclusionQueryivNVPROC)((intptr_t)function_pointer); + glGetOcclusionQueryivNV(id, pname, params_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVParameterBufferObject.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVParameterBufferObject.c new file mode 100644 index 0000000..1f87766 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVParameterBufferObject.c @@ -0,0 +1,27 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glProgramBufferParametersfvNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLfloat * params); +typedef void (APIENTRY *glProgramBufferParametersIivNVPROC) (GLenum target, GLuint buffer, GLuint index, GLsizei count, const GLint * params); +typedef void (APIENTRY *glProgramBufferParametersIuivNVPROC) (GLenum target, GLuint buffer, GLuint index, GLuint count, const GLuint * params); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVParameterBufferObject_nglProgramBufferParametersfvNV(JNIEnv *env, jclass clazz, jint target, jint buffer, jint index, jint count, jlong params, jlong function_pointer) { + const GLfloat *params_address = (const GLfloat *)(intptr_t)params; + glProgramBufferParametersfvNVPROC glProgramBufferParametersfvNV = (glProgramBufferParametersfvNVPROC)((intptr_t)function_pointer); + glProgramBufferParametersfvNV(target, buffer, index, count, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVParameterBufferObject_nglProgramBufferParametersIivNV(JNIEnv *env, jclass clazz, jint target, jint buffer, jint index, jint count, jlong params, jlong function_pointer) { + const GLint *params_address = (const GLint *)(intptr_t)params; + glProgramBufferParametersIivNVPROC glProgramBufferParametersIivNV = (glProgramBufferParametersIivNVPROC)((intptr_t)function_pointer); + glProgramBufferParametersIivNV(target, buffer, index, count, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVParameterBufferObject_nglProgramBufferParametersIuivNV(JNIEnv *env, jclass clazz, jint target, jint buffer, jint index, jint count, jlong params, jlong function_pointer) { + const GLuint *params_address = (const GLuint *)(intptr_t)params; + glProgramBufferParametersIuivNVPROC glProgramBufferParametersIuivNV = (glProgramBufferParametersIuivNVPROC)((intptr_t)function_pointer); + glProgramBufferParametersIuivNV(target, buffer, index, count, params_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVPathRendering.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVPathRendering.c new file mode 100644 index 0000000..6522fde --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVPathRendering.c @@ -0,0 +1,350 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glPathCommandsNVPROC) (GLuint path, GLsizei numCommands, const GLubyte * commands, GLsizei numCoords, GLenum coordType, const GLvoid * coords); +typedef void (APIENTRY *glPathCoordsNVPROC) (GLuint path, GLsizei numCoords, GLenum coordType, const GLvoid * coords); +typedef void (APIENTRY *glPathSubCommandsNVPROC) (GLuint path, GLsizei commandStart, GLsizei commandsToDelete, GLsizei numCommands, const GLubyte * commands, GLsizei numCoords, GLenum coordType, const GLvoid * coords); +typedef void (APIENTRY *glPathSubCoordsNVPROC) (GLuint path, GLsizei coordStart, GLsizei numCoords, GLenum coordType, const GLvoid * coords); +typedef void (APIENTRY *glPathStringNVPROC) (GLuint path, GLenum format, GLsizei length, const GLvoid * pathString); +typedef void (APIENTRY *glPathGlyphsNVPROC) (GLuint firstPathName, GLenum fontTarget, const GLvoid * fontName, GLbitfield fontStyle, GLsizei numGlyphs, GLenum type, const GLvoid * charcodes, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +typedef void (APIENTRY *glPathGlyphRangeNVPROC) (GLuint firstPathName, GLenum fontTarget, const GLvoid * fontName, GLbitfield fontStyle, GLuint firstGlyph, GLsizei numGlyphs, GLenum handleMissingGlyphs, GLuint pathParameterTemplate, GLfloat emScale); +typedef void (APIENTRY *glWeightPathsNVPROC) (GLuint resultPath, GLsizei numPaths, const GLuint * paths, const GLfloat * weights); +typedef void (APIENTRY *glCopyPathNVPROC) (GLuint resultPath, GLuint srcPath); +typedef void (APIENTRY *glInterpolatePathsNVPROC) (GLuint resultPath, GLuint pathA, GLuint pathB, GLfloat weight); +typedef void (APIENTRY *glTransformPathNVPROC) (GLuint resultPath, GLuint srcPath, GLenum transformType, const GLfloat * transformValues); +typedef void (APIENTRY *glPathParameterivNVPROC) (GLuint path, GLenum pname, const GLint * value); +typedef void (APIENTRY *glPathParameteriNVPROC) (GLuint path, GLenum pname, GLint value); +typedef void (APIENTRY *glPathParameterfvNVPROC) (GLuint path, GLenum pname, const GLint * value); +typedef void (APIENTRY *glPathParameterfNVPROC) (GLuint path, GLenum pname, GLfloat value); +typedef void (APIENTRY *glPathDashArrayNVPROC) (GLuint path, GLsizei dashCount, const GLfloat * dashArray); +typedef GLuint (APIENTRY *glGenPathsNVPROC) (GLsizei range); +typedef void (APIENTRY *glDeletePathsNVPROC) (GLuint path, GLsizei range); +typedef GLboolean (APIENTRY *glIsPathNVPROC) (GLuint path); +typedef void (APIENTRY *glPathStencilFuncNVPROC) (GLenum func, GLint ref, GLuint mask); +typedef void (APIENTRY *glPathStencilDepthOffsetNVPROC) (GLfloat factor, GLint units); +typedef void (APIENTRY *glStencilFillPathNVPROC) (GLuint path, GLenum fillMode, GLuint mask); +typedef void (APIENTRY *glStencilStrokePathNVPROC) (GLuint path, GLint reference, GLuint mask); +typedef void (APIENTRY *glStencilFillPathInstancedNVPROC) (GLsizei numPaths, GLenum pathNameType, const GLvoid * paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat * transformValues); +typedef void (APIENTRY *glStencilStrokePathInstancedNVPROC) (GLsizei numPaths, GLenum pathNameType, const GLvoid * paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat * transformValues); +typedef void (APIENTRY *glPathCoverDepthFuncNVPROC) (GLenum zfunc); +typedef void (APIENTRY *glPathColorGenNVPROC) (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat * coeffs); +typedef void (APIENTRY *glPathTexGenNVPROC) (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat * coeffs); +typedef void (APIENTRY *glPathFogGenNVPROC) (GLenum genMode); +typedef void (APIENTRY *glCoverFillPathNVPROC) (GLuint path, GLenum coverMode); +typedef void (APIENTRY *glCoverStrokePathNVPROC) (GLuint name, GLenum coverMode); +typedef void (APIENTRY *glCoverFillPathInstancedNVPROC) (GLsizei numPaths, GLenum pathNameType, const GLvoid * paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat * transformValues); +typedef void (APIENTRY *glCoverStrokePathInstancedNVPROC) (GLsizei numPaths, GLenum pathNameType, const GLvoid * paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat * transformValues); +typedef void (APIENTRY *glGetPathParameterivNVPROC) (GLuint name, GLenum param, GLint * value); +typedef void (APIENTRY *glGetPathParameterfvNVPROC) (GLuint name, GLenum param, GLfloat * value); +typedef void (APIENTRY *glGetPathCommandsNVPROC) (GLuint name, GLubyte * commands); +typedef void (APIENTRY *glGetPathCoordsNVPROC) (GLuint name, GLfloat * coords); +typedef void (APIENTRY *glGetPathDashArrayNVPROC) (GLuint name, GLfloat * dashArray); +typedef void (APIENTRY *glGetPathMetricsNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const GLvoid * paths, GLuint pathBase, GLsizei stride, GLfloat * metrics); +typedef void (APIENTRY *glGetPathMetricRangeNVPROC) (GLbitfield metricQueryMask, GLuint fistPathName, GLsizei numPaths, GLsizei stride, GLfloat * metrics); +typedef void (APIENTRY *glGetPathSpacingNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const GLvoid * paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat * returnedSpacing); +typedef void (APIENTRY *glGetPathColorGenivNVPROC) (GLenum color, GLenum pname, GLint * value); +typedef void (APIENTRY *glGetPathColorGenfvNVPROC) (GLenum color, GLenum pname, GLfloat * value); +typedef void (APIENTRY *glGetPathTexGenivNVPROC) (GLenum texCoordSet, GLenum pname, GLint * value); +typedef void (APIENTRY *glGetPathTexGenfvNVPROC) (GLenum texCoordSet, GLenum pname, GLfloat * value); +typedef GLboolean (APIENTRY *glIsPointInFillPathNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y); +typedef GLboolean (APIENTRY *glIsPointInStrokePathNVPROC) (GLuint path, GLfloat x, GLfloat y); +typedef GLfloat (APIENTRY *glGetPathLengthNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments); +typedef GLboolean (APIENTRY *glPointAlongPathNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments, GLfloat distance, GLfloat * x, GLfloat * y, GLfloat * tangentX, GLfloat * tangentY); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathCommandsNV(JNIEnv *env, jclass clazz, jint path, jint numCommands, jlong commands, jint numCoords, jint coordType, jlong coords, jlong function_pointer) { + const GLubyte *commands_address = (const GLubyte *)(intptr_t)commands; + const GLvoid *coords_address = (const GLvoid *)(intptr_t)coords; + glPathCommandsNVPROC glPathCommandsNV = (glPathCommandsNVPROC)((intptr_t)function_pointer); + glPathCommandsNV(path, numCommands, commands_address, numCoords, coordType, coords_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathCoordsNV(JNIEnv *env, jclass clazz, jint path, jint numCoords, jint coordType, jlong coords, jlong function_pointer) { + const GLvoid *coords_address = (const GLvoid *)(intptr_t)coords; + glPathCoordsNVPROC glPathCoordsNV = (glPathCoordsNVPROC)((intptr_t)function_pointer); + glPathCoordsNV(path, numCoords, coordType, coords_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathSubCommandsNV(JNIEnv *env, jclass clazz, jint path, jint commandStart, jint commandsToDelete, jint numCommands, jlong commands, jint numCoords, jint coordType, jlong coords, jlong function_pointer) { + const GLubyte *commands_address = (const GLubyte *)(intptr_t)commands; + const GLvoid *coords_address = (const GLvoid *)(intptr_t)coords; + glPathSubCommandsNVPROC glPathSubCommandsNV = (glPathSubCommandsNVPROC)((intptr_t)function_pointer); + glPathSubCommandsNV(path, commandStart, commandsToDelete, numCommands, commands_address, numCoords, coordType, coords_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathSubCoordsNV(JNIEnv *env, jclass clazz, jint path, jint coordStart, jint numCoords, jint coordType, jlong coords, jlong function_pointer) { + const GLvoid *coords_address = (const GLvoid *)(intptr_t)coords; + glPathSubCoordsNVPROC glPathSubCoordsNV = (glPathSubCoordsNVPROC)((intptr_t)function_pointer); + glPathSubCoordsNV(path, coordStart, numCoords, coordType, coords_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathStringNV(JNIEnv *env, jclass clazz, jint path, jint format, jint length, jlong pathString, jlong function_pointer) { + const GLvoid *pathString_address = (const GLvoid *)(intptr_t)pathString; + glPathStringNVPROC glPathStringNV = (glPathStringNVPROC)((intptr_t)function_pointer); + glPathStringNV(path, format, length, pathString_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathGlyphsNV(JNIEnv *env, jclass clazz, jint firstPathName, jint fontTarget, jlong fontName, jint fontStyle, jint numGlyphs, jint type, jlong charcodes, jint handleMissingGlyphs, jint pathParameterTemplate, jfloat emScale, jlong function_pointer) { + const GLvoid *fontName_address = (const GLvoid *)(intptr_t)fontName; + const GLvoid *charcodes_address = (const GLvoid *)(intptr_t)charcodes; + glPathGlyphsNVPROC glPathGlyphsNV = (glPathGlyphsNVPROC)((intptr_t)function_pointer); + glPathGlyphsNV(firstPathName, fontTarget, fontName_address, fontStyle, numGlyphs, type, charcodes_address, handleMissingGlyphs, pathParameterTemplate, emScale); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathGlyphRangeNV(JNIEnv *env, jclass clazz, jint firstPathName, jint fontTarget, jlong fontName, jint fontStyle, jint firstGlyph, jint numGlyphs, jint handleMissingGlyphs, jint pathParameterTemplate, jfloat emScale, jlong function_pointer) { + const GLvoid *fontName_address = (const GLvoid *)(intptr_t)fontName; + glPathGlyphRangeNVPROC glPathGlyphRangeNV = (glPathGlyphRangeNVPROC)((intptr_t)function_pointer); + glPathGlyphRangeNV(firstPathName, fontTarget, fontName_address, fontStyle, firstGlyph, numGlyphs, handleMissingGlyphs, pathParameterTemplate, emScale); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglWeightPathsNV(JNIEnv *env, jclass clazz, jint resultPath, jint numPaths, jlong paths, jlong weights, jlong function_pointer) { + const GLuint *paths_address = (const GLuint *)(intptr_t)paths; + const GLfloat *weights_address = (const GLfloat *)(intptr_t)weights; + glWeightPathsNVPROC glWeightPathsNV = (glWeightPathsNVPROC)((intptr_t)function_pointer); + glWeightPathsNV(resultPath, numPaths, paths_address, weights_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglCopyPathNV(JNIEnv *env, jclass clazz, jint resultPath, jint srcPath, jlong function_pointer) { + glCopyPathNVPROC glCopyPathNV = (glCopyPathNVPROC)((intptr_t)function_pointer); + glCopyPathNV(resultPath, srcPath); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglInterpolatePathsNV(JNIEnv *env, jclass clazz, jint resultPath, jint pathA, jint pathB, jfloat weight, jlong function_pointer) { + glInterpolatePathsNVPROC glInterpolatePathsNV = (glInterpolatePathsNVPROC)((intptr_t)function_pointer); + glInterpolatePathsNV(resultPath, pathA, pathB, weight); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglTransformPathNV(JNIEnv *env, jclass clazz, jint resultPath, jint srcPath, jint transformType, jlong transformValues, jlong function_pointer) { + const GLfloat *transformValues_address = (const GLfloat *)(intptr_t)transformValues; + glTransformPathNVPROC glTransformPathNV = (glTransformPathNVPROC)((intptr_t)function_pointer); + glTransformPathNV(resultPath, srcPath, transformType, transformValues_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathParameterivNV(JNIEnv *env, jclass clazz, jint path, jint pname, jlong value, jlong function_pointer) { + const GLint *value_address = (const GLint *)(intptr_t)value; + glPathParameterivNVPROC glPathParameterivNV = (glPathParameterivNVPROC)((intptr_t)function_pointer); + glPathParameterivNV(path, pname, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathParameteriNV(JNIEnv *env, jclass clazz, jint path, jint pname, jint value, jlong function_pointer) { + glPathParameteriNVPROC glPathParameteriNV = (glPathParameteriNVPROC)((intptr_t)function_pointer); + glPathParameteriNV(path, pname, value); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathParameterfvNV(JNIEnv *env, jclass clazz, jint path, jint pname, jlong value, jlong function_pointer) { + const GLint *value_address = (const GLint *)(intptr_t)value; + glPathParameterfvNVPROC glPathParameterfvNV = (glPathParameterfvNVPROC)((intptr_t)function_pointer); + glPathParameterfvNV(path, pname, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathParameterfNV(JNIEnv *env, jclass clazz, jint path, jint pname, jfloat value, jlong function_pointer) { + glPathParameterfNVPROC glPathParameterfNV = (glPathParameterfNVPROC)((intptr_t)function_pointer); + glPathParameterfNV(path, pname, value); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathDashArrayNV(JNIEnv *env, jclass clazz, jint path, jint dashCount, jlong dashArray, jlong function_pointer) { + const GLfloat *dashArray_address = (const GLfloat *)(intptr_t)dashArray; + glPathDashArrayNVPROC glPathDashArrayNV = (glPathDashArrayNVPROC)((intptr_t)function_pointer); + glPathDashArrayNV(path, dashCount, dashArray_address); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglGenPathsNV(JNIEnv *env, jclass clazz, jint range, jlong function_pointer) { + glGenPathsNVPROC glGenPathsNV = (glGenPathsNVPROC)((intptr_t)function_pointer); + GLuint __result = glGenPathsNV(range); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglDeletePathsNV(JNIEnv *env, jclass clazz, jint path, jint range, jlong function_pointer) { + glDeletePathsNVPROC glDeletePathsNV = (glDeletePathsNVPROC)((intptr_t)function_pointer); + glDeletePathsNV(path, range); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglIsPathNV(JNIEnv *env, jclass clazz, jint path, jlong function_pointer) { + glIsPathNVPROC glIsPathNV = (glIsPathNVPROC)((intptr_t)function_pointer); + GLboolean __result = glIsPathNV(path); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathStencilFuncNV(JNIEnv *env, jclass clazz, jint func, jint ref, jint mask, jlong function_pointer) { + glPathStencilFuncNVPROC glPathStencilFuncNV = (glPathStencilFuncNVPROC)((intptr_t)function_pointer); + glPathStencilFuncNV(func, ref, mask); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathStencilDepthOffsetNV(JNIEnv *env, jclass clazz, jfloat factor, jint units, jlong function_pointer) { + glPathStencilDepthOffsetNVPROC glPathStencilDepthOffsetNV = (glPathStencilDepthOffsetNVPROC)((intptr_t)function_pointer); + glPathStencilDepthOffsetNV(factor, units); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglStencilFillPathNV(JNIEnv *env, jclass clazz, jint path, jint fillMode, jint mask, jlong function_pointer) { + glStencilFillPathNVPROC glStencilFillPathNV = (glStencilFillPathNVPROC)((intptr_t)function_pointer); + glStencilFillPathNV(path, fillMode, mask); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglStencilStrokePathNV(JNIEnv *env, jclass clazz, jint path, jint reference, jint mask, jlong function_pointer) { + glStencilStrokePathNVPROC glStencilStrokePathNV = (glStencilStrokePathNVPROC)((intptr_t)function_pointer); + glStencilStrokePathNV(path, reference, mask); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglStencilFillPathInstancedNV(JNIEnv *env, jclass clazz, jint numPaths, jint pathNameType, jlong paths, jint pathBase, jint fillMode, jint mask, jint transformType, jlong transformValues, jlong function_pointer) { + const GLvoid *paths_address = (const GLvoid *)(intptr_t)paths; + const GLfloat *transformValues_address = (const GLfloat *)(intptr_t)transformValues; + glStencilFillPathInstancedNVPROC glStencilFillPathInstancedNV = (glStencilFillPathInstancedNVPROC)((intptr_t)function_pointer); + glStencilFillPathInstancedNV(numPaths, pathNameType, paths_address, pathBase, fillMode, mask, transformType, transformValues_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglStencilStrokePathInstancedNV(JNIEnv *env, jclass clazz, jint numPaths, jint pathNameType, jlong paths, jint pathBase, jint reference, jint mask, jint transformType, jlong transformValues, jlong function_pointer) { + const GLvoid *paths_address = (const GLvoid *)(intptr_t)paths; + const GLfloat *transformValues_address = (const GLfloat *)(intptr_t)transformValues; + glStencilStrokePathInstancedNVPROC glStencilStrokePathInstancedNV = (glStencilStrokePathInstancedNVPROC)((intptr_t)function_pointer); + glStencilStrokePathInstancedNV(numPaths, pathNameType, paths_address, pathBase, reference, mask, transformType, transformValues_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathCoverDepthFuncNV(JNIEnv *env, jclass clazz, jint zfunc, jlong function_pointer) { + glPathCoverDepthFuncNVPROC glPathCoverDepthFuncNV = (glPathCoverDepthFuncNVPROC)((intptr_t)function_pointer); + glPathCoverDepthFuncNV(zfunc); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathColorGenNV(JNIEnv *env, jclass clazz, jint color, jint genMode, jint colorFormat, jlong coeffs, jlong function_pointer) { + const GLfloat *coeffs_address = (const GLfloat *)(intptr_t)coeffs; + glPathColorGenNVPROC glPathColorGenNV = (glPathColorGenNVPROC)((intptr_t)function_pointer); + glPathColorGenNV(color, genMode, colorFormat, coeffs_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathTexGenNV(JNIEnv *env, jclass clazz, jint texCoordSet, jint genMode, jint components, jlong coeffs, jlong function_pointer) { + const GLfloat *coeffs_address = (const GLfloat *)(intptr_t)coeffs; + glPathTexGenNVPROC glPathTexGenNV = (glPathTexGenNVPROC)((intptr_t)function_pointer); + glPathTexGenNV(texCoordSet, genMode, components, coeffs_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPathFogGenNV(JNIEnv *env, jclass clazz, jint genMode, jlong function_pointer) { + glPathFogGenNVPROC glPathFogGenNV = (glPathFogGenNVPROC)((intptr_t)function_pointer); + glPathFogGenNV(genMode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglCoverFillPathNV(JNIEnv *env, jclass clazz, jint path, jint coverMode, jlong function_pointer) { + glCoverFillPathNVPROC glCoverFillPathNV = (glCoverFillPathNVPROC)((intptr_t)function_pointer); + glCoverFillPathNV(path, coverMode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglCoverStrokePathNV(JNIEnv *env, jclass clazz, jint name, jint coverMode, jlong function_pointer) { + glCoverStrokePathNVPROC glCoverStrokePathNV = (glCoverStrokePathNVPROC)((intptr_t)function_pointer); + glCoverStrokePathNV(name, coverMode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglCoverFillPathInstancedNV(JNIEnv *env, jclass clazz, jint numPaths, jint pathNameType, jlong paths, jint pathBase, jint coverMode, jint transformType, jlong transformValues, jlong function_pointer) { + const GLvoid *paths_address = (const GLvoid *)(intptr_t)paths; + const GLfloat *transformValues_address = (const GLfloat *)(intptr_t)transformValues; + glCoverFillPathInstancedNVPROC glCoverFillPathInstancedNV = (glCoverFillPathInstancedNVPROC)((intptr_t)function_pointer); + glCoverFillPathInstancedNV(numPaths, pathNameType, paths_address, pathBase, coverMode, transformType, transformValues_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglCoverStrokePathInstancedNV(JNIEnv *env, jclass clazz, jint numPaths, jint pathNameType, jlong paths, jint pathBase, jint coverMode, jint transformType, jlong transformValues, jlong function_pointer) { + const GLvoid *paths_address = (const GLvoid *)(intptr_t)paths; + const GLfloat *transformValues_address = (const GLfloat *)(intptr_t)transformValues; + glCoverStrokePathInstancedNVPROC glCoverStrokePathInstancedNV = (glCoverStrokePathInstancedNVPROC)((intptr_t)function_pointer); + glCoverStrokePathInstancedNV(numPaths, pathNameType, paths_address, pathBase, coverMode, transformType, transformValues_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglGetPathParameterivNV(JNIEnv *env, jclass clazz, jint name, jint param, jlong value, jlong function_pointer) { + GLint *value_address = (GLint *)(intptr_t)value; + glGetPathParameterivNVPROC glGetPathParameterivNV = (glGetPathParameterivNVPROC)((intptr_t)function_pointer); + glGetPathParameterivNV(name, param, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglGetPathParameterfvNV(JNIEnv *env, jclass clazz, jint name, jint param, jlong value, jlong function_pointer) { + GLfloat *value_address = (GLfloat *)(intptr_t)value; + glGetPathParameterfvNVPROC glGetPathParameterfvNV = (glGetPathParameterfvNVPROC)((intptr_t)function_pointer); + glGetPathParameterfvNV(name, param, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglGetPathCommandsNV(JNIEnv *env, jclass clazz, jint name, jlong commands, jlong function_pointer) { + GLubyte *commands_address = (GLubyte *)(intptr_t)commands; + glGetPathCommandsNVPROC glGetPathCommandsNV = (glGetPathCommandsNVPROC)((intptr_t)function_pointer); + glGetPathCommandsNV(name, commands_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglGetPathCoordsNV(JNIEnv *env, jclass clazz, jint name, jlong coords, jlong function_pointer) { + GLfloat *coords_address = (GLfloat *)(intptr_t)coords; + glGetPathCoordsNVPROC glGetPathCoordsNV = (glGetPathCoordsNVPROC)((intptr_t)function_pointer); + glGetPathCoordsNV(name, coords_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglGetPathDashArrayNV(JNIEnv *env, jclass clazz, jint name, jlong dashArray, jlong function_pointer) { + GLfloat *dashArray_address = (GLfloat *)(intptr_t)dashArray; + glGetPathDashArrayNVPROC glGetPathDashArrayNV = (glGetPathDashArrayNVPROC)((intptr_t)function_pointer); + glGetPathDashArrayNV(name, dashArray_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglGetPathMetricsNV(JNIEnv *env, jclass clazz, jint metricQueryMask, jint numPaths, jint pathNameType, jlong paths, jint pathBase, jint stride, jlong metrics, jlong function_pointer) { + const GLvoid *paths_address = (const GLvoid *)(intptr_t)paths; + GLfloat *metrics_address = (GLfloat *)(intptr_t)metrics; + glGetPathMetricsNVPROC glGetPathMetricsNV = (glGetPathMetricsNVPROC)((intptr_t)function_pointer); + glGetPathMetricsNV(metricQueryMask, numPaths, pathNameType, paths_address, pathBase, stride, metrics_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglGetPathMetricRangeNV(JNIEnv *env, jclass clazz, jint metricQueryMask, jint fistPathName, jint numPaths, jint stride, jlong metrics, jlong function_pointer) { + GLfloat *metrics_address = (GLfloat *)(intptr_t)metrics; + glGetPathMetricRangeNVPROC glGetPathMetricRangeNV = (glGetPathMetricRangeNVPROC)((intptr_t)function_pointer); + glGetPathMetricRangeNV(metricQueryMask, fistPathName, numPaths, stride, metrics_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglGetPathSpacingNV(JNIEnv *env, jclass clazz, jint pathListMode, jint numPaths, jint pathNameType, jlong paths, jint pathBase, jfloat advanceScale, jfloat kerningScale, jint transformType, jlong returnedSpacing, jlong function_pointer) { + const GLvoid *paths_address = (const GLvoid *)(intptr_t)paths; + GLfloat *returnedSpacing_address = (GLfloat *)(intptr_t)returnedSpacing; + glGetPathSpacingNVPROC glGetPathSpacingNV = (glGetPathSpacingNVPROC)((intptr_t)function_pointer); + glGetPathSpacingNV(pathListMode, numPaths, pathNameType, paths_address, pathBase, advanceScale, kerningScale, transformType, returnedSpacing_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglGetPathColorGenivNV(JNIEnv *env, jclass clazz, jint color, jint pname, jlong value, jlong function_pointer) { + GLint *value_address = (GLint *)(intptr_t)value; + glGetPathColorGenivNVPROC glGetPathColorGenivNV = (glGetPathColorGenivNVPROC)((intptr_t)function_pointer); + glGetPathColorGenivNV(color, pname, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglGetPathColorGenfvNV(JNIEnv *env, jclass clazz, jint color, jint pname, jlong value, jlong function_pointer) { + GLfloat *value_address = (GLfloat *)(intptr_t)value; + glGetPathColorGenfvNVPROC glGetPathColorGenfvNV = (glGetPathColorGenfvNVPROC)((intptr_t)function_pointer); + glGetPathColorGenfvNV(color, pname, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglGetPathTexGenivNV(JNIEnv *env, jclass clazz, jint texCoordSet, jint pname, jlong value, jlong function_pointer) { + GLint *value_address = (GLint *)(intptr_t)value; + glGetPathTexGenivNVPROC glGetPathTexGenivNV = (glGetPathTexGenivNVPROC)((intptr_t)function_pointer); + glGetPathTexGenivNV(texCoordSet, pname, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglGetPathTexGenfvNV(JNIEnv *env, jclass clazz, jint texCoordSet, jint pname, jlong value, jlong function_pointer) { + GLfloat *value_address = (GLfloat *)(intptr_t)value; + glGetPathTexGenfvNVPROC glGetPathTexGenfvNV = (glGetPathTexGenfvNVPROC)((intptr_t)function_pointer); + glGetPathTexGenfvNV(texCoordSet, pname, value_address); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglIsPointInFillPathNV(JNIEnv *env, jclass clazz, jint path, jint mask, jfloat x, jfloat y, jlong function_pointer) { + glIsPointInFillPathNVPROC glIsPointInFillPathNV = (glIsPointInFillPathNVPROC)((intptr_t)function_pointer); + GLboolean __result = glIsPointInFillPathNV(path, mask, x, y); + return __result; +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglIsPointInStrokePathNV(JNIEnv *env, jclass clazz, jint path, jfloat x, jfloat y, jlong function_pointer) { + glIsPointInStrokePathNVPROC glIsPointInStrokePathNV = (glIsPointInStrokePathNVPROC)((intptr_t)function_pointer); + GLboolean __result = glIsPointInStrokePathNV(path, x, y); + return __result; +} + +JNIEXPORT jfloat JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglGetPathLengthNV(JNIEnv *env, jclass clazz, jint path, jint startSegment, jint numSegments, jlong function_pointer) { + glGetPathLengthNVPROC glGetPathLengthNV = (glGetPathLengthNVPROC)((intptr_t)function_pointer); + GLfloat __result = glGetPathLengthNV(path, startSegment, numSegments); + return __result; +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVPathRendering_nglPointAlongPathNV(JNIEnv *env, jclass clazz, jint path, jint startSegment, jint numSegments, jfloat distance, jlong x, jlong y, jlong tangentX, jlong tangentY, jlong function_pointer) { + GLfloat *x_address = (GLfloat *)(intptr_t)x; + GLfloat *y_address = (GLfloat *)(intptr_t)y; + GLfloat *tangentX_address = (GLfloat *)(intptr_t)tangentX; + GLfloat *tangentY_address = (GLfloat *)(intptr_t)tangentY; + glPointAlongPathNVPROC glPointAlongPathNV = (glPointAlongPathNVPROC)((intptr_t)function_pointer); + GLboolean __result = glPointAlongPathNV(path, startSegment, numSegments, distance, x_address, y_address, tangentX_address, tangentY_address); + return __result; +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVPixelDataRange.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVPixelDataRange.c new file mode 100644 index 0000000..9eaf9f2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVPixelDataRange.c @@ -0,0 +1,19 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glPixelDataRangeNVPROC) (GLenum target, GLsizei length, GLvoid * data); +typedef void (APIENTRY *glFlushPixelDataRangeNVPROC) (GLenum target); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPixelDataRange_nglPixelDataRangeNV(JNIEnv *env, jclass clazz, jint target, jint length, jlong data, jlong function_pointer) { + GLvoid *data_address = (GLvoid *)(intptr_t)data; + glPixelDataRangeNVPROC glPixelDataRangeNV = (glPixelDataRangeNVPROC)((intptr_t)function_pointer); + glPixelDataRangeNV(target, length, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPixelDataRange_nglFlushPixelDataRangeNV(JNIEnv *env, jclass clazz, jint target, jlong function_pointer) { + glFlushPixelDataRangeNVPROC glFlushPixelDataRangeNV = (glFlushPixelDataRangeNVPROC)((intptr_t)function_pointer); + glFlushPixelDataRangeNV(target); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVPointSprite.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVPointSprite.c new file mode 100644 index 0000000..0e4656b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVPointSprite.c @@ -0,0 +1,19 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glPointParameteriNVPROC) (GLenum pname, GLint param); +typedef void (APIENTRY *glPointParameterivNVPROC) (GLenum pname, const GLint * params); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPointSprite_nglPointParameteriNV(JNIEnv *env, jclass clazz, jint pname, jint param, jlong function_pointer) { + glPointParameteriNVPROC glPointParameteriNV = (glPointParameteriNVPROC)((intptr_t)function_pointer); + glPointParameteriNV(pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPointSprite_nglPointParameterivNV(JNIEnv *env, jclass clazz, jint pname, jlong params, jlong function_pointer) { + const GLint *params_address = (const GLint *)(intptr_t)params; + glPointParameterivNVPROC glPointParameterivNV = (glPointParameterivNVPROC)((intptr_t)function_pointer); + glPointParameterivNV(pname, params_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVPresentVideo.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVPresentVideo.c new file mode 100644 index 0000000..2b39f48 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVPresentVideo.c @@ -0,0 +1,46 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glPresentFrameKeyedNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLuint key0, GLenum target1, GLuint fill1, GLuint key1); +typedef void (APIENTRY *glPresentFrameDualFillNVPROC) (GLuint video_slot, GLuint64EXT minPresentTime, GLuint beginPresentTimeId, GLuint presentDurationId, GLenum type, GLenum target0, GLuint fill0, GLenum target1, GLuint fill1, GLenum target2, GLuint fill2, GLenum target3, GLuint fill3); +typedef void (APIENTRY *glGetVideoivNVPROC) (GLuint video_slot, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetVideouivNVPROC) (GLuint video_slot, GLenum pname, GLuint * params); +typedef void (APIENTRY *glGetVideoi64vNVPROC) (GLuint video_slot, GLenum pname, GLint64EXT * params); +typedef void (APIENTRY *glGetVideoui64vNVPROC) (GLuint video_slot, GLenum pname, GLuint64EXT * params); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPresentVideo_nglPresentFrameKeyedNV(JNIEnv *env, jclass clazz, jint video_slot, jlong minPresentTime, jint beginPresentTimeId, jint presentDurationId, jint type, jint target0, jint fill0, jint key0, jint target1, jint fill1, jint key1, jlong function_pointer) { + glPresentFrameKeyedNVPROC glPresentFrameKeyedNV = (glPresentFrameKeyedNVPROC)((intptr_t)function_pointer); + glPresentFrameKeyedNV(video_slot, minPresentTime, beginPresentTimeId, presentDurationId, type, target0, fill0, key0, target1, fill1, key1); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPresentVideo_nglPresentFrameDualFillNV(JNIEnv *env, jclass clazz, jint video_slot, jlong minPresentTime, jint beginPresentTimeId, jint presentDurationId, jint type, jint target0, jint fill0, jint target1, jint fill1, jint target2, jint fill2, jint target3, jint fill3, jlong function_pointer) { + glPresentFrameDualFillNVPROC glPresentFrameDualFillNV = (glPresentFrameDualFillNVPROC)((intptr_t)function_pointer); + glPresentFrameDualFillNV(video_slot, minPresentTime, beginPresentTimeId, presentDurationId, type, target0, fill0, target1, fill1, target2, fill2, target3, fill3); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPresentVideo_nglGetVideoivNV(JNIEnv *env, jclass clazz, jint video_slot, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetVideoivNVPROC glGetVideoivNV = (glGetVideoivNVPROC)((intptr_t)function_pointer); + glGetVideoivNV(video_slot, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPresentVideo_nglGetVideouivNV(JNIEnv *env, jclass clazz, jint video_slot, jint pname, jlong params, jlong function_pointer) { + GLuint *params_address = (GLuint *)(intptr_t)params; + glGetVideouivNVPROC glGetVideouivNV = (glGetVideouivNVPROC)((intptr_t)function_pointer); + glGetVideouivNV(video_slot, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPresentVideo_nglGetVideoi64vNV(JNIEnv *env, jclass clazz, jint video_slot, jint pname, jlong params, jlong function_pointer) { + GLint64EXT *params_address = (GLint64EXT *)(intptr_t)params; + glGetVideoi64vNVPROC glGetVideoi64vNV = (glGetVideoi64vNVPROC)((intptr_t)function_pointer); + glGetVideoi64vNV(video_slot, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPresentVideo_nglGetVideoui64vNV(JNIEnv *env, jclass clazz, jint video_slot, jint pname, jlong params, jlong function_pointer) { + GLuint64EXT *params_address = (GLuint64EXT *)(intptr_t)params; + glGetVideoui64vNVPROC glGetVideoui64vNV = (glGetVideoui64vNVPROC)((intptr_t)function_pointer); + glGetVideoui64vNV(video_slot, pname, params_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVPrimitiveRestart.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVPrimitiveRestart.c new file mode 100644 index 0000000..a9f8862 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVPrimitiveRestart.c @@ -0,0 +1,18 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glPrimitiveRestartNVPROC) (); +typedef void (APIENTRY *glPrimitiveRestartIndexNVPROC) (GLuint index); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPrimitiveRestart_nglPrimitiveRestartNV(JNIEnv *env, jclass clazz, jlong function_pointer) { + glPrimitiveRestartNVPROC glPrimitiveRestartNV = (glPrimitiveRestartNVPROC)((intptr_t)function_pointer); + glPrimitiveRestartNV(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVPrimitiveRestart_nglPrimitiveRestartIndexNV(JNIEnv *env, jclass clazz, jint index, jlong function_pointer) { + glPrimitiveRestartIndexNVPROC glPrimitiveRestartIndexNV = (glPrimitiveRestartIndexNVPROC)((intptr_t)function_pointer); + glPrimitiveRestartIndexNV(index); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVProgram.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVProgram.c new file mode 100644 index 0000000..7ff9b5b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVProgram.c @@ -0,0 +1,70 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glLoadProgramNVPROC) (GLenum target, GLuint programID, GLsizei length, const GLvoid * string); +typedef void (APIENTRY *glBindProgramNVPROC) (GLenum target, GLuint programID); +typedef void (APIENTRY *glDeleteProgramsNVPROC) (GLsizei n, const GLuint * programs); +typedef void (APIENTRY *glGenProgramsNVPROC) (GLsizei n, GLuint * programs); +typedef void (APIENTRY *glGetProgramivNVPROC) (GLuint programID, GLenum parameterName, GLint * params); +typedef void (APIENTRY *glGetProgramStringNVPROC) (GLuint programID, GLenum parameterName, GLvoid * paramString); +typedef GLboolean (APIENTRY *glIsProgramNVPROC) (GLuint programID); +typedef GLboolean (APIENTRY *glAreProgramsResidentNVPROC) (GLsizei n, const GLuint * programIDs, GLboolean * programResidences); +typedef void (APIENTRY *glRequestResidentProgramsNVPROC) (GLsizei n, GLuint * programIDs); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVProgram_nglLoadProgramNV(JNIEnv *env, jclass clazz, jint target, jint programID, jint length, jlong string, jlong function_pointer) { + const GLvoid *string_address = (const GLvoid *)(intptr_t)string; + glLoadProgramNVPROC glLoadProgramNV = (glLoadProgramNVPROC)((intptr_t)function_pointer); + glLoadProgramNV(target, programID, length, string_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVProgram_nglBindProgramNV(JNIEnv *env, jclass clazz, jint target, jint programID, jlong function_pointer) { + glBindProgramNVPROC glBindProgramNV = (glBindProgramNVPROC)((intptr_t)function_pointer); + glBindProgramNV(target, programID); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVProgram_nglDeleteProgramsNV(JNIEnv *env, jclass clazz, jint n, jlong programs, jlong function_pointer) { + const GLuint *programs_address = (const GLuint *)(intptr_t)programs; + glDeleteProgramsNVPROC glDeleteProgramsNV = (glDeleteProgramsNVPROC)((intptr_t)function_pointer); + glDeleteProgramsNV(n, programs_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVProgram_nglGenProgramsNV(JNIEnv *env, jclass clazz, jint n, jlong programs, jlong function_pointer) { + GLuint *programs_address = (GLuint *)(intptr_t)programs; + glGenProgramsNVPROC glGenProgramsNV = (glGenProgramsNVPROC)((intptr_t)function_pointer); + glGenProgramsNV(n, programs_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVProgram_nglGetProgramivNV(JNIEnv *env, jclass clazz, jint programID, jint parameterName, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetProgramivNVPROC glGetProgramivNV = (glGetProgramivNVPROC)((intptr_t)function_pointer); + glGetProgramivNV(programID, parameterName, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVProgram_nglGetProgramStringNV(JNIEnv *env, jclass clazz, jint programID, jint parameterName, jlong paramString, jlong function_pointer) { + GLvoid *paramString_address = (GLvoid *)(intptr_t)paramString; + glGetProgramStringNVPROC glGetProgramStringNV = (glGetProgramStringNVPROC)((intptr_t)function_pointer); + glGetProgramStringNV(programID, parameterName, paramString_address); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVProgram_nglIsProgramNV(JNIEnv *env, jclass clazz, jint programID, jlong function_pointer) { + glIsProgramNVPROC glIsProgramNV = (glIsProgramNVPROC)((intptr_t)function_pointer); + GLboolean __result = glIsProgramNV(programID); + return __result; +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVProgram_nglAreProgramsResidentNV(JNIEnv *env, jclass clazz, jint n, jlong programIDs, jlong programResidences, jlong function_pointer) { + const GLuint *programIDs_address = (const GLuint *)(intptr_t)programIDs; + GLboolean *programResidences_address = (GLboolean *)(intptr_t)programResidences; + glAreProgramsResidentNVPROC glAreProgramsResidentNV = (glAreProgramsResidentNVPROC)((intptr_t)function_pointer); + GLboolean __result = glAreProgramsResidentNV(n, programIDs_address, programResidences_address); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVProgram_nglRequestResidentProgramsNV(JNIEnv *env, jclass clazz, jint n, jlong programIDs, jlong function_pointer) { + GLuint *programIDs_address = (GLuint *)(intptr_t)programIDs; + glRequestResidentProgramsNVPROC glRequestResidentProgramsNV = (glRequestResidentProgramsNVPROC)((intptr_t)function_pointer); + glRequestResidentProgramsNV(n, programIDs_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVRegisterCombiners.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVRegisterCombiners.c new file mode 100644 index 0000000..36994b4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVRegisterCombiners.c @@ -0,0 +1,92 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glCombinerParameterfNVPROC) (GLenum pname, GLfloat param); +typedef void (APIENTRY *glCombinerParameterfvNVPROC) (GLenum pname, const GLfloat * params); +typedef void (APIENTRY *glCombinerParameteriNVPROC) (GLenum pname, GLint param); +typedef void (APIENTRY *glCombinerParameterivNVPROC) (GLenum pname, const GLint * params); +typedef void (APIENTRY *glCombinerInputNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +typedef void (APIENTRY *glCombinerOutputNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); +typedef void (APIENTRY *glFinalCombinerInputNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); +typedef void (APIENTRY *glGetCombinerInputParameterfvNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat * params); +typedef void (APIENTRY *glGetCombinerInputParameterivNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetCombinerOutputParameterfvNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat * params); +typedef void (APIENTRY *glGetCombinerOutputParameterivNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetFinalCombinerInputParameterfvNVPROC) (GLenum variable, GLenum pname, GLfloat * params); +typedef void (APIENTRY *glGetFinalCombinerInputParameterivNVPROC) (GLenum variable, GLenum pname, GLint * params); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVRegisterCombiners_nglCombinerParameterfNV(JNIEnv *env, jclass clazz, jint pname, jfloat param, jlong function_pointer) { + glCombinerParameterfNVPROC glCombinerParameterfNV = (glCombinerParameterfNVPROC)((intptr_t)function_pointer); + glCombinerParameterfNV(pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVRegisterCombiners_nglCombinerParameterfvNV(JNIEnv *env, jclass clazz, jint pname, jlong params, jlong function_pointer) { + const GLfloat *params_address = (const GLfloat *)(intptr_t)params; + glCombinerParameterfvNVPROC glCombinerParameterfvNV = (glCombinerParameterfvNVPROC)((intptr_t)function_pointer); + glCombinerParameterfvNV(pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVRegisterCombiners_nglCombinerParameteriNV(JNIEnv *env, jclass clazz, jint pname, jint param, jlong function_pointer) { + glCombinerParameteriNVPROC glCombinerParameteriNV = (glCombinerParameteriNVPROC)((intptr_t)function_pointer); + glCombinerParameteriNV(pname, param); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVRegisterCombiners_nglCombinerParameterivNV(JNIEnv *env, jclass clazz, jint pname, jlong params, jlong function_pointer) { + const GLint *params_address = (const GLint *)(intptr_t)params; + glCombinerParameterivNVPROC glCombinerParameterivNV = (glCombinerParameterivNVPROC)((intptr_t)function_pointer); + glCombinerParameterivNV(pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVRegisterCombiners_nglCombinerInputNV(JNIEnv *env, jclass clazz, jint stage, jint portion, jint variable, jint input, jint mapping, jint componentUsage, jlong function_pointer) { + glCombinerInputNVPROC glCombinerInputNV = (glCombinerInputNVPROC)((intptr_t)function_pointer); + glCombinerInputNV(stage, portion, variable, input, mapping, componentUsage); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVRegisterCombiners_nglCombinerOutputNV(JNIEnv *env, jclass clazz, jint stage, jint portion, jint abOutput, jint cdOutput, jint sumOutput, jint scale, jint bias, jboolean abDotProduct, jboolean cdDotProduct, jboolean muxSum, jlong function_pointer) { + glCombinerOutputNVPROC glCombinerOutputNV = (glCombinerOutputNVPROC)((intptr_t)function_pointer); + glCombinerOutputNV(stage, portion, abOutput, cdOutput, sumOutput, scale, bias, abDotProduct, cdDotProduct, muxSum); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVRegisterCombiners_nglFinalCombinerInputNV(JNIEnv *env, jclass clazz, jint variable, jint input, jint mapping, jint componentUsage, jlong function_pointer) { + glFinalCombinerInputNVPROC glFinalCombinerInputNV = (glFinalCombinerInputNVPROC)((intptr_t)function_pointer); + glFinalCombinerInputNV(variable, input, mapping, componentUsage); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVRegisterCombiners_nglGetCombinerInputParameterfvNV(JNIEnv *env, jclass clazz, jint stage, jint portion, jint variable, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetCombinerInputParameterfvNVPROC glGetCombinerInputParameterfvNV = (glGetCombinerInputParameterfvNVPROC)((intptr_t)function_pointer); + glGetCombinerInputParameterfvNV(stage, portion, variable, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVRegisterCombiners_nglGetCombinerInputParameterivNV(JNIEnv *env, jclass clazz, jint stage, jint portion, jint variable, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetCombinerInputParameterivNVPROC glGetCombinerInputParameterivNV = (glGetCombinerInputParameterivNVPROC)((intptr_t)function_pointer); + glGetCombinerInputParameterivNV(stage, portion, variable, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVRegisterCombiners_nglGetCombinerOutputParameterfvNV(JNIEnv *env, jclass clazz, jint stage, jint portion, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetCombinerOutputParameterfvNVPROC glGetCombinerOutputParameterfvNV = (glGetCombinerOutputParameterfvNVPROC)((intptr_t)function_pointer); + glGetCombinerOutputParameterfvNV(stage, portion, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVRegisterCombiners_nglGetCombinerOutputParameterivNV(JNIEnv *env, jclass clazz, jint stage, jint portion, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetCombinerOutputParameterivNVPROC glGetCombinerOutputParameterivNV = (glGetCombinerOutputParameterivNVPROC)((intptr_t)function_pointer); + glGetCombinerOutputParameterivNV(stage, portion, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVRegisterCombiners_nglGetFinalCombinerInputParameterfvNV(JNIEnv *env, jclass clazz, jint variable, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetFinalCombinerInputParameterfvNVPROC glGetFinalCombinerInputParameterfvNV = (glGetFinalCombinerInputParameterfvNVPROC)((intptr_t)function_pointer); + glGetFinalCombinerInputParameterfvNV(variable, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVRegisterCombiners_nglGetFinalCombinerInputParameterivNV(JNIEnv *env, jclass clazz, jint variable, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetFinalCombinerInputParameterivNVPROC glGetFinalCombinerInputParameterivNV = (glGetFinalCombinerInputParameterivNVPROC)((intptr_t)function_pointer); + glGetFinalCombinerInputParameterivNV(variable, pname, params_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVRegisterCombiners2.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVRegisterCombiners2.c new file mode 100644 index 0000000..cec6843 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVRegisterCombiners2.c @@ -0,0 +1,20 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glCombinerStageParameterfvNVPROC) (GLenum stage, GLenum pname, const GLfloat * params); +typedef void (APIENTRY *glGetCombinerStageParameterfvNVPROC) (GLenum stage, GLenum pname, GLfloat * params); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVRegisterCombiners2_nglCombinerStageParameterfvNV(JNIEnv *env, jclass clazz, jint stage, jint pname, jlong params, jlong function_pointer) { + const GLfloat *params_address = (const GLfloat *)(intptr_t)params; + glCombinerStageParameterfvNVPROC glCombinerStageParameterfvNV = (glCombinerStageParameterfvNVPROC)((intptr_t)function_pointer); + glCombinerStageParameterfvNV(stage, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVRegisterCombiners2_nglGetCombinerStageParameterfvNV(JNIEnv *env, jclass clazz, jint stage, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetCombinerStageParameterfvNVPROC glGetCombinerStageParameterfvNV = (glGetCombinerStageParameterfvNVPROC)((intptr_t)function_pointer); + glGetCombinerStageParameterfvNV(stage, pname, params_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVShaderBufferLoad.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVShaderBufferLoad.c new file mode 100644 index 0000000..d9989bd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVShaderBufferLoad.c @@ -0,0 +1,91 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glMakeBufferResidentNVPROC) (GLenum target, GLenum access); +typedef void (APIENTRY *glMakeBufferNonResidentNVPROC) (GLenum target); +typedef GLboolean (APIENTRY *glIsBufferResidentNVPROC) (GLenum target); +typedef void (APIENTRY *glMakeNamedBufferResidentNVPROC) (GLuint buffer, GLenum access); +typedef void (APIENTRY *glMakeNamedBufferNonResidentNVPROC) (GLuint buffer); +typedef GLboolean (APIENTRY *glIsNamedBufferResidentNVPROC) (GLuint buffer); +typedef void (APIENTRY *glGetBufferParameterui64vNVPROC) (GLenum target, GLenum pname, GLuint64EXT * params); +typedef void (APIENTRY *glGetNamedBufferParameterui64vNVPROC) (GLuint buffer, GLenum pname, GLuint64EXT * params); +typedef void (APIENTRY *glGetIntegerui64vNVPROC) (GLenum value, GLuint64EXT * result); +typedef void (APIENTRY *glUniformui64NVPROC) (GLint location, GLuint64EXT value); +typedef void (APIENTRY *glUniformui64vNVPROC) (GLint location, GLsizei count, const GLuint64EXT * value); +typedef void (APIENTRY *glProgramUniformui64NVPROC) (GLuint program, GLint location, GLuint64EXT value); +typedef void (APIENTRY *glProgramUniformui64vNVPROC) (GLuint program, GLint location, GLsizei count, const GLuint64EXT * value); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShaderBufferLoad_nglMakeBufferResidentNV(JNIEnv *env, jclass clazz, jint target, jint access, jlong function_pointer) { + glMakeBufferResidentNVPROC glMakeBufferResidentNV = (glMakeBufferResidentNVPROC)((intptr_t)function_pointer); + glMakeBufferResidentNV(target, access); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShaderBufferLoad_nglMakeBufferNonResidentNV(JNIEnv *env, jclass clazz, jint target, jlong function_pointer) { + glMakeBufferNonResidentNVPROC glMakeBufferNonResidentNV = (glMakeBufferNonResidentNVPROC)((intptr_t)function_pointer); + glMakeBufferNonResidentNV(target); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVShaderBufferLoad_nglIsBufferResidentNV(JNIEnv *env, jclass clazz, jint target, jlong function_pointer) { + glIsBufferResidentNVPROC glIsBufferResidentNV = (glIsBufferResidentNVPROC)((intptr_t)function_pointer); + GLboolean __result = glIsBufferResidentNV(target); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShaderBufferLoad_nglMakeNamedBufferResidentNV(JNIEnv *env, jclass clazz, jint buffer, jint access, jlong function_pointer) { + glMakeNamedBufferResidentNVPROC glMakeNamedBufferResidentNV = (glMakeNamedBufferResidentNVPROC)((intptr_t)function_pointer); + glMakeNamedBufferResidentNV(buffer, access); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShaderBufferLoad_nglMakeNamedBufferNonResidentNV(JNIEnv *env, jclass clazz, jint buffer, jlong function_pointer) { + glMakeNamedBufferNonResidentNVPROC glMakeNamedBufferNonResidentNV = (glMakeNamedBufferNonResidentNVPROC)((intptr_t)function_pointer); + glMakeNamedBufferNonResidentNV(buffer); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVShaderBufferLoad_nglIsNamedBufferResidentNV(JNIEnv *env, jclass clazz, jint buffer, jlong function_pointer) { + glIsNamedBufferResidentNVPROC glIsNamedBufferResidentNV = (glIsNamedBufferResidentNVPROC)((intptr_t)function_pointer); + GLboolean __result = glIsNamedBufferResidentNV(buffer); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShaderBufferLoad_nglGetBufferParameterui64vNV(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params, jlong function_pointer) { + GLuint64EXT *params_address = (GLuint64EXT *)(intptr_t)params; + glGetBufferParameterui64vNVPROC glGetBufferParameterui64vNV = (glGetBufferParameterui64vNVPROC)((intptr_t)function_pointer); + glGetBufferParameterui64vNV(target, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShaderBufferLoad_nglGetNamedBufferParameterui64vNV(JNIEnv *env, jclass clazz, jint buffer, jint pname, jlong params, jlong function_pointer) { + GLuint64EXT *params_address = (GLuint64EXT *)(intptr_t)params; + glGetNamedBufferParameterui64vNVPROC glGetNamedBufferParameterui64vNV = (glGetNamedBufferParameterui64vNVPROC)((intptr_t)function_pointer); + glGetNamedBufferParameterui64vNV(buffer, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShaderBufferLoad_nglGetIntegerui64vNV(JNIEnv *env, jclass clazz, jint value, jlong result, jlong function_pointer) { + GLuint64EXT *result_address = (GLuint64EXT *)(intptr_t)result; + glGetIntegerui64vNVPROC glGetIntegerui64vNV = (glGetIntegerui64vNVPROC)((intptr_t)function_pointer); + glGetIntegerui64vNV(value, result_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShaderBufferLoad_nglUniformui64NV(JNIEnv *env, jclass clazz, jint location, jlong value, jlong function_pointer) { + glUniformui64NVPROC glUniformui64NV = (glUniformui64NVPROC)((intptr_t)function_pointer); + glUniformui64NV(location, value); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShaderBufferLoad_nglUniformui64vNV(JNIEnv *env, jclass clazz, jint location, jint count, jlong value, jlong function_pointer) { + const GLuint64EXT *value_address = (const GLuint64EXT *)(intptr_t)value; + glUniformui64vNVPROC glUniformui64vNV = (glUniformui64vNVPROC)((intptr_t)function_pointer); + glUniformui64vNV(location, count, value_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShaderBufferLoad_nglProgramUniformui64NV(JNIEnv *env, jclass clazz, jint program, jint location, jlong value, jlong function_pointer) { + glProgramUniformui64NVPROC glProgramUniformui64NV = (glProgramUniformui64NVPROC)((intptr_t)function_pointer); + glProgramUniformui64NV(program, location, value); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVShaderBufferLoad_nglProgramUniformui64vNV(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value, jlong function_pointer) { + const GLuint64EXT *value_address = (const GLuint64EXT *)(intptr_t)value; + glProgramUniformui64vNVPROC glProgramUniformui64vNV = (glProgramUniformui64vNVPROC)((intptr_t)function_pointer); + glProgramUniformui64vNV(program, location, count, value_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVTextureBarrier.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVTextureBarrier.c new file mode 100644 index 0000000..125541e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVTextureBarrier.c @@ -0,0 +1,12 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glTextureBarrierNVPROC) (); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTextureBarrier_nglTextureBarrierNV(JNIEnv *env, jclass clazz, jlong function_pointer) { + glTextureBarrierNVPROC glTextureBarrierNV = (glTextureBarrierNVPROC)((intptr_t)function_pointer); + glTextureBarrierNV(); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVTextureMultisample.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVTextureMultisample.c new file mode 100644 index 0000000..89c6862 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVTextureMultisample.c @@ -0,0 +1,42 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glTexImage2DMultisampleCoverageNVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +typedef void (APIENTRY *glTexImage3DMultisampleCoverageNVPROC) (GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +typedef void (APIENTRY *glTextureImage2DMultisampleNVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +typedef void (APIENTRY *glTextureImage3DMultisampleNVPROC) (GLuint texture, GLenum target, GLsizei samples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); +typedef void (APIENTRY *glTextureImage2DMultisampleCoverageNVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLboolean fixedSampleLocations); +typedef void (APIENTRY *glTextureImage3DMultisampleCoverageNVPROC) (GLuint texture, GLenum target, GLsizei coverageSamples, GLsizei colorSamples, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedSampleLocations); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTextureMultisample_nglTexImage2DMultisampleCoverageNV(JNIEnv *env, jclass clazz, jint target, jint coverageSamples, jint colorSamples, jint internalFormat, jint width, jint height, jboolean fixedSampleLocations, jlong function_pointer) { + glTexImage2DMultisampleCoverageNVPROC glTexImage2DMultisampleCoverageNV = (glTexImage2DMultisampleCoverageNVPROC)((intptr_t)function_pointer); + glTexImage2DMultisampleCoverageNV(target, coverageSamples, colorSamples, internalFormat, width, height, fixedSampleLocations); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTextureMultisample_nglTexImage3DMultisampleCoverageNV(JNIEnv *env, jclass clazz, jint target, jint coverageSamples, jint colorSamples, jint internalFormat, jint width, jint height, jint depth, jboolean fixedSampleLocations, jlong function_pointer) { + glTexImage3DMultisampleCoverageNVPROC glTexImage3DMultisampleCoverageNV = (glTexImage3DMultisampleCoverageNVPROC)((intptr_t)function_pointer); + glTexImage3DMultisampleCoverageNV(target, coverageSamples, colorSamples, internalFormat, width, height, depth, fixedSampleLocations); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTextureMultisample_nglTextureImage2DMultisampleNV(JNIEnv *env, jclass clazz, jint texture, jint target, jint samples, jint internalFormat, jint width, jint height, jboolean fixedSampleLocations, jlong function_pointer) { + glTextureImage2DMultisampleNVPROC glTextureImage2DMultisampleNV = (glTextureImage2DMultisampleNVPROC)((intptr_t)function_pointer); + glTextureImage2DMultisampleNV(texture, target, samples, internalFormat, width, height, fixedSampleLocations); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTextureMultisample_nglTextureImage3DMultisampleNV(JNIEnv *env, jclass clazz, jint texture, jint target, jint samples, jint internalFormat, jint width, jint height, jint depth, jboolean fixedSampleLocations, jlong function_pointer) { + glTextureImage3DMultisampleNVPROC glTextureImage3DMultisampleNV = (glTextureImage3DMultisampleNVPROC)((intptr_t)function_pointer); + glTextureImage3DMultisampleNV(texture, target, samples, internalFormat, width, height, depth, fixedSampleLocations); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTextureMultisample_nglTextureImage2DMultisampleCoverageNV(JNIEnv *env, jclass clazz, jint texture, jint target, jint coverageSamples, jint colorSamples, jint internalFormat, jint width, jint height, jboolean fixedSampleLocations, jlong function_pointer) { + glTextureImage2DMultisampleCoverageNVPROC glTextureImage2DMultisampleCoverageNV = (glTextureImage2DMultisampleCoverageNVPROC)((intptr_t)function_pointer); + glTextureImage2DMultisampleCoverageNV(texture, target, coverageSamples, colorSamples, internalFormat, width, height, fixedSampleLocations); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTextureMultisample_nglTextureImage3DMultisampleCoverageNV(JNIEnv *env, jclass clazz, jint texture, jint target, jint coverageSamples, jint colorSamples, jint internalFormat, jint width, jint height, jint depth, jboolean fixedSampleLocations, jlong function_pointer) { + glTextureImage3DMultisampleCoverageNVPROC glTextureImage3DMultisampleCoverageNV = (glTextureImage3DMultisampleCoverageNVPROC)((intptr_t)function_pointer); + glTextureImage3DMultisampleCoverageNV(texture, target, coverageSamples, colorSamples, internalFormat, width, height, depth, fixedSampleLocations); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVTransformFeedback.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVTransformFeedback.c new file mode 100644 index 0000000..95cfd71 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVTransformFeedback.c @@ -0,0 +1,82 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glBindBufferRangeNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef void (APIENTRY *glBindBufferOffsetNVPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset); +typedef void (APIENTRY *glBindBufferBaseNVPROC) (GLenum target, GLuint index, GLuint buffer); +typedef void (APIENTRY *glTransformFeedbackAttribsNVPROC) (GLsizei count, const GLint * attribs, GLenum bufferMode); +typedef void (APIENTRY *glTransformFeedbackVaryingsNVPROC) (GLuint program, GLsizei count, const GLint * locations, GLenum bufferMode); +typedef void (APIENTRY *glBeginTransformFeedbackNVPROC) (GLenum primitiveMode); +typedef void (APIENTRY *glEndTransformFeedbackNVPROC) (); +typedef GLint (APIENTRY *glGetVaryingLocationNVPROC) (GLuint program, const GLchar * name); +typedef void (APIENTRY *glGetActiveVaryingNVPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name); +typedef void (APIENTRY *glActiveVaryingNVPROC) (GLuint program, const GLchar * name); +typedef void (APIENTRY *glGetTransformFeedbackVaryingNVPROC) (GLuint program, GLuint index, GLint * location); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback_nglBindBufferRangeNV(JNIEnv *env, jclass clazz, jint target, jint index, jint buffer, jlong offset, jlong size, jlong function_pointer) { + glBindBufferRangeNVPROC glBindBufferRangeNV = (glBindBufferRangeNVPROC)((intptr_t)function_pointer); + glBindBufferRangeNV(target, index, buffer, offset, size); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback_nglBindBufferOffsetNV(JNIEnv *env, jclass clazz, jint target, jint index, jint buffer, jlong offset, jlong function_pointer) { + glBindBufferOffsetNVPROC glBindBufferOffsetNV = (glBindBufferOffsetNVPROC)((intptr_t)function_pointer); + glBindBufferOffsetNV(target, index, buffer, offset); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback_nglBindBufferBaseNV(JNIEnv *env, jclass clazz, jint target, jint index, jint buffer, jlong function_pointer) { + glBindBufferBaseNVPROC glBindBufferBaseNV = (glBindBufferBaseNVPROC)((intptr_t)function_pointer); + glBindBufferBaseNV(target, index, buffer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback_nglTransformFeedbackAttribsNV(JNIEnv *env, jclass clazz, jint count, jlong attribs, jint bufferMode, jlong function_pointer) { + const GLint *attribs_address = (const GLint *)(intptr_t)attribs; + glTransformFeedbackAttribsNVPROC glTransformFeedbackAttribsNV = (glTransformFeedbackAttribsNVPROC)((intptr_t)function_pointer); + glTransformFeedbackAttribsNV(count, attribs_address, bufferMode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback_nglTransformFeedbackVaryingsNV(JNIEnv *env, jclass clazz, jint program, jint count, jlong locations, jint bufferMode, jlong function_pointer) { + const GLint *locations_address = (const GLint *)(intptr_t)locations; + glTransformFeedbackVaryingsNVPROC glTransformFeedbackVaryingsNV = (glTransformFeedbackVaryingsNVPROC)((intptr_t)function_pointer); + glTransformFeedbackVaryingsNV(program, count, locations_address, bufferMode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback_nglBeginTransformFeedbackNV(JNIEnv *env, jclass clazz, jint primitiveMode, jlong function_pointer) { + glBeginTransformFeedbackNVPROC glBeginTransformFeedbackNV = (glBeginTransformFeedbackNVPROC)((intptr_t)function_pointer); + glBeginTransformFeedbackNV(primitiveMode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback_nglEndTransformFeedbackNV(JNIEnv *env, jclass clazz, jlong function_pointer) { + glEndTransformFeedbackNVPROC glEndTransformFeedbackNV = (glEndTransformFeedbackNVPROC)((intptr_t)function_pointer); + glEndTransformFeedbackNV(); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_NVTransformFeedback_nglGetVaryingLocationNV(JNIEnv *env, jclass clazz, jint program, jlong name, jlong function_pointer) { + const GLchar *name_address = (const GLchar *)(intptr_t)name; + glGetVaryingLocationNVPROC glGetVaryingLocationNV = (glGetVaryingLocationNVPROC)((intptr_t)function_pointer); + GLint __result = glGetVaryingLocationNV(program, name_address); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback_nglGetActiveVaryingNV(JNIEnv *env, jclass clazz, jint program, jint index, jint bufSize, jlong length, jlong size, jlong type, jlong name, jlong function_pointer) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLsizei *size_address = (GLsizei *)(intptr_t)size; + GLenum *type_address = (GLenum *)(intptr_t)type; + GLchar *name_address = (GLchar *)(intptr_t)name; + glGetActiveVaryingNVPROC glGetActiveVaryingNV = (glGetActiveVaryingNVPROC)((intptr_t)function_pointer); + glGetActiveVaryingNV(program, index, bufSize, length_address, size_address, type_address, name_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback_nglActiveVaryingNV(JNIEnv *env, jclass clazz, jint program, jlong name, jlong function_pointer) { + const GLchar *name_address = (const GLchar *)(intptr_t)name; + glActiveVaryingNVPROC glActiveVaryingNV = (glActiveVaryingNVPROC)((intptr_t)function_pointer); + glActiveVaryingNV(program, name_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback_nglGetTransformFeedbackVaryingNV(JNIEnv *env, jclass clazz, jint program, jint index, jlong location, jlong function_pointer) { + GLint *location_address = (GLint *)(intptr_t)location; + glGetTransformFeedbackVaryingNVPROC glGetTransformFeedbackVaryingNV = (glGetTransformFeedbackVaryingNVPROC)((intptr_t)function_pointer); + glGetTransformFeedbackVaryingNV(program, index, location_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVTransformFeedback2.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVTransformFeedback2.c new file mode 100644 index 0000000..900c94f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVTransformFeedback2.c @@ -0,0 +1,51 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glBindTransformFeedbackNVPROC) (GLenum target, GLuint id); +typedef void (APIENTRY *glDeleteTransformFeedbacksNVPROC) (GLsizei n, const GLuint * ids); +typedef void (APIENTRY *glGenTransformFeedbacksNVPROC) (GLsizei n, GLuint * ids); +typedef GLboolean (APIENTRY *glIsTransformFeedbackNVPROC) (GLuint id); +typedef void (APIENTRY *glPauseTransformFeedbackNVPROC) (); +typedef void (APIENTRY *glResumeTransformFeedbackNVPROC) (); +typedef void (APIENTRY *glDrawTransformFeedbackNVPROC) (GLenum mode, GLuint id); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback2_nglBindTransformFeedbackNV(JNIEnv *env, jclass clazz, jint target, jint id, jlong function_pointer) { + glBindTransformFeedbackNVPROC glBindTransformFeedbackNV = (glBindTransformFeedbackNVPROC)((intptr_t)function_pointer); + glBindTransformFeedbackNV(target, id); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback2_nglDeleteTransformFeedbacksNV(JNIEnv *env, jclass clazz, jint n, jlong ids, jlong function_pointer) { + const GLuint *ids_address = (const GLuint *)(intptr_t)ids; + glDeleteTransformFeedbacksNVPROC glDeleteTransformFeedbacksNV = (glDeleteTransformFeedbacksNVPROC)((intptr_t)function_pointer); + glDeleteTransformFeedbacksNV(n, ids_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback2_nglGenTransformFeedbacksNV(JNIEnv *env, jclass clazz, jint n, jlong ids, jlong function_pointer) { + GLuint *ids_address = (GLuint *)(intptr_t)ids; + glGenTransformFeedbacksNVPROC glGenTransformFeedbacksNV = (glGenTransformFeedbacksNVPROC)((intptr_t)function_pointer); + glGenTransformFeedbacksNV(n, ids_address); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_NVTransformFeedback2_nglIsTransformFeedbackNV(JNIEnv *env, jclass clazz, jint id, jlong function_pointer) { + glIsTransformFeedbackNVPROC glIsTransformFeedbackNV = (glIsTransformFeedbackNVPROC)((intptr_t)function_pointer); + GLboolean __result = glIsTransformFeedbackNV(id); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback2_nglPauseTransformFeedbackNV(JNIEnv *env, jclass clazz, jlong function_pointer) { + glPauseTransformFeedbackNVPROC glPauseTransformFeedbackNV = (glPauseTransformFeedbackNVPROC)((intptr_t)function_pointer); + glPauseTransformFeedbackNV(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback2_nglResumeTransformFeedbackNV(JNIEnv *env, jclass clazz, jlong function_pointer) { + glResumeTransformFeedbackNVPROC glResumeTransformFeedbackNV = (glResumeTransformFeedbackNVPROC)((intptr_t)function_pointer); + glResumeTransformFeedbackNV(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVTransformFeedback2_nglDrawTransformFeedbackNV(JNIEnv *env, jclass clazz, jint mode, jint id, jlong function_pointer) { + glDrawTransformFeedbackNVPROC glDrawTransformFeedbackNV = (glDrawTransformFeedbackNVPROC)((intptr_t)function_pointer); + glDrawTransformFeedbackNV(mode, id); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVVertexArrayRange.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVVertexArrayRange.c new file mode 100644 index 0000000..6776cb7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVVertexArrayRange.c @@ -0,0 +1,33 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glVertexArrayRangeNVPROC) (GLsizei size, const GLvoid * pPointer); +typedef void (APIENTRY *glFlushVertexArrayRangeNVPROC) (); +typedef GLvoid * (APIENTRY *glAllocateMemoryNVPROC) (GLint size, GLfloat readFrequency, GLfloat writeFrequency, GLfloat priority); +typedef void (APIENTRY *glFreeMemoryNVPROC) (GLvoid * pointer); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexArrayRange_nglVertexArrayRangeNV(JNIEnv *env, jclass clazz, jint size, jlong pPointer, jlong function_pointer) { + const GLvoid *pPointer_address = (const GLvoid *)(intptr_t)pPointer; + glVertexArrayRangeNVPROC glVertexArrayRangeNV = (glVertexArrayRangeNVPROC)((intptr_t)function_pointer); + glVertexArrayRangeNV(size, pPointer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexArrayRange_nglFlushVertexArrayRangeNV(JNIEnv *env, jclass clazz, jlong function_pointer) { + glFlushVertexArrayRangeNVPROC glFlushVertexArrayRangeNV = (glFlushVertexArrayRangeNVPROC)((intptr_t)function_pointer); + glFlushVertexArrayRangeNV(); +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_NVVertexArrayRange_nglAllocateMemoryNV(JNIEnv *env, jclass clazz, jint size, jfloat readFrequency, jfloat writeFrequency, jfloat priority, jlong result_size, jlong function_pointer) { + glAllocateMemoryNVPROC glAllocateMemoryNV = (glAllocateMemoryNVPROC)((intptr_t)function_pointer); + GLvoid * __result = glAllocateMemoryNV(size, readFrequency, writeFrequency, priority); + return safeNewBuffer(env, __result, result_size); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexArrayRange_nglFreeMemoryNV(JNIEnv *env, jclass clazz, jlong pointer, jlong function_pointer) { + GLvoid *pointer_address = (GLvoid *)(intptr_t)pointer; + glFreeMemoryNVPROC glFreeMemoryNV = (glFreeMemoryNVPROC)((intptr_t)function_pointer); + glFreeMemoryNV(pointer_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVVertexAttribInteger64bit.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVVertexAttribInteger64bit.c new file mode 100644 index 0000000..c8b3c92 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVVertexAttribInteger64bit.c @@ -0,0 +1,130 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glVertexAttribL1i64NVPROC) (GLuint index, GLint64EXT x); +typedef void (APIENTRY *glVertexAttribL2i64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y); +typedef void (APIENTRY *glVertexAttribL3i64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z); +typedef void (APIENTRY *glVertexAttribL4i64NVPROC) (GLuint index, GLint64EXT x, GLint64EXT y, GLint64EXT z, GLint64EXT w); +typedef void (APIENTRY *glVertexAttribL1i64vNVPROC) (GLuint index, const GLint64EXT * v); +typedef void (APIENTRY *glVertexAttribL2i64vNVPROC) (GLuint index, const GLint64EXT * v); +typedef void (APIENTRY *glVertexAttribL3i64vNVPROC) (GLuint index, const GLint64EXT * v); +typedef void (APIENTRY *glVertexAttribL4i64vNVPROC) (GLuint index, const GLint64EXT * v); +typedef void (APIENTRY *glVertexAttribL1ui64NVPROC) (GLuint index, GLuint64EXT x); +typedef void (APIENTRY *glVertexAttribL2ui64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y); +typedef void (APIENTRY *glVertexAttribL3ui64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z); +typedef void (APIENTRY *glVertexAttribL4ui64NVPROC) (GLuint index, GLuint64EXT x, GLuint64EXT y, GLuint64EXT z, GLuint64EXT w); +typedef void (APIENTRY *glVertexAttribL1ui64vNVPROC) (GLuint index, const GLuint64EXT * v); +typedef void (APIENTRY *glVertexAttribL2ui64vNVPROC) (GLuint index, const GLuint64EXT * v); +typedef void (APIENTRY *glVertexAttribL3ui64vNVPROC) (GLuint index, const GLuint64EXT * v); +typedef void (APIENTRY *glVertexAttribL4ui64vNVPROC) (GLuint index, const GLuint64EXT * v); +typedef void (APIENTRY *glGetVertexAttribLi64vNVPROC) (GLuint index, GLenum pname, GLint64EXT * params); +typedef void (APIENTRY *glGetVertexAttribLui64vNVPROC) (GLuint index, GLenum pname, GLuint64EXT * params); +typedef void (APIENTRY *glVertexAttribLFormatNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_nglVertexAttribL1i64NV(JNIEnv *env, jclass clazz, jint index, jlong x, jlong function_pointer) { + glVertexAttribL1i64NVPROC glVertexAttribL1i64NV = (glVertexAttribL1i64NVPROC)((intptr_t)function_pointer); + glVertexAttribL1i64NV(index, x); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_nglVertexAttribL2i64NV(JNIEnv *env, jclass clazz, jint index, jlong x, jlong y, jlong function_pointer) { + glVertexAttribL2i64NVPROC glVertexAttribL2i64NV = (glVertexAttribL2i64NVPROC)((intptr_t)function_pointer); + glVertexAttribL2i64NV(index, x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_nglVertexAttribL3i64NV(JNIEnv *env, jclass clazz, jint index, jlong x, jlong y, jlong z, jlong function_pointer) { + glVertexAttribL3i64NVPROC glVertexAttribL3i64NV = (glVertexAttribL3i64NVPROC)((intptr_t)function_pointer); + glVertexAttribL3i64NV(index, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_nglVertexAttribL4i64NV(JNIEnv *env, jclass clazz, jint index, jlong x, jlong y, jlong z, jlong w, jlong function_pointer) { + glVertexAttribL4i64NVPROC glVertexAttribL4i64NV = (glVertexAttribL4i64NVPROC)((intptr_t)function_pointer); + glVertexAttribL4i64NV(index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_nglVertexAttribL1i64vNV(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLint64EXT *v_address = (const GLint64EXT *)(intptr_t)v; + glVertexAttribL1i64vNVPROC glVertexAttribL1i64vNV = (glVertexAttribL1i64vNVPROC)((intptr_t)function_pointer); + glVertexAttribL1i64vNV(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_nglVertexAttribL2i64vNV(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLint64EXT *v_address = (const GLint64EXT *)(intptr_t)v; + glVertexAttribL2i64vNVPROC glVertexAttribL2i64vNV = (glVertexAttribL2i64vNVPROC)((intptr_t)function_pointer); + glVertexAttribL2i64vNV(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_nglVertexAttribL3i64vNV(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLint64EXT *v_address = (const GLint64EXT *)(intptr_t)v; + glVertexAttribL3i64vNVPROC glVertexAttribL3i64vNV = (glVertexAttribL3i64vNVPROC)((intptr_t)function_pointer); + glVertexAttribL3i64vNV(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_nglVertexAttribL4i64vNV(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLint64EXT *v_address = (const GLint64EXT *)(intptr_t)v; + glVertexAttribL4i64vNVPROC glVertexAttribL4i64vNV = (glVertexAttribL4i64vNVPROC)((intptr_t)function_pointer); + glVertexAttribL4i64vNV(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_nglVertexAttribL1ui64NV(JNIEnv *env, jclass clazz, jint index, jlong x, jlong function_pointer) { + glVertexAttribL1ui64NVPROC glVertexAttribL1ui64NV = (glVertexAttribL1ui64NVPROC)((intptr_t)function_pointer); + glVertexAttribL1ui64NV(index, x); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_nglVertexAttribL2ui64NV(JNIEnv *env, jclass clazz, jint index, jlong x, jlong y, jlong function_pointer) { + glVertexAttribL2ui64NVPROC glVertexAttribL2ui64NV = (glVertexAttribL2ui64NVPROC)((intptr_t)function_pointer); + glVertexAttribL2ui64NV(index, x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_nglVertexAttribL3ui64NV(JNIEnv *env, jclass clazz, jint index, jlong x, jlong y, jlong z, jlong function_pointer) { + glVertexAttribL3ui64NVPROC glVertexAttribL3ui64NV = (glVertexAttribL3ui64NVPROC)((intptr_t)function_pointer); + glVertexAttribL3ui64NV(index, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_nglVertexAttribL4ui64NV(JNIEnv *env, jclass clazz, jint index, jlong x, jlong y, jlong z, jlong w, jlong function_pointer) { + glVertexAttribL4ui64NVPROC glVertexAttribL4ui64NV = (glVertexAttribL4ui64NVPROC)((intptr_t)function_pointer); + glVertexAttribL4ui64NV(index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_nglVertexAttribL1ui64vNV(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLuint64EXT *v_address = (const GLuint64EXT *)(intptr_t)v; + glVertexAttribL1ui64vNVPROC glVertexAttribL1ui64vNV = (glVertexAttribL1ui64vNVPROC)((intptr_t)function_pointer); + glVertexAttribL1ui64vNV(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_nglVertexAttribL2ui64vNV(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLuint64EXT *v_address = (const GLuint64EXT *)(intptr_t)v; + glVertexAttribL2ui64vNVPROC glVertexAttribL2ui64vNV = (glVertexAttribL2ui64vNVPROC)((intptr_t)function_pointer); + glVertexAttribL2ui64vNV(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_nglVertexAttribL3ui64vNV(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLuint64EXT *v_address = (const GLuint64EXT *)(intptr_t)v; + glVertexAttribL3ui64vNVPROC glVertexAttribL3ui64vNV = (glVertexAttribL3ui64vNVPROC)((intptr_t)function_pointer); + glVertexAttribL3ui64vNV(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_nglVertexAttribL4ui64vNV(JNIEnv *env, jclass clazz, jint index, jlong v, jlong function_pointer) { + const GLuint64EXT *v_address = (const GLuint64EXT *)(intptr_t)v; + glVertexAttribL4ui64vNVPROC glVertexAttribL4ui64vNV = (glVertexAttribL4ui64vNVPROC)((intptr_t)function_pointer); + glVertexAttribL4ui64vNV(index, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_nglGetVertexAttribLi64vNV(JNIEnv *env, jclass clazz, jint index, jint pname, jlong params, jlong function_pointer) { + GLint64EXT *params_address = (GLint64EXT *)(intptr_t)params; + glGetVertexAttribLi64vNVPROC glGetVertexAttribLi64vNV = (glGetVertexAttribLi64vNVPROC)((intptr_t)function_pointer); + glGetVertexAttribLi64vNV(index, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_nglGetVertexAttribLui64vNV(JNIEnv *env, jclass clazz, jint index, jint pname, jlong params, jlong function_pointer) { + GLuint64EXT *params_address = (GLuint64EXT *)(intptr_t)params; + glGetVertexAttribLui64vNVPROC glGetVertexAttribLui64vNV = (glGetVertexAttribLui64vNVPROC)((intptr_t)function_pointer); + glGetVertexAttribLui64vNV(index, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexAttribInteger64bit_nglVertexAttribLFormatNV(JNIEnv *env, jclass clazz, jint index, jint size, jint type, jint stride, jlong function_pointer) { + glVertexAttribLFormatNVPROC glVertexAttribLFormatNV = (glVertexAttribLFormatNVPROC)((intptr_t)function_pointer); + glVertexAttribLFormatNV(index, size, type, stride); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVVertexBufferUnifiedMemory.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVVertexBufferUnifiedMemory.c new file mode 100644 index 0000000..f9cc07e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVVertexBufferUnifiedMemory.c @@ -0,0 +1,79 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glBufferAddressRangeNVPROC) (GLenum pname, GLuint index, GLuint64EXT address, GLsizeiptr length); +typedef void (APIENTRY *glVertexFormatNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRY *glNormalFormatNVPROC) (GLenum type, GLsizei stride); +typedef void (APIENTRY *glColorFormatNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRY *glIndexFormatNVPROC) (GLenum type, GLsizei stride); +typedef void (APIENTRY *glTexCoordFormatNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRY *glEdgeFlagFormatNVPROC) (GLsizei stride); +typedef void (APIENTRY *glSecondaryColorFormatNVPROC) (GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRY *glFogCoordFormatNVPROC) (GLenum type, GLsizei stride); +typedef void (APIENTRY *glVertexAttribFormatNVPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride); +typedef void (APIENTRY *glVertexAttribIFormatNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride); +typedef void (APIENTRY *glGetIntegerui64i_vNVPROC) (GLenum value, GLuint index, GLuint64EXT * result); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexBufferUnifiedMemory_nglBufferAddressRangeNV(JNIEnv *env, jclass clazz, jint pname, jint index, jlong address, jlong length, jlong function_pointer) { + glBufferAddressRangeNVPROC glBufferAddressRangeNV = (glBufferAddressRangeNVPROC)((intptr_t)function_pointer); + glBufferAddressRangeNV(pname, index, address, length); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexBufferUnifiedMemory_nglVertexFormatNV(JNIEnv *env, jclass clazz, jint size, jint type, jint stride, jlong function_pointer) { + glVertexFormatNVPROC glVertexFormatNV = (glVertexFormatNVPROC)((intptr_t)function_pointer); + glVertexFormatNV(size, type, stride); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexBufferUnifiedMemory_nglNormalFormatNV(JNIEnv *env, jclass clazz, jint type, jint stride, jlong function_pointer) { + glNormalFormatNVPROC glNormalFormatNV = (glNormalFormatNVPROC)((intptr_t)function_pointer); + glNormalFormatNV(type, stride); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexBufferUnifiedMemory_nglColorFormatNV(JNIEnv *env, jclass clazz, jint size, jint type, jint stride, jlong function_pointer) { + glColorFormatNVPROC glColorFormatNV = (glColorFormatNVPROC)((intptr_t)function_pointer); + glColorFormatNV(size, type, stride); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexBufferUnifiedMemory_nglIndexFormatNV(JNIEnv *env, jclass clazz, jint type, jint stride, jlong function_pointer) { + glIndexFormatNVPROC glIndexFormatNV = (glIndexFormatNVPROC)((intptr_t)function_pointer); + glIndexFormatNV(type, stride); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexBufferUnifiedMemory_nglTexCoordFormatNV(JNIEnv *env, jclass clazz, jint size, jint type, jint stride, jlong function_pointer) { + glTexCoordFormatNVPROC glTexCoordFormatNV = (glTexCoordFormatNVPROC)((intptr_t)function_pointer); + glTexCoordFormatNV(size, type, stride); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexBufferUnifiedMemory_nglEdgeFlagFormatNV(JNIEnv *env, jclass clazz, jint stride, jlong function_pointer) { + glEdgeFlagFormatNVPROC glEdgeFlagFormatNV = (glEdgeFlagFormatNVPROC)((intptr_t)function_pointer); + glEdgeFlagFormatNV(stride); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexBufferUnifiedMemory_nglSecondaryColorFormatNV(JNIEnv *env, jclass clazz, jint size, jint type, jint stride, jlong function_pointer) { + glSecondaryColorFormatNVPROC glSecondaryColorFormatNV = (glSecondaryColorFormatNVPROC)((intptr_t)function_pointer); + glSecondaryColorFormatNV(size, type, stride); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexBufferUnifiedMemory_nglFogCoordFormatNV(JNIEnv *env, jclass clazz, jint type, jint stride, jlong function_pointer) { + glFogCoordFormatNVPROC glFogCoordFormatNV = (glFogCoordFormatNVPROC)((intptr_t)function_pointer); + glFogCoordFormatNV(type, stride); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexBufferUnifiedMemory_nglVertexAttribFormatNV(JNIEnv *env, jclass clazz, jint index, jint size, jint type, jboolean normalized, jint stride, jlong function_pointer) { + glVertexAttribFormatNVPROC glVertexAttribFormatNV = (glVertexAttribFormatNVPROC)((intptr_t)function_pointer); + glVertexAttribFormatNV(index, size, type, normalized, stride); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexBufferUnifiedMemory_nglVertexAttribIFormatNV(JNIEnv *env, jclass clazz, jint index, jint size, jint type, jint stride, jlong function_pointer) { + glVertexAttribIFormatNVPROC glVertexAttribIFormatNV = (glVertexAttribIFormatNVPROC)((intptr_t)function_pointer); + glVertexAttribIFormatNV(index, size, type, stride); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexBufferUnifiedMemory_nglGetIntegerui64i_1vNV(JNIEnv *env, jclass clazz, jint value, jint index, jlong result, jlong function_pointer) { + GLuint64EXT *result_address = (GLuint64EXT *)(intptr_t)result; + glGetIntegerui64i_vNVPROC glGetIntegerui64i_vNV = (glGetIntegerui64i_vNVPROC)((intptr_t)function_pointer); + glGetIntegerui64i_vNV(value, index, result_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVVertexProgram.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVVertexProgram.c new file mode 100644 index 0000000..6120a37 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVVertexProgram.c @@ -0,0 +1,270 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glExecuteProgramNVPROC) (GLenum target, GLuint id, const GLfloat * params); +typedef void (APIENTRY *glGetProgramParameterfvNVPROC) (GLenum target, GLuint index, GLenum parameterName, GLfloat * params); +typedef void (APIENTRY *glGetProgramParameterdvNVPROC) (GLenum target, GLuint index, GLenum parameterName, GLdouble * params); +typedef void (APIENTRY *glGetTrackMatrixivNVPROC) (GLenum target, GLuint address, GLenum parameterName, GLint * params); +typedef void (APIENTRY *glGetVertexAttribfvNVPROC) (GLuint index, GLenum parameterName, GLfloat * params); +typedef void (APIENTRY *glGetVertexAttribdvNVPROC) (GLuint index, GLenum parameterName, GLdouble * params); +typedef void (APIENTRY *glGetVertexAttribivNVPROC) (GLuint index, GLenum parameterName, GLint * params); +typedef void (APIENTRY *glGetVertexAttribPointervNVPROC) (GLuint index, GLenum parameterName, GLvoid ** pointer); +typedef void (APIENTRY *glProgramParameter4fNVPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRY *glProgramParameter4dNVPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRY *glProgramParameters4fvNVPROC) (GLenum target, GLuint index, GLuint count, const GLfloat * params); +typedef void (APIENTRY *glProgramParameters4dvNVPROC) (GLenum target, GLuint index, GLuint count, const GLdouble * params); +typedef void (APIENTRY *glTrackMatrixNVPROC) (GLenum target, GLuint address, GLenum matrix, GLenum transform); +typedef void (APIENTRY *glVertexAttribPointerNVPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * buffer); +typedef void (APIENTRY *glVertexAttrib1sNVPROC) (GLuint index, GLshort x); +typedef void (APIENTRY *glVertexAttrib1fNVPROC) (GLuint index, GLfloat x); +typedef void (APIENTRY *glVertexAttrib1dNVPROC) (GLuint index, GLdouble x); +typedef void (APIENTRY *glVertexAttrib2sNVPROC) (GLuint index, GLshort x, GLshort y); +typedef void (APIENTRY *glVertexAttrib2fNVPROC) (GLuint index, GLfloat x, GLfloat y); +typedef void (APIENTRY *glVertexAttrib2dNVPROC) (GLuint index, GLdouble x, GLdouble y); +typedef void (APIENTRY *glVertexAttrib3sNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z); +typedef void (APIENTRY *glVertexAttrib3fNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); +typedef void (APIENTRY *glVertexAttrib3dNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z); +typedef void (APIENTRY *glVertexAttrib4sNVPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); +typedef void (APIENTRY *glVertexAttrib4fNVPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef void (APIENTRY *glVertexAttrib4dNVPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); +typedef void (APIENTRY *glVertexAttrib4ubNVPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); +typedef void (APIENTRY *glVertexAttribs1svNVPROC) (GLuint index, GLsizei n, const GLshort * v); +typedef void (APIENTRY *glVertexAttribs1fvNVPROC) (GLuint index, GLsizei n, const GLfloat * v); +typedef void (APIENTRY *glVertexAttribs1dvNVPROC) (GLuint index, GLsizei n, const GLdouble * v); +typedef void (APIENTRY *glVertexAttribs2svNVPROC) (GLuint index, GLsizei n, const GLshort * v); +typedef void (APIENTRY *glVertexAttribs2fvNVPROC) (GLuint index, GLsizei n, const GLfloat * v); +typedef void (APIENTRY *glVertexAttribs2dvNVPROC) (GLuint index, GLsizei n, const GLdouble * v); +typedef void (APIENTRY *glVertexAttribs3svNVPROC) (GLuint index, GLsizei n, const GLshort * v); +typedef void (APIENTRY *glVertexAttribs3fvNVPROC) (GLuint index, GLsizei n, const GLfloat * v); +typedef void (APIENTRY *glVertexAttribs3dvNVPROC) (GLuint index, GLsizei n, const GLdouble * v); +typedef void (APIENTRY *glVertexAttribs4svNVPROC) (GLuint index, GLsizei n, const GLshort * v); +typedef void (APIENTRY *glVertexAttribs4fvNVPROC) (GLuint index, GLsizei n, const GLfloat * v); +typedef void (APIENTRY *glVertexAttribs4dvNVPROC) (GLuint index, GLsizei n, const GLdouble * v); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglExecuteProgramNV(JNIEnv *env, jclass clazz, jint target, jint id, jlong params, jlong function_pointer) { + const GLfloat *params_address = (const GLfloat *)(intptr_t)params; + glExecuteProgramNVPROC glExecuteProgramNV = (glExecuteProgramNVPROC)((intptr_t)function_pointer); + glExecuteProgramNV(target, id, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglGetProgramParameterfvNV(JNIEnv *env, jclass clazz, jint target, jint index, jint parameterName, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetProgramParameterfvNVPROC glGetProgramParameterfvNV = (glGetProgramParameterfvNVPROC)((intptr_t)function_pointer); + glGetProgramParameterfvNV(target, index, parameterName, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglGetProgramParameterdvNV(JNIEnv *env, jclass clazz, jint target, jint index, jint parameterName, jlong params, jlong function_pointer) { + GLdouble *params_address = (GLdouble *)(intptr_t)params; + glGetProgramParameterdvNVPROC glGetProgramParameterdvNV = (glGetProgramParameterdvNVPROC)((intptr_t)function_pointer); + glGetProgramParameterdvNV(target, index, parameterName, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglGetTrackMatrixivNV(JNIEnv *env, jclass clazz, jint target, jint address, jint parameterName, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetTrackMatrixivNVPROC glGetTrackMatrixivNV = (glGetTrackMatrixivNVPROC)((intptr_t)function_pointer); + glGetTrackMatrixivNV(target, address, parameterName, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglGetVertexAttribfvNV(JNIEnv *env, jclass clazz, jint index, jint parameterName, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetVertexAttribfvNVPROC glGetVertexAttribfvNV = (glGetVertexAttribfvNVPROC)((intptr_t)function_pointer); + glGetVertexAttribfvNV(index, parameterName, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglGetVertexAttribdvNV(JNIEnv *env, jclass clazz, jint index, jint parameterName, jlong params, jlong function_pointer) { + GLdouble *params_address = (GLdouble *)(intptr_t)params; + glGetVertexAttribdvNVPROC glGetVertexAttribdvNV = (glGetVertexAttribdvNVPROC)((intptr_t)function_pointer); + glGetVertexAttribdvNV(index, parameterName, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglGetVertexAttribivNV(JNIEnv *env, jclass clazz, jint index, jint parameterName, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetVertexAttribivNVPROC glGetVertexAttribivNV = (glGetVertexAttribivNVPROC)((intptr_t)function_pointer); + glGetVertexAttribivNV(index, parameterName, params_address); +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglGetVertexAttribPointervNV(JNIEnv *env, jclass clazz, jint index, jint parameterName, jlong result_size, jlong function_pointer) { + glGetVertexAttribPointervNVPROC glGetVertexAttribPointervNV = (glGetVertexAttribPointervNVPROC)((intptr_t)function_pointer); + GLvoid * __result; + glGetVertexAttribPointervNV(index, parameterName, &__result); + return safeNewBuffer(env, __result, result_size); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglProgramParameter4fNV(JNIEnv *env, jclass clazz, jint target, jint index, jfloat x, jfloat y, jfloat z, jfloat w, jlong function_pointer) { + glProgramParameter4fNVPROC glProgramParameter4fNV = (glProgramParameter4fNVPROC)((intptr_t)function_pointer); + glProgramParameter4fNV(target, index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglProgramParameter4dNV(JNIEnv *env, jclass clazz, jint target, jint index, jdouble x, jdouble y, jdouble z, jdouble w, jlong function_pointer) { + glProgramParameter4dNVPROC glProgramParameter4dNV = (glProgramParameter4dNVPROC)((intptr_t)function_pointer); + glProgramParameter4dNV(target, index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglProgramParameters4fvNV(JNIEnv *env, jclass clazz, jint target, jint index, jint count, jlong params, jlong function_pointer) { + const GLfloat *params_address = (const GLfloat *)(intptr_t)params; + glProgramParameters4fvNVPROC glProgramParameters4fvNV = (glProgramParameters4fvNVPROC)((intptr_t)function_pointer); + glProgramParameters4fvNV(target, index, count, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglProgramParameters4dvNV(JNIEnv *env, jclass clazz, jint target, jint index, jint count, jlong params, jlong function_pointer) { + const GLdouble *params_address = (const GLdouble *)(intptr_t)params; + glProgramParameters4dvNVPROC glProgramParameters4dvNV = (glProgramParameters4dvNVPROC)((intptr_t)function_pointer); + glProgramParameters4dvNV(target, index, count, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglTrackMatrixNV(JNIEnv *env, jclass clazz, jint target, jint address, jint matrix, jint transform, jlong function_pointer) { + glTrackMatrixNVPROC glTrackMatrixNV = (glTrackMatrixNVPROC)((intptr_t)function_pointer); + glTrackMatrixNV(target, address, matrix, transform); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglVertexAttribPointerNV(JNIEnv *env, jclass clazz, jint index, jint size, jint type, jint stride, jlong buffer, jlong function_pointer) { + const GLvoid *buffer_address = (const GLvoid *)(intptr_t)buffer; + glVertexAttribPointerNVPROC glVertexAttribPointerNV = (glVertexAttribPointerNVPROC)((intptr_t)function_pointer); + glVertexAttribPointerNV(index, size, type, stride, buffer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglVertexAttribPointerNVBO(JNIEnv *env, jclass clazz, jint index, jint size, jint type, jint stride, jlong buffer_buffer_offset, jlong function_pointer) { + const GLvoid *buffer_address = (const GLvoid *)(intptr_t)offsetToPointer(buffer_buffer_offset); + glVertexAttribPointerNVPROC glVertexAttribPointerNV = (glVertexAttribPointerNVPROC)((intptr_t)function_pointer); + glVertexAttribPointerNV(index, size, type, stride, buffer_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglVertexAttrib1sNV(JNIEnv *env, jclass clazz, jint index, jshort x, jlong function_pointer) { + glVertexAttrib1sNVPROC glVertexAttrib1sNV = (glVertexAttrib1sNVPROC)((intptr_t)function_pointer); + glVertexAttrib1sNV(index, x); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglVertexAttrib1fNV(JNIEnv *env, jclass clazz, jint index, jfloat x, jlong function_pointer) { + glVertexAttrib1fNVPROC glVertexAttrib1fNV = (glVertexAttrib1fNVPROC)((intptr_t)function_pointer); + glVertexAttrib1fNV(index, x); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglVertexAttrib1dNV(JNIEnv *env, jclass clazz, jint index, jdouble x, jlong function_pointer) { + glVertexAttrib1dNVPROC glVertexAttrib1dNV = (glVertexAttrib1dNVPROC)((intptr_t)function_pointer); + glVertexAttrib1dNV(index, x); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglVertexAttrib2sNV(JNIEnv *env, jclass clazz, jint index, jshort x, jshort y, jlong function_pointer) { + glVertexAttrib2sNVPROC glVertexAttrib2sNV = (glVertexAttrib2sNVPROC)((intptr_t)function_pointer); + glVertexAttrib2sNV(index, x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglVertexAttrib2fNV(JNIEnv *env, jclass clazz, jint index, jfloat x, jfloat y, jlong function_pointer) { + glVertexAttrib2fNVPROC glVertexAttrib2fNV = (glVertexAttrib2fNVPROC)((intptr_t)function_pointer); + glVertexAttrib2fNV(index, x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglVertexAttrib2dNV(JNIEnv *env, jclass clazz, jint index, jdouble x, jdouble y, jlong function_pointer) { + glVertexAttrib2dNVPROC glVertexAttrib2dNV = (glVertexAttrib2dNVPROC)((intptr_t)function_pointer); + glVertexAttrib2dNV(index, x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglVertexAttrib3sNV(JNIEnv *env, jclass clazz, jint index, jshort x, jshort y, jshort z, jlong function_pointer) { + glVertexAttrib3sNVPROC glVertexAttrib3sNV = (glVertexAttrib3sNVPROC)((intptr_t)function_pointer); + glVertexAttrib3sNV(index, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglVertexAttrib3fNV(JNIEnv *env, jclass clazz, jint index, jfloat x, jfloat y, jfloat z, jlong function_pointer) { + glVertexAttrib3fNVPROC glVertexAttrib3fNV = (glVertexAttrib3fNVPROC)((intptr_t)function_pointer); + glVertexAttrib3fNV(index, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglVertexAttrib3dNV(JNIEnv *env, jclass clazz, jint index, jdouble x, jdouble y, jdouble z, jlong function_pointer) { + glVertexAttrib3dNVPROC glVertexAttrib3dNV = (glVertexAttrib3dNVPROC)((intptr_t)function_pointer); + glVertexAttrib3dNV(index, x, y, z); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglVertexAttrib4sNV(JNIEnv *env, jclass clazz, jint index, jshort x, jshort y, jshort z, jshort w, jlong function_pointer) { + glVertexAttrib4sNVPROC glVertexAttrib4sNV = (glVertexAttrib4sNVPROC)((intptr_t)function_pointer); + glVertexAttrib4sNV(index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglVertexAttrib4fNV(JNIEnv *env, jclass clazz, jint index, jfloat x, jfloat y, jfloat z, jfloat w, jlong function_pointer) { + glVertexAttrib4fNVPROC glVertexAttrib4fNV = (glVertexAttrib4fNVPROC)((intptr_t)function_pointer); + glVertexAttrib4fNV(index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglVertexAttrib4dNV(JNIEnv *env, jclass clazz, jint index, jdouble x, jdouble y, jdouble z, jdouble w, jlong function_pointer) { + glVertexAttrib4dNVPROC glVertexAttrib4dNV = (glVertexAttrib4dNVPROC)((intptr_t)function_pointer); + glVertexAttrib4dNV(index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglVertexAttrib4ubNV(JNIEnv *env, jclass clazz, jint index, jbyte x, jbyte y, jbyte z, jbyte w, jlong function_pointer) { + glVertexAttrib4ubNVPROC glVertexAttrib4ubNV = (glVertexAttrib4ubNVPROC)((intptr_t)function_pointer); + glVertexAttrib4ubNV(index, x, y, z, w); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglVertexAttribs1svNV(JNIEnv *env, jclass clazz, jint index, jint n, jlong v, jlong function_pointer) { + const GLshort *v_address = (const GLshort *)(intptr_t)v; + glVertexAttribs1svNVPROC glVertexAttribs1svNV = (glVertexAttribs1svNVPROC)((intptr_t)function_pointer); + glVertexAttribs1svNV(index, n, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglVertexAttribs1fvNV(JNIEnv *env, jclass clazz, jint index, jint n, jlong v, jlong function_pointer) { + const GLfloat *v_address = (const GLfloat *)(intptr_t)v; + glVertexAttribs1fvNVPROC glVertexAttribs1fvNV = (glVertexAttribs1fvNVPROC)((intptr_t)function_pointer); + glVertexAttribs1fvNV(index, n, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglVertexAttribs1dvNV(JNIEnv *env, jclass clazz, jint index, jint n, jlong v, jlong function_pointer) { + const GLdouble *v_address = (const GLdouble *)(intptr_t)v; + glVertexAttribs1dvNVPROC glVertexAttribs1dvNV = (glVertexAttribs1dvNVPROC)((intptr_t)function_pointer); + glVertexAttribs1dvNV(index, n, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglVertexAttribs2svNV(JNIEnv *env, jclass clazz, jint index, jint n, jlong v, jlong function_pointer) { + const GLshort *v_address = (const GLshort *)(intptr_t)v; + glVertexAttribs2svNVPROC glVertexAttribs2svNV = (glVertexAttribs2svNVPROC)((intptr_t)function_pointer); + glVertexAttribs2svNV(index, n, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglVertexAttribs2fvNV(JNIEnv *env, jclass clazz, jint index, jint n, jlong v, jlong function_pointer) { + const GLfloat *v_address = (const GLfloat *)(intptr_t)v; + glVertexAttribs2fvNVPROC glVertexAttribs2fvNV = (glVertexAttribs2fvNVPROC)((intptr_t)function_pointer); + glVertexAttribs2fvNV(index, n, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglVertexAttribs2dvNV(JNIEnv *env, jclass clazz, jint index, jint n, jlong v, jlong function_pointer) { + const GLdouble *v_address = (const GLdouble *)(intptr_t)v; + glVertexAttribs2dvNVPROC glVertexAttribs2dvNV = (glVertexAttribs2dvNVPROC)((intptr_t)function_pointer); + glVertexAttribs2dvNV(index, n, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglVertexAttribs3svNV(JNIEnv *env, jclass clazz, jint index, jint n, jlong v, jlong function_pointer) { + const GLshort *v_address = (const GLshort *)(intptr_t)v; + glVertexAttribs3svNVPROC glVertexAttribs3svNV = (glVertexAttribs3svNVPROC)((intptr_t)function_pointer); + glVertexAttribs3svNV(index, n, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglVertexAttribs3fvNV(JNIEnv *env, jclass clazz, jint index, jint n, jlong v, jlong function_pointer) { + const GLfloat *v_address = (const GLfloat *)(intptr_t)v; + glVertexAttribs3fvNVPROC glVertexAttribs3fvNV = (glVertexAttribs3fvNVPROC)((intptr_t)function_pointer); + glVertexAttribs3fvNV(index, n, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglVertexAttribs3dvNV(JNIEnv *env, jclass clazz, jint index, jint n, jlong v, jlong function_pointer) { + const GLdouble *v_address = (const GLdouble *)(intptr_t)v; + glVertexAttribs3dvNVPROC glVertexAttribs3dvNV = (glVertexAttribs3dvNVPROC)((intptr_t)function_pointer); + glVertexAttribs3dvNV(index, n, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglVertexAttribs4svNV(JNIEnv *env, jclass clazz, jint index, jint n, jlong v, jlong function_pointer) { + const GLshort *v_address = (const GLshort *)(intptr_t)v; + glVertexAttribs4svNVPROC glVertexAttribs4svNV = (glVertexAttribs4svNVPROC)((intptr_t)function_pointer); + glVertexAttribs4svNV(index, n, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglVertexAttribs4fvNV(JNIEnv *env, jclass clazz, jint index, jint n, jlong v, jlong function_pointer) { + const GLfloat *v_address = (const GLfloat *)(intptr_t)v; + glVertexAttribs4fvNVPROC glVertexAttribs4fvNV = (glVertexAttribs4fvNVPROC)((intptr_t)function_pointer); + glVertexAttribs4fvNV(index, n, v_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVertexProgram_nglVertexAttribs4dvNV(JNIEnv *env, jclass clazz, jint index, jint n, jlong v, jlong function_pointer) { + const GLdouble *v_address = (const GLdouble *)(intptr_t)v; + glVertexAttribs4dvNVPROC glVertexAttribs4dvNV = (glVertexAttribs4dvNVPROC)((intptr_t)function_pointer); + glVertexAttribs4dvNV(index, n, v_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVVideoCapture.c b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVVideoCapture.c new file mode 100644 index 0000000..1fd9d51 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengl/org_lwjgl_opengl_NVVideoCapture.c @@ -0,0 +1,88 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef void (APIENTRY *glBeginVideoCaptureNVPROC) (GLuint video_capture_slot); +typedef void (APIENTRY *glBindVideoCaptureStreamBufferNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLintptrARB offset); +typedef void (APIENTRY *glBindVideoCaptureStreamTextureNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum frame_region, GLenum target, GLuint texture); +typedef void (APIENTRY *glEndVideoCaptureNVPROC) (GLuint video_capture_slot); +typedef void (APIENTRY *glGetVideoCaptureivNVPROC) (GLuint video_capture_slot, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetVideoCaptureStreamivNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLint * params); +typedef void (APIENTRY *glGetVideoCaptureStreamfvNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLfloat * params); +typedef void (APIENTRY *glGetVideoCaptureStreamdvNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, GLdouble * params); +typedef GLenum (APIENTRY *glVideoCaptureNVPROC) (GLuint video_capture_slot, GLuint * sequence_num, GLuint64EXT * capture_time); +typedef void (APIENTRY *glVideoCaptureStreamParameterivNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLint * params); +typedef void (APIENTRY *glVideoCaptureStreamParameterfvNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLfloat * params); +typedef void (APIENTRY *glVideoCaptureStreamParameterdvNVPROC) (GLuint video_capture_slot, GLuint stream, GLenum pname, const GLdouble * params); + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVideoCapture_nglBeginVideoCaptureNV(JNIEnv *env, jclass clazz, jint video_capture_slot, jlong function_pointer) { + glBeginVideoCaptureNVPROC glBeginVideoCaptureNV = (glBeginVideoCaptureNVPROC)((intptr_t)function_pointer); + glBeginVideoCaptureNV(video_capture_slot); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVideoCapture_nglBindVideoCaptureStreamBufferNV(JNIEnv *env, jclass clazz, jint video_capture_slot, jint stream, jint frame_region, jlong offset, jlong function_pointer) { + glBindVideoCaptureStreamBufferNVPROC glBindVideoCaptureStreamBufferNV = (glBindVideoCaptureStreamBufferNVPROC)((intptr_t)function_pointer); + glBindVideoCaptureStreamBufferNV(video_capture_slot, stream, frame_region, offset); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVideoCapture_nglBindVideoCaptureStreamTextureNV(JNIEnv *env, jclass clazz, jint video_capture_slot, jint stream, jint frame_region, jint target, jint texture, jlong function_pointer) { + glBindVideoCaptureStreamTextureNVPROC glBindVideoCaptureStreamTextureNV = (glBindVideoCaptureStreamTextureNVPROC)((intptr_t)function_pointer); + glBindVideoCaptureStreamTextureNV(video_capture_slot, stream, frame_region, target, texture); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVideoCapture_nglEndVideoCaptureNV(JNIEnv *env, jclass clazz, jint video_capture_slot, jlong function_pointer) { + glEndVideoCaptureNVPROC glEndVideoCaptureNV = (glEndVideoCaptureNVPROC)((intptr_t)function_pointer); + glEndVideoCaptureNV(video_capture_slot); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVideoCapture_nglGetVideoCaptureivNV(JNIEnv *env, jclass clazz, jint video_capture_slot, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetVideoCaptureivNVPROC glGetVideoCaptureivNV = (glGetVideoCaptureivNVPROC)((intptr_t)function_pointer); + glGetVideoCaptureivNV(video_capture_slot, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVideoCapture_nglGetVideoCaptureStreamivNV(JNIEnv *env, jclass clazz, jint video_capture_slot, jint stream, jint pname, jlong params, jlong function_pointer) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetVideoCaptureStreamivNVPROC glGetVideoCaptureStreamivNV = (glGetVideoCaptureStreamivNVPROC)((intptr_t)function_pointer); + glGetVideoCaptureStreamivNV(video_capture_slot, stream, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVideoCapture_nglGetVideoCaptureStreamfvNV(JNIEnv *env, jclass clazz, jint video_capture_slot, jint stream, jint pname, jlong params, jlong function_pointer) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetVideoCaptureStreamfvNVPROC glGetVideoCaptureStreamfvNV = (glGetVideoCaptureStreamfvNVPROC)((intptr_t)function_pointer); + glGetVideoCaptureStreamfvNV(video_capture_slot, stream, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVideoCapture_nglGetVideoCaptureStreamdvNV(JNIEnv *env, jclass clazz, jint video_capture_slot, jint stream, jint pname, jlong params, jlong function_pointer) { + GLdouble *params_address = (GLdouble *)(intptr_t)params; + glGetVideoCaptureStreamdvNVPROC glGetVideoCaptureStreamdvNV = (glGetVideoCaptureStreamdvNVPROC)((intptr_t)function_pointer); + glGetVideoCaptureStreamdvNV(video_capture_slot, stream, pname, params_address); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_NVVideoCapture_nglVideoCaptureNV(JNIEnv *env, jclass clazz, jint video_capture_slot, jlong sequence_num, jlong capture_time, jlong function_pointer) { + GLuint *sequence_num_address = (GLuint *)(intptr_t)sequence_num; + GLuint64EXT *capture_time_address = (GLuint64EXT *)(intptr_t)capture_time; + glVideoCaptureNVPROC glVideoCaptureNV = (glVideoCaptureNVPROC)((intptr_t)function_pointer); + GLenum __result = glVideoCaptureNV(video_capture_slot, sequence_num_address, capture_time_address); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVideoCapture_nglVideoCaptureStreamParameterivNV(JNIEnv *env, jclass clazz, jint video_capture_slot, jint stream, jint pname, jlong params, jlong function_pointer) { + const GLint *params_address = (const GLint *)(intptr_t)params; + glVideoCaptureStreamParameterivNVPROC glVideoCaptureStreamParameterivNV = (glVideoCaptureStreamParameterivNVPROC)((intptr_t)function_pointer); + glVideoCaptureStreamParameterivNV(video_capture_slot, stream, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVideoCapture_nglVideoCaptureStreamParameterfvNV(JNIEnv *env, jclass clazz, jint video_capture_slot, jint stream, jint pname, jlong params, jlong function_pointer) { + const GLfloat *params_address = (const GLfloat *)(intptr_t)params; + glVideoCaptureStreamParameterfvNVPROC glVideoCaptureStreamParameterfvNV = (glVideoCaptureStreamParameterfvNVPROC)((intptr_t)function_pointer); + glVideoCaptureStreamParameterfvNV(video_capture_slot, stream, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_NVVideoCapture_nglVideoCaptureStreamParameterdvNV(JNIEnv *env, jclass clazz, jint video_capture_slot, jint stream, jint pname, jlong params, jlong function_pointer) { + const GLdouble *params_address = (const GLdouble *)(intptr_t)params; + glVideoCaptureStreamParameterdvNVPROC glVideoCaptureStreamParameterdvNV = (glVideoCaptureStreamParameterdvNVPROC)((intptr_t)function_pointer); + glVideoCaptureStreamParameterdvNV(video_capture_slot, stream, pname, params_address); +} + diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_AMDPerformanceMonitor.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_AMDPerformanceMonitor.c new file mode 100644 index 0000000..af3b404 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_AMDPerformanceMonitor.c @@ -0,0 +1,106 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glGetPerfMonitorGroupsAMDPROC) (GLint * numGroups, GLsizei groupsSize, GLuint * groups); +typedef GL_APICALL void (GL_APIENTRY *glGetPerfMonitorCountersAMDPROC) (GLuint group, GLint * numCounters, GLint * maxActiveCounters, GLsizei countersSize, GLuint * counters); +typedef GL_APICALL void (GL_APIENTRY *glGetPerfMonitorGroupStringAMDPROC) (GLuint group, GLsizei bufSize, GLsizei * length, GLchar * groupString); +typedef GL_APICALL void (GL_APIENTRY *glGetPerfMonitorCounterStringAMDPROC) (GLuint group, GLuint counter, GLsizei bufSize, GLsizei * length, GLchar * counterString); +typedef GL_APICALL void (GL_APIENTRY *glGetPerfMonitorCounterInfoAMDPROC) (GLuint group, GLuint counter, GLenum pname, GLvoid * data); +typedef GL_APICALL void (GL_APIENTRY *glGenPerfMonitorsAMDPROC) (GLsizei n, GLuint * monitors); +typedef GL_APICALL void (GL_APIENTRY *glDeletePerfMonitorsAMDPROC) (GLsizei n, GLuint * monitors); +typedef GL_APICALL void (GL_APIENTRY *glSelectPerfMonitorCountersAMDPROC) (GLuint monitor, GLboolean enable, GLuint group, GLint numCounters, GLuint * counterList); +typedef GL_APICALL void (GL_APIENTRY *glBeginPerfMonitorAMDPROC) (GLuint monitor); +typedef GL_APICALL void (GL_APIENTRY *glEndPerfMonitorAMDPROC) (GLuint monitor); +typedef GL_APICALL void (GL_APIENTRY *glGetPerfMonitorCounterDataAMDPROC) (GLuint monitor, GLenum pname, GLsizei dataSize, GLuint * data, GLint * bytesWritten); + +static glGetPerfMonitorGroupsAMDPROC glGetPerfMonitorGroupsAMD; +static glGetPerfMonitorCountersAMDPROC glGetPerfMonitorCountersAMD; +static glGetPerfMonitorGroupStringAMDPROC glGetPerfMonitorGroupStringAMD; +static glGetPerfMonitorCounterStringAMDPROC glGetPerfMonitorCounterStringAMD; +static glGetPerfMonitorCounterInfoAMDPROC glGetPerfMonitorCounterInfoAMD; +static glGenPerfMonitorsAMDPROC glGenPerfMonitorsAMD; +static glDeletePerfMonitorsAMDPROC glDeletePerfMonitorsAMD; +static glSelectPerfMonitorCountersAMDPROC glSelectPerfMonitorCountersAMD; +static glBeginPerfMonitorAMDPROC glBeginPerfMonitorAMD; +static glEndPerfMonitorAMDPROC glEndPerfMonitorAMD; +static glGetPerfMonitorCounterDataAMDPROC glGetPerfMonitorCounterDataAMD; + +static void JNICALL Java_org_lwjgl_opengles_AMDPerformanceMonitor_nglGetPerfMonitorGroupsAMD(JNIEnv *env, jclass clazz, jlong numGroups, jint groupsSize, jlong groups) { + GLint *numGroups_address = (GLint *)(intptr_t)numGroups; + GLuint *groups_address = (GLuint *)(intptr_t)groups; + glGetPerfMonitorGroupsAMD(numGroups_address, groupsSize, groups_address); +} + +static void JNICALL Java_org_lwjgl_opengles_AMDPerformanceMonitor_nglGetPerfMonitorCountersAMD(JNIEnv *env, jclass clazz, jint group, jlong numCounters, jlong maxActiveCounters, jint countersSize, jlong counters) { + GLint *numCounters_address = (GLint *)(intptr_t)numCounters; + GLint *maxActiveCounters_address = (GLint *)(intptr_t)maxActiveCounters; + GLuint *counters_address = (GLuint *)(intptr_t)counters; + glGetPerfMonitorCountersAMD(group, numCounters_address, maxActiveCounters_address, countersSize, counters_address); +} + +static void JNICALL Java_org_lwjgl_opengles_AMDPerformanceMonitor_nglGetPerfMonitorGroupStringAMD(JNIEnv *env, jclass clazz, jint group, jint bufSize, jlong length, jlong groupString) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLchar *groupString_address = (GLchar *)(intptr_t)groupString; + glGetPerfMonitorGroupStringAMD(group, bufSize, length_address, groupString_address); +} + +static void JNICALL Java_org_lwjgl_opengles_AMDPerformanceMonitor_nglGetPerfMonitorCounterStringAMD(JNIEnv *env, jclass clazz, jint group, jint counter, jint bufSize, jlong length, jlong counterString) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLchar *counterString_address = (GLchar *)(intptr_t)counterString; + glGetPerfMonitorCounterStringAMD(group, counter, bufSize, length_address, counterString_address); +} + +static void JNICALL Java_org_lwjgl_opengles_AMDPerformanceMonitor_nglGetPerfMonitorCounterInfoAMD(JNIEnv *env, jclass clazz, jint group, jint counter, jint pname, jlong data) { + GLvoid *data_address = (GLvoid *)(intptr_t)data; + glGetPerfMonitorCounterInfoAMD(group, counter, pname, data_address); +} + +static void JNICALL Java_org_lwjgl_opengles_AMDPerformanceMonitor_nglGenPerfMonitorsAMD(JNIEnv *env, jclass clazz, jint n, jlong monitors) { + GLuint *monitors_address = (GLuint *)(intptr_t)monitors; + glGenPerfMonitorsAMD(n, monitors_address); +} + +static void JNICALL Java_org_lwjgl_opengles_AMDPerformanceMonitor_nglDeletePerfMonitorsAMD(JNIEnv *env, jclass clazz, jint n, jlong monitors) { + GLuint *monitors_address = (GLuint *)(intptr_t)monitors; + glDeletePerfMonitorsAMD(n, monitors_address); +} + +static void JNICALL Java_org_lwjgl_opengles_AMDPerformanceMonitor_nglSelectPerfMonitorCountersAMD(JNIEnv *env, jclass clazz, jint monitor, jboolean enable, jint group, jint numCounters, jlong counterList) { + GLuint *counterList_address = (GLuint *)(intptr_t)counterList; + glSelectPerfMonitorCountersAMD(monitor, enable, group, numCounters, counterList_address); +} + +static void JNICALL Java_org_lwjgl_opengles_AMDPerformanceMonitor_nglBeginPerfMonitorAMD(JNIEnv *env, jclass clazz, jint monitor) { + glBeginPerfMonitorAMD(monitor); +} + +static void JNICALL Java_org_lwjgl_opengles_AMDPerformanceMonitor_nglEndPerfMonitorAMD(JNIEnv *env, jclass clazz, jint monitor) { + glEndPerfMonitorAMD(monitor); +} + +static void JNICALL Java_org_lwjgl_opengles_AMDPerformanceMonitor_nglGetPerfMonitorCounterDataAMD(JNIEnv *env, jclass clazz, jint monitor, jint pname, jint dataSize, jlong data, jlong bytesWritten) { + GLuint *data_address = (GLuint *)(intptr_t)data; + GLint *bytesWritten_address = (GLint *)(intptr_t)bytesWritten; + glGetPerfMonitorCounterDataAMD(monitor, pname, dataSize, data_address, bytesWritten_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_AMDPerformanceMonitor_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglGetPerfMonitorGroupsAMD", "(JIJ)V", (void *)&Java_org_lwjgl_opengles_AMDPerformanceMonitor_nglGetPerfMonitorGroupsAMD, "glGetPerfMonitorGroupsAMD", (void *)&glGetPerfMonitorGroupsAMD, false}, + {"nglGetPerfMonitorCountersAMD", "(IJJIJ)V", (void *)&Java_org_lwjgl_opengles_AMDPerformanceMonitor_nglGetPerfMonitorCountersAMD, "glGetPerfMonitorCountersAMD", (void *)&glGetPerfMonitorCountersAMD, false}, + {"nglGetPerfMonitorGroupStringAMD", "(IIJJ)V", (void *)&Java_org_lwjgl_opengles_AMDPerformanceMonitor_nglGetPerfMonitorGroupStringAMD, "glGetPerfMonitorGroupStringAMD", (void *)&glGetPerfMonitorGroupStringAMD, false}, + {"nglGetPerfMonitorCounterStringAMD", "(IIIJJ)V", (void *)&Java_org_lwjgl_opengles_AMDPerformanceMonitor_nglGetPerfMonitorCounterStringAMD, "glGetPerfMonitorCounterStringAMD", (void *)&glGetPerfMonitorCounterStringAMD, false}, + {"nglGetPerfMonitorCounterInfoAMD", "(IIIJ)V", (void *)&Java_org_lwjgl_opengles_AMDPerformanceMonitor_nglGetPerfMonitorCounterInfoAMD, "glGetPerfMonitorCounterInfoAMD", (void *)&glGetPerfMonitorCounterInfoAMD, false}, + {"nglGenPerfMonitorsAMD", "(IJ)V", (void *)&Java_org_lwjgl_opengles_AMDPerformanceMonitor_nglGenPerfMonitorsAMD, "glGenPerfMonitorsAMD", (void *)&glGenPerfMonitorsAMD, false}, + {"nglDeletePerfMonitorsAMD", "(IJ)V", (void *)&Java_org_lwjgl_opengles_AMDPerformanceMonitor_nglDeletePerfMonitorsAMD, "glDeletePerfMonitorsAMD", (void *)&glDeletePerfMonitorsAMD, false}, + {"nglSelectPerfMonitorCountersAMD", "(IZIIJ)V", (void *)&Java_org_lwjgl_opengles_AMDPerformanceMonitor_nglSelectPerfMonitorCountersAMD, "glSelectPerfMonitorCountersAMD", (void *)&glSelectPerfMonitorCountersAMD, false}, + {"nglBeginPerfMonitorAMD", "(I)V", (void *)&Java_org_lwjgl_opengles_AMDPerformanceMonitor_nglBeginPerfMonitorAMD, "glBeginPerfMonitorAMD", (void *)&glBeginPerfMonitorAMD, false}, + {"nglEndPerfMonitorAMD", "(I)V", (void *)&Java_org_lwjgl_opengles_AMDPerformanceMonitor_nglEndPerfMonitorAMD, "glEndPerfMonitorAMD", (void *)&glEndPerfMonitorAMD, false}, + {"nglGetPerfMonitorCounterDataAMD", "(IIIJJ)V", (void *)&Java_org_lwjgl_opengles_AMDPerformanceMonitor_nglGetPerfMonitorCounterDataAMD, "glGetPerfMonitorCounterDataAMD", (void *)&glGetPerfMonitorCounterDataAMD, false}, + + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_ANGLEFramebufferBlit.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_ANGLEFramebufferBlit.c new file mode 100644 index 0000000..c46b89b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_ANGLEFramebufferBlit.c @@ -0,0 +1,20 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glBlitFramebufferANGLEPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); + +static glBlitFramebufferANGLEPROC glBlitFramebufferANGLE; + +static void JNICALL Java_org_lwjgl_opengles_ANGLEFramebufferBlit_nglBlitFramebufferANGLE(JNIEnv *env, jclass clazz, jint srcX0, jint srcY0, jint srcX1, jint srcY1, jint dstX0, jint dstY0, jint dstX1, jint dstY1, jint mask, jint filter) { + glBlitFramebufferANGLE(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_ANGLEFramebufferBlit_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglBlitFramebufferANGLE", "(IIIIIIIIII)V", (void *)&Java_org_lwjgl_opengles_ANGLEFramebufferBlit_nglBlitFramebufferANGLE, "glBlitFramebufferANGLE", (void *)&glBlitFramebufferANGLE, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_ANGLEFramebufferMultisample.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_ANGLEFramebufferMultisample.c new file mode 100644 index 0000000..f520d79 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_ANGLEFramebufferMultisample.c @@ -0,0 +1,20 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glRenderbufferStorageMultisampleANGLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); + +static glRenderbufferStorageMultisampleANGLEPROC glRenderbufferStorageMultisampleANGLE; + +static void JNICALL Java_org_lwjgl_opengles_ANGLEFramebufferMultisample_nglRenderbufferStorageMultisampleANGLE(JNIEnv *env, jclass clazz, jint target, jint samples, jint internalformat, jint width, jint height) { + glRenderbufferStorageMultisampleANGLE(target, samples, internalformat, width, height); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_ANGLEFramebufferMultisample_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglRenderbufferStorageMultisampleANGLE", "(IIIII)V", (void *)&Java_org_lwjgl_opengles_ANGLEFramebufferMultisample_nglRenderbufferStorageMultisampleANGLE, "glRenderbufferStorageMultisampleANGLE", (void *)&glRenderbufferStorageMultisampleANGLE, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_APPLEFramebufferMultisample.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_APPLEFramebufferMultisample.c new file mode 100644 index 0000000..669b8be --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_APPLEFramebufferMultisample.c @@ -0,0 +1,27 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glRenderbufferStorageMultisampleAPPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef GL_APICALL void (GL_APIENTRY *glResolveMultisampleFramebufferAPPLEPROC) (); + +static glRenderbufferStorageMultisampleAPPLEPROC glRenderbufferStorageMultisampleAPPLE; +static glResolveMultisampleFramebufferAPPLEPROC glResolveMultisampleFramebufferAPPLE; + +static void JNICALL Java_org_lwjgl_opengles_APPLEFramebufferMultisample_nglRenderbufferStorageMultisampleAPPLE(JNIEnv *env, jclass clazz, jint target, jint samples, jint internalformat, jint width, jint height) { + glRenderbufferStorageMultisampleAPPLE(target, samples, internalformat, width, height); +} + +static void JNICALL Java_org_lwjgl_opengles_APPLEFramebufferMultisample_nglResolveMultisampleFramebufferAPPLE(JNIEnv *env, jclass clazz) { + glResolveMultisampleFramebufferAPPLE(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_APPLEFramebufferMultisample_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglRenderbufferStorageMultisampleAPPLE", "(IIIII)V", (void *)&Java_org_lwjgl_opengles_APPLEFramebufferMultisample_nglRenderbufferStorageMultisampleAPPLE, "glRenderbufferStorageMultisampleAPPLE", (void *)&glRenderbufferStorageMultisampleAPPLE, false}, + {"nglResolveMultisampleFramebufferAPPLE", "()V", (void *)&Java_org_lwjgl_opengles_APPLEFramebufferMultisample_nglResolveMultisampleFramebufferAPPLE, "glResolveMultisampleFramebufferAPPLE", (void *)&glResolveMultisampleFramebufferAPPLE, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_APPLESync.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_APPLESync.c new file mode 100644 index 0000000..040bf03 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_APPLESync.c @@ -0,0 +1,69 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL GLsync (GL_APIENTRY *glFenceSyncAPPLEPROC) (GLenum condition, GLbitfield flags); +typedef GL_APICALL GLboolean (GL_APIENTRY *glIsSyncAPPLEPROC) (GLsync sync); +typedef GL_APICALL void (GL_APIENTRY *glDeleteSyncAPPLEPROC) (GLsync sync); +typedef GL_APICALL GLenum (GL_APIENTRY *glClientWaitSyncAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef GL_APICALL void (GL_APIENTRY *glWaitSyncAPPLEPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef GL_APICALL void (GL_APIENTRY *glGetInteger64vAPPLEPROC) (GLenum pname, GLint64 * params); +typedef GL_APICALL void (GL_APIENTRY *glGetSyncivAPPLEPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * values); + +static glFenceSyncAPPLEPROC glFenceSyncAPPLE; +static glIsSyncAPPLEPROC glIsSyncAPPLE; +static glDeleteSyncAPPLEPROC glDeleteSyncAPPLE; +static glClientWaitSyncAPPLEPROC glClientWaitSyncAPPLE; +static glWaitSyncAPPLEPROC glWaitSyncAPPLE; +static glGetInteger64vAPPLEPROC glGetInteger64vAPPLE; +static glGetSyncivAPPLEPROC glGetSyncivAPPLE; + +static jlong JNICALL Java_org_lwjgl_opengles_APPLESync_nglFenceSyncAPPLE(JNIEnv *env, jclass clazz, jint condition, jint flags) { + GLsync __result = glFenceSyncAPPLE(condition, flags); + return (intptr_t)__result; +} + +static jboolean JNICALL Java_org_lwjgl_opengles_APPLESync_nglIsSyncAPPLE(JNIEnv *env, jclass clazz, jlong sync) { + GLboolean __result = glIsSyncAPPLE((GLsync)(intptr_t)sync); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_APPLESync_nglDeleteSyncAPPLE(JNIEnv *env, jclass clazz, jlong sync) { + glDeleteSyncAPPLE((GLsync)(intptr_t)sync); +} + +static jint JNICALL Java_org_lwjgl_opengles_APPLESync_nglClientWaitSyncAPPLE(JNIEnv *env, jclass clazz, jlong sync, jint flags, jlong timeout) { + GLenum __result = glClientWaitSyncAPPLE((GLsync)(intptr_t)sync, flags, timeout); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_APPLESync_nglWaitSyncAPPLE(JNIEnv *env, jclass clazz, jlong sync, jint flags, jlong timeout) { + glWaitSyncAPPLE((GLsync)(intptr_t)sync, flags, timeout); +} + +static void JNICALL Java_org_lwjgl_opengles_APPLESync_nglGetInteger64vAPPLE(JNIEnv *env, jclass clazz, jint pname, jlong params) { + GLint64 *params_address = (GLint64 *)(intptr_t)params; + glGetInteger64vAPPLE(pname, params_address); +} + +static void JNICALL Java_org_lwjgl_opengles_APPLESync_nglGetSyncivAPPLE(JNIEnv *env, jclass clazz, jlong sync, jint pname, jint bufSize, jlong length, jlong values) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLint *values_address = (GLint *)(intptr_t)values; + glGetSyncivAPPLE((GLsync)(intptr_t)sync, pname, bufSize, length_address, values_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_APPLESync_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglFenceSyncAPPLE", "(II)J", (void *)&Java_org_lwjgl_opengles_APPLESync_nglFenceSyncAPPLE, "glFenceSyncAPPLE", (void *)&glFenceSyncAPPLE, false}, + {"nglIsSyncAPPLE", "(J)Z", (void *)&Java_org_lwjgl_opengles_APPLESync_nglIsSyncAPPLE, "glIsSyncAPPLE", (void *)&glIsSyncAPPLE, false}, + {"nglDeleteSyncAPPLE", "(J)V", (void *)&Java_org_lwjgl_opengles_APPLESync_nglDeleteSyncAPPLE, "glDeleteSyncAPPLE", (void *)&glDeleteSyncAPPLE, false}, + {"nglClientWaitSyncAPPLE", "(JIJ)I", (void *)&Java_org_lwjgl_opengles_APPLESync_nglClientWaitSyncAPPLE, "glClientWaitSyncAPPLE", (void *)&glClientWaitSyncAPPLE, false}, + {"nglWaitSyncAPPLE", "(JIJ)V", (void *)&Java_org_lwjgl_opengles_APPLESync_nglWaitSyncAPPLE, "glWaitSyncAPPLE", (void *)&glWaitSyncAPPLE, false}, + {"nglGetInteger64vAPPLE", "(IJ)V", (void *)&Java_org_lwjgl_opengles_APPLESync_nglGetInteger64vAPPLE, "glGetInteger64vAPPLE", (void *)&glGetInteger64vAPPLE, false}, + {"nglGetSyncivAPPLE", "(JIIJJ)V", (void *)&Java_org_lwjgl_opengles_APPLESync_nglGetSyncivAPPLE, "glGetSyncivAPPLE", (void *)&glGetSyncivAPPLE, false}, + + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_ARBDrawBuffers.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_ARBDrawBuffers.c new file mode 100644 index 0000000..dbff863 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_ARBDrawBuffers.c @@ -0,0 +1,22 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glDrawBuffersARBPROC) (GLsizei size, const GLenum * buffers); + +static glDrawBuffersARBPROC glDrawBuffersARB; + +static void JNICALL Java_org_lwjgl_opengles_ARBDrawBuffers_nglDrawBuffersARB(JNIEnv *env, jclass clazz, jint size, jlong buffers) { + const GLenum *buffers_address = (const GLenum *)(intptr_t)buffers; + glDrawBuffersARB(size, buffers_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_ARBDrawBuffers_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglDrawBuffersARB", "(IJ)V", (void *)&Java_org_lwjgl_opengles_ARBDrawBuffers_nglDrawBuffersARB, "glDrawBuffersARB", (void *)&glDrawBuffersARB, false}, + + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTBlendMinmax.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTBlendMinmax.c new file mode 100644 index 0000000..12b7fe5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTBlendMinmax.c @@ -0,0 +1,20 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glBlendEquationEXTPROC) (GLenum mode); + +static glBlendEquationEXTPROC glBlendEquationEXT; + +static void JNICALL Java_org_lwjgl_opengles_EXTBlendMinmax_nglBlendEquationEXT(JNIEnv *env, jclass clazz, jint mode) { + glBlendEquationEXT(mode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_EXTBlendMinmax_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglBlendEquationEXT", "(I)V", (void *)&Java_org_lwjgl_opengles_EXTBlendMinmax_nglBlendEquationEXT, "glBlendEquationEXT", (void *)&glBlendEquationEXT, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTCopyTextureLevels.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTCopyTextureLevels.c new file mode 100644 index 0000000..9e7ca38 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTCopyTextureLevels.c @@ -0,0 +1,20 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glCopyTextureLevelsAPPLEPROC) (GLuint destinationTexture, GLuint sourceTexture, GLint sourceBaseLevel, GLsizei sourceLevelCount); + +static glCopyTextureLevelsAPPLEPROC glCopyTextureLevelsAPPLE; + +static void JNICALL Java_org_lwjgl_opengles_EXTCopyTextureLevels_nglCopyTextureLevelsAPPLE(JNIEnv *env, jclass clazz, jint destinationTexture, jint sourceTexture, jint sourceBaseLevel, jint sourceLevelCount) { + glCopyTextureLevelsAPPLE(destinationTexture, sourceTexture, sourceBaseLevel, sourceLevelCount); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_EXTCopyTextureLevels_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglCopyTextureLevelsAPPLE", "(IIII)V", (void *)&Java_org_lwjgl_opengles_EXTCopyTextureLevels_nglCopyTextureLevelsAPPLE, "glCopyTextureLevelsAPPLE", (void *)&glCopyTextureLevelsAPPLE, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTDebugLabel.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTDebugLabel.c new file mode 100644 index 0000000..208e69e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTDebugLabel.c @@ -0,0 +1,31 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glLabelObjectEXTPROC) (GLenum type, GLuint object, GLsizei length, const GLchar * label); +typedef GL_APICALL void (GL_APIENTRY *glGetObjectLabelEXTPROC) (GLenum type, GLuint object, GLsizei bufSize, GLsizei * length, GLchar * label); + +static glLabelObjectEXTPROC glLabelObjectEXT; +static glGetObjectLabelEXTPROC glGetObjectLabelEXT; + +static void JNICALL Java_org_lwjgl_opengles_EXTDebugLabel_nglLabelObjectEXT(JNIEnv *env, jclass clazz, jint type, jint object, jint length, jlong label) { + const GLchar *label_address = (const GLchar *)(intptr_t)label; + glLabelObjectEXT(type, object, length, label_address); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTDebugLabel_nglGetObjectLabelEXT(JNIEnv *env, jclass clazz, jint type, jint object, jint bufSize, jlong length, jlong label) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLchar *label_address = (GLchar *)(intptr_t)label; + glGetObjectLabelEXT(type, object, bufSize, length_address, label_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_EXTDebugLabel_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglLabelObjectEXT", "(IIIJ)V", (void *)&Java_org_lwjgl_opengles_EXTDebugLabel_nglLabelObjectEXT, "glLabelObjectEXT", (void *)&glLabelObjectEXT, false}, + {"nglGetObjectLabelEXT", "(IIIJJ)V", (void *)&Java_org_lwjgl_opengles_EXTDebugLabel_nglGetObjectLabelEXT, "glGetObjectLabelEXT", (void *)&glGetObjectLabelEXT, false}, + + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTDebugMarker.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTDebugMarker.c new file mode 100644 index 0000000..d9c7168 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTDebugMarker.c @@ -0,0 +1,36 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glInsertEventMarkerEXTPROC) (GLsizei length, const GLchar * marker); +typedef GL_APICALL void (GL_APIENTRY *glPushGroupMarkerEXTPROC) (GLsizei length, const GLchar * marker); +typedef GL_APICALL void (GL_APIENTRY *glPopGroupMarkerEXTPROC) (); + +static glInsertEventMarkerEXTPROC glInsertEventMarkerEXT; +static glPushGroupMarkerEXTPROC glPushGroupMarkerEXT; +static glPopGroupMarkerEXTPROC glPopGroupMarkerEXT; + +static void JNICALL Java_org_lwjgl_opengles_EXTDebugMarker_nglInsertEventMarkerEXT(JNIEnv *env, jclass clazz, jint length, jlong marker) { + const GLchar *marker_address = (const GLchar *)(intptr_t)marker; + glInsertEventMarkerEXT(length, marker_address); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTDebugMarker_nglPushGroupMarkerEXT(JNIEnv *env, jclass clazz, jint length, jlong marker) { + const GLchar *marker_address = (const GLchar *)(intptr_t)marker; + glPushGroupMarkerEXT(length, marker_address); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTDebugMarker_nglPopGroupMarkerEXT(JNIEnv *env, jclass clazz) { + glPopGroupMarkerEXT(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_EXTDebugMarker_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglInsertEventMarkerEXT", "(IJ)V", (void *)&Java_org_lwjgl_opengles_EXTDebugMarker_nglInsertEventMarkerEXT, "glInsertEventMarkerEXT", (void *)&glInsertEventMarkerEXT, false}, + {"nglPushGroupMarkerEXT", "(IJ)V", (void *)&Java_org_lwjgl_opengles_EXTDebugMarker_nglPushGroupMarkerEXT, "glPushGroupMarkerEXT", (void *)&glPushGroupMarkerEXT, false}, + {"nglPopGroupMarkerEXT", "()V", (void *)&Java_org_lwjgl_opengles_EXTDebugMarker_nglPopGroupMarkerEXT, "glPopGroupMarkerEXT", (void *)&glPopGroupMarkerEXT, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTDiscardFramebuffer.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTDiscardFramebuffer.c new file mode 100644 index 0000000..8b7e7ce --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTDiscardFramebuffer.c @@ -0,0 +1,21 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glDiscardFramebufferEXTPROC) (GLenum target, GLsizei numAttachments, const GLenum * attachments); + +static glDiscardFramebufferEXTPROC glDiscardFramebufferEXT; + +static void JNICALL Java_org_lwjgl_opengles_EXTDiscardFramebuffer_nglDiscardFramebufferEXT(JNIEnv *env, jclass clazz, jint target, jint numAttachments, jlong attachments) { + const GLenum *attachments_address = (const GLenum *)(intptr_t)attachments; + glDiscardFramebufferEXT(target, numAttachments, attachments_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_EXTDiscardFramebuffer_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglDiscardFramebufferEXT", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_EXTDiscardFramebuffer_nglDiscardFramebufferEXT, "glDiscardFramebufferEXT", (void *)&glDiscardFramebufferEXT, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTMapBufferRange.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTMapBufferRange.c new file mode 100644 index 0000000..9810e41 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTMapBufferRange.c @@ -0,0 +1,28 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL GLvoid * (GL_APIENTRY *glMapBufferRangeEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef GL_APICALL void (GL_APIENTRY *glFlushMappedBufferRangeEXTPROC) (GLenum target, GLintptr offset, GLsizeiptr length); + +static glMapBufferRangeEXTPROC glMapBufferRangeEXT; +static glFlushMappedBufferRangeEXTPROC glFlushMappedBufferRangeEXT; + +static jobject JNICALL Java_org_lwjgl_opengles_EXTMapBufferRange_nglMapBufferRangeEXT(JNIEnv *env, jclass clazz, jint target, jlong offset, jlong length, jint access, jobject old_buffer) { + GLvoid * __result = glMapBufferRangeEXT(target, offset, length, access); + return safeNewBufferCached(env, __result, length, old_buffer); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTMapBufferRange_nglFlushMappedBufferRangeEXT(JNIEnv *env, jclass clazz, jint target, jlong offset, jlong length) { + glFlushMappedBufferRangeEXT(target, offset, length); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_EXTMapBufferRange_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglMapBufferRangeEXT", "(IJJIJLjava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;", (void *)&Java_org_lwjgl_opengles_EXTMapBufferRange_nglMapBufferRangeEXT, "glMapBufferRangeEXT", (void *)&glMapBufferRangeEXT, false}, + {"nglFlushMappedBufferRangeEXT", "(IJJ)V", (void *)&Java_org_lwjgl_opengles_EXTMapBufferRange_nglFlushMappedBufferRangeEXT, "glFlushMappedBufferRangeEXT", (void *)&glFlushMappedBufferRangeEXT, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTMultiDrawArrays.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTMultiDrawArrays.c new file mode 100644 index 0000000..4f2588e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTMultiDrawArrays.c @@ -0,0 +1,22 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glMultiDrawArraysEXTPROC) (GLenum mode, GLint * first, GLsizei * count, GLsizei primcount); + +static glMultiDrawArraysEXTPROC glMultiDrawArraysEXT; + +static void JNICALL Java_org_lwjgl_opengles_EXTMultiDrawArrays_nglMultiDrawArraysEXT(JNIEnv *env, jclass clazz, jint mode, jlong first, jlong count, jint primcount) { + GLint *first_address = (GLint *)(intptr_t)first; + GLsizei *count_address = (GLsizei *)(intptr_t)count; + glMultiDrawArraysEXT(mode, first_address, count_address, primcount); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_EXTMultiDrawArrays_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglMultiDrawArraysEXT", "(IJJI)V", (void *)&Java_org_lwjgl_opengles_EXTMultiDrawArrays_nglMultiDrawArraysEXT, "glMultiDrawArraysEXT", (void *)&glMultiDrawArraysEXT, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTMultisampledRenderToTexture.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTMultisampledRenderToTexture.c new file mode 100644 index 0000000..9a93665 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTMultisampledRenderToTexture.c @@ -0,0 +1,27 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glRenderbufferStorageMultisampleEXTPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef GL_APICALL void (GL_APIENTRY *glFramebufferTexture2DMultisampleEXTPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); + +static glRenderbufferStorageMultisampleEXTPROC glRenderbufferStorageMultisampleEXT; +static glFramebufferTexture2DMultisampleEXTPROC glFramebufferTexture2DMultisampleEXT; + +static void JNICALL Java_org_lwjgl_opengles_EXTMultisampledRenderToTexture_nglRenderbufferStorageMultisampleEXT(JNIEnv *env, jclass clazz, jint target, jint samples, jint internalformat, jint width, jint height) { + glRenderbufferStorageMultisampleEXT(target, samples, internalformat, width, height); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTMultisampledRenderToTexture_nglFramebufferTexture2DMultisampleEXT(JNIEnv *env, jclass clazz, jint target, jint attachment, jint textarget, jint texture, jint level, jint samples) { + glFramebufferTexture2DMultisampleEXT(target, attachment, textarget, texture, level, samples); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_EXTMultisampledRenderToTexture_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglRenderbufferStorageMultisampleEXT", "(IIIII)V", (void *)&Java_org_lwjgl_opengles_EXTMultisampledRenderToTexture_nglRenderbufferStorageMultisampleEXT, "glRenderbufferStorageMultisampleEXT", (void *)&glRenderbufferStorageMultisampleEXT, false}, + {"nglFramebufferTexture2DMultisampleEXT", "(IIIIII)V", (void *)&Java_org_lwjgl_opengles_EXTMultisampledRenderToTexture_nglFramebufferTexture2DMultisampleEXT, "glFramebufferTexture2DMultisampleEXT", (void *)&glFramebufferTexture2DMultisampleEXT, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTMultiviewDrawBuffers.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTMultiviewDrawBuffers.c new file mode 100644 index 0000000..5ae2855 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTMultiviewDrawBuffers.c @@ -0,0 +1,38 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glReadBufferIndexedEXTPROC) (GLenum src, GLint index); +typedef GL_APICALL void (GL_APIENTRY *glDrawBuffersIndexedEXTPROC) (GLint n, const GLenum * location, const GLint * indices); +typedef GL_APICALL void (GL_APIENTRY *glGetIntegeri_vEXTPROC) (GLenum target, GLuint index, GLint * data); + +static glReadBufferIndexedEXTPROC glReadBufferIndexedEXT; +static glDrawBuffersIndexedEXTPROC glDrawBuffersIndexedEXT; +static glGetIntegeri_vEXTPROC glGetIntegeri_vEXT; + +static void JNICALL Java_org_lwjgl_opengles_EXTMultiviewDrawBuffers_nglReadBufferIndexedEXT(JNIEnv *env, jclass clazz, jint src, jint index) { + glReadBufferIndexedEXT(src, index); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTMultiviewDrawBuffers_nglDrawBuffersIndexedEXT(JNIEnv *env, jclass clazz, jint n, jlong location, jlong indices) { + const GLenum *location_address = (const GLenum *)(intptr_t)location; + const GLint *indices_address = (const GLint *)(intptr_t)indices; + glDrawBuffersIndexedEXT(n, location_address, indices_address); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTMultiviewDrawBuffers_nglGetIntegeri_1vEXT(JNIEnv *env, jclass clazz, jint target, jint index, jlong data) { + GLint *data_address = (GLint *)(intptr_t)data; + glGetIntegeri_vEXT(target, index, data_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_EXTMultiviewDrawBuffers_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglReadBufferIndexedEXT", "(II)V", (void *)&Java_org_lwjgl_opengles_EXTMultiviewDrawBuffers_nglReadBufferIndexedEXT, "glReadBufferIndexedEXT", (void *)&glReadBufferIndexedEXT, false}, + {"nglDrawBuffersIndexedEXT", "(IJJ)V", (void *)&Java_org_lwjgl_opengles_EXTMultiviewDrawBuffers_nglDrawBuffersIndexedEXT, "glDrawBuffersIndexedEXT", (void *)&glDrawBuffersIndexedEXT, false}, + {"nglGetIntegeri_vEXT", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_EXTMultiviewDrawBuffers_nglGetIntegeri_1vEXT, "glGetIntegeri_vEXT", (void *)&glGetIntegeri_vEXT, false}, + + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTOcclusionQueryBoolean.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTOcclusionQueryBoolean.c new file mode 100644 index 0000000..0cac9ee --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTOcclusionQueryBoolean.c @@ -0,0 +1,68 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glGenQueriesEXTPROC) (GLsizei n, GLuint * ids); +typedef GL_APICALL void (GL_APIENTRY *glDeleteQueriesEXTPROC) (GLsizei n, GLuint * ids); +typedef GL_APICALL GLboolean (GL_APIENTRY *glIsQueryEXTPROC) (GLuint id); +typedef GL_APICALL void (GL_APIENTRY *glBeginQueryEXTPROC) (GLenum target, GLuint id); +typedef GL_APICALL void (GL_APIENTRY *glEndQueryEXTPROC) (GLenum target); +typedef GL_APICALL void (GL_APIENTRY *glGetQueryivEXTPROC) (GLenum target, GLenum pname, GLint * params); +typedef GL_APICALL void (GL_APIENTRY *glGetQueryObjectuivEXTPROC) (GLuint id, GLenum pname, GLint * params); + +static glGenQueriesEXTPROC glGenQueriesEXT; +static glDeleteQueriesEXTPROC glDeleteQueriesEXT; +static glIsQueryEXTPROC glIsQueryEXT; +static glBeginQueryEXTPROC glBeginQueryEXT; +static glEndQueryEXTPROC glEndQueryEXT; +static glGetQueryivEXTPROC glGetQueryivEXT; +static glGetQueryObjectuivEXTPROC glGetQueryObjectuivEXT; + +static void JNICALL Java_org_lwjgl_opengles_EXTOcclusionQueryBoolean_nglGenQueriesEXT(JNIEnv *env, jclass clazz, jint n, jlong ids) { + GLuint *ids_address = (GLuint *)(intptr_t)ids; + glGenQueriesEXT(n, ids_address); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTOcclusionQueryBoolean_nglDeleteQueriesEXT(JNIEnv *env, jclass clazz, jint n, jlong ids) { + GLuint *ids_address = (GLuint *)(intptr_t)ids; + glDeleteQueriesEXT(n, ids_address); +} + +static jboolean JNICALL Java_org_lwjgl_opengles_EXTOcclusionQueryBoolean_nglIsQueryEXT(JNIEnv *env, jclass clazz, jint id) { + GLboolean __result = glIsQueryEXT(id); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_EXTOcclusionQueryBoolean_nglBeginQueryEXT(JNIEnv *env, jclass clazz, jint target, jint id) { + glBeginQueryEXT(target, id); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTOcclusionQueryBoolean_nglEndQueryEXT(JNIEnv *env, jclass clazz, jint target) { + glEndQueryEXT(target); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTOcclusionQueryBoolean_nglGetQueryivEXT(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetQueryivEXT(target, pname, params_address); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTOcclusionQueryBoolean_nglGetQueryObjectuivEXT(JNIEnv *env, jclass clazz, jint id, jint pname, jlong params) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetQueryObjectuivEXT(id, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_EXTOcclusionQueryBoolean_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglGenQueriesEXT", "(IJ)V", (void *)&Java_org_lwjgl_opengles_EXTOcclusionQueryBoolean_nglGenQueriesEXT, "glGenQueriesEXT", (void *)&glGenQueriesEXT, false}, + {"nglDeleteQueriesEXT", "(IJ)V", (void *)&Java_org_lwjgl_opengles_EXTOcclusionQueryBoolean_nglDeleteQueriesEXT, "glDeleteQueriesEXT", (void *)&glDeleteQueriesEXT, false}, + {"nglIsQueryEXT", "(I)Z", (void *)&Java_org_lwjgl_opengles_EXTOcclusionQueryBoolean_nglIsQueryEXT, "glIsQueryEXT", (void *)&glIsQueryEXT, false}, + {"nglBeginQueryEXT", "(II)V", (void *)&Java_org_lwjgl_opengles_EXTOcclusionQueryBoolean_nglBeginQueryEXT, "glBeginQueryEXT", (void *)&glBeginQueryEXT, false}, + {"nglEndQueryEXT", "(I)V", (void *)&Java_org_lwjgl_opengles_EXTOcclusionQueryBoolean_nglEndQueryEXT, "glEndQueryEXT", (void *)&glEndQueryEXT, false}, + {"nglGetQueryivEXT", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_EXTOcclusionQueryBoolean_nglGetQueryivEXT, "glGetQueryivEXT", (void *)&glGetQueryivEXT, false}, + {"nglGetQueryObjectuivEXT", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_EXTOcclusionQueryBoolean_nglGetQueryObjectuivEXT, "glGetQueryObjectuivEXT", (void *)&glGetQueryObjectuivEXT, false}, + + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTRobustness.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTRobustness.c new file mode 100644 index 0000000..96ba7b9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTRobustness.c @@ -0,0 +1,45 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL GLenum (GL_APIENTRY *glGetGraphicsResetStatusEXTPROC) (); +typedef GL_APICALL void (GL_APIENTRY *glReadnPixelsEXTPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid * data); +typedef GL_APICALL void (GL_APIENTRY *glGetnUniformfvEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat * params); +typedef GL_APICALL void (GL_APIENTRY *glGetnUniformivEXTPROC) (GLuint program, GLint location, GLsizei bufSize, GLint * params); + +static glGetGraphicsResetStatusEXTPROC glGetGraphicsResetStatusEXT; +static glReadnPixelsEXTPROC glReadnPixelsEXT; +static glGetnUniformfvEXTPROC glGetnUniformfvEXT; +static glGetnUniformivEXTPROC glGetnUniformivEXT; + +static jint JNICALL Java_org_lwjgl_opengles_EXTRobustness_nglGetGraphicsResetStatusEXT(JNIEnv *env, jclass clazz) { + GLenum __result = glGetGraphicsResetStatusEXT(); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_EXTRobustness_nglReadnPixelsEXT(JNIEnv *env, jclass clazz, jint x, jint y, jint width, jint height, jint format, jint type, jint bufSize, jlong data) { + GLvoid *data_address = (GLvoid *)(intptr_t)data; + glReadnPixelsEXT(x, y, width, height, format, type, bufSize, data_address); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTRobustness_nglGetnUniformfvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint bufSize, jlong params) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetnUniformfvEXT(program, location, bufSize, params_address); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTRobustness_nglGetnUniformivEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint bufSize, jlong params) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetnUniformivEXT(program, location, bufSize, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_EXTRobustness_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglGetGraphicsResetStatusEXT", "()I", (void *)&Java_org_lwjgl_opengles_EXTRobustness_nglGetGraphicsResetStatusEXT, "glGetGraphicsResetStatusEXT", (void *)&glGetGraphicsResetStatusEXT, false}, + {"nglReadnPixelsEXT", "(IIIIIIIJ)V", (void *)&Java_org_lwjgl_opengles_EXTRobustness_nglReadnPixelsEXT, "glReadnPixelsEXT", (void *)&glReadnPixelsEXT, false}, + {"nglGetnUniformfvEXT", "(IIIJ)V", (void *)&Java_org_lwjgl_opengles_EXTRobustness_nglGetnUniformfvEXT, "glGetnUniformfvEXT", (void *)&glGetnUniformfvEXT, false}, + {"nglGetnUniformivEXT", "(IIIJ)V", (void *)&Java_org_lwjgl_opengles_EXTRobustness_nglGetnUniformivEXT, "glGetnUniformivEXT", (void *)&glGetnUniformivEXT, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTSeparateShaderObjects.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTSeparateShaderObjects.c new file mode 100644 index 0000000..1d19488 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTSeparateShaderObjects.c @@ -0,0 +1,277 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glUseProgramStagesEXTPROC) (GLuint pipeline, GLbitfield stages, GLuint program); +typedef GL_APICALL void (GL_APIENTRY *glActiveShaderProgramEXTPROC) (GLuint pipeline, GLuint program); +typedef GL_APICALL GLuint (GL_APIENTRY *glCreateShaderProgramvEXTPROC) (GLenum type, GLsizei count, const GLchar ** string); +typedef GL_APICALL void (GL_APIENTRY *glBindProgramPipelineEXTPROC) (GLuint pipeline); +typedef GL_APICALL void (GL_APIENTRY *glDeleteProgramPipelinesEXTPROC) (GLsizei n, const GLuint * pipelines); +typedef GL_APICALL void (GL_APIENTRY *glGenProgramPipelinesEXTPROC) (GLsizei n, GLuint * pipelines); +typedef GL_APICALL GLboolean (GL_APIENTRY *glIsProgramPipelineEXTPROC) (GLuint pipeline); +typedef GL_APICALL void (GL_APIENTRY *glProgramParameteriEXTPROC) (GLuint program, GLenum pname, GLint value); +typedef GL_APICALL void (GL_APIENTRY *glGetProgramPipelineivEXTPROC) (GLuint pipeline, GLenum pname, GLint * params); +typedef GL_APICALL void (GL_APIENTRY *glProgramUniform1iEXTPROC) (GLuint program, GLint location, GLint v0); +typedef GL_APICALL void (GL_APIENTRY *glProgramUniform2iEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1); +typedef GL_APICALL void (GL_APIENTRY *glProgramUniform3iEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); +typedef GL_APICALL void (GL_APIENTRY *glProgramUniform4iEXTPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); +typedef GL_APICALL void (GL_APIENTRY *glProgramUniform1fEXTPROC) (GLuint program, GLint location, GLfloat v0); +typedef GL_APICALL void (GL_APIENTRY *glProgramUniform2fEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); +typedef GL_APICALL void (GL_APIENTRY *glProgramUniform3fEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); +typedef GL_APICALL void (GL_APIENTRY *glProgramUniform4fEXTPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); +typedef GL_APICALL void (GL_APIENTRY *glProgramUniform1ivEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint * value); +typedef GL_APICALL void (GL_APIENTRY *glProgramUniform2ivEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint * value); +typedef GL_APICALL void (GL_APIENTRY *glProgramUniform3ivEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint * value); +typedef GL_APICALL void (GL_APIENTRY *glProgramUniform4ivEXTPROC) (GLuint program, GLint location, GLsizei count, const GLint * value); +typedef GL_APICALL void (GL_APIENTRY *glProgramUniform1fvEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat * value); +typedef GL_APICALL void (GL_APIENTRY *glProgramUniform2fvEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat * value); +typedef GL_APICALL void (GL_APIENTRY *glProgramUniform3fvEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat * value); +typedef GL_APICALL void (GL_APIENTRY *glProgramUniform4fvEXTPROC) (GLuint program, GLint location, GLsizei count, const GLfloat * value); +typedef GL_APICALL void (GL_APIENTRY *glProgramUniformMatrix2fvEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef GL_APICALL void (GL_APIENTRY *glProgramUniformMatrix3fvEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef GL_APICALL void (GL_APIENTRY *glProgramUniformMatrix4fvEXTPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat * value); +typedef GL_APICALL void (GL_APIENTRY *glValidateProgramPipelineEXTPROC) (GLuint pipeline); +typedef GL_APICALL void (GL_APIENTRY *glGetProgramPipelineInfoLogEXTPROC) (GLuint pipeline, GLsizei bufSize, GLsizei * length, GLchar * infoLog); + +static glUseProgramStagesEXTPROC glUseProgramStagesEXT; +static glActiveShaderProgramEXTPROC glActiveShaderProgramEXT; +static glCreateShaderProgramvEXTPROC glCreateShaderProgramvEXT; +static glBindProgramPipelineEXTPROC glBindProgramPipelineEXT; +static glDeleteProgramPipelinesEXTPROC glDeleteProgramPipelinesEXT; +static glGenProgramPipelinesEXTPROC glGenProgramPipelinesEXT; +static glIsProgramPipelineEXTPROC glIsProgramPipelineEXT; +static glProgramParameteriEXTPROC glProgramParameteriEXT; +static glGetProgramPipelineivEXTPROC glGetProgramPipelineivEXT; +static glProgramUniform1iEXTPROC glProgramUniform1iEXT; +static glProgramUniform2iEXTPROC glProgramUniform2iEXT; +static glProgramUniform3iEXTPROC glProgramUniform3iEXT; +static glProgramUniform4iEXTPROC glProgramUniform4iEXT; +static glProgramUniform1fEXTPROC glProgramUniform1fEXT; +static glProgramUniform2fEXTPROC glProgramUniform2fEXT; +static glProgramUniform3fEXTPROC glProgramUniform3fEXT; +static glProgramUniform4fEXTPROC glProgramUniform4fEXT; +static glProgramUniform1ivEXTPROC glProgramUniform1ivEXT; +static glProgramUniform2ivEXTPROC glProgramUniform2ivEXT; +static glProgramUniform3ivEXTPROC glProgramUniform3ivEXT; +static glProgramUniform4ivEXTPROC glProgramUniform4ivEXT; +static glProgramUniform1fvEXTPROC glProgramUniform1fvEXT; +static glProgramUniform2fvEXTPROC glProgramUniform2fvEXT; +static glProgramUniform3fvEXTPROC glProgramUniform3fvEXT; +static glProgramUniform4fvEXTPROC glProgramUniform4fvEXT; +static glProgramUniformMatrix2fvEXTPROC glProgramUniformMatrix2fvEXT; +static glProgramUniformMatrix3fvEXTPROC glProgramUniformMatrix3fvEXT; +static glProgramUniformMatrix4fvEXTPROC glProgramUniformMatrix4fvEXT; +static glValidateProgramPipelineEXTPROC glValidateProgramPipelineEXT; +static glGetProgramPipelineInfoLogEXTPROC glGetProgramPipelineInfoLogEXT; + +static void JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglUseProgramStagesEXT(JNIEnv *env, jclass clazz, jint pipeline, jint stages, jint program) { + glUseProgramStagesEXT(pipeline, stages, program); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglActiveShaderProgramEXT(JNIEnv *env, jclass clazz, jint pipeline, jint program) { + glActiveShaderProgramEXT(pipeline, program); +} + +static jint JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglCreateShaderProgramvEXT(JNIEnv *env, jclass clazz, jint type, jint count, jlong string) { + const GLchar *string_address = (const GLchar *)(intptr_t)string; + GLuint __result = glCreateShaderProgramvEXT(type, count, (const GLchar **)&string_address); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglCreateShaderProgramvEXT2(JNIEnv *env, jclass clazz, jint type, jint count, jlong strings) { + const GLchar *strings_address = (const GLchar *)(intptr_t)strings; + int _str_i; + GLchar *_str_address; + GLchar **strings_str = (GLchar **) malloc(count * sizeof(GLchar *)); + GLuint __result; + _str_i = 0; + _str_address = (GLchar *)strings_address; + while ( _str_i < count ) { + strings_str[_str_i++] = _str_address; + _str_address += strlen(_str_address) + 1; + } + __result = glCreateShaderProgramvEXT(type, count, (const GLchar **)&strings_str); + free(strings_str); + return __result; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglCreateShaderProgramvEXT3(JNIEnv *env, jclass clazz, jint type, jint count, jobjectArray strings) { + int _ptr_i; + jobject _ptr_object; + GLchar **strings_ptr = (GLchar **) malloc(count * sizeof(GLchar *)); + GLuint __result; + _ptr_i = 0; + while ( _ptr_i < count ) { + _ptr_object = (*env)->GetObjectArrayElement(env, strings, _ptr_i); + strings_ptr[_ptr_i++] = (GLchar *)(*env)->GetDirectBufferAddress(env, _ptr_object); + } + __result = glCreateShaderProgramvEXT(type, count, (const GLchar **)strings_ptr); + free(strings_ptr); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglBindProgramPipelineEXT(JNIEnv *env, jclass clazz, jint pipeline) { + glBindProgramPipelineEXT(pipeline); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglDeleteProgramPipelinesEXT(JNIEnv *env, jclass clazz, jint n, jlong pipelines) { + const GLuint *pipelines_address = (const GLuint *)(intptr_t)pipelines; + glDeleteProgramPipelinesEXT(n, pipelines_address); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglGenProgramPipelinesEXT(JNIEnv *env, jclass clazz, jint n, jlong pipelines) { + GLuint *pipelines_address = (GLuint *)(intptr_t)pipelines; + glGenProgramPipelinesEXT(n, pipelines_address); +} + +static jboolean JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglIsProgramPipelineEXT(JNIEnv *env, jclass clazz, jint pipeline) { + GLboolean __result = glIsProgramPipelineEXT(pipeline); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramParameteriEXT(JNIEnv *env, jclass clazz, jint program, jint pname, jint value) { + glProgramParameteriEXT(program, pname, value); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglGetProgramPipelineivEXT(JNIEnv *env, jclass clazz, jint pipeline, jint pname, jlong params) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetProgramPipelineivEXT(pipeline, pname, params_address); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform1iEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint v0) { + glProgramUniform1iEXT(program, location, v0); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform2iEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint v0, jint v1) { + glProgramUniform2iEXT(program, location, v0, v1); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform3iEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint v0, jint v1, jint v2) { + glProgramUniform3iEXT(program, location, v0, v1, v2); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform4iEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint v0, jint v1, jint v2, jint v3) { + glProgramUniform4iEXT(program, location, v0, v1, v2, v3); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform1fEXT(JNIEnv *env, jclass clazz, jint program, jint location, jfloat v0) { + glProgramUniform1fEXT(program, location, v0); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform2fEXT(JNIEnv *env, jclass clazz, jint program, jint location, jfloat v0, jfloat v1) { + glProgramUniform2fEXT(program, location, v0, v1); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform3fEXT(JNIEnv *env, jclass clazz, jint program, jint location, jfloat v0, jfloat v1, jfloat v2) { + glProgramUniform3fEXT(program, location, v0, v1, v2); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform4fEXT(JNIEnv *env, jclass clazz, jint program, jint location, jfloat v0, jfloat v1, jfloat v2, jfloat v3) { + glProgramUniform4fEXT(program, location, v0, v1, v2, v3); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform1ivEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value) { + const GLint *value_address = (const GLint *)(intptr_t)value; + glProgramUniform1ivEXT(program, location, count, value_address); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform2ivEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value) { + const GLint *value_address = (const GLint *)(intptr_t)value; + glProgramUniform2ivEXT(program, location, count, value_address); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform3ivEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value) { + const GLint *value_address = (const GLint *)(intptr_t)value; + glProgramUniform3ivEXT(program, location, count, value_address); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform4ivEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value) { + const GLint *value_address = (const GLint *)(intptr_t)value; + glProgramUniform4ivEXT(program, location, count, value_address); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform1fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniform1fvEXT(program, location, count, value_address); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform2fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniform2fvEXT(program, location, count, value_address); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform3fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniform3fvEXT(program, location, count, value_address); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform4fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jlong value) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniform4fvEXT(program, location, count, value_address); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniformMatrix2fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniformMatrix2fvEXT(program, location, count, transpose, value_address); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniformMatrix3fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniformMatrix3fvEXT(program, location, count, transpose, value_address); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniformMatrix4fvEXT(JNIEnv *env, jclass clazz, jint program, jint location, jint count, jboolean transpose, jlong value) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glProgramUniformMatrix4fvEXT(program, location, count, transpose, value_address); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglValidateProgramPipelineEXT(JNIEnv *env, jclass clazz, jint pipeline) { + glValidateProgramPipelineEXT(pipeline); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglGetProgramPipelineInfoLogEXT(JNIEnv *env, jclass clazz, jint pipeline, jint bufSize, jlong length, jlong infoLog) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLchar *infoLog_address = (GLchar *)(intptr_t)infoLog; + glGetProgramPipelineInfoLogEXT(pipeline, bufSize, length_address, infoLog_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_EXTSeparateShaderObjects_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglUseProgramStagesEXT", "(III)V", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglUseProgramStagesEXT, "glUseProgramStagesEXT", (void *)&glUseProgramStagesEXT, false}, + {"nglActiveShaderProgramEXT", "(II)V", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglActiveShaderProgramEXT, "glActiveShaderProgramEXT", (void *)&glActiveShaderProgramEXT, false}, + {"nglCreateShaderProgramvEXT", "(IIJ)I", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglCreateShaderProgramvEXT, "glCreateShaderProgramvEXT", (void *)&glCreateShaderProgramvEXT, false}, + {"nglCreateShaderProgramvEXT2", "(IIJ)I", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglCreateShaderProgramvEXT2, "glCreateShaderProgramvEXT", (void *)&glCreateShaderProgramvEXT, false}, + {"nglCreateShaderProgramvEXT3", "(II[Ljava/nio/ByteBuffer;)I", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglCreateShaderProgramvEXT3, "glCreateShaderProgramvEXT", (void *)&glCreateShaderProgramvEXT, false}, + {"nglBindProgramPipelineEXT", "(I)V", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglBindProgramPipelineEXT, "glBindProgramPipelineEXT", (void *)&glBindProgramPipelineEXT, false}, + {"nglDeleteProgramPipelinesEXT", "(IJ)V", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglDeleteProgramPipelinesEXT, "glDeleteProgramPipelinesEXT", (void *)&glDeleteProgramPipelinesEXT, false}, + {"nglGenProgramPipelinesEXT", "(IJ)V", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglGenProgramPipelinesEXT, "glGenProgramPipelinesEXT", (void *)&glGenProgramPipelinesEXT, false}, + {"nglIsProgramPipelineEXT", "(I)Z", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglIsProgramPipelineEXT, "glIsProgramPipelineEXT", (void *)&glIsProgramPipelineEXT, false}, + {"nglProgramParameteriEXT", "(III)V", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramParameteriEXT, "glProgramParameteriEXT", (void *)&glProgramParameteriEXT, false}, + {"nglGetProgramPipelineivEXT", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglGetProgramPipelineivEXT, "glGetProgramPipelineivEXT", (void *)&glGetProgramPipelineivEXT, false}, + {"nglProgramUniform1iEXT", "(III)V", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform1iEXT, "glProgramUniform1iEXT", (void *)&glProgramUniform1iEXT, false}, + {"nglProgramUniform2iEXT", "(IIII)V", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform2iEXT, "glProgramUniform2iEXT", (void *)&glProgramUniform2iEXT, false}, + {"nglProgramUniform3iEXT", "(IIIII)V", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform3iEXT, "glProgramUniform3iEXT", (void *)&glProgramUniform3iEXT, false}, + {"nglProgramUniform4iEXT", "(IIIIII)V", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform4iEXT, "glProgramUniform4iEXT", (void *)&glProgramUniform4iEXT, false}, + {"nglProgramUniform1fEXT", "(IIF)V", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform1fEXT, "glProgramUniform1fEXT", (void *)&glProgramUniform1fEXT, false}, + {"nglProgramUniform2fEXT", "(IIFF)V", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform2fEXT, "glProgramUniform2fEXT", (void *)&glProgramUniform2fEXT, false}, + {"nglProgramUniform3fEXT", "(IIFFF)V", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform3fEXT, "glProgramUniform3fEXT", (void *)&glProgramUniform3fEXT, false}, + {"nglProgramUniform4fEXT", "(IIFFFF)V", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform4fEXT, "glProgramUniform4fEXT", (void *)&glProgramUniform4fEXT, false}, + {"nglProgramUniform1ivEXT", "(IIIJ)V", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform1ivEXT, "glProgramUniform1ivEXT", (void *)&glProgramUniform1ivEXT, false}, + {"nglProgramUniform2ivEXT", "(IIIJ)V", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform2ivEXT, "glProgramUniform2ivEXT", (void *)&glProgramUniform2ivEXT, false}, + {"nglProgramUniform3ivEXT", "(IIIJ)V", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform3ivEXT, "glProgramUniform3ivEXT", (void *)&glProgramUniform3ivEXT, false}, + {"nglProgramUniform4ivEXT", "(IIIJ)V", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform4ivEXT, "glProgramUniform4ivEXT", (void *)&glProgramUniform4ivEXT, false}, + {"nglProgramUniform1fvEXT", "(IIIJ)V", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform1fvEXT, "glProgramUniform1fvEXT", (void *)&glProgramUniform1fvEXT, false}, + {"nglProgramUniform2fvEXT", "(IIIJ)V", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform2fvEXT, "glProgramUniform2fvEXT", (void *)&glProgramUniform2fvEXT, false}, + {"nglProgramUniform3fvEXT", "(IIIJ)V", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform3fvEXT, "glProgramUniform3fvEXT", (void *)&glProgramUniform3fvEXT, false}, + {"nglProgramUniform4fvEXT", "(IIIJ)V", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniform4fvEXT, "glProgramUniform4fvEXT", (void *)&glProgramUniform4fvEXT, false}, + {"nglProgramUniformMatrix2fvEXT", "(IIIZJ)V", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniformMatrix2fvEXT, "glProgramUniformMatrix2fvEXT", (void *)&glProgramUniformMatrix2fvEXT, false}, + {"nglProgramUniformMatrix3fvEXT", "(IIIZJ)V", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniformMatrix3fvEXT, "glProgramUniformMatrix3fvEXT", (void *)&glProgramUniformMatrix3fvEXT, false}, + {"nglProgramUniformMatrix4fvEXT", "(IIIZJ)V", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglProgramUniformMatrix4fvEXT, "glProgramUniformMatrix4fvEXT", (void *)&glProgramUniformMatrix4fvEXT, false}, + {"nglValidateProgramPipelineEXT", "(I)V", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglValidateProgramPipelineEXT, "glValidateProgramPipelineEXT", (void *)&glValidateProgramPipelineEXT, false}, + {"nglGetProgramPipelineInfoLogEXT", "(IIJJ)V", (void *)&Java_org_lwjgl_opengles_EXTSeparateShaderObjects_nglGetProgramPipelineInfoLogEXT, "glGetProgramPipelineInfoLogEXT", (void *)&glGetProgramPipelineInfoLogEXT, false}, + + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTTextureArray.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTTextureArray.c new file mode 100644 index 0000000..1a70b23 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTTextureArray.c @@ -0,0 +1,20 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glFramebufferTextureLayerEXTPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); + +static glFramebufferTextureLayerEXTPROC glFramebufferTextureLayerEXT; + +static void JNICALL Java_org_lwjgl_opengles_EXTTextureArray_nglFramebufferTextureLayerEXT(JNIEnv *env, jclass clazz, jint target, jint attachment, jint texture, jint level, jint layer) { + glFramebufferTextureLayerEXT(target, attachment, texture, level, layer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_EXTTextureArray_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglFramebufferTextureLayerEXT", "(IIIII)V", (void *)&Java_org_lwjgl_opengles_EXTTextureArray_nglFramebufferTextureLayerEXT, "glFramebufferTextureLayerEXT", (void *)&glFramebufferTextureLayerEXT, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTTextureStorage.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTTextureStorage.c new file mode 100644 index 0000000..b1e2d77 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_EXTTextureStorage.c @@ -0,0 +1,55 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glTexStorage1DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +typedef GL_APICALL void (GL_APIENTRY *glTexStorage2DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef GL_APICALL void (GL_APIENTRY *glTexStorage3DEXTPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +typedef GL_APICALL void (GL_APIENTRY *glTextureStorage1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width); +typedef GL_APICALL void (GL_APIENTRY *glTextureStorage2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef GL_APICALL void (GL_APIENTRY *glTextureStorage3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); + +static glTexStorage1DEXTPROC glTexStorage1DEXT; +static glTexStorage2DEXTPROC glTexStorage2DEXT; +static glTexStorage3DEXTPROC glTexStorage3DEXT; +static glTextureStorage1DEXTPROC glTextureStorage1DEXT; +static glTextureStorage2DEXTPROC glTextureStorage2DEXT; +static glTextureStorage3DEXTPROC glTextureStorage3DEXT; + +static void JNICALL Java_org_lwjgl_opengles_EXTTextureStorage_nglTexStorage1DEXT(JNIEnv *env, jclass clazz, jint target, jint levels, jint internalformat, jint width) { + glTexStorage1DEXT(target, levels, internalformat, width); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTTextureStorage_nglTexStorage2DEXT(JNIEnv *env, jclass clazz, jint target, jint levels, jint internalformat, jint width, jint height) { + glTexStorage2DEXT(target, levels, internalformat, width, height); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTTextureStorage_nglTexStorage3DEXT(JNIEnv *env, jclass clazz, jint target, jint levels, jint internalformat, jint width, jint height, jint depth) { + glTexStorage3DEXT(target, levels, internalformat, width, height, depth); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTTextureStorage_nglTextureStorage1DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint levels, jint internalformat, jint width) { + glTextureStorage1DEXT(texture, target, levels, internalformat, width); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTTextureStorage_nglTextureStorage2DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint levels, jint internalformat, jint width, jint height) { + glTextureStorage2DEXT(texture, target, levels, internalformat, width, height); +} + +static void JNICALL Java_org_lwjgl_opengles_EXTTextureStorage_nglTextureStorage3DEXT(JNIEnv *env, jclass clazz, jint texture, jint target, jint levels, jint internalformat, jint width, jint height, jint depth) { + glTextureStorage3DEXT(texture, target, levels, internalformat, width, height, depth); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_EXTTextureStorage_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglTexStorage1DEXT", "(IIII)V", (void *)&Java_org_lwjgl_opengles_EXTTextureStorage_nglTexStorage1DEXT, "glTexStorage1DEXT", (void *)&glTexStorage1DEXT, false}, + {"nglTexStorage2DEXT", "(IIIII)V", (void *)&Java_org_lwjgl_opengles_EXTTextureStorage_nglTexStorage2DEXT, "glTexStorage2DEXT", (void *)&glTexStorage2DEXT, false}, + {"nglTexStorage3DEXT", "(IIIIII)V", (void *)&Java_org_lwjgl_opengles_EXTTextureStorage_nglTexStorage3DEXT, "glTexStorage3DEXT", (void *)&glTexStorage3DEXT, false}, + {"nglTextureStorage1DEXT", "(IIIII)V", (void *)&Java_org_lwjgl_opengles_EXTTextureStorage_nglTextureStorage1DEXT, "glTextureStorage1DEXT", (void *)&glTextureStorage1DEXT, false}, + {"nglTextureStorage2DEXT", "(IIIIII)V", (void *)&Java_org_lwjgl_opengles_EXTTextureStorage_nglTextureStorage2DEXT, "glTextureStorage2DEXT", (void *)&glTextureStorage2DEXT, false}, + {"nglTextureStorage3DEXT", "(IIIIIII)V", (void *)&Java_org_lwjgl_opengles_EXTTextureStorage_nglTextureStorage3DEXT, "glTextureStorage3DEXT", (void *)&glTextureStorage3DEXT, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_GLES20.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_GLES20.c new file mode 100644 index 0000000..2a02394 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_GLES20.c @@ -0,0 +1,1124 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glActiveTexturePROC) (GLenum texture); +typedef GL_APICALL void (GL_APIENTRY *glAttachShaderPROC) (GLuint program, GLuint shader); +typedef GL_APICALL void (GL_APIENTRY *glBindAttribLocationPROC) (GLuint program, GLuint index, const GLchar * name); +typedef GL_APICALL void (GL_APIENTRY *glBindBufferPROC) (GLenum target, GLuint buffer); +typedef GL_APICALL void (GL_APIENTRY *glBindFramebufferPROC) (GLenum target, GLuint framebuffer); +typedef GL_APICALL void (GL_APIENTRY *glBindRenderbufferPROC) (GLenum target, GLuint renderbuffer); +typedef GL_APICALL void (GL_APIENTRY *glBindTexturePROC) (GLenum target, GLuint texture); +typedef GL_APICALL void (GL_APIENTRY *glBlendColorPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +typedef GL_APICALL void (GL_APIENTRY *glBlendEquationPROC) (GLenum mode); +typedef GL_APICALL void (GL_APIENTRY *glBlendEquationSeparatePROC) (GLenum modeRGB, GLenum modeAlpha); +typedef GL_APICALL void (GL_APIENTRY *glBlendFuncPROC) (GLenum sfactor, GLenum dfactor); +typedef GL_APICALL void (GL_APIENTRY *glBlendFuncSeparatePROC) (GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); +typedef GL_APICALL void (GL_APIENTRY *glBufferDataPROC) (GLenum target, GLsizeiptr size, const GLvoid * data, GLenum usage); +typedef GL_APICALL void (GL_APIENTRY *glBufferSubDataPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid * data); +typedef GL_APICALL GLenum (GL_APIENTRY *glCheckFramebufferStatusPROC) (GLenum target); +typedef GL_APICALL void (GL_APIENTRY *glClearPROC) (GLbitfield mask); +typedef GL_APICALL void (GL_APIENTRY *glClearColorPROC) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); +typedef GL_APICALL void (GL_APIENTRY *glClearDepthfPROC) (GLclampf depth); +typedef GL_APICALL void (GL_APIENTRY *glClearStencilPROC) (GLint s); +typedef GL_APICALL void (GL_APIENTRY *glColorMaskPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); +typedef GL_APICALL void (GL_APIENTRY *glCompileShaderPROC) (GLuint shader); +typedef GL_APICALL void (GL_APIENTRY *glCompressedTexImage2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data); +typedef GL_APICALL void (GL_APIENTRY *glCompressedTexSubImage2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data); +typedef GL_APICALL void (GL_APIENTRY *glCopyTexImage2DPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); +typedef GL_APICALL void (GL_APIENTRY *glCopyTexSubImage2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef GL_APICALL GLuint (GL_APIENTRY *glCreateProgramPROC) (); +typedef GL_APICALL GLuint (GL_APIENTRY *glCreateShaderPROC) (GLenum type); +typedef GL_APICALL void (GL_APIENTRY *glCullFacePROC) (GLenum mode); +typedef GL_APICALL void (GL_APIENTRY *glDeleteBuffersPROC) (GLsizei n, const GLuint * buffers); +typedef GL_APICALL void (GL_APIENTRY *glDeleteFramebuffersPROC) (GLint n, const GLuint * framebuffers); +typedef GL_APICALL void (GL_APIENTRY *glDeleteProgramPROC) (GLuint program); +typedef GL_APICALL void (GL_APIENTRY *glDeleteRenderbuffersPROC) (GLint n, const GLuint * renderbuffers); +typedef GL_APICALL void (GL_APIENTRY *glDeleteShaderPROC) (GLuint shader); +typedef GL_APICALL void (GL_APIENTRY *glDeleteTexturesPROC) (GLsizei n, const GLuint * textures); +typedef GL_APICALL void (GL_APIENTRY *glDepthFuncPROC) (GLenum func); +typedef GL_APICALL void (GL_APIENTRY *glDepthMaskPROC) (GLboolean flag); +typedef GL_APICALL void (GL_APIENTRY *glDepthRangefPROC) (GLclampf zNear, GLclampf zFar); +typedef GL_APICALL void (GL_APIENTRY *glDetachShaderPROC) (GLuint program, GLuint shader); +typedef GL_APICALL void (GL_APIENTRY *glDisablePROC) (GLenum cap); +typedef GL_APICALL void (GL_APIENTRY *glDisableVertexAttribArrayPROC) (GLuint index); +typedef GL_APICALL void (GL_APIENTRY *glDrawArraysPROC) (GLenum mode, GLint first, GLsizei count); +typedef GL_APICALL void (GL_APIENTRY *glDrawElementsPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid * indices); +typedef GL_APICALL void (GL_APIENTRY *glEnablePROC) (GLenum cap); +typedef GL_APICALL void (GL_APIENTRY *glEnableVertexAttribArrayPROC) (GLuint index); +typedef GL_APICALL void (GL_APIENTRY *glFinishPROC) (); +typedef GL_APICALL void (GL_APIENTRY *glFlushPROC) (); +typedef GL_APICALL void (GL_APIENTRY *glFramebufferRenderbufferPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef GL_APICALL void (GL_APIENTRY *glFramebufferTexture2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef GL_APICALL void (GL_APIENTRY *glFrontFacePROC) (GLenum mode); +typedef GL_APICALL void (GL_APIENTRY *glGenBuffersPROC) (GLsizei n, GLuint * buffers); +typedef GL_APICALL void (GL_APIENTRY *glGenerateMipmapPROC) (GLenum target); +typedef GL_APICALL void (GL_APIENTRY *glGenFramebuffersPROC) (GLint n, GLuint * framebuffers); +typedef GL_APICALL void (GL_APIENTRY *glGenRenderbuffersPROC) (GLint n, GLuint * renderbuffers); +typedef GL_APICALL void (GL_APIENTRY *glGenTexturesPROC) (GLsizei n, GLuint * textures); +typedef GL_APICALL void (GL_APIENTRY *glGetActiveAttribPROC) (GLuint program, GLuint index, GLsizei bufsize, GLsizei * length, GLint * size, GLenum * type, GLchar * name); +typedef GL_APICALL void (GL_APIENTRY *glGetActiveUniformPROC) (GLuint program, GLuint index, GLsizei bufsize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name); +typedef GL_APICALL void (GL_APIENTRY *glGetAttachedShadersPROC) (GLuint program, GLsizei maxCount, GLsizei * count, GLuint * shaders); +typedef GL_APICALL GLint (GL_APIENTRY *glGetAttribLocationPROC) (GLuint program, const GLchar * name); +typedef GL_APICALL void (GL_APIENTRY *glGetBooleanvPROC) (GLenum pname, GLboolean * params); +typedef GL_APICALL void (GL_APIENTRY *glGetBufferParameterivPROC) (GLenum target, GLenum pname, GLint * params); +typedef GL_APICALL GLenum (GL_APIENTRY *glGetErrorPROC) (); +typedef GL_APICALL void (GL_APIENTRY *glGetFloatvPROC) (GLenum pname, GLfloat * params); +typedef GL_APICALL void (GL_APIENTRY *glGetFramebufferAttachmentParameterivPROC) (GLenum target, GLenum attachment, GLenum pname, GLint * params); +typedef GL_APICALL void (GL_APIENTRY *glGetIntegervPROC) (GLenum pname, GLint * params); +typedef GL_APICALL void (GL_APIENTRY *glGetProgramivPROC) (GLuint program, GLenum pname, GLint * params); +typedef GL_APICALL void (GL_APIENTRY *glGetProgramInfoLogPROC) (GLuint program, GLsizei bufsize, GLsizei * length, GLchar * infoLog); +typedef GL_APICALL void (GL_APIENTRY *glGetRenderbufferParameterivPROC) (GLenum target, GLenum pname, GLint * params); +typedef GL_APICALL void (GL_APIENTRY *glGetShaderivPROC) (GLuint shader, GLenum pname, GLint * params); +typedef GL_APICALL void (GL_APIENTRY *glGetShaderInfoLogPROC) (GLuint shader, GLsizei bufsize, GLsizei * length, GLchar * infoLog); +typedef GL_APICALL void (GL_APIENTRY *glGetShaderPrecisionFormatPROC) (GLenum shadertype, GLenum precisiontype, GLint * range, GLint * precision); +typedef GL_APICALL void (GL_APIENTRY *glGetShaderSourcePROC) (GLuint shader, GLsizei bufsize, GLsizei * length, GLchar * source); +typedef GL_APICALL const GLubyte * (GL_APIENTRY *glGetStringPROC) (GLenum name); +typedef GL_APICALL void (GL_APIENTRY *glGetTexParameterfvPROC) (GLenum target, GLenum pname, GLfloat * params); +typedef GL_APICALL void (GL_APIENTRY *glGetTexParameterivPROC) (GLenum target, GLenum pname, GLint * params); +typedef GL_APICALL void (GL_APIENTRY *glGetUniformfvPROC) (GLuint program, GLint location, GLfloat * params); +typedef GL_APICALL void (GL_APIENTRY *glGetUniformivPROC) (GLuint program, GLint location, GLint * params); +typedef GL_APICALL GLint (GL_APIENTRY *glGetUniformLocationPROC) (GLuint program, const GLchar * name); +typedef GL_APICALL void (GL_APIENTRY *glGetVertexAttribfvPROC) (GLuint index, GLenum pname, GLfloat * params); +typedef GL_APICALL void (GL_APIENTRY *glGetVertexAttribivPROC) (GLuint index, GLenum pname, GLint * params); +typedef GL_APICALL void (GL_APIENTRY *glGetVertexAttribPointervPROC) (GLuint index, GLenum pname, GLvoid ** pointer); +typedef GL_APICALL void (GL_APIENTRY *glHintPROC) (GLenum target, GLenum mode); +typedef GL_APICALL GLboolean (GL_APIENTRY *glIsBufferPROC) (GLuint buffer); +typedef GL_APICALL GLboolean (GL_APIENTRY *glIsEnabledPROC) (GLenum cap); +typedef GL_APICALL GLboolean (GL_APIENTRY *glIsFramebufferPROC) (GLuint framebuffer); +typedef GL_APICALL GLboolean (GL_APIENTRY *glIsProgramPROC) (GLuint program); +typedef GL_APICALL GLboolean (GL_APIENTRY *glIsRenderbufferPROC) (GLuint renderbuffer); +typedef GL_APICALL GLboolean (GL_APIENTRY *glIsShaderPROC) (GLuint shader); +typedef GL_APICALL GLboolean (GL_APIENTRY *glIsTexturePROC) (GLuint texture); +typedef GL_APICALL void (GL_APIENTRY *glLineWidthPROC) (GLfloat width); +typedef GL_APICALL void (GL_APIENTRY *glLinkProgramPROC) (GLuint program); +typedef GL_APICALL void (GL_APIENTRY *glPixelStoreiPROC) (GLenum pname, GLint param); +typedef GL_APICALL void (GL_APIENTRY *glPolygonOffsetPROC) (GLfloat factor, GLfloat units); +typedef GL_APICALL void (GL_APIENTRY *glReadPixelsPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid * pixels); +typedef GL_APICALL void (GL_APIENTRY *glReleaseShaderCompilerPROC) (); +typedef GL_APICALL void (GL_APIENTRY *glRenderbufferStoragePROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef GL_APICALL void (GL_APIENTRY *glSampleCoveragePROC) (GLclampf value, GLboolean invert); +typedef GL_APICALL void (GL_APIENTRY *glScissorPROC) (GLint x, GLint y, GLsizei width, GLsizei height); +typedef GL_APICALL void (GL_APIENTRY *glShaderBinaryPROC) (GLsizei n, const GLuint * shaders, GLenum binaryformat, const GLvoid * binary, GLsizei length); +typedef GL_APICALL void (GL_APIENTRY *glShaderSourcePROC) (GLuint shader, GLsizei count, const GLchar ** string, const GLint* length); +typedef GL_APICALL void (GL_APIENTRY *glStencilFuncPROC) (GLenum func, GLint ref, GLuint mask); +typedef GL_APICALL void (GL_APIENTRY *glStencilFuncSeparatePROC) (GLenum face, GLenum func, GLint ref, GLuint mask); +typedef GL_APICALL void (GL_APIENTRY *glStencilMaskPROC) (GLuint mask); +typedef GL_APICALL void (GL_APIENTRY *glStencilMaskSeparatePROC) (GLenum face, GLuint mask); +typedef GL_APICALL void (GL_APIENTRY *glStencilOpPROC) (GLenum fail, GLenum zfail, GLenum zpass); +typedef GL_APICALL void (GL_APIENTRY *glStencilOpSeparatePROC) (GLenum face, GLenum fail, GLenum zfail, GLenum zpass); +typedef GL_APICALL void (GL_APIENTRY *glTexImage2DPROC) (GLenum target, GLint level, GLint internalformat, GLint width, GLint height, GLint border, GLenum format, GLenum type, const GLvoid * pixels); +typedef GL_APICALL void (GL_APIENTRY *glTexParameterfPROC) (GLenum target, GLenum pname, GLfloat param); +typedef GL_APICALL void (GL_APIENTRY *glTexParameterfvPROC) (GLenum target, GLenum pname, const GLfloat * param); +typedef GL_APICALL void (GL_APIENTRY *glTexParameteriPROC) (GLenum target, GLenum pname, GLint param); +typedef GL_APICALL void (GL_APIENTRY *glTexParameterivPROC) (GLenum target, GLenum pname, const GLint * param); +typedef GL_APICALL void (GL_APIENTRY *glTexSubImage2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid * pixels); +typedef GL_APICALL void (GL_APIENTRY *glUniform1fPROC) (GLint location, GLfloat x); +typedef GL_APICALL void (GL_APIENTRY *glUniform1fvPROC) (GLint location, GLsizei count, const GLfloat * v); +typedef GL_APICALL void (GL_APIENTRY *glUniform1iPROC) (GLint location, GLint x); +typedef GL_APICALL void (GL_APIENTRY *glUniform1ivPROC) (GLint location, GLsizei count, const GLint * v); +typedef GL_APICALL void (GL_APIENTRY *glUniform2fPROC) (GLint location, GLfloat x, GLfloat y); +typedef GL_APICALL void (GL_APIENTRY *glUniform2fvPROC) (GLint location, GLsizei count, const GLfloat * v); +typedef GL_APICALL void (GL_APIENTRY *glUniform2iPROC) (GLint location, GLint x, GLint y); +typedef GL_APICALL void (GL_APIENTRY *glUniform2ivPROC) (GLint location, GLsizei count, const GLint * v); +typedef GL_APICALL void (GL_APIENTRY *glUniform3fPROC) (GLint location, GLfloat x, GLfloat y, GLfloat z); +typedef GL_APICALL void (GL_APIENTRY *glUniform3fvPROC) (GLint location, GLsizei count, const GLfloat * v); +typedef GL_APICALL void (GL_APIENTRY *glUniform3iPROC) (GLint location, GLint x, GLint y, GLint z); +typedef GL_APICALL void (GL_APIENTRY *glUniform3ivPROC) (GLint location, GLsizei count, const GLint * v); +typedef GL_APICALL void (GL_APIENTRY *glUniform4fPROC) (GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef GL_APICALL void (GL_APIENTRY *glUniform4fvPROC) (GLint location, GLsizei count, const GLfloat * v); +typedef GL_APICALL void (GL_APIENTRY *glUniform4iPROC) (GLint location, GLint x, GLint y, GLint z, GLint w); +typedef GL_APICALL void (GL_APIENTRY *glUniform4ivPROC) (GLint location, GLsizei count, const GLint * v); +typedef GL_APICALL void (GL_APIENTRY *glUniformMatrix2fvPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat * matrices); +typedef GL_APICALL void (GL_APIENTRY *glUniformMatrix3fvPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat * matrices); +typedef GL_APICALL void (GL_APIENTRY *glUniformMatrix4fvPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat * matrices); +typedef GL_APICALL void (GL_APIENTRY *glUseProgramPROC) (GLuint program); +typedef GL_APICALL void (GL_APIENTRY *glValidateProgramPROC) (GLuint program); +typedef GL_APICALL void (GL_APIENTRY *glVertexAttrib1fPROC) (GLuint indx, GLfloat x); +typedef GL_APICALL void (GL_APIENTRY *glVertexAttrib1fvPROC) (GLuint indx, const GLfloat * values); +typedef GL_APICALL void (GL_APIENTRY *glVertexAttrib2fPROC) (GLuint indx, GLfloat x, GLfloat y); +typedef GL_APICALL void (GL_APIENTRY *glVertexAttrib2fvPROC) (GLuint indx, const GLfloat * values); +typedef GL_APICALL void (GL_APIENTRY *glVertexAttrib3fPROC) (GLuint indx, GLfloat x, GLfloat y, GLfloat z); +typedef GL_APICALL void (GL_APIENTRY *glVertexAttrib3fvPROC) (GLuint indx, const GLfloat * values); +typedef GL_APICALL void (GL_APIENTRY *glVertexAttrib4fPROC) (GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w); +typedef GL_APICALL void (GL_APIENTRY *glVertexAttrib4fvPROC) (GLuint indx, const GLfloat * values); +typedef GL_APICALL void (GL_APIENTRY *glVertexAttribPointerPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid * buffer); +typedef GL_APICALL void (GL_APIENTRY *glViewportPROC) (GLint x, GLint y, GLsizei width, GLsizei height); + +static glActiveTexturePROC glActiveTexture; +static glAttachShaderPROC glAttachShader; +static glBindAttribLocationPROC glBindAttribLocation; +static glBindBufferPROC glBindBuffer; +static glBindFramebufferPROC glBindFramebuffer; +static glBindRenderbufferPROC glBindRenderbuffer; +static glBindTexturePROC glBindTexture; +static glBlendColorPROC glBlendColor; +static glBlendEquationPROC glBlendEquation; +static glBlendEquationSeparatePROC glBlendEquationSeparate; +static glBlendFuncPROC glBlendFunc; +static glBlendFuncSeparatePROC glBlendFuncSeparate; +static glBufferDataPROC glBufferData; +static glBufferSubDataPROC glBufferSubData; +static glCheckFramebufferStatusPROC glCheckFramebufferStatus; +static glClearPROC glClear; +static glClearColorPROC glClearColor; +static glClearDepthfPROC glClearDepthf; +static glClearStencilPROC glClearStencil; +static glColorMaskPROC glColorMask; +static glCompileShaderPROC glCompileShader; +static glCompressedTexImage2DPROC glCompressedTexImage2D; +static glCompressedTexSubImage2DPROC glCompressedTexSubImage2D; +static glCopyTexImage2DPROC glCopyTexImage2D; +static glCopyTexSubImage2DPROC glCopyTexSubImage2D; +static glCreateProgramPROC glCreateProgram; +static glCreateShaderPROC glCreateShader; +static glCullFacePROC glCullFace; +static glDeleteBuffersPROC glDeleteBuffers; +static glDeleteFramebuffersPROC glDeleteFramebuffers; +static glDeleteProgramPROC glDeleteProgram; +static glDeleteRenderbuffersPROC glDeleteRenderbuffers; +static glDeleteShaderPROC glDeleteShader; +static glDeleteTexturesPROC glDeleteTextures; +static glDepthFuncPROC glDepthFunc; +static glDepthMaskPROC glDepthMask; +static glDepthRangefPROC glDepthRangef; +static glDetachShaderPROC glDetachShader; +static glDisablePROC glDisable; +static glDisableVertexAttribArrayPROC glDisableVertexAttribArray; +static glDrawArraysPROC glDrawArrays; +static glDrawElementsPROC glDrawElements; +static glEnablePROC glEnable; +static glEnableVertexAttribArrayPROC glEnableVertexAttribArray; +static glFinishPROC glFinish; +static glFlushPROC glFlush; +static glFramebufferRenderbufferPROC glFramebufferRenderbuffer; +static glFramebufferTexture2DPROC glFramebufferTexture2D; +static glFrontFacePROC glFrontFace; +static glGenBuffersPROC glGenBuffers; +static glGenerateMipmapPROC glGenerateMipmap; +static glGenFramebuffersPROC glGenFramebuffers; +static glGenRenderbuffersPROC glGenRenderbuffers; +static glGenTexturesPROC glGenTextures; +static glGetActiveAttribPROC glGetActiveAttrib; +static glGetActiveUniformPROC glGetActiveUniform; +static glGetAttachedShadersPROC glGetAttachedShaders; +static glGetAttribLocationPROC glGetAttribLocation; +static glGetBooleanvPROC glGetBooleanv; +static glGetBufferParameterivPROC glGetBufferParameteriv; +static glGetErrorPROC glGetError; +static glGetFloatvPROC glGetFloatv; +static glGetFramebufferAttachmentParameterivPROC glGetFramebufferAttachmentParameteriv; +static glGetIntegervPROC glGetIntegerv; +static glGetProgramivPROC glGetProgramiv; +static glGetProgramInfoLogPROC glGetProgramInfoLog; +static glGetRenderbufferParameterivPROC glGetRenderbufferParameteriv; +static glGetShaderivPROC glGetShaderiv; +static glGetShaderInfoLogPROC glGetShaderInfoLog; +static glGetShaderPrecisionFormatPROC glGetShaderPrecisionFormat; +static glGetShaderSourcePROC glGetShaderSource; +static glGetStringPROC glGetString; +static glGetTexParameterfvPROC glGetTexParameterfv; +static glGetTexParameterivPROC glGetTexParameteriv; +static glGetUniformfvPROC glGetUniformfv; +static glGetUniformivPROC glGetUniformiv; +static glGetUniformLocationPROC glGetUniformLocation; +static glGetVertexAttribfvPROC glGetVertexAttribfv; +static glGetVertexAttribivPROC glGetVertexAttribiv; +static glGetVertexAttribPointervPROC glGetVertexAttribPointerv; +static glHintPROC glHint; +static glIsBufferPROC glIsBuffer; +static glIsEnabledPROC glIsEnabled; +static glIsFramebufferPROC glIsFramebuffer; +static glIsProgramPROC glIsProgram; +static glIsRenderbufferPROC glIsRenderbuffer; +static glIsShaderPROC glIsShader; +static glIsTexturePROC glIsTexture; +static glLineWidthPROC glLineWidth; +static glLinkProgramPROC glLinkProgram; +static glPixelStoreiPROC glPixelStorei; +static glPolygonOffsetPROC glPolygonOffset; +static glReadPixelsPROC glReadPixels; +static glReleaseShaderCompilerPROC glReleaseShaderCompiler; +static glRenderbufferStoragePROC glRenderbufferStorage; +static glSampleCoveragePROC glSampleCoverage; +static glScissorPROC glScissor; +static glShaderBinaryPROC glShaderBinary; +static glShaderSourcePROC glShaderSource; +static glStencilFuncPROC glStencilFunc; +static glStencilFuncSeparatePROC glStencilFuncSeparate; +static glStencilMaskPROC glStencilMask; +static glStencilMaskSeparatePROC glStencilMaskSeparate; +static glStencilOpPROC glStencilOp; +static glStencilOpSeparatePROC glStencilOpSeparate; +static glTexImage2DPROC glTexImage2D; +static glTexParameterfPROC glTexParameterf; +static glTexParameterfvPROC glTexParameterfv; +static glTexParameteriPROC glTexParameteri; +static glTexParameterivPROC glTexParameteriv; +static glTexSubImage2DPROC glTexSubImage2D; +static glUniform1fPROC glUniform1f; +static glUniform1fvPROC glUniform1fv; +static glUniform1iPROC glUniform1i; +static glUniform1ivPROC glUniform1iv; +static glUniform2fPROC glUniform2f; +static glUniform2fvPROC glUniform2fv; +static glUniform2iPROC glUniform2i; +static glUniform2ivPROC glUniform2iv; +static glUniform3fPROC glUniform3f; +static glUniform3fvPROC glUniform3fv; +static glUniform3iPROC glUniform3i; +static glUniform3ivPROC glUniform3iv; +static glUniform4fPROC glUniform4f; +static glUniform4fvPROC glUniform4fv; +static glUniform4iPROC glUniform4i; +static glUniform4ivPROC glUniform4iv; +static glUniformMatrix2fvPROC glUniformMatrix2fv; +static glUniformMatrix3fvPROC glUniformMatrix3fv; +static glUniformMatrix4fvPROC glUniformMatrix4fv; +static glUseProgramPROC glUseProgram; +static glValidateProgramPROC glValidateProgram; +static glVertexAttrib1fPROC glVertexAttrib1f; +static glVertexAttrib1fvPROC glVertexAttrib1fv; +static glVertexAttrib2fPROC glVertexAttrib2f; +static glVertexAttrib2fvPROC glVertexAttrib2fv; +static glVertexAttrib3fPROC glVertexAttrib3f; +static glVertexAttrib3fvPROC glVertexAttrib3fv; +static glVertexAttrib4fPROC glVertexAttrib4f; +static glVertexAttrib4fvPROC glVertexAttrib4fv; +static glVertexAttribPointerPROC glVertexAttribPointer; +static glViewportPROC glViewport; + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglActiveTexture(JNIEnv *env, jclass clazz, jint texture) { + glActiveTexture(texture); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglAttachShader(JNIEnv *env, jclass clazz, jint program, jint shader) { + glAttachShader(program, shader); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglBindAttribLocation(JNIEnv *env, jclass clazz, jint program, jint index, jlong name) { + const GLchar *name_address = (const GLchar *)(intptr_t)name; + glBindAttribLocation(program, index, name_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglBindBuffer(JNIEnv *env, jclass clazz, jint target, jint buffer) { + glBindBuffer(target, buffer); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglBindFramebuffer(JNIEnv *env, jclass clazz, jint target, jint framebuffer) { + glBindFramebuffer(target, framebuffer); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglBindRenderbuffer(JNIEnv *env, jclass clazz, jint target, jint renderbuffer) { + glBindRenderbuffer(target, renderbuffer); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglBindTexture(JNIEnv *env, jclass clazz, jint target, jint texture) { + glBindTexture(target, texture); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglBlendColor(JNIEnv *env, jclass clazz, jfloat red, jfloat green, jfloat blue, jfloat alpha) { + glBlendColor(red, green, blue, alpha); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglBlendEquation(JNIEnv *env, jclass clazz, jint mode) { + glBlendEquation(mode); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglBlendEquationSeparate(JNIEnv *env, jclass clazz, jint modeRGB, jint modeAlpha) { + glBlendEquationSeparate(modeRGB, modeAlpha); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglBlendFunc(JNIEnv *env, jclass clazz, jint sfactor, jint dfactor) { + glBlendFunc(sfactor, dfactor); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglBlendFuncSeparate(JNIEnv *env, jclass clazz, jint srcRGB, jint dstRGB, jint srcAlpha, jint dstAlpha) { + glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglBufferData(JNIEnv *env, jclass clazz, jint target, jlong size, jlong data, jint usage) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glBufferData(target, size, data_address, usage); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglBufferSubData(JNIEnv *env, jclass clazz, jint target, jlong offset, jlong size, jlong data) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glBufferSubData(target, offset, size, data_address); +} + +static jint JNICALL Java_org_lwjgl_opengles_GLES20_nglCheckFramebufferStatus(JNIEnv *env, jclass clazz, jint target) { + GLenum __result = glCheckFramebufferStatus(target); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglClear(JNIEnv *env, jclass clazz, jint mask) { + glClear(mask); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglClearColor(JNIEnv *env, jclass clazz, jfloat red, jfloat green, jfloat blue, jfloat alpha) { + glClearColor(red, green, blue, alpha); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglClearDepthf(JNIEnv *env, jclass clazz, jfloat depth) { + glClearDepthf(depth); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglClearStencil(JNIEnv *env, jclass clazz, jint s) { + glClearStencil(s); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglColorMask(JNIEnv *env, jclass clazz, jboolean red, jboolean green, jboolean blue, jboolean alpha) { + glColorMask(red, green, blue, alpha); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglCompileShader(JNIEnv *env, jclass clazz, jint shader) { + glCompileShader(shader); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglCompressedTexImage2D(JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint imageSize, jlong data) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglCompressedTexSubImage2D(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint imageSize, jlong data) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglCopyTexImage2D(JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint x, jint y, jint width, jint height, jint border) { + glCopyTexImage2D(target, level, internalformat, x, y, width, height, border); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglCopyTexSubImage2D(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint x, jint y, jint width, jint height) { + glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); +} + +static jint JNICALL Java_org_lwjgl_opengles_GLES20_nglCreateProgram(JNIEnv *env, jclass clazz) { + GLuint __result = glCreateProgram(); + return __result; +} + +static jint JNICALL Java_org_lwjgl_opengles_GLES20_nglCreateShader(JNIEnv *env, jclass clazz, jint type) { + GLuint __result = glCreateShader(type); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglCullFace(JNIEnv *env, jclass clazz, jint mode) { + glCullFace(mode); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglDeleteBuffers(JNIEnv *env, jclass clazz, jint n, jlong buffers) { + const GLuint *buffers_address = (const GLuint *)(intptr_t)buffers; + glDeleteBuffers(n, buffers_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglDeleteFramebuffers(JNIEnv *env, jclass clazz, jint n, jlong framebuffers) { + const GLuint *framebuffers_address = (const GLuint *)(intptr_t)framebuffers; + glDeleteFramebuffers(n, framebuffers_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglDeleteProgram(JNIEnv *env, jclass clazz, jint program) { + glDeleteProgram(program); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglDeleteRenderbuffers(JNIEnv *env, jclass clazz, jint n, jlong renderbuffers) { + const GLuint *renderbuffers_address = (const GLuint *)(intptr_t)renderbuffers; + glDeleteRenderbuffers(n, renderbuffers_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglDeleteShader(JNIEnv *env, jclass clazz, jint shader) { + glDeleteShader(shader); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglDeleteTextures(JNIEnv *env, jclass clazz, jint n, jlong textures) { + const GLuint *textures_address = (const GLuint *)(intptr_t)textures; + glDeleteTextures(n, textures_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglDepthFunc(JNIEnv *env, jclass clazz, jint func) { + glDepthFunc(func); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglDepthMask(JNIEnv *env, jclass clazz, jboolean flag) { + glDepthMask(flag); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglDepthRangef(JNIEnv *env, jclass clazz, jfloat zNear, jfloat zFar) { + glDepthRangef(zNear, zFar); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglDetachShader(JNIEnv *env, jclass clazz, jint program, jint shader) { + glDetachShader(program, shader); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglDisable(JNIEnv *env, jclass clazz, jint cap) { + glDisable(cap); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglDisableVertexAttribArray(JNIEnv *env, jclass clazz, jint index) { + glDisableVertexAttribArray(index); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglDrawArrays(JNIEnv *env, jclass clazz, jint mode, jint first, jint count) { + glDrawArrays(mode, first, count); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglDrawElements(JNIEnv *env, jclass clazz, jint mode, jint count, jint type, jlong indices) { + const GLvoid *indices_address = (const GLvoid *)(intptr_t)indices; + glDrawElements(mode, count, type, indices_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglDrawElementsBO(JNIEnv *env, jclass clazz, jint mode, jint count, jint type, jlong indices_buffer_offset) { + const GLvoid *indices_address = (const GLvoid *)(intptr_t)offsetToPointer(indices_buffer_offset); + glDrawElements(mode, count, type, indices_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglEnable(JNIEnv *env, jclass clazz, jint cap) { + glEnable(cap); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglEnableVertexAttribArray(JNIEnv *env, jclass clazz, jint index) { + glEnableVertexAttribArray(index); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglFinish(JNIEnv *env, jclass clazz) { + glFinish(); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglFlush(JNIEnv *env, jclass clazz) { + glFlush(); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglFramebufferRenderbuffer(JNIEnv *env, jclass clazz, jint target, jint attachment, jint renderbuffertarget, jint renderbuffer) { + glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglFramebufferTexture2D(JNIEnv *env, jclass clazz, jint target, jint attachment, jint textarget, jint texture, jint level) { + glFramebufferTexture2D(target, attachment, textarget, texture, level); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglFrontFace(JNIEnv *env, jclass clazz, jint mode) { + glFrontFace(mode); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglGenBuffers(JNIEnv *env, jclass clazz, jint n, jlong buffers) { + GLuint *buffers_address = (GLuint *)(intptr_t)buffers; + glGenBuffers(n, buffers_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglGenerateMipmap(JNIEnv *env, jclass clazz, jint target) { + glGenerateMipmap(target); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglGenFramebuffers(JNIEnv *env, jclass clazz, jint n, jlong framebuffers) { + GLuint *framebuffers_address = (GLuint *)(intptr_t)framebuffers; + glGenFramebuffers(n, framebuffers_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglGenRenderbuffers(JNIEnv *env, jclass clazz, jint n, jlong renderbuffers) { + GLuint *renderbuffers_address = (GLuint *)(intptr_t)renderbuffers; + glGenRenderbuffers(n, renderbuffers_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglGenTextures(JNIEnv *env, jclass clazz, jint n, jlong textures) { + GLuint *textures_address = (GLuint *)(intptr_t)textures; + glGenTextures(n, textures_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglGetActiveAttrib(JNIEnv *env, jclass clazz, jint program, jint index, jint bufsize, jlong length, jlong size, jlong type, jlong name) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLint *size_address = (GLint *)(intptr_t)size; + GLenum *type_address = (GLenum *)(intptr_t)type; + GLchar *name_address = (GLchar *)(intptr_t)name; + glGetActiveAttrib(program, index, bufsize, length_address, size_address, type_address, name_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglGetActiveUniform(JNIEnv *env, jclass clazz, jint program, jint index, jint bufsize, jlong length, jlong size, jlong type, jlong name) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLsizei *size_address = (GLsizei *)(intptr_t)size; + GLenum *type_address = (GLenum *)(intptr_t)type; + GLchar *name_address = (GLchar *)(intptr_t)name; + glGetActiveUniform(program, index, bufsize, length_address, size_address, type_address, name_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglGetAttachedShaders(JNIEnv *env, jclass clazz, jint program, jint maxCount, jlong count, jlong shaders) { + GLsizei *count_address = (GLsizei *)(intptr_t)count; + GLuint *shaders_address = (GLuint *)(intptr_t)shaders; + glGetAttachedShaders(program, maxCount, count_address, shaders_address); +} + +static jint JNICALL Java_org_lwjgl_opengles_GLES20_nglGetAttribLocation(JNIEnv *env, jclass clazz, jint program, jlong name) { + const GLchar *name_address = (const GLchar *)(intptr_t)name; + GLint __result = glGetAttribLocation(program, name_address); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglGetBooleanv(JNIEnv *env, jclass clazz, jint pname, jlong params) { + GLboolean *params_address = (GLboolean *)(intptr_t)params; + glGetBooleanv(pname, params_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglGetBufferParameteriv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetBufferParameteriv(target, pname, params_address); +} + +static jint JNICALL Java_org_lwjgl_opengles_GLES20_nglGetError(JNIEnv *env, jclass clazz) { + GLenum __result = glGetError(); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglGetFloatv(JNIEnv *env, jclass clazz, jint pname, jlong params) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetFloatv(pname, params_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglGetFramebufferAttachmentParameteriv(JNIEnv *env, jclass clazz, jint target, jint attachment, jint pname, jlong params) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetFramebufferAttachmentParameteriv(target, attachment, pname, params_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglGetIntegerv(JNIEnv *env, jclass clazz, jint pname, jlong params) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetIntegerv(pname, params_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglGetProgramiv(JNIEnv *env, jclass clazz, jint program, jint pname, jlong params) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetProgramiv(program, pname, params_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglGetProgramInfoLog(JNIEnv *env, jclass clazz, jint program, jint bufsize, jlong length, jlong infoLog) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLchar *infoLog_address = (GLchar *)(intptr_t)infoLog; + glGetProgramInfoLog(program, bufsize, length_address, infoLog_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglGetRenderbufferParameteriv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetRenderbufferParameteriv(target, pname, params_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglGetShaderiv(JNIEnv *env, jclass clazz, jint shader, jint pname, jlong params) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetShaderiv(shader, pname, params_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglGetShaderInfoLog(JNIEnv *env, jclass clazz, jint shader, jint bufsize, jlong length, jlong infoLog) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLchar *infoLog_address = (GLchar *)(intptr_t)infoLog; + glGetShaderInfoLog(shader, bufsize, length_address, infoLog_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglGetShaderPrecisionFormat(JNIEnv *env, jclass clazz, jint shadertype, jint precisiontype, jlong range, jlong precision) { + GLint *range_address = (GLint *)(intptr_t)range; + GLint *precision_address = (GLint *)(intptr_t)precision; + glGetShaderPrecisionFormat(shadertype, precisiontype, range_address, precision_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglGetShaderSource(JNIEnv *env, jclass clazz, jint shader, jint bufsize, jlong length, jlong source) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLchar *source_address = (GLchar *)(intptr_t)source; + glGetShaderSource(shader, bufsize, length_address, source_address); +} + +static jobject JNICALL Java_org_lwjgl_opengles_GLES20_nglGetString(JNIEnv *env, jclass clazz, jint name) { + const GLubyte * __result = glGetString(name); + return NewStringNativeUnsigned(env, __result); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglGetTexParameterfv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetTexParameterfv(target, pname, params_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglGetTexParameteriv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetTexParameteriv(target, pname, params_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglGetUniformfv(JNIEnv *env, jclass clazz, jint program, jint location, jlong params) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetUniformfv(program, location, params_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglGetUniformiv(JNIEnv *env, jclass clazz, jint program, jint location, jlong params) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetUniformiv(program, location, params_address); +} + +static jint JNICALL Java_org_lwjgl_opengles_GLES20_nglGetUniformLocation(JNIEnv *env, jclass clazz, jint program, jlong name) { + const GLchar *name_address = (const GLchar *)(intptr_t)name; + GLint __result = glGetUniformLocation(program, name_address); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglGetVertexAttribfv(JNIEnv *env, jclass clazz, jint index, jint pname, jlong params) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetVertexAttribfv(index, pname, params_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglGetVertexAttribiv(JNIEnv *env, jclass clazz, jint index, jint pname, jlong params) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetVertexAttribiv(index, pname, params_address); +} + +static jobject JNICALL Java_org_lwjgl_opengles_GLES20_nglGetVertexAttribPointerv(JNIEnv *env, jclass clazz, jint index, jint pname, jlong result_size) { + GLvoid * __result; + glGetVertexAttribPointerv(index, pname, &__result); + return safeNewBuffer(env, __result, result_size); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglHint(JNIEnv *env, jclass clazz, jint target, jint mode) { + glHint(target, mode); +} + +static jboolean JNICALL Java_org_lwjgl_opengles_GLES20_nglIsBuffer(JNIEnv *env, jclass clazz, jint buffer) { + GLboolean __result = glIsBuffer(buffer); + return __result; +} + +static jboolean JNICALL Java_org_lwjgl_opengles_GLES20_nglIsEnabled(JNIEnv *env, jclass clazz, jint cap) { + GLboolean __result = glIsEnabled(cap); + return __result; +} + +static jboolean JNICALL Java_org_lwjgl_opengles_GLES20_nglIsFramebuffer(JNIEnv *env, jclass clazz, jint framebuffer) { + GLboolean __result = glIsFramebuffer(framebuffer); + return __result; +} + +static jboolean JNICALL Java_org_lwjgl_opengles_GLES20_nglIsProgram(JNIEnv *env, jclass clazz, jint program) { + GLboolean __result = glIsProgram(program); + return __result; +} + +static jboolean JNICALL Java_org_lwjgl_opengles_GLES20_nglIsRenderbuffer(JNIEnv *env, jclass clazz, jint renderbuffer) { + GLboolean __result = glIsRenderbuffer(renderbuffer); + return __result; +} + +static jboolean JNICALL Java_org_lwjgl_opengles_GLES20_nglIsShader(JNIEnv *env, jclass clazz, jint shader) { + GLboolean __result = glIsShader(shader); + return __result; +} + +static jboolean JNICALL Java_org_lwjgl_opengles_GLES20_nglIsTexture(JNIEnv *env, jclass clazz, jint texture) { + GLboolean __result = glIsTexture(texture); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglLineWidth(JNIEnv *env, jclass clazz, jfloat width) { + glLineWidth(width); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglLinkProgram(JNIEnv *env, jclass clazz, jint program) { + glLinkProgram(program); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglPixelStorei(JNIEnv *env, jclass clazz, jint pname, jint param) { + glPixelStorei(pname, param); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglPolygonOffset(JNIEnv *env, jclass clazz, jfloat factor, jfloat units) { + glPolygonOffset(factor, units); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglReadPixels(JNIEnv *env, jclass clazz, jint x, jint y, jint width, jint height, jint format, jint type, jlong pixels) { + GLvoid *pixels_address = (GLvoid *)(intptr_t)pixels; + glReadPixels(x, y, width, height, format, type, pixels_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglReleaseShaderCompiler(JNIEnv *env, jclass clazz) { + glReleaseShaderCompiler(); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglRenderbufferStorage(JNIEnv *env, jclass clazz, jint target, jint internalformat, jint width, jint height) { + glRenderbufferStorage(target, internalformat, width, height); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglSampleCoverage(JNIEnv *env, jclass clazz, jfloat value, jboolean invert) { + glSampleCoverage(value, invert); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglScissor(JNIEnv *env, jclass clazz, jint x, jint y, jint width, jint height) { + glScissor(x, y, width, height); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglShaderBinary(JNIEnv *env, jclass clazz, jint n, jlong shaders, jint binaryformat, jlong binary, jint length) { + const GLuint *shaders_address = (const GLuint *)(intptr_t)shaders; + const GLvoid *binary_address = (const GLvoid *)(intptr_t)binary; + glShaderBinary(n, shaders_address, binaryformat, binary_address, length); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglShaderSource(JNIEnv *env, jclass clazz, jint shader, jint count, jlong string, jint length) { + const GLchar *string_address = (const GLchar *)(intptr_t)string; + glShaderSource(shader, count, (const GLchar **)&string_address, (const GLint*)&length); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_GLES20_nglShaderSource3(JNIEnv *env, jclass clazz, jint shader, jint count, jlong strings, jlong length) { + const GLchar *strings_address = (const GLchar *)(intptr_t)strings; + int _str_i; + GLchar *_str_address; + GLchar **strings_str = (GLchar **) malloc(count * sizeof(GLchar *)); + const GLint *length_address = (const GLint *)(intptr_t)length; + _str_i = 0; + _str_address = (GLchar *)strings_address; + while ( _str_i < count ) { + strings_str[_str_i] = _str_address; + _str_address += length_address[_str_i++]; + } + glShaderSource(shader, count, (const GLchar **)strings_str, length_address); + free(strings_str); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglStencilFunc(JNIEnv *env, jclass clazz, jint func, jint ref, jint mask) { + glStencilFunc(func, ref, mask); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglStencilFuncSeparate(JNIEnv *env, jclass clazz, jint face, jint func, jint ref, jint mask) { + glStencilFuncSeparate(face, func, ref, mask); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglStencilMask(JNIEnv *env, jclass clazz, jint mask) { + glStencilMask(mask); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglStencilMaskSeparate(JNIEnv *env, jclass clazz, jint face, jint mask) { + glStencilMaskSeparate(face, mask); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglStencilOp(JNIEnv *env, jclass clazz, jint fail, jint zfail, jint zpass) { + glStencilOp(fail, zfail, zpass); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglStencilOpSeparate(JNIEnv *env, jclass clazz, jint face, jint fail, jint zfail, jint zpass) { + glStencilOpSeparate(face, fail, zfail, zpass); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglTexImage2D(JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint border, jint format, jint type, jlong pixels) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)pixels; + glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglTexParameterf(JNIEnv *env, jclass clazz, jint target, jint pname, jfloat param) { + glTexParameterf(target, pname, param); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglTexParameterfv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong param) { + const GLfloat *param_address = (const GLfloat *)(intptr_t)param; + glTexParameterfv(target, pname, param_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglTexParameteri(JNIEnv *env, jclass clazz, jint target, jint pname, jint param) { + glTexParameteri(target, pname, param); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglTexParameteriv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong param) { + const GLint *param_address = (const GLint *)(intptr_t)param; + glTexParameteriv(target, pname, param_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglTexSubImage2D(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint width, jint height, jint format, jint type, jlong pixels) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)pixels; + glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglUniform1f(JNIEnv *env, jclass clazz, jint location, jfloat x) { + glUniform1f(location, x); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglUniform1fv(JNIEnv *env, jclass clazz, jint location, jint count, jlong v) { + const GLfloat *v_address = (const GLfloat *)(intptr_t)v; + glUniform1fv(location, count, v_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglUniform1i(JNIEnv *env, jclass clazz, jint location, jint x) { + glUniform1i(location, x); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglUniform1iv(JNIEnv *env, jclass clazz, jint location, jint count, jlong v) { + const GLint *v_address = (const GLint *)(intptr_t)v; + glUniform1iv(location, count, v_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglUniform2f(JNIEnv *env, jclass clazz, jint location, jfloat x, jfloat y) { + glUniform2f(location, x, y); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglUniform2fv(JNIEnv *env, jclass clazz, jint location, jint count, jlong v) { + const GLfloat *v_address = (const GLfloat *)(intptr_t)v; + glUniform2fv(location, count, v_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglUniform2i(JNIEnv *env, jclass clazz, jint location, jint x, jint y) { + glUniform2i(location, x, y); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglUniform2iv(JNIEnv *env, jclass clazz, jint location, jint count, jlong v) { + const GLint *v_address = (const GLint *)(intptr_t)v; + glUniform2iv(location, count, v_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglUniform3f(JNIEnv *env, jclass clazz, jint location, jfloat x, jfloat y, jfloat z) { + glUniform3f(location, x, y, z); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglUniform3fv(JNIEnv *env, jclass clazz, jint location, jint count, jlong v) { + const GLfloat *v_address = (const GLfloat *)(intptr_t)v; + glUniform3fv(location, count, v_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglUniform3i(JNIEnv *env, jclass clazz, jint location, jint x, jint y, jint z) { + glUniform3i(location, x, y, z); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglUniform3iv(JNIEnv *env, jclass clazz, jint location, jint count, jlong v) { + const GLint *v_address = (const GLint *)(intptr_t)v; + glUniform3iv(location, count, v_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglUniform4f(JNIEnv *env, jclass clazz, jint location, jfloat x, jfloat y, jfloat z, jfloat w) { + glUniform4f(location, x, y, z, w); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglUniform4fv(JNIEnv *env, jclass clazz, jint location, jint count, jlong v) { + const GLfloat *v_address = (const GLfloat *)(intptr_t)v; + glUniform4fv(location, count, v_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglUniform4i(JNIEnv *env, jclass clazz, jint location, jint x, jint y, jint z, jint w) { + glUniform4i(location, x, y, z, w); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglUniform4iv(JNIEnv *env, jclass clazz, jint location, jint count, jlong v) { + const GLint *v_address = (const GLint *)(intptr_t)v; + glUniform4iv(location, count, v_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglUniformMatrix2fv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong matrices) { + const GLfloat *matrices_address = (const GLfloat *)(intptr_t)matrices; + glUniformMatrix2fv(location, count, transpose, matrices_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglUniformMatrix3fv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong matrices) { + const GLfloat *matrices_address = (const GLfloat *)(intptr_t)matrices; + glUniformMatrix3fv(location, count, transpose, matrices_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglUniformMatrix4fv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong matrices) { + const GLfloat *matrices_address = (const GLfloat *)(intptr_t)matrices; + glUniformMatrix4fv(location, count, transpose, matrices_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglUseProgram(JNIEnv *env, jclass clazz, jint program) { + glUseProgram(program); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglValidateProgram(JNIEnv *env, jclass clazz, jint program) { + glValidateProgram(program); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglVertexAttrib1f(JNIEnv *env, jclass clazz, jint indx, jfloat x) { + glVertexAttrib1f(indx, x); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglVertexAttrib1fv(JNIEnv *env, jclass clazz, jint indx, jlong values) { + const GLfloat *values_address = (const GLfloat *)(intptr_t)values; + glVertexAttrib1fv(indx, values_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglVertexAttrib2f(JNIEnv *env, jclass clazz, jint indx, jfloat x, jfloat y) { + glVertexAttrib2f(indx, x, y); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglVertexAttrib2fv(JNIEnv *env, jclass clazz, jint indx, jlong values) { + const GLfloat *values_address = (const GLfloat *)(intptr_t)values; + glVertexAttrib2fv(indx, values_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglVertexAttrib3f(JNIEnv *env, jclass clazz, jint indx, jfloat x, jfloat y, jfloat z) { + glVertexAttrib3f(indx, x, y, z); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglVertexAttrib3fv(JNIEnv *env, jclass clazz, jint indx, jlong values) { + const GLfloat *values_address = (const GLfloat *)(intptr_t)values; + glVertexAttrib3fv(indx, values_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglVertexAttrib4f(JNIEnv *env, jclass clazz, jint indx, jfloat x, jfloat y, jfloat z, jfloat w) { + glVertexAttrib4f(indx, x, y, z, w); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglVertexAttrib4fv(JNIEnv *env, jclass clazz, jint indx, jlong values) { + const GLfloat *values_address = (const GLfloat *)(intptr_t)values; + glVertexAttrib4fv(indx, values_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglVertexAttribPointer(JNIEnv *env, jclass clazz, jint index, jint size, jint type, jboolean normalized, jint stride, jlong buffer) { + const GLvoid *buffer_address = (const GLvoid *)(intptr_t)buffer; + glVertexAttribPointer(index, size, type, normalized, stride, buffer_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglVertexAttribPointerBO(JNIEnv *env, jclass clazz, jint index, jint size, jint type, jboolean normalized, jint stride, jlong buffer_buffer_offset) { + const GLvoid *buffer_address = (const GLvoid *)(intptr_t)offsetToPointer(buffer_buffer_offset); + glVertexAttribPointer(index, size, type, normalized, stride, buffer_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES20_nglViewport(JNIEnv *env, jclass clazz, jint x, jint y, jint width, jint height) { + glViewport(x, y, width, height); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_GLES20_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglActiveTexture", "(I)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglActiveTexture, "glActiveTexture", (void *)&glActiveTexture, false}, + {"nglAttachShader", "(II)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglAttachShader, "glAttachShader", (void *)&glAttachShader, false}, + {"nglBindAttribLocation", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglBindAttribLocation, "glBindAttribLocation", (void *)&glBindAttribLocation, false}, + {"nglBindBuffer", "(II)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglBindBuffer, "glBindBuffer", (void *)&glBindBuffer, false}, + {"nglBindFramebuffer", "(II)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglBindFramebuffer, "glBindFramebuffer", (void *)&glBindFramebuffer, false}, + {"nglBindRenderbuffer", "(II)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglBindRenderbuffer, "glBindRenderbuffer", (void *)&glBindRenderbuffer, false}, + {"nglBindTexture", "(II)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglBindTexture, "glBindTexture", (void *)&glBindTexture, false}, + {"nglBlendColor", "(FFFF)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglBlendColor, "glBlendColor", (void *)&glBlendColor, false}, + {"nglBlendEquation", "(I)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglBlendEquation, "glBlendEquation", (void *)&glBlendEquation, false}, + {"nglBlendEquationSeparate", "(II)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglBlendEquationSeparate, "glBlendEquationSeparate", (void *)&glBlendEquationSeparate, false}, + {"nglBlendFunc", "(II)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglBlendFunc, "glBlendFunc", (void *)&glBlendFunc, false}, + {"nglBlendFuncSeparate", "(IIII)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglBlendFuncSeparate, "glBlendFuncSeparate", (void *)&glBlendFuncSeparate, false}, + {"nglBufferData", "(IJJI)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglBufferData, "glBufferData", (void *)&glBufferData, false}, + {"nglBufferSubData", "(IJJJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglBufferSubData, "glBufferSubData", (void *)&glBufferSubData, false}, + {"nglCheckFramebufferStatus", "(I)I", (void *)&Java_org_lwjgl_opengles_GLES20_nglCheckFramebufferStatus, "glCheckFramebufferStatus", (void *)&glCheckFramebufferStatus, false}, + {"nglClear", "(I)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglClear, "glClear", (void *)&glClear, false}, + {"nglClearColor", "(FFFF)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglClearColor, "glClearColor", (void *)&glClearColor, false}, + {"nglClearDepthf", "(F)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglClearDepthf, "glClearDepthf", (void *)&glClearDepthf, false}, + {"nglClearStencil", "(I)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglClearStencil, "glClearStencil", (void *)&glClearStencil, false}, + {"nglColorMask", "(ZZZZ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglColorMask, "glColorMask", (void *)&glColorMask, false}, + {"nglCompileShader", "(I)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglCompileShader, "glCompileShader", (void *)&glCompileShader, false}, + {"nglCompressedTexImage2D", "(IIIIIIIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglCompressedTexImage2D, "glCompressedTexImage2D", (void *)&glCompressedTexImage2D, false}, + {"nglCompressedTexSubImage2D", "(IIIIIIIIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglCompressedTexSubImage2D, "glCompressedTexSubImage2D", (void *)&glCompressedTexSubImage2D, false}, + {"nglCopyTexImage2D", "(IIIIIIII)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglCopyTexImage2D, "glCopyTexImage2D", (void *)&glCopyTexImage2D, false}, + {"nglCopyTexSubImage2D", "(IIIIIIII)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglCopyTexSubImage2D, "glCopyTexSubImage2D", (void *)&glCopyTexSubImage2D, false}, + {"nglCreateProgram", "()I", (void *)&Java_org_lwjgl_opengles_GLES20_nglCreateProgram, "glCreateProgram", (void *)&glCreateProgram, false}, + {"nglCreateShader", "(I)I", (void *)&Java_org_lwjgl_opengles_GLES20_nglCreateShader, "glCreateShader", (void *)&glCreateShader, false}, + {"nglCullFace", "(I)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglCullFace, "glCullFace", (void *)&glCullFace, false}, + {"nglDeleteBuffers", "(IJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglDeleteBuffers, "glDeleteBuffers", (void *)&glDeleteBuffers, false}, + {"nglDeleteFramebuffers", "(IJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglDeleteFramebuffers, "glDeleteFramebuffers", (void *)&glDeleteFramebuffers, false}, + {"nglDeleteProgram", "(I)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglDeleteProgram, "glDeleteProgram", (void *)&glDeleteProgram, false}, + {"nglDeleteRenderbuffers", "(IJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglDeleteRenderbuffers, "glDeleteRenderbuffers", (void *)&glDeleteRenderbuffers, false}, + {"nglDeleteShader", "(I)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglDeleteShader, "glDeleteShader", (void *)&glDeleteShader, false}, + {"nglDeleteTextures", "(IJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglDeleteTextures, "glDeleteTextures", (void *)&glDeleteTextures, false}, + {"nglDepthFunc", "(I)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglDepthFunc, "glDepthFunc", (void *)&glDepthFunc, false}, + {"nglDepthMask", "(Z)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglDepthMask, "glDepthMask", (void *)&glDepthMask, false}, + {"nglDepthRangef", "(FF)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglDepthRangef, "glDepthRangef", (void *)&glDepthRangef, false}, + {"nglDetachShader", "(II)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglDetachShader, "glDetachShader", (void *)&glDetachShader, false}, + {"nglDisable", "(I)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglDisable, "glDisable", (void *)&glDisable, false}, + {"nglDisableVertexAttribArray", "(I)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglDisableVertexAttribArray, "glDisableVertexAttribArray", (void *)&glDisableVertexAttribArray, false}, + {"nglDrawArrays", "(III)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglDrawArrays, "glDrawArrays", (void *)&glDrawArrays, false}, + {"nglDrawElements", "(IIIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglDrawElements, "glDrawElements", (void *)&glDrawElements, false}, + {"nglDrawElementsBO", "(IIIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglDrawElementsBO, "glDrawElements", (void *)&glDrawElements, false}, + {"nglEnable", "(I)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglEnable, "glEnable", (void *)&glEnable, false}, + {"nglEnableVertexAttribArray", "(I)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglEnableVertexAttribArray, "glEnableVertexAttribArray", (void *)&glEnableVertexAttribArray, false}, + {"nglFinish", "()V", (void *)&Java_org_lwjgl_opengles_GLES20_nglFinish, "glFinish", (void *)&glFinish, false}, + {"nglFlush", "()V", (void *)&Java_org_lwjgl_opengles_GLES20_nglFlush, "glFlush", (void *)&glFlush, false}, + {"nglFramebufferRenderbuffer", "(IIII)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglFramebufferRenderbuffer, "glFramebufferRenderbuffer", (void *)&glFramebufferRenderbuffer, false}, + {"nglFramebufferTexture2D", "(IIIII)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglFramebufferTexture2D, "glFramebufferTexture2D", (void *)&glFramebufferTexture2D, false}, + {"nglFrontFace", "(I)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglFrontFace, "glFrontFace", (void *)&glFrontFace, false}, + {"nglGenBuffers", "(IJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglGenBuffers, "glGenBuffers", (void *)&glGenBuffers, false}, + {"nglGenerateMipmap", "(I)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglGenerateMipmap, "glGenerateMipmap", (void *)&glGenerateMipmap, false}, + {"nglGenFramebuffers", "(IJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglGenFramebuffers, "glGenFramebuffers", (void *)&glGenFramebuffers, false}, + {"nglGenRenderbuffers", "(IJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglGenRenderbuffers, "glGenRenderbuffers", (void *)&glGenRenderbuffers, false}, + {"nglGenTextures", "(IJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglGenTextures, "glGenTextures", (void *)&glGenTextures, false}, + {"nglGetActiveAttrib", "(IIIJJJJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglGetActiveAttrib, "glGetActiveAttrib", (void *)&glGetActiveAttrib, false}, + {"nglGetActiveUniform", "(IIIJJJJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglGetActiveUniform, "glGetActiveUniform", (void *)&glGetActiveUniform, false}, + {"nglGetAttachedShaders", "(IIJJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglGetAttachedShaders, "glGetAttachedShaders", (void *)&glGetAttachedShaders, false}, + {"nglGetAttribLocation", "(IJ)I", (void *)&Java_org_lwjgl_opengles_GLES20_nglGetAttribLocation, "glGetAttribLocation", (void *)&glGetAttribLocation, false}, + {"nglGetBooleanv", "(IJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglGetBooleanv, "glGetBooleanv", (void *)&glGetBooleanv, false}, + {"nglGetBufferParameteriv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglGetBufferParameteriv, "glGetBufferParameteriv", (void *)&glGetBufferParameteriv, false}, + {"nglGetError", "()I", (void *)&Java_org_lwjgl_opengles_GLES20_nglGetError, "glGetError", (void *)&glGetError, false}, + {"nglGetFloatv", "(IJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglGetFloatv, "glGetFloatv", (void *)&glGetFloatv, false}, + {"nglGetFramebufferAttachmentParameteriv", "(IIIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglGetFramebufferAttachmentParameteriv, "glGetFramebufferAttachmentParameteriv", (void *)&glGetFramebufferAttachmentParameteriv, false}, + {"nglGetIntegerv", "(IJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglGetIntegerv, "glGetIntegerv", (void *)&glGetIntegerv, false}, + {"nglGetProgramiv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglGetProgramiv, "glGetProgramiv", (void *)&glGetProgramiv, false}, + {"nglGetProgramInfoLog", "(IIJJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglGetProgramInfoLog, "glGetProgramInfoLog", (void *)&glGetProgramInfoLog, false}, + {"nglGetRenderbufferParameteriv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglGetRenderbufferParameteriv, "glGetRenderbufferParameteriv", (void *)&glGetRenderbufferParameteriv, false}, + {"nglGetShaderiv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglGetShaderiv, "glGetShaderiv", (void *)&glGetShaderiv, false}, + {"nglGetShaderInfoLog", "(IIJJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglGetShaderInfoLog, "glGetShaderInfoLog", (void *)&glGetShaderInfoLog, false}, + {"nglGetShaderPrecisionFormat", "(IIJJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglGetShaderPrecisionFormat, "glGetShaderPrecisionFormat", (void *)&glGetShaderPrecisionFormat, false}, + {"nglGetShaderSource", "(IIJJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglGetShaderSource, "glGetShaderSource", (void *)&glGetShaderSource, false}, + {"nglGetString", "(I)Ljava/lang/String;", (void *)&Java_org_lwjgl_opengles_GLES20_nglGetString, "glGetString", (void *)&glGetString, false}, + {"nglGetTexParameterfv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglGetTexParameterfv, "glGetTexParameterfv", (void *)&glGetTexParameterfv, false}, + {"nglGetTexParameteriv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglGetTexParameteriv, "glGetTexParameteriv", (void *)&glGetTexParameteriv, false}, + {"nglGetUniformfv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglGetUniformfv, "glGetUniformfv", (void *)&glGetUniformfv, false}, + {"nglGetUniformiv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglGetUniformiv, "glGetUniformiv", (void *)&glGetUniformiv, false}, + {"nglGetUniformLocation", "(IJ)I", (void *)&Java_org_lwjgl_opengles_GLES20_nglGetUniformLocation, "glGetUniformLocation", (void *)&glGetUniformLocation, false}, + {"nglGetVertexAttribfv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglGetVertexAttribfv, "glGetVertexAttribfv", (void *)&glGetVertexAttribfv, false}, + {"nglGetVertexAttribiv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglGetVertexAttribiv, "glGetVertexAttribiv", (void *)&glGetVertexAttribiv, false}, + {"nglGetVertexAttribPointerv", "(IIJ)Ljava/nio/ByteBuffer;", (void *)&Java_org_lwjgl_opengles_GLES20_nglGetVertexAttribPointerv, "glGetVertexAttribPointerv", (void *)&glGetVertexAttribPointerv, false}, + {"nglHint", "(II)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglHint, "glHint", (void *)&glHint, false}, + {"nglIsBuffer", "(I)Z", (void *)&Java_org_lwjgl_opengles_GLES20_nglIsBuffer, "glIsBuffer", (void *)&glIsBuffer, false}, + {"nglIsEnabled", "(I)Z", (void *)&Java_org_lwjgl_opengles_GLES20_nglIsEnabled, "glIsEnabled", (void *)&glIsEnabled, false}, + {"nglIsFramebuffer", "(I)Z", (void *)&Java_org_lwjgl_opengles_GLES20_nglIsFramebuffer, "glIsFramebuffer", (void *)&glIsFramebuffer, false}, + {"nglIsProgram", "(I)Z", (void *)&Java_org_lwjgl_opengles_GLES20_nglIsProgram, "glIsProgram", (void *)&glIsProgram, false}, + {"nglIsRenderbuffer", "(I)Z", (void *)&Java_org_lwjgl_opengles_GLES20_nglIsRenderbuffer, "glIsRenderbuffer", (void *)&glIsRenderbuffer, false}, + {"nglIsShader", "(I)Z", (void *)&Java_org_lwjgl_opengles_GLES20_nglIsShader, "glIsShader", (void *)&glIsShader, false}, + {"nglIsTexture", "(I)Z", (void *)&Java_org_lwjgl_opengles_GLES20_nglIsTexture, "glIsTexture", (void *)&glIsTexture, false}, + {"nglLineWidth", "(F)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglLineWidth, "glLineWidth", (void *)&glLineWidth, false}, + {"nglLinkProgram", "(I)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglLinkProgram, "glLinkProgram", (void *)&glLinkProgram, false}, + {"nglPixelStorei", "(II)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglPixelStorei, "glPixelStorei", (void *)&glPixelStorei, false}, + {"nglPolygonOffset", "(FF)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglPolygonOffset, "glPolygonOffset", (void *)&glPolygonOffset, false}, + {"nglReadPixels", "(IIIIIIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglReadPixels, "glReadPixels", (void *)&glReadPixels, false}, + {"nglReleaseShaderCompiler", "()V", (void *)&Java_org_lwjgl_opengles_GLES20_nglReleaseShaderCompiler, "glReleaseShaderCompiler", (void *)&glReleaseShaderCompiler, false}, + {"nglRenderbufferStorage", "(IIII)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglRenderbufferStorage, "glRenderbufferStorage", (void *)&glRenderbufferStorage, false}, + {"nglSampleCoverage", "(FZ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglSampleCoverage, "glSampleCoverage", (void *)&glSampleCoverage, false}, + {"nglScissor", "(IIII)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglScissor, "glScissor", (void *)&glScissor, false}, + {"nglShaderBinary", "(IJIJI)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglShaderBinary, "glShaderBinary", (void *)&glShaderBinary, false}, + {"nglShaderSource", "(IIJI)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglShaderSource, "glShaderSource", (void *)&glShaderSource, false}, + {"nglShaderSource3", "(IIJJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglShaderSource3, "glShaderSource", (void *)&glShaderSource, false}, + {"nglStencilFunc", "(III)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglStencilFunc, "glStencilFunc", (void *)&glStencilFunc, false}, + {"nglStencilFuncSeparate", "(IIII)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglStencilFuncSeparate, "glStencilFuncSeparate", (void *)&glStencilFuncSeparate, false}, + {"nglStencilMask", "(I)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglStencilMask, "glStencilMask", (void *)&glStencilMask, false}, + {"nglStencilMaskSeparate", "(II)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglStencilMaskSeparate, "glStencilMaskSeparate", (void *)&glStencilMaskSeparate, false}, + {"nglStencilOp", "(III)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglStencilOp, "glStencilOp", (void *)&glStencilOp, false}, + {"nglStencilOpSeparate", "(IIII)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglStencilOpSeparate, "glStencilOpSeparate", (void *)&glStencilOpSeparate, false}, + {"nglTexImage2D", "(IIIIIIIIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglTexImage2D, "glTexImage2D", (void *)&glTexImage2D, false}, + {"nglTexParameterf", "(IIF)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglTexParameterf, "glTexParameterf", (void *)&glTexParameterf, false}, + {"nglTexParameterfv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglTexParameterfv, "glTexParameterfv", (void *)&glTexParameterfv, false}, + {"nglTexParameteri", "(III)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglTexParameteri, "glTexParameteri", (void *)&glTexParameteri, false}, + {"nglTexParameteriv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglTexParameteriv, "glTexParameteriv", (void *)&glTexParameteriv, false}, + {"nglTexSubImage2D", "(IIIIIIIIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglTexSubImage2D, "glTexSubImage2D", (void *)&glTexSubImage2D, false}, + {"nglUniform1f", "(IF)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglUniform1f, "glUniform1f", (void *)&glUniform1f, false}, + {"nglUniform1fv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglUniform1fv, "glUniform1fv", (void *)&glUniform1fv, false}, + {"nglUniform1i", "(II)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglUniform1i, "glUniform1i", (void *)&glUniform1i, false}, + {"nglUniform1iv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglUniform1iv, "glUniform1iv", (void *)&glUniform1iv, false}, + {"nglUniform2f", "(IFF)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglUniform2f, "glUniform2f", (void *)&glUniform2f, false}, + {"nglUniform2fv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglUniform2fv, "glUniform2fv", (void *)&glUniform2fv, false}, + {"nglUniform2i", "(III)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglUniform2i, "glUniform2i", (void *)&glUniform2i, false}, + {"nglUniform2iv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglUniform2iv, "glUniform2iv", (void *)&glUniform2iv, false}, + {"nglUniform3f", "(IFFF)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglUniform3f, "glUniform3f", (void *)&glUniform3f, false}, + {"nglUniform3fv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglUniform3fv, "glUniform3fv", (void *)&glUniform3fv, false}, + {"nglUniform3i", "(IIII)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglUniform3i, "glUniform3i", (void *)&glUniform3i, false}, + {"nglUniform3iv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglUniform3iv, "glUniform3iv", (void *)&glUniform3iv, false}, + {"nglUniform4f", "(IFFFF)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglUniform4f, "glUniform4f", (void *)&glUniform4f, false}, + {"nglUniform4fv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglUniform4fv, "glUniform4fv", (void *)&glUniform4fv, false}, + {"nglUniform4i", "(IIIII)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglUniform4i, "glUniform4i", (void *)&glUniform4i, false}, + {"nglUniform4iv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglUniform4iv, "glUniform4iv", (void *)&glUniform4iv, false}, + {"nglUniformMatrix2fv", "(IIZJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglUniformMatrix2fv, "glUniformMatrix2fv", (void *)&glUniformMatrix2fv, false}, + {"nglUniformMatrix3fv", "(IIZJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglUniformMatrix3fv, "glUniformMatrix3fv", (void *)&glUniformMatrix3fv, false}, + {"nglUniformMatrix4fv", "(IIZJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglUniformMatrix4fv, "glUniformMatrix4fv", (void *)&glUniformMatrix4fv, false}, + {"nglUseProgram", "(I)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglUseProgram, "glUseProgram", (void *)&glUseProgram, false}, + {"nglValidateProgram", "(I)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglValidateProgram, "glValidateProgram", (void *)&glValidateProgram, false}, + {"nglVertexAttrib1f", "(IF)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglVertexAttrib1f, "glVertexAttrib1f", (void *)&glVertexAttrib1f, false}, + {"nglVertexAttrib1fv", "(IJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglVertexAttrib1fv, "glVertexAttrib1fv", (void *)&glVertexAttrib1fv, false}, + {"nglVertexAttrib2f", "(IFF)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglVertexAttrib2f, "glVertexAttrib2f", (void *)&glVertexAttrib2f, false}, + {"nglVertexAttrib2fv", "(IJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglVertexAttrib2fv, "glVertexAttrib2fv", (void *)&glVertexAttrib2fv, false}, + {"nglVertexAttrib3f", "(IFFF)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglVertexAttrib3f, "glVertexAttrib3f", (void *)&glVertexAttrib3f, false}, + {"nglVertexAttrib3fv", "(IJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglVertexAttrib3fv, "glVertexAttrib3fv", (void *)&glVertexAttrib3fv, false}, + {"nglVertexAttrib4f", "(IFFFF)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglVertexAttrib4f, "glVertexAttrib4f", (void *)&glVertexAttrib4f, false}, + {"nglVertexAttrib4fv", "(IJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglVertexAttrib4fv, "glVertexAttrib4fv", (void *)&glVertexAttrib4fv, false}, + {"nglVertexAttribPointer", "(IIIZIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglVertexAttribPointer, "glVertexAttribPointer", (void *)&glVertexAttribPointer, false}, + {"nglVertexAttribPointerBO", "(IIIZIJ)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglVertexAttribPointerBO, "glVertexAttribPointer", (void *)&glVertexAttribPointer, false}, + {"nglViewport", "(IIII)V", (void *)&Java_org_lwjgl_opengles_GLES20_nglViewport, "glViewport", (void *)&glViewport, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_GLES30.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_GLES30.c new file mode 100644 index 0000000..315749c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_GLES30.c @@ -0,0 +1,885 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glReadBufferPROC) (GLenum mode); +typedef GL_APICALL void (GL_APIENTRY *glDrawRangeElementsPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid * indices); +typedef GL_APICALL void (GL_APIENTRY *glTexImage3DPROC) (GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels); +typedef GL_APICALL void (GL_APIENTRY *glTexSubImage3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels); +typedef GL_APICALL void (GL_APIENTRY *glCopyTexSubImage3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef GL_APICALL void (GL_APIENTRY *glCompressedTexImage3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data); +typedef GL_APICALL void (GL_APIENTRY *glCompressedTexSubImage3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data); +typedef GL_APICALL void (GL_APIENTRY *glGenQueriesPROC) (GLsizei n, GLuint * ids); +typedef GL_APICALL void (GL_APIENTRY *glDeleteQueriesPROC) (GLsizei n, GLuint * ids); +typedef GL_APICALL GLboolean (GL_APIENTRY *glIsQueryPROC) (GLuint id); +typedef GL_APICALL void (GL_APIENTRY *glBeginQueryPROC) (GLenum target, GLuint id); +typedef GL_APICALL void (GL_APIENTRY *glEndQueryPROC) (GLenum target); +typedef GL_APICALL void (GL_APIENTRY *glGetQueryivPROC) (GLenum target, GLenum pname, GLint * params); +typedef GL_APICALL void (GL_APIENTRY *glGetQueryObjectuivPROC) (GLenum id, GLenum pname, GLuint * params); +typedef GL_APICALL GLboolean (GL_APIENTRY *glUnmapBufferPROC) (GLenum target); +typedef GL_APICALL void (GL_APIENTRY *glGetBufferPointervPROC) (GLenum target, GLenum pname, GLvoid ** pointer); +typedef GL_APICALL void (GL_APIENTRY *glDrawBuffersPROC) (GLsizei size, const GLenum * buffers); +typedef GL_APICALL void (GL_APIENTRY *glUniformMatrix2x3fvPROC) (GLint location, GLsizei count, GLboolean transpose, GLfloat * matrices); +typedef GL_APICALL void (GL_APIENTRY *glUniformMatrix3x2fvPROC) (GLint location, GLsizei count, GLboolean transpose, GLfloat * matrices); +typedef GL_APICALL void (GL_APIENTRY *glUniformMatrix2x4fvPROC) (GLint location, GLsizei count, GLboolean transpose, GLfloat * matrices); +typedef GL_APICALL void (GL_APIENTRY *glUniformMatrix4x2fvPROC) (GLint location, GLsizei count, GLboolean transpose, GLfloat * matrices); +typedef GL_APICALL void (GL_APIENTRY *glUniformMatrix3x4fvPROC) (GLint location, GLsizei count, GLboolean transpose, GLfloat * matrices); +typedef GL_APICALL void (GL_APIENTRY *glUniformMatrix4x3fvPROC) (GLint location, GLsizei count, GLboolean transpose, GLfloat * matrices); +typedef GL_APICALL void (GL_APIENTRY *glBlitFramebufferPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); +typedef GL_APICALL void (GL_APIENTRY *glRenderbufferStorageMultisamplePROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef GL_APICALL void (GL_APIENTRY *glFramebufferTextureLayerPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +typedef GL_APICALL GLvoid * (GL_APIENTRY *glMapBufferRangePROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); +typedef GL_APICALL void (GL_APIENTRY *glFlushMappedBufferRangePROC) (GLenum target, GLintptr offset, GLsizeiptr length); +typedef GL_APICALL void (GL_APIENTRY *glBindVertexArrayPROC) (GLuint array); +typedef GL_APICALL void (GL_APIENTRY *glDeleteVertexArraysPROC) (GLsizei n, const GLuint * arrays); +typedef GL_APICALL void (GL_APIENTRY *glGenVertexArraysPROC) (GLsizei n, GLuint * arrays); +typedef GL_APICALL GLboolean (GL_APIENTRY *glIsVertexArrayPROC) (GLuint array); +typedef GL_APICALL void (GL_APIENTRY *glGetIntegeri_vPROC) (GLenum value, GLuint index, GLint * data); +typedef GL_APICALL void (GL_APIENTRY *glBeginTransformFeedbackPROC) (GLenum primitiveMode); +typedef GL_APICALL void (GL_APIENTRY *glEndTransformFeedbackPROC) (); +typedef GL_APICALL void (GL_APIENTRY *glBindBufferRangePROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); +typedef GL_APICALL void (GL_APIENTRY *glBindBufferBasePROC) (GLenum target, GLuint index, GLuint buffer); +typedef GL_APICALL void (GL_APIENTRY *glTransformFeedbackVaryingsPROC) (GLuint program, GLsizei count, const GLchar ** varyings, GLenum bufferMode); +typedef GL_APICALL void (GL_APIENTRY *glGetTransformFeedbackVaryingPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei * length, GLsizei * size, GLenum * type, GLchar * name); +typedef GL_APICALL void (GL_APIENTRY *glVertexAttribIPointerPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid * buffer); +typedef GL_APICALL void (GL_APIENTRY *glGetVertexAttribIivPROC) (GLuint index, GLenum pname, GLint * params); +typedef GL_APICALL void (GL_APIENTRY *glGetVertexAttribIuivPROC) (GLuint index, GLenum pname, GLuint * params); +typedef GL_APICALL void (GL_APIENTRY *glVertexAttribI4iPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); +typedef GL_APICALL void (GL_APIENTRY *glVertexAttribI4uiPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); +typedef GL_APICALL void (GL_APIENTRY *glVertexAttribI4ivPROC) (GLuint index, const GLint * v); +typedef GL_APICALL void (GL_APIENTRY *glVertexAttribI4uivPROC) (GLuint index, const GLuint * v); +typedef GL_APICALL void (GL_APIENTRY *glGetUniformuivPROC) (GLuint program, GLint location, GLuint * params); +typedef GL_APICALL GLint (GL_APIENTRY *glGetFragDataLocationPROC) (GLuint program, const GLchar * name); +typedef GL_APICALL void (GL_APIENTRY *glUniform1uiPROC) (GLint location, GLuint v0); +typedef GL_APICALL void (GL_APIENTRY *glUniform2uiPROC) (GLint location, GLuint v0, GLuint v1); +typedef GL_APICALL void (GL_APIENTRY *glUniform3uiPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); +typedef GL_APICALL void (GL_APIENTRY *glUniform4uiPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); +typedef GL_APICALL void (GL_APIENTRY *glUniform1uivPROC) (GLint location, GLsizei count, const GLuint * value); +typedef GL_APICALL void (GL_APIENTRY *glUniform2uivPROC) (GLint location, GLsizei count, const GLuint * value); +typedef GL_APICALL void (GL_APIENTRY *glUniform3uivPROC) (GLint location, GLsizei count, const GLuint * value); +typedef GL_APICALL void (GL_APIENTRY *glUniform4uivPROC) (GLint location, GLsizei count, const GLuint * value); +typedef GL_APICALL void (GL_APIENTRY *glClearBufferfvPROC) (GLenum buffer, GLint drawbuffer, const GLfloat * value); +typedef GL_APICALL void (GL_APIENTRY *glClearBufferivPROC) (GLenum buffer, GLint drawbuffer, const GLint * value); +typedef GL_APICALL void (GL_APIENTRY *glClearBufferuivPROC) (GLenum buffer, GLint drawbuffer, const GLint * value); +typedef GL_APICALL void (GL_APIENTRY *glClearBufferfiPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); +typedef GL_APICALL GLubyte * (GL_APIENTRY *glGetStringiPROC) (GLenum name, GLuint index); +typedef GL_APICALL void (GL_APIENTRY *glCopyBufferSubDataPROC) (GLenum readtarget, GLenum writetarget, GLintptr readoffset, GLintptr writeoffset, GLsizeiptr size); +typedef GL_APICALL void (GL_APIENTRY *glGetUniformIndicesPROC) (GLuint program, GLsizei uniformCount, const GLchar ** uniformNames, GLuint * uniformIndices); +typedef GL_APICALL void (GL_APIENTRY *glGetActiveUniformsivPROC) (GLuint program, GLsizei uniformCount, const GLuint * uniformIndices, GLenum pname, GLint * params); +typedef GL_APICALL GLuint (GL_APIENTRY *glGetUniformBlockIndexPROC) (GLuint program, const GLchar * uniformBlockName); +typedef GL_APICALL void (GL_APIENTRY *glGetActiveUniformBlockivPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint * params); +typedef GL_APICALL void (GL_APIENTRY *glGetActiveUniformBlockNamePROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei * length, GLchar * uniformBlockName); +typedef GL_APICALL void (GL_APIENTRY *glUniformBlockBindingPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); +typedef GL_APICALL void (GL_APIENTRY *glDrawArraysInstancedPROC) (GLenum mode, GLint first, GLsizei count, GLsizei primcount); +typedef GL_APICALL void (GL_APIENTRY *glDrawElementsInstancedPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid * indices, GLsizei primcount); +typedef GL_APICALL GLsync (GL_APIENTRY *glFenceSyncPROC) (GLenum condition, GLbitfield flags); +typedef GL_APICALL GLboolean (GL_APIENTRY *glIsSyncPROC) (GLsync sync); +typedef GL_APICALL void (GL_APIENTRY *glDeleteSyncPROC) (GLsync sync); +typedef GL_APICALL GLenum (GL_APIENTRY *glClientWaitSyncPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef GL_APICALL void (GL_APIENTRY *glWaitSyncPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); +typedef GL_APICALL void (GL_APIENTRY *glGetInteger64vPROC) (GLenum pname, GLint64 * data); +typedef GL_APICALL void (GL_APIENTRY *glGetInteger64i_vPROC) (GLenum value, GLuint index, GLint64 * data); +typedef GL_APICALL void (GL_APIENTRY *glGetSyncivPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei * length, GLint * values); +typedef GL_APICALL void (GL_APIENTRY *glGetBufferParameteri64vPROC) (GLenum target, GLenum pname, GLint64 * params); +typedef GL_APICALL void (GL_APIENTRY *glGenSamplersPROC) (GLsizei count, GLuint * samplers); +typedef GL_APICALL void (GL_APIENTRY *glDeleteSamplersPROC) (GLsizei count, const GLuint * samplers); +typedef GL_APICALL GLboolean (GL_APIENTRY *glIsSamplerPROC) (GLuint sampler); +typedef GL_APICALL void (GL_APIENTRY *glBindSamplerPROC) (GLenum unit, GLuint sampler); +typedef GL_APICALL void (GL_APIENTRY *glSamplerParameteriPROC) (GLuint sampler, GLenum pname, GLint param); +typedef GL_APICALL void (GL_APIENTRY *glSamplerParameterfPROC) (GLuint sampler, GLenum pname, GLfloat param); +typedef GL_APICALL void (GL_APIENTRY *glSamplerParameterivPROC) (GLuint sampler, GLenum pname, const GLint * params); +typedef GL_APICALL void (GL_APIENTRY *glSamplerParameterfvPROC) (GLuint sampler, GLenum pname, const GLfloat * params); +typedef GL_APICALL void (GL_APIENTRY *glGetSamplerParameterivPROC) (GLuint sampler, GLenum pname, GLint * params); +typedef GL_APICALL void (GL_APIENTRY *glGetSamplerParameterfvPROC) (GLuint sampler, GLenum pname, GLfloat * params); +typedef GL_APICALL void (GL_APIENTRY *glVertexAttribDivisorPROC) (GLuint index, GLuint divisor); +typedef GL_APICALL void (GL_APIENTRY *glBindTransformFeedbackPROC) (GLenum target, GLuint id); +typedef GL_APICALL void (GL_APIENTRY *glDeleteTransformFeedbacksPROC) (GLsizei n, const GLuint * ids); +typedef GL_APICALL void (GL_APIENTRY *glGenTransformFeedbacksPROC) (GLsizei n, GLuint * ids); +typedef GL_APICALL GLboolean (GL_APIENTRY *glIsTransformFeedbackPROC) (GLuint id); +typedef GL_APICALL void (GL_APIENTRY *glPauseTransformFeedbackPROC) (); +typedef GL_APICALL void (GL_APIENTRY *glResumeTransformFeedbackPROC) (); +typedef GL_APICALL void (GL_APIENTRY *glGetProgramBinaryPROC) (GLuint program, GLsizei bufSize, GLsizei * length, GLenum * binaryFormat, GLvoid * binary); +typedef GL_APICALL void (GL_APIENTRY *glProgramBinaryPROC) (GLuint program, GLenum binaryFormat, const GLvoid * binary, GLsizei length); +typedef GL_APICALL void (GL_APIENTRY *glProgramParameteriPROC) (GLuint program, GLenum pname, GLint value); +typedef GL_APICALL void (GL_APIENTRY *glInvalidateFramebufferPROC) (GLenum target, GLsizei numAttachments, const GLenum * attachments); +typedef GL_APICALL void (GL_APIENTRY *glInvalidateSubFramebufferPROC) (GLenum target, GLsizei numAttachments, const GLenum * attachments, GLint x, GLint y, GLsizei width, GLsizei height); +typedef GL_APICALL void (GL_APIENTRY *glTexStorage2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); +typedef GL_APICALL void (GL_APIENTRY *glTexStorage3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); +typedef GL_APICALL void (GL_APIENTRY *glGetInternalformativPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint * params); + +static glReadBufferPROC glReadBuffer; +static glDrawRangeElementsPROC glDrawRangeElements; +static glTexImage3DPROC glTexImage3D; +static glTexSubImage3DPROC glTexSubImage3D; +static glCopyTexSubImage3DPROC glCopyTexSubImage3D; +static glCompressedTexImage3DPROC glCompressedTexImage3D; +static glCompressedTexSubImage3DPROC glCompressedTexSubImage3D; +static glGenQueriesPROC glGenQueries; +static glDeleteQueriesPROC glDeleteQueries; +static glIsQueryPROC glIsQuery; +static glBeginQueryPROC glBeginQuery; +static glEndQueryPROC glEndQuery; +static glGetQueryivPROC glGetQueryiv; +static glGetQueryObjectuivPROC glGetQueryObjectuiv; +static glUnmapBufferPROC glUnmapBuffer; +static glGetBufferPointervPROC glGetBufferPointerv; +static glDrawBuffersPROC glDrawBuffers; +static glUniformMatrix2x3fvPROC glUniformMatrix2x3fv; +static glUniformMatrix3x2fvPROC glUniformMatrix3x2fv; +static glUniformMatrix2x4fvPROC glUniformMatrix2x4fv; +static glUniformMatrix4x2fvPROC glUniformMatrix4x2fv; +static glUniformMatrix3x4fvPROC glUniformMatrix3x4fv; +static glUniformMatrix4x3fvPROC glUniformMatrix4x3fv; +static glBlitFramebufferPROC glBlitFramebuffer; +static glRenderbufferStorageMultisamplePROC glRenderbufferStorageMultisample; +static glFramebufferTextureLayerPROC glFramebufferTextureLayer; +static glMapBufferRangePROC glMapBufferRange; +static glFlushMappedBufferRangePROC glFlushMappedBufferRange; +static glBindVertexArrayPROC glBindVertexArray; +static glDeleteVertexArraysPROC glDeleteVertexArrays; +static glGenVertexArraysPROC glGenVertexArrays; +static glIsVertexArrayPROC glIsVertexArray; +static glGetIntegeri_vPROC glGetIntegeri_v; +static glBeginTransformFeedbackPROC glBeginTransformFeedback; +static glEndTransformFeedbackPROC glEndTransformFeedback; +static glBindBufferRangePROC glBindBufferRange; +static glBindBufferBasePROC glBindBufferBase; +static glTransformFeedbackVaryingsPROC glTransformFeedbackVaryings; +static glGetTransformFeedbackVaryingPROC glGetTransformFeedbackVarying; +static glVertexAttribIPointerPROC glVertexAttribIPointer; +static glGetVertexAttribIivPROC glGetVertexAttribIiv; +static glGetVertexAttribIuivPROC glGetVertexAttribIuiv; +static glVertexAttribI4iPROC glVertexAttribI4i; +static glVertexAttribI4uiPROC glVertexAttribI4ui; +static glVertexAttribI4ivPROC glVertexAttribI4iv; +static glVertexAttribI4uivPROC glVertexAttribI4uiv; +static glGetUniformuivPROC glGetUniformuiv; +static glGetFragDataLocationPROC glGetFragDataLocation; +static glUniform1uiPROC glUniform1ui; +static glUniform2uiPROC glUniform2ui; +static glUniform3uiPROC glUniform3ui; +static glUniform4uiPROC glUniform4ui; +static glUniform1uivPROC glUniform1uiv; +static glUniform2uivPROC glUniform2uiv; +static glUniform3uivPROC glUniform3uiv; +static glUniform4uivPROC glUniform4uiv; +static glClearBufferfvPROC glClearBufferfv; +static glClearBufferivPROC glClearBufferiv; +static glClearBufferuivPROC glClearBufferuiv; +static glClearBufferfiPROC glClearBufferfi; +static glGetStringiPROC glGetStringi; +static glCopyBufferSubDataPROC glCopyBufferSubData; +static glGetUniformIndicesPROC glGetUniformIndices; +static glGetActiveUniformsivPROC glGetActiveUniformsiv; +static glGetUniformBlockIndexPROC glGetUniformBlockIndex; +static glGetActiveUniformBlockivPROC glGetActiveUniformBlockiv; +static glGetActiveUniformBlockNamePROC glGetActiveUniformBlockName; +static glUniformBlockBindingPROC glUniformBlockBinding; +static glDrawArraysInstancedPROC glDrawArraysInstanced; +static glDrawElementsInstancedPROC glDrawElementsInstanced; +static glFenceSyncPROC glFenceSync; +static glIsSyncPROC glIsSync; +static glDeleteSyncPROC glDeleteSync; +static glClientWaitSyncPROC glClientWaitSync; +static glWaitSyncPROC glWaitSync; +static glGetInteger64vPROC glGetInteger64v; +static glGetInteger64i_vPROC glGetInteger64i_v; +static glGetSyncivPROC glGetSynciv; +static glGetBufferParameteri64vPROC glGetBufferParameteri64v; +static glGenSamplersPROC glGenSamplers; +static glDeleteSamplersPROC glDeleteSamplers; +static glIsSamplerPROC glIsSampler; +static glBindSamplerPROC glBindSampler; +static glSamplerParameteriPROC glSamplerParameteri; +static glSamplerParameterfPROC glSamplerParameterf; +static glSamplerParameterivPROC glSamplerParameteriv; +static glSamplerParameterfvPROC glSamplerParameterfv; +static glGetSamplerParameterivPROC glGetSamplerParameteriv; +static glGetSamplerParameterfvPROC glGetSamplerParameterfv; +static glVertexAttribDivisorPROC glVertexAttribDivisor; +static glBindTransformFeedbackPROC glBindTransformFeedback; +static glDeleteTransformFeedbacksPROC glDeleteTransformFeedbacks; +static glGenTransformFeedbacksPROC glGenTransformFeedbacks; +static glIsTransformFeedbackPROC glIsTransformFeedback; +static glPauseTransformFeedbackPROC glPauseTransformFeedback; +static glResumeTransformFeedbackPROC glResumeTransformFeedback; +static glGetProgramBinaryPROC glGetProgramBinary; +static glProgramBinaryPROC glProgramBinary; +static glProgramParameteriPROC glProgramParameteri; +static glInvalidateFramebufferPROC glInvalidateFramebuffer; +static glInvalidateSubFramebufferPROC glInvalidateSubFramebuffer; +static glTexStorage2DPROC glTexStorage2D; +static glTexStorage3DPROC glTexStorage3D; +static glGetInternalformativPROC glGetInternalformativ; + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglReadBuffer(JNIEnv *env, jclass clazz, jint mode) { + glReadBuffer(mode); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglDrawRangeElements(JNIEnv *env, jclass clazz, jint mode, jint start, jint end, jint count, jint type, jlong indices) { + const GLvoid *indices_address = (const GLvoid *)(intptr_t)indices; + glDrawRangeElements(mode, start, end, count, type, indices_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglDrawRangeElementsBO(JNIEnv *env, jclass clazz, jint mode, jint start, jint end, jint count, jint type, jlong indices_buffer_offset) { + const GLvoid *indices_address = (const GLvoid *)(intptr_t)offsetToPointer(indices_buffer_offset); + glDrawRangeElements(mode, start, end, count, type, indices_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglTexImage3D(JNIEnv *env, jclass clazz, jint target, jint level, jint internalFormat, jint width, jint height, jint depth, jint border, jint format, jint type, jlong pixels) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)pixels; + glTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglTexImage3DBO(JNIEnv *env, jclass clazz, jint target, jint level, jint internalFormat, jint width, jint height, jint depth, jint border, jint format, jint type, jlong pixels_buffer_offset) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)offsetToPointer(pixels_buffer_offset); + glTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, pixels_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglTexSubImage3D(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jlong pixels) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)pixels; + glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglTexSubImage3DBO(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jlong pixels_buffer_offset) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)offsetToPointer(pixels_buffer_offset); + glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglCopyTexSubImage3D(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint x, jint y, jint width, jint height) { + glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglCompressedTexImage3D(JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jlong data) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglCompressedTexImage3DBO(JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jlong data_buffer_offset) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)offsetToPointer(data_buffer_offset); + glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglCompressedTexSubImage3D(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imageSize, jlong data) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglCompressedTexSubImage3DBO(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imageSize, jlong data_buffer_offset) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)offsetToPointer(data_buffer_offset); + glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglGenQueries(JNIEnv *env, jclass clazz, jint n, jlong ids) { + GLuint *ids_address = (GLuint *)(intptr_t)ids; + glGenQueries(n, ids_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglDeleteQueries(JNIEnv *env, jclass clazz, jint n, jlong ids) { + GLuint *ids_address = (GLuint *)(intptr_t)ids; + glDeleteQueries(n, ids_address); +} + +static jboolean JNICALL Java_org_lwjgl_opengles_GLES30_nglIsQuery(JNIEnv *env, jclass clazz, jint id) { + GLboolean __result = glIsQuery(id); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglBeginQuery(JNIEnv *env, jclass clazz, jint target, jint id) { + glBeginQuery(target, id); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglEndQuery(JNIEnv *env, jclass clazz, jint target) { + glEndQuery(target); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglGetQueryiv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetQueryiv(target, pname, params_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglGetQueryObjectuiv(JNIEnv *env, jclass clazz, jint id, jint pname, jlong params) { + GLuint *params_address = (GLuint *)(intptr_t)params; + glGetQueryObjectuiv(id, pname, params_address); +} + +static jboolean JNICALL Java_org_lwjgl_opengles_GLES30_nglUnmapBuffer(JNIEnv *env, jclass clazz, jint target) { + GLboolean __result = glUnmapBuffer(target); + return __result; +} + +static jobject JNICALL Java_org_lwjgl_opengles_GLES30_nglGetBufferPointerv(JNIEnv *env, jclass clazz, jint target, jint pname, jlong result_size) { + GLvoid * __result; + glGetBufferPointerv(target, pname, &__result); + return safeNewBuffer(env, __result, result_size); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglDrawBuffers(JNIEnv *env, jclass clazz, jint size, jlong buffers) { + const GLenum *buffers_address = (const GLenum *)(intptr_t)buffers; + glDrawBuffers(size, buffers_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglUniformMatrix2x3fv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong matrices) { + GLfloat *matrices_address = (GLfloat *)(intptr_t)matrices; + glUniformMatrix2x3fv(location, count, transpose, matrices_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglUniformMatrix3x2fv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong matrices) { + GLfloat *matrices_address = (GLfloat *)(intptr_t)matrices; + glUniformMatrix3x2fv(location, count, transpose, matrices_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglUniformMatrix2x4fv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong matrices) { + GLfloat *matrices_address = (GLfloat *)(intptr_t)matrices; + glUniformMatrix2x4fv(location, count, transpose, matrices_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglUniformMatrix4x2fv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong matrices) { + GLfloat *matrices_address = (GLfloat *)(intptr_t)matrices; + glUniformMatrix4x2fv(location, count, transpose, matrices_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglUniformMatrix3x4fv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong matrices) { + GLfloat *matrices_address = (GLfloat *)(intptr_t)matrices; + glUniformMatrix3x4fv(location, count, transpose, matrices_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglUniformMatrix4x3fv(JNIEnv *env, jclass clazz, jint location, jint count, jboolean transpose, jlong matrices) { + GLfloat *matrices_address = (GLfloat *)(intptr_t)matrices; + glUniformMatrix4x3fv(location, count, transpose, matrices_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglBlitFramebuffer(JNIEnv *env, jclass clazz, jint srcX0, jint srcY0, jint srcX1, jint srcY1, jint dstX0, jint dstY0, jint dstX1, jint dstY1, jint mask, jint filter) { + glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglRenderbufferStorageMultisample(JNIEnv *env, jclass clazz, jint target, jint samples, jint internalformat, jint width, jint height) { + glRenderbufferStorageMultisample(target, samples, internalformat, width, height); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglFramebufferTextureLayer(JNIEnv *env, jclass clazz, jint target, jint attachment, jint texture, jint level, jint layer) { + glFramebufferTextureLayer(target, attachment, texture, level, layer); +} + +static jobject JNICALL Java_org_lwjgl_opengles_GLES30_nglMapBufferRange(JNIEnv *env, jclass clazz, jint target, jlong offset, jlong length, jint access, jobject old_buffer) { + GLvoid * __result = glMapBufferRange(target, offset, length, access); + return safeNewBufferCached(env, __result, length, old_buffer); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglFlushMappedBufferRange(JNIEnv *env, jclass clazz, jint target, jlong offset, jlong length) { + glFlushMappedBufferRange(target, offset, length); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglBindVertexArray(JNIEnv *env, jclass clazz, jint array) { + glBindVertexArray(array); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglDeleteVertexArrays(JNIEnv *env, jclass clazz, jint n, jlong arrays) { + const GLuint *arrays_address = (const GLuint *)(intptr_t)arrays; + glDeleteVertexArrays(n, arrays_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglGenVertexArrays(JNIEnv *env, jclass clazz, jint n, jlong arrays) { + GLuint *arrays_address = (GLuint *)(intptr_t)arrays; + glGenVertexArrays(n, arrays_address); +} + +static jboolean JNICALL Java_org_lwjgl_opengles_GLES30_nglIsVertexArray(JNIEnv *env, jclass clazz, jint array) { + GLboolean __result = glIsVertexArray(array); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglGetIntegeri_1v(JNIEnv *env, jclass clazz, jint value, jint index, jlong data) { + GLint *data_address = (GLint *)(intptr_t)data; + glGetIntegeri_v(value, index, data_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglBeginTransformFeedback(JNIEnv *env, jclass clazz, jint primitiveMode) { + glBeginTransformFeedback(primitiveMode); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglEndTransformFeedback(JNIEnv *env, jclass clazz) { + glEndTransformFeedback(); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglBindBufferRange(JNIEnv *env, jclass clazz, jint target, jint index, jint buffer, jlong offset, jlong size) { + glBindBufferRange(target, index, buffer, offset, size); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglBindBufferBase(JNIEnv *env, jclass clazz, jint target, jint index, jint buffer) { + glBindBufferBase(target, index, buffer); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglTransformFeedbackVaryings(JNIEnv *env, jclass clazz, jint program, jint count, jlong varyings, jint bufferMode) { + const GLchar *varyings_address = (const GLchar *)(intptr_t)varyings; + int _str_i; + GLchar *_str_address; + GLchar **varyings_str = (GLchar **) malloc(count * sizeof(GLchar *)); + _str_i = 0; + _str_address = (GLchar *)varyings_address; + while ( _str_i < count ) { + varyings_str[_str_i++] = _str_address; + _str_address += strlen(_str_address) + 1; + } + glTransformFeedbackVaryings(program, count, (const GLchar **)varyings_str, bufferMode); + free(varyings_str); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglGetTransformFeedbackVarying(JNIEnv *env, jclass clazz, jint program, jint index, jint bufSize, jlong length, jlong size, jlong type, jlong name) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLsizei *size_address = (GLsizei *)(intptr_t)size; + GLenum *type_address = (GLenum *)(intptr_t)type; + GLchar *name_address = (GLchar *)(intptr_t)name; + glGetTransformFeedbackVarying(program, index, bufSize, length_address, size_address, type_address, name_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglVertexAttribIPointer(JNIEnv *env, jclass clazz, jint index, jint size, jint type, jint stride, jlong buffer) { + const GLvoid *buffer_address = (const GLvoid *)(intptr_t)buffer; + glVertexAttribIPointer(index, size, type, stride, buffer_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglVertexAttribIPointerBO(JNIEnv *env, jclass clazz, jint index, jint size, jint type, jint stride, jlong buffer_buffer_offset) { + const GLvoid *buffer_address = (const GLvoid *)(intptr_t)offsetToPointer(buffer_buffer_offset); + glVertexAttribIPointer(index, size, type, stride, buffer_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglGetVertexAttribIiv(JNIEnv *env, jclass clazz, jint index, jint pname, jlong params) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetVertexAttribIiv(index, pname, params_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglGetVertexAttribIuiv(JNIEnv *env, jclass clazz, jint index, jint pname, jlong params) { + GLuint *params_address = (GLuint *)(intptr_t)params; + glGetVertexAttribIuiv(index, pname, params_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglVertexAttribI4i(JNIEnv *env, jclass clazz, jint index, jint x, jint y, jint z, jint w) { + glVertexAttribI4i(index, x, y, z, w); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglVertexAttribI4ui(JNIEnv *env, jclass clazz, jint index, jint x, jint y, jint z, jint w) { + glVertexAttribI4ui(index, x, y, z, w); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglVertexAttribI4iv(JNIEnv *env, jclass clazz, jint index, jlong v) { + const GLint *v_address = (const GLint *)(intptr_t)v; + glVertexAttribI4iv(index, v_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglVertexAttribI4uiv(JNIEnv *env, jclass clazz, jint index, jlong v) { + const GLuint *v_address = (const GLuint *)(intptr_t)v; + glVertexAttribI4uiv(index, v_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglGetUniformuiv(JNIEnv *env, jclass clazz, jint program, jint location, jlong params) { + GLuint *params_address = (GLuint *)(intptr_t)params; + glGetUniformuiv(program, location, params_address); +} + +static jint JNICALL Java_org_lwjgl_opengles_GLES30_nglGetFragDataLocation(JNIEnv *env, jclass clazz, jint program, jlong name) { + const GLchar *name_address = (const GLchar *)(intptr_t)name; + GLint __result = glGetFragDataLocation(program, name_address); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglUniform1ui(JNIEnv *env, jclass clazz, jint location, jint v0) { + glUniform1ui(location, v0); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglUniform2ui(JNIEnv *env, jclass clazz, jint location, jint v0, jint v1) { + glUniform2ui(location, v0, v1); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglUniform3ui(JNIEnv *env, jclass clazz, jint location, jint v0, jint v1, jint v2) { + glUniform3ui(location, v0, v1, v2); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglUniform4ui(JNIEnv *env, jclass clazz, jint location, jint v0, jint v1, jint v2, jint v3) { + glUniform4ui(location, v0, v1, v2, v3); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglUniform1uiv(JNIEnv *env, jclass clazz, jint location, jint count, jlong value) { + const GLuint *value_address = (const GLuint *)(intptr_t)value; + glUniform1uiv(location, count, value_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglUniform2uiv(JNIEnv *env, jclass clazz, jint location, jint count, jlong value) { + const GLuint *value_address = (const GLuint *)(intptr_t)value; + glUniform2uiv(location, count, value_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglUniform3uiv(JNIEnv *env, jclass clazz, jint location, jint count, jlong value) { + const GLuint *value_address = (const GLuint *)(intptr_t)value; + glUniform3uiv(location, count, value_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglUniform4uiv(JNIEnv *env, jclass clazz, jint location, jint count, jlong value) { + const GLuint *value_address = (const GLuint *)(intptr_t)value; + glUniform4uiv(location, count, value_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglClearBufferfv(JNIEnv *env, jclass clazz, jint buffer, jint drawbuffer, jlong value) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glClearBufferfv(buffer, drawbuffer, value_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglClearBufferiv(JNIEnv *env, jclass clazz, jint buffer, jint drawbuffer, jlong value) { + const GLint *value_address = (const GLint *)(intptr_t)value; + glClearBufferiv(buffer, drawbuffer, value_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglClearBufferuiv(JNIEnv *env, jclass clazz, jint buffer, jint drawbuffer, jlong value) { + const GLint *value_address = (const GLint *)(intptr_t)value; + glClearBufferuiv(buffer, drawbuffer, value_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglClearBufferfi(JNIEnv *env, jclass clazz, jint buffer, jint drawbuffer, jfloat depth, jint stencil) { + glClearBufferfi(buffer, drawbuffer, depth, stencil); +} + +static jobject JNICALL Java_org_lwjgl_opengles_GLES30_nglGetStringi(JNIEnv *env, jclass clazz, jint name, jint index) { + GLubyte * __result = glGetStringi(name, index); + return NewStringNativeUnsigned(env, __result); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglCopyBufferSubData(JNIEnv *env, jclass clazz, jint readtarget, jint writetarget, jlong readoffset, jlong writeoffset, jlong size) { + glCopyBufferSubData(readtarget, writetarget, readoffset, writeoffset, size); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglGetUniformIndices(JNIEnv *env, jclass clazz, jint program, jint uniformCount, jlong uniformNames, jlong uniformIndices) { + const GLchar *uniformNames_address = (const GLchar *)(intptr_t)uniformNames; + int _str_i; + GLchar *_str_address; + GLchar **uniformNames_str = (GLchar **) malloc(uniformCount * sizeof(GLchar *)); + GLuint *uniformIndices_address = (GLuint *)(intptr_t)uniformIndices; + _str_i = 0; + _str_address = (GLchar *)uniformNames_address; + while ( _str_i < uniformCount ) { + uniformNames_str[_str_i++] = _str_address; + _str_address += strlen(_str_address) + 1; + } + glGetUniformIndices(program, uniformCount, (const GLchar **)uniformNames_str, uniformIndices_address); + free(uniformNames_str); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglGetActiveUniformsiv(JNIEnv *env, jclass clazz, jint program, jint uniformCount, jlong uniformIndices, jint pname, jlong params) { + const GLuint *uniformIndices_address = (const GLuint *)(intptr_t)uniformIndices; + GLint *params_address = (GLint *)(intptr_t)params; + glGetActiveUniformsiv(program, uniformCount, uniformIndices_address, pname, params_address); +} + +static jint JNICALL Java_org_lwjgl_opengles_GLES30_nglGetUniformBlockIndex(JNIEnv *env, jclass clazz, jint program, jlong uniformBlockName) { + const GLchar *uniformBlockName_address = (const GLchar *)(intptr_t)uniformBlockName; + GLuint __result = glGetUniformBlockIndex(program, uniformBlockName_address); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglGetActiveUniformBlockiv(JNIEnv *env, jclass clazz, jint program, jint uniformBlockIndex, jint pname, jlong params) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetActiveUniformBlockiv(program, uniformBlockIndex, pname, params_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglGetActiveUniformBlockName(JNIEnv *env, jclass clazz, jint program, jint uniformBlockIndex, jint bufSize, jlong length, jlong uniformBlockName) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLchar *uniformBlockName_address = (GLchar *)(intptr_t)uniformBlockName; + glGetActiveUniformBlockName(program, uniformBlockIndex, bufSize, length_address, uniformBlockName_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglUniformBlockBinding(JNIEnv *env, jclass clazz, jint program, jint uniformBlockIndex, jint uniformBlockBinding) { + glUniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglDrawArraysInstanced(JNIEnv *env, jclass clazz, jint mode, jint first, jint count, jint primcount) { + glDrawArraysInstanced(mode, first, count, primcount); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglDrawElementsInstanced(JNIEnv *env, jclass clazz, jint mode, jint count, jint type, jlong indices, jint primcount) { + const GLvoid *indices_address = (const GLvoid *)(intptr_t)indices; + glDrawElementsInstanced(mode, count, type, indices_address, primcount); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglDrawElementsInstancedBO(JNIEnv *env, jclass clazz, jint mode, jint count, jint type, jlong indices_buffer_offset, jint primcount) { + const GLvoid *indices_address = (const GLvoid *)(intptr_t)offsetToPointer(indices_buffer_offset); + glDrawElementsInstanced(mode, count, type, indices_address, primcount); +} + +static jlong JNICALL Java_org_lwjgl_opengles_GLES30_nglFenceSync(JNIEnv *env, jclass clazz, jint condition, jint flags) { + GLsync __result = glFenceSync(condition, flags); + return (intptr_t)__result; +} + +static jboolean JNICALL Java_org_lwjgl_opengles_GLES30_nglIsSync(JNIEnv *env, jclass clazz, jlong sync) { + GLboolean __result = glIsSync((GLsync)(intptr_t)sync); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglDeleteSync(JNIEnv *env, jclass clazz, jlong sync) { + glDeleteSync((GLsync)(intptr_t)sync); +} + +static jint JNICALL Java_org_lwjgl_opengles_GLES30_nglClientWaitSync(JNIEnv *env, jclass clazz, jlong sync, jint flags, jlong timeout) { + GLenum __result = glClientWaitSync((GLsync)(intptr_t)sync, flags, timeout); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglWaitSync(JNIEnv *env, jclass clazz, jlong sync, jint flags, jlong timeout) { + glWaitSync((GLsync)(intptr_t)sync, flags, timeout); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglGetInteger64v(JNIEnv *env, jclass clazz, jint pname, jlong data) { + GLint64 *data_address = (GLint64 *)(intptr_t)data; + glGetInteger64v(pname, data_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglGetInteger64i_1v(JNIEnv *env, jclass clazz, jint value, jint index, jlong data) { + GLint64 *data_address = (GLint64 *)(intptr_t)data; + glGetInteger64i_v(value, index, data_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglGetSynciv(JNIEnv *env, jclass clazz, jlong sync, jint pname, jint bufSize, jlong length, jlong values) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLint *values_address = (GLint *)(intptr_t)values; + glGetSynciv((GLsync)(intptr_t)sync, pname, bufSize, length_address, values_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglGetBufferParameteri64v(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params) { + GLint64 *params_address = (GLint64 *)(intptr_t)params; + glGetBufferParameteri64v(target, pname, params_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglGenSamplers(JNIEnv *env, jclass clazz, jint count, jlong samplers) { + GLuint *samplers_address = (GLuint *)(intptr_t)samplers; + glGenSamplers(count, samplers_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglDeleteSamplers(JNIEnv *env, jclass clazz, jint count, jlong samplers) { + const GLuint *samplers_address = (const GLuint *)(intptr_t)samplers; + glDeleteSamplers(count, samplers_address); +} + +static jboolean JNICALL Java_org_lwjgl_opengles_GLES30_nglIsSampler(JNIEnv *env, jclass clazz, jint sampler) { + GLboolean __result = glIsSampler(sampler); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglBindSampler(JNIEnv *env, jclass clazz, jint unit, jint sampler) { + glBindSampler(unit, sampler); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglSamplerParameteri(JNIEnv *env, jclass clazz, jint sampler, jint pname, jint param) { + glSamplerParameteri(sampler, pname, param); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglSamplerParameterf(JNIEnv *env, jclass clazz, jint sampler, jint pname, jfloat param) { + glSamplerParameterf(sampler, pname, param); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglSamplerParameteriv(JNIEnv *env, jclass clazz, jint sampler, jint pname, jlong params) { + const GLint *params_address = (const GLint *)(intptr_t)params; + glSamplerParameteriv(sampler, pname, params_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglSamplerParameterfv(JNIEnv *env, jclass clazz, jint sampler, jint pname, jlong params) { + const GLfloat *params_address = (const GLfloat *)(intptr_t)params; + glSamplerParameterfv(sampler, pname, params_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglGetSamplerParameteriv(JNIEnv *env, jclass clazz, jint sampler, jint pname, jlong params) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetSamplerParameteriv(sampler, pname, params_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglGetSamplerParameterfv(JNIEnv *env, jclass clazz, jint sampler, jint pname, jlong params) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetSamplerParameterfv(sampler, pname, params_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglVertexAttribDivisor(JNIEnv *env, jclass clazz, jint index, jint divisor) { + glVertexAttribDivisor(index, divisor); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglBindTransformFeedback(JNIEnv *env, jclass clazz, jint target, jint id) { + glBindTransformFeedback(target, id); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglDeleteTransformFeedbacks(JNIEnv *env, jclass clazz, jint n, jlong ids) { + const GLuint *ids_address = (const GLuint *)(intptr_t)ids; + glDeleteTransformFeedbacks(n, ids_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglGenTransformFeedbacks(JNIEnv *env, jclass clazz, jint n, jlong ids) { + GLuint *ids_address = (GLuint *)(intptr_t)ids; + glGenTransformFeedbacks(n, ids_address); +} + +static jboolean JNICALL Java_org_lwjgl_opengles_GLES30_nglIsTransformFeedback(JNIEnv *env, jclass clazz, jint id) { + GLboolean __result = glIsTransformFeedback(id); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglPauseTransformFeedback(JNIEnv *env, jclass clazz) { + glPauseTransformFeedback(); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglResumeTransformFeedback(JNIEnv *env, jclass clazz) { + glResumeTransformFeedback(); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglGetProgramBinary(JNIEnv *env, jclass clazz, jint program, jint bufSize, jlong length, jlong binaryFormat, jlong binary) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLenum *binaryFormat_address = (GLenum *)(intptr_t)binaryFormat; + GLvoid *binary_address = (GLvoid *)(intptr_t)binary; + glGetProgramBinary(program, bufSize, length_address, binaryFormat_address, binary_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglProgramBinary(JNIEnv *env, jclass clazz, jint program, jint binaryFormat, jlong binary, jint length) { + const GLvoid *binary_address = (const GLvoid *)(intptr_t)binary; + glProgramBinary(program, binaryFormat, binary_address, length); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglProgramParameteri(JNIEnv *env, jclass clazz, jint program, jint pname, jint value) { + glProgramParameteri(program, pname, value); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglInvalidateFramebuffer(JNIEnv *env, jclass clazz, jint target, jint numAttachments, jlong attachments) { + const GLenum *attachments_address = (const GLenum *)(intptr_t)attachments; + glInvalidateFramebuffer(target, numAttachments, attachments_address); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglInvalidateSubFramebuffer(JNIEnv *env, jclass clazz, jint target, jint numAttachments, jlong attachments, jint x, jint y, jint width, jint height) { + const GLenum *attachments_address = (const GLenum *)(intptr_t)attachments; + glInvalidateSubFramebuffer(target, numAttachments, attachments_address, x, y, width, height); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglTexStorage2D(JNIEnv *env, jclass clazz, jint target, jint levels, jint internalformat, jint width, jint height) { + glTexStorage2D(target, levels, internalformat, width, height); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglTexStorage3D(JNIEnv *env, jclass clazz, jint target, jint levels, jint internalformat, jint width, jint height, jint depth) { + glTexStorage3D(target, levels, internalformat, width, height, depth); +} + +static void JNICALL Java_org_lwjgl_opengles_GLES30_nglGetInternalformativ(JNIEnv *env, jclass clazz, jint target, jint internalformat, jint pname, jint bufSize, jlong params) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetInternalformativ(target, internalformat, pname, bufSize, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_GLES30_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglReadBuffer", "(I)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglReadBuffer, "glReadBuffer", (void *)&glReadBuffer, false}, + {"nglDrawRangeElements", "(IIIIIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglDrawRangeElements, "glDrawRangeElements", (void *)&glDrawRangeElements, false}, + {"nglDrawRangeElementsBO", "(IIIIIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglDrawRangeElementsBO, "glDrawRangeElements", (void *)&glDrawRangeElements, false}, + {"nglTexImage3D", "(IIIIIIIIIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglTexImage3D, "glTexImage3D", (void *)&glTexImage3D, false}, + {"nglTexImage3DBO", "(IIIIIIIIIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglTexImage3DBO, "glTexImage3D", (void *)&glTexImage3D, false}, + {"nglTexSubImage3D", "(IIIIIIIIIIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglTexSubImage3D, "glTexSubImage3D", (void *)&glTexSubImage3D, false}, + {"nglTexSubImage3DBO", "(IIIIIIIIIIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglTexSubImage3DBO, "glTexSubImage3D", (void *)&glTexSubImage3D, false}, + {"nglCopyTexSubImage3D", "(IIIIIIIII)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglCopyTexSubImage3D, "glCopyTexSubImage3D", (void *)&glCopyTexSubImage3D, false}, + {"nglCompressedTexImage3D", "(IIIIIIIIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglCompressedTexImage3D, "glCompressedTexImage3D", (void *)&glCompressedTexImage3D, false}, + {"nglCompressedTexImage3DBO", "(IIIIIIIIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglCompressedTexImage3DBO, "glCompressedTexImage3D", (void *)&glCompressedTexImage3D, false}, + {"nglCompressedTexSubImage3D", "(IIIIIIIIIIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglCompressedTexSubImage3D, "glCompressedTexSubImage3D", (void *)&glCompressedTexSubImage3D, false}, + {"nglCompressedTexSubImage3DBO", "(IIIIIIIIIIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglCompressedTexSubImage3DBO, "glCompressedTexSubImage3D", (void *)&glCompressedTexSubImage3D, false}, + {"nglGenQueries", "(IJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglGenQueries, "glGenQueries", (void *)&glGenQueries, false}, + {"nglDeleteQueries", "(IJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglDeleteQueries, "glDeleteQueries", (void *)&glDeleteQueries, false}, + {"nglIsQuery", "(I)Z", (void *)&Java_org_lwjgl_opengles_GLES30_nglIsQuery, "glIsQuery", (void *)&glIsQuery, false}, + {"nglBeginQuery", "(II)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglBeginQuery, "glBeginQuery", (void *)&glBeginQuery, false}, + {"nglEndQuery", "(I)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglEndQuery, "glEndQuery", (void *)&glEndQuery, false}, + {"nglGetQueryiv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglGetQueryiv, "glGetQueryiv", (void *)&glGetQueryiv, false}, + {"nglGetQueryObjectuiv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglGetQueryObjectuiv, "glGetQueryObjectuiv", (void *)&glGetQueryObjectuiv, false}, + {"nglUnmapBuffer", "(I)Z", (void *)&Java_org_lwjgl_opengles_GLES30_nglUnmapBuffer, "glUnmapBuffer", (void *)&glUnmapBuffer, false}, + {"nglGetBufferPointerv", "(IIJ)Ljava/nio/ByteBuffer;", (void *)&Java_org_lwjgl_opengles_GLES30_nglGetBufferPointerv, "glGetBufferPointerv", (void *)&glGetBufferPointerv, false}, + {"nglDrawBuffers", "(IJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglDrawBuffers, "glDrawBuffers", (void *)&glDrawBuffers, false}, + {"nglUniformMatrix2x3fv", "(IIZJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglUniformMatrix2x3fv, "glUniformMatrix2x3fv", (void *)&glUniformMatrix2x3fv, false}, + {"nglUniformMatrix3x2fv", "(IIZJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglUniformMatrix3x2fv, "glUniformMatrix3x2fv", (void *)&glUniformMatrix3x2fv, false}, + {"nglUniformMatrix2x4fv", "(IIZJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglUniformMatrix2x4fv, "glUniformMatrix2x4fv", (void *)&glUniformMatrix2x4fv, false}, + {"nglUniformMatrix4x2fv", "(IIZJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglUniformMatrix4x2fv, "glUniformMatrix4x2fv", (void *)&glUniformMatrix4x2fv, false}, + {"nglUniformMatrix3x4fv", "(IIZJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglUniformMatrix3x4fv, "glUniformMatrix3x4fv", (void *)&glUniformMatrix3x4fv, false}, + {"nglUniformMatrix4x3fv", "(IIZJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglUniformMatrix4x3fv, "glUniformMatrix4x3fv", (void *)&glUniformMatrix4x3fv, false}, + {"nglBlitFramebuffer", "(IIIIIIIIII)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglBlitFramebuffer, "glBlitFramebuffer", (void *)&glBlitFramebuffer, false}, + {"nglRenderbufferStorageMultisample", "(IIIII)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglRenderbufferStorageMultisample, "glRenderbufferStorageMultisample", (void *)&glRenderbufferStorageMultisample, false}, + {"nglFramebufferTextureLayer", "(IIIII)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglFramebufferTextureLayer, "glFramebufferTextureLayer", (void *)&glFramebufferTextureLayer, false}, + {"nglMapBufferRange", "(IJJIJLjava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;", (void *)&Java_org_lwjgl_opengles_GLES30_nglMapBufferRange, "glMapBufferRange", (void *)&glMapBufferRange, false}, + {"nglFlushMappedBufferRange", "(IJJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglFlushMappedBufferRange, "glFlushMappedBufferRange", (void *)&glFlushMappedBufferRange, false}, + {"nglBindVertexArray", "(I)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglBindVertexArray, "glBindVertexArray", (void *)&glBindVertexArray, false}, + {"nglDeleteVertexArrays", "(IJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglDeleteVertexArrays, "glDeleteVertexArrays", (void *)&glDeleteVertexArrays, false}, + {"nglGenVertexArrays", "(IJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglGenVertexArrays, "glGenVertexArrays", (void *)&glGenVertexArrays, false}, + {"nglIsVertexArray", "(I)Z", (void *)&Java_org_lwjgl_opengles_GLES30_nglIsVertexArray, "glIsVertexArray", (void *)&glIsVertexArray, false}, + {"nglGetIntegeri_v", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglGetIntegeri_1v, "glGetIntegeri_v", (void *)&glGetIntegeri_v, false}, + {"nglBeginTransformFeedback", "(I)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglBeginTransformFeedback, "glBeginTransformFeedback", (void *)&glBeginTransformFeedback, false}, + {"nglEndTransformFeedback", "()V", (void *)&Java_org_lwjgl_opengles_GLES30_nglEndTransformFeedback, "glEndTransformFeedback", (void *)&glEndTransformFeedback, false}, + {"nglBindBufferRange", "(IIIJJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglBindBufferRange, "glBindBufferRange", (void *)&glBindBufferRange, false}, + {"nglBindBufferBase", "(III)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglBindBufferBase, "glBindBufferBase", (void *)&glBindBufferBase, false}, + {"nglTransformFeedbackVaryings", "(IIJI)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglTransformFeedbackVaryings, "glTransformFeedbackVaryings", (void *)&glTransformFeedbackVaryings, false}, + {"nglGetTransformFeedbackVarying", "(IIIJJJJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglGetTransformFeedbackVarying, "glGetTransformFeedbackVarying", (void *)&glGetTransformFeedbackVarying, false}, + {"nglVertexAttribIPointer", "(IIIIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglVertexAttribIPointer, "glVertexAttribIPointer", (void *)&glVertexAttribIPointer, false}, + {"nglVertexAttribIPointerBO", "(IIIIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglVertexAttribIPointerBO, "glVertexAttribIPointer", (void *)&glVertexAttribIPointer, false}, + {"nglGetVertexAttribIiv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglGetVertexAttribIiv, "glGetVertexAttribIiv", (void *)&glGetVertexAttribIiv, false}, + {"nglGetVertexAttribIuiv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglGetVertexAttribIuiv, "glGetVertexAttribIuiv", (void *)&glGetVertexAttribIuiv, false}, + {"nglVertexAttribI4i", "(IIIII)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglVertexAttribI4i, "glVertexAttribI4i", (void *)&glVertexAttribI4i, false}, + {"nglVertexAttribI4ui", "(IIIII)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglVertexAttribI4ui, "glVertexAttribI4ui", (void *)&glVertexAttribI4ui, false}, + {"nglVertexAttribI4iv", "(IJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglVertexAttribI4iv, "glVertexAttribI4iv", (void *)&glVertexAttribI4iv, false}, + {"nglVertexAttribI4uiv", "(IJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglVertexAttribI4uiv, "glVertexAttribI4uiv", (void *)&glVertexAttribI4uiv, false}, + {"nglGetUniformuiv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglGetUniformuiv, "glGetUniformuiv", (void *)&glGetUniformuiv, false}, + {"nglGetFragDataLocation", "(IJ)I", (void *)&Java_org_lwjgl_opengles_GLES30_nglGetFragDataLocation, "glGetFragDataLocation", (void *)&glGetFragDataLocation, false}, + {"nglUniform1ui", "(II)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglUniform1ui, "glUniform1ui", (void *)&glUniform1ui, false}, + {"nglUniform2ui", "(III)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglUniform2ui, "glUniform2ui", (void *)&glUniform2ui, false}, + {"nglUniform3ui", "(IIII)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglUniform3ui, "glUniform3ui", (void *)&glUniform3ui, false}, + {"nglUniform4ui", "(IIIII)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglUniform4ui, "glUniform4ui", (void *)&glUniform4ui, false}, + {"nglUniform1uiv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglUniform1uiv, "glUniform1uiv", (void *)&glUniform1uiv, false}, + {"nglUniform2uiv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglUniform2uiv, "glUniform2uiv", (void *)&glUniform2uiv, false}, + {"nglUniform3uiv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglUniform3uiv, "glUniform3uiv", (void *)&glUniform3uiv, false}, + {"nglUniform4uiv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglUniform4uiv, "glUniform4uiv", (void *)&glUniform4uiv, false}, + {"nglClearBufferfv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglClearBufferfv, "glClearBufferfv", (void *)&glClearBufferfv, false}, + {"nglClearBufferiv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglClearBufferiv, "glClearBufferiv", (void *)&glClearBufferiv, false}, + {"nglClearBufferuiv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglClearBufferuiv, "glClearBufferuiv", (void *)&glClearBufferuiv, false}, + {"nglClearBufferfi", "(IIFI)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglClearBufferfi, "glClearBufferfi", (void *)&glClearBufferfi, false}, + {"nglGetStringi", "(II)Ljava/lang/String;", (void *)&Java_org_lwjgl_opengles_GLES30_nglGetStringi, "glGetStringi", (void *)&glGetStringi, false}, + {"nglCopyBufferSubData", "(IIJJJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglCopyBufferSubData, "glCopyBufferSubData", (void *)&glCopyBufferSubData, false}, + {"nglGetUniformIndices", "(IIJJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglGetUniformIndices, "glGetUniformIndices", (void *)&glGetUniformIndices, false}, + {"nglGetActiveUniformsiv", "(IIJIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglGetActiveUniformsiv, "glGetActiveUniformsiv", (void *)&glGetActiveUniformsiv, false}, + {"nglGetUniformBlockIndex", "(IJ)I", (void *)&Java_org_lwjgl_opengles_GLES30_nglGetUniformBlockIndex, "glGetUniformBlockIndex", (void *)&glGetUniformBlockIndex, false}, + {"nglGetActiveUniformBlockiv", "(IIIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglGetActiveUniformBlockiv, "glGetActiveUniformBlockiv", (void *)&glGetActiveUniformBlockiv, false}, + {"nglGetActiveUniformBlockName", "(IIIJJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglGetActiveUniformBlockName, "glGetActiveUniformBlockName", (void *)&glGetActiveUniformBlockName, false}, + {"nglUniformBlockBinding", "(III)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglUniformBlockBinding, "glUniformBlockBinding", (void *)&glUniformBlockBinding, false}, + {"nglDrawArraysInstanced", "(IIII)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglDrawArraysInstanced, "glDrawArraysInstanced", (void *)&glDrawArraysInstanced, false}, + {"nglDrawElementsInstanced", "(IIIJI)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglDrawElementsInstanced, "glDrawElementsInstanced", (void *)&glDrawElementsInstanced, false}, + {"nglDrawElementsInstancedBO", "(IIIJI)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglDrawElementsInstancedBO, "glDrawElementsInstanced", (void *)&glDrawElementsInstanced, false}, + {"nglFenceSync", "(II)J", (void *)&Java_org_lwjgl_opengles_GLES30_nglFenceSync, "glFenceSync", (void *)&glFenceSync, false}, + {"nglIsSync", "(J)Z", (void *)&Java_org_lwjgl_opengles_GLES30_nglIsSync, "glIsSync", (void *)&glIsSync, false}, + {"nglDeleteSync", "(J)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglDeleteSync, "glDeleteSync", (void *)&glDeleteSync, false}, + {"nglClientWaitSync", "(JIJ)I", (void *)&Java_org_lwjgl_opengles_GLES30_nglClientWaitSync, "glClientWaitSync", (void *)&glClientWaitSync, false}, + {"nglWaitSync", "(JIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglWaitSync, "glWaitSync", (void *)&glWaitSync, false}, + {"nglGetInteger64v", "(IJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglGetInteger64v, "glGetInteger64v", (void *)&glGetInteger64v, false}, + {"nglGetInteger64i_v", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglGetInteger64i_1v, "glGetInteger64i_v", (void *)&glGetInteger64i_v, true}, + {"nglGetSynciv", "(JIIJJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglGetSynciv, "glGetSynciv", (void *)&glGetSynciv, false}, + {"nglGetBufferParameteri64v", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglGetBufferParameteri64v, "glGetBufferParameteri64v", (void *)&glGetBufferParameteri64v, false}, + {"nglGenSamplers", "(IJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglGenSamplers, "glGenSamplers", (void *)&glGenSamplers, false}, + {"nglDeleteSamplers", "(IJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglDeleteSamplers, "glDeleteSamplers", (void *)&glDeleteSamplers, false}, + {"nglIsSampler", "(I)Z", (void *)&Java_org_lwjgl_opengles_GLES30_nglIsSampler, "glIsSampler", (void *)&glIsSampler, false}, + {"nglBindSampler", "(II)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglBindSampler, "glBindSampler", (void *)&glBindSampler, false}, + {"nglSamplerParameteri", "(III)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglSamplerParameteri, "glSamplerParameteri", (void *)&glSamplerParameteri, false}, + {"nglSamplerParameterf", "(IIF)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglSamplerParameterf, "glSamplerParameterf", (void *)&glSamplerParameterf, false}, + {"nglSamplerParameteriv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglSamplerParameteriv, "glSamplerParameteriv", (void *)&glSamplerParameteriv, false}, + {"nglSamplerParameterfv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglSamplerParameterfv, "glSamplerParameterfv", (void *)&glSamplerParameterfv, false}, + {"nglGetSamplerParameteriv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglGetSamplerParameteriv, "glGetSamplerParameteriv", (void *)&glGetSamplerParameteriv, false}, + {"nglGetSamplerParameterfv", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglGetSamplerParameterfv, "glGetSamplerParameterfv", (void *)&glGetSamplerParameterfv, false}, + {"nglVertexAttribDivisor", "(II)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglVertexAttribDivisor, "glVertexAttribDivisor", (void *)&glVertexAttribDivisor, false}, + {"nglBindTransformFeedback", "(II)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglBindTransformFeedback, "glBindTransformFeedback", (void *)&glBindTransformFeedback, false}, + {"nglDeleteTransformFeedbacks", "(IJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglDeleteTransformFeedbacks, "glDeleteTransformFeedbacks", (void *)&glDeleteTransformFeedbacks, false}, + {"nglGenTransformFeedbacks", "(IJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglGenTransformFeedbacks, "glGenTransformFeedbacks", (void *)&glGenTransformFeedbacks, false}, + {"nglIsTransformFeedback", "(I)Z", (void *)&Java_org_lwjgl_opengles_GLES30_nglIsTransformFeedback, "glIsTransformFeedback", (void *)&glIsTransformFeedback, false}, + {"nglPauseTransformFeedback", "()V", (void *)&Java_org_lwjgl_opengles_GLES30_nglPauseTransformFeedback, "glPauseTransformFeedback", (void *)&glPauseTransformFeedback, false}, + {"nglResumeTransformFeedback", "()V", (void *)&Java_org_lwjgl_opengles_GLES30_nglResumeTransformFeedback, "glResumeTransformFeedback", (void *)&glResumeTransformFeedback, false}, + {"nglGetProgramBinary", "(IIJJJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglGetProgramBinary, "glGetProgramBinary", (void *)&glGetProgramBinary, false}, + {"nglProgramBinary", "(IIJI)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglProgramBinary, "glProgramBinary", (void *)&glProgramBinary, false}, + {"nglProgramParameteri", "(III)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglProgramParameteri, "glProgramParameteri", (void *)&glProgramParameteri, false}, + {"nglInvalidateFramebuffer", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglInvalidateFramebuffer, "glInvalidateFramebuffer", (void *)&glInvalidateFramebuffer, false}, + {"nglInvalidateSubFramebuffer", "(IIJIIII)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglInvalidateSubFramebuffer, "glInvalidateSubFramebuffer", (void *)&glInvalidateSubFramebuffer, false}, + {"nglTexStorage2D", "(IIIII)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglTexStorage2D, "glTexStorage2D", (void *)&glTexStorage2D, false}, + {"nglTexStorage3D", "(IIIIII)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglTexStorage3D, "glTexStorage3D", (void *)&glTexStorage3D, false}, + {"nglGetInternalformativ", "(IIIIJ)V", (void *)&Java_org_lwjgl_opengles_GLES30_nglGetInternalformativ, "glGetInternalformativ", (void *)&glGetInternalformativ, false}, + + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_IMGMultisampledRenderToTexture.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_IMGMultisampledRenderToTexture.c new file mode 100644 index 0000000..ba0d133 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_IMGMultisampledRenderToTexture.c @@ -0,0 +1,27 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glRenderbufferStorageMultisampleIMGPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +typedef GL_APICALL void (GL_APIENTRY *glFramebufferTexture2DMultisampleIMGPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples); + +static glRenderbufferStorageMultisampleIMGPROC glRenderbufferStorageMultisampleIMG; +static glFramebufferTexture2DMultisampleIMGPROC glFramebufferTexture2DMultisampleIMG; + +static void JNICALL Java_org_lwjgl_opengles_IMGMultisampledRenderToTexture_nglRenderbufferStorageMultisampleIMG(JNIEnv *env, jclass clazz, jint target, jint samples, jint internalformat, jint width, jint height) { + glRenderbufferStorageMultisampleIMG(target, samples, internalformat, width, height); +} + +static void JNICALL Java_org_lwjgl_opengles_IMGMultisampledRenderToTexture_nglFramebufferTexture2DMultisampleIMG(JNIEnv *env, jclass clazz, jint target, jint attachment, jint textarget, jint texture, jint level, jint samples) { + glFramebufferTexture2DMultisampleIMG(target, attachment, textarget, texture, level, samples); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_IMGMultisampledRenderToTexture_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglRenderbufferStorageMultisampleIMG", "(IIIII)V", (void *)&Java_org_lwjgl_opengles_IMGMultisampledRenderToTexture_nglRenderbufferStorageMultisampleIMG, "glRenderbufferStorageMultisampleIMG", (void *)&glRenderbufferStorageMultisampleIMG, false}, + {"nglFramebufferTexture2DMultisampleIMG", "(IIIIII)V", (void *)&Java_org_lwjgl_opengles_IMGMultisampledRenderToTexture_nglFramebufferTexture2DMultisampleIMG, "glFramebufferTexture2DMultisampleIMG", (void *)&glFramebufferTexture2DMultisampleIMG, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_KHRDebug.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_KHRDebug.c new file mode 100644 index 0000000..489fb19 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_KHRDebug.c @@ -0,0 +1,100 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glDebugMessageControlPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint * ids, GLboolean enabled); +typedef GL_APICALL void (GL_APIENTRY *glDebugMessageInsertPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar * buf); +typedef GL_APICALL void (GL_APIENTRY *glDebugMessageCallbackPROC) (GLDEBUGPROC callback, GLvoid * userParam); +typedef GL_APICALL GLuint (GL_APIENTRY *glGetDebugMessageLogPROC) (GLuint count, GLsizei bufsize, GLenum * sources, GLenum * types, GLuint * ids, GLenum * severities, GLsizei * lengths, GLchar * messageLog); +typedef GL_APICALL void (GL_APIENTRY *glPushDebugGroupPROC) (GLenum source, GLuint id, GLsizei length, const GLchar * message); +typedef GL_APICALL void (GL_APIENTRY *glPopDebugGroupPROC) (); +typedef GL_APICALL void (GL_APIENTRY *glObjectLabelPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar * label); +typedef GL_APICALL void (GL_APIENTRY *glGetObjectLabelPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei * length, GLchar * label); +typedef GL_APICALL void (GL_APIENTRY *glObjectPtrLabelPROC) (GLvoid * ptr, GLsizei length, const GLchar * label); +typedef GL_APICALL void (GL_APIENTRY *glGetObjectPtrLabelPROC) (GLvoid * ptr, GLsizei bufSize, GLsizei * length, GLchar * label); + +static glDebugMessageControlPROC glDebugMessageControl; +static glDebugMessageInsertPROC glDebugMessageInsert; +static glDebugMessageCallbackPROC glDebugMessageCallback; +static glGetDebugMessageLogPROC glGetDebugMessageLog; +static glPushDebugGroupPROC glPushDebugGroup; +static glPopDebugGroupPROC glPopDebugGroup; +static glObjectLabelPROC glObjectLabel; +static glGetObjectLabelPROC glGetObjectLabel; +static glObjectPtrLabelPROC glObjectPtrLabel; +static glGetObjectPtrLabelPROC glGetObjectPtrLabel; + +static void JNICALL Java_org_lwjgl_opengles_KHRDebug_nglDebugMessageControl(JNIEnv *env, jclass clazz, jint source, jint type, jint severity, jint count, jlong ids, jboolean enabled) { + const GLuint *ids_address = (const GLuint *)(intptr_t)ids; + glDebugMessageControl(source, type, severity, count, ids_address, enabled); +} + +static void JNICALL Java_org_lwjgl_opengles_KHRDebug_nglDebugMessageInsert(JNIEnv *env, jclass clazz, jint source, jint type, jint id, jint severity, jint length, jlong buf) { + const GLchar *buf_address = (const GLchar *)(intptr_t)buf; + glDebugMessageInsert(source, type, id, severity, length, buf_address); +} + +static void JNICALL Java_org_lwjgl_opengles_KHRDebug_nglDebugMessageCallback(JNIEnv *env, jclass clazz, jlong callback, jlong userParam) { + glDebugMessageCallback((GLDEBUGPROC)(intptr_t)callback, (GLvoid *)(intptr_t)userParam); +} + +static jint JNICALL Java_org_lwjgl_opengles_KHRDebug_nglGetDebugMessageLog(JNIEnv *env, jclass clazz, jint count, jint bufsize, jlong sources, jlong types, jlong ids, jlong severities, jlong lengths, jlong messageLog) { + GLenum *sources_address = (GLenum *)(intptr_t)sources; + GLenum *types_address = (GLenum *)(intptr_t)types; + GLuint *ids_address = (GLuint *)(intptr_t)ids; + GLenum *severities_address = (GLenum *)(intptr_t)severities; + GLsizei *lengths_address = (GLsizei *)(intptr_t)lengths; + GLchar *messageLog_address = (GLchar *)(intptr_t)messageLog; + GLuint __result = glGetDebugMessageLog(count, bufsize, sources_address, types_address, ids_address, severities_address, lengths_address, messageLog_address); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_KHRDebug_nglPushDebugGroup(JNIEnv *env, jclass clazz, jint source, jint id, jint length, jlong message) { + const GLchar *message_address = (const GLchar *)(intptr_t)message; + glPushDebugGroup(source, id, length, message_address); +} + +static void JNICALL Java_org_lwjgl_opengles_KHRDebug_nglPopDebugGroup(JNIEnv *env, jclass clazz) { + glPopDebugGroup(); +} + +static void JNICALL Java_org_lwjgl_opengles_KHRDebug_nglObjectLabel(JNIEnv *env, jclass clazz, jint identifier, jint name, jint length, jlong label) { + const GLchar *label_address = (const GLchar *)(intptr_t)label; + glObjectLabel(identifier, name, length, label_address); +} + +static void JNICALL Java_org_lwjgl_opengles_KHRDebug_nglGetObjectLabel(JNIEnv *env, jclass clazz, jint identifier, jint name, jint bufSize, jlong length, jlong label) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLchar *label_address = (GLchar *)(intptr_t)label; + glGetObjectLabel(identifier, name, bufSize, length_address, label_address); +} + +static void JNICALL Java_org_lwjgl_opengles_KHRDebug_nglObjectPtrLabel(JNIEnv *env, jclass clazz, jlong ptr, jint length, jlong label) { + const GLchar *label_address = (const GLchar *)(intptr_t)label; + glObjectPtrLabel((GLvoid *)(intptr_t)ptr, length, label_address); +} + +static void JNICALL Java_org_lwjgl_opengles_KHRDebug_nglGetObjectPtrLabel(JNIEnv *env, jclass clazz, jlong ptr, jint bufSize, jlong length, jlong label) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLchar *label_address = (GLchar *)(intptr_t)label; + glGetObjectPtrLabel((GLvoid *)(intptr_t)ptr, bufSize, length_address, label_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_KHRDebug_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglDebugMessageControl", "(IIIIJZ)V", (void *)&Java_org_lwjgl_opengles_KHRDebug_nglDebugMessageControl, "glDebugMessageControl", (void *)&glDebugMessageControl, false}, + {"nglDebugMessageInsert", "(IIIIIJ)V", (void *)&Java_org_lwjgl_opengles_KHRDebug_nglDebugMessageInsert, "glDebugMessageInsert", (void *)&glDebugMessageInsert, false}, + {"nglDebugMessageCallback", "(JJ)V", (void *)&Java_org_lwjgl_opengles_KHRDebug_nglDebugMessageCallback, "glDebugMessageCallback", (void *)&glDebugMessageCallback, false}, + {"nglGetDebugMessageLog", "(IIJJJJJJ)I", (void *)&Java_org_lwjgl_opengles_KHRDebug_nglGetDebugMessageLog, "glGetDebugMessageLog", (void *)&glGetDebugMessageLog, false}, + {"nglPushDebugGroup", "(IIIJ)V", (void *)&Java_org_lwjgl_opengles_KHRDebug_nglPushDebugGroup, "glPushDebugGroup", (void *)&glPushDebugGroup, false}, + {"nglPopDebugGroup", "()V", (void *)&Java_org_lwjgl_opengles_KHRDebug_nglPopDebugGroup, "glPopDebugGroup", (void *)&glPopDebugGroup, false}, + {"nglObjectLabel", "(IIIJ)V", (void *)&Java_org_lwjgl_opengles_KHRDebug_nglObjectLabel, "glObjectLabel", (void *)&glObjectLabel, false}, + {"nglGetObjectLabel", "(IIIJJ)V", (void *)&Java_org_lwjgl_opengles_KHRDebug_nglGetObjectLabel, "glGetObjectLabel", (void *)&glGetObjectLabel, false}, + {"nglObjectPtrLabel", "(JIJ)V", (void *)&Java_org_lwjgl_opengles_KHRDebug_nglObjectPtrLabel, "glObjectPtrLabel", (void *)&glObjectPtrLabel, false}, + {"nglGetObjectPtrLabel", "(JIJJ)V", (void *)&Java_org_lwjgl_opengles_KHRDebug_nglGetObjectPtrLabel, "glGetObjectPtrLabel", (void *)&glGetObjectPtrLabel, false}, + + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_NVCoverageSample.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_NVCoverageSample.c new file mode 100644 index 0000000..eb161a0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_NVCoverageSample.c @@ -0,0 +1,27 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glCoverageMaskNVPROC) (GLboolean mask); +typedef GL_APICALL void (GL_APIENTRY *glCoverageOperationNVPROC) (GLenum operation); + +static glCoverageMaskNVPROC glCoverageMaskNV; +static glCoverageOperationNVPROC glCoverageOperationNV; + +static void JNICALL Java_org_lwjgl_opengles_NVCoverageSample_nglCoverageMaskNV(JNIEnv *env, jclass clazz, jboolean mask) { + glCoverageMaskNV(mask); +} + +static void JNICALL Java_org_lwjgl_opengles_NVCoverageSample_nglCoverageOperationNV(JNIEnv *env, jclass clazz, jint operation) { + glCoverageOperationNV(operation); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_NVCoverageSample_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglCoverageMaskNV", "(Z)V", (void *)&Java_org_lwjgl_opengles_NVCoverageSample_nglCoverageMaskNV, "glCoverageMaskNV", (void *)&glCoverageMaskNV, false}, + {"nglCoverageOperationNV", "(I)V", (void *)&Java_org_lwjgl_opengles_NVCoverageSample_nglCoverageOperationNV, "glCoverageOperationNV", (void *)&glCoverageOperationNV, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_NVDrawBuffers.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_NVDrawBuffers.c new file mode 100644 index 0000000..8f515bd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_NVDrawBuffers.c @@ -0,0 +1,22 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glDrawBuffersNVPROC) (GLsizei n, const GLenum * bufs); + +static glDrawBuffersNVPROC glDrawBuffersNV; + +static void JNICALL Java_org_lwjgl_opengles_NVDrawBuffers_nglDrawBuffersNV(JNIEnv *env, jclass clazz, jint n, jlong bufs) { + const GLenum *bufs_address = (const GLenum *)(intptr_t)bufs; + glDrawBuffersNV(n, bufs_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_NVDrawBuffers_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglDrawBuffersNV", "(IJ)V", (void *)&Java_org_lwjgl_opengles_NVDrawBuffers_nglDrawBuffersNV, "glDrawBuffersNV", (void *)&glDrawBuffersNV, false}, + + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_NVDrawPath.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_NVDrawPath.c new file mode 100644 index 0000000..c6e27d6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_NVDrawPath.c @@ -0,0 +1,110 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL GLuint (GL_APIENTRY *glCreatePathNVPROC) (GLenum datatype, GLsizei numCommands, const GLubyte * commands); +typedef GL_APICALL void (GL_APIENTRY *glDeletePathNVPROC) (GLuint path); +typedef GL_APICALL void (GL_APIENTRY *glPathVerticesNVPROC) (GLuint path, const GLvoid * vertices); +typedef GL_APICALL void (GL_APIENTRY *glPathParameterfNVPROC) (GLuint path, GLenum paramType, GLfloat param); +typedef GL_APICALL void (GL_APIENTRY *glPathParameteriNVPROC) (GLuint path, GLenum paramType, GLint param); +typedef GL_APICALL GLuint (GL_APIENTRY *glCreatePathProgramNVPROC) (); +typedef GL_APICALL void (GL_APIENTRY *glPathMatrixNVPROC) (GLenum target, const GLfloat * value); +typedef GL_APICALL void (GL_APIENTRY *glDrawPathNVPROC) (GLuint path, GLenum mode); +typedef GL_APICALL GLuint (GL_APIENTRY *glCreatePathbufferNVPROC) (GLsizei capacity); +typedef GL_APICALL void (GL_APIENTRY *glDeletePathbufferNVPROC) (GLuint buffer); +typedef GL_APICALL void (GL_APIENTRY *glPathbufferPathNVPROC) (GLuint buffer, GLint index, GLuint path); +typedef GL_APICALL void (GL_APIENTRY *glPathbufferPositionNVPROC) (GLuint buffer, GLint index, GLfloat x, GLfloat y); +typedef GL_APICALL void (GL_APIENTRY *glDrawPathbufferNVPROC) (GLuint buffer, GLenum mode); + +static glCreatePathNVPROC glCreatePathNV; +static glDeletePathNVPROC glDeletePathNV; +static glPathVerticesNVPROC glPathVerticesNV; +static glPathParameterfNVPROC glPathParameterfNV; +static glPathParameteriNVPROC glPathParameteriNV; +static glCreatePathProgramNVPROC glCreatePathProgramNV; +static glPathMatrixNVPROC glPathMatrixNV; +static glDrawPathNVPROC glDrawPathNV; +static glCreatePathbufferNVPROC glCreatePathbufferNV; +static glDeletePathbufferNVPROC glDeletePathbufferNV; +static glPathbufferPathNVPROC glPathbufferPathNV; +static glPathbufferPositionNVPROC glPathbufferPositionNV; +static glDrawPathbufferNVPROC glDrawPathbufferNV; + +static jint JNICALL Java_org_lwjgl_opengles_NVDrawPath_nglCreatePathNV(JNIEnv *env, jclass clazz, jint datatype, jint numCommands, jlong commands) { + const GLubyte *commands_address = (const GLubyte *)(intptr_t)commands; + GLuint __result = glCreatePathNV(datatype, numCommands, commands_address); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_NVDrawPath_nglDeletePathNV(JNIEnv *env, jclass clazz, jint path) { + glDeletePathNV(path); +} + +static void JNICALL Java_org_lwjgl_opengles_NVDrawPath_nglPathVerticesNV(JNIEnv *env, jclass clazz, jint path, jlong vertices) { + const GLvoid *vertices_address = (const GLvoid *)(intptr_t)vertices; + glPathVerticesNV(path, vertices_address); +} + +static void JNICALL Java_org_lwjgl_opengles_NVDrawPath_nglPathParameterfNV(JNIEnv *env, jclass clazz, jint path, jint paramType, jfloat param) { + glPathParameterfNV(path, paramType, param); +} + +static void JNICALL Java_org_lwjgl_opengles_NVDrawPath_nglPathParameteriNV(JNIEnv *env, jclass clazz, jint path, jint paramType, jint param) { + glPathParameteriNV(path, paramType, param); +} + +static jint JNICALL Java_org_lwjgl_opengles_NVDrawPath_nglCreatePathProgramNV(JNIEnv *env, jclass clazz) { + GLuint __result = glCreatePathProgramNV(); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_NVDrawPath_nglPathMatrixNV(JNIEnv *env, jclass clazz, jint target, jlong value) { + const GLfloat *value_address = (const GLfloat *)(intptr_t)value; + glPathMatrixNV(target, value_address); +} + +static void JNICALL Java_org_lwjgl_opengles_NVDrawPath_nglDrawPathNV(JNIEnv *env, jclass clazz, jint path, jint mode) { + glDrawPathNV(path, mode); +} + +static jint JNICALL Java_org_lwjgl_opengles_NVDrawPath_nglCreatePathbufferNV(JNIEnv *env, jclass clazz, jint capacity) { + GLuint __result = glCreatePathbufferNV(capacity); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_NVDrawPath_nglDeletePathbufferNV(JNIEnv *env, jclass clazz, jint buffer) { + glDeletePathbufferNV(buffer); +} + +static void JNICALL Java_org_lwjgl_opengles_NVDrawPath_nglPathbufferPathNV(JNIEnv *env, jclass clazz, jint buffer, jint index, jint path) { + glPathbufferPathNV(buffer, index, path); +} + +static void JNICALL Java_org_lwjgl_opengles_NVDrawPath_nglPathbufferPositionNV(JNIEnv *env, jclass clazz, jint buffer, jint index, jfloat x, jfloat y) { + glPathbufferPositionNV(buffer, index, x, y); +} + +static void JNICALL Java_org_lwjgl_opengles_NVDrawPath_nglDrawPathbufferNV(JNIEnv *env, jclass clazz, jint buffer, jint mode) { + glDrawPathbufferNV(buffer, mode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_NVDrawPath_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglCreatePathNV", "(IIJ)I", (void *)&Java_org_lwjgl_opengles_NVDrawPath_nglCreatePathNV, "glCreatePathNV", (void *)&glCreatePathNV, false}, + {"nglDeletePathNV", "(I)V", (void *)&Java_org_lwjgl_opengles_NVDrawPath_nglDeletePathNV, "glDeletePathNV", (void *)&glDeletePathNV, false}, + {"nglPathVerticesNV", "(IJ)V", (void *)&Java_org_lwjgl_opengles_NVDrawPath_nglPathVerticesNV, "glPathVerticesNV", (void *)&glPathVerticesNV, false}, + {"nglPathParameterfNV", "(IIF)V", (void *)&Java_org_lwjgl_opengles_NVDrawPath_nglPathParameterfNV, "glPathParameterfNV", (void *)&glPathParameterfNV, false}, + {"nglPathParameteriNV", "(III)V", (void *)&Java_org_lwjgl_opengles_NVDrawPath_nglPathParameteriNV, "glPathParameteriNV", (void *)&glPathParameteriNV, false}, + {"nglCreatePathProgramNV", "()I", (void *)&Java_org_lwjgl_opengles_NVDrawPath_nglCreatePathProgramNV, "glCreatePathProgramNV", (void *)&glCreatePathProgramNV, false}, + {"nglPathMatrixNV", "(IJ)V", (void *)&Java_org_lwjgl_opengles_NVDrawPath_nglPathMatrixNV, "glPathMatrixNV", (void *)&glPathMatrixNV, false}, + {"nglDrawPathNV", "(II)V", (void *)&Java_org_lwjgl_opengles_NVDrawPath_nglDrawPathNV, "glDrawPathNV", (void *)&glDrawPathNV, false}, + {"nglCreatePathbufferNV", "(I)I", (void *)&Java_org_lwjgl_opengles_NVDrawPath_nglCreatePathbufferNV, "glCreatePathbufferNV", (void *)&glCreatePathbufferNV, false}, + {"nglDeletePathbufferNV", "(I)V", (void *)&Java_org_lwjgl_opengles_NVDrawPath_nglDeletePathbufferNV, "glDeletePathbufferNV", (void *)&glDeletePathbufferNV, false}, + {"nglPathbufferPathNV", "(III)V", (void *)&Java_org_lwjgl_opengles_NVDrawPath_nglPathbufferPathNV, "glPathbufferPathNV", (void *)&glPathbufferPathNV, false}, + {"nglPathbufferPositionNV", "(IIFF)V", (void *)&Java_org_lwjgl_opengles_NVDrawPath_nglPathbufferPositionNV, "glPathbufferPositionNV", (void *)&glPathbufferPositionNV, false}, + {"nglDrawPathbufferNV", "(II)V", (void *)&Java_org_lwjgl_opengles_NVDrawPath_nglDrawPathbufferNV, "glDrawPathbufferNV", (void *)&glDrawPathbufferNV, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_NVDrawTexture.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_NVDrawTexture.c new file mode 100644 index 0000000..018473b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_NVDrawTexture.c @@ -0,0 +1,20 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glDrawTextureNVPROC) (GLuint texture, GLuint sampler, GLfloat x0, GLfloat y0, GLfloat x1, GLfloat y1, GLfloat z, GLfloat s0, GLfloat t0, GLfloat s1, GLfloat t1); + +static glDrawTextureNVPROC glDrawTextureNV; + +static void JNICALL Java_org_lwjgl_opengles_NVDrawTexture_nglDrawTextureNV(JNIEnv *env, jclass clazz, jint texture, jint sampler, jfloat x0, jfloat y0, jfloat x1, jfloat y1, jfloat z, jfloat s0, jfloat t0, jfloat s1, jfloat t1) { + glDrawTextureNV(texture, sampler, x0, y0, x1, y1, z, s0, t0, s1, t1); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_NVDrawTexture_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglDrawTextureNV", "(IIFFFFFFFFF)V", (void *)&Java_org_lwjgl_opengles_NVDrawTexture_nglDrawTextureNV, "glDrawTextureNV", (void *)&glDrawTextureNV, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_NVFence.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_NVFence.c new file mode 100644 index 0000000..5155ccf --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_NVFence.c @@ -0,0 +1,67 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glGenFencesNVPROC) (GLsizei n, GLuint * fences); +typedef GL_APICALL void (GL_APIENTRY *glDeleteFencesNVPROC) (GLsizei n, const GLuint * fences); +typedef GL_APICALL void (GL_APIENTRY *glSetFenceNVPROC) (GLuint fence, GLenum condition); +typedef GL_APICALL GLboolean (GL_APIENTRY *glTestFenceNVPROC) (GLuint fence); +typedef GL_APICALL void (GL_APIENTRY *glFinishFenceNVPROC) (GLuint fence); +typedef GL_APICALL GLboolean (GL_APIENTRY *glIsFenceNVPROC) (GLuint fence); +typedef GL_APICALL void (GL_APIENTRY *glGetFenceivNVPROC) (GLuint fence, GLenum pname, GLint * params); + +static glGenFencesNVPROC glGenFencesNV; +static glDeleteFencesNVPROC glDeleteFencesNV; +static glSetFenceNVPROC glSetFenceNV; +static glTestFenceNVPROC glTestFenceNV; +static glFinishFenceNVPROC glFinishFenceNV; +static glIsFenceNVPROC glIsFenceNV; +static glGetFenceivNVPROC glGetFenceivNV; + +static void JNICALL Java_org_lwjgl_opengles_NVFence_nglGenFencesNV(JNIEnv *env, jclass clazz, jint n, jlong fences) { + GLuint *fences_address = (GLuint *)(intptr_t)fences; + glGenFencesNV(n, fences_address); +} + +static void JNICALL Java_org_lwjgl_opengles_NVFence_nglDeleteFencesNV(JNIEnv *env, jclass clazz, jint n, jlong fences) { + const GLuint *fences_address = (const GLuint *)(intptr_t)fences; + glDeleteFencesNV(n, fences_address); +} + +static void JNICALL Java_org_lwjgl_opengles_NVFence_nglSetFenceNV(JNIEnv *env, jclass clazz, jint fence, jint condition) { + glSetFenceNV(fence, condition); +} + +static jboolean JNICALL Java_org_lwjgl_opengles_NVFence_nglTestFenceNV(JNIEnv *env, jclass clazz, jint fence) { + GLboolean __result = glTestFenceNV(fence); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_NVFence_nglFinishFenceNV(JNIEnv *env, jclass clazz, jint fence) { + glFinishFenceNV(fence); +} + +static jboolean JNICALL Java_org_lwjgl_opengles_NVFence_nglIsFenceNV(JNIEnv *env, jclass clazz, jint fence) { + GLboolean __result = glIsFenceNV(fence); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_NVFence_nglGetFenceivNV(JNIEnv *env, jclass clazz, jint fence, jint pname, jlong params) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetFenceivNV(fence, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_NVFence_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglGenFencesNV", "(IJ)V", (void *)&Java_org_lwjgl_opengles_NVFence_nglGenFencesNV, "glGenFencesNV", (void *)&glGenFencesNV, false}, + {"nglDeleteFencesNV", "(IJ)V", (void *)&Java_org_lwjgl_opengles_NVFence_nglDeleteFencesNV, "glDeleteFencesNV", (void *)&glDeleteFencesNV, false}, + {"nglSetFenceNV", "(II)V", (void *)&Java_org_lwjgl_opengles_NVFence_nglSetFenceNV, "glSetFenceNV", (void *)&glSetFenceNV, false}, + {"nglTestFenceNV", "(I)Z", (void *)&Java_org_lwjgl_opengles_NVFence_nglTestFenceNV, "glTestFenceNV", (void *)&glTestFenceNV, false}, + {"nglFinishFenceNV", "(I)V", (void *)&Java_org_lwjgl_opengles_NVFence_nglFinishFenceNV, "glFinishFenceNV", (void *)&glFinishFenceNV, false}, + {"nglIsFenceNV", "(I)Z", (void *)&Java_org_lwjgl_opengles_NVFence_nglIsFenceNV, "glIsFenceNV", (void *)&glIsFenceNV, false}, + {"nglGetFenceivNV", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_NVFence_nglGetFenceivNV, "glGetFenceivNV", (void *)&glGetFenceivNV, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_NVFramebufferVertexAttribArray.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_NVFramebufferVertexAttribArray.c new file mode 100644 index 0000000..f32054b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_NVFramebufferVertexAttribArray.c @@ -0,0 +1,20 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glFramebufferVertexAttribArrayNVPROC) (GLenum target, GLenum attachment, GLenum buffertarget, GLuint bufferobject, GLint size, GLenum type, GLboolean normalized, GLintptr offset, GLsizeiptr width, GLsizeiptr height, GLsizei stride); + +static glFramebufferVertexAttribArrayNVPROC glFramebufferVertexAttribArrayNV; + +static void JNICALL Java_org_lwjgl_opengles_NVFramebufferVertexAttribArray_nglFramebufferVertexAttribArrayNV(JNIEnv *env, jclass clazz, jint target, jint attachment, jint buffertarget, jint bufferobject, jint size, jint type, jboolean normalized, jlong offset, jlong width, jlong height, jint stride) { + glFramebufferVertexAttribArrayNV(target, attachment, buffertarget, bufferobject, size, type, normalized, offset, width, height, stride); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_NVFramebufferVertexAttribArray_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglFramebufferVertexAttribArrayNV", "(IIIIIIZJJJI)V", (void *)&Java_org_lwjgl_opengles_NVFramebufferVertexAttribArray_nglFramebufferVertexAttribArrayNV, "glFramebufferVertexAttribArrayNV", (void *)&glFramebufferVertexAttribArrayNV, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_NVGetTexImage.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_NVGetTexImage.c new file mode 100644 index 0000000..1a75e2c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_NVGetTexImage.c @@ -0,0 +1,46 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glGetTexImageNVPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLvoid * img); +typedef GL_APICALL void (GL_APIENTRY *glGetCompressedTexImageNVPROC) (GLenum target, GLint level, GLvoid * img); +typedef GL_APICALL void (GL_APIENTRY *glGetTexLevelParameterfvNVPROC) (GLenum target, GLint level, GLenum pname, GLfloat * params); +typedef GL_APICALL void (GL_APIENTRY *glGetTexLevelParameterivNVPROC) (GLenum target, GLint level, GLenum pname, GLint * params); + +static glGetTexImageNVPROC glGetTexImageNV; +static glGetCompressedTexImageNVPROC glGetCompressedTexImageNV; +static glGetTexLevelParameterfvNVPROC glGetTexLevelParameterfvNV; +static glGetTexLevelParameterivNVPROC glGetTexLevelParameterivNV; + +static void JNICALL Java_org_lwjgl_opengles_NVGetTexImage_nglGetTexImageNV(JNIEnv *env, jclass clazz, jint target, jint level, jint format, jint type, jlong img) { + GLvoid *img_address = (GLvoid *)(intptr_t)img; + glGetTexImageNV(target, level, format, type, img_address); +} + +static void JNICALL Java_org_lwjgl_opengles_NVGetTexImage_nglGetCompressedTexImageNV(JNIEnv *env, jclass clazz, jint target, jint level, jlong img) { + GLvoid *img_address = (GLvoid *)(intptr_t)img; + glGetCompressedTexImageNV(target, level, img_address); +} + +static void JNICALL Java_org_lwjgl_opengles_NVGetTexImage_nglGetTexLevelParameterfvNV(JNIEnv *env, jclass clazz, jint target, jint level, jint pname, jlong params) { + GLfloat *params_address = (GLfloat *)(intptr_t)params; + glGetTexLevelParameterfvNV(target, level, pname, params_address); +} + +static void JNICALL Java_org_lwjgl_opengles_NVGetTexImage_nglGetTexLevelParameterivNV(JNIEnv *env, jclass clazz, jint target, jint level, jint pname, jlong params) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetTexLevelParameterivNV(target, level, pname, params_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_NVGetTexImage_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglGetTexImageNV", "(IIIIJ)V", (void *)&Java_org_lwjgl_opengles_NVGetTexImage_nglGetTexImageNV, "glGetTexImageNV", (void *)&glGetTexImageNV, false}, + {"nglGetCompressedTexImageNV", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_NVGetTexImage_nglGetCompressedTexImageNV, "glGetCompressedTexImageNV", (void *)&glGetCompressedTexImageNV, false}, + {"nglGetTexLevelParameterfvNV", "(IIIJ)V", (void *)&Java_org_lwjgl_opengles_NVGetTexImage_nglGetTexLevelParameterfvNV, "glGetTexLevelParameterfvNV", (void *)&glGetTexLevelParameterfvNV, false}, + {"nglGetTexLevelParameterivNV", "(IIIJ)V", (void *)&Java_org_lwjgl_opengles_NVGetTexImage_nglGetTexLevelParameterivNV, "glGetTexLevelParameterivNV", (void *)&glGetTexLevelParameterivNV, false}, + + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_NVReadBuffer.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_NVReadBuffer.c new file mode 100644 index 0000000..65a0ab3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_NVReadBuffer.c @@ -0,0 +1,20 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glReadBufferNVPROC) (GLenum mode); + +static glReadBufferNVPROC glReadBufferNV; + +static void JNICALL Java_org_lwjgl_opengles_NVReadBuffer_nglReadBufferNV(JNIEnv *env, jclass clazz, jint mode) { + glReadBufferNV(mode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_NVReadBuffer_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglReadBufferNV", "(I)V", (void *)&Java_org_lwjgl_opengles_NVReadBuffer_nglReadBufferNV, "glReadBufferNV", (void *)&glReadBufferNV, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_NVSystemTime.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_NVSystemTime.c new file mode 100644 index 0000000..2a812b0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_NVSystemTime.c @@ -0,0 +1,29 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL EGLuint64NV (GL_APIENTRY *glGetSystemTimeFrequencyNVPROC) (); +typedef GL_APICALL EGLuint64NV (GL_APIENTRY *glGetSystemTimeNVPROC) (); + +static glGetSystemTimeFrequencyNVPROC glGetSystemTimeFrequencyNV; +static glGetSystemTimeNVPROC glGetSystemTimeNV; + +static jlong JNICALL Java_org_lwjgl_opengles_NVSystemTime_nglGetSystemTimeFrequencyNV(JNIEnv *env, jclass clazz) { + EGLuint64NV __result = glGetSystemTimeFrequencyNV(); + return __result; +} + +static jlong JNICALL Java_org_lwjgl_opengles_NVSystemTime_nglGetSystemTimeNV(JNIEnv *env, jclass clazz) { + EGLuint64NV __result = glGetSystemTimeNV(); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_NVSystemTime_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglGetSystemTimeFrequencyNV", "()J", (void *)&Java_org_lwjgl_opengles_NVSystemTime_nglGetSystemTimeFrequencyNV, "glGetSystemTimeFrequencyNV", (void *)&glGetSystemTimeFrequencyNV, false}, + {"nglGetSystemTimeNV", "()J", (void *)&Java_org_lwjgl_opengles_NVSystemTime_nglGetSystemTimeNV, "glGetSystemTimeNV", (void *)&glGetSystemTimeNV, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESBlendEquationSeparate.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESBlendEquationSeparate.c new file mode 100644 index 0000000..0a1339b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESBlendEquationSeparate.c @@ -0,0 +1,20 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glBlendEquationSeparateOESPROC) (GLenum modeRGB, GLenum modeAlpha); + +static glBlendEquationSeparateOESPROC glBlendEquationSeparateOES; + +static void JNICALL Java_org_lwjgl_opengles_OESBlendEquationSeparate_nglBlendEquationSeparateOES(JNIEnv *env, jclass clazz, jint modeRGB, jint modeAlpha) { + glBlendEquationSeparateOES(modeRGB, modeAlpha); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_OESBlendEquationSeparate_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglBlendEquationSeparateOES", "(II)V", (void *)&Java_org_lwjgl_opengles_OESBlendEquationSeparate_nglBlendEquationSeparateOES, "glBlendEquationSeparateOES", (void *)&glBlendEquationSeparateOES, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESBlendFuncSeparate.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESBlendFuncSeparate.c new file mode 100644 index 0000000..9c5b3a5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESBlendFuncSeparate.c @@ -0,0 +1,20 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glBlendFuncSeparateOESPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); + +static glBlendFuncSeparateOESPROC glBlendFuncSeparateOES; + +static void JNICALL Java_org_lwjgl_opengles_OESBlendFuncSeparate_nglBlendFuncSeparateOES(JNIEnv *env, jclass clazz, jint sfactorRGB, jint dfactorRGB, jint sfactorAlpha, jint dfactorAlpha) { + glBlendFuncSeparateOES(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_OESBlendFuncSeparate_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglBlendFuncSeparateOES", "(IIII)V", (void *)&Java_org_lwjgl_opengles_OESBlendFuncSeparate_nglBlendFuncSeparateOES, "glBlendFuncSeparateOES", (void *)&glBlendFuncSeparateOES, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESBlendSubtract.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESBlendSubtract.c new file mode 100644 index 0000000..ca822ae --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESBlendSubtract.c @@ -0,0 +1,20 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glBlendEquationOESPROC) (GLenum mode); + +static glBlendEquationOESPROC glBlendEquationOES; + +static void JNICALL Java_org_lwjgl_opengles_OESBlendSubtract_nglBlendEquationOES(JNIEnv *env, jclass clazz, jint mode) { + glBlendEquationOES(mode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_OESBlendSubtract_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglBlendEquationOES", "(I)V", (void *)&Java_org_lwjgl_opengles_OESBlendSubtract_nglBlendEquationOES, "glBlendEquationOES", (void *)&glBlendEquationOES, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESEGLImage.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESEGLImage.c new file mode 100644 index 0000000..5184858 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESEGLImage.c @@ -0,0 +1,27 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glEGLImageTargetTexture2DOESPROC) (GLenum target, GLeglImageOES image); +typedef GL_APICALL void (GL_APIENTRY *glEGLImageTargetRenderbufferStorageOESPROC) (GLenum target, GLeglImageOES image); + +static glEGLImageTargetTexture2DOESPROC glEGLImageTargetTexture2DOES; +static glEGLImageTargetRenderbufferStorageOESPROC glEGLImageTargetRenderbufferStorageOES; + +static void JNICALL Java_org_lwjgl_opengles_OESEGLImage_nglEGLImageTargetTexture2DOES(JNIEnv *env, jclass clazz, jint target, jlong image) { + glEGLImageTargetTexture2DOES(target, (GLeglImageOES)(intptr_t)image); +} + +static void JNICALL Java_org_lwjgl_opengles_OESEGLImage_nglEGLImageTargetRenderbufferStorageOES(JNIEnv *env, jclass clazz, jint target, jlong image) { + glEGLImageTargetRenderbufferStorageOES(target, (GLeglImageOES)(intptr_t)image); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_OESEGLImage_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglEGLImageTargetTexture2DOES", "(IJ)V", (void *)&Java_org_lwjgl_opengles_OESEGLImage_nglEGLImageTargetTexture2DOES, "glEGLImageTargetTexture2DOES", (void *)&glEGLImageTargetTexture2DOES, false}, + {"nglEGLImageTargetRenderbufferStorageOES", "(IJ)V", (void *)&Java_org_lwjgl_opengles_OESEGLImage_nglEGLImageTargetRenderbufferStorageOES, "glEGLImageTargetRenderbufferStorageOES", (void *)&glEGLImageTargetRenderbufferStorageOES, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESEGLImageExternal.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESEGLImageExternal.c new file mode 100644 index 0000000..c3aa36a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESEGLImageExternal.c @@ -0,0 +1,20 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glEGLImageTargetTexture2DOESPROC) (GLenum target, GLeglImageOES image); + +static glEGLImageTargetTexture2DOESPROC glEGLImageTargetTexture2DOES; + +static void JNICALL Java_org_lwjgl_opengles_OESEGLImageExternal_nglEGLImageTargetTexture2DOES(JNIEnv *env, jclass clazz, jint target, jlong image) { + glEGLImageTargetTexture2DOES(target, (GLeglImageOES)(intptr_t)image); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_OESEGLImageExternal_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglEGLImageTargetTexture2DOES", "(IJ)V", (void *)&Java_org_lwjgl_opengles_OESEGLImageExternal_nglEGLImageTargetTexture2DOES, "glEGLImageTargetTexture2DOES", (void *)&glEGLImageTargetTexture2DOES, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESFramebufferObject.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESFramebufferObject.c new file mode 100644 index 0000000..ca04953 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESFramebufferObject.c @@ -0,0 +1,127 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL GLboolean (GL_APIENTRY *glIsRenderbufferOESPROC) (GLuint renderbuffer); +typedef GL_APICALL void (GL_APIENTRY *glBindRenderbufferOESPROC) (GLenum target, GLuint renderbuffer); +typedef GL_APICALL void (GL_APIENTRY *glDeleteRenderbuffersOESPROC) (GLint n, const GLuint * renderbuffers); +typedef GL_APICALL void (GL_APIENTRY *glGenRenderbuffersOESPROC) (GLint n, GLuint * renderbuffers); +typedef GL_APICALL void (GL_APIENTRY *glRenderbufferStorageOESPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); +typedef GL_APICALL void (GL_APIENTRY *glGetRenderbufferParameterivOESPROC) (GLenum target, GLenum pname, GLint * params); +typedef GL_APICALL GLboolean (GL_APIENTRY *glIsFramebufferOESPROC) (GLuint framebuffer); +typedef GL_APICALL void (GL_APIENTRY *glBindFramebufferOESPROC) (GLenum target, GLuint framebuffer); +typedef GL_APICALL void (GL_APIENTRY *glDeleteFramebuffersOESPROC) (GLint n, const GLuint * framebuffers); +typedef GL_APICALL void (GL_APIENTRY *glGenFramebuffersOESPROC) (GLint n, GLuint * framebuffers); +typedef GL_APICALL GLenum (GL_APIENTRY *glCheckFramebufferStatusOESPROC) (GLenum target); +typedef GL_APICALL void (GL_APIENTRY *glFramebufferTexture2DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); +typedef GL_APICALL void (GL_APIENTRY *glFramebufferRenderbufferOESPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); +typedef GL_APICALL void (GL_APIENTRY *glGetFramebufferAttachmentParameterivOESPROC) (GLenum target, GLenum attachment, GLenum pname, GLint * params); +typedef GL_APICALL void (GL_APIENTRY *glGenerateMipmapOESPROC) (GLenum target); + +static glIsRenderbufferOESPROC glIsRenderbufferOES; +static glBindRenderbufferOESPROC glBindRenderbufferOES; +static glDeleteRenderbuffersOESPROC glDeleteRenderbuffersOES; +static glGenRenderbuffersOESPROC glGenRenderbuffersOES; +static glRenderbufferStorageOESPROC glRenderbufferStorageOES; +static glGetRenderbufferParameterivOESPROC glGetRenderbufferParameterivOES; +static glIsFramebufferOESPROC glIsFramebufferOES; +static glBindFramebufferOESPROC glBindFramebufferOES; +static glDeleteFramebuffersOESPROC glDeleteFramebuffersOES; +static glGenFramebuffersOESPROC glGenFramebuffersOES; +static glCheckFramebufferStatusOESPROC glCheckFramebufferStatusOES; +static glFramebufferTexture2DOESPROC glFramebufferTexture2DOES; +static glFramebufferRenderbufferOESPROC glFramebufferRenderbufferOES; +static glGetFramebufferAttachmentParameterivOESPROC glGetFramebufferAttachmentParameterivOES; +static glGenerateMipmapOESPROC glGenerateMipmapOES; + +static jboolean JNICALL Java_org_lwjgl_opengles_OESFramebufferObject_nglIsRenderbufferOES(JNIEnv *env, jclass clazz, jint renderbuffer) { + GLboolean __result = glIsRenderbufferOES(renderbuffer); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_OESFramebufferObject_nglBindRenderbufferOES(JNIEnv *env, jclass clazz, jint target, jint renderbuffer) { + glBindRenderbufferOES(target, renderbuffer); +} + +static void JNICALL Java_org_lwjgl_opengles_OESFramebufferObject_nglDeleteRenderbuffersOES(JNIEnv *env, jclass clazz, jint n, jlong renderbuffers) { + const GLuint *renderbuffers_address = (const GLuint *)(intptr_t)renderbuffers; + glDeleteRenderbuffersOES(n, renderbuffers_address); +} + +static void JNICALL Java_org_lwjgl_opengles_OESFramebufferObject_nglGenRenderbuffersOES(JNIEnv *env, jclass clazz, jint n, jlong renderbuffers) { + GLuint *renderbuffers_address = (GLuint *)(intptr_t)renderbuffers; + glGenRenderbuffersOES(n, renderbuffers_address); +} + +static void JNICALL Java_org_lwjgl_opengles_OESFramebufferObject_nglRenderbufferStorageOES(JNIEnv *env, jclass clazz, jint target, jint internalformat, jint width, jint height) { + glRenderbufferStorageOES(target, internalformat, width, height); +} + +static void JNICALL Java_org_lwjgl_opengles_OESFramebufferObject_nglGetRenderbufferParameterivOES(JNIEnv *env, jclass clazz, jint target, jint pname, jlong params) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetRenderbufferParameterivOES(target, pname, params_address); +} + +static jboolean JNICALL Java_org_lwjgl_opengles_OESFramebufferObject_nglIsFramebufferOES(JNIEnv *env, jclass clazz, jint framebuffer) { + GLboolean __result = glIsFramebufferOES(framebuffer); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_OESFramebufferObject_nglBindFramebufferOES(JNIEnv *env, jclass clazz, jint target, jint framebuffer) { + glBindFramebufferOES(target, framebuffer); +} + +static void JNICALL Java_org_lwjgl_opengles_OESFramebufferObject_nglDeleteFramebuffersOES(JNIEnv *env, jclass clazz, jint n, jlong framebuffers) { + const GLuint *framebuffers_address = (const GLuint *)(intptr_t)framebuffers; + glDeleteFramebuffersOES(n, framebuffers_address); +} + +static void JNICALL Java_org_lwjgl_opengles_OESFramebufferObject_nglGenFramebuffersOES(JNIEnv *env, jclass clazz, jint n, jlong framebuffers) { + GLuint *framebuffers_address = (GLuint *)(intptr_t)framebuffers; + glGenFramebuffersOES(n, framebuffers_address); +} + +static jint JNICALL Java_org_lwjgl_opengles_OESFramebufferObject_nglCheckFramebufferStatusOES(JNIEnv *env, jclass clazz, jint target) { + GLenum __result = glCheckFramebufferStatusOES(target); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_OESFramebufferObject_nglFramebufferTexture2DOES(JNIEnv *env, jclass clazz, jint target, jint attachment, jint textarget, jint texture, jint level) { + glFramebufferTexture2DOES(target, attachment, textarget, texture, level); +} + +static void JNICALL Java_org_lwjgl_opengles_OESFramebufferObject_nglFramebufferRenderbufferOES(JNIEnv *env, jclass clazz, jint target, jint attachment, jint renderbuffertarget, jint renderbuffer) { + glFramebufferRenderbufferOES(target, attachment, renderbuffertarget, renderbuffer); +} + +static void JNICALL Java_org_lwjgl_opengles_OESFramebufferObject_nglGetFramebufferAttachmentParameterivOES(JNIEnv *env, jclass clazz, jint target, jint attachment, jint pname, jlong params) { + GLint *params_address = (GLint *)(intptr_t)params; + glGetFramebufferAttachmentParameterivOES(target, attachment, pname, params_address); +} + +static void JNICALL Java_org_lwjgl_opengles_OESFramebufferObject_nglGenerateMipmapOES(JNIEnv *env, jclass clazz, jint target) { + glGenerateMipmapOES(target); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_OESFramebufferObject_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglIsRenderbufferOES", "(I)Z", (void *)&Java_org_lwjgl_opengles_OESFramebufferObject_nglIsRenderbufferOES, "glIsRenderbufferOES", (void *)&glIsRenderbufferOES, false}, + {"nglBindRenderbufferOES", "(II)V", (void *)&Java_org_lwjgl_opengles_OESFramebufferObject_nglBindRenderbufferOES, "glBindRenderbufferOES", (void *)&glBindRenderbufferOES, false}, + {"nglDeleteRenderbuffersOES", "(IJ)V", (void *)&Java_org_lwjgl_opengles_OESFramebufferObject_nglDeleteRenderbuffersOES, "glDeleteRenderbuffersOES", (void *)&glDeleteRenderbuffersOES, false}, + {"nglGenRenderbuffersOES", "(IJ)V", (void *)&Java_org_lwjgl_opengles_OESFramebufferObject_nglGenRenderbuffersOES, "glGenRenderbuffersOES", (void *)&glGenRenderbuffersOES, false}, + {"nglRenderbufferStorageOES", "(IIII)V", (void *)&Java_org_lwjgl_opengles_OESFramebufferObject_nglRenderbufferStorageOES, "glRenderbufferStorageOES", (void *)&glRenderbufferStorageOES, false}, + {"nglGetRenderbufferParameterivOES", "(IIJ)V", (void *)&Java_org_lwjgl_opengles_OESFramebufferObject_nglGetRenderbufferParameterivOES, "glGetRenderbufferParameterivOES", (void *)&glGetRenderbufferParameterivOES, false}, + {"nglIsFramebufferOES", "(I)Z", (void *)&Java_org_lwjgl_opengles_OESFramebufferObject_nglIsFramebufferOES, "glIsFramebufferOES", (void *)&glIsFramebufferOES, false}, + {"nglBindFramebufferOES", "(II)V", (void *)&Java_org_lwjgl_opengles_OESFramebufferObject_nglBindFramebufferOES, "glBindFramebufferOES", (void *)&glBindFramebufferOES, false}, + {"nglDeleteFramebuffersOES", "(IJ)V", (void *)&Java_org_lwjgl_opengles_OESFramebufferObject_nglDeleteFramebuffersOES, "glDeleteFramebuffersOES", (void *)&glDeleteFramebuffersOES, false}, + {"nglGenFramebuffersOES", "(IJ)V", (void *)&Java_org_lwjgl_opengles_OESFramebufferObject_nglGenFramebuffersOES, "glGenFramebuffersOES", (void *)&glGenFramebuffersOES, false}, + {"nglCheckFramebufferStatusOES", "(I)I", (void *)&Java_org_lwjgl_opengles_OESFramebufferObject_nglCheckFramebufferStatusOES, "glCheckFramebufferStatusOES", (void *)&glCheckFramebufferStatusOES, false}, + {"nglFramebufferTexture2DOES", "(IIIII)V", (void *)&Java_org_lwjgl_opengles_OESFramebufferObject_nglFramebufferTexture2DOES, "glFramebufferTexture2DOES", (void *)&glFramebufferTexture2DOES, false}, + {"nglFramebufferRenderbufferOES", "(IIII)V", (void *)&Java_org_lwjgl_opengles_OESFramebufferObject_nglFramebufferRenderbufferOES, "glFramebufferRenderbufferOES", (void *)&glFramebufferRenderbufferOES, false}, + {"nglGetFramebufferAttachmentParameterivOES", "(IIIJ)V", (void *)&Java_org_lwjgl_opengles_OESFramebufferObject_nglGetFramebufferAttachmentParameterivOES, "glGetFramebufferAttachmentParameterivOES", (void *)&glGetFramebufferAttachmentParameterivOES, false}, + {"nglGenerateMipmapOES", "(I)V", (void *)&Java_org_lwjgl_opengles_OESFramebufferObject_nglGenerateMipmapOES, "glGenerateMipmapOES", (void *)&glGenerateMipmapOES, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESGetProgramBinary.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESGetProgramBinary.c new file mode 100644 index 0000000..628cb76 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESGetProgramBinary.c @@ -0,0 +1,31 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glGetProgramBinaryOESPROC) (GLuint program, GLsizei bufSize, GLsizei * length, GLenum * binaryFormat, GLvoid * binary); +typedef GL_APICALL void (GL_APIENTRY *glProgramBinaryOESPROC) (GLuint program, GLenum binaryFormat, const GLvoid * binary, GLint length); + +static glGetProgramBinaryOESPROC glGetProgramBinaryOES; +static glProgramBinaryOESPROC glProgramBinaryOES; + +static void JNICALL Java_org_lwjgl_opengles_OESGetProgramBinary_nglGetProgramBinaryOES(JNIEnv *env, jclass clazz, jint program, jint bufSize, jlong length, jlong binaryFormat, jlong binary) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLenum *binaryFormat_address = (GLenum *)(intptr_t)binaryFormat; + GLvoid *binary_address = (GLvoid *)(intptr_t)binary; + glGetProgramBinaryOES(program, bufSize, length_address, binaryFormat_address, binary_address); +} + +static void JNICALL Java_org_lwjgl_opengles_OESGetProgramBinary_nglProgramBinaryOES(JNIEnv *env, jclass clazz, jint program, jint binaryFormat, jlong binary, jint length) { + const GLvoid *binary_address = (const GLvoid *)(intptr_t)binary; + glProgramBinaryOES(program, binaryFormat, binary_address, length); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_OESGetProgramBinary_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglGetProgramBinaryOES", "(IIJJJ)V", (void *)&Java_org_lwjgl_opengles_OESGetProgramBinary_nglGetProgramBinaryOES, "glGetProgramBinaryOES", (void *)&glGetProgramBinaryOES, false}, + {"nglProgramBinaryOES", "(IIJI)V", (void *)&Java_org_lwjgl_opengles_OESGetProgramBinary_nglProgramBinaryOES, "glProgramBinaryOES", (void *)&glProgramBinaryOES, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESMapbuffer.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESMapbuffer.c new file mode 100644 index 0000000..174dec9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESMapbuffer.c @@ -0,0 +1,38 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glGetBufferPointervOESPROC) (GLenum target, GLenum pname, GLvoid ** pointer); +typedef GL_APICALL GLvoid * (GL_APIENTRY *glMapBufferOESPROC) (GLenum target, GLenum access); +typedef GL_APICALL GLboolean (GL_APIENTRY *glUnmapBufferOESPROC) (GLenum target); + +static glGetBufferPointervOESPROC glGetBufferPointervOES; +static glMapBufferOESPROC glMapBufferOES; +static glUnmapBufferOESPROC glUnmapBufferOES; + +static jobject JNICALL Java_org_lwjgl_opengles_OESMapbuffer_nglGetBufferPointervOES(JNIEnv *env, jclass clazz, jint target, jint pname, jlong result_size, jobject old_buffer) { + GLvoid * __result; + glGetBufferPointervOES(target, pname, &__result); + return safeNewBufferCached(env, __result, result_size, old_buffer); +} + +static jobject JNICALL Java_org_lwjgl_opengles_OESMapbuffer_nglMapBufferOES(JNIEnv *env, jclass clazz, jint target, jint access, jlong result_size, jobject old_buffer) { + GLvoid * __result = glMapBufferOES(target, access); + return safeNewBufferCached(env, __result, result_size, old_buffer); +} + +static jboolean JNICALL Java_org_lwjgl_opengles_OESMapbuffer_nglUnmapBufferOES(JNIEnv *env, jclass clazz, jint target) { + GLboolean __result = glUnmapBufferOES(target); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_OESMapbuffer_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglGetBufferPointervOES", "(IIJLjava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;", (void *)&Java_org_lwjgl_opengles_OESMapbuffer_nglGetBufferPointervOES, "glGetBufferPointervOES", (void *)&glGetBufferPointervOES, false}, + {"nglMapBufferOES", "(IIJLjava/nio/ByteBuffer;)Ljava/nio/ByteBuffer;", (void *)&Java_org_lwjgl_opengles_OESMapbuffer_nglMapBufferOES, "glMapBufferOES", (void *)&glMapBufferOES, false}, + {"nglUnmapBufferOES", "(I)Z", (void *)&Java_org_lwjgl_opengles_OESMapbuffer_nglUnmapBufferOES, "glUnmapBufferOES", (void *)&glUnmapBufferOES, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESTexture3D.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESTexture3D.c new file mode 100644 index 0000000..409c7d4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESTexture3D.c @@ -0,0 +1,59 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glTexImage3DOESPROC) (GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid * pixels); +typedef GL_APICALL void (GL_APIENTRY *glTexSubImage3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid * pixels); +typedef GL_APICALL void (GL_APIENTRY *glCopyTexSubImage3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); +typedef GL_APICALL void (GL_APIENTRY *glCompressedTexImage3DOESPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data); +typedef GL_APICALL void (GL_APIENTRY *glCompressedTexSubImage3DOESPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data); +typedef GL_APICALL void (GL_APIENTRY *glFramebufferTexture3DOESPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset); + +static glTexImage3DOESPROC glTexImage3DOES; +static glTexSubImage3DOESPROC glTexSubImage3DOES; +static glCopyTexSubImage3DOESPROC glCopyTexSubImage3DOES; +static glCompressedTexImage3DOESPROC glCompressedTexImage3DOES; +static glCompressedTexSubImage3DOESPROC glCompressedTexSubImage3DOES; +static glFramebufferTexture3DOESPROC glFramebufferTexture3DOES; + +static void JNICALL Java_org_lwjgl_opengles_OESTexture3D_nglTexImage3DOES(JNIEnv *env, jclass clazz, jint target, jint level, jint internalFormat, jint width, jint height, jint depth, jint border, jint format, jint type, jlong pixels) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)pixels; + glTexImage3DOES(target, level, internalFormat, width, height, depth, border, format, type, pixels_address); +} + +static void JNICALL Java_org_lwjgl_opengles_OESTexture3D_nglTexSubImage3DOES(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jlong pixels) { + const GLvoid *pixels_address = (const GLvoid *)(intptr_t)pixels; + glTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels_address); +} + +static void JNICALL Java_org_lwjgl_opengles_OESTexture3D_nglCopyTexSubImage3DOES(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint x, jint y, jint width, jint height) { + glCopyTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, x, y, width, height); +} + +static void JNICALL Java_org_lwjgl_opengles_OESTexture3D_nglCompressedTexImage3DOES(JNIEnv *env, jclass clazz, jint target, jint level, jint internalformat, jint width, jint height, jint depth, jint border, jint imageSize, jlong data) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glCompressedTexImage3DOES(target, level, internalformat, width, height, depth, border, imageSize, data_address); +} + +static void JNICALL Java_org_lwjgl_opengles_OESTexture3D_nglCompressedTexSubImage3DOES(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint imageSize, jlong data) { + const GLvoid *data_address = (const GLvoid *)(intptr_t)data; + glCompressedTexSubImage3DOES(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data_address); +} + +static void JNICALL Java_org_lwjgl_opengles_OESTexture3D_nglFramebufferTexture3DOES(JNIEnv *env, jclass clazz, jint target, jint attachment, jint textarget, jint texture, jint level, jint zoffset) { + glFramebufferTexture3DOES(target, attachment, textarget, texture, level, zoffset); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_OESTexture3D_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglTexImage3DOES", "(IIIIIIIIIJ)V", (void *)&Java_org_lwjgl_opengles_OESTexture3D_nglTexImage3DOES, "glTexImage3DOES", (void *)&glTexImage3DOES, false}, + {"nglTexSubImage3DOES", "(IIIIIIIIIIJ)V", (void *)&Java_org_lwjgl_opengles_OESTexture3D_nglTexSubImage3DOES, "glTexSubImage3DOES", (void *)&glTexSubImage3DOES, false}, + {"nglCopyTexSubImage3DOES", "(IIIIIIIII)V", (void *)&Java_org_lwjgl_opengles_OESTexture3D_nglCopyTexSubImage3DOES, "glCopyTexSubImage3DOES", (void *)&glCopyTexSubImage3DOES, false}, + {"nglCompressedTexImage3DOES", "(IIIIIIIIJ)V", (void *)&Java_org_lwjgl_opengles_OESTexture3D_nglCompressedTexImage3DOES, "glCompressedTexImage3DOES", (void *)&glCompressedTexImage3DOES, false}, + {"nglCompressedTexSubImage3DOES", "(IIIIIIIIIIJ)V", (void *)&Java_org_lwjgl_opengles_OESTexture3D_nglCompressedTexSubImage3DOES, "glCompressedTexSubImage3DOES", (void *)&glCompressedTexSubImage3DOES, false}, + {"nglFramebufferTexture3DOES", "(IIIIII)V", (void *)&Java_org_lwjgl_opengles_OESTexture3D_nglFramebufferTexture3DOES, "glFramebufferTexture3DOES", (void *)&glFramebufferTexture3DOES, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESVertexArrayObject.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESVertexArrayObject.c new file mode 100644 index 0000000..9f69123 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_OESVertexArrayObject.c @@ -0,0 +1,44 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glBindVertexArrayOESPROC) (GLuint array); +typedef GL_APICALL void (GL_APIENTRY *glDeleteVertexArraysOESPROC) (GLsizei n, const GLuint * arrays); +typedef GL_APICALL void (GL_APIENTRY *glGenVertexArraysOESPROC) (GLsizei n, GLuint * arrays); +typedef GL_APICALL GLboolean (GL_APIENTRY *glIsVertexArrayOESPROC) (GLuint array); + +static glBindVertexArrayOESPROC glBindVertexArrayOES; +static glDeleteVertexArraysOESPROC glDeleteVertexArraysOES; +static glGenVertexArraysOESPROC glGenVertexArraysOES; +static glIsVertexArrayOESPROC glIsVertexArrayOES; + +static void JNICALL Java_org_lwjgl_opengles_OESVertexArrayObject_nglBindVertexArrayOES(JNIEnv *env, jclass clazz, jint array) { + glBindVertexArrayOES(array); +} + +static void JNICALL Java_org_lwjgl_opengles_OESVertexArrayObject_nglDeleteVertexArraysOES(JNIEnv *env, jclass clazz, jint n, jlong arrays) { + const GLuint *arrays_address = (const GLuint *)(intptr_t)arrays; + glDeleteVertexArraysOES(n, arrays_address); +} + +static void JNICALL Java_org_lwjgl_opengles_OESVertexArrayObject_nglGenVertexArraysOES(JNIEnv *env, jclass clazz, jint n, jlong arrays) { + GLuint *arrays_address = (GLuint *)(intptr_t)arrays; + glGenVertexArraysOES(n, arrays_address); +} + +static jboolean JNICALL Java_org_lwjgl_opengles_OESVertexArrayObject_nglIsVertexArrayOES(JNIEnv *env, jclass clazz, jint array) { + GLboolean __result = glIsVertexArrayOES(array); + return __result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_OESVertexArrayObject_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglBindVertexArrayOES", "(I)V", (void *)&Java_org_lwjgl_opengles_OESVertexArrayObject_nglBindVertexArrayOES, "glBindVertexArrayOES", (void *)&glBindVertexArrayOES, false}, + {"nglDeleteVertexArraysOES", "(IJ)V", (void *)&Java_org_lwjgl_opengles_OESVertexArrayObject_nglDeleteVertexArraysOES, "glDeleteVertexArraysOES", (void *)&glDeleteVertexArraysOES, false}, + {"nglGenVertexArraysOES", "(IJ)V", (void *)&Java_org_lwjgl_opengles_OESVertexArrayObject_nglGenVertexArraysOES, "glGenVertexArraysOES", (void *)&glGenVertexArraysOES, false}, + {"nglIsVertexArrayOES", "(I)Z", (void *)&Java_org_lwjgl_opengles_OESVertexArrayObject_nglIsVertexArrayOES, "glIsVertexArrayOES", (void *)&glIsVertexArrayOES, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_QCOMDriverControl.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_QCOMDriverControl.c new file mode 100644 index 0000000..89be9b8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_QCOMDriverControl.c @@ -0,0 +1,45 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glGetDriverControlsQCOMPROC) (GLint * num, GLsizei size, GLuint * driverControls); +typedef GL_APICALL void (GL_APIENTRY *glGetDriverControlStringQCOMPROC) (GLuint driverControl, GLsizei bufSize, GLsizei * length, GLchar * driverControlString); +typedef GL_APICALL void (GL_APIENTRY *glEnableDriverControlQCOMPROC) (GLuint driverControl); +typedef GL_APICALL void (GL_APIENTRY *glDisableDriverControlQCOMPROC) (GLuint driverControl); + +static glGetDriverControlsQCOMPROC glGetDriverControlsQCOM; +static glGetDriverControlStringQCOMPROC glGetDriverControlStringQCOM; +static glEnableDriverControlQCOMPROC glEnableDriverControlQCOM; +static glDisableDriverControlQCOMPROC glDisableDriverControlQCOM; + +static void JNICALL Java_org_lwjgl_opengles_QCOMDriverControl_nglGetDriverControlsQCOM(JNIEnv *env, jclass clazz, jlong num, jint size, jlong driverControls) { + GLint *num_address = (GLint *)(intptr_t)num; + GLuint *driverControls_address = (GLuint *)(intptr_t)driverControls; + glGetDriverControlsQCOM(num_address, size, driverControls_address); +} + +static void JNICALL Java_org_lwjgl_opengles_QCOMDriverControl_nglGetDriverControlStringQCOM(JNIEnv *env, jclass clazz, jint driverControl, jint bufSize, jlong length, jlong driverControlString) { + GLsizei *length_address = (GLsizei *)(intptr_t)length; + GLchar *driverControlString_address = (GLchar *)(intptr_t)driverControlString; + glGetDriverControlStringQCOM(driverControl, bufSize, length_address, driverControlString_address); +} + +static void JNICALL Java_org_lwjgl_opengles_QCOMDriverControl_nglEnableDriverControlQCOM(JNIEnv *env, jclass clazz, jint driverControl) { + glEnableDriverControlQCOM(driverControl); +} + +static void JNICALL Java_org_lwjgl_opengles_QCOMDriverControl_nglDisableDriverControlQCOM(JNIEnv *env, jclass clazz, jint driverControl) { + glDisableDriverControlQCOM(driverControl); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_QCOMDriverControl_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglGetDriverControlsQCOM", "(JIJ)V", (void *)&Java_org_lwjgl_opengles_QCOMDriverControl_nglGetDriverControlsQCOM, "glGetDriverControlsQCOM", (void *)&glGetDriverControlsQCOM, false}, + {"nglGetDriverControlStringQCOM", "(IIJJ)V", (void *)&Java_org_lwjgl_opengles_QCOMDriverControl_nglGetDriverControlStringQCOM, "glGetDriverControlStringQCOM", (void *)&glGetDriverControlStringQCOM, false}, + {"nglEnableDriverControlQCOM", "(I)V", (void *)&Java_org_lwjgl_opengles_QCOMDriverControl_nglEnableDriverControlQCOM, "glEnableDriverControlQCOM", (void *)&glEnableDriverControlQCOM, false}, + {"nglDisableDriverControlQCOM", "(I)V", (void *)&Java_org_lwjgl_opengles_QCOMDriverControl_nglDisableDriverControlQCOM, "glDisableDriverControlQCOM", (void *)&glDisableDriverControlQCOM, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_QCOMExtendedGet.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_QCOMExtendedGet.c new file mode 100644 index 0000000..c7ebcc1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_QCOMExtendedGet.c @@ -0,0 +1,81 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glExtGetTexturesQCOMPROC) (GLuint * textures, GLint maxTextures, GLint * numTextures); +typedef GL_APICALL void (GL_APIENTRY *glExtGetBuffersQCOMPROC) (GLuint * buffers, GLint maxBuffers, GLint * numBuffers); +typedef GL_APICALL void (GL_APIENTRY *glExtGetRenderbuffersQCOMPROC) (GLuint * renderbuffers, GLint maxRenderbuffers, GLint * numRenderbuffers); +typedef GL_APICALL void (GL_APIENTRY *glExtGetFramebuffersQCOMPROC) (GLuint * framebuffers, GLint maxFramebuffers, GLint * numFramebuffers); +typedef GL_APICALL void (GL_APIENTRY *glExtGetTexLevelParameterivQCOMPROC) (GLuint texture, GLenum face, GLint level, GLenum pname, GLint * params); +typedef GL_APICALL void (GL_APIENTRY *glExtTexObjectStateOverrideiQCOMPROC) (GLenum target, GLenum pname, GLint param); +typedef GL_APICALL void (GL_APIENTRY *glExtGetTexSubImageQCOMPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid * texels); +typedef GL_APICALL void (GL_APIENTRY *glExtGetBufferPointervQCOMPROC) (GLenum target, GLvoid ** params); + +static glExtGetTexturesQCOMPROC glExtGetTexturesQCOM; +static glExtGetBuffersQCOMPROC glExtGetBuffersQCOM; +static glExtGetRenderbuffersQCOMPROC glExtGetRenderbuffersQCOM; +static glExtGetFramebuffersQCOMPROC glExtGetFramebuffersQCOM; +static glExtGetTexLevelParameterivQCOMPROC glExtGetTexLevelParameterivQCOM; +static glExtTexObjectStateOverrideiQCOMPROC glExtTexObjectStateOverrideiQCOM; +static glExtGetTexSubImageQCOMPROC glExtGetTexSubImageQCOM; +static glExtGetBufferPointervQCOMPROC glExtGetBufferPointervQCOM; + +static void JNICALL Java_org_lwjgl_opengles_QCOMExtendedGet_nglExtGetTexturesQCOM(JNIEnv *env, jclass clazz, jlong textures, jint maxTextures, jlong numTextures) { + GLuint *textures_address = (GLuint *)(intptr_t)textures; + GLint *numTextures_address = (GLint *)(intptr_t)numTextures; + glExtGetTexturesQCOM(textures_address, maxTextures, numTextures_address); +} + +static void JNICALL Java_org_lwjgl_opengles_QCOMExtendedGet_nglExtGetBuffersQCOM(JNIEnv *env, jclass clazz, jlong buffers, jint maxBuffers, jlong numBuffers) { + GLuint *buffers_address = (GLuint *)(intptr_t)buffers; + GLint *numBuffers_address = (GLint *)(intptr_t)numBuffers; + glExtGetBuffersQCOM(buffers_address, maxBuffers, numBuffers_address); +} + +static void JNICALL Java_org_lwjgl_opengles_QCOMExtendedGet_nglExtGetRenderbuffersQCOM(JNIEnv *env, jclass clazz, jlong renderbuffers, jint maxRenderbuffers, jlong numRenderbuffers) { + GLuint *renderbuffers_address = (GLuint *)(intptr_t)renderbuffers; + GLint *numRenderbuffers_address = (GLint *)(intptr_t)numRenderbuffers; + glExtGetRenderbuffersQCOM(renderbuffers_address, maxRenderbuffers, numRenderbuffers_address); +} + +static void JNICALL Java_org_lwjgl_opengles_QCOMExtendedGet_nglExtGetFramebuffersQCOM(JNIEnv *env, jclass clazz, jlong framebuffers, jint maxFramebuffers, jlong numFramebuffers) { + GLuint *framebuffers_address = (GLuint *)(intptr_t)framebuffers; + GLint *numFramebuffers_address = (GLint *)(intptr_t)numFramebuffers; + glExtGetFramebuffersQCOM(framebuffers_address, maxFramebuffers, numFramebuffers_address); +} + +static void JNICALL Java_org_lwjgl_opengles_QCOMExtendedGet_nglExtGetTexLevelParameterivQCOM(JNIEnv *env, jclass clazz, jint texture, jint face, jint level, jint pname, jlong params) { + GLint *params_address = (GLint *)(intptr_t)params; + glExtGetTexLevelParameterivQCOM(texture, face, level, pname, params_address); +} + +static void JNICALL Java_org_lwjgl_opengles_QCOMExtendedGet_nglExtTexObjectStateOverrideiQCOM(JNIEnv *env, jclass clazz, jint target, jint pname, jint param) { + glExtTexObjectStateOverrideiQCOM(target, pname, param); +} + +static void JNICALL Java_org_lwjgl_opengles_QCOMExtendedGet_nglExtGetTexSubImageQCOM(JNIEnv *env, jclass clazz, jint target, jint level, jint xoffset, jint yoffset, jint zoffset, jint width, jint height, jint depth, jint format, jint type, jlong texels) { + GLvoid *texels_address = (GLvoid *)(intptr_t)texels; + glExtGetTexSubImageQCOM(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, texels_address); +} + +static jobject JNICALL Java_org_lwjgl_opengles_QCOMExtendedGet_nglExtGetBufferPointervQCOM(JNIEnv *env, jclass clazz, jint target, jlong result_size) { + GLvoid * __result; + glExtGetBufferPointervQCOM(target, &__result); + return safeNewBuffer(env, __result, result_size); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_QCOMExtendedGet_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglExtGetTexturesQCOM", "(JIJ)V", (void *)&Java_org_lwjgl_opengles_QCOMExtendedGet_nglExtGetTexturesQCOM, "glExtGetTexturesQCOM", (void *)&glExtGetTexturesQCOM, false}, + {"nglExtGetBuffersQCOM", "(JIJ)V", (void *)&Java_org_lwjgl_opengles_QCOMExtendedGet_nglExtGetBuffersQCOM, "glExtGetBuffersQCOM", (void *)&glExtGetBuffersQCOM, false}, + {"nglExtGetRenderbuffersQCOM", "(JIJ)V", (void *)&Java_org_lwjgl_opengles_QCOMExtendedGet_nglExtGetRenderbuffersQCOM, "glExtGetRenderbuffersQCOM", (void *)&glExtGetRenderbuffersQCOM, false}, + {"nglExtGetFramebuffersQCOM", "(JIJ)V", (void *)&Java_org_lwjgl_opengles_QCOMExtendedGet_nglExtGetFramebuffersQCOM, "glExtGetFramebuffersQCOM", (void *)&glExtGetFramebuffersQCOM, false}, + {"nglExtGetTexLevelParameterivQCOM", "(IIIIJ)V", (void *)&Java_org_lwjgl_opengles_QCOMExtendedGet_nglExtGetTexLevelParameterivQCOM, "glExtGetTexLevelParameterivQCOM", (void *)&glExtGetTexLevelParameterivQCOM, false}, + {"nglExtTexObjectStateOverrideiQCOM", "(III)V", (void *)&Java_org_lwjgl_opengles_QCOMExtendedGet_nglExtTexObjectStateOverrideiQCOM, "glExtTexObjectStateOverrideiQCOM", (void *)&glExtTexObjectStateOverrideiQCOM, false}, + {"nglExtGetTexSubImageQCOM", "(IIIIIIIIIIJ)V", (void *)&Java_org_lwjgl_opengles_QCOMExtendedGet_nglExtGetTexSubImageQCOM, "glExtGetTexSubImageQCOM", (void *)&glExtGetTexSubImageQCOM, false}, + {"nglExtGetBufferPointervQCOM", "(IJ)Ljava/nio/ByteBuffer;", (void *)&Java_org_lwjgl_opengles_QCOMExtendedGet_nglExtGetBufferPointervQCOM, "glExtGetBufferPointervQCOM", (void *)&glExtGetBufferPointervQCOM, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_QCOMExtendedGet2.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_QCOMExtendedGet2.c new file mode 100644 index 0000000..cce4dd9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_QCOMExtendedGet2.c @@ -0,0 +1,48 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glExtGetShadersQCOMPROC) (GLuint * shaders, GLint maxShaders, GLint * numShaders); +typedef GL_APICALL void (GL_APIENTRY *glExtGetProgramsQCOMPROC) (GLuint * programs, GLint maxPrograms, GLint * numPrograms); +typedef GL_APICALL GLboolean (GL_APIENTRY *glExtIsProgramBinaryQCOMPROC) (GLuint program); +typedef GL_APICALL void (GL_APIENTRY *glExtGetProgramBinarySourceQCOMPROC) (GLuint program, GLenum shadertype, GLchar * source, GLint * length); + +static glExtGetShadersQCOMPROC glExtGetShadersQCOM; +static glExtGetProgramsQCOMPROC glExtGetProgramsQCOM; +static glExtIsProgramBinaryQCOMPROC glExtIsProgramBinaryQCOM; +static glExtGetProgramBinarySourceQCOMPROC glExtGetProgramBinarySourceQCOM; + +static void JNICALL Java_org_lwjgl_opengles_QCOMExtendedGet2_nglExtGetShadersQCOM(JNIEnv *env, jclass clazz, jlong shaders, jint maxShaders, jlong numShaders) { + GLuint *shaders_address = (GLuint *)(intptr_t)shaders; + GLint *numShaders_address = (GLint *)(intptr_t)numShaders; + glExtGetShadersQCOM(shaders_address, maxShaders, numShaders_address); +} + +static void JNICALL Java_org_lwjgl_opengles_QCOMExtendedGet2_nglExtGetProgramsQCOM(JNIEnv *env, jclass clazz, jlong programs, jint maxPrograms, jlong numPrograms) { + GLuint *programs_address = (GLuint *)(intptr_t)programs; + GLint *numPrograms_address = (GLint *)(intptr_t)numPrograms; + glExtGetProgramsQCOM(programs_address, maxPrograms, numPrograms_address); +} + +static jboolean JNICALL Java_org_lwjgl_opengles_QCOMExtendedGet2_nglExtIsProgramBinaryQCOM(JNIEnv *env, jclass clazz, jint program) { + GLboolean __result = glExtIsProgramBinaryQCOM(program); + return __result; +} + +static void JNICALL Java_org_lwjgl_opengles_QCOMExtendedGet2_nglExtGetProgramBinarySourceQCOM(JNIEnv *env, jclass clazz, jint program, jint shadertype, jlong source, jlong length) { + GLchar *source_address = (GLchar *)(intptr_t)source; + GLint *length_address = (GLint *)(intptr_t)length; + glExtGetProgramBinarySourceQCOM(program, shadertype, source_address, length_address); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_QCOMExtendedGet2_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglExtGetShadersQCOM", "(JIJ)V", (void *)&Java_org_lwjgl_opengles_QCOMExtendedGet2_nglExtGetShadersQCOM, "glExtGetShadersQCOM", (void *)&glExtGetShadersQCOM, false}, + {"nglExtGetProgramsQCOM", "(JIJ)V", (void *)&Java_org_lwjgl_opengles_QCOMExtendedGet2_nglExtGetProgramsQCOM, "glExtGetProgramsQCOM", (void *)&glExtGetProgramsQCOM, false}, + {"nglExtIsProgramBinaryQCOM", "(I)Z", (void *)&Java_org_lwjgl_opengles_QCOMExtendedGet2_nglExtIsProgramBinaryQCOM, "glExtIsProgramBinaryQCOM", (void *)&glExtIsProgramBinaryQCOM, false}, + {"nglExtGetProgramBinarySourceQCOM", "(IIJJ)V", (void *)&Java_org_lwjgl_opengles_QCOMExtendedGet2_nglExtGetProgramBinarySourceQCOM, "glExtGetProgramBinarySourceQCOM", (void *)&glExtGetProgramBinarySourceQCOM, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_QCOMTiledRendering.c b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_QCOMTiledRendering.c new file mode 100644 index 0000000..6c59096 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/generated/opengles/org_lwjgl_opengles_QCOMTiledRendering.c @@ -0,0 +1,27 @@ +/* MACHINE GENERATED FILE, DO NOT EDIT */ + +#include +#include "extgl.h" + +typedef GL_APICALL void (GL_APIENTRY *glStartTilingQCOMPROC) (GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask); +typedef GL_APICALL void (GL_APIENTRY *glEndTilingQCOMPROC) (GLbitfield preserveMask); + +static glStartTilingQCOMPROC glStartTilingQCOM; +static glEndTilingQCOMPROC glEndTilingQCOM; + +static void JNICALL Java_org_lwjgl_opengles_QCOMTiledRendering_nglStartTilingQCOM(JNIEnv *env, jclass clazz, jint x, jint y, jint width, jint height, jint preserveMask) { + glStartTilingQCOM(x, y, width, height, preserveMask); +} + +static void JNICALL Java_org_lwjgl_opengles_QCOMTiledRendering_nglEndTilingQCOM(JNIEnv *env, jclass clazz, jint preserveMask) { + glEndTilingQCOM(preserveMask); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengles_QCOMTiledRendering_initNativeStubs(JNIEnv *env, jclass clazz) { + JavaMethodAndExtFunction functions[] = { + {"nglStartTilingQCOM", "(IIIII)V", (void *)&Java_org_lwjgl_opengles_QCOMTiledRendering_nglStartTilingQCOM, "glStartTilingQCOM", (void *)&glStartTilingQCOM, false}, + {"nglEndTilingQCOM", "(I)V", (void *)&Java_org_lwjgl_opengles_QCOMTiledRendering_nglEndTilingQCOM, "glEndTilingQCOM", (void *)&glEndTilingQCOM, false} + }; + int num_functions = NUMFUNCTIONS(functions); + extgl_InitializeClass(env, clazz, num_functions, functions); +} diff --git a/etc/lwjgl-2.9.1/src/native/linux/linux_al.c b/etc/lwjgl-2.9.1/src/native/linux/linux_al.c new file mode 100644 index 0000000..1d915e4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/linux_al.c @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include "org_lwjgl_openal_AL.h" +#include "extal.h" +#include "common_tools.h" + +#include + +static void* handleOAL; + +void *extal_NativeGetFunctionPointer(const char *function) { + return dlsym(handleOAL, function); +} + +void extal_LoadLibrary(JNIEnv *env, jstring path) { + char *path_str = GetStringNativeChars(env, path); + printfDebugJava(env, "Testing '%s'", path_str); + handleOAL = dlopen(path_str, RTLD_LAZY); + if (handleOAL != NULL) { + printfDebugJava(env, "Found OpenAL at '%s'", path_str); + } else { + throwException(env, "Could not load OpenAL library"); + } + free(path_str); +} + +void extal_UnloadLibrary() { + if (handleOAL != NULL) { + dlclose(handleOAL); + handleOAL = NULL; + } +} diff --git a/etc/lwjgl-2.9.1/src/native/linux/linux_cl.c b/etc/lwjgl-2.9.1/src/native/linux/linux_cl.c new file mode 100644 index 0000000..3fbd194 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/linux_cl.c @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include "extcl.h" +#include "common_tools.h" + +#include + +static void* handleOCL; + +void *extcl_NativeGetFunctionPointer(const char *function) { + return dlsym(handleOCL, function); +} + +void extcl_LoadLibrary(JNIEnv *env, jstring path) { + char *path_str = GetStringNativeChars(env, path); + printfDebugJava(env, "Testing '%s'", path_str); + handleOCL = dlopen(path_str, RTLD_LAZY); + if (handleOCL != NULL) { + printfDebugJava(env, "Found OpenCL at '%s'", path_str); + } else { + throwException(env, "Could not load OpenCL library"); + } + free(path_str); +} + +void extcl_UnloadLibrary() { + if (handleOCL != NULL) { + dlclose(handleOCL); + handleOCL = NULL; + } +} diff --git a/etc/lwjgl-2.9.1/src/native/linux/lwjgl.map b/etc/lwjgl-2.9.1/src/native/linux/lwjgl.map new file mode 100644 index 0000000..939db7b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/lwjgl.map @@ -0,0 +1,7 @@ +{ + global: + Java_*; + JNI_OnLoad; + JNI_OnUnload; + local: *; +}; diff --git a/etc/lwjgl-2.9.1/src/native/linux/opengl/GLX.c b/etc/lwjgl-2.9.1/src/native/linux/opengl/GLX.c new file mode 100644 index 0000000..c0073d9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/opengl/GLX.c @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * GLX extension implementations. + * + * @author Spasi + */ +#include "GLX.h" + +/* NV_present_video functions */ + +typedef struct { + GLXExtensions extension_flags; + GLXContext context; +} X11Context; + +jint extgl_EnumerateVideoDevicesNV(JNIEnv *env, jobject peer_info_handle, jobject devices, jint devices_position) { + X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle); + jlong *devices_address = ((jlong *)safeGetBufferAddress(env, devices)) + devices_position; + unsigned int *result; + int i, elements; + + result = lwjgl_glXEnumerateVideoDevicesNV(peer_info->display, peer_info->screen, &elements); + if ( devices_address != NULL ) { + for ( i = 0; i < elements; i++ ) + devices_address[i] = (jlong)result[i]; + } + XFree(result); + + return elements; +} + +jboolean extgl_BindVideoDeviceNV(JNIEnv *env, jobject peer_info_handle, jint video_slot, jlong video_device, jobject attrib_list, jint attrib_list_position) { + X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle); + const int *attrib_list_address = ((const int *)safeGetBufferAddress(env, attrib_list)) + attrib_list_position; + + return lwjgl_glXBindVideoDeviceNV(peer_info->display, video_slot, (unsigned int)video_device, attrib_list_address); +} + +jboolean extgl_QueryContextNV(JNIEnv *env, jobject peer_info_handle, jobject context_handle, jint attrib, jobject value, jint value_position) { + X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle); + X11Context *context_info = (*env)->GetDirectBufferAddress(env, context_handle); + int *value_address = ((int *)(*env)->GetDirectBufferAddress(env, value)) + value_position; + + return lwjgl_glXQueryContext(peer_info->display, context_info->context, attrib, value_address) == GLX_BAD_ATTRIBUTE ? 0 : 1; +} + +/* NV_video_capture functions */ + +jboolean extgl_BindVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jint video_slot, jlong device) { + X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle); + + return lwjgl_glXBindVideoCaptureDeviceNV(peer_info->display, video_slot, (GLXVideoCaptureDeviceNV)device); +} + +jint extgl_EnumerateVideoCaptureDevicesNV(JNIEnv *env, jobject peer_info_handle, jobject devices, jint devices_position) { + X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle); + jlong *devices_address = ((jlong *)safeGetBufferAddress(env, devices)) + devices_position; + GLXVideoCaptureDeviceNV *result; + int i, elements; + + result = lwjgl_glXEnumerateVideoCaptureDevicesNV(peer_info->display, peer_info->screen, &elements); + if ( devices_address != NULL ) { + for ( i = 0; i < elements; i++ ) + devices_address[i] = (jlong)result[i]; + } + XFree(devices); + + return elements; +} + +jboolean extgl_LockVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device) { + X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle); + + lwjgl_glXLockVideoCaptureDeviceNV(peer_info->display, (GLXVideoCaptureDeviceNV)device); + return true; +} + +jboolean extgl_QueryVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device, jint attribute, jobject value, jint value_position) { + X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle); + int *value_address = ((int *)(*env)->GetDirectBufferAddress(env, value)) + value_position; + + return lwjgl_glXQueryVideoCaptureDeviceNV(peer_info->display, (GLXVideoCaptureDeviceNV)device, attribute, value_address); +} + +jboolean extgl_ReleaseVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device) { + X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle); + + lwjgl_glXReleaseVideoCaptureDeviceNV(peer_info->display, (GLXVideoCaptureDeviceNV)device); + return true; +} diff --git a/etc/lwjgl-2.9.1/src/native/linux/opengl/GLX.h b/etc/lwjgl-2.9.1/src/native/linux/opengl/GLX.h new file mode 100644 index 0000000..1a6b8fd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/opengl/GLX.h @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * GLX extension implementations. + * + * @author Spasi + */ +#ifndef __LWJGL_GLX_H +#define __LWJGL_GLX_H + +#include +#include "common_tools.h" +#include "context.h" + +#include "extgl.h" +#include "extgl_glx.h" + +/* NV_present_video functions */ +extern jint extgl_EnumerateVideoDevicesNV(JNIEnv *env, jobject peer_info_handle, jobject devices, jint devices_position); +extern jboolean extgl_BindVideoDeviceNV(JNIEnv *env, jobject peer_info_handle, jint video_slot, jlong video_device, jobject attrib_list, jint attrib_list_position); +extern jboolean extgl_QueryContextNV(JNIEnv *env, jobject peer_info_handle, jobject context_handle, jint attrib, jobject value, jint value_position); + +/* NV_video_capture functions */ +extern jboolean extgl_BindVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jint video_slot, jlong device); +extern jint extgl_EnumerateVideoCaptureDevicesNV(JNIEnv *env, jobject peer_info_handle, jobject devices, jint devices_position); +extern jboolean extgl_LockVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device); +extern jboolean extgl_QueryVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device, jint attribute, jobject value, jint value_position); +extern jboolean extgl_ReleaseVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device); + +#endif diff --git a/etc/lwjgl-2.9.1/src/native/linux/opengl/context.c b/etc/lwjgl-2.9.1/src/native/linux/opengl/context.c new file mode 100644 index 0000000..4b851f6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/opengl/context.c @@ -0,0 +1,359 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Include file to access public window features + * + * @author elias_naur + * @version $Revision$ + */ + +#include +#include +#include +#include +#include "extgl_glx.h" +#include "context.h" + +XVisualInfo *getVisualInfoFromPeerInfo(JNIEnv *env, X11PeerInfo *peer_info) { + XVisualInfo *vis_info; + if (!peer_info->glx13) { + XVisualInfo template; + template.visualid = peer_info->config.glx_config.visualid; + template.depth = peer_info->config.glx_config.depth; + template.screen = peer_info->screen; + int num_infos; + vis_info = XGetVisualInfo(peer_info->display, VisualIDMask | VisualScreenMask | VisualDepthMask, &template, &num_infos); + if (vis_info == NULL) { + throwException(env, "Could not find VisualInfo from peer info"); + return NULL; + } + // Check the assumption from GLX 1.3 docs that a VisualInfo is uniquely identified by its + // {VisualID, screen, depth} tuple + if (num_infos != 1) { + XFree(vis_info); + throwException(env, "No unique VisualInfo matches peer info"); + return NULL; + } + } else { + GLXFBConfig *configs = getFBConfigFromPeerInfo(env, peer_info); + if (configs == NULL) + return NULL; + vis_info = lwjgl_glXGetVisualFromFBConfig(peer_info->display, configs[0]); + if (vis_info == NULL) + throwException(env, "Could not get VisualInfo from GLX 1.3 config"); + XFree(configs); + } + return vis_info; +} + +GLXFBConfig *getFBConfigFromPeerInfo(JNIEnv *env, X11PeerInfo *peer_info) { + int attribs[] = {GLX_FBCONFIG_ID, peer_info->config.glx13_config.config_id, None, None}; + int num_elements; + GLXFBConfig *configs = lwjgl_glXChooseFBConfig(peer_info->display, peer_info->screen, attribs, &num_elements); + if (configs == NULL) { + throwException(env, "Could not find GLX 1.3 config from peer info"); + return NULL; + } + // Check that only one FBConfig matches the config id + if (num_elements != 1) { + XFree(configs); + throwException(env, "No unique GLX 1.3 config matches peer info"); + return NULL; + } + return configs; +} + +static int convertToBPE(int bpp) { + int bpe; + switch (bpp) { + case 0: + bpe = 0; + break; + case 32: + case 24: + bpe = 8; + break; + case 16: /* Fall through */ + default: + bpe = 4; + break; + } + return bpe; +} + +static GLXFBConfig *chooseVisualGLX13FromBPP(JNIEnv *env, Display *disp, int screen, jobject pixel_format, int bpp, int drawable_type, bool double_buffer) { + jclass cls_pixel_format = (*env)->GetObjectClass(env, pixel_format); + int alpha = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "alpha", "I")); + int depth = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "depth", "I")); + int stencil = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "stencil", "I")); + int samples = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "samples", "I")); + int colorSamples = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "colorSamples", "I")); + int num_aux_buffers = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "num_aux_buffers", "I")); + int accum_bpp = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "accum_bpp", "I")); + int accum_alpha = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "accum_alpha", "I")); + + bool stereo = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "stereo", "Z")); + bool floating_point = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "floating_point", "Z")); + bool floating_point_packed = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "floating_point_packed", "Z")); + bool sRGB = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "sRGB", "Z")); + + int bpe = convertToBPE(bpp); + int accum_bpe = convertToBPE(accum_bpp); + attrib_list_t attrib_list; + initAttribList(&attrib_list); + int render_type; + + if ( floating_point ) + render_type = GLX_RGBA_FLOAT_BIT; + else if ( floating_point_packed ) + render_type = GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT; + else + render_type = GLX_RGBA_BIT; + + putAttrib(&attrib_list, GLX_RENDER_TYPE); putAttrib(&attrib_list, render_type); + putAttrib(&attrib_list, GLX_DOUBLEBUFFER); putAttrib(&attrib_list, double_buffer ? True : False); + putAttrib(&attrib_list, GLX_DRAWABLE_TYPE); putAttrib(&attrib_list, drawable_type); + putAttrib(&attrib_list, GLX_DEPTH_SIZE); putAttrib(&attrib_list, depth); + putAttrib(&attrib_list, GLX_RED_SIZE); putAttrib(&attrib_list, bpe); + putAttrib(&attrib_list, GLX_GREEN_SIZE); putAttrib(&attrib_list, bpe); + putAttrib(&attrib_list, GLX_BLUE_SIZE); putAttrib(&attrib_list, bpe); + putAttrib(&attrib_list, GLX_ALPHA_SIZE); putAttrib(&attrib_list, alpha); + putAttrib(&attrib_list, GLX_STENCIL_SIZE); putAttrib(&attrib_list, stencil); + putAttrib(&attrib_list, GLX_AUX_BUFFERS); putAttrib(&attrib_list, num_aux_buffers); + putAttrib(&attrib_list, GLX_ACCUM_RED_SIZE); putAttrib(&attrib_list, accum_bpe); + putAttrib(&attrib_list, GLX_ACCUM_GREEN_SIZE); putAttrib(&attrib_list, accum_bpe); + putAttrib(&attrib_list, GLX_ACCUM_BLUE_SIZE); putAttrib(&attrib_list, accum_bpe); + putAttrib(&attrib_list, GLX_ACCUM_ALPHA_SIZE); putAttrib(&attrib_list, accum_alpha); + if (stereo) { + putAttrib(&attrib_list, GLX_STEREO); putAttrib(&attrib_list, True); + } + // Assume the caller has checked support for multisample + if (samples > 0) { + putAttrib(&attrib_list, GLX_SAMPLE_BUFFERS_ARB); putAttrib(&attrib_list, 1); + putAttrib(&attrib_list, GLX_SAMPLES_ARB); putAttrib(&attrib_list, samples); // GLX_COVERAGE_SAMPLES_NV if colorSamples > 0 + if ( colorSamples > 0 ) { + putAttrib(&attrib_list, GLX_COLOR_SAMPLES_NV); putAttrib(&attrib_list, colorSamples); + } + } + if (sRGB) { + putAttrib(&attrib_list, GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB); putAttrib(&attrib_list, True); + } + putAttrib(&attrib_list, None); putAttrib(&attrib_list, None); + int num_formats = 0; + GLXFBConfig* configs = lwjgl_glXChooseFBConfig(disp, screen, attrib_list.attribs, &num_formats); + if (num_formats > 0) { + return configs; + } else { + if (configs != NULL) + XFree(configs); + return NULL; + } +} + +GLXFBConfig *chooseVisualGLX13(JNIEnv *env, Display *disp, int screen, jobject pixel_format, bool use_display_bpp, int drawable_type, bool double_buffer) { + jclass cls_pixel_format = (*env)->GetObjectClass(env, pixel_format); + int bpp; + if (use_display_bpp) { + bpp = XDefaultDepthOfScreen(XScreenOfDisplay(disp, screen)); + GLXFBConfig *configs = chooseVisualGLX13FromBPP(env, disp, screen, pixel_format, bpp, drawable_type, double_buffer); + if (configs != NULL) + return configs; + else + bpp = 16; + } else + bpp = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "bpp", "I")); + return chooseVisualGLX13FromBPP(env, disp, screen, pixel_format, bpp, drawable_type, double_buffer); +} + +static XVisualInfo *chooseVisualGLXFromBPP(JNIEnv *env, Display *disp, int screen, jobject pixel_format, int bpp, bool double_buffer) { + jclass cls_pixel_format = (*env)->GetObjectClass(env, pixel_format); + int alpha = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "alpha", "I")); + int depth = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "depth", "I")); + int stencil = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "stencil", "I")); + int samples = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "samples", "I")); + int colorSamples = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "colorSamples", "I")); + int num_aux_buffers = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "num_aux_buffers", "I")); + int accum_bpp = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "accum_bpp", "I")); + int accum_alpha = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "accum_alpha", "I")); + + bool stereo = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "stereo", "Z")); + bool sRGB = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "sRGB", "Z")); + + int bpe = convertToBPE(bpp); + int accum_bpe = convertToBPE(accum_bpp); + attrib_list_t attrib_list; + initAttribList(&attrib_list); + putAttrib(&attrib_list, GLX_RGBA); + putAttrib(&attrib_list, GLX_DOUBLEBUFFER); + putAttrib(&attrib_list, GLX_DEPTH_SIZE); putAttrib(&attrib_list, depth); + putAttrib(&attrib_list, GLX_RED_SIZE); putAttrib(&attrib_list, bpe); + putAttrib(&attrib_list, GLX_GREEN_SIZE); putAttrib(&attrib_list, bpe); + putAttrib(&attrib_list, GLX_BLUE_SIZE); putAttrib(&attrib_list, bpe); + putAttrib(&attrib_list, GLX_ALPHA_SIZE); putAttrib(&attrib_list, alpha); + putAttrib(&attrib_list, GLX_STENCIL_SIZE); putAttrib(&attrib_list, stencil); + putAttrib(&attrib_list, GLX_AUX_BUFFERS); putAttrib(&attrib_list, num_aux_buffers); + putAttrib(&attrib_list, GLX_ACCUM_RED_SIZE); putAttrib(&attrib_list, accum_bpe); + putAttrib(&attrib_list, GLX_ACCUM_GREEN_SIZE); putAttrib(&attrib_list, accum_bpe); + putAttrib(&attrib_list, GLX_ACCUM_BLUE_SIZE); putAttrib(&attrib_list, accum_bpe); + putAttrib(&attrib_list, GLX_ACCUM_ALPHA_SIZE); putAttrib(&attrib_list, accum_alpha); + if (stereo) + putAttrib(&attrib_list, GLX_STEREO); + // Assume the caller has checked support for multisample + if (samples > 0) { + putAttrib(&attrib_list, GLX_SAMPLE_BUFFERS_ARB); putAttrib(&attrib_list, 1); + putAttrib(&attrib_list, GLX_SAMPLES_ARB); putAttrib(&attrib_list, samples); // GLX_COVERAGE_SAMPLES_NV if colorSamples > 0 + if ( colorSamples > 0 ) + putAttrib(&attrib_list, GLX_COLOR_SAMPLES_NV); putAttrib(&attrib_list, colorSamples); + } + if (sRGB) + putAttrib(&attrib_list, GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB); + putAttrib(&attrib_list, None); + return lwjgl_glXChooseVisual(disp, screen, attrib_list.attribs); +} + +XVisualInfo *chooseVisualGLX(JNIEnv *env, Display *disp, int screen, jobject pixel_format, bool use_display_bpp, bool double_buffer) { + jclass cls_pixel_format = (*env)->GetObjectClass(env, pixel_format); + int bpp; + if (use_display_bpp) { + bpp = XDefaultDepthOfScreen(XScreenOfDisplay(disp, screen)); + XVisualInfo *vis_info = chooseVisualGLXFromBPP(env, disp, screen, pixel_format, bpp, double_buffer); + if (vis_info != NULL) + return vis_info; + else + bpp = 16; + } else + bpp = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "bpp", "I")); + return chooseVisualGLXFromBPP(env, disp, screen, pixel_format, bpp, double_buffer); +} + +static void dumpVisualInfo(JNIEnv *env, Display *display, GLXExtensions *extension_flags, XVisualInfo *vis_info) { + int alpha, depth, stencil, r, g, b; + int sample_buffers = 0; + int samples = 0; + lwjgl_glXGetConfig(display, vis_info, GLX_RED_SIZE, &r); + lwjgl_glXGetConfig(display, vis_info, GLX_GREEN_SIZE, &g); + lwjgl_glXGetConfig(display, vis_info, GLX_BLUE_SIZE, &b); + lwjgl_glXGetConfig(display, vis_info, GLX_ALPHA_SIZE, &alpha); + lwjgl_glXGetConfig(display, vis_info, GLX_DEPTH_SIZE, &depth); + lwjgl_glXGetConfig(display, vis_info, GLX_STENCIL_SIZE, &stencil); + if (extension_flags->GLX_ARB_multisample) { + lwjgl_glXGetConfig(display, vis_info, GLX_SAMPLE_BUFFERS_ARB, &sample_buffers); + lwjgl_glXGetConfig(display, vis_info, GLX_SAMPLES_ARB, &samples); + } + printfDebugJava(env, "Pixel format info: r = %d, g = %d, b = %d, a = %d, depth = %d, stencil = %d, sample buffers = %d, samples = %d", r, g, b, alpha, depth, stencil, sample_buffers, samples); +} + +bool initPeerInfo(JNIEnv *env, jobject peer_info_handle, Display *display, int screen, jobject pixel_format, bool use_display_bpp, int drawable_type, bool double_buffered, bool force_glx13) { + if ((*env)->GetDirectBufferCapacity(env, peer_info_handle) < sizeof(X11PeerInfo)) { + throwException(env, "Handle too small"); + return false; + } + X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle); + GLXExtensions extension_flags; + if (!extgl_InitGLX(display, screen, &extension_flags)) { + throwException(env, "Could not init GLX"); + return false; + } + if (!extension_flags.GLX13 && force_glx13) { + throwException(env, "GLX13 is required, but is not available"); + return false; + } + jclass cls_pixel_format = (*env)->GetObjectClass(env, pixel_format); + int samples = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "samples", "I")); + if (samples > 0 && !extension_flags.GLX_ARB_multisample) { + throwException(env, "Samples > 0 specified but there's no support for GLX_ARB_multisample"); + return false; + } + int colorSamples = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "colorSamples", "I")); + if (colorSamples > 0 && !extension_flags.GLX_NV_multisample_coverage) { + throwException(env, "Color samples > 0 specified but there's no support for GLX_NV_multisample_coverage"); + return false; + } + bool floating_point = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "floating_point", "Z")); + if (floating_point && !(extension_flags.GLX13 && extension_flags.GLX_ARB_fbconfig_float)) { // We need GLX13 to support floating point + throwException(env, "Floating point specified but there's no support for GLX_ARB_fbconfig_float"); + return false; + } + bool floating_point_packed = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "floating_point_packed", "Z")); + if (floating_point_packed && !(extension_flags.GLX13 && extension_flags.GLX_EXT_fbconfig_packed_float)) { // We need GLX13 to support packed floating point + throwException(env, "Packed floating point specified but there's no support for GLX_EXT_fbconfig_packed_float"); + return false; + } + bool sRGB = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "sRGB", "Z")); + if (sRGB && !extension_flags.GLX_ARB_framebuffer_sRGB) { + throwException(env, "sRGB specified but there's no support for GLX_ARB_framebuffer_sRGB"); + return false; + } + + peer_info->glx13 = extension_flags.GLX13; + if (peer_info->glx13) { + GLXFBConfig *configs = chooseVisualGLX13(env, display, screen, pixel_format, use_display_bpp, drawable_type, double_buffered); + if (configs == NULL) { + throwException(env, "Could not choose GLX13 config"); + return false; + } + if (isDebugEnabled()) { + XVisualInfo *vis_info = lwjgl_glXGetVisualFromFBConfig(display, configs[0]); + if (vis_info != NULL) { + dumpVisualInfo(env, display, &extension_flags, vis_info); + XFree(vis_info); + } + } + int config_id; + int result = lwjgl_glXGetFBConfigAttrib(display, configs[0], GLX_FBCONFIG_ID, &config_id); + XFree(configs); + if (result != Success) { + throwException(env, "Could not get GLX_FBCONFIG_ID from GLXFBConfig"); + return false; + } + peer_info->config.glx13_config.config_id = config_id; + } else { + XVisualInfo *vis_info = chooseVisualGLX(env, display, screen, pixel_format, use_display_bpp, double_buffered); + if (vis_info == NULL) { + throwException(env, "Could not choose visual"); + return false; + } + peer_info->config.glx_config.visualid = vis_info->visualid; + peer_info->config.glx_config.depth = vis_info->depth; + peer_info->screen = vis_info->screen; + if (isDebugEnabled()) + dumpVisualInfo(env, display, &extension_flags, vis_info); + XFree(vis_info); + } + peer_info->display = display; + peer_info->screen = screen; + peer_info->drawable = None; + return true; +} diff --git a/etc/lwjgl-2.9.1/src/native/linux/opengl/context.h b/etc/lwjgl-2.9.1/src/native/linux/opengl/context.h new file mode 100644 index 0000000..ea4c414 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/opengl/context.h @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Include file to access public window features + * + * @author elias_naur + * @version $Revision$ + */ + +#ifndef _LWJGL_CONTEXT_H_INCLUDED_ +#define _LWJGL_CONTEXT_H_INCLUDED_ + +#include +#include +#include +#include +#include "extgl_glx.h" + +typedef struct { + VisualID visualid; + int depth; +} GLXConfig; + +typedef struct { + GLXFBConfigID config_id; +} GLX13Config; + +typedef struct { + Display *display; + int screen; + GLXDrawable drawable; + // This flag determines the appropriate glx struct + bool glx13; + union { + GLXConfig glx_config; + GLX13Config glx13_config; + } config; +} X11PeerInfo; + +/* GLX 1.3 chooser */ +extern GLXFBConfig *chooseVisualGLX13(JNIEnv *env, Display *disp, int screen, jobject pixel_format, bool use_display_bpp, int drawable_type, bool double_buffer); + +/* Default GLX chooser*/ +extern XVisualInfo *chooseVisualGLX(JNIEnv *env, Display *disp, int screen, jobject pixel_format, bool use_display_bpp, bool double_buffer); + +extern XVisualInfo *getVisualInfoFromPeerInfo(JNIEnv *env, X11PeerInfo *peer_info); +extern GLXFBConfig *getFBConfigFromPeerInfo(JNIEnv *env, X11PeerInfo *peer_info); + +extern bool initPeerInfo(JNIEnv *env, jobject peer_info_handle, Display *display, int screen, jobject pixel_format, bool use_display_bpp, int drawable_type, bool double_buffered, bool force_glx13); + +#endif /* _LWJGL_CONTEXT_H_INCLUDED_ */ diff --git a/etc/lwjgl-2.9.1/src/native/linux/opengl/display.c b/etc/lwjgl-2.9.1/src/native/linux/opengl/display.c new file mode 100644 index 0000000..dbd0693 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/opengl/display.c @@ -0,0 +1,411 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Linux specific library for display handling. + * + * @author elias_naur + * @version $Revision$ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "common_tools.h" +#include "org_lwjgl_opengl_LinuxDisplay.h" + +#define NUM_XRANDR_RETRIES 5 + +typedef struct { + int width; + int height; + int freq; + union { + int size_index; // Data for Xrandr extension + XF86VidModeModeInfo xf86vm_modeinfo; // Data for XF86VidMode extension + } mode_data; +} mode_info; + +static bool getXF86VidModeVersion(JNIEnv *env, Display *disp, int *major, int *minor) { + int event_base, error_base; + + if (!XF86VidModeQueryExtension(disp, &event_base, &error_base)) { + printfDebugJava(env, "XF86VidMode extension not available"); + return false; + } + if (!XF86VidModeQueryVersion(disp, major, minor)) { + throwException(env, "Could not query XF86VidMode version"); + return false; + } + printfDebugJava(env, "XF86VidMode extension version %i.%i", *major, *minor); + return true; +} + +static bool getXrandrVersion(JNIEnv *env, Display *disp, int *major, int *minor) { + int event_base, error_base; + + if (!XRRQueryExtension(disp, &event_base, &error_base)) { + printfDebugJava(env, "Xrandr extension not available"); + return false; + } + if (!XRRQueryVersion(disp, major, minor)) { + throwException(env, "Could not query Xrandr version"); + return false; + } + printfDebugJava(env, "Xrandr extension version %i.%i", *major, *minor); + return true; +} + +static bool isXrandrSupported(JNIEnv *env, Display *disp) { + int major, minor; + if (!getXrandrVersion(env, disp, &major, &minor)) + return false; + return major >= 1; +} + +static bool isXF86VidModeSupported(JNIEnv *env, Display *disp) { + int minor_ver, major_ver; + if (!getXF86VidModeVersion(env, disp, &major_ver, &minor_ver)) + return false; + return major_ver >= 2; +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nIsXrandrSupported(JNIEnv *env, jclass unused, jlong display) { + Display *disp = (Display *)(intptr_t)display; + jboolean result = isXrandrSupported(env, disp) ? JNI_TRUE : JNI_FALSE; + return result; +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nIsXF86VidModeSupported(JNIEnv *env, jclass unused, jlong display) { + Display *disp = (Display *)(intptr_t)display; + jboolean result = isXF86VidModeSupported(env, disp) ? JNI_TRUE : JNI_FALSE; + return result; +} + +static mode_info *getXrandrDisplayModes(Display *disp, int screen, int *num_modes) { + int num_randr_sizes; + XRRScreenSize *sizes = XRRSizes(disp, screen, &num_randr_sizes); + mode_info *avail_modes = NULL; + int list_size = 0; + /* Count number of modes */ + int i; + int mode_index = 0; + for (i = 0; i < num_randr_sizes; i++) { + int num_randr_rates; + short *freqs = XRRRates(disp, screen, i, &num_randr_rates); + int j; + for (j = 0; j < num_randr_rates; j++) { + if (list_size <= mode_index) { + list_size += 1; + avail_modes = (mode_info *)realloc(avail_modes, sizeof(mode_info)*list_size); + if (avail_modes == NULL) + return NULL; + } + avail_modes[mode_index].width = sizes[i].width; + avail_modes[mode_index].height = sizes[i].height; + avail_modes[mode_index].freq = freqs[j]; + avail_modes[mode_index].mode_data.size_index = i; + mode_index++; + } + } + *num_modes = mode_index; + return avail_modes; +} + +static mode_info *getXF86VidModeDisplayModes(Display *disp, int screen, int *num_modes) { + int num_xf86vm_modes; + XF86VidModeModeInfo **avail_xf86vm_modes; + XF86VidModeGetAllModeLines(disp, screen, &num_xf86vm_modes, &avail_xf86vm_modes); + mode_info *avail_modes = (mode_info *)malloc(sizeof(mode_info)*num_xf86vm_modes); + if (avail_modes == NULL) { + XFree(avail_xf86vm_modes); + return NULL; + } + int i; + for (i = 0; i < num_xf86vm_modes; i++) { + avail_modes[i].width = avail_xf86vm_modes[i]->hdisplay; + avail_modes[i].height = avail_xf86vm_modes[i]->vdisplay; + avail_modes[i].freq = 0; // No frequency support in XF86VidMode + avail_modes[i].mode_data.xf86vm_modeinfo = *avail_xf86vm_modes[i]; + } + XFree(avail_xf86vm_modes); + *num_modes = num_xf86vm_modes; + return avail_modes; +} + +static mode_info *getDisplayModes(Display *disp, int screen, jint extension, int *num_modes) { + switch (extension) { + case org_lwjgl_opengl_LinuxDisplay_XF86VIDMODE: + return getXF86VidModeDisplayModes(disp, screen, num_modes); + case org_lwjgl_opengl_LinuxDisplay_XRANDR: + return getXrandrDisplayModes(disp, screen, num_modes); + case org_lwjgl_opengl_LinuxDisplay_NONE: + // fall through + default: + return NULL; + } +} + +static bool setXF86VidModeMode(Display *disp, int screen, mode_info *mode) { + return True == XF86VidModeSwitchToMode(disp, screen, &mode->mode_data.xf86vm_modeinfo); +} + +/* Try to set the mode specified through XRandR. + * Return value is the Status code of the mode switch + * The timestamp parameter is filled with the latest timestamp returned from XRRConfigTimes + */ +static Status trySetXrandrMode(Display *disp, int screen, mode_info *mode, Time *timestamp) { + Status status; + Drawable root_window = RootWindow(disp, screen); + XRRScreenConfiguration *screen_configuration = XRRGetScreenInfo(disp, root_window); + Time config_time; + *timestamp = XRRConfigTimes(screen_configuration, &config_time); + Rotation current_rotation; + XRRConfigCurrentConfiguration(screen_configuration, ¤t_rotation); + status = XRRSetScreenConfigAndRate(disp, screen_configuration, root_window, mode->mode_data.size_index, current_rotation, mode->freq, *timestamp); + XRRFreeScreenConfigInfo(screen_configuration); + return status; +} + +static bool setXrandrMode(Display *disp, int screen, mode_info *mode) { + int iteration; + Time timestamp; + Status status = trySetXrandrMode(disp, screen, mode, ×tamp); + if (status == 0) + return true; // Success + Time new_timestamp; + for (iteration = 0; iteration < NUM_XRANDR_RETRIES; iteration++) { + status = trySetXrandrMode(disp, screen, mode, &new_timestamp); + if (status == 0) + return true; // Success + if (new_timestamp == timestamp) { + return false; // Failure, and the stamps are equal meaning that the failure is not merely transient + } + timestamp = new_timestamp; + } + return false; +} + +static bool setMode(JNIEnv *env, Display *disp, int screen, jint extension, int width, int height, int freq) { + int num_modes, i; + mode_info *avail_modes = getDisplayModes(disp, screen, extension, &num_modes); + if (avail_modes == NULL) { + printfDebugJava(env, "Could not get display modes"); + return false; + } + bool result = false; + for (i = 0; i < num_modes; ++i) { + printfDebugJava(env, "Mode %d: %dx%d @%d", i, avail_modes[i].width, avail_modes[i].height, avail_modes[i].freq); + if (avail_modes[i].width == width && avail_modes[i].height == height && avail_modes[i].freq == freq) { + switch (extension) { + case org_lwjgl_opengl_LinuxDisplay_XF86VIDMODE: + if (!setXF86VidModeMode(disp, screen, &avail_modes[i])) { + printfDebugJava(env, "Could not switch mode"); + continue; + } + break; + case org_lwjgl_opengl_LinuxDisplay_XRANDR: + if (!setXrandrMode(disp, screen, &avail_modes[i])) { + printfDebugJava(env, "Could not switch mode"); + continue; + } + break; + case org_lwjgl_opengl_LinuxDisplay_NONE: // Should never happen, since NONE imply no available display modes + default: // Should never happen + continue; + } + result = true; + break; + } + } + free(avail_modes); + XFlush(disp); + return result; +} + +static int getGammaRampLengthOfDisplay(JNIEnv *env, Display *disp, int screen) { + int ramp_size; + if (XF86VidModeGetGammaRampSize(disp, screen, &ramp_size) == False) { + throwException(env, "XF86VidModeGetGammaRampSize call failed"); + return 0; + } + return ramp_size; +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nConvertToNativeRamp(JNIEnv *env, jclass unused, jobject ramp_buffer, jint buffer_offset, jint length) { + const jfloat *ramp_ptr = (const jfloat *)(*env)->GetDirectBufferAddress(env, ramp_buffer) + buffer_offset; + jobject native_ramp = newJavaManagedByteBuffer(env, length*3*sizeof(unsigned short)); + if (native_ramp == NULL) { + throwException(env, "Failed to allocate gamma ramp buffer"); + return NULL; + } + unsigned short *native_ramp_ptr = (unsigned short *)(*env)->GetDirectBufferAddress(env, native_ramp); + int i; + for (i = 0; i < length; i++) { + float scaled_gamma = ramp_ptr[i]*0xffff; + short scaled_gamma_short = (unsigned short)roundf(scaled_gamma); + native_ramp_ptr[i] = scaled_gamma_short; + native_ramp_ptr[i + length] = scaled_gamma_short; + native_ramp_ptr[i + length*2] = scaled_gamma_short; + } + return native_ramp; +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetCurrentGammaRamp(JNIEnv *env, jclass unused, jlong display, jint screen) { + Display *disp = (Display *)(intptr_t)display; + int ramp_size = getGammaRampLengthOfDisplay(env, disp, screen); + jobject ramp_buffer = newJavaManagedByteBuffer(env, sizeof(unsigned short)*3*ramp_size); + if (ramp_buffer == NULL) { + throwException(env, "Could not allocate gamma ramp buffer"); + return NULL; + } + unsigned short *ramp = (unsigned short *)(*env)->GetDirectBufferAddress(env, ramp_buffer); + if (!XF86VidModeGetGammaRamp(disp, screen, ramp_size, ramp, + ramp + ramp_size, ramp + ramp_size*2)) { + throwException(env, "Could not get the current gamma ramp"); + return NULL; + } + return ramp_buffer; +} + +static void setGamma(JNIEnv *env, Display *disp, int screen, jobject ramp_buffer) { + if (ramp_buffer == NULL) + return; + unsigned short *ramp_ptr = (unsigned short *)(*env)->GetDirectBufferAddress(env, ramp_buffer); + jlong capacity = (*env)->GetDirectBufferCapacity(env, ramp_buffer); + int size = capacity/(sizeof(unsigned short)*3); + if (size == 0) + return; + if (XF86VidModeSetGammaRamp(disp, screen, size, ramp_ptr, ramp_ptr + size, ramp_ptr + size*2) == False) { + throwException(env, "Could not set gamma ramp."); + } +} + +static bool switchDisplayMode(JNIEnv * env, Display *disp, int screen, jint extension, jobject mode) { + if (mode == NULL) { + throwException(env, "mode must be non-null"); + return false; + } + jclass cls_displayMode = (*env)->GetObjectClass(env, mode); + jfieldID fid_width = (*env)->GetFieldID(env, cls_displayMode, "width", "I"); + jfieldID fid_height = (*env)->GetFieldID(env, cls_displayMode, "height", "I"); + jfieldID fid_freq = (*env)->GetFieldID(env, cls_displayMode, "freq", "I"); + int width = (*env)->GetIntField(env, mode, fid_width); + int height = (*env)->GetIntField(env, mode, fid_height); + int freq = (*env)->GetIntField(env, mode, fid_freq); + if (!setMode(env, disp, screen, extension, width, height, freq)) { + throwException(env, "Could not switch mode."); + return false; + } + return true; +} + +static jobjectArray getAvailableDisplayModes(JNIEnv * env, Display *disp, int screen, jint extension) { + int num_modes, i; + mode_info *avail_modes; + int bpp = XDefaultDepth(disp, screen); + avail_modes = getDisplayModes(disp, screen, extension, &num_modes); + if (avail_modes == NULL) { + printfDebugJava(env, "Could not get display modes"); + return NULL; + } + // Allocate an array of DisplayModes big enough + jclass displayModeClass = (*env)->FindClass(env, "org/lwjgl/opengl/DisplayMode"); + jobjectArray ret = (*env)->NewObjectArray(env, num_modes, displayModeClass, NULL); + jmethodID displayModeConstructor = (*env)->GetMethodID(env, displayModeClass, "", "(IIII)V"); + + for (i = 0; i < num_modes; i++) { + jobject displayMode = (*env)->NewObject(env, displayModeClass, displayModeConstructor, avail_modes[i].width, avail_modes[i].height, bpp, avail_modes[i].freq); + (*env)->SetObjectArrayElement(env, ret, i, displayMode); + } + free(avail_modes); + return ret; +} + +static jobject getCurrentXRandrMode(JNIEnv * env, Display *disp, int screen) { + Drawable root_window = RootWindow(disp, screen); + XRRScreenConfiguration *config = XRRGetScreenInfo(disp, root_window); + if (config == NULL) { + throwException(env, "Could not get current screen configuration."); + return NULL; + } + short rate = XRRConfigCurrentRate(config); + Rotation current_rotation; + SizeID size_index = XRRConfigCurrentConfiguration(config, ¤t_rotation); + int n_sizes; + XRRScreenSize *sizes = XRRConfigSizes(config, &n_sizes); + if (size_index >= n_sizes) { + throwFormattedException(env, "Xrandr current index (%d) is larger than or equals to the number of sizes (%d).", size_index, n_sizes); + XRRFreeScreenConfigInfo(config); + return NULL; + } + XRRScreenSize current_size = sizes[size_index]; + XRRFreeScreenConfigInfo(config); + int bpp = XDefaultDepth(disp, screen); + jclass displayModeClass = (*env)->FindClass(env, "org/lwjgl/opengl/DisplayMode"); + jmethodID displayModeConstructor = (*env)->GetMethodID(env, displayModeClass, "", "(IIII)V"); + jobject displayMode = (*env)->NewObject(env, displayModeClass, displayModeConstructor, current_size.width, current_size.height, bpp, rate); + return displayMode; +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetCurrentXRandrMode(JNIEnv *env, jclass unused, jlong display, jint screen) { + Display *disp = (Display *)(intptr_t)display; + return getCurrentXRandrMode(env, disp, screen); +} + +JNIEXPORT jobjectArray JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetAvailableDisplayModes(JNIEnv *env, jclass clazz, jlong display, jint screen, jint extension) { + Display *disp = (Display *)(intptr_t)display; + return getAvailableDisplayModes(env, disp, screen, extension); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSwitchDisplayMode(JNIEnv *env, jclass clazz, jlong display, jint screen, jint extension, jobject mode) { + Display *disp = (Display *)(intptr_t)display; + switchDisplayMode(env, disp, screen, extension, mode); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetGammaRampLength(JNIEnv *env, jclass clazz, jlong display_ptr, jint screen) { + Display *disp = (Display *)(intptr_t)display_ptr; + return (jint)getGammaRampLengthOfDisplay(env, disp, screen); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetGammaRamp(JNIEnv *env, jclass clazz, jlong display, jint screen, jobject gamma_buffer) { + Display *disp = (Display *)(intptr_t)display; + setGamma(env, disp, screen, gamma_buffer); +} + diff --git a/etc/lwjgl-2.9.1/src/native/linux/opengl/extgl_glx.c b/etc/lwjgl-2.9.1/src/native/linux/opengl/extgl_glx.c new file mode 100644 index 0000000..b9ed67a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/opengl/extgl_glx.c @@ -0,0 +1,280 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include +#include "extgl_glx.h" + +glXGetFBConfigsPROC lwjgl_glXGetFBConfigs = NULL; +glXChooseFBConfigPROC lwjgl_glXChooseFBConfig = NULL; +glXGetFBConfigAttribPROC lwjgl_glXGetFBConfigAttrib = NULL; +glXGetVisualFromFBConfigPROC lwjgl_glXGetVisualFromFBConfig = NULL; +glXCreateWindowPROC lwjgl_glXCreateWindow = NULL; +glXDestroyWindowPROC lwjgl_glXDestroyWindow = NULL; +glXCreatePixmapPROC lwjgl_glXCreatePixmap = NULL; +glXDestroyPixmapPROC lwjgl_glXDestroyPixmap = NULL; +glXCreatePbufferPROC lwjgl_glXCreatePbuffer = NULL; +glXDestroyPbufferPROC lwjgl_glXDestroyPbuffer = NULL; +glXQueryDrawablePROC lwjgl_glXQueryDrawable = NULL; +glXCreateNewContextPROC lwjgl_glXCreateNewContext = NULL; +glXMakeContextCurrentPROC lwjgl_glXMakeContextCurrent = NULL; +glXGetCurrentReadDrawablePROC lwjgl_glXGetCurrentReadDrawable = NULL; +glXGetCurrentDisplayPROC lwjgl_glXGetCurrentDisplay = NULL; +glXQueryContextPROC lwjgl_glXQueryContext = NULL; +glXSelectEventPROC lwjgl_glXSelectEvent = NULL; +glXGetSelectedEventPROC lwjgl_glXGetSelectedEvent = NULL; +glXChooseVisualPROC lwjgl_glXChooseVisual = NULL; +glXCopyContextPROC lwjgl_glXCopyContext = NULL; +glXCreateContextPROC lwjgl_glXCreateContext = NULL; +glXCreateGLXPixmapPROC lwjgl_glXCreateGLXPixmap = NULL; +glXDestroyContextPROC lwjgl_glXDestroyContext = NULL; +glXDestroyGLXPixmapPROC lwjgl_glXDestroyGLXPixmap = NULL; +glXGetConfigPROC lwjgl_glXGetConfig = NULL; +glXGetCurrentContextPROC lwjgl_glXGetCurrentContext = NULL; +glXGetCurrentDrawablePROC lwjgl_glXGetCurrentDrawable = NULL; +glXIsDirectPROC lwjgl_glXIsDirect = NULL; +glXMakeCurrentPROC lwjgl_glXMakeCurrent = NULL; +glXQueryExtensionPROC lwjgl_glXQueryExtension = NULL; +glXQueryVersionPROC lwjgl_glXQueryVersion = NULL; +glXSwapBuffersPROC lwjgl_glXSwapBuffers = NULL; +glXUseXFontPROC lwjgl_glXUseXFont = NULL; +glXWaitGLPROC lwjgl_glXWaitGL = NULL; +glXWaitXPROC lwjgl_glXWaitX = NULL; +glXGetClientStringPROC lwjgl_glXGetClientString = NULL; +glXQueryServerStringPROC lwjgl_glXQueryServerString = NULL; +glXQueryExtensionsStringPROC lwjgl_glXQueryExtensionsString = NULL; + +/* GLX_SGI_swap_control */ +glXSwapIntervalSGIPROC lwjgl_glXSwapIntervalSGI = NULL; + +/* GLX_EXT_swap_control */ +glXSwapIntervalEXTPROC lwjgl_glXSwapIntervalEXT = NULL; + +/* GLX_ARB_create_context */ +glXCreateContextAttribsARBPROC lwjgl_glXCreateContextAttribsARB = NULL; + +/* GLX_NV_present_video */ +glXEnumerateVideoDevicesNVPROC lwjgl_glXEnumerateVideoDevicesNV = NULL; +glXBindVideoDeviceNVPROC lwjgl_glXBindVideoDeviceNV = NULL; + +/* GLX_NV_video_capture */ +glXBindVideoCaptureDeviceNVPROC lwjgl_glXBindVideoCaptureDeviceNV = NULL; +glXEnumerateVideoCaptureDevicesNVPROC lwjgl_glXEnumerateVideoCaptureDevicesNV = NULL; +glXLockVideoCaptureDeviceNVPROC lwjgl_glXLockVideoCaptureDeviceNV = NULL; +glXQueryVideoCaptureDeviceNVPROC lwjgl_glXQueryVideoCaptureDeviceNV = NULL; +glXReleaseVideoCaptureDeviceNVPROC lwjgl_glXReleaseVideoCaptureDeviceNV = NULL; + +static void * lib_gl_handle = NULL; + +typedef void * (APIENTRY * glXGetProcAddressARBPROC) (const GLubyte *procName); + +static glXGetProcAddressARBPROC lwjgl_glXGetProcAddressARB; + +static GLXExtensions symbols_flags; + +/** returns true if the extention is available */ +static inline bool GLXQueryExtension(const GLubyte *exts, const char *name) { + return extgl_QueryExtension(exts, name); +} + +static void extgl_InitGLX13() { + ExtFunction functions[] = { + {"glXGetFBConfigs", (void*)&lwjgl_glXGetFBConfigs}, + {"glXChooseFBConfig", (void*)&lwjgl_glXChooseFBConfig}, + {"glXGetFBConfigAttrib", (void*)&lwjgl_glXGetFBConfigAttrib}, + {"glXGetVisualFromFBConfig", (void*)&lwjgl_glXGetVisualFromFBConfig}, + {"glXCreateWindow", (void*)&lwjgl_glXCreateWindow}, + {"glXDestroyWindow", (void*)&lwjgl_glXDestroyWindow}, + {"glXCreatePixmap", (void*)&lwjgl_glXCreatePixmap}, + {"glXDestroyPixmap", (void*)&lwjgl_glXDestroyPixmap}, + {"glXCreatePbuffer", (void*)&lwjgl_glXCreatePbuffer}, + {"glXDestroyPbuffer", (void*)&lwjgl_glXDestroyPbuffer}, + {"glXQueryDrawable", (void*)&lwjgl_glXQueryDrawable}, + {"glXCreateNewContext", (void*)&lwjgl_glXCreateNewContext}, + {"glXMakeContextCurrent", (void*)&lwjgl_glXMakeContextCurrent}, + {"glXGetCurrentReadDrawable", (void*)&lwjgl_glXGetCurrentReadDrawable}, + {"glXGetCurrentDisplay", (void*)&lwjgl_glXGetCurrentDisplay}, + {"glXQueryContext", (void*)&lwjgl_glXQueryContext}, + {"glXSelectEvent", (void*)&lwjgl_glXSelectEvent}, + {"glXGetSelectedEvent", (void*)&lwjgl_glXGetSelectedEvent}}; + symbols_flags.GLX13 = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); +} + +static void extgl_InitGLX12(void) { + ExtFunction functions[] = { + {"glXChooseVisual", (void*)&lwjgl_glXChooseVisual}, + {"glXCopyContext", (void*)&lwjgl_glXCopyContext}, + {"glXCreateContext", (void*)&lwjgl_glXCreateContext}, + {"glXCreateGLXPixmap", (void*)&lwjgl_glXCreateGLXPixmap}, + {"glXDestroyContext", (void*)&lwjgl_glXDestroyContext}, + {"glXDestroyGLXPixmap", (void*)&lwjgl_glXDestroyGLXPixmap}, + {"glXGetConfig", (void*)&lwjgl_glXGetConfig}, + {"glXGetCurrentContext", (void*)&lwjgl_glXGetCurrentContext}, + {"glXGetCurrentDrawable", (void*)&lwjgl_glXGetCurrentDrawable}, + {"glXIsDirect", (void*)&lwjgl_glXIsDirect}, + {"glXMakeCurrent", (void*)&lwjgl_glXMakeCurrent}, + {"glXQueryExtension", (void*)&lwjgl_glXQueryExtension}, + {"glXQueryVersion", (void*)&lwjgl_glXQueryVersion}, + {"glXSwapBuffers", (void*)&lwjgl_glXSwapBuffers}, + {"glXUseXFont", (void*)&lwjgl_glXUseXFont}, + {"glXWaitGL", (void*)&lwjgl_glXWaitGL}, + {"glXWaitX", (void*)&lwjgl_glXWaitX}, + {"glXGetClientString", (void*)&lwjgl_glXGetClientString}, + {"glXQueryServerString", (void*)&lwjgl_glXQueryServerString}, + {"glXQueryExtensionsString", (void*)&lwjgl_glXQueryExtensionsString}}; + symbols_flags.GLX12 = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); +} + +static void extgl_InitGLXSGISwapControl() { + ExtFunction functions[] = { + {"glXSwapIntervalSGI", (void*)&lwjgl_glXSwapIntervalSGI}}; + symbols_flags.GLX_SGI_swap_control = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); +} + +static void extgl_InitGLXEXTSwapControl() { + ExtFunction functions[] = { + {"glXSwapIntervalEXT", (void*)&lwjgl_glXSwapIntervalEXT}}; + symbols_flags.GLX_EXT_swap_control = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); +} + +static void extgl_InitGLXARBCreateContext() { + ExtFunction functions[] = { + {"glXCreateContextAttribsARB", (void*)&lwjgl_glXCreateContextAttribsARB}}; + symbols_flags.GLX_ARB_create_context = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); +} + +static void extgl_InitGLXNVPresentVideo() { + ExtFunction functions[] = { + { "glXEnumerateVideoDevicesNV", (void*)&lwjgl_glXEnumerateVideoDevicesNV }, + { "glXBindVideoDeviceNV", (void*)&lwjgl_glXBindVideoDeviceNV } + }; + + symbols_flags.GLX_NV_present_video = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); +} + +static void extgl_InitGLXNVVideoCapture() { + ExtFunction functions[] = { + { "glXBindVideoCaptureDeviceNV", (void*)&lwjgl_glXBindVideoCaptureDeviceNV }, + { "glXEnumerateVideoCaptureDevicesNV", (void*)&lwjgl_glXEnumerateVideoCaptureDevicesNV }, + { "glXLockVideoCaptureDeviceNV", (void*)&lwjgl_glXLockVideoCaptureDeviceNV }, + { "glXQueryVideoCaptureDeviceNV", (void*)&lwjgl_glXQueryVideoCaptureDeviceNV }, + { "glXReleaseVideoCaptureDeviceNV", (void*)&lwjgl_glXReleaseVideoCaptureDeviceNV } + }; + + symbols_flags.GLX_NV_video_capture = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); +} + +static void extgl_InitGLXSupportedExtensions(Display *disp, int screen, GLXExtensions *extension_flags) { + const GLubyte *exts = (const GLubyte *)lwjgl_glXQueryExtensionsString(disp, screen); + +/* extension_flags.GLX_EXT_visual_info = GLXQueryExtension(exts, "GLX_EXT_visual_info"); + extension_flags.GLX_EXT_visual_rating = GLXQueryExtension(exts, "GLX_EXT_visual_rating");*/ + extension_flags->GLX_SGI_swap_control = symbols_flags.GLX_SGI_swap_control && GLXQueryExtension(exts, "GLX_SGI_swap_control"); + extension_flags->GLX_EXT_swap_control = symbols_flags.GLX_EXT_swap_control && GLXQueryExtension(exts, "GLX_EXT_swap_control"); + extension_flags->GLX_ARB_multisample = GLXQueryExtension(exts, "GLX_ARB_multisample"); + extension_flags->GLX_ARB_fbconfig_float = GLXQueryExtension(exts, "GLX_ARB_fbconfig_float"); + extension_flags->GLX_EXT_fbconfig_packed_float = GLXQueryExtension(exts, "GLX_EXT_fbconfig_packed_float"); + extension_flags->GLX_ARB_framebuffer_sRGB = GLXQueryExtension(exts, "GLX_ARB_framebuffer_sRGB") || GLXQueryExtension(exts, "GLX_EXT_framebuffer_sRGB"); + extension_flags->GLX_ARB_create_context = GLXQueryExtension(exts, "GLX_ARB_create_context"); + extension_flags->GLX_NV_multisample_coverage = GLXQueryExtension(exts, "GLX_NV_multisample_coverage"); + extension_flags->GLX_NV_present_video = GLXQueryExtension(exts, "GLX_NV_present_video"); + extension_flags->GLX_NV_video_capture = GLXQueryExtension(exts, "GLX_NV_video_capture"); +} + +bool extgl_Open(JNIEnv *env) { + if (lib_gl_handle != NULL) + return true; + /* + * Actually we don't need the RTLD_GLOBAL flag, since the symbols + * we load should be private to us. However, according to the + * documentation at + * + * http://dri.sourceforge.net/doc/DRIuserguide.html + * + * DRI drivers need this flag to work properly + */ + lib_gl_handle = dlopen("libGL.so.1", RTLD_LAZY | RTLD_GLOBAL); + if (lib_gl_handle == NULL) { + throwFormattedException(env, "Error loading libGL.so.1: %s", dlerror()); + return false; + } + lwjgl_glXGetProcAddressARB = (glXGetProcAddressARBPROC)dlsym(lib_gl_handle, "glXGetProcAddressARB"); + if (lwjgl_glXGetProcAddressARB == NULL) { + extgl_Close(); + throwException(env, "Could not get address of glXGetProcAddressARB"); + return false; + } + /* Unlike Windows, GLX function addresses are context-independent + * so we only have to initialize the addresses once at load + */ + extgl_InitGLX12(); + extgl_InitGLX13(); + extgl_InitGLXSGISwapControl(); + extgl_InitGLXEXTSwapControl(); + extgl_InitGLXARBCreateContext(); + extgl_InitGLXNVPresentVideo(); + extgl_InitGLXNVVideoCapture(); + return true; +} + +void *extgl_GetProcAddress(const char *name) { + void *t = (void*)lwjgl_glXGetProcAddressARB((const GLubyte*)name); + if (t == NULL) { + t = dlsym(lib_gl_handle, name); + if (t == NULL) { + printfDebug("Could not locate symbol %s\n", name); + } + } + return t; +} + +void extgl_Close(void) { + dlclose(lib_gl_handle); + lib_gl_handle = NULL; +} + +bool extgl_InitGLX(Display *disp, int screen, GLXExtensions *extension_flags) { + int major, minor; + /* Assume glx ver >= 1.2 */ + // Check GLX 1.2 symbols available + if (!symbols_flags.GLX12) + return false; + if (lwjgl_glXQueryVersion(disp, &major, &minor) != True) + return false; + bool glx12 = major > 1 || (major == 1 && minor >= 2); + // Check GLX 1.2 version + if (!glx12) + return false; + extension_flags->GLX12 = glx12; + extension_flags->GLX13 = major > 1 || (major == 1 && minor >= 3); + extension_flags->GLX14 = major > 1 || (major == 1 && minor >= 4); + extgl_InitGLXSupportedExtensions(disp, screen, extension_flags); + return true; +} diff --git a/etc/lwjgl-2.9.1/src/native/linux/opengl/extgl_glx.h b/etc/lwjgl-2.9.1/src/native/linux/opengl/extgl_glx.h new file mode 100644 index 0000000..a3a4e51 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/opengl/extgl_glx.h @@ -0,0 +1,441 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#ifndef EXTGL_GLX_H +#define EXTGL_GLX_H + +#include +#include "extgl.h" + +/* + * Names for attributes to lwjgl_glXGetConfig. + */ +#define GLX_USE_GL 1 /* support GLX rendering */ +#define GLX_BUFFER_SIZE 2 /* depth of the color buffer */ +#define GLX_LEVEL 3 /* level in plane stacking */ +#define GLX_RGBA 4 /* true if RGBA mode */ +#define GLX_DOUBLEBUFFER 5 /* double buffering supported */ +#define GLX_STEREO 6 /* stereo buffering supported */ +#define GLX_AUX_BUFFERS 7 /* number of aux buffers */ +#define GLX_RED_SIZE 8 /* number of red component bits */ +#define GLX_GREEN_SIZE 9 /* number of green component bits */ +#define GLX_BLUE_SIZE 10 /* number of blue component bits */ +#define GLX_ALPHA_SIZE 11 /* number of alpha component bits */ +#define GLX_DEPTH_SIZE 12 /* number of depth bits */ +#define GLX_STENCIL_SIZE 13 /* number of stencil bits */ +#define GLX_ACCUM_RED_SIZE 14 /* number of red accum bits */ +#define GLX_ACCUM_GREEN_SIZE 15 /* number of green accum bits */ +#define GLX_ACCUM_BLUE_SIZE 16 /* number of blue accum bits */ +#define GLX_ACCUM_ALPHA_SIZE 17 /* number of alpha accum bits */ + +#define GLX_SAMPLE_BUFFERS_ARB 100000 /* number of multisample buffers */ +#define GLX_SAMPLES_ARB 100001 /* number of multisample samples */ + +/* + * FBConfig-specific attributes + */ +#define GLX_X_VISUAL_TYPE 0x22 +#define GLX_CONFIG_CAVEAT 0x20 /* Like visual_info VISUAL_CAVEAT */ +#define GLX_TRANSPARENT_TYPE 0x23 +#define GLX_TRANSPARENT_INDEX_VALUE 0x24 +#define GLX_TRANSPARENT_RED_VALUE 0x25 +#define GLX_TRANSPARENT_GREEN_VALUE 0x26 +#define GLX_TRANSPARENT_BLUE_VALUE 0x27 +#define GLX_TRANSPARENT_ALPHA_VALUE 0x28 +#define GLX_DRAWABLE_TYPE 0x8010 +#define GLX_RENDER_TYPE 0x8011 +#define GLX_X_RENDERABLE 0x8012 +#define GLX_FBCONFIG_ID 0x8013 +#define GLX_MAX_PBUFFER_WIDTH 0x8016 +#define GLX_MAX_PBUFFER_HEIGHT 0x8017 +#define GLX_MAX_PBUFFER_PIXELS 0x8018 +#define GLX_VISUAL_ID 0x800B + +#define GLX_DRAWABLE_TYPE_SGIX GLX_DRAWABLE_TYPE +#define GLX_RENDER_TYPE_SGIX GLX_RENDER_TYPE +#define GLX_X_RENDERABLE_SGIX GLX_X_RENDERABLE +#define GLX_FBCONFIG_ID_SGIX GLX_FBCONFIG_ID +#define GLX_MAX_PBUFFER_WIDTH_SGIX GLX_MAX_PBUFFER_WIDTH +#define GLX_MAX_PBUFFER_HEIGHT_SGIX GLX_MAX_PBUFFER_HEIGHT +#define GLX_MAX_PBUFFER_PIXELS_SGIX GLX_MAX_PBUFFER_PIXELS +#define GLX_OPTIMAL_PBUFFER_WIDTH_SGIX 0x8019 +#define GLX_OPTIMAL_PBUFFER_HEIGHT_SGIX 0x801A + +/* + * Error return values from lwjgl_glXGetConfig. Success is indicated by + * a value of 0. + */ +#define GLX_BAD_SCREEN 1 /* screen # is bad */ +#define GLX_BAD_ATTRIBUTE 2 /* attribute to get is bad */ +#define GLX_NO_EXTENSION 3 /* no glx extension on server */ +#define GLX_BAD_VISUAL 4 /* visual # not known by GLX */ +#define GLX_BAD_CONTEXT 5 +#define GLX_BAD_VALUE 6 +#define GLX_BAD_ENUM 7 + + +/* FBConfig attribute values */ + +/* + * Generic "don't care" value for lwjgl_glX ChooseFBConfig attributes (except + * GLX_LEVEL). + */ +#define GLX_DONT_CARE 0xFFFFFFFF + +/* GLX_RENDER_TYPE bits */ +#define GLX_RGBA_BIT 0x00000001 +#define GLX_COLOR_INDEX_BIT 0x00000002 +#define GLX_RGBA_BIT_SGIX GLX_RGBA_BIT +#define GLX_COLOR_INDEX_BIT_SGIX GLX_COLOR_INDEX_BIT + +/* GLX_DRAWABLE_TYPE bits */ +#define GLX_WINDOW_BIT 0x00000001 +#define GLX_PIXMAP_BIT 0x00000002 +#define GLX_PBUFFER_BIT 0x00000004 +#define GLX_WINDOW_BIT_SGIX GLX_WINDOW_BIT +#define GLX_PIXMAP_BIT_SGIX GLX_PIXMAP_BIT +#define GLX_PBUFFER_BIT_SGIX GLX_PBUFFER_BIT + +/* GLX_CONFIG_CAVEAT attribute values */ +#define GLX_NONE 0x8000 +#define GLX_SLOW_CONFIG 0x8001 +#define GLX_NON_CONFORMANT_CONFIG 0x800D + +/* GLX_X_VISUAL_TYPE attribute values */ +#define GLX_TRUE_COLOR 0x8002 +#define GLX_DIRECT_COLOR 0x8003 +#define GLX_PSEUDO_COLOR 0x8004 +#define GLX_STATIC_COLOR 0x8005 +#define GLX_GRAY_SCALE 0x8006 +#define GLX_STATIC_GRAY 0x8007 + +/* GLX_TRANSPARENT_TYPE attribute values */ +/* #define GLX_NONE 0x8000 */ +#define GLX_TRANSPARENT_RGB 0x8008 +#define GLX_TRANSPARENT_INDEX 0x8009 + +/* lwjgl_glXCreateGLXPbuffer attributes */ +#define GLX_PRESERVED_CONTENTS 0x801B +#define GLX_LARGEST_PBUFFER 0x801C +#define GLX_PBUFFER_HEIGHT 0x8040 /* New for GLX 1.3 */ +#define GLX_PBUFFER_WIDTH 0x8041 /* New for GLX 1.3 */ +#define GLX_PRESERVED_CONTENTS_SGIX GLX_PRESERVED_CONTENTS +#define GLX_LARGEST_PBUFFER_SGIX GLX_LARGEST_PBUFFER + +/* lwjgl_glXQueryGLXPBuffer attributes */ +#define GLX_WIDTH 0x801D +#define GLX_HEIGHT 0x801E +#define GLX_EVENT_MASK 0x801F +#define GLX_WIDTH_SGIX GLX_WIDTH +#define GLX_HEIGHT_SGIX GLX_HEIGHT +#define GLX_EVENT_MASK_SGIX GLX_EVENT_MASK + +/* lwjgl_glXCreateNewContext render_type attribute values */ +#define GLX_RGBA_TYPE 0x8014 +#define GLX_COLOR_INDEX_TYPE 0x8015 +#define GLX_RGBA_TYPE_SGIX GLX_RGBA_TYPE +#define GLX_COLOR_INDEX_TYPE_SGIX GLX_COLOR_INDEX_TYPE + +/* lwjgl_glXQueryContext attributes */ +/* #define GLX_FBCONFIG_ID 0x8013 */ +/* #define GLX_RENDER_TYPE 0x8011 */ +#define GLX_SCREEN 0x800C + +/* lwjgl_glXSelectEvent event mask bits */ +#define GLX_PBUFFER_CLOBBER_MASK 0x08000000 +#define GLX_PBUFFER_CLOBBER_MASK_SGIX GLX_PBUFFER_CLOBBER_MASK + +/* GLXPbufferClobberEvent event_type values */ +#define GLX_DAMAGED 0x8020 +#define GLX_SAVED 0x8021 +#define GLX_DAMAGED_SGIX GLX_DAMAGED +#define GLX_SAVED_SGIX GLX_SAVED + +/* GLXPbufferClobberEvent draw_type values */ +#define GLX_WINDOW 0x8022 +#define GLX_PBUFFER 0x8023 +#define GLX_WINDOW_SGIX GLX_WINDOW +#define GLX_PBUFFER_SGIX GLX_PBUFFER + +/* GLXPbufferClobberEvent buffer_mask bits */ +#define GLX_FRONT_LEFT_BUFFER_BIT 0x00000001 +#define GLX_FRONT_RIGHT_BUFFER_BIT 0x00000002 +#define GLX_BACK_LEFT_BUFFER_BIT 0x00000004 +#define GLX_BACK_RIGHT_BUFFER_BIT 0x00000008 +#define GLX_AUX_BUFFERS_BIT 0x00000010 +#define GLX_DEPTH_BUFFER_BIT 0x00000020 +#define GLX_STENCIL_BUFFER_BIT 0x00000040 +#define GLX_ACCUM_BUFFER_BIT 0x00000080 +#define GLX_FRONT_LEFT_BUFFER_BIT_SGIX GLX_FRONT_LEFT_BUFFER_BIT +#define GLX_FRONT_RIGHT_BUFFER_BIT_SGIX GLX_FRONT_RIGHT_BUFFER_BIT +#define GLX_BACK_LEFT_BUFFER_BIT_SGIX GLX_BACK_LEFT_BUFFER_BIT +#define GLX_BACK_RIGHT_BUFFER_BIT_SGIX GLX_BACK_RIGHT_BUFFER_BIT +#define GLX_AUX_BUFFERS_BIT_SGIX GLX_AUX_BUFFERS_BIT +#define GLX_DEPTH_BUFFER_BIT_SGIX GLX_DEPTH_BUFFER_BIT +#define GLX_STENCIL_BUFFER_BIT_SGIX GLX_STENCIL_BUFFER_BIT +#define GLX_ACCUM_BUFFER_BIT_SGIX GLX_ACCUM_BUFFER_BIT + +/* + * Extension return values from lwjgl_glXGetConfig. These are also + * accepted as parameter values for lwjgl_glXChooseVisual. + */ + +#define GLX_X_VISUAL_TYPE_EXT 0x22 /* visual_info extension type */ +#define GLX_TRANSPARENT_TYPE_EXT 0x23 /* visual_info extension */ +#define GLX_TRANSPARENT_INDEX_VALUE_EXT 0x24 /* visual_info extension */ +#define GLX_TRANSPARENT_RED_VALUE_EXT 0x25 /* visual_info extension */ +#define GLX_TRANSPARENT_GREEN_VALUE_EXT 0x26 /* visual_info extension */ +#define GLX_TRANSPARENT_BLUE_VALUE_EXT 0x27 /* visual_info extension */ +#define GLX_TRANSPARENT_ALPHA_VALUE_EXT 0x28 /* visual_info extension */ + +/* Property values for visual_type */ +#define GLX_TRUE_COLOR_EXT 0x8002 +#define GLX_DIRECT_COLOR_EXT 0x8003 +#define GLX_PSEUDO_COLOR_EXT 0x8004 +#define GLX_STATIC_COLOR_EXT 0x8005 +#define GLX_GRAY_SCALE_EXT 0x8006 +#define GLX_STATIC_GRAY_EXT 0x8007 + +/* Property values for transparent pixel */ +#define GLX_NONE_EXT 0x8000 +#define GLX_TRANSPARENT_RGB_EXT 0x8008 +#define GLX_TRANSPARENT_INDEX_EXT 0x8009 + +/* Property values for visual_rating */ +#define GLX_VISUAL_CAVEAT_EXT 0x20 /* visual_rating extension type */ +#define GLX_SLOW_VISUAL_EXT 0x8001 +#define GLX_NON_CONFORMANT_VISUAL_EXT 0x800D + +/* + * Names for attributes to lwjgl_glXGetClientString. + */ +#define GLX_VENDOR 0x1 +#define GLX_VERSION 0x2 +#define GLX_EXTENSIONS 0x3 + +/* + * Names for attributes to lwjgl_glXQueryContextInfoEXT. + */ +#define GLX_SHARE_CONTEXT_EXT 0x800A /* id of share context */ +#define GLX_VISUAL_ID_EXT 0x800B /* id of context's visual */ +#define GLX_SCREEN_EXT 0x800C /* screen number */ + +/* NV_float_buffer */ +#define GLX_FLOAT_COMPONENTS_NV 0x20B0 + +/* GLX_ARB_fbconfig_float */ +#define GLX_RGBA_FLOAT_TYPE 0x20B9 +#define GLX_RGBA_FLOAT_BIT 0x0004 + +/* GLX_ARB_fbconfig_float */ +#define GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT 0x20B1 +#define GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT 0x00000008 + +/* GLX_ARB_framebuffer_sRGB */ +#define GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20B2 + +/* GLX_ARB_create_context */ +#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091 +#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092 +#define GLX_CONTEXT_FLAGS_ARB 0x2094 + +#define GLX_CONTEXT_DEBUG_BIT_ARB 0x0001 +#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002 + +/* GLX_NV_multisample_coverage */ +#define GLX_COVERAGE_SAMPLES_NV 100001 +#define GLX_COLOR_SAMPLES_NV 0x20B3 + +/* GLX_NV_present_video */ +#define GLX_NUM_VIDEO_SLOTS_NV 0x20F0 + +/* GLX_NV_video_capture */ +#define GLX_DEVICE_ID_NV 0x20CD +#define GLX_NUM_VIDEO_CAPTURE_SLOTS_NV 0x20CF +#define GLX_UNIQUE_ID_NV 0x20CE + +typedef XID GLXContextID; +typedef XID GLXPixmap; +typedef XID GLXDrawable; +typedef XID GLXPbuffer; +typedef XID GLXWindow; +typedef XID GLXFBConfigID; + +typedef struct __GLXcontextRec *GLXContext; + +typedef struct __GLXFBConfigRec *GLXFBConfig; + +typedef GLXFBConfig * (APIENTRY * glXGetFBConfigsPROC) (Display *dpy, int screen, int *nelements); +typedef GLXFBConfig * (APIENTRY * glXChooseFBConfigPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements); +typedef int (APIENTRY * glXGetFBConfigAttribPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value); +typedef XVisualInfo * (APIENTRY * glXGetVisualFromFBConfigPROC) (Display *dpy, GLXFBConfig config); +typedef GLXWindow (APIENTRY * glXCreateWindowPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list); +typedef void (APIENTRY * glXDestroyWindowPROC) (Display *dpy, GLXWindow win); +typedef GLXPixmap (APIENTRY * glXCreatePixmapPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list); +typedef void (APIENTRY * glXDestroyPixmapPROC) (Display *dpy, GLXPixmap pixmap); +typedef GLXPbuffer (APIENTRY * glXCreatePbufferPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list); +typedef void (APIENTRY * glXDestroyPbufferPROC) (Display *dpy, GLXPbuffer pbuf); +typedef void (APIENTRY * glXQueryDrawablePROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value); +typedef GLXContext (APIENTRY * glXCreateNewContextPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct); +typedef Bool (APIENTRY * glXMakeContextCurrentPROC) (Display *display, GLXDrawable draw, GLXDrawable read, GLXContext ctx); +typedef GLXDrawable (APIENTRY * glXGetCurrentReadDrawablePROC) (void); +typedef Display * (APIENTRY * glXGetCurrentDisplayPROC) (void); +typedef int (APIENTRY * glXQueryContextPROC) (Display *dpy, GLXContext ctx, int attribute, int *value); +typedef void (APIENTRY * glXSelectEventPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask); +typedef void (APIENTRY * glXGetSelectedEventPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask); + +typedef GLXContextID (APIENTRY * glXGetContextIDEXTPROC) (const GLXContext ctx); +typedef GLXDrawable (APIENTRY * glXGetCurrentDrawableEXTPROC) (void); +typedef GLXContext (APIENTRY * glXImportContextEXTPROC) (Display *dpy, GLXContextID contextID); +typedef void (APIENTRY * glXFreeContextEXTPROC) (Display *dpy, GLXContext ctx); +typedef int (APIENTRY * glXQueryContextInfoEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value); + +typedef XVisualInfo* (APIENTRY * glXChooseVisualPROC) (Display *dpy, int screen, int *attribList); +typedef void (APIENTRY * glXCopyContextPROC) (Display *dpy, GLXContext src, GLXContext dst, unsigned long mask); +typedef GLXContext (APIENTRY * glXCreateContextPROC) (Display *dpy, XVisualInfo *vis, GLXContext shareList, Bool direct); +typedef GLXPixmap (APIENTRY * glXCreateGLXPixmapPROC) (Display *dpy, XVisualInfo *vis, Pixmap pixmap); +typedef void (APIENTRY * glXDestroyContextPROC) (Display *dpy, GLXContext ctx); +typedef void (APIENTRY * glXDestroyGLXPixmapPROC) (Display *dpy, GLXPixmap pix); +typedef int (APIENTRY * glXGetConfigPROC) (Display *dpy, XVisualInfo *vis, int attrib, int *value); +typedef GLXContext (APIENTRY * glXGetCurrentContextPROC) (void); +typedef GLXDrawable (APIENTRY * glXGetCurrentDrawablePROC) (void); +typedef Bool (APIENTRY * glXIsDirectPROC) (Display *dpy, GLXContext ctx); +typedef Bool (APIENTRY * glXMakeCurrentPROC) (Display *dpy, GLXDrawable drawable, GLXContext ctx); +typedef Bool (APIENTRY * glXQueryExtensionPROC) (Display *dpy, int *errorBase, int *eventBase); +typedef Bool (APIENTRY * glXQueryVersionPROC) (Display *dpy, int *major, int *minor); +typedef void (APIENTRY * glXSwapBuffersPROC) (Display *dpy, GLXDrawable drawable); +typedef void (APIENTRY * glXUseXFontPROC) (Font font, int first, int count, int listBase); +typedef void (APIENTRY * glXWaitGLPROC) (void); +typedef void (APIENTRY * glXWaitXPROC) (void); +typedef const char * (APIENTRY * glXGetClientStringPROC) (Display *dpy, int name ); +typedef const char * (APIENTRY * glXQueryServerStringPROC) (Display *dpy, int screen, int name ); +typedef const char * (APIENTRY * glXQueryExtensionsStringPROC) (Display *dpy, int screen ); + +/* GLX_SGI_swap_control */ +typedef void (APIENTRY * glXSwapIntervalSGIPROC)(int interval); + +/* GLX_EXT_swap_control */ +typedef void (APIENTRY * glXSwapIntervalEXTPROC)(Display *dpy, GLXDrawable drawable, int interval); + +/* GLX_ARB_create_context */ +typedef GLXContext (APIENTRY * glXCreateContextAttribsARBPROC) (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list); + +/* GLX_NV_present_video */ +typedef unsigned int * (APIENTRY * glXEnumerateVideoDevicesNVPROC) (Display *dpy, int screen, int *nelements); +typedef int (APIENTRY * glXBindVideoDeviceNVPROC) (Display *dpy, unsigned int video_slot, unsigned int video_device, const int *attrib_list); + +/* GLX_NV_video_capture */ +typedef XID GLXVideoCaptureDeviceNV; +typedef int (APIENTRY * glXBindVideoCaptureDeviceNVPROC) (Display *dpy, unsigned int video_capture_slot, GLXVideoCaptureDeviceNV device); +typedef GLXVideoCaptureDeviceNV * (APIENTRY * glXEnumerateVideoCaptureDevicesNVPROC) (Display *dpy, int screen, int *nelements); +typedef void (APIENTRY * glXLockVideoCaptureDeviceNVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device); +typedef int (APIENTRY * glXQueryVideoCaptureDeviceNVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device, int attribute, int *value); +typedef void (APIENTRY * glXReleaseVideoCaptureDeviceNVPROC) (Display *dpy, GLXVideoCaptureDeviceNV device); + +typedef struct { + bool GLX12; + bool GLX13; + bool GLX14; +/* bool GLX_EXT_visual_info; + bool GLX_EXT_visual_rating;*/ + bool GLX_SGI_swap_control; + bool GLX_EXT_swap_control; + bool GLX_ARB_multisample; + bool GLX_ARB_fbconfig_float; + bool GLX_EXT_fbconfig_packed_float; + bool GLX_ARB_framebuffer_sRGB; + bool GLX_ARB_create_context; + bool GLX_NV_multisample_coverage; + bool GLX_NV_present_video; + bool GLX_NV_video_capture; +} GLXExtensions; + +/* Add _ to global symbols to avoid symbol clash with the OpenGL library */ +extern glXGetFBConfigsPROC lwjgl_glXGetFBConfigs; +extern glXChooseFBConfigPROC lwjgl_glXChooseFBConfig; +extern glXGetFBConfigAttribPROC lwjgl_glXGetFBConfigAttrib; +extern glXGetVisualFromFBConfigPROC lwjgl_glXGetVisualFromFBConfig; +extern glXCreateWindowPROC lwjgl_glXCreateWindow; +extern glXDestroyWindowPROC lwjgl_glXDestroyWindow; +extern glXCreatePixmapPROC lwjgl_glXCreatePixmap; +extern glXDestroyPixmapPROC lwjgl_glXDestroyPixmap; +extern glXCreatePbufferPROC lwjgl_glXCreatePbuffer; +extern glXDestroyPbufferPROC lwjgl_glXDestroyPbuffer; +extern glXQueryDrawablePROC lwjgl_glXQueryDrawable; +extern glXCreateNewContextPROC lwjgl_glXCreateNewContext; +extern glXMakeContextCurrentPROC lwjgl_glXMakeContextCurrent; +extern glXGetCurrentReadDrawablePROC lwjgl_glXGetCurrentReadDrawable; +extern glXGetCurrentDisplayPROC lwjgl_glXGetCurrentDisplay; +extern glXQueryContextPROC lwjgl_glXQueryContext; +extern glXSelectEventPROC lwjgl_glXSelectEvent; +extern glXGetSelectedEventPROC lwjgl_glXGetSelectedEvent; + +extern glXChooseVisualPROC lwjgl_glXChooseVisual; +extern glXCopyContextPROC lwjgl_glXCopyContext; +extern glXCreateContextPROC lwjgl_glXCreateContext; +extern glXCreateGLXPixmapPROC lwjgl_glXCreateGLXPixmap; +extern glXDestroyContextPROC lwjgl_glXDestroyContext; +extern glXDestroyGLXPixmapPROC lwjgl_glXDestroyGLXPixmap; +extern glXGetConfigPROC lwjgl_glXGetConfig; +extern glXGetCurrentContextPROC lwjgl_glXGetCurrentContext; +extern glXGetCurrentDrawablePROC lwjgl_glXGetCurrentDrawable; +extern glXIsDirectPROC lwjgl_glXIsDirect; +extern glXMakeCurrentPROC lwjgl_glXMakeCurrent; +extern glXQueryExtensionPROC lwjgl_glXQueryExtension; +extern glXQueryVersionPROC lwjgl_glXQueryVersion; +extern glXSwapBuffersPROC lwjgl_glXSwapBuffers; +extern glXUseXFontPROC lwjgl_glXUseXFont; +extern glXWaitGLPROC lwjgl_glXWaitGL; +extern glXWaitXPROC lwjgl_glXWaitX; +extern glXGetClientStringPROC lwjgl_glXGetClientString; +extern glXQueryServerStringPROC lwjgl_glXQueryServerString; +extern glXQueryExtensionsStringPROC lwjgl_glXQueryExtensionsString; + +extern glXSwapIntervalSGIPROC lwjgl_glXSwapIntervalSGI; +extern glXSwapIntervalEXTPROC lwjgl_glXSwapIntervalEXT; + +extern glXCreateContextAttribsARBPROC lwjgl_glXCreateContextAttribsARB; + +/* GLX_NV_present_video */ +extern glXEnumerateVideoDevicesNVPROC lwjgl_glXEnumerateVideoDevicesNV; +extern glXBindVideoDeviceNVPROC lwjgl_glXBindVideoDeviceNV; + +/* GLX_NV_video_capture */ +extern glXBindVideoCaptureDeviceNVPROC lwjgl_glXBindVideoCaptureDeviceNV; +extern glXEnumerateVideoCaptureDevicesNVPROC lwjgl_glXEnumerateVideoCaptureDevicesNV; +extern glXLockVideoCaptureDeviceNVPROC lwjgl_glXLockVideoCaptureDeviceNV; +extern glXQueryVideoCaptureDeviceNVPROC lwjgl_glXQueryVideoCaptureDeviceNV; +extern glXReleaseVideoCaptureDeviceNVPROC lwjgl_glXReleaseVideoCaptureDeviceNV; + +extern bool extgl_InitGLX(Display *disp, int screen, GLXExtensions *extension_flags); + +#endif diff --git a/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_Display.c b/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_Display.c new file mode 100644 index 0000000..3e8ea6f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_Display.c @@ -0,0 +1,670 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Linux specific display functions. + * + * @author elias_naur + * @version $Revision$ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "common_tools.h" +#include "extgl.h" +#include "extgl_glx.h" +#include "context.h" +#include "org_lwjgl_opengl_LinuxDisplay.h" +#include "org_lwjgl_opengl_LinuxDisplayPeerInfo.h" +#include "org_lwjgl_LinuxSysImplementation.h" + +#define ERR_MSG_SIZE 1024 + +typedef struct { + unsigned long flags; + unsigned long functions; + unsigned long decorations; + long input_mode; + unsigned long status; +} MotifWmHints; + +#define MWM_HINTS_DECORATIONS (1L << 1) + +static GLXWindow glx_window = None; + +static Colormap cmap; +static int current_depth; + +static Visual *current_visual; + +static bool checkXError(JNIEnv *env, Display *disp) { + XSync(disp, False); + return (*env)->ExceptionCheck(env) == JNI_FALSE; +} + +static int global_error_handler(Display *disp, XErrorEvent *error) { + JNIEnv *env = getThreadEnv(); + if (env != NULL) { + jclass org_lwjgl_LinuxDisplay_class = (*env)->FindClass(env, "org/lwjgl/opengl/LinuxDisplay"); + if (org_lwjgl_LinuxDisplay_class == NULL) { + // Don't propagate error + (*env)->ExceptionClear(env); + return 0; + } + jmethodID handler_method = (*env)->GetStaticMethodID(env, org_lwjgl_LinuxDisplay_class, "globalErrorHandler", "(JJJJJJJ)I"); + if (handler_method == NULL) + return 0; + return (*env)->CallStaticIntMethod(env, org_lwjgl_LinuxDisplay_class, handler_method, (jlong)(intptr_t)disp, (jlong)(intptr_t)error, + (jlong)(intptr_t)error->display, (jlong)error->serial, (jlong)error->error_code, (jlong)error->request_code, (jlong)error->minor_code); + } else + return 0; +} + +static jlong openDisplay(JNIEnv *env) { + Display *display_connection = XOpenDisplay(NULL); + if (display_connection == NULL) { + throwException(env, "Could not open X display connection"); + return (intptr_t)NULL; + } + return (intptr_t)display_connection; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_DefaultSysImplementation_getJNIVersion + (JNIEnv *env, jobject ignored) { + return org_lwjgl_LinuxSysImplementation_JNI_VERSION; +} + +JNIEXPORT jstring JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getErrorText(JNIEnv *env, jclass unused, jlong display_ptr, jlong error_code) { + Display *disp = (Display *)(intptr_t)display_ptr; + char err_msg_buffer[ERR_MSG_SIZE]; + XGetErrorText(disp, error_code, err_msg_buffer, ERR_MSG_SIZE); + err_msg_buffer[ERR_MSG_SIZE - 1] = '\0'; + return NewStringNativeWithLength(env, err_msg_buffer, strlen(err_msg_buffer)); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_callErrorHandler(JNIEnv *env, jclass unused, jlong handler_ptr, jlong display_ptr, jlong event_ptr) { + XErrorHandler handler = (XErrorHandler)(intptr_t)handler_ptr; + Display *disp = (Display *)(intptr_t)display_ptr; + XErrorEvent *event = (XErrorEvent *)(intptr_t)event_ptr; + return (jint)handler(disp, event); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_setErrorHandler(JNIEnv *env, jclass unused) { + return (intptr_t)XSetErrorHandler(global_error_handler); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_resetErrorHandler(JNIEnv *env, jclass unused, jlong handler_ptr) { + XErrorHandler handler = (XErrorHandler)(intptr_t)handler_ptr; + return (intptr_t)XSetErrorHandler(handler); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSync(JNIEnv *env, jclass unused, jlong display_ptr, jboolean throw_away_events) { + Display *disp = (Display *)(intptr_t)display_ptr; + XSync(disp, throw_away_events ? True : False); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_sync(JNIEnv *env, jclass unused, jlong display_ptr, jboolean throw_away_events) { + Display *disp = (Display *)(intptr_t)display_ptr; + XSync(disp, throw_away_events ? True : False); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetDefaultScreen(JNIEnv *env, jclass unused, jlong display_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + return XDefaultScreen(disp); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nInternAtom(JNIEnv *env, jclass unused, jlong display_ptr, jstring atom_name_obj, jboolean only_if_exists) { + Display *disp = (Display *)(intptr_t)display_ptr; + char *atom_name = GetStringNativeChars(env, atom_name_obj); + if (atom_name == NULL) + return 0; + Atom atom = XInternAtom(disp, atom_name, only_if_exists ? True : False); + free(atom_name); + return atom; +} + +static void setDecorations(Display *disp, Window window, int dec) { + Atom motif_hints_atom = XInternAtom(disp, "_MOTIF_WM_HINTS", False); + MotifWmHints motif_hints; + motif_hints.flags = MWM_HINTS_DECORATIONS; + motif_hints.decorations = dec; + XChangeProperty(disp, window, motif_hints_atom, motif_hints_atom, 32, PropModeReplace, (unsigned char *)&motif_hints, sizeof(MotifWmHints)/sizeof(long)); +} + +static bool isLegacyFullscreen(jint window_mode) { + return window_mode == org_lwjgl_opengl_LinuxDisplay_FULLSCREEN_LEGACY; +} + +static void setWindowTitle(Display *disp, Window window, jlong title, jint len) { + // ASCII fallback if XChangeProperty fails. + XStoreName(disp, window, (const char *)(intptr_t)title); + + // Set the UTF-8 encoded title + XChangeProperty(disp, window, + XInternAtom(disp, "_NET_WM_NAME", False), + XInternAtom(disp, "UTF8_STRING", False), + 8, PropModeReplace, (const unsigned char *)(intptr_t)title, + len); +} + +static void setClassHint(Display *disp, Window window, jlong wm_name, jlong wm_class) { + XClassHint* hint = XAllocClassHint(); + + hint->res_name = (const unsigned char *)(intptr_t)wm_name; + hint->res_class = (const unsigned char *)(intptr_t)wm_class; + + XSetClassHint(disp, window, hint); + + XFree(hint); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_openDisplay(JNIEnv *env, jclass clazz) { + return openDisplay(env); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_closeDisplay(JNIEnv *env, jclass clazz, jlong display) { + Display *disp = (Display *)(intptr_t)display; + XCloseDisplay(disp); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplayPeerInfo_initDrawable(JNIEnv *env, jclass clazz, jlong window, jobject peer_info_handle) { + X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle); + if (peer_info->glx13) + peer_info->drawable = glx_window; + else + peer_info->drawable = window; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplayPeerInfo_initDefaultPeerInfo(JNIEnv *env, jclass clazz, jlong display, jint screen, jobject peer_info_handle, jobject pixel_format) { + Display *disp = (Display *)(intptr_t)display; + initPeerInfo(env, peer_info_handle, disp, screen, pixel_format, true, GLX_WINDOW_BIT, true, false); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetTitle(JNIEnv * env, jclass clazz, jlong display, jlong window_ptr, jlong title, jint len) { + Display *disp = (Display *)(intptr_t)display; + Window window = (Window)window_ptr; + setWindowTitle(disp, window, title, len); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetClassHint(JNIEnv * env, jclass clazz, jlong display, jlong window_ptr, jlong wm_name, jlong wm_class) { + Display *disp = (Display *)(intptr_t)display; + Window window = (Window)window_ptr; + setClassHint(disp, window, wm_name, wm_class); +} + +static void destroyWindow(JNIEnv *env, Display *disp, Window window) { + if (glx_window != None) { + lwjgl_glXDestroyWindow(disp, glx_window); + glx_window = None; + } + XDestroyWindow(disp, window); + XFreeColormap(disp, cmap); +} + +static bool isNetWMFullscreenSupported(JNIEnv *env, Display *disp, int screen) { + unsigned long nitems; + Atom actual_type; + int actual_format; + unsigned long bytes_after; + Atom *supported_list; + Atom netwm_supported_atom = XInternAtom(disp, "_NET_SUPPORTED", False); + int result = XGetWindowProperty(disp, RootWindow(disp, screen), netwm_supported_atom, 0, 10000, False, AnyPropertyType, &actual_type, &actual_format, &nitems, &bytes_after, (void *)&supported_list); + if (result != Success) { + throwException(env, "Unable to query _NET_SUPPORTED window property"); + return false; + } + Atom fullscreen_atom = XInternAtom(disp, "_NET_WM_STATE_FULLSCREEN", False); + bool supported = false; + unsigned long i; + for (i = 0; i < nitems; i++) { + if (fullscreen_atom == supported_list[i]) { + supported = true; + break; + } + } + XFree(supported_list); + return supported; +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nIsNetWMFullscreenSupported(JNIEnv *env, jclass unused, jlong display, jint screen) { + Display *disp = (Display *)(intptr_t)display; + return isNetWMFullscreenSupported(env, disp, screen) ? JNI_TRUE : JNI_FALSE; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nReshape(JNIEnv *env, jclass clazz, jlong display, jlong window_ptr, jint x, jint y, jint width, jint height) { + Display *disp = (Display *)(intptr_t)display; + Window window = (Window)window_ptr; + XMoveWindow(disp, window, x, y); + XResizeWindow(disp, window, width, height); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_synchronize(JNIEnv *env, jclass clazz, jlong display, jboolean synchronize) { + Display *disp = (Display *)(intptr_t)display; + XSynchronize(disp, synchronize ? True : False); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getRootWindow(JNIEnv *env, jclass clazz, jlong display, jint screen) { + Display *disp = (Display *)(intptr_t)display; + return RootWindow(disp, screen); +} + +static Window getCurrentWindow(JNIEnv *env, jlong display_ptr, jlong window_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + + Window parent = (Window)window_ptr; + Window win, root; + + Window *children; + unsigned int nchildren; + + do { + win = parent; + + if (XQueryTree(disp, win, &root, &parent, &children, &nchildren) == 0) { + throwException(env, "XQueryTree failed"); + return 0; + } + + if (children != NULL) XFree(children); + } while (parent != root); + + return win; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetX(JNIEnv *env, jclass unused, jlong display_ptr, jlong window_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + Window win = getCurrentWindow(env, display_ptr, window_ptr); + + XWindowAttributes win_attribs; + XGetWindowAttributes(disp, win, &win_attribs); + + return win_attribs.x; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetY(JNIEnv *env, jclass unused, jlong display_ptr, jlong window_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + Window win = getCurrentWindow(env, display_ptr, window_ptr); + + XWindowAttributes win_attribs; + XGetWindowAttributes(disp, win, &win_attribs); + + return win_attribs.y; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetWidth(JNIEnv *env, jclass unused, jlong display_ptr, jlong window_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + Window win = (Window)window_ptr; + XWindowAttributes win_attribs; + + XGetWindowAttributes(disp, win, &win_attribs); + + return win_attribs.width; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetHeight(JNIEnv *env, jclass unused, jlong display_ptr, jlong window_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + Window win = (Window)window_ptr; + XWindowAttributes win_attribs; + + XGetWindowAttributes(disp, win, &win_attribs); + + return win_attribs.height; +} + +static void updateWindowHints(JNIEnv *env, Display *disp, Window window) { + XWMHints* win_hints = XAllocWMHints(); + if (win_hints == NULL) { + throwException(env, "XAllocWMHints failed"); + return; + } + + win_hints->flags = InputHint; + win_hints->input = True; + + XSetWMHints(disp, window, win_hints); + XFree(win_hints); + XFlush(disp); +} + +static void updateWindowBounds(Display *disp, Window win, int x, int y, int width, int height, jboolean position, jboolean resizable) { + XSizeHints *window_hints = XAllocSizeHints(); + + if (position) { + window_hints->flags |= PPosition; + window_hints->x = x; + window_hints->y = y; + } + + if (!resizable) { + window_hints->flags |= PMinSize | PMaxSize; + window_hints->min_width = width; + window_hints->max_width = width; + window_hints->min_height = height; + window_hints->max_height = height; + } + + XSetWMNormalHints(disp, win, window_hints); + XFree(window_hints); +} + +static Window createWindow(JNIEnv* env, Display *disp, int screen, jint window_mode, X11PeerInfo *peer_info, int x, int y, int width, int height, jboolean undecorated, long parent_handle, jboolean resizable) { + Window parent = (Window)parent_handle; + Window win; + XSetWindowAttributes attribs; + int attribmask; + + XVisualInfo *vis_info = getVisualInfoFromPeerInfo(env, peer_info); + if (vis_info == NULL) + return false; + cmap = XCreateColormap(disp, parent, vis_info->visual, AllocNone); + attribs.colormap = cmap; + attribs.border_pixel = 0; + attribs.event_mask = ExposureMask | FocusChangeMask | VisibilityChangeMask | StructureNotifyMask | KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask| EnterWindowMask | LeaveWindowMask; + attribmask = CWColormap | CWEventMask | CWBorderPixel; + if (isLegacyFullscreen(window_mode)) { + attribmask |= CWOverrideRedirect; + attribs.override_redirect = True; + } + win = XCreateWindow(disp, parent, x, y, width, height, 0, vis_info->depth, InputOutput, vis_info->visual, attribmask, &attribs); + + current_depth = vis_info->depth; + current_visual = vis_info->visual; + + XFree(vis_info); + if (!checkXError(env, disp)) { + XFreeColormap(disp, cmap); + return false; + } +// printfDebugJava(env, "Created window"); + if (undecorated) { + // Use Motif decoration hint property and hope the window manager respects them + setDecorations(disp, win, 0); + } + + if (RootWindow(disp, screen) == parent_handle) { // only set hints when Display.setParent isn't used + updateWindowBounds(disp, win, x, y, width, height, JNI_TRUE, resizable); + updateWindowHints(env, disp, win); + } + +#define NUM_ATOMS 1 + Atom protocol_atoms[NUM_ATOMS] = {XInternAtom(disp, "WM_DELETE_WINDOW", False)/*, XInternAtom(disp, "WM_TAKE_FOCUS", False)*/}; + XSetWMProtocols(disp, win, protocol_atoms, NUM_ATOMS); + if (window_mode == org_lwjgl_opengl_LinuxDisplay_FULLSCREEN_NETWM) { + Atom fullscreen_atom = XInternAtom(disp, "_NET_WM_STATE_FULLSCREEN", False); + XChangeProperty(disp, win, XInternAtom(disp, "_NET_WM_STATE", False), + XInternAtom(disp, "ATOM", False), 32, PropModeReplace, (const unsigned char*)&fullscreen_atom, 1); + } + if (!checkXError(env, disp)) { + destroyWindow(env, disp, win); + return 0; + } + return win; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_reparentWindow(JNIEnv *env, jclass unused, jlong display, jlong window_ptr, jlong parent_ptr, jint x, jint y) { + Display *disp = (Display *)(intptr_t)display; + Window window = (Window)window_ptr; + Window parent = (Window)parent_ptr; + XReparentWindow(disp, window, parent, x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_mapRaised(JNIEnv *env, jclass unused, jlong display, jlong window_ptr) { + Display *disp = (Display *)(intptr_t)display; + Window window = (Window)window_ptr; + XMapRaised(disp, window); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getParentWindow(JNIEnv *env, jclass unused, jlong display, jlong window_ptr) { + Display *disp = (Display *)(intptr_t)display; + Window window = (Window)window_ptr; + Window root, parent; + Window *children; + unsigned int nchildren; + if (XQueryTree(disp, window, &root, &parent, &children, &nchildren) == 0) { + throwException(env, "XQueryTree failed"); + return None; + } + if (children != NULL) + XFree(children); + return parent; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getChildCount(JNIEnv *env, jclass unused, jlong display, jlong window_ptr) { + Display *disp = (Display *)(intptr_t)display; + Window window = (Window)window_ptr; + Window root, parent; + Window *children; + unsigned int nchildren; + if (XQueryTree(disp, window, &root, &parent, &children, &nchildren) == 0) { + throwException(env, "XQueryTree failed"); + return None; + } + if (children != NULL) + XFree(children); + + return nchildren; +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_LinuxDisplay_hasProperty(JNIEnv *env, jclass unusued, jlong display, jlong window_ptr, jlong property_ptr) { + Display *disp = (Display *)(intptr_t)display; + Window window = (Window)window_ptr; + Atom property = (Atom)property_ptr; + int num_props; + Atom *properties = XListProperties(disp, window, &num_props); + if (properties == NULL) + return JNI_FALSE; + jboolean result = JNI_FALSE; + for (int i = 0; i < num_props; i++) { + if (properties[i] == property) { + result = JNI_TRUE; + break; + } + } + XFree(properties); + return result; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetInputFocus(JNIEnv *env, jclass unused, jlong display_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + int revert_mode; + Window win; + XGetInputFocus(disp, &win, &revert_mode); + return win; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetInputFocus(JNIEnv *env, jclass clazz, jlong display, jlong window_ptr, jlong time) { + Display *disp = (Display *)(intptr_t)display; + Window window = (Window)window_ptr; + XSetInputFocus(disp, window, RevertToParent, time); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nCreateWindow(JNIEnv *env, jclass clazz, jlong display, jint screen, jobject peer_info_handle, jobject mode, jint window_mode, jint x, jint y, jboolean undecorated, jlong parent_handle, jboolean resizable) { + Display *disp = (Display *)(intptr_t)display; + X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle); + GLXFBConfig *fb_config = NULL; + if (peer_info->glx13) { + fb_config = getFBConfigFromPeerInfo(env, peer_info); + if (fb_config == NULL) + return 0; + } + jclass cls_displayMode = (*env)->GetObjectClass(env, mode); + jfieldID fid_width = (*env)->GetFieldID(env, cls_displayMode, "width", "I"); + jfieldID fid_height = (*env)->GetFieldID(env, cls_displayMode, "height", "I"); + int width = (*env)->GetIntField(env, mode, fid_width); + int height = (*env)->GetIntField(env, mode, fid_height); + Window win = createWindow(env, disp, screen, window_mode, peer_info, x, y, width, height, undecorated, parent_handle, resizable); + if ((*env)->ExceptionOccurred(env)) { + return 0; + } + if (peer_info->glx13) { + glx_window = lwjgl_glXCreateWindow(disp, *fb_config, win, NULL); + XFree(fb_config); + } + if (!checkXError(env, disp)) { + lwjgl_glXDestroyWindow(disp, glx_window); + destroyWindow(env, disp, win); + } + return win; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetWindowSize(JNIEnv *env, jclass clazz, jlong display, jlong window_ptr, jint width, jint height, jboolean resizable) { + Display *disp = (Display *)(intptr_t)display; + Window win = (Window)window_ptr; + updateWindowBounds(disp, win, 0, 0, width, height, JNI_FALSE, resizable); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nDestroyWindow(JNIEnv *env, jclass clazz, jlong display, jlong window_ptr) { + Display *disp = (Display *)(intptr_t)display; + Window window = (Window)window_ptr; + destroyWindow(env, disp, window); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nLockAWT(JNIEnv *env, jclass clazz) { + JAWT jawt; + jawt.version = JAWT_VERSION_1_4; + if (JAWT_GetAWT(env, &jawt) != JNI_TRUE) { + throwException(env, "GetAWT failed"); + return; + } + jawt.Lock(env); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nUnlockAWT(JNIEnv *env, jclass clazz) { + JAWT jawt; + jawt.version = JAWT_VERSION_1_4; + if (JAWT_GetAWT(env, &jawt) != JNI_TRUE) { + throwException(env, "GetAWT failed"); + return; + } + jawt.Unlock(env); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetWindowIcon + (JNIEnv *env, jclass clazz, jlong display, jlong window_ptr, jobject icons_buffer, jint icons_buffer_size) +{ + Display *disp = (Display *)(intptr_t)display; + Window window = (Window)window_ptr; + const unsigned char *icons_char_buffer = (const unsigned char *)(*env)->GetDirectBufferAddress(env, icons_buffer); + + int length = icons_buffer_size/4; + unsigned long icons_long_buffer[length]; + int i = 0; + + // copy byte array to long array + for (i = 0; i < icons_buffer_size; i += 4) { + unsigned long argb = (icons_char_buffer[i] << 24) | + (icons_char_buffer[i+1] << 16) | + (icons_char_buffer[i+2] << 8) | + (icons_char_buffer[i+3]); + icons_long_buffer[i/4] = argb; + } + + XChangeProperty(disp, window, + XInternAtom(disp, "_NET_WM_ICON", False), + XInternAtom(disp, "CARDINAL", False), + 32, PropModeReplace, (const unsigned char*) icons_long_buffer, length); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nUngrabKeyboard(JNIEnv *env, jclass unused, jlong display_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + return XUngrabKeyboard(disp, CurrentTime); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGrabKeyboard(JNIEnv *env, jclass unused, jlong display_ptr, jlong window_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + Window win = (Window)window_ptr; + return XGrabKeyboard(disp, win, False, GrabModeAsync, GrabModeAsync, CurrentTime); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGrabPointer(JNIEnv *env, jclass unused, jlong display_ptr, jlong window_ptr, jlong cursor_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + Window win = (Window)window_ptr; + Cursor cursor = (Cursor)cursor_ptr; + int grab_mask = PointerMotionMask | ButtonPressMask | ButtonReleaseMask; + return XGrabPointer(disp, win, False, grab_mask, GrabModeAsync, GrabModeAsync, win, cursor, CurrentTime); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetViewPort(JNIEnv *env, jclass unused, jlong display_ptr, jlong window_ptr, jint screen) { + Display *disp = (Display *)(intptr_t)display_ptr; + Window win = (Window)window_ptr; + XWindowAttributes win_attribs; + + XGetWindowAttributes(disp, win, &win_attribs); + XF86VidModeSetViewPort(disp, screen, win_attribs.x, win_attribs.y); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nUngrabPointer(JNIEnv *env, jclass unused, jlong display_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + return XUngrabPointer(disp, CurrentTime); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nDefineCursor(JNIEnv *env, jclass unused, jlong display_ptr, jlong window_ptr, jlong cursor_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + Window win = (Window)window_ptr; + Cursor cursor = (Cursor)cursor_ptr; + XDefineCursor(disp, win, cursor); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nCreateBlankCursor(JNIEnv *env, jclass unused, jlong display_ptr, jlong window_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + Window win = (Window)window_ptr; + unsigned int best_width, best_height; + if (XQueryBestCursor(disp, win, 1, 1, &best_width, &best_height) == 0) { + throwException(env, "Could not query best cursor size"); + return false; + } + Pixmap mask = XCreatePixmap(disp, win, best_width, best_height, 1); + XGCValues gc_values; + gc_values.foreground = 0; + GC gc = XCreateGC(disp, mask, GCForeground, &gc_values); + XFillRectangle(disp, mask, gc, 0, 0, best_width, best_height); + XFreeGC(disp, gc); + XColor dummy_color; + Cursor cursor = XCreatePixmapCursor(disp, mask, mask, &dummy_color, &dummy_color, 0, 0); + XFreePixmap(disp, mask); + return cursor; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nIconifyWindow(JNIEnv *env, jclass unused, jlong display_ptr, jlong window_ptr, jint screen) { + Display *disp = (Display *)(intptr_t)display_ptr; + Window win = (Window)window_ptr; + XIconifyWindow(disp, win, screen); +} diff --git a/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_LinuxAWTGLCanvasPeerInfo.c b/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_LinuxAWTGLCanvasPeerInfo.c new file mode 100644 index 0000000..9ed67dc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_LinuxAWTGLCanvasPeerInfo.c @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * @author elias_naur + * @version $Revision$ + */ + +#include +#include +#include +#include +#include +#include "awt_tools.h" +#include "org_lwjgl_opengl_LinuxAWTGLCanvasPeerInfo.h" +#include "context.h" + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxAWTGLCanvasPeerInfo_getScreenFromSurfaceInfo + (JNIEnv *env, jclass clazz, jobject lock_buffer_handle) { + const AWTSurfaceLock *awt_lock = (AWTSurfaceLock *)(*env)->GetDirectBufferAddress(env, lock_buffer_handle); + // Get the platform-specific drawing info + JAWT_X11DrawingSurfaceInfo *dsi_x11 = (JAWT_X11DrawingSurfaceInfo*)awt_lock->dsi->platformInfo; + + XVisualInfo template; + int num_infos; + template.visualid = dsi_x11->visualID; + template.depth = dsi_x11->depth; + XVisualInfo *vis_info = XGetVisualInfo(dsi_x11->display, VisualIDMask | VisualDepthMask, &template, &num_infos); + if (vis_info == NULL) { + throwException(env, "Could not determine screen"); + return -1; + } + int screen = vis_info[0].screen; + XFree(vis_info); + return screen; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxAWTGLCanvasPeerInfo_nInitHandle + (JNIEnv *env, jclass clazz, int screen, jobject lock_buffer_handle, jobject peer_info_handle) { + const AWTSurfaceLock *awt_lock = (AWTSurfaceLock *)(*env)->GetDirectBufferAddress(env, lock_buffer_handle); + X11PeerInfo *peer_info = (X11PeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + // Get the platform-specific drawing info + JAWT_X11DrawingSurfaceInfo *dsi_x11 = (JAWT_X11DrawingSurfaceInfo*)awt_lock->dsi->platformInfo; + + peer_info->display = dsi_x11->display; + peer_info->screen = screen; + peer_info->drawable = dsi_x11->drawable; + peer_info->glx13 = false; + peer_info->config.glx_config.visualid = dsi_x11->visualID; + peer_info->config.glx_config.depth = dsi_x11->depth; +} diff --git a/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_LinuxAWTGLCanvasPeerInfo.h b/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_LinuxAWTGLCanvasPeerInfo.h new file mode 100644 index 0000000..76bea8c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_LinuxAWTGLCanvasPeerInfo.h @@ -0,0 +1,29 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_LinuxAWTGLCanvasPeerInfo */ + +#ifndef _Included_org_lwjgl_opengl_LinuxAWTGLCanvasPeerInfo +#define _Included_org_lwjgl_opengl_LinuxAWTGLCanvasPeerInfo +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_lwjgl_opengl_LinuxAWTGLCanvasPeerInfo + * Method: getScreenFromSurfaceInfo + * Signature: (Ljava/nio/ByteBuffer;)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxAWTGLCanvasPeerInfo_getScreenFromSurfaceInfo + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxAWTGLCanvasPeerInfo + * Method: nInitHandle + * Signature: (ILjava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxAWTGLCanvasPeerInfo_nInitHandle + (JNIEnv *, jclass, jint, jobject, jobject); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_LinuxCanvasImplementation.c b/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_LinuxCanvasImplementation.c new file mode 100644 index 0000000..8b05317 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_LinuxCanvasImplementation.c @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * @author elias_naur + * @version $Revision$ + */ + +#include +#include +#include +#include +#include "org_lwjgl_opengl_LinuxCanvasImplementation.h" +#include "extgl_glx.h" +#include "context.h" + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxCanvasImplementation_nFindVisualIDFromFormat + (JNIEnv *env, jclass clazz, jlong display, jint screen, jobject pixel_format) { + Display *disp = (Display *)(intptr_t)display; + GLXExtensions extension_flags; + if (!extgl_InitGLX(disp, screen, &extension_flags)) { + throwException(env, "Could not initialize GLX"); + return -1; + } + XVisualInfo *vis_info = chooseVisualGLX(env, disp, screen, pixel_format, true, true); + if (vis_info == NULL) { + throwException(env, "Could not choose a VisualInfo"); + return -1; + } + + VisualID vis_id = vis_info->visualid; + XFree(vis_info); + return vis_id; +} diff --git a/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_LinuxCanvasImplementation.h b/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_LinuxCanvasImplementation.h new file mode 100644 index 0000000..b6cd1ca --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_LinuxCanvasImplementation.h @@ -0,0 +1,21 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_LinuxCanvasImplementation */ + +#ifndef _Included_org_lwjgl_opengl_LinuxCanvasImplementation +#define _Included_org_lwjgl_opengl_LinuxCanvasImplementation +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_lwjgl_opengl_LinuxCanvasImplementation + * Method: nFindVisualIDFromFormat + * Signature: (JILorg/lwjgl/opengl/PixelFormat;)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxCanvasImplementation_nFindVisualIDFromFormat + (JNIEnv *, jclass, jlong, jint, jobject); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_LinuxContextImplementation.c b/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_LinuxContextImplementation.c new file mode 100644 index 0000000..844883e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_LinuxContextImplementation.c @@ -0,0 +1,205 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * @author elias_naur + * @version $Revision$ + */ + +#include +#include +#include +#include +#include "org_lwjgl_opengl_LinuxContextImplementation.h" +#include "extgl_glx.h" +#include "context.h" +#include "common_tools.h" + +typedef struct { + GLXExtensions extension_flags; + GLXContext context; +} X11Context; + +static bool checkContext(JNIEnv *env, Display *display, GLXContext context) { + if (context == NULL) { + throwException(env, "Could not create GLX context"); + return false; + } + /* + * Ditched the requirement that contexts have to be direct. It was + * never true that all accelerated contexts are direct, but it + * was a reasonable test until the appearance of Xgl and AIGLX. + * Now the test is at best useless, and at worst wrong, + * in case the current X server accelerates indirect rendering. + */ +/* jboolean allow_software_acceleration = getBooleanProperty(env, "org.lwjgl.opengl.Display.allowSoftwareOpenGL"); + if (!allow_software_acceleration && lwjgl_glXIsDirect(display, context) == False) { + lwjgl_glXDestroyContext(display, context); + throwException(env, "Could not create a direct GLX context"); + return false; + }*/ + return true; +} + +static void createContextGLX13(JNIEnv *env, X11PeerInfo *peer_info, X11Context *context_info, jobject attribs, GLXContext shared_context) { + GLXFBConfig *config = getFBConfigFromPeerInfo(env, peer_info); + if (config == NULL) + return; + GLXContext context; + if (attribs) { + const int *attrib_list = (const int *)(*env)->GetDirectBufferAddress(env, attribs); + context = lwjgl_glXCreateContextAttribsARB(peer_info->display, *config, shared_context, True, attrib_list); + } else { + int render_type; + if (lwjgl_glXGetFBConfigAttrib(peer_info->display, *config, GLX_RENDER_TYPE, &render_type) != 0) { + throwException(env, "Could not get GLX_RENDER_TYPE attribute"); + return; + } + int context_render_type = (render_type & GLX_RGBA_FLOAT_BIT) != 0 ? GLX_RGBA_FLOAT_TYPE : GLX_RGBA_TYPE; + context = lwjgl_glXCreateNewContext(peer_info->display, *config, context_render_type, shared_context, True); + } + XFree(config); + if (!checkContext(env, peer_info->display, context)) + return; + context_info->context = context; +} + +static void createContextGLX(JNIEnv *env, X11PeerInfo *peer_info, X11Context *context_info, GLXContext shared_context) { + XVisualInfo *vis_info = getVisualInfoFromPeerInfo(env, peer_info); + if (vis_info == NULL) + return; + GLXContext context = lwjgl_glXCreateContext(peer_info->display, vis_info, shared_context, True); + XFree(vis_info); + if (!checkContext(env, peer_info->display, context)) + return; + context_info->context = context; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxContextImplementation_getGLXContext(JNIEnv *env, jclass clazz, jobject context_handle) { + X11Context *context_info = (*env)->GetDirectBufferAddress(env, context_handle); + return (intptr_t)context_info->context; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxContextImplementation_getDisplay(JNIEnv *env, jclass clazz, jobject peer_info_handle) { + X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle); + return (intptr_t)peer_info->display; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxContextImplementation_nSetSwapInterval + (JNIEnv *env, jclass clazz, jobject peer_info_handle, jobject context_handle, jint value) +{ + X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle); + X11Context *context_info = (*env)->GetDirectBufferAddress(env, context_handle); + + if (context_info->extension_flags.GLX_EXT_swap_control) { + lwjgl_glXSwapIntervalEXT(peer_info->display, peer_info->drawable, value); + } + else if (context_info->extension_flags.GLX_SGI_swap_control) { + lwjgl_glXSwapIntervalSGI(value); + } +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_LinuxContextImplementation_nCreate + (JNIEnv *env , jclass clazz, jobject peer_handle, jobject attribs, jobject shared_context_handle) { + jobject context_handle = newJavaManagedByteBuffer(env, sizeof(X11Context)); + if (context_handle == NULL) { + throwException(env, "Could not allocate handle buffer"); + return NULL; + } + X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_handle); + X11Context *context_info = (*env)->GetDirectBufferAddress(env, context_handle); + GLXExtensions extension_flags; + if (!extgl_InitGLX(peer_info->display, peer_info->screen, &extension_flags)) { + throwException(env, "Could not initialize GLX"); + return NULL; + } + GLXContext shared_context = NULL; + if (shared_context_handle != NULL) { + X11Context *shared_context_info = (*env)->GetDirectBufferAddress(env, shared_context_handle); + shared_context = shared_context_info->context; + } + if (peer_info->glx13) { + createContextGLX13(env, peer_info, context_info, extension_flags.GLX_ARB_create_context ? attribs : NULL, shared_context); + } else { + createContextGLX(env, peer_info, context_info, shared_context); + } + context_info->extension_flags = extension_flags; + return context_handle; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxContextImplementation_nDestroy + (JNIEnv *env, jclass clazz, jobject peer_handle, jobject context_handle) { + X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_handle); + X11Context *context_info = (*env)->GetDirectBufferAddress(env, context_handle); + lwjgl_glXDestroyContext(peer_info->display, context_info->context); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxContextImplementation_nReleaseCurrentContext + (JNIEnv *env , jclass clazz, jobject peer_info_handle) { + X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle); + Bool result; + if (peer_info->glx13) { + result = lwjgl_glXMakeContextCurrent(peer_info->display, None, None, NULL); + } else { + result = lwjgl_glXMakeCurrent(peer_info->display, None, NULL); + } + if (!result) + throwException(env, "Could not release current context"); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxContextImplementation_nMakeCurrent + (JNIEnv *env, jclass clazz, jobject peer_info_handle, jobject context_handle) { + X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle); + X11Context *context_info = (*env)->GetDirectBufferAddress(env, context_handle); + Bool result; + if (peer_info->glx13) { + result = lwjgl_glXMakeContextCurrent(peer_info->display, peer_info->drawable, peer_info->drawable, context_info->context); + } else { + result = lwjgl_glXMakeCurrent(peer_info->display, peer_info->drawable, context_info->context); + } + if (!result) + throwException(env, "Could not make context current"); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_LinuxContextImplementation_nIsCurrent + (JNIEnv *env, jclass clazz, jobject context_handle) { + X11Context *context_info = (*env)->GetDirectBufferAddress(env, context_handle); + return context_info->context == lwjgl_glXGetCurrentContext(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxContextImplementation_nSwapBuffers + (JNIEnv *env, jclass clazz, jobject peer_info_handle) { + X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle); + lwjgl_glXSwapBuffers(peer_info->display, peer_info->drawable); +} diff --git a/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_LinuxContextImplementation.h b/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_LinuxContextImplementation.h new file mode 100644 index 0000000..b4caf56 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_LinuxContextImplementation.h @@ -0,0 +1,85 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_LinuxContextImplementation */ + +#ifndef _Included_org_lwjgl_opengl_LinuxContextImplementation +#define _Included_org_lwjgl_opengl_LinuxContextImplementation +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_lwjgl_opengl_LinuxContextImplementation + * Method: nCreate + * Signature: (Ljava/nio/ByteBuffer;Ljava/nio/IntBuffer;Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer; + */ +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_LinuxContextImplementation_nCreate + (JNIEnv *, jclass, jobject, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxContextImplementation + * Method: getGLXContext + * Signature: (Ljava/nio/ByteBuffer;)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxContextImplementation_getGLXContext + (JNIEnv *, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxContextImplementation + * Method: getDisplay + * Signature: (Ljava/nio/ByteBuffer;)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxContextImplementation_getDisplay + (JNIEnv *, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxContextImplementation + * Method: nSwapBuffers + * Signature: (Ljava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxContextImplementation_nSwapBuffers + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxContextImplementation + * Method: nReleaseCurrentContext + * Signature: (Ljava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxContextImplementation_nReleaseCurrentContext + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxContextImplementation + * Method: nMakeCurrent + * Signature: (Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxContextImplementation_nMakeCurrent + (JNIEnv *, jclass, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxContextImplementation + * Method: nIsCurrent + * Signature: (Ljava/nio/ByteBuffer;)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_LinuxContextImplementation_nIsCurrent + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxContextImplementation + * Method: nSetSwapInterval + * Signature: (Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;I)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxContextImplementation_nSetSwapInterval + (JNIEnv *, jclass, jobject, jobject, jint); + +/* + * Class: org_lwjgl_opengl_LinuxContextImplementation + * Method: nDestroy + * Signature: (Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxContextImplementation_nDestroy + (JNIEnv *, jclass, jobject, jobject); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_LinuxDisplayPeerInfo.h b/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_LinuxDisplayPeerInfo.h new file mode 100644 index 0000000..3f453ff --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_LinuxDisplayPeerInfo.h @@ -0,0 +1,29 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_LinuxDisplayPeerInfo */ + +#ifndef _Included_org_lwjgl_opengl_LinuxDisplayPeerInfo +#define _Included_org_lwjgl_opengl_LinuxDisplayPeerInfo +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_lwjgl_opengl_LinuxDisplayPeerInfo + * Method: initDefaultPeerInfo + * Signature: (JILjava/nio/ByteBuffer;Lorg/lwjgl/opengl/PixelFormat;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplayPeerInfo_initDefaultPeerInfo + (JNIEnv *, jclass, jlong, jint, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxDisplayPeerInfo + * Method: initDrawable + * Signature: (JLjava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplayPeerInfo_initDrawable + (JNIEnv *, jclass, jlong, jobject); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_LinuxPbufferPeerInfo.h b/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_LinuxPbufferPeerInfo.h new file mode 100644 index 0000000..bf21d53 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_LinuxPbufferPeerInfo.h @@ -0,0 +1,29 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_LinuxPbufferPeerInfo */ + +#ifndef _Included_org_lwjgl_opengl_LinuxPbufferPeerInfo +#define _Included_org_lwjgl_opengl_LinuxPbufferPeerInfo +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_lwjgl_opengl_LinuxPbufferPeerInfo + * Method: nInitHandle + * Signature: (JILjava/nio/ByteBuffer;IILorg/lwjgl/opengl/PixelFormat;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxPbufferPeerInfo_nInitHandle + (JNIEnv *, jclass, jlong, jint, jobject, jint, jint, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxPbufferPeerInfo + * Method: nDestroy + * Signature: (Ljava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxPbufferPeerInfo_nDestroy + (JNIEnv *, jclass, jobject); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_Pbuffer.c b/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_Pbuffer.c new file mode 100644 index 0000000..cb15439 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/opengl/org_lwjgl_opengl_Pbuffer.c @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Linux Pbuffer. + * + * @author elias_naur + * @version $Revision$ + */ + +#include +#include "org_lwjgl_opengl_LinuxPbufferPeerInfo.h" +#include "org_lwjgl_opengl_Pbuffer.h" +#include "extgl.h" +#include "context.h" +#include "common_tools.h" + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetPbufferCapabilities + (JNIEnv *env, jclass clazz, jlong display, jint screen) +{ + Display *disp = (Display *)(intptr_t)display; + GLXExtensions extension_flags; + if (!extgl_InitGLX(disp, screen, &extension_flags)) + return 0; + // Only support the GLX 1.3 Pbuffers and ignore the GLX_SGIX_pbuffer extension + return extension_flags.GLX13 ? org_lwjgl_opengl_Pbuffer_PBUFFER_SUPPORTED : 0; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxPbufferPeerInfo_nInitHandle + (JNIEnv *env, jclass clazz, jlong display, jint screen, jobject peer_info_handle, jint width, jint height, jobject pixel_format) { + Display *disp = (Display *)(intptr_t)display; + GLXExtensions extension_flags; + if (!extgl_InitGLX(disp, screen, &extension_flags) || !extension_flags.GLX13) { + throwException(env, "No Pbuffer support"); + return; + } + bool result = initPeerInfo(env, peer_info_handle, disp, screen, pixel_format, false, GLX_PBUFFER_BIT, false, true); + if (!result) + return; + const int buffer_attribs[] = {GLX_PBUFFER_WIDTH, width, + GLX_PBUFFER_HEIGHT, height, + GLX_PRESERVED_CONTENTS, True, + GLX_LARGEST_PBUFFER, False, + None, None}; + + X11PeerInfo *peer_info = (X11PeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + GLXFBConfig *config = getFBConfigFromPeerInfo(env, peer_info); + if (config != NULL) { + GLXPbuffer buffer = lwjgl_glXCreatePbuffer(peer_info->display, *config, buffer_attribs); + XFree(config); + peer_info->drawable = buffer; + } +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxPbufferPeerInfo_nDestroy + (JNIEnv *env, jclass clazz, jobject peer_info_handle) { + X11PeerInfo *peer_info = (X11PeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + lwjgl_glXDestroyPbuffer(peer_info->display, peer_info->drawable); +} diff --git a/etc/lwjgl-2.9.1/src/native/linux/opengles/context.c b/etc/lwjgl-2.9.1/src/native/linux/opengles/context.c new file mode 100644 index 0000000..17d519c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/opengles/context.c @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id: context.c 3116 2008-08-19 16:46:03Z spasi $ + * + * Include file to access public window features + * + * @author elias_naur + * @version $Revision: 3116 $ + */ + +#include "context.h" + +bool initPeerInfo(JNIEnv *env, jobject peer_info_handle, Display *display, int screen) { + /* + if ((*env)->GetDirectBufferCapacity(env, peer_info_handle) < sizeof(X11PeerInfo)) { + throwException(env, "Handle too small"); + return false; + } + */ + X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle); + + peer_info->display = display; + peer_info->screen = screen; + return true; +} diff --git a/etc/lwjgl-2.9.1/src/native/linux/opengles/context.h b/etc/lwjgl-2.9.1/src/native/linux/opengles/context.h new file mode 100644 index 0000000..ea5129d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/opengles/context.h @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id: context.h 2985 2008-04-07 18:42:36Z matzon $ + * + * Include file to access public window features + * + * @author elias_naur + * @version $Revision: 2985 $ + */ + +#ifndef _LWJGL_CONTEXT_H_INCLUDED_ +#define _LWJGL_CONTEXT_H_INCLUDED_ + +#include +#include +#include "extgl.h" + +typedef struct { + Display *display; + int screen; + jlong drawable; +} X11PeerInfo; + +extern bool initPeerInfo(JNIEnv *env, jobject peer_info_handle, Display *display, int screen); + +#endif /* _LWJGL_CONTEXT_H_INCLUDED_ */ diff --git a/etc/lwjgl-2.9.1/src/native/linux/opengles/display.c b/etc/lwjgl-2.9.1/src/native/linux/opengles/display.c new file mode 100644 index 0000000..89eda41 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/opengles/display.c @@ -0,0 +1,409 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id: display.c 2985 2008-04-07 18:42:36Z matzon $ + * + * Linux specific library for display handling. + * + * @author elias_naur + * @version $Revision: 2985 $ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include "common_tools.h" +#include "org_lwjgl_opengl_LinuxDisplay.h" + +#define NUM_XRANDR_RETRIES 5 + +typedef struct { + int width; + int height; + int freq; + union { + int size_index; // Data for Xrandr extension + XF86VidModeModeInfo xf86vm_modeinfo; // Data for XF86VidMode extension + } mode_data; +} mode_info; + +static bool getXF86VidModeVersion(JNIEnv *env, Display *disp, int *major, int *minor) { + int event_base, error_base; + + if (!XF86VidModeQueryExtension(disp, &event_base, &error_base)) { + printfDebugJava(env, "XF86VidMode extension not available"); + return false; + } + if (!XF86VidModeQueryVersion(disp, major, minor)) { + throwException(env, "Could not query XF86VidMode version"); + return false; + } + printfDebugJava(env, "XF86VidMode extension version %i.%i", *major, *minor); + return true; +} + +static bool getXrandrVersion(JNIEnv *env, Display *disp, int *major, int *minor) { + int event_base, error_base; + + if (!XRRQueryExtension(disp, &event_base, &error_base)) { + printfDebugJava(env, "Xrandr extension not available"); + return false; + } + if (!XRRQueryVersion(disp, major, minor)) { + throwException(env, "Could not query Xrandr version"); + return false; + } + printfDebugJava(env, "Xrandr extension version %i.%i", *major, *minor); + return true; +} + +static bool isXrandrSupported(JNIEnv *env, Display *disp) { + int major, minor; + if (!getXrandrVersion(env, disp, &major, &minor)) + return false; + return major >= 1; +} + +static bool isXF86VidModeSupported(JNIEnv *env, Display *disp) { + int minor_ver, major_ver; + if (!getXF86VidModeVersion(env, disp, &major_ver, &minor_ver)) + return false; + return major_ver >= 2; +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nIsXrandrSupported(JNIEnv *env, jclass unused, jlong display) { + Display *disp = (Display *)(intptr_t)display; + jboolean result = isXrandrSupported(env, disp) ? JNI_TRUE : JNI_FALSE; + return result; +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nIsXF86VidModeSupported(JNIEnv *env, jclass unused, jlong display) { + Display *disp = (Display *)(intptr_t)display; + jboolean result = isXF86VidModeSupported(env, disp) ? JNI_TRUE : JNI_FALSE; + return result; +} + +static mode_info *getXrandrDisplayModes(Display *disp, int screen, int *num_modes) { + int num_randr_sizes; + XRRScreenSize *sizes = XRRSizes(disp, screen, &num_randr_sizes); + mode_info *avail_modes = NULL; + int list_size = 0; + /* Count number of modes */ + int i; + int mode_index = 0; + for (i = 0; i < num_randr_sizes; i++) { + int num_randr_rates; + short *freqs = XRRRates(disp, screen, i, &num_randr_rates); + int j; + for (j = 0; j < num_randr_rates; j++) { + if (list_size <= mode_index) { + list_size += 1; + avail_modes = (mode_info *)realloc(avail_modes, sizeof(mode_info)*list_size); + if (avail_modes == NULL) + return NULL; + } + avail_modes[mode_index].width = sizes[i].width; + avail_modes[mode_index].height = sizes[i].height; + avail_modes[mode_index].freq = freqs[j]; + avail_modes[mode_index].mode_data.size_index = i; + mode_index++; + } + } + *num_modes = mode_index; + return avail_modes; +} + +static mode_info *getXF86VidModeDisplayModes(Display *disp, int screen, int *num_modes) { + int num_xf86vm_modes; + XF86VidModeModeInfo **avail_xf86vm_modes; + XF86VidModeGetAllModeLines(disp, screen, &num_xf86vm_modes, &avail_xf86vm_modes); + mode_info *avail_modes = (mode_info *)malloc(sizeof(mode_info)*num_xf86vm_modes); + if (avail_modes == NULL) { + XFree(avail_xf86vm_modes); + return NULL; + } + int i; + for (i = 0; i < num_xf86vm_modes; i++) { + avail_modes[i].width = avail_xf86vm_modes[i]->hdisplay; + avail_modes[i].height = avail_xf86vm_modes[i]->vdisplay; + avail_modes[i].freq = 0; // No frequency support in XF86VidMode + avail_modes[i].mode_data.xf86vm_modeinfo = *avail_xf86vm_modes[i]; + } + XFree(avail_xf86vm_modes); + *num_modes = num_xf86vm_modes; + return avail_modes; +} + +static mode_info *getDisplayModes(Display *disp, int screen, jint extension, int *num_modes) { + switch (extension) { + case org_lwjgl_opengl_LinuxDisplay_XF86VIDMODE: + return getXF86VidModeDisplayModes(disp, screen, num_modes); + case org_lwjgl_opengl_LinuxDisplay_XRANDR: + return getXrandrDisplayModes(disp, screen, num_modes); + case org_lwjgl_opengl_LinuxDisplay_NONE: + // fall through + default: + return NULL; + } +} + +static bool setXF86VidModeMode(Display *disp, int screen, mode_info *mode) { + return True == XF86VidModeSwitchToMode(disp, screen, &mode->mode_data.xf86vm_modeinfo); +} + +/* Try to set the mode specified through XRandR. + * Return value is the Status code of the mode switch + * The timestamp parameter is filled with the latest timestamp returned from XRRConfigTimes + */ +static Status trySetXrandrMode(Display *disp, int screen, mode_info *mode, Time *timestamp) { + Status status; + Drawable root_window = RootWindow(disp, screen); + XRRScreenConfiguration *screen_configuration = XRRGetScreenInfo(disp, root_window); + Time config_time; + *timestamp = XRRConfigTimes(screen_configuration, &config_time); + Rotation current_rotation; + XRRConfigCurrentConfiguration(screen_configuration, ¤t_rotation); + status = XRRSetScreenConfigAndRate(disp, screen_configuration, root_window, mode->mode_data.size_index, current_rotation, mode->freq, *timestamp); + XRRFreeScreenConfigInfo(screen_configuration); + return status; +} + +static bool setXrandrMode(Display *disp, int screen, mode_info *mode) { + int iteration; + Time timestamp; + Status status = trySetXrandrMode(disp, screen, mode, ×tamp); + if (status == 0) + return true; // Success + Time new_timestamp; + for (iteration = 0; iteration < NUM_XRANDR_RETRIES; iteration++) { + status = trySetXrandrMode(disp, screen, mode, &new_timestamp); + if (status == 0) + return true; // Success + if (new_timestamp == timestamp) { + return false; // Failure, and the stamps are equal meaning that the failure is not merely transient + } + timestamp = new_timestamp; + } + return false; +} + +static bool setMode(JNIEnv *env, Display *disp, int screen, jint extension, int width, int height, int freq) { + int num_modes, i; + mode_info *avail_modes = getDisplayModes(disp, screen, extension, &num_modes); + if (avail_modes == NULL) { + printfDebugJava(env, "Could not get display modes"); + return false; + } + bool result = false; + for (i = 0; i < num_modes; ++i) { + printfDebugJava(env, "Mode %d: %dx%d @%d", i, avail_modes[i].width, avail_modes[i].height, avail_modes[i].freq); + if (avail_modes[i].width == width && avail_modes[i].height == height && avail_modes[i].freq == freq) { + switch (extension) { + case org_lwjgl_opengl_LinuxDisplay_XF86VIDMODE: + if (!setXF86VidModeMode(disp, screen, &avail_modes[i])) { + printfDebugJava(env, "Could not switch mode"); + continue; + } + break; + case org_lwjgl_opengl_LinuxDisplay_XRANDR: + if (!setXrandrMode(disp, screen, &avail_modes[i])) { + printfDebugJava(env, "Could not switch mode"); + continue; + } + break; + case org_lwjgl_opengl_LinuxDisplay_NONE: // Should never happen, since NONE imply no available display modes + default: // Should never happen + continue; + } + result = true; + break; + } + } + free(avail_modes); + XFlush(disp); + return result; +} + +static int getGammaRampLengthOfDisplay(JNIEnv *env, Display *disp, int screen) { + int ramp_size; + if (XF86VidModeGetGammaRampSize(disp, screen, &ramp_size) == False) { + throwException(env, "XF86VidModeGetGammaRampSize call failed"); + return 0; + } + return ramp_size; +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nConvertToNativeRamp(JNIEnv *env, jclass unused, jobject ramp_buffer, jint buffer_offset, jint length) { + const jfloat *ramp_ptr = (const jfloat *)(*env)->GetDirectBufferAddress(env, ramp_buffer) + buffer_offset; + jobject native_ramp = newJavaManagedByteBuffer(env, length*3*sizeof(unsigned short)); + if (native_ramp == NULL) { + throwException(env, "Failed to allocate gamma ramp buffer"); + return NULL; + } + unsigned short *native_ramp_ptr = (unsigned short *)(*env)->GetDirectBufferAddress(env, native_ramp); + int i; + for (i = 0; i < length; i++) { + float scaled_gamma = ramp_ptr[i]*0xffff; + short scaled_gamma_short = (unsigned short)roundf(scaled_gamma); + native_ramp_ptr[i] = scaled_gamma_short; + native_ramp_ptr[i + length] = scaled_gamma_short; + native_ramp_ptr[i + length*2] = scaled_gamma_short; + } + return native_ramp; +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetCurrentGammaRamp(JNIEnv *env, jclass unused, jlong display, jint screen) { + Display *disp = (Display *)(intptr_t)display; + int ramp_size = getGammaRampLengthOfDisplay(env, disp, screen); + jobject ramp_buffer = newJavaManagedByteBuffer(env, sizeof(unsigned short)*3*ramp_size); + if (ramp_buffer == NULL) { + throwException(env, "Could not allocate gamma ramp buffer"); + return NULL; + } + unsigned short *ramp = (unsigned short *)(*env)->GetDirectBufferAddress(env, ramp_buffer); + if (!XF86VidModeGetGammaRamp(disp, screen, ramp_size, ramp, ramp + ramp_size, ramp + ramp_size*2)) { + throwException(env, "Could not get the current gamma ramp"); + return NULL; + } + return ramp_buffer; +} + +static void setGamma(JNIEnv *env, Display *disp, int screen, jobject ramp_buffer) { + if (ramp_buffer == NULL) + return; + unsigned short *ramp_ptr = (unsigned short *)(*env)->GetDirectBufferAddress(env, ramp_buffer); + jlong capacity = (*env)->GetDirectBufferCapacity(env, ramp_buffer); + int size = capacity/(sizeof(unsigned short)*3); + if (size == 0) + return; + if (XF86VidModeSetGammaRamp(disp, screen, size, ramp_ptr, ramp_ptr + size, ramp_ptr + size*2) == False) { + throwException(env, "Could not set gamma ramp."); + } +} + +static bool switchDisplayMode(JNIEnv * env, Display *disp, int screen, jint extension, jobject mode) { + if (mode == NULL) { + throwException(env, "mode must be non-null"); + return false; + } + jclass cls_displayMode = (*env)->GetObjectClass(env, mode); + jfieldID fid_width = (*env)->GetFieldID(env, cls_displayMode, "width", "I"); + jfieldID fid_height = (*env)->GetFieldID(env, cls_displayMode, "height", "I"); + jfieldID fid_freq = (*env)->GetFieldID(env, cls_displayMode, "freq", "I"); + int width = (*env)->GetIntField(env, mode, fid_width); + int height = (*env)->GetIntField(env, mode, fid_height); + int freq = (*env)->GetIntField(env, mode, fid_freq); + if (!setMode(env, disp, screen, extension, width, height, freq)) { + throwException(env, "Could not switch mode."); + return false; + } + return true; +} + +static jobjectArray getAvailableDisplayModes(JNIEnv * env, Display *disp, int screen, jint extension) { + int num_modes, i; + mode_info *avail_modes; + int bpp = XDefaultDepth(disp, screen); + avail_modes = getDisplayModes(disp, screen, extension, &num_modes); + if (avail_modes == NULL) { + printfDebugJava(env, "Could not get display modes"); + return NULL; + } + // Allocate an array of DisplayModes big enough + jclass displayModeClass = (*env)->FindClass(env, "org/lwjgl/opengl/DisplayMode"); + jobjectArray ret = (*env)->NewObjectArray(env, num_modes, displayModeClass, NULL); + jmethodID displayModeConstructor = (*env)->GetMethodID(env, displayModeClass, "", "(IIII)V"); + + for (i = 0; i < num_modes; i++) { + jobject displayMode = (*env)->NewObject(env, displayModeClass, displayModeConstructor, avail_modes[i].width, avail_modes[i].height, bpp, avail_modes[i].freq); + (*env)->SetObjectArrayElement(env, ret, i, displayMode); + } + free(avail_modes); + return ret; +} + +static jobject getCurrentXRandrMode(JNIEnv * env, Display *disp, int screen) { + Drawable root_window = RootWindow(disp, screen); + XRRScreenConfiguration *config = XRRGetScreenInfo(disp, root_window); + if (config == NULL) { + throwException(env, "Could not get current screen configuration."); + return NULL; + } + short rate = XRRConfigCurrentRate(config); + Rotation current_rotation; + SizeID size_index = XRRConfigCurrentConfiguration(config, ¤t_rotation); + int n_sizes; + XRRScreenSize *sizes = XRRConfigSizes(config, &n_sizes); + if (size_index >= n_sizes) { + throwFormattedException(env, "Xrandr current index (%d) is larger than or equals to the number of sizes (%d).", size_index, n_sizes); + XRRFreeScreenConfigInfo(config); + return NULL; + } + XRRScreenSize current_size = sizes[size_index]; + XRRFreeScreenConfigInfo(config); + int bpp = XDefaultDepth(disp, screen); + jclass displayModeClass = (*env)->FindClass(env, "org/lwjgl/opengl/DisplayMode"); + jmethodID displayModeConstructor = (*env)->GetMethodID(env, displayModeClass, "", "(IIII)V"); + jobject displayMode = (*env)->NewObject(env, displayModeClass, displayModeConstructor, current_size.width, current_size.height, bpp, rate); + return displayMode; +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetCurrentXRandrMode(JNIEnv *env, jclass unused, jlong display, jint screen) { + Display *disp = (Display *)(intptr_t)display; + return getCurrentXRandrMode(env, disp, screen); +} + +JNIEXPORT jobjectArray JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetAvailableDisplayModes(JNIEnv *env, jclass clazz, jlong display, jint screen, jint extension) { + Display *disp = (Display *)(intptr_t)display; + return getAvailableDisplayModes(env, disp, screen, extension); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSwitchDisplayMode(JNIEnv *env, jclass clazz, jlong display, jint screen, jint extension, jobject mode) { + Display *disp = (Display *)(intptr_t)display; + switchDisplayMode(env, disp, screen, extension, mode); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetGammaRampLength(JNIEnv *env, jclass clazz, jlong display_ptr, jint screen) { + Display *disp = (Display *)(intptr_t)display_ptr; + return (jint)getGammaRampLengthOfDisplay(env, disp, screen); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetGammaRamp(JNIEnv *env, jclass clazz, jlong display, jint screen, jobject gamma_buffer) { + Display *disp = (Display *)(intptr_t)display; + setGamma(env, disp, screen, gamma_buffer); +} diff --git a/etc/lwjgl-2.9.1/src/native/linux/opengles/extgl_glx.c b/etc/lwjgl-2.9.1/src/native/linux/opengles/extgl_glx.c new file mode 100644 index 0000000..32b2ff7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/opengles/extgl_glx.c @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +#include +#include +#include +#include "extgl.h" + +static void * lib_gl_handle = NULL; + +bool extgl_Open(JNIEnv *env) { + if ( lib_gl_handle != NULL ) + return true; + + lib_gl_handle = dlopen("libGLESv2.so", RTLD_LAZY | RTLD_GLOBAL); + if (lib_gl_handle == NULL) { + throwFormattedException(env, "Error loading libGLESv2.so: %s", dlerror()); + return false; + } + return true; +} + +void extgl_Close(void) { + dlclose(lib_gl_handle); + lib_gl_handle = NULL; +} + +void *extgl_GetProcAddress(const char *name) { + void *t = eglGetProcAddress(name); + + if ( t == NULL ) { + t = dlsym(lib_gl_handle, name); + if ( t == NULL ) + printfDebug("Could not locate symbol %s\n", name); + } + + //if ( t != NULL ) + //printfDebug("Located symbol %s\n", name); + + return t; +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/native/linux/opengles/org_lwjgl_opengl_Display.c b/etc/lwjgl-2.9.1/src/native/linux/opengles/org_lwjgl_opengl_Display.c new file mode 100644 index 0000000..0132bb7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/opengles/org_lwjgl_opengl_Display.c @@ -0,0 +1,658 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id: org_lwjgl_opengl_Display.c 3555 2011-07-02 20:50:27Z kappa1 $ + * + * Linux specific display functions. + * + * @author elias_naur + * @version $Revision: 3555 $ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "common_tools.h" +#include "extgl.h" +#include "context.h" +#include "org_lwjgl_opengl_LinuxDisplay.h" +//#include "org_lwjgl_opengl_LinuxDisplayPeerInfo.h" +#include "org_lwjgl_LinuxSysImplementation.h" + +#define ERR_MSG_SIZE 1024 + +typedef struct { + unsigned long flags; + unsigned long functions; + unsigned long decorations; + long input_mode; + unsigned long status; +} MotifWmHints; + +#define MWM_HINTS_DECORATIONS (1L << 1) + +static Colormap cmap; +static int current_depth; + +static Visual *current_visual; + +static bool checkXError(JNIEnv *env, Display *disp) { + XSync(disp, False); + return (*env)->ExceptionCheck(env) == JNI_FALSE; +} + +static int global_error_handler(Display *disp, XErrorEvent *error) { + JNIEnv *env = getThreadEnv(); + if (env != NULL) { + jclass org_lwjgl_LinuxDisplay_class = (*env)->FindClass(env, "org/lwjgl/opengl/LinuxDisplay"); + if (org_lwjgl_LinuxDisplay_class == NULL) { + // Don't propagate error + (*env)->ExceptionClear(env); + return 0; + } + jmethodID handler_method = (*env)->GetStaticMethodID(env, org_lwjgl_LinuxDisplay_class, "globalErrorHandler", "(JJJJJJJ)I"); + if (handler_method == NULL) + return 0; + return (*env)->CallStaticIntMethod(env, org_lwjgl_LinuxDisplay_class, handler_method, (jlong)(intptr_t)disp, (jlong)(intptr_t)error, + (jlong)(intptr_t)error->display, (jlong)error->serial, (jlong)error->error_code, (jlong)error->request_code, (jlong)error->minor_code); + } else + return 0; +} + +static jlong openDisplay(JNIEnv *env) { + Display *display_connection = XOpenDisplay(NULL); + if (display_connection == NULL) { + throwException(env, "Could not open X display connection"); + return (intptr_t)NULL; + } + return (intptr_t)display_connection; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_DefaultSysImplementation_getJNIVersion + (JNIEnv *env, jobject ignored) { + return org_lwjgl_LinuxSysImplementation_JNI_VERSION; +} + +JNIEXPORT jstring JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getErrorText(JNIEnv *env, jclass unused, jlong display_ptr, jlong error_code) { + Display *disp = (Display *)(intptr_t)display_ptr; + char err_msg_buffer[ERR_MSG_SIZE]; + XGetErrorText(disp, error_code, err_msg_buffer, ERR_MSG_SIZE); + err_msg_buffer[ERR_MSG_SIZE - 1] = '\0'; + return NewStringNativeWithLength(env, err_msg_buffer, strlen(err_msg_buffer)); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_callErrorHandler(JNIEnv *env, jclass unused, jlong handler_ptr, jlong display_ptr, jlong event_ptr) { + XErrorHandler handler = (XErrorHandler)(intptr_t)handler_ptr; + Display *disp = (Display *)(intptr_t)display_ptr; + XErrorEvent *event = (XErrorEvent *)(intptr_t)event_ptr; + return (jint)handler(disp, event); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_setErrorHandler(JNIEnv *env, jclass unused) { + return (intptr_t)XSetErrorHandler(global_error_handler); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_resetErrorHandler(JNIEnv *env, jclass unused, jlong handler_ptr) { + XErrorHandler handler = (XErrorHandler)(intptr_t)handler_ptr; + return (intptr_t)XSetErrorHandler(handler); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSync(JNIEnv *env, jclass unused, jlong display_ptr, jboolean throw_away_events) { + Display *disp = (Display *)(intptr_t)display_ptr; + XSync(disp, throw_away_events ? True : False); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_sync(JNIEnv *env, jclass unused, jlong display_ptr, jboolean throw_away_events) { + Display *disp = (Display *)(intptr_t)display_ptr; + XSync(disp, throw_away_events ? True : False); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetDefaultScreen(JNIEnv *env, jclass unused, jlong display_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + return XDefaultScreen(disp); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nInternAtom(JNIEnv *env, jclass unused, jlong display_ptr, jstring atom_name_obj, jboolean only_if_exists) { + Display *disp = (Display *)(intptr_t)display_ptr; + char *atom_name = GetStringNativeChars(env, atom_name_obj); + if (atom_name == NULL) + return 0; + Atom atom = XInternAtom(disp, atom_name, only_if_exists ? True : False); + free(atom_name); + return atom; +} + +static void setDecorations(Display *disp, Window window, int dec) { + Atom motif_hints_atom = XInternAtom(disp, "_MOTIF_WM_HINTS", False); + MotifWmHints motif_hints; + motif_hints.flags = MWM_HINTS_DECORATIONS; + motif_hints.decorations = dec; + XChangeProperty(disp, window, motif_hints_atom, motif_hints_atom, 32, PropModeReplace, (unsigned char *)&motif_hints, sizeof(MotifWmHints)/sizeof(long)); +} + +static bool isLegacyFullscreen(jint window_mode) { + return window_mode == org_lwjgl_opengl_LinuxDisplay_FULLSCREEN_LEGACY; +} + +static void setWindowTitle(Display *disp, Window window, jlong title, jint len) { + // ASCII fallback if XChangeProperty fails. + XStoreName(disp, window, (const char *)(intptr_t)title); + + // Set the UTF-8 encoded title + XChangeProperty(disp, window, + XInternAtom(disp, "_NET_WM_NAME", False), + XInternAtom(disp, "UTF8_STRING", False), + 8, PropModeReplace, (const unsigned char *)(intptr_t)title, + len); +} + +static void setClassHint(Display *disp, Window window, jlong wm_name, jlong wm_class) { + XClassHint* hint = XAllocClassHint(); + + hint->res_name = (const unsigned char *)(intptr_t)wm_name; + hint->res_class = (const unsigned char *)(intptr_t)wm_class; + + XSetClassHint(disp, window, hint); + + XFree(hint); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_openDisplay(JNIEnv *env, jclass clazz) { + return openDisplay(env); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_closeDisplay(JNIEnv *env, jclass clazz, jlong display) { + Display *disp = (Display *)(intptr_t)display; + XCloseDisplay(disp); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplayPeerInfo_initDrawable(JNIEnv *env, jclass clazz, jlong window, jobject peer_info_handle) { + X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle); + peer_info->drawable = window; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplayPeerInfo_initDefaultPeerInfo(JNIEnv *env, jclass clazz, jlong display, jint screen, jobject peer_info_handle) { + //Display *disp = (Display *)(intptr_t)display; + //initPeerInfo(env, peer_info_handle, disp, screen); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetTitle(JNIEnv * env, jclass clazz, jlong display, jlong window_ptr, jlong title, jint len) { + Display *disp = (Display *)(intptr_t)display; + Window window = (Window)window_ptr; + setWindowTitle(disp, window, title, len); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetClassHint(JNIEnv * env, jclass clazz, jlong display, jlong window_ptr, jlong wm_name, jlong wm_class) { + Display *disp = (Display *)(intptr_t)display; + Window window = (Window)window_ptr; + setClassHint(disp, window, wm_name, wm_class); +} + +static void destroyWindow(JNIEnv *env, Display *disp, Window window) { + XDestroyWindow(disp, window); + XFreeColormap(disp, cmap); +} + +static bool isNetWMFullscreenSupported(JNIEnv *env, Display *disp, int screen) { + unsigned long nitems; + Atom actual_type; + int actual_format; + unsigned long bytes_after; + Atom *supported_list; + Atom netwm_supported_atom = XInternAtom(disp, "_NET_SUPPORTED", False); + int result = XGetWindowProperty(disp, RootWindow(disp, screen), netwm_supported_atom, 0, 10000, False, AnyPropertyType, &actual_type, &actual_format, &nitems, &bytes_after, (void *)&supported_list); + if (result != Success) { + throwException(env, "Unable to query _NET_SUPPORTED window property"); + return false; + } + Atom fullscreen_atom = XInternAtom(disp, "_NET_WM_STATE_FULLSCREEN", False); + bool supported = false; + unsigned long i; + for (i = 0; i < nitems; i++) { + if (fullscreen_atom == supported_list[i]) { + supported = true; + break; + } + } + XFree(supported_list); + return supported; +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nIsNetWMFullscreenSupported(JNIEnv *env, jclass unused, jlong display, jint screen) { + Display *disp = (Display *)(intptr_t)display; + return isNetWMFullscreenSupported(env, disp, screen) ? JNI_TRUE : JNI_FALSE; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nReshape(JNIEnv *env, jclass clazz, jlong display, jlong window_ptr, jint x, jint y, jint width, jint height) { + Display *disp = (Display *)(intptr_t)display; + Window window = (Window)window_ptr; + XMoveWindow(disp, window, x, y); + XResizeWindow(disp, window, width, height); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_synchronize(JNIEnv *env, jclass clazz, jlong display, jboolean synchronize) { + Display *disp = (Display *)(intptr_t)display; + XSynchronize(disp, synchronize ? True : False); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getRootWindow(JNIEnv *env, jclass clazz, jlong display, jint screen) { + Display *disp = (Display *)(intptr_t)display; + return RootWindow(disp, screen); +} + +static Window getCurrentWindow(JNIEnv *env, jlong display_ptr, jlong window_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + + Window parent = (Window)window_ptr; + Window win, root; + + Window *children; + unsigned int nchildren; + + do { + win = parent; + + if (XQueryTree(disp, win, &root, &parent, &children, &nchildren) == 0) { + throwException(env, "XQueryTree failed"); + return 0; + } + + if (children != NULL) XFree(children); + } while (parent != root); + + return win; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetX(JNIEnv *env, jclass unused, jlong display_ptr, jlong window_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + Window win = getCurrentWindow(env, display_ptr, window_ptr); + + XWindowAttributes win_attribs; + XGetWindowAttributes(disp, win, &win_attribs); + + return win_attribs.x; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetY(JNIEnv *env, jclass unused, jlong display_ptr, jlong window_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + Window win = getCurrentWindow(env, display_ptr, window_ptr); + + XWindowAttributes win_attribs; + XGetWindowAttributes(disp, win, &win_attribs); + + return win_attribs.y; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetWidth(JNIEnv *env, jclass unused, jlong display_ptr, jlong window_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + Window win = (Window)window_ptr; + XWindowAttributes win_attribs; + + XGetWindowAttributes(disp, win, &win_attribs); + + return win_attribs.width; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetHeight(JNIEnv *env, jclass unused, jlong display_ptr, jlong window_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + Window win = (Window)window_ptr; + XWindowAttributes win_attribs; + + XGetWindowAttributes(disp, win, &win_attribs); + + return win_attribs.height; +} + +static void updateWindowHints(JNIEnv *env, Display *disp, Window window) { + XWMHints* win_hints = XAllocWMHints(); + if (win_hints == NULL) { + throwException(env, "XAllocWMHints failed"); + return; + } + + win_hints->flags = InputHint; + win_hints->input = True; + + XSetWMHints(disp, window, win_hints); + XFree(win_hints); + XFlush(disp); +} + +static void updateWindowBounds(Display *disp, Window win, int x, int y, int width, int height, jboolean position, jboolean resizable) { + XSizeHints *window_hints = XAllocSizeHints(); + + if (position) { + window_hints->flags |= PPosition; + window_hints->x = x; + window_hints->y = y; + } + + if (!resizable) { + window_hints->flags |= PMinSize | PMaxSize; + window_hints->min_width = width; + window_hints->max_width = width; + window_hints->min_height = height; + window_hints->max_height = height; + } + + XSetWMNormalHints(disp, win, window_hints); + XFree(window_hints); +} + +static Window createWindow(JNIEnv* env, Display *disp, int screen, jint window_mode, X11PeerInfo *peer_info, int x, int y, int width, int height, jboolean undecorated, long parent_handle, jboolean resizable) { + Window parent = (Window)parent_handle; + Window win; + XSetWindowAttributes attribs; + unsigned int attribmask; + + XVisualInfo vis_info; + if ( !XMatchVisualInfo(disp, screen, DefaultDepth(disp, screen), TrueColor, &vis_info) ) { + throwException(env, "Failed to acquire X visual."); + return false; + } + + cmap = XCreateColormap(disp, parent, vis_info.visual, AllocNone); + if (!checkXError(env, disp)) { + return false; + } + attribs.colormap = cmap; + attribs.border_pixel = 0; + attribs.event_mask = ExposureMask | FocusChangeMask | VisibilityChangeMask | StructureNotifyMask | KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask; + attribmask = CWColormap | CWEventMask | CWBorderPixel | CWBackPixel; + if (isLegacyFullscreen(window_mode)) { + attribmask |= CWOverrideRedirect; + attribs.override_redirect = True; + } + win = XCreateWindow(disp, parent, x, y, width, height, 0, vis_info.depth, InputOutput, vis_info.visual, attribmask, &attribs); + + current_depth = vis_info.depth; + current_visual = vis_info.visual; + + if (!checkXError(env, disp)) { + XFreeColormap(disp, cmap); + return false; + } + if (undecorated) { + // Use Motif decoration hint property and hope the window manager respects them + setDecorations(disp, win, 0); + } + + if (RootWindow(disp, screen) == parent_handle) { // only set hints when Display.setParent isn't used + updateWindowBounds(disp, win, x, y, width, height, JNI_TRUE, resizable); + updateWindowHints(env, disp, win); + } + +#define NUM_ATOMS 1 + Atom protocol_atoms[NUM_ATOMS] = {XInternAtom(disp, "WM_DELETE_WINDOW", False)/*, XInternAtom(disp, "WM_TAKE_FOCUS", False)*/}; + XSetWMProtocols(disp, win, protocol_atoms, NUM_ATOMS); + if (window_mode == org_lwjgl_opengl_LinuxDisplay_FULLSCREEN_NETWM) { + Atom fullscreen_atom = XInternAtom(disp, "_NET_WM_STATE_FULLSCREEN", False); + XChangeProperty(disp, win, XInternAtom(disp, "_NET_WM_STATE", False), + XInternAtom(disp, "ATOM", False), 32, PropModeReplace, (const unsigned char*)&fullscreen_atom, 1); + } + if (!checkXError(env, disp)) { + destroyWindow(env, disp, win); + return 0; + } + return win; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_reparentWindow(JNIEnv *env, jclass unused, jlong display, jlong window_ptr, jlong parent_ptr, jint x, jint y) { + Display *disp = (Display *)(intptr_t)display; + Window window = (Window)window_ptr; + Window parent = (Window)parent_ptr; + XReparentWindow(disp, window, parent, x, y); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_mapRaised(JNIEnv *env, jclass unused, jlong display, jlong window_ptr) { + Display *disp = (Display *)(intptr_t)display; + Window window = (Window)window_ptr; + XMapRaised(disp, window); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getParentWindow(JNIEnv *env, jclass unused, jlong display, jlong window_ptr) { + Display *disp = (Display *)(intptr_t)display; + Window window = (Window)window_ptr; + Window root, parent; + Window *children; + unsigned int nchildren; + if (XQueryTree(disp, window, &root, &parent, &children, &nchildren) == 0) { + throwException(env, "XQueryTree failed"); + return None; + } + if (children != NULL) + XFree(children); + return parent; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getChildCount(JNIEnv *env, jclass unused, jlong display, jlong window_ptr) { + Display *disp = (Display *)(intptr_t)display; + Window window = (Window)window_ptr; + Window root, parent; + Window *children; + unsigned int nchildren; + if (XQueryTree(disp, window, &root, &parent, &children, &nchildren) == 0) { + throwException(env, "XQueryTree failed"); + return None; + } + if (children != NULL) + XFree(children); + + return nchildren; +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_LinuxDisplay_hasProperty(JNIEnv *env, jclass unusued, jlong display, jlong window_ptr, jlong property_ptr) { + Display *disp = (Display *)(intptr_t)display; + Window window = (Window)window_ptr; + Atom property = (Atom)property_ptr; + int num_props; + Atom *properties = XListProperties(disp, window, &num_props); + if (properties == NULL) + return JNI_FALSE; + jboolean result = JNI_FALSE; + for (int i = 0; i < num_props; i++) { + if (properties[i] == property) { + result = JNI_TRUE; + break; + } + } + XFree(properties); + return result; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetInputFocus(JNIEnv *env, jclass unused, jlong display_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + int revert_mode; + Window win; + XGetInputFocus(disp, &win, &revert_mode); + return win; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetInputFocus(JNIEnv *env, jclass clazz, jlong display, jlong window_ptr, jlong time) { + Display *disp = (Display *)(intptr_t)display; + Window window = (Window)window_ptr; + XSetInputFocus(disp, window, RevertToParent, time); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nCreateWindow(JNIEnv *env, jclass clazz, jlong display, jint screen, jobject peer_info_handle, jobject mode, jint window_mode, jint x, jint y, jboolean undecorated, jlong parent_handle, jboolean resizable) { + Display *disp = (Display *)(intptr_t)display; + X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, peer_info_handle); + + jclass cls_displayMode = (*env)->GetObjectClass(env, mode); + + jfieldID fid_width = (*env)->GetFieldID(env, cls_displayMode, "width", "I"); + jfieldID fid_height = (*env)->GetFieldID(env, cls_displayMode, "height", "I"); + + int width = (*env)->GetIntField(env, mode, fid_width); + int height = (*env)->GetIntField(env, mode, fid_height); + + Window win = createWindow(env, disp, screen, window_mode, peer_info, x, y, width, height, undecorated, parent_handle, resizable); + + if ((*env)->ExceptionOccurred(env)) + return 0; + + if (!checkXError(env, disp)) + destroyWindow(env, disp, win); + + return win; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetWindowSize(JNIEnv *env, jclass clazz, jlong display, jlong window_ptr, jint width, jint height, jboolean resizable) { + Display *disp = (Display *)(intptr_t)display; + Window win = (Window)window_ptr; + updateWindowBounds(disp, win, 0, 0, width, height, JNI_FALSE, resizable); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nDestroyWindow(JNIEnv *env, jclass clazz, jlong display, jlong window_ptr) { + Display *disp = (Display *)(intptr_t)display; + Window window = (Window)window_ptr; + destroyWindow(env, disp, window); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nLockAWT(JNIEnv *env, jclass clazz) { + JAWT jawt; + jawt.version = JAWT_VERSION_1_4; + if (JAWT_GetAWT(env, &jawt) != JNI_TRUE) { + throwException(env, "GetAWT failed"); + return; + } + jawt.Lock(env); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nUnlockAWT(JNIEnv *env, jclass clazz) { + JAWT jawt; + jawt.version = JAWT_VERSION_1_4; + if (JAWT_GetAWT(env, &jawt) != JNI_TRUE) { + throwException(env, "GetAWT failed"); + return; + } + jawt.Unlock(env); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetWindowIcon + (JNIEnv *env, jclass clazz, jlong display, jlong window_ptr, jobject icons_buffer, jint icons_buffer_size) +{ + Display *disp = (Display *)(intptr_t)display; + Window window = (Window)window_ptr; + const unsigned char *icons_char_buffer = (const unsigned char *)(*env)->GetDirectBufferAddress(env, icons_buffer); + + int length = icons_buffer_size/4; + unsigned long icons_long_buffer[length]; + int i = 0; + + // copy byte array to long array + for (i = 0; i < icons_buffer_size; i += 4) { + unsigned long argb = (icons_char_buffer[i] << 24) | + (icons_char_buffer[i+1] << 16) | + (icons_char_buffer[i+2] << 8) | + (icons_char_buffer[i+3]); + icons_long_buffer[i/4] = argb; + } + + XChangeProperty(disp, window, + XInternAtom(disp, "_NET_WM_ICON", False), + XInternAtom(disp, "CARDINAL", False), + 32, PropModeReplace, (const unsigned char*) icons_long_buffer, length); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nUngrabKeyboard(JNIEnv *env, jclass unused, jlong display_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + return XUngrabKeyboard(disp, CurrentTime); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGrabKeyboard(JNIEnv *env, jclass unused, jlong display_ptr, jlong window_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + Window win = (Window)window_ptr; + return XGrabKeyboard(disp, win, False, GrabModeAsync, GrabModeAsync, CurrentTime); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGrabPointer(JNIEnv *env, jclass unused, jlong display_ptr, jlong window_ptr, jlong cursor_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + Window win = (Window)window_ptr; + Cursor cursor = (Cursor)cursor_ptr; + int grab_mask = PointerMotionMask | ButtonPressMask | ButtonReleaseMask; + return XGrabPointer(disp, win, False, grab_mask, GrabModeAsync, GrabModeAsync, win, cursor, CurrentTime); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetViewPort(JNIEnv *env, jclass unused, jlong display_ptr, jlong window_ptr, jint screen) { + Display *disp = (Display *)(intptr_t)display_ptr; + Window win = (Window)window_ptr; + XWindowAttributes win_attribs; + + XGetWindowAttributes(disp, win, &win_attribs); + XF86VidModeSetViewPort(disp, screen, win_attribs.x, win_attribs.y); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nUngrabPointer(JNIEnv *env, jclass unused, jlong display_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + return XUngrabPointer(disp, CurrentTime); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nDefineCursor(JNIEnv *env, jclass unused, jlong display_ptr, jlong window_ptr, jlong cursor_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + Window win = (Window)window_ptr; + Cursor cursor = (Cursor)cursor_ptr; + XDefineCursor(disp, win, cursor); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nCreateBlankCursor(JNIEnv *env, jclass unused, jlong display_ptr, jlong window_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + Window win = (Window)window_ptr; + unsigned int best_width, best_height; + if (XQueryBestCursor(disp, win, 1, 1, &best_width, &best_height) == 0) { + throwException(env, "Could not query best cursor size"); + return false; + } + Pixmap mask = XCreatePixmap(disp, win, best_width, best_height, 1); + XGCValues gc_values; + gc_values.foreground = 0; + GC gc = XCreateGC(disp, mask, GCForeground, &gc_values); + XFillRectangle(disp, mask, gc, 0, 0, best_width, best_height); + XFreeGC(disp, gc); + XColor dummy_color; + Cursor cursor = XCreatePixmapCursor(disp, mask, mask, &dummy_color, &dummy_color, 0, 0); + XFreePixmap(disp, mask); + return cursor; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nIconifyWindow(JNIEnv *env, jclass unused, jlong display_ptr, jlong window_ptr, jint screen) { + Display *disp = (Display *)(intptr_t)display_ptr; + Window win = (Window)window_ptr; + XIconifyWindow(disp, win, screen); +} diff --git a/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_LinuxSysImplementation.h b/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_LinuxSysImplementation.h new file mode 100644 index 0000000..b268012 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_LinuxSysImplementation.h @@ -0,0 +1,15 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_LinuxSysImplementation */ + +#ifndef _Included_org_lwjgl_LinuxSysImplementation +#define _Included_org_lwjgl_LinuxSysImplementation +#ifdef __cplusplus +extern "C" { +#endif +#undef org_lwjgl_LinuxSysImplementation_JNI_VERSION +#define org_lwjgl_LinuxSysImplementation_JNI_VERSION 19L +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_input_Cursor.c b/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_input_Cursor.c new file mode 100644 index 0000000..8fedeff --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_input_Cursor.c @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Linux cursor handling. + * + * @author elias_naur + * @version $Revision$ + */ + +#include +#include +#include +#include "org_lwjgl_input_Cursor.h" +#include "org_lwjgl_opengl_LinuxDisplay.h" +#include "common_tools.h" + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetNativeCursorCapabilities + (JNIEnv *env, jclass clazz, jlong display) { + Display *disp = (Display *)(intptr_t)display; + int caps = 0; + XcursorBool argb_supported = XcursorSupportsARGB(disp); + XcursorBool anim_supported = XcursorSupportsAnim(disp); + if (argb_supported) + caps |= org_lwjgl_input_Cursor_CURSOR_8_BIT_ALPHA | org_lwjgl_input_Cursor_CURSOR_ONE_BIT_TRANSPARENCY; + if (anim_supported) + caps |= org_lwjgl_input_Cursor_CURSOR_ANIMATION; + return caps; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetMinCursorSize + (JNIEnv *env, jclass clazz, jlong display, jlong window_ptr) +{ + Display *disp = (Display *)(intptr_t)display; + Window window = (Window)window_ptr; + unsigned int width_return = 0; + unsigned int height_return = 0; + XQueryBestCursor(disp, window, 1, 1, &width_return, &height_return); + return width_return > height_return ? width_return : height_return; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetMaxCursorSize + (JNIEnv *env, jclass clazz, jlong display, jlong window_ptr) +{ + Display *disp = (Display *)(intptr_t)display; + Window window = (Window)window_ptr; + unsigned int width_return = 0; + unsigned int height_return = 0; + XQueryBestCursor(disp, window, 0xffffffff, 0xffffffff, &width_return, &height_return); + return width_return > height_return ? height_return : width_return; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nCreateCursor + (JNIEnv *env, jclass clazz, jlong display, jint width, jint height, jint x_hotspot, jint y_hotspot, jint num_images, jobject image_buffer, jint images_offset, jobject delay_buffer, jint delays_offset) +{ + Display *disp = (Display *)(intptr_t)display; + const int *delays = NULL; + if (delay_buffer != NULL) + delays = (const int *)(*env)->GetDirectBufferAddress(env, delay_buffer) + delays_offset; + XcursorPixel *pixels = (XcursorPixel *)(*env)->GetDirectBufferAddress(env, image_buffer) + images_offset; + int stride = width*height; + XcursorImages *cursor_images = XcursorImagesCreate(num_images); + if (cursor_images == NULL) { + throwException(env, "Could not allocate cursor."); + return None; + } + cursor_images->nimage = num_images; + int i; + for (i = 0; i < num_images; i++) { + XcursorImage *cursor_image = XcursorImageCreate(width, height); + cursor_image->xhot = x_hotspot; + cursor_image->yhot = y_hotspot; + cursor_image->pixels = &(pixels[stride*i]); + if (num_images > 1) + cursor_image->delay = delays[i]; + cursor_images->images[i] = cursor_image; + } + Cursor cursor = XcursorImagesLoadCursor(disp, cursor_images); + XcursorImagesDestroy(cursor_images); + return cursor; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nDestroyCursor + (JNIEnv *env, jclass clazz, jlong display, jlong cursor_ptr) +{ + Display *disp = (Display *)(intptr_t)display; + Cursor cursor = (Cursor)cursor_ptr; + XFreeCursor(disp, cursor); +} diff --git a/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_Display.c b/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_Display.c new file mode 100644 index 0000000..e69de29 diff --git a/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxDisplay.h b/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxDisplay.h new file mode 100644 index 0000000..d77d776 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxDisplay.h @@ -0,0 +1,495 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_LinuxDisplay */ + +#ifndef _Included_org_lwjgl_opengl_LinuxDisplay +#define _Included_org_lwjgl_opengl_LinuxDisplay +#ifdef __cplusplus +extern "C" { +#endif +#undef org_lwjgl_opengl_LinuxDisplay_CurrentTime +#define org_lwjgl_opengl_LinuxDisplay_CurrentTime 0L +#undef org_lwjgl_opengl_LinuxDisplay_GrabSuccess +#define org_lwjgl_opengl_LinuxDisplay_GrabSuccess 0L +#undef org_lwjgl_opengl_LinuxDisplay_AutoRepeatModeOff +#define org_lwjgl_opengl_LinuxDisplay_AutoRepeatModeOff 0L +#undef org_lwjgl_opengl_LinuxDisplay_AutoRepeatModeOn +#define org_lwjgl_opengl_LinuxDisplay_AutoRepeatModeOn 1L +#undef org_lwjgl_opengl_LinuxDisplay_AutoRepeatModeDefault +#define org_lwjgl_opengl_LinuxDisplay_AutoRepeatModeDefault 2L +#undef org_lwjgl_opengl_LinuxDisplay_None +#define org_lwjgl_opengl_LinuxDisplay_None 0L +#undef org_lwjgl_opengl_LinuxDisplay_KeyPressMask +#define org_lwjgl_opengl_LinuxDisplay_KeyPressMask 1L +#undef org_lwjgl_opengl_LinuxDisplay_KeyReleaseMask +#define org_lwjgl_opengl_LinuxDisplay_KeyReleaseMask 2L +#undef org_lwjgl_opengl_LinuxDisplay_ButtonPressMask +#define org_lwjgl_opengl_LinuxDisplay_ButtonPressMask 4L +#undef org_lwjgl_opengl_LinuxDisplay_ButtonReleaseMask +#define org_lwjgl_opengl_LinuxDisplay_ButtonReleaseMask 8L +#undef org_lwjgl_opengl_LinuxDisplay_NotifyAncestor +#define org_lwjgl_opengl_LinuxDisplay_NotifyAncestor 0L +#undef org_lwjgl_opengl_LinuxDisplay_NotifyNonlinear +#define org_lwjgl_opengl_LinuxDisplay_NotifyNonlinear 3L +#undef org_lwjgl_opengl_LinuxDisplay_NotifyPointer +#define org_lwjgl_opengl_LinuxDisplay_NotifyPointer 5L +#undef org_lwjgl_opengl_LinuxDisplay_NotifyPointerRoot +#define org_lwjgl_opengl_LinuxDisplay_NotifyPointerRoot 6L +#undef org_lwjgl_opengl_LinuxDisplay_NotifyDetailNone +#define org_lwjgl_opengl_LinuxDisplay_NotifyDetailNone 7L +#undef org_lwjgl_opengl_LinuxDisplay_SetModeInsert +#define org_lwjgl_opengl_LinuxDisplay_SetModeInsert 0L +#undef org_lwjgl_opengl_LinuxDisplay_SaveSetRoot +#define org_lwjgl_opengl_LinuxDisplay_SaveSetRoot 1L +#undef org_lwjgl_opengl_LinuxDisplay_SaveSetUnmap +#define org_lwjgl_opengl_LinuxDisplay_SaveSetUnmap 1L +#undef org_lwjgl_opengl_LinuxDisplay_X_SetInputFocus +#define org_lwjgl_opengl_LinuxDisplay_X_SetInputFocus 42L +#undef org_lwjgl_opengl_LinuxDisplay_FULLSCREEN_LEGACY +#define org_lwjgl_opengl_LinuxDisplay_FULLSCREEN_LEGACY 1L +#undef org_lwjgl_opengl_LinuxDisplay_FULLSCREEN_NETWM +#define org_lwjgl_opengl_LinuxDisplay_FULLSCREEN_NETWM 2L +#undef org_lwjgl_opengl_LinuxDisplay_WINDOWED +#define org_lwjgl_opengl_LinuxDisplay_WINDOWED 3L +#undef org_lwjgl_opengl_LinuxDisplay_XRANDR +#define org_lwjgl_opengl_LinuxDisplay_XRANDR 10L +#undef org_lwjgl_opengl_LinuxDisplay_XF86VIDMODE +#define org_lwjgl_opengl_LinuxDisplay_XF86VIDMODE 11L +#undef org_lwjgl_opengl_LinuxDisplay_NONE +#define org_lwjgl_opengl_LinuxDisplay_NONE 12L +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nGetCurrentGammaRamp + * Signature: (JI)Ljava/nio/ByteBuffer; + */ +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetCurrentGammaRamp + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nIsXrandrSupported + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nIsXrandrSupported + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nIsXF86VidModeSupported + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nIsXF86VidModeSupported + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nIsNetWMFullscreenSupported + * Signature: (JI)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nIsNetWMFullscreenSupported + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nLockAWT + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nLockAWT + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nUnlockAWT + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nUnlockAWT + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: callErrorHandler + * Signature: (JJJ)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_callErrorHandler + (JNIEnv *, jclass, jlong, jlong, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: setErrorHandler + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_setErrorHandler + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: resetErrorHandler + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_resetErrorHandler + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: synchronize + * Signature: (JZ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_synchronize + (JNIEnv *, jclass, jlong, jboolean); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: getErrorText + * Signature: (JJ)Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getErrorText + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: openDisplay + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_openDisplay + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: closeDisplay + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_closeDisplay + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nGetDefaultScreen + * Signature: (J)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetDefaultScreen + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nUngrabKeyboard + * Signature: (J)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nUngrabKeyboard + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nGrabKeyboard + * Signature: (JJ)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGrabKeyboard + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nGrabPointer + * Signature: (JJJ)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGrabPointer + (JNIEnv *, jclass, jlong, jlong, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nSetViewPort + * Signature: (JJI)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetViewPort + (JNIEnv *, jclass, jlong, jlong, jint); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nUngrabPointer + * Signature: (J)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nUngrabPointer + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nDefineCursor + * Signature: (JJJ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nDefineCursor + (JNIEnv *, jclass, jlong, jlong, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nCreateWindow + * Signature: (JILjava/nio/ByteBuffer;Lorg/lwjgl/opengl/DisplayMode;IIIZJZ)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nCreateWindow + (JNIEnv *, jclass, jlong, jint, jobject, jobject, jint, jint, jint, jboolean, jlong, jboolean); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: getRootWindow + * Signature: (JI)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getRootWindow + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: hasProperty + * Signature: (JJJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_LinuxDisplay_hasProperty + (JNIEnv *, jclass, jlong, jlong, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: getParentWindow + * Signature: (JJ)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getParentWindow + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: getChildCount + * Signature: (JJ)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_getChildCount + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: mapRaised + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_mapRaised + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: reparentWindow + * Signature: (JJJII)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_reparentWindow + (JNIEnv *, jclass, jlong, jlong, jlong, jint, jint); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nGetInputFocus + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetInputFocus + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nSetInputFocus + * Signature: (JJJ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetInputFocus + (JNIEnv *, jclass, jlong, jlong, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nSetWindowSize + * Signature: (JJIIZ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetWindowSize + (JNIEnv *, jclass, jlong, jlong, jint, jint, jboolean); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nGetX + * Signature: (JJ)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetX + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nGetY + * Signature: (JJ)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetY + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nGetWidth + * Signature: (JJ)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetWidth + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nGetHeight + * Signature: (JJ)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetHeight + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nDestroyWindow + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nDestroyWindow + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nSwitchDisplayMode + * Signature: (JIILorg/lwjgl/opengl/DisplayMode;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSwitchDisplayMode + (JNIEnv *, jclass, jlong, jint, jint, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nInternAtom + * Signature: (JLjava/lang/String;Z)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nInternAtom + (JNIEnv *, jclass, jlong, jstring, jboolean); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nGetGammaRampLength + * Signature: (JI)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetGammaRampLength + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nSetGammaRamp + * Signature: (JILjava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetGammaRamp + (JNIEnv *, jclass, jlong, jint, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nConvertToNativeRamp + * Signature: (Ljava/nio/FloatBuffer;II)Ljava/nio/ByteBuffer; + */ +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nConvertToNativeRamp + (JNIEnv *, jclass, jobject, jint, jint); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nGetCurrentXRandrMode + * Signature: (JI)Lorg/lwjgl/opengl/DisplayMode; + */ +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetCurrentXRandrMode + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nSetTitle + * Signature: (JJJI)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetTitle + (JNIEnv *, jclass, jlong, jlong, jlong, jint); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nReshape + * Signature: (JJIIII)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nReshape + (JNIEnv *, jclass, jlong, jlong, jint, jint, jint, jint); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nGetAvailableDisplayModes + * Signature: (JII)[Lorg/lwjgl/opengl/DisplayMode; + */ +JNIEXPORT jobjectArray JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetAvailableDisplayModes + (JNIEnv *, jclass, jlong, jint, jint); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nSync + * Signature: (JZ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSync + (JNIEnv *, jclass, jlong, jboolean); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nIconifyWindow + * Signature: (JJI)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nIconifyWindow + (JNIEnv *, jclass, jlong, jlong, jint); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nGetNativeCursorCapabilities + * Signature: (J)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetNativeCursorCapabilities + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nGetMinCursorSize + * Signature: (JJ)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetMinCursorSize + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nGetMaxCursorSize + * Signature: (JJ)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetMaxCursorSize + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nCreateCursor + * Signature: (JIIIIILjava/nio/IntBuffer;ILjava/nio/IntBuffer;I)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nCreateCursor + (JNIEnv *, jclass, jlong, jint, jint, jint, jint, jint, jobject, jint, jobject, jint); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nCreateBlankCursor + * Signature: (JJ)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nCreateBlankCursor + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nDestroyCursor + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nDestroyCursor + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nGetPbufferCapabilities + * Signature: (JI)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nGetPbufferCapabilities + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: org_lwjgl_opengl_LinuxDisplay + * Method: nSetWindowIcon + * Signature: (JJLjava/nio/ByteBuffer;ILjava/nio/ByteBuffer;III)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxDisplay_nSetWindowIcon + (JNIEnv *, jclass, jlong, jlong, jobject, jint, jobject, jint, jint, jint); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxDisplay_Compiz.h b/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxDisplay_Compiz.h new file mode 100644 index 0000000..e8601c6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxDisplay_Compiz.h @@ -0,0 +1,13 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_LinuxDisplay_Compiz */ + +#ifndef _Included_org_lwjgl_opengl_LinuxDisplay_Compiz +#define _Included_org_lwjgl_opengl_LinuxDisplay_Compiz +#ifdef __cplusplus +extern "C" { +#endif +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxDisplay_Compiz_Provider.h b/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxDisplay_Compiz_Provider.h new file mode 100644 index 0000000..4b26cc9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxDisplay_Compiz_Provider.h @@ -0,0 +1,13 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_LinuxDisplay_Compiz_Provider */ + +#ifndef _Included_org_lwjgl_opengl_LinuxDisplay_Compiz_Provider +#define _Included_org_lwjgl_opengl_LinuxDisplay_Compiz_Provider +#ifdef __cplusplus +extern "C" { +#endif +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxEvent.c b/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxEvent.c new file mode 100644 index 0000000..1498450 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxEvent.c @@ -0,0 +1,185 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id: org_lwjgl_opengl_LinuxEvent.c 2598 2006-10-24 08:33:09Z elias_naur $ + * + * @author elias_naur + * @version $Revision: 2598 $ + */ + +#include +#include +#include +#include +#include "common_tools.h" +#include "org_lwjgl_opengl_LinuxEvent.h" + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_LinuxEvent_createEventBuffer(JNIEnv *env, jclass unused) { + return newJavaManagedByteBuffer(env, sizeof(XEvent)); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_getPending(JNIEnv *env, jclass unused, jlong display_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + return XPending(disp); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxEvent_nSetWindow(JNIEnv *env, jclass unused, jobject event_buffer, jlong window_ptr) { + XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer); + Window window = (Window)window_ptr; + event->xany.window = window; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxEvent_nSendEvent(JNIEnv *env, jclass unused, jobject event_buffer, jlong display_ptr, jlong window_ptr, jboolean propagate, jlong eventmask) { + XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer); + Display *disp = (Display *)(intptr_t)display_ptr; + Window window = (Window)window_ptr; + XSendEvent(disp, window, propagate == JNI_TRUE ? True : False, eventmask, event); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetFocusDetail(JNIEnv *env, jclass unused, jobject event_buffer) { + XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer); + return event->xfocus.detail; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetFocusMode(JNIEnv *env, jclass unused, jobject event_buffer) { + XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer); + return event->xfocus.mode; +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_LinuxEvent_nFilterEvent(JNIEnv *env, jclass unused, jobject event_buffer, jlong window_ptr) { + XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer); + Window window = (Window)window_ptr; + return XFilterEvent(event, window) == True ? JNI_TRUE : JNI_FALSE; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxEvent_nNextEvent(JNIEnv *env, jclass unused, jlong display_ptr, jobject event_buffer) { + XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer); + Display *disp = (Display *)(intptr_t)display_ptr; + XNextEvent(disp, event); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetType(JNIEnv *env, jclass unused, jobject event_buffer) { + XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer); + return event->type; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetWindow(JNIEnv *env, jclass unused, jobject event_buffer) { + XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer); + return event->xany.window; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetClientMessageType(JNIEnv *env, jclass unused, jobject event_buffer) { + XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer); + return event->xclient.message_type; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetClientData(JNIEnv *env, jclass unused, jobject event_buffer, jint index) { + XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer); + return event->xclient.data.l[index]; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetClientFormat(JNIEnv *env, jclass unused, jobject event_buffer) { + XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer); + return event->xclient.format; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetButtonTime(JNIEnv *env, jclass unused, jobject event_buffer) { + XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer); + return event->xbutton.time; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetButtonState(JNIEnv *env, jclass unused, jobject event_buffer) { + XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer); + return event->xbutton.state; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetButtonType(JNIEnv *env, jclass unused, jobject event_buffer) { + XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer); + return event->xbutton.type; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetButtonButton(JNIEnv *env, jclass unused, jobject event_buffer) { + XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer); + return event->xbutton.button; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetButtonRoot(JNIEnv *env, jclass unused, jobject event_buffer) { + XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer); + return event->xbutton.root; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetButtonXRoot(JNIEnv *env, jclass unused, jobject event_buffer) { + XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer); + return event->xbutton.x_root; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetButtonYRoot(JNIEnv *env, jclass unused, jobject event_buffer) { + XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer); + return event->xbutton.y_root; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetButtonX(JNIEnv *env, jclass unused, jobject event_buffer) { + XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer); + return event->xbutton.x; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetButtonY(JNIEnv *env, jclass unused, jobject event_buffer) { + XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer); + return event->xbutton.y; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetKeyAddress(JNIEnv *env, jclass unused, jobject event_buffer) { + XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer); + XKeyEvent *key_event = &(event->xkey); + return (jlong)(intptr_t)key_event; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetKeyTime(JNIEnv *env, jclass unused, jobject event_buffer) { + XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer); + return event->xkey.time; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetKeyType(JNIEnv *env, jclass unused, jobject event_buffer) { + XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer); + return event->xkey.type; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetKeyKeyCode(JNIEnv *env, jclass unused, jobject event_buffer) { + XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer); + return event->xkey.keycode; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetKeyState(JNIEnv *env, jclass unused, jobject event_buffer) { + XEvent *event = (XEvent *)(*env)->GetDirectBufferAddress(env, event_buffer); + return event->xkey.state; +} diff --git a/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxEvent.h b/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxEvent.h new file mode 100644 index 0000000..a967cc5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxEvent.h @@ -0,0 +1,257 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_LinuxEvent */ + +#ifndef _Included_org_lwjgl_opengl_LinuxEvent +#define _Included_org_lwjgl_opengl_LinuxEvent +#ifdef __cplusplus +extern "C" { +#endif +#undef org_lwjgl_opengl_LinuxEvent_FocusIn +#define org_lwjgl_opengl_LinuxEvent_FocusIn 9L +#undef org_lwjgl_opengl_LinuxEvent_FocusOut +#define org_lwjgl_opengl_LinuxEvent_FocusOut 10L +#undef org_lwjgl_opengl_LinuxEvent_KeyPress +#define org_lwjgl_opengl_LinuxEvent_KeyPress 2L +#undef org_lwjgl_opengl_LinuxEvent_KeyRelease +#define org_lwjgl_opengl_LinuxEvent_KeyRelease 3L +#undef org_lwjgl_opengl_LinuxEvent_ButtonPress +#define org_lwjgl_opengl_LinuxEvent_ButtonPress 4L +#undef org_lwjgl_opengl_LinuxEvent_ButtonRelease +#define org_lwjgl_opengl_LinuxEvent_ButtonRelease 5L +#undef org_lwjgl_opengl_LinuxEvent_MotionNotify +#define org_lwjgl_opengl_LinuxEvent_MotionNotify 6L +#undef org_lwjgl_opengl_LinuxEvent_EnterNotify +#define org_lwjgl_opengl_LinuxEvent_EnterNotify 7L +#undef org_lwjgl_opengl_LinuxEvent_LeaveNotify +#define org_lwjgl_opengl_LinuxEvent_LeaveNotify 8L +#undef org_lwjgl_opengl_LinuxEvent_UnmapNotify +#define org_lwjgl_opengl_LinuxEvent_UnmapNotify 18L +#undef org_lwjgl_opengl_LinuxEvent_MapNotify +#define org_lwjgl_opengl_LinuxEvent_MapNotify 19L +#undef org_lwjgl_opengl_LinuxEvent_Expose +#define org_lwjgl_opengl_LinuxEvent_Expose 12L +#undef org_lwjgl_opengl_LinuxEvent_ConfigureNotify +#define org_lwjgl_opengl_LinuxEvent_ConfigureNotify 22L +#undef org_lwjgl_opengl_LinuxEvent_ClientMessage +#define org_lwjgl_opengl_LinuxEvent_ClientMessage 33L +/* + * Class: org_lwjgl_opengl_LinuxEvent + * Method: createEventBuffer + * Signature: ()Ljava/nio/ByteBuffer; + */ +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_LinuxEvent_createEventBuffer + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengl_LinuxEvent + * Method: getPending + * Signature: (J)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_getPending + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxEvent + * Method: nSendEvent + * Signature: (Ljava/nio/ByteBuffer;JJZJ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxEvent_nSendEvent + (JNIEnv *, jclass, jobject, jlong, jlong, jboolean, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxEvent + * Method: nFilterEvent + * Signature: (Ljava/nio/ByteBuffer;J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_LinuxEvent_nFilterEvent + (JNIEnv *, jclass, jobject, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxEvent + * Method: nNextEvent + * Signature: (JLjava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxEvent_nNextEvent + (JNIEnv *, jclass, jlong, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxEvent + * Method: nGetType + * Signature: (Ljava/nio/ByteBuffer;)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetType + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxEvent + * Method: nGetWindow + * Signature: (Ljava/nio/ByteBuffer;)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetWindow + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxEvent + * Method: nSetWindow + * Signature: (Ljava/nio/ByteBuffer;J)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxEvent_nSetWindow + (JNIEnv *, jclass, jobject, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxEvent + * Method: nGetFocusMode + * Signature: (Ljava/nio/ByteBuffer;)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetFocusMode + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxEvent + * Method: nGetFocusDetail + * Signature: (Ljava/nio/ByteBuffer;)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetFocusDetail + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxEvent + * Method: nGetClientMessageType + * Signature: (Ljava/nio/ByteBuffer;)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetClientMessageType + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxEvent + * Method: nGetClientData + * Signature: (Ljava/nio/ByteBuffer;I)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetClientData + (JNIEnv *, jclass, jobject, jint); + +/* + * Class: org_lwjgl_opengl_LinuxEvent + * Method: nGetClientFormat + * Signature: (Ljava/nio/ByteBuffer;)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetClientFormat + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxEvent + * Method: nGetButtonTime + * Signature: (Ljava/nio/ByteBuffer;)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetButtonTime + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxEvent + * Method: nGetButtonState + * Signature: (Ljava/nio/ByteBuffer;)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetButtonState + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxEvent + * Method: nGetButtonType + * Signature: (Ljava/nio/ByteBuffer;)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetButtonType + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxEvent + * Method: nGetButtonButton + * Signature: (Ljava/nio/ByteBuffer;)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetButtonButton + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxEvent + * Method: nGetButtonRoot + * Signature: (Ljava/nio/ByteBuffer;)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetButtonRoot + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxEvent + * Method: nGetButtonXRoot + * Signature: (Ljava/nio/ByteBuffer;)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetButtonXRoot + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxEvent + * Method: nGetButtonYRoot + * Signature: (Ljava/nio/ByteBuffer;)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetButtonYRoot + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxEvent + * Method: nGetButtonX + * Signature: (Ljava/nio/ByteBuffer;)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetButtonX + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxEvent + * Method: nGetButtonY + * Signature: (Ljava/nio/ByteBuffer;)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetButtonY + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxEvent + * Method: nGetKeyAddress + * Signature: (Ljava/nio/ByteBuffer;)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetKeyAddress + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxEvent + * Method: nGetKeyTime + * Signature: (Ljava/nio/ByteBuffer;)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetKeyTime + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxEvent + * Method: nGetKeyType + * Signature: (Ljava/nio/ByteBuffer;)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetKeyType + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxEvent + * Method: nGetKeyKeyCode + * Signature: (Ljava/nio/ByteBuffer;)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetKeyKeyCode + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxEvent + * Method: nGetKeyState + * Signature: (Ljava/nio/ByteBuffer;)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxEvent_nGetKeyState + (JNIEnv *, jclass, jobject); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxKeyboard.c b/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxKeyboard.c new file mode 100644 index 0000000..268127c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxKeyboard.c @@ -0,0 +1,153 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id: org_lwjgl_input_Keyboard.c 2399 2006-06-30 19:28:00Z elias_naur $ + * + * Linux keyboard handling. + * + * @author elias_naur + * @version $Revision: 2399 $ + */ + +#include +#include +#include +#include +#include +#include "common_tools.h" +#include "org_lwjgl_opengl_LinuxKeyboard.h" + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_getModifierMapping(JNIEnv *env, jclass unused, jlong display_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + XModifierKeymap *modifier_map = XGetModifierMapping(disp); + return (intptr_t)modifier_map; +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_nSetDetectableKeyRepeat(JNIEnv *env, jclass unused, jlong display_ptr, jboolean set_enabled) { + Display *disp = (Display *)(intptr_t)display_ptr; + Bool enabled = set_enabled == JNI_TRUE ? True : False; + Bool result = XkbSetDetectableAutoRepeat(disp, enabled, NULL); + return result == enabled ? JNI_TRUE : JNI_FALSE; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_freeModifierMapping(JNIEnv *env, jclass unused, jlong mapping_ptr) { + XModifierKeymap *modifier_map = (XModifierKeymap *)(intptr_t)mapping_ptr; + XFreeModifiermap(modifier_map); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_getMaxKeyPerMod(JNIEnv *env, jclass unsused, jlong mapping_ptr) { + XModifierKeymap *modifier_map = (XModifierKeymap *)(intptr_t)mapping_ptr; + return modifier_map->max_keypermod; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_lookupModifierMap(JNIEnv *env, jclass unused, jlong mapping_ptr, jint index) { + XModifierKeymap *modifier_map = (XModifierKeymap *)(intptr_t)mapping_ptr; + KeyCode key_code = modifier_map->modifiermap[index]; + return key_code; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_keycodeToKeySym(JNIEnv *env, jclass unused, jlong display_ptr, jint key_code) { + Display *disp = (Display *)(intptr_t)display_ptr; + KeySym key_sym = XKeycodeToKeysym(disp, key_code, 0); + return key_sym; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_openIM(JNIEnv *env, jclass unused, jlong display_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + XSetLocaleModifiers ("@im=none"); + XIM xim = XOpenIM(disp, NULL, NULL, NULL); + return (intptr_t)xim; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_createIC(JNIEnv *env, jclass unused, jlong xim_ptr, jlong window_ptr) { + Window win = (Window)window_ptr; + XIM xim = (XIM)(intptr_t)xim_ptr; + XIC xic = XCreateIC(xim, XNClientWindow, win, XNFocusWindow, win, XNInputStyle, XIMPreeditNothing | XIMStatusNothing, NULL); + return (intptr_t)xic; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_setupIMEventMask(JNIEnv *env, jclass unused, jlong display_ptr, jlong window_ptr, jlong xic_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + Window win = (Window)window_ptr; + XIC xic = (XIC)(intptr_t)xic_ptr; + long im_event_mask; + XWindowAttributes win_attributes; + + XGetWindowAttributes(disp, win, &win_attributes); + XGetICValues(xic, XNFilterEvents, &im_event_mask, NULL); + XSelectInput(disp, win, win_attributes.your_event_mask | im_event_mask); + XSetICFocus(xic); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_destroyIC(JNIEnv *env, jclass unused, jlong xic_ptr) { + XIC xic = (XIC)(intptr_t)xic_ptr; + XDestroyIC(xic); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_closeIM(JNIEnv *env, jclass unused, jlong xim_ptr) { + XIM xim = (XIM)(intptr_t)xim_ptr; + XCloseIM(xim); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_lookupKeysym(JNIEnv *env, jclass unused, jlong event_ptr, jint index) { + XKeyEvent *event = (XKeyEvent *)(intptr_t)event_ptr; + return XLookupKeysym(event, index); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_toUpper(JNIEnv *env, jclass unused, jlong keysym) { + KeySym lower_case, upper_case; + XConvertCase(keysym, &lower_case, &upper_case); + return upper_case; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_lookupString(JNIEnv *env, jclass unused, jlong event_ptr, jobject buffer_obj, jobject compose_status_obj) { + XKeyEvent *event = (XKeyEvent *)(intptr_t)event_ptr; + char *buffer = (char *)(*env)->GetDirectBufferAddress(env, buffer_obj); + int capacity = (*env)->GetDirectBufferCapacity(env, buffer_obj); + XComposeStatus *status = (XComposeStatus *)(*env)->GetDirectBufferAddress(env, compose_status_obj); + return XLookupString(event, buffer, capacity, NULL, status); +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_allocateComposeStatus(JNIEnv *env, jclass unused) { + return newJavaManagedByteBuffer(env, sizeof(XComposeStatus)); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_utf8LookupString(JNIEnv *env, jclass unused, jlong xic_ptr, jlong event_ptr, jobject buffer_obj, jint buffer_position, jint buffer_size) { + XIC xic = (XIC)(intptr_t)xic_ptr; + XKeyEvent *event = (XKeyEvent *)(intptr_t)event_ptr; + char *buffer = buffer_position + (char *)(*env)->GetDirectBufferAddress(env, buffer_obj); + Status status; + size_t num_bytes = Xutf8LookupString(xic, event, buffer, buffer_size, NULL, &status); + positionBuffer(env, buffer_obj, num_bytes); + return status; +} diff --git a/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxKeyboard.h b/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxKeyboard.h new file mode 100644 index 0000000..0c638c3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxKeyboard.h @@ -0,0 +1,155 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_LinuxKeyboard */ + +#ifndef _Included_org_lwjgl_opengl_LinuxKeyboard +#define _Included_org_lwjgl_opengl_LinuxKeyboard +#ifdef __cplusplus +extern "C" { +#endif +#undef org_lwjgl_opengl_LinuxKeyboard_LockMapIndex +#define org_lwjgl_opengl_LinuxKeyboard_LockMapIndex 1L +#undef org_lwjgl_opengl_LinuxKeyboard_NoSymbol +#define org_lwjgl_opengl_LinuxKeyboard_NoSymbol 0i64 +#undef org_lwjgl_opengl_LinuxKeyboard_ShiftMask +#define org_lwjgl_opengl_LinuxKeyboard_ShiftMask 1i64 +#undef org_lwjgl_opengl_LinuxKeyboard_LockMask +#define org_lwjgl_opengl_LinuxKeyboard_LockMask 2i64 +#undef org_lwjgl_opengl_LinuxKeyboard_XLookupChars +#define org_lwjgl_opengl_LinuxKeyboard_XLookupChars 2L +#undef org_lwjgl_opengl_LinuxKeyboard_XLookupBoth +#define org_lwjgl_opengl_LinuxKeyboard_XLookupBoth 4L +#undef org_lwjgl_opengl_LinuxKeyboard_KEYBOARD_BUFFER_SIZE +#define org_lwjgl_opengl_LinuxKeyboard_KEYBOARD_BUFFER_SIZE 50L +/* + * Class: org_lwjgl_opengl_LinuxKeyboard + * Method: getModifierMapping + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_getModifierMapping + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxKeyboard + * Method: freeModifierMapping + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_freeModifierMapping + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxKeyboard + * Method: getMaxKeyPerMod + * Signature: (J)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_getMaxKeyPerMod + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxKeyboard + * Method: lookupModifierMap + * Signature: (JI)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_lookupModifierMap + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: org_lwjgl_opengl_LinuxKeyboard + * Method: keycodeToKeySym + * Signature: (JI)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_keycodeToKeySym + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: org_lwjgl_opengl_LinuxKeyboard + * Method: openIM + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_openIM + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxKeyboard + * Method: createIC + * Signature: (JJ)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_createIC + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxKeyboard + * Method: setupIMEventMask + * Signature: (JJJ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_setupIMEventMask + (JNIEnv *, jclass, jlong, jlong, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxKeyboard + * Method: allocateComposeStatus + * Signature: ()Ljava/nio/ByteBuffer; + */ +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_allocateComposeStatus + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengl_LinuxKeyboard + * Method: nSetDetectableKeyRepeat + * Signature: (JZ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_nSetDetectableKeyRepeat + (JNIEnv *, jclass, jlong, jboolean); + +/* + * Class: org_lwjgl_opengl_LinuxKeyboard + * Method: destroyIC + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_destroyIC + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxKeyboard + * Method: closeIM + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_closeIM + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxKeyboard + * Method: lookupString + * Signature: (JLjava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_lookupString + (JNIEnv *, jclass, jlong, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxKeyboard + * Method: utf8LookupString + * Signature: (JJLjava/nio/ByteBuffer;II)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_utf8LookupString + (JNIEnv *, jclass, jlong, jlong, jobject, jint, jint); + +/* + * Class: org_lwjgl_opengl_LinuxKeyboard + * Method: lookupKeysym + * Signature: (JI)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_lookupKeysym + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: org_lwjgl_opengl_LinuxKeyboard + * Method: toUpper + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxKeyboard_toUpper + (JNIEnv *, jclass, jlong); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxMouse.c b/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxMouse.c new file mode 100644 index 0000000..a801e7d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxMouse.c @@ -0,0 +1,118 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id: org_lwjgl_input_Keyboard.c 2399 2006-06-30 19:28:00Z elias_naur $ + * + * Linux mouse handling. + * + * @author elias_naur + * @version $Revision: 2399 $ + */ + +#include +#include +#include +#include "common_tools.h" +#include "org_lwjgl_opengl_LinuxMouse.h" + +static void getWindowAttributes(jlong display_ptr, jlong window_ptr, XWindowAttributes *attr) { + Display *disp = (Display *)(intptr_t)display_ptr; + Window win = (Window)window_ptr; + XGetWindowAttributes(disp, win, attr); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxMouse_nGetWindowHeight(JNIEnv *env, jclass unused, jlong display_ptr, jlong window_ptr) { + XWindowAttributes window_attributes; + getWindowAttributes(display_ptr, window_ptr, &window_attributes); + return window_attributes.height; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxMouse_nGetWindowWidth(JNIEnv *env, jclass unused, jlong display_ptr, jlong window_ptr) { + XWindowAttributes window_attributes; + getWindowAttributes(display_ptr, window_ptr, &window_attributes); + return window_attributes.width; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxMouse_nWarpCursor(JNIEnv *env, jclass unused, jlong display_ptr, jlong window_ptr, jint x, jint y) { + Display *disp = (Display *)(intptr_t)display_ptr; + Window win = (Window)window_ptr; + XWarpPointer(disp, None, win, 0, 0, 0, 0, x, y); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxMouse_nQueryPointer(JNIEnv *env, jclass unused, jlong display_ptr, jlong window_ptr, jobject result_buffer) { + Display *disp = (Display *)(intptr_t)display_ptr; + Window win = (Window)window_ptr; + Window root_return, child_return; + int root_x, root_y, win_x, win_y; + unsigned int mask_return; + jint *result = (jint *)(*env)->GetDirectBufferAddress(env, result_buffer); + int result_size = (*env)->GetDirectBufferCapacity(env, result_buffer); + if (result_size < 4) { + throwFormattedException(env, "Not enough space in result buffer (%d)", result_size); + return (intptr_t)NULL; + } + + XQueryPointer(disp, win, &root_return, &child_return, &root_x, &root_y, &win_x, &win_y, &mask_return); + result[0] = root_x; + result[1] = root_y; + result[2] = win_x; + result[3] = win_y; + return root_return; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxMouse_nSendWarpEvent(JNIEnv *env, jclass unusued, jlong display_ptr, jlong window_ptr, jlong warp_atom_ptr, jint x, jint y) { + Atom warp_atom = (Atom)warp_atom_ptr; + Display *disp = (Display *)(intptr_t)display_ptr; + Window win = (Window)window_ptr; + XEvent warp_event; + warp_event.type = ClientMessage; + warp_event.xclient.window = win; + warp_event.xclient.message_type = warp_atom; + warp_event.xclient.format = 32; + warp_event.xclient.data.l[0] = x; + warp_event.xclient.data.l[1] = y; + XSendEvent(disp, win, False, 0, &warp_event); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxMouse_nGetButtonCount(JNIEnv *env, jclass unused, jlong display_ptr) { + Display *disp = (Display *)(intptr_t)display_ptr; + + int count = 256; + + unsigned char * pointer_map = malloc(sizeof(unsigned char) * count); + count = XGetPointerMapping(disp, pointer_map, count); + + free(pointer_map); + + return count; +} diff --git a/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxMouse.h b/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxMouse.h new file mode 100644 index 0000000..680043b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxMouse.h @@ -0,0 +1,87 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_LinuxMouse */ + +#ifndef _Included_org_lwjgl_opengl_LinuxMouse +#define _Included_org_lwjgl_opengl_LinuxMouse +#ifdef __cplusplus +extern "C" { +#endif +#undef org_lwjgl_opengl_LinuxMouse_POINTER_WARP_BORDER +#define org_lwjgl_opengl_LinuxMouse_POINTER_WARP_BORDER 10L +#undef org_lwjgl_opengl_LinuxMouse_WHEEL_SCALE +#define org_lwjgl_opengl_LinuxMouse_WHEEL_SCALE 120L +#undef org_lwjgl_opengl_LinuxMouse_Button1 +#define org_lwjgl_opengl_LinuxMouse_Button1 1L +#undef org_lwjgl_opengl_LinuxMouse_Button2 +#define org_lwjgl_opengl_LinuxMouse_Button2 2L +#undef org_lwjgl_opengl_LinuxMouse_Button3 +#define org_lwjgl_opengl_LinuxMouse_Button3 3L +#undef org_lwjgl_opengl_LinuxMouse_Button4 +#define org_lwjgl_opengl_LinuxMouse_Button4 4L +#undef org_lwjgl_opengl_LinuxMouse_Button5 +#define org_lwjgl_opengl_LinuxMouse_Button5 5L +#undef org_lwjgl_opengl_LinuxMouse_Button6 +#define org_lwjgl_opengl_LinuxMouse_Button6 6L +#undef org_lwjgl_opengl_LinuxMouse_Button7 +#define org_lwjgl_opengl_LinuxMouse_Button7 7L +#undef org_lwjgl_opengl_LinuxMouse_Button8 +#define org_lwjgl_opengl_LinuxMouse_Button8 8L +#undef org_lwjgl_opengl_LinuxMouse_Button9 +#define org_lwjgl_opengl_LinuxMouse_Button9 9L +#undef org_lwjgl_opengl_LinuxMouse_ButtonPress +#define org_lwjgl_opengl_LinuxMouse_ButtonPress 4L +#undef org_lwjgl_opengl_LinuxMouse_ButtonRelease +#define org_lwjgl_opengl_LinuxMouse_ButtonRelease 5L +/* + * Class: org_lwjgl_opengl_LinuxMouse + * Method: nSendWarpEvent + * Signature: (JJJII)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxMouse_nSendWarpEvent + (JNIEnv *, jclass, jlong, jlong, jlong, jint, jint); + +/* + * Class: org_lwjgl_opengl_LinuxMouse + * Method: nGetWindowHeight + * Signature: (JJ)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxMouse_nGetWindowHeight + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxMouse + * Method: nGetWindowWidth + * Signature: (JJ)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxMouse_nGetWindowWidth + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxMouse + * Method: nGetButtonCount + * Signature: (J)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_LinuxMouse_nGetButtonCount + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengl_LinuxMouse + * Method: nQueryPointer + * Signature: (JJLjava/nio/IntBuffer;)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxMouse_nQueryPointer + (JNIEnv *, jclass, jlong, jlong, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxMouse + * Method: nWarpCursor + * Signature: (JJII)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_LinuxMouse_nWarpCursor + (JNIEnv *, jclass, jlong, jlong, jint, jint); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxPeerInfo.c b/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxPeerInfo.c new file mode 100644 index 0000000..7d07f28 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxPeerInfo.c @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * @author elias_naur + * @version $Revision$ + */ + +#include +#include "org_lwjgl_opengl_LinuxPeerInfo.h" +#include "context.h" +#include "common_tools.h" + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_LinuxPeerInfo_createHandle + (JNIEnv *env, jclass clazz) { + return newJavaManagedByteBuffer(env, sizeof(X11PeerInfo)); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxPeerInfo_nGetDisplay(JNIEnv *env, jclass unused, jobject handle) { + X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, handle); + return (jlong)(intptr_t)peer_info->display; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxPeerInfo_nGetDrawable(JNIEnv *env, jclass unused, jobject handle) { + X11PeerInfo *peer_info = (*env)->GetDirectBufferAddress(env, handle); + return peer_info->drawable; +} diff --git a/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxPeerInfo.h b/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxPeerInfo.h new file mode 100644 index 0000000..579493d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/linux/org_lwjgl_opengl_LinuxPeerInfo.h @@ -0,0 +1,37 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_LinuxPeerInfo */ + +#ifndef _Included_org_lwjgl_opengl_LinuxPeerInfo +#define _Included_org_lwjgl_opengl_LinuxPeerInfo +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_lwjgl_opengl_LinuxPeerInfo + * Method: createHandle + * Signature: ()Ljava/nio/ByteBuffer; + */ +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_LinuxPeerInfo_createHandle + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengl_LinuxPeerInfo + * Method: nGetDisplay + * Signature: (Ljava/nio/ByteBuffer;)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxPeerInfo_nGetDisplay + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_LinuxPeerInfo + * Method: nGetDrawable + * Signature: (Ljava/nio/ByteBuffer;)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_LinuxPeerInfo_nGetDrawable + (JNIEnv *, jclass, jobject); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/macosx/context.h b/etc/lwjgl-2.9.1/src/native/macosx/context.h new file mode 100644 index 0000000..73960f9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/macosx/context.h @@ -0,0 +1,160 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Base Win32 display + * + * @author cix_foo + * @author mojang + * @author kappaOne + * @version $Revision$ + */ + +#ifndef __LWJGL_CONTEXT_H +#define __LWJGL_CONTEXT_H + +#include +#include +#include +#include "common_tools.h" +#include + +enum { + NSControlLeftKeyMask = 0x0001, + NSControlRightKeyMask = 0x2000, + NSShiftLeftKeyMask = 0x0002, + NSShiftRightKeyMask = 0x0004, + NSCommandLeftKeyMask = 0x0008, + NSCommandRightKeyMask = 0x0010, + NSAlternateLeftKeyMask = 0x0020, + NSAlternateRightKeyMask = 0x0040 +}; + +@class NSOpenGLContext, NSOpenGLPixelFormat, MacOSXOpenGLView, MacOSXKeyableWindow; + +typedef struct { + MacOSXKeyableWindow *window; + + NSRect display_rect; + + MacOSXOpenGLView *view; + NSOpenGLContext *context; + + // Native objects for Java callbacks + jobject jdisplay; + jobject jmouse; + jobject jkeyboard; + + jboolean fullscreen; + jboolean undecorated; + jboolean resizable; + jboolean parented; + + jboolean enableFullscreenModeAPI; + jboolean enableHighDPI; + + jboolean resized; + +} MacOSXWindowInfo; + +@interface MacOSXOpenGLView : NSView +{ + @public + MacOSXWindowInfo* _parent; + + @private + NSOpenGLContext* _openGLContext; + NSOpenGLPixelFormat* _pixelFormat; + NSTrackingArea * _trackingArea; +} + ++ (NSOpenGLPixelFormat*)defaultPixelFormat; +- (BOOL)windowShouldClose:(id)sender; +- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender; +- (id)initWithFrame:(NSRect)frameRect pixelFormat:(NSOpenGLPixelFormat*)format; +- (void)setOpenGLContext:(NSOpenGLContext*)context; +- (NSOpenGLContext*)openGLContext; +- (void)clearGLContext; +- (void)prepareOpenGL; +- (void)update; +- (void)lockFocus; +- (void)setPixelFormat:(NSOpenGLPixelFormat*)pixelFormat; +- (NSOpenGLPixelFormat*)pixelFormat; +- (void)setParent:(MacOSXWindowInfo*)parent; +- (BOOL)acceptsFirstResponder; +@end + +@interface GLLayer : CAOpenGLLayer { + @public + JAWT_MacOSXDrawingSurfaceInfo *macosx_dsi; + JAWT_Rectangle canvasBounds; + MacOSXWindowInfo *window_info; + bool setViewport; + bool autoResizable; + + @private + CGLContextObj contextObject; + int fboID; + int imageRenderBufferID; + int depthRenderBufferID; + int fboWidth; + int fboHeight; +} + +- (void) attachLayer; +- (void) removeLayer; +- (void) blitFrameBuffer; + +- (int) getWidth; +- (int) getHeight; +@end + +typedef struct { + bool isCALayer; + bool isWindowed; + MacOSXWindowInfo *window_info; + NSOpenGLPixelFormat *pixel_format; + NSOpenGLPixelBuffer *pbuffer; + NSView *parent; + GLLayer *glLayer; +} MacOSXPeerInfo; + +@interface MacOSXKeyableWindow : NSWindow ++ (void)createWindow; ++ (void)destroyWindow; +- (BOOL)canBecomeKeyWindow; +@end + +NSOpenGLPixelFormat *choosePixelFormat(JNIEnv *env, jobject pixel_format, bool gl32, bool use_display_bpp, bool support_window, bool support_pbuffer, bool double_buffered); +#endif diff --git a/etc/lwjgl-2.9.1/src/native/macosx/context.m b/etc/lwjgl-2.9.1/src/native/macosx/context.m new file mode 100644 index 0000000..9229437 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/macosx/context.m @@ -0,0 +1,162 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * @author elias_naur + * @version $Revision$ + */ + +#import +#import "context.h" + +static CFBundleRef opengl_bundle = NULL; + +void *extgl_GetProcAddress(const char *name) { + CFStringRef cf_name = CFStringCreateWithCString(NULL, name, kCFStringEncodingUTF8); + void *address = CFBundleGetFunctionPointerForName(opengl_bundle, cf_name); + CFRelease(cf_name); + if (address == NULL) + printfDebug("Could not locate symbol %s\n", name); + return address; +} + +static CFBundleRef loadFramework(JNIEnv *env) { + CFStringRef framework_path = CFSTR("/System/Library/Frameworks/OpenGL.framework"); + if (framework_path == NULL) { + printfDebugJava(env, "Failed to allocate string"); + return NULL; + } + CFURLRef url = CFURLCreateWithFileSystemPath(NULL, framework_path, kCFURLPOSIXPathStyle, TRUE); + if (url == NULL) { + printfDebugJava(env, "Failed to allocate URL"); + return NULL; + } + CFBundleRef opengl_bundle = CFBundleCreate(NULL, url); + CFRelease(url); + return opengl_bundle; +} + +bool extgl_Open(JNIEnv *env) { + if (opengl_bundle != NULL) + return true; + opengl_bundle = loadFramework(env); + if (opengl_bundle != NULL) { + return true; + } else { + throwException(env, "Could not load OpenGL library"); + return false; + } +} + +void extgl_Close(void) +{ + if (opengl_bundle != NULL) { + CFRelease(opengl_bundle); + opengl_bundle = NULL; + } +} + +NSOpenGLPixelFormat *choosePixelFormat(JNIEnv *env, jobject pixel_format, bool gl32, bool use_display_bpp, bool support_window, bool support_pbuffer, bool double_buffered) { + int bpp; + jclass cls_pixel_format = (*env)->GetObjectClass(env, pixel_format); + if (use_display_bpp) + { + if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_5) { // if OS X 10.6+ use newer api + CGDisplayModeRef mode = CGDisplayCopyDisplayMode(kCGDirectMainDisplay); + CFStringRef pixEnc = CGDisplayModeCopyPixelEncoding(mode); + if (CFStringCompare(pixEnc, CFSTR(IO32BitDirectPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) + bpp = 32; + else if(CFStringCompare(pixEnc, CFSTR(IO16BitDirectPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) + bpp = 16; + else if(CFStringCompare(pixEnc, CFSTR(IO8BitIndexedPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) + bpp = 8; + } else { + bpp = CGDisplayBitsPerPixel(kCGDirectMainDisplay); + } + } + else + bpp = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "bpp", "I")); + + int alpha = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "alpha", "I")); + int depth = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "depth", "I")); + int stencil = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "stencil", "I")); + int samples = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "samples", "I")); + int num_aux_buffers = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "num_aux_buffers", "I")); + int accum_bpp = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "accum_bpp", "I")); + int accum_alpha = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "accum_alpha", "I")); + bool stereo = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "stereo", "Z")); + bool floating_point = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "floating_point", "Z")); + // TODO: Add floating_point_packed attribute below + bool floating_point_packed = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "floating_point_packed", "Z")); + // TODO: Add sRGB attribute below + bool sRGB = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "sRGB", "Z")); + + attrib_list_t attribs; + jboolean allow_software_acceleration = getBooleanProperty(env, "org.lwjgl.opengl.Display.allowSoftwareOpenGL"); + initAttribList(&attribs); + if (!allow_software_acceleration) + putAttrib(&attribs, NSOpenGLPFAAccelerated); + if (double_buffered) + putAttrib(&attribs, NSOpenGLPFADoubleBuffer); + putAttrib(&attribs, NSOpenGLPFAMinimumPolicy); + putAttrib(&attribs, NSOpenGLPFAColorSize); putAttrib(&attribs, bpp); + putAttrib(&attribs, NSOpenGLPFAAlphaSize); putAttrib(&attribs, alpha); + putAttrib(&attribs, NSOpenGLPFADepthSize); putAttrib(&attribs, depth); + putAttrib(&attribs, NSOpenGLPFAStencilSize); putAttrib(&attribs, stencil); + putAttrib(&attribs, NSOpenGLPFAAccumSize); putAttrib(&attribs, accum_bpp + accum_alpha); + putAttrib(&attribs, NSOpenGLPFASampleBuffers); putAttrib(&attribs, samples > 0 ? 1 : 0); + putAttrib(&attribs, NSOpenGLPFASamples); putAttrib(&attribs, samples); + putAttrib(&attribs, NSOpenGLPFAAuxBuffers); putAttrib(&attribs, num_aux_buffers); + if (gl32) { + putAttrib(&attribs, 99); // NSOpenGLPFAOpenGLProfile + putAttrib(&attribs, 0x3200); // NSOpenGLProfileVersion3_2Core + } else { + if (support_window) + putAttrib(&attribs, NSOpenGLPFAWindow); + if (support_pbuffer) + putAttrib(&attribs, NSOpenGLPFAPixelBuffer); + } + if (stereo) + putAttrib(&attribs, NSOpenGLPFAStereo); + if (floating_point) + putAttrib(&attribs, NSOpenGLPFAColorFloat); + putAttrib(&attribs, 0); + NSOpenGLPixelFormat* fmt = [[NSOpenGLPixelFormat alloc] initWithAttributes:(NSOpenGLPixelFormatAttribute *)attribs.attribs]; + + if (fmt == nil) { + throwException(env, "Could not create pixel format"); + return NULL; + } + return fmt; +} diff --git a/etc/lwjgl-2.9.1/src/native/macosx/macosx_al.c b/etc/lwjgl-2.9.1/src/native/macosx/macosx_al.c new file mode 100644 index 0000000..160904d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/macosx/macosx_al.c @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include +#include "extal.h" +#include "common_tools.h" + +/** + * $Id$ + * + * This file contains the AL extension assigning mechanism + * + * @author Brian Matzon + * @version $Revision$ + */ + +static const struct mach_header* handleOAL = NULL; +static CFBundleRef openal_bundle = NULL; + +void *extal_NativeGetFunctionPointer(const char *function) { + void *address = NULL; + if (handleOAL != NULL) { + char *mac_symbol_name = (char *)malloc((strlen(function) + 2)*sizeof(char)); + if (mac_symbol_name == NULL) + return NULL; + mac_symbol_name[0] = '_'; + strcpy(&(mac_symbol_name[1]), function); + NSSymbol symbol = NSLookupSymbolInImage(handleOAL, mac_symbol_name, NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR); + free(mac_symbol_name); + if (symbol != NULL) { + address = NSAddressOfSymbol(symbol); + } + } else if (openal_bundle != NULL) { + CFStringRef cf_function = CFStringCreateWithCString(NULL, function, kCFStringEncodingUTF8); + address = CFBundleGetFunctionPointerForName(openal_bundle, cf_function); + CFRelease(cf_function); + } + return address; +} + +static CFBundleRef tryLoadFramework(JNIEnv *env) { + CFStringRef framework_path = CFSTR("/System/Library/Frameworks/OpenAL.framework"); + if (framework_path == NULL) { + printfDebugJava(env, "Failed to allocate string"); + return NULL; + } + CFURLRef url = CFURLCreateWithFileSystemPath(NULL, framework_path, kCFURLPOSIXPathStyle, TRUE); + if (url == NULL) { + printfDebugJava(env, "Failed to allocate URL"); + return NULL; + } + CFBundleRef openal_bundle = CFBundleCreate(NULL, url); + CFRelease(url); + return openal_bundle; +} + +void extal_LoadLibrary(JNIEnv *env, jstring path) { + const char *path_str = (*env)->GetStringUTFChars(env, path, NULL); + printfDebugJava(env, "Testing '%s'", path_str); + handleOAL = NSAddImage(path_str, NSADDIMAGE_OPTION_RETURN_ON_ERROR); + if (handleOAL != NULL) { + printfDebugJava(env, "Found OpenAL at '%s'", path_str); + } else { + throwException(env, "Could not load OpenAL library"); + } + (*env)->ReleaseStringUTFChars(env, path, path_str); +} + +/** + * Unloads the OpenAL Library + */ +void extal_UnloadLibrary() { + if (openal_bundle != NULL) { + CFRelease(openal_bundle); + openal_bundle = NULL; + } +} + +JNIEXPORT void JNICALL Java_org_lwjgl_openal_AL_nCreateDefault(JNIEnv *env, jclass clazz) { + openal_bundle = tryLoadFramework(env); + if (openal_bundle != NULL) + printfDebugJava(env, "Found OpenAL Bundle"); + else + throwException(env, "Could not load OpenAL framework"); +} diff --git a/etc/lwjgl-2.9.1/src/native/macosx/macosx_cl.c b/etc/lwjgl-2.9.1/src/native/macosx/macosx_cl.c new file mode 100644 index 0000000..aeca29f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/macosx/macosx_cl.c @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include +#include +#include +#include "extcl.h" +#include "common_tools.h" + +/** + * OpenCL library management + */ +static const struct mach_header* handleOCL = NULL; +static CFBundleRef opencl_bundle = NULL; + +void *extcl_NativeGetFunctionPointer(const char *function) { + void *address = NULL; + if (handleOCL != NULL) { + char *mac_symbol_name = (char *)malloc((strlen(function) + 2)*sizeof(char)); + if (mac_symbol_name == NULL) + return NULL; + mac_symbol_name[0] = '_'; + strcpy(&(mac_symbol_name[1]), function); + NSSymbol symbol = NSLookupSymbolInImage(handleOCL, mac_symbol_name, NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR); + free(mac_symbol_name); + if (symbol != NULL) { + address = NSAddressOfSymbol(symbol); + } + } else if (opencl_bundle != NULL) { + CFStringRef cf_function = CFStringCreateWithCString(NULL, function, kCFStringEncodingUTF8); + address = CFBundleGetFunctionPointerForName(opencl_bundle, cf_function); + CFRelease(cf_function); + } + return address; +} + +static CFBundleRef tryLoadFramework(JNIEnv *env) { + CFStringRef framework_path = CFSTR("/System/Library/Frameworks/OpenCL.framework"); + if (framework_path == NULL) { + printfDebugJava(env, "Failed to allocate string"); + return NULL; + } + CFURLRef url = CFURLCreateWithFileSystemPath(NULL, framework_path, kCFURLPOSIXPathStyle, TRUE); + if (url == NULL) { + printfDebugJava(env, "Failed to allocate URL"); + return NULL; + } + CFBundleRef opencl_bundle = CFBundleCreate(NULL, url); + CFRelease(url); + return opencl_bundle; +} + +void extcl_LoadLibrary(JNIEnv *env, jstring path) { + const char *path_str = (*env)->GetStringUTFChars(env, path, NULL); + printfDebugJava(env, "Testing '%s'", path_str); + handleOCL = NSAddImage(path_str, NSADDIMAGE_OPTION_RETURN_ON_ERROR); + if (handleOCL != NULL) { + printfDebugJava(env, "Found OpenCL at '%s'", path_str); + } else { + throwException(env, "Could not load OpenCL library"); + } + (*env)->ReleaseStringUTFChars(env, path, path_str); +} + +/** + * Unloads the OpenCL Library + */ +void extcl_UnloadLibrary() { + if (opencl_bundle != NULL) { + CFRelease(opencl_bundle); + opencl_bundle = NULL; + } +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opencl_CL_nCreateDefault(JNIEnv *env, jclass clazz) { + opencl_bundle = tryLoadFramework(env); + if (opencl_bundle != NULL) + printfDebugJava(env, "Found OpenCL Bundle"); + else + throwException(env, "Could not load OpenCL framework"); +} diff --git a/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_MacOSXSysImplementation.h b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_MacOSXSysImplementation.h new file mode 100644 index 0000000..705eb08 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_MacOSXSysImplementation.h @@ -0,0 +1,15 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_MacOSXSysImplementation */ + +#ifndef _Included_org_lwjgl_MacOSXSysImplementation +#define _Included_org_lwjgl_MacOSXSysImplementation +#ifdef __cplusplus +extern "C" { +#endif +#undef org_lwjgl_MacOSXSysImplementation_JNI_VERSION +#define org_lwjgl_MacOSXSysImplementation_JNI_VERSION 25L +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_Display.m b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_Display.m new file mode 100644 index 0000000..c7c97ab --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_Display.m @@ -0,0 +1,891 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Mac OS X specific display functions. + * + * @author elias_naur + * @author mojang + * @author kappaOne + * @version $Revision$ + */ + +#import +#import +#import +#import +#import +#import "common_tools.h" +#import "org_lwjgl_opengl_MacOSXDisplay.h" +#import "org_lwjgl_MacOSXSysImplementation.h" +#import "context.h" + +static NSOpenGLPixelFormat *default_format = nil; + +static NSAutoreleasePool *pool; + +static MacOSXPeerInfo *peer_info; + +static bool leftMouseDown = false; +static bool rightMouseDown = false; + +static NSUInteger lastModifierFlags = 0; + +@implementation MacOSXKeyableWindow + ++ (void) createWindow { + MacOSXWindowInfo *window_info = peer_info->window_info; + + int width = window_info->display_rect.size.width; + int height = window_info->display_rect.size.height; + + NSRect view_rect = NSMakeRect(0.0, 0.0, width, height); + window_info->view = [[MacOSXOpenGLView alloc] initWithFrame:view_rect pixelFormat:peer_info->pixel_format]; + [window_info->view setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable]; + + // Inform the view of its parent window info; + [window_info->view setParent:window_info]; + + if (window_info->enableHighDPI) { + // call method using runtime selector as its a 10.7+ api and allows compiling on older SDK's + [window_info->view performSelector:NSSelectorFromString(@"setWantsBestResolutionOpenGLSurface:") withObject:YES]; + } + + // set nsapp delegate for catching app quit events + [NSApp setDelegate:window_info->view]; + + if (window_info->context != nil) { + [window_info->view setOpenGLContext:window_info->context]; + } + + if (!window_info->fullscreen) { + + if (window_info->parented) { + window_info->window = [peer_info->parent window]; + [peer_info->parent addSubview:window_info->view]; + } + else { + + int default_window_mask = NSBorderlessWindowMask; // undecorated + + if (!window_info->undecorated) { + default_window_mask = NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask; + } + + if (window_info->resizable) { + default_window_mask |= NSResizableWindowMask; + } + + window_info->window = [[MacOSXKeyableWindow alloc] initWithContentRect:window_info->display_rect styleMask:default_window_mask backing:NSBackingStoreBuffered defer:NO]; + + [window_info->window setContentView:window_info->view]; + [window_info->window setContentView:window_info->view]; // call twice to fix issue + + // set NSView as delegate of NSWindow to get windowShouldClose events + [window_info->window setDelegate:window_info->view]; + } + + // disable any fixed backbuffer size to allow resizing + CGLContextObj cgcontext = (CGLContextObj)[[window_info->view openGLContext] CGLContextObj]; + CGLDisable(cgcontext, kCGLCESurfaceBackingSize); + } + else { + // set a fixed backbuffer size for fullscreen + CGLContextObj cgcontext = (CGLContextObj)[window_info->context CGLContextObj]; + GLint dim[2] = {width, height}; + CGLSetParameter(cgcontext, kCGLCPSurfaceBackingSize, dim); + CGLEnable(cgcontext, kCGLCESurfaceBackingSize); + + // enter fullscreen mode + [window_info->view enterFullScreenMode: [NSScreen mainScreen] withOptions: nil ]; + window_info->window = [window_info->view window]; + + // adjust the NSView bounds to correct mouse coordinates in fullscreen + NSSize windowSize = [window_info->window frame].size; + NSSize newBounds = NSMakeSize(windowSize.width/width*windowSize.width, windowSize.height/height*windowSize.height); + [window_info->view setBoundsSize:newBounds]; + } + + if (window_info->enableFullscreenModeAPI && window_info->resizable) { + // manually create OS X 10.7+ mask to allow compilation on previous OS X versions + NSUInteger NSWindowCollectionBehaviorFullScreenPrimary = 1 << 7; + [window_info->window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary]; + } + + [window_info->window makeFirstResponder:window_info->view]; + [window_info->window setInitialFirstResponder:window_info->view]; + [window_info->window makeKeyAndOrderFront:[NSApplication sharedApplication]]; +} + ++ (void) destroyWindow { + MacOSXWindowInfo *window_info = peer_info->window_info; + + if (window_info->fullscreen) { + [window_info->view exitFullScreenModeWithOptions: nil]; + window_info->window = nil; + } + else { + if (peer_info->isCALayer) { + peer_info->isCALayer = false; + [peer_info->glLayer removeLayer]; + [peer_info->glLayer release]; + peer_info->glLayer = nil; + return; + } + + if (window_info->window != nil) { + // if the nsview has no parent then close window + if ([window_info->window contentView] == window_info->view) { + // release the nsview and remove it from any parent nsview + [window_info->view removeFromSuperviewWithoutNeedingDisplay]; + [window_info->window close]; + window_info->window = nil; + } + else { + // release the nsview and remove it from any parent nsview + [window_info->view removeFromSuperviewWithoutNeedingDisplay]; + } + } + } +} + +- (BOOL)canBecomeKeyWindow; +{ + return YES; +} +@end + +@implementation MacOSXOpenGLView + ++ (NSOpenGLPixelFormat*)defaultPixelFormat { + NSOpenGLPixelFormatAttribute defaultAttribs[] = { + NSOpenGLPFADoubleBuffer, + NSOpenGLPFADepthSize, 16, + NSOpenGLPFAColorSize, 32, + 0 + }; + if (default_format == nil) { + default_format = [[NSOpenGLPixelFormat alloc] initWithAttributes:defaultAttribs]; + } + return default_format; +} + +- (BOOL)windowShouldClose:(id)sender { + if (_parent != nil) { + JNIEnv *env = attachCurrentThread(); + jclass display_class = (*env)->GetObjectClass(env, _parent->jdisplay); + jmethodID close_callback = (*env)->GetMethodID(env, display_class, "doHandleQuit", "()V"); + (*env)->CallVoidMethod(env, _parent->jdisplay, close_callback); + } + return NO; +} + +- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender { + [self windowShouldClose:nil]; + return NSTerminateCancel; +} + +- (id)initWithFrame:(NSRect)frameRect pixelFormat:(NSOpenGLPixelFormat*)format { + self = [super initWithFrame:frameRect]; + if (self != nil) { + _pixelFormat = [format retain]; + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(_surfaceNeedsUpdate:) + name:NSViewGlobalFrameDidChangeNotification + object:self]; + } + return self; +} + +- (void) _surfaceNeedsUpdate:(NSNotification*)notification { + [self update]; +} + +- (void)setOpenGLContext:(NSOpenGLContext*)context { + _openGLContext = context; +} + +- (NSOpenGLContext*)openGLContext { + return _openGLContext; +} + +- (void)clearGLContext { + [_openGLContext release]; + _openGLContext = nil; +} + +- (void)prepareOpenGL { + +} + +- (void)update { + [_openGLContext update]; +} + +- (void)lockFocus { + [super lockFocus]; + + NSOpenGLContext* context = [self openGLContext]; + + if (context == nil) return; + + if ([context view] != self) { + [context setView:self]; + } + + [context makeCurrentContext]; +} + +- (void)setPixelFormat:(NSOpenGLPixelFormat*)pixelFormat { + _pixelFormat = [pixelFormat retain]; +} + +- (NSOpenGLPixelFormat*)pixelFormat { + return _pixelFormat; +} + +- (BOOL)acceptsFirstResponder { + return YES; +} + +- (void)setParent:(MacOSXWindowInfo*)parent { + _parent = parent; +} + +- (void)keyDown:(NSEvent *)event { + JNIEnv *env = attachCurrentThread(); + if (env == nil || event == nil || _parent == nil || _parent->jkeyboard == nil) { + return; + } + long time = [event timestamp] * 1000000000; + jclass keyboard_class = (*env)->GetObjectClass(env, _parent->jkeyboard); + jmethodID keydown = (*env)->GetMethodID(env, keyboard_class, "keyPressed", "(ILjava/lang/String;J)V"); + + // convert key characters from NSString to jstring + const char *unichars = [[event characters] UTF8String]; + jstring characters = (*env)->NewStringUTF(env, unichars); + + (*env)->CallVoidMethod(env, _parent->jkeyboard, keydown, [event keyCode], characters, time); +} + +- (void)keyUp:(NSEvent *)event { + JNIEnv *env = attachCurrentThread(); + if (env == nil || event == nil || _parent == nil || _parent->jkeyboard == nil) { + return; + } + long time = [event timestamp] * 1000000000; + jclass keyboard_class = (*env)->GetObjectClass(env, _parent->jkeyboard); + jmethodID keyup = (*env)->GetMethodID(env, keyboard_class, "keyReleased", "(ILjava/lang/String;J)V"); + + // convert key characters from NSString to jstring + const char *unichars = [[event characters] UTF8String]; + jstring characters = (*env)->NewStringUTF(env, unichars); + + (*env)->CallVoidMethod(env, _parent->jkeyboard, keyup, [event keyCode], characters, time); +} + +- (void)flagsChanged:(NSEvent *)event { + JNIEnv *env = attachCurrentThread(); + if (env == nil || event == nil || _parent == nil || _parent->jkeyboard == nil) { + return; + } + long time = [event timestamp] * 1000000000; + + NSUInteger modifierFlags = [event modifierFlags]; + unsigned short keyCode = [event keyCode]; + + NSUInteger mask = ~0; + + switch(keyCode) { + case kVK_Control : mask = NSControlLeftKeyMask; break; + case kVK_Shift : mask = NSShiftLeftKeyMask; break; + case kVK_RightShift : mask = NSShiftRightKeyMask; break; + case kVK_Command : mask = NSCommandLeftKeyMask; break; + case 0x36 : mask = NSCommandRightKeyMask; break; // Should be: kVK_RightCommand -- missing O.o + case kVK_Option : mask = NSAlternateLeftKeyMask; break; + case kVK_RightOption : mask = NSAlternateRightKeyMask; break; + case kVK_RightControl: mask = NSControlRightKeyMask; break; + case kVK_CapsLock : mask = NSAlphaShiftKeyMask; break; + case kVK_Function : mask = NSFunctionKeyMask; break; + // case 0x?? : mask = NSNumericPadKeyMask; break; // Didn't have the keycode for this one :( + default: + // key code not specified when left Command key + Tab moves focus to another Window, therefore manually detect and specify correct key code + if (((lastModifierFlags & NSCommandLeftKeyMask) == NSCommandLeftKeyMask) && ((modifierFlags & NSCommandLeftKeyMask) != NSCommandLeftKeyMask)) { + keyCode = kVK_Command; // left command key code + } + // key code not specified when right Command key + Tab moves focus to another Window, therefore manually detect and specify correct key code + else if (((lastModifierFlags & NSCommandLeftKeyMask) == NSCommandLeftKeyMask) && ((modifierFlags & NSCommandLeftKeyMask) != NSCommandLeftKeyMask)) { + keyCode = 0x36; // right command key code + } + else { + NSLog(@"Unknown modifier with keycode: %d\n", [event keyCode]); + return; + } + } + + // save current modifierFlags for next use + lastModifierFlags = [event modifierFlags]; + + jclass keyboard_class = (*env)->GetObjectClass(env, _parent->jkeyboard); + + jmethodID keyMethod; + if ((modifierFlags & mask) == mask) { + keyMethod = (*env)->GetMethodID(env, keyboard_class, "keyPressed", "(ILjava/lang/String;J)V"); + } else { + keyMethod = (*env)->GetMethodID(env, keyboard_class, "keyReleased", "(ILjava/lang/String;J)V"); + } + + (*env)->CallVoidMethod(env, _parent->jkeyboard, keyMethod, keyCode, NULL, time); +} + +- (void)mouseButtonState:(NSEvent *)event :(int)button :(int)state { + JNIEnv *env = attachCurrentThread(); + if (env == nil || event == nil || _parent == nil || _parent->jkeyboard == nil) { + return; + } + long time = [event timestamp] * 1000000000; + jclass mouse_class = (*env)->GetObjectClass(env, _parent->jmouse); + jmethodID mousebutton = (*env)->GetMethodID(env, mouse_class, "setButton", "(IIJ)V"); + (*env)->CallVoidMethod(env, _parent->jmouse, mousebutton, button, state, time); +} + +- (void)mouseDown:(NSEvent *)event { + if ([event modifierFlags] & NSControlKeyMask) { + rightMouseDown = true; + [self rightMouseDown:event]; + return; + } + + leftMouseDown = true; + [self mouseButtonState:event :0 :1]; +} + +- (void)rightMouseDown:(NSEvent *)event { + [self mouseButtonState:event :1 :1]; +} + +- (void)otherMouseDown:(NSEvent *)event { + [self mouseButtonState:event :2 :1]; +} + +- (void)mouseUp:(NSEvent *)event { + if (rightMouseDown) { + rightMouseDown = false; + [self rightMouseUp:event]; + } + + if (leftMouseDown) { + leftMouseDown = false; + [self mouseButtonState:event :0 :0]; + } +} + +- (void)rightMouseUp:(NSEvent *)event { + [self mouseButtonState:event :1 :0]; +} + +- (void)otherMouseUp:(NSEvent *)event { + [self mouseButtonState:event :2 :0]; +} + +- (void)mouseDragged:(NSEvent *)event { + JNIEnv *env = attachCurrentThread(); + if (env == nil || event == nil || _parent == nil || _parent->jmouse == nil) { + return; + } + long time = [event timestamp] * 1000000000; + jclass mouse_class = (*env)->GetObjectClass(env, _parent->jmouse); + jmethodID mousemove = (*env)->GetMethodID(env, mouse_class, "mouseMoved", "(FFFFFJ)V"); + NSPoint loc = [self convertPoint:[event locationInWindow] toView:nil]; + (*env)->CallVoidMethod(env, _parent->jmouse, mousemove, loc.x, loc.y, [event deltaX], [event deltaY], 0.0f, time); +} + +- (void)rightMouseDragged:(NSEvent *)event { + JNIEnv *env = attachCurrentThread(); + if (env == nil || event == nil || _parent == nil || _parent->jmouse == nil) { + return; + } + long time = [event timestamp] * 1000000000; + jclass mouse_class = (*env)->GetObjectClass(env, _parent->jmouse); + jmethodID mousemove = (*env)->GetMethodID(env, mouse_class, "mouseMoved", "(FFFFFJ)V"); + NSPoint loc = [self convertPoint:[event locationInWindow] toView:nil]; + (*env)->CallVoidMethod(env, _parent->jmouse, mousemove, loc.x, loc.y, [event deltaX], [event deltaY], 0.0f, time); +} + +- (void)otherMouseDragged:(NSEvent *)event { + JNIEnv *env = attachCurrentThread(); + if (env == nil || event == nil || _parent == nil || _parent->jmouse == nil) { + return; + } + long time = [event timestamp] * 1000000000; + jclass mouse_class = (*env)->GetObjectClass(env, _parent->jmouse); + jmethodID mousemove = (*env)->GetMethodID(env, mouse_class, "mouseMoved", "(FFFFFJ)V"); + NSPoint loc = [self convertPoint:[event locationInWindow] toView:nil]; + (*env)->CallVoidMethod(env, _parent->jmouse, mousemove, loc.x, loc.y, [event deltaX], [event deltaY], 0.0f, time); +} + +- (void)mouseMoved:(NSEvent *)event { + JNIEnv *env = attachCurrentThread(); + if (env == nil || event == nil || _parent == nil || _parent->jmouse == nil) { + return; + } + long time = [event timestamp] * 1000000000; + jclass mouse_class = (*env)->GetObjectClass(env, _parent->jmouse); + jmethodID mousemove = (*env)->GetMethodID(env, mouse_class, "mouseMoved", "(FFFFFJ)V"); + NSPoint loc = [self convertPoint:[event locationInWindow] toView:nil]; + (*env)->CallVoidMethod(env, _parent->jmouse, mousemove, loc.x, loc.y, [event deltaX], [event deltaY], 0.0f, time); +} + +- (void)scrollWheel:(NSEvent *)event { + JNIEnv *env = attachCurrentThread(); + if (env == nil || event == nil || _parent == nil) { + return; + } + long time = [event timestamp] * 1000000000; + jclass mouse_class = (*env)->GetObjectClass(env, _parent->jmouse); + jmethodID mousemove = (*env)->GetMethodID(env, mouse_class, "mouseMoved", "(FFFFFJ)V"); + NSPoint loc = [self convertPoint:[event locationInWindow] toView:nil]; + (*env)->CallVoidMethod(env, _parent->jmouse, mousemove, loc.x, loc.y, [event deltaX], [event deltaY], 1.0f, time); +} + +- (void)viewDidMoveToWindow { + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(windowResized:) + name:NSWindowDidResizeNotification + object:[self window]]; +} + +- (void)dealloc { + [[NSNotificationCenter defaultCenter] removeObserver:self]; + [super dealloc]; +} + +- (void)windowResized:(NSNotification *)notification; +{ + if (_parent != nil) { + _parent->display_rect = [self frame]; + _parent->resized = JNI_TRUE; + } +} + +- (void)viewDidChangeBackingProperties { + JNIEnv *env = attachCurrentThread(); + if (env == nil || _parent == nil || _parent->jdisplay == nil) { + return; + } + + jclass display_class = (*env)->GetObjectClass(env, _parent->jdisplay); + jmethodID setScaleFactor_callback = (*env)->GetMethodID(env, display_class, "setScaleFactor", "(F)V"); + + CGFloat scaleFactor; + + // call method using runtime selector as its a 10.7+ api and allows compiling on older SDK's + SEL selector = NSSelectorFromString(@"backingScaleFactor"); + + // as we are using a runtime selector, we need to use NSInvocations to get a CGFloat value back from it + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[[[self window] class] instanceMethodSignatureForSelector:selector]]; + [invocation setSelector:selector]; + [invocation setTarget:[self window]]; + [invocation invoke]; + [invocation getReturnValue:&scaleFactor]; + + (*env)->CallVoidMethod(env, _parent->jdisplay, setScaleFactor_callback, scaleFactor); +} + +-(void)updateTrackingAreas { + if(_trackingArea != nil) { + [self removeTrackingArea:_trackingArea]; + [_trackingArea release]; + } + + int options = (NSTrackingMouseEnteredAndExited | NSTrackingActiveAlways); + _trackingArea = [[NSTrackingArea alloc] initWithRect:[self bounds] + options:options + owner:self + userInfo:nil]; + [self addTrackingArea:_trackingArea]; + + // since nstrackingarea's don't know if mouse is inside or outside on creation + // manually detect this and send a fake mouse entered/exited message + NSPoint mouseLocation = [[self window] mouseLocationOutsideOfEventStream]; + mouseLocation = [self convertPoint:mouseLocation fromView:nil]; + + if (NSPointInRect(mouseLocation, [self bounds])) { + [self mouseEntered:nil]; + } + else { + [self mouseExited:nil]; + } +} + +-(void)mouseEntered:(NSEvent *)event { + JNIEnv *env = attachCurrentThread(); + if (env == nil || _parent == nil || _parent->jdisplay == nil) { + return; + } + + jclass display_class = (*env)->GetObjectClass(env, _parent->jdisplay); + jmethodID mouseInsideWindow_callback = (*env)->GetMethodID(env, display_class, "mouseInsideWindow", "(Z)V"); + (*env)->CallVoidMethod(env, _parent->jdisplay, mouseInsideWindow_callback, JNI_TRUE); +} + +-(void)mouseExited:(NSEvent *)event { + JNIEnv *env = attachCurrentThread(); + if (env == nil || _parent == nil || _parent->jdisplay == nil) { + return; + } + + jclass display_class = (*env)->GetObjectClass(env, _parent->jdisplay); + jmethodID mouseInsideWindow_callback = (*env)->GetMethodID(env, display_class, "mouseInsideWindow", "(Z)V"); + (*env)->CallVoidMethod(env, _parent->jdisplay, mouseInsideWindow_callback, JNI_FALSE); +} + +- (void) drawRect:(NSRect)rect { + // set black as the default background color + // for the nsview to avoid white flash on fullscreen + [[NSColor blackColor] setFill]; + NSRectFill(rect); +} +@end + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nIsMiniaturized(JNIEnv *env, jobject this, jobject window_handle) { + MacOSXWindowInfo *window_info = (MacOSXWindowInfo *)(*env)->GetDirectBufferAddress(env, window_handle); + return (jboolean)[window_info->window isMiniaturized]; +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nIsFocused(JNIEnv *env, jobject this, jobject window_handle) { + MacOSXWindowInfo *window_info = (MacOSXWindowInfo *)(*env)->GetDirectBufferAddress(env, window_handle); + // Display is focused if nswindow is key window and nsview is first responder in that nswindow + return (jboolean)([[window_info->view window] isKeyWindow] && [[window_info->view window] firstResponder] == window_info->view); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nResizeWindow(JNIEnv *env, jobject this, jobject window_handle, jint x, jint y, jint width, jint height) { + MacOSXWindowInfo *window_info = (MacOSXWindowInfo *)(*env)->GetDirectBufferAddress(env, window_handle); + window_info->display_rect = NSMakeRect(x, y, width, height); + [window_info->window setFrame:window_info->display_rect display:false]; + [window_info->view update]; +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nWasResized(JNIEnv *env, jobject this, jobject window_handle) { + MacOSXWindowInfo *window_info = (MacOSXWindowInfo *)(*env)->GetDirectBufferAddress(env, window_handle); + jboolean was_resized = window_info->resized; + window_info->resized = JNI_FALSE; + return was_resized; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nGetWidth(JNIEnv *env, jobject this, jobject window_handle) { + MacOSXWindowInfo *window_info = (MacOSXWindowInfo *)(*env)->GetDirectBufferAddress(env, window_handle); + jint width = window_info->display_rect.size.width; + return width; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nGetHeight(JNIEnv *env, jobject this, jobject window_handle) { + MacOSXWindowInfo *window_info = (MacOSXWindowInfo *)(*env)->GetDirectBufferAddress(env, window_handle); + jint height = window_info->display_rect.size.height; + return height; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nSetResizable(JNIEnv *env, jobject this, jobject window_handle, jboolean resizable) { + MacOSXWindowInfo *window_info = (MacOSXWindowInfo *)(*env)->GetDirectBufferAddress(env, window_handle); + NSUInteger style_mask = [window_info->window styleMask]; + if (resizable == true) { + style_mask |= NSResizableWindowMask; + } else { + style_mask &= ~NSResizableWindowMask; + } + [window_info->window setStyleMask:style_mask]; + + if (window_info->enableFullscreenModeAPI) { + if (resizable) { + // manually create OS X 10.7+ mask to allow compilation on previous OS X versions + NSUInteger NSWindowCollectionBehaviorFullScreenPrimary = 1 << 7; + [window_info->window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary]; + } + else { + // manually create OS X 10.7+ mask to allow compilation on previous OS X versions + NSUInteger NSFullScreenWindowMask = 1 << 14; + // on disabling resizing exit fullscreen mode exit otherwise will be stuck in it + if ((style_mask & NSFullScreenWindowMask) == NSFullScreenWindowMask) { + // call method using runtime selector as its a 10.7+ api and allows compiling on older SDK's + [window_info->window performSelector:NSSelectorFromString(@"toggleFullScreen:") withObject:nil]; + } + [window_info->window setCollectionBehavior:NSWindowCollectionBehaviorDefault]; + } + } +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nGetX(JNIEnv *env, jobject this, jobject window_handle) { + MacOSXWindowInfo *window_info = (MacOSXWindowInfo *)(*env)->GetDirectBufferAddress(env, window_handle); + jint x = [[window_info->view window] frame].origin.x; + return x; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nGetY(JNIEnv *env, jobject this, jobject window_handle) { + MacOSXWindowInfo *window_info = (MacOSXWindowInfo *)(*env)->GetDirectBufferAddress(env, window_handle); + + NSRect screenRect = [[window_info->window screen] frame]; + NSRect winRect = [[window_info->view window] frame]; + + // get top corner of window frame, also flip coords so origin is in top left + jint y = screenRect.size.height - (winRect.origin.y + winRect.size.height) - 1; + return y; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nSetTitle(JNIEnv *env, jobject this, jobject window_handle, jobject title_buffer) { + MacOSXWindowInfo *window_info = (MacOSXWindowInfo *)(*env)->GetDirectBufferAddress(env, window_handle); + const char *title_cstr = (const char *)(*env)->GetDirectBufferAddress(env, title_buffer); + NSString *title = [[NSString alloc] initWithUTF8String:title_cstr]; + [window_info->window performSelectorOnMainThread:@selector(setTitle:) withObject:title waitUntilDone:NO]; +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nCreateWindow(JNIEnv *env, jobject this, jint x, jint y, jint width, jint height, jboolean fullscreen, jboolean undecorated, jboolean resizable, jboolean parented, jboolean enableFullscreenModeAPI, jboolean enableHighDPI, jobject peer_info_handle, jobject window_handle) { + + pool = [[NSAutoreleasePool alloc] init]; + + peer_info = (MacOSXPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + + if (peer_info->isCALayer && !fullscreen) { + MacOSXWindowInfo *window_info = (MacOSXWindowInfo *)(*env)->GetDirectBufferAddress(env, window_handle); + window_info->fullscreen = fullscreen; + window_info->undecorated = undecorated; + window_info->parented = parented; + window_info->enableFullscreenModeAPI = enableFullscreenModeAPI; + + return window_handle; + } + + if (window_handle == NULL) { + window_handle = newJavaManagedByteBuffer(env, sizeof(MacOSXWindowInfo)); + if (window_handle == NULL) { + throwException(env, "Could not create handle buffer"); + return NULL; + } + } + + MacOSXWindowInfo *window_info = (MacOSXWindowInfo *)(*env)->GetDirectBufferAddress(env, window_handle); + + window_info->fullscreen = fullscreen; + window_info->undecorated = undecorated; + window_info->resizable = resizable; + window_info->parented = parented; + window_info->enableFullscreenModeAPI = enableFullscreenModeAPI; + window_info->enableHighDPI = enableHighDPI; + + peer_info->window_info = window_info; + peer_info->isWindowed = true; + + window_info->display_rect = NSMakeRect(x, [[NSScreen mainScreen] frame].size.height - y - height, width, height); + + // Cache the necessary info for window-close callbacks into the JVM + if (window_info->jdisplay == NULL) { + window_info->jdisplay = (*env)->NewGlobalRef(env, this); + } + + // create window on main thread + [MacOSXKeyableWindow performSelectorOnMainThread:@selector(createWindow) withObject:nil waitUntilDone:YES]; + + return window_handle; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nDestroyWindow(JNIEnv *env, jobject this, jobject window_handle) { + + // destroy window on main thread + [MacOSXKeyableWindow performSelectorOnMainThread:@selector(destroyWindow) withObject:nil waitUntilDone:YES]; + + [pool drain]; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nDestroyCALayer(JNIEnv *env, jobject this, jobject peer_info_handle) { + MacOSXPeerInfo *peer_info = (MacOSXPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + if (peer_info->isCALayer) { + peer_info->isCALayer = false; + [peer_info->glLayer performSelectorOnMainThread:@selector(removeLayer) withObject:nil waitUntilDone:YES]; + [peer_info->glLayer release]; + peer_info->glLayer = nil; + } +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nIsNativeMode(JNIEnv *env, jobject this, jobject peer_info_handle) { + MacOSXPeerInfo *peer_info = (MacOSXPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + if (peer_info->isCALayer) { + return JNI_FALSE; + } + else { + return JNI_TRUE; + } +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nGetCurrentDisplayMode(JNIEnv *env, jobject this) { + + jclass displayClass = (*env)->GetObjectClass(env, this); + jmethodID createDisplayModeMethod = (*env)->GetMethodID(env, displayClass, "createDisplayMode", "(IIII)Ljava/lang/Object;"); + + if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_5) { // if OS X 10.6+ use newer api + + CGDisplayModeRef mode = CGDisplayCopyDisplayMode(kCGDirectMainDisplay); + + int width = (int) CGDisplayModeGetWidth(mode); + int height = (int) CGDisplayModeGetHeight(mode); + int refreshRate = (int)CGDisplayModeGetRefreshRate(mode); + int bitsPerPixel; + + // get bitsPerPixel + CFStringRef pixelEncoding = CGDisplayModeCopyPixelEncoding(mode); + + if(CFStringCompare(pixelEncoding, CFSTR(IO16BitDirectPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) { + bitsPerPixel = 16; + } + else { + bitsPerPixel = 32; + } + + jobject displayMode = (*env)->CallObjectMethod(env, this, createDisplayModeMethod, width, height, bitsPerPixel, refreshRate); + + return displayMode; + + } else { + + CFDictionaryRef mode = CGDisplayCurrentMode(CGMainDisplayID()); + + long bitsPerPixel = 0; + long width = 0; + long height = 0; + long refreshRate = 0; + + CFNumberRef value; + + value = CFDictionaryGetValue(mode, kCGDisplayBitsPerPixel); + CFNumberGetValue(value, kCFNumberLongType, &bitsPerPixel); + + value = CFDictionaryGetValue(mode, kCGDisplayWidth); + CFNumberGetValue(value, kCFNumberLongType, &width); + + value = CFDictionaryGetValue(mode, kCGDisplayHeight); + CFNumberGetValue(value, kCFNumberLongType, &height); + + value = CFDictionaryGetValue(mode, kCGDisplayRefreshRate); + CFNumberGetValue(value, kCFNumberLongType, &refreshRate); + + jobject displayMode = (*env)->CallObjectMethod(env, this, createDisplayModeMethod, width, height, bitsPerPixel, refreshRate); + + return displayMode; + } +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nGetDisplayModes(JNIEnv *env, jobject this, jobject modesList) { + + jclass displayClass = (*env)->GetObjectClass(env, this); + jmethodID addDisplayModeMethod = (*env)->GetMethodID(env, displayClass, "addDisplayMode", "(Ljava/lang/Object;IIII)V"); + + if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_5) { // if OS X 10.6+ use newer api + + CFArrayRef modes = CGDisplayCopyAllDisplayModes(kCGDirectMainDisplay, NULL); + + int i = 0; + + for (i = 0; i < CFArrayGetCount(modes); i++) { + CGDisplayModeRef mode = (CGDisplayModeRef)CFArrayGetValueAtIndex(modes, i); + + int width = (int) CGDisplayModeGetWidth(mode); + int height = (int) CGDisplayModeGetHeight(mode); + int refreshRate = (int)CGDisplayModeGetRefreshRate(mode); + int bitsPerPixel; + + // get bitsPerPixel + CFStringRef pixelEncoding = CGDisplayModeCopyPixelEncoding(mode); + if(CFStringCompare(pixelEncoding, CFSTR(IO32BitDirectPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) { + bitsPerPixel = 32; + } + else if(CFStringCompare(pixelEncoding, CFSTR(IO16BitDirectPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo) { + bitsPerPixel = 16; + } + else { + continue; // ignore DisplayMode of other bitsPerPixel rates + } + + (*env)->CallVoidMethod(env, this, addDisplayModeMethod, modesList, width, height, bitsPerPixel, refreshRate); + } + + } else { + + CFArrayRef modes = CGDisplayAvailableModes(CGMainDisplayID()); + CFIndex index, count; + CFDictionaryRef mode; + + count = CFArrayGetCount(modes); + + for (index = 0; index < count; index++) { + mode = CFArrayGetValueAtIndex(modes, index); + + long bitsPerPixel = 0; + long width = 0; + long height = 0; + long refreshRate = 0; + + CFNumberRef value; + + value = CFDictionaryGetValue(mode, kCGDisplayBitsPerPixel); + CFNumberGetValue(value, kCFNumberLongType, &bitsPerPixel); + + value = CFDictionaryGetValue(mode, kCGDisplayWidth); + CFNumberGetValue(value, kCFNumberLongType, &width); + + value = CFDictionaryGetValue(mode, kCGDisplayHeight); + CFNumberGetValue(value, kCFNumberLongType, &height); + + value = CFDictionaryGetValue(mode, kCGDisplayRefreshRate); + CFNumberGetValue(value, kCFNumberLongType, &refreshRate); + + (*env)->CallVoidMethod(env, this, addDisplayModeMethod, modesList, width, height, bitsPerPixel, refreshRate); + } + } + +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_DefaultSysImplementation_getJNIVersion(JNIEnv *env, jobject ignored) { + return org_lwjgl_MacOSXSysImplementation_JNI_VERSION; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_restoreGamma(JNIEnv *env, jobject this) { + CGDisplayRestoreColorSyncSettings(); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_setGammaRamp(JNIEnv *env, jobject this, jobject gamma_buffer) { + const CGGammaValue *values = (*env)->GetDirectBufferAddress(env, gamma_buffer); + uint32_t table_size = (*env)->GetDirectBufferCapacity(env, gamma_buffer); + CGDisplayErr err = CGSetDisplayTransferByTable(kCGDirectMainDisplay, table_size, values, values, values); + if (err != CGDisplayNoErr) { + throwException(env, "Could not set display gamma"); + } +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXAWTMouse.m b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXAWTMouse.m new file mode 100644 index 0000000..6fc7be0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXAWTMouse.m @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Mac OS X mouse handling. + * + * @author elias_naur + * @version $Revision$ + */ + +#include +#include +#include "org_lwjgl_opengl_MacOSXMouseEventQueue.h" +#include "common_tools.h" + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXMouseEventQueue_nGrabMouse(JNIEnv *env, jclass unused, jboolean grab) { + CGAssociateMouseAndMouseCursorPosition(grab == JNI_TRUE ? FALSE : TRUE); + if (grab) + CGDisplayHideCursor(kCGDirectMainDisplay); + else + CGDisplayShowCursor(kCGDirectMainDisplay); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXMouseEventQueue_nWarpCursor(JNIEnv *env, jclass unused, jint x, jint y) { + CGPoint p; + p.x = x; + p.y = y; + CGWarpMouseCursorPosition(p); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXMouseEventQueue_getMouseDeltas(JNIEnv *env, jclass unused, jobject delta_buffer) { + CGMouseDelta dx, dy; + CGGetLastMouseDelta(&dx, &dy); + int buffer_length = (*env)->GetDirectBufferCapacity(env, delta_buffer); + if (buffer_length != 2) { + printfDebugJava(env, "Delta buffer not large enough!"); + return; + } + jint *buffer = (*env)->GetDirectBufferAddress(env, delta_buffer); + buffer[0] = dx; + buffer[1] = dy; +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.h b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.h new file mode 100644 index 0000000..13ccb34 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.h @@ -0,0 +1,29 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_MacOSXCanvasPeerInfo */ + +#ifndef _Included_org_lwjgl_opengl_MacOSXCanvasPeerInfo +#define _Included_org_lwjgl_opengl_MacOSXCanvasPeerInfo +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_lwjgl_opengl_MacOSXCanvasPeerInfo + * Method: nInitHandle + * Signature: (Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;ZII)Ljava/nio/ByteBuffer; + */ +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_MacOSXCanvasPeerInfo_nInitHandle + (JNIEnv *, jclass, jobject, jobject, jobject, jboolean, jint, jint); + +/* + * Class: org_lwjgl_opengl_MacOSXCanvasPeerInfo + * Method: nSetLayerPosition + * Signature: (Ljava/nio/ByteBuffer;II)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXCanvasPeerInfo_nSetLayerPosition + (JNIEnv *, jclass, jobject, jint, jint); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m new file mode 100644 index 0000000..91e4364 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXCanvasPeerInfo.m @@ -0,0 +1,343 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * @author elias_naur + * @author Pelle Johnsen + * @author kappaOne + * @version $Revision$ + */ + +#import +#include +#include +#include "awt_tools.h" +#include "org_lwjgl_opengl_MacOSXCanvasPeerInfo.h" +#include "context.h" +#include "common_tools.h" + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_MacOSXCanvasPeerInfo_nInitHandle +(JNIEnv *env, jclass clazz, jobject lock_buffer_handle, jobject peer_info_handle, jobject window_handle, jboolean forceCALayer, jboolean autoResizable, jint x, jint y) { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + MacOSXPeerInfo *peer_info = (MacOSXPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + AWTSurfaceLock *surface = (AWTSurfaceLock *)(*env)->GetDirectBufferAddress(env, lock_buffer_handle); + JAWT_MacOSXDrawingSurfaceInfo *macosx_dsi = (JAWT_MacOSXDrawingSurfaceInfo *)surface->dsi->platformInfo; + + // force CALayer usage or check if CALayer is supported (i.e. on Java 5 and Java 6) + if(forceCALayer || (surface->awt.version & 0x80000000)) { //JAWT_MACOSX_USE_CALAYER) { + + if (macosx_dsi != NULL) { + + if (window_handle == NULL) { + window_handle = newJavaManagedByteBuffer(env, sizeof(MacOSXWindowInfo)); + if (window_handle == NULL) { + throwException(env, "Could not create handle buffer"); + } + } else if (peer_info->window_info->window != nil) { + return window_handle; + } + + if (peer_info->isCALayer) { + [peer_info->glLayer release]; + } + + peer_info->glLayer = [GLLayer new]; + + peer_info->glLayer->macosx_dsi = macosx_dsi; + peer_info->glLayer->canvasBounds = (JAWT_Rectangle)surface->dsi->bounds; + peer_info->window_info = (MacOSXWindowInfo *)(*env)->GetDirectBufferAddress(env, window_handle); + peer_info->glLayer->window_info = peer_info->window_info; + peer_info->glLayer->autoResizable = autoResizable; + + // ensure the CALayer size is correct, needed for Java 7+ + peer_info->glLayer.frame = CGRectMake(x, y, peer_info->glLayer->canvasBounds.width, peer_info->glLayer->canvasBounds.height); + + [peer_info->glLayer performSelectorOnMainThread:@selector(createWindow:) withObject:peer_info->pixel_format waitUntilDone:YES]; + + peer_info->isCALayer = true; + peer_info->isWindowed = true; + peer_info->parent = nil; + + [pool release]; + return window_handle; + } + } + + // no CALayer support, fallback to using legacy method of getting the NSView of an AWT Canvas + peer_info->parent = macosx_dsi->cocoaViewRef; + peer_info->isCALayer = false; + peer_info->isWindowed = true; + + [pool release]; + return NULL; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXCanvasPeerInfo_nSetLayerPosition +(JNIEnv *env, jclass clazz, jobject peer_info_handle, jint x, jint y) { + MacOSXPeerInfo *peer_info = (MacOSXPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + + if (peer_info->glLayer != nil) { + NSPoint point = NSMakePoint(x, y); + NSValue *value = [NSValue valueWithPoint:point]; + [peer_info->glLayer performSelectorOnMainThread:@selector(updatePosition:) withObject:value waitUntilDone:NO]; + } +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXCanvasPeerInfo_nSetLayerBounds +(JNIEnv *env, jclass clazz, jobject peer_info_handle, jint x, jint y, jint width, jint height) { + MacOSXPeerInfo *peer_info = (MacOSXPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + + if (peer_info->glLayer != nil) { + NSRect rect = NSMakeRect(x, y, width, height); + NSValue *value = [NSValue valueWithRect:rect]; + [peer_info->glLayer performSelectorOnMainThread:@selector(updateBounds:) withObject:value waitUntilDone:NO]; + } +} + +@implementation GLLayer + +- (void) attachLayer { + self.asynchronous = YES; + self.needsDisplayOnBoundsChange = YES; + self.opaque = NO; + if (autoResizable) { + self.autoresizingMask = kCALayerWidthSizable | kCALayerHeightSizable; + } + else { + self.autoresizingMask = kCALayerNotSizable; + } + + // get root layer of the AWT Canvas and add self to it + id surfaceLayers = (id )macosx_dsi; + + if (surfaceLayers.layer != self) { + surfaceLayers.layer = self; + + // flip CALayer y position, needed for Java 7 workaround + self.frame = CGRectMake(self.frame.origin.x, + self.superlayer.bounds.size.height - self.frame.origin.y - self.frame.size.height, + self.frame.size.width, self.frame.size.height); + } +} + +- (void) removeLayer { + + // clean up resources + glDeleteFramebuffersEXT(1, &fboID); + glDeleteRenderbuffersEXT(1, &imageRenderBufferID); + glDeleteRenderbuffersEXT(1, &depthRenderBufferID); + + // finish any pending blits before destroying the offscreen window to prevent crashes + glFinish(); + + // destroy offscreen Display window + [self destroyWindow]; + + // remove self from root layer + [self removeFromSuperlayer]; +} + +- (void)updatePosition:(NSValue*)value { + NSPoint point = [value pointValue]; + self.position = CGPointMake(point.x, self.superlayer.bounds.size.height - point.y - self.bounds.size.height); +} + +- (void)updateBounds:(NSValue*)value { + NSRect rect = [value rectValue]; + self.frame = CGRectMake(rect.origin.x, self.superlayer.bounds.size.height - rect.origin.y - self.bounds.size.height, rect.size.width, rect.size.height); +} + +- (int) getWidth { + return canvasBounds.width; +} + +- (int) getHeight { + return canvasBounds.height; +} + +- (void) createWindow:(NSOpenGLPixelFormat*)pixel_format { + if (window_info->window != nil) { + [window_info->window close]; + } + + window_info->display_rect = [[NSScreen mainScreen] frame]; + + window_info->view = [[MacOSXOpenGLView alloc] initWithFrame:window_info->display_rect pixelFormat:pixel_format]; + + window_info->window = [[MacOSXKeyableWindow alloc] initWithContentRect:window_info->display_rect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]; + [window_info->window setContentView:window_info->view]; + + [window_info->window orderOut:nil]; +} + +- (void) destroyWindow { + if (window_info->window != nil) { + [window_info->view removeFromSuperviewWithoutNeedingDisplay]; + [window_info->window close]; + window_info->window = nil; + } +} + +- (void) blitFrameBuffer { + + // get the size of the CALayer/AWT Canvas + int width = self.bounds.size.width; + int height = self.bounds.size.height; + + if (width != fboWidth || height != fboHeight) { + + // store current fbo/renderbuffers for later deletion + int oldFboID = fboID; + int oldImageRenderBufferID = imageRenderBufferID; + int oldDepthRenderBufferID = depthRenderBufferID; + + // create new fbo + int tempFBO; + glGenFramebuffersEXT(1, &tempFBO); + + // create new render buffers + glGenRenderbuffersEXT(1, &imageRenderBufferID); + glGenRenderbuffersEXT(1, &depthRenderBufferID); + + // switch to new fbo to attach render buffers + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, tempFBO); + + // initialize and attach image render buffer + glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, imageRenderBufferID); + glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, width, height); + glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_RENDERBUFFER_EXT, imageRenderBufferID); + + // initialize and attach depth render buffer + glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, depthRenderBufferID); + glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT24, width, height); + glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, depthRenderBufferID); + + // clear garbage background on new fbo + glClearColor(0.0, 0.0, 0.0, 1.0); + glClear(GL_COLOR_BUFFER_BIT); + + // blit frameBuffer to the new fbo + glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, 0); + glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, tempFBO); + glBlitFramebufferEXT(0, 0, width, height, + 0, 0, width, height, + GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT, + GL_NEAREST); + + glFinish(); // finish before using new fbo and resizing the window + + // set new fbo and its sizes + fboID = tempFBO; + fboWidth = width; + fboHeight = height; + + // set the size of the offscreen frame buffer window + window_info->display_rect = NSMakeRect(0, 0, width, height); + + // clean up the old fbo and renderBuffers + glDeleteFramebuffersEXT(1, &oldFboID); + glDeleteRenderbuffersEXT(1, &oldImageRenderBufferID); + glDeleteRenderbuffersEXT(1, &oldDepthRenderBufferID); + } + else { + glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, 0); + glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, fboID); + + glBlitFramebufferEXT(0, 0, width, height, + 0, 0, width, height, + GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT, + GL_NEAREST); + } + + // restore default framebuffer + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); +} + +-(void)drawInCGLContext:(CGLContextObj)glContext + pixelFormat:(CGLPixelFormatObj)pixelFormat + forLayerTime:(CFTimeInterval)timeInterval + displayTime:(const CVTimeStamp *)timeStamp { + + // set the current context + CGLSetCurrentContext(glContext); + + // get the size of the CALayer/AWT Canvas + int width = self.bounds.size.width; + int height = self.bounds.size.height; + + if (width != fboWidth || height != fboHeight) { + // clear garbage background before lwjgl fbo blit + glClearColor(0.0, 0.0, 0.0, 1.0); + glClear(GL_COLOR_BUFFER_BIT); + } + + // read the LWJGL FBO and blit it into this CALayers FBO + glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, fboID); + glBlitFramebufferEXT(0, 0, width, height, + 0, 0, width, height, + GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT, + GL_NEAREST); + + // call super to finalize the drawing - by default all it does is call glFlush() + [super drawInCGLContext:glContext pixelFormat:pixelFormat forLayerTime:timeInterval displayTime:timeStamp]; +} + +-(BOOL)canDrawInCGLContext:(CGLContextObj)glContext + pixelFormat:(CGLPixelFormatObj)pixelFormat + forLayerTime:(CFTimeInterval)timeInterval + displayTime:(const CVTimeStamp *)timeStamp { + return YES; +} + +- (CGLContextObj)copyCGLContextForPixelFormat:(CGLPixelFormatObj)pixelFormat { + CGLCreateContext(pixelFormat, [window_info->context CGLContextObj], &contextObject); + return contextObject; +} + +- (void)releaseCGLContext:(CGLContextObj)glContext { + CGLClearDrawable(contextObject); + // disable releasing context due to nvidia crash bug when releasing shared contexts + //CGLDestroyContext(contextObject); +} + +- (CGLPixelFormatObj)copyCGLPixelFormatForDisplayMask:(uint32_t)mask { + return CGLGetPixelFormat([window_info->context CGLContextObj]); +} + +- (void)releaseCGLPixelFormat:(CGLPixelFormatObj)pixelFormat { + +} + +@end \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXContextImplementation.h b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXContextImplementation.h new file mode 100644 index 0000000..88e91a8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXContextImplementation.h @@ -0,0 +1,101 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_MacOSXContextImplementation */ + +#ifndef _Included_org_lwjgl_opengl_MacOSXContextImplementation +#define _Included_org_lwjgl_opengl_MacOSXContextImplementation +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_lwjgl_opengl_MacOSXContextImplementation + * Method: nCreate + * Signature: (Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer; + */ +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nCreate + (JNIEnv *, jclass, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_MacOSXContextImplementation + * Method: getCGLShareGroup + * Signature: (Ljava/nio/ByteBuffer;)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_getCGLShareGroup + (JNIEnv *, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_MacOSXContextImplementation + * Method: nSwapBuffers + * Signature: (Ljava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nSwapBuffers + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_MacOSXContextImplementation + * Method: nUpdate + * Signature: (Ljava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nUpdate + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_MacOSXContextImplementation + * Method: nReleaseCurrentContext + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nReleaseCurrentContext + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengl_MacOSXContextImplementation + * Method: clearDrawable + * Signature: (Ljava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_clearDrawable + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_MacOSXContextImplementation + * Method: setView + * Signature: (Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_setView + (JNIEnv *, jclass, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_MacOSXContextImplementation + * Method: nMakeCurrent + * Signature: (Ljava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nMakeCurrent + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_MacOSXContextImplementation + * Method: nIsCurrent + * Signature: (Ljava/nio/ByteBuffer;)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nIsCurrent + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_MacOSXContextImplementation + * Method: nSetSwapInterval + * Signature: (Ljava/nio/ByteBuffer;I)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nSetSwapInterval + (JNIEnv *, jclass, jobject, jint); + +/* + * Class: org_lwjgl_opengl_MacOSXContextImplementation + * Method: nDestroy + * Signature: (Ljava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nDestroy + (JNIEnv *, jclass, jobject); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXContextImplementation.m b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXContextImplementation.m new file mode 100644 index 0000000..cc83f6e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXContextImplementation.m @@ -0,0 +1,242 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * @author elias_naur + * @author kappaOne + * @version $Revision$ + */ + +#import +#import +#import +#import +#import +#import "org_lwjgl_opengl_MacOSXContextImplementation.h" +#import "context.h" +#import "common_tools.h" + +typedef struct { + NSOpenGLContext *context; + MacOSXPeerInfo *peer_info; +} MacOSXContext; + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nCreate + (JNIEnv *env, jclass clazz, jobject peer_info_handle, jobject shared_context_handle) { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + MacOSXPeerInfo *peer_info; + MacOSXContext *shared_context_info; + MacOSXContext *context_info; + NSOpenGLContext *context; + NSOpenGLContext *shared_context = NULL; + + jobject context_handle = newJavaManagedByteBuffer(env, sizeof(MacOSXContext)); + if (context_handle == NULL) { + throwException(env, "Could not create handle buffer"); + return NULL; + } + peer_info = (MacOSXPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + if (shared_context_handle != NULL) { + shared_context_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, shared_context_handle); + shared_context = shared_context_info->context; + } + context = [[NSOpenGLContext alloc] initWithFormat:peer_info->pixel_format shareContext:shared_context]; + if (context == NULL) { + throwException(env, "Could not create context"); + return NULL; + } + + if (peer_info->isWindowed) { + if (peer_info->window_info->fullscreen) { + // set a fixed backbuffer size for fullscreen + CGLContextObj cgcontext = (CGLContextObj)[context CGLContextObj]; + NSSize displaySize = peer_info->window_info->display_rect.size; + GLint dim[2] = {displaySize.width, displaySize.height}; + CGLSetParameter(cgcontext, kCGLCPSurfaceBackingSize, dim); + CGLEnable(cgcontext, kCGLCESurfaceBackingSize); + } + else { + // disable any fixed backbuffer size to allow resizing + CGLContextObj cgcontext = (CGLContextObj)[context CGLContextObj]; + CGLDisable(cgcontext, kCGLCESurfaceBackingSize); + } + + [peer_info->window_info->view setOpenGLContext:context]; + peer_info->window_info->context = context; + } + + context_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle); + context_info->context = context; + context_info->peer_info = peer_info; + + [pool release]; + return context_handle; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_getCGLShareGroup + (JNIEnv *env, jclass clazz, jobject context_handle) { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + MacOSXContext *context_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle); + CGLContextObj cgl_context = [context_info->context CGLContextObj]; + CGLShareGroupObj share_group = CGLGetShareGroup(cgl_context); + [pool release]; + return (jlong)share_group; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nSwapBuffers + (JNIEnv *env, jclass clazz, jobject context_handle) { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + MacOSXContext *context_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle); + [context_info->context flushBuffer]; + + if (context_info->peer_info->isCALayer) { + // blit the contents of buffer to CALayer + [context_info->peer_info->glLayer blitFrameBuffer]; + } + + [pool release]; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nUpdate + (JNIEnv *env, jclass clazz, jobject context_handle) { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + MacOSXContext *context_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle); + [context_info->context update]; + [pool release]; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_clearDrawable +(JNIEnv *env, jclass clazz, jobject context_handle) { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + MacOSXContext *context_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle); + [context_info->context clearDrawable]; + [pool release]; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nReleaseCurrentContext + (JNIEnv *env, jclass clazz) { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + [NSOpenGLContext clearCurrentContext]; + [pool release]; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_setView + (JNIEnv *env, jclass clazz, jobject peer_info_handle, jobject context_handle) { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + MacOSXContext *context_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle); + MacOSXPeerInfo *peer_info = (MacOSXPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + + if (peer_info->isWindowed) { + if (peer_info->isCALayer && [context_info->context view] != peer_info->window_info->view) { + // mark glViewport to be set manually when setting a new context view + peer_info->glLayer->setViewport = YES; + } + + [context_info->context setView: peer_info->window_info->view]; + } + else { + [context_info->context setPixelBuffer:peer_info->pbuffer cubeMapFace:0 mipMapLevel:0 currentVirtualScreen:0]; + } + + if (peer_info->isCALayer) { + // if using a CALayer, attach it to AWT Canvas and create a shared opengl context with current context + [peer_info->glLayer performSelectorOnMainThread:@selector(attachLayer) withObject:nil waitUntilDone:NO]; + } + + [pool release]; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nMakeCurrent + (JNIEnv *env, jclass clazz, jobject context_handle) { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + MacOSXContext *context_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle); + [context_info->context makeCurrentContext]; + + if (context_info->peer_info->isCALayer && context_info->peer_info->glLayer->setViewport) { + context_info->peer_info->glLayer->setViewport = NO; + glViewport(0, 0, [context_info->peer_info->glLayer getWidth], [context_info->peer_info->glLayer getHeight]); + } + + [pool release]; +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nIsCurrent + (JNIEnv *env, jclass clazz, jobject context_handle) { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + MacOSXContext *context_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle); + bool result = context_info->context == [NSOpenGLContext currentContext]; + [pool release]; + return result ? JNI_TRUE : JNI_FALSE; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nSetSwapInterval + (JNIEnv *env, jclass clazz, jobject context_handle, jint int_value) { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + MacOSXContext *context_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle); + GLint value = int_value; + [context_info->context setValues:&value forParameter:NSOpenGLCPSwapInterval]; + [pool release]; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nDestroy + (JNIEnv *env, jclass clazz, jobject context_handle) { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + MacOSXContext *context_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle); + + if (context_info->peer_info->isCALayer) { + context_info->peer_info->isCALayer = false; + [context_info->peer_info->glLayer performSelectorOnMainThread:@selector(removeLayer) withObject:nil waitUntilDone:YES]; + [context_info->peer_info->glLayer release]; + context_info->peer_info->glLayer = nil; + // don't release context due to nvidia driver bug when releasing shared contexts + [context_info->context retain]; + } + + [context_info->context clearDrawable]; + + if (context_info->peer_info->isWindowed) { + [context_info->peer_info->window_info->view setOpenGLContext:nil]; + [context_info->context release]; + context_info->context = nil; + context_info->peer_info->window_info->context = nil; + } + else { + // don't release context due to nvidia driver bug when releasing shared contexts + //[context_info->context release]; + //context_info->context = nil; + } + + [pool release]; +} diff --git a/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXDisplay.h b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXDisplay.h new file mode 100644 index 0000000..98519f0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXDisplay.h @@ -0,0 +1,161 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_MacOSXDisplay */ + +#ifndef _Included_org_lwjgl_opengl_MacOSXDisplay +#define _Included_org_lwjgl_opengl_MacOSXDisplay +#ifdef __cplusplus +extern "C" { +#endif +#undef org_lwjgl_opengl_MacOSXDisplay_PBUFFER_HANDLE_SIZE +#define org_lwjgl_opengl_MacOSXDisplay_PBUFFER_HANDLE_SIZE 24L +#undef org_lwjgl_opengl_MacOSXDisplay_GAMMA_LENGTH +#define org_lwjgl_opengl_MacOSXDisplay_GAMMA_LENGTH 256L +/* + * Class: org_lwjgl_opengl_MacOSXDisplay + * Method: nCreateWindow + * Signature: (IIIIZZZZLjava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer; + */ +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nCreateWindow + (JNIEnv *, jobject, jint, jint, jint, jint, jboolean, jboolean, jboolean, jboolean, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_MacOSXDisplay + * Method: nGetCurrentDisplayMode + * Signature: ()Ljava/lang/Object; + */ +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nGetCurrentDisplayMode + (JNIEnv *, jobject); + +/* + * Class: org_lwjgl_opengl_MacOSXDisplay + * Method: nGetDisplayModes + * Signature: (Ljava/lang/Object;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nGetDisplayModes + (JNIEnv *, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_MacOSXDisplay + * Method: nIsMiniaturized + * Signature: (Ljava/nio/ByteBuffer;)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nIsMiniaturized + (JNIEnv *, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_MacOSXDisplay + * Method: nIsFocused + * Signature: (Ljava/nio/ByteBuffer;)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nIsFocused + (JNIEnv *, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_MacOSXDisplay + * Method: nSetResizable + * Signature: (Ljava/nio/ByteBuffer;Z)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nSetResizable + (JNIEnv *, jobject, jobject, jboolean); + +/* + * Class: org_lwjgl_opengl_MacOSXDisplay + * Method: nResizeWindow + * Signature: (Ljava/nio/ByteBuffer;IIII)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nResizeWindow + (JNIEnv *, jobject, jobject, jint, jint, jint, jint); + +/* + * Class: org_lwjgl_opengl_MacOSXDisplay + * Method: nWasResized + * Signature: (Ljava/nio/ByteBuffer;)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nWasResized + (JNIEnv *, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_MacOSXDisplay + * Method: nGetX + * Signature: (Ljava/nio/ByteBuffer;)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nGetX + (JNIEnv *, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_MacOSXDisplay + * Method: nGetY + * Signature: (Ljava/nio/ByteBuffer;)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nGetY + (JNIEnv *, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_MacOSXDisplay + * Method: nGetWidth + * Signature: (Ljava/nio/ByteBuffer;)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nGetWidth + (JNIEnv *, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_MacOSXDisplay + * Method: nGetHeight + * Signature: (Ljava/nio/ByteBuffer;)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nGetHeight + (JNIEnv *, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_MacOSXDisplay + * Method: nIsNativeMode + * Signature: (Ljava/nio/ByteBuffer;)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nIsNativeMode + (JNIEnv *, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_MacOSXDisplay + * Method: nDestroyCALayer + * Signature: (Ljava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nDestroyCALayer + (JNIEnv *, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_MacOSXDisplay + * Method: nDestroyWindow + * Signature: (Ljava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nDestroyWindow + (JNIEnv *, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_MacOSXDisplay + * Method: setGammaRamp + * Signature: (Ljava/nio/FloatBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_setGammaRamp + (JNIEnv *, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_MacOSXDisplay + * Method: restoreGamma + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_restoreGamma + (JNIEnv *, jobject); + +/* + * Class: org_lwjgl_opengl_MacOSXDisplay + * Method: nSetTitle + * Signature: (Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXDisplay_nSetTitle + (JNIEnv *, jobject, jobject, jobject); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXMouseEventQueue.h b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXMouseEventQueue.h new file mode 100644 index 0000000..20c8579 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXMouseEventQueue.h @@ -0,0 +1,43 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_MacOSXMouseEventQueue */ + +#ifndef _Included_org_lwjgl_opengl_MacOSXMouseEventQueue +#define _Included_org_lwjgl_opengl_MacOSXMouseEventQueue +#ifdef __cplusplus +extern "C" { +#endif +#undef org_lwjgl_opengl_MacOSXMouseEventQueue_QUEUE_SIZE +#define org_lwjgl_opengl_MacOSXMouseEventQueue_QUEUE_SIZE 200L +#undef org_lwjgl_opengl_MacOSXMouseEventQueue_WHEEL_SCALE +#define org_lwjgl_opengl_MacOSXMouseEventQueue_WHEEL_SCALE 120L +#undef org_lwjgl_opengl_MacOSXMouseEventQueue_NUM_BUTTONS +#define org_lwjgl_opengl_MacOSXMouseEventQueue_NUM_BUTTONS 3L +/* + * Class: org_lwjgl_opengl_MacOSXMouseEventQueue + * Method: getMouseDeltas + * Signature: (Ljava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXMouseEventQueue_getMouseDeltas + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_MacOSXMouseEventQueue + * Method: nWarpCursor + * Signature: (II)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXMouseEventQueue_nWarpCursor + (JNIEnv *, jclass, jint, jint); + +/* + * Class: org_lwjgl_opengl_MacOSXMouseEventQueue + * Method: nGrabMouse + * Signature: (Z)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXMouseEventQueue_nGrabMouse + (JNIEnv *, jclass, jboolean); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXNativeKeyboard.h b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXNativeKeyboard.h new file mode 100644 index 0000000..18ebf07 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXNativeKeyboard.h @@ -0,0 +1,31 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_MacOSXNativeKeyboard */ + +#ifndef _Included_org_lwjgl_opengl_MacOSXNativeKeyboard +#define _Included_org_lwjgl_opengl_MacOSXNativeKeyboard +#ifdef __cplusplus +extern "C" { +#endif +#undef org_lwjgl_opengl_MacOSXNativeKeyboard_QUEUE_SIZE +#define org_lwjgl_opengl_MacOSXNativeKeyboard_QUEUE_SIZE 200L +/* + * Class: org_lwjgl_opengl_MacOSXNativeKeyboard + * Method: nRegisterKeyListener + * Signature: (Ljava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXNativeKeyboard_nRegisterKeyListener + (JNIEnv *, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_MacOSXNativeKeyboard + * Method: nUnregisterKeyListener + * Signature: (Ljava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXNativeKeyboard_nUnregisterKeyListener + (JNIEnv *, jobject, jobject); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXNativeKeyboard.m b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXNativeKeyboard.m new file mode 100644 index 0000000..319351a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXNativeKeyboard.m @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id: org_lwjgl_opengl_MacOSXNativeKeyboard.m 3055 2012-08-29 0:46:00Z mojang $ + * + * Mac OS X native keyboard functions. + * + * @author mojang + * @version $Revision: 3055 $ + */ + +#import +#import +#import +#import +#import "common_tools.h" +#import "org_lwjgl_opengl_MacOSXNativeKeyboard.h" +#import "context.h" + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXNativeKeyboard_nRegisterKeyListener(JNIEnv *env, jobject this, jobject window_handle) { + MacOSXWindowInfo *window_info = (MacOSXWindowInfo *)(*env)->GetDirectBufferAddress(env, window_handle); + window_info->jkeyboard = (*env)->NewGlobalRef(env, this); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXNativeKeyboard_nUnregisterKeyListener(JNIEnv *env, jobject this, jobject window_handle) { + MacOSXWindowInfo *window_info = (MacOSXWindowInfo *)(*env)->GetDirectBufferAddress(env, window_handle); + window_info->jkeyboard = NULL; +} diff --git a/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXNativeMouse.h b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXNativeMouse.h new file mode 100644 index 0000000..1bd9769 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXNativeMouse.h @@ -0,0 +1,75 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_MacOSXNativeMouse */ + +#ifndef _Included_org_lwjgl_opengl_MacOSXNativeMouse +#define _Included_org_lwjgl_opengl_MacOSXNativeMouse +#ifdef __cplusplus +extern "C" { +#endif +#undef org_lwjgl_opengl_MacOSXNativeMouse_QUEUE_SIZE +#define org_lwjgl_opengl_MacOSXNativeMouse_QUEUE_SIZE 200L +#undef org_lwjgl_opengl_MacOSXNativeMouse_WHEEL_SCALE +#define org_lwjgl_opengl_MacOSXNativeMouse_WHEEL_SCALE 120L +#undef org_lwjgl_opengl_MacOSXNativeMouse_NUM_BUTTONS +#define org_lwjgl_opengl_MacOSXNativeMouse_NUM_BUTTONS 3L +/* + * Class: org_lwjgl_opengl_MacOSXNativeMouse + * Method: nSetCursorPosition + * Signature: (Ljava/nio/ByteBuffer;II)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXNativeMouse_nSetCursorPosition + (JNIEnv *, jobject, jobject, jint, jint); + +/* + * Class: org_lwjgl_opengl_MacOSXNativeMouse + * Method: nGrabMouse + * Signature: (Z)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXNativeMouse_nGrabMouse + (JNIEnv *, jclass, jboolean); + +/* + * Class: org_lwjgl_opengl_MacOSXNativeMouse + * Method: nRegisterMouseListener + * Signature: (Ljava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXNativeMouse_nRegisterMouseListener + (JNIEnv *, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_MacOSXNativeMouse + * Method: nUnregisterMouseListener + * Signature: (Ljava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXNativeMouse_nUnregisterMouseListener + (JNIEnv *, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_MacOSXNativeMouse + * Method: nCreateCursor + * Signature: (IIIIILjava/nio/IntBuffer;ILjava/nio/IntBuffer;I)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_MacOSXNativeMouse_nCreateCursor + (JNIEnv *, jclass, jint, jint, jint, jint, jint, jobject, jint, jobject, jint); + +/* + * Class: org_lwjgl_opengl_MacOSXNativeMouse + * Method: nDestroyCursor + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXNativeMouse_nDestroyCursor + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengl_MacOSXNativeMouse + * Method: nSetCursor + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXNativeMouse_nSetCursor + (JNIEnv *, jclass, jlong); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXNativeMouse.m b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXNativeMouse.m new file mode 100644 index 0000000..2f7455c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXNativeMouse.m @@ -0,0 +1,170 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id: org_lwjgl_opengl_MacOSXNativeKeyboard.m 3055 2012-08-29 0:46:00Z mojang $ + * + * Mac OS X native keyboard functions. + * + * @author mojang + * @author kappaOne + * @version $Revision: 3055 $ + */ + +#import +#import +#import +#import +#import "common_tools.h" +#import "org_lwjgl_opengl_MacOSXNativeMouse.h" +#import "context.h" + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXNativeMouse_nGrabMouse(JNIEnv *env, jclass this, jboolean grab) { + CGAssociateMouseAndMouseCursorPosition(grab == JNI_TRUE ? FALSE : TRUE); + if (grab) { + CGDisplayHideCursor(kCGDirectMainDisplay); + } + else { + CGDisplayShowCursor(kCGDirectMainDisplay); + } +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXNativeMouse_nSetCursorPosition(JNIEnv *env, jclass this, jobject window_handle, jint x, jint y) { + MacOSXWindowInfo *window_info = (MacOSXWindowInfo *)(*env)->GetDirectBufferAddress(env, window_handle); + + CGPoint p; + + if (window_info->fullscreen) { + NSPoint point = NSMakePoint(x, y); + + // convert point to window/screen coordinates + point = [window_info->view convertPoint:point fromView:nil]; + + p.x = point.x; + p.y = point.y; + } + else { + NSRect screenRect = [[window_info->window screen] frame]; + NSRect viewRect = [window_info->view frame]; + NSRect winRect = [window_info->window frame]; + + // get window coords of the view origin + NSPoint viewPoint = [window_info->view convertPoint:viewRect.origin fromView:nil]; + + // convert y to screen coordinates, origin bottom left + p.y = winRect.origin.y + viewPoint.y + (viewRect.size.height - y - 1); + + p.x = winRect.origin.x + viewPoint.x + x; + // flip y coordinates (origin top left) to allow use with CGDisplayMoveCursorToPoint + p.y = screenRect.size.height - p.y - 1; + } + + CGDisplayMoveCursorToPoint(CGMainDisplayID(), p); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXNativeMouse_nRegisterMouseListener(JNIEnv *env, jobject _this, jobject window_handle) { + MacOSXWindowInfo *window_info = (MacOSXWindowInfo *)(*env)->GetDirectBufferAddress(env, window_handle); + [window_info->window setAcceptsMouseMovedEvents:YES]; + window_info->jmouse = (*env)->NewGlobalRef(env, _this); + + // since initial mouse location is not reported until mouse is moved + // manually get the mouse location and report it with a fake event + NSPoint mouseLocation = [window_info->window mouseLocationOutsideOfEventStream]; + mouseLocation = [window_info->view convertPoint:mouseLocation fromView:nil]; + + NSEvent *mouseLocationEvent = [NSEvent + mouseEventWithType:NSMouseMoved + location:mouseLocation + modifierFlags:NSMouseMovedMask + timestamp:0 + windowNumber:[window_info->window windowNumber] + context:nil + eventNumber:0 + clickCount:0 + pressure:0]; + + [window_info->view mouseMoved:mouseLocationEvent]; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXNativeMouse_nUnregisterMouseListener(JNIEnv *env, jobject this, jobject window_handle) { + MacOSXWindowInfo *window_info = (MacOSXWindowInfo *)(*env)->GetDirectBufferAddress(env, window_handle); + [window_info->window setAcceptsMouseMovedEvents:NO]; + window_info->jmouse = nil; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_MacOSXNativeMouse_nCreateCursor(JNIEnv *env, jobject _this, jint width, jint height, jint x_hotspot, jint y_hotspot, jint num_images, jobject image_buffer, jint images_offset, jobject delay_buffer, jint delays_offset) { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + jlong *bytes = (jint *)(*env)->GetDirectBufferAddress(env, image_buffer) + images_offset; + + NSBitmapImageRep *bitmap = [[[NSBitmapImageRep alloc] + initWithBitmapDataPlanes:NULL + pixelsWide:width pixelsHigh:height + bitsPerSample:8 + samplesPerPixel:4 + hasAlpha:YES + isPlanar:NO + colorSpaceName:NSDeviceRGBColorSpace + bitmapFormat:NSAlphaNonpremultipliedBitmapFormat + bytesPerRow:width*4 + bitsPerPixel:32] autorelease]; + memcpy((void*)bitmap.bitmapData, (void*)bytes, width*height*4); + + NSImage *image = [[[NSImage alloc] initWithSize:NSMakeSize(width, height)] autorelease]; + + [image addRepresentation:bitmap]; + + + NSCursor *cursor = [[NSCursor alloc] initWithImage:image hotSpot:NSMakePoint(x_hotspot, y_hotspot)]; + + [pool release]; + + return (jlong)cursor; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXNativeMouse_nDestroyCursor(JNIEnv *env, jobject _this, jlong cursor_pointer) { + if (cursor_pointer != 0) { + NSCursor *cursor = (NSCursor *)cursor_pointer; + [cursor release]; + } +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXNativeMouse_nSetCursor(JNIEnv *env, jobject _this, jlong cursor_pointer) { + if (cursor_pointer == 0) { + // restore default cursor + [[NSCursor arrowCursor] performSelectorOnMainThread:@selector(set) withObject:nil waitUntilDone:NO]; + } + else { + NSCursor *cursor = (NSCursor *)cursor_pointer; + [cursor performSelectorOnMainThread:@selector(set) withObject:nil waitUntilDone:NO]; + } +} diff --git a/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXPbufferPeerInfo.h b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXPbufferPeerInfo.h new file mode 100644 index 0000000..0f4c385 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXPbufferPeerInfo.h @@ -0,0 +1,29 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_MacOSXPbufferPeerInfo */ + +#ifndef _Included_org_lwjgl_opengl_MacOSXPbufferPeerInfo +#define _Included_org_lwjgl_opengl_MacOSXPbufferPeerInfo +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_lwjgl_opengl_MacOSXPbufferPeerInfo + * Method: nCreate + * Signature: (Ljava/nio/ByteBuffer;II)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXPbufferPeerInfo_nCreate + (JNIEnv *, jclass, jobject, jint, jint); + +/* + * Class: org_lwjgl_opengl_MacOSXPbufferPeerInfo + * Method: nDestroy + * Signature: (Ljava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXPbufferPeerInfo_nDestroy + (JNIEnv *, jclass, jobject); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXPbufferPeerInfo.m b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXPbufferPeerInfo.m new file mode 100644 index 0000000..3dd0f0b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXPbufferPeerInfo.m @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * @author elias_naur + * @version $Revision$ + */ + +#import +#import +#import "org_lwjgl_opengl_MacOSXPbufferPeerInfo.h" +#import "context.h" +#import "common_tools.h" + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXPbufferPeerInfo_nCreate(JNIEnv *env, jclass clazz, jobject peer_info_handle, jint width, jint height) { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + NSOpenGLPixelBuffer *pbuffer = nil; + // check if the texture is power of 2 + if ( (( width > 0 ) && ( width & ( width-1)) == 0) || (( height > 0 ) && ( height & ( height-1)) == 0) ) + { + pbuffer = [[NSOpenGLPixelBuffer alloc] initWithTextureTarget:GL_TEXTURE_2D + textureInternalFormat:GL_RGBA + textureMaxMipMapLevel:0 + pixelsWide:width + pixelsHigh:height]; + } + else + { + pbuffer = [[NSOpenGLPixelBuffer alloc] initWithTextureTarget:GL_TEXTURE_RECTANGLE_EXT + textureInternalFormat:GL_RGBA + textureMaxMipMapLevel:0 + pixelsWide:width + pixelsHigh:height]; + } + MacOSXPeerInfo *peer_info = (MacOSXPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + peer_info->pbuffer = pbuffer; + peer_info->isWindowed = false; + [pool release]; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXPbufferPeerInfo_nDestroy + (JNIEnv *env, jclass clazz, jobject peer_info_handle) { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + MacOSXPeerInfo *peer_info = (MacOSXPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + [peer_info->pbuffer release]; + [pool release]; +} diff --git a/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXPeerInfo.h b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXPeerInfo.h new file mode 100644 index 0000000..8344cc9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXPeerInfo.h @@ -0,0 +1,37 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_MacOSXPeerInfo */ + +#ifndef _Included_org_lwjgl_opengl_MacOSXPeerInfo +#define _Included_org_lwjgl_opengl_MacOSXPeerInfo +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_lwjgl_opengl_MacOSXPeerInfo + * Method: createHandle + * Signature: ()Ljava/nio/ByteBuffer; + */ +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_MacOSXPeerInfo_createHandle + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengl_MacOSXPeerInfo + * Method: nChoosePixelFormat + * Signature: (Ljava/nio/ByteBuffer;Lorg/lwjgl/opengl/PixelFormat;ZZZZZ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXPeerInfo_nChoosePixelFormat + (JNIEnv *, jclass, jobject, jobject, jboolean, jboolean, jboolean, jboolean, jboolean); + +/* + * Class: org_lwjgl_opengl_MacOSXPeerInfo + * Method: nDestroy + * Signature: (Ljava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXPeerInfo_nDestroy + (JNIEnv *, jclass, jobject); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXPeerInfo.m b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXPeerInfo.m new file mode 100644 index 0000000..f06991d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/macosx/org_lwjgl_opengl_MacOSXPeerInfo.m @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * @author elias_naur + * @version $Revision$ + */ + +#import +#import +#import "org_lwjgl_opengl_MacOSXPeerInfo.h" +#import "context.h" +#import "common_tools.h" + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_MacOSXPeerInfo_createHandle + (JNIEnv *env, jclass clazz) { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + jobject handle = newJavaManagedByteBuffer(env, sizeof(MacOSXPeerInfo)); + [pool release]; + return handle; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXPeerInfo_nChoosePixelFormat + (JNIEnv *env, jclass clazz, jobject peer_info_handle, jobject pixel_format, jboolean gl32, jboolean use_display_bpp, jboolean support_window, jboolean support_pbuffer, jboolean double_buffered) { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + MacOSXPeerInfo *peer_info = (MacOSXPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + NSOpenGLPixelFormat *macosx_pixel_format = choosePixelFormat(env, pixel_format, gl32, use_display_bpp, support_window, support_pbuffer, double_buffered); + if (pixel_format == nil) { + throwException(env, "Could not find pixel format"); + return; + } + peer_info->pixel_format = macosx_pixel_format; + [pool release]; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXPeerInfo_nDestroy + (JNIEnv *env, jclass clazz, jobject peer_info_handle) { + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + MacOSXPeerInfo *peer_info = (MacOSXPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + [peer_info->pixel_format release]; + [pool release]; +} diff --git a/etc/lwjgl-2.9.1/src/native/windows/LWJGL.c b/etc/lwjgl-2.9.1/src/native/windows/LWJGL.c new file mode 100644 index 0000000..e5f93b7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/LWJGL.c @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Basic DLL stub. + * + * @author cix_foo + * @version $Revision$ + */ + +#define WIN32_LEAN_AND_MEAN +#include +#include +#include +#include "org_lwjgl_opengl_WindowsDisplay.h" + +HINSTANCE dll_handle; + +/* + * DLL entry point for Windows. Called when Java loads the .dll + */ +BOOL WINAPI DllMain( + HINSTANCE hinstDLL, // handle to DLL module + DWORD fdwReason, // reason for calling function + LPVOID lpvReserved // reserved + ) +{ + dll_handle = hinstDLL; + return TRUE; // Success +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDisplay_getDllInstance(JNIEnv *env, jclass unused) { + return (LONG_PTR)dll_handle; +} diff --git a/etc/lwjgl-2.9.1/src/native/windows/Window.h b/etc/lwjgl-2.9.1/src/native/windows/Window.h new file mode 100644 index 0000000..1f4db9b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/Window.h @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Include file to access public window features + * + * @author cix_foo + * @version $Revision$ + */ +#ifndef _LWJGL_WINDOW_H_INCLUDED_ + #define _LWJGL_WINDOW_H_INCLUDED_ + + #define WIN32_LEAN_AND_MEAN + #ifndef _WIN32_WINDOWS + #define _WIN32_WINDOWS 0x0500 + #endif + #ifndef WINVER + #define WINVER 0x0500 + #endif + #ifndef _WIN32_WINNT + #define _WIN32_WINNT 0x0400 + #endif + + #define _UNICODE + #include + + #define UNICODE + #include + #include + #include "common_tools.h" + + #ifdef _PRIVATE_WINDOW_H_ + #define WINDOW_H_API + #else + #define WINDOW_H_API extern + #endif /* _PRIVATE_WINDOW_H_ */ + +#endif /* _LWJGL_WINDOW_H_INCLUDED_ */ diff --git a/etc/lwjgl-2.9.1/src/native/windows/display.c b/etc/lwjgl-2.9.1/src/native/windows/display.c new file mode 100644 index 0000000..5ea487a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/display.c @@ -0,0 +1,277 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Windows specific library for display handling. + * + * @author cix_foo + * @version $Revision$ + */ + +#include +#include +#include "org_lwjgl_opengl_WindowsDisplay.h" +#include "display.h" +#include "common_tools.h" + +static jobject createDisplayMode(JNIEnv *env, DEVMODE *devmode) { + jclass displayModeClass; + + jmethodID displayModeConstructor; + + displayModeClass = (*env)->FindClass(env, "org/lwjgl/opengl/DisplayMode"); + if (displayModeClass == NULL) + return NULL; + displayModeConstructor = (*env)->GetMethodID(env, displayModeClass, "", "(IIII)V"); + if (displayModeConstructor == NULL) + return NULL; + + return (*env)->NewObject(env, displayModeClass, displayModeConstructor, + devmode->dmPelsWidth, devmode->dmPelsHeight, + devmode->dmBitsPerPel, devmode->dmDisplayFrequency); +} + +/** + * Choose displaymodes using extended codepath (multiple displaydevices) + */ +jobjectArray getAvailableDisplayModes(JNIEnv * env) { + + int i = 0, j = 0, n = 0; + +// DISPLAY_DEVICE DisplayDevice; + DEVMODE DevMode; + jobject *display_mode_objects = NULL; + int list_size = 0; + + jclass displayModeClass; + jobjectArray ret; + displayModeClass = (*env)->FindClass(env, "org/lwjgl/opengl/DisplayMode"); + + ZeroMemory(&DevMode, sizeof(DEVMODE)); +// ZeroMemory(&DisplayDevice, sizeof(DISPLAY_DEVICE)); + + DevMode.dmSize = sizeof(DEVMODE); +// DisplayDevice.cb = sizeof(DISPLAY_DEVICE); + + /* Multi-monitor stuff commented out since we're only really interested in the primary monitor */ +/* while(EnumDisplayDevices(NULL, i++, &DisplayDevice, 0) != 0) { + // continue if mirroring device + if((DisplayDevice.StateFlags & DISPLAY_DEVICE_MIRRORING_DRIVER) != 0) { + continue; + } + + j = 0; + while(EnumDisplaySettings((const char *) DisplayDevice.DeviceName, j++, &DevMode) != 0) {*/ + while(EnumDisplaySettings(NULL, j++, &DevMode) != 0) { + // Filter out indexed modes + if (DevMode.dmBitsPerPel > 8 && ChangeDisplaySettings(&DevMode, CDS_FULLSCREEN | CDS_TEST) == DISP_CHANGE_SUCCESSFUL) { + jobject displayMode; + if (list_size <= n) { + list_size += 1; + display_mode_objects = (jobject *)realloc(display_mode_objects, sizeof(jobject)*list_size); + if (display_mode_objects == NULL) + return NULL; + } + displayMode = createDisplayMode(env, &DevMode); + display_mode_objects[n++] = displayMode; + } + } +// } + printfDebugJava(env, "Found %d displaymodes", n); + + ret = (*env)->NewObjectArray(env, n, displayModeClass, NULL); + for (i = 0; i < n; i++) { + (*env)->SetObjectArrayElement(env, ret, i, display_mode_objects[i]); + } + free(display_mode_objects); + return ret; +} + +void switchDisplayMode(JNIEnv * env, jobject mode) { + DEVMODE devmode; + + jclass cls_displayMode = (*env)->GetObjectClass(env, mode); + jfieldID fid_width = (*env)->GetFieldID(env, cls_displayMode, "width", "I"); + jfieldID fid_height = (*env)->GetFieldID(env, cls_displayMode, "height", "I"); + jfieldID fid_bpp = (*env)->GetFieldID(env, cls_displayMode, "bpp", "I"); + jfieldID fid_freq = (*env)->GetFieldID(env, cls_displayMode, "freq", "I"); + + int width = (*env)->GetIntField(env, mode, fid_width); + int height = (*env)->GetIntField(env, mode, fid_height); + int bpp = (*env)->GetIntField(env, mode, fid_bpp); + int freq = (*env)->GetIntField(env, mode, fid_freq); + LONG cdsret; + + ZeroMemory(&devmode, sizeof(DEVMODE)); + devmode.dmSize = sizeof(DEVMODE); + devmode.dmBitsPerPel = bpp; + devmode.dmPelsWidth = width; + devmode.dmPelsHeight = height; + devmode.dmDisplayFrequency = freq; + devmode.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT; + if (freq != 0) + devmode.dmFields |= DM_DISPLAYFREQUENCY; + cdsret = ChangeDisplaySettings(&devmode, CDS_FULLSCREEN); + + if (cdsret != DISP_CHANGE_SUCCESSFUL) { + /* What's the proper way to do this multiply with 2 thing, if at all necessary? */ +/* // Failed: so let's check to see if it's a wierd dual screen display + printfDebugJava(env, "Failed to set display mode (%ld) ... assuming dual monitors", cdsret); + devmode.dmPelsWidth = width * 2; + cdsret = ChangeDisplaySettings(&devmode, CDS_FULLSCREEN); + + if (cdsret != DISP_CHANGE_SUCCESSFUL) { + printfDebugJava(env, "Failed to set display mode using dual monitors (%ld)", cdsret);*/ + throwFormattedException(env, "Failed to set display mode (%ld).", cdsret); + return; +// } + } +} + +static jobject createNativeGammaBuffer(JNIEnv *env) { + return newJavaManagedByteBuffer(env, sizeof(WORD)*3*org_lwjgl_opengl_WindowsDisplay_GAMMA_LENGTH); +} + +jobject getCurrentGammaRamp(JNIEnv *env) { + jobject gamma_buffer; + WORD *gamma; + HDC screenDC; + + gamma_buffer = createNativeGammaBuffer(env); + if (gamma_buffer == NULL) + return NULL; + gamma = (WORD *)(*env)->GetDirectBufferAddress(env, gamma_buffer); + + // Get the screen + screenDC = GetDC(NULL); + if (screenDC == NULL) { + throwException(env, "Couldn't get screen DC!"); + return NULL; + } + // Get the default gamma ramp + if (GetDeviceGammaRamp(screenDC, gamma) == FALSE) { + printfDebugJava(env, "Failed to get initial device gamma"); + } + ReleaseDC(NULL, screenDC); + return gamma_buffer; +} + +void setGammaRamp(JNIEnv * env, jobject gammaRampBuffer) { + HDC screenDC; + WORD *gammaRamp = (WORD *)(*env)->GetDirectBufferAddress(env, gammaRampBuffer); + + screenDC = GetDC(NULL); + if (SetDeviceGammaRamp(screenDC, gammaRamp) == FALSE) { + throwException(env, "Failed to set device gamma."); + } + ReleaseDC(NULL, screenDC); +} + +jobject convertToNativeRamp(JNIEnv *env, jobject float_gamma_obj) { + int i; + float scaledRampEntry; + WORD rampEntry; + const float *gammaRamp = (const float *)(*env)->GetDirectBufferAddress(env, float_gamma_obj); + jint gamma_ramp_length = (jint)(*env)->GetDirectBufferCapacity(env, float_gamma_obj); + jobject native_ramp; + WORD *native_ramp_buffer; + + native_ramp = createNativeGammaBuffer(env); + if (native_ramp == NULL) + return NULL; + native_ramp_buffer = (WORD *)(*env)->GetDirectBufferAddress(env, native_ramp); + // Turn array of floats into array of RGB WORDs + + for (i = 0; i < gamma_ramp_length; i++) { + scaledRampEntry = gammaRamp[i]*0xffff; + rampEntry = (WORD)scaledRampEntry; + native_ramp_buffer[i] = rampEntry; + native_ramp_buffer[i + org_lwjgl_opengl_WindowsDisplay_GAMMA_LENGTH] = rampEntry; + native_ramp_buffer[i + 2*org_lwjgl_opengl_WindowsDisplay_GAMMA_LENGTH] = rampEntry; + } + return native_ramp; +} + +jobject getCurrentDisplayMode(JNIEnv * env) { + DEVMODE devmode; + if (!EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &devmode)) { + throwFormattedException(env, "Couldn't get current display settings (%ld)", GetLastError()); + return NULL; + } + return createDisplayMode(env, &devmode); +} + +void resetDisplayMode(JNIEnv * env) { + // Under Windows, all we have to do is: + ChangeDisplaySettings(NULL, 0); +} + +jobject getVersion(JNIEnv * env, char *driver) +{ + DWORD var = 0; + DWORD dwInfoSize; + LPVOID lpInfoBuff; + BOOL bRetval; + jclass version_class; + jmethodID version_cons; + jobject ret = NULL; + + version_class = (*env)->FindClass(env, "org/lwjgl/opengl/WindowsFileVersion"); + if (version_class == NULL) + return NULL; + version_cons = (*env)->GetMethodID(env, version_class, "", "(II)V"); + if (version_cons == NULL) + return NULL; + + dwInfoSize = GetFileVersionInfoSize(driver, &var); + lpInfoBuff = malloc(dwInfoSize); + if (lpInfoBuff == NULL) { + throwException(env, "Failed to allocate lpInfoBuff"); + return NULL; + } + bRetval = GetFileVersionInfo(driver, 0, dwInfoSize, lpInfoBuff); + if (bRetval != 0) { + VS_FIXEDFILEINFO * fxdFileInfo; + + UINT uiLen = 0; + bRetval = VerQueryValue(lpInfoBuff, TEXT("\\"), (void *)&fxdFileInfo, &uiLen); + if (bRetval != 0) + ret = (*env)->NewObject(env, version_class, version_cons, fxdFileInfo->dwProductVersionMS, fxdFileInfo->dwProductVersionLS); + } + + free(lpInfoBuff); + + return ret; +} + diff --git a/etc/lwjgl-2.9.1/src/native/windows/display.h b/etc/lwjgl-2.9.1/src/native/windows/display.h new file mode 100644 index 0000000..9a5eb77 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/display.h @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Windows specific library for display handling. + * + * @author cix_foo + * @version $Revision$ + */ + +#ifndef _DISPLAY_H +#define _DISPLAY_H + +#include + +extern jobjectArray getAvailableDisplayModes(JNIEnv *env); +extern void switchDisplayMode(JNIEnv * env, jobject mode); +extern void resetDisplayMode(JNIEnv * env); +extern void restoreDisplayMode(void); +extern void setGammaRamp(JNIEnv * env, jobject gammaRampBuffer); +extern jobject getCurrentGammaRamp(JNIEnv *env); +extern jobject getCurrentDisplayMode(JNIEnv * env); +extern jobject getVersion(JNIEnv * env, char *driver); +extern jobject convertToNativeRamp(JNIEnv *env, jobject float_gamma_obj); + +#endif diff --git a/etc/lwjgl-2.9.1/src/native/windows/opengl/WGL.c b/etc/lwjgl-2.9.1/src/native/windows/opengl/WGL.c new file mode 100644 index 0000000..b4fde7f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/opengl/WGL.c @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * WGL extension implementations. + * + * @author Spasi + */ +#include "WGL.h" + +/* NV_present_video functions */ + +jint extgl_EnumerateVideoDevicesNV(JNIEnv *env, jobject peer_info_handle, jobject devices, jint devices_position) { + WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + HVIDEOOUTPUTDEVICENV *devices_address = ((HVIDEOOUTPUTDEVICENV *)safeGetBufferAddress(env, devices)) + devices_position; + + return peer_info->extensions.wglEnumerateVideoDevicesNV(peer_info->drawable_hdc, devices_address); +} + +jboolean extgl_BindVideoDeviceNV(JNIEnv *env, jobject peer_info_handle, jint video_slot, jlong video_device, jobject attrib_list, jint attrib_list_position) { + WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + const int *attrib_list_address = ((const int *)safeGetBufferAddress(env, attrib_list)) + attrib_list_position; + + return peer_info->extensions.wglBindVideoDeviceNV(peer_info->drawable_hdc, video_slot, video_device == 0 ? INVALID_HANDLE_VALUE : (HVIDEOOUTPUTDEVICENV)(intptr_t)video_device, attrib_list_address); +} + +jboolean extgl_QueryContextNV(JNIEnv *env, jobject peer_info_handle, jobject context_handle, jint attrib, jobject value, jint value_position) { + WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + int *value_address = ((int *)(*env)->GetDirectBufferAddress(env, value)) + value_position; + + return peer_info->extensions.wglQueryCurrentContextNV(attrib, value_address); +} + +/* NV_video_capture functions */ + +jboolean extgl_BindVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jint video_slot, jlong device) { + WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + + return peer_info->extensions.wglBindVideoCaptureDeviceNV(video_slot, (HVIDEOINPUTDEVICENV)(intptr_t)device); +} + +jint extgl_EnumerateVideoCaptureDevicesNV(JNIEnv *env, jobject peer_info_handle, jobject devices, jint devices_position) { + WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + HVIDEOINPUTDEVICENV *devices_address = ((HVIDEOINPUTDEVICENV *)safeGetBufferAddress(env, devices)) + devices_position; + + return peer_info->extensions.wglEnumerateVideoCaptureDevicesNV(peer_info->drawable_hdc, devices_address); +} + +jboolean extgl_LockVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device) { + WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + + return peer_info->extensions.wglLockVideoCaptureDeviceNV(peer_info->drawable_hdc, (HVIDEOINPUTDEVICENV)(intptr_t)device); +} + +jboolean extgl_QueryVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device, jint attribute, jobject value, jint value_position) { + WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + int *value_address = ((int *)(*env)->GetDirectBufferAddress(env, value)) + value_position; + + return peer_info->extensions.wglQueryVideoCaptureDeviceNV(peer_info->drawable_hdc, (HVIDEOINPUTDEVICENV)(intptr_t)device, attribute, value_address); +} + +jboolean extgl_ReleaseVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device) { + WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + + return peer_info->extensions.wglReleaseVideoCaptureDeviceNV(peer_info->drawable_hdc, (HVIDEOINPUTDEVICENV)(intptr_t)device); +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/native/windows/opengl/WGL.h b/etc/lwjgl-2.9.1/src/native/windows/opengl/WGL.h new file mode 100644 index 0000000..6a00e2d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/opengl/WGL.h @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * WGL extension implementations. + * + * @author Spasi + */ +#ifndef __LWJGL_WGL_H +#define __LWJGL_WGL_H + +#include +#include "common_tools.h" +#include "context.h" + +#include "extgl.h" +#include "extgl_wgl.h" + +/* NV_present_video functions */ +extern jint extgl_EnumerateVideoDevicesNV(JNIEnv *env, jobject peer_info_handle, jobject devices, jint devices_position); +extern jboolean extgl_BindVideoDeviceNV(JNIEnv *env, jobject peer_info_handle, jint video_slot, jlong video_device, jobject attrib_list, jint attrib_list_position); +extern jboolean extgl_QueryContextNV(JNIEnv *env, jobject peer_info_handle, jobject context_handle, jint attrib, jobject value, jint value_position); + +/* NV_video_capture functions */ +extern jboolean extgl_BindVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jint video_slot, jlong device); +extern jint extgl_EnumerateVideoCaptureDevicesNV(JNIEnv *env, jobject peer_info_handle, jobject devices, jint devices_position); +extern jboolean extgl_LockVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device); +extern jboolean extgl_QueryVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device, jint attribute, jobject value, jint value_position); +extern jboolean extgl_ReleaseVideoCaptureDeviceNV(JNIEnv *env, jobject peer_info_handle, jlong device); + +#endif \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/native/windows/opengl/context.c b/etc/lwjgl-2.9.1/src/native/windows/opengl/context.c new file mode 100644 index 0000000..97c54b7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/opengl/context.c @@ -0,0 +1,501 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * @author elias_naue + * @version $Revision$ + */ + +#include +#include "Window.h" +#include "extgl.h" +#include "extgl_wgl.h" +#include "context.h" + +extern HINSTANCE dll_handle; // Handle to the LWJGL dll + +#define _CONTEXT_PRIVATE_CLASS_NAME _T("__lwjgl_context_class_name") + +/* + * Register the LWJGL window class. + * Returns true for success, or false for failure + */ +bool registerWindow(WNDPROC win_proc, LPCTSTR class_name) +{ + WNDCLASS windowClass; + memset(&windowClass, 0, sizeof(windowClass)); + windowClass.style = CS_OWNDC; + windowClass.lpfnWndProc = win_proc; + windowClass.cbClsExtra = 0; + windowClass.cbWndExtra = 0; + windowClass.hInstance = dll_handle; + windowClass.hIcon = LoadIcon(NULL, IDI_APPLICATION); + windowClass.hCursor = LoadCursor(NULL, IDC_ARROW); + windowClass.hbrBackground = NULL; + windowClass.lpszMenuName = NULL; + windowClass.lpszClassName = class_name; + + if (RegisterClass(&windowClass) == 0) { + printfDebug("Failed to register window class\n"); + return false; + } + return true; +} + +static LRESULT CALLBACK dummyWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { + return DefWindowProc(hwnd, msg, wParam, lParam); +} + +bool applyPixelFormat(JNIEnv *env, HDC hdc, int iPixelFormat) { + PIXELFORMATDESCRIPTOR desc; + if (DescribePixelFormat(hdc, iPixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &desc) == 0) { + throwFormattedException(env, "DescribePixelFormat failed (%d)", GetLastError()); + return false; + } + + // make that the pixel format of the device context + if (SetPixelFormat(hdc, iPixelFormat, &desc) == FALSE) { + throwFormattedException(env, "SetPixelFormat failed (%d)", GetLastError()); + return false; + } + return true; +} + +/* + * Close the window + */ +void closeWindow(HWND *hwnd, HDC *hdc) +{ + // Release device context + if (*hdc != NULL && *hwnd != NULL) { + ReleaseDC(*hwnd, *hdc); + *hdc = NULL; + } + + // Close the window + if (*hwnd != NULL) { + ShowWindow(*hwnd, SW_HIDE); + DestroyWindow(*hwnd); + *hwnd = NULL; + } +} + +void getWindowFlags(DWORD *windowflags_return, DWORD *exstyle_return, bool undecorated, bool child_window) { + DWORD exstyle, windowflags; + if (undecorated) { + exstyle = WS_EX_APPWINDOW; + windowflags = WS_POPUP; + } else if (child_window) { + exstyle = 0; + windowflags = WS_CHILD; + } else { + exstyle = WS_EX_APPWINDOW; + windowflags = WS_OVERLAPPED | WS_BORDER | WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU; + } + windowflags = windowflags | WS_CLIPCHILDREN | WS_CLIPSIBLINGS; + *windowflags_return = windowflags; + *exstyle_return = exstyle; +} + +HWND createWindow(LPCTSTR window_class_name, int x, int y, int width, int height, bool undecorated, bool child_window, HWND parent) +{ + RECT clientSize; + DWORD exstyle, windowflags; + HWND new_hwnd; + + getWindowFlags(&windowflags, &exstyle, undecorated, child_window); + + clientSize.bottom = height; + clientSize.left = 0; + clientSize.right = width; + clientSize.top = 0; + + AdjustWindowRectEx( + &clientSize, // client-rectangle structure + windowflags, // window styles + FALSE, // menu-present option + exstyle // extended window style + ); + // Create the window now, using that class: + new_hwnd = CreateWindowEx ( + exstyle, + window_class_name, + _T(""), + windowflags, + x, y, clientSize.right - clientSize.left, clientSize.bottom - clientSize.top, + parent, + NULL, + dll_handle, + NULL); + + return new_hwnd; +} + +static int convertToBPE(int bpp) { + int bpe; + switch (bpp) { + case 0: + bpe = 0; + break; + case 32: + case 24: + bpe = 8; + break; + case 16: /* Fall through */ + default: + bpe = 4; + break; + } + return bpe; +} + +static int findPixelFormatARBFromBPP(JNIEnv *env, HDC hdc, WGLExtensions *extensions, jobject pixel_format, jobject pixelFormatCaps, int bpp, bool window, bool pbuffer, bool double_buffer) { + jclass cls_pixel_format = (*env)->GetObjectClass(env, pixel_format); + int alpha = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "alpha", "I")); + int depth = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "depth", "I")); + int stencil = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "stencil", "I")); + int samples = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "samples", "I")); + int colorSamples = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "colorSamples", "I")); + int num_aux_buffers = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "num_aux_buffers", "I")); + int accum_bpp = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "accum_bpp", "I")); + int accum_alpha = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "accum_alpha", "I")); + + jboolean stereo = (*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "stereo", "Z")); + jboolean floating_point = (*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "floating_point", "Z")); + jboolean floating_point_packed = (*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "floating_point_packed", "Z")); + jboolean sRGB = (*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "sRGB", "Z")); + + int pixel_type; + int iPixelFormat; + unsigned int num_formats_returned; + attrib_list_t attrib_list; + GLuint *pixelFormatCaps_ptr; + jlong pixelFormatCapsSize; + BOOL result; + jlong i; + int bpe = convertToBPE(bpp); + + if ( floating_point ) + pixel_type = WGL_TYPE_RGBA_FLOAT_ARB; + else if ( floating_point_packed ) + pixel_type = WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT; + else + pixel_type = WGL_TYPE_RGBA_ARB; + + initAttribList(&attrib_list); + if (window) { + putAttrib(&attrib_list, WGL_DRAW_TO_WINDOW_ARB); putAttrib(&attrib_list, TRUE); + } + if (pbuffer) { + putAttrib(&attrib_list, WGL_DRAW_TO_PBUFFER_ARB); putAttrib(&attrib_list, TRUE); + } + if (!getBooleanProperty(env, "org.lwjgl.opengl.Display.allowSoftwareOpenGL")) { + putAttrib(&attrib_list, WGL_ACCELERATION_ARB); putAttrib(&attrib_list, WGL_FULL_ACCELERATION_ARB); + } + putAttrib(&attrib_list, WGL_PIXEL_TYPE_ARB); putAttrib(&attrib_list, pixel_type); + if ( double_buffer || samples == 0 ) { + // Skip this for FALSE + MSAA: NV drivers won't return any PixelFormat + putAttrib(&attrib_list, WGL_DOUBLE_BUFFER_ARB); putAttrib(&attrib_list, double_buffer ? TRUE : FALSE); + } + putAttrib(&attrib_list, WGL_SUPPORT_OPENGL_ARB); putAttrib(&attrib_list, TRUE); + putAttrib(&attrib_list, WGL_RED_BITS_ARB); putAttrib(&attrib_list, bpe); + putAttrib(&attrib_list, WGL_GREEN_BITS_ARB); putAttrib(&attrib_list, bpe); + putAttrib(&attrib_list, WGL_BLUE_BITS_ARB); putAttrib(&attrib_list, bpe); + putAttrib(&attrib_list, WGL_ALPHA_BITS_ARB); putAttrib(&attrib_list, alpha); + putAttrib(&attrib_list, WGL_DEPTH_BITS_ARB); putAttrib(&attrib_list, depth); + putAttrib(&attrib_list, WGL_STENCIL_BITS_ARB); putAttrib(&attrib_list, stencil); + // Assume caller checked extension availability + if (samples > 0) { + putAttrib(&attrib_list, WGL_SAMPLE_BUFFERS_ARB); putAttrib(&attrib_list, 1); + putAttrib(&attrib_list, WGL_SAMPLES_ARB); putAttrib(&attrib_list, samples); // WGL_COVERAGE_SAMPLES_NV if colorSamples > 0 + if ( colorSamples > 0 ) { + putAttrib(&attrib_list, WGL_COLOR_SAMPLES_NV); putAttrib(&attrib_list, colorSamples); + } + } + putAttrib(&attrib_list, WGL_ACCUM_BITS_ARB); putAttrib(&attrib_list, accum_bpp); + putAttrib(&attrib_list, WGL_ACCUM_ALPHA_BITS_ARB); putAttrib(&attrib_list, accum_alpha); + putAttrib(&attrib_list, WGL_STEREO_ARB); putAttrib(&attrib_list, stereo ? TRUE : FALSE); + putAttrib(&attrib_list, WGL_AUX_BUFFERS_ARB); putAttrib(&attrib_list, num_aux_buffers); + if (sRGB) { + putAttrib(&attrib_list, WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB); putAttrib(&attrib_list, TRUE); + } + + // Assume caller checked extension availability + if (pixelFormatCaps != NULL) { + pixelFormatCaps_ptr = (GLuint *)(*env)->GetDirectBufferAddress(env, pixelFormatCaps); + pixelFormatCapsSize = (*env)->GetDirectBufferCapacity(env, pixelFormatCaps); + + for (i = 0; i < pixelFormatCapsSize; i++) + putAttrib(&attrib_list, pixelFormatCaps_ptr[i]); + } + putAttrib(&attrib_list, 0); putAttrib(&attrib_list, 0); + result = extensions->wglChoosePixelFormatARB(hdc, attrib_list.attribs, NULL, 1, &iPixelFormat, &num_formats_returned); + + if (result == FALSE || num_formats_returned < 1) { + throwFormattedException(env, "Failed to find ARB pixel format %d %d\n", result, num_formats_returned); + return -1; + } + return iPixelFormat; +} + +static int findPixelFormatARB(JNIEnv *env, HDC hdc, WGLExtensions *extensions, jobject pixel_format, jobject pixelFormatCaps, bool use_hdc_bpp, bool window, bool pbuffer, bool double_buffer) { + int bpp; + int iPixelFormat; + int fallback_bpp = 16; + jclass cls_pixel_format = (*env)->GetObjectClass(env, pixel_format); + if (use_hdc_bpp) { + bpp = GetDeviceCaps(hdc, BITSPIXEL); + iPixelFormat = findPixelFormatARBFromBPP(env, hdc, extensions, pixel_format, pixelFormatCaps, bpp, window, pbuffer, double_buffer); + if ((*env)->ExceptionOccurred(env)) { + (*env)->ExceptionClear(env); + printfDebugJava(env, "Failed to find ARB pixel format with HDC depth %d, falling back to %d\n", bpp, fallback_bpp); + bpp = fallback_bpp; + } else + return iPixelFormat; + } else + bpp = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "bpp", "I")); + return findPixelFormatARBFromBPP(env, hdc, extensions, pixel_format, pixelFormatCaps, bpp, window, pbuffer, double_buffer); +} + +/* + * Find an appropriate pixel format + */ +static int findPixelFormatFromBPP(JNIEnv *env, HDC hdc, jobject pixel_format, int bpp, bool double_buffer) +{ + jclass cls_pixel_format = (*env)->GetObjectClass(env, pixel_format); + int alpha = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "alpha", "I")); + int depth = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "depth", "I")); + int stencil = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "stencil", "I")); + int num_aux_buffers = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "num_aux_buffers", "I")); + int accum_bpp = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "accum_bpp", "I")); + int accum_alpha = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "accum_alpha", "I")); + jboolean stereo = (*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "stereo", "Z")); + unsigned int flags = PFD_DRAW_TO_WINDOW | // support window + PFD_SUPPORT_OPENGL | + (double_buffer ? PFD_DOUBLEBUFFER : 0) | + (stereo ? PFD_STEREO : 0); + PIXELFORMATDESCRIPTOR desc; + int iPixelFormat; + PIXELFORMATDESCRIPTOR pfd = { + sizeof(PIXELFORMATDESCRIPTOR), // size of this pfd + 1, // version number + flags, // RGBA type + PFD_TYPE_RGBA, + (BYTE)bpp, + 0, 0, 0, 0, 0, 0, // color bits ignored + (BYTE)alpha, + 0, // shift bit ignored + accum_bpp + accum_alpha, // no accumulation buffer + 0, 0, 0, 0, // accum bits ignored + (BYTE)depth, + (BYTE)stencil, + num_aux_buffers, + PFD_MAIN_PLANE, // main layer + 0, // reserved + 0, 0, 0 // layer masks ignored + }; + // get the best available match of pixel format for the device context + iPixelFormat = ChoosePixelFormat(hdc, &pfd); + if (iPixelFormat == 0) { + throwException(env, "Failed to choose pixel format"); + return -1; + } + + if (DescribePixelFormat(hdc, iPixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &desc) == 0) { + throwException(env, "Could not describe pixel format"); + return -1; + } + + if (desc.cColorBits < bpp) { + throwException(env, "Insufficient color precision"); + return -1; + } + + if (desc.cAlphaBits < alpha) { + throwException(env, "Insufficient alpha precision"); + return -1; + } + + if (desc.cStencilBits < stencil) { + throwException(env, "Insufficient stencil precision"); + return -1; + } + + if (desc.cDepthBits < depth) { + throwException(env, "Insufficient depth buffer precision"); + return -1; + } + + if ((desc.dwFlags & PFD_GENERIC_FORMAT) != 0) { + jboolean allowSoftwareOpenGL = getBooleanProperty(env, "org.lwjgl.opengl.Display.allowSoftwareOpenGL"); + // secondary check for software override + if(!allowSoftwareOpenGL) { + throwException(env, "Pixel format not accelerated"); + return -1; + } + } + + if ((desc.dwFlags & flags) != flags) { + throwException(env, "Capabilities not supported"); + return -1; + } + return iPixelFormat; +} + +static int findPixelFormatDefault(JNIEnv *env, HDC hdc, jobject pixel_format, bool use_hdc_bpp, bool double_buffer) { + int bpp; + int iPixelFormat; + int fallback_bpp = 16; + jclass cls_pixel_format = (*env)->GetObjectClass(env, pixel_format); + if (use_hdc_bpp) { + bpp = GetDeviceCaps(hdc, BITSPIXEL); + iPixelFormat = findPixelFormatFromBPP(env, hdc, pixel_format, bpp, double_buffer); + if ((*env)->ExceptionOccurred(env)) { + (*env)->ExceptionClear(env); + printfDebugJava(env, "Failed to find pixel format with HDC depth %d, falling back to %d\n", bpp, fallback_bpp); + bpp = fallback_bpp; + } else + return iPixelFormat; + } else + bpp = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "bpp", "I")); + return findPixelFormatFromBPP(env, hdc, pixel_format, bpp, double_buffer); +} + +static bool validateAndGetExtensions(JNIEnv *env, WGLExtensions *extensions, HDC dummy_hdc, HGLRC dummy_hglrc, int samples, int colorSamples, bool floating_point, bool floating_point_packed, bool sRGB, jobject pixelFormatCaps) { + if (!wglMakeCurrent(dummy_hdc, dummy_hglrc)) { + throwException(env, "Could not bind context to dummy window"); + return false; + } + extgl_InitWGL(extensions); + + if (!extensions->WGL_ARB_pixel_format) { + throwException(env, "No support for WGL_ARB_pixel_format"); + return false; + } + if (samples > 0 && !extensions->WGL_ARB_multisample) { + throwException(env, "No support for WGL_ARB_multisample"); + return false; + } + if (colorSamples > 0 && !extensions->WGL_NV_multisample_coverage) { + throwException(env, "No support for WGL_NV_multisample_coverage"); + return false; + } + /* + * Apparently, some drivers don't report WGL_ARB_pixel_format_float + * even though GL_ARB_color_buffer_float and WGL_ATI_color_format_float + * is supported. + */ + if (floating_point && !(extensions->WGL_ARB_pixel_format_float || extensions->WGL_ATI_pixel_format_float)) { + throwException(env, "No support for WGL_ARB_pixel_format_float nor WGL_ATI_pixel_format_float"); + return false; + } + if (floating_point_packed && !(extensions->WGL_EXT_pixel_format_packed_float)) { + throwException(env, "No support for WGL_EXT_pixel_format_packed_float"); + return false; + } + if (sRGB && !(extensions->WGL_ARB_framebuffer_sRGB)) { + throwException(env, "No support for WGL_ARB_framebuffer_sRGB"); + return false; + } + if (pixelFormatCaps != NULL && !extensions->WGL_ARB_render_texture) { + throwException(env, "No support for WGL_ARB_render_texture"); + return false; + } + return true; +} + +int findPixelFormatOnDC(JNIEnv *env, HDC hdc, int origin_x, int origin_y, jobject pixel_format, jobject pixelFormatCaps, bool use_hdc_bpp, bool window, bool pbuffer, bool double_buffer) { + HGLRC dummy_hglrc; + HDC saved_current_hdc; + HGLRC saved_current_hglrc; + WGLExtensions extensions; + HWND dummy_hwnd; + HDC dummy_hdc; + int pixel_format_id; + jclass cls_pixel_format = (*env)->GetObjectClass(env, pixel_format); + + int samples = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "samples", "I")); + int colorSamples = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "colorSamples", "I")); + bool floating_point = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "floating_point", "Z")); + bool floating_point_packed = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "floating_point_packed", "Z")); + bool sRGB = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "sRGB", "Z")); + bool use_arb_selection = samples > 0 || floating_point || floating_point_packed || sRGB || pbuffer || pixelFormatCaps != NULL; + + pixel_format_id = findPixelFormatDefault(env, hdc, pixel_format, use_hdc_bpp, double_buffer); + if (!(*env)->ExceptionOccurred(env) && use_arb_selection) { + dummy_hwnd = createDummyWindow(origin_x, origin_y); + if (dummy_hwnd == NULL) { + throwException(env, "Could not create dummy window"); + return -1; + } + dummy_hdc = GetDC(dummy_hwnd); + if (!applyPixelFormat(env, dummy_hdc, pixel_format_id)) { + closeWindow(&dummy_hwnd, &dummy_hdc); + return -1; + } + dummy_hglrc = wglCreateContext(dummy_hdc); + if (dummy_hglrc == NULL) { + closeWindow(&dummy_hwnd, &dummy_hdc); + throwException(env, "Failed to create OpenGL rendering context"); + return -1; + } + // Save the current HDC and HGLRC to avoid disruption + saved_current_hdc = wglGetCurrentDC(); + saved_current_hglrc = wglGetCurrentContext(); + if (validateAndGetExtensions(env, &extensions, dummy_hdc, dummy_hglrc, samples, colorSamples, floating_point, floating_point_packed, sRGB, pixelFormatCaps)) { + pixel_format_id = findPixelFormatARB(env, hdc, &extensions, pixel_format, pixelFormatCaps, use_hdc_bpp, window, pbuffer, double_buffer); + } + wglMakeCurrent(saved_current_hdc, saved_current_hglrc); + wglDeleteContext(dummy_hglrc); + closeWindow(&dummy_hwnd, &dummy_hdc); + } + return pixel_format_id; +} + +static bool registerDummyWindow() { + static bool window_registered = false; + if (!window_registered) { + if (!registerWindow(dummyWindowProc, _CONTEXT_PRIVATE_CLASS_NAME)) { + return false; + } + window_registered = true; + } + return true; +} + +HWND createDummyWindow(int origin_x, int origin_y) { + if (!registerDummyWindow()) + return NULL; + return createWindow(_CONTEXT_PRIVATE_CLASS_NAME, origin_x, origin_y, 1, 1, false, false, NULL); +} diff --git a/etc/lwjgl-2.9.1/src/native/windows/opengl/context.h b/etc/lwjgl-2.9.1/src/native/windows/opengl/context.h new file mode 100644 index 0000000..65c5dd4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/opengl/context.h @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * @author elias_naur + * @version $Revision$ + */ + +#ifndef __LWJGL_CONTEXT_H +#define __LWJGL_CONTEXT_H + +#include "Window.h" +#include "extgl.h" +#include "extgl_wgl.h" + +typedef struct { + union { + HWND hwnd; + HPBUFFERARB pbuffer; + } u; + HDC drawable_hdc; + WGLExtensions extensions; +} WindowsPeerInfo; + +/* + * Register the LWJGL window class. + * Returns true for success, or false for failure + */ +extern bool registerWindow(); + +extern bool applyPixelFormat(JNIEnv *env, HDC hdc, int iPixelFormat); + +/* + * Close the window + */ +extern void closeWindow(HWND *hwnd, HDC *hdc); + +/** + * Create a dummy window suitable to create contexts from + */ +extern HWND createDummyWindow(int x, int y); + +/** + * Return appropriate window and extended style flags from the given fullscreen and undecorated property + */ +extern void getWindowFlags(DWORD *windowflags_return, DWORD *exstyle_return, bool undecorated, bool child_window); + +/* + * Create a window with the specified position, size, and + * fullscreen attribute. The window will have DirectInput associated + * with it. + * + * Returns true for success, or false for failure + */ +extern HWND createWindow(LPCTSTR window_class_name, int x, int y, int width, int height, bool undecorated, bool child_window, HWND parent); + +extern int findPixelFormatOnDC(JNIEnv *env, HDC hdc, int origin_x, int origin_y, jobject pixel_format, jobject pixelFormatCaps, bool use_hdc_bpp, bool window, bool pbuffer, bool double_buffer); + +#endif diff --git a/etc/lwjgl-2.9.1/src/native/windows/opengl/extgl_wgl.c b/etc/lwjgl-2.9.1/src/native/windows/opengl/extgl_wgl.c new file mode 100644 index 0000000..f7b75af --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/opengl/extgl_wgl.c @@ -0,0 +1,216 @@ +/* ---------------------------------------------------------------------------- +Copyright (c) 2001-2002, Lev Povalahev +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * The name of the author may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. +------------------------------------------------------------------------------*/ +/* + Lev Povalahev + + levp@gmx.net + + http://www.uni-karlsruhe.de/~uli2/ + +*/ + +#include +#include +#include "extgl_wgl.h" +#include "extgl.h" + +static HMODULE lib_gl_handle = NULL; + +void *extgl_GetProcAddress(const char *name) { + void *t = wglGetProcAddress(name); + if (t == NULL) + { + t = GetProcAddress(lib_gl_handle, name); + if (t == NULL) + { + printfDebug("Could not locate symbol %s\n", name); + } + } + return t; +} + +bool extgl_Open(JNIEnv *env) { + if (lib_gl_handle != NULL) + return true; + // load the dynamic libraries for OpenGL + lib_gl_handle = LoadLibrary("opengl32.dll"); + if (lib_gl_handle == NULL) { + throwException(env, "Could not load OpenGL library"); + return false; + } + return true; +} + +void extgl_Close(void) { + FreeLibrary(lib_gl_handle); + lib_gl_handle = NULL; +} + +/** returns true if the extension is available */ +static bool WGLQueryExtension(WGLExtensions *extensions, const char *name) { + const GLubyte *extension_string; + + if (!extensions->WGL_ARB_extensions_string) + if (!extensions->WGL_EXT_extensions_string) + return false; + else + extension_string = (GLubyte*)extensions->wglGetExtensionsStringEXT(); + else + extension_string = (GLubyte*)extensions->wglGetExtensionsStringARB(wglGetCurrentDC()); + return extgl_QueryExtension(extension_string, name); +} + +/*---------------------------------------------------------------------*/ + +static void extgl_InitWGLARBPbuffer(WGLExtensions *extensions) { + ExtFunction functions[] = { + {"wglCreatePbufferARB", (void *)&extensions->wglCreatePbufferARB}, + {"wglGetPbufferDCARB", (void *)&extensions->wglGetPbufferDCARB}, + {"wglReleasePbufferDCARB", (void *)&extensions->wglReleasePbufferDCARB}, + {"wglDestroyPbufferARB", (void *)&extensions->wglDestroyPbufferARB}, + {"wglQueryPbufferARB", (void *)&extensions->wglQueryPbufferARB}}; + if (extensions->WGL_ARB_pbuffer) + extensions->WGL_ARB_pbuffer = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); +} + +static void extgl_InitWGLARBPixelFormat(WGLExtensions *extensions) { + ExtFunction functions[] = { + {"wglGetPixelFormatAttribivARB", (void *)&extensions->wglGetPixelFormatAttribivARB}, + {"wglGetPixelFormatAttribfvARB", (void *)&extensions->wglGetPixelFormatAttribfvARB}, + {"wglChoosePixelFormatARB", (void *)&extensions->wglChoosePixelFormatARB}}; + if (extensions->WGL_ARB_pixel_format) + extensions->WGL_ARB_pixel_format = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); +} + +static void extgl_InitWGLARBRenderTexture(WGLExtensions *extensions) { + ExtFunction functions[] = { + {"wglBindTexImageARB", (void *)&extensions->wglBindTexImageARB}, + {"wglReleaseTexImageARB", (void *)&extensions->wglReleaseTexImageARB}, + {"wglSetPbufferAttribARB", (void *)&extensions->wglSetPbufferAttribARB}}; + if (extensions->WGL_ARB_render_texture) + extensions->WGL_ARB_render_texture = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); +} + +static void extgl_InitWGLEXTSwapControl(WGLExtensions *extensions) { + ExtFunction functions[] = { + {"wglSwapIntervalEXT", (void *)&extensions->wglSwapIntervalEXT}, + {"wglGetSwapIntervalEXT", (void *)&extensions->wglGetSwapIntervalEXT}}; + if (extensions->WGL_EXT_swap_control) + extensions->WGL_EXT_swap_control = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); +} + +static void extgl_InitWGLARBMakeCurrentRead(WGLExtensions *extensions) { + ExtFunction functions[] = { + {"wglMakeContextCurrentARB", (void *)&extensions->wglMakeContextCurrentARB}, + {"wglGetCurrentReadDCARB", (void *)&extensions->wglGetCurrentReadDCARB}}; + if (extensions->WGL_ARB_make_current_read) + extensions->WGL_ARB_make_current_read = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); +} + +static void extgl_InitWGLARBCreateContext(WGLExtensions *extensions) { + ExtFunction functions[] = { + {"wglCreateContextAttribsARB", (void *)&extensions->wglCreateContextAttribsARB} + }; + if (extensions->WGL_ARB_create_context) + extensions->WGL_ARB_create_context = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); +} + +static void extgl_InitWGLNVPresentVideo(WGLExtensions *extensions) { + ExtFunction functions[] = { + {"wglEnumerateVideoDevicesNV", (void *)&extensions->wglEnumerateVideoDevicesNV}, + {"wglBindVideoDeviceNV", (void *)&extensions->wglBindVideoDeviceNV}, + {"wglQueryCurrentContextNV", (void *)&extensions->wglQueryCurrentContextNV} + }; + + if (extensions->WGL_NV_present_video) + extensions->WGL_NV_present_video = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); +} + +static void extgl_InitWGLNVVideoCapture(WGLExtensions *extensions) { + ExtFunction functions[] = { + {"wglBindVideoCaptureDeviceNV", (void *)&extensions->wglBindVideoCaptureDeviceNV}, + {"wglEnumerateVideoCaptureDevicesNV", (void *)&extensions->wglEnumerateVideoCaptureDevicesNV}, + {"wglLockVideoCaptureDeviceNV", (void *)&extensions->wglLockVideoCaptureDeviceNV}, + {"wglQueryVideoCaptureDeviceNV", (void *)&extensions->wglQueryVideoCaptureDeviceNV}, + {"wglReleaseVideoCaptureDeviceNV", (void *)&extensions->wglReleaseVideoCaptureDeviceNV} + }; + + if (extensions->WGL_NV_video_capture) + extensions->WGL_NV_video_capture = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); +} + +/*---------------------------------------------------------------------*/ + +static void extgl_InitSupportedWGLExtensions(WGLExtensions *extensions) { + extensions->WGL_ARB_buffer_region = WGLQueryExtension(extensions, "WGL_ARB_buffer_region"); + extensions->WGL_ARB_make_current_read = WGLQueryExtension(extensions, "WGL_ARB_make_current_read"); + extensions->WGL_ARB_multisample = WGLQueryExtension(extensions, "WGL_ARB_multisample"); + extensions->WGL_ARB_pixel_format_float = WGLQueryExtension(extensions, "WGL_ARB_pixel_format_float"); + extensions->WGL_ATI_pixel_format_float = WGLQueryExtension(extensions, "WGL_ATI_pixel_format_float"); + extensions->WGL_ARB_pbuffer = WGLQueryExtension(extensions, "WGL_ARB_pbuffer"); + extensions->WGL_ARB_pixel_format = WGLQueryExtension(extensions, "WGL_ARB_pixel_format"); + extensions->WGL_ARB_render_texture = WGLQueryExtension(extensions, "WGL_ARB_render_texture"); + extensions->WGL_EXT_swap_control = WGLQueryExtension(extensions, "WGL_EXT_swap_control"); + extensions->WGL_NV_render_depth_texture = WGLQueryExtension(extensions, "WGL_NV_render_depth_texture"); + extensions->WGL_NV_render_texture_rectangle = WGLQueryExtension(extensions, "WGL_NV_render_texture_rectangle"); + extensions->WGL_ARB_framebuffer_sRGB = WGLQueryExtension(extensions, "WGL_ARB_framebuffer_sRGB") || WGLQueryExtension(extensions, "WGL_EXT_framebuffer_sRGB"); + extensions->WGL_EXT_pixel_format_packed_float = WGLQueryExtension(extensions, "WGL_EXT_pixel_format_packed_float"); + extensions->WGL_ARB_create_context = WGLQueryExtension(extensions, "WGL_ARB_create_context"); + extensions->WGL_NV_multisample_coverage = WGLQueryExtension(extensions, "WGL_NV_multisample_coverage"); + extensions->WGL_NV_present_video = WGLQueryExtension(extensions, "WGL_NV_present_video"); + extensions->WGL_NV_video_capture = WGLQueryExtension(extensions, "WGL_NV_video_capture"); +} + +static void extgl_InitWGLEXTExtensionsString(WGLExtensions *extensions) { + ExtFunction functions[] = { + {"wglGetExtensionsStringEXT", (void *)&extensions->wglGetExtensionsStringEXT} + }; + extensions->WGL_EXT_extensions_string = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); +} + +static void extgl_InitWGLARBExtensionsString(WGLExtensions *extensions) { + ExtFunction functions[] = { + {"wglGetExtensionsStringARB", (void *)&extensions->wglGetExtensionsStringARB} + }; + extensions->WGL_ARB_extensions_string = extgl_InitializeFunctions(sizeof(functions)/sizeof(ExtFunction), functions); +} + +void extgl_InitWGL(WGLExtensions *extensions) { + extgl_InitWGLARBExtensionsString(extensions); + extgl_InitWGLEXTExtensionsString(extensions); + + extgl_InitSupportedWGLExtensions(extensions); + + extgl_InitWGLARBMakeCurrentRead(extensions); + extgl_InitWGLEXTSwapControl(extensions); + extgl_InitWGLARBRenderTexture(extensions); + extgl_InitWGLARBPixelFormat(extensions); + extgl_InitWGLARBPbuffer(extensions); + extgl_InitWGLARBCreateContext(extensions); + extgl_InitWGLNVPresentVideo(extensions); + extgl_InitWGLNVVideoCapture(extensions); +} diff --git a/etc/lwjgl-2.9.1/src/native/windows/opengl/extgl_wgl.h b/etc/lwjgl-2.9.1/src/native/windows/opengl/extgl_wgl.h new file mode 100644 index 0000000..4c3d9e5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/opengl/extgl_wgl.h @@ -0,0 +1,299 @@ +/* ---------------------------------------------------------------------------- +Copyright (c) 2001-2002, Lev Povalahev +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * The name of the author may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. +------------------------------------------------------------------------------*/ +/* + Lev Povalahev + + levp@gmx.net + + http://www.uni-karlsruhe.de/~uli2/ + +*/ + +#ifndef _EXTGL_WGL_H +#define _EXTGL_WGL_H + +#include +#include "extgl.h" +#include "common_tools.h" + +/*-------------------------------------------------------------------*/ +/*------------WGL_EXT_EXTENSION_STRING-------------------------------*/ +/*-------------------------------------------------------------------*/ + +typedef const char* (APIENTRY * wglGetExtensionsStringEXTPROC) (); + +/*-------------------------------------------------------------------*/ +/*------------WGL_ARB_EXTENSION_STRING-------------------------------*/ +/*-------------------------------------------------------------------*/ + +typedef const char* (APIENTRY * wglGetExtensionsStringARBPROC) (HDC hdc); + +/*-------------------------------------------------------------------*/ +/*------------WGL_ARB_PBUFFER----------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#define WGL_DRAW_TO_PBUFFER_ARB 0x202D +#define WGL_DRAW_TO_PBUFFER_ARB 0x202D +#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E +#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F +#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030 +#define WGL_PBUFFER_LARGEST_ARB 0x2033 +#define WGL_PBUFFER_WIDTH_ARB 0x2034 +#define WGL_PBUFFER_HEIGHT_ARB 0x2035 +#define WGL_PBUFFER_LOST_ARB 0x2036 + +DECLARE_HANDLE(HPBUFFERARB); + +typedef HPBUFFERARB (APIENTRY * wglCreatePbufferARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); +typedef HDC (APIENTRY * wglGetPbufferDCARBPROC) (HPBUFFERARB hPbuffer); +typedef int (APIENTRY * wglReleasePbufferDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC); +typedef BOOL (APIENTRY * wglDestroyPbufferARBPROC) (HPBUFFERARB hPbuffer); +typedef BOOL (APIENTRY * wglQueryPbufferARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue); + +/*-------------------------------------------------------------------*/ +/*------------WGL_ARB_PIXEL_FORMAT-----------------------------------*/ +/*-------------------------------------------------------------------*/ + +#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 +#define WGL_DRAW_TO_WINDOW_ARB 0x2001 +#define WGL_DRAW_TO_BITMAP_ARB 0x2002 +#define WGL_ACCELERATION_ARB 0x2003 +#define WGL_NEED_PALETTE_ARB 0x2004 +#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005 +#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006 +#define WGL_SWAP_METHOD_ARB 0x2007 +#define WGL_NUMBER_OVERLAYS_ARB 0x2008 +#define WGL_NUMBER_UNDERLAYS_ARB 0x2009 +#define WGL_TRANSPARENT_ARB 0x200A +#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037 +#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038 +#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039 +#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A +#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B +#define WGL_SHARE_DEPTH_ARB 0x200C +#define WGL_SHARE_STENCIL_ARB 0x200D +#define WGL_SHARE_ACCUM_ARB 0x200E +#define WGL_SUPPORT_GDI_ARB 0x200F +#define WGL_SUPPORT_OPENGL_ARB 0x2010 +#define WGL_DOUBLE_BUFFER_ARB 0x2011 +#define WGL_STEREO_ARB 0x2012 +#define WGL_PIXEL_TYPE_ARB 0x2013 +#define WGL_COLOR_BITS_ARB 0x2014 +#define WGL_RED_BITS_ARB 0x2015 +#define WGL_RED_SHIFT_ARB 0x2016 +#define WGL_GREEN_BITS_ARB 0x2017 +#define WGL_GREEN_SHIFT_ARB 0x2018 +#define WGL_BLUE_BITS_ARB 0x2019 +#define WGL_BLUE_SHIFT_ARB 0x201A +#define WGL_ALPHA_BITS_ARB 0x201B +#define WGL_ALPHA_SHIFT_ARB 0x201C +#define WGL_ACCUM_BITS_ARB 0x201D +#define WGL_ACCUM_RED_BITS_ARB 0x201E +#define WGL_ACCUM_GREEN_BITS_ARB 0x201F +#define WGL_ACCUM_BLUE_BITS_ARB 0x2020 +#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021 +#define WGL_DEPTH_BITS_ARB 0x2022 +#define WGL_STENCIL_BITS_ARB 0x2023 +#define WGL_AUX_BUFFERS_ARB 0x2024 +#define WGL_NO_ACCELERATION_ARB 0x2025 +#define WGL_GENERIC_ACCELERATION_ARB 0x2026 +#define WGL_FULL_ACCELERATION_ARB 0x2027 +#define WGL_SWAP_EXCHANGE_ARB 0x2028 +#define WGL_SWAP_COPY_ARB 0x2029 +#define WGL_SWAP_UNDEFINED_ARB 0x202A +#define WGL_TYPE_RGBA_ARB 0x202B +#define WGL_TYPE_COLORINDEX_ARB 0x202C + +typedef BOOL (APIENTRY * wglGetPixelFormatAttribivARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues); +typedef BOOL (APIENTRY * wglGetPixelFormatAttribfvARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues); +typedef BOOL (APIENTRY * wglChoosePixelFormatARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); + +typedef BOOL (APIENTRY * wglBindTexImageARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); +typedef BOOL (APIENTRY * wglReleaseTexImageARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); +typedef BOOL (APIENTRY * wglSetPbufferAttribARBPROC) (HPBUFFERARB hPbuffer, const int *piAttribList); + +/*-------------------------------------------------------------------*/ +/*------------WGL_EXT_SWAP_CONTROL-----------------------------------*/ +/*-------------------------------------------------------------------*/ + +typedef BOOL (APIENTRY * wglSwapIntervalEXTPROC) (int interval); +typedef int (APIENTRY * wglGetSwapIntervalEXTPROC) (void); + +/*-------------------------------------------------------------------*/ +/*------------WGL_ARB_MAKE_CURRENT_READ------------------------------*/ +/*-------------------------------------------------------------------*/ + +#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043 +#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054 + +typedef BOOL (APIENTRY * wglMakeContextCurrentARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); +typedef HDC (APIENTRY * wglGetCurrentReadDCARBPROC) (void); + +/*-------------------------------------------------------------------*/ +/*------------WGL_ARB_MULTISAMPLE------------------------------------*/ +/*-------------------------------------------------------------------*/ + +#define WGL_SAMPLE_BUFFERS_ARB 0x2041 +#define WGL_SAMPLES_ARB 0x2042 + +/*-------------------------------------------------------------------*/ +/*------------WGL_ARB_pixel_format_float ----------------------------*/ +/*-------------------------------------------------------------------*/ + +#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0 + +/*-------------------------------------------------------------------*/ +/*------------WGL_ATI_pixel_format_float ----------------------------*/ +/*-------------------------------------------------------------------*/ + +#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0 + +/*------------------------------------------------------------------*/ +/*------------ WGL_ARB_framebuffer_sRGB ----------------------------*/ +/*------------------------------------------------------------------*/ + +#define WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB 0x20A9 + +/*---------------------------------------------------------------------------*/ +/*------------ WGL_EXT_pixel_format_packed_float ----------------------------*/ +/*---------------------------------------------------------------------------*/ + +#define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8 + +/*----------------------------------------------------------------*/ +/*------------ WGL_ARB_create_context ----------------------------*/ +/*----------------------------------------------------------------*/ + +#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 +#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 +#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093 +#define WGL_CONTEXT_FLAGS_ARB 0x2094 + +#define WGL_CONTEXT_DEBUG_BIT_ARB 0x0001 +#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002 + +#define ERROR_INVALID_VERSION_ARB 0x2095 + +typedef HGLRC (APIENTRY * wglCreateContextAttribsARBPROC) (HDC hDC, HGLRC hShareContext, const int *attribList); + +/*---------------------------------------------------------------------*/ +/*------------ WGL_NV_multisample_coverage ----------------------------*/ +/*---------------------------------------------------------------------*/ + +#define WGL_COVERAGE_SAMPLES_NV 0x2042 +#define WGL_COLOR_SAMPLES_NV 0x20B9 + +/*--------------------------------------------------------------*/ +/*------------ WGL_NV_present_video ----------------------------*/ +/*--------------------------------------------------------------*/ + +DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV); + +#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0 + +typedef int (APIENTRY * wglEnumerateVideoDevicesNVPROC) (HDC hDc, HVIDEOOUTPUTDEVICENV *phDeviceList); +typedef BOOL (APIENTRY * wglBindVideoDeviceNVPROC) (HDC hDc, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList); +typedef BOOL (APIENTRY * wglQueryCurrentContextNVPROC) (int iAttribute, int *piValue); + +/*--------------------------------------------------------------*/ +/*------------ WGL_NV_video_capture ----------------------------*/ +/*--------------------------------------------------------------*/ + +DECLARE_HANDLE(HVIDEOINPUTDEVICENV); + +#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0 + +typedef BOOL (APIENTRY * wglBindVideoCaptureDeviceNVPROC) (UINT uVideoSlot, HVIDEOINPUTDEVICENV hDevice); +typedef UINT (APIENTRY * wglEnumerateVideoCaptureDevicesNVPROC) (HDC hDc, HVIDEOINPUTDEVICENV *phDeviceList); +typedef BOOL (APIENTRY * wglLockVideoCaptureDeviceNVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice); +typedef BOOL (APIENTRY * wglQueryVideoCaptureDeviceNVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice, int iAttribute, int *piValue); +typedef BOOL (APIENTRY * wglReleaseVideoCaptureDeviceNVPROC) (HDC hDc, HVIDEOINPUTDEVICENV hDevice); + +/*---------------------------------------------------------------------*/ + +typedef struct { + bool WGL_ARB_buffer_region; + bool WGL_ARB_extensions_string; + bool WGL_ARB_make_current_read; + bool WGL_ARB_multisample; + bool WGL_ARB_pbuffer; + bool WGL_ARB_pixel_format; + bool WGL_ARB_render_texture; + bool WGL_EXT_extensions_string; + bool WGL_EXT_swap_control; + bool WGL_NV_render_depth_texture; + bool WGL_NV_render_texture_rectangle; + bool WGL_ARB_pixel_format_float; + bool WGL_ATI_pixel_format_float; + bool WGL_ARB_framebuffer_sRGB; + bool WGL_EXT_pixel_format_packed_float; + bool WGL_ARB_create_context; + bool WGL_NV_multisample_coverage; + bool WGL_NV_present_video; + bool WGL_NV_video_capture; + + wglGetExtensionsStringEXTPROC wglGetExtensionsStringEXT; + + wglGetExtensionsStringARBPROC wglGetExtensionsStringARB; + + wglCreatePbufferARBPROC wglCreatePbufferARB; + wglGetPbufferDCARBPROC wglGetPbufferDCARB; + wglReleasePbufferDCARBPROC wglReleasePbufferDCARB; + wglDestroyPbufferARBPROC wglDestroyPbufferARB; + wglQueryPbufferARBPROC wglQueryPbufferARB; + + wglGetPixelFormatAttribivARBPROC wglGetPixelFormatAttribivARB; + wglGetPixelFormatAttribfvARBPROC wglGetPixelFormatAttribfvARB; + wglChoosePixelFormatARBPROC wglChoosePixelFormatARB; + + wglBindTexImageARBPROC wglBindTexImageARB; + wglReleaseTexImageARBPROC wglReleaseTexImageARB; + wglSetPbufferAttribARBPROC wglSetPbufferAttribARB; + + wglSwapIntervalEXTPROC wglSwapIntervalEXT; + wglGetSwapIntervalEXTPROC wglGetSwapIntervalEXT; + + wglMakeContextCurrentARBPROC wglMakeContextCurrentARB; + wglGetCurrentReadDCARBPROC wglGetCurrentReadDCARB; + + wglCreateContextAttribsARBPROC wglCreateContextAttribsARB; + + wglEnumerateVideoDevicesNVPROC wglEnumerateVideoDevicesNV; + wglBindVideoDeviceNVPROC wglBindVideoDeviceNV; + wglQueryCurrentContextNVPROC wglQueryCurrentContextNV; + + wglBindVideoCaptureDeviceNVPROC wglBindVideoCaptureDeviceNV; + wglEnumerateVideoCaptureDevicesNVPROC wglEnumerateVideoCaptureDevicesNV; + wglLockVideoCaptureDeviceNVPROC wglLockVideoCaptureDeviceNV; + wglQueryVideoCaptureDeviceNVPROC wglQueryVideoCaptureDeviceNV; + wglReleaseVideoCaptureDeviceNVPROC wglReleaseVideoCaptureDeviceNV; +} WGLExtensions; + +extern void extgl_InitWGL(WGLExtensions *extensions); + + +#endif diff --git a/etc/lwjgl-2.9.1/src/native/windows/opengl/org_lwjgl_opengl_Pbuffer.c b/etc/lwjgl-2.9.1/src/native/windows/opengl/org_lwjgl_opengl_Pbuffer.c new file mode 100644 index 0000000..b2f1e6f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/opengl/org_lwjgl_opengl_Pbuffer.c @@ -0,0 +1,212 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Windows Pbuffer. + * + * @author elias_naur + * @version $Revision$ + */ + +#include +#include "org_lwjgl_opengl_WindowsDisplay.h" +#include "org_lwjgl_opengl_Pbuffer.h" +#include "context.h" + +#include "extgl.h" +#include "extgl_wgl.h" + +#include "common_tools.h" + +static bool isPbufferSupported(WGLExtensions *extensions) { + return extensions->WGL_ARB_pixel_format && extensions->WGL_ARB_pbuffer; +} + +static bool getExtensions(JNIEnv *env, WGLExtensions *extensions, jobject pixel_format, jobject pixelFormatCaps) { + int origin_x = 0; int origin_y = 0; + HWND dummy_hwnd; + HDC dummy_hdc; + HGLRC dummy_context; + HDC saved_hdc; + HGLRC saved_context; + int pixel_format_id; + + dummy_hwnd = createDummyWindow(origin_x, origin_y); + if (dummy_hwnd == NULL) { + throwException(env, "Could not create dummy window"); + return false; + } + dummy_hdc = GetDC(dummy_hwnd); + pixel_format_id = findPixelFormatOnDC(env, dummy_hdc, origin_x, origin_y, pixel_format, pixelFormatCaps, false, true, false, false); + if (pixel_format_id == -1) { + closeWindow(&dummy_hwnd, &dummy_hdc); + return false; + } + if (!applyPixelFormat(env, dummy_hdc, pixel_format_id)) { + closeWindow(&dummy_hwnd, &dummy_hdc); + return false; + } + dummy_context = wglCreateContext(dummy_hdc); + if (dummy_context == NULL) { + closeWindow(&dummy_hwnd, &dummy_hdc); + throwException(env, "Could not create dummy context"); + return false; + } + saved_hdc = wglGetCurrentDC(); + saved_context = wglGetCurrentContext(); + if (!wglMakeCurrent(dummy_hdc, dummy_context)) { + wglMakeCurrent(saved_hdc, saved_context); + closeWindow(&dummy_hwnd, &dummy_hdc); + wglDeleteContext(dummy_context); + throwException(env, "Could not make dummy context current"); + return false; + } + extgl_InitWGL(extensions); + if (!wglMakeCurrent(saved_hdc, saved_context)) + printfDebugJava(env, "ERROR: Could not restore current context"); + closeWindow(&dummy_hwnd, &dummy_hdc); + wglDeleteContext(dummy_context); + return true; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nGetPbufferCapabilities + (JNIEnv *env, jobject self, jobject pixel_format) +{ + int caps = 0; + WGLExtensions extensions; + if (!getExtensions(env, &extensions, pixel_format, NULL)) + return 0; + if (isPbufferSupported(&extensions)) + caps |= org_lwjgl_opengl_Pbuffer_PBUFFER_SUPPORTED; + + if (extensions.WGL_ARB_render_texture) + caps |= org_lwjgl_opengl_Pbuffer_RENDER_TEXTURE_SUPPORTED; + + if (extensions.WGL_NV_render_texture_rectangle) + caps |= org_lwjgl_opengl_Pbuffer_RENDER_TEXTURE_RECTANGLE_SUPPORTED; + + if (extensions.WGL_NV_render_depth_texture) + caps |= org_lwjgl_opengl_Pbuffer_RENDER_DEPTH_TEXTURE_SUPPORTED; + + return caps; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsPbufferPeerInfo_nCreate + (JNIEnv *env, jobject self, jobject peer_info_handle, + jint width, jint height, jobject pixel_format, + jobject pixelFormatCaps, jobject pBufferAttribs) +{ + int origin_x = 0; int origin_y = 0; + HWND dummy_hwnd; + HDC dummy_hdc; + HPBUFFERARB Pbuffer; + HDC Pbuffer_dc; + WGLExtensions extensions; + const int *pBufferAttribs_ptr; + WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + int pixel_format_id; + + if ( pBufferAttribs != NULL ) { + pBufferAttribs_ptr = (const int *)(*env)->GetDirectBufferAddress(env, pBufferAttribs); + } else { + pBufferAttribs_ptr = NULL; + } + if (!getExtensions(env, &extensions, pixel_format, pixelFormatCaps)) + return; + dummy_hwnd = createDummyWindow(origin_x, origin_y); + if (dummy_hwnd == NULL) { + throwException(env, "Could not create dummy window"); + return; + } + dummy_hdc = GetDC(dummy_hwnd); + pixel_format_id = findPixelFormatOnDC(env, dummy_hdc, origin_x, origin_y, pixel_format, pixelFormatCaps, false, false, true, false); + if (pixel_format_id == -1) { + closeWindow(&dummy_hwnd, &dummy_hdc); + return; + } + Pbuffer = extensions.wglCreatePbufferARB(dummy_hdc, pixel_format_id, width, height, pBufferAttribs_ptr); + closeWindow(&dummy_hwnd, &dummy_hdc); + if (Pbuffer == NULL) { + throwException(env, "Could not create Pbuffer"); + return; + } + Pbuffer_dc = extensions.wglGetPbufferDCARB(Pbuffer); + if (Pbuffer_dc == NULL) { + extensions.wglDestroyPbufferARB(Pbuffer); + throwException(env, "Could not get Pbuffer DC"); + return; + } + peer_info->extensions = extensions; + peer_info->u.pbuffer = Pbuffer; + peer_info->drawable_hdc = Pbuffer_dc; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsPbufferPeerInfo_nDestroy + (JNIEnv *env, jclass clazz, jobject peer_info_handle) { + WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + peer_info->extensions.wglReleasePbufferDCARB(peer_info->u.pbuffer, peer_info->drawable_hdc); + peer_info->extensions.wglDestroyPbufferARB(peer_info->u.pbuffer); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_WindowsPbufferPeerInfo_nIsBufferLost + (JNIEnv *env, jclass clazz, jobject peer_info_handle) { + WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + BOOL buffer_lost; + peer_info->extensions.wglQueryPbufferARB(peer_info->u.pbuffer, WGL_PBUFFER_LOST_ARB, &buffer_lost); + return buffer_lost ? JNI_TRUE : JNI_FALSE; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsPbufferPeerInfo_nSetPbufferAttrib + (JNIEnv *env, jclass clazz, jobject peer_info_handle, jint attrib, jint value) { + WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + int attribs[3]; + + attribs[0] = attrib; + attribs[1] = value; + attribs[2] = 0; + + peer_info->extensions.wglSetPbufferAttribARB(peer_info->u.pbuffer, attribs); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsPbufferPeerInfo_nBindTexImageToPbuffer + (JNIEnv *env, jclass clazz, jobject peer_info_handle, jint buffer) { + WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + peer_info->extensions.wglBindTexImageARB(peer_info->u.pbuffer, buffer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsPbufferPeerInfo_nReleaseTexImageFromPbuffer + (JNIEnv *env, jclass clazz, jobject peer_info_handle, jint buffer) { + WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + peer_info->extensions.wglReleaseTexImageARB(peer_info->u.pbuffer, buffer); +} diff --git a/etc/lwjgl-2.9.1/src/native/windows/opengl/org_lwjgl_opengl_WindowsContextImplementation.c b/etc/lwjgl-2.9.1/src/native/windows/opengl/org_lwjgl_opengl_WindowsContextImplementation.c new file mode 100644 index 0000000..266f068 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/opengl/org_lwjgl_opengl_WindowsContextImplementation.c @@ -0,0 +1,173 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * @author elias_naur + * @version $Revision$ + */ + +#include +#include "org_lwjgl_opengl_WindowsContextImplementation.h" +#include "context.h" +#include "extgl_wgl.h" +#include "common_tools.h" + +typedef struct { + HGLRC context; +} WindowsContext; + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_WindowsContextImplementation_nCreate + (JNIEnv *env, jclass clazz, jobject peer_info_handle, jobject attribs, jobject shared_context_handle) { + WindowsPeerInfo *peer_info; + WindowsContext *shared_context_info; + WindowsContext *context_info; + HGLRC context; + HGLRC shared_context = NULL; + + // -- We need to create a temporary context to detect the presence of WGL_ARB_create_context + HDC saved_current_hdc; + HGLRC saved_current_hglrc; + WGLExtensions extensions; + const int *attribList = attribs == NULL ? NULL : ((const int *)(*env)->GetDirectBufferAddress(env, attribs)); + + jobject context_handle = newJavaManagedByteBuffer(env, sizeof(WindowsContext)); + if (context_handle == NULL) { + throwException(env, "Could not create handle buffer"); + return NULL; + } + + peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + if (shared_context_handle != NULL) { + shared_context_info = (WindowsContext *)(*env)->GetDirectBufferAddress(env, shared_context_handle); + shared_context = shared_context_info->context; + } + + // Create the context + context = wglCreateContext(peer_info->drawable_hdc); + if (context == NULL) { + throwException(env, "Could not create context"); + return NULL; + } + + // Save the current HDC and HGLRC to avoid disruption + saved_current_hdc = wglGetCurrentDC(); + saved_current_hglrc = wglGetCurrentContext(); + + // Make context current and detect extensions + if (!wglMakeCurrent(peer_info->drawable_hdc, context)) { + throwException(env, "Could not bind dummy context"); + return NULL; + } + extgl_InitWGL(&extensions); + peer_info->extensions = extensions; + + // Restore previous context + wglMakeCurrent(saved_current_hdc, saved_current_hglrc); + + // + if ( extensions.WGL_ARB_create_context ) { // We support WGL_ARB_create_context, use the new context creation routine + // If we have no context to share and no special attributes, we don't have to recreate the context - wglCreateContext is equivalent to wglCreateContextAttribs(hdc,0,NULL). + if ( shared_context != NULL || attribList != NULL ) { + // Delete the oldschool context + wglDeleteContext(context); + // Create a new context using WGL_ARB_create_context + context = (HGLRC)extensions.wglCreateContextAttribsARB(peer_info->drawable_hdc, shared_context, attribList); + if (context == NULL) { + throwException(env, "Could not create context (WGL_ARB_create_context)"); + return NULL; + } + } + } else { // We don't support WGL_ARB_create_context, use the old context creation routine + if (shared_context != NULL && !wglShareLists(shared_context, context)) { // Use wglShareLists to share context data + wglDeleteContext(context); + throwException(env, "Could not share contexts"); + return NULL; + } + } + + context_info = (WindowsContext *)(*env)->GetDirectBufferAddress(env, context_handle); + context_info->context = context; + return context_handle; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsContextImplementation_getHGLRC(JNIEnv *env, jclass clazz, jobject context_handle) { + WindowsContext *context_info = (WindowsContext *)(*env)->GetDirectBufferAddress(env, context_handle); + return (intptr_t)context_info->context; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsContextImplementation_getHDC(JNIEnv *env, jclass clazz, jobject peer_info_handle) { + WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + return (intptr_t)peer_info->drawable_hdc; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsContextImplementation_nSwapBuffers + (JNIEnv *env, jclass clazz, jobject peer_info_handle) { + WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + SwapBuffers(peer_info->drawable_hdc); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsContextImplementation_nReleaseCurrentContext + (JNIEnv *env, jclass clazz) { + wglMakeCurrent(NULL, NULL); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsContextImplementation_nMakeCurrent + (JNIEnv *env, jclass clazz, jobject peer_info_handle, jobject context_handle) { + WindowsContext *context_info = (WindowsContext *)(*env)->GetDirectBufferAddress(env, context_handle); + WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + if (!wglMakeCurrent(peer_info->drawable_hdc, context_info->context)) + throwException(env, "Could not make context current"); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_WindowsContextImplementation_nIsCurrent + (JNIEnv *env, jclass clazz, jobject context_handle) { + WindowsContext *context_info = (WindowsContext *)(*env)->GetDirectBufferAddress(env, context_handle); + return wglGetCurrentContext() == context_info->context; +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_WindowsContextImplementation_nSetSwapInterval + (JNIEnv *env, jclass clazz, jint value) { + WGLExtensions extensions; + extgl_InitWGL(&extensions); + if (extensions.WGL_EXT_swap_control) { + return extensions.wglSwapIntervalEXT(value) ? JNI_TRUE : JNI_FALSE; + } else + return JNI_FALSE; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsContextImplementation_nDestroy + (JNIEnv *env, jclass clazz, jobject context_handle) { + WindowsContext *context_info = (WindowsContext *)(*env)->GetDirectBufferAddress(env, context_handle); + wglDeleteContext(context_info->context); +} diff --git a/etc/lwjgl-2.9.1/src/native/windows/opengl/org_lwjgl_opengl_WindowsContextImplementation.h b/etc/lwjgl-2.9.1/src/native/windows/opengl/org_lwjgl_opengl_WindowsContextImplementation.h new file mode 100644 index 0000000..185d09b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/opengl/org_lwjgl_opengl_WindowsContextImplementation.h @@ -0,0 +1,85 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_WindowsContextImplementation */ + +#ifndef _Included_org_lwjgl_opengl_WindowsContextImplementation +#define _Included_org_lwjgl_opengl_WindowsContextImplementation +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_lwjgl_opengl_WindowsContextImplementation + * Method: nCreate + * Signature: (Ljava/nio/ByteBuffer;Ljava/nio/IntBuffer;Ljava/nio/ByteBuffer;)Ljava/nio/ByteBuffer; + */ +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_WindowsContextImplementation_nCreate + (JNIEnv *, jclass, jobject, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_WindowsContextImplementation + * Method: getHGLRC + * Signature: (Ljava/nio/ByteBuffer;)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsContextImplementation_getHGLRC + (JNIEnv *, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_WindowsContextImplementation + * Method: getHDC + * Signature: (Ljava/nio/ByteBuffer;)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsContextImplementation_getHDC + (JNIEnv *, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_WindowsContextImplementation + * Method: nSwapBuffers + * Signature: (Ljava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsContextImplementation_nSwapBuffers + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_WindowsContextImplementation + * Method: nReleaseCurrentContext + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsContextImplementation_nReleaseCurrentContext + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengl_WindowsContextImplementation + * Method: nMakeCurrent + * Signature: (Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsContextImplementation_nMakeCurrent + (JNIEnv *, jclass, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_WindowsContextImplementation + * Method: nIsCurrent + * Signature: (Ljava/nio/ByteBuffer;)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_WindowsContextImplementation_nIsCurrent + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_WindowsContextImplementation + * Method: nSetSwapInterval + * Signature: (I)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_WindowsContextImplementation_nSetSwapInterval + (JNIEnv *, jclass, jint); + +/* + * Class: org_lwjgl_opengl_WindowsContextImplementation + * Method: nDestroy + * Signature: (Ljava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsContextImplementation_nDestroy + (JNIEnv *, jclass, jobject); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/windows/opengl/org_lwjgl_opengl_WindowsPbufferPeerInfo.h b/etc/lwjgl-2.9.1/src/native/windows/opengl/org_lwjgl_opengl_WindowsPbufferPeerInfo.h new file mode 100644 index 0000000..2ed72b8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/opengl/org_lwjgl_opengl_WindowsPbufferPeerInfo.h @@ -0,0 +1,61 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_WindowsPbufferPeerInfo */ + +#ifndef _Included_org_lwjgl_opengl_WindowsPbufferPeerInfo +#define _Included_org_lwjgl_opengl_WindowsPbufferPeerInfo +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_lwjgl_opengl_WindowsPbufferPeerInfo + * Method: nCreate + * Signature: (Ljava/nio/ByteBuffer;IILorg/lwjgl/opengl/PixelFormat;Ljava/nio/IntBuffer;Ljava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsPbufferPeerInfo_nCreate + (JNIEnv *, jclass, jobject, jint, jint, jobject, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_WindowsPbufferPeerInfo + * Method: nIsBufferLost + * Signature: (Ljava/nio/ByteBuffer;)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_WindowsPbufferPeerInfo_nIsBufferLost + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_WindowsPbufferPeerInfo + * Method: nSetPbufferAttrib + * Signature: (Ljava/nio/ByteBuffer;II)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsPbufferPeerInfo_nSetPbufferAttrib + (JNIEnv *, jclass, jobject, jint, jint); + +/* + * Class: org_lwjgl_opengl_WindowsPbufferPeerInfo + * Method: nBindTexImageToPbuffer + * Signature: (Ljava/nio/ByteBuffer;I)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsPbufferPeerInfo_nBindTexImageToPbuffer + (JNIEnv *, jclass, jobject, jint); + +/* + * Class: org_lwjgl_opengl_WindowsPbufferPeerInfo + * Method: nReleaseTexImageFromPbuffer + * Signature: (Ljava/nio/ByteBuffer;I)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsPbufferPeerInfo_nReleaseTexImageFromPbuffer + (JNIEnv *, jclass, jobject, jint); + +/* + * Class: org_lwjgl_opengl_WindowsPbufferPeerInfo + * Method: nDestroy + * Signature: (Ljava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsPbufferPeerInfo_nDestroy + (JNIEnv *, jclass, jobject); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/windows/opengl/org_lwjgl_opengl_WindowsPeerInfo.c b/etc/lwjgl-2.9.1/src/native/windows/opengl/org_lwjgl_opengl_WindowsPeerInfo.c new file mode 100644 index 0000000..00c9421 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/opengl/org_lwjgl_opengl_WindowsPeerInfo.c @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * @author elias_naur + * @version $Revision$ + */ + +#include +#include "org_lwjgl_opengl_WindowsPeerInfo.h" +#include "context.h" +#include "common_tools.h" + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_WindowsPeerInfo_createHandle(JNIEnv *env, jclass clazz) { + return newJavaManagedByteBuffer(env, sizeof(WindowsPeerInfo)); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsPeerInfo_nChoosePixelFormat + (JNIEnv *env, jclass clazz, jlong hdc_ptr, jint origin_x, jint origin_y, jobject pixel_format, jobject pixel_format_caps, jboolean use_hdc_bpp, jboolean window, jboolean pbuffer, jboolean double_buffer) { + HDC hdc = (HDC)(INT_PTR)hdc_ptr; + return findPixelFormatOnDC(env, hdc, origin_x, origin_y, pixel_format, pixel_format_caps, use_hdc_bpp, window, pbuffer, double_buffer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsPeerInfo_setPixelFormat + (JNIEnv *env, jclass clazz, jlong hdc_ptr, jint pixel_format) { + HDC hdc = (HDC)(INT_PTR)hdc_ptr; + applyPixelFormat(env, hdc, pixel_format); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsPeerInfo_nGetHdc(JNIEnv *env, jclass unused, jobject peer_info_handle) { + WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + return (intptr_t)peer_info->drawable_hdc; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsPeerInfo_nGetHwnd(JNIEnv *env, jclass unused, jobject peer_info_handle) { + WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + return (intptr_t)peer_info->u.hwnd; +} diff --git a/etc/lwjgl-2.9.1/src/native/windows/opengl/org_lwjgl_opengl_WindowsPeerInfo.h b/etc/lwjgl-2.9.1/src/native/windows/opengl/org_lwjgl_opengl_WindowsPeerInfo.h new file mode 100644 index 0000000..b0a2ff9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/opengl/org_lwjgl_opengl_WindowsPeerInfo.h @@ -0,0 +1,53 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_WindowsPeerInfo */ + +#ifndef _Included_org_lwjgl_opengl_WindowsPeerInfo +#define _Included_org_lwjgl_opengl_WindowsPeerInfo +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_lwjgl_opengl_WindowsPeerInfo + * Method: createHandle + * Signature: ()Ljava/nio/ByteBuffer; + */ +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_WindowsPeerInfo_createHandle + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengl_WindowsPeerInfo + * Method: nChoosePixelFormat + * Signature: (JIILorg/lwjgl/opengl/PixelFormat;Ljava/nio/IntBuffer;ZZZZ)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsPeerInfo_nChoosePixelFormat + (JNIEnv *, jclass, jlong, jint, jint, jobject, jobject, jboolean, jboolean, jboolean, jboolean); + +/* + * Class: org_lwjgl_opengl_WindowsPeerInfo + * Method: setPixelFormat + * Signature: (JI)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsPeerInfo_setPixelFormat + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: org_lwjgl_opengl_WindowsPeerInfo + * Method: nGetHdc + * Signature: (Ljava/nio/ByteBuffer;)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsPeerInfo_nGetHdc + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_WindowsPeerInfo + * Method: nGetHwnd + * Signature: (Ljava/nio/ByteBuffer;)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsPeerInfo_nGetHwnd + (JNIEnv *, jclass, jobject); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/windows/opengles/context.c b/etc/lwjgl-2.9.1/src/native/windows/opengles/context.c new file mode 100644 index 0000000..94c9696 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/opengles/context.c @@ -0,0 +1,507 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id: context.c -1 $ + * + * @author elias_naue + * @version $Revision: -1 $ + */ + +#include +#include "Window.h" +#include "extgl.h" +/*#include "extgl_wgl.h"*/ +#include "context.h" + +extern HINSTANCE dll_handle; // Handle to the LWJGL dll + +#define _CONTEXT_PRIVATE_CLASS_NAME _T("__lwjgl_context_class_name") + +/* + * Register the LWJGL window class. + * Returns true for success, or false for failure + */ +bool registerWindow(WNDPROC win_proc, LPCTSTR class_name) +{ + WNDCLASS windowClass; + memset(&windowClass, 0, sizeof(windowClass)); + windowClass.style = CS_OWNDC; + windowClass.lpfnWndProc = win_proc; + windowClass.cbClsExtra = 0; + windowClass.cbWndExtra = 0; + windowClass.hInstance = dll_handle; + windowClass.hIcon = LoadIcon(NULL, IDI_APPLICATION); + windowClass.hCursor = LoadCursor(NULL, IDC_ARROW); + windowClass.hbrBackground = NULL; + windowClass.lpszMenuName = NULL; + windowClass.lpszClassName = class_name; + + if (RegisterClass(&windowClass) == 0) { + printfDebug("Failed to register window class\n"); + return false; + } + return true; +} + +static LRESULT CALLBACK dummyWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { + return DefWindowProc(hwnd, msg, wParam, lParam); +} + +/* +bool applyPixelFormat(JNIEnv *env, HDC hdc, int iPixelFormat) { + PIXELFORMATDESCRIPTOR desc; + if (DescribePixelFormat(hdc, iPixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &desc) == 0) { + throwFormattedException(env, "DescribePixelFormat failed (%d)", GetLastError()); + return false; + } + + // make that the pixel format of the device context + if (SetPixelFormat(hdc, iPixelFormat, &desc) == FALSE) { + throwFormattedException(env, "SetPixelFormat failed (%d)", GetLastError()); + return false; + } + return true; +} +*/ + +/* + * Close the window + */ +void closeWindow(HWND *hwnd, HDC *hdc) +{ + // Release device context + if (*hdc != NULL && *hwnd != NULL) { + ReleaseDC(*hwnd, *hdc); + *hdc = NULL; + } + + // Close the window + if (*hwnd != NULL) { + ShowWindow(*hwnd, SW_HIDE); + DestroyWindow(*hwnd); + *hwnd = NULL; + } +} + +void getWindowFlags(DWORD *windowflags_return, DWORD *exstyle_return, bool undecorated, bool child_window) { + DWORD exstyle, windowflags; + if (undecorated) { + exstyle = WS_EX_APPWINDOW; + windowflags = WS_POPUP; + } else if (child_window) { + exstyle = 0; + windowflags = WS_CHILDWINDOW; + } else { + exstyle = WS_EX_APPWINDOW; + windowflags = WS_OVERLAPPED | WS_BORDER | WS_CAPTION | WS_MINIMIZEBOX | WS_SYSMENU; + } + windowflags = windowflags | WS_CLIPCHILDREN | WS_CLIPSIBLINGS; + *windowflags_return = windowflags; + *exstyle_return = exstyle; +} + +HWND createWindow(LPCTSTR window_class_name, int x, int y, int width, int height, bool undecorated, bool child_window, HWND parent) +{ + RECT clientSize; + DWORD exstyle, windowflags; + HWND new_hwnd; + + getWindowFlags(&windowflags, &exstyle, undecorated, child_window); + + clientSize.bottom = height; + clientSize.left = 0; + clientSize.right = width; + clientSize.top = 0; + + AdjustWindowRectEx( + &clientSize, // client-rectangle structure + windowflags, // window styles + FALSE, // menu-present option + exstyle // extended window style + ); + // Create the window now, using that class: + new_hwnd = CreateWindowEx ( + exstyle, + window_class_name, + _T(""), + windowflags, + x, y, clientSize.right - clientSize.left, clientSize.bottom - clientSize.top, + parent, + NULL, + dll_handle, + NULL); + + return new_hwnd; +} + +/* +static int convertToBPE(int bpp) { + int bpe; + switch (bpp) { + case 0: + bpe = 0; + break; + case 32: + case 24: + bpe = 8; + break; + case 16: // Fall through + default: + bpe = 4; + break; + } + return bpe; +} +*/ + +/* +static int findPixelFormatARBFromBPP(JNIEnv *env, HDC hdc, WGLExtensions *extensions, jobject pixel_format, jobject pixelFormatCaps, int bpp, bool window, bool pbuffer, bool double_buffer) { + jclass cls_pixel_format = (*env)->GetObjectClass(env, pixel_format); + int alpha = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "alpha", "I")); + int depth = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "depth", "I")); + int stencil = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "stencil", "I")); + int samples = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "samples", "I")); + int colorSamples = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "colorSamples", "I")); + int num_aux_buffers = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "num_aux_buffers", "I")); + int accum_bpp = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "accum_bpp", "I")); + int accum_alpha = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "accum_alpha", "I")); + + jboolean stereo = (*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "stereo", "Z")); + jboolean floating_point = (*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "floating_point", "Z")); + jboolean floating_point_packed = (*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "floating_point_packed", "Z")); + jboolean sRGB = (*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "sRGB", "Z")); + + int pixel_type; + int iPixelFormat; + unsigned int num_formats_returned; + attrib_list_t attrib_list; + GLuint *pixelFormatCaps_ptr; + jlong pixelFormatCapsSize; + BOOL result; + jlong i; + int bpe = convertToBPE(bpp); + + if ( floating_point ) + pixel_type = WGL_TYPE_RGBA_FLOAT_ARB; + else if ( floating_point_packed ) + pixel_type = WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT; + else + pixel_type = WGL_TYPE_RGBA_ARB; + + initAttribList(&attrib_list); + if (window) { + putAttrib(&attrib_list, WGL_DRAW_TO_WINDOW_ARB); putAttrib(&attrib_list, TRUE); + } + if (pbuffer) { + putAttrib(&attrib_list, WGL_DRAW_TO_PBUFFER_ARB); putAttrib(&attrib_list, TRUE); + } + if (!getBooleanProperty(env, "org.lwjgl.opengl.Display.allowSoftwareOpenGL")) { + putAttrib(&attrib_list, WGL_ACCELERATION_ARB); putAttrib(&attrib_list, WGL_FULL_ACCELERATION_ARB); + } + putAttrib(&attrib_list, WGL_PIXEL_TYPE_ARB); putAttrib(&attrib_list, pixel_type); + putAttrib(&attrib_list, WGL_DOUBLE_BUFFER_ARB); putAttrib(&attrib_list, double_buffer ? TRUE : FALSE); + putAttrib(&attrib_list, WGL_SUPPORT_OPENGL_ARB); putAttrib(&attrib_list, TRUE); + putAttrib(&attrib_list, WGL_RED_BITS_ARB); putAttrib(&attrib_list, bpe); + putAttrib(&attrib_list, WGL_GREEN_BITS_ARB); putAttrib(&attrib_list, bpe); + putAttrib(&attrib_list, WGL_BLUE_BITS_ARB); putAttrib(&attrib_list, bpe); + putAttrib(&attrib_list, WGL_ALPHA_BITS_ARB); putAttrib(&attrib_list, alpha); + putAttrib(&attrib_list, WGL_DEPTH_BITS_ARB); putAttrib(&attrib_list, depth); + putAttrib(&attrib_list, WGL_STENCIL_BITS_ARB); putAttrib(&attrib_list, stencil); + // Assume caller checked extension availability + if (samples > 0) { + putAttrib(&attrib_list, WGL_SAMPLE_BUFFERS_ARB); putAttrib(&attrib_list, 1); + putAttrib(&attrib_list, WGL_SAMPLES_ARB); putAttrib(&attrib_list, samples); // WGL_COVERAGE_SAMPLES_NV if colorSamples > 0 + if ( colorSamples > 0 ) { + putAttrib(&attrib_list, WGL_COLOR_SAMPLES_NV); putAttrib(&attrib_list, colorSamples); + } + } + putAttrib(&attrib_list, WGL_ACCUM_BITS_ARB); putAttrib(&attrib_list, accum_bpp); + putAttrib(&attrib_list, WGL_ACCUM_ALPHA_BITS_ARB); putAttrib(&attrib_list, accum_alpha); + putAttrib(&attrib_list, WGL_STEREO_ARB); putAttrib(&attrib_list, stereo ? TRUE : FALSE); + putAttrib(&attrib_list, WGL_AUX_BUFFERS_ARB); putAttrib(&attrib_list, num_aux_buffers); + if (sRGB) { + putAttrib(&attrib_list, WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB); putAttrib(&attrib_list, TRUE); + } + + // Assume caller checked extension availability + if (pixelFormatCaps != NULL) { + pixelFormatCaps_ptr = (GLuint *)(*env)->GetDirectBufferAddress(env, pixelFormatCaps); + pixelFormatCapsSize = (*env)->GetDirectBufferCapacity(env, pixelFormatCaps); + + for (i = 0; i < pixelFormatCapsSize; i++) + putAttrib(&attrib_list, pixelFormatCaps_ptr[i]); + } + putAttrib(&attrib_list, 0); putAttrib(&attrib_list, 0); + result = extensions->wglChoosePixelFormatARB(hdc, attrib_list.attribs, NULL, 1, &iPixelFormat, &num_formats_returned); + + if (result == FALSE || num_formats_returned < 1) { + throwFormattedException(env, "Failed to find ARB pixel format %d %d\n", result, num_formats_returned); + return -1; + } + return iPixelFormat; +} + +static int findPixelFormatARB(JNIEnv *env, HDC hdc, WGLExtensions *extensions, jobject pixel_format, jobject pixelFormatCaps, bool use_hdc_bpp, bool window, bool pbuffer, bool double_buffer) { + int bpp; + int iPixelFormat; + int fallback_bpp = 16; + jclass cls_pixel_format = (*env)->GetObjectClass(env, pixel_format); + if (use_hdc_bpp) { + bpp = GetDeviceCaps(hdc, BITSPIXEL); + iPixelFormat = findPixelFormatARBFromBPP(env, hdc, extensions, pixel_format, pixelFormatCaps, bpp, window, pbuffer, double_buffer); + if ((*env)->ExceptionOccurred(env)) { + (*env)->ExceptionClear(env); + printfDebugJava(env, "Failed to find ARB pixel format with HDC depth %d, falling back to %d\n", bpp, fallback_bpp); + bpp = fallback_bpp; + } else + return iPixelFormat; + } else + bpp = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "bpp", "I")); + return findPixelFormatARBFromBPP(env, hdc, extensions, pixel_format, pixelFormatCaps, bpp, window, pbuffer, double_buffer); +} +*/ + +/* + * Find an appropriate pixel format + */ + /* +static int findPixelFormatFromBPP(JNIEnv *env, HDC hdc, jobject pixel_format, int bpp, bool double_buffer) +{ + jclass cls_pixel_format = (*env)->GetObjectClass(env, pixel_format); + int alpha = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "alpha", "I")); + int depth = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "depth", "I")); + int stencil = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "stencil", "I")); + int num_aux_buffers = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "num_aux_buffers", "I")); + int accum_bpp = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "accum_bpp", "I")); + int accum_alpha = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "accum_alpha", "I")); + jboolean stereo = (*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "stereo", "Z")); + unsigned int flags = PFD_DRAW_TO_WINDOW | // support window + PFD_SUPPORT_OPENGL | + (double_buffer ? PFD_DOUBLEBUFFER : 0) | + (stereo ? PFD_STEREO : 0); + PIXELFORMATDESCRIPTOR desc; + int iPixelFormat; + PIXELFORMATDESCRIPTOR pfd = { + sizeof(PIXELFORMATDESCRIPTOR), // size of this pfd + 1, // version number + flags, // RGBA type + PFD_TYPE_RGBA, + (BYTE)bpp, + 0, 0, 0, 0, 0, 0, // color bits ignored + (BYTE)alpha, + 0, // shift bit ignored + accum_bpp + accum_alpha, // no accumulation buffer + 0, 0, 0, 0, // accum bits ignored + (BYTE)depth, + (BYTE)stencil, + num_aux_buffers, + PFD_MAIN_PLANE, // main layer + 0, // reserved + 0, 0, 0 // layer masks ignored + }; + // get the best available match of pixel format for the device context + iPixelFormat = ChoosePixelFormat(hdc, &pfd); + if (iPixelFormat == 0) { + throwException(env, "Failed to choose pixel format"); + return -1; + } + + if (DescribePixelFormat(hdc, iPixelFormat, sizeof(PIXELFORMATDESCRIPTOR), &desc) == 0) { + throwException(env, "Could not describe pixel format"); + return -1; + } + + if (desc.cColorBits < bpp) { + throwException(env, "Insufficient color precision"); + return -1; + } + + if (desc.cAlphaBits < alpha) { + throwException(env, "Insufficient alpha precision"); + return -1; + } + + if (desc.cStencilBits < stencil) { + throwException(env, "Insufficient stencil precision"); + return -1; + } + + if (desc.cDepthBits < depth) { + throwException(env, "Insufficient depth buffer precision"); + return -1; + } + + if ((desc.dwFlags & PFD_GENERIC_FORMAT) != 0) { + jboolean allowSoftwareOpenGL = getBooleanProperty(env, "org.lwjgl.opengl.Display.allowSoftwareOpenGL"); + // secondary check for software override + if(!allowSoftwareOpenGL) { + throwException(env, "Pixel format not accelerated"); + return -1; + } + } + + if ((desc.dwFlags & flags) != flags) { + throwException(env, "Capabilities not supported"); + return -1; + } + return iPixelFormat; +} + +static int findPixelFormatDefault(JNIEnv *env, HDC hdc, jobject pixel_format, bool use_hdc_bpp, bool double_buffer) { + int bpp; + int iPixelFormat; + int fallback_bpp = 16; + jclass cls_pixel_format = (*env)->GetObjectClass(env, pixel_format); + if (use_hdc_bpp) { + bpp = GetDeviceCaps(hdc, BITSPIXEL); + iPixelFormat = findPixelFormatFromBPP(env, hdc, pixel_format, bpp, double_buffer); + if ((*env)->ExceptionOccurred(env)) { + (*env)->ExceptionClear(env); + printfDebugJava(env, "Failed to find pixel format with HDC depth %d, falling back to %d\n", bpp, fallback_bpp); + bpp = fallback_bpp; + } else + return iPixelFormat; + } else + bpp = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "bpp", "I")); + return findPixelFormatFromBPP(env, hdc, pixel_format, bpp, double_buffer); +} +*/ + +/* +static bool validateAndGetExtensions(JNIEnv *env, WGLExtensions *extensions, HDC dummy_hdc, HGLRC dummy_hglrc, int samples, int colorSamples, bool floating_point, bool floating_point_packed, bool sRGB, jobject pixelFormatCaps) { + if (!wglMakeCurrent(dummy_hdc, dummy_hglrc)) { + throwException(env, "Could not bind context to dummy window"); + return false; + } + extgl_InitWGL(extensions); + + if (!extensions->WGL_ARB_pixel_format) { + throwException(env, "No support for WGL_ARB_pixel_format"); + return false; + } + if (samples > 0 && !extensions->WGL_ARB_multisample) { + throwException(env, "No support for WGL_ARB_multisample"); + return false; + } + if (colorSamples > 0 && !extensions->WGL_NV_multisample_coverage) { + throwException(env, "No support for WGL_NV_multisample_coverage"); + return false; + } + + // Apparently, some drivers don't report WGL_ARB_pixel_format_float + // even though GL_ARB_color_buffer_float and WGL_ATI_color_format_float + // is supported. + if (floating_point && !(extensions->WGL_ARB_pixel_format_float || extensions->WGL_ATI_pixel_format_float)) { + throwException(env, "No support for WGL_ARB_pixel_format_float nor WGL_ATI_pixel_format_float"); + return false; + } + if (floating_point_packed && !(extensions->WGL_EXT_pixel_format_packed_float)) { + throwException(env, "No support for WGL_EXT_pixel_format_packed_float"); + return false; + } + if (sRGB && !(extensions->WGL_ARB_framebuffer_sRGB)) { + throwException(env, "No support for WGL_ARB_framebuffer_sRGB"); + return false; + } + if (pixelFormatCaps != NULL && !extensions->WGL_ARB_render_texture) { + throwException(env, "No support for WGL_ARB_render_texture"); + return false; + } + return true; +} + +int findPixelFormatOnDC(JNIEnv *env, HDC hdc, int origin_x, int origin_y, jobject pixel_format, jobject pixelFormatCaps, bool use_hdc_bpp, bool window, bool pbuffer, bool double_buffer) { + HGLRC dummy_hglrc; + HDC saved_current_hdc; + HGLRC saved_current_hglrc; + WGLExtensions extensions; + HWND dummy_hwnd; + HDC dummy_hdc; + int pixel_format_id; + jclass cls_pixel_format = (*env)->GetObjectClass(env, pixel_format); + + int samples = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "samples", "I")); + int colorSamples = (int)(*env)->GetIntField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "colorSamples", "I")); + bool floating_point = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "floating_point", "Z")); + bool floating_point_packed = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "floating_point_packed", "Z")); + bool sRGB = (bool)(*env)->GetBooleanField(env, pixel_format, (*env)->GetFieldID(env, cls_pixel_format, "sRGB", "Z")); + bool use_arb_selection = samples > 0 || floating_point || floating_point_packed || sRGB || pbuffer || pixelFormatCaps != NULL; + + pixel_format_id = findPixelFormatDefault(env, hdc, pixel_format, use_hdc_bpp, double_buffer); + if (!(*env)->ExceptionOccurred(env) && use_arb_selection) { + dummy_hwnd = createDummyWindow(origin_x, origin_y); + if (dummy_hwnd == NULL) { + throwException(env, "Could not create dummy window"); + return -1; + } + dummy_hdc = GetDC(dummy_hwnd); + if (!applyPixelFormat(env, dummy_hdc, pixel_format_id)) { + closeWindow(&dummy_hwnd, &dummy_hdc); + return -1; + } + dummy_hglrc = wglCreateContext(dummy_hdc); + if (dummy_hglrc == NULL) { + closeWindow(&dummy_hwnd, &dummy_hdc); + throwException(env, "Failed to create OpenGL rendering context"); + return -1; + } + // Save the current HDC and HGLRC to avoid disruption + saved_current_hdc = wglGetCurrentDC(); + saved_current_hglrc = wglGetCurrentContext(); + if (validateAndGetExtensions(env, &extensions, dummy_hdc, dummy_hglrc, samples, colorSamples, floating_point, floating_point_packed, sRGB, pixelFormatCaps)) { + pixel_format_id = findPixelFormatARB(env, hdc, &extensions, pixel_format, pixelFormatCaps, use_hdc_bpp, window, pbuffer, double_buffer); + } + wglMakeCurrent(saved_current_hdc, saved_current_hglrc); + wglDeleteContext(dummy_hglrc); + closeWindow(&dummy_hwnd, &dummy_hdc); + } + return pixel_format_id; +} +*/ + +static bool registerDummyWindow() { + static bool window_registered = false; + if (!window_registered) { + if (!registerWindow(dummyWindowProc, _CONTEXT_PRIVATE_CLASS_NAME)) { + return false; + } + window_registered = true; + } + return true; +} + +HWND createDummyWindow(int origin_x, int origin_y) { + if (!registerDummyWindow()) + return NULL; + return createWindow(_CONTEXT_PRIVATE_CLASS_NAME, origin_x, origin_y, 1, 1, false, false, NULL); +} diff --git a/etc/lwjgl-2.9.1/src/native/windows/opengles/context.h b/etc/lwjgl-2.9.1/src/native/windows/opengles/context.h new file mode 100644 index 0000000..402f256 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/opengles/context.h @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id: context.h -1 $ + * + * @author elias_naur + * @version $Revision: -1 $ + */ + +#ifndef __LWJGL_CONTEXT_H +#define __LWJGL_CONTEXT_H + +#include "Window.h" +#include "extgl.h" + +typedef struct { + union { + HWND hwnd; + } u; + HDC drawable_hdc; +} WindowsPeerInfo; + +/* + * Register the LWJGL window class. + * Returns true for success, or false for failure + */ +extern bool registerWindow(); + +//extern bool applyPixelFormat(JNIEnv *env, HDC hdc, int iPixelFormat); + +/* + * Close the window + */ +extern void closeWindow(HWND *hwnd, HDC *hdc); + +/** + * Create a dummy window suitable to create contexts from + */ +extern HWND createDummyWindow(int x, int y); + +/** + * Return appropriate window and extended style flags from the given fullscreen and undecorated property + */ +extern void getWindowFlags(DWORD *windowflags_return, DWORD *exstyle_return, bool undecorated, bool child_window); + +/* + * Create a window with the specified position, size, and + * fullscreen attribute. The window will have DirectInput associated + * with it. + * + * Returns true for success, or false for failure + */ +extern HWND createWindow(LPCTSTR window_class_name, int x, int y, int width, int height, bool undecorated, bool child_window, HWND parent); + +//extern int findPixelFormatOnDC(JNIEnv *env, HDC hdc, int origin_x, int origin_y, jobject pixel_format, jobject pixelFormatCaps, bool use_hdc_bpp, bool window, bool pbuffer, bool double_buffer); + +#endif diff --git a/etc/lwjgl-2.9.1/src/native/windows/opengles/extgl_wgl.c b/etc/lwjgl-2.9.1/src/native/windows/opengles/extgl_wgl.c new file mode 100644 index 0000000..d1c57e3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/opengles/extgl_wgl.c @@ -0,0 +1,70 @@ +/* ---------------------------------------------------------------------------- +Copyright (c) 2001-2002, Lev Povalahev +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * The name of the author may be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, +OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. +------------------------------------------------------------------------------*/ +/* + Lev Povalahev + + levp@gmx.net + + http://www.uni-karlsruhe.de/~uli2/ + +*/ + +#include +#include +#include "extgl.h" + +static HMODULE lib_gl_handle = NULL; + +void *extgl_GetProcAddress(const char *name) { + void *t = eglGetProcAddress(name); + if (t == NULL) + { + t = GetProcAddress(lib_gl_handle, name); + if (t == NULL) + { + printfDebug("Could not locate symbol %s\n", name); + } + } + return t; +} + +bool extgl_Open(JNIEnv *env) { + if (lib_gl_handle != NULL) + return true; + // load the dynamic libraries for OpenGL + lib_gl_handle = LoadLibrary("libGLESv2.dll"); + if (lib_gl_handle == NULL) { + throwException(env, "Could not load OpenGL ES library"); + return false; + } + return true; +} + +void extgl_Close(void) { + FreeLibrary(lib_gl_handle); + lib_gl_handle = NULL; +} diff --git a/etc/lwjgl-2.9.1/src/native/windows/opengles/org_lwjgl_opengl_WindowsPeerInfo.c b/etc/lwjgl-2.9.1/src/native/windows/opengles/org_lwjgl_opengl_WindowsPeerInfo.c new file mode 100644 index 0000000..353cb4f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/opengles/org_lwjgl_opengl_WindowsPeerInfo.c @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id: org_lwjgl_opengl_WindowsPeerInfo.c -1 $ + * + * @author elias_naur + * @version $Revision: -1 $ + */ + +#include +#include "org_lwjgl_opengl_WindowsPeerInfo.h" +#include "context.h" +#include "common_tools.h" + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_WindowsPeerInfo_createHandle(JNIEnv *env, jclass clazz) { + return newJavaManagedByteBuffer(env, sizeof(WindowsPeerInfo)); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsPeerInfo_nGetHdc(JNIEnv *env, jclass unused, jobject peer_info_handle) { + WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + return (intptr_t)peer_info->drawable_hdc; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsPeerInfo_nGetHwnd(JNIEnv *env, jclass unused, jobject peer_info_handle) { + WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + return (intptr_t)peer_info->u.hwnd; +} diff --git a/etc/lwjgl-2.9.1/src/native/windows/opengles/org_lwjgl_opengl_WindowsPeerInfo.h b/etc/lwjgl-2.9.1/src/native/windows/opengles/org_lwjgl_opengl_WindowsPeerInfo.h new file mode 100644 index 0000000..b0a2ff9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/opengles/org_lwjgl_opengl_WindowsPeerInfo.h @@ -0,0 +1,53 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_WindowsPeerInfo */ + +#ifndef _Included_org_lwjgl_opengl_WindowsPeerInfo +#define _Included_org_lwjgl_opengl_WindowsPeerInfo +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_lwjgl_opengl_WindowsPeerInfo + * Method: createHandle + * Signature: ()Ljava/nio/ByteBuffer; + */ +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_WindowsPeerInfo_createHandle + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengl_WindowsPeerInfo + * Method: nChoosePixelFormat + * Signature: (JIILorg/lwjgl/opengl/PixelFormat;Ljava/nio/IntBuffer;ZZZZ)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsPeerInfo_nChoosePixelFormat + (JNIEnv *, jclass, jlong, jint, jint, jobject, jobject, jboolean, jboolean, jboolean, jboolean); + +/* + * Class: org_lwjgl_opengl_WindowsPeerInfo + * Method: setPixelFormat + * Signature: (JI)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsPeerInfo_setPixelFormat + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: org_lwjgl_opengl_WindowsPeerInfo + * Method: nGetHdc + * Signature: (Ljava/nio/ByteBuffer;)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsPeerInfo_nGetHdc + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_WindowsPeerInfo + * Method: nGetHwnd + * Signature: (Ljava/nio/ByteBuffer;)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsPeerInfo_nGetHwnd + (JNIEnv *, jclass, jobject); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_Sys.c b/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_Sys.c new file mode 100644 index 0000000..7858834 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_Sys.c @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Windows system library. + * + * @author cix_foo + * @version $Revision$ + */ + +#include "Window.h" +#include "mmsystem.h" +#include "org_lwjgl_WindowsSysImplementation.h" +#include "common_tools.h" +#include +#include + +JNIEXPORT jlong JNICALL Java_org_lwjgl_WindowsSysImplementation_nGetTime(JNIEnv * env, jclass unused) { + DWORD time; + + timeBeginPeriod(1); + time = timeGetTime(); + timeEndPeriod(1); + + return time; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_WindowsSysImplementation_nAlert(JNIEnv * env, jclass unused, jlong hwnd_ptr, jlong title, jlong message) { + HWND hwnd = (HWND)(INT_PTR)hwnd_ptr; + MessageBox(hwnd, (LPCTSTR)(intptr_t)message, (LPCTSTR)(intptr_t)title, MB_OK | MB_TOPMOST); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_WindowsSysImplementation_initCommonControls(JNIEnv * env, jclass unused) { + InitCommonControls(); +} + +JNIEXPORT jstring JNICALL Java_org_lwjgl_WindowsSysImplementation_nGetClipboard + (JNIEnv * env, jclass unused) +{ + // Check to see if there's text available in the clipboard + BOOL textAvailable = IsClipboardFormatAvailable(CF_TEXT); + BOOL unicodeAvailable = IsClipboardFormatAvailable(CF_UNICODETEXT); + void *clipboard_data; + jstring ret; + HANDLE hglb; + const wchar_t * str; + + if (unicodeAvailable) { + if (!OpenClipboard(NULL)) + return NULL; + hglb = GetClipboardData(CF_UNICODETEXT); + if (hglb == NULL) { + CloseClipboard(); + return NULL; + } + clipboard_data = GlobalLock(hglb); + if (clipboard_data == NULL) { + CloseClipboard(); + return NULL; + } + str = (const wchar_t *)clipboard_data; + ret = (*env)->NewString(env, str, (jsize)wcslen(str)); + } else if (textAvailable) { + if (!OpenClipboard(NULL)) + return NULL; + hglb = GetClipboardData(CF_TEXT); + if (hglb == NULL) { + CloseClipboard(); + return NULL; + } + clipboard_data = GlobalLock(hglb); + if (clipboard_data == NULL) { + CloseClipboard(); + return NULL; + } + ret = NewStringNativeWithLength(env, (const char *) clipboard_data, (jsize)strlen(clipboard_data)); + } else { + return NULL; + } + GlobalUnlock(hglb); + CloseClipboard(); + return ret; +} diff --git a/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_WindowsSysImplementation.h b/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_WindowsSysImplementation.h new file mode 100644 index 0000000..b8c010e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_WindowsSysImplementation.h @@ -0,0 +1,47 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_WindowsSysImplementation */ + +#ifndef _Included_org_lwjgl_WindowsSysImplementation +#define _Included_org_lwjgl_WindowsSysImplementation +#ifdef __cplusplus +extern "C" { +#endif +#undef org_lwjgl_WindowsSysImplementation_JNI_VERSION +#define org_lwjgl_WindowsSysImplementation_JNI_VERSION 24L +/* + * Class: org_lwjgl_WindowsSysImplementation + * Method: nGetTime + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_WindowsSysImplementation_nGetTime + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_WindowsSysImplementation + * Method: nAlert + * Signature: (JJJ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_WindowsSysImplementation_nAlert + (JNIEnv *, jclass, jlong, jlong, jlong); + +/* + * Class: org_lwjgl_WindowsSysImplementation + * Method: initCommonControls + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_WindowsSysImplementation_initCommonControls + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_WindowsSysImplementation + * Method: nGetClipboard + * Signature: ()Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_org_lwjgl_WindowsSysImplementation_nGetClipboard + (JNIEnv *, jclass); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_input_Cursor.c b/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_input_Cursor.c new file mode 100644 index 0000000..effe595 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_input_Cursor.c @@ -0,0 +1,167 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * win32 mouse handling. + * + * @author elias_naur + * @version $Revision$ + */ + +#include "Window.h" +#include "org_lwjgl_input_Cursor.h" +#include "org_lwjgl_opengl_WindowsDisplay.h" +#include "common_tools.h" + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nCreateCursor +(JNIEnv *env, jclass unused, jint width, jint height, jint x_hotspot, jint y_hotspot, jint num_images, jobject image_buffer, jint images_offset, jobject delay_buffer, jint delays_offset) +{ + unsigned char col0, col1, col2, col3, col4, col5, col6, col7; + unsigned char mask; + BITMAPINFO bitmapInfo; + + HBITMAP cursorMask; + HCURSOR *cursor_handle; + + HCURSOR cursor = NULL; + ICONINFO iconInfo; + char *ptrCursorImage; + HBITMAP colorDIB; + int *srcPtr; + char *dstPtr; + int bitWidth; + int scanlinePad; + int imageSize; // Size in bits + unsigned char *maskPixels; + int pixelCount = 0; + int maskCount = 0; + HBITMAP colorBitmap; + int x, y; + HDC hDC; + jobject handle_buffer = newJavaManagedByteBuffer(env, sizeof(HCURSOR)); + + int *pixels; + if (handle_buffer == NULL) { + throwException(env, "Could not allocate handle"); + return NULL; + } + pixels = (int *)(*env)->GetDirectBufferAddress(env, image_buffer) + images_offset; + + memset(&bitmapInfo, 0, sizeof(BITMAPINFO)); + bitmapInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + bitmapInfo.bmiHeader.biWidth = width; + bitmapInfo.bmiHeader.biHeight = -height; + bitmapInfo.bmiHeader.biPlanes = 1; + + bitmapInfo.bmiHeader.biBitCount = 24; + bitmapInfo.bmiHeader.biCompression = BI_RGB; + + hDC = GetDC(NULL); + + colorDIB = CreateDIBSection(hDC, (BITMAPINFO*)&(bitmapInfo), + DIB_RGB_COLORS, + (void*)&(ptrCursorImage), + NULL, 0); + srcPtr = pixels; + dstPtr = ptrCursorImage; + if (!dstPtr) { + throwException(env, "Could not allocate DIB section."); + ReleaseDC(NULL, hDC); + return NULL; + } + for (y = 0; y < height; y++ ) { + for (x = 0; x < width; x++ ) { + dstPtr[2] = (*srcPtr >> 0x10) & 0xFF; + dstPtr[1] = (*srcPtr >> 0x08) & 0xFF; + dstPtr[0] = *srcPtr & 0xFF; + + srcPtr++; + dstPtr += 3; + } + } + + colorBitmap = CreateDIBitmap(hDC, + (BITMAPINFOHEADER*)&bitmapInfo.bmiHeader, + CBM_INIT, + (void *)ptrCursorImage, + (BITMAPINFO*)&bitmapInfo, + DIB_RGB_COLORS); + + DeleteObject(colorDIB); + + // Convert alpha map to pixel packed mask + bitWidth = width >> 3; + scanlinePad = bitWidth & (sizeof(WORD) - 1); + imageSize = (bitWidth + scanlinePad)*height; // Size in bits + maskPixels = (unsigned char*)malloc(sizeof(unsigned char)*imageSize); + memset(maskPixels, 0, imageSize); + for (y = 0; y < height; y++) + for (x = 0; x < bitWidth; x++) { + col0 = (pixels[pixelCount++] & 0x01000000) >> 17; + col1 = (pixels[pixelCount++] & 0x01000000) >> 18; + col2 = (pixels[pixelCount++] & 0x01000000) >> 19; + col3 = (pixels[pixelCount++] & 0x01000000) >> 20; + col4 = (pixels[pixelCount++] & 0x01000000) >> 21; + col5 = (pixels[pixelCount++] & 0x01000000) >> 22; + col6 = (pixels[pixelCount++] & 0x01000000) >> 23; + col7 = (pixels[pixelCount++] & 0x01000000) >> 24; + mask = col0 | col1 | col2 | col3 | col4 | col5 | col6 | col7; + maskPixels[maskCount++] = ~mask; // 1 is tranparant, 0 opaque + } + + cursorMask = CreateBitmap(width, height, 1, 1, maskPixels); + + memset(&iconInfo, 0, sizeof(ICONINFO)); + iconInfo.hbmMask = cursorMask; + iconInfo.hbmColor = colorBitmap; + iconInfo.fIcon = FALSE; + iconInfo.xHotspot = x_hotspot; + iconInfo.yHotspot = y_hotspot; + cursor = CreateIconIndirect(&iconInfo); + DeleteObject(colorBitmap); + DeleteObject(cursorMask); + free(maskPixels); + ReleaseDC(NULL, hDC); + + cursor_handle = (HCURSOR *)(*env)->GetDirectBufferAddress(env, handle_buffer); + *cursor_handle = cursor; + return handle_buffer; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_doDestroyCursor +(JNIEnv *env, jclass unused, jobject handle_buffer) +{ + HCURSOR *cursor_handle = (HCURSOR *)(*env)->GetDirectBufferAddress(env, handle_buffer); + DestroyCursor(*cursor_handle); +} diff --git a/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_Display.c b/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_Display.c new file mode 100644 index 0000000..4c9c788 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_Display.c @@ -0,0 +1,539 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * Base Windows display + * + * @author cix_foo + * @version $Revision$ + */ + +#define _PRIVATE_WINDOW_H_ +#include +#include "Window.h" +#include +/*#include "extgl_wgl.h"*/ +#include "common_tools.h" +#include "display.h" +#include "org_lwjgl_opengl_WindowsDisplay.h" +#include "org_lwjgl_WindowsSysImplementation.h" +#include "context.h" +#include + +#define WINDOWCLASSNAME _T("LWJGL") + +static jclass windowsDisplayClass; +static jmethodID javaWindowProc; + +/* + * WindowProc for the GL window. + */ +static LRESULT CALLBACK lwjglWindowProc(HWND hWnd, + UINT msg, + WPARAM wParam, + LPARAM lParam) +{ + /* + jclass display_class; + jclass display_class_global; + jmethodID handleMessage_method; + LONG message_time; + */ + JNIEnv *env = getThreadEnv(); + if (env != NULL && !(*env)->ExceptionOccurred(env)) { + /* + * We'll cache a global reference to the WindowsDisplay class in the window's user data. + * This is not so much to avoid lookup overhead as it is to avoid problems + * with AWT. Specifically, awt code can indirectly call this message handler + * when it does a SendMessage on the main thread to the currently focused window, + * which could be a LWJGL window. The FindClass will then fail because the calling + * internal awt class is using the system class loader, not the application loader + * where lwjgl is found. + * + * The very first message sent to this handler is sent when + * a window is created, where we are sure that the calling class' classloader has + * LWJGL classes in it. + */ + + /* + display_class_global = (jclass)(LONG_PTR)GetWindowLongPtr(hWnd, GWLP_USERDATA); + if (display_class_global == NULL) { + display_class = (*env)->FindClass(env, "org/lwjgl/opengl/WindowsDisplay"); + if (display_class != NULL) { + display_class_global = (*env)->NewGlobalRef(env, display_class); + if (display_class_global != NULL) + SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)display_class_global); + } + } + if (display_class_global != NULL) { + message_time = GetMessageTime(); + handleMessage_method = (*env)->GetStaticMethodID(env, display_class_global, "handleMessage", "(JIJJJ)J"); + if (handleMessage_method != NULL) + return (*env)->CallStaticLongMethod(env, display_class_global, handleMessage_method, (jlong)(intptr_t)hWnd, (jint)msg, (jlong)wParam, (jlong)lParam, (jlong)message_time); + + } + */ + + return (*env)->CallStaticLongMethod( + env, windowsDisplayClass, javaWindowProc, + (jlong)(intptr_t)hWnd, (jint)msg, (jlong)wParam, (jlong)lParam, (jlong)GetMessageTime() + ); + } + return DefWindowProc(hWnd, msg, wParam, lParam); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_setWindowProc(JNIEnv *env, jclass clazz, jobject method) { + windowsDisplayClass = clazz; + javaWindowProc = (*env)->FromReflectedMethod(env, method); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDisplay_defWindowProc(JNIEnv *env, jclass unused, jlong hWnd, jint msg, jlong wParam, jlong lParam) { + return DefWindowProc((HWND)(INT_PTR)hWnd, msg, wParam, lParam); +} + +/* + * Handle native Windows messages + */ +static void handleMessages(JNIEnv *env) { + /* + * Now's our chance to deal with Windows messages that are + * otherwise just piling up and causing everything not to + * work properly + */ + MSG msg; + while (!(*env)->ExceptionOccurred(env) && PeekMessage( + &msg, // message information + NULL, // handle to window + 0, // first message + 0, // last message + PM_REMOVE // removal options + )) + { + if (msg.message == WM_QUIT) + break; + TranslateMessage(&msg); + DispatchMessage(&msg); + } +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDisplay_getDC(JNIEnv *env, jclass unused, jlong hwnd_ptr) { + HWND hwnd = (HWND)(INT_PTR)hwnd_ptr; + return (INT_PTR)GetDC(hwnd); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nSetTitle + (JNIEnv * env, jclass unused, jlong hwnd_ptr, jlong title) { + HWND hwnd = (HWND)(INT_PTR)hwnd_ptr; + SetWindowText(hwnd, (LPCTSTR)(intptr_t)title); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nUpdate(JNIEnv * env, jclass class) { + handleMessages(env); +} + +JNIEXPORT jobjectArray JNICALL Java_org_lwjgl_opengl_WindowsDisplay_getAvailableDisplayModes(JNIEnv *env, jobject self) { + return getAvailableDisplayModes(env); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_DefaultSysImplementation_getJNIVersion + (JNIEnv *env, jobject ignored) { + return org_lwjgl_WindowsSysImplementation_JNI_VERSION; +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nCreateWindow(JNIEnv *env, jclass unused, jint x, jint y, jint width, jint height, jboolean undecorated, jboolean child_window, jlong parent_hwnd) { + HWND hwnd; + static bool oneShotInitialised = false; + if (!oneShotInitialised) { + if (!registerWindow(lwjglWindowProc, WINDOWCLASSNAME)) { + throwException(env, "Could not register window class"); + return 0; + } + oneShotInitialised = true; + } + + hwnd = createWindow(WINDOWCLASSNAME, x, y, width, height, undecorated, child_window, (HWND)(INT_PTR)parent_hwnd); + return (INT_PTR)hwnd; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nReleaseDC(JNIEnv *env, jclass clazz, jlong hwnd_ptr, jlong hdc_ptr) { + HWND hwnd = (HWND)(INT_PTR)hwnd_ptr; + HDC hdc = (HDC)(INT_PTR)hdc_ptr; + ReleaseDC(hwnd, hdc); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nDestroyWindow(JNIEnv *env, jclass clazz, jlong hwnd_ptr) { + jclass display_class_global; + HWND hwnd = (HWND)(INT_PTR)hwnd_ptr; + display_class_global = (jclass)(LONG_PTR)GetWindowLongPtr(hwnd, GWLP_USERDATA); + ShowWindow(hwnd, SW_HIDE); + DestroyWindow(hwnd); + if (display_class_global != NULL) + (*env)->DeleteGlobalRef(env, display_class_global); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_clientToScreen(JNIEnv *env, jclass unused, jlong hwnd_int, jobject buffer_handle) { + HWND hwnd = (HWND)(INT_PTR)hwnd_int; + POINT point; + jint *buffer = (jint *)(*env)->GetDirectBufferAddress(env, buffer_handle); + jlong size = (*env)->GetDirectBufferCapacity(env, buffer_handle); + if (size < 2) { + throwFormattedRuntimeException(env, "Buffer size < 2", size); + return; + } + point.x = buffer[0]; + point.y = buffer[1]; + ClientToScreen(hwnd, &point); + buffer[0] = point.x; + buffer[1] = point.y; +} + + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_WindowsDisplay_getWindowRect(JNIEnv *env, jclass unused, jlong hwnd_int, jobject buffer_handle) { + HWND hwnd = (HWND)(INT_PTR)hwnd_int; + RECT *buffer = (RECT *)(*env)->GetDirectBufferAddress(env, buffer_handle); + jlong size = (*env)->GetDirectBufferCapacity(env, buffer_handle); + if (size < 4) { + throwFormattedRuntimeException(env, "Buffer size < 4", size); + return false; + } + return GetWindowRect(hwnd, buffer); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDisplay_getForegroundWindow(JNIEnv *env, jclass unused) { + return (INT_PTR)GetForegroundWindow(); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDisplay_getDesktopWindow(JNIEnv *env, jclass unused) { + return (INT_PTR)GetDesktopWindow(); +} + +static void copyBufferToRect(JNIEnv *env, jobject buffer_handle, RECT *rect) { + jint *buffer = (jint *)(*env)->GetDirectBufferAddress(env, buffer_handle); + jlong size = (*env)->GetDirectBufferCapacity(env, buffer_handle); + if (size < 4) { + throwFormattedRuntimeException(env, "Buffer size < 4", size); + return; + } + rect->top = buffer[0]; + rect->bottom = buffer[1]; + rect->left = buffer[2]; + rect->right = buffer[3]; +} + +static void copyRectToBuffer(JNIEnv *env, RECT *rect, jobject buffer_handle) { + jint *buffer = (jint *)(*env)->GetDirectBufferAddress(env, buffer_handle); + jlong size = (*env)->GetDirectBufferCapacity(env, buffer_handle); + if (size < 4) { + throwFormattedRuntimeException(env, "Buffer size < 4", size); + return; + } + buffer[0] = rect->top; + buffer[1] = rect->bottom; + buffer[2] = rect->left; + buffer[3] = rect->right; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_clipCursor(JNIEnv *env, jclass unused, jobject handle_buffer) { + RECT clip_rect; + LPRECT clip_rect_ptr; + if (handle_buffer != NULL) { + copyBufferToRect(env, handle_buffer, &clip_rect); + clip_rect_ptr = &clip_rect; + } else + clip_rect_ptr = NULL; + if (ClipCursor(clip_rect_ptr) == 0) + throwFormattedException(env, "ClipCursor failed (%d)", GetLastError()); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nSwitchDisplayMode(JNIEnv *env, jobject self, jobject mode) { + switchDisplayMode(env, mode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nResetDisplayMode(JNIEnv *env, jobject self) { + resetDisplayMode(env); +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_WindowsDisplay_getCurrentDisplayMode(JNIEnv *env, jclass unused) { + return getCurrentDisplayMode(env); +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_WindowsDisplay_convertToNativeRamp(JNIEnv *env, jclass unused, jobject float_ramp) { + return convertToNativeRamp(env, float_ramp); +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_WindowsDisplay_getCurrentGammaRamp(JNIEnv *env, jclass unused) { + return getCurrentGammaRamp(env); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nSetGammaRamp(JNIEnv *env, jclass unused, jobject gamma_buffer) { + setGammaRamp(env, gamma_buffer); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_showWindow(JNIEnv *env, jclass unused, jlong hwnd_ptr, jint mode) { + HWND hwnd = (HWND)(INT_PTR)hwnd_ptr; + ShowWindow(hwnd, mode); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_setForegroundWindow(JNIEnv *env, jclass unused, jlong hwnd_ptr) { + HWND hwnd = (HWND)(INT_PTR)hwnd_ptr; + SetForegroundWindow(hwnd); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_setFocus(JNIEnv *env, jclass unused, jlong hwnd_ptr) { + HWND hwnd = (HWND)(INT_PTR)hwnd_ptr; + SetFocus(hwnd); +} + +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nGetVersion(JNIEnv *env, jobject self, jstring driver) { + char *driver_str; + jstring result; + driver_str = GetStringNativeChars(env, driver); + if (driver_str == NULL) + return NULL; + result = getVersion(env, driver_str); + free(driver_str); + return result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nReshape(JNIEnv *env, jclass unused, jlong hwnd_ptr, jint x, jint y, jint width, jint height, jboolean undecorated, jboolean child) { + HWND hwnd = (HWND)(INT_PTR)hwnd_ptr; + DWORD exstyle, windowflags; + RECT clientSize; + + getWindowFlags(&windowflags, &exstyle, undecorated, child); + + // If we're not a fullscreen window, adjust the height to account for the + // height of the title bar: + clientSize.bottom = height; + clientSize.left = 0; + clientSize.right = width; + clientSize.top = 0; + + AdjustWindowRectEx( + &clientSize, // client-rectangle structure + windowflags, // window styles + FALSE, // menu-present option + exstyle // extended window style + ); + SetWindowPos(hwnd, HWND_TOP, x, y, clientSize.right - clientSize.left, clientSize.bottom - clientSize.top, SWP_NOZORDER); +} + +static HICON createWindowIcon(JNIEnv *env, jint *pixels, jint width, jint height) { + BITMAPV5HEADER bitmapInfo; + HBITMAP cursorMask; + HBITMAP colorBitmap; + ICONINFO iconInfo; + HICON icon; + char *ptrCursorImage; + int x, y; + char *dstPtr; + int imageSize; + unsigned char *maskPixels; + int widthInBytes; + int scanlineWidth; + HBITMAP colorDIB; + + memset(&bitmapInfo, 0, sizeof(BITMAPV5HEADER)); + bitmapInfo.bV5Size = sizeof(BITMAPV5HEADER); + bitmapInfo.bV5Width = width; + bitmapInfo.bV5Height = -height; + bitmapInfo.bV5Planes = 1; + bitmapInfo.bV5BitCount = 32; + bitmapInfo.bV5Compression = BI_BITFIELDS; + bitmapInfo.bV5RedMask = 0x00FF0000; + bitmapInfo.bV5GreenMask = 0x0000FF00; + bitmapInfo.bV5BlueMask = 0x000000FF; + bitmapInfo.bV5AlphaMask = 0xFF000000; + + colorDIB = CreateDIBSection(GetDC(NULL), (BITMAPINFO*)&(bitmapInfo), + DIB_RGB_COLORS, (void*)&(ptrCursorImage), NULL, 0); + if (!ptrCursorImage) { + throwException(env, "Could not allocate DIB section."); + } + + for (y = 0; y < height; y++ ) { + dstPtr = ptrCursorImage + width*4*y;; + for (x = 0; x < width; x++ ) { + dstPtr[0] = (pixels[y*width+x] >> 0x10) & 0xFF; + dstPtr[1] = (pixels[y*width+x] >> 0x08) & 0xFF; + dstPtr[2] = pixels[y*width+x] & 0xFF; + dstPtr[3] = (pixels[y*width+x] >> 0x18) & 0xFF; + dstPtr += 4; + } + } + + + colorBitmap = CreateDIBitmap(GetDC(NULL), + (BITMAPINFOHEADER*)&bitmapInfo, + CBM_INIT, + (void *)ptrCursorImage, + (BITMAPINFO*)&bitmapInfo, + DIB_RGB_COLORS); + + DeleteObject(colorDIB); + + // Convert alpha map to pixel packed mask + + // number of bytes it takes to fit a bit packed scan line. + widthInBytes = (width & 0x7) != 0 ? (width >> 3) + 1 : (width >> 3); + + // number of bytes it takes to fit WORD padded scan line. + scanlineWidth = widthInBytes; + if (scanlineWidth % sizeof(WORD) != 0) { + scanlineWidth = (scanlineWidth / sizeof(WORD)) * sizeof(WORD) + sizeof(WORD); + } + imageSize = scanlineWidth*height; + maskPixels = (unsigned char*)malloc(sizeof(unsigned char)*imageSize); + memset(maskPixels, 0xFF, sizeof(unsigned char)*imageSize); + + cursorMask = CreateBitmap(width, height, 1, 1, maskPixels); + + memset(&iconInfo, 0, sizeof(ICONINFO)); + iconInfo.hbmMask = cursorMask; + iconInfo.hbmColor = colorBitmap; + iconInfo.fIcon = TRUE; + iconInfo.xHotspot = 0; + iconInfo.yHotspot = 0; + icon = CreateIconIndirect(&iconInfo); + DeleteObject(colorBitmap); + DeleteObject(cursorMask); + free(maskPixels); + + return icon; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_destroyIcon + (JNIEnv *env, jclass clazz, jlong handle) { + HICON icon = (HICON)(INT_PTR)handle; + DestroyIcon(icon); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDisplay_createIcon + (JNIEnv *env, jclass clazz, jint width, jint height, jobject iconBuffer) { + jint *imgData = (jint *)(*env)->GetDirectBufferAddress(env, iconBuffer); + return (INT_PTR)createWindowIcon(env, imgData, width, height); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDisplay_sendMessage + (JNIEnv *env, jclass clazz, jlong hwnd_ptr, jlong msg, jlong wparam, jlong lparam) { + HWND hwnd = (HWND)(INT_PTR)hwnd_ptr; + return SendMessage(hwnd, (UINT)msg, (WPARAM)wparam, (LPARAM)lparam); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDisplay_setWindowLongPtr + (JNIEnv *env, jclass clazz, jlong hwnd_ptr, jint nindex, jlong longPtr) { + HWND hwnd = (HWND)(INT_PTR)hwnd_ptr; + return SetWindowLongPtr(hwnd, nindex, (LONG_PTR) longPtr); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDisplay_getWindowLongPtr + (JNIEnv *env, jclass clazz, jlong hwnd_ptr, jint nindex) { + HWND hwnd = (HWND)(INT_PTR)hwnd_ptr; + jlong result = GetWindowLongPtr(hwnd, nindex); + return result; +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_WindowsDisplay_setWindowPos + (JNIEnv *env, jclass clazz, jlong hwnd_ptr, jlong hwnd_after_ptr, jint x, jint y, jint width, jint height, jlong uflags) { + jboolean result; + HWND hwnd = (HWND)(INT_PTR)hwnd_ptr; + HWND hwnd_after = (HWND)(INT_PTR)hwnd_after_ptr; + + result = SetWindowPos(hwnd, hwnd_after, x, y, width, height, (UINT) uflags); + return result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nSetCursorPosition +(JNIEnv * env, jclass unused, jint x, jint y) { + if (!SetCursorPos(x, y)) + printfDebugJava(env, "SetCursorPos failed"); +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_getClientRect + (JNIEnv *env, jclass unused, jlong hwnd_int, jobject rect_buffer) { + HWND hwnd = (HWND)(INT_PTR)hwnd_int; + RECT clientRect; + GetClientRect(hwnd, &clientRect); + copyRectToBuffer(env, &clientRect, rect_buffer); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_WindowsDisplay_adjustWindowRectEx + (JNIEnv *env, jclass unused, jobject rect_buffer, jint style, jboolean menu, jint styleex) { + jboolean result; + RECT clientRect; + copyBufferToRect(env, rect_buffer, &clientRect); + result = AdjustWindowRectEx(&clientRect, style, menu, styleex); + copyRectToBuffer(env, &clientRect, rect_buffer); + return result; +} + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nSetNativeCursor + (JNIEnv *env, jclass unused, jlong hwnd_int, jobject handle_buffer) +{ + HWND hwnd = (HWND)(INT_PTR)hwnd_int; + HCURSOR *cursor_handle; + HCURSOR cursor; + if (handle_buffer != NULL) { + cursor_handle = (HCURSOR *)(*env)->GetDirectBufferAddress(env, handle_buffer); + cursor = *cursor_handle; + SetClassLongPtr(hwnd, GCLP_HCURSOR, (LONG_PTR)cursor); + SetCursor(cursor); + } else { + SetClassLongPtr(hwnd, GCLP_HCURSOR, (LONG_PTR)NULL); + SetCursor(LoadCursor(NULL, IDC_ARROW)); + } +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsDisplay_getSystemMetrics(JNIEnv *env, jclass unused, jint index) { + return GetSystemMetrics(index); +} + +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nSetCapture(JNIEnv *env, jclass unused, jlong hwnd_int) { + HWND hwnd = (HWND)(INT_PTR)hwnd_int; + return (INT_PTR) SetCapture(hwnd); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nReleaseCapture(JNIEnv *env, jclass unused) { + return ReleaseCapture(); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nTrackMouseEvent(JNIEnv *env, jclass clazz, jlong hwnd_ptr) { + HWND hwnd = (HWND)(INT_PTR)hwnd_ptr; + TRACKMOUSEEVENT tme; + tme.cbSize = sizeof(TRACKMOUSEEVENT); + tme.dwFlags = TME_LEAVE; + tme.hwndTrack = hwnd; + return TrackMouseEvent(&tme); +} + diff --git a/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsAWTGLCanvasPeerInfo.c b/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsAWTGLCanvasPeerInfo.c new file mode 100644 index 0000000..402fcf8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsAWTGLCanvasPeerInfo.c @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * @author elias_naur + * @version $Revision$ + */ + +#include +#include +#include "awt_tools.h" +#include "org_lwjgl_opengl_WindowsAWTGLCanvasPeerInfo.h" +#include "context.h" +#include "common_tools.h" + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsAWTGLCanvasPeerInfo_nInitHandle + (JNIEnv *env, jclass clazz, jobject lock_buffer_handle, jobject peer_info_handle) { + WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + AWTSurfaceLock *surface = (AWTSurfaceLock *)(*env)->GetDirectBufferAddress(env, lock_buffer_handle); + JAWT_Win32DrawingSurfaceInfo *win32_dsi = (JAWT_Win32DrawingSurfaceInfo *)surface->dsi->platformInfo; + peer_info->drawable_hdc = win32_dsi->hdc; + peer_info->u.hwnd = win32_dsi->hwnd; +} diff --git a/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsAWTGLCanvasPeerInfo.h b/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsAWTGLCanvasPeerInfo.h new file mode 100644 index 0000000..8499690 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsAWTGLCanvasPeerInfo.h @@ -0,0 +1,21 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_WindowsAWTGLCanvasPeerInfo */ + +#ifndef _Included_org_lwjgl_opengl_WindowsAWTGLCanvasPeerInfo +#define _Included_org_lwjgl_opengl_WindowsAWTGLCanvasPeerInfo +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_lwjgl_opengl_WindowsAWTGLCanvasPeerInfo + * Method: nInitHandle + * Signature: (Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsAWTGLCanvasPeerInfo_nInitHandle + (JNIEnv *, jclass, jobject, jobject); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsDisplay.h b/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsDisplay.h new file mode 100644 index 0000000..9810d8d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsDisplay.h @@ -0,0 +1,545 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_WindowsDisplay */ + +#ifndef _Included_org_lwjgl_opengl_WindowsDisplay +#define _Included_org_lwjgl_opengl_WindowsDisplay +#ifdef __cplusplus +extern "C" { +#endif +#undef org_lwjgl_opengl_WindowsDisplay_GAMMA_LENGTH +#define org_lwjgl_opengl_WindowsDisplay_GAMMA_LENGTH 256L +#undef org_lwjgl_opengl_WindowsDisplay_WM_WINDOWPOSCHANGED +#define org_lwjgl_opengl_WindowsDisplay_WM_WINDOWPOSCHANGED 71L +#undef org_lwjgl_opengl_WindowsDisplay_WM_MOVE +#define org_lwjgl_opengl_WindowsDisplay_WM_MOVE 3L +#undef org_lwjgl_opengl_WindowsDisplay_WM_CANCELMODE +#define org_lwjgl_opengl_WindowsDisplay_WM_CANCELMODE 31L +#undef org_lwjgl_opengl_WindowsDisplay_WM_MOUSEMOVE +#define org_lwjgl_opengl_WindowsDisplay_WM_MOUSEMOVE 512L +#undef org_lwjgl_opengl_WindowsDisplay_WM_LBUTTONDOWN +#define org_lwjgl_opengl_WindowsDisplay_WM_LBUTTONDOWN 513L +#undef org_lwjgl_opengl_WindowsDisplay_WM_LBUTTONUP +#define org_lwjgl_opengl_WindowsDisplay_WM_LBUTTONUP 514L +#undef org_lwjgl_opengl_WindowsDisplay_WM_LBUTTONDBLCLK +#define org_lwjgl_opengl_WindowsDisplay_WM_LBUTTONDBLCLK 515L +#undef org_lwjgl_opengl_WindowsDisplay_WM_RBUTTONDOWN +#define org_lwjgl_opengl_WindowsDisplay_WM_RBUTTONDOWN 516L +#undef org_lwjgl_opengl_WindowsDisplay_WM_RBUTTONUP +#define org_lwjgl_opengl_WindowsDisplay_WM_RBUTTONUP 517L +#undef org_lwjgl_opengl_WindowsDisplay_WM_RBUTTONDBLCLK +#define org_lwjgl_opengl_WindowsDisplay_WM_RBUTTONDBLCLK 518L +#undef org_lwjgl_opengl_WindowsDisplay_WM_MBUTTONDOWN +#define org_lwjgl_opengl_WindowsDisplay_WM_MBUTTONDOWN 519L +#undef org_lwjgl_opengl_WindowsDisplay_WM_MBUTTONUP +#define org_lwjgl_opengl_WindowsDisplay_WM_MBUTTONUP 520L +#undef org_lwjgl_opengl_WindowsDisplay_WM_MBUTTONDBLCLK +#define org_lwjgl_opengl_WindowsDisplay_WM_MBUTTONDBLCLK 521L +#undef org_lwjgl_opengl_WindowsDisplay_WM_XBUTTONDOWN +#define org_lwjgl_opengl_WindowsDisplay_WM_XBUTTONDOWN 523L +#undef org_lwjgl_opengl_WindowsDisplay_WM_XBUTTONUP +#define org_lwjgl_opengl_WindowsDisplay_WM_XBUTTONUP 524L +#undef org_lwjgl_opengl_WindowsDisplay_WM_XBUTTONDBLCLK +#define org_lwjgl_opengl_WindowsDisplay_WM_XBUTTONDBLCLK 525L +#undef org_lwjgl_opengl_WindowsDisplay_WM_MOUSEWHEEL +#define org_lwjgl_opengl_WindowsDisplay_WM_MOUSEWHEEL 522L +#undef org_lwjgl_opengl_WindowsDisplay_WM_CAPTURECHANGED +#define org_lwjgl_opengl_WindowsDisplay_WM_CAPTURECHANGED 533L +#undef org_lwjgl_opengl_WindowsDisplay_WM_MOUSELEAVE +#define org_lwjgl_opengl_WindowsDisplay_WM_MOUSELEAVE 675L +#undef org_lwjgl_opengl_WindowsDisplay_WM_ENTERSIZEMOVE +#define org_lwjgl_opengl_WindowsDisplay_WM_ENTERSIZEMOVE 561L +#undef org_lwjgl_opengl_WindowsDisplay_WM_EXITSIZEMOVE +#define org_lwjgl_opengl_WindowsDisplay_WM_EXITSIZEMOVE 562L +#undef org_lwjgl_opengl_WindowsDisplay_WM_SIZING +#define org_lwjgl_opengl_WindowsDisplay_WM_SIZING 532L +#undef org_lwjgl_opengl_WindowsDisplay_WM_KEYDOWN +#define org_lwjgl_opengl_WindowsDisplay_WM_KEYDOWN 256L +#undef org_lwjgl_opengl_WindowsDisplay_WM_KEYUP +#define org_lwjgl_opengl_WindowsDisplay_WM_KEYUP 257L +#undef org_lwjgl_opengl_WindowsDisplay_WM_SYSKEYUP +#define org_lwjgl_opengl_WindowsDisplay_WM_SYSKEYUP 261L +#undef org_lwjgl_opengl_WindowsDisplay_WM_SYSKEYDOWN +#define org_lwjgl_opengl_WindowsDisplay_WM_SYSKEYDOWN 260L +#undef org_lwjgl_opengl_WindowsDisplay_WM_SYSCHAR +#define org_lwjgl_opengl_WindowsDisplay_WM_SYSCHAR 262L +#undef org_lwjgl_opengl_WindowsDisplay_WM_CHAR +#define org_lwjgl_opengl_WindowsDisplay_WM_CHAR 258L +#undef org_lwjgl_opengl_WindowsDisplay_WM_GETICON +#define org_lwjgl_opengl_WindowsDisplay_WM_GETICON 127L +#undef org_lwjgl_opengl_WindowsDisplay_WM_SETICON +#define org_lwjgl_opengl_WindowsDisplay_WM_SETICON 128L +#undef org_lwjgl_opengl_WindowsDisplay_WM_SETCURSOR +#define org_lwjgl_opengl_WindowsDisplay_WM_SETCURSOR 32L +#undef org_lwjgl_opengl_WindowsDisplay_WM_MOUSEACTIVATE +#define org_lwjgl_opengl_WindowsDisplay_WM_MOUSEACTIVATE 33L +#undef org_lwjgl_opengl_WindowsDisplay_WM_QUIT +#define org_lwjgl_opengl_WindowsDisplay_WM_QUIT 18L +#undef org_lwjgl_opengl_WindowsDisplay_WM_SYSCOMMAND +#define org_lwjgl_opengl_WindowsDisplay_WM_SYSCOMMAND 274L +#undef org_lwjgl_opengl_WindowsDisplay_WM_PAINT +#define org_lwjgl_opengl_WindowsDisplay_WM_PAINT 15L +#undef org_lwjgl_opengl_WindowsDisplay_WM_KILLFOCUS +#define org_lwjgl_opengl_WindowsDisplay_WM_KILLFOCUS 8L +#undef org_lwjgl_opengl_WindowsDisplay_WM_SETFOCUS +#define org_lwjgl_opengl_WindowsDisplay_WM_SETFOCUS 7L +#undef org_lwjgl_opengl_WindowsDisplay_SC_SIZE +#define org_lwjgl_opengl_WindowsDisplay_SC_SIZE 61440L +#undef org_lwjgl_opengl_WindowsDisplay_SC_MOVE +#define org_lwjgl_opengl_WindowsDisplay_SC_MOVE 61456L +#undef org_lwjgl_opengl_WindowsDisplay_SC_MINIMIZE +#define org_lwjgl_opengl_WindowsDisplay_SC_MINIMIZE 61472L +#undef org_lwjgl_opengl_WindowsDisplay_SC_MAXIMIZE +#define org_lwjgl_opengl_WindowsDisplay_SC_MAXIMIZE 61488L +#undef org_lwjgl_opengl_WindowsDisplay_SC_NEXTWINDOW +#define org_lwjgl_opengl_WindowsDisplay_SC_NEXTWINDOW 61504L +#undef org_lwjgl_opengl_WindowsDisplay_SC_PREVWINDOW +#define org_lwjgl_opengl_WindowsDisplay_SC_PREVWINDOW 61520L +#undef org_lwjgl_opengl_WindowsDisplay_SC_CLOSE +#define org_lwjgl_opengl_WindowsDisplay_SC_CLOSE 61536L +#undef org_lwjgl_opengl_WindowsDisplay_SC_VSCROLL +#define org_lwjgl_opengl_WindowsDisplay_SC_VSCROLL 61552L +#undef org_lwjgl_opengl_WindowsDisplay_SC_HSCROLL +#define org_lwjgl_opengl_WindowsDisplay_SC_HSCROLL 61568L +#undef org_lwjgl_opengl_WindowsDisplay_SC_MOUSEMENU +#define org_lwjgl_opengl_WindowsDisplay_SC_MOUSEMENU 61584L +#undef org_lwjgl_opengl_WindowsDisplay_SC_KEYMENU +#define org_lwjgl_opengl_WindowsDisplay_SC_KEYMENU 61696L +#undef org_lwjgl_opengl_WindowsDisplay_SC_ARRANGE +#define org_lwjgl_opengl_WindowsDisplay_SC_ARRANGE 61712L +#undef org_lwjgl_opengl_WindowsDisplay_SC_RESTORE +#define org_lwjgl_opengl_WindowsDisplay_SC_RESTORE 61728L +#undef org_lwjgl_opengl_WindowsDisplay_SC_TASKLIST +#define org_lwjgl_opengl_WindowsDisplay_SC_TASKLIST 61744L +#undef org_lwjgl_opengl_WindowsDisplay_SC_SCREENSAVE +#define org_lwjgl_opengl_WindowsDisplay_SC_SCREENSAVE 61760L +#undef org_lwjgl_opengl_WindowsDisplay_SC_HOTKEY +#define org_lwjgl_opengl_WindowsDisplay_SC_HOTKEY 61776L +#undef org_lwjgl_opengl_WindowsDisplay_SC_DEFAULT +#define org_lwjgl_opengl_WindowsDisplay_SC_DEFAULT 61792L +#undef org_lwjgl_opengl_WindowsDisplay_SC_MONITORPOWER +#define org_lwjgl_opengl_WindowsDisplay_SC_MONITORPOWER 61808L +#undef org_lwjgl_opengl_WindowsDisplay_SC_CONTEXTHELP +#define org_lwjgl_opengl_WindowsDisplay_SC_CONTEXTHELP 61824L +#undef org_lwjgl_opengl_WindowsDisplay_SC_SEPARATOR +#define org_lwjgl_opengl_WindowsDisplay_SC_SEPARATOR 61455L +#undef org_lwjgl_opengl_WindowsDisplay_SM_CXCURSOR +#define org_lwjgl_opengl_WindowsDisplay_SM_CXCURSOR 13L +#undef org_lwjgl_opengl_WindowsDisplay_SM_CYCURSOR +#define org_lwjgl_opengl_WindowsDisplay_SM_CYCURSOR 14L +#undef org_lwjgl_opengl_WindowsDisplay_SM_CMOUSEBUTTONS +#define org_lwjgl_opengl_WindowsDisplay_SM_CMOUSEBUTTONS 43L +#undef org_lwjgl_opengl_WindowsDisplay_SM_MOUSEWHEELPRESENT +#define org_lwjgl_opengl_WindowsDisplay_SM_MOUSEWHEELPRESENT 75L +#undef org_lwjgl_opengl_WindowsDisplay_SIZE_RESTORED +#define org_lwjgl_opengl_WindowsDisplay_SIZE_RESTORED 0L +#undef org_lwjgl_opengl_WindowsDisplay_SIZE_MINIMIZED +#define org_lwjgl_opengl_WindowsDisplay_SIZE_MINIMIZED 1L +#undef org_lwjgl_opengl_WindowsDisplay_SIZE_MAXIMIZED +#define org_lwjgl_opengl_WindowsDisplay_SIZE_MAXIMIZED 2L +#undef org_lwjgl_opengl_WindowsDisplay_WM_SIZE +#define org_lwjgl_opengl_WindowsDisplay_WM_SIZE 5L +#undef org_lwjgl_opengl_WindowsDisplay_WM_ACTIVATE +#define org_lwjgl_opengl_WindowsDisplay_WM_ACTIVATE 6L +#undef org_lwjgl_opengl_WindowsDisplay_WA_INACTIVE +#define org_lwjgl_opengl_WindowsDisplay_WA_INACTIVE 0L +#undef org_lwjgl_opengl_WindowsDisplay_WA_ACTIVE +#define org_lwjgl_opengl_WindowsDisplay_WA_ACTIVE 1L +#undef org_lwjgl_opengl_WindowsDisplay_WA_CLICKACTIVE +#define org_lwjgl_opengl_WindowsDisplay_WA_CLICKACTIVE 2L +#undef org_lwjgl_opengl_WindowsDisplay_SW_NORMAL +#define org_lwjgl_opengl_WindowsDisplay_SW_NORMAL 1L +#undef org_lwjgl_opengl_WindowsDisplay_SW_SHOWMINNOACTIVE +#define org_lwjgl_opengl_WindowsDisplay_SW_SHOWMINNOACTIVE 7L +#undef org_lwjgl_opengl_WindowsDisplay_SW_SHOWDEFAULT +#define org_lwjgl_opengl_WindowsDisplay_SW_SHOWDEFAULT 10L +#undef org_lwjgl_opengl_WindowsDisplay_SW_RESTORE +#define org_lwjgl_opengl_WindowsDisplay_SW_RESTORE 9L +#undef org_lwjgl_opengl_WindowsDisplay_SW_MAXIMIZE +#define org_lwjgl_opengl_WindowsDisplay_SW_MAXIMIZE 3L +#undef org_lwjgl_opengl_WindowsDisplay_ICON_SMALL +#define org_lwjgl_opengl_WindowsDisplay_ICON_SMALL 0L +#undef org_lwjgl_opengl_WindowsDisplay_ICON_BIG +#define org_lwjgl_opengl_WindowsDisplay_ICON_BIG 1L +#undef org_lwjgl_opengl_WindowsDisplay_HWND_TOP +#define org_lwjgl_opengl_WindowsDisplay_HWND_TOP 0i64 +#undef org_lwjgl_opengl_WindowsDisplay_HWND_BOTTOM +#define org_lwjgl_opengl_WindowsDisplay_HWND_BOTTOM 1i64 +#undef org_lwjgl_opengl_WindowsDisplay_HWND_TOPMOST +#define org_lwjgl_opengl_WindowsDisplay_HWND_TOPMOST -1i64 +#undef org_lwjgl_opengl_WindowsDisplay_HWND_NOTOPMOST +#define org_lwjgl_opengl_WindowsDisplay_HWND_NOTOPMOST -2i64 +#undef org_lwjgl_opengl_WindowsDisplay_SWP_NOSIZE +#define org_lwjgl_opengl_WindowsDisplay_SWP_NOSIZE 1L +#undef org_lwjgl_opengl_WindowsDisplay_SWP_NOMOVE +#define org_lwjgl_opengl_WindowsDisplay_SWP_NOMOVE 2L +#undef org_lwjgl_opengl_WindowsDisplay_SWP_NOZORDER +#define org_lwjgl_opengl_WindowsDisplay_SWP_NOZORDER 4L +#undef org_lwjgl_opengl_WindowsDisplay_SWP_FRAMECHANGED +#define org_lwjgl_opengl_WindowsDisplay_SWP_FRAMECHANGED 32L +#undef org_lwjgl_opengl_WindowsDisplay_GWL_STYLE +#define org_lwjgl_opengl_WindowsDisplay_GWL_STYLE -16L +#undef org_lwjgl_opengl_WindowsDisplay_GWL_EXSTYLE +#define org_lwjgl_opengl_WindowsDisplay_GWL_EXSTYLE -20L +#undef org_lwjgl_opengl_WindowsDisplay_WS_THICKFRAME +#define org_lwjgl_opengl_WindowsDisplay_WS_THICKFRAME 262144L +#undef org_lwjgl_opengl_WindowsDisplay_WS_MAXIMIZEBOX +#define org_lwjgl_opengl_WindowsDisplay_WS_MAXIMIZEBOX 65536L +#undef org_lwjgl_opengl_WindowsDisplay_HTCLIENT +#define org_lwjgl_opengl_WindowsDisplay_HTCLIENT 1L +#undef org_lwjgl_opengl_WindowsDisplay_MK_XBUTTON1 +#define org_lwjgl_opengl_WindowsDisplay_MK_XBUTTON1 32L +#undef org_lwjgl_opengl_WindowsDisplay_MK_XBUTTON2 +#define org_lwjgl_opengl_WindowsDisplay_MK_XBUTTON2 64L +#undef org_lwjgl_opengl_WindowsDisplay_XBUTTON1 +#define org_lwjgl_opengl_WindowsDisplay_XBUTTON1 1L +#undef org_lwjgl_opengl_WindowsDisplay_XBUTTON2 +#define org_lwjgl_opengl_WindowsDisplay_XBUTTON2 2L +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: nCreateWindow + * Signature: (IIIIZZJ)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nCreateWindow + (JNIEnv *, jclass, jint, jint, jint, jint, jboolean, jboolean, jlong); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: nReleaseDC + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nReleaseDC + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: nDestroyWindow + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nDestroyWindow + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: clipCursor + * Signature: (Ljava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_clipCursor + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: nSwitchDisplayMode + * Signature: (Lorg/lwjgl/opengl/DisplayMode;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nSwitchDisplayMode + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: showWindow + * Signature: (JI)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_showWindow + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: setForegroundWindow + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_setForegroundWindow + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: setFocus + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_setFocus + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: nResetDisplayMode + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nResetDisplayMode + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: convertToNativeRamp + * Signature: (Ljava/nio/FloatBuffer;)Ljava/nio/ByteBuffer; + */ +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_WindowsDisplay_convertToNativeRamp + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: getCurrentGammaRamp + * Signature: ()Ljava/nio/ByteBuffer; + */ +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_WindowsDisplay_getCurrentGammaRamp + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: nSetGammaRamp + * Signature: (Ljava/nio/ByteBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nSetGammaRamp + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: nGetVersion + * Signature: (Ljava/lang/String;)Lorg/lwjgl/opengl/WindowsFileVersion; + */ +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nGetVersion + (JNIEnv *, jobject, jstring); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: getCurrentDisplayMode + * Signature: ()Lorg/lwjgl/opengl/DisplayMode; + */ +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_WindowsDisplay_getCurrentDisplayMode + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: nSetTitle + * Signature: (JJ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nSetTitle + (JNIEnv *, jclass, jlong, jlong); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: nUpdate + * Signature: ()V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nUpdate + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: nReshape + * Signature: (JIIIIZZ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nReshape + (JNIEnv *, jclass, jlong, jint, jint, jint, jint, jboolean, jboolean); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: getAvailableDisplayModes + * Signature: ()[Lorg/lwjgl/opengl/DisplayMode; + */ +JNIEXPORT jobjectArray JNICALL Java_org_lwjgl_opengl_WindowsDisplay_getAvailableDisplayModes + (JNIEnv *, jobject); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: nSetCursorPosition + * Signature: (II)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nSetCursorPosition + (JNIEnv *, jclass, jint, jint); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: nSetNativeCursor + * Signature: (JLjava/lang/Object;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nSetNativeCursor + (JNIEnv *, jclass, jlong, jobject); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: getSystemMetrics + * Signature: (I)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsDisplay_getSystemMetrics + (JNIEnv *, jclass, jint); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: getDllInstance + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDisplay_getDllInstance + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: getDC + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDisplay_getDC + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: getDesktopWindow + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDisplay_getDesktopWindow + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: getForegroundWindow + * Signature: ()J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDisplay_getForegroundWindow + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: nCreateCursor + * Signature: (IIIIILjava/nio/IntBuffer;ILjava/nio/IntBuffer;I)Ljava/nio/ByteBuffer; + */ +JNIEXPORT jobject JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nCreateCursor + (JNIEnv *, jclass, jint, jint, jint, jint, jint, jobject, jint, jobject, jint); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: doDestroyCursor + * Signature: (Ljava/lang/Object;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_doDestroyCursor + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: nGetPbufferCapabilities + * Signature: (Lorg/lwjgl/opengl/PixelFormat;)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nGetPbufferCapabilities + (JNIEnv *, jobject, jobject); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: createIcon + * Signature: (IILjava/nio/IntBuffer;)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDisplay_createIcon + (JNIEnv *, jclass, jint, jint, jobject); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: destroyIcon + * Signature: (J)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_destroyIcon + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: sendMessage + * Signature: (JJJJ)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDisplay_sendMessage + (JNIEnv *, jclass, jlong, jlong, jlong, jlong); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: setWindowLongPtr + * Signature: (JIJ)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDisplay_setWindowLongPtr + (JNIEnv *, jclass, jlong, jint, jlong); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: getWindowLongPtr + * Signature: (JI)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDisplay_getWindowLongPtr + (JNIEnv *, jclass, jlong, jint); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: setWindowPos + * Signature: (JJIIIIJ)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_WindowsDisplay_setWindowPos + (JNIEnv *, jclass, jlong, jlong, jint, jint, jint, jint, jlong); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: nSetCapture + * Signature: (J)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nSetCapture + (JNIEnv *, jclass, jlong); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: nReleaseCapture + * Signature: ()Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nReleaseCapture + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: getClientRect + * Signature: (JLjava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_getClientRect + (JNIEnv *, jclass, jlong, jobject); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: clientToScreen + * Signature: (JLjava/nio/IntBuffer;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_clientToScreen + (JNIEnv *, jclass, jlong, jobject); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: setWindowProc + * Signature: (Ljava/lang/reflect/Method;)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplay_setWindowProc + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: defWindowProc + * Signature: (JIJJ)J + */ +JNIEXPORT jlong JNICALL Java_org_lwjgl_opengl_WindowsDisplay_defWindowProc + (JNIEnv *, jclass, jlong, jint, jlong, jlong); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: getWindowRect + * Signature: (JLjava/nio/IntBuffer;)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_WindowsDisplay_getWindowRect + (JNIEnv *, jobject, jlong, jobject); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: nTrackMouseEvent + * Signature: (J)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_WindowsDisplay_nTrackMouseEvent + (JNIEnv *, jobject, jlong); + +/* + * Class: org_lwjgl_opengl_WindowsDisplay + * Method: adjustWindowRectEx + * Signature: (Ljava/nio/IntBuffer;IZI)Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_WindowsDisplay_adjustWindowRectEx + (JNIEnv *, jobject, jobject, jint, jboolean, jint); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsDisplayPeerInfo.c b/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsDisplayPeerInfo.c new file mode 100644 index 0000000..55d201f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsDisplayPeerInfo.c @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * @author elias_naur + * @version $Revision$ + */ + +#include +#include "Window.h" +#include "org_lwjgl_opengl_WindowsDisplayPeerInfo.h" +#include "context.h" +#include "common_tools.h" + +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplayPeerInfo_nInitDC + (JNIEnv *env, jclass clazz, jobject peer_info_handle, jlong hwnd_ptr, jlong hdc_ptr) { + HWND hwnd = (HWND)(INT_PTR)hwnd_ptr; + HDC hdc = (HDC)(INT_PTR)hdc_ptr; + WindowsPeerInfo *peer_info = (WindowsPeerInfo *)(*env)->GetDirectBufferAddress(env, peer_info_handle); + peer_info->drawable_hdc = hdc; + peer_info->u.hwnd = hwnd; +} diff --git a/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsDisplayPeerInfo.h b/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsDisplayPeerInfo.h new file mode 100644 index 0000000..9f431eb --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsDisplayPeerInfo.h @@ -0,0 +1,21 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_WindowsDisplayPeerInfo */ + +#ifndef _Included_org_lwjgl_opengl_WindowsDisplayPeerInfo +#define _Included_org_lwjgl_opengl_WindowsDisplayPeerInfo +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_lwjgl_opengl_WindowsDisplayPeerInfo + * Method: nInitDC + * Signature: (Ljava/nio/ByteBuffer;JJ)V + */ +JNIEXPORT void JNICALL Java_org_lwjgl_opengl_WindowsDisplayPeerInfo_nInitDC + (JNIEnv *, jclass, jobject, jlong, jlong); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsDisplay_Rect.h b/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsDisplay_Rect.h new file mode 100644 index 0000000..834dffd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsDisplay_Rect.h @@ -0,0 +1,13 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_WindowsDisplay_Rect */ + +#ifndef _Included_org_lwjgl_opengl_WindowsDisplay_Rect +#define _Included_org_lwjgl_opengl_WindowsDisplay_Rect +#ifdef __cplusplus +extern "C" { +#endif +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsKeyboard.c b/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsKeyboard.c new file mode 100644 index 0000000..f09a587 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsKeyboard.c @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id: org_lwjgl_input_Keyboard.c 2385 2006-06-23 16:45:21Z elias_naur $ + * + * @author elias_naue + * @version $Revision: 2385 $ + */ + +#include "Window.h" +#include +#include "org_lwjgl_opengl_WindowsKeyboard.h" + +JNIEXPORT jshort JNICALL Java_org_lwjgl_opengl_WindowsKeyboard_GetKeyState(JNIEnv *env, jclass unused, jint virt_key) { + return GetKeyState(virt_key); +} + +JNIEXPORT jshort JNICALL Java_org_lwjgl_opengl_WindowsKeyboard_GetAsyncKeyState(JNIEnv *env, jclass unused, jint virt_key) { + return GetAsyncKeyState(virt_key); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsKeyboard_MapVirtualKey(JNIEnv *env, jclass unused, jint uCode, jint uMapType) { + return MapVirtualKey(uCode, uMapType); +} + +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_WindowsKeyboard_isWindowsNT(JNIEnv *env, jclass unused) { + OSVERSIONINFO osvi; + + osvi.dwOSVersionInfoSize = sizeof(osvi); + GetVersionEx(&osvi); + return osvi.dwPlatformId == VER_PLATFORM_WIN32_NT ? JNI_TRUE : JNI_FALSE; +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsKeyboard_ToUnicode(JNIEnv *env, jclass unused, jint wVirtKey, jint wScanCode, jobject lpKeyState_obj, jobject pwszBuff_obj, jint cchBuff, jint flags) { + const PBYTE lpKeyState = (*env)->GetDirectBufferAddress(env, lpKeyState_obj); + LPWSTR pwszBuff = (*env)->GetDirectBufferAddress(env, pwszBuff_obj); + return ToUnicode(wVirtKey, wScanCode, lpKeyState, pwszBuff, cchBuff, flags); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsKeyboard_ToAscii(JNIEnv *env, jclass unused, jint wVirtKey, jint wScanCode, jobject lpKeyState_obj, jobject lpChar_obj, jint flags) { + const PBYTE lpKeyState = (*env)->GetDirectBufferAddress(env, lpKeyState_obj); + LPWORD lpChar = (*env)->GetDirectBufferAddress(env, lpChar_obj); + return ToAscii(wVirtKey, wScanCode, lpKeyState, lpChar, flags); +} + +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsKeyboard_GetKeyboardState(JNIEnv *env, jclass unused, jobject lpKeyState_obj) { + PBYTE lpKeyState = (*env)->GetDirectBufferAddress(env, lpKeyState_obj); + return GetKeyboardState(lpKeyState); +} diff --git a/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsKeyboard.h b/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsKeyboard.h new file mode 100644 index 0000000..4840e39 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsKeyboard.h @@ -0,0 +1,69 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_WindowsKeyboard */ + +#ifndef _Included_org_lwjgl_opengl_WindowsKeyboard +#define _Included_org_lwjgl_opengl_WindowsKeyboard +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: org_lwjgl_opengl_WindowsKeyboard + * Method: isWindowsNT + * Signature: ()Z + */ +JNIEXPORT jboolean JNICALL Java_org_lwjgl_opengl_WindowsKeyboard_isWindowsNT + (JNIEnv *, jclass); + +/* + * Class: org_lwjgl_opengl_WindowsKeyboard + * Method: MapVirtualKey + * Signature: (II)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsKeyboard_MapVirtualKey + (JNIEnv *, jclass, jint, jint); + +/* + * Class: org_lwjgl_opengl_WindowsKeyboard + * Method: ToUnicode + * Signature: (IILjava/nio/ByteBuffer;Ljava/nio/CharBuffer;II)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsKeyboard_ToUnicode + (JNIEnv *, jclass, jint, jint, jobject, jobject, jint, jint); + +/* + * Class: org_lwjgl_opengl_WindowsKeyboard + * Method: ToAscii + * Signature: (IILjava/nio/ByteBuffer;Ljava/nio/ByteBuffer;I)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsKeyboard_ToAscii + (JNIEnv *, jclass, jint, jint, jobject, jobject, jint); + +/* + * Class: org_lwjgl_opengl_WindowsKeyboard + * Method: GetKeyboardState + * Signature: (Ljava/nio/ByteBuffer;)I + */ +JNIEXPORT jint JNICALL Java_org_lwjgl_opengl_WindowsKeyboard_GetKeyboardState + (JNIEnv *, jclass, jobject); + +/* + * Class: org_lwjgl_opengl_WindowsKeyboard + * Method: GetKeyState + * Signature: (I)S + */ +JNIEXPORT jshort JNICALL Java_org_lwjgl_opengl_WindowsKeyboard_GetKeyState + (JNIEnv *, jclass, jint); + +/* + * Class: org_lwjgl_opengl_WindowsKeyboard + * Method: GetAsyncKeyState + * Signature: (I)S + */ +JNIEXPORT jshort JNICALL Java_org_lwjgl_opengl_WindowsKeyboard_GetAsyncKeyState + (JNIEnv *, jclass, jint); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsRegistry.c b/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsRegistry.c new file mode 100644 index 0000000..ed32be9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsRegistry.c @@ -0,0 +1,145 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/** + * $Id$ + * + * @author elias_naur + * @version $Revision$ + */ + +#include +#include +#include "org_lwjgl_opengl_WindowsRegistry.h" +#include "common_tools.h" + +/* + * Return a string containing the queried value, or NULL of the method fails. + * In that case, a java exception is thrown. + */ +static jstring queryRegistrationKey(JNIEnv *env, HKEY root_key, LPCTSTR subkey, LPCTSTR value) { + DWORD buf_size = 1; + char *result; + HKEY hKey; + LONG lRet; + jstring java_result; + + + if(RegOpenKeyEx(root_key, + TEXT(subkey), + 0, + KEY_QUERY_VALUE, + &hKey) != ERROR_SUCCESS) { + throwException(env, "Failed to open registry key"); + return NULL; + } + + result = (char *)malloc(buf_size); + if (result == NULL) { + RegCloseKey(hKey); + throwException(env, "Failed to allocate buffer"); + return NULL; + } + + while (1) { + lRet = RegQueryValueEx(hKey, + TEXT(value), + NULL, + NULL, + (LPBYTE)result, + &buf_size); + if (lRet != ERROR_SUCCESS && lRet != ERROR_MORE_DATA) { + RegCloseKey(hKey); + free(result); + throwException(env, "Failed query key value"); + return NULL; + } + if (lRet == ERROR_SUCCESS) { + RegCloseKey(hKey); + // make sure the result has a terminating null + buf_size += 1; + result = (char *)realloc(result, buf_size); + if (result == NULL) { + throwException(env, "Failed to resize buffer"); + return NULL; + } + result[buf_size - 1] = '\0'; + java_result = NewStringNativeWithLength(env, result, (jsize)strlen(result)); + free(result); + return java_result; + } + result = (char *)realloc(result, buf_size); + if (result == NULL) { + RegCloseKey(hKey); + throwException(env, "Failed to resize buffer"); + return NULL; + } + } +} + +static HKEY enumToRootKey(jint root_key_enum) { + switch (root_key_enum) { + case org_lwjgl_opengl_WindowsRegistry_HKEY_CLASSES_ROOT: + return HKEY_CLASSES_ROOT; + case org_lwjgl_opengl_WindowsRegistry_HKEY_CURRENT_USER: + return HKEY_CURRENT_USER; + case org_lwjgl_opengl_WindowsRegistry_HKEY_LOCAL_MACHINE: + return HKEY_LOCAL_MACHINE; + case org_lwjgl_opengl_WindowsRegistry_HKEY_USERS: + return HKEY_USERS; + default: + return 0; + } +} + +JNIEXPORT jstring JNICALL Java_org_lwjgl_opengl_WindowsRegistry_nQueryRegistrationKey (JNIEnv *env, jclass unused, jint root_key, jstring subkey, jstring value) { + HKEY root = enumToRootKey(root_key); + char *subkey_native; + char *value_native; + jstring result; + + subkey_native = GetStringNativeChars(env, subkey); + if (subkey_native == NULL) { + throwException(env, "Failed to fetch the native string"); + return NULL; + } + value_native = GetStringNativeChars(env, value); + if (value_native == NULL) { + free(subkey_native); + throwException(env, "Failed to fetch the native string"); + return NULL; + } + result = queryRegistrationKey(env, root, subkey_native, value_native); + free(subkey_native); + free(value_native); + return result; +} diff --git a/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsRegistry.h b/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsRegistry.h new file mode 100644 index 0000000..eb2e67c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/org_lwjgl_opengl_WindowsRegistry.h @@ -0,0 +1,29 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include +/* Header for class org_lwjgl_opengl_WindowsRegistry */ + +#ifndef _Included_org_lwjgl_opengl_WindowsRegistry +#define _Included_org_lwjgl_opengl_WindowsRegistry +#ifdef __cplusplus +extern "C" { +#endif +#undef org_lwjgl_opengl_WindowsRegistry_HKEY_CLASSES_ROOT +#define org_lwjgl_opengl_WindowsRegistry_HKEY_CLASSES_ROOT 1L +#undef org_lwjgl_opengl_WindowsRegistry_HKEY_CURRENT_USER +#define org_lwjgl_opengl_WindowsRegistry_HKEY_CURRENT_USER 2L +#undef org_lwjgl_opengl_WindowsRegistry_HKEY_LOCAL_MACHINE +#define org_lwjgl_opengl_WindowsRegistry_HKEY_LOCAL_MACHINE 3L +#undef org_lwjgl_opengl_WindowsRegistry_HKEY_USERS +#define org_lwjgl_opengl_WindowsRegistry_HKEY_USERS 4L +/* + * Class: org_lwjgl_opengl_WindowsRegistry + * Method: nQueryRegistrationKey + * Signature: (ILjava/lang/String;Ljava/lang/String;)Ljava/lang/String; + */ +JNIEXPORT jstring JNICALL Java_org_lwjgl_opengl_WindowsRegistry_nQueryRegistrationKey + (JNIEnv *, jclass, jint, jstring, jstring); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/etc/lwjgl-2.9.1/src/native/windows/windows_al.c b/etc/lwjgl-2.9.1/src/native/windows/windows_al.c new file mode 100644 index 0000000..3f7cf6a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/windows_al.c @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include "extal.h" +#include "common_tools.h" + +/** + * $Id$ + * + * This file contains the AL extension assigning mechanism + * + * @author Brian Matzon + * @version $Revision$ + */ +/* Handle to OpenAL Library */ +static HMODULE handleOAL; + +void *extal_NativeGetFunctionPointer(const char *function) { + return GetProcAddress(handleOAL, function); +} + +void extal_LoadLibrary(JNIEnv *env, jstring path) { + char *path_str = GetStringNativeChars(env, path); + printfDebugJava(env, "Testing '%s'", path_str); + handleOAL = LoadLibrary(path_str); + if (handleOAL != NULL) { + printfDebugJava(env, "Found OpenAL at '%s'", path_str); + } else { + throwFormattedException(env, "Could not load OpenAL library (%d)", GetLastError()); + } + free(path_str); +} + +/** + * Unloads the OpenAL Library + */ +void extal_UnloadLibrary() { + FreeLibrary(handleOAL); +} diff --git a/etc/lwjgl-2.9.1/src/native/windows/windows_cl.c b/etc/lwjgl-2.9.1/src/native/windows/windows_cl.c new file mode 100644 index 0000000..7b24fdb --- /dev/null +++ b/etc/lwjgl-2.9.1/src/native/windows/windows_cl.c @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#include +#include +#include +#include "extcl.h" +#include "common_tools.h" + +/** + * This file contains the CL extension assigning mechanism + * + * @author Spasi + */ + +/* Handle to OpenCL Library */ +static HMODULE handleOCL; + +void * extcl_NativeGetFunctionPointer(const char *func_name) { + return GetProcAddress(handleOCL, func_name); +} + +void extcl_LoadLibrary(JNIEnv *env, jstring path) { + char *path_str = GetStringNativeChars(env, path); + printfDebugJava(env, "Testing '%s'", path_str); + handleOCL = LoadLibrary(path_str); + if (handleOCL != NULL) { + printfDebugJava(env, "Found OpenCL at '%s'", path_str); + } else { + throwFormattedException(env, "Could not load OpenCL library (%d)", GetLastError()); + } + free(path_str); +} + +/** + * Unloads the OpenCL Library + */ +void extcl_UnloadLibrary() { + if ( handleOCL != NULL ) { + FreeLibrary(handleOCL); + handleOCL = NULL; + } +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/openal/AL10.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/openal/AL10.java new file mode 100644 index 0000000..5c3392a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/openal/AL10.java @@ -0,0 +1,1256 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.openal; + +import java.nio.Buffer; +import java.nio.IntBuffer; +import java.nio.FloatBuffer; +import java.nio.DoubleBuffer; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.openal.*; + +/** + *
+ * This is the core OpenAL class. This class implements + * AL.h version 1.0 + * + * @author Brian Matzon + * @version $Revision$ + * $Id$ + */ +public interface AL10 { + /** Bad value */ + int AL_INVALID = -1; + + /** Disable value */ + int AL_NONE = 0; + + /** Boolean False */ + int AL_FALSE = 0; + + /** Boolean True */ + int AL_TRUE = 1; + + /** + * Indicate the type of SOURCE. + * Sources can be spatialized + */ + int AL_SOURCE_TYPE = 0x1027; + + /** Indicate source has absolute coordinates */ + int AL_SOURCE_ABSOLUTE = 0x201; + + /** Indicate Source has listener relative coordinates */ + int AL_SOURCE_RELATIVE = 0x202; + + /** + * Directional source, inner cone angle, in degrees + * Range: [0-360] + * Default: 360 + */ + int AL_CONE_INNER_ANGLE = 0x1001; + + /** + * Directional source, outer cone angle, in degrees. + * Range: [0-360] + * Default: 360 + */ + int AL_CONE_OUTER_ANGLE = 0x1002; + + /** + * Specify the pitch to be applied, either at source, + * or on mixer results, at listener. + * Range: [0.5-2.0] + * Default: 1.0 + */ + int AL_PITCH = 0x1003; + + /** + * Specify the current location in three dimensional space. + * OpenAL, like OpenGL, uses a right handed coordinate system, + * where in a frontal default view X (thumb) points right, + * Y points up (index finger), and Z points towards the + * viewer/camera (middle finger). + * To switch from a left handed coordinate system, flip the + * sign on the Z coordinate. + * Listener position is always in the world coordinate system. + */ + int AL_POSITION = 0x1004; + + /** Specify the current direction as forward vector. */ + int AL_DIRECTION = 0x1005; + + /** Specify the current velocity in three dimensional space. */ + int AL_VELOCITY = 0x1006; + + /** + * Indicate whether source has to loop infinite. + * Type: ALboolean + * Range: [TRUE, FALSE] + * Default: FALSE + */ + int AL_LOOPING = 0x1007; + + /** + * Indicate the buffer to provide sound samples. + * Type: ALuint. + * Range: any valid Buffer id. + */ + int AL_BUFFER = 0x1009; + + /** + * Indicate the gain (volume amplification) applied. + * Type: ALfloat. + * Range: ]0.0- ] + * A value of 1.0 means un-attenuated/unchanged. + * Each division by 2 equals an attenuation of -6dB. + * Each multiplicaton with 2 equals an amplification of +6dB. + * A value of 0.0 is meaningless with respect to a logarithmic + * scale; it is interpreted as zero volume - the channel + * is effectively disabled. + */ + int AL_GAIN = 0x100A; + + /** + * Indicate minimum source attenuation. + * Type: ALfloat + * Range: [0.0 - 1.0] + */ + int AL_MIN_GAIN = 0x100D; + + /** + * Indicate maximum source attenuation. + * Type: ALfloat + * Range: [0.0 - 1.0] + */ + int AL_MAX_GAIN = 0x100E; + + /** + * Specify the current orientation. + * Type: ALfv6 (at/up) + * Range: N/A + */ + int AL_ORIENTATION = 0x100F; + + /* byte offset into source (in canon format). -1 if source + * is not playing. Don't set this, get this. + * + * Type: ALfloat + * Range: [0.0 - ] + * Default: 1.0 + */ + int AL_REFERENCE_DISTANCE = 0x1020; + + /** + * Indicate the rolloff factor for the source. + * Type: ALfloat + * Range: [0.0 - ] + * Default: 1.0 + */ + int AL_ROLLOFF_FACTOR = 0x1021; + + /** + * Indicate the gain (volume amplification) applied. + * Type: ALfloat. + * Range: ]0.0- ] + * A value of 1.0 means un-attenuated/unchanged. + * Each division by 2 equals an attenuation of -6dB. + * Each multiplicaton with 2 equals an amplification of +6dB. + * A value of 0.0 is meaningless with respect to a logarithmic + * scale; it is interpreted as zero volume - the channel + * is effectively disabled. + */ + int AL_CONE_OUTER_GAIN = 0x1022; + + /** + * Specify the maximum distance. + * Type: ALfloat + * Range: [0.0 - ] + */ + int AL_MAX_DISTANCE = 0x1023; + + /** + * Specify the channel mask. (Creative) + * Type: ALuint + * Range: [0 - 255] + */ + int AL_CHANNEL_MASK = 0x3000; + + /** Source state information */ + int AL_SOURCE_STATE = 0x1010; + + /** Source state information */ + int AL_INITIAL = 0x1011; + + /** Source state information */ + int AL_PLAYING = 0x1012; + + /** Source state information */ + int AL_PAUSED = 0x1013; + + /** Source state information */ + int AL_STOPPED = 0x1014; + + /** Buffer Queue params */ + int AL_BUFFERS_QUEUED = 0x1015; + + /** Buffer Queue params */ + int AL_BUFFERS_PROCESSED = 0x1016; + + /** Sound buffers: format specifier. */ + int AL_FORMAT_MONO8 = 0x1100; + + /** Sound buffers: format specifier. */ + int AL_FORMAT_MONO16 = 0x1101; + + /** Sound buffers: format specifier. */ + int AL_FORMAT_STEREO8 = 0x1102; + + /** Sound buffers: format specifier. */ + int AL_FORMAT_STEREO16 = 0x1103; + + /** Ogg Vorbis format specifier. */ + int AL_FORMAT_VORBIS_EXT = 0x10003; + + /** + * Sound buffers: frequency, in units of Hertz [Hz]. + * This is the number of samples per second. Half of the + * sample frequency marks the maximum significant + * frequency component. + */ + int AL_FREQUENCY = 0x2001; + + /** + * Sound buffers: The number of bits per sample for the + * data contained in the buffer. + */ + int AL_BITS = 0x2002; + + /** + * Sound buffers: The number of channels for the data + * contained in the buffer. + */ + int AL_CHANNELS = 0x2003; + + /** + * Sound buffers: Size in bytes of the buffer data. + */ + int AL_SIZE = 0x2004; + + /** + * @deprecated This token is a relict of the early OpenAL days and is + * no longer supported. Neither the OpenAL spec nor OpenAL Soft define + * it. + */ + @Deprecated + int AL_DATA = 0x2005; + + /** + * Buffer state. + * + * Not supported for public use (yet). + */ + int AL_UNUSED = 0x2010; + + /** + * Buffer state. + * + * Not supported for public use (yet). + */ + int AL_PENDING = 0x2011; + + /** + * Buffer state. + * + * Not supported for public use (yet). + */ + int AL_PROCESSED = 0x2012; + + /** Errors: No Error. */ + int AL_NO_ERROR = AL_FALSE; + + /** Illegal name passed as an argument to an AL call. */ + int AL_INVALID_NAME = 0xA001; + + /** Illegal enum passed as an argument to an AL call. */ + int AL_INVALID_ENUM = 0xA002; + + /** + * Illegal value passed as an argument to an AL call. + * Applies to parameter values, but not to enumerations. + */ + int AL_INVALID_VALUE = 0xA003; + + /** + * A function was called at inappropriate time, + * or in an inappropriate way, causing an illegal state. + * This can be an incompatible ALenum, object ID, + * and/or function. + */ + int AL_INVALID_OPERATION = 0xA004; + + /** + * A function could not be completed, + * because there is not enough memory available. + */ + int AL_OUT_OF_MEMORY = 0xA005; + + /** Context strings: Vendor */ + int AL_VENDOR = 0xB001; + + /** Context strings: Version */ + int AL_VERSION = 0xB002; + + /** Context strings: Renderer */ + int AL_RENDERER = 0xB003; + + /** Context strings: Extensions */ + int AL_EXTENSIONS = 0xB004; + + /** Doppler scale. Default 1.0 */ + int AL_DOPPLER_FACTOR = 0xC000; + + /** Doppler velocity. Default 1.0 */ + int AL_DOPPLER_VELOCITY = 0xC001; + + /** Distance model. Default INVERSE_DISTANCE_CLAMPED */ + int AL_DISTANCE_MODEL = 0xD000; + + /** Distance model */ + int AL_INVERSE_DISTANCE = 0xD001; + + /** Distance model */ + int AL_INVERSE_DISTANCE_CLAMPED = 0xD002; + + /** + * The application can temporarily disable certain AL capabilities on a per Context + * basis. This allows the driver implementation to optimize for certain subsets of + * operations. Enabling and disabling capabilities is handled using a function pair. + * + * @param capability name of a capability to enable + */ + @ALvoid + void alEnable(int capability); + + /** + * The application can temporarily disable certain AL capabilities on a per Context + * basis. This allows the driver implementation to optimize for certain subsets of + * operations. Enabling and disabling capabilities is handled using a function pair. + * + * @param capability name of a capability to disable + */ + @ALvoid + void alDisable(@ALenum int capability); + + /** + * The application can also query whether a given capability is currently enabled or + * not. + *

+ * If the token used to specify target is not legal, an AL_INVALID_ENUM error will be + * generated. + *

+ *

+ * At this time, this mechanism is not used. There are no valid targets. + *

+ * + * @param capability name of a capability to check + * @return true if named feature is enabled + */ + boolean alIsEnabled(@ALenum int capability); + + /** + * Hinting for implementation + * NOTE: This method is a NOP, but is provided for completeness. + * + * @param target The target to hint + * @param mode Mode to hint + */ +// @ALvoid +// void alHint(@ALenum int target, @ALenum int mode); + + /** + * Like OpenGL, AL uses a simplified interface for querying global state. + * + * Legal values are e.g. AL_DOPPLER_FACTOR, AL_DOPPLER_VELOCITY, + * AL_DISTANCE_MODEL. + *

+ * null destinations are quietly ignored. AL_INVALID_ENUM is the response to errors + * in specifying pName. The amount of memory required in the destination + * depends on the actual state requested. + *

+ * + * @return boolean state described by pname will be returned. + */ + boolean alGetBoolean(@ALenum int pname); + + /** + * Like OpenGL, AL uses a simplified interface for querying global state. + * + * Legal values are e.g. AL_DOPPLER_FACTOR, AL_DOPPLER_VELOCITY, + * AL_DISTANCE_MODEL. + *

+ * null destinations are quietly ignored. AL_INVALID_ENUM is the response to errors + * in specifying pName. The amount of memory required in the destination + * depends on the actual state requested. + *

+ * + * @return int state described by pname will be returned. + */ + int alGetInteger(@ALenum int pname); + + /** + * Like OpenGL, AL uses a simplified interface for querying global state. + * + * Legal values are e.g. AL_DOPPLER_FACTOR, AL_DOPPLER_VELOCITY, + * AL_DISTANCE_MODEL. + *

+ * null destinations are quietly ignored. AL_INVALID_ENUM is the response to errors + * in specifying pName. The amount of memory required in the destination + * depends on the actual state requested. + *

+ * + * @return float state described by pname will be returned. + */ + float alGetFloat(@ALenum int pname); + + /** + * Like OpenGL, AL uses a simplified interface for querying global state. + * + * Legal values are e.g. AL_DOPPLER_FACTOR, AL_DOPPLER_VELOCITY, + * AL_DISTANCE_MODEL. + *

+ * null destinations are quietly ignored. AL_INVALID_ENUM is the response to errors + * in specifying pName. The amount of memory required in the destination + * depends on the actual state requested. + *

+ * + * @return double state described by pname will be returned. + */ + double alGetDouble(@ALenum int pname); + + /** + * Like OpenGL, AL uses a simplified interface for querying global state. + * + * Legal values are e.g. AL_DOPPLER_FACTOR, AL_DOPPLER_VELOCITY, + * AL_DISTANCE_MODEL. + *

+ * null destinations are quietly ignored. AL_INVALID_ENUM is the response to errors + * in specifying pName. The amount of memory required in the destination + * depends on the actual state requested. + *

+ * + * @param pname state to be queried + * @param data Buffer to place the integers in + */ + @StripPostfix("data") + @ALvoid + void alGetIntegerv(@ALenum int pname, @OutParameter @Check("1") IntBuffer data); + + /** + * Like OpenGL, AL uses a simplified interface for querying global state. + * + * Legal values are e.g. AL_DOPPLER_FACTOR, AL_DOPPLER_VELOCITY, + * AL_DISTANCE_MODEL. + *

+ * null destinations are quietly ignored. AL_INVALID_ENUM is the response to errors + * in specifying pName. The amount of memory required in the destination + * depends on the actual state requested. + *

+ * + * @param pname state to be queried + * @param data Buffer to place the floats in + */ + @StripPostfix("data") + @ALvoid + void alGetFloatv(@ALenum int pname, @OutParameter @Check("1") FloatBuffer data); + + /** + * Like OpenGL, AL uses a simplified interface for querying global state. + * + * Legal values are e.g. AL_DOPPLER_FACTOR, AL_DOPPLER_VELOCITY, + * AL_DISTANCE_MODEL. + *

+ * null destinations are quietly ignored. AL_INVALID_ENUM is the response to errors + * in specifying pName. The amount of memory required in the destination + * depends on the actual state requested. + *

+ * + * @param pname state to be queried + * @param data Buffer to place the doubles in + */ + @StripPostfix("data") + @ALvoid + void alGetDoublev(@ALenum int pname, @OutParameter @Check("1") DoubleBuffer data); + + /** + * The application can retrieve state information global to the current AL Context. + * GetString will return a pointer to a constant string. Valid values for param are + * VERSION, RENDERER, VENDOR, and EXTENSIONS, as well as the error codes + * defined by AL. The application can use GetString to retrieve a string for an error + * code. + * + * @param pname The property to be returned + * @return OpenAL String property + */ + @NoErrorCheck + String alGetString(@ALenum int pname); + + /** + * The AL detects only a subset of those conditions that could be considered errors. + * This is because in many cases error checking would adversely impact the + * performance of an error-free program. + *

+ * Each detectable error is assigned a numeric + * code. When an error is detected by AL, a flag is set and the error code is recorded. + * Further errors, if they occur, do not affect this recorded code. When GetError is + * called, the code is returned and the flag is cleared, so that a further error will again + * record its code. If a call to GetError returns AL_NO_ERROR then there has been no + * detectable error since the last call to GetError (or since the AL was initialized). + *

+ *

+ * Error codes can be mapped to strings. The GetString function returns a pointer to a + * constant (literal) string that is identical to the identifier used for the enumeration + * value, as defined in the specification. + *

+ *

+ * AL_NO_ERROR - "No Error" token.
+ * AL_INVALID_NAME - Invalid Name parameter.
+ * AL_INVALID_ENUM - Invalid parameter.
+ * AL_INVALID_VALUE - Invalid enum parameter value.
+ * AL_INVALID_OPERATION - Illegal call.
+ * AL_OUT_OF_MEMORY - Unable to allocate memory.
+ *

+ *

+ * The table summarizes the AL errors. Currently, when an error flag is set, results of + * AL operations are undefined only if AL_OUT_OF_MEMORY has occured. In other + * cases, the command generating the error is ignored so that it has no effect on AL + * state or output buffer contents. If the error generating command returns a value, it + * returns zero. If the generating command modifies values through a pointer + * argument, no change is made to these values. These error semantics apply only to + * AL errors, not to system errors such as memory access errors. + *

+ *

+ * Several error generation conditions are implicit in the description of the various AL + * commands. First, if a command that requires an enumerated value is passed a value + * that is not one of those specified as allowable for that command, the error + * AL_INVALID_ENUM results. This is the case even if the argument is a pointer to a + * symbolic constant if that value is not allowable for the given command. This will + * occur whether the value is allowable for other functions, or an invalid integer value. + *

+ *

+ * Integer parameters that are used as names for AL objects such as Buffers and + * Sources are checked for validity. If an invalid name parameter is specified in an AL + * command, an AL_INVALID_NAME error will be generated, and the command is + * ignored. + *

+ *

+ * If a negative integer is provided where an argument of type sizei is specified, the + * error AL_INVALID_VALUE results. The same error will result from attempts to set + * integral and floating point values for attributes exceeding the legal range for these. + * The specification does not guarantee that the implementation emits + * AL_INVALID_VALUE if a NaN or Infinity value is passed in for a float or double + * argument (as the specification does not enforce possibly expensive testing of + * floating point values). + *

+ *

+ * Commands can be invalid. For example, certain commands might not be applicable + * to a given object. There are also illegal combinations of tokens and values as + * arguments to a command. AL responds to any such illegal command with an + * AL_INVALID_OPERATION error. + *

+ *

+ * If memory is exhausted as a side effect of the execution of an AL command, either + * on system level or by exhausting the allocated resources at AL's internal disposal, + * the error AL_OUT_OF_MEMORY may be generated. This can also happen independent + * of recent commands if AL has to request memory for an internal task and fails to + * allocate the required memory from the operating system. + *

+ *

+ * Otherwise errors are generated only for conditions that are explicitely described in + * this specification. + *

+ * + * @return current error state + */ + @NoErrorCheck + @ALenum int alGetError(); + + /** + * To verify that a given extension is available for the current context and the device it + * is associated with, use this method. + *

+ * A null name argument returns AL_FALSE, as do invalid and unsupported string + * tokens. A null deviceHandle will result in an INVALID_DEVICE error. + *

+ * + * @param fname String describing the desired extension + * @return true if extension is available, false if not + */ + boolean alIsExtensionPresent(String fname); + + /** + *

+ * To obtain enumeration values for extensions, the application has to use + * GetEnumValue of an extension token. Enumeration values are defined within the + * AL namespace and allocated according to specification of the core API and the + * extensions, thus they are context-independent. + *

+ *

+ * Returns 0 if the enumeration can not be found. The presence of an enum value does + * not guarantee the applicability of an extension to the current context. A non-zero + * return indicates merely that the implementation is aware of the existence of this + * extension. Implementations should not attempt to return 0 to indicate that the + * extensions is not supported for the current context. + *

+ * + * @param ename String describing an OpenAL enum + * @return Actual int for the described enumeration name + */ + @ALenum int alGetEnumValue(String ename); + + /** + * Listener attributes are changed using the Listener group of commands. + * + * @param pname name of the attribute to be set + * @param value value to set the attribute to + */ + @ALvoid + void alListeneri(@ALenum int pname, int value); + + /** + * Listener attributes are changed using the Listener group of commands. + * + * @param pname name of the attribute to be set + * @param value floating point value to set the attribute to + */ + @ALvoid + void alListenerf(@ALenum int pname, float value); + + /** + * Listener attributes are changed using the Listener group of commands. + * + * @param pname name of the attribute to be set + * @param value FloatBuffer containing value to set the attribute to + */ + @StripPostfix("value") + @ALvoid + void alListenerfv(@ALenum int pname, @Check("1") @Const FloatBuffer value); + + /** + * Listener attributes are changed using the Listener group of commands. + * + * @param pname name of the attribute to be set + * @param v1 value value 1 + * @param v2 value value 2 + * @param v3 float value 3 + */ + @ALvoid + void alListener3f(@ALenum int pname, float v1, float v2, float v3); + + /** + * Listener state is maintained inside the AL implementation and can be queried in + * full. + * + * @param pname name of the attribute to be retrieved + * @return int + */ + void alGetListeneri(@ALenum int pname, @Result @ALint int value); + + /** + * Listener state is maintained inside the AL implementation and can be queried in + * full. + * + * @param pname name of the attribute to be retrieved + * @return float + */ + void alGetListenerf(@ALenum int pname, @Result float value); + + /** + * Listener state is maintained inside the AL implementation and can be queried in + * full. + * + * @param pname name of the attribute to be retrieved + * @param floatdata Buffer to write floats to + */ + // TODO: What's the real minimum number of elements? + @StripPostfix("floatdata") + @ALvoid + void alGetListenerfv(@ALenum int pname, @OutParameter @Check("1") FloatBuffer floatdata); + + /** + * The application requests a number of Sources using GenSources. + * + * @param sources array holding sources + */ + @ALvoid + void alGenSources(@AutoSize("sources") @ALsizei int n, @OutParameter @ALuint IntBuffer sources); + + @Alternate(value = "alGenSources", nativeAlt = true) + @ALvoid + void alGenSources2(@Constant("1") @ALsizei int n, @Result @ALuint int source); + + /** + * The application requests deletion of a number of Sources by DeleteSources. + * + * @param sources Source array to delete from + */ + @ALvoid + void alDeleteSources(@AutoSize("sources") @ALsizei int n, @ALuint IntBuffer sources); + + @Alternate(value = "alDeleteSources", nativeAlt = true) + @ALvoid + void alDeleteSources2(@Constant("1") @ALsizei int n, @Indirect @ALuint int source); + + /** + * The application can verify whether a source name is valid using the IsSource query. + * + * @param id id of source to be testes for validity + * @return true if id is valid, false if not + */ + boolean alIsSource(@ALuint int id); + + /** + * Specifies the position and other properties as taken into account during + * sound processing. + * + * @param source Source to det property on + * @param pname property to set + * @param value value of property + */ + @ALvoid + void alSourcei(@ALuint int source, @ALenum int pname, int value); + + /** + * Specifies the position and other properties as taken into account during + * sound processing. + * + * @param source Source to det property on + * @param pname property to set + * @param value value of property + */ + @ALvoid + void alSourcef(@ALuint int source, @ALenum int pname, float value); + + /** + * Specifies the position and other properties as taken into account during + * sound processing. + * + * @param source Source to set property on + * @param pname property to set + * @param value FloatBuffer containing value of property + */ + // TODO: What's the correct minimum value? + @StripPostfix("value") + @ALvoid + void alSourcefv(@ALuint int source, @ALenum int pname, @Check("1") @Const FloatBuffer value); + + /** + * Specifies the position and other properties as taken into account during + * sound processing. + * + * @param source Source to set property on + * @param pname property to set + * @param v1 value 1 of property + * @param v2 value 2 of property + * @param v3 value 3 of property + */ + @ALvoid + void alSource3f( + @ALuint int source, + @ALenum int pname, + float v1, + float v2, + float v3); + + + /** + * Source state is maintained inside the AL implementation, and the current attributes + * can be queried. The performance of such queries is implementation dependent, no + * performance guarantees are made. + * + * @param source source to get property from + * @param pname name of property + * @return int + */ + @ALvoid + void alGetSourcei(@ALuint int source, @ALenum int pname, @Result int value); + + /** + * Source state is maintained inside the AL implementation, and the current attributes + * can be queried. The performance of such queries is implementation dependent, no + * performance guarantees are made. + * + * @param source source to get property from + * @param pname name of property + * @return float + */ + @ALvoid + void alGetSourcef(@ALuint int source, @ALenum int pname, @Result float value); + + /** + * Source state is maintained inside the AL implementation, and the current attributes + * can be queried. The performance of such queries is implementation dependent, no + * performance guarantees are made. + * + * @param source Source to get property from + * @param pname property to get + * @param floatdata Buffer to write floats to + */ + // TODO: What's the correct minimum value? + @StripPostfix("floatdata") + @ALvoid + void alGetSourcefv(@ALuint int source, @ALenum int pname, @OutParameter @Check("1") FloatBuffer floatdata); + + /** + * Play() applied to an AL_INITIAL Source will promote the Source to AL_PLAYING, thus + * the data found in the Buffer will be fed into the processing, starting at the + * beginning. Play() applied to a AL_PLAYING Source will restart the Source from the + * beginning. It will not affect the configuration, and will leave the Source in + * AL_PLAYING state, but reset the sampling offset to the beginning. Play() applied to a + * AL_PAUSED Source will resume processing using the Source state as preserved at the + * Pause() operation. Play() applied to a AL_STOPPED Source will propagate it to + * AL_INITIAL then to AL_PLAYING immediately. + * + * @param sources array of sources to play + */ + @StripPostfix("sources") + @ALvoid + void alSourcePlayv(@AutoSize("sources") @ALsizei int n, @ALuint IntBuffer sources); + + /** + * Pause() applied to an AL_INITIAL Source is a legal NOP. Pause() applied to a + * AL_PLAYING Source will change its state to AL_PAUSED. The Source is exempt from + * processing, its current state is preserved. Pause() applied to a AL_PAUSED Source is a + * legal NOP. Pause() applied to a AL_STOPPED Source is a legal NOP. + * + * @param sources array of sources to pause + */ + @StripPostfix("sources") + @ALvoid + void alSourcePausev(@AutoSize("sources") @ALsizei int n, @ALuint IntBuffer sources); + + /** + * Stop() applied to an AL_INITIAL Source is a legal NOP. Stop() applied to a AL_PLAYING + * Source will change its state to AL_STOPPED. The Source is exempt from processing, + * its current state is preserved. Stop() applied to a AL_PAUSED Source will change its + * state to AL_STOPPED, with the same consequences as on a AL_PLAYING Source. Stop() + * applied to a AL_STOPPED Source is a legal NOP. + * + * @param sources array of sources to stop + */ + @StripPostfix("sources") + @ALvoid + void alSourceStopv(@AutoSize("sources") @ALsizei int n, @ALuint IntBuffer sources); + + /** + * Rewind() applied to an AL_INITIAL Source is a legal NOP. Rewind() applied to a + * AL_PLAYING Source will change its state to AL_STOPPED then AL_INITIAL. The Source is + * exempt from processing, its current state is preserved, with the exception of the + * sampling offset which is reset to the beginning. Rewind() applied to a AL_PAUSED + * Source will change its state to AL_INITIAL, with the same consequences as on a + * AL_PLAYING Source. Rewind() applied to a AL_STOPPED Source promotes the Source to + * AL_INITIAL, resetting the sampling offset to the beginning. + * + * @param sources array of sources to rewind + */ + @StripPostfix("sources") + @ALvoid + void alSourceRewindv(@AutoSize("sources") @ALsizei int n, @ALuint IntBuffer sources); + + /** + * Play() applied to an AL_INITIAL Source will promote the Source to AL_PLAYING, thus + * the data found in the Buffer will be fed into the processing, starting at the + * beginning. Play() applied to a AL_PLAYING Source will restart the Source from the + * beginning. It will not affect the configuration, and will leave the Source in + * AL_PLAYING state, but reset the sampling offset to the beginning. Play() applied to a + * AL_PAUSED Source will resume processing using the Source state as preserved at the + * Pause() operation. Play() applied to a AL_STOPPED Source will propagate it to + * AL_INITIAL then to AL_PLAYING immediately. + * + * @param source Source to play + */ + @ALvoid + void alSourcePlay(@ALuint int source); + + /** + * Pause() applied to an AL_INITIAL Source is a legal NOP. Pause() applied to a + * AL_PLAYING Source will change its state to AL_PAUSED. The Source is exempt from + * processing, its current state is preserved. Pause() applied to a AL_PAUSED Source is a + * legal NOP. Pause() applied to a AL_STOPPED Source is a legal NOP. + * + * @param source Source to pause + */ + @ALvoid + void alSourcePause(@ALuint int source); + + /** + * Stop() applied to an AL_INITIAL Source is a legal NOP. Stop() applied to a AL_PLAYING + * Source will change its state to AL_STOPPED. The Source is exempt from processing, + * its current state is preserved. Stop() applied to a AL_PAUSED Source will change its + * state to AL_STOPPED, with the same consequences as on a AL_PLAYING Source. Stop() + * applied to a AL_STOPPED Source is a legal NOP. + * + * @param source Source to stop + */ + @ALvoid + void alSourceStop(@ALuint int source); + + /** + * Rewind() applied to an AL_INITIAL Source is a legal NOP. Rewind() applied to a + * AL_PLAYING Source will change its state to AL_STOPPED then AL_INITIAL. The Source is + * exempt from processing, its current state is preserved, with the exception of the + * sampling offset which is reset to the beginning. Rewind() applied to a AL_PAUSED + * Source will change its state to AL_INITIAL, with the same consequences as on a + * AL_PLAYING Source. Rewind() applied to a AL_STOPPED Source promotes the Source to + * AL_INITIAL, resetting the sampling offset to the beginning. + * + * @param source Source to rewind + */ + @ALvoid + void alSourceRewind(@ALuint int source); + + /** + * The application requests a number of Buffers using GenBuffers. + * + * @param buffers holding buffers + */ + @ALvoid + void alGenBuffers(@AutoSize("buffers") @ALsizei int n, @OutParameter @ALuint IntBuffer buffers); + + @Alternate(value = "alGenBuffers", nativeAlt = true) + @ALvoid + void alGenBuffers2(@Constant("1") @ALsizei int n, @Result @ALuint int buffer); + + /** + *

+ * The application requests deletion of a number of Buffers by calling DeleteBuffers. + *

+ *

+ * Once deleted, Names are no longer valid for use with AL function calls. Any such + * use will cause an AL_INVALID_NAME error. The implementation is free to defer actual + * release of resources. + *

+ *

+ * IsBuffer(bname) can be used to verify deletion of a buffer. Deleting bufferName 0 is + * a legal NOP in both scalar and vector forms of the command. The same is true for + * unused buffer names, e.g. such as not allocated yet, or as released already. + * + * @param buffers Buffer to delete from + */ + @ALvoid + void alDeleteBuffers(@AutoSize("buffers") @ALsizei int n, @ALuint IntBuffer buffers); + + @Alternate(value = "alDeleteBuffers", nativeAlt = true) + @ALvoid + void alDeleteBuffers2(@Constant("1") @ALsizei int n, @Indirect @ALuint int buffer); + + /** + * The application can verify whether a buffer Name is valid using the IsBuffer query. + * + * @param buffer buffer to be tested for validity + * @return true if supplied buffer is valid, false if not + */ + boolean alIsBuffer(@ALuint int buffer); + + /** + *

+ * A special case of Buffer state is the actual sound sample data stored in asociation + * with the Buffer. Applications can specify sample data using BufferData. + *

+ *

+ * The data specified is copied to an internal software, or if possible, hardware buffer. + * The implementation is free to apply decompression, conversion, resampling, and + * filtering as needed. The internal format of the Buffer is not exposed to the + * application, and not accessible. Valid formats are AL_FORMAT_MONO8, + * AL_FORMAT_MONO16, AL_FORMAT_STEREO8, and AL_FORMAT_STEREO16. An + * implementation may expose other formats, see the chapter on Extensions for + * information on determining if additional formats are supported. + *

+ *

+ * Applications should always check for an error condition after attempting to specify + * buffer data in case an implementation has to generate an AL_OUT_OF_MEMORY or + * conversion related AL_INVALID_VALUE error. The application is free to reuse the + * memory specified by the data pointer once the call to BufferData returns. The + * implementation has to dereference, e.g. copy, the data during BufferData execution. + *

+ * + * @param buffer Buffer to fill + * @param format format sound data is in + * @param data location of data + * @param freq frequency of data + */ + @ALvoid + void alBufferData( + @ALuint int buffer, + @ALenum int format, + @ALbyte + @ALshort + @ALint + Buffer data, + @AutoSize("data") + @ALsizei int size, + @ALsizei int freq); + + /** + * Buffer state is maintained inside the AL implementation and can be queried in full.
+ * ALC_FREQUENCY - specified in samples per second, i.e. units of Hertz [Hz].
+ * ALC_SIZE - Size in bytes of the buffer data.
+ * + * @param buffer buffer to get property from + * @param pname name of property to retrieve + */ + @ALvoid + void alGetBufferi(@ALuint int buffer, @ALenum int pname, @Result int value); + + /** + * Buffer state is maintained inside the AL implementation and can be queried in full.
+ * ALC_FREQUENCY - specified in samples per second, i.e. units of Hertz [Hz].
+ * ALC_SIZE - Size in bytes of the buffer data.
+ * + * @param buffer buffer to get property from + * @param pname name of property to retrieve + * @return float + */ + @ALvoid + void alGetBufferf(@ALuint int buffer, @ALenum int pname, @Result float value); + + /** + *

+ * The application can queue up one or multiple buffer names using + * SourceQueueBuffers. The buffers will be queued in the sequence in which they + * appear in the array. + *

+ *

+ * This command is legal on a Source in any state (to allow for streaming, queueing + * has to be possible on a AL_PLAYING Source). Queues are read-only with exception of + * the unqueue operation. The Buffer Name AL_NONE (i.e. 0) can be queued. + *

+ * + * @param source source to queue buffers onto + * @param buffers buffers to be queued + */ + @ALvoid + void alSourceQueueBuffers(@ALuint int source, @AutoSize("buffers") @ALsizei int n, @ALuint IntBuffer buffers); + + @Alternate(value = "alSourceQueueBuffers", nativeAlt = true) + @ALvoid + void alSourceQueueBuffers2(@ALuint int source, @Constant("1") @ALsizei int n, @Indirect @ALuint int buffer); + + /** + *

+ * Once a queue entry for a buffer has been appended to a queue and is pending + * processing, it should not be changed. Removal of a given queue entry is not possible + * unless either the Source is AL_STOPPED (in which case then entire queue is considered + * processed), or if the queue entry has already been processed (AL_PLAYING or AL_PAUSED + * Source). + *

+ *

+ * The Unqueue command removes a number of buffers entries that have finished + * processing, in the order of appearance, from the queue. The operation will fail if + * more buffers are requested than available, leaving the destination arguments + * unchanged. An AL_INVALID_VALUE error will be thrown. If no error, the destination + * argument will have been updated accordingly. + *

+ * + * @param source source to unqueue buffers from + * @param buffers IntBuffer containing list of names that were unqueued + */ + @ALvoid + void alSourceUnqueueBuffers(@ALuint int source, @AutoSize("buffers") @ALsizei int n, @OutParameter @ALuint IntBuffer buffers); + + @Alternate(value = "alSourceUnqueueBuffers", nativeAlt = true) + @ALvoid + void alSourceUnqueueBuffers2(@ALuint int source, @Constant("1") @ALsizei int n, @Result @ALuint int buffer); + + /** + *

+ * Samples usually use the entire dynamic range of the chosen format/encoding, + * independent of their real world intensity. In other words, a jet engine and a + * clockwork both will have samples with full amplitude. The application will then + * have to adjust Source AL_GAIN accordingly to account for relative differences. + *

+ *

+ * Source AL_GAIN is then attenuated by distance. The effective attenuation of a Source + * depends on many factors, among which distance attenuation and source and + * Listener AL_GAIN are only some of the contributing factors. Even if the source and + * Listener AL_GAIN exceed 1.0 (amplification beyond the guaranteed dynamic range), + * distance and other attenuation might ultimately limit the overall AL_GAIN to a value + * below 1.0. + *

+ *

+ * AL currently supports three modes of operation with respect to distance + * attenuation. It supports two distance-dependent attenuation models, one which is + * similar to the IASIG I3DL2 (and DS3D) model. The application choses one of these + * two models (or can chose to disable distance-dependent attenuation effects model) + * on a per-context basis. + *

+ *

+ * Legal arguments are AL_NONE, AL_INVERSE_DISTANCE, and + * AL_INVERSE_DISTANCE_CLAMPED. + *
+ *
+ * AL_NONE bypasses all distance attenuation + * calculation for all Sources. The implementation is expected to optimize this + * situation. + *
+ *
+ * AL_INVERSE_DISTANCE_CLAMPED is the DS3D model, with + * AL_REFERENCE_DISTANCE indicating both the reference distance and the distance + * below which gain will be clamped. + *
+ *
+ * AL_INVERSE_DISTANCE is equivalent to the DS3D + * model with the exception that AL_REFERENCE_DISTANCE does not imply any + * clamping. + *
+ *
+ * The AL implementation is still free to apply any range clamping as + * necessary. The current distance model chosen can be queried using GetIntegerv and + * AL_DISTANCE_MODEL. + *

+ * + * @param value distance model to be set + */ + @ALvoid + void alDistanceModel(@ALenum int value); + + /** + * The Doppler Effect depends on the velocities of Source and Listener relative to the + * medium, and the propagation speed of sound in that medium. The application + * might want to emphasize or de-emphasize the Doppler Effect as physically accurate + * calculation might not give the desired results. The amount of frequency shift (pitch + * change) is proportional to the speed of listener and source along their line of sight. + * The application can increase or decrease that frequency shift by specifying the + * scaling factor AL should apply to the result of the calculation. + *
+ *
+ * The Doppler Effect as implemented by AL is described by the formula below. Effects + * of the medium (air, water) moving with respect to listener and source are ignored. + * AL_DOPPLER_VELOCITY is the propagation speed relative to which the Source + * velocities are interpreted. + * + *

+ *

+	 *	 VD: AL_DOPPLER_VELOCITY
+	 *	 DF: AL_DOPPLER_FACTOR
+	 *	 vl: Listener velocity (scalar, projected on source-listener vector)
+	 *	 vs: Source verlocity (scalar, projected on source-listener vector)
+	 *	 f: Frequency in sample
+	 *	 f': effective Doppler shifted frequency
+	 *
+	 *	 f' = DF * f * (VD-vl)/(VD+vs)
+	 *
+	 *	 vl<0, vs>0 : source and listener approaching each other
+	 *	 vl>0, vs<0 : source and listener moving away from each other
+	 * 
+ *

+ *

+ * The implementation has to clamp the projected Listener velocity vl, if abs(vl) is + * greater or equal VD. It similarly has to clamp the projected Source velocity vs if + * abs(vs) is greater or equal VD. + *

+ *

+ * There are two API calls global to the current context that provide control of the two + * related parameters. + *

+ *

+ * AL_DOPPLER_FACTOR is a simple scaling to exaggerate or + * deemphasize the Doppler (pitch) shift resulting from the calculation. + *

+ *

+ * A negative value will result in an AL_INVALID_VALUE error, the command is then + * ignored. The default value is 1. The current setting can be queried using GetFloatv + * and AL_DOPPLER_FACTOR. The implementation is free to optimize the case of + * AL_DOPPLER_FACTOR being set to zero, as this effectively disables the effect. + *

+ * + * @param value Doppler scale value to set + */ + @ALvoid + void alDopplerFactor(float value); + + /** + * The Doppler Effect depends on the velocities of Source and Listener relative to the + * medium, and the propagation speed of sound in that medium. The application + * might want to emphasize or de-emphasize the Doppler Effect as physically accurate + * calculation might not give the desired results. The amount of frequency shift (pitch + * change) is proportional to the speed of listener and source along their line of sight. + * The application can increase or decrease that frequency shift by specifying the + * scaling factor AL should apply to the result of the calculation. + *
+ *
+ * The Doppler Effect as implemented by AL is described by the formula below. Effects + * of the medium (air, water) moving with respect to listener and source are ignored. + * AL_DOPPLER_VELOCITY is the propagation speed relative to which the Source + * velocities are interpreted. + * + *

+ *

+	 *	 VD: AL_DOPPLER_VELOCITY
+	 *	 DF: AL_DOPPLER_FACTOR
+	 *	 vl: Listener velocity (scalar, projected on source-listener vector)
+	 *	 vs: Source verlocity (scalar, projected on source-listener vector)
+	 *	 f: Frequency in sample
+	 *	 f': effective Doppler shifted frequency
+	 *
+	 *	 f' = DF * f * (VD-vl)/(VD+vs)
+	 *
+	 *	 vl<0, vs>0 : source and listener approaching each other
+	 *	 vl>0, vs<0 : source and listener moving away from each other
+	 * 
+ *

+ *

+ * The implementation has to clamp the projected Listener velocity vl, if abs(vl) is + * greater or equal VD. It similarly has to clamp the projected Source velocity vs if + * abs(vs) is greater or equal VD. + *

+ *

+ * There are two API calls global to the current context that provide control of the two + * related parameters. + *

+ *

+ * AL_DOPPLER_VELOCITY allows the application to change the reference (propagation) + * velocity used in the Doppler Effect calculation. This permits the application to use a + * velocity scale appropriate to its purposes. + *

+ *

+ * A negative or zero value will result in an AL_INVALID_VALUE error, the command is + * then ignored. The default value is 1. The current setting can be queried using + * GetFloatv and AL_DOPPLER_VELOCITY. + *

+ * + * @param value Doppler velocity value to set + */ + @ALvoid + void alDopplerVelocity(float value); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/openal/AL11.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/openal/AL11.java new file mode 100644 index 0000000..1fb6b52 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/openal/AL11.java @@ -0,0 +1,278 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.openal; + +import java.nio.IntBuffer; +import java.nio.FloatBuffer; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.openal.ALenum; +import org.lwjgl.util.generator.openal.ALuint; +import org.lwjgl.util.generator.openal.ALvoid; + +/** + *
+ * This is the core OpenAL class. This class implements + * AL.h version 1.1 + * + * @author Brian Matzon + * @version $Revision: 2286 $ + * $Id: AL10.java 2286 2006-03-23 19:32:21Z matzon $ + */ +public interface AL11 { + + /** Source buffer position information in seconds */ + public static final int AL_SEC_OFFSET = 0x1024; + + /** Source buffer position information in samples */ + public static final int AL_SAMPLE_OFFSET = 0x1025; + + /** Source buffer position information in bytes */ + public static final int AL_BYTE_OFFSET = 0x1026; + + /** Type of source: Buffer has been attached using AL_BUFFER */ + public static final int AL_STATIC = 0x1028; + + /** Type of source: if one or more Buffers have been attached using alSourceQueueBuffers */ + public static final int AL_STREAMING = 0x1029; + + /** Type of source: when it has the NULL buffer attached */ + public static final int AL_UNDETERMINED = 0x1030; + + /** @see AL10#AL_INVALID_OPERATION */ + public static final int AL_ILLEGAL_COMMAND = 0xA004; + + /** Speed of Sound in units per second */ + public static final int AL_SPEED_OF_SOUND = 0xC003; + + public static final int AL_LINEAR_DISTANCE = 0xD003; + public static final int AL_LINEAR_DISTANCE_CLAMPED = 0xD004; + public static final int AL_EXPONENT_DISTANCE = 0xD005; + public static final int AL_EXPONENT_DISTANCE_CLAMPED = 0xD006; + + /** + * Listener attributes are changed using the Listener group of commands. + * + * @param pname name of the attribute to be set + * @param v1 value value 1 + * @param v2 value value 2 + * @param v3 value value 3 + */ + @ALvoid + void alListener3i(@ALenum int pname, int v1, int v2, int v3); + + /** + * Listener state is maintained inside the AL implementation and can be queried in + * full. + * + * @param pname name of the attribute to be retrieved + * @param intdata Buffer to write ints to + */ + // TODO: What's the real minimum number of elements? + @StripPostfix("intdata") + @ALvoid + void alGetListeneriv(@ALenum int pname, @OutParameter @Check("1") FloatBuffer intdata); + + /** + * Specifies the position and other properties as taken into account during + * sound processing. + * + * @param source Source to set property on + * @param pname property to set + * @param v1 value 1 of property + * @param v2 value 2 of property + * @param v3 value 3 of property + */ + @ALvoid + void alSource3i(@ALuint int source, @ALenum int pname, int v1, int v2, int v3); + + /** + * Specifies the position and other properties as taken into account during + * sound processing. + * + * @param source Source to set property on + * @param pname property to set + * @param value IntBuffer containing value of property + */ + // TODO: What's the correct minimum value? + @StripPostfix("value") + @ALvoid + void alSourceiv(@ALuint int source, @ALenum int pname, @Check("1") @Const IntBuffer value); + + /** + * This function sets a floating point property of a buffer. + * note: There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by + * this call, but this function may be used by OpenAL extensions. + * + * @param buffer Buffer to set property on + * @param pname property to set + * @param value value of property + */ + @ALvoid + void alBufferf(@ALuint int buffer, @ALenum int pname, float value); + + /** + * This function sets a floating point property of a buffer. + * note: There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by + * this call, but this function may be used by OpenAL extensions. + * + * @param buffer Buffer to set property on + * @param pname property to set + * @param v1 value of property + * @param v2 value of property + * @param v3 value of property + */ + @ALvoid + void alBuffer3f(@ALuint int buffer, @ALenum int pname, float v1, float v2, float v3); + + /** + * This function sets a floating point property of a buffer. + * note: There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by + * this call, but this function may be used by OpenAL extensions. + * + * @param buffer Buffer to set property on + * @param pname property to set + * @param value FloatBuffer containing value of property + */ + // TODO: What's the correct minimum value? + @StripPostfix("value") + @ALvoid + void alBufferfv(@ALuint int buffer, @ALenum int pname, @Check("1") @Const FloatBuffer value); + + /** + * This function sets an integer property of a buffer. + * note: There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by + * this call, but this function may be used by OpenAL extensions. + * + * @param buffer Buffer to set property on + * @param pname property to set + * @param value value of property + */ + @ALvoid + void alBufferi(@ALuint int buffer, @ALenum int pname, int value); + + /** + * This function sets an integer property of a buffer. + * note: There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by + * this call, but this function may be used by OpenAL extensions. + * + * @param buffer Buffer to set property on + * @param pname property to set + * @param v1 value of property + * @param v2 value of property + * @param v3 value of property + */ + @ALvoid + void alBuffer3i(@ALuint int buffer, @ALenum int pname, int v1, int v2, int v3); + + /** + * This function sets an integer property of a buffer. + * note: There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by + * this call, but this function may be used by OpenAL extensions. + * + * @param buffer Buffer to set property on + * @param pname property to set + * @param value IntBuffer containing value of property + */ + // TODO: What's the correct minimum value? + @StripPostfix("value") + @ALvoid + void alBufferiv(@ALuint int buffer, @ALenum int pname, @Check("1") @Const IntBuffer value); + + /** + * This function retrieves an integer property of a buffer. + * note: There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by + * this call, but this function may be used by OpenAL extensions. + * + * @param buffer Buffer to get property from + * @param pname name of property + * @return int + */ + @ALvoid + void alGetBufferi(@ALuint int buffer, @ALenum int pname, @Result int value); + + /** + * This function retrieves an integer property of a buffer. + * + * @param buffer Buffer to get property from + * @param pname name of property + */ + // TODO: What's the correct minimum value? + @StripPostfix("values") + @ALvoid + void alGetBufferiv(@ALuint int buffer, @ALenum int pname, @OutParameter @Check("1") IntBuffer values); + + /** + * This function retrieves a floating point property of a buffer. + * note: There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by + * this call, but this function may be used by OpenAL extensions. + * + * @param buffer Buffer to get property from + * @param pname name of property + * @return floating point property + */ + @ALvoid + void alGetBufferf(@ALuint int buffer, @ALenum int pname, @Result float value); + + /** + * This function retrieves a floating point property of a buffer. + * note: There are no relevant buffer properties defined in OpenAL 1.1 which can be affected by + * this call, but this function may be used by OpenAL extensions. + * + * @param buffer Buffer to get property from + * @param pname name of property + */ + // TODO: What's the correct minimum value? + @StripPostfix("values") + @ALvoid + void alGetBufferfv(@ALuint int buffer, @ALenum int pname, @OutParameter @Check("1") FloatBuffer values); + + /** + *

+ * AL_SPEED_OF_SOUND allows the application to change the reference (propagation) + * speed used in the Doppler calculation. The source and listener velocities should be + * expressed in the same units as the speed of sound. + *

+ *

+ * A negative or zero value will result in an AL_INVALID_VALUE error, and the + * command is ignored. The default value is 343.3 (appropriate for velocity units of meters + * and air as the propagation medium). The current setting can be queried using + * alGetFloat{v} and AL_SPEED_OF_SOUND. + * Distance and velocity units are completely independent of one another (so you could use + * different units for each if desired). + *

+ * + * @param value distance model to be set + */ + @ALvoid + void alSpeedOfSound(float value); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/openal/EFX10.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/openal/EFX10.java new file mode 100644 index 0000000..40a69df --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/openal/EFX10.java @@ -0,0 +1,731 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.openal; + +import java.nio.FloatBuffer; +import java.nio.IntBuffer; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.openal.ALenum; +import org.lwjgl.util.generator.openal.ALsizei; +import org.lwjgl.util.generator.openal.ALuint; +import org.lwjgl.util.generator.openal.ALvoid; +import org.lwjgl.util.generator.Alternate; + +/** + * Implementation of the OpenAL extension ALC_EXT_EFX (version 1.0). Contains necessary fields, + * methods and a range of supplementary fields containing minimum, maximum and default values of + * the former fields. + *

+ * On top of regular functions defined in the ALC_EXT_EFX, there are also several convenience + * functions. Namely alGen... and alDelete... which do not take a Java buffer parameter and + * automatically create or delete a single object, without the overhead of using a buffer. + *

+ * For comments and specification of functions and fields, refer to the "Effects Extension Guide" + * which is part of the OpenAL SDK and can be downloaded from: + * http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx + * + * @author Ciardhubh + * @version $Revision$ + * $Id$ + */ +public interface EFX10 { + + // ALC properties + String ALC_EXT_EFX_NAME = "ALC_EXT_EFX"; + int ALC_EFX_MAJOR_VERSION = 0x20001; + int ALC_EFX_MINOR_VERSION = 0x20002; + int ALC_MAX_AUXILIARY_SENDS = 0x20003; + + // Listener properties + int AL_METERS_PER_UNIT = 0x20004; + + // Source properties + int AL_DIRECT_FILTER = 0x20005; + int AL_AUXILIARY_SEND_FILTER = 0x20006; + int AL_AIR_ABSORPTION_FACTOR = 0x20007; + int AL_ROOM_ROLLOFF_FACTOR = 0x20008; + int AL_CONE_OUTER_GAINHF = 0x20009; + int AL_DIRECT_FILTER_GAINHF_AUTO = 0x2000A; + int AL_AUXILIARY_SEND_FILTER_GAIN_AUTO = 0x2000B; + int AL_AUXILIARY_SEND_FILTER_GAINHF_AUTO = 0x2000C; + + // Auxiliary effect slot properties + int AL_EFFECTSLOT_EFFECT = 0x0001; + int AL_EFFECTSLOT_GAIN = 0x0002; + int AL_EFFECTSLOT_AUXILIARY_SEND_AUTO = 0x0003; + // NULL auxiliary slot ID to disable a source send + int AL_EFFECTSLOT_NULL = 0x0000; + + // Effect parameters + // Reverb + int AL_REVERB_DENSITY = 0x0001; + int AL_REVERB_DIFFUSION = 0x0002; + int AL_REVERB_GAIN = 0x0003; + int AL_REVERB_GAINHF = 0x0004; + int AL_REVERB_DECAY_TIME = 0x0005; + int AL_REVERB_DECAY_HFRATIO = 0x0006; + int AL_REVERB_REFLECTIONS_GAIN = 0x0007; + int AL_REVERB_REFLECTIONS_DELAY = 0x0008; + int AL_REVERB_LATE_REVERB_GAIN = 0x0009; + int AL_REVERB_LATE_REVERB_DELAY = 0x000A; + int AL_REVERB_AIR_ABSORPTION_GAINHF = 0x000B; + int AL_REVERB_ROOM_ROLLOFF_FACTOR = 0x000C; + int AL_REVERB_DECAY_HFLIMIT = 0x000D; + // EAX Reverb + int AL_EAXREVERB_DENSITY = 0x0001; + int AL_EAXREVERB_DIFFUSION = 0x0002; + int AL_EAXREVERB_GAIN = 0x0003; + int AL_EAXREVERB_GAINHF = 0x0004; + int AL_EAXREVERB_GAINLF = 0x0005; + int AL_EAXREVERB_DECAY_TIME = 0x0006; + int AL_EAXREVERB_DECAY_HFRATIO = 0x0007; + int AL_EAXREVERB_DECAY_LFRATIO = 0x0008; + int AL_EAXREVERB_REFLECTIONS_GAIN = 0x0009; + int AL_EAXREVERB_REFLECTIONS_DELAY = 0x000A; + int AL_EAXREVERB_REFLECTIONS_PAN = 0x000B; + int AL_EAXREVERB_LATE_REVERB_GAIN = 0x000C; + int AL_EAXREVERB_LATE_REVERB_DELAY = 0x000D; + int AL_EAXREVERB_LATE_REVERB_PAN = 0x000E; + int AL_EAXREVERB_ECHO_TIME = 0x000F; + int AL_EAXREVERB_ECHO_DEPTH = 0x0010; + int AL_EAXREVERB_MODULATION_TIME = 0x0011; + int AL_EAXREVERB_MODULATION_DEPTH = 0x0012; + int AL_EAXREVERB_AIR_ABSORPTION_GAINHF = 0x0013; + int AL_EAXREVERB_HFREFERENCE = 0x0014; + int AL_EAXREVERB_LFREFERENCE = 0x0015; + int AL_EAXREVERB_ROOM_ROLLOFF_FACTOR = 0x0016; + int AL_EAXREVERB_DECAY_HFLIMIT = 0x0017; + // Chorus + int AL_CHORUS_WAVEFORM = 0x0001; + int AL_CHORUS_PHASE = 0x0002; + int AL_CHORUS_RATE = 0x0003; + int AL_CHORUS_DEPTH = 0x0004; + int AL_CHORUS_FEEDBACK = 0x0005; + int AL_CHORUS_DELAY = 0x0006; + // Distortion + int AL_DISTORTION_EDGE = 0x0001; + int AL_DISTORTION_GAIN = 0x0002; + int AL_DISTORTION_LOWPASS_CUTOFF = 0x0003; + int AL_DISTORTION_EQCENTER = 0x0004; + int AL_DISTORTION_EQBANDWIDTH = 0x0005; + // Echo + int AL_ECHO_DELAY = 0x0001; + int AL_ECHO_LRDELAY = 0x0002; + int AL_ECHO_DAMPING = 0x0003; + int AL_ECHO_FEEDBACK = 0x0004; + int AL_ECHO_SPREAD = 0x0005; + // Flanger + int AL_FLANGER_WAVEFORM = 0x0001; + int AL_FLANGER_PHASE = 0x0002; + int AL_FLANGER_RATE = 0x0003; + int AL_FLANGER_DEPTH = 0x0004; + int AL_FLANGER_FEEDBACK = 0x0005; + int AL_FLANGER_DELAY = 0x0006; + // Frequency shifter + int AL_FREQUENCY_SHIFTER_FREQUENCY = 0x0001; + int AL_FREQUENCY_SHIFTER_LEFT_DIRECTION = 0x0002; + int AL_FREQUENCY_SHIFTER_RIGHT_DIRECTION = 0x0003; + // Vocal morpher + int AL_VOCAL_MORPHER_PHONEMEA = 0x0001; + int AL_VOCAL_MORPHER_PHONEMEA_COARSE_TUNING = 0x0002; + int AL_VOCAL_MORPHER_PHONEMEB = 0x0003; + int AL_VOCAL_MORPHER_PHONEMEB_COARSE_TUNING = 0x0004; + int AL_VOCAL_MORPHER_WAVEFORM = 0x0005; + int AL_VOCAL_MORPHER_RATE = 0x0006; + // Pitch shifter + int AL_PITCH_SHIFTER_COARSE_TUNE = 0x0001; + int AL_PITCH_SHIFTER_FINE_TUNE = 0x0002; + // Ring modulator + int AL_RING_MODULATOR_FREQUENCY = 0x0001; + int AL_RING_MODULATOR_HIGHPASS_CUTOFF = 0x0002; + int AL_RING_MODULATOR_WAVEFORM = 0x0003; + // Autowah + int AL_AUTOWAH_ATTACK_TIME = 0x0001; + int AL_AUTOWAH_RELEASE_TIME = 0x0002; + int AL_AUTOWAH_RESONANCE = 0x0003; + int AL_AUTOWAH_PEAK_GAIN = 0x0004; + // Compressor + int AL_COMPRESSOR_ONOFF = 0x0001; + // Equalizer + int AL_EQUALIZER_LOW_GAIN = 0x0001; + int AL_EQUALIZER_LOW_CUTOFF = 0x0002; + int AL_EQUALIZER_MID1_GAIN = 0x0003; + int AL_EQUALIZER_MID1_CENTER = 0x0004; + int AL_EQUALIZER_MID1_WIDTH = 0x0005; + int AL_EQUALIZER_MID2_GAIN = 0x0006; + int AL_EQUALIZER_MID2_CENTER = 0x0007; + int AL_EQUALIZER_MID2_WIDTH = 0x0008; + int AL_EQUALIZER_HIGH_GAIN = 0x0009; + int AL_EQUALIZER_HIGH_CUTOFF = 0x000A; + // Effect type + int AL_EFFECT_FIRST_PARAMETER = 0x0000; + int AL_EFFECT_LAST_PARAMETER = 0x8000; + int AL_EFFECT_TYPE = 0x8001; + // Effect types, used with AL_EFFECT_TYPE + int AL_EFFECT_NULL = 0x0000; + int AL_EFFECT_REVERB = 0x0001; + int AL_EFFECT_CHORUS = 0x0002; + int AL_EFFECT_DISTORTION = 0x0003; + int AL_EFFECT_ECHO = 0x0004; + int AL_EFFECT_FLANGER = 0x0005; + int AL_EFFECT_FREQUENCY_SHIFTER = 0x0006; + int AL_EFFECT_VOCAL_MORPHER = 0x0007; + int AL_EFFECT_PITCH_SHIFTER = 0x0008; + int AL_EFFECT_RING_MODULATOR = 0x0009; + int AL_EFFECT_AUTOWAH = 0x000A; + int AL_EFFECT_COMPRESSOR = 0x000B; + int AL_EFFECT_EQUALIZER = 0x000C; + int AL_EFFECT_EAXREVERB = 0x8000; + + // Filter properties + // Lowpass + int AL_LOWPASS_GAIN = 0x0001; + int AL_LOWPASS_GAINHF = 0x0002; + // Highpass + int AL_HIGHPASS_GAIN = 0x0001; + int AL_HIGHPASS_GAINLF = 0x0002; + // Bandpass + int AL_BANDPASS_GAIN = 0x0001; + int AL_BANDPASS_GAINLF = 0x0002; + int AL_BANDPASS_GAINHF = 0x0003; + // Filter type + int AL_FILTER_FIRST_PARAMETER = 0x0000; + int AL_FILTER_LAST_PARAMETER = 0x8000; + int AL_FILTER_TYPE = 0x8001; + // Filter types, used with the AL_FILTER_TYPE property + int AL_FILTER_NULL = 0x0000; + int AL_FILTER_LOWPASS = 0x0001; + int AL_FILTER_HIGHPASS = 0x0002; + int AL_FILTER_BANDPASS = 0x0003; + + // Auxiliary effect slot object functions + @ALvoid + void alGenAuxiliaryEffectSlots(@AutoSize("auxiliaryeffectslots") @ALsizei int n, @OutParameter @ALuint IntBuffer auxiliaryeffectslots); + + @Alternate(value = "alGenAuxiliaryEffectSlots", nativeAlt = true) + @ALvoid + void alGenAuxiliaryEffectSlots2(@Constant("1") @ALsizei int n, @Result @ALuint int auxiliaryeffectslot); + + @ALvoid + void alDeleteAuxiliaryEffectSlots(@AutoSize("auxiliaryeffectslots") @ALsizei int n, @OutParameter @ALuint IntBuffer auxiliaryeffectslots); + + @Alternate(value = "alDeleteAuxiliaryEffectSlots", nativeAlt = true) + @ALvoid + void alDeleteAuxiliaryEffectSlots2(@Constant("1") @ALsizei int n, @Indirect @ALuint int auxiliaryeffectslot); + + boolean alIsAuxiliaryEffectSlot(@ALuint int auxiliaryeffectslot); + + @ALvoid + void alAuxiliaryEffectSloti(@ALuint int auxiliaryeffectslot, @ALenum int param, int value); + + @StripPostfix("values") + @ALvoid + void alAuxiliaryEffectSlotiv(@ALuint int auxiliaryeffectslot, @ALenum int param, @Check("1") @Const IntBuffer values); + + @ALvoid + void alAuxiliaryEffectSlotf(@ALuint int auxiliaryeffectslot, @ALenum int param, float value); + + @StripPostfix("values") + @ALvoid + void alAuxiliaryEffectSlotfv(@ALuint int auxiliaryeffectslot, @ALenum int param, @Check("1") @Const FloatBuffer values); + + @ALvoid + void alGetAuxiliaryEffectSloti(@ALuint int auxiliaryeffectslot, @ALenum int param, @Result int value); + + @StripPostfix("intdata") + @ALvoid + void alGetAuxiliaryEffectSlotiv(@ALuint int auxiliaryeffectslot, @ALenum int param, @OutParameter @Check("1") IntBuffer intdata); + + @ALvoid + void alGetAuxiliaryEffectSlotf(@ALuint int auxiliaryeffectslot, @ALenum int param, @Result float value); + + @StripPostfix("floatdata") + @ALvoid + void alGetAuxiliaryEffectSlotfv(@ALuint int auxiliaryeffectslot, @ALenum int param, @OutParameter @Check("1") FloatBuffer floatdata); + + // Effect object functions + @ALvoid + void alGenEffects(@AutoSize("effects") @ALsizei int n, @OutParameter @ALuint IntBuffer effects); + + @Alternate(value = "alGenEffects", nativeAlt = true) + @ALvoid + void alGenEffects2(@Constant("1") @ALsizei int n, @Result @ALuint int effect); + + @ALvoid + void alDeleteEffects(@AutoSize("effects") @ALsizei int n, @OutParameter @ALuint IntBuffer effects); + + @Alternate(value = "alDeleteEffects", nativeAlt = true) + @ALvoid + void alDeleteEffects2(@Constant("1") @ALsizei int n, @Indirect @ALuint int effect); + + boolean alIsEffect(@ALuint int effect); + + @ALvoid + void alEffecti(@ALuint int effect, @ALenum int param, int value); + + @StripPostfix("values") + @ALvoid + void alEffectiv(@ALuint int effect, @ALenum int param, @Check("1") @Const IntBuffer values); + + @ALvoid + void alEffectf(@ALuint int effect, @ALenum int param, float value); + + @StripPostfix("values") + @ALvoid + void alEffectfv(@ALuint int effect, @ALenum int param, @Check("1") @Const FloatBuffer values); + + @ALvoid + void alGetEffecti(@ALuint int effect, @ALenum int param, @Result int value); + + @StripPostfix("intdata") + @ALvoid + void alGetEffectiv(@ALuint int effect, @ALenum int param, @OutParameter @Check("1") IntBuffer intdata); + + @ALvoid + void alGetEffectf(@ALuint int effect, @ALenum int param, @Result float value); + + @StripPostfix("floatdata") + @ALvoid + void alGetEffectfv(@ALuint int effect, @ALenum int param, @OutParameter @Check("1") FloatBuffer floatdata); + + // Filter object functions + @ALvoid + void alGenFilters(@AutoSize("filters") @ALsizei int n, @OutParameter @ALuint IntBuffer filters); + + @Alternate(value = "alGenFilters", nativeAlt = true) + @ALvoid + void alGenFilters2(@Constant("1") @ALsizei int n, @Result @ALuint int filter); + + @ALvoid + void alDeleteFilters(@AutoSize("filters") @ALsizei int n, @OutParameter @ALuint IntBuffer filters); + + @Alternate(value = "alDeleteFilters", nativeAlt = true) + @ALvoid + void alDeleteFilters2(@Constant("1") @ALsizei int n, @Indirect @ALuint int filter); + + boolean alIsFilter(@ALuint int filter); + + @ALvoid + void alFilteri(@ALuint int filter, @ALenum int param, int value); + + @StripPostfix("values") + @ALvoid + void alFilteriv(@ALuint int filter, @ALenum int param, @Check("1") @Const IntBuffer values); + + @ALvoid + void alFilterf(@ALuint int filter, @ALenum int param, float value); + + @StripPostfix("values") + @ALvoid + void alFilterfv(@ALuint int filter, @ALenum int param, @Check("1") @Const FloatBuffer values); + + @ALvoid + void alGetFilteri(@ALuint int filter, @ALenum int param, @Result int value); + + @StripPostfix("intdata") + @ALvoid + void alGetFilteriv(@ALuint int filter, @ALenum int param, @OutParameter @Check("1") IntBuffer intdata); + + @ALvoid + void alGetFilterf(@ALuint int filter, @ALenum int param, @Result float value); + + @StripPostfix("floatdata") + @ALvoid + void alGetFilterfv(@ALuint int filter, @ALenum int param, @OutParameter @Check("1") FloatBuffer floatdata); + + // Source property value ranges and defaults + float AL_MIN_AIR_ABSORPTION_FACTOR = 0.0f; + float AL_MAX_AIR_ABSORPTION_FACTOR = 10.0f; + float AL_DEFAULT_AIR_ABSORPTION_FACTOR = 0.0f; + float AL_MIN_ROOM_ROLLOFF_FACTOR = 0.0f; + float AL_MAX_ROOM_ROLLOFF_FACTOR = 10.0f; + float AL_DEFAULT_ROOM_ROLLOFF_FACTOR = 0.0f; + float AL_MIN_CONE_OUTER_GAINHF = 0.0f; + float AL_MAX_CONE_OUTER_GAINHF = 1.0f; + float AL_DEFAULT_CONE_OUTER_GAINHF = 1.0f; + int AL_MIN_DIRECT_FILTER_GAINHF_AUTO = AL10.AL_FALSE; + int AL_MAX_DIRECT_FILTER_GAINHF_AUTO = AL10.AL_TRUE; + int AL_DEFAULT_DIRECT_FILTER_GAINHF_AUTO = AL10.AL_TRUE; + int AL_MIN_AUXILIARY_SEND_FILTER_GAIN_AUTO = AL10.AL_FALSE; + int AL_MAX_AUXILIARY_SEND_FILTER_GAIN_AUTO = AL10.AL_TRUE; + int AL_DEFAULT_AUXILIARY_SEND_FILTER_GAIN_AUTO = AL10.AL_TRUE; + int AL_MIN_AUXILIARY_SEND_FILTER_GAINHF_AUTO = AL10.AL_FALSE; + int AL_MAX_AUXILIARY_SEND_FILTER_GAINHF_AUTO = AL10.AL_TRUE; + int AL_DEFAULT_AUXILIARY_SEND_FILTER_GAINHF_AUTO = AL10.AL_TRUE; + + // Listener property value ranges and defaults + float AL_MIN_METERS_PER_UNIT = Float.MIN_VALUE; + float AL_MAX_METERS_PER_UNIT = Float.MAX_VALUE; + float AL_DEFAULT_METERS_PER_UNIT = 1.0f; + + // Effect parameter ranges and defaults + // Reverb + float AL_REVERB_MIN_DENSITY = 0.0f; + float AL_REVERB_MAX_DENSITY = 1.0f; + float AL_REVERB_DEFAULT_DENSITY = 1.0f; + float AL_REVERB_MIN_DIFFUSION = 0.0f; + float AL_REVERB_MAX_DIFFUSION = 1.0f; + float AL_REVERB_DEFAULT_DIFFUSION = 1.0f; + float AL_REVERB_MIN_GAIN = 0.0f; + float AL_REVERB_MAX_GAIN = 1.0f; + float AL_REVERB_DEFAULT_GAIN = 0.32f; + float AL_REVERB_MIN_GAINHF = 0.0f; + float AL_REVERB_MAX_GAINHF = 1.0f; + float AL_REVERB_DEFAULT_GAINHF = 0.89f; + float AL_REVERB_MIN_DECAY_TIME = 0.1f; + float AL_REVERB_MAX_DECAY_TIME = 20.0f; + float AL_REVERB_DEFAULT_DECAY_TIME = 1.49f; + float AL_REVERB_MIN_DECAY_HFRATIO = 0.1f; + float AL_REVERB_MAX_DECAY_HFRATIO = 2.0f; + float AL_REVERB_DEFAULT_DECAY_HFRATIO = 0.83f; + float AL_REVERB_MIN_REFLECTIONS_GAIN = 0.0f; + float AL_REVERB_MAX_REFLECTIONS_GAIN = 3.16f; + float AL_REVERB_DEFAULT_REFLECTIONS_GAIN = 0.05f; + float AL_REVERB_MIN_REFLECTIONS_DELAY = 0.0f; + float AL_REVERB_MAX_REFLECTIONS_DELAY = 0.3f; + float AL_REVERB_DEFAULT_REFLECTIONS_DELAY = 0.007f; + float AL_REVERB_MIN_LATE_REVERB_GAIN = 0.0f; + float AL_REVERB_MAX_LATE_REVERB_GAIN = 10.0f; + float AL_REVERB_DEFAULT_LATE_REVERB_GAIN = 1.26f; + float AL_REVERB_MIN_LATE_REVERB_DELAY = 0.0f; + float AL_REVERB_MAX_LATE_REVERB_DELAY = 0.1f; + float AL_REVERB_DEFAULT_LATE_REVERB_DELAY = 0.011f; + float AL_REVERB_MIN_AIR_ABSORPTION_GAINHF = 0.892f; + float AL_REVERB_MAX_AIR_ABSORPTION_GAINHF = 1.0f; + float AL_REVERB_DEFAULT_AIR_ABSORPTION_GAINHF = 0.994f; + float AL_REVERB_MIN_ROOM_ROLLOFF_FACTOR = 0.0f; + float AL_REVERB_MAX_ROOM_ROLLOFF_FACTOR = 10.0f; + float AL_REVERB_DEFAULT_ROOM_ROLLOFF_FACTOR = 0.0f; + int AL_REVERB_MIN_DECAY_HFLIMIT = AL10.AL_FALSE; + int AL_REVERB_MAX_DECAY_HFLIMIT = AL10.AL_TRUE; + int AL_REVERB_DEFAULT_DECAY_HFLIMIT = AL10.AL_TRUE; + // EAX reverb + float AL_EAXREVERB_MIN_DENSITY = 0.0f; + float AL_EAXREVERB_MAX_DENSITY = 1.0f; + float AL_EAXREVERB_DEFAULT_DENSITY = 1.0f; + float AL_EAXREVERB_MIN_DIFFUSION = 0.0f; + float AL_EAXREVERB_MAX_DIFFUSION = 1.0f; + float AL_EAXREVERB_DEFAULT_DIFFUSION = 1.0f; + float AL_EAXREVERB_MIN_GAIN = 0.0f; + float AL_EAXREVERB_MAX_GAIN = 1.0f; + float AL_EAXREVERB_DEFAULT_GAIN = 0.32f; + float AL_EAXREVERB_MIN_GAINHF = 0.0f; + float AL_EAXREVERB_MAX_GAINHF = 1.0f; + float AL_EAXREVERB_DEFAULT_GAINHF = 0.89f; + float AL_EAXREVERB_MIN_GAINLF = 0.0f; + float AL_EAXREVERB_MAX_GAINLF = 1.0f; + float AL_EAXREVERB_DEFAULT_GAINLF = 1.0f; + float AL_EAXREVERB_MIN_DECAY_TIME = 0.1f; + float AL_EAXREVERB_MAX_DECAY_TIME = 20.0f; + float AL_EAXREVERB_DEFAULT_DECAY_TIME = 1.49f; + float AL_EAXREVERB_MIN_DECAY_HFRATIO = 0.1f; + float AL_EAXREVERB_MAX_DECAY_HFRATIO = 2.0f; + float AL_EAXREVERB_DEFAULT_DECAY_HFRATIO = 0.83f; + float AL_EAXREVERB_MIN_DECAY_LFRATIO = 0.1f; + float AL_EAXREVERB_MAX_DECAY_LFRATIO = 2.0f; + float AL_EAXREVERB_DEFAULT_DECAY_LFRATIO = 1.0f; + float AL_EAXREVERB_MIN_REFLECTIONS_GAIN = 0.0f; + float AL_EAXREVERB_MAX_REFLECTIONS_GAIN = 3.16f; + float AL_EAXREVERB_DEFAULT_REFLECTIONS_GAIN = 0.05f; + float AL_EAXREVERB_MIN_REFLECTIONS_DELAY = 0.0f; + float AL_EAXREVERB_MAX_REFLECTIONS_DELAY = 0.3f; + float AL_EAXREVERB_DEFAULT_REFLECTIONS_DELAY = 0.007f; + float AL_EAXREVERB_DEFAULT_REFLECTIONS_PAN_XYZ = 0.0f; + float AL_EAXREVERB_MIN_LATE_REVERB_GAIN = 0.0f; + float AL_EAXREVERB_MAX_LATE_REVERB_GAIN = 10.0f; + float AL_EAXREVERB_DEFAULT_LATE_REVERB_GAIN = 1.26f; + float AL_EAXREVERB_MIN_LATE_REVERB_DELAY = 0.0f; + float AL_EAXREVERB_MAX_LATE_REVERB_DELAY = 0.1f; + float AL_EAXREVERB_DEFAULT_LATE_REVERB_DELAY = 0.011f; + float AL_EAXREVERB_DEFAULT_LATE_REVERB_PAN_XYZ = 0.0f; + float AL_EAXREVERB_MIN_ECHO_TIME = 0.075f; + float AL_EAXREVERB_MAX_ECHO_TIME = 0.25f; + float AL_EAXREVERB_DEFAULT_ECHO_TIME = 0.25f; + float AL_EAXREVERB_MIN_ECHO_DEPTH = 0.0f; + float AL_EAXREVERB_MAX_ECHO_DEPTH = 1.0f; + float AL_EAXREVERB_DEFAULT_ECHO_DEPTH = 0.0f; + float AL_EAXREVERB_MIN_MODULATION_TIME = 0.04f; + float AL_EAXREVERB_MAX_MODULATION_TIME = 4.0f; + float AL_EAXREVERB_DEFAULT_MODULATION_TIME = 0.25f; + float AL_EAXREVERB_MIN_MODULATION_DEPTH = 0.0f; + float AL_EAXREVERB_MAX_MODULATION_DEPTH = 1.0f; + float AL_EAXREVERB_DEFAULT_MODULATION_DEPTH = 0.0f; + float AL_EAXREVERB_MIN_AIR_ABSORPTION_GAINHF = 0.892f; + float AL_EAXREVERB_MAX_AIR_ABSORPTION_GAINHF = 1.0f; + float AL_EAXREVERB_DEFAULT_AIR_ABSORPTION_GAINHF = 0.994f; + float AL_EAXREVERB_MIN_HFREFERENCE = 1000.0f; + float AL_EAXREVERB_MAX_HFREFERENCE = 20000.0f; + float AL_EAXREVERB_DEFAULT_HFREFERENCE = 5000.0f; + float AL_EAXREVERB_MIN_LFREFERENCE = 20.0f; + float AL_EAXREVERB_MAX_LFREFERENCE = 1000.0f; + float AL_EAXREVERB_DEFAULT_LFREFERENCE = 250.0f; + float AL_EAXREVERB_MIN_ROOM_ROLLOFF_FACTOR = 0.0f; + float AL_EAXREVERB_MAX_ROOM_ROLLOFF_FACTOR = 10.0f; + float AL_EAXREVERB_DEFAULT_ROOM_ROLLOFF_FACTOR = 0.0f; + int AL_EAXREVERB_MIN_DECAY_HFLIMIT = AL10.AL_FALSE; + int AL_EAXREVERB_MAX_DECAY_HFLIMIT = AL10.AL_TRUE; + int AL_EAXREVERB_DEFAULT_DECAY_HFLIMIT = AL10.AL_TRUE; + // Chorus + int AL_CHORUS_WAVEFORM_SINUSOID = 0; + int AL_CHORUS_WAVEFORM_TRIANGLE = 1; + int AL_CHORUS_MIN_WAVEFORM = 0; + int AL_CHORUS_MAX_WAVEFORM = 1; + int AL_CHORUS_DEFAULT_WAVEFORM = 1; + int AL_CHORUS_MIN_PHASE = -180; + int AL_CHORUS_MAX_PHASE = 180; + int AL_CHORUS_DEFAULT_PHASE = 90; + float AL_CHORUS_MIN_RATE = 0.0f; + float AL_CHORUS_MAX_RATE = 10.0f; + float AL_CHORUS_DEFAULT_RATE = 1.1f; + float AL_CHORUS_MIN_DEPTH = 0.0f; + float AL_CHORUS_MAX_DEPTH = 1.0f; + float AL_CHORUS_DEFAULT_DEPTH = 0.1f; + float AL_CHORUS_MIN_FEEDBACK = -1.0f; + float AL_CHORUS_MAX_FEEDBACK = 1.0f; + float AL_CHORUS_DEFAULT_FEEDBACK = 0.25f; + float AL_CHORUS_MIN_DELAY = 0.0f; + float AL_CHORUS_MAX_DELAY = 0.016f; + float AL_CHORUS_DEFAULT_DELAY = 0.016f; + // Distortion + float AL_DISTORTION_MIN_EDGE = 0.0f; + float AL_DISTORTION_MAX_EDGE = 1.0f; + float AL_DISTORTION_DEFAULT_EDGE = 0.2f; + float AL_DISTORTION_MIN_GAIN = 0.01f; + float AL_DISTORTION_MAX_GAIN = 1.0f; + float AL_DISTORTION_DEFAULT_GAIN = 0.05f; + float AL_DISTORTION_MIN_LOWPASS_CUTOFF = 80.0f; + float AL_DISTORTION_MAX_LOWPASS_CUTOFF = 24000.0f; + float AL_DISTORTION_DEFAULT_LOWPASS_CUTOFF = 8000.0f; + float AL_DISTORTION_MIN_EQCENTER = 80.0f; + float AL_DISTORTION_MAX_EQCENTER = 24000.0f; + float AL_DISTORTION_DEFAULT_EQCENTER = 3600.0f; + float AL_DISTORTION_MIN_EQBANDWIDTH = 80.0f; + float AL_DISTORTION_MAX_EQBANDWIDTH = 24000.0f; + float AL_DISTORTION_DEFAULT_EQBANDWIDTH = 3600.0f; + // Echo + float AL_ECHO_MIN_DELAY = 0.0f; + float AL_ECHO_MAX_DELAY = 0.207f; + float AL_ECHO_DEFAULT_DELAY = 0.1f; + float AL_ECHO_MIN_LRDELAY = 0.0f; + float AL_ECHO_MAX_LRDELAY = 0.404f; + float AL_ECHO_DEFAULT_LRDELAY = 0.1f; + float AL_ECHO_MIN_DAMPING = 0.0f; + float AL_ECHO_MAX_DAMPING = 0.99f; + float AL_ECHO_DEFAULT_DAMPING = 0.5f; + float AL_ECHO_MIN_FEEDBACK = 0.0f; + float AL_ECHO_MAX_FEEDBACK = 1.0f; + float AL_ECHO_DEFAULT_FEEDBACK = 0.5f; + float AL_ECHO_MIN_SPREAD = -1.0f; + float AL_ECHO_MAX_SPREAD = 1.0f; + float AL_ECHO_DEFAULT_SPREAD = -1.0f; + // Flanger + int AL_FLANGER_WAVEFORM_SINUSOID = 0; + int AL_FLANGER_WAVEFORM_TRIANGLE = 1; + int AL_FLANGER_MIN_WAVEFORM = 0; + int AL_FLANGER_MAX_WAVEFORM = 1; + int AL_FLANGER_DEFAULT_WAVEFORM = 1; + int AL_FLANGER_MIN_PHASE = -180; + int AL_FLANGER_MAX_PHASE = 180; + int AL_FLANGER_DEFAULT_PHASE = 0; + float AL_FLANGER_MIN_RATE = 0.0f; + float AL_FLANGER_MAX_RATE = 10.0f; + float AL_FLANGER_DEFAULT_RATE = 0.27f; + float AL_FLANGER_MIN_DEPTH = 0.0f; + float AL_FLANGER_MAX_DEPTH = 1.0f; + float AL_FLANGER_DEFAULT_DEPTH = 1.0f; + float AL_FLANGER_MIN_FEEDBACK = -1.0f; + float AL_FLANGER_MAX_FEEDBACK = 1.0f; + float AL_FLANGER_DEFAULT_FEEDBACK = -0.5f; + float AL_FLANGER_MIN_DELAY = 0.0f; + float AL_FLANGER_MAX_DELAY = 0.004f; + float AL_FLANGER_DEFAULT_DELAY = 0.002f; + // Frequency shifter + float AL_FREQUENCY_SHIFTER_MIN_FREQUENCY = 0.0f; + float AL_FREQUENCY_SHIFTER_MAX_FREQUENCY = 24000.0f; + float AL_FREQUENCY_SHIFTER_DEFAULT_FREQUENCY = 0.0f; + int AL_FREQUENCY_SHIFTER_MIN_LEFT_DIRECTION = 0; + int AL_FREQUENCY_SHIFTER_MAX_LEFT_DIRECTION = 2; + int AL_FREQUENCY_SHIFTER_DEFAULT_LEFT_DIRECTION = 0; + int AL_FREQUENCY_SHIFTER_DIRECTION_DOWN = 0; + int AL_FREQUENCY_SHIFTER_DIRECTION_UP = 1; + int AL_FREQUENCY_SHIFTER_DIRECTION_OFF = 2; + int AL_FREQUENCY_SHIFTER_MIN_RIGHT_DIRECTION = 0; + int AL_FREQUENCY_SHIFTER_MAX_RIGHT_DIRECTION = 2; + int AL_FREQUENCY_SHIFTER_DEFAULT_RIGHT_DIRECTION = 0; + // Vocal morpher + int AL_VOCAL_MORPHER_MIN_PHONEMEA = 0; + int AL_VOCAL_MORPHER_MAX_PHONEMEA = 29; + int AL_VOCAL_MORPHER_DEFAULT_PHONEMEA = 0; + int AL_VOCAL_MORPHER_MIN_PHONEMEA_COARSE_TUNING = -24; + int AL_VOCAL_MORPHER_MAX_PHONEMEA_COARSE_TUNING = 24; + int AL_VOCAL_MORPHER_DEFAULT_PHONEMEA_COARSE_TUNING = 0; + int AL_VOCAL_MORPHER_MIN_PHONEMEB = 0; + int AL_VOCAL_MORPHER_MAX_PHONEMEB = 29; + int AL_VOCAL_MORPHER_DEFAULT_PHONEMEB = 10; + int AL_VOCAL_MORPHER_MIN_PHONEMEB_COARSE_TUNING = -24; + int AL_VOCAL_MORPHER_MAX_PHONEMEB_COARSE_TUNING = 24; + int AL_VOCAL_MORPHER_DEFAULT_PHONEMEB_COARSE_TUNING = 0; + int AL_VOCAL_MORPHER_PHONEME_A = 0; + int AL_VOCAL_MORPHER_PHONEME_E = 1; + int AL_VOCAL_MORPHER_PHONEME_I = 2; + int AL_VOCAL_MORPHER_PHONEME_O = 3; + int AL_VOCAL_MORPHER_PHONEME_U = 4; + int AL_VOCAL_MORPHER_PHONEME_AA = 5; + int AL_VOCAL_MORPHER_PHONEME_AE = 6; + int AL_VOCAL_MORPHER_PHONEME_AH = 7; + int AL_VOCAL_MORPHER_PHONEME_AO = 8; + int AL_VOCAL_MORPHER_PHONEME_EH = 9; + int AL_VOCAL_MORPHER_PHONEME_ER = 10; + int AL_VOCAL_MORPHER_PHONEME_IH = 11; + int AL_VOCAL_MORPHER_PHONEME_IY = 12; + int AL_VOCAL_MORPHER_PHONEME_UH = 13; + int AL_VOCAL_MORPHER_PHONEME_UW = 14; + int AL_VOCAL_MORPHER_PHONEME_B = 15; + int AL_VOCAL_MORPHER_PHONEME_D = 16; + int AL_VOCAL_MORPHER_PHONEME_F = 17; + int AL_VOCAL_MORPHER_PHONEME_G = 18; + int AL_VOCAL_MORPHER_PHONEME_J = 19; + int AL_VOCAL_MORPHER_PHONEME_K = 20; + int AL_VOCAL_MORPHER_PHONEME_L = 21; + int AL_VOCAL_MORPHER_PHONEME_M = 22; + int AL_VOCAL_MORPHER_PHONEME_N = 23; + int AL_VOCAL_MORPHER_PHONEME_P = 24; + int AL_VOCAL_MORPHER_PHONEME_R = 25; + int AL_VOCAL_MORPHER_PHONEME_S = 26; + int AL_VOCAL_MORPHER_PHONEME_T = 27; + int AL_VOCAL_MORPHER_PHONEME_V = 28; + int AL_VOCAL_MORPHER_PHONEME_Z = 29; + int AL_VOCAL_MORPHER_WAVEFORM_SINUSOID = 0; + int AL_VOCAL_MORPHER_WAVEFORM_TRIANGLE = 1; + int AL_VOCAL_MORPHER_WAVEFORM_SAWTOOTH = 2; + int AL_VOCAL_MORPHER_MIN_WAVEFORM = 0; + int AL_VOCAL_MORPHER_MAX_WAVEFORM = 2; + int AL_VOCAL_MORPHER_DEFAULT_WAVEFORM = 0; + float AL_VOCAL_MORPHER_MIN_RATE = 0.0f; + float AL_VOCAL_MORPHER_MAX_RATE = 10.0f; + float AL_VOCAL_MORPHER_DEFAULT_RATE = 1.41f; + // Pitch shifter + int AL_PITCH_SHIFTER_MIN_COARSE_TUNE = -12; + int AL_PITCH_SHIFTER_MAX_COARSE_TUNE = 12; + int AL_PITCH_SHIFTER_DEFAULT_COARSE_TUNE = 12; + int AL_PITCH_SHIFTER_MIN_FINE_TUNE = -50; + int AL_PITCH_SHIFTER_MAX_FINE_TUNE = 50; + int AL_PITCH_SHIFTER_DEFAULT_FINE_TUNE = 0; + // Ring modulator + float AL_RING_MODULATOR_MIN_FREQUENCY = 0.0f; + float AL_RING_MODULATOR_MAX_FREQUENCY = 8000.0f; + float AL_RING_MODULATOR_DEFAULT_FREQUENCY = 440.0f; + float AL_RING_MODULATOR_MIN_HIGHPASS_CUTOFF = 0.0f; + float AL_RING_MODULATOR_MAX_HIGHPASS_CUTOFF = 24000.0f; + float AL_RING_MODULATOR_DEFAULT_HIGHPASS_CUTOFF = 800.0f; + int AL_RING_MODULATOR_SINUSOID = 0; + int AL_RING_MODULATOR_SAWTOOTH = 1; + int AL_RING_MODULATOR_SQUARE = 2; + int AL_RING_MODULATOR_MIN_WAVEFORM = 0; + int AL_RING_MODULATOR_MAX_WAVEFORM = 2; + int AL_RING_MODULATOR_DEFAULT_WAVEFORM = 0; + // Autowah + float AL_AUTOWAH_MIN_ATTACK_TIME = 0.0001f; + float AL_AUTOWAH_MAX_ATTACK_TIME = 1.0f; + float AL_AUTOWAH_DEFAULT_ATTACK_TIME = 0.06f; + float AL_AUTOWAH_MIN_RELEASE_TIME = 0.0001f; + float AL_AUTOWAH_MAX_RELEASE_TIME = 1.0f; + float AL_AUTOWAH_DEFAULT_RELEASE_TIME = 0.06f; + float AL_AUTOWAH_MIN_RESONANCE = 2.0f; + float AL_AUTOWAH_MAX_RESONANCE = 1000.0f; + float AL_AUTOWAH_DEFAULT_RESONANCE = 1000.0f; + float AL_AUTOWAH_MIN_PEAK_GAIN = 0.00003f; + float AL_AUTOWAH_MAX_PEAK_GAIN = 31621.0f; + float AL_AUTOWAH_DEFAULT_PEAK_GAIN = 11.22f; + // Compressor + int AL_COMPRESSOR_MIN_ONOFF = 0; + int AL_COMPRESSOR_MAX_ONOFF = 1; + int AL_COMPRESSOR_DEFAULT_ONOFF = 1; + // Equalizer + float AL_EQUALIZER_MIN_LOW_GAIN = 0.126f; + float AL_EQUALIZER_MAX_LOW_GAIN = 7.943f; + float AL_EQUALIZER_DEFAULT_LOW_GAIN = 1.0f; + float AL_EQUALIZER_MIN_LOW_CUTOFF = 50.0f; + float AL_EQUALIZER_MAX_LOW_CUTOFF = 800.0f; + float AL_EQUALIZER_DEFAULT_LOW_CUTOFF = 200.0f; + float AL_EQUALIZER_MIN_MID1_GAIN = 0.126f; + float AL_EQUALIZER_MAX_MID1_GAIN = 7.943f; + float AL_EQUALIZER_DEFAULT_MID1_GAIN = 1.0f; + float AL_EQUALIZER_MIN_MID1_CENTER = 200.0f; + float AL_EQUALIZER_MAX_MID1_CENTER = 3000.0f; + float AL_EQUALIZER_DEFAULT_MID1_CENTER = 500.0f; + float AL_EQUALIZER_MIN_MID1_WIDTH = 0.01f; + float AL_EQUALIZER_MAX_MID1_WIDTH = 1.0f; + float AL_EQUALIZER_DEFAULT_MID1_WIDTH = 1.0f; + float AL_EQUALIZER_MIN_MID2_GAIN = 0.126f; + float AL_EQUALIZER_MAX_MID2_GAIN = 7.943f; + float AL_EQUALIZER_DEFAULT_MID2_GAIN = 1.0f; + float AL_EQUALIZER_MIN_MID2_CENTER = 1000.0f; + float AL_EQUALIZER_MAX_MID2_CENTER = 8000.0f; + float AL_EQUALIZER_DEFAULT_MID2_CENTER = 3000.0f; + float AL_EQUALIZER_MIN_MID2_WIDTH = 0.01f; + float AL_EQUALIZER_MAX_MID2_WIDTH = 1.0f; + float AL_EQUALIZER_DEFAULT_MID2_WIDTH = 1.0f; + float AL_EQUALIZER_MIN_HIGH_GAIN = 0.126f; + float AL_EQUALIZER_MAX_HIGH_GAIN = 7.943f; + float AL_EQUALIZER_DEFAULT_HIGH_GAIN = 1.0f; + float AL_EQUALIZER_MIN_HIGH_CUTOFF = 4000.0f; + float AL_EQUALIZER_MAX_HIGH_CUTOFF = 16000.0f; + float AL_EQUALIZER_DEFAULT_HIGH_CUTOFF = 6000.0f; + + // Filter parameter ranges and defaults + // Lowpass + float LOWPASS_MIN_GAIN = 0.0f; + float LOWPASS_MAX_GAIN = 1.0f; + float LOWPASS_DEFAULT_GAIN = 1.0f; + float LOWPASS_MIN_GAINHF = 0.0f; + float LOWPASS_MAX_GAINHF = 1.0f; + float LOWPASS_DEFAULT_GAINHF = 1.0f; + // Highpass + float HIGHPASS_MIN_GAIN = 0.0f; + float HIGHPASS_MAX_GAIN = 1.0f; + float HIGHPASS_DEFAULT_GAIN = 1.0f; + float HIGHPASS_MIN_GAINLF = 0.0f; + float HIGHPASS_MAX_GAINLF = 1.0f; + float HIGHPASS_DEFAULT_GAINLF = 1.0f; + // Bandpass + float BANDPASS_MIN_GAIN = 0.0f; + float BANDPASS_MAX_GAIN = 1.0f; + float BANDPASS_DEFAULT_GAIN = 1.0f; + float BANDPASS_MIN_GAINHF = 0.0f; + float BANDPASS_MAX_GAINHF = 1.0f; + float BANDPASS_DEFAULT_GAINHF = 1.0f; + float BANDPASS_MIN_GAINLF = 0.0f; + float BANDPASS_MAX_GAINLF = 1.0f; + float BANDPASS_DEFAULT_GAINLF = 1.0f; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/AMD_device_attribute_query.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/AMD_device_attribute_query.java new file mode 100644 index 0000000..78bd3a8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/AMD_device_attribute_query.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface AMD_device_attribute_query { + + /** + * Accepted as the <param_name> parameter of clGetDeviceInfo. Return the + * offset in nano-seconds between an event timestamp and Epoch. + */ + int CL_DEVICE_PROFILING_TIMER_OFFSET_AMD = 0x4036; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/AMD_device_memory_flags.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/AMD_device_memory_flags.java new file mode 100644 index 0000000..91a7d5f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/AMD_device_memory_flags.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface AMD_device_memory_flags { + + /** Alloc from GPU's CPU visible heap. */ + int CL_MEM_USE_PERSISTENT_MEM_AMD = (1 << 6); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/AMD_fp64.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/AMD_fp64.java new file mode 100644 index 0000000..cc0c287 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/AMD_fp64.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface AMD_fp64 { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/AMD_media_ops.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/AMD_media_ops.java new file mode 100644 index 0000000..1efa22e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/AMD_media_ops.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface AMD_media_ops { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/AMD_media_ops2.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/AMD_media_ops2.java new file mode 100644 index 0000000..a2fbd0a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/AMD_media_ops2.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface AMD_media_ops2 { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/AMD_offline_devices.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/AMD_offline_devices.java new file mode 100644 index 0000000..41db2a9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/AMD_offline_devices.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface AMD_offline_devices { + + int CL_CONTEXT_OFFLINE_DEVICES_AMD = 0x403F; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/AMD_popcnt.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/AMD_popcnt.java new file mode 100644 index 0000000..4fd0696 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/AMD_popcnt.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface AMD_popcnt { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/AMD_printf.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/AMD_printf.java new file mode 100644 index 0000000..a992531 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/AMD_printf.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface AMD_printf { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/AMD_vec3.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/AMD_vec3.java new file mode 100644 index 0000000..eac6417 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/AMD_vec3.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface AMD_vec3 { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/APPLE_ContextLoggingFunctions.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/APPLE_ContextLoggingFunctions.java new file mode 100644 index 0000000..150d9e4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/APPLE_ContextLoggingFunctions.java @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opencl.*; + +import java.nio.ByteBuffer; + +@Private +@CLPlatformExtension +@CLDeviceExtension +public interface APPLE_ContextLoggingFunctions { + + @Extern + void clLogMessagesToSystemLogAPPLE(@Check @Const @cl_char ByteBuffer errstr, + @Const @cl_void ByteBuffer private_info, + @AutoSize("private_info") @size_t long cb, + @Check @cl_void ByteBuffer user_data); + + @Extern + void clLogMessagesToStdoutAPPLE(@Check @Const @cl_char ByteBuffer errstr, + @Const @cl_void ByteBuffer private_info, + @AutoSize("private_info") @size_t long cb, + @Check @cl_void ByteBuffer user_data); + + @Extern + void clLogMessagesToStderrAPPLE(@Check @Const @cl_char ByteBuffer errstr, + @Const @cl_void ByteBuffer private_info, + @AutoSize("private_info") @size_t long cb, + @Check @cl_void ByteBuffer user_data); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/APPLE_SetMemObjectDestructor.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/APPLE_SetMemObjectDestructor.java new file mode 100644 index 0000000..7004569 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/APPLE_SetMemObjectDestructor.java @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.Code; +import org.lwjgl.util.generator.Constant; +import org.lwjgl.util.generator.PointerWrapper; +import org.lwjgl.util.generator.opencl.CLDeviceExtension; +import org.lwjgl.util.generator.opencl.CLPlatformExtension; +import org.lwjgl.util.generator.opencl.cl_int; + +@CLPlatformExtension +@CLDeviceExtension +public interface APPLE_SetMemObjectDestructor { + + @Code( + tryBlock = true, + // Create a GlobalRef to the callback object. + javaBeforeNative = "\t\tlong user_data = CallbackUtil.createGlobalRef(pfn_notify);", + // Check if we need to delete the GlobalRef. + javaFinally = "\t\t\tCallbackUtil.checkCallback(__result, user_data);" + ) + @cl_int + int clSetMemObjectDestructorAPPLE(@PointerWrapper("cl_mem") CLMem memobj, + @PointerWrapper("cl_mem_object_destructor_callback") CLMemObjectDestructorCallback pfn_notify, + @Constant("user_data") @PointerWrapper("void *") long user_data); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/APPLE_gl_sharing.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/APPLE_gl_sharing.java new file mode 100644 index 0000000..c964e68 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/APPLE_gl_sharing.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.PointerBuffer; +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opencl.*; + +import java.nio.ByteBuffer; + +@CLPlatformExtension +@CLDeviceExtension +@Extension(postfix = "APPLE", className = "APPLEGLSharing") +public interface APPLE_gl_sharing { + + /** + * This enumerated value can be specified as part of the <properties> argument passed to clCreateContext + * to allow OpenCL compliant devices in an existing CGL share group to be used as the devices in + * the newly created CL context. GL objects that were allocated in the given CGL share group can + * now be shared between CL and GL. + */ + int CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE = 0x10000000; + + /** + * Returns a cl_device_id for the CL device associated with the virtual screen for + * the given CGL context. Return type: cl_device_id + */ + int CL_CGL_DEVICE_FOR_CURRENT_VIRTUAL_SCREEN_APPLE = 0x10000002; + + /** + * Returns an array of cl_device_ids for the CL device(s) corresponding to + * the virtual screen(s) for the given CGL context. Return type: cl_device_id[] + */ + int CL_CGL_DEVICES_FOR_SUPPORTED_VIRTUAL_SCREENS_APPLE = 0x10000003; + + /** Error code returned by clGetGLContextInfoAPPLE if an invalid platform_gl_ctx is provided */ + int CL_INVALID_GL_CONTEXT_APPLE = -1000; + + @Code( + javaBeforeNative = "\t\tif ( param_value_size_ret == null && APIUtil.isDevicesParam(param_name) ) param_value_size_ret = APIUtil.getBufferPointer();", + javaAfterNative = "\t\tif ( __result == CL10.CL_SUCCESS && param_value != null && APIUtil.isDevicesParam(param_name) ) context.getParent().registerCLDevices(param_value, param_value_size_ret);" + ) + @cl_int + int clGetGLContextInfoAPPLE(@PointerWrapper("cl_context") CLContext context, + @Check("1") @NativeType("cl_void") PointerBuffer platform_gl_ctx, + @NativeType("cl_gl_platform_info") int param_name, + @AutoSize(value = "param_value", canBeNull = true) @size_t long param_value_size, + @OutParameter @Check(canBeNull = true) @cl_void ByteBuffer param_value, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("size_t") PointerBuffer param_value_size_ret); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/CL10.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/CL10.java new file mode 100644 index 0000000..b2395b2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/CL10.java @@ -0,0 +1,1161 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.PointerBuffer; +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opencl.*; + +import java.nio.Buffer; +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +/** The core OpenCL 1.0 API */ +public interface CL10 { + + /** Error Codes */ + int CL_SUCCESS = 0, + CL_DEVICE_NOT_FOUND = -1, + CL_DEVICE_NOT_AVAILABLE = -2, + CL_COMPILER_NOT_AVAILABLE = -3, + CL_MEM_OBJECT_ALLOCATION_FAILURE = -4, + CL_OUT_OF_RESOURCES = -5, + CL_OUT_OF_HOST_MEMORY = -6, + CL_PROFILING_INFO_NOT_AVAILABLE = -7, + CL_MEM_COPY_OVERLAP = -8, + CL_IMAGE_FORMAT_MISMATCH = -9, + CL_IMAGE_FORMAT_NOT_SUPPORTED = -10, + CL_BUILD_PROGRAM_FAILURE = -11, + CL_MAP_FAILURE = -12, + + CL_INVALID_VALUE = -30, + CL_INVALID_DEVICE_TYPE = -31, + CL_INVALID_PLATFORM = -32, + CL_INVALID_DEVICE = -33, + CL_INVALID_CONTEXT = -34, + CL_INVALID_QUEUE_PROPERTIES = -35, + CL_INVALID_COMMAND_QUEUE = -36, + CL_INVALID_HOST_PTR = -37, + CL_INVALID_MEM_OBJECT = -38, + CL_INVALID_IMAGE_FORMAT_DESCRIPTOR = -39, + CL_INVALID_IMAGE_SIZE = -40, + CL_INVALID_SAMPLER = -41, + CL_INVALID_BINARY = -42, + CL_INVALID_BUILD_OPTIONS = -43, + CL_INVALID_PROGRAM = -44, + CL_INVALID_PROGRAM_EXECUTABLE = -45, + CL_INVALID_KERNEL_NAME = -46, + CL_INVALID_KERNEL_DEFINITION = -47, + CL_INVALID_KERNEL = -48, + CL_INVALID_ARG_INDEX = -49, + CL_INVALID_ARG_VALUE = -50, + CL_INVALID_ARG_SIZE = -51, + CL_INVALID_KERNEL_ARGS = -52, + CL_INVALID_WORK_DIMENSION = -53, + CL_INVALID_WORK_GROUP_SIZE = -54, + CL_INVALID_WORK_ITEM_SIZE = -55, + CL_INVALID_GLOBAL_OFFSET = -56, + CL_INVALID_EVENT_WAIT_LIST = -57, + CL_INVALID_EVENT = -58, + CL_INVALID_OPERATION = -59, + CL_INVALID_GL_OBJECT = -60, + CL_INVALID_BUFFER_SIZE = -61, + CL_INVALID_MIP_LEVEL = -62, + CL_INVALID_GLOBAL_WORK_SIZE = -63; + + /** OpenCL Version */ + int CL_VERSION_1_0 = 1; + + /** cl_bool */ + int CL_FALSE = 0, + CL_TRUE = 1; + + /** cl_platform_info */ + int CL_PLATFORM_PROFILE = 0x0900, + CL_PLATFORM_VERSION = 0x0901, + CL_PLATFORM_NAME = 0x0902, + CL_PLATFORM_VENDOR = 0x0903, + CL_PLATFORM_EXTENSIONS = 0x0904; + + /** cl_device_type - bitfield */ + int CL_DEVICE_TYPE_DEFAULT = (1 << 0), + CL_DEVICE_TYPE_CPU = (1 << 1), + CL_DEVICE_TYPE_GPU = (1 << 2), + CL_DEVICE_TYPE_ACCELERATOR = (1 << 3), + CL_DEVICE_TYPE_ALL = 0xFFFFFFFF; + + /** cl_device_info */ + int CL_DEVICE_TYPE = 0x1000, + CL_DEVICE_VENDOR_ID = 0x1001, + CL_DEVICE_MAX_COMPUTE_UNITS = 0x1002, + CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS = 0x1003, + CL_DEVICE_MAX_WORK_GROUP_SIZE = 0x1004, + CL_DEVICE_MAX_WORK_ITEM_SIZES = 0x1005, + CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR = 0x1006, + CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT = 0x1007, + CL_DEVICE_PREFERRED_VECTOR_WIDTH_ = 0x1008, + CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG = 0x1009, + CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT = 0x100A, + CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE = 0x100B, + CL_DEVICE_MAX_CLOCK_FREQUENCY = 0x100C, + CL_DEVICE_ADDRESS_BITS = 0x100D, + CL_DEVICE_MAX_READ_IMAGE_ARGS = 0x100E, + CL_DEVICE_MAX_WRITE_IMAGE_ARGS = 0x100F, + CL_DEVICE_MAX_MEM_ALLOC_SIZE = 0x1010, + CL_DEVICE_IMAGE2D_MAX_WIDTH = 0x1011, + CL_DEVICE_IMAGE2D_MAX_HEIGHT = 0x1012, + CL_DEVICE_IMAGE3D_MAX_WIDTH = 0x1013, + CL_DEVICE_IMAGE3D_MAX_HEIGHT = 0x1014, + CL_DEVICE_IMAGE3D_MAX_DEPTH = 0x1015, + CL_DEVICE_IMAGE_SUPPORT = 0x1016, + CL_DEVICE_MAX_PARAMETER_SIZE = 0x1017, + CL_DEVICE_MAX_SAMPLERS = 0x1018, + CL_DEVICE_MEM_BASE_ADDR_ALIGN = 0x1019, + CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE = 0x101A, + CL_DEVICE_SINGLE_FP_CONFIG = 0x101B, + CL_DEVICE_GLOBAL_MEM_CACHE_TYPE = 0x101C, + CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE = 0x101D, + CL_DEVICE_GLOBAL_MEM_CACHE_SIZE = 0x101E, + CL_DEVICE_GLOBAL_MEM_SIZE = 0x101F, + CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE = 0x1020, + CL_DEVICE_MAX_CONSTANT_ARGS = 0x1021, + CL_DEVICE_LOCAL_MEM_TYPE = 0x1022, + CL_DEVICE_LOCAL_MEM_SIZE = 0x1023, + CL_DEVICE_ERROR_CORRECTION_SUPPORT = 0x1024, + CL_DEVICE_PROFILING_TIMER_RESOLUTION = 0x1025, + CL_DEVICE_ENDIAN_LITTLE = 0x1026, + CL_DEVICE_AVAILABLE = 0x1027, + CL_DEVICE_COMPILER_AVAILABLE = 0x1028, + CL_DEVICE_EXECUTION_CAPABILITIES = 0x1029, + CL_DEVICE_QUEUE_PROPERTIES = 0x102A, + CL_DEVICE_NAME = 0x102B, + CL_DEVICE_VENDOR = 0x102C, + CL_DRIVER_VERSION = 0x102D, + CL_DEVICE_PROFILE = 0x102E, + CL_DEVICE_VERSION = 0x102F, + CL_DEVICE_EXTENSIONS = 0x1030, + CL_DEVICE_PLATFORM = 0x1031; + /* 0x1032 reserved for CL_DEVICE_DOUBLE_FP_CONFIG */ + /* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG */ + + /** cl_device_fp_config - bitfield */ + int CL_FP_DENORM = (1 << 0), + CL_FP_INF_NAN = (1 << 1), + CL_FP_ROUND_TO_NEAREST = (1 << 2), + CL_FP_ROUND_TO_ZERO = (1 << 3), + CL_FP_ROUND_TO_INF = (1 << 4), + CL_FP_FMA = (1 << 5); + + /** cl_device_mem_cache_type */ + int CL_NONE = 0x0, + CL_READ_ONLY_CACHE = 0x1, + CL_READ_WRITE_CACHE = 0x2; + + /** cl_device_local_mem_type */ + int CL_LOCAL = 0x1, + CL_GLOBAL = 0x2; + + /** cl_device_exec_capabilities - bitfield */ + int CL_EXEC_KERNEL = (1 << 0), + CL_EXEC_NATIVE_KERNEL = (1 << 1); + + /** cl_command_queue_properties - bitfield */ + int CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE = (1 << 0), + CL_QUEUE_PROFILING_ENABLE = (1 << 1); + + /** cl_context_info */ + int CL_CONTEXT_REFERENCE_COUNT = 0x1080, + CL_CONTEXT_DEVICES = 0x1081, + CL_CONTEXT_PROPERTIES = 0x1082; + + /** cl_context_info + cl_context_properties */ + int CL_CONTEXT_PLATFORM = 0x1084; + + /** cl_command_queue_info */ + int CL_QUEUE_CONTEXT = 0x1090, + CL_QUEUE_DEVICE = 0x1091, + CL_QUEUE_REFERENCE_COUNT = 0x1092, + CL_QUEUE_PROPERTIES = 0x1093; + + /** cl_mem_flags - bitfield */ + int CL_MEM_READ_WRITE = (1 << 0), + CL_MEM_WRITE_ONLY = (1 << 1), + CL_MEM_READ_ONLY = (1 << 2), + CL_MEM_USE_HOST_PTR = (1 << 3), + CL_MEM_ALLOC_HOST_PTR = (1 << 4), + CL_MEM_COPY_HOST_PTR = (1 << 5); + + /** cl_channel_order */ + int CL_R = 0x10B0, + CL_A = 0x10B1, + CL_RG = 0x10B2, + CL_RA = 0x10B3, + CL_RGB = 0x10B4, + CL_RGBA = 0x10B5, + CL_BGRA = 0x10B6, + CL_ARGB = 0x10B7, + CL_INTENSITY = 0x10B8, + CL_LUMINANCE = 0x10B9; + + /** cl_channel_type */ + int CL_SNORM_INT8 = 0x10D0, + CL_SNORM_INT16 = 0x10D1, + CL_UNORM_INT8 = 0x10D2, + CL_UNORM_INT16 = 0x10D3, + CL_UNORM_SHORT_565 = 0x10D4, + CL_UNORM_SHORT_555 = 0x10D5, + CL_UNORM_INT_101010 = 0x10D6, + CL_SIGNED_INT8 = 0x10D7, + CL_SIGNED_INT16 = 0x10D8, + CL_SIGNED_INT32 = 0x10D9, + CL_UNSIGNED_INT8 = 0x10DA, + CL_UNSIGNED_INT16 = 0x10DB, + CL_UNSIGNED_INT32 = 0x10DC, + CL_HALF_FLOAT = 0x10DD, + CL_FLOAT = 0x10DE; + + /** cl_mem_object_type */ + int CL_MEM_OBJECT_BUFFER = 0x10F0, + CL_MEM_OBJECT_IMAGE2D = 0x10F1, + CL_MEM_OBJECT_IMAGE3D = 0x10F2; + + /** cl_mem_info */ + int CL_MEM_TYPE = 0x1100, + CL_MEM_FLAGS = 0x1101, + CL_MEM_SIZE = 0x1102, + CL_MEM_HOST_PTR = 0x1103, + CL_MEM_MAP_COUNT = 0x1104, + CL_MEM_REFERENCE_COUNT = 0x1105, + CL_MEM_CONTEXT = 0x1106; + + /** cl_image_info */ + int CL_IMAGE_FORMAT = 0x1110, + CL_IMAGE_ELEMENT_SIZE = 0x1111, + CL_IMAGE_ROW_PITCH = 0x1112, + CL_IMAGE_SLICE_PITCH = 0x1113, + CL_IMAGE_WIDTH = 0x1114, + CL_IMAGE_HEIGHT = 0x1115, + CL_IMAGE_DEPTH = 0x1116; + + /** cl_addressing_mode */ + int CL_ADDRESS_NONE = 0x1130, + CL_ADDRESS_CLAMP_TO_EDGE = 0x1131, + CL_ADDRESS_CLAMP = 0x1132, + CL_ADDRESS_REPEAT = 0x1133; + + /** cl_filter_mode */ + int CL_FILTER_NEAREST = 0x1140, + CL_FILTER_LINEAR = 0x1141; + + /** cl_sampler_info */ + int CL_SAMPLER_REFERENCE_COUNT = 0x1150, + CL_SAMPLER_CONTEXT = 0x1151, + CL_SAMPLER_NORMALIZED_COORDS = 0x1152, + CL_SAMPLER_ADDRESSING_MODE = 0x1153, + CL_SAMPLER_FILTER_MODE = 0x1154; + + /** cl_map_flags - bitfield */ + int CL_MAP_READ = (1 << 0), + CL_MAP_WRITE = (1 << 1); + + /** cl_program_info */ + int CL_PROGRAM_REFERENCE_COUNT = 0x1160, + CL_PROGRAM_CONTEXT = 0x1161, + CL_PROGRAM_NUM_DEVICES = 0x1162, + CL_PROGRAM_DEVICES = 0x1163, + CL_PROGRAM_SOURCE = 0x1164, + CL_PROGRAM_BINARY_SIZES = 0x1165, + CL_PROGRAM_BINARIES = 0x1166; + + /** cl_program_build_info */ + int CL_PROGRAM_BUILD_STATUS = 0x1181, + CL_PROGRAM_BUILD_OPTIONS = 0x1182, + CL_PROGRAM_BUILD_LOG = 0x1183; + + /** cl_build_status */ + int CL_BUILD_SUCCESS = 0, + CL_BUILD_NONE = -1, + CL_BUILD_ERROR = -2, + CL_BUILD_IN_PROGRESS = -3; + + /** cl_kernel_info */ + int CL_KERNEL_FUNCTION_NAME = 0x1190, + CL_KERNEL_NUM_ARGS = 0x1191, + CL_KERNEL_REFERENCE_COUNT = 0x1192, + CL_KERNEL_CONTEXT = 0x1193, + CL_KERNEL_PROGRAM = 0x1194; + + /** cl_kernel_work_group_info */ + int CL_KERNEL_WORK_GROUP_SIZE = 0x11B0, + CL_KERNEL_COMPILE_WORK_GROUP_SIZE = 0x11B1, + CL_KERNEL_LOCAL_MEM_SIZE = 0x11B2; + + /** cl_event_info */ + int CL_EVENT_COMMAND_QUEUE = 0x11D0, + CL_EVENT_COMMAND_TYPE = 0x11D1, + CL_EVENT_REFERENCE_COUNT = 0x11D2, + CL_EVENT_COMMAND_EXECUTION_STATUS = 0x11D3; + + /** cl_command_type */ + int CL_COMMAND_NDRANGE_KERNEL = 0x11F0, + CL_COMMAND_TASK = 0x11F1, + CL_COMMAND_NATIVE_KERNEL = 0x11F2, + CL_COMMAND_READ_BUFFER = 0x11F3, + CL_COMMAND_WRITE_BUFFER = 0x11F4, + CL_COMMAND_COPY_BUFFER = 0x11F5, + CL_COMMAND_READ_IMAGE = 0x11F6, + CL_COMMAND_WRITE_IMAGE = 0x11F7, + CL_COMMAND_COPY_IMAGE = 0x11F8, + CL_COMMAND_COPY_IMAGE_TO_BUFFER = 0x11F9, + CL_COMMAND_COPY_BUFFER_TO_IMAGE = 0x11FA, + CL_COMMAND_MAP_BUFFER = 0x11FB, + CL_COMMAND_MAP_IMAGE = 0x11FC, + CL_COMMAND_UNMAP_MEM_OBJECT = 0x11FD, + CL_COMMAND_MARKER = 0x11FE, + CL_COMMAND_ACQUIRE_GL_OBJECTS = 0x11FF, + CL_COMMAND_RELEASE_GL_OBJECTS = 0x1200; + + /** command execution status */ + int CL_COMPLETE = 0x0, + CL_RUNNING = 0x1, + CL_SUBMITTED = 0x2, + CL_QUEUED = 0x3; + + /** cl_profiling_info */ + int CL_PROFILING_COMMAND_QUEUED = 0x1280, + CL_PROFILING_COMMAND_SUBMIT = 0x1281, + CL_PROFILING_COMMAND_START = 0x1282, + CL_PROFILING_COMMAND_END = 0x1283; + + /* Platform API */ + + @Code( + javaBeforeNative = "\t\tif ( num_platforms == null ) num_platforms = APIUtil.getBufferInt();", + javaAfterNative = "\t\tif ( __result == CL_SUCCESS && platforms != null ) CLPlatform.registerCLPlatforms(platforms, num_platforms);" + ) + @cl_int + int clGetPlatformIDs(@AutoSize(value = "platforms", canBeNull = true) @cl_uint int num_entries, + @OutParameter @Check(canBeNull = true) @NativeType("cl_platform_id") PointerBuffer platforms, + @OutParameter @Check(value = "1", canBeNull = true) @cl_uint IntBuffer num_platforms); + + @cl_int + int clGetPlatformInfo(@PointerWrapper(value = "cl_platform_id", canBeNull = true) CLPlatform platform, + @NativeType("cl_platform_info") int param_name, + @AutoSize(value = "param_value", canBeNull = true) @size_t long param_value_size, + @OutParameter @Check(canBeNull = true) @cl_void ByteBuffer param_value, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("size_t") PointerBuffer param_value_size_ret); + + @Code( + javaBeforeNative = "\t\telse\n" + + "\t\t\tnum_devices = APIUtil.getBufferInt();", + javaAfterNative = "\t\tif ( __result == CL_SUCCESS && devices != null ) platform.registerCLDevices(devices, num_devices);" + ) + @cl_int + int clGetDeviceIDs(@PointerWrapper("cl_platform_id") CLPlatform platform, + @NativeType("cl_device_type") long device_type, + @AutoSize(value = "devices", canBeNull = true) @cl_uint int num_entries, + @OutParameter @Check(canBeNull = true) @NativeType("cl_device_id") PointerBuffer devices, + @OutParameter @Check(value = "1", canBeNull = true) @cl_uint IntBuffer num_devices); + + @cl_int + int clGetDeviceInfo(@PointerWrapper("cl_device_id") CLDevice device, + @NativeType("cl_device_info") int param_name, + @AutoSize(value = "param_value", canBeNull = true) @size_t long param_value_size, + @OutParameter @Check(canBeNull = true) @cl_void ByteBuffer param_value, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("size_t") PointerBuffer param_value_size_ret); + + /** LWJGL requires CL_CONTEXT_PLATFORM to be present in the cl_context_properties buffer. */ + @Code( + tryBlock = true, + // Create a GlobalRef to the callback object. + javaBeforeNative = "\t\tlong user_data = pfn_notify == null || pfn_notify.isCustom() ? 0 : CallbackUtil.createGlobalRef(pfn_notify);", + // Associate context with the GlobalRef, so we can delete it later. + javaFinally = "\t\t\tif ( __result != null ) __result.setContextCallback(user_data);" + ) + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_context", params = "APIUtil.getCLPlatform(properties)") + CLContext clCreateContext(@NullTerminated @Check("3") @Const @NativeType("cl_context_properties") PointerBuffer properties, + @AutoSize("devices") @cl_uint int num_devices, + @Check("1") @Const @NativeType("cl_device_id") PointerBuffer devices, + @PointerWrapper(value = "cl_create_context_callback", canBeNull = true) CLContextCallback pfn_notify, + @Constant("user_data") @PointerWrapper("void *") long user_data, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + /** LWJGL requires CL_CONTEXT_PLATFORM to be present in the cl_context_properties buffer. */ + @Alternate("clCreateContext") + @Code( + tryBlock = true, + // Create a GlobalRef to the callback object. + javaBeforeNative = "\t\tlong user_data = pfn_notify == null || pfn_notify.isCustom() ? 0 : CallbackUtil.createGlobalRef(pfn_notify);", + // Associate context with the GlobalRef, so we can delete it later. + javaFinally = "\t\t\tif ( __result != null ) __result.setContextCallback(user_data);" + ) + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_context", params = "APIUtil.getCLPlatform(properties)") + CLContext clCreateContext(@NullTerminated @Check("3") @Const @NativeType("cl_context_properties") PointerBuffer properties, + @Constant("1") @cl_uint int num_devices, + @Constant(value = "APIUtil.getPointer(device)", keepParam = true) CLDevice device, + @PointerWrapper(value = "cl_create_context_callback", canBeNull = true) CLContextCallback pfn_notify, + @Constant("user_data") @PointerWrapper("void *") long user_data, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + /** LWJGL requires CL_CONTEXT_PLATFORM to be present in the cl_context_properties buffer. */ + @Code( + tryBlock = true, + // Create a GlobalRef to the callback object. + javaBeforeNative = "\t\tlong user_data = pfn_notify == null || pfn_notify.isCustom() ? 0 : CallbackUtil.createGlobalRef(pfn_notify);", + // Associate context with the GlobalRef, so we can delete it later. + javaFinally = "\t\t\tif ( __result != null ) __result.setContextCallback(user_data);" + ) + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_context", params = "APIUtil.getCLPlatform(properties)") + CLContext clCreateContextFromType(@NullTerminated @Check("3") @Const @NativeType("cl_context_properties") PointerBuffer properties, + @NativeType("cl_device_type") long device_type, + @PointerWrapper(value = "cl_create_context_callback", canBeNull = true) CLContextCallback pfn_notify, + @Constant("user_data") @PointerWrapper("void *") long user_data, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + @Code(javaAfterNative = "\t\tif ( __result == CL_SUCCESS ) context.retain();") + @cl_int + int clRetainContext(@PointerWrapper("cl_context") CLContext context); + + @Code( + javaBeforeNative = "\t\tAPIUtil.releaseObjects(context);", + javaAfterNative = "\t\tif ( __result == CL_SUCCESS ) context.releaseImpl();" + ) + @cl_int + int clReleaseContext(@PointerWrapper("cl_context") CLContext context); + + @Code( + javaBeforeNative = "\t\tif ( param_value_size_ret == null && APIUtil.isDevicesParam(param_name) ) param_value_size_ret = APIUtil.getBufferPointer();", + javaAfterNative = "\t\tif ( __result == CL_SUCCESS && param_value != null && APIUtil.isDevicesParam(param_name) ) context.getParent().registerCLDevices(param_value, param_value_size_ret);" + ) + @cl_int + int clGetContextInfo(@PointerWrapper("cl_context") CLContext context, + @NativeType("cl_context_info") int param_name, + @AutoSize(value = "param_value", canBeNull = true) @size_t long param_value_size, + @OutParameter @Check(canBeNull = true) @cl_void ByteBuffer param_value, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("size_t") PointerBuffer param_value_size_ret); + + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_command_queue", params = "context, device") + CLCommandQueue clCreateCommandQueue(@PointerWrapper("cl_context") CLContext context, + @PointerWrapper("cl_device_id") CLDevice device, + @NativeType("cl_command_queue_properties") long properties, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + @Code(javaAfterNative = "\t\tif ( __result == CL_SUCCESS ) command_queue.retain();") + @cl_int + int clRetainCommandQueue(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue); + + @Code( + javaBeforeNative = "\t\tAPIUtil.releaseObjects(command_queue);", + javaAfterNative = "\t\tif ( __result == CL_SUCCESS ) command_queue.release();" + ) + @cl_int + int clReleaseCommandQueue(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue); + + @cl_int + int clGetCommandQueueInfo(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @NativeType("cl_command_queue_info") int param_name, + @AutoSize(value = "param_value", canBeNull = true) @size_t long param_value_size, + @OutParameter @Check(canBeNull = true) @cl_void ByteBuffer param_value, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("size_t") PointerBuffer param_value_size_ret); + + @GenerateAutos + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_mem", params = "context") + CLMem clCreateBuffer(@PointerWrapper("cl_context") CLContext context, + @NativeType("cl_mem_flags") long flags, + @AutoSize("host_ptr") @size_t long size, + @cl_byte + @cl_short + @cl_int + @cl_long + @cl_float + @cl_double Buffer host_ptr, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + @Code(javaAfterNative = "\t\tif ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event);") + @cl_int + int clEnqueueReadBuffer(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @PointerWrapper("cl_mem") CLMem buffer, + @cl_bool int blocking_read, + @size_t long offset, + @AutoSize("ptr") @size_t long size, + @OutParameter + @cl_byte + @cl_short + @cl_int + @cl_long + @cl_float + @cl_double Buffer ptr, + @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, + @Check(canBeNull = true) @Const @NativeType("cl_event") PointerBuffer event_wait_list, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event); + + @Code(javaAfterNative = "\t\tif ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event);") + @cl_int + int clEnqueueWriteBuffer(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @PointerWrapper("cl_mem") CLMem buffer, + @cl_bool int blocking_write, + @size_t long offset, + @AutoSize("ptr") @size_t long size, + @Const + @cl_byte + @cl_short + @cl_int + @cl_long + @cl_float + @cl_double Buffer ptr, + @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, + @Check(canBeNull = true) @Const @NativeType("cl_event") PointerBuffer event_wait_list, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event); + + @Code(javaAfterNative = "\t\tif ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event);") + @cl_int + int clEnqueueCopyBuffer(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @PointerWrapper("cl_mem") CLMem src_buffer, + @PointerWrapper("cl_mem") CLMem dst_buffer, + @size_t long src_offset, + @size_t long dst_offset, + @size_t long size, + @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, + @Check(canBeNull = true) @Const @NativeType("cl_event") PointerBuffer event_wait_list, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event); + + @Code(javaAfterNative = "\t\tif ( __result != null ) command_queue.registerCLEvent(event);") + @Check(value = "errcode_ret", canBeNull = true) + @cl_void + @AutoSize("size") + ByteBuffer clEnqueueMapBuffer(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @PointerWrapper("cl_mem") CLMem buffer, + @cl_bool int blocking_map, + @NativeType("cl_map_flags") long map_flags, + @size_t long offset, + @size_t long size, + @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, + @Check(canBeNull = true) @Const @NativeType("cl_event") PointerBuffer event_wait_list, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_mem", params = "context") + CLMem clCreateImage2D(@PointerWrapper("cl_context") CLContext context, + @NativeType("cl_mem_flags") long flags, + @Check("2 * 4") @Const @NativeType("cl_image_format") ByteBuffer image_format, + @size_t long image_width, + @size_t long image_height, + @size_t long image_row_pitch, + @Check(value = "CLChecks.calculateImage2DSize(image_format, image_width, image_height, image_row_pitch)", canBeNull = true) + @cl_byte + @cl_short + @cl_int + @cl_float Buffer host_ptr, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_mem", params = "context") + CLMem clCreateImage3D(@PointerWrapper("cl_context") CLContext context, + @NativeType("cl_mem_flags") long flags, + @Check("2 * 4") @Const @NativeType("cl_image_format") ByteBuffer image_format, + @size_t long image_width, + @size_t long image_height, + @size_t long image_depth, + @size_t long image_row_pitch, + @size_t long image_slice_pitch, + @Check(value = "CLChecks.calculateImage3DSize(image_format, image_width, image_height, image_height, image_row_pitch, image_slice_pitch)", canBeNull = true) + @cl_byte + @cl_short + @cl_int + @cl_float Buffer host_ptr, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + @cl_int + int clGetSupportedImageFormats(@PointerWrapper("cl_context") CLContext context, + @NativeType("cl_mem_flags") long flags, + @NativeType("cl_mem_object_type") int image_type, + @AutoSize(value = "image_formats", expression = " / (2 * 4)", canBeNull = true) @cl_uint int num_entries, + @OutParameter @Check(canBeNull = true) @NativeType("cl_image_format") ByteBuffer image_formats, + @OutParameter @Check(value = "1", canBeNull = true) @cl_uint IntBuffer num_image_formats); + + @Code(javaAfterNative = "\t\tif ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event);") + @cl_int + int clEnqueueReadImage(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @PointerWrapper("cl_mem") CLMem image, + @cl_bool int blocking_read, + @Check("3") @Const @NativeType("size_t") PointerBuffer origin, + @Check("3") @Const @NativeType("size_t") PointerBuffer region, + @size_t long row_pitch, + @size_t long slice_pitch, + @OutParameter @Check("CLChecks.calculateImageSize(region, row_pitch, slice_pitch)") + @cl_byte + @cl_short + @cl_int + @cl_float Buffer ptr, + @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, + @Check(canBeNull = true) @Const @NativeType("cl_event") PointerBuffer event_wait_list, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event); + + @Code(javaAfterNative = "\t\tif ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event);") + @cl_int + int clEnqueueWriteImage(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @PointerWrapper("cl_mem") CLMem image, + @cl_bool int blocking_write, + @Check("3") @Const @NativeType("size_t") PointerBuffer origin, + @Check("3") @Const @NativeType("size_t") PointerBuffer region, + @size_t long input_row_pitch, + @size_t long input_slice_pitch, + @Check("CLChecks.calculateImageSize(region, input_row_pitch, input_slice_pitch)") @Const + @cl_byte + @cl_short + @cl_int + @cl_float Buffer ptr, + @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, + @Check(canBeNull = true) @Const @NativeType("cl_event") PointerBuffer event_wait_list, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event); + + @Code(javaAfterNative = "\t\tif ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event);") + @cl_int + int clEnqueueCopyImage(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @PointerWrapper("cl_mem") CLMem src_image, + @PointerWrapper("cl_mem") CLMem dst_image, + @Check("3") @Const @NativeType("size_t") PointerBuffer src_origin, + @Check("3") @Const @NativeType("size_t") PointerBuffer dst_origin, + @Check("3") @Const @NativeType("size_t") PointerBuffer region, + @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, + @Check(canBeNull = true) @Const @NativeType("cl_event") PointerBuffer event_wait_list, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event); + + @Code(javaAfterNative = "\t\tif ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event);") + @cl_int + int clEnqueueCopyImageToBuffer(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @PointerWrapper("cl_mem") CLMem src_image, + @PointerWrapper("cl_mem") CLMem dst_buffer, + @Check("3") @Const @NativeType("size_t") PointerBuffer src_origin, + @Check("3") @Const @NativeType("size_t") PointerBuffer region, + @size_t long dst_offset, + @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, + @Check(canBeNull = true) @Const @NativeType("cl_event") PointerBuffer event_wait_list, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event); + + @Code(javaAfterNative = "\t\tif ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event);") + @cl_int + int clEnqueueCopyBufferToImage(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @PointerWrapper("cl_mem") CLMem src_buffer, + @PointerWrapper("cl_mem") CLMem dst_image, + @size_t long src_offset, + @Check("3") @Const @NativeType("size_t") PointerBuffer dst_origin, + @Check("3") @Const @NativeType("size_t") PointerBuffer region, + @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, + @Check(canBeNull = true) @Const @NativeType("cl_event") PointerBuffer event_wait_list, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event); + + @Code(javaAfterNative = "\t\tif ( __result != null ) command_queue.registerCLEvent(event);") + @Check(value = "errcode_ret", canBeNull = true) + @cl_void + @AutoSize(value = "extcl_CalculateImageSize(region_address, *image_row_pitch_address, image_slice_pitch_address == NULL ? 0 : *image_slice_pitch_address)", isNative = true) + ByteBuffer clEnqueueMapImage(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @PointerWrapper("cl_mem") CLMem image, + @cl_bool int blocking_map, + @NativeType("cl_map_flags") long map_flags, + @Check("3") @Const @NativeType("size_t") PointerBuffer origin, + @Check("3") @Const @NativeType("size_t") PointerBuffer region, + @OutParameter @Check("1") @NativeType("size_t") PointerBuffer image_row_pitch, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("size_t") PointerBuffer image_slice_pitch, + @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, + @Check(canBeNull = true) @Const @NativeType("cl_event") PointerBuffer event_wait_list, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + @cl_int + int clGetImageInfo(@PointerWrapper("cl_mem") CLMem image, + @NativeType("cl_image_info") int param_name, + @AutoSize(value = "param_value", canBeNull = true) @size_t long param_value_size, + @OutParameter @Check(canBeNull = true) @cl_void ByteBuffer param_value, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("size_t") PointerBuffer param_value_size_ret); + + @Code(javaAfterNative = "\t\tif ( __result == CL_SUCCESS ) memobj.retain();") + @cl_int + int clRetainMemObject(@PointerWrapper("cl_mem") CLMem memobj); + + @Code(javaAfterNative = "\t\tif ( __result == CL_SUCCESS ) memobj.release();") + @cl_int + int clReleaseMemObject(@PointerWrapper("cl_mem") CLMem memobj); + + @Code(javaAfterNative = "\t\tif ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event);") + @cl_int + int clEnqueueUnmapMemObject(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @PointerWrapper("cl_mem") CLMem memobj, + @Check @cl_void ByteBuffer mapped_ptr, + @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, + @Check(canBeNull = true) @Const @NativeType("cl_event") PointerBuffer event_wait_list, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event); + + @cl_int + int clGetMemObjectInfo(@PointerWrapper("cl_mem") CLMem memobj, + @NativeType("cl_mem_info") int param_name, + @AutoSize(value = "param_value", canBeNull = true) @size_t long param_value_size, + @OutParameter @Check(canBeNull = true) @cl_void ByteBuffer param_value, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("size_t") PointerBuffer param_value_size_ret); + + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_sampler", params = "context") + CLSampler clCreateSampler(@PointerWrapper("cl_context") CLContext context, + @cl_bool int normalized_coords, + @NativeType("cl_addressing_mode") int addressing_mode, + @NativeType("cl_filter_mode") int filter_mode, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + @Code(javaAfterNative = "\t\tif ( __result == CL_SUCCESS ) sampler.retain();") + @cl_int + int clRetainSampler(@PointerWrapper("cl_sampler") CLSampler sampler); + + @Code(javaAfterNative = "\t\tif ( __result == CL_SUCCESS ) sampler.release();") + @cl_int + int clReleaseSampler(@PointerWrapper("cl_sampler") CLSampler sampler); + + @cl_int + int clGetSamplerInfo(@PointerWrapper("cl_sampler") CLSampler sampler, + @NativeType("cl_sampler_info") int param_name, + @AutoSize(value = "param_value", canBeNull = true) @size_t long param_value_size, + @OutParameter @Check(canBeNull = true) @cl_void ByteBuffer param_value, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("size_t") PointerBuffer param_value_size_ret); + + // ------[ clCreateProgramWithSource ]------ + + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_program", params = "context") + CLProgram clCreateProgramWithSource(@PointerWrapper("cl_context") CLContext context, + @Constant("1") @cl_uint int count, + @Check @Indirect @Const @cl_char ByteBuffer string, + @AutoSize("string") @Indirect @Const @size_t long lengths, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + @Alternate(value = "clCreateProgramWithSource", nativeAlt = true) + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_program", params = "context") + CLProgram clCreateProgramWithSource2(@PointerWrapper("cl_context") CLContext context, + @AutoSize("lengths") @cl_uint int count, + @Check("APIUtil.getSize(lengths)") @PointerArray(value = "count", lengths = "lengths") @Const @NativeType("cl_char") ByteBuffer strings, + @Check("1") @Const @NativeType("size_t") PointerBuffer lengths, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + @Alternate(value = "clCreateProgramWithSource", nativeAlt = true) + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_program", params = "context") + CLProgram clCreateProgramWithSource3(@PointerWrapper("cl_context") CLContext context, + @Constant("strings.length") @cl_uint int count, + @Check("1") @PointerArray(value = "count") @Const @NativeType("cl_char") ByteBuffer[] strings, + @Constant("APIUtil.getLengths(strings)") @Const @NativeType("size_t") PointerBuffer lengths, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + @Alternate("clCreateProgramWithSource") + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_program", params = "context") + CLProgram clCreateProgramWithSource(@PointerWrapper("cl_context") CLContext context, + @Constant("1") @cl_uint int count, + CharSequence string, + @Constant("string.length()") @Indirect @Const @size_t long lengths, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + @Alternate(value = "clCreateProgramWithSource", nativeAlt = true) + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_program", params = "context") + CLProgram clCreateProgramWithSource4(@PointerWrapper("cl_context") CLContext context, + @Constant("strings.length") @cl_uint int count, + @Const @PointerArray(value = "count", lengths = "lengths") CharSequence[] strings, + @Constant("APIUtil.getLengths(strings)") @Const @NativeType("size_t") PointerBuffer lengths, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + // ------[ clCreateProgramWithBinary ]------ + + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_program", params = "context") + CLProgram clCreateProgramWithBinary(@PointerWrapper("cl_context") CLContext context, + @Constant("1") @cl_uint int num_devices, + @Const @Indirect @PointerWrapper("cl_device_id") CLDevice device, + @AutoSize("binary") @Const @Indirect @size_t long lengths, + @Const @Indirect @cl_uchar ByteBuffer binary, + @OutParameter @Check("1") @cl_int IntBuffer binary_status, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + @Alternate(value = "clCreateProgramWithBinary", nativeAlt = true) + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_program", params = "context") + CLProgram clCreateProgramWithBinary2(@PointerWrapper("cl_context") CLContext context, + @AutoSize("device_list") @cl_uint int num_devices, + @Check("1") @Const @NativeType("cl_device_id") PointerBuffer device_list, + @Check("device_list.remaining()") @Const @NativeType("size_t") PointerBuffer lengths, + @Check("APIUtil.getSize(lengths)") @PointerArray(value = "num_devices", lengths = "lengths") @Const @NativeType("cl_uchar") ByteBuffer binaries, + @OutParameter @Check("device_list.remaining()") @cl_int IntBuffer binary_status, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + @Alternate(value = "clCreateProgramWithBinary", nativeAlt = true) + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_program", params = "context") + CLProgram clCreateProgramWithBinary3(@PointerWrapper("cl_context") CLContext context, + @Constant("binaries.length") @cl_uint int num_devices, + @Check("binaries.length") @Const @NativeType("cl_device_id") PointerBuffer device_list, + @Constant("APIUtil.getLengths(binaries)") @Const @NativeType("size_t") PointerBuffer lengths, + @Check("1") @PointerArray("num_devices") @Const @NativeType("cl_uchar") ByteBuffer[] binaries, + @OutParameter @Check("binaries.length") @cl_int IntBuffer binary_status, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + @Code(javaAfterNative = "\t\tif ( __result == CL_SUCCESS ) program.retain();") + @cl_int + int clRetainProgram(@PointerWrapper("cl_program") CLProgram program); + + @Code( + javaBeforeNative = "\t\tAPIUtil.releaseObjects(program);", + javaAfterNative = "\t\tif ( __result == CL_SUCCESS ) program.release();" + ) + @cl_int + int clReleaseProgram(@PointerWrapper("cl_program") CLProgram program); + + @Code( + tryBlock = true, + // Create a GlobalRef to the callback object. + javaBeforeNative = "\t\tlong user_data = CallbackUtil.createGlobalRef(pfn_notify);\n" + + "\t\tif ( pfn_notify != null ) pfn_notify.setContext(program.getParent());", + // Check if we need to delete the GlobalRef. + javaFinally = "\t\t\tCallbackUtil.checkCallback(__result, user_data);" + ) + @cl_int + int clBuildProgram(@PointerWrapper("cl_program") CLProgram program, + @AutoSize(value = "device_list", canBeNull = true) @cl_uint int num_devices, + @Check(canBeNull = true) @Const @NativeType("cl_device_id") PointerBuffer device_list, + @Check @NullTerminated @Const @cl_char ByteBuffer options, + @PointerWrapper(value = "cl_program_callback", canBeNull = true) CLBuildProgramCallback pfn_notify, + @Constant("user_data") @PointerWrapper("void *") long user_data); + + @Alternate("clBuildProgram") + @Code( + tryBlock = true, + // Create a GlobalRef to the callback object. + javaBeforeNative = "\t\tlong user_data = CallbackUtil.createGlobalRef(pfn_notify);\n" + + "\t\tif ( pfn_notify != null ) pfn_notify.setContext(program.getParent());", + // Check if we need to delete the GlobalRef. + javaFinally = "\t\t\tCallbackUtil.checkCallback(__result, user_data);" + ) + @cl_int + int clBuildProgram(@PointerWrapper("cl_program") CLProgram program, + @AutoSize(value = "device_list", canBeNull = true) @cl_uint int num_devices, + @Check(canBeNull = true) @Const @NativeType("cl_device_id") PointerBuffer device_list, + @NullTerminated @Const CharSequence options, + @PointerWrapper(value = "cl_program_callback", canBeNull = true) CLBuildProgramCallback pfn_notify, + @Constant("user_data") @PointerWrapper("void *") long user_data); + + @Alternate("clBuildProgram") + @Code( + tryBlock = true, + // Create a GlobalRef to the callback object. + javaBeforeNative = "\t\tlong user_data = CallbackUtil.createGlobalRef(pfn_notify);\n" + + "\t\tif ( pfn_notify != null ) pfn_notify.setContext(program.getParent());", + // Check if we need to delete the GlobalRef. + javaFinally = "\t\t\tCallbackUtil.checkCallback(__result, user_data);" + ) + @cl_int + int clBuildProgram(@PointerWrapper("cl_program") CLProgram program, + @Constant("1") @cl_uint int num_devices, + @Constant(value = "APIUtil.getPointer(device)", keepParam = true) CLDevice device, + @NullTerminated @Const CharSequence options, + @PointerWrapper(value = "cl_program_callback", canBeNull = true) CLBuildProgramCallback pfn_notify, + @Constant("user_data") @PointerWrapper("void *") long user_data); + + @cl_int + int clUnloadCompiler(); + + @cl_int + int clGetProgramInfo(@PointerWrapper("cl_program") CLProgram program, + @NativeType("cl_program_info") int param_name, + @AutoSize(value = "param_value", canBeNull = true) @size_t long param_value_size, + @OutParameter @Check(canBeNull = true) @cl_void ByteBuffer param_value, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("size_t") PointerBuffer param_value_size_ret); + + /** + * This method can be used to get program binaries. The binary for each device (in the + * order returned by CL_PROGRAM_DEVICES) will be written sequentially to + * the param_value buffer. The buffer size must be big enough to hold + * all the binaries, as returned by CL_PROGRAM_BINARY_SIZES. + * + * @param program the program + * @param param_value the buffers where the binaries will be written to. + * @param param_value_size_ret optional size result + * + * @return the error code + */ + @Alternate(value = "clGetProgramInfo", nativeAlt = true) + @cl_int + int clGetProgramInfo2(@PointerWrapper("cl_program") CLProgram program, + @Constant("CL_PROGRAM_BINARIES") @NativeType("cl_program_info") int param_name, + @Constant(value = "sizes_len * sizeof(cl_uchar *)", isNative = true) @size_t long param_value_size, + @Constant("sizes.remaining()") @Helper(passToNative = true) @size_t long sizes_len, + @Helper(passToNative = true) @Check("1") @Const @NativeType("size_t") PointerBuffer sizes, + @OutParameter @Check("APIUtil.getSize(sizes)") @PointerArray(value = "sizes_len", lengths = "sizes") @NativeType("cl_uchar") ByteBuffer param_value, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("size_t") PointerBuffer param_value_size_ret); + + /** + * This method can be used to get program binaries. The binary for each device (in the + * order returned by CL_PROGRAM_DEVICES) will be written to the corresponding + * slot of the param_value array. The size of each buffer must be big enough to + * hold the corresponding binary, as returned by CL_PROGRAM_BINARY_SIZES. + * + * @param program the program + * @param param_value the buffers where the binaries will be written to. + * @param param_value_size_ret optional size result + * + * @return the error code + */ + @Alternate(value = "clGetProgramInfo", nativeAlt = true) + @cl_int + int clGetProgramInfo3(@PointerWrapper("cl_program") CLProgram program, + @Constant("CL_PROGRAM_BINARIES") @NativeType("cl_program_info") int param_name, + @Constant(value = "param_value_len * sizeof(cl_uchar *)", isNative = true) @size_t long param_value_size, + @Constant("param_value.length") @Helper(passToNative = true) @size_t long param_value_len, + @PointerArray("param_value_len") @NativeType("cl_uchar") ByteBuffer[] param_value, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("size_t") PointerBuffer param_value_size_ret); + + @cl_int + int clGetProgramBuildInfo(@PointerWrapper("cl_program") CLProgram program, + @PointerWrapper("cl_device_id") CLDevice device, + @NativeType("cl_program_build_info") int param_name, + @AutoSize(value = "param_value", canBeNull = true) @size_t long param_value_size, + @OutParameter @Check(canBeNull = true) @cl_void ByteBuffer param_value, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("size_t") PointerBuffer param_value_size_ret); + + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_kernel", params = "program") + CLKernel clCreateKernel(@PointerWrapper("cl_program") CLProgram program, + @NullTerminated @Const @cl_char ByteBuffer kernel_name, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + @Alternate("clCreateKernel") + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_kernel", params = "program") + CLKernel clCreateKernel(@PointerWrapper("cl_program") CLProgram program, + @NullTerminated @Const CharSequence kernel_name, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + @Code(javaAfterNative = "\t\tif ( __result == CL_SUCCESS && kernels != null ) program.registerCLKernels(kernels);") + @cl_int + int clCreateKernelsInProgram(@PointerWrapper("cl_program") CLProgram program, + @AutoSize(value = "kernels", canBeNull = true) @cl_uint int num_kernels, + @OutParameter @Check(canBeNull = true) @NativeType("cl_kernel") PointerBuffer kernels, + @OutParameter @Check(value = "1", canBeNull = true) @cl_uint IntBuffer num_kernels_ret); + + @Code(javaAfterNative = "\t\tif ( __result == CL_SUCCESS ) kernel.retain();") + @cl_int + int clRetainKernel(@PointerWrapper("cl_kernel") CLKernel kernel); + + @Code(javaAfterNative = "\t\tif ( __result == CL_SUCCESS ) kernel.release();") + @cl_int + int clReleaseKernel(@PointerWrapper("cl_kernel") CLKernel kernel); + + @GenerateAutos + @cl_int + int clSetKernelArg(@PointerWrapper("cl_kernel") CLKernel kernel, + @cl_uint int arg_index, + @AutoSize("arg_value") @size_t long arg_size, + @Const + @cl_byte + @cl_short + @cl_int + @cl_long + @cl_float + @cl_double Buffer arg_value); + + @Alternate("clSetKernelArg") + @cl_int + int clSetKernelArg(@PointerWrapper("cl_kernel") CLKernel kernel, + @cl_uint int arg_index, + @Constant("PointerBuffer.getPointerSize()") @size_t long arg_size, + @Check(canBeNull = true) @Const + @Constant(value = "APIUtil.getPointerSafe(arg_value)", keepParam = true) CLObject arg_value); + + // This is used by CLKernelUtil. Assumes arg_value.position() == 0. + + @Alternate("clSetKernelArg") + @Private + @cl_int + int clSetKernelArg3(@PointerWrapper("cl_kernel") CLKernel kernel, + @cl_uint int arg_index, + @size_t long arg_size, + @Constant(value = "MemoryUtil.getAddress0(arg_value)", keepParam = true) Buffer arg_value); + + @cl_int + int clGetKernelInfo(@PointerWrapper("cl_kernel") CLKernel kernel, + @NativeType("cl_kernel_info") int param_name, + @AutoSize(value = "param_value", canBeNull = true) @size_t long param_value_size, + @OutParameter @Check(canBeNull = true) @cl_void ByteBuffer param_value, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("size_t") PointerBuffer param_value_size_ret); + + @cl_int + int clGetKernelWorkGroupInfo(@PointerWrapper("cl_kernel") CLKernel kernel, + @PointerWrapper(value = "cl_device_id", canBeNull = true) CLDevice device, + @NativeType("cl_kernel_work_group_info") int param_name, + @AutoSize(value = "param_value", canBeNull = true) @size_t long param_value_size, + @OutParameter @Check(canBeNull = true) @cl_void ByteBuffer param_value, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("size_t") PointerBuffer param_value_size_ret); + + @Code(javaAfterNative = "\t\tif ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event);") + @cl_int + int clEnqueueNDRangeKernel(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @PointerWrapper("cl_kernel") CLKernel kernel, + @cl_uint int work_dim, + @Check(value = "work_dim", canBeNull = true) @Const @NativeType("size_t") PointerBuffer global_work_offset, + @Check(value = "work_dim", canBeNull = true) @Const @NativeType("size_t") PointerBuffer global_work_size, + @Check(value = "work_dim", canBeNull = true) @Const @NativeType("size_t") PointerBuffer local_work_size, + @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, + @Check(canBeNull = true) @Const @NativeType("cl_event") PointerBuffer event_wait_list, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event); + + @Code(javaAfterNative = "\t\tif ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event);") + @cl_int + int clEnqueueTask(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @PointerWrapper("cl_kernel") CLKernel kernel, + @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, + @Check(canBeNull = true) @Const @NativeType("cl_event") PointerBuffer event_wait_list, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event); + + /** + * Enqueues a native kernel to the specified command queue. The mem_list parameter + * can be used to pass a list of CLMem objects that will be mapped to global memory space and + * exposed as a ByteBuffer array in the CLNativeKernel#execute method. The + * sizes parameter will be used to allocate direct ByteBuffers with the correct + * capacities. The user is responsible for passing appropriate values to avoid crashes. + * + * @param command_queue the command queue + * @param user_func the native kernel + * @param mem_list the CLMem objects + * @param sizes the CLMem object sizes + * @param event_wait_list the event wait list + * @param event the queue event + * + * @return the error code + */ + @Code( + tryBlock = true, + // Build the args buffer and create a GlobalRef to the user_func object. + javaBeforeNative = "\t\tlong user_func_ref = CallbackUtil.createGlobalRef(user_func);\n" + + "\t\tByteBuffer args = APIUtil.getNativeKernelArgs(user_func_ref, mem_list, sizes);", + // Register CLEvent + javaAfterNative = "\t\tif ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event);", + // Check if we need to delete the GlobalRef. + javaFinally = "\t\t\tCallbackUtil.checkCallback(__result, user_func_ref);", + nativeAfterVars = "\tvoid **args_mem_loc = num_mem_objects == 0 ? NULL : (void **)malloc(num_mem_objects * sizeof(void *));", + nativeBeforeCall = "\t_ptr_i = 0;\n" + + "\twhile ( _ptr_i < num_mem_objects ) {\n" + + "\t\targs_mem_loc[_ptr_i] = (cl_void *)((char *)args_address + (12 + 4 + _ptr_i * (4 + sizeof(void *))));\n" + + "\t\t_ptr_i++;\n" + + "\t}", + nativeAfterCall = "\tfree(args_mem_loc);" + ) + @cl_int + int clEnqueueNativeKernel(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @PointerWrapper("cl_native_kernel_func") CLNativeKernel user_func, + @Constant("MemoryUtil.getAddress0(args)") @cl_void ByteBuffer args, + @AutoSize("args") @size_t long cb_args, + @Constant("mem_list == null ? 0 : mem_list.length") @cl_uint int num_mem_objects, + @Check(value = "1", canBeNull = true) @PointerArray("num_mem_objects") @Const @NativeType("cl_mem") CLMem[] mem_list, + @Check(value = "mem_list.length", canBeNull = true) @Helper long[] sizes, + @Constant(value = "(const void**)args_mem_loc", isNative = true) @Const @Indirect @cl_void ByteBuffer args_mem_loc, + @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, + @Check(canBeNull = true) @Const @NativeType("cl_event") PointerBuffer event_wait_list, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event); + + @cl_int + int clWaitForEvents(@AutoSize("event_list") @cl_uint int num_events, + @Check("1") @Const @NativeType("cl_event") PointerBuffer event_list); + + @Alternate("clWaitForEvents") + @cl_int + int clWaitForEvents(@Constant("1") @cl_uint int num_events, + @Constant(value = "APIUtil.getPointer(event)", keepParam = true) CLEvent event); + + @cl_int + int clGetEventInfo(@PointerWrapper("cl_event") CLEvent event, + @NativeType("cl_event_info") int param_name, + @AutoSize(value = "param_value", canBeNull = true) @size_t long param_value_size, + @OutParameter @Check(canBeNull = true) @cl_void ByteBuffer param_value, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("size_t") PointerBuffer param_value_size_ret); + + @Code(javaAfterNative = "\t\tif ( __result == CL_SUCCESS ) event.retain();") + @cl_int + int clRetainEvent(@PointerWrapper("cl_event") CLEvent event); + + @Code(javaAfterNative = "\t\tif ( __result == CL_SUCCESS ) event.release();") + @cl_int + int clReleaseEvent(@PointerWrapper("cl_event") CLEvent event); + + @Code(javaAfterNative = "\t\tif ( __result == CL_SUCCESS ) command_queue.registerCLEvent(event);") + @cl_int + int clEnqueueMarker(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @OutParameter @Check("1") @NativeType("cl_event") PointerBuffer event); + + @cl_int + int clEnqueueBarrier(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue); + + @cl_int + int clEnqueueWaitForEvents(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @AutoSize("event_list") @cl_uint int num_events, + @Check("1") @Const @NativeType("cl_event") PointerBuffer event_list); + + @Alternate("clEnqueueWaitForEvents") + @cl_int + int clEnqueueWaitForEvents(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @Constant("1") @cl_uint int num_events, + @Constant(value = "APIUtil.getPointer(event)", keepParam = true) CLEvent event); + + @cl_int + int clGetEventProfilingInfo(@PointerWrapper("cl_event") CLEvent event, + @NativeType("cl_profiling_info") int param_name, + @AutoSize(value = "param_value", canBeNull = true) @size_t long param_value_size, + @OutParameter @Check(canBeNull = true) @cl_void ByteBuffer param_value, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("size_t") PointerBuffer param_value_size_ret); + + @cl_int + int clFlush(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue); + + @cl_int + int clFinish(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue); + + @Private + @PointerWrapper("void *") + CLFunctionAddress clGetExtensionFunctionAddress(@NullTerminated @Const @cl_char ByteBuffer func_name); + + @Alternate("clGetExtensionFunctionAddress") + @Private + @PointerWrapper("void *") + CLFunctionAddress clGetExtensionFunctionAddress(@NullTerminated CharSequence func_name); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/CL10GL.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/CL10GL.java new file mode 100644 index 0000000..ad5e0ab --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/CL10GL.java @@ -0,0 +1,138 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.PointerBuffer; +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opencl.cl_int; +import org.lwjgl.util.generator.opencl.cl_uint; +import org.lwjgl.util.generator.opencl.cl_void; +import org.lwjgl.util.generator.opencl.size_t; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +/** The core OpenCL 1.0 OpenGL interrop functionality. */ +public interface CL10GL { + + /** cl_gl_object_type */ + int CL_GL_OBJECT_BUFFER = 0x2000, + CL_GL_OBJECT_TEXTURE2D = 0x2001, + CL_GL_OBJECT_TEXTURE3D = 0x2002, + CL_GL_OBJECT_RENDERBUFFER = 0x2003; + + /** cl_gl_texture_info */ + int CL_GL_TEXTURE_TARGET = 0x2004, + CL_GL_MIPMAP_LEVEL = 0x2005; + + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_mem", params = "context") + CLMem clCreateFromGLBuffer(@PointerWrapper("cl_context") CLContext context, + @NativeType("cl_mem_flags") long flags, + @NativeType("GLuint") int bufobj, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_mem", params = "context") + CLMem clCreateFromGLTexture2D(@PointerWrapper("cl_context") CLContext context, + @NativeType("cl_mem_flags") long flags, + @NativeType("GLenum") int target, + @NativeType("GLint") int miplevel, + @NativeType("GLuint") int texture, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_mem", params = "context") + CLMem clCreateFromGLTexture3D(@PointerWrapper("cl_context") CLContext context, + @NativeType("cl_mem_flags") long flags, + @NativeType("GLenum") int target, + @NativeType("GLint") int miplevel, + @NativeType("GLuint") int texture, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_mem", params = "context") + CLMem clCreateFromGLRenderbuffer(@PointerWrapper("cl_context") CLContext context, + @NativeType("cl_mem_flags") long flags, + @NativeType("GLuint") int renderbuffer, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + @cl_int + int clGetGLObjectInfo(@PointerWrapper("cl_mem") CLMem memobj, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_gl_object_type") IntBuffer gl_object_type, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("GLuint") IntBuffer gl_object_name); + + @cl_int + int clGetGLTextureInfo(@PointerWrapper("cl_mem") CLMem memobj, + @NativeType("cl_gl_texture_info") int param_name, + @AutoSize(value = "param_value", canBeNull = true) @size_t long param_value_size, + @OutParameter @Check(canBeNull = true) @cl_void ByteBuffer param_value, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("size_t") PointerBuffer param_value_size_ret); + + @Code(javaAfterNative = "\t\tif ( __result == CL10.CL_SUCCESS ) command_queue.registerCLEvent(event);") + @cl_int + int clEnqueueAcquireGLObjects(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @AutoSize("mem_objects") @cl_uint int num_objects, + @Check("1") @Const @NativeType("cl_mem") PointerBuffer mem_objects, + @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, + @Check(canBeNull = true) @Const @NativeType("cl_event") PointerBuffer event_wait_list, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event); + + @Alternate("clEnqueueAcquireGLObjects") + @Code(javaAfterNative = "\t\tif ( __result == CL10.CL_SUCCESS ) command_queue.registerCLEvent(event);") + @cl_int + int clEnqueueAcquireGLObjects(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @Constant("1") @cl_uint int num_objects, + @Constant(value = "APIUtil.getPointer(mem_object)", keepParam = true) CLMem mem_object, + @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, + @Check(canBeNull = true) @Const @NativeType("cl_event") PointerBuffer event_wait_list, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event); + + @Code(javaAfterNative = "\t\tif ( __result == CL10.CL_SUCCESS ) command_queue.registerCLEvent(event);") + @cl_int + int clEnqueueReleaseGLObjects(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @AutoSize("mem_objects") @cl_uint int num_objects, + @Check("1") @Const @NativeType("cl_mem") PointerBuffer mem_objects, + @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, + @Check(canBeNull = true) @Const @NativeType("cl_event") PointerBuffer event_wait_list, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event); + + @Alternate("clEnqueueReleaseGLObjects") + @Code(javaAfterNative = "\t\tif ( __result == CL10.CL_SUCCESS ) command_queue.registerCLEvent(event);") + @cl_int + int clEnqueueReleaseGLObjects(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @Constant("1") @cl_uint int num_objects, + @Constant(value = "APIUtil.getPointer(mem_object)", keepParam = true) CLMem mem_object, + @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, + @Check(canBeNull = true) @Const @NativeType("cl_event") PointerBuffer event_wait_list, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event); +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/CL11.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/CL11.java new file mode 100644 index 0000000..a2c8710 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/CL11.java @@ -0,0 +1,204 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.PointerBuffer; +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opencl.*; + +import java.nio.Buffer; +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +/** The core OpenCL 1.1 API */ +public interface CL11 { + + /** Error Codes */ + int CL_MISALIGNED_SUB_BUFFER_OFFSET = -13, + CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST = -14, + CL_INVALID_PROPERTY = -64; + + /** OpenCL Version */ + int CL_VERSION_1_1 = 1; + + /** cl_device_info */ + int CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF = 0x1034, + CL_DEVICE_HOST_UNIFIED_MEMORY = 0x1035, + CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR = 0x1036, + CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT = 0x1037, + CL_DEVICE_NATIVE_VECTOR_WIDTH_INT = 0x1038, + CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG = 0x1039, + CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT = 0x103A, + CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE = 0x103B, + CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF = 0x103C, + CL_DEVICE_OPENCL_C_VERSION = 0x103D; + + /** cl_device_fp_config - bitfield */ + int CL_FP_SOFT_FLOAT = (1 << 6); + + /** cl_context_info */ + int CL_CONTEXT_NUM_DEVICES = 0x1083; + + /** cl_channel_order */ + int CL_Rx = 0x10BA, + CL_RGx = 0x10BB, + CL_RGBx = 0x10BC; + + /** cl_mem_info */ + int CL_MEM_ASSOCIATED_MEMOBJECT = 0x1107, + CL_MEM_OFFSET = 0x1108; + + /** cl_addressing_mode */ + int CL_ADDRESS_MIRRORED_REPEAT = 0x1134; + + /** cl_kernel_work_group_info */ + int CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE = 0x11B3, + CL_KERNEL_PRIVATE_MEM_SIZE = 0x11B4; + + /** cl_event_info */ + int CL_EVENT_CONTEXT = 0x11D4; + + /** cl_command_type */ + int CL_COMMAND_READ_BUFFER_RECT = 0x1201, + CL_COMMAND_WRITE_BUFFER_RECT = 0x1202, + CL_COMMAND_COPY_BUFFER_RECT = 0x1203, + CL_COMMAND_USER = 0x1204; + + /** cl_buffer_create_type */ + int CL_BUFFER_CREATE_TYPE_REGION = 0x1220; + + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_mem", factory = "CLMem.create", params = "buffer.getParent()") + CLMem clCreateSubBuffer(@PointerWrapper("cl_mem") CLMem buffer, + @NativeType("cl_mem_flags") long flags, + @NativeType("cl_buffer_create_type") int buffer_create_type, + @Const @Check("2 * PointerBuffer.getPointerSize()") @NativeType("cl_void") ByteBuffer buffer_create_info, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + @Code( + tryBlock = true, + // Create a GlobalRef to the callback object. + javaBeforeNative = "\t\tlong user_data = CallbackUtil.createGlobalRef(pfn_notify);", + // Check if we need to delete the GlobalRef. + javaFinally = "\t\t\tCallbackUtil.checkCallback(__result, user_data);" + ) + @cl_int + int clSetMemObjectDestructorCallback(@PointerWrapper("cl_mem") CLMem memobj, + @PointerWrapper("cl_mem_object_destructor_callback") CLMemObjectDestructorCallback pfn_notify, + @Constant("user_data") @PointerWrapper("void *") long user_data); + + @Code(javaAfterNative = "\t\tif ( __result == CL10.CL_SUCCESS ) command_queue.registerCLEvent(event);") + @cl_int + int clEnqueueReadBufferRect(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @PointerWrapper("cl_mem") CLMem buffer, + @cl_bool int blocking_read, + @Const @Check("3") @NativeType("size_t") PointerBuffer buffer_offset, + @Const @Check("3") @NativeType("size_t") PointerBuffer host_offset, + @Const @Check("3") @NativeType("size_t") PointerBuffer region, + @size_t long buffer_row_pitch, + @size_t long buffer_slice_pitch, + @size_t long host_row_pitch, + @size_t long host_slice_pitch, + @OutParameter @Check("CLChecks.calculateBufferRectSize(host_offset, region, host_row_pitch, host_slice_pitch)") + @cl_byte + @cl_short + @cl_int + @cl_long + @cl_float + @cl_double Buffer ptr, + @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, + @Const @Check(canBeNull = true) @NativeType("cl_event") PointerBuffer event_wait_list, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event); + + @Code(javaAfterNative = "\t\tif ( __result == CL10.CL_SUCCESS ) command_queue.registerCLEvent(event);") + @cl_int + int clEnqueueWriteBufferRect(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @PointerWrapper("cl_mem") CLMem buffer, + @cl_bool int blocking_write, + @Const @Check("3") @NativeType("size_t") PointerBuffer buffer_offset, + @Const @Check("3") @NativeType("size_t") PointerBuffer host_offset, + @Const @Check("3") @NativeType("size_t") PointerBuffer region, + @size_t long buffer_row_pitch, + @size_t long buffer_slice_pitch, + @size_t long host_row_pitch, + @size_t long host_slice_pitch, + @Const @Check("CLChecks.calculateBufferRectSize(host_offset, region, host_row_pitch, host_slice_pitch)") + @cl_byte + @cl_short + @cl_int + @cl_long + @cl_float + @cl_double Buffer ptr, + @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, + @Const @Check(canBeNull = true) @NativeType("cl_event") PointerBuffer event_wait_list, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event); + + @Code(javaAfterNative = "\t\tif ( __result == CL10.CL_SUCCESS ) command_queue.registerCLEvent(event);") + @cl_int + int clEnqueueCopyBufferRect(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @PointerWrapper("cl_mem") CLMem src_buffer, + @PointerWrapper("cl_mem") CLMem dst_buffer, + @Const @Check("3") @NativeType("size_t") PointerBuffer src_origin, + @Const @Check("3") @NativeType("size_t") PointerBuffer dst_origin, + @Const @Check("3") @NativeType("size_t") PointerBuffer region, + @size_t long src_row_pitch, + @size_t long src_slice_pitch, + @size_t long dst_row_pitch, + @size_t long dst_slice_pitch, + @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, + @Const @Check(canBeNull = true) @NativeType("cl_event") PointerBuffer event_wait_list, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event); + + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_event", params = "context") + CLEvent clCreateUserEvent(@PointerWrapper("cl_context") CLContext context, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + @cl_int + int clSetUserEventStatus(@PointerWrapper("cl_event") CLEvent event, + @cl_int int execution_status); + + @Code( + tryBlock = true, + // Create a GlobalRef to the callback object. + javaBeforeNative = "\t\tlong user_data = CallbackUtil.createGlobalRef(pfn_notify);\n" + + "\t\tpfn_notify.setRegistry(event.getParentRegistry());", + // Check if we need to delete the GlobalRef. + javaFinally = "\t\t\tCallbackUtil.checkCallback(__result, user_data);" + ) + @cl_int + int clSetEventCallback(@PointerWrapper("cl_event") CLEvent event, + @cl_int int command_exec_callback_type, + @PointerWrapper("cl_event_callback") CLEventCallback pfn_notify, + @Constant("user_data") @PointerWrapper("void *") long user_data); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/CL12.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/CL12.java new file mode 100644 index 0000000..2dcc3ab --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/CL12.java @@ -0,0 +1,454 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.PointerBuffer; +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opencl.*; + +import java.nio.Buffer; +import java.nio.ByteBuffer; +import java.nio.IntBuffer; +import java.nio.LongBuffer; + +/** The core OpenCL 1.1 API */ +public interface CL12 { + + /** Error Codes */ + int CL_COMPILE_PROGRAM_FAILURE = -15, + CL_LINKER_NOT_AVAILABLE = -16, + CL_LINK_PROGRAM_FAILURE = -17, + CL_DEVICE_PARTITION_FAILED = -18, + CL_KERNEL_ARG_INFO_NOT_AVAILABLE = -19, + CL_INVALID_IMAGE_DESCRIPTOR = -65, + CL_INVALID_COMPILER_OPTIONS = -66, + CL_INVALID_LINKER_OPTIONS = -67, + CL_INVALID_DEVICE_PARTITION_COUNT = -68; + + /** OpenCL Version */ + int CL_VERSION_1_2 = 1; + + /** cl_bool */ + int CL_BLOCKING = CL10.CL_TRUE, + CL_NON_BLOCKING = CL10.CL_FALSE; + + /** cl_device_type - bitfield */ + int CL_DEVICE_TYPE_CUSTOM = (1 << 4); + + /* cl_device_info */ + int CL_DEVICE_DOUBLE_FP_CONFIG = 0x1032, + CL_DEVICE_LINKER_AVAILABLE = 0x103E, + CL_DEVICE_BUILT_IN_KERNELS = 0x103F, + CL_DEVICE_IMAGE_MAX_BUFFER_SIZE = 0x1040, + CL_DEVICE_IMAGE_MAX_ARRAY_SIZE = 0x1041, + CL_DEVICE_PARENT_DEVICE = 0x1042, + CL_DEVICE_PARTITION_MAX_SUB_DEVICES = 0x1043, + CL_DEVICE_PARTITION_PROPERTIES = 0x1044, + CL_DEVICE_PARTITION_AFFINITY_DOMAIN = 0x1045, + CL_DEVICE_PARTITION_TYPE = 0x1046, + CL_DEVICE_REFERENCE_COUNT = 0x1047, + CL_DEVICE_PREFERRED_INTEROP_USER_SYNC = 0x1048, + CL_DEVICE_PRINTF_BUFFER_SIZE = 0x1049; + + /* cl_device_fp_config - bitfield */ + int CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT = (1 << 7); + + /* cl_context_properties */ + int CL_CONTEXT_INTEROP_USER_SYNC = 0x1085; + + /* cl_device_partition_property */ + int CL_DEVICE_PARTITION_EQUALLY = 0x1086, + CL_DEVICE_PARTITION_BY_COUNTS = 0x1087, + CL_DEVICE_PARTITION_BY_COUNTS_LIST_END = 0x0, + CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN = 0x1088; + + /* cl_device_affinity_domain */ + int CL_DEVICE_AFFINITY_DOMAIN_NUMA = (1 << 0), + CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE = (1 << 1), + CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE = (1 << 2), + CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE = (1 << 3), + CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE = (1 << 4), + CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE = (1 << 5); + + /* cl_mem_flags - bitfield */ + int CL_MEM_HOST_WRITE_ONLY = (1 << 7), + CL_MEM_HOST_READ_ONLY = (1 << 8), + CL_MEM_HOST_NO_ACCESS = (1 << 9); + + /* cl_mem_migration_flags - bitfield */ + int CL_MIGRATE_MEM_OBJECT_HOST = (1 << 0), + CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED = (1 << 1); + + /* cl_mem_object_type */ + int CL_MEM_OBJECT_IMAGE2D_ARRAY = 0x10F3, + CL_MEM_OBJECT_IMAGE1D = 0x10F4, + CL_MEM_OBJECT_IMAGE1D_ARRAY = 0x10F5, + CL_MEM_OBJECT_IMAGE1D_BUFFER = 0x10F6; + + /* cl_image_info */ + int CL_IMAGE_ARRAY_SIZE = 0x1117, + CL_IMAGE_BUFFER = 0x1118, + CL_IMAGE_NUM_MIP_LEVELS = 0x1119, + CL_IMAGE_NUM_SAMPLES = 0x111A; + + /* cl_map_flags - bitfield */ + int CL_MAP_WRITE_INVALIDATE_REGION = (1 << 2); + + /* cl_program_info */ + int CL_PROGRAM_NUM_KERNELS = 0x1167, + CL_PROGRAM_KERNEL_NAMES = 0x1168; + + /* cl_program_build_info */ + int CL_PROGRAM_BINARY_TYPE = 0x1184; + + /* cl_program_binary_type */ + int CL_PROGRAM_BINARY_TYPE_NONE = 0x0, + CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT = 0x1, + CL_PROGRAM_BINARY_TYPE_LIBRARY = 0x2, + CL_PROGRAM_BINARY_TYPE_EXECUTABLE = 0x4; + + /* cl_kernel_info */ + int CL_KERNEL_ATTRIBUTES = 0x1195; + + /* cl_kernel_arg_info */ + int CL_KERNEL_ARG_ADDRESS_QUALIFIER = 0x1196, + CL_KERNEL_ARG_ACCESS_QUALIFIER = 0x1197, + CL_KERNEL_ARG_TYPE_NAME = 0x1198, + CL_KERNEL_ARG_TYPE_QUALIFIER = 0x1199, + CL_KERNEL_ARG_NAME = 0x119A; + + /* cl_kernel_arg_address_qualifier */ + int CL_KERNEL_ARG_ADDRESS_GLOBAL = 0x119A, + CL_KERNEL_ARG_ADDRESS_LOCAL = 0x119B, + CL_KERNEL_ARG_ADDRESS_CONSTANT = 0x119C, + CL_KERNEL_ARG_ADDRESS_PRIVATE = 0x119D; + + /* cl_kernel_arg_access_qualifier */ + int CL_KERNEL_ARG_ACCESS_READ_ONLY = 0x11A0, + CL_KERNEL_ARG_ACCESS_WRITE_ONLY = 0x11A1, + CL_KERNEL_ARG_ACCESS_READ_WRITE = 0x11A2, + CL_KERNEL_ARG_ACCESS_NONE = 0x11A3; + + /* cl_kernel_arg_type_qualifer */ + int CL_KERNEL_ARG_TYPE_NONE = 0, + CL_KERNEL_ARG_TYPE_CONST = (1 << 0), + CL_KERNEL_ARG_TYPE_RESTRICT = (1 << 1), + CL_KERNEL_ARG_TYPE_VOLATILE = (1 << 2); + + /* cl_kernel_work_group_info */ + int CL_KERNEL_GLOBAL_WORK_SIZE = 0x11B5; + + /* cl_command_type */ + int CL_COMMAND_BARRIER = 0x1205, + CL_COMMAND_MIGRATE_MEM_OBJECTS = 0x1206, + CL_COMMAND_FILL_BUFFER = 0x1207, + CL_COMMAND_FILL_IMAGE = 0x1208; + + @Code(javaAfterNative = "\t\tif ( __result == CL10.CL_SUCCESS ) device.retain();") + @cl_int + int clRetainDevice(@PointerWrapper("cl_device_id") CLDevice device); + + /** + * Warning: LWJGL will not automatically release any objects associated with sub-devices. + * The user is responsible for tracking and releasing everything prior to calling this method. + * + * @param device the parent CLDevice + * + * @return the error code + */ + @Code( + javaBeforeNative = "\t\tAPIUtil.releaseObjects(device);", + javaAfterNative = "\t\tif ( __result == CL10.CL_SUCCESS ) device.release();" + ) + @cl_int + int clReleaseDevice(@PointerWrapper("cl_device_id") CLDevice device); + + @Code(javaAfterNative = "\t\tif ( __result == CL10.CL_SUCCESS && out_devices != null ) in_device.registerSubCLDevices(out_devices);") + @cl_int + int clCreateSubDevices( + @PointerWrapper("cl_device_id") CLDevice in_device, + @NullTerminated @Const @NativeType("cl_device_partition_property") LongBuffer properties, + @AutoSize(value = "out_devices", canBeNull = true) @cl_uint int num_devices, + @OutParameter @Check(canBeNull = true) @NativeType("cl_device_id") PointerBuffer out_devices, + @OutParameter @Check(value = "1", canBeNull = true) @cl_uint IntBuffer num_devices_ret); + + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_mem", params = "context") + CLMem clCreateImage(@PointerWrapper("cl_context") CLContext context, + @NativeType("cl_mem_flags") long flags, + @Check("2 * 4") @Const @NativeType("cl_image_format") ByteBuffer image_format, + // On x64 there's 4 byte padding after image_type (to align image_width) + @Check("7 * PointerBuffer.getPointerSize() + 2 * 4 + PointerBuffer.getPointerSize()") @Const @NativeType("cl_image_desc") ByteBuffer image_desc, + @Check(canBeNull = true) + @cl_byte + @cl_short + @cl_int + @cl_float Buffer host_ptr, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_program", params = "context") + CLProgram clCreateProgramWithBuiltInKernels(@PointerWrapper("cl_context") CLContext context, + @AutoSize("device_list") @cl_uint int num_devices, + @Check("1") @Const @NativeType("cl_device_id") PointerBuffer device_list, + @Check @Const @cl_char ByteBuffer kernel_names, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + @Alternate("clCreateProgramWithBuiltInKernels") + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_program", params = "context") + CLProgram clCreateProgramWithBuiltInKernels(@PointerWrapper("cl_context") CLContext context, + @AutoSize("device_list") @cl_uint int num_devices, + @Check("1") @Const @NativeType("cl_device_id") PointerBuffer device_list, + CharSequence kernel_names, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + + /** Single null-terminated header include name. */ + @Code( + tryBlock = true, + // Create a GlobalRef to the callback object. + javaBeforeNative = "\t\tlong user_data = CallbackUtil.createGlobalRef(pfn_notify);\n" + + "\t\tif ( pfn_notify != null ) pfn_notify.setContext(program.getParent());", + // Check if we need to delete the GlobalRef. + javaFinally = "\t\t\tCallbackUtil.checkCallback(__result, user_data);" + ) + @cl_int + int clCompileProgram(@PointerWrapper("cl_program") CLProgram program, + @AutoSize(value = "device_list", canBeNull = true) @cl_uint int num_devices, + @Check(canBeNull = true) @Const @NativeType("cl_device_id") PointerBuffer device_list, + @Check @NullTerminated @Const @cl_char ByteBuffer options, + @Constant("1") @cl_uint int num_input_headers, + @Check("1") @Const @NativeType("cl_program") PointerBuffer input_header, + @NullTerminated @Check @Const @cl_char @Indirect ByteBuffer header_include_name, + @PointerWrapper(value = "cl_program_callback", canBeNull = true) CLCompileProgramCallback pfn_notify, + @Constant("user_data") @PointerWrapper("void *") long user_data); + + /** Multiple null-terminated header include names, one after the other. */ + @Alternate(value = "clCompileProgram", nativeAlt = true, javaAlt = true) + @Code( + tryBlock = true, + // Create a GlobalRef to the callback object. + javaBeforeNative = "\t\tlong user_data = CallbackUtil.createGlobalRef(pfn_notify);\n" + + "\t\tif ( pfn_notify != null ) pfn_notify.setContext(program.getParent());", + // Check if we need to delete the GlobalRef. + javaFinally = "\t\t\tCallbackUtil.checkCallback(__result, user_data);" + ) + @cl_int + int clCompileProgramMulti(@PointerWrapper("cl_program") CLProgram program, + @AutoSize(value = "device_list", canBeNull = true) @cl_uint int num_devices, + @Check(canBeNull = true) @Const @NativeType("cl_device_id") PointerBuffer device_list, + @Check @NullTerminated @Const @cl_char ByteBuffer options, + @AutoSize("input_headers") @cl_uint int num_input_headers, + @Check("1") @Const @NativeType("cl_program") PointerBuffer input_headers, + @NullTerminated("input_headers.remaining()") @Check @Const @Indirect @cl_char @PointerArray("num_input_headers") ByteBuffer header_include_names, + @PointerWrapper(value = "cl_program_callback", canBeNull = true) CLCompileProgramCallback pfn_notify, + @Constant("user_data") @PointerWrapper("void *") long user_data); + + @Alternate(value = "clCompileProgram", nativeAlt = true) + @Code( + tryBlock = true, + // Create a GlobalRef to the callback object. + javaBeforeNative = "\t\tlong user_data = CallbackUtil.createGlobalRef(pfn_notify);\n" + + "\t\tif ( pfn_notify != null ) pfn_notify.setContext(program.getParent());", + // Check if we need to delete the GlobalRef. + javaFinally = "\t\t\tCallbackUtil.checkCallback(__result, user_data);" + ) + @cl_int + int clCompileProgram3(@PointerWrapper("cl_program") CLProgram program, + @AutoSize(value = "device_list", canBeNull = true) @cl_uint int num_devices, + @Check(canBeNull = true) @Const @NativeType("cl_device_id") PointerBuffer device_list, + @Check @NullTerminated @Const @cl_char ByteBuffer options, + @Constant("header_include_names.length") @cl_uint int num_input_headers, + @Check("header_include_names.length") @Const @NativeType("cl_program") PointerBuffer input_headers, + @NullTerminated @Check("1") @PointerArray(value = "num_input_headers") @Const @NativeType("cl_char") ByteBuffer[] header_include_names, + @PointerWrapper(value = "cl_program_callback", canBeNull = true) CLCompileProgramCallback pfn_notify, + @Constant("user_data") @PointerWrapper("void *") long user_data); + + @Alternate("clCompileProgram") + @Code( + tryBlock = true, + // Create a GlobalRef to the callback object. + javaBeforeNative = "\t\tlong user_data = CallbackUtil.createGlobalRef(pfn_notify);\n" + + "\t\tif ( pfn_notify != null ) pfn_notify.setContext(program.getParent());", + // Check if we need to delete the GlobalRef. + javaFinally = "\t\t\tCallbackUtil.checkCallback(__result, user_data);" + ) + @cl_int + int clCompileProgram(@PointerWrapper("cl_program") CLProgram program, + @AutoSize(value = "device_list", canBeNull = true) @cl_uint int num_devices, + @Check(canBeNull = true) @Const @NativeType("cl_device_id") PointerBuffer device_list, + @NullTerminated CharSequence options, + @Constant("1") @cl_uint int num_input_headers, + @Check("1") @Const @NativeType("cl_program") PointerBuffer input_header, + @NullTerminated @Const CharSequence header_include_name, + @PointerWrapper(value = "cl_program_callback", canBeNull = true) CLCompileProgramCallback pfn_notify, + @Constant("user_data") @PointerWrapper("void *") long user_data); + + @Alternate(value = "clCompileProgram", nativeAlt = true, skipNative = true) + @Code( + tryBlock = true, + // Create a GlobalRef to the callback object. + javaBeforeNative = "\t\tlong user_data = CallbackUtil.createGlobalRef(pfn_notify);\n" + + "\t\tif ( pfn_notify != null ) pfn_notify.setContext(program.getParent());", + // Check if we need to delete the GlobalRef. + javaFinally = "\t\t\tCallbackUtil.checkCallback(__result, user_data);" + ) + @cl_int + int clCompileProgramMulti(@PointerWrapper("cl_program") CLProgram program, + @AutoSize(value = "device_list", canBeNull = true) @cl_uint int num_devices, + @Check(canBeNull = true) @Const @NativeType("cl_device_id") PointerBuffer device_list, + @NullTerminated CharSequence options, + @AutoSize("input_header") @cl_uint int num_input_headers, + @Check("1") @Const @NativeType("cl_program") PointerBuffer input_header, + @NullTerminated @PointerArray(value = "num_input_headers") @Const CharSequence[] header_include_name, + @PointerWrapper(value = "cl_program_callback", canBeNull = true) CLCompileProgramCallback pfn_notify, + @Constant("user_data") @PointerWrapper("void *") long user_data); + + @Code( + tryBlock = true, + // Create a GlobalRef to the callback object. + javaBeforeNative = "\t\tlong user_data = CallbackUtil.createGlobalRef(pfn_notify);\n" + + "\t\tif ( pfn_notify != null ) pfn_notify.setContext(context);", + // Check if we need to delete the GlobalRef. + javaFinally = "\t\t\tCallbackUtil.checkCallback(errcode_ret.get(errcode_ret.position()), user_data);" + ) + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_program", params = "context") + CLProgram clLinkProgram(@PointerWrapper("cl_context") CLContext context, + @AutoSize(value = "device_list", canBeNull = true) @cl_uint int num_devices, + @Check(canBeNull = true) @Const @NativeType("cl_device_id") PointerBuffer device_list, + @NullTerminated @Check @Const @cl_char ByteBuffer options, + @AutoSize("input_programs") @cl_uint int num_input_programs, + @Check @Const @NativeType("cl_program") PointerBuffer input_programs, + @PointerWrapper(value = "cl_program_callback", canBeNull = true) CLLinkProgramCallback pfn_notify, + @Constant("user_data") @PointerWrapper("void *") long user_data, + @OutParameter @Check("1") @cl_int IntBuffer errcode_ret); + + @Alternate("clLinkProgram") + @Code( + tryBlock = true, + // Create a GlobalRef to the callback object. + javaBeforeNative = "\t\tlong user_data = CallbackUtil.createGlobalRef(pfn_notify);\n" + + "\t\tif ( pfn_notify != null ) pfn_notify.setContext(context);", + // Check if we need to delete the GlobalRef. + javaFinally = "\t\t\tCallbackUtil.checkCallback(errcode_ret.get(errcode_ret.position()), user_data);" + ) + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_program", params = "context") + CLProgram clLinkProgram(@PointerWrapper("cl_context") CLContext context, + @AutoSize(value = "device_list", canBeNull = true) @cl_uint int num_devices, + @Check(canBeNull = true) @Const @NativeType("cl_device_id") PointerBuffer device_list, + @NullTerminated CharSequence options, + @AutoSize("input_programs") @cl_uint int num_input_programs, + @Check @Const @NativeType("cl_program") PointerBuffer input_programs, + @PointerWrapper(value = "cl_program_callback", canBeNull = true) CLLinkProgramCallback pfn_notify, + @Constant("user_data") @PointerWrapper("void *") long user_data, + @OutParameter @Check("1") @cl_int IntBuffer errcode_ret); + + @cl_int + int clUnloadPlatformCompiler(@PointerWrapper("cl_platform_id") CLPlatform platform); + + @cl_int + int clGetKernelArgInfo(@PointerWrapper("cl_kernel") CLKernel kernel, + @cl_uint int arg_indx, + @NativeType("cl_kernel_arg_info") int param_name, + @AutoSize(value = "param_value", canBeNull = true) @size_t long param_value_size, + @OutParameter @Check(canBeNull = true) @cl_void ByteBuffer param_value, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("size_t") PointerBuffer param_value_size_ret); + + @cl_int + int clEnqueueFillBuffer(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @PointerWrapper("cl_mem") CLMem buffer, + @Check @Const @cl_void ByteBuffer pattern, + @AutoSize("pattern") @size_t long pattern_size, + @size_t long offset, + @size_t long size, + @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, + @Check(canBeNull = true) @Const @NativeType("cl_event") PointerBuffer event_wait_list, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event); + + @cl_int + int clEnqueueFillImage(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @PointerWrapper("cl_mem") CLMem image, + @Check("4 * 4") @Const @cl_void ByteBuffer fill_color, + @Check("3") @Const @NativeType("size_t") PointerBuffer origin, + @Check("3") @Const @NativeType("size_t") PointerBuffer region, + @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, + @Check(canBeNull = true) @Const @NativeType("cl_event") PointerBuffer event_wait_list, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event); + + @cl_int + int clEnqueueMigrateMemObjects(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @AutoSize("mem_objects") @cl_uint int num_mem_objects, + @Check @Const @NativeType("cl_mem") PointerBuffer mem_objects, + @NativeType("cl_mem_migration_flags") long flags, + @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, + @Check(canBeNull = true) @Const @NativeType("cl_event") PointerBuffer event_wait_list, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event); + + @cl_int + int clEnqueueMarkerWithWaitList(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, + @Check(canBeNull = true) @Const @NativeType("cl_event") PointerBuffer event_wait_list, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event); + + @cl_int + int clEnqueueBarrierWithWaitList(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, + @Check(canBeNull = true) @Const @NativeType("cl_event") PointerBuffer event_wait_list, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event); + + @Optional(reason = "Missing from AMD CL 1.2 preview drivers.") + @Code( + tryBlock = true, + // Create a GlobalRef to the callback object. + javaBeforeNative = "\t\tlong user_data = CallbackUtil.createGlobalRef(pfn_notify);", + // Check if we need to delete the GlobalRef. + javaFinally = "\t\t\tcontext.setPrintfCallback(user_data, __result);" + ) + @cl_int + int clSetPrintfCallback(@PointerWrapper("cl_context") CLContext context, + @PointerWrapper("cl_printf_callback") CLPrintfCallback pfn_notify, + @Constant("user_data") @PointerWrapper("void *") long user_data); + + @Private + @PointerWrapper("void *") + CLFunctionAddress clGetExtensionFunctionAddressForPlatform(@PointerWrapper("cl_platform_id") CLPlatform platform, + @NullTerminated @Const @cl_char ByteBuffer func_name); + + @Alternate("clGetExtensionFunctionAddressForPlatform") + @Private + @PointerWrapper("void *") + CLFunctionAddress clGetExtensionFunctionAddressForPlatform(@PointerWrapper("cl_platform_id") CLPlatform platform, + @NullTerminated CharSequence func_name); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/CL12GL.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/CL12GL.java new file mode 100644 index 0000000..1e6a9fc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/CL12GL.java @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.Check; +import org.lwjgl.util.generator.NativeType; +import org.lwjgl.util.generator.OutParameter; +import org.lwjgl.util.generator.PointerWrapper; +import org.lwjgl.util.generator.opencl.cl_int; + +import java.nio.IntBuffer; + +/** The core OpenCL 1.2 OpenGL interrop functionality. */ +public interface CL12GL { + + /* cl_gl_object_type */ + int CL_GL_OBJECT_TEXTURE2D_ARRAY = 0x200E, + CL_GL_OBJECT_TEXTURE1D = 0x200F, + CL_GL_OBJECT_TEXTURE1D_ARRAY = 0x2010, + CL_GL_OBJECT_TEXTURE_BUFFER = 0x2011; + + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_mem", params = "context") + CLMem clCreateFromGLTexture(@PointerWrapper("cl_context") CLContext context, + @NativeType("cl_mem_flags") long flags, + @NativeType("GLenum") int target, + @NativeType("GLint") int miplevel, + @NativeType("GLuint") int texture, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/EXT_atomic_counters_32.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/EXT_atomic_counters_32.java new file mode 100644 index 0000000..a4bfb85 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/EXT_atomic_counters_32.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface EXT_atomic_counters_32 { + + /** CLDevice query: Max number of atomic counters that can be used by a kernel. */ + int CL_DEVICE_MAX_ATOMIC_COUNTERS_EXT = 0x4032; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/EXT_atomic_counters_64.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/EXT_atomic_counters_64.java new file mode 100644 index 0000000..1e239ad --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/EXT_atomic_counters_64.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface EXT_atomic_counters_64 { + + /** CLDevice query: Max number of atomic counters that can be used by a kernel. */ + int CL_DEVICE_MAX_ATOMIC_COUNTERS_EXT = 0x4032; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/EXT_device_fission.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/EXT_device_fission.java new file mode 100644 index 0000000..4022cd3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/EXT_device_fission.java @@ -0,0 +1,143 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.PointerBuffer; +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opencl.CLDeviceExtension; +import org.lwjgl.util.generator.opencl.cl_int; +import org.lwjgl.util.generator.opencl.cl_uint; + +import java.nio.IntBuffer; +import java.nio.LongBuffer; + +@CLDeviceExtension +public interface EXT_device_fission { + + /** + * Accepted as a property name in the <properties> parameter of + * clCreateSubDeviceEXT: + */ + int CL_DEVICE_PARTITION_EQUALLY_EXT = 0x4050, + CL_DEVICE_PARTITION_BY_COUNTS_EXT = 0x4051, + CL_DEVICE_PARTITION_BY_NAMES_EXT = 0x4052, + CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN_EXT = 0x4053; + + /** + * Accepted as a property name, when accompanying the + * CL_DEVICE_PARITION_BY_AFFINITY_DOMAIN_EXT property, in the <properties> + * parameter of clCreateSubDeviceEXT: + */ + int CL_AFFINITY_DOMAIN_L1_CACHE_EXT = 0x1, + CL_AFFINITY_DOMAIN_L2_CACHE_EXT = 0x2, + CL_AFFINITY_DOMAIN_L3_CACHE_EXT = 0x3, + CL_AFFINITY_DOMAIN_L4_CACHE_EXT = 0x4, + CL_AFFINITY_DOMAIN_NUMA_EXT = 0x10, + CL_AFFINITY_DOMAIN_NEXT_FISSIONABLE_EXT = 0x100; + + /** + * Accepted as a property being queried in the <param_name> argument of + * clGetDeviceInfo: + */ + int CL_DEVICE_PARENT_DEVICE_EXT = 0x4054, + CL_DEVICE_PARITION_TYPES_EXT = 0x4055, + CL_DEVICE_AFFINITY_DOMAINS_EXT = 0x4056, + CL_DEVICE_REFERENCE_COUNT_EXT = 0x4057, + CL_DEVICE_PARTITION_STYLE_EXT = 0x4058; + + /** + * Accepted as the property list terminator in the <properties> parameter of + * clCreateSubDeviceEXT: + */ + int CL_PROPERTIES_LIST_END_EXT = 0x0; + + /** + * Accepted as the partition counts list terminator in the <properties> + * parameter of clCreateSubDeviceEXT: + */ + int CL_PARTITION_BY_COUNTS_LIST_END_EXT = 0x0; + + /** + * Accepted as the partition names list terminator in the <properties> + * parameter of clCreateSubDeviceEXT: + */ + int CL_PARTITION_BY_NAMES_LIST_END_EXT = -1; + + /** + * Returned by clCreateSubDevicesEXT when the indicated partition scheme is + * supported by the implementation, but the implementation can not further + * partition the device in this way. + */ + int CL_DEVICE_PARTITION_FAILED_EXT = -1057; + + /** + * Returned by clCreateSubDevicesEXT when the total number of compute units + * requested exceeds CL_DEVICE_MAX_COMPUTE_UNITS, or the number of compute + * units for any one sub-device is less than 1. + */ + int CL_INVALID_PARTITION_COUNT_EXT = -1058; + + /** + * Returned by clCreateSubDevicesEXT when a compute unit name appearing in a + * name list following CL_DEVICE_PARTITION_BY_NAMES_EXT is not in range. + */ + int CL_INVALID_PARTITION_NAME_EXT = -1059; + + @Code(javaAfterNative = "\t\tif ( __result == CL10.CL_SUCCESS ) device.retain();") + @cl_int + int clRetainDeviceEXT(@PointerWrapper("cl_device_id") CLDevice device); + + /** + * Warning: LWJGL will not automatically release any objects associated with sub-devices. + * The user is responsible for tracking and releasing everything prior to calling this method. + * + * @param device the parent CLDevice + * + * @return the error code + */ + @Code( + javaBeforeNative = "\t\tAPIUtil.releaseObjects(device);", + javaAfterNative = "\t\tif ( __result == CL10.CL_SUCCESS ) device.release();" + ) + @cl_int + int clReleaseDeviceEXT(@PointerWrapper("cl_device_id") CLDevice device); + + @Code(javaAfterNative = "\t\tif ( __result == CL10.CL_SUCCESS && out_devices != null ) in_device.registerSubCLDevices(out_devices);") + @cl_int + int clCreateSubDevicesEXT( + @PointerWrapper("cl_device_id") CLDevice in_device, + @NullTerminated @Const @NativeType("cl_device_partition_property_ext") LongBuffer properties, + @AutoSize(value = "out_devices", canBeNull = true) @cl_uint int num_entries, + @OutParameter @Check(canBeNull = true) @NativeType("cl_device_id") PointerBuffer out_devices, + @OutParameter @Check(value = "1", canBeNull = true) @cl_uint IntBuffer num_devices); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/EXT_migrate_memobject.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/EXT_migrate_memobject.java new file mode 100644 index 0000000..76f272c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/EXT_migrate_memobject.java @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.PointerBuffer; +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opencl.CLDeviceExtension; +import org.lwjgl.util.generator.opencl.cl_bitfield; +import org.lwjgl.util.generator.opencl.cl_int; +import org.lwjgl.util.generator.opencl.cl_uint; + +@CLDeviceExtension +public interface EXT_migrate_memobject { + + /** + * Besides a value of zero, the following cl_mem_migration_flags_ext values are + * allowed: + */ + int CL_MIGRATE_MEM_OBJECT_HOST_EXT = 0x1; + + /** + * Returned in the <param_value> parameter of the clGetEventInfo when + * <param_name> is CL_EVENT_COMMAND_TYPE: + */ + int CL_COMMAND_MIGRATE_MEM_OBJECT_EXT = 0x4040; + + @Code(javaAfterNative = "\t\tif ( __result == CL10.CL_SUCCESS ) command_queue.registerCLEvent(event);") + @cl_int + int clEnqueueMigrateMemObjectEXT(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @AutoSize("mem_objects") @cl_uint int num_mem_objects, + @Check("1") @Const @NativeType("cl_mem") PointerBuffer mem_objects, + @cl_bitfield @NativeType("cl_mem_migration_flags_ext") long flags, + @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, + @Check(canBeNull = true) @Const @NativeType("cl_event") PointerBuffer event_wait_list, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event); + + @Alternate("clEnqueueMigrateMemObjectEXT") + @Code(javaAfterNative = "\t\tif ( __result == CL10.CL_SUCCESS ) command_queue.registerCLEvent(event);") + @cl_int + int clEnqueueMigrateMemObjectEXT(@PointerWrapper("cl_command_queue") CLCommandQueue command_queue, + @Constant("1") @cl_uint int num_mem_objects, + @Constant(value = "APIUtil.getPointer(mem_object)", keepParam = true) CLMem mem_object, + @cl_bitfield @NativeType("cl_mem_migration_flags_ext") long flags, + @AutoSize(value = "event_wait_list", canBeNull = true) @cl_uint int num_events_in_wait_list, + @Check(canBeNull = true) @Const @NativeType("cl_event") PointerBuffer event_wait_list, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("cl_event") PointerBuffer event); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/INTEL_immediate_execution.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/INTEL_immediate_execution.java new file mode 100644 index 0000000..e2729aa --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/INTEL_immediate_execution.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface INTEL_immediate_execution { + + // TODO: Update when spec is released publicly. + + /** cl_command_queue_properties - bitfield */ + int CL_QUEUE_IMMEDIATE_EXECUTION_ENABLE_INTEL = (1 << 2); + + /** cl_device_exec_capabilities - bitfield */ + int CL_EXEC_IMMEDIATE_EXECUTION_INTEL = (1 << 2); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/INTEL_printf.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/INTEL_printf.java new file mode 100644 index 0000000..8b45af5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/INTEL_printf.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface INTEL_printf { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/INTEL_thread_local_exec.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/INTEL_thread_local_exec.java new file mode 100644 index 0000000..63167f3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/INTEL_thread_local_exec.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface INTEL_thread_local_exec { + + /** + * Allows the user to execute OpenCL tasks and kernels with + * the user application's threads. This token that can + * be passed to clCreateCommandQueue, creating a queue with the "thread + * local exec" capability. + *

+ * All enqueue APIs (e.g., clEnqueueRead) submitted to such a queue + * never enqueue commands. An Enqueue API call is executed by the + * caller host-thread itself without involving any of the OpenCL + * runtime threads, much like function calls. + */ + int CL_QUEUE_THREAD_LOCAL_EXEC_ENABLE_INTEL = (1 << 31); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_3d_image_writes.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_3d_image_writes.java new file mode 100644 index 0000000..72072de --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_3d_image_writes.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface KHR_3d_image_writes { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_byte_addressable_store.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_byte_addressable_store.java new file mode 100644 index 0000000..eb6a35a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_byte_addressable_store.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface KHR_byte_addressable_store { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_d3d10_sharing.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_d3d10_sharing.java new file mode 100644 index 0000000..e392546 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_d3d10_sharing.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLPlatformExtension; + +@CLPlatformExtension +public interface KHR_d3d10_sharing { + // Not implemented +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_depth_images.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_depth_images.java new file mode 100644 index 0000000..9dc87b5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_depth_images.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface KHR_depth_images { + + /** cl_channel_order */ + int CL_DEPTH = 0x10BD; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_fp16.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_fp16.java new file mode 100644 index 0000000..be8dd54 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_fp16.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface KHR_fp16 { + + /** cl_device_info */ + int CL_DEVICE_HALF_FP_CONFIG = 0x1033; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_fp64.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_fp64.java new file mode 100644 index 0000000..93194c7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_fp64.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface KHR_fp64 { + + /** cl_device_info */ + int CL_DEVICE_DOUBLE_FP_CONFIG = 0x1032; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_gl_depth_images.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_gl_depth_images.java new file mode 100644 index 0000000..a0db7a9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_gl_depth_images.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.Extension; +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +@Extension(postfix = "KHR", className = "KHRGLDepthImages") +public interface KHR_gl_depth_images { + + /** cl_channel_order */ + int CL_DEPTH_STENCIL = 0x10BE; + + /** cl_channel_type */ + int CL_UNORM_INT24 = 0x10DF; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_gl_event.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_gl_event.java new file mode 100644 index 0000000..8ecd197 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_gl_event.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.opengl.GLSync; +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opencl.CLDeviceExtension; +import org.lwjgl.util.generator.opencl.CLPlatformExtension; +import org.lwjgl.util.generator.opencl.cl_int; + +import java.nio.IntBuffer; + +@Imports("org.lwjgl.opengl.GLSync") +@CLPlatformExtension +@CLDeviceExtension +@Extension(postfix = "KHR", className = "KHRGLEvent") +public interface KHR_gl_event { + + /** Returned by clGetEventInfo when param_name is CL_EVENT_COMMAND_TYPE: */ + int CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR = 0x200D; + + @Check(value = "errcode_ret", canBeNull = true) + @PointerWrapper(value = "cl_event", params = "context") + CLEvent clCreateEventFromGLsyncKHR(@PointerWrapper("cl_context") CLContext context, + @PointerWrapper("cl_GLsync") GLSync sync, + @OutParameter @Check(value = "1", canBeNull = true) @cl_int IntBuffer errcode_ret); +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_gl_msaa_sharing.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_gl_msaa_sharing.java new file mode 100644 index 0000000..4d8ebc7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_gl_msaa_sharing.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.Extension; +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +@Extension(postfix = "KHR", className = "KHRGLMsaaSharing") +public interface KHR_gl_msaa_sharing { + + /** cl_gl_texture_info */ + int CL_GL_NUM_SAMPLES = 0x2012; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_gl_sharing.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_gl_sharing.java new file mode 100644 index 0000000..2e5467a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_gl_sharing.java @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.PointerBuffer; +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opencl.*; + +import java.nio.ByteBuffer; + +@CLPlatformExtension +@CLDeviceExtension +@Extension(postfix = "KHR", className = "KHRGLSharing") +public interface KHR_gl_sharing { + + /** + * Returned by clCreateContext, clCreateContextFromType, and + * clGetGLContextInfoKHR when an invalid OpenGL context or share group + * object handle is specified in <properties>: + */ + int CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR = -1000; + + /** Accepted as the <param_name> argument of clGetGLContextInfoKHR: */ + int CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR = 0x2006, + CL_DEVICES_FOR_GL_CONTEXT_KHR = 0x2007; + + /** + * Accepted as an attribute name in the 'properties' argument of + * clCreateContext and clCreateContextFromType: + */ + int CL_GL_CONTEXT_KHR = 0x2008, + CL_EGL_DISPLAY_KHR = 0x2009, + CL_GLX_DISPLAY_KHR = 0x200A, + CL_WGL_HDC_KHR = 0x200B, + CL_CGL_SHAREGROUP_KHR = 0x200C; + + @Code( + javaBeforeNative = "\t\tif ( param_value_size_ret == null && APIUtil.isDevicesParam(param_name) ) param_value_size_ret = APIUtil.getBufferPointer();", + javaAfterNative = "\t\tif ( __result == CL10.CL_SUCCESS && param_value != null && APIUtil.isDevicesParam(param_name) ) APIUtil.getCLPlatform(properties).registerCLDevices(param_value, param_value_size_ret);" + ) + @cl_int + int clGetGLContextInfoKHR(@NullTerminated @Const @NativeType("cl_context_properties") PointerBuffer properties, + @NativeType("cl_gl_context_info") int param_name, + @AutoSize(value = "param_value", canBeNull = true) @size_t long param_value_size, + @OutParameter @Check(canBeNull = true) @cl_void ByteBuffer param_value, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("size_t") PointerBuffer param_value_size_ret); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_global_int32_base_atomics.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_global_int32_base_atomics.java new file mode 100644 index 0000000..78f4b44 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_global_int32_base_atomics.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface KHR_global_int32_base_atomics { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_global_int32_extended_atomics.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_global_int32_extended_atomics.java new file mode 100644 index 0000000..30abb2d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_global_int32_extended_atomics.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface KHR_global_int32_extended_atomics { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_icd.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_icd.java new file mode 100644 index 0000000..633fe0c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_icd.java @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.PointerBuffer; +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opencl.CLPlatformExtension; +import org.lwjgl.util.generator.opencl.cl_int; +import org.lwjgl.util.generator.opencl.cl_uint; + +import java.nio.IntBuffer; + +@CLPlatformExtension +@Extension(postfix = "KHR", className = "KHRICD") +public interface KHR_icd { + + /** Accepted as <param_name> to the function clGetPlatformInfo */ + int CL_PLATFORM_ICD_SUFFIX_KHR = 0x0920; + + /** Returned by clGetPlatformIDs when no platforms are found */ + int CL_PLATFORM_NOT_FOUND_KHR = -1001; + + @Optional(reason = "AMD Stream does not expose this (version tested: 2.5)") + @cl_int + int clIcdGetPlatformIDsKHR(@AutoSize(value = "platforms", canBeNull = true) @cl_uint int num_entries, + @OutParameter @Check(canBeNull = true) @NativeType("cl_platform_id") PointerBuffer platforms, + @OutParameter @Check(value = "1", canBeNull = true) @cl_uint IntBuffer num_platforms); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_image2d_from_buffer.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_image2d_from_buffer.java new file mode 100644 index 0000000..4b48f8b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_image2d_from_buffer.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.Extension; +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +@Extension(postfix = "KHR", className = "KHRImage2DFromBuffer") +public interface KHR_image2d_from_buffer { + + /** cl_device_info */ + int CL_DEVICE_IMAGE_PITCH_ALIGNMENT = 0x104A, + CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT = 0x104B; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_initialize_memory.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_initialize_memory.java new file mode 100644 index 0000000..af4556b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_initialize_memory.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface KHR_initialize_memory { + + /** cl_context_properties */ + int CL_CONTEXT_MEMORY_INITIALIZE_KHR = 0x200E; + + /** */ + int CL_CONTEXT_MEMORY_INITIALIZE_LOCAL_KHR = 0x1, // TODO: Find value + CL_CONTEXT_MEMORY_INITIALIZE_PRIVATE_KHR = 0x2; // TODO: Find value + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_int64_base_atomics.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_int64_base_atomics.java new file mode 100644 index 0000000..52d6125 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_int64_base_atomics.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface KHR_int64_base_atomics { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_int64_extended_atomics.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_int64_extended_atomics.java new file mode 100644 index 0000000..271567c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_int64_extended_atomics.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface KHR_int64_extended_atomics { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_local_int32_base_atomics.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_local_int32_base_atomics.java new file mode 100644 index 0000000..b2dfbc4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_local_int32_base_atomics.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface KHR_local_int32_base_atomics { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_local_int32_extended_atomics.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_local_int32_extended_atomics.java new file mode 100644 index 0000000..68585b5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_local_int32_extended_atomics.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface KHR_local_int32_extended_atomics { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_mipmap_image.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_mipmap_image.java new file mode 100644 index 0000000..77fc09b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_mipmap_image.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2013 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface KHR_mipmap_image { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_mipmap_image_writes.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_mipmap_image_writes.java new file mode 100644 index 0000000..73c602d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_mipmap_image_writes.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2013 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface KHR_mipmap_image_writes { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_select_fprounding_mode.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_select_fprounding_mode.java new file mode 100644 index 0000000..28407f5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_select_fprounding_mode.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface KHR_select_fprounding_mode { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_spir.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_spir.java new file mode 100644 index 0000000..87a75d9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_spir.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.Extension; +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +@Extension(postfix = "KHR", className = "KHRSPIR") +public interface KHR_spir { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_srgb_image_writes.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_srgb_image_writes.java new file mode 100644 index 0000000..a0d675d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_srgb_image_writes.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2013 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface KHR_srgb_image_writes { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_subgroups.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_subgroups.java new file mode 100644 index 0000000..f40674f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_subgroups.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2002-2013 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.PointerBuffer; +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opencl.CLDeviceExtension; +import org.lwjgl.util.generator.opencl.cl_int; +import org.lwjgl.util.generator.opencl.cl_void; +import org.lwjgl.util.generator.opencl.size_t; + +import java.nio.ByteBuffer; + +@CLDeviceExtension +public interface KHR_subgroups { + + @cl_int + int clGetKernelSubGroupInfoKHR(@PointerWrapper("cl_kernel") CLKernel kernel, + @PointerWrapper(value = "cl_device_id", canBeNull = true) CLDevice device, + @NativeType("cl_kernel_sub_group_info") int param_name, + @AutoSize(value = "input_value", canBeNull = true) @size_t long input_value_size, + @Check(canBeNull = true) @Const @cl_void ByteBuffer input_value, + @AutoSize(value = "param_value", canBeNull = true) @size_t long param_value_size, + @OutParameter @Check(canBeNull = true) @cl_void ByteBuffer param_value, + @OutParameter @Check(value = "1", canBeNull = true) @NativeType("size_t") PointerBuffer param_value_size_ret); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_terminate_context.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_terminate_context.java new file mode 100644 index 0000000..5178263 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/KHR_terminate_context.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.PointerWrapper; +import org.lwjgl.util.generator.opencl.CLDeviceExtension; +import org.lwjgl.util.generator.opencl.cl_int; + +@CLDeviceExtension +public interface KHR_terminate_context { + + int CL_DEVICE_TERMINATE_CAPABILITY_KHR = 0x200F, + CL_CONTEXT_TERMINATE_KHR = 0x2010; + + @cl_int + int clTerminateContextKHR(@PointerWrapper("cl_context") CLContext context); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/NV_compiler_options.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/NV_compiler_options.java new file mode 100644 index 0000000..3c91c66 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/NV_compiler_options.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface NV_compiler_options { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/NV_device_attribute_query.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/NV_device_attribute_query.java new file mode 100644 index 0000000..147ab6d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/NV_device_attribute_query.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface NV_device_attribute_query { + + /** Accepted as the <param_name> parameter of clGetDeviceInfo. */ + int CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV = 0x4000, + CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV = 0x4001, + CL_DEVICE_REGISTERS_PER_BLOCK_NV = 0x4002, + CL_DEVICE_WARP_SIZE_NV = 0x4003, + CL_DEVICE_GPU_OVERLAP_NV = 0x4004, + CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV = 0x4005, + CL_DEVICE_INTEGRATED_MEMORY_NV = 0x4006; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/NV_pragma_unroll.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/NV_pragma_unroll.java new file mode 100644 index 0000000..4b04a35 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opencl/NV_pragma_unroll.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opencl; + +import org.lwjgl.util.generator.opencl.CLDeviceExtension; + +@CLDeviceExtension +public interface NV_pragma_unroll { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_blend_minmax_factor.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_blend_minmax_factor.java new file mode 100644 index 0000000..d73ddca --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_blend_minmax_factor.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface AMD_blend_minmax_factor { + + /** + * Accepted by the <mode> parameter of BlendEquation and BlendEquationi, and by + * the <modeRGB> and <modeAlpha> parameters of BlendEquationSeparate and + * BlendEquationSeparatei: + */ + int GL_FACTOR_MIN_AMD = 0x901C, + GL_FACTOR_MAX_AMD = 0x901D; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_conservative_depth.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_conservative_depth.java new file mode 100644 index 0000000..f7d461b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_conservative_depth.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface AMD_conservative_depth { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_debug_output.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_debug_output.java new file mode 100644 index 0000000..3c5e843 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_debug_output.java @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.PointerWrapper; +import org.lwjgl.util.generator.Alias; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +@Alias(value = "AMDX_debug_output", postfix = "X") +public interface AMD_debug_output { + + /** Tokens accepted by GetIntegerv: */ + int GL_MAX_DEBUG_MESSAGE_LENGTH_AMD = 0x9143, + GL_MAX_DEBUG_LOGGED_MESSAGES_AMD = 0x9144, + GL_DEBUG_LOGGED_MESSAGES_AMD = 0x9145; + + /** + * Tokens accepted by DebugMessageEnableAMD, GetDebugMessageLogAMD, + * DebugMessageInsertAMD, and DEBUGPROCAMD callback function + * for <severity>: + */ + int GL_DEBUG_SEVERITY_HIGH_AMD = 0x9146, + GL_DEBUG_SEVERITY_MEDIUM_AMD = 0x9147, + GL_DEBUG_SEVERITY_LOW_AMD = 0x9148; + + /** + * Tokens accepted by DebugMessageEnableAMD, GetDebugMessageLogAMD, + * and DEBUGPROCAMD callback function for <category>: + */ + int GL_DEBUG_CATEGORY_API_ERROR_AMD = 0x9149, + GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD = 0x914A, + GL_DEBUG_CATEGORY_DEPRECATION_AMD = 0x914B, + GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD = 0x914C, + GL_DEBUG_CATEGORY_PERFORMANCE_AMD = 0x914D, + GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD = 0x914E, + GL_DEBUG_CATEGORY_APPLICATION_AMD = 0x914F, + GL_DEBUG_CATEGORY_OTHER_AMD = 0x9150; + + void glDebugMessageEnableAMD(@GLenum int category, @GLenum int severity, @AutoSize(value = "ids", canBeNull = true) @GLsizei int count, @Check(canBeNull = true) @Const @GLuint IntBuffer ids, boolean enabled); + + void glDebugMessageInsertAMD(@GLenum int category, @GLenum int severity, @GLuint int id, @AutoSize("buf") @GLsizei int length, @Const @GLchar ByteBuffer buf); + + @Alternate("glDebugMessageInsertAMD") + void glDebugMessageInsertAMD(@GLenum int category, @GLenum int severity, @GLuint int id, @Constant("buf.length()") @GLsizei int length, CharSequence buf); + + /** + * The {@code AMDDebugOutputCallback.Handler} implementation passed to this method will be used for + * AMD_debug_output messages. If callback is null, any previously registered handler for the current + * thread will be unregistered and stop receiving messages. + * + * @param callback the callback function to use + */ + @Code( + // Create a GlobalRef to the callback object and register it with the current context. + javaBeforeNative = "\t\tlong userParam = callback == null ? 0 : CallbackUtil.createGlobalRef(callback.getHandler());\n" + + "\t\tCallbackUtil.registerContextCallbackAMD(userParam);" + ) + void glDebugMessageCallbackAMD(@PointerWrapper(value = "GLDEBUGPROCAMD", canBeNull = true) AMDDebugOutputCallback callback, + @Constant("userParam") @PointerWrapper("GLvoid *") long userParam); + + @GLuint + int glGetDebugMessageLogAMD(@GLuint int count, + @AutoSize(value = "messageLog", canBeNull = true) @GLsizei int logSize, + @Check(value = "count", canBeNull = true) @GLenum IntBuffer categories, + @Check(value = "count", canBeNull = true) @GLuint IntBuffer severities, + @Check(value = "count", canBeNull = true) @GLuint IntBuffer ids, + @Check(value = "count", canBeNull = true) @GLsizei IntBuffer lengths, + @Check(canBeNull = true) @OutParameter @GLchar ByteBuffer messageLog); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_depth_clamp_separate.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_depth_clamp_separate.java new file mode 100644 index 0000000..b806795 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_depth_clamp_separate.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface AMD_depth_clamp_separate { + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_DEPTH_CLAMP_NEAR_AMD = 0x901E, + GL_DEPTH_CLAMP_FAR_AMD = 0x901F; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_draw_buffers_blend.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_draw_buffers_blend.java new file mode 100644 index 0000000..7c7ace9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_draw_buffers_blend.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface AMD_draw_buffers_blend { + + void glBlendFuncIndexedAMD(@GLuint int buf, @GLenum int src, @GLenum int dst); + + void glBlendFuncSeparateIndexedAMD(@GLuint int buf, @GLenum int srcRGB, @GLenum int dstRGB, + @GLenum int srcAlpha, @GLenum int dstAlpha); + + void glBlendEquationIndexedAMD(@GLuint int buf, @GLenum int mode); + + void glBlendEquationSeparateIndexedAMD(@GLuint int buf, @GLenum int modeRGB, + @GLenum int modeAlpha); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_interleaved_elements.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_interleaved_elements.java new file mode 100644 index 0000000..456060c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_interleaved_elements.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface AMD_interleaved_elements { + + /** + * Accepted by the <pname> parameter of VertexAttribParameteriAMD and + * GetVertexAttrib{iv|dv|fv|Iiv|Iuiv|Ldv}: + */ + int GL_VERTEX_ELEMENT_SWIZZLE_AMD = 0x91A4; + + /** Selected by the <pname> parameter of ProgramParameteri and GetProgramiv: */ + int GL_VERTEX_ID_SWIZZLE_AMD = 0x91A5; + + void glVertexAttribParameteriAMD(@GLuint int index, @GLenum int pname, int param); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_multi_draw_indirect.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_multi_draw_indirect.java new file mode 100644 index 0000000..d641939 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_multi_draw_indirect.java @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLvoid; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +import com.sun.mirror.type.PrimitiveType; + +public interface AMD_multi_draw_indirect { + + void glMultiDrawArraysIndirectAMD(@GLenum int mode, + @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 4 * 4 : stride) * primcount") @Const @GLvoid ByteBuffer indirect, + @GLsizei int primcount, + @GLsizei int stride); + + @Alternate("glMultiDrawArraysIndirectAMD") + void glMultiDrawArraysIndirectAMD(@GLenum int mode, + @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 4 : stride >> 2) * primcount") @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect, + @GLsizei int primcount, + @GLsizei int stride); + + void glMultiDrawElementsIndirectAMD(@GLenum int mode, + @GLenum int type, + @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 5 * 4 : stride) * primcount") @Const @GLvoid ByteBuffer indirect, + @GLsizei int primcount, + @GLsizei int stride); + + @Alternate("glMultiDrawElementsIndirectAMD") + void glMultiDrawElementsIndirectAMD(@GLenum int mode, + @GLenum int type, + @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 5 : stride >> 2) * primcount") @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect, + @GLsizei int primcount, + @GLsizei int stride); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_name_gen_delete.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_name_gen_delete.java new file mode 100644 index 0000000..6c4158c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_name_gen_delete.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLreturn; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.IntBuffer; + +public interface AMD_name_gen_delete { + + /** Accepted as the <identifier> parameter of GenNamesAMD and DeleteNamesAMD: */ + int GL_DATA_BUFFER_AMD = 0x9151, + GL_PERFORMANCE_MONITOR_AMD = 0x9152, + GL_QUERY_OBJECT_AMD = 0x9153, + GL_VERTEX_ARRAY_OBJECT_AMD = 0x9154, + GL_SAMPLER_OBJECT_AMD = 0x9155; + + void glGenNamesAMD(@GLenum int identifier, @AutoSize("names") @GLuint int num, @OutParameter @GLuint IntBuffer names); + + @Alternate("glGenNamesAMD") + @GLreturn("names") + void glGenNamesAMD2(@GLenum int identifier, @Constant("1") @GLsizei int num, @OutParameter @GLuint IntBuffer names); + + void glDeleteNamesAMD(@GLenum int identifier, @AutoSize("names") @GLsizei int num, @Const @GLuint IntBuffer names); + + @Alternate("glDeleteNamesAMD") + void glDeleteNamesAMD(@GLenum int identifier, @Constant("1") @GLsizei int num, @Constant(value = "APIUtil.getInt(caps, name)", keepParam = true) int name); + + boolean glIsNameAMD(@GLenum int identifier, @GLuint int name); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_performance_monitor.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_performance_monitor.java new file mode 100644 index 0000000..7f31231 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_performance_monitor.java @@ -0,0 +1,120 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +public interface AMD_performance_monitor { + + /** Accepted by the <pame> parameter of GetPerfMonitorCounterInfoAMD */ + int GL_COUNTER_TYPE_AMD = 0x8BC0, + GL_COUNTER_RANGE_AMD = 0x8BC1; + + /** + * Returned as a valid value in <data> parameter of + * GetPerfMonitorCounterInfoAMD if <pname> = COUNTER_TYPE_AMD + */ + int GL_UNSIGNED_INT64_AMD = 0x8BC2, + GL_PERCENTAGE_AMD = 0x8BC3; + + /** Accepted by the <pname> parameter of GetPerfMonitorCounterDataAMD */ + int GL_PERFMON_RESULT_AVAILABLE_AMD = 0x8BC4, + GL_PERFMON_RESULT_SIZE_AMD = 0x8BC5, + GL_PERFMON_RESULT_AMD = 0x8BC6; + + void glGetPerfMonitorGroupsAMD(@OutParameter @Check(value = "1", canBeNull = true) @GLint IntBuffer numGroups, + @AutoSize("groups") @GLsizei int groupsSize, @GLuint IntBuffer groups); + + void glGetPerfMonitorCountersAMD(@GLuint int group, + @OutParameter @Check(value = "1") @GLint IntBuffer numCounters, + @OutParameter @Check(value = "1") @GLint IntBuffer maxActiveCounters, + @AutoSize(value = "counters", canBeNull = true) @GLsizei int countersSize, + @Check(canBeNull = true) @GLuint IntBuffer counters); + + void glGetPerfMonitorGroupStringAMD(@GLuint int group, + @AutoSize(value = "groupString", canBeNull = true) @GLsizei int bufSize, + @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length, + @Check(canBeNull = true) @OutParameter @GLchar ByteBuffer groupString); + + @Alternate("glGetPerfMonitorGroupStringAMD") + @GLreturn(value = "groupString", maxLength = "bufSize") + void glGetPerfMonitorGroupStringAMD2(@GLuint int group, @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(groupString_length)") IntBuffer length, + @OutParameter @GLchar ByteBuffer groupString); + + void glGetPerfMonitorCounterStringAMD(@GLuint int group, @GLuint int counter, @AutoSize(value = "counterString", canBeNull = true) @GLsizei int bufSize, + @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length, + @Check(canBeNull = true) @OutParameter @GLchar ByteBuffer counterString); + + @Alternate("glGetPerfMonitorCounterStringAMD") + @GLreturn(value = "counterString", maxLength = "bufSize") + void glGetPerfMonitorCounterStringAMD2(@GLuint int group, @GLuint int counter, @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(counterString_length)") IntBuffer length, + @OutParameter @GLchar ByteBuffer counterString); + + void glGetPerfMonitorCounterInfoAMD(@GLuint int group, @GLuint int counter, @GLenum int pname, @Check(value = "16") @GLvoid ByteBuffer data); + + void glGenPerfMonitorsAMD(@AutoSize("monitors") @GLsizei int n, @OutParameter @GLuint IntBuffer monitors); + + @Alternate("glGenPerfMonitorsAMD") + @GLreturn("monitors") + void glGenPerfMonitorsAMD2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer monitors); + + void glDeletePerfMonitorsAMD(@AutoSize("monitors") @GLsizei int n, @GLuint IntBuffer monitors); + + @Alternate("glDeletePerfMonitorsAMD") + void glDeletePerfMonitorsAMD(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(caps, monitor)", keepParam = true) int monitor); + + void glSelectPerfMonitorCountersAMD(@GLuint int monitor, boolean enable, @GLuint int group, @AutoSize("counterList") int numCounters, @GLuint IntBuffer counterList); + + @Alternate("glSelectPerfMonitorCountersAMD") + void glSelectPerfMonitorCountersAMD(@GLuint int monitor, boolean enable, @GLuint int group, @Constant("1") int numCounters, @Constant(value = "APIUtil.getInt(caps, counter)", keepParam = true) int counter); + + void glBeginPerfMonitorAMD(@GLuint int monitor); + + void glEndPerfMonitorAMD(@GLuint int monitor); + + void glGetPerfMonitorCounterDataAMD(@GLuint int monitor, @GLenum int pname, @AutoSize("data") @GLsizei int dataSize, + @OutParameter @GLuint IntBuffer data, + @OutParameter @GLint @Check(value = "1", canBeNull = true) IntBuffer bytesWritten); + + @Alternate("glGetPerfMonitorCounterDataAMD") + @GLreturn("data") + void glGetPerfMonitorCounterDataAMD2(@GLuint int monitor, @GLenum int pname, @Constant("4") @GLsizei int dataSize, + @OutParameter @GLuint IntBuffer data, + @OutParameter @GLint @Constant("0L") IntBuffer bytesWritten); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_pinned_memory.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_pinned_memory.java new file mode 100644 index 0000000..2aa7d8a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_pinned_memory.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface AMD_pinned_memory { + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, + * GetBufferParameteriv, GetBufferPointerv, MapBufferRange: + */ + int GL_EXTERNAL_VIRTUAL_MEMORY_BUFFER_AMD = 0x9160; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_query_buffer_object.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_query_buffer_object.java new file mode 100644 index 0000000..00bd209 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_query_buffer_object.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface AMD_query_buffer_object { + + /** + * Accepted by the <pname> parameter of GetQueryObjectiv, GetQueryObjectuiv, + * GetQueryObjecti64v and GetQueryObjectui64v: + */ + int GL_QUERY_RESULT_NO_WAIT_AMD = 0x9194; + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, MapBufferRange, GetBufferSubData, + * GetBufferParameteriv + * and GetBufferPointerv: + */ + int GL_QUERY_BUFFER_AMD = 0x9192; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + int GL_QUERY_BUFFER_BINDING_AMD = 0x9193; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_sample_positions.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_sample_positions.java new file mode 100644 index 0000000..b3447e4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_sample_positions.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.Check; +import org.lwjgl.util.generator.Const; +import org.lwjgl.util.generator.StripPostfix; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.FloatBuffer; + +public interface AMD_sample_positions { + + /** Accepted by the <pname> parameter of GetFloatv: */ + int GL_SUBSAMPLE_DISTANCE_AMD = 0x883F; + + @StripPostfix("val") + void glSetMultisamplefvAMD(@GLenum int pname, @GLuint int index, @Check("2") @Const FloatBuffer val); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_seamless_cubemap_per_texture.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_seamless_cubemap_per_texture.java new file mode 100644 index 0000000..f0ce360 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_seamless_cubemap_per_texture.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface AMD_seamless_cubemap_per_texture { + + /** + * Accepted by the <pname> parameter of TexParameterf, TexParameteri, + * TexParameterfv, TexParameteriv, GetTexParameterfv, and GetTexParameteriv: + */ + int GL_TEXTURE_CUBE_MAP_SEAMLESS = ARB_seamless_cube_map.GL_TEXTURE_CUBE_MAP_SEAMLESS; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_shader_atomic_counter_ops.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_shader_atomic_counter_ops.java new file mode 100644 index 0000000..88f225b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_shader_atomic_counter_ops.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2013 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface AMD_shader_atomic_counter_ops { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_shader_stencil_export.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_shader_stencil_export.java new file mode 100644 index 0000000..c7824fa --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_shader_stencil_export.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface AMD_shader_stencil_export { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_shader_trinary_minmax.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_shader_trinary_minmax.java new file mode 100644 index 0000000..0dae3dd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_shader_trinary_minmax.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface AMD_shader_trinary_minmax { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_sparse_texture.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_sparse_texture.java new file mode 100644 index 0000000..767da31 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_sparse_texture.java @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLbitfield; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface AMD_sparse_texture { + + /** Accepted by the <flags> parameter to TexStorageSparseAMD and TextureStorageSparseAMD: */ + int GL_TEXTURE_STORAGE_SPARSE_BIT_AMD = 0x00000001; + + /** Accepted by the <pname> parameter to GetInternalformativ: */ + int GL_VIRTUAL_PAGE_SIZE_X_AMD = 0x9195, + GL_VIRTUAL_PAGE_SIZE_Y_AMD = 0x9196, + GL_VIRTUAL_PAGE_SIZE_Z_AMD = 0x9197; + + /** + * Accepted by the <pname> parameter to GetIntegerv, GetFloatv, GetDoublev, + * GetInteger64v, and GetBooleanv: + */ + int GL_MAX_SPARSE_TEXTURE_SIZE_AMD = 0x9198, + GL_MAX_SPARSE_3D_TEXTURE_SIZE_AMD = 0x9199, + GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS = 0x919A; + + /** Accepted by the <pname> parameter of GetTexParameter{if}v: */ + int GL_MIN_SPARSE_LEVEL_AMD = 0x919B; + + /** + * Accepted by the <pname> parameter of TexParameter{if}{v} and + * GetTexParameter{if}v: + */ + int GL_MIN_LOD_WARNING_AMD = 0x919C; + + void glTexStorageSparseAMD(@GLenum int target, + @GLenum int internalFormat, + @GLsizei int width, + @GLsizei int height, + @GLsizei int depth, + @GLsizei int layers, + @GLbitfield int flags); + + void glTextureStorageSparseAMD(@GLuint int texture, + @GLenum int target, + @GLenum int internalFormat, + @GLsizei int width, + @GLsizei int height, + @GLsizei int depth, + @GLsizei int layers, + @GLbitfield int flags); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_stencil_operation_extended.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_stencil_operation_extended.java new file mode 100644 index 0000000..b248d36 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_stencil_operation_extended.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface AMD_stencil_operation_extended { + + /** + * Accepted by the <sfail>, <dpfail> and <dppass> parameters of StencilOp + * and StencilOpSeparate: + */ + int GL_SET_AMD = 0x874A, + GL_AND = 0x1501, + GL_XOR = 0x1506, + GL_OR = 0x1507, + GL_NOR = 0x1508, + GL_EQUIV = 0x1509, + GL_NAND = 0x150E, + GL_REPLACE_VALUE_AMD = 0x874B; + + /** + * Accepted by the <param> parameter of GetIntegerv, GetFloatv, GetBooleanv + * GetDoublev and GetInteger64v: + */ + int GL_STENCIL_OP_VALUE_AMD = 0x874C, + GL_STENCIL_BACK_OP_VALUE_AMD = 0x874D; + + void glStencilOpValueAMD(@GLenum int face, @GLuint int value); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_texture_texture4.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_texture_texture4.java new file mode 100644 index 0000000..5958ace --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_texture_texture4.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface AMD_texture_texture4 { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_transform_feedback3_lines_triangles.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_transform_feedback3_lines_triangles.java new file mode 100644 index 0000000..71bb1be --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_transform_feedback3_lines_triangles.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface AMD_transform_feedback3_lines_triangles { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_vertex_shader_layer.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_vertex_shader_layer.java new file mode 100644 index 0000000..80d867c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_vertex_shader_layer.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface AMD_vertex_shader_layer { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_vertex_shader_tessellator.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_vertex_shader_tessellator.java new file mode 100644 index 0000000..7427a4c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_vertex_shader_tessellator.java @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLenum; + +public interface AMD_vertex_shader_tessellator { + + /** Returned by the <type> parameter of GetActiveUniform: */ + int GL_SAMPLER_BUFFER_AMD = 0x9001; + int GL_INT_SAMPLER_BUFFER_AMD = 0x9002; + int GL_UNSIGNED_INT_SAMPLER_BUFFER_AMD = 0x9003; + + /** Accepted by TessellationModeAMD */ + int GL_DISCRETE_AMD = 0x9006; + int GL_CONTINUOUS_AMD = 0x9007; + + /** Accepted by GetIntegerv */ + int GL_TESSELLATION_MODE_AMD = 0x9004; + + /** Accepted by GetFloatv */ + int GL_TESSELLATION_FACTOR_AMD = 0x9005; + + void glTessellationFactorAMD(float factor); + + void glTessellationModeAMD(@GLenum int mode); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_vertex_shader_viewport_index.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_vertex_shader_viewport_index.java new file mode 100644 index 0000000..1e8d3fd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/AMD_vertex_shader_viewport_index.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface AMD_vertex_shader_viewport_index { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_aux_depth_stencil.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_aux_depth_stencil.java new file mode 100644 index 0000000..bfc1d9a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_aux_depth_stencil.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface APPLE_aux_depth_stencil { + + /** Accepted by the <pname> parameter of GetIntegerv. */ + int GL_AUX_DEPTH_STENCIL_APPLE = 0x8A14; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_client_storage.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_client_storage.java new file mode 100644 index 0000000..c911ba8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_client_storage.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface APPLE_client_storage { + + /** Accepted by the <pname> parameters of PixelStore: */ + int GL_UNPACK_CLIENT_STORAGE_APPLE = 0x85B2; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_element_array.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_element_array.java new file mode 100644 index 0000000..e2a0049 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_element_array.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.Buffer; +import java.nio.IntBuffer; + +public interface APPLE_element_array { + + /** + * Accepted by the <array> parameter of EnableClientState and + * DisableClientState and the <value> parameter of IsEnabled: + */ + int GL_ELEMENT_ARRAY_APPLE = 0x8768; + + /** + * Accepted by the <value> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_ELEMENT_ARRAY_TYPE_APPLE = 0x8769; + + /** Accepted by the <pname> parameter of GetPointerv: */ + int GL_ELEMENT_ARRAY_POINTER_APPLE = 0x876A; + + void glElementPointerAPPLE(@AutoType("pointer") @GLenum int type, + @Check + @Const + @GLubyte + @GLushort + @GLuint Buffer pointer); + + void glDrawElementArrayAPPLE(@GLenum int mode, int first, @GLsizei int count); + + void glDrawRangeElementArrayAPPLE(@GLenum int mode, @GLuint int start, @GLuint int end, int first, @GLsizei int count); + + void glMultiDrawElementArrayAPPLE(@GLenum int mode, + @Const IntBuffer first, + @Const @Check("first.remaining()") @GLsizei IntBuffer count, + @AutoSize("first") @GLsizei int primcount); + + void glMultiDrawRangeElementArrayAPPLE(@GLenum int mode, @GLuint int start, @GLuint int end, + @Const IntBuffer first, + @Const @Check("first.remaining()") @GLsizei IntBuffer count, + @AutoSize("first") @GLsizei int primcount); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_fence.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_fence.java new file mode 100644 index 0000000..f4914b8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_fence.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLreturn; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.IntBuffer; + +public interface APPLE_fence { + + /** Accepted by the <object> parameter of TestObjectAPPLE and FinishObjectAPPLE: */ + int GL_DRAW_PIXELS_APPLE = 0x8A0A; + int GL_FENCE_APPLE = 0x8A0B; + + void glGenFencesAPPLE(@AutoSize("fences") @GLsizei int n, @OutParameter @GLuint IntBuffer fences); + + @Alternate("glGenFencesAPPLE") + @GLreturn("fences") + void glGenFencesAPPLE2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer fences); + + void glDeleteFencesAPPLE(@AutoSize("fences") @GLsizei int n, @Const @GLuint IntBuffer fences); + + @Alternate("glDeleteFencesAPPLE") + void glDeleteFencesAPPLE(@Constant("1") @GLsizei int n, @Const @GLuint @Constant(value = "APIUtil.getInt(caps, fence)", keepParam = true) int fence); + + void glSetFenceAPPLE(@GLuint int fence); + + boolean glIsFenceAPPLE(@GLuint int fence); + + boolean glTestFenceAPPLE(@GLuint int fence); + + void glFinishFenceAPPLE(@GLuint int fence); + + boolean glTestObjectAPPLE(@GLenum int object, @GLuint int name); + + void glFinishObjectAPPLE(@GLenum int object, int name); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_float_pixels.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_float_pixels.java new file mode 100644 index 0000000..7332173 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_float_pixels.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface APPLE_float_pixels { + + /** + * Accepted by the parameters of DrawPixels, ReadPixels, TexImage1D, + * TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, and + * GetTexImage: + */ + int GL_HALF_APPLE = 0x140B; + + /** Accepted by the GetBooleanv: */ + int GL_COLOR_FLOAT_APPLE = 0x8A0F; + + /** + * Accepted by the parameter of TexImage1D, + * TexImage2D, and TexImage3D: + */ + int GL_RGBA_FLOAT32_APPLE = 0x8814; + int GL_RGB_FLOAT32_APPLE = 0x8815; + int GL_ALPHA_FLOAT32_APPLE = 0x8816; + int GL_INTENSITY_FLOAT32_APPLE = 0x8817; + int GL_LUMINANCE_FLOAT32_APPLE = 0x8818; + int GL_LUMINANCE_ALPHA_FLOAT32_APPLE = 0x8819; + int GL_RGBA_FLOAT16_APPLE = 0x881A; + int GL_RGB_FLOAT16_APPLE = 0x881B; + int GL_ALPHA_FLOAT16_APPLE = 0x881C; + int GL_INTENSITY_FLOAT16_APPLE = 0x881D; + int GL_LUMINANCE_FLOAT16_APPLE = 0x881E; + int GL_LUMINANCE_ALPHA_FLOAT16_APPLE = 0x881F; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_flush_buffer_range.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_flush_buffer_range.java new file mode 100644 index 0000000..23c902e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_flush_buffer_range.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLintptr; +import org.lwjgl.util.generator.opengl.GLsizeiptr; + +public interface APPLE_flush_buffer_range { + + /** + * Accepted by the <pname> parameter of BufferParameteriAPPLE and + * GetBufferParameteriv: + */ + int GL_BUFFER_SERIALIZED_MODIFY_APPLE = 0x8A12; + int GL_BUFFER_FLUSHING_UNMAP_APPLE = 0x8A13; + + void glBufferParameteriAPPLE(@GLenum int target, @GLenum int pname, int param); + + void glFlushMappedBufferRangeAPPLE(@GLenum int target, @GLintptr long offset, @GLsizeiptr long size); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_object_purgeable.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_object_purgeable.java new file mode 100644 index 0000000..438c972 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_object_purgeable.java @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLreturn; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.IntBuffer; + +public interface APPLE_object_purgeable { + + /** + * Accepted by the <option> parameter of ObjectPurgeable, and returned + * by ObjectPurgeable: + */ + int GL_RELEASED_APPLE = 0x8A19; + int GL_VOLATILE_APPLE = 0x8A1A; + + /** + * Accepted by the <option> parameters of ObjectUnpurgeable, and + * returned by ObjectUnpurgeable: + */ + int GL_RETAINED_APPLE = 0x8A1B; + int GL_UNDEFINED_APPLE = 0x8A1C; + + /** Accepted by the <pname> parameters of GetObjectParameteriv: */ + int GL_PURGEABLE_APPLE = 0x8A1D; + + /** + * Accepted by the <objectType> parameters of ObjectPurgeableAPPLE, + * ObjectUnpurgeableAPPLE and GetObjectParameteriv: + */ + int GL_BUFFER_OBJECT_APPLE = 0x85B3; + + @GLenum + int glObjectPurgeableAPPLE(@GLenum int objectType, @GLuint int name, @GLenum int option); + + @GLenum + int glObjectUnpurgeableAPPLE(@GLenum int objectType, @GLuint int name, @GLenum int option); + + @StripPostfix("params") + void glGetObjectParameterivAPPLE(@GLenum int objectType, @GLuint int name, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + @Alternate("glGetObjectParameterivAPPLE") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetObjectParameterivAPPLE2(@GLenum int objectType, @GLuint int name, @GLenum int pname, @OutParameter IntBuffer params); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_packed_pixels.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_packed_pixels.java new file mode 100644 index 0000000..3a5470c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_packed_pixels.java @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface APPLE_packed_pixels { + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, TexImage1D, + * TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, + * TexSubImage2D, TexSubImage3D, GetHistogram, GetMinmax, + * ConvolutionFilter1D, ConvolutionFilter2D, ConvolutionFilter3D, + * GetConvolutionFilter, SeparableFilter2D, SeparableFilter3D, + * GetSeparableFilter, ColorTable, GetColorTable, TexImage4DSGIS, + * and TexSubImage4DSGIS: + */ + int GL_UNSIGNED_BYTE_3_3_2 = 0x8032; + int GL_UNSIGNED_BYTE_2_3_3_REV = 0x8362; + int GL_UNSIGNED_SHORT_5_6_5 = 0x8363; + int GL_UNSIGNED_SHORT_5_6_5_REV = 0x8364; + int GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033; + int GL_UNSIGNED_SHORT_4_4_4_4_REV = 0x8365; + int GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034; + int GL_UNSIGNED_SHORT_1_5_5_5_REV = 0x8366; + int GL_UNSIGNED_INT_8_8_8_8 = 0x8035; + int GL_UNSIGNED_INT_8_8_8_8_REV = 0x8367; + int GL_UNSIGNED_INT_10_10_10_2 = 0x8036; + int GL_UNSIGNED_INT_2_10_10_10_REV = 0x8368; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_rgb_422.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_rgb_422.java new file mode 100644 index 0000000..1ad5fe6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_rgb_422.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface APPLE_rgb_422 { + + /** + * Accepted by the <format> parameter of DrawPixels, ReadPixels, TexImage1D, + * TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, TexSubImage2D, + * TexSubImage3D, GetHistogram, GetMinmax, ConvolutionFilter1D, + * ConvolutionFilter2D, GetConvolutionFilter, SeparableFilter2D, + * GetSeparableFilter, ColorTable, GetColorTable: + */ + int GL_RGB_422_APPLE = 0x8A1F; + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, TexImage1D, + * TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, TexSubImage2D, + * TexSubImage3D, GetHistogram, GetMinmax, ConvolutionFilter1D, + * ConvolutionFilter2D, GetConvolutionFilter, SeparableFilter2D, + * GetSeparableFilter, ColorTable, GetColorTable: + */ + int GL_UNSIGNED_SHORT_8_8_APPLE = 0x85BA; + int GL_UNSIGNED_SHORT_8_8_REV_APPLE = 0x85BB; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_row_bytes.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_row_bytes.java new file mode 100644 index 0000000..d191b16 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_row_bytes.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface APPLE_row_bytes { + + /** + * Accepted by the <pname> parameter of PixelStorei and the <pname> + * parameter of GetIntegerv: + */ + int GL_PACK_ROW_BYTES_APPLE = 0x8A15; + int GL_UNPACK_ROW_BYTES_APPLE = 0x8A16; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_texture_range.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_texture_range.java new file mode 100644 index 0000000..5f22462 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_texture_range.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLvoid; + +import java.nio.Buffer; +import java.nio.ByteBuffer; + +public interface APPLE_texture_range { + + /** + * Accepted by the parameters of TexParameteri, TexParameterf, + * TexParameteriv, TexParameterfv, GetTexParameteriv, and + * GetTexParameterfv: + */ + int GL_TEXTURE_STORAGE_HINT_APPLE = 0x85BC; + + /** + * Accepted by the parameters of TexParameteri, TexParameterf, + * TexParameteriv, and TexParameterfv: + */ + int GL_STORAGE_PRIVATE_APPLE = 0x85BD; + int GL_STORAGE_CACHED_APPLE = 0x85BE; + int GL_STORAGE_SHARED_APPLE = 0x85BF; + + /** + * Accepted by the parameters of GetTexParameteriv and + * GetTexParameterfv: + */ + int GL_TEXTURE_RANGE_LENGTH_APPLE = 0x85B7; + + /** Accepted by the parameters of GetTexParameterPointerv: */ + int GL_TEXTURE_RANGE_POINTER_APPLE = 0x85B8; + + void glTextureRangeAPPLE(@GLenum int target, @AutoSize("pointer") @GLsizei int length, @GLvoid ByteBuffer pointer); + + void glGetTexParameterPointervAPPLE(@GLenum int target, @GLenum int pname, @Result @GLvoid Buffer params); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_vertex_array_object.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_vertex_array_object.java new file mode 100644 index 0000000..d1cd1c7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_vertex_array_object.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.GLreturn; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.IntBuffer; + +public interface APPLE_vertex_array_object { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + int GL_VERTEX_ARRAY_BINDING_APPLE = 0x85B5; + + void glBindVertexArrayAPPLE(@GLuint int array); + + void glDeleteVertexArraysAPPLE(@AutoSize("arrays") @GLsizei int n, @Const @GLuint IntBuffer arrays); + + @Alternate("glDeleteVertexArraysAPPLE") + void glDeleteVertexArraysAPPLE(@Constant("1") @GLsizei int n, @Const @GLuint @Constant(value = "APIUtil.getInt(caps, array)", keepParam = true) int array); + + void glGenVertexArraysAPPLE(@AutoSize("arrays") @GLsizei int n, @OutParameter @GLuint IntBuffer arrays); + + @Alternate("glGenVertexArraysAPPLE") + @GLreturn("arrays") + void glGenVertexArraysAPPLE2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer arrays); + + boolean glIsVertexArrayAPPLE(@GLuint int array); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_vertex_array_range.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_vertex_array_range.java new file mode 100644 index 0000000..37503eb --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_vertex_array_range.java @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.AutoSize; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLvoid; + +import java.nio.ByteBuffer; + +public interface APPLE_vertex_array_range { + + /** + * Accepted by the <cap> parameter of EnableClientState, DisableClientState, + * and IsEnabled: + */ + int GL_VERTEX_ARRAY_RANGE_APPLE = 0x851D; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + + int GL_VERTEX_ARRAY_RANGE_LENGTH_APPLE = 0x851E; + int GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_APPLE = 0x8520; + + /** Accepted by the <pname> parameter of GetPointerv: */ + + int GL_VERTEX_ARRAY_RANGE_POINTER_APPLE = 0x8521; + + /** + * Accepted by the <pname> parameter of VertexArrayParameteriAPPLE, + * GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev: + */ + + int GL_VERTEX_ARRAY_STORAGE_HINT_APPLE = 0x851F; + + /** Accepted by the <param> parameter of VertexArrayParameteriAPPLE: */ + + int GL_STORAGE_CACHED_APPLE = 0x85BE; + int GL_STORAGE_SHARED_APPLE = 0x85BF; + + /** Accepted by the <object> parameter of TestObjectAPPLE and FinishObjectAPPLE: */ + int GL_DRAW_PIXELS_APPLE = 0x8A0A; + int GL_FENCE_APPLE = 0x8A0B; + + void glVertexArrayRangeAPPLE(@AutoSize("pointer") @GLsizei int length, @GLvoid ByteBuffer pointer); + + void glFlushVertexArrayRangeAPPLE(@AutoSize("pointer") @GLsizei int length, @GLvoid ByteBuffer pointer); + + void glVertexArrayParameteriAPPLE(@GLenum int pname, int param); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_vertex_program_evaluators.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_vertex_program_evaluators.java new file mode 100644 index 0000000..a330c2a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_vertex_program_evaluators.java @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.Check; +import org.lwjgl.util.generator.Const; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.DoubleBuffer; +import java.nio.FloatBuffer; + +public interface APPLE_vertex_program_evaluators { + + /** + * Accepted by the <pname> parameter of EnableVertexAttribAPPLE, + * DisableVertexAttribAPPLE, and IsVertexAttribEnabledAPPLE. + */ + int GL_VERTEX_ATTRIB_MAP1_APPLE = 0x8A00; + int GL_VERTEX_ATTRIB_MAP2_APPLE = 0x8A01; + + /** + * Accepted by the <pname> parameter of GetVertexAttribdvARB, + * GetVertexAttribfvARB, and GetVertexAttribivARB. + */ + int GL_VERTEX_ATTRIB_MAP1_SIZE_APPLE = 0x8A02; + int GL_VERTEX_ATTRIB_MAP1_COEFF_APPLE = 0x8A03; + int GL_VERTEX_ATTRIB_MAP1_ORDER_APPLE = 0x8A04; + int GL_VERTEX_ATTRIB_MAP1_DOMAIN_APPLE = 0x8A05; + int GL_VERTEX_ATTRIB_MAP2_SIZE_APPLE = 0x8A06; + int GL_VERTEX_ATTRIB_MAP2_COEFF_APPLE = 0x8A07; + int GL_VERTEX_ATTRIB_MAP2_ORDER_APPLE = 0x8A08; + int GL_VERTEX_ATTRIB_MAP2_DOMAIN_APPLE = 0x8A09; + + void glEnableVertexAttribAPPLE(@GLuint int index, @GLenum int pname); + + void glDisableVertexAttribAPPLE(@GLuint int index, @GLenum int pname); + + boolean glIsVertexAttribEnabledAPPLE(@GLuint int index, @GLenum int pname); + + void glMapVertexAttrib1dAPPLE(@GLuint int index, @GLuint int size, double u1, double u2, + int stride, int order, @Check @Const DoubleBuffer points); + + void glMapVertexAttrib1fAPPLE(@GLuint int index, @GLuint int size, float u1, float u2, + int stride, int order, @Check @Const FloatBuffer points); + + void glMapVertexAttrib2dAPPLE(@GLuint int index, @GLuint int size, double u1, double u2, + int ustride, int uorder, double v1, double v2, int vstride, int vorder, + @Check @Const DoubleBuffer points); + + void glMapVertexAttrib2fAPPLE(@GLuint int index, @GLuint int size, float u1, float u2, + int ustride, int uorder, float v1, float v2, int vstride, int vorder, + @Check @Const FloatBuffer points); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_ycbcr_422.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_ycbcr_422.java new file mode 100644 index 0000000..0a3e880 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/APPLE_ycbcr_422.java @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface APPLE_ycbcr_422 { + + /** + * Accepted by the <format> parameter of DrawPixels, ReadPixels, TexImage1D, + * TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, TexSubImage2D, + * TexSubImage3D, GetHistogram, GetMinmax, ConvolutionFilter1D, + * ConvolutionFilter2D, ConvolutionFilter3D, GetConvolutionFilter, + * SeparableFilter2D, SeparableFilter3D, GetSeparableFilter, ColorTable, + * GetColorTable: + */ + int GL_YCBCR_422_APPLE = 0x85B9; + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, TexImage1D, + * TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, TexSubImage2D, + * TexSubImage3D, GetHistogram, GetMinmax, ConvolutionFilter1D, + * ConvolutionFilter2D, ConvolutionFilter3D, GetConvolutionFilter, + * SeparableFilter2D, SeparableFilter3D, GetSeparableFilter, ColorTable, + * GetColorTable: + */ + int GL_UNSIGNED_SHORT_8_8_APPLE = 0x85BA; + int GL_UNSIGNED_SHORT_8_8_REV_APPLE = 0x85BB; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_ES2_compatibility.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_ES2_compatibility.java new file mode 100644 index 0000000..f89e891 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_ES2_compatibility.java @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +public interface ARB_ES2_compatibility { + + /** + * Accepted by the <value> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + int GL_SHADER_COMPILER = 0x8DFA, + GL_NUM_SHADER_BINARY_FORMATS = 0x8DF9, + GL_MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB, + GL_MAX_VARYING_VECTORS = 0x8DFC, + GL_MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD, + GL_IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A, + GL_IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B; + + /** Accepted by the <type> parameter of VertexAttribPointer: */ + int GL_FIXED = 0x140C; + + /** + * Accepted by the <precisiontype> parameter of + * GetShaderPrecisionFormat: + */ + int GL_LOW_FLOAT = 0x8DF0, + GL_MEDIUM_FLOAT = 0x8DF1, + GL_HIGH_FLOAT = 0x8DF2, + GL_LOW_INT = 0x8DF3, + GL_MEDIUM_INT = 0x8DF4, + GL_HIGH_INT = 0x8DF5; + + /** Accepted by the <format> parameter of most commands taking sized internal formats: */ + int GL_RGB565 = 0x8D62; + + @Reuse("GL41") + void glReleaseShaderCompiler(); + + @Reuse("GL41") + void glShaderBinary(@AutoSize("shaders") @GLsizei int count, @Const @GLuint IntBuffer shaders, + @GLenum int binaryformat, @Const @GLvoid ByteBuffer binary, @AutoSize("binary") @GLsizei int length); + + @Reuse("GL41") + void glGetShaderPrecisionFormat(@GLenum int shadertype, @GLenum int precisiontype, + @OutParameter @Check("2") IntBuffer range, + @OutParameter @Check("1") IntBuffer precision); + + @Reuse("GL41") + void glDepthRangef(@GLclampf float n, @GLclampf float f); + + @Reuse("GL41") + void glClearDepthf(@GLclampf float d); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_ES3_compatibility.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_ES3_compatibility.java new file mode 100644 index 0000000..b7f7465 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_ES3_compatibility.java @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_ES3_compatibility { + + /** Accepted by the <internalformat> parameter of CompressedTexImage2D */ + int GL_COMPRESSED_RGB8_ETC2 = 0x9274, + GL_COMPRESSED_SRGB8_ETC2 = 0x9275, + GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9276, + GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277, + GL_COMPRESSED_RGBA8_ETC2_EAC = 0x9278, + GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 0x9279, + GL_COMPRESSED_R11_EAC = 0x9270, + GL_COMPRESSED_SIGNED_R11_EAC = 0x9271, + GL_COMPRESSED_RG11_EAC = 0x9272, + GL_COMPRESSED_SIGNED_RG11_EAC = 0x9273; + + /** Accepted by the <target> parameter of Enable and Disable: */ + int GL_PRIMITIVE_RESTART_FIXED_INDEX = 0x8D69; + + /** + * Accepted by the <target> parameter of BeginQuery, EndQuery, + * GetQueryIndexediv and GetQueryiv: + */ + int GL_ANY_SAMPLES_PASSED_CONSERVATIVE = 0x8D6A; + + /** Accepted by the <value> parameter of the GetInteger* functions: */ + int GL_MAX_ELEMENT_INDEX = 0x8D6B; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_arrays_of_arrays.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_arrays_of_arrays.java new file mode 100644 index 0000000..9643a23 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_arrays_of_arrays.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_arrays_of_arrays { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_base_instance.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_base_instance.java new file mode 100644 index 0000000..1e2f84c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_base_instance.java @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.Buffer; + +public interface ARB_base_instance { + + @Reuse("GL42") + void glDrawArraysInstancedBaseInstance(@GLenum int mode, + int first, + @GLsizei int count, + @GLsizei int primcount, + @GLuint int baseinstance); + + @Reuse("GL42") + void glDrawElementsInstancedBaseInstance(@GLenum int mode, + @AutoSize("indices") @GLsizei int count, + @AutoType("indices") @GLenum int type, + @Const + @BufferObject(BufferKind.ElementVBO) + @GLubyte + @GLushort + @GLuint Buffer indices, + @GLsizei int primcount, + @GLuint int baseinstance); + + @Reuse("GL42") + void glDrawElementsInstancedBaseVertexBaseInstance(@GLenum int mode, + @AutoSize("indices") @GLsizei int count, + @AutoType("indices") @GLenum int type, + @Const + @BufferObject(BufferKind.ElementVBO) + @GLubyte + @GLushort + @GLuint Buffer indices, + @GLsizei int primcount, + int basevertex, + @GLuint int baseinstance); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_bindless_texture.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_bindless_texture.java new file mode 100644 index 0000000..030976e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_bindless_texture.java @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2002-2013 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.AutoSize; +import org.lwjgl.util.generator.Check; +import org.lwjgl.util.generator.Const; +import org.lwjgl.util.generator.StripPostfix; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.LongBuffer; + +public interface ARB_bindless_texture { + + /** Accepted by the <type> parameter of VertexAttribLPointer: */ + int GL_UNSIGNED_INT64_ARB = 0x140F; + + @GLuint64 + long glGetTextureHandleARB(@GLuint int texture); + + @GLuint64 + long glGetTextureSamplerHandleARB(@GLuint int texture, @GLuint int sampler); + + void glMakeTextureHandleResidentARB(@GLuint64 long handle); + + void glMakeTextureHandleNonResidentARB(@GLuint64 long handle); + + @GLuint64 + long glGetImageHandleARB(@GLuint int texture, int level, boolean layered, int layer, @GLenum int format); + + void glMakeImageHandleResidentARB(@GLuint64 long handle, @GLenum int access); + + void glMakeImageHandleNonResidentARB(@GLuint64 long handle); + + void glUniformHandleui64ARB(int location, @GLuint64 long value); + + @StripPostfix("value") + void glUniformHandleui64vARB(int location, @AutoSize("value") @GLsizei int count, @Const @GLuint64 LongBuffer value); + + void glProgramUniformHandleui64ARB(@GLuint int program, int location, @GLuint64 long value); + + @StripPostfix("values") + void glProgramUniformHandleui64vARB(@GLuint int program, int location, @AutoSize("values") @GLsizei int count, @Const @GLuint64 LongBuffer values); + + boolean glIsTextureHandleResidentARB(@GLuint64 long handle); + + boolean glIsImageHandleResidentARB(@GLuint64 long handle); + + void glVertexAttribL1ui64ARB(@GLuint int index, @GLuint64EXT long x); + + @StripPostfix("v") + void glVertexAttribL1ui64vARB(@GLuint int index, @Check("1") @Const @GLuint64EXT LongBuffer v); + + @StripPostfix("params") + void glGetVertexAttribLui64vARB(@GLuint int index, @GLenum int pname, @Check("4") @GLuint64EXT LongBuffer params); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_blend_func_extended.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_blend_func_extended.java new file mode 100644 index 0000000..938913f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_blend_func_extended.java @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.GLchar; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.ByteBuffer; + +public interface ARB_blend_func_extended { + + /** + * Accepted by the <src> and <dst> parameters of BlendFunc and + * BlendFunci, and by the <srcRGB>, <dstRGB>, <srcAlpha> and <dstAlpha> + * parameters of BlendFuncSeparate and BlendFuncSeparatei: + */ + int GL_SRC1_COLOR = 0x88F9; + int GL_SRC1_ALPHA = GL15.GL_SRC1_ALPHA; + int GL_ONE_MINUS_SRC1_COLOR = 0x88FA; + int GL_ONE_MINUS_SRC1_ALPHA = 0x88FB; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv + * and GetDoublev: + */ + int GL_MAX_DUAL_SOURCE_DRAW_BUFFERS = 0x88FC; + + @Reuse("GL33") + void glBindFragDataLocationIndexed(@GLuint int program, @GLuint int colorNumber, @GLuint int index, @NullTerminated @Const @GLchar ByteBuffer name); + + @Reuse("GL33") + @Alternate("glBindFragDataLocationIndexed") + void glBindFragDataLocationIndexed(@GLuint int program, @GLuint int colorNumber, @GLuint int index, @NullTerminated CharSequence name); + + @Reuse("GL33") + int glGetFragDataIndex(@GLuint int program, @NullTerminated @Const @GLchar ByteBuffer name); + + @Reuse("GL33") + @Alternate("glGetFragDataIndex") + int glGetFragDataIndex(@GLuint int program, @NullTerminated CharSequence name); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_buffer_object.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_buffer_object.java new file mode 100644 index 0000000..4087a8c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_buffer_object.java @@ -0,0 +1,161 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.Buffer; +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +@Extension(postfix = "ARB", isFinal = false) +public interface ARB_buffer_object { + + /** Accepted by the <usage> parameter of BufferDataARB: */ + int GL_STREAM_DRAW_ARB = 0x88E0; + int GL_STREAM_READ_ARB = 0x88E1; + int GL_STREAM_COPY_ARB = 0x88E2; + int GL_STATIC_DRAW_ARB = 0x88E4; + int GL_STATIC_READ_ARB = 0x88E5; + int GL_STATIC_COPY_ARB = 0x88E6; + int GL_DYNAMIC_DRAW_ARB = 0x88E8; + int GL_DYNAMIC_READ_ARB = 0x88E9; + int GL_DYNAMIC_COPY_ARB = 0x88EA; + + /** Accepted by the <access> parameter of MapBufferARB: */ + int GL_READ_ONLY_ARB = 0x88B8; + int GL_WRITE_ONLY_ARB = 0x88B9; + int GL_READ_WRITE_ARB = 0x88BA; + + /** Accepted by the <pname> parameter of GetBufferParameterivARB: */ + int GL_BUFFER_SIZE_ARB = 0x8764; + int GL_BUFFER_USAGE_ARB = 0x8765; + int GL_BUFFER_ACCESS_ARB = 0x88BB; + int GL_BUFFER_MAPPED_ARB = 0x88BC; + int GL_BUFFER_MAP_POINTER_ARB = 0x88BD; + + @Code(" StateTracker.bindBuffer(caps, target, buffer);") + void glBindBufferARB(@GLenum int target, @GLuint int buffer); + + void glDeleteBuffersARB(@AutoSize("buffers") @GLsizei int n, @Const @GLuint IntBuffer buffers); + + @Alternate("glDeleteBuffersARB") + void glDeleteBuffersARB(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(caps, buffer)", keepParam = true) int buffer); + + void glGenBuffersARB(@AutoSize("buffers") @GLsizei int n, @OutParameter @GLuint IntBuffer buffers); + + @Alternate("glGenBuffersARB") + @GLreturn("buffers") + void glGenBuffersARB2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer buffers); + + boolean glIsBufferARB(@GLuint int buffer); + + @GenerateAutos + void glBufferDataARB(@GLenum int target, @AutoSize("data") @GLsizeiptrARB long size, + @Check + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer data, @GLenum int usage); + + void glBufferSubDataARB(@GLenum int target, @GLintptrARB long offset, @AutoSize("data") @GLsizeiptrARB long size, + @Check + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer data); + + void glGetBufferSubDataARB(@GLenum int target, @GLintptrARB long offset, @AutoSize("data") @GLsizeiptrARB long size, + @OutParameter + @Check + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer data); + + /** + * glMapBufferARB maps a GL buffer object to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapBufferARB like this: + *

+ * ByteBuffer mapped_buffer; mapped_buffer = glMapBufferARB(..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBufferARB(..., ..., mapped_buffer); + *

+ * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + *

+ * The version of this method without an explicit length argument calls glGetBufferParameterARB internally to + * retrieve the current buffer object size, which may cause a pipeline flush and reduce application performance. + *

+ * The version of this method with an explicit length argument is a fast alternative to the one without. No GL call + * is made to retrieve the buffer object size, so the user is responsible for tracking and using the appropriate length.
+ * Security warning: The length argument should match the buffer object size. Reading from or writing to outside + * the memory region that corresponds to the mapped buffer object will cause native crashes. + * + * @param length the length of the mapped memory in bytes. + * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. + * + * @return A ByteBuffer representing the mapped buffer memory. + */ + @CachedResult + @GLvoid + @AutoSize("GLChecks.getBufferObjectSizeARB(caps, target)") + ByteBuffer glMapBufferARB(@GLenum int target, @GLenum int access); + + boolean glUnmapBufferARB(@GLenum int target); + + @StripPostfix("params") + void glGetBufferParameterivARB(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetBufferParameteriARB} instead. */ + @Alternate("glGetBufferParameterivARB") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "ARBBufferObject", method = "glGetBufferParameteriARB") + @Deprecated + void glGetBufferParameterivARB2(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + @Alternate("glGetBufferParameterivARB") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetBufferParameterivARB3(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + @StripPostfix("pointer") + @AutoSize("GLChecks.getBufferObjectSizeARB(caps, target)") + void glGetBufferPointervARB(@GLenum int target, @GLenum int pname, @Result @GLvoid ByteBuffer pointer); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_buffer_storage.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_buffer_storage.java new file mode 100644 index 0000000..38b04d9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_buffer_storage.java @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2002-2013 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.Buffer; + +@Dependent +public interface ARB_buffer_storage { + + /** + * Accepted in the <flags> parameter of BufferStorage and + * NamedBufferStorageEXT: + */ + int GL_MAP_PERSISTENT_BIT = 0x0040, + GL_MAP_COHERENT_BIT = 0x0080, + GL_DYNAMIC_STORAGE_BIT = 0x0100, + GL_CLIENT_STORAGE_BIT = 0x0200; + + /** Accepted by the <pname> parameter of GetBufferParameter{i|i64}v:\ */ + + int GL_BUFFER_IMMUTABLE_STORAGE = 0x821F, + GL_BUFFER_STORAGE_FLAGS = 0x8220; + + /** Accepted by the <barriers> parameter of MemoryBarrier: */ + int GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT = 0x00004000; + + @Reuse("GL44") + void glBufferStorage(@GLenum int target, + @AutoSize("data") @GLsizeiptr long size, + @Const + @GLbyte + @GLshort + @GLint + @GLuint64 + @GLfloat + @GLdouble Buffer data, + @GLbitfield int flags); + + @Reuse("GL44") + @Alternate("glBufferStorage") + void glBufferStorage2(@GLenum int target, + @GLsizeiptr long size, + @Constant("0L") @Const Buffer data, + @GLbitfield int flags); + + @Dependent("GL_EXT_direct_state_access") + void glNamedBufferStorageEXT(@GLuint int buffer, + @AutoSize("data") @GLsizeiptr long size, + @Const + @GLbyte + @GLshort + @GLint + @GLuint64 + @GLfloat + @GLdouble Buffer data, + @GLbitfield int flags); + + @Dependent("GL_EXT_direct_state_access") + @Alternate("glNamedBufferStorageEXT") + void glNamedBufferStorageEXT2(@GLuint int buffer, + @GLsizeiptr long size, + @Constant("0L") @Const Buffer data, + @GLbitfield int flags); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_cl_event.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_cl_event.java new file mode 100644 index 0000000..8b5398d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_cl_event.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.opencl.CLContext; +import org.lwjgl.opencl.CLEvent; +import org.lwjgl.util.generator.Extension; +import org.lwjgl.util.generator.Imports; +import org.lwjgl.util.generator.PointerWrapper; +import org.lwjgl.util.generator.opengl.GLbitfield; + +@Imports("org.lwjgl.opencl.*") +@Extension(postfix = "ARB", className = "ARBCLEvent") +public interface ARB_cl_event { + + /** Returned in <values> for GetSynciv <pname> OBJECT_TYPE. */ + int GL_SYNC_CL_EVENT_ARB = 0x8240; + + /** Returned in <values> for GetSynciv <pname> SYNC_CONDITION. */ + int GL_SYNC_CL_EVENT_COMPLETE_ARB = 0x8241; + + @PointerWrapper("GLsync") + GLSync glCreateSyncFromCLeventARB(@PointerWrapper("cl_context") CLContext context, @PointerWrapper("cl_event") CLEvent event, @GLbitfield int flags); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_clear_buffer_object.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_clear_buffer_object.java new file mode 100644 index 0000000..00ad077 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_clear_buffer_object.java @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.ByteBuffer; + +@Dependent +public interface ARB_clear_buffer_object { + + @Reuse("GL43") + void glClearBufferData(@GLenum int target, + @GLenum int internalformat, + @GLenum int format, + @GLenum int type, + @Check("1") @Const @GLvoid ByteBuffer data); + + @Reuse("GL43") + void glClearBufferSubData(@GLenum int target, + @GLenum int internalformat, + @GLintptr long offset, + @AutoSize("data") @GLsizeiptr long size, + @GLenum int format, + @GLenum int type, + @Const @GLvoid ByteBuffer data); + + @Dependent("GL_EXT_direct_state_access") + void glClearNamedBufferDataEXT(@GLuint int buffer, + @GLenum int internalformat, + @GLenum int format, + @GLenum int type, + @Check("1") @Const @GLvoid ByteBuffer data); + + @Dependent("GL_EXT_direct_state_access") + void glClearNamedBufferSubDataEXT(@GLuint int buffer, + @GLenum int internalformat, + @GLintptr long offset, + @AutoSize("data") @GLsizeiptr long size, + @GLenum int format, + @GLenum int type, + @Const @GLvoid ByteBuffer data); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_clear_texture.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_clear_texture.java new file mode 100644 index 0000000..9715945 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_clear_texture.java @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2002-2013 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.Check; +import org.lwjgl.util.generator.Const; +import org.lwjgl.util.generator.Reuse; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.Buffer; + +public interface ARB_clear_texture { + + /** + * Accepted by the <pname> parameter for GetInternalformativ and + * GetInternalformati64v: + */ + int GL_CLEAR_TEXTURE = 0x9365; + + @Reuse("GL44") + void glClearTexImage(@GLuint int texture, int level, + @GLenum int format, @GLenum int type, + @Check(value = "1", canBeNull = true) + @Const + @GLbyte + @GLshort + @GLint + @GLuint64 + @GLfloat + @GLdouble Buffer data); + + @Reuse("GL44") + void glClearTexSubImage(@GLuint int texture, int level, + int xoffset, int yoffset, int zoffset, + @GLsizei int width, @GLsizei int height, @GLsizei int depth, + @GLenum int format, @GLenum int type, + @Check(value = "1", canBeNull = true) + @Const + @GLbyte + @GLshort + @GLint + @GLuint64 + @GLfloat + @GLdouble Buffer data); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_color_buffer_float.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_color_buffer_float.java new file mode 100644 index 0000000..5a11a19 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_color_buffer_float.java @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLenum; + +public interface ARB_color_buffer_float { + + /** + * Accepted by the <pname> parameters of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_RGBA_FLOAT_MODE_ARB = 0x8820; + + /** + * Accepted by the <target> parameter of ClampColorARB and the <pname> + * parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. + */ + int GL_CLAMP_VERTEX_COLOR_ARB = 0x891A; + int GL_CLAMP_FRAGMENT_COLOR_ARB = 0x891B; + int GL_CLAMP_READ_COLOR_ARB = 0x891C; + + /** Accepted by the <clamp> parameter of ClampColorARB. */ + int GL_FIXED_ONLY_ARB = 0x891D; + + /** + * Accepted as a value in the <piAttribIList> and <pfAttribFList> + * parameter arrays of wglChoosePixelFormatARB, and returned in the + * <piValues> parameter array of wglGetPixelFormatAttribivARB, and the + * <pfValues> parameter array of wglGetPixelFormatAttribfvARB: + */ + int WGL_TYPE_RGBA_FLOAT_ARB = 0x21A0; + + /** + * Accepted as values of the <render_type> arguments in the + * glXCreateNewContext and glXCreateContext functions + */ + int GLX_RGBA_FLOAT_TYPE = 0x20B9; + + /** Accepted as a bit set in the GLX_RENDER_TYPE variable */ + int GLX_RGBA_FLOAT_BIT = 0x00000004; + + void glClampColorARB(@GLenum int target, @GLenum int clamp); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_compatibility.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_compatibility.java new file mode 100644 index 0000000..5d053e8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_compatibility.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_compatibility { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_compressed_texture_pixel_storage.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_compressed_texture_pixel_storage.java new file mode 100644 index 0000000..3f1b68d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_compressed_texture_pixel_storage.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_compressed_texture_pixel_storage { + + /** + * Accepted by the <pname> parameter of PixelStore[fi], GetBooleanv, + * GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev: + */ + int GL_UNPACK_COMPRESSED_BLOCK_WIDTH = 0x9127, + GL_UNPACK_COMPRESSED_BLOCK_HEIGHT = 0x9128, + GL_UNPACK_COMPRESSED_BLOCK_DEPTH = 0x9129, + GL_UNPACK_COMPRESSED_BLOCK_SIZE = 0x912A, + GL_PACK_COMPRESSED_BLOCK_WIDTH = 0x912B, + GL_PACK_COMPRESSED_BLOCK_HEIGHT = 0x912C, + GL_PACK_COMPRESSED_BLOCK_DEPTH = 0x912D, + GL_PACK_COMPRESSED_BLOCK_SIZE = 0x912E; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_compute_shader.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_compute_shader.java new file mode 100644 index 0000000..6ed66b2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_compute_shader.java @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.Reuse; +import org.lwjgl.util.generator.opengl.GLintptr; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface ARB_compute_shader { + + /** + * Accepted by the <type> parameter of CreateShader and returned in the + * <params> parameter by GetShaderiv: + */ + int GL_COMPUTE_SHADER = 0x91B9; + + /** + * Accepted by the <pname> parameter of GetIntegerv, GetBooleanv, GetFloatv, + * GetDoublev and GetInteger64v: + */ + int GL_MAX_COMPUTE_UNIFORM_BLOCKS = 0x91BB, + GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS = 0x91BC, + GL_MAX_COMPUTE_IMAGE_UNIFORMS = 0x91BD, + GL_MAX_COMPUTE_SHARED_MEMORY_SIZE = 0x8262, + GL_MAX_COMPUTE_UNIFORM_COMPONENTS = 0x8263, + GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS = 0x8264, + GL_MAX_COMPUTE_ATOMIC_COUNTERS = 0x8265, + GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS = 0x8266, + GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS = 0x90EB; + + /** + * Accepted by the <pname> parameter of GetIntegeri_v, GetBooleani_v, + * GetFloati_v, GetDoublei_v and GetInteger64i_v: + */ + + int GL_MAX_COMPUTE_WORK_GROUP_COUNT = 0x91BE, + GL_MAX_COMPUTE_WORK_GROUP_SIZE = 0x91BF; + + /** Accepted by the <pname> parameter of GetProgramiv: */ + int GL_COMPUTE_WORK_GROUP_SIZE = 0x8267; + + /** Accepted by the <pname> parameter of GetActiveUniformBlockiv: */ + int GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER = 0x90EC; + + /** Accepted by the <pname> parameter of GetActiveAtomicCounterBufferiv: */ + int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER = 0x90ED; + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, and + * GetBufferPointerv: + */ + int GL_DISPATCH_INDIRECT_BUFFER = 0x90EE; + + /** + * Accepted by the <value> parameter of GetIntegerv, GetBooleanv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + int GL_DISPATCH_INDIRECT_BUFFER_BINDING = 0x90EF; + + /** Accepted by the <stages> parameter of UseProgramStages: */ + int GL_COMPUTE_SHADER_BIT = 0x00000020; + + @Reuse("GL43") + void glDispatchCompute(@GLuint int num_groups_x, + @GLuint int num_groups_y, + @GLuint int num_groups_z); + + @Reuse("GL43") + void glDispatchComputeIndirect(@GLintptr long indirect); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_compute_variable_group_size.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_compute_variable_group_size.java new file mode 100644 index 0000000..0bd6100 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_compute_variable_group_size.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2002-2013 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLuint; + +public interface ARB_compute_variable_group_size { + + /** + * Accepted by the <pname> parameter of GetIntegerv, GetBooleanv, GetFloatv, + * GetDoublev and GetInteger64v: + */ + int GL_MAX_COMPUTE_VARIABLE_GROUP_INVOCATIONS_ARB = 0x9344, + GL_MAX_COMPUTE_FIXED_GROUP_INVOCATIONS_ARB = 0x90EB; + /** + * Accepted by the <pname> parameter of GetIntegeri_v, GetBooleani_v, + * GetFloati_v, GetDoublei_v and GetInteger64i_v: + */ + int GL_MAX_COMPUTE_VARIABLE_GROUP_SIZE_ARB = 0x9345, + GL_MAX_COMPUTE_FIXED_GROUP_SIZE_ARB = 0x91BF; + + void glDispatchComputeGroupSizeARB(@GLuint int num_groups_x, @GLuint int num_groups_y, + @GLuint int num_groups_z, @GLuint int group_size_x, + @GLuint int group_size_y, @GLuint int group_size_z); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_conservative_depth.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_conservative_depth.java new file mode 100644 index 0000000..8ba78c5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_conservative_depth.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_conservative_depth { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_copy_buffer.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_copy_buffer.java new file mode 100644 index 0000000..d36b4e9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_copy_buffer.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.Reuse; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLintptr; +import org.lwjgl.util.generator.opengl.GLsizeiptr; + +public interface ARB_copy_buffer { + + /** + * Accepted by the target parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, + * GetBufferPointerv, MapBufferRange, FlushMappedBufferRange, + * GetBufferParameteriv, BindBufferRange, BindBufferBase, + * and CopyBufferSubData: + */ + int GL_COPY_READ_BUFFER = 0x8F36; + int GL_COPY_WRITE_BUFFER = 0x8F37; + + @Reuse("GL31") + void glCopyBufferSubData(@GLenum int readTarget, @GLenum int writeTarget, + @GLintptr long readOffset, @GLintptr long writeOffset, + @GLsizeiptr long size); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_copy_image.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_copy_image.java new file mode 100644 index 0000000..958c4db --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_copy_image.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.Reuse; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface ARB_copy_image { + + @Reuse("GL43") + void glCopyImageSubData( + @GLuint int srcName, @GLenum int srcTarget, int srcLevel, + int srcX, int srcY, int srcZ, + @GLuint int dstName, @GLenum int dstTarget, int dstLevel, + int dstX, int dstY, int dstZ, + @GLsizei int srcWidth, @GLsizei int srcHeight, @GLsizei int srcDepth); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_debug_output.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_debug_output.java new file mode 100644 index 0000000..df8eda0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_debug_output.java @@ -0,0 +1,138 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLchar; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +public interface ARB_debug_output { + + /** + * Tokens accepted by the <target> parameters of Enable, Disable, + * and IsEnabled: + */ + int GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB = 0x8242; + + /** + * Tokens accepted by the <value> parameters of GetBooleanv, + * GetIntegerv, GetFloatv, and GetDoublev: + */ + int GL_MAX_DEBUG_MESSAGE_LENGTH_ARB = 0x9143, + GL_MAX_DEBUG_LOGGED_MESSAGES_ARB = 0x9144, + GL_DEBUG_LOGGED_MESSAGES_ARB = 0x9145, + GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB = 0x8243; + + /** Tokens accepted by the <pname> parameter of GetPointerv: */ + int GL_DEBUG_CALLBACK_FUNCTION_ARB = 0x8244, + GL_DEBUG_CALLBACK_USER_PARAM_ARB = 0x8245; + + /** + * Tokens accepted or provided by the <source> parameters of + * DebugMessageControlARB, DebugMessageInsertARB and DEBUGPROCARB, + * and the <sources> parameter of GetDebugMessageLogARB: + */ + int GL_DEBUG_SOURCE_API_ARB = 0x8246, + GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB = 0x8247, + GL_DEBUG_SOURCE_SHADER_COMPILER_ARB = 0x8248, + GL_DEBUG_SOURCE_THIRD_PARTY_ARB = 0x8249, + GL_DEBUG_SOURCE_APPLICATION_ARB = 0x824A, + GL_DEBUG_SOURCE_OTHER_ARB = 0x824B; + + /** + * Tokens accepted or provided by the <type> parameters of + * DebugMessageControlARB, DebugMessageInsertARB and DEBUGPROCARB, + * and the <types> parameter of GetDebugMessageLogARB: + */ + int GL_DEBUG_TYPE_ERROR_ARB = 0x824C, + GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB = 0x824D, + GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB = 0x824E, + GL_DEBUG_TYPE_PORTABILITY_ARB = 0x824F, + GL_DEBUG_TYPE_PERFORMANCE_ARB = 0x8250, + GL_DEBUG_TYPE_OTHER_ARB = 0x8251; + + /** + * Tokens accepted or provided by the <severity> parameters of + * DebugMessageControlARB, DebugMessageInsertARB and DEBUGPROCARB + * callback functions, and the <severities> parameter of + * GetDebugMessageLogARB: + */ + int GL_DEBUG_SEVERITY_HIGH_ARB = 0x9146, + GL_DEBUG_SEVERITY_MEDIUM_ARB = 0x9147, + GL_DEBUG_SEVERITY_LOW_ARB = 0x9148; + + void glDebugMessageControlARB(@GLenum int source, + @GLenum int type, + @GLenum int severity, + @AutoSize(value = "ids", canBeNull = true) @GLsizei int count, + @Check(canBeNull = true) @Const @GLuint IntBuffer ids, + boolean enabled); + + void glDebugMessageInsertARB(@GLenum int source, @GLenum int type, @GLuint int id, @GLenum int severity, @AutoSize("buf") @GLsizei int length, @Const @GLchar ByteBuffer buf); + + @Alternate("glDebugMessageInsertARB") + void glDebugMessageInsertARB(@GLenum int source, @GLenum int type, @GLuint int id, @GLenum int severity, @Constant("buf.length()") @GLsizei int length, CharSequence buf); + + /** + * The {@code ARBDebugOutputCallback.Handler} implementation passed to this method will be used for + * ARB_debug_output messages. If callback is null, any previously registered handler for the current + * thread will be unregistered and stop receiving messages. + * + * @param callback the callback function to use + */ + @Code( + // Create a GlobalRef to the callback object and register it with the current context. + javaBeforeNative = "\t\tlong userParam = callback == null ? 0 : CallbackUtil.createGlobalRef(callback.getHandler());\n" + + "\t\tCallbackUtil.registerContextCallbackARB(userParam);" + ) + void glDebugMessageCallbackARB(@PointerWrapper(value = "GLDEBUGPROCARB", canBeNull = true) ARBDebugOutputCallback callback, + @Constant("userParam") @PointerWrapper("GLvoid *") long userParam); + + @GLuint + int glGetDebugMessageLogARB(@GLuint int count, + @AutoSize(value = "messageLog", canBeNull = true) @GLsizei int logSize, + @Check(value = "count", canBeNull = true) @GLenum IntBuffer sources, + @Check(value = "count", canBeNull = true) @GLenum IntBuffer types, + @Check(value = "count", canBeNull = true) @GLuint IntBuffer ids, + @Check(value = "count", canBeNull = true) @GLenum IntBuffer severities, + @Check(value = "count", canBeNull = true) @GLsizei IntBuffer lengths, + @Check(canBeNull = true) @OutParameter @GLchar ByteBuffer messageLog); + + // Not really useful and a pain to implement in Java + //void glGetPointerv(@GLenum int pname, void**params); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_depth_buffer_float.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_depth_buffer_float.java new file mode 100644 index 0000000..7e4c372 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_depth_buffer_float.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_depth_buffer_float { + + /** + * Accepted by the <internalformat> parameter of TexImage1D, TexImage2D, + * TexImage3D, CopyTexImage1D, CopyTexImage2D, and RenderbufferStorageEXT, + * and returned in the <data> parameter of GetTexLevelParameter and + * GetRenderbufferParameterivEXT: + */ + int GL_DEPTH_COMPONENT32F = 0x8CAC; + int GL_DEPTH32F_STENCIL8 = 0x8CAD; + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, TexImage1D, + * TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, and + * GetTexImage: + */ + int GL_FLOAT_32_UNSIGNED_INT_24_8_REV = 0x8DAD; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_depth_clamp.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_depth_clamp.java new file mode 100644 index 0000000..c81bf96 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_depth_clamp.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_depth_clamp { + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_DEPTH_CLAMP = 0x864F; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_depth_texture.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_depth_texture.java new file mode 100644 index 0000000..4998f08 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_depth_texture.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_depth_texture { + + /** + * Accepted by the <internalFormat> parameter of TexImage1D, TexImage2D, + * CopyTexImage1D and CopyTexImage2D: + */ + int GL_DEPTH_COMPONENT16_ARB = 0x81A5; + int GL_DEPTH_COMPONENT24_ARB = 0x81A6; + int GL_DEPTH_COMPONENT32_ARB = 0x81A7; + + /** + * Accepted by the <pname> parameter of GetTexLevelParameterfv and + * GetTexLevelParameteriv: + */ + int GL_TEXTURE_DEPTH_SIZE_ARB = 0x884A; + + /** + * Accepted by the <pname> parameter of TexParameterf, TexParameteri, + * TexParameterfv, TexParameteriv, GetTexParameterfv, and GetTexParameteriv: + */ + int GL_DEPTH_TEXTURE_MODE_ARB = 0x884B; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_draw_buffers.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_draw_buffers.java new file mode 100644 index 0000000..10d1f4e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_draw_buffers.java @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; + +import java.nio.*; + +public interface ARB_draw_buffers { + + /** + * Accepted by the <pname> parameters of GetIntegerv, GetFloatv, + * and GetDoublev: + */ + int GL_MAX_DRAW_BUFFERS_ARB = 0x8824; + int GL_DRAW_BUFFER0_ARB = 0x8825; + int GL_DRAW_BUFFER1_ARB = 0x8826; + int GL_DRAW_BUFFER2_ARB = 0x8827; + int GL_DRAW_BUFFER3_ARB = 0x8828; + int GL_DRAW_BUFFER4_ARB = 0x8829; + int GL_DRAW_BUFFER5_ARB = 0x882A; + int GL_DRAW_BUFFER6_ARB = 0x882B; + int GL_DRAW_BUFFER7_ARB = 0x882C; + int GL_DRAW_BUFFER8_ARB = 0x882D; + int GL_DRAW_BUFFER9_ARB = 0x882E; + int GL_DRAW_BUFFER10_ARB = 0x882F; + int GL_DRAW_BUFFER11_ARB = 0x8830; + int GL_DRAW_BUFFER12_ARB = 0x8831; + int GL_DRAW_BUFFER13_ARB = 0x8832; + int GL_DRAW_BUFFER14_ARB = 0x8833; + int GL_DRAW_BUFFER15_ARB = 0x8834; + + void glDrawBuffersARB(@AutoSize("buffers") @GLsizei int size, @Const @GLenum IntBuffer buffers); + + @Alternate("glDrawBuffersARB") + void glDrawBuffersARB(@Constant("1") @GLsizei int size, @Constant(value = "APIUtil.getInt(caps, buffer)", keepParam = true) int buffer); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_draw_buffers_blend.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_draw_buffers_blend.java new file mode 100644 index 0000000..924f13b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_draw_buffers_blend.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface ARB_draw_buffers_blend { + + void glBlendEquationiARB(@GLuint int buf, @GLenum int mode); + + void glBlendEquationSeparateiARB(@GLuint int buf, @GLenum int modeRGB, @GLenum int modeAlpha); + + void glBlendFunciARB(@GLuint int buf, @GLenum int src, @GLenum int dst); + + void glBlendFuncSeparateiARB(@GLuint int buf, @GLenum int srcRGB, @GLenum int dstRGB, @GLenum int srcAlpha, @GLenum int dstAlpha); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_draw_elements_base_vertex.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_draw_elements_base_vertex.java new file mode 100644 index 0000000..63339ca --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_draw_elements_base_vertex.java @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.Buffer; + +public interface ARB_draw_elements_base_vertex { + + @Reuse("GL32") + void glDrawElementsBaseVertex(@GLenum int mode, @AutoSize("indices") @GLsizei int count, @AutoType("indices") @GLenum int type, + @BufferObject(BufferKind.ElementVBO) + @Const + @GLubyte + @GLushort + @GLuint Buffer indices, int basevertex); + + @Reuse("GL32") + void glDrawRangeElementsBaseVertex(@GLenum int mode, @GLuint int start, @GLuint int end, @AutoSize("indices") @GLsizei int count, @AutoType("indices") @GLenum int type, + @BufferObject(BufferKind.ElementVBO) + @Const + @GLubyte + @GLushort + @GLuint Buffer indices, int basevertex); + + @Reuse("GL32") + void glDrawElementsInstancedBaseVertex(@GLenum int mode, @AutoSize("indices") @GLsizei int count, @AutoType("indices") @GLenum int type, + @BufferObject(BufferKind.ElementVBO) + @Const + @GLubyte + @GLushort + @GLuint Buffer indices, @GLsizei int primcount, int basevertex); + + //void glMultiDrawElementsBaseVertex(@GLenum int mode, @GLsizei*count, @GLenum int type, void**indices, @GLsizei int primcount, int*basevertex) + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_draw_indirect.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_draw_indirect.java new file mode 100644 index 0000000..523e3cc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_draw_indirect.java @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLvoid; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +import com.sun.mirror.type.PrimitiveType; + +public interface ARB_draw_indirect { + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, + * GetBufferPointerv, MapBufferRange, FlushMappedBufferRange, + * GetBufferParameteriv, BindBufferRange, BindBufferBase, and + * CopyBufferSubData: + */ + int GL_DRAW_INDIRECT_BUFFER = 0x8F3F; + + /** + * Accepted by the <value> parameter of GetIntegerv, GetBooleanv, GetFloatv, + * and GetDoublev: + */ + int GL_DRAW_INDIRECT_BUFFER_BINDING = 0x8F43; + + @Reuse("GL40") + void glDrawArraysIndirect(@GLenum int mode, @BufferObject(BufferKind.IndirectBO) @Check("4 * 4") @Const @GLvoid ByteBuffer indirect); + + @Reuse("GL40") + @Alternate("glDrawArraysIndirect") + void glDrawArraysIndirect(@GLenum int mode, @BufferObject(BufferKind.IndirectBO) @Check("4") @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect); + + @Reuse("GL40") + void glDrawElementsIndirect(@GLenum int mode, @GLenum int type, @BufferObject(BufferKind.IndirectBO) @Check("5 * 4") @Const @GLvoid ByteBuffer indirect); + + @Reuse("GL40") + @Alternate("glDrawElementsIndirect") + void glDrawElementsIndirect(@GLenum int mode, @GLenum int type, @BufferObject(BufferKind.IndirectBO) @Check("5") @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_draw_instanced.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_draw_instanced.java new file mode 100644 index 0000000..b0f9bbd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_draw_instanced.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.Buffer; + +public interface ARB_draw_instanced { + + void glDrawArraysInstancedARB(@GLenum int mode, int first, @GLsizei int count, @GLsizei int primcount); + + void glDrawElementsInstancedARB(@GLenum int mode, @AutoSize("indices") @GLsizei int count, @AutoType("indices") @GLenum int type, + @BufferObject(BufferKind.ElementVBO) + @Const + @GLubyte + @GLushort + @GLuint Buffer indices, @GLsizei int primcount); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_enhanced_layouts.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_enhanced_layouts.java new file mode 100644 index 0000000..0f280bb --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_enhanced_layouts.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2002-2013 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_enhanced_layouts { + + /** Accepted in the <props> array of GetProgramResourceiv: */ + int GL_LOCATION_COMPONENT = 0x934A, + GL_TRANSFORM_FEEDBACK_BUFFER_INDEX = 0x934B, + GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE = 0x934C; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_explicit_attrib_location.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_explicit_attrib_location.java new file mode 100644 index 0000000..07617df --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_explicit_attrib_location.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_explicit_attrib_location { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_explicit_uniform_location.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_explicit_uniform_location.java new file mode 100644 index 0000000..8d01b58 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_explicit_uniform_location.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_explicit_uniform_location { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, GetDoublev, and GetInteger64v: + */ + int GL_MAX_UNIFORM_LOCATIONS = 0x826E; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_fragment_coord_conventions.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_fragment_coord_conventions.java new file mode 100644 index 0000000..d4eedab --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_fragment_coord_conventions.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_fragment_coord_conventions { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_fragment_layer_viewport.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_fragment_layer_viewport.java new file mode 100644 index 0000000..68fb0c8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_fragment_layer_viewport.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_fragment_layer_viewport { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_fragment_program.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_fragment_program.java new file mode 100644 index 0000000..cc767c9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_fragment_program.java @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_fragment_program extends ARB_program { + + /** + * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, by the + * <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev, + * and by the <target> parameter of ProgramStringARB, BindProgramARB, + * ProgramEnvParameter4[df][v]ARB, ProgramLocalParameter4[df][v]ARB, + * GetProgramEnvParameter[df]vARB, GetProgramLocalParameter[df]vARB, + * GetProgramivARB and GetProgramStringARB. + */ + int GL_FRAGMENT_PROGRAM_ARB = 0x8804; + + /** + * Accepted by the <pname> parameter of GetProgramivARB: + */ + int GL_PROGRAM_ALU_INSTRUCTIONS_ARB = 0x8805; + int GL_PROGRAM_TEX_INSTRUCTIONS_ARB = 0x8806; + int GL_PROGRAM_TEX_INDIRECTIONS_ARB = 0x8807; + int GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = 0x8808; + int GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = 0x8809; + int GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = 0x880A; + int GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB = 0x880B; + int GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB = 0x880C; + int GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB = 0x880D; + int GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB = 0x880E; + int GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB = 0x880F; + int GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB = 0x8810; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + int GL_MAX_TEXTURE_COORDS_ARB = 0x8871; + int GL_MAX_TEXTURE_IMAGE_UNITS_ARB = 0x8872; +} + diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_fragment_program_shadow.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_fragment_program_shadow.java new file mode 100644 index 0000000..1900de0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_fragment_program_shadow.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_fragment_program_shadow { + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_fragment_shader.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_fragment_shader.java new file mode 100644 index 0000000..85fb0c2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_fragment_shader.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_fragment_shader { + + /** + * Accepted by the <shaderType> argument of CreateShaderObjectARB and + * returned by the <params> parameter of GetObjectParameter{fi}vARB: + */ + int GL_FRAGMENT_SHADER_ARB = 0x8B30; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB = 0x8B49; + int GL_MAX_TEXTURE_COORDS_ARB = 0x8871; + int GL_MAX_TEXTURE_IMAGE_UNITS_ARB = 0x8872; + + /** + * Accepted by the <target> parameter of Hint and the <pname> parameter of + * GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev: + */ + int GL_FRAGMENT_SHADER_DERIVATIVE_HINT_ARB = 0x8B8B; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_framebuffer_no_attachments.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_framebuffer_no_attachments.java new file mode 100644 index 0000000..6efe5c3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_framebuffer_no_attachments.java @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLreturn; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.IntBuffer; + +@Dependent +@Extension(postfix = "") +public interface ARB_framebuffer_no_attachments { + + /** + * Accepted by the <pname> parameter of FramebufferParameteri, + * GetFramebufferParameteriv, NamedFramebufferParameteriEXT, and + * GetNamedFramebufferParameterivEXT: + */ + int GL_FRAMEBUFFER_DEFAULT_WIDTH = 0x9310, + GL_FRAMEBUFFER_DEFAULT_HEIGHT = 0x9311, + GL_FRAMEBUFFER_DEFAULT_LAYERS = 0x9312, + GL_FRAMEBUFFER_DEFAULT_SAMPLES = 0x9313, + GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS = 0x9314; + + /** + * Accepted by the <pname> parameter of GetIntegerv, GetBooleanv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + int GL_MAX_FRAMEBUFFER_WIDTH = 0x9315, + GL_MAX_FRAMEBUFFER_HEIGHT = 0x9316, + GL_MAX_FRAMEBUFFER_LAYERS = 0x9317, + GL_MAX_FRAMEBUFFER_SAMPLES = 0x9318; + + @Reuse("GL43") + void glFramebufferParameteri(@GLenum int target, @GLenum int pname, int param); + + @Reuse("GL43") + @StripPostfix("params") + void glGetFramebufferParameteriv(@GLenum int target, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + @Reuse("GL43") + @Alternate("glGetFramebufferParameteriv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetFramebufferParameteriv2(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + @Dependent("GL_EXT_direct_state_access") + void glNamedFramebufferParameteriEXT(@GLuint int framebuffer, @GLenum int pname, + int param); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix(value = "params", extension = "EXT") + void glGetNamedFramebufferParameterivEXT(@GLuint int framebuffer, @GLenum int pname, + @OutParameter @Check("1") IntBuffer params); + + @Alternate("glGetNamedFramebufferParameterivEXT") + @GLreturn("params") + @Dependent("GL_EXT_direct_state_access") + @StripPostfix(value = "params", extension = "EXT") + void glGetNamedFramebufferParameterivEXT2(@GLuint int framebuffer, @GLenum int pname, + @OutParameter IntBuffer params); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_framebuffer_object.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_framebuffer_object.java new file mode 100644 index 0000000..06966a5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_framebuffer_object.java @@ -0,0 +1,312 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.IntBuffer; + +@Extension(postfix = "") +public interface ARB_framebuffer_object { + + /** + * Accepted by the <target> parameter of BindFramebuffer, + * CheckFramebufferStatus, FramebufferTexture{1D|2D|3D}, + * FramebufferRenderbuffer, and + * GetFramebufferAttachmentParameteriv: + */ + int GL_FRAMEBUFFER = 0x8D40; + int GL_READ_FRAMEBUFFER = 0x8CA8; + int GL_DRAW_FRAMEBUFFER = 0x8CA9; + + /** + * Accepted by the <target> parameter of BindRenderbuffer, + * RenderbufferStorage, and GetRenderbufferParameteriv, and + * returned by GetFramebufferAttachmentParameteriv: + */ + int GL_RENDERBUFFER = 0x8D41; + + /** + * Accepted by the <internalformat> parameter of + * RenderbufferStorage: + */ + int GL_STENCIL_INDEX1 = 0x8D46; + int GL_STENCIL_INDEX4 = 0x8D47; + int GL_STENCIL_INDEX8 = 0x8D48; + int GL_STENCIL_INDEX16 = 0x8D49; + + /** Accepted by the <pname> parameter of GetRenderbufferParameteriv: */ + int GL_RENDERBUFFER_WIDTH = 0x8D42; + int GL_RENDERBUFFER_HEIGHT = 0x8D43; + int GL_RENDERBUFFER_INTERNAL_FORMAT = 0x8D44; + int GL_RENDERBUFFER_RED_SIZE = 0x8D50; + int GL_RENDERBUFFER_GREEN_SIZE = 0x8D51; + int GL_RENDERBUFFER_BLUE_SIZE = 0x8D52; + int GL_RENDERBUFFER_ALPHA_SIZE = 0x8D53; + int GL_RENDERBUFFER_DEPTH_SIZE = 0x8D54; + int GL_RENDERBUFFER_STENCIL_SIZE = 0x8D55; + int GL_RENDERBUFFER_SAMPLES = 0x8CAB; + + /** + * Accepted by the <pname> parameter of + * GetFramebufferAttachmentParameteriv: + */ + int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0; + int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1; + int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2; + int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3; + int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 0x8CD4; + int GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 0x8210; + int GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 0x8211; + int GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE = 0x8212; + int GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 0x8213; + int GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 0x8214; + int GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 0x8215; + int GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 0x8216; + int GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 0x8217; + + /** Returned in <params> by GetFramebufferAttachmentParameteriv: */ + int GL_SRGB = 0x8C40; + int GL_UNSIGNED_NORMALIZED = 0x8C17; + int GL_FRAMEBUFFER_DEFAULT = 0x8218; + int GL_INDEX = 0x8222; + + /** + * Accepted by the <attachment> parameter of + * FramebufferTexture{1D|2D|3D}, FramebufferRenderbuffer, and + * GetFramebufferAttachmentParameteriv + */ + int GL_COLOR_ATTACHMENT0 = 0x8CE0; + int GL_COLOR_ATTACHMENT1 = 0x8CE1; + int GL_COLOR_ATTACHMENT2 = 0x8CE2; + int GL_COLOR_ATTACHMENT3 = 0x8CE3; + int GL_COLOR_ATTACHMENT4 = 0x8CE4; + int GL_COLOR_ATTACHMENT5 = 0x8CE5; + int GL_COLOR_ATTACHMENT6 = 0x8CE6; + int GL_COLOR_ATTACHMENT7 = 0x8CE7; + int GL_COLOR_ATTACHMENT8 = 0x8CE8; + int GL_COLOR_ATTACHMENT9 = 0x8CE9; + int GL_COLOR_ATTACHMENT10 = 0x8CEA; + int GL_COLOR_ATTACHMENT11 = 0x8CEB; + int GL_COLOR_ATTACHMENT12 = 0x8CEC; + int GL_COLOR_ATTACHMENT13 = 0x8CED; + int GL_COLOR_ATTACHMENT14 = 0x8CEE; + int GL_COLOR_ATTACHMENT15 = 0x8CEF; + int GL_DEPTH_ATTACHMENT = 0x8D00; + int GL_STENCIL_ATTACHMENT = 0x8D20; + int GL_DEPTH_STENCIL_ATTACHMENT = 0x821A; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_MAX_SAMPLES = 0x8D57; + + /** Returned by CheckFramebufferStatus(): */ + int GL_FRAMEBUFFER_COMPLETE = 0x8CD5; + int GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6; + int GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7; + int GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER = 0x8CDB; + int GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER = 0x8CDC; + int GL_FRAMEBUFFER_UNSUPPORTED = 0x8CDD; + int GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 0x8D56; + int GL_FRAMEBUFFER_UNDEFINED = 0x8219; + + /** + * Accepted by the <pname> parameters of GetIntegerv, GetFloatv, + * and GetDoublev: + */ + int GL_FRAMEBUFFER_BINDING = 0x8CA6; // alias DRAW_FRAMEBUFFER_BINDING + int GL_DRAW_FRAMEBUFFER_BINDING = 0x8CA6; + int GL_READ_FRAMEBUFFER_BINDING = 0x8CAA; + int GL_RENDERBUFFER_BINDING = 0x8CA7; + int GL_MAX_COLOR_ATTACHMENTS = 0x8CDF; + int GL_MAX_RENDERBUFFER_SIZE = 0x84E8; + + /** Returned by GetError(): */ + int GL_INVALID_FRAMEBUFFER_OPERATION = 0x0506; + + /** + * Accepted by the <format> parameter of DrawPixels, ReadPixels, + * TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, + * TexSubImage3D, and GetTexImage, by the <type> parameter of + * CopyPixels, by the <internalformat> parameter of TexImage1D, + * TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and + * RenderbufferStorage, and returned in the <data> parameter of + * GetTexLevelParameter and GetRenderbufferParameteriv: + */ + int GL_DEPTH_STENCIL = 0x84F9; + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, + * TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, + * TexSubImage3D, and GetTexImage: + */ + int GL_UNSIGNED_INT_24_8 = 0x84FA; + + /** + * Accepted by the <internalformat> parameter of TexImage1D, + * TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and + * RenderbufferStorage, and returned in the <data> parameter of + * GetTexLevelParameter and GetRenderbufferParameteriv: + */ + int GL_DEPTH24_STENCIL8 = 0x88F0; + + /** Accepted by the <value> parameter of GetTexLevelParameter: */ + int GL_TEXTURE_STENCIL_SIZE = 0x88F1; + + @Reuse("GL30") + boolean glIsRenderbuffer(@GLuint int renderbuffer); + + @Reuse("GL30") + void glBindRenderbuffer(@GLenum int target, @GLuint int renderbuffer); + + @Reuse("GL30") + void glDeleteRenderbuffers(@AutoSize("renderbuffers") @GLsizei int n, @Const @GLuint IntBuffer renderbuffers); + + @Reuse("GL30") + @Alternate("glDeleteRenderbuffers") + void glDeleteRenderbuffers(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(caps, renderbuffer)", keepParam = true) int renderbuffer); + + @Reuse("GL30") + void glGenRenderbuffers(@AutoSize("renderbuffers") @GLsizei int n, @OutParameter @GLuint IntBuffer renderbuffers); + + @Reuse("GL30") + @Alternate("glGenRenderbuffers") + @GLreturn("renderbuffers") + void glGenRenderbuffers2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer renderbuffers); + + @Reuse("GL30") + void glRenderbufferStorage(@GLenum int target, @GLenum int internalformat, + @GLsizei int width, @GLsizei int height); + + @Reuse("GL30") + void glRenderbufferStorageMultisample(@GLenum int target, @GLsizei int samples, + @GLenum int internalformat, + @GLsizei int width, @GLsizei int height); + + @Reuse("GL30") + @StripPostfix("params") + void glGetRenderbufferParameteriv(@GLenum int target, @GLenum int pname, @Check("4") @OutParameter IntBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetRenderbufferParameteri} instead. */ + @Alternate("glGetRenderbufferParameteriv") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "ARBFramebufferObject", method = "glGetRenderbufferParameteri") + @Deprecated + void glGetRenderbufferParameteriv2(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + @Reuse("GL30") + @Alternate("glGetRenderbufferParameteriv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetRenderbufferParameteriv3(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + @Reuse("GL30") + boolean glIsFramebuffer(@GLuint int framebuffer); + + @Reuse("GL30") + void glBindFramebuffer(@GLenum int target, @GLuint int framebuffer); + + @Reuse("GL30") + void glDeleteFramebuffers(@AutoSize("framebuffers") @GLsizei int n, @Const @GLuint IntBuffer framebuffers); + + @Reuse("GL30") + @Alternate("glDeleteFramebuffers") + void glDeleteFramebuffers(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(caps, framebuffer)", keepParam = true) int framebuffer); + + @Reuse("GL30") + void glGenFramebuffers(@AutoSize("framebuffers") @GLsizei int n, @OutParameter @GLuint IntBuffer framebuffers); + + @Reuse("GL30") + @Alternate("glGenFramebuffers") + @GLreturn("framebuffers") + void glGenFramebuffers2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer framebuffers); + + @Reuse("GL30") + @GLenum + int glCheckFramebufferStatus(@GLenum int target); + + @Reuse("GL30") + void glFramebufferTexture1D(@GLenum int target, @GLenum int attachment, + @GLenum int textarget, @GLuint int texture, int level); + + @Reuse("GL30") + void glFramebufferTexture2D(@GLenum int target, @GLenum int attachment, + @GLenum int textarget, @GLuint int texture, int level); + + @Reuse("GL30") + void glFramebufferTexture3D(@GLenum int target, @GLenum int attachment, + @GLenum int textarget, @GLuint int texture, + int level, int layer); + + @Reuse("GL30") + void glFramebufferTextureLayer(@GLenum int target, @GLenum int attachment, + @GLuint int texture, int level, int layer); + + @Reuse("GL30") + void glFramebufferRenderbuffer(@GLenum int target, @GLenum int attachment, + @GLenum int renderbuffertarget, @GLuint int renderbuffer); + + @Reuse("GL30") + @StripPostfix("params") + void glGetFramebufferAttachmentParameteriv(@GLenum int target, @GLenum int attachment, + @GLenum int pname, @Check("4") @OutParameter IntBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetFramebufferAttachmentParameteri} instead. */ + @Alternate("glGetFramebufferAttachmentParameteriv") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "GL30", method = "glGetFramebufferAttachmentParameteri") + @Deprecated + void glGetFramebufferAttachmentParameteriv2(@GLenum int target, @GLenum int attachment, + @GLenum int pname, @OutParameter IntBuffer params); + + @Reuse("GL30") + @Alternate("glGetFramebufferAttachmentParameteriv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetFramebufferAttachmentParameteriv3(@GLenum int target, @GLenum int attachment, + @GLenum int pname, @OutParameter IntBuffer params); + + @Reuse("GL30") + void glBlitFramebuffer(int srcX0, int srcY0, int srcX1, int srcY1, + int dstX0, int dstY0, int dstX1, int dstY1, + @GLbitfield int mask, @GLenum int filter); + + @Reuse("GL30") + void glGenerateMipmap(@GLenum int target); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_framebuffer_sRGB.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_framebuffer_sRGB.java new file mode 100644 index 0000000..d62a171 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_framebuffer_sRGB.java @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_framebuffer_sRGB { + + /** + * Accepted by the <attribList> parameter of glXChooseVisual, and by + * the <attrib> parameter of glXGetConfig: + */ + int GLX_FRAMEBUFFER_SRGB_CAPABLE_ARB = 0x20B2; + + /** + * Accepted by the <piAttributes> parameter of + * wglGetPixelFormatAttribivEXT, wglGetPixelFormatAttribfvEXT, and + * the <piAttribIList> and <pfAttribIList> of wglChoosePixelFormatEXT: + */ + int WGL_FRAMEBUFFER_SRGB_CAPABLE_ARB = 0x20A9; + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + int GL_FRAMEBUFFER_SRGB_ARB = 0x8DB9; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_FRAMEBUFFER_SRGB_CAPABLE_ARB = 0x8DBA; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_geometry_shader4.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_geometry_shader4.java new file mode 100644 index 0000000..7f17ccc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_geometry_shader4.java @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface ARB_geometry_shader4 { + + /** + * Accepted by the <type> parameter of CreateShader and returned by the + * <params> parameter of GetShaderiv: + */ + int GL_GEOMETRY_SHADER_ARB = 0x8DD9; + + /** + * Accepted by the <pname> parameter of ProgramParameteriEXT and + * GetProgramiv: + */ + int GL_GEOMETRY_VERTICES_OUT_ARB = 0x8DDA; + int GL_GEOMETRY_INPUT_TYPE_ARB = 0x8DDB; + int GL_GEOMETRY_OUTPUT_TYPE_ARB = 0x8DDC; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_ARB = 0x8C29; + int GL_MAX_GEOMETRY_VARYING_COMPONENTS_ARB = 0x8DDD; + int GL_MAX_VERTEX_VARYING_COMPONENTS_ARB = 0x8DDE; + int GL_MAX_VARYING_COMPONENTS_ARB = 0x8B4B; + int GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_ARB = 0x8DDF; + int GL_MAX_GEOMETRY_OUTPUT_VERTICES_ARB = 0x8DE0; + int GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_ARB = 0x8DE1; + + /** + * Accepted by the <mode> parameter of Begin, DrawArrays, + * MultiDrawArrays, DrawElements, MultiDrawElements, and + * DrawRangeElements: + */ + int GL_LINES_ADJACENCY_ARB = 0xA; + int GL_LINE_STRIP_ADJACENCY_ARB = 0xB; + int GL_TRIANGLES_ADJACENCY_ARB = 0xC; + int GL_TRIANGLE_STRIP_ADJACENCY_ARB = 0xD; + + /** Returned by CheckFramebufferStatusEXT: */ + int GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_ARB = 0x8DA8; + int GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_ARB = 0x8DA9; + + /** + * Accepted by the <pname> parameter of GetFramebufferAttachment- + * ParameterivEXT: + */ + int GL_FRAMEBUFFER_ATTACHMENT_LAYERED_ARB = 0x8DA7; + int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_ARB = 0x8CD4; + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, + * and by the <pname> parameter of GetIntegerv, GetFloatv, GetDoublev, + * and GetBooleanv: + */ + int GL_PROGRAM_POINT_SIZE_ARB = 0x8642; + + void glProgramParameteriARB(@GLuint int program, @GLenum int pname, int value); + + void glFramebufferTextureARB(@GLenum int target, @GLenum int attachment, @GLuint int texture, int level); + + void glFramebufferTextureLayerARB(@GLenum int target, @GLenum int attachment, @GLuint int texture, int level, int layer); + + void glFramebufferTextureFaceARB(@GLenum int target, @GLenum int attachment, @GLuint int texture, int level, @GLenum int face); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_get_program_binary.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_get_program_binary.java new file mode 100644 index 0000000..e6f4774 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_get_program_binary.java @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; +import org.lwjgl.util.generator.opengl.GLvoid; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +public interface ARB_get_program_binary { + + /** + * Accepted by the <pname> parameter of ProgramParameteri and + * GetProgramiv: + */ + int GL_PROGRAM_BINARY_RETRIEVABLE_HINT = 0x8257; + + /** Accepted by the <pname> parameter of GetProgramiv: */ + int GL_PROGRAM_BINARY_LENGTH = 0x8741; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv and GetDoublev: + */ + int GL_NUM_PROGRAM_BINARY_FORMATS = 0x87FE, + GL_PROGRAM_BINARY_FORMATS = 0x87FF; + + @Reuse("GL41") + void glGetProgramBinary(@GLuint int program, @AutoSize("binary") @GLsizei int bufSize, + @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length, + @Check("1") @GLenum IntBuffer binaryFormat, + @OutParameter @GLvoid ByteBuffer binary); + + @Reuse("GL41") + void glProgramBinary(@GLuint int program, @GLenum int binaryFormat, @Const @GLvoid ByteBuffer binary, @AutoSize("binary") @GLsizei int length); + + @Reuse("GL41") + void glProgramParameteri(@GLuint int program, @GLenum int pname, int value); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_gpu_shader5.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_gpu_shader5.java new file mode 100644 index 0000000..7f2a031 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_gpu_shader5.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_gpu_shader5 { + + /** Accepted by the <pname> parameter of GetProgramiv: */ + int GL_GEOMETRY_SHADER_INVOCATIONS = 0x887F; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * GetDoublev, and GetInteger64v: + */ + int GL_MAX_GEOMETRY_SHADER_INVOCATIONS = 0x8E5A; + int GL_MIN_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5B; + int GL_MAX_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5C; + int GL_FRAGMENT_INTERPOLATION_OFFSET_BITS = 0x8E5D; + int GL_MAX_VERTEX_STREAMS = 0x8E71; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_gpu_shader_fp64.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_gpu_shader_fp64.java new file mode 100644 index 0000000..c7c8f2a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_gpu_shader_fp64.java @@ -0,0 +1,196 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.*; + +@Dependent +@Extension(postfix = "") +public interface ARB_gpu_shader_fp64 { + + /** + * Returned in the <type> parameter of GetActiveUniform, and + * GetTransformFeedbackVarying: + */ + int GL_DOUBLE = GL11.GL_DOUBLE; + int GL_DOUBLE_VEC2 = 0x8FFC; + int GL_DOUBLE_VEC3 = 0x8FFD; + int GL_DOUBLE_VEC4 = 0x8FFE; + int GL_DOUBLE_MAT2 = 0x8F46; + int GL_DOUBLE_MAT3 = 0x8F47; + int GL_DOUBLE_MAT4 = 0x8F48; + int GL_DOUBLE_MAT2x3 = 0x8F49; + int GL_DOUBLE_MAT2x4 = 0x8F4A; + int GL_DOUBLE_MAT3x2 = 0x8F4B; + int GL_DOUBLE_MAT3x4 = 0x8F4C; + int GL_DOUBLE_MAT4x2 = 0x8F4D; + int GL_DOUBLE_MAT4x3 = 0x8F4E; + + @Reuse("GL40") + void glUniform1d(int location, double x); + + @Reuse("GL40") + void glUniform2d(int location, double x, double y); + + @Reuse("GL40") + void glUniform3d(int location, double x, double y, double z); + + @Reuse("GL40") + void glUniform4d(int location, double x, double y, double z, double w); + + @Reuse("GL40") + @StripPostfix("value") + void glUniform1dv(int location, @AutoSize("value") @GLsizei int count, @Const DoubleBuffer value); + + @Reuse("GL40") + @StripPostfix("value") + void glUniform2dv(int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const DoubleBuffer value); + + @Reuse("GL40") + @StripPostfix("value") + void glUniform3dv(int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const DoubleBuffer value); + + @Reuse("GL40") + @StripPostfix("value") + void glUniform4dv(int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const DoubleBuffer value); + + @Reuse("GL40") + @StripPostfix("value") + void glUniformMatrix2dv(int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Reuse("GL40") + @StripPostfix("value") + void glUniformMatrix3dv(int location, @AutoSize(value = "value", expression = " / (3 * 3)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Reuse("GL40") + @StripPostfix("value") + void glUniformMatrix4dv(int location, @AutoSize(value = "value", expression = " >> 4") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Reuse("GL40") + @StripPostfix("value") + void glUniformMatrix2x3dv(int location, @AutoSize(value = "value", expression = " / (2 * 3)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Reuse("GL40") + @StripPostfix("value") + void glUniformMatrix2x4dv(int location, @AutoSize(value = "value", expression = " >> 3") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Reuse("GL40") + @StripPostfix("value") + void glUniformMatrix3x2dv(int location, @AutoSize(value = "value", expression = " / (3 * 2)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Reuse("GL40") + @StripPostfix("value") + void glUniformMatrix3x4dv(int location, @AutoSize(value = "value", expression = " / (3 * 4)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Reuse("GL40") + @StripPostfix("value") + void glUniformMatrix4x2dv(int location, @AutoSize(value = "value", expression = " >> 3") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Reuse("GL40") + @StripPostfix("value") + void glUniformMatrix4x3dv(int location, @AutoSize(value = "value", expression = " / (4 * 3)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Reuse("GL40") + @StripPostfix("params") + void glGetUniformdv(@GLuint int program, int location, @OutParameter @Check DoubleBuffer params); + + // ---- + + @Dependent("GL_EXT_direct_state_access") + void glProgramUniform1dEXT(@GLuint int program, int location, double x); + + @Dependent("GL_EXT_direct_state_access") + void glProgramUniform2dEXT(@GLuint int program, int location, double x, double y); + + @Dependent("GL_EXT_direct_state_access") + void glProgramUniform3dEXT(@GLuint int program, int location, double x, double y, double z); + + @Dependent("GL_EXT_direct_state_access") + void glProgramUniform4dEXT(@GLuint int program, int location, double x, double y, double z, double w); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix(value="value", extension="EXT") + void glProgramUniform1dvEXT(@GLuint int program, int location, @AutoSize(value = "value") @GLsizei int count, @Const DoubleBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix(value = "value", extension = "EXT") + void glProgramUniform2dvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const DoubleBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix(value = "value", extension = "EXT") + void glProgramUniform3dvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const DoubleBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix(value = "value", extension = "EXT") + void glProgramUniform4dvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const DoubleBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix(value = "value", extension = "EXT") + void glProgramUniformMatrix2dvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix(value = "value", extension = "EXT") + void glProgramUniformMatrix3dvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " / (3 * 3)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix(value = "value", extension = "EXT") + void glProgramUniformMatrix4dvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 4") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix(value = "value", extension = "EXT") + void glProgramUniformMatrix2x3dvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " / (2 * 3)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix(value = "value", extension = "EXT") + void glProgramUniformMatrix2x4dvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 3") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix(value = "value", extension = "EXT") + void glProgramUniformMatrix3x2dvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " / (3 * 2)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix(value = "value", extension = "EXT") + void glProgramUniformMatrix3x4dvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " / (3 * 4)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix(value = "value", extension = "EXT") + void glProgramUniformMatrix4x2dvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 3") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix(value = "value", extension = "EXT") + void glProgramUniformMatrix4x3dvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " / (4 * 3)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_half_float_pixel.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_half_float_pixel.java new file mode 100644 index 0000000..8aaca95 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_half_float_pixel.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_half_float_pixel { + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, + * TexImage1D, TexImage2D, TexImage3D, GetTexImage, TexSubImage1D, + * TexSubImage2D, TexSubImage3D, GetHistogram, GetMinmax, + * ConvolutionFilter1D, ConvolutionFilter2D, GetConvolutionFilter, + * SeparableFilter2D, GetSeparableFilter, ColorTable, ColorSubTable, + * and GetColorTable: + */ + int GL_HALF_FLOAT_ARB = 0x140B; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_half_float_vertex.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_half_float_vertex.java new file mode 100644 index 0000000..9838535 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_half_float_vertex.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_half_float_vertex { + + /** + * Accepted by the <type> argument of VertexPointer, NormalPointer, + * ColorPointer, SecondaryColorPointer, FogCoordPointer, TexCoordPointer, + * and VertexAttribPointer: + */ + int GL_HALF_FLOAT = 0x140B; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_imaging.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_imaging.java new file mode 100644 index 0000000..fa97eb6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_imaging.java @@ -0,0 +1,336 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.*; + +/** + *

+ * The GL12 imaging subset extension. + * + * @author cix_foo + * @version $Revision$ + * $Id$ + */ + +@Extension(postfix = "") +@DeprecatedGL +public interface ARB_imaging { + + int GL_CONSTANT_COLOR = 0x8001; + int GL_ONE_MINUS_CONSTANT_COLOR = 0x8002; + int GL_CONSTANT_ALPHA = 0x8003; + int GL_ONE_MINUS_CONSTANT_ALPHA = 0x8004; + int GL_BLEND_COLOR = 0x8005; + int GL_FUNC_ADD = 0x8006; + int GL_MIN = 0x8007; + int GL_MAX = 0x8008; + int GL_BLEND_EQUATION = 0x8009; + int GL_FUNC_SUBTRACT = 0x800A; + int GL_FUNC_REVERSE_SUBTRACT = 0x800B; + int GL_COLOR_MATRIX = 0x80B1; + int GL_COLOR_MATRIX_STACK_DEPTH = 0x80B2; + int GL_MAX_COLOR_MATRIX_STACK_DEPTH = 0x80B3; + int GL_POST_COLOR_MATRIX_RED_SCALE = 0x80B4; + int GL_POST_COLOR_MATRIX_GREEN_SCALE = 0x80B5; + int GL_POST_COLOR_MATRIX_BLUE_SCALE = 0x80B6; + int GL_POST_COLOR_MATRIX_ALPHA_SCALE = 0x80B7; + int GL_POST_COLOR_MATRIX_RED_BIAS = 0x80B8; + int GL_POST_COLOR_MATRIX_GREEN_BIAS = 0x80B9; + int GL_POST_COLOR_MATRIX_BLUE_BIAS = 0x80BA; + int GL_POST_COLOR_MATRIX_ALPHA_BIAS = 0x80BB; + int GL_COLOR_TABLE = 0x80D0; + int GL_POST_CONVOLUTION_COLOR_TABLE = 0x80D1; + int GL_POST_COLOR_MATRIX_COLOR_TABLE = 0x80D2; + int GL_PROXY_COLOR_TABLE = 0x80D3; + int GL_PROXY_POST_CONVOLUTION_COLOR_TABLE = 0x80D4; + int GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE = 0x80D5; + int GL_COLOR_TABLE_SCALE = 0x80D6; + int GL_COLOR_TABLE_BIAS = 0x80D7; + int GL_COLOR_TABLE_FORMAT = 0x80D8; + int GL_COLOR_TABLE_WIDTH = 0x80D9; + int GL_COLOR_TABLE_RED_SIZE = 0x80DA; + int GL_COLOR_TABLE_GREEN_SIZE = 0x80DB; + int GL_COLOR_TABLE_BLUE_SIZE = 0x80DC; + int GL_COLOR_TABLE_ALPHA_SIZE = 0x80DD; + int GL_COLOR_TABLE_LUMINANCE_SIZE = 0x80DE; + int GL_COLOR_TABLE_INTENSITY_SIZE = 0x80DF; + int GL_CONVOLUTION_1D = 0x8010; + int GL_CONVOLUTION_2D = 0x8011; + int GL_SEPARABLE_2D = 0x8012; + int GL_CONVOLUTION_BORDER_MODE = 0x8013; + int GL_CONVOLUTION_FILTER_SCALE = 0x8014; + int GL_CONVOLUTION_FILTER_BIAS = 0x8015; + int GL_REDUCE = 0x8016; + int GL_CONVOLUTION_FORMAT = 0x8017; + int GL_CONVOLUTION_WIDTH = 0x8018; + int GL_CONVOLUTION_HEIGHT = 0x8019; + int GL_MAX_CONVOLUTION_WIDTH = 0x801A; + int GL_MAX_CONVOLUTION_HEIGHT = 0x801B; + int GL_POST_CONVOLUTION_RED_SCALE = 0x801C; + int GL_POST_CONVOLUTION_GREEN_SCALE = 0x801D; + int GL_POST_CONVOLUTION_BLUE_SCALE = 0x801E; + int GL_POST_CONVOLUTION_ALPHA_SCALE = 0x801F; + int GL_POST_CONVOLUTION_RED_BIAS = 0x8020; + int GL_POST_CONVOLUTION_GREEN_BIAS = 0x8021; + int GL_POST_CONVOLUTION_BLUE_BIAS = 0x8022; + int GL_POST_CONVOLUTION_ALPHA_BIAS = 0x8023; + int GL_IGNORE_BORDER = 0x8150; + int GL_CONSTANT_BORDER = 0x8151; + int GL_REPLICATE_BORDER = 0x8153; + int GL_CONVOLUTION_BORDER_COLOR = 0x8154; + int GL_HISTOGRAM = 0x8024; + int GL_PROXY_HISTOGRAM = 0x8025; + int GL_HISTOGRAM_WIDTH = 0x8026; + int GL_HISTOGRAM_FORMAT = 0x8027; + int GL_HISTOGRAM_RED_SIZE = 0x8028; + int GL_HISTOGRAM_GREEN_SIZE = 0x8029; + int GL_HISTOGRAM_BLUE_SIZE = 0x802A; + int GL_HISTOGRAM_ALPHA_SIZE = 0x802B; + int GL_HISTOGRAM_LUMINANCE_SIZE = 0x802C; + int GL_HISTOGRAM_SINK = 0x802D; + int GL_MINMAX = 0x802E; + int GL_MINMAX_FORMAT = 0x802F; + int GL_MINMAX_SINK = 0x8030; + int GL_TABLE_TOO_LARGE = 0x8031; + + @DeprecatedGL + void glColorTable(@GLenum int target, @GLenum int internalFormat, @GLsizei int width, @GLenum int format, @GLenum int type, + @BufferObject(BufferKind.UnpackPBO) + @Check("256") + @Const + @GLbyte + @GLfloat + @GLdouble Buffer data); + + @DeprecatedGL + void glColorSubTable(@GLenum int target, @GLsizei int start, @GLsizei int count, @GLenum int format, @GLenum int type, + @BufferObject(BufferKind.UnpackPBO) + @Check("256") + @Const + @GLbyte + @GLfloat + @GLdouble Buffer data); + + @StripPostfix("params") + @DeprecatedGL + void glColorTableParameteriv(@GLenum int target, @GLenum int pname, @Check("4") @Const IntBuffer params); + + @StripPostfix("params") + @DeprecatedGL + void glColorTableParameterfv(@GLenum int target, @GLenum int pname, @Check("4") @Const FloatBuffer params); + + @DeprecatedGL + void glCopyColorSubTable(@GLenum int target, @GLsizei int start, int x, int y, @GLsizei int width); + + @DeprecatedGL + void glCopyColorTable(@GLenum int target, @GLenum int internalformat, int x, int y, @GLsizei int width); + + @DeprecatedGL + void glGetColorTable(@GLenum int target, @GLenum int format, @GLenum int type, + @OutParameter + @Check("256") + @GLbyte + @GLfloat + @GLdouble Buffer data); + + @StripPostfix("params") + @DeprecatedGL + void glGetColorTableParameteriv(@GLenum int target, @GLenum int pname, @Check("4") IntBuffer params); + + @StripPostfix("params") + @DeprecatedGL + void glGetColorTableParameterfv(@GLenum int target, @GLenum int pname, @Check("4") FloatBuffer params); + + @Reuse("GL14") + void glBlendEquation(@GLenum int mode); + + @Reuse("GL14") + void glBlendColor(@GLclampf float red, @GLclampf float green, @GLclampf float blue, @GLclampf float alpha); + + @DeprecatedGL + void glHistogram(@GLenum int target, @GLsizei int width, @GLenum int internalformat, boolean sink); + + @DeprecatedGL + void glResetHistogram(@GLenum int target); + + @DeprecatedGL + void glGetHistogram(@GLenum int target, boolean reset, @GLenum int format, @GLenum int type, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @Check("256") + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer values); + + @StripPostfix("params") + @DeprecatedGL + void glGetHistogramParameterfv(@GLenum int target, @GLenum int pname, @OutParameter @Check("256") FloatBuffer params); + + @StripPostfix("params") + @DeprecatedGL + void glGetHistogramParameteriv(@GLenum int target, @GLenum int pname, @OutParameter @Check("256") IntBuffer params); + + @DeprecatedGL + void glMinmax(@GLenum int target, @GLenum int internalformat, boolean sink); + + @DeprecatedGL + void glResetMinmax(@GLenum int target); + + @DeprecatedGL + void glGetMinmax(@GLenum int target, boolean reset, @GLenum int format, @GLenum int types, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @Check("4") + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer values); + + @StripPostfix("params") + @DeprecatedGL + void glGetMinmaxParameterfv(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params); + + @StripPostfix("params") + @DeprecatedGL + void glGetMinmaxParameteriv(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + @DeprecatedGL + void glConvolutionFilter1D(@GLenum int target, @GLenum int internalformat, @GLsizei int width, @GLenum int format, @GLenum int type, + @BufferObject(BufferKind.UnpackPBO) + @Check("GLChecks.calculateImageStorage(image, format, type, width, 1, 1)") + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer image); + + @DeprecatedGL + void glConvolutionFilter2D(@GLenum int target, @GLenum int internalformat, @GLsizei int width, @GLsizei int height, @GLenum int format, @GLenum int type, + @BufferObject(BufferKind.UnpackPBO) + @Check("GLChecks.calculateImageStorage(image, format, type, width, height, 1)") + @Const + @GLbyte + @GLshort + @GLint Buffer image); + + @DeprecatedGL + void glConvolutionParameterf(@GLenum int target, @GLenum int pname, float params); + + @StripPostfix("params") + @DeprecatedGL + void glConvolutionParameterfv(@GLenum int target, @GLenum int pname, @Check("4") @Const FloatBuffer params); + + @DeprecatedGL + void glConvolutionParameteri(@GLenum int target, @GLenum int pname, int params); + + @StripPostfix("params") + @DeprecatedGL + void glConvolutionParameteriv(@GLenum int target, @GLenum int pname, @Check("4") @Const IntBuffer params); + + @DeprecatedGL + void glCopyConvolutionFilter1D(@GLenum int target, @GLenum int internalformat, int x, int y, @GLsizei int width); + + @DeprecatedGL + void glCopyConvolutionFilter2D(@GLenum int target, @GLenum int internalformat, int x, int y, @GLsizei int width, @GLsizei int height); + + // TODO: check buffer size valid + @DeprecatedGL + void glGetConvolutionFilter(@GLenum int target, @GLenum int format, @GLenum int type, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @Check + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer image); + + @StripPostfix("params") + @DeprecatedGL + void glGetConvolutionParameterfv(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params); + + @StripPostfix("params") + @DeprecatedGL + void glGetConvolutionParameteriv(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + // TODO: check buffer size valid + @DeprecatedGL + void glSeparableFilter2D(@GLenum int target, @GLenum int internalformat, @GLsizei int width, @GLsizei int height, @GLenum int format, @GLenum int type, + @BufferObject(BufferKind.UnpackPBO) + @Check + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer row, + @BufferObject(BufferKind.UnpackPBO) + @Check + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer column); + + // TODO: check buffer size valid + @DeprecatedGL + void glGetSeparableFilter(@GLenum int target, @GLenum int format, @GLenum int type, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @Check + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer row, + @BufferObject(BufferKind.PackPBO) + @Check + @GLbyte + @GLshort + @GLint + @GLdouble Buffer column, + @BufferObject(BufferKind.PackPBO) + @Check + @GLbyte + @GLshort + @GLint + @GLdouble Buffer span); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_indirect_parameters.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_indirect_parameters.java new file mode 100644 index 0000000..057e0a7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_indirect_parameters.java @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2002-2013 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLintptr; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLvoid; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +import com.sun.mirror.type.PrimitiveType; + +public interface ARB_indirect_parameters { + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, + * GetBufferPointerv, MapBufferRange, FlushMappedBufferRange, + * GetBufferParameteriv, and CopyBufferSubData: + */ + int GL_PARAMETER_BUFFER_ARB = 0x80EE; + + /** + * Accepted by the <value> parameter of GetIntegerv, GetBooleanv, GetFloatv, + * and GetDoublev: + */ + int GL_PARAMETER_BUFFER_BINDING_ARB = 0x80EF; + + void glMultiDrawArraysIndirectCountARB(@GLenum int mode, + @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 4 * 4 : stride) * maxdrawcount") @Const @GLvoid ByteBuffer indirect, + @GLintptr long drawcount, + @GLsizei int maxdrawcount, + @GLsizei int stride); + + @Alternate("glMultiDrawArraysIndirectCountARB") + void glMultiDrawArraysIndirectCountARB(@GLenum int mode, + @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 4 : stride >> 2) * maxdrawcount") @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect, + @GLintptr long drawcount, + @GLsizei int maxdrawcount, + @GLsizei int stride); + + void glMultiDrawElementsIndirectCountARB(@GLenum int mode, + @GLenum int type, + @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 5 * 4 : stride) * maxdrawcount") @Const @GLvoid ByteBuffer indirect, + @GLintptr long drawcount, + @GLsizei int maxdrawcount, + @GLsizei int stride); + + @Alternate("glMultiDrawElementsIndirectCountARB") + void glMultiDrawElementsIndirectCountARB(@GLenum int mode, + @GLenum int type, + @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 5 : stride >> 2) * maxdrawcount") @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect, + @GLintptr long drawcount, + @GLsizei int maxdrawcount, + @GLsizei int stride); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_instanced_arrays.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_instanced_arrays.java new file mode 100644 index 0000000..a770471 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_instanced_arrays.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLuint; + +public interface ARB_instanced_arrays { + + /** + * Accepted by the <pname> parameters of GetVertexAttribdv, + * GetVertexAttribfv, and GetVertexAttribiv: + */ + int GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ARB = 0x88FE; + + void glVertexAttribDivisorARB(@GLuint int index, @GLuint int divisor); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_internalformat_query.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_internalformat_query.java new file mode 100644 index 0000000..b649473 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_internalformat_query.java @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLreturn; +import org.lwjgl.util.generator.opengl.GLsizei; + +import java.nio.IntBuffer; + +@Extension(postfix = "") +public interface ARB_internalformat_query { + + /** Accepted by the <pname> parameter of GetInternalformativ: */ + int GL_NUM_SAMPLE_COUNTS = 0x9380; + + @StripPostfix("params") + @Reuse("GL42") + void glGetInternalformativ(@GLenum int target, @GLenum int internalformat, + @GLenum int pname, @AutoSize("params") @GLsizei int bufSize, @OutParameter IntBuffer params); + + @Alternate("glGetInternalformativ") + @StripPostfix("params") + @GLreturn("params") + @Reuse("GL42") + void glGetInternalformativ2(@GLenum int target, @GLenum int internalformat, + @GLenum int pname, @Constant("1") @GLsizei int bufSize, @OutParameter IntBuffer params); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_internalformat_query2.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_internalformat_query2.java new file mode 100644 index 0000000..af2f9f2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_internalformat_query2.java @@ -0,0 +1,187 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLint64; +import org.lwjgl.util.generator.opengl.GLreturn; +import org.lwjgl.util.generator.opengl.GLsizei; + +import java.nio.LongBuffer; + +@Extension(postfix = "") +public interface ARB_internalformat_query2 { + + /** + * Accepted by the <target> parameter of GetInternalformativ + * and GetInternalformati64v: + */ + int GL_TEXTURE_1D = 0x0DE0, + GL_TEXTURE_1D_ARRAY = 0x8C18, + GL_TEXTURE_2D = 0x0DE1, + GL_TEXTURE_2D_ARRAY = 0x8C1A, + GL_TEXTURE_3D = 0x806F, + GL_TEXTURE_CUBE_MAP = 0x8513, + GL_TEXTURE_CUBE_MAP_ARRAY = 0x9009, + GL_TEXTURE_RECTANGLE = 0x84F5, + GL_TEXTURE_BUFFER = 0x8C2A, + GL_RENDERBUFFER = 0x8D41, + GL_TEXTURE_2D_MULTISAMPLE = 0x9100, + GL_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9102; + + /** + * Accepted by the <pname> parameter of GetInternalformativ + * and GetInternalformati64v: + */ + int GL_SAMPLES = 0x80A9, + GL_NUM_SAMPLE_COUNTS = 0x9380, + GL_INTERNALFORMAT_SUPPORTED = 0x826F, + GL_INTERNALFORMAT_PREFERRED = 0x8270, + GL_INTERNALFORMAT_RED_SIZE = 0x8271, + GL_INTERNALFORMAT_GREEN_SIZE = 0x8272, + GL_INTERNALFORMAT_BLUE_SIZE = 0x8273, + GL_INTERNALFORMAT_ALPHA_SIZE = 0x8274, + GL_INTERNALFORMAT_DEPTH_SIZE = 0x8275, + GL_INTERNALFORMAT_STENCIL_SIZE = 0x8276, + GL_INTERNALFORMAT_SHARED_SIZE = 0x8277, + GL_INTERNALFORMAT_RED_TYPE = 0x8278, + GL_INTERNALFORMAT_GREEN_TYPE = 0x8279, + GL_INTERNALFORMAT_BLUE_TYPE = 0x827A, + GL_INTERNALFORMAT_ALPHA_TYPE = 0x827B, + GL_INTERNALFORMAT_DEPTH_TYPE = 0x827C, + GL_INTERNALFORMAT_STENCIL_TYPE = 0x827D, + GL_MAX_WIDTH = 0x827E, + GL_MAX_HEIGHT = 0x827F, + GL_MAX_DEPTH = 0x8280, + GL_MAX_LAYERS = 0x8281, + GL_MAX_COMBINED_DIMENSIONS = 0x8282, + GL_COLOR_COMPONENTS = 0x8283, + GL_DEPTH_COMPONENTS = 0x8284, + GL_STENCIL_COMPONENTS = 0x8285, + GL_COLOR_RENDERABLE = 0x8286, + GL_DEPTH_RENDERABLE = 0x8287, + GL_STENCIL_RENDERABLE = 0x8288, + GL_FRAMEBUFFER_RENDERABLE = 0x8289, + GL_FRAMEBUFFER_RENDERABLE_LAYERED = 0x828A, + GL_FRAMEBUFFER_BLEND = 0x828B, + GL_READ_PIXELS = 0x828C, + GL_READ_PIXELS_FORMAT = 0x828D, + GL_READ_PIXELS_TYPE = 0x828E, + GL_TEXTURE_IMAGE_FORMAT = 0x828F, + GL_TEXTURE_IMAGE_TYPE = 0x8290, + GL_GET_TEXTURE_IMAGE_FORMAT = 0x8291, + GL_GET_TEXTURE_IMAGE_TYPE = 0x8292, + GL_MIPMAP = 0x8293, + GL_MANUAL_GENERATE_MIPMAP = 0x8294, + GL_AUTO_GENERATE_MIPMAP = 0x8295, + GL_COLOR_ENCODING = 0x8296, + GL_SRGB_READ = 0x8297, + GL_SRGB_WRITE = 0x8298, + GL_SRGB_DECODE_ARB = 0x8299, + GL_FILTER = 0x829A, + GL_VERTEX_TEXTURE = 0x829B, + GL_TESS_CONTROL_TEXTURE = 0x829C, + GL_TESS_EVALUATION_TEXTURE = 0x829D, + GL_GEOMETRY_TEXTURE = 0x829E, + GL_FRAGMENT_TEXTURE = 0x829F, + GL_COMPUTE_TEXTURE = 0x82A0, + GL_TEXTURE_SHADOW = 0x82A1, + GL_TEXTURE_GATHER = 0x82A2, + GL_TEXTURE_GATHER_SHADOW = 0x82A3, + GL_SHADER_IMAGE_LOAD = 0x82A4, + GL_SHADER_IMAGE_STORE = 0x82A5, + GL_SHADER_IMAGE_ATOMIC = 0x82A6, + GL_IMAGE_TEXEL_SIZE = 0x82A7, + GL_IMAGE_COMPATIBILITY_CLASS = 0x82A8, + GL_IMAGE_PIXEL_FORMAT = 0x82A9, + GL_IMAGE_PIXEL_TYPE = 0x82AA, + GL_IMAGE_FORMAT_COMPATIBILITY_TYPE = 0x90C7, + GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST = 0x82AC, + GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST = 0x82AD, + GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE = 0x82AE, + GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE = 0x82AF, + GL_TEXTURE_COMPRESSED = 0x86A1, + GL_TEXTURE_COMPRESSED_BLOCK_WIDTH = 0x82B1, + GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT = 0x82B2, + GL_TEXTURE_COMPRESSED_BLOCK_SIZE = 0x82B3, + GL_CLEAR_BUFFER = 0x82B4, + GL_TEXTURE_VIEW = 0x82B5, + GL_VIEW_COMPATIBILITY_CLASS = 0x82B6; + + /** + * Returned as possible responses for various <pname> queries + * to GetInternalformativ and GetInternalformati64v + */ + int GL_FULL_SUPPORT = 0x82B7, + GL_CAVEAT_SUPPORT = 0x82B8, + GL_IMAGE_CLASS_4_X_32 = 0x82B9, + GL_IMAGE_CLASS_2_X_32 = 0x82BA, + GL_IMAGE_CLASS_1_X_32 = 0x82BB, + GL_IMAGE_CLASS_4_X_16 = 0x82BC, + GL_IMAGE_CLASS_2_X_16 = 0x82BD, + GL_IMAGE_CLASS_1_X_16 = 0x82BE, + GL_IMAGE_CLASS_4_X_8 = 0x82BF, + GL_IMAGE_CLASS_2_X_8 = 0x82C0, + GL_IMAGE_CLASS_1_X_8 = 0x82C1, + GL_IMAGE_CLASS_11_11_10 = 0x82C2, + GL_IMAGE_CLASS_10_10_10_2 = 0x82C3, + GL_VIEW_CLASS_128_BITS = 0x82C4, + GL_VIEW_CLASS_96_BITS = 0x82C5, + GL_VIEW_CLASS_64_BITS = 0x82C6, + GL_VIEW_CLASS_48_BITS = 0x82C7, + GL_VIEW_CLASS_32_BITS = 0x82C8, + GL_VIEW_CLASS_24_BITS = 0x82C9, + GL_VIEW_CLASS_16_BITS = 0x82CA, + GL_VIEW_CLASS_8_BITS = 0x82CB, + GL_VIEW_CLASS_S3TC_DXT1_RGB = 0x82CC, + GL_VIEW_CLASS_S3TC_DXT1_RGBA = 0x82CD, + GL_VIEW_CLASS_S3TC_DXT3_RGBA = 0x82CE, + GL_VIEW_CLASS_S3TC_DXT5_RGBA = 0x82CF, + GL_VIEW_CLASS_RGTC1_RED = 0x82D0, + GL_VIEW_CLASS_RGTC2_RG = 0x82D1, + GL_VIEW_CLASS_BPTC_UNORM = 0x82D2, + GL_VIEW_CLASS_BPTC_FLOAT = 0x82D3; + + @Reuse("GL43") + @StripPostfix("params") + void glGetInternalformati64v(@GLenum int target, @GLenum int internalformat, + @GLenum int pname, @AutoSize("params") @GLsizei int bufSize, @OutParameter @GLint64 LongBuffer params); + + @Reuse("GL43") + @Alternate("glGetInternalformati64v") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetInternalformati64v2(@GLenum int target, @GLenum int internalformat, + @GLenum int pname, @Constant("1") @GLsizei int bufSize, @OutParameter @GLint64 LongBuffer params); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_invalidate_subdata.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_invalidate_subdata.java new file mode 100644 index 0000000..8f0d984 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_invalidate_subdata.java @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.AutoSize; +import org.lwjgl.util.generator.Const; +import org.lwjgl.util.generator.Reuse; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.IntBuffer; + +public interface ARB_invalidate_subdata { + + @Reuse("GL43") + void glInvalidateTexSubImage(@GLuint int texture, int level, + int xoffset, int yoffset, int zoffset, + @GLsizei int width, @GLsizei int height, @GLsizei int depth); + + @Reuse("GL43") + void glInvalidateTexImage(@GLuint int texture, int level); + + @Reuse("GL43") + void glInvalidateBufferSubData(@GLuint int buffer, @GLintptr long offset, @GLsizeiptr long length); + + @Reuse("GL43") + void glInvalidateBufferData(@GLuint int buffer); + + @Reuse("GL43") + void glInvalidateFramebuffer(@GLenum int target, + @AutoSize("attachments") @GLsizei int numAttachments, + @Const @GLenum IntBuffer attachments); + + @Reuse("GL43") + void glInvalidateSubFramebuffer(@GLenum int target, + @AutoSize("attachments") @GLsizei int numAttachments, + @Const @GLenum IntBuffer attachments, + int x, int y, @GLsizei int width, @GLsizei int height); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_map_buffer_alignment.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_map_buffer_alignment.java new file mode 100644 index 0000000..cbee3dd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_map_buffer_alignment.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_map_buffer_alignment { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + int GL_MIN_MAP_BUFFER_ALIGNMENT = 0x90BC; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_map_buffer_range.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_map_buffer_range.java new file mode 100644 index 0000000..c636a8d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_map_buffer_range.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.ByteBuffer; + +public interface ARB_map_buffer_range { + + /** Accepted by the <access> parameter of MapBufferRange: */ + int GL_MAP_READ_BIT = 0x0001; + int GL_MAP_WRITE_BIT = 0x0002; + int GL_MAP_INVALIDATE_RANGE_BIT = 0x0004; + int GL_MAP_INVALIDATE_BUFFER_BIT = 0x0008; + int GL_MAP_FLUSH_EXPLICIT_BIT = 0x0010; + int GL_MAP_UNSYNCHRONIZED_BIT = 0x0020; + + /** + * glMapBufferRange maps a GL buffer object range to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapBufferRange like this: + *

+ * ByteBuffer mapped_buffer; mapped_buffer = glMapBufferRange(..., ..., ..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBufferRange(..., ..., ..., ..., mapped_buffer); + *

+ * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + * + * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. + * + * @return A ByteBuffer representing the mapped buffer memory. + */ + @Reuse("GL30") + @CachedResult(isRange = true) + @GLvoid + @AutoSize("length") + ByteBuffer glMapBufferRange(@GLenum int target, @GLintptr long offset, @GLsizeiptr long length, @GLbitfield int access); + + @Reuse("GL30") + void glFlushMappedBufferRange(@GLenum int target, @GLintptr long offset, @GLsizeiptr long length); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_matrix_palette.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_matrix_palette.java new file mode 100644 index 0000000..a7a3858 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_matrix_palette.java @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.*; + +public interface ARB_matrix_palette { + + int GL_MATRIX_PALETTE_ARB = 0x8840; + int GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB = 0x8841; + int GL_MAX_PALETTE_MATRICES_ARB = 0x8842; + int GL_CURRENT_PALETTE_MATRIX_ARB = 0x8843; + int GL_MATRIX_INDEX_ARRAY_ARB = 0x8844; + int GL_CURRENT_MATRIX_INDEX_ARB = 0x8845; + int GL_MATRIX_INDEX_ARRAY_SIZE_ARB = 0x8846; + int GL_MATRIX_INDEX_ARRAY_TYPE_ARB = 0x8847; + int GL_MATRIX_INDEX_ARRAY_STRIDE_ARB = 0x8848; + int GL_MATRIX_INDEX_ARRAY_POINTER_ARB = 0x8849; + + void glCurrentPaletteMatrixARB(int index); + + void glMatrixIndexPointerARB(int size, @AutoType("pPointer") @GLenum int type, @GLsizei int stride, + @CachedReference + @BufferObject(BufferKind.ArrayVBO) + @Check + @Const + @GLubyte + @GLushort + @GLuint Buffer pPointer); + + @StripPostfix("pIndices") + void glMatrixIndexubvARB(@AutoSize("pIndices") int size, @GLubyte ByteBuffer pIndices); + + @StripPostfix("pIndices") + void glMatrixIndexusvARB(@AutoSize("pIndices") int size, @GLushort ShortBuffer pIndices); + + @StripPostfix("pIndices") + void glMatrixIndexuivARB(@AutoSize("pIndices") int size, @GLuint IntBuffer pIndices); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_multi_bind.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_multi_bind.java new file mode 100644 index 0000000..e74d12b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_multi_bind.java @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2002-2013 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.PointerBuffer; +import org.lwjgl.util.generator.Check; +import org.lwjgl.util.generator.Const; +import org.lwjgl.util.generator.Reuse; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.IntBuffer; + +public interface ARB_multi_bind { + + @Reuse("GL44") + void glBindBuffersBase(@GLenum int target, @GLuint int first, @GLsizei int count, @Check(value = "count", canBeNull = true) @Const @GLuint IntBuffer buffers); + + @Reuse("GL44") + void glBindBuffersRange(@GLenum int target, @GLuint int first, @GLsizei int count, + @Check(value = "count", canBeNull = true) @Const @GLuint IntBuffer buffers, + @Check(value = "count", canBeNull = true) @Const @GLintptr PointerBuffer offsets, + @Check(value = "count", canBeNull = true) @Const @GLsizeiptr PointerBuffer sizes); + + @Reuse("GL44") + void glBindTextures(@GLuint int first, @GLsizei int count, @Check(value = "count", canBeNull = true) @Const @GLuint IntBuffer textures); + + @Reuse("GL44") + void glBindSamplers(@GLuint int first, @GLsizei int count, @Check(value = "count", canBeNull = true) @Const @GLuint IntBuffer samplers); + + @Reuse("GL44") + void glBindImageTextures(@GLuint int first, @GLsizei int count, @Check(value = "count", canBeNull = true) @Const @GLuint IntBuffer textures); + + @Reuse("GL44") + void glBindVertexBuffers(@GLuint int first, @GLsizei int count, + @Check(value = "count", canBeNull = true) @Const @GLuint IntBuffer buffers, + @Check(value = "count", canBeNull = true) @Const @GLintptr PointerBuffer offsets, + @Check(value = "count", canBeNull = true) @Const @GLsizei IntBuffer strides); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_multi_draw_indirect.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_multi_draw_indirect.java new file mode 100644 index 0000000..e218e80 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_multi_draw_indirect.java @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLvoid; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +import com.sun.mirror.type.PrimitiveType; + +public interface ARB_multi_draw_indirect { + + @Reuse("GL43") + void glMultiDrawArraysIndirect(@GLenum int mode, + @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 4 * 4 : stride) * primcount") @Const @GLvoid ByteBuffer indirect, + @GLsizei int primcount, + @GLsizei int stride); + + @Reuse("GL43") + @Alternate("glMultiDrawArraysIndirect") + void glMultiDrawArraysIndirect(@GLenum int mode, + @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 4 : stride >> 2) * primcount") @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect, + @GLsizei int primcount, + @GLsizei int stride); + + @Reuse("GL43") + void glMultiDrawElementsIndirect(@GLenum int mode, + @GLenum int type, + @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 5 * 4 : stride) * primcount") @Const @GLvoid ByteBuffer indirect, + @GLsizei int primcount, + @GLsizei int stride); + + @Reuse("GL43") + @Alternate("glMultiDrawElementsIndirect") + void glMultiDrawElementsIndirect(@GLenum int mode, + @GLenum int type, + @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 5 : stride >> 2) * primcount") @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect, + @GLsizei int primcount, + @GLsizei int stride); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_multisample.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_multisample.java new file mode 100644 index 0000000..23e1293 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_multisample.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLclampf; + +public interface ARB_multisample { + + int GL_MULTISAMPLE_ARB = 0x809D; + int GL_SAMPLE_ALPHA_TO_COVERAGE_ARB = 0x809E; + int GL_SAMPLE_ALPHA_TO_ONE_ARB = 0x809F; + int GL_SAMPLE_COVERAGE_ARB = 0x80A0; + int GL_SAMPLE_BUFFERS_ARB = 0x80A8; + int GL_SAMPLES_ARB = 0x80A9; + int GL_SAMPLE_COVERAGE_VALUE_ARB = 0x80AA; + int GL_SAMPLE_COVERAGE_INVERT_ARB = 0x80AB; + int GL_MULTISAMPLE_BIT_ARB = 0x20000000; + + void glSampleCoverageARB(@GLclampf float value, boolean invert); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_multitexture.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_multitexture.java new file mode 100644 index 0000000..bec30cc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_multitexture.java @@ -0,0 +1,126 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; + +public interface ARB_multitexture { + + int GL_TEXTURE0_ARB = 0x84C0; + int GL_TEXTURE1_ARB = 0x84C1; + int GL_TEXTURE2_ARB = 0x84C2; + int GL_TEXTURE3_ARB = 0x84C3; + int GL_TEXTURE4_ARB = 0x84C4; + int GL_TEXTURE5_ARB = 0x84C5; + int GL_TEXTURE6_ARB = 0x84C6; + int GL_TEXTURE7_ARB = 0x84C7; + int GL_TEXTURE8_ARB = 0x84C8; + int GL_TEXTURE9_ARB = 0x84C9; + int GL_TEXTURE10_ARB = 0x84CA; + int GL_TEXTURE11_ARB = 0x84CB; + int GL_TEXTURE12_ARB = 0x84CC; + int GL_TEXTURE13_ARB = 0x84CD; + int GL_TEXTURE14_ARB = 0x84CE; + int GL_TEXTURE15_ARB = 0x84CF; + int GL_TEXTURE16_ARB = 0x84D0; + int GL_TEXTURE17_ARB = 0x84D1; + int GL_TEXTURE18_ARB = 0x84D2; + int GL_TEXTURE19_ARB = 0x84D3; + int GL_TEXTURE20_ARB = 0x84D4; + int GL_TEXTURE21_ARB = 0x84D5; + int GL_TEXTURE22_ARB = 0x84D6; + int GL_TEXTURE23_ARB = 0x84D7; + int GL_TEXTURE24_ARB = 0x84D8; + int GL_TEXTURE25_ARB = 0x84D9; + int GL_TEXTURE26_ARB = 0x84DA; + int GL_TEXTURE27_ARB = 0x84DB; + int GL_TEXTURE28_ARB = 0x84DC; + int GL_TEXTURE29_ARB = 0x84DD; + int GL_TEXTURE30_ARB = 0x84DE; + int GL_TEXTURE31_ARB = 0x84DF; + int GL_ACTIVE_TEXTURE_ARB = 0x84E0; + int GL_CLIENT_ACTIVE_TEXTURE_ARB = 0x84E1; + int GL_MAX_TEXTURE_UNITS_ARB = 0x84E2; + + void glClientActiveTextureARB(@GLenum int texture); + + void glActiveTextureARB(@GLenum int texture); + + @NoErrorCheck + void glMultiTexCoord1fARB(@GLenum int target, float s); + + @NoErrorCheck + void glMultiTexCoord1dARB(@GLenum int target, double s); + + @NoErrorCheck + void glMultiTexCoord1iARB(@GLenum int target, int s); + + @NoErrorCheck + void glMultiTexCoord1sARB(@GLenum int target, short s); + + @NoErrorCheck + void glMultiTexCoord2fARB(@GLenum int target, float s, float t); + + @NoErrorCheck + void glMultiTexCoord2dARB(@GLenum int target, double s, double t); + + @NoErrorCheck + void glMultiTexCoord2iARB(@GLenum int target, int s, int t); + + @NoErrorCheck + void glMultiTexCoord2sARB(@GLenum int target, short s, short t); + + @NoErrorCheck + void glMultiTexCoord3fARB(@GLenum int target, float s, float t, float r); + + @NoErrorCheck + void glMultiTexCoord3dARB(@GLenum int target, double s, double t, double r); + + @NoErrorCheck + void glMultiTexCoord3iARB(@GLenum int target, int s, int t, int r); + + @NoErrorCheck + void glMultiTexCoord3sARB(@GLenum int target, short s, short t, short r); + + @NoErrorCheck + void glMultiTexCoord4fARB(@GLenum int target, float s, float t, float r, float q); + + @NoErrorCheck + void glMultiTexCoord4dARB(@GLenum int target, double s, double t, double r, double q); + + @NoErrorCheck + void glMultiTexCoord4iARB(@GLenum int target, int s, int t, int r, int q); + + @NoErrorCheck + void glMultiTexCoord4sARB(@GLenum int target, short s, short t, short r, short q); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_occlusion_query.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_occlusion_query.java new file mode 100644 index 0000000..62ac833 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_occlusion_query.java @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLreturn; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.IntBuffer; + +public interface ARB_occlusion_query { + + /** + * Accepted by the <target> parameter of BeginQueryARB, EndQueryARB, + * and GetQueryivARB: + */ + int GL_SAMPLES_PASSED_ARB = 0x8914; + + /** Accepted by the <pname> parameter of GetQueryivARB: */ + int GL_QUERY_COUNTER_BITS_ARB = 0x8864; + int GL_CURRENT_QUERY_ARB = 0x8865; + + /** + * Accepted by the <pname> parameter of GetQueryObjectivARB and + * GetQueryObjectuivARB: + */ + int GL_QUERY_RESULT_ARB = 0x8866; + int GL_QUERY_RESULT_AVAILABLE_ARB = 0x8867; + + void glGenQueriesARB(@AutoSize("ids") @GLsizei int n, @OutParameter @GLuint IntBuffer ids); + + @Alternate("glGenQueriesARB") + @GLreturn("ids") + void glGenQueriesARB2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer ids); + + void glDeleteQueriesARB(@AutoSize("ids") @GLsizei int n, @GLuint IntBuffer ids); + + @Alternate("glDeleteQueriesARB") + void glDeleteQueriesARB(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(caps, id)", keepParam = true) int id); + + boolean glIsQueryARB(@GLuint int id); + + void glBeginQueryARB(@GLenum int target, @GLuint int id); + + void glEndQueryARB(@GLenum int target); + + @StripPostfix("params") + void glGetQueryivARB(@GLenum int target, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetQueryiARB} instead. */ + @Alternate("glGetQueryivARB") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "ARBOcclusionQuery", method = "glGetQueryiARB") + @Deprecated + void glGetQueryivARB2(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + @Alternate("glGetQueryivARB") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetQueryivARB3(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + @StripPostfix("params") + void glGetQueryObjectivARB(@GLuint int id, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + @Alternate("glGetQueryObjectivARB") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetQueryObjectivARB2(@GLuint int id, @GLenum int pname, @OutParameter IntBuffer params); + + @StripPostfix("params") + void glGetQueryObjectuivARB(@GLuint int id, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + @Alternate("glGetQueryObjectuivARB") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetQueryObjectuivARB2(@GLuint int id, @GLenum int pname, @OutParameter IntBuffer params); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_occlusion_query2.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_occlusion_query2.java new file mode 100644 index 0000000..fb53b5c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_occlusion_query2.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_occlusion_query2 { + + /** + * Accepted by the <target> parameter of BeginQuery, EndQuery, + * and GetQueryiv: + */ + int GL_ANY_SAMPLES_PASSED = 0x8C2F; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_pixel_buffer_object.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_pixel_buffer_object.java new file mode 100644 index 0000000..06d4596 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_pixel_buffer_object.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_pixel_buffer_object extends ARB_buffer_object { + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, + * GetBufferParameteriv, and GetBufferPointerv: + */ + int GL_PIXEL_PACK_BUFFER_ARB = 0x88EB; + int GL_PIXEL_UNPACK_BUFFER_ARB = 0x88EC; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_PIXEL_PACK_BUFFER_BINDING_ARB = 0x88ED; + int GL_PIXEL_UNPACK_BUFFER_BINDING_ARB = 0x88EF; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_point_parameters.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_point_parameters.java new file mode 100644 index 0000000..403caaa --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_point_parameters.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; + +import java.nio.*; + +public interface ARB_point_parameters { + + int GL_POINT_SIZE_MIN_ARB = 0x8126; + int GL_POINT_SIZE_MAX_ARB = 0x8127; + int GL_POINT_FADE_THRESHOLD_SIZE_ARB = 0x8128; + int GL_POINT_DISTANCE_ATTENUATION_ARB = 0x8129; + + void glPointParameterfARB(@GLenum int pname, float param); + + @StripPostfix("pfParams") + void glPointParameterfvARB(@GLenum int pname, @Check("4") @Const FloatBuffer pfParams); + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_point_sprite.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_point_sprite.java new file mode 100644 index 0000000..3abb52f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_point_sprite.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_point_sprite { + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, by + * the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev, and by the <target> parameter of TexEnvi, TexEnviv, + * TexEnvf, TexEnvfv, GetTexEnviv, and GetTexEnvfv: + */ + int GL_POINT_SPRITE_ARB = 0x8861; + + /** + * When the <target> parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv, + * GetTexEnvfv, or GetTexEnviv is POINT_SPRITE_ARB, then the value of + * <pname> may be: + */ + int GL_COORD_REPLACE_ARB = 0x8862; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_program.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_program.java new file mode 100644 index 0000000..e56fa9b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_program.java @@ -0,0 +1,195 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.*; + +@Extension(postfix = "ARB", isFinal = false) +public interface ARB_program { + + /** Accepted by the <format> parameter of ProgramStringARB: */ + int GL_PROGRAM_FORMAT_ASCII_ARB = 0x8875; + + /** Accepted by the <pname> parameter of GetProgramivARB: */ + int GL_PROGRAM_LENGTH_ARB = 0x8627; + int GL_PROGRAM_FORMAT_ARB = 0x8876; + int GL_PROGRAM_BINDING_ARB = 0x8677; + int GL_PROGRAM_INSTRUCTIONS_ARB = 0x88A0; + int GL_MAX_PROGRAM_INSTRUCTIONS_ARB = 0x88A1; + int GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB = 0x88A2; + int GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB = 0x88A3; + int GL_PROGRAM_TEMPORARIES_ARB = 0x88A4; + int GL_MAX_PROGRAM_TEMPORARIES_ARB = 0x88A5; + int GL_PROGRAM_NATIVE_TEMPORARIES_ARB = 0x88A6; + int GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB = 0x88A7; + int GL_PROGRAM_PARAMETERS_ARB = 0x88A8; + int GL_MAX_PROGRAM_PARAMETERS_ARB = 0x88A9; + int GL_PROGRAM_NATIVE_PARAMETERS_ARB = 0x88AA; + int GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB = 0x88AB; + int GL_PROGRAM_ATTRIBS_ARB = 0x88AC; + int GL_MAX_PROGRAM_ATTRIBS_ARB = 0x88AD; + int GL_PROGRAM_NATIVE_ATTRIBS_ARB = 0x88AE; + int GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB = 0x88AF; + int GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB = 0x88B4; + int GL_MAX_PROGRAM_ENV_PARAMETERS_ARB = 0x88B5; + int GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB = 0x88B6; + + /** Accepted by the <pname> parameter of GetProgramStringARB: */ + int GL_PROGRAM_STRING_ARB = 0x8628; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_PROGRAM_ERROR_POSITION_ARB = 0x864B; + int GL_CURRENT_MATRIX_ARB = 0x8641; + int GL_TRANSPOSE_CURRENT_MATRIX_ARB = 0x88B7; + int GL_CURRENT_MATRIX_STACK_DEPTH_ARB = 0x8640; + int GL_MAX_PROGRAM_MATRICES_ARB = 0x862F; + int GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB = 0x862E; + + /** Accepted by the <name> parameter of GetString: */ + int GL_PROGRAM_ERROR_STRING_ARB = 0x8874; + + /** Accepted by the <mode> parameter of MatrixMode: */ + int GL_MATRIX0_ARB = 0x88C0; + int GL_MATRIX1_ARB = 0x88C1; + int GL_MATRIX2_ARB = 0x88C2; + int GL_MATRIX3_ARB = 0x88C3; + int GL_MATRIX4_ARB = 0x88C4; + int GL_MATRIX5_ARB = 0x88C5; + int GL_MATRIX6_ARB = 0x88C6; + int GL_MATRIX7_ARB = 0x88C7; + int GL_MATRIX8_ARB = 0x88C8; + int GL_MATRIX9_ARB = 0x88C9; + int GL_MATRIX10_ARB = 0x88CA; + int GL_MATRIX11_ARB = 0x88CB; + int GL_MATRIX12_ARB = 0x88CC; + int GL_MATRIX13_ARB = 0x88CD; + int GL_MATRIX14_ARB = 0x88CE; + int GL_MATRIX15_ARB = 0x88CF; + int GL_MATRIX16_ARB = 0x88D0; + int GL_MATRIX17_ARB = 0x88D1; + int GL_MATRIX18_ARB = 0x88D2; + int GL_MATRIX19_ARB = 0x88D3; + int GL_MATRIX20_ARB = 0x88D4; + int GL_MATRIX21_ARB = 0x88D5; + int GL_MATRIX22_ARB = 0x88D6; + int GL_MATRIX23_ARB = 0x88D7; + int GL_MATRIX24_ARB = 0x88D8; + int GL_MATRIX25_ARB = 0x88D9; + int GL_MATRIX26_ARB = 0x88DA; + int GL_MATRIX27_ARB = 0x88DB; + int GL_MATRIX28_ARB = 0x88DC; + int GL_MATRIX29_ARB = 0x88DD; + int GL_MATRIX30_ARB = 0x88DE; + int GL_MATRIX31_ARB = 0x88DF; + + void glProgramStringARB(@GLenum int target, @GLenum int format, @AutoSize("string") @GLsizei int length, @Const @GLbyte Buffer string); + + @Alternate("glProgramStringARB") + void glProgramStringARB(@GLenum int target, @GLenum int format, @Constant("string.length()") @GLsizei int length, CharSequence string); + + void glBindProgramARB(@GLenum int target, @GLuint int program); + + void glDeleteProgramsARB(@AutoSize("programs") @GLsizei int n, @Const @GLuint IntBuffer programs); + + @Alternate("glDeleteProgramsARB") + void glDeleteProgramsARB(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(caps, program)", keepParam = true) int program); + + void glGenProgramsARB(@AutoSize("programs") @GLsizei int n, @OutParameter @GLuint IntBuffer programs); + + @Alternate("glGenProgramsARB") + @GLreturn("programs") + void glGenProgramsARB2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer programs); + + void glProgramEnvParameter4fARB(int target, int index, float x, float y, float z, float w); + + void glProgramEnvParameter4dARB(int target, int index, double x, double y, double z, double w); + + @StripPostfix("params") + void glProgramEnvParameter4fvARB(@GLenum int target, @GLuint int index, @Check("4") @Const FloatBuffer params); + + @StripPostfix("params") + void glProgramEnvParameter4dvARB(@GLenum int target, @GLuint int index, @Check("4") @Const DoubleBuffer params); + + void glProgramLocalParameter4fARB(@GLenum int target, @GLuint int index, float x, float y, float z, float w); + + void glProgramLocalParameter4dARB(@GLenum int target, @GLuint int index, double x, double y, double z, double w); + + @StripPostfix("params") + void glProgramLocalParameter4fvARB(@GLenum int target, @GLuint int index, @Check("4") @Const FloatBuffer params); + + @StripPostfix("params") + void glProgramLocalParameter4dvARB(@GLenum int target, @GLuint int index, @Check("4") @Const DoubleBuffer params); + + @StripPostfix("params") + void glGetProgramEnvParameterfvARB(@GLenum int target, @GLuint int index, @OutParameter @Check("4") FloatBuffer params); + + @StripPostfix("params") + void glGetProgramEnvParameterdvARB(@GLenum int target, @GLuint int index, @OutParameter @Check("4") DoubleBuffer params); + + @StripPostfix("params") + void glGetProgramLocalParameterfvARB(@GLenum int target, @GLuint int index, @OutParameter @Check("4") FloatBuffer params); + + @StripPostfix("params") + void glGetProgramLocalParameterdvARB(@GLenum int target, @GLuint int index, @OutParameter @Check("4") DoubleBuffer params); + + @StripPostfix("params") + void glGetProgramivARB(@GLenum int target, @GLenum int parameterName, @OutParameter @Check("4") IntBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetProgramiARB} instead. */ + @Alternate("glGetProgramivARB") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "ARBProgram", method = "glGetProgramiARB") + @Deprecated + void glGetProgramivARB2(@GLenum int target, @GLenum int parameterName, @OutParameter IntBuffer params); + + @Alternate("glGetProgramivARB") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetProgramivARB3(@GLenum int target, @GLenum int parameterName, @OutParameter IntBuffer params); + + void glGetProgramStringARB(@GLenum int target, @GLenum int parameterName, @OutParameter @Check @GLbyte Buffer paramString); + + @Alternate("glGetProgramStringARB") + @Code("\t\tint programLength = glGetProgramiARB(target, GL_PROGRAM_LENGTH_ARB);") + @GLreturn(value="paramString", maxLength = "programLength", forceMaxLength = true) + void glGetProgramStringARB2(@GLenum int target, @GLenum int parameterName, @OutParameter @GLchar ByteBuffer paramString); + + boolean glIsProgramARB(@GLuint int program); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_program_interface_query.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_program_interface_query.java new file mode 100644 index 0000000..4a0d023 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_program_interface_query.java @@ -0,0 +1,161 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +@Extension(postfix = "") +public interface ARB_program_interface_query { + + /** + * Accepted by the <programInterface> parameter of GetProgramInterfaceiv, + * GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, + * GetProgramResourceLocation, and GetProgramResourceLocationIndex: + */ + int GL_UNIFORM = 0x92E1, + GL_UNIFORM_BLOCK = 0x92E2, + GL_PROGRAM_INPUT = 0x92E3, + GL_PROGRAM_OUTPUT = 0x92E4, + GL_BUFFER_VARIABLE = 0x92E5, + GL_SHADER_STORAGE_BLOCK = 0x92E6, + GL_VERTEX_SUBROUTINE = 0x92E8, + GL_TESS_CONTROL_SUBROUTINE = 0x92E9, + GL_TESS_EVALUATION_SUBROUTINE = 0x92EA, + GL_GEOMETRY_SUBROUTINE = 0x92EB, + GL_FRAGMENT_SUBROUTINE = 0x92EC, + GL_COMPUTE_SUBROUTINE = 0x92ED, + GL_VERTEX_SUBROUTINE_UNIFORM = 0x92EE, + GL_TESS_CONTROL_SUBROUTINE_UNIFORM = 0x92EF, + GL_TESS_EVALUATION_SUBROUTINE_UNIFORM = 0x92F0, + GL_GEOMETRY_SUBROUTINE_UNIFORM = 0x92F1, + GL_FRAGMENT_SUBROUTINE_UNIFORM = 0x92F2, + GL_COMPUTE_SUBROUTINE_UNIFORM = 0x92F3, + GL_TRANSFORM_FEEDBACK_VARYING = 0x92F4; + + /** Accepted by the <pname> parameter of GetProgramInterfaceiv: */ + int GL_ACTIVE_RESOURCES = 0x92F5, + GL_MAX_NAME_LENGTH = 0x92F6, + GL_MAX_NUM_ACTIVE_VARIABLES = 0x92F7, + GL_MAX_NUM_COMPATIBLE_SUBROUTINES = 0x92F8; + + /** Accepted in the <props> array of GetProgramResourceiv: */ + int GL_NAME_LENGTH = 0x92F9, + GL_TYPE = 0x92FA, + GL_ARRAY_SIZE = 0x92FB, + GL_OFFSET = 0x92FC, + GL_BLOCK_INDEX = 0x92FD, + GL_ARRAY_STRIDE = 0x92FE, + GL_MATRIX_STRIDE = 0x92FF, + GL_IS_ROW_MAJOR = 0x9300, + GL_ATOMIC_COUNTER_BUFFER_INDEX = 0x9301, + GL_BUFFER_BINDING = 0x9302, + GL_BUFFER_DATA_SIZE = 0x9303, + GL_NUM_ACTIVE_VARIABLES = 0x9304, + GL_ACTIVE_VARIABLES = 0x9305, + GL_REFERENCED_BY_VERTEX_SHADER = 0x9306, + GL_REFERENCED_BY_TESS_CONTROL_SHADER = 0x9307, + GL_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x9308, + GL_REFERENCED_BY_GEOMETRY_SHADER = 0x9309, + GL_REFERENCED_BY_FRAGMENT_SHADER = 0x930A, + GL_REFERENCED_BY_COMPUTE_SHADER = 0x930B, + GL_TOP_LEVEL_ARRAY_SIZE = 0x930C, + GL_TOP_LEVEL_ARRAY_STRIDE = 0x930D, + GL_LOCATION = 0x930E, + GL_LOCATION_INDEX = 0x930F, + GL_IS_PER_PATCH = 0x92E7; + + @Reuse("GL43") + @StripPostfix("params") + void glGetProgramInterfaceiv(@GLuint int program, @GLenum int programInterface, + @GLenum int pname, @Check("1") @OutParameter IntBuffer params); + + @Reuse("GL43") + @Alternate("glGetProgramInterfaceiv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetProgramInterfaceiv2(@GLuint int program, @GLenum int programInterface, + @GLenum int pname, @OutParameter IntBuffer params); + + @Reuse("GL43") + @GLuint + int glGetProgramResourceIndex(@GLuint int program, @GLenum int programInterface, + @NullTerminated @Const @GLchar ByteBuffer name); + + @Reuse("GL43") + @Alternate("glGetProgramResourceIndex") + @GLuint + int glGetProgramResourceIndex(@GLuint int program, @GLenum int programInterface, + @NullTerminated CharSequence name); + + @Reuse("GL43") + void glGetProgramResourceName(@GLuint int program, @GLenum int programInterface, + @GLuint int index, @AutoSize(value = "name", canBeNull = true) @GLsizei int bufSize, @Check(value = "1", canBeNull = true) @OutParameter @GLsizei IntBuffer length, + @Check(canBeNull = true) @OutParameter @GLchar ByteBuffer name); + + @Reuse("GL43") + @Alternate("glGetProgramResourceName") + @GLreturn(value = "name", maxLength = "bufSize") + void glGetProgramResourceName2(@GLuint int program, @GLenum int programInterface, + @GLuint int index, @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(name_length)") IntBuffer length, + @OutParameter @GLchar ByteBuffer name); + + @Reuse("GL43") + @StripPostfix("params") + void glGetProgramResourceiv(@GLuint int program, @GLenum int programInterface, + @GLuint int index, @AutoSize("props") @GLsizei int propCount, + @Const @GLenum IntBuffer props, @AutoSize("params") @GLsizei int bufSize, + @Check(value = "1", canBeNull = true) @OutParameter @GLsizei IntBuffer length, @OutParameter IntBuffer params); + + @Reuse("GL43") + int glGetProgramResourceLocation(@GLuint int program, @GLenum int programInterface, + @NullTerminated @Const @GLchar ByteBuffer name); + + @Reuse("GL43") + @Alternate("glGetProgramResourceLocation") + int glGetProgramResourceLocation(@GLuint int program, @GLenum int programInterface, + @NullTerminated CharSequence name); + + @Reuse("GL43") + int glGetProgramResourceLocationIndex(@GLuint int program, @GLenum int programInterface, + @NullTerminated @Const @GLchar ByteBuffer name); + + @Reuse("GL43") + @Alternate("glGetProgramResourceLocationIndex") + int glGetProgramResourceLocationIndex(@GLuint int program, @GLenum int programInterface, + @NullTerminated CharSequence name); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_provoking_vertex.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_provoking_vertex.java new file mode 100644 index 0000000..0bca11b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_provoking_vertex.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.Reuse; +import org.lwjgl.util.generator.opengl.GLenum; + +public interface ARB_provoking_vertex { + + /** Accepted by the <mode> parameter of ProvokingVertex: */ + int GL_FIRST_VERTEX_CONVENTION = 0x8E4D; + int GL_LAST_VERTEX_CONVENTION = 0x8E4E; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_PROVOKING_VERTEX = 0x8E4F; + int GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION = 0x8E4C; + + @Reuse("GL32") + void glProvokingVertex(@GLenum int mode); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_query_buffer_object.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_query_buffer_object.java new file mode 100644 index 0000000..84da512 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_query_buffer_object.java @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2002-2013 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_query_buffer_object { + + /** + * Accepted by the <pname> parameter of GetQueryObjectiv, GetQueryObjectuiv, + * GetQueryObjecti64v and GetQueryObjectui64v: + */ + int GL_QUERY_RESULT_NO_WAIT = 0x9194; + + /** + * Accepted by the <target> parameter of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, MapBufferRange, GetBufferSubData, + * GetBufferParameteriv, GetBufferParameteri64v, GetBufferPointerv, + * ClearBufferSubData, and the <readtarget> and <writetarget> parameters of + * CopyBufferSubData: + */ + int GL_QUERY_BUFFER = 0x9192; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + int GL_QUERY_BUFFER_BINDING = 0x9193; + + /** Accepted in the <barriers> bitfield in MemoryBarrier: */ + int GL_QUERY_BUFFER_BARRIER_BIT = 0x00008000; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_robust_buffer_access_behavior.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_robust_buffer_access_behavior.java new file mode 100644 index 0000000..b7f9177 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_robust_buffer_access_behavior.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_robust_buffer_access_behavior { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_robustness.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_robustness.java new file mode 100644 index 0000000..6b8f31e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_robustness.java @@ -0,0 +1,191 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.*; + +@Dependent +@DeprecatedGL +public interface ARB_robustness { + + /** Returned by GetGraphicsResetStatusARB: */ + int GL_NO_ERROR = 0x0000, + GL_GUILTY_CONTEXT_RESET_ARB = 0x8253, + GL_INNOCENT_CONTEXT_RESET_ARB = 0x8254, + GL_UNKNOWN_CONTEXT_RESET_ARB = 0x8255; + + /** + * Accepted by the <value> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + int GL_RESET_NOTIFICATION_STRATEGY_ARB = 0x8256; + + /** + * Returned by GetIntegerv and related simple queries when + * <value> is RESET_NOTIFICATION_STRATEGY_ARB: + */ + int GL_LOSE_CONTEXT_ON_RESET_ARB = 0x8252, + GL_NO_RESET_NOTIFICATION_ARB = 0x8261; + + /** Returned by GetIntegerv when <pname> is CONTEXT_FLAGS: */ + int GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB = 0x00000004; + + @GLenum + int glGetGraphicsResetStatusARB(); + + @DeprecatedGL + void glGetnMapdvARB(@GLenum int target, @GLenum int query, @Constant("v.remaining() << 3") @GLsizei int bufSize, @OutParameter @Check DoubleBuffer v); + + @DeprecatedGL + void glGetnMapfvARB(@GLenum int target, @GLenum int query, @Constant("v.remaining() << 2") @GLsizei int bufSize, @OutParameter @Check FloatBuffer v); + + @DeprecatedGL + void glGetnMapivARB(@GLenum int target, @GLenum int query, @Constant("v.remaining() << 2") @GLsizei int bufSize, @OutParameter @Check IntBuffer v); + + @DeprecatedGL + void glGetnPixelMapfvARB(@GLenum int map, @Constant("values.remaining() << 2") @GLsizei int bufSize, @OutParameter @Check FloatBuffer values); + + @DeprecatedGL + void glGetnPixelMapuivARB(@GLenum int map, @Constant("values.remaining() << 2") @GLsizei int bufSize, @OutParameter @Check @GLuint IntBuffer values); + + @DeprecatedGL + void glGetnPixelMapusvARB(@GLenum int map, @Constant("values.remaining() << 1") @GLsizei int bufSize, @OutParameter @Check @GLushort ShortBuffer values); + + @DeprecatedGL + void glGetnPolygonStippleARB(@AutoSize("pattern") @GLsizei int bufSize, @OutParameter @GLubyte ByteBuffer pattern); + + void glGetnTexImageARB(@GLenum int target, int level, @GLenum int format, @GLenum int type, @AutoSize("img") @GLsizei int bufSize, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer img); + + void glReadnPixelsARB(int x, int y, @GLsizei int width, @GLsizei int height, + @GLenum int format, @GLenum int type, @AutoSize("data") @GLsizei int bufSize, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer data); + + @Dependent("GL_ARB_imaging") + void glGetnColorTableARB(@GLenum int target, @GLenum int format, @GLenum int type, @AutoSize("table") @GLsizei int bufSize, + @OutParameter + @GLbyte + @GLfloat + @GLdouble Buffer table); + + @Dependent("GL_ARB_imaging") + void glGetnConvolutionFilterARB(@GLenum int target, @GLenum int format, @GLenum int type, @AutoSize("image") @GLsizei int bufSize, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer image); + + @Dependent("GL_ARB_imaging") + void glGetnSeparableFilterARB(@GLenum int target, @GLenum int format, @GLenum int type, + @AutoSize("row") @GLsizei int rowBufSize, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer row, + @AutoSize("column") @GLsizei int columnBufSize, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer column, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @Check + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer span); + + @Dependent("GL_ARB_imaging") + void glGetnHistogramARB(@GLenum int target, boolean reset, @GLenum int format, @GLenum int type, @AutoSize("values") @GLsizei int bufSize, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer values); + + @Dependent("GL_ARB_imaging") + void glGetnMinmaxARB(@GLenum int target, boolean reset, @GLenum int format, @GLenum int type, @AutoSize("values") @GLsizei int bufSize, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer values); + + @Dependent("OpenGL13") + void glGetnCompressedTexImageARB(@GLenum int target, int lod, @AutoSize("img") @GLsizei int bufSize, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @GLbyte + @GLshort + @GLint Buffer img); + + @Dependent("OpenGL20") + void glGetnUniformfvARB(@GLuint int program, int location, @Constant("params.remaining() << 2") @GLsizei int bufSize, @OutParameter @Check FloatBuffer params); + + @Dependent("OpenGL20") + void glGetnUniformivARB(@GLuint int program, int location, @Constant("params.remaining() << 2") @GLsizei int bufSize, @OutParameter @Check IntBuffer params); + + @Dependent("OpenGL20") + void glGetnUniformuivARB(@GLuint int program, int location, @Constant("params.remaining() << 2") @GLsizei int bufSize, @OutParameter @Check @GLuint IntBuffer params); + + @Dependent("OpenGL20") + void glGetnUniformdvARB(@GLuint int program, int location, @Constant("params.remaining() << 3") @GLsizei int bufSize, @OutParameter @Check DoubleBuffer params); +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_robustness_isolation.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_robustness_isolation.java new file mode 100644 index 0000000..fc2341f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_robustness_isolation.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_robustness_isolation { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_sample_shading.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_sample_shading.java new file mode 100644 index 0000000..4c2ac57 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_sample_shading.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLclampf; + +public interface ARB_sample_shading { + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + int GL_SAMPLE_SHADING_ARB = 0x8C36; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, + * GetIntegerv, and GetFloatv: + */ + int GL_MIN_SAMPLE_SHADING_VALUE_ARB = 0x8C37; + + void glMinSampleShadingARB(@GLclampf float value); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_sampler_objects.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_sampler_objects.java new file mode 100644 index 0000000..24057c1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_sampler_objects.java @@ -0,0 +1,136 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLreturn; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.FloatBuffer; +import java.nio.IntBuffer; + +@Extension(postfix = "") +public interface ARB_sampler_objects { + + /** + * Accepted by the <value> parameter of the GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv and GetDoublev functions: + */ + int GL_SAMPLER_BINDING = 0x8919; + + @Reuse("GL33") + void glGenSamplers(@AutoSize("samplers") @GLsizei int count, @OutParameter @GLuint IntBuffer samplers); + + @Reuse("GL33") + @Alternate("glGenSamplers") + @GLreturn("samplers") + void glGenSamplers2(@Constant("1") @GLsizei int count, @OutParameter @GLuint IntBuffer samplers); + + @Reuse("GL33") + void glDeleteSamplers(@AutoSize("samplers") @GLsizei int count, @Const @GLuint IntBuffer samplers); + + @Reuse("GL33") + @Alternate("glDeleteSamplers") + void glDeleteSamplers(@Constant("1") @GLsizei int count, @Constant(value = "APIUtil.getInt(caps, sampler)", keepParam = true) int sampler); + + @Reuse("GL33") + boolean glIsSampler(@GLuint int sampler); + + @Reuse("GL33") + void glBindSampler(@GLenum int unit, @GLuint int sampler); + + @Reuse("GL33") + void glSamplerParameteri(@GLuint int sampler, @GLenum int pname, int param); + + @Reuse("GL33") + void glSamplerParameterf(@GLuint int sampler, @GLenum int pname, float param); + + @Reuse("GL33") + @StripPostfix("params") + void glSamplerParameteriv(@GLuint int sampler, @GLenum int pname, @Check("4") @Const IntBuffer params); + + @Reuse("GL33") + @StripPostfix("params") + void glSamplerParameterfv(@GLuint int sampler, @GLenum int pname, @Check("4") @Const FloatBuffer params); + + @Reuse("GL33") + @StripPostfix("params") + void glSamplerParameterIiv(@GLuint int sampler, @GLenum int pname, @Check("4") @Const IntBuffer params); + + @Reuse("GL33") + @StripPostfix("params") + void glSamplerParameterIuiv(@GLuint int sampler, @GLenum int pname, @Check("4") @Const @GLuint IntBuffer params); + + @Reuse("GL33") + @StripPostfix("params") + void glGetSamplerParameteriv(@GLuint int sampler, @GLenum int pname, @Check("4") @OutParameter IntBuffer params); + + @Reuse("GL33") + @Alternate("glGetSamplerParameteriv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetSamplerParameteriv2(@GLuint int sampler, @GLenum int pname, @OutParameter IntBuffer params); + + @Reuse("GL33") + @StripPostfix("params") + void glGetSamplerParameterfv(@GLuint int sampler, @GLenum int pname, @Check("4") @OutParameter FloatBuffer params); + + @Reuse("GL33") + @Alternate("glGetSamplerParameterfv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetSamplerParameterfv2(@GLuint int sampler, @GLenum int pname, @OutParameter FloatBuffer params); + + @Reuse("GL33") + @StripPostfix("params") + void glGetSamplerParameterIiv(@GLuint int sampler, @GLenum int pname, @Check("4") @OutParameter IntBuffer params); + + @Reuse("GL33") + @Alternate("glGetSamplerParameterIiv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetSamplerParameterIiv2(@GLuint int sampler, @GLenum int pname, @OutParameter IntBuffer params); + + @Reuse("GL33") + @StripPostfix("params") + void glGetSamplerParameterIuiv(@GLuint int sampler, @GLenum int pname, @Check("4") @OutParameter IntBuffer params); + + @Reuse("GL33") + @Alternate("glGetSamplerParameterIuiv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetSamplerParameterIuiv2(@GLuint int sampler, @GLenum int pname, @OutParameter IntBuffer params); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_seamless_cube_map.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_seamless_cube_map.java new file mode 100644 index 0000000..0a58ffb --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_seamless_cube_map.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_seamless_cube_map { + + /** + * Accepted by the <cap> parameter of Enable, Disable and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv + * and GetDoublev: + */ + int GL_TEXTURE_CUBE_MAP_SEAMLESS = 0x884F; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_seamless_cubemap_per_texture.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_seamless_cubemap_per_texture.java new file mode 100644 index 0000000..2d10ca3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_seamless_cubemap_per_texture.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2013 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_seamless_cubemap_per_texture { + + /** + * Accepted by the <pname> parameter of TexParameter{if}, + * TexParameter{if}v, GetTexParameter{if}v, SamplerParameter{if}, + * SamplerParameter{if}v, and GetSamplerParameter{if}v: + */ + int GL_TEXTURE_CUBE_MAP_SEAMLESS = 0x884F; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_separate_shader_objects.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_separate_shader_objects.java new file mode 100644 index 0000000..1937ed0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_separate_shader_objects.java @@ -0,0 +1,351 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.ByteBuffer; +import java.nio.DoubleBuffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; + +@Extension(postfix = "") +public interface ARB_separate_shader_objects { + + /** Accepted by <stages> parameter to UseProgramStages: */ + int GL_VERTEX_SHADER_BIT = 0x00000001, + GL_FRAGMENT_SHADER_BIT = 0x00000002, + GL_GEOMETRY_SHADER_BIT = 0x00000004, + GL_TESS_CONTROL_SHADER_BIT = 0x00000008, + GL_TESS_EVALUATION_SHADER_BIT = 0x00000010, + GL_ALL_SHADER_BITS = 0xFFFFFFFF; + + /** + * Accepted by the <pname> parameter of ProgramParameteri and + * GetProgramiv: + */ + int GL_PROGRAM_SEPARABLE = 0x8258; + + /** Accepted by <type> parameter to GetProgramPipelineiv: */ + int GL_ACTIVE_PROGRAM = 0x8259; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + int GL_PROGRAM_PIPELINE_BINDING = 0x825A; + + @Reuse("GL41") + void glUseProgramStages(@GLuint int pipeline, @GLbitfield int stages, @GLuint int program); + + @Reuse("GL41") + void glActiveShaderProgram(@GLuint int pipeline, @GLuint int program); + + /** Single null-terminated source code string. */ + @Reuse("GL41") + @StripPostfix(value = "string", postfix = "v") + @GLuint + int glCreateShaderProgramv(@GLenum int type, @Constant("1") @GLsizei int count, @NullTerminated @Check @Const @Indirect @GLchar ByteBuffer string); + + /** Multiple null-terminated source code strings, one after the other. */ + @Reuse("GL41") + @Alternate(value = "glCreateShaderProgramv", nativeAlt = true) + @StripPostfix(value = "strings", postfix = "v") + @GLuint + int glCreateShaderProgramv2(@GLenum int type, @GLsizei int count, @NullTerminated("count") @Check @Const @Indirect @GLchar @PointerArray("count") ByteBuffer strings); + + @Reuse("GL41") + @Alternate(value = "glCreateShaderProgramv", nativeAlt = true) + @StripPostfix(value = "strings", postfix = "v") + @GLuint + int glCreateShaderProgramv3(@GLenum int type, @Constant("strings.length") @GLsizei int count, @NullTerminated @Check("1") @PointerArray(value = "count") @Const @NativeType("GLchar") ByteBuffer[] strings); + + @Reuse("GL41") + @Alternate("glCreateShaderProgramv") + @StripPostfix(value = "string", postfix = "v") + @GLuint + int glCreateShaderProgramv(@GLenum int type, @Constant("1") @GLsizei int count, @NullTerminated CharSequence string); + + @Reuse("GL41") + @Alternate(value = "glCreateShaderProgramv", nativeAlt = true, skipNative = true) + @StripPostfix(value = "strings", postfix = "v") + @GLuint + int glCreateShaderProgramv2(@GLenum int type, @Constant("strings.length") @GLsizei int count, + @Const @NullTerminated @PointerArray(value = "count") CharSequence[] strings); + + @Reuse("GL41") + void glBindProgramPipeline(@GLuint int pipeline); + + @Reuse("GL41") + void glDeleteProgramPipelines(@AutoSize("pipelines") @GLsizei int n, @Const @GLuint IntBuffer pipelines); + + @Reuse("GL41") + @Alternate("glDeleteProgramPipelines") + void glDeleteProgramPipelines(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(caps, pipeline)", keepParam = true) int pipeline); + + @Reuse("GL41") + void glGenProgramPipelines(@AutoSize("pipelines") @GLsizei int n, @OutParameter @GLuint IntBuffer pipelines); + + @Reuse("GL41") + @Alternate("glGenProgramPipelines") + @GLreturn("pipelines") + void glGenProgramPipelines2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer pipelines); + + @Reuse("GL41") + boolean glIsProgramPipeline(@GLuint int pipeline); + + @Reuse("GL41") + void glProgramParameteri(@GLuint int program, @GLenum int pname, int value); + + @Reuse("GL41") + @StripPostfix("params") + void glGetProgramPipelineiv(@GLuint int pipeline, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + @Reuse("GL41") + @Alternate("glGetProgramPipelineiv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetProgramPipelineiv2(@GLuint int pipeline, @GLenum int pname, @OutParameter IntBuffer params); + + @Reuse("GL41") + void glProgramUniform1i(@GLuint int program, int location, int v0); + + @Reuse("GL41") + void glProgramUniform2i(@GLuint int program, int location, int v0, int v1); + + @Reuse("GL41") + void glProgramUniform3i(@GLuint int program, int location, int v0, int v1, int v2); + + @Reuse("GL41") + void glProgramUniform4i(@GLuint int program, int location, int v0, int v1, int v2, int v3); + + @Reuse("GL41") + void glProgramUniform1f(@GLuint int program, int location, float v0); + + @Reuse("GL41") + void glProgramUniform2f(@GLuint int program, int location, float v0, float v1); + + @Reuse("GL41") + void glProgramUniform3f(@GLuint int program, int location, float v0, float v1, float v2); + + @Reuse("GL41") + void glProgramUniform4f(@GLuint int program, int location, float v0, float v1, float v2, float v3); + + @Reuse("GL41") + void glProgramUniform1d(@GLuint int program, int location, double v0); + + @Reuse("GL41") + void glProgramUniform2d(@GLuint int program, int location, double v0, double v1); + + @Reuse("GL41") + void glProgramUniform3d(@GLuint int program, int location, double v0, double v1, double v2); + + @Reuse("GL41") + void glProgramUniform4d(@GLuint int program, int location, double v0, double v1, double v2, double v3); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniform1iv(@GLuint int program, int location, @AutoSize("value") @GLsizei int count, @Const IntBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniform2iv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const IntBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniform3iv(@GLuint int program, int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const IntBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniform4iv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const IntBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniform1fv(@GLuint int program, int location, @AutoSize("value") @GLsizei int count, @Const FloatBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniform2fv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const FloatBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniform3fv(@GLuint int program, int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const FloatBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniform4fv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const FloatBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniform1dv(@GLuint int program, int location, @AutoSize("value") @GLsizei int count, @Const DoubleBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniform2dv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const DoubleBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniform3dv(@GLuint int program, int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const DoubleBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniform4dv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const DoubleBuffer value); + + @Reuse("GL41") + void glProgramUniform1ui(@GLuint int program, int location, int v0); + + @Reuse("GL41") + void glProgramUniform2ui(@GLuint int program, int location, int v0, int v1); + + @Reuse("GL41") + void glProgramUniform3ui(@GLuint int program, int location, int v0, int v1, int v2); + + @Reuse("GL41") + void glProgramUniform4ui(@GLuint int program, int location, int v0, int v1, int v2, int v3); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniform1uiv(@GLuint int program, int location, @AutoSize("value") @GLsizei int count, @Const IntBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniform2uiv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const IntBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniform3uiv(@GLuint int program, int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const IntBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniform4uiv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const IntBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniformMatrix2fv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniformMatrix3fv(@GLuint int program, int location, @AutoSize(value = "value", expression = " / (3 * 3)") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniformMatrix4fv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 4") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniformMatrix2dv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniformMatrix3dv(@GLuint int program, int location, @AutoSize(value = "value", expression = " / (3 * 3)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniformMatrix4dv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 4") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniformMatrix2x3fv(@GLuint int program, int location, + @AutoSize(value = "value", expression = " / (2 * 3)") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniformMatrix3x2fv(@GLuint int program, int location, + @AutoSize(value = "value", expression = " / (3 * 2)") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniformMatrix2x4fv(@GLuint int program, int location, + @AutoSize(value = "value", expression = " >> 3") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniformMatrix4x2fv(@GLuint int program, int location, + @AutoSize(value = "value", expression = " >> 3") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniformMatrix3x4fv(@GLuint int program, int location, + @AutoSize(value = "value", expression = " / (3 * 4)") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniformMatrix4x3fv(@GLuint int program, int location, + @AutoSize(value = "value", expression = " / (4 * 3)") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniformMatrix2x3dv(@GLuint int program, int location, + @AutoSize(value = "value", expression = " / (2 * 3)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniformMatrix3x2dv(@GLuint int program, int location, + @AutoSize(value = "value", expression = " / (3 * 2)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniformMatrix2x4dv(@GLuint int program, int location, + @AutoSize(value = "value", expression = " >> 3") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniformMatrix4x2dv(@GLuint int program, int location, + @AutoSize(value = "value", expression = " >> 3") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniformMatrix3x4dv(@GLuint int program, int location, + @AutoSize(value = "value", expression = " / (3 * 4)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Reuse("GL41") + @StripPostfix("value") + void glProgramUniformMatrix4x3dv(@GLuint int program, int location, + @AutoSize(value = "value", expression = " / (4 * 3)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @Reuse("GL41") + void glValidateProgramPipeline(@GLuint int pipeline); + + @Reuse("GL41") + void glGetProgramPipelineInfoLog(@GLuint int pipeline, @AutoSize("infoLog") @GLsizei int bufSize, + @OutParameter @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length, + @OutParameter @GLchar ByteBuffer infoLog); + + @Reuse("GL41") + @Alternate("glGetProgramPipelineInfoLog") + @GLreturn(value = "infoLog", maxLength = "bufSize") + void glGetProgramPipelineInfoLog2(@GLuint int pipeline, @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(infoLog_length)") IntBuffer length, + @OutParameter @GLchar ByteBuffer infoLog); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_atomic_counters.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_atomic_counters.java new file mode 100644 index 0000000..3d07369 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_atomic_counters.java @@ -0,0 +1,106 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLreturn; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.IntBuffer; + +@Extension(postfix = "") +public interface ARB_shader_atomic_counters { + + /** Accepted by the <target> parameter of BindBufferBase and BindBufferRange: */ + int GL_ATOMIC_COUNTER_BUFFER = 0x92C0; + + /** + * Accepted by the <pname> parameter of GetBooleani_v, GetIntegeri_v, + * GetFloati_v, GetDoublei_v, GetInteger64i_v, GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, GetDoublev, and GetActiveAtomicCounterBufferiv: + */ + int GL_ATOMIC_COUNTER_BUFFER_BINDING = 0x92C1; + + /** Accepted by the <pname> parameter of GetIntegeri_64v: */ + int GL_ATOMIC_COUNTER_BUFFER_START = 0x92C2, + GL_ATOMIC_COUNTER_BUFFER_SIZE = 0x92C3; + + /** Accepted by the <pname> parameter of GetActiveAtomicCounterBufferiv: */ + int GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE = 0x92C4, + GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS = 0x92C5, + GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES = 0x92C6, + GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER = 0x92C7, + GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER = 0x92C8, + GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x92C9, + GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER = 0x92CA, + GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER = 0x92CB; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + int GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS = 0x92CC, + GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS = 0x92CD, + GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS = 0x92CE, + GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS = 0x92CF, + GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS = 0x92D0, + GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS = 0x92D1, + GL_MAX_VERTEX_ATOMIC_COUNTERS = 0x92D2, + GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS = 0x92D3, + GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS = 0x92D4, + GL_MAX_GEOMETRY_ATOMIC_COUNTERS = 0x92D5, + GL_MAX_FRAGMENT_ATOMIC_COUNTERS = 0x92D6, + GL_MAX_COMBINED_ATOMIC_COUNTERS = 0x92D7, + GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE = 0x92D8, + GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS = 0x92DC; + + /** Accepted by the <pname> parameter of GetProgramiv: */ + int GL_ACTIVE_ATOMIC_COUNTER_BUFFERS = 0x92D9; + + /** Accepted by the <pname> parameter of GetActiveUniformsiv: */ + int GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX = 0x92DA; + + /** Returned in <params> by GetActiveUniform and GetActiveUniformsiv: */ + int GL_UNSIGNED_INT_ATOMIC_COUNTER = 0x92DB; + + @StripPostfix("params") + @Reuse("GL42") + void glGetActiveAtomicCounterBufferiv(@GLuint int program, @GLuint int bufferIndex, @GLenum int pname, @Check("1") @OutParameter IntBuffer params); + + @Alternate("glGetActiveAtomicCounterBufferiv") + @StripPostfix("params") + @GLreturn("params") + @Reuse("GL42") + void glGetActiveAtomicCounterBufferiv2(@GLuint int program, @GLuint int bufferIndex, @GLenum int pname, @OutParameter IntBuffer params); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_bit_encoding.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_bit_encoding.java new file mode 100644 index 0000000..0c7a561 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_bit_encoding.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_shader_bit_encoding { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_draw_parameters.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_draw_parameters.java new file mode 100644 index 0000000..28f4126 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_draw_parameters.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2013 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_shader_draw_parameters { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_group_vote.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_group_vote.java new file mode 100644 index 0000000..9e142b7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_group_vote.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2013 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_shader_group_vote { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_image_load_store.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_image_load_store.java new file mode 100644 index 0000000..72ff184 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_image_load_store.java @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.Reuse; +import org.lwjgl.util.generator.opengl.GLbitfield; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface ARB_shader_image_load_store { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, GetDoublev, and GetInteger64v: + */ + int GL_MAX_IMAGE_UNITS = 0x8F38, + GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS = 0x8F39, + GL_MAX_IMAGE_SAMPLES = 0x906D, + GL_MAX_VERTEX_IMAGE_UNIFORMS = 0x90CA, + GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS = 0x90CB, + GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS = 0x90CC, + GL_MAX_GEOMETRY_IMAGE_UNIFORMS = 0x90CD, + GL_MAX_FRAGMENT_IMAGE_UNIFORMS = 0x90CE, + GL_MAX_COMBINED_IMAGE_UNIFORMS = 0x90CF; + + /** Accepted by the <target> parameter of GetIntegeri_v and GetBooleani_v: */ + int GL_IMAGE_BINDING_NAME = 0x8F3A, + GL_IMAGE_BINDING_LEVEL = 0x8F3B, + GL_IMAGE_BINDING_LAYERED = 0x8F3C, + GL_IMAGE_BINDING_LAYER = 0x8F3D, + GL_IMAGE_BINDING_ACCESS = 0x8F3E, + GL_IMAGE_BINDING_FORMAT = 0x906E; + + /** Accepted by the <barriers> parameter of MemoryBarrier: */ + int GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT = 0x00000001, + GL_ELEMENT_ARRAY_BARRIER_BIT = 0x00000002, + GL_UNIFORM_BARRIER_BIT = 0x00000004, + GL_TEXTURE_FETCH_BARRIER_BIT = 0x00000008, + GL_SHADER_IMAGE_ACCESS_BARRIER_BIT = 0x00000020, + GL_COMMAND_BARRIER_BIT = 0x00000040, + GL_PIXEL_BUFFER_BARRIER_BIT = 0x00000080, + GL_TEXTURE_UPDATE_BARRIER_BIT = 0x00000100, + GL_BUFFER_UPDATE_BARRIER_BIT = 0x00000200, + GL_FRAMEBUFFER_BARRIER_BIT = 0x00000400, + GL_TRANSFORM_FEEDBACK_BARRIER_BIT = 0x00000800, + GL_ATOMIC_COUNTER_BARRIER_BIT = 0x00001000, + GL_ALL_BARRIER_BITS = 0xFFFFFFFF; + + /** Returned by the <type> parameter of GetActiveUniform: */ + int GL_IMAGE_1D = 0x904C, + GL_IMAGE_2D = 0x904D, + GL_IMAGE_3D = 0x904E, + GL_IMAGE_2D_RECT = 0x904F, + GL_IMAGE_CUBE = 0x9050, + GL_IMAGE_BUFFER = 0x9051, + GL_IMAGE_1D_ARRAY = 0x9052, + GL_IMAGE_2D_ARRAY = 0x9053, + GL_IMAGE_CUBE_MAP_ARRAY = 0x9054, + GL_IMAGE_2D_MULTISAMPLE = 0x9055, + GL_IMAGE_2D_MULTISAMPLE_ARRAY = 0x9056, + GL_INT_IMAGE_1D = 0x9057, + GL_INT_IMAGE_2D = 0x9058, + GL_INT_IMAGE_3D = 0x9059, + GL_INT_IMAGE_2D_RECT = 0x905A, + GL_INT_IMAGE_CUBE = 0x905B, + GL_INT_IMAGE_BUFFER = 0x905C, + GL_INT_IMAGE_1D_ARRAY = 0x905D, + GL_INT_IMAGE_2D_ARRAY = 0x905E, + GL_INT_IMAGE_CUBE_MAP_ARRAY = 0x905F, + GL_INT_IMAGE_2D_MULTISAMPLE = 0x9060, + GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY = 0x9061, + GL_UNSIGNED_INT_IMAGE_1D = 0x9062, + GL_UNSIGNED_INT_IMAGE_2D = 0x9063, + GL_UNSIGNED_INT_IMAGE_3D = 0x9064, + GL_UNSIGNED_INT_IMAGE_2D_RECT = 0x9065, + GL_UNSIGNED_INT_IMAGE_CUBE = 0x9066, + GL_UNSIGNED_INT_IMAGE_BUFFER = 0x9067, + GL_UNSIGNED_INT_IMAGE_1D_ARRAY = 0x9068, + GL_UNSIGNED_INT_IMAGE_2D_ARRAY = 0x9069, + GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY = 0x906A, + GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE = 0x906B, + GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY = 0x906C; + + /** + * Accepted by the <value> parameter of GetTexParameteriv, GetTexParameterfv, + * GetTexParameterIiv, and GetTexParameterIuiv: + */ + int GL_IMAGE_FORMAT_COMPATIBILITY_TYPE = 0x90C7; + + /** + * Returned in the <data> parameter of GetTexParameteriv, GetTexParameterfv, + * GetTexParameterIiv, and GetTexParameterIuiv when <value> is + * IMAGE_FORMAT_COMPATIBILITY_TYPE: + */ + int GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE = 0x90C8, + IMAGE_FORMAT_COMPATIBILITY_BY_CLASS = 0x90C9; + + @Reuse("GL42") + void glBindImageTexture(@GLuint int unit, @GLuint int texture, int level, + boolean layered, int layer, @GLenum int access, + @GLenum int format); + + @Reuse("GL42") + void glMemoryBarrier(@GLbitfield int barriers); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_image_size.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_image_size.java new file mode 100644 index 0000000..cc968b5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_image_size.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_shader_image_size { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_objects.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_objects.java new file mode 100644 index 0000000..20cb80a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_objects.java @@ -0,0 +1,272 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.ByteBuffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; + +public interface ARB_shader_objects { + + /** Accepted by the <pname> argument of GetHandleARB: */ + int GL_PROGRAM_OBJECT_ARB = 0x8B40; + + /** Accepted by the <pname> parameter of GetObjectParameter{fi}vARB: */ + int GL_OBJECT_TYPE_ARB = 0x8B4E; + int GL_OBJECT_SUBTYPE_ARB = 0x8B4F; + int GL_OBJECT_DELETE_STATUS_ARB = 0x8B80; + int GL_OBJECT_COMPILE_STATUS_ARB = 0x8B81; + int GL_OBJECT_LINK_STATUS_ARB = 0x8B82; + int GL_OBJECT_VALIDATE_STATUS_ARB = 0x8B83; + int GL_OBJECT_INFO_LOG_LENGTH_ARB = 0x8B84; + int GL_OBJECT_ATTACHED_OBJECTS_ARB = 0x8B85; + int GL_OBJECT_ACTIVE_UNIFORMS_ARB = 0x8B86; + int GL_OBJECT_ACTIVE_UNIFORM_MAX_LENGTH_ARB = 0x8B87; + int GL_OBJECT_SHADER_SOURCE_LENGTH_ARB = 0x8B88; + + /** Returned by the <params> parameter of GetObjectParameter{fi}vARB: */ + int GL_SHADER_OBJECT_ARB = 0x8B48; + + /** Returned by the <type> parameter of GetActiveUniformARB: */ + int GL_FLOAT_VEC2_ARB = 0x8B50; + int GL_FLOAT_VEC3_ARB = 0x8B51; + int GL_FLOAT_VEC4_ARB = 0x8B52; + int GL_INT_VEC2_ARB = 0x8B53; + int GL_INT_VEC3_ARB = 0x8B54; + int GL_INT_VEC4_ARB = 0x8B55; + int GL_BOOL_ARB = 0x8B56; + int GL_BOOL_VEC2_ARB = 0x8B57; + int GL_BOOL_VEC3_ARB = 0x8B58; + int GL_BOOL_VEC4_ARB = 0x8B59; + int GL_FLOAT_MAT2_ARB = 0x8B5A; + int GL_FLOAT_MAT3_ARB = 0x8B5B; + int GL_FLOAT_MAT4_ARB = 0x8B5C; + int GL_SAMPLER_1D_ARB = 0x8B5D; + int GL_SAMPLER_2D_ARB = 0x8B5E; + int GL_SAMPLER_3D_ARB = 0x8B5F; + int GL_SAMPLER_CUBE_ARB = 0x8B60; + int GL_SAMPLER_1D_SHADOW_ARB = 0x8B61; + int GL_SAMPLER_2D_SHADOW_ARB = 0x8B62; + int GL_SAMPLER_2D_RECT_ARB = 0x8B63; + int GL_SAMPLER_2D_RECT_SHADOW_ARB = 0x8B64; + + void glDeleteObjectARB(@GLhandleARB int obj); + + @GLhandleARB + int glGetHandleARB(@GLenum int pname); + + void glDetachObjectARB(@GLhandleARB int containerObj, @GLhandleARB int attachedObj); + + @GLhandleARB + int glCreateShaderObjectARB(@GLenum int shaderType); + + /** + * The ARB_shader_objects extension allows multiple, optionally null-terminated, source strings to define a shader program. + *

+ * This method uses just a single string, that should NOT be null-terminated. + */ + void glShaderSourceARB(@GLhandleARB int shader, @Constant("1") @GLsizei int count, + @Indirect @Const @GLcharARB @Check ByteBuffer string, + @AutoSize("string") @Indirect @Const @GLint int length); + + @Alternate("glShaderSourceARB") + void glShaderSourceARB2(@GLhandleARB int shader, @Constant("1") @GLsizei int count, CharSequence string, @Constant("string.length()") @Indirect @Const int length); + + @Alternate(value = "glShaderSourceARB", nativeAlt = true) + void glShaderSourceARB3(@GLhandleARB int shader, @Constant("strings.length") @GLsizei int count, + @Const @PointerArray(value = "count", lengths = "length") CharSequence[] strings, + @Constant("APIUtil.getLengths(caps, strings)") @Const IntBuffer length); + + void glCompileShaderARB(@GLhandleARB int shaderObj); + + @GLhandleARB + int glCreateProgramObjectARB(); + + void glAttachObjectARB(@GLhandleARB int containerObj, @GLhandleARB int obj); + + void glLinkProgramARB(@GLhandleARB int programObj); + + void glUseProgramObjectARB(@GLhandleARB int programObj); + + void glValidateProgramARB(@GLhandleARB int programObj); + + void glUniform1fARB(int location, float v0); + + void glUniform2fARB(int location, float v0, float v1); + + void glUniform3fARB(int location, float v0, float v1, float v2); + + void glUniform4fARB(int location, float v0, float v1, float v2, float v3); + + void glUniform1iARB(int location, int v0); + + void glUniform2iARB(int location, int v0, int v1); + + void glUniform3iARB(int location, int v0, int v1, int v2); + + void glUniform4iARB(int location, int v0, int v1, int v2, int v3); + + @StripPostfix("values") + void glUniform1fvARB(int location, @AutoSize("values") @GLsizei int count, @Const FloatBuffer values); + + @StripPostfix("values") + void glUniform2fvARB(int location, @AutoSize(value = "values", expression = " >> 1") @GLsizei int count, @Const FloatBuffer values); + + @StripPostfix("values") + void glUniform3fvARB(int location, @AutoSize(value = "values", expression = " / 3") @GLsizei int count, @Const FloatBuffer values); + + @StripPostfix("values") + void glUniform4fvARB(int location, @AutoSize(value = "values", expression = " >> 2") @GLsizei int count, @Const FloatBuffer values); + + @StripPostfix("values") + void glUniform1ivARB(int location, @AutoSize(value = "values") @GLsizei int count, @Const IntBuffer values); + + @StripPostfix("values") + void glUniform2ivARB(int location, @AutoSize(value = "values", expression = " >> 1") @GLsizei int count, @Const IntBuffer values); + + @StripPostfix("values") + void glUniform3ivARB(int location, @AutoSize(value = "values", expression = " / 3") @GLsizei int count, @Const IntBuffer values); + + @StripPostfix("values") + void glUniform4ivARB(int location, @AutoSize(value = "values", expression = " >> 2") @GLsizei int count, @Const IntBuffer values); + + @StripPostfix("matrices") + void glUniformMatrix2fvARB(int location, @AutoSize(value = "matrices", expression = " >> 2") @GLsizei int count, boolean transpose, @Const FloatBuffer matrices); + + @StripPostfix("matrices") + void glUniformMatrix3fvARB(int location, @AutoSize(value = "matrices", expression = " / (3 * 3)") @GLsizei int count, boolean transpose, @Const FloatBuffer matrices); + + @StripPostfix("matrices") + void glUniformMatrix4fvARB(int location, @AutoSize(value = "matrices", expression = " >> 4") @GLsizei int count, boolean transpose, @Const FloatBuffer matrices); + + @StripPostfix("params") + void glGetObjectParameterfvARB(@GLhandleARB int obj, @GLenum int pname, @OutParameter @Check FloatBuffer params); + + @Alternate("glGetObjectParameterfvARB") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetObjectParameterfvARB2(@GLhandleARB int obj, @GLenum int pname, @OutParameter FloatBuffer params); + + @StripPostfix("params") + void glGetObjectParameterivARB(@GLhandleARB int obj, @GLenum int pname, @OutParameter @Check IntBuffer params); + + @Alternate("glGetObjectParameterivARB") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetObjectParameterivARB2(@GLhandleARB int obj, @GLenum int pname, @OutParameter IntBuffer params); + + void glGetInfoLogARB(@GLhandleARB int obj, @AutoSize("infoLog") @GLsizei int maxLength, + @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length, + @OutParameter @GLcharARB ByteBuffer infoLog); + + @Alternate("glGetInfoLogARB") + @GLreturn(value = "infoLog", maxLength = "maxLength") + void glGetInfoLogARB2(@GLhandleARB int obj, @GLsizei int maxLength, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(infoLog_length)") IntBuffer length, + @OutParameter @GLcharARB ByteBuffer infoLog); + + void glGetAttachedObjectsARB(@GLhandleARB int containerObj, @AutoSize("obj") @GLsizei int maxCount, + @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer count, + @OutParameter @GLhandleARB IntBuffer obj); + + /** + * Returns the location of the uniform with the specified name. The ByteBuffer should contain the uniform name as a null-terminated string. + * + * @param programObj + * @param name + */ + int glGetUniformLocationARB(@GLhandleARB int programObj, @NullTerminated @Const @GLcharARB ByteBuffer name); + + @Alternate("glGetUniformLocationARB") + int glGetUniformLocationARB(@GLhandleARB int programObj, @NullTerminated CharSequence name); + + void glGetActiveUniformARB(@GLhandleARB int programObj, @GLuint int index, @AutoSize("name") @GLsizei int maxLength, + @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length, + @OutParameter @Check("1") IntBuffer size, + @OutParameter @GLenum @Check("1") IntBuffer type, + @OutParameter @GLcharARB ByteBuffer name); + + /** Overloads glGetActiveUniformARB. This version returns both size and type in the sizeType buffer (at .position() and .position() + 1). */ + @Alternate("glGetActiveUniformARB") + @GLreturn(value = "name", maxLength = "maxLength") + void glGetActiveUniformARB2(@GLhandleARB int programObj, @GLuint int index, @GLsizei int maxLength, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(name_length)") IntBuffer length, + @OutParameter @Check("2") IntBuffer sizeType, + @OutParameter @GLenum @Constant("MemoryUtil.getAddress(sizeType, sizeType.position() + 1)") IntBuffer type, + @OutParameter @GLcharARB ByteBuffer name); + + /** Overloads glGetActiveUniformARB. This version returns only the uniform name. */ + @Alternate(value = "glGetActiveUniformARB", javaAlt = true) + @GLreturn(value = "name", maxLength = "maxLength") + void glGetActiveUniformARB(@GLhandleARB int programObj, @GLuint int index, @GLsizei int maxLength, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(name_length), MemoryUtil.getAddress0(APIUtil.getBufferInt(caps)), MemoryUtil.getAddress(APIUtil.getBufferInt(caps), 1)") IntBuffer length, + @OutParameter @GLcharARB ByteBuffer name); + + /** Overloads glGetActiveUniformARB. This version returns only the uniform size. */ + @Alternate(value = "glGetActiveUniformARB", javaAlt = true) + @GLreturn(value = "size") + void glGetActiveUniformSizeARB(@GLhandleARB int programObj, @GLuint int index, @Constant("0") @GLsizei int maxLength, + @OutParameter @GLsizei @Constant("0L") IntBuffer length, + @OutParameter IntBuffer size, + @OutParameter @GLenum @Constant("MemoryUtil.getAddress(size, 1)") IntBuffer type, // Reuse size buffer and ignore + @OutParameter @GLcharARB @Constant("APIUtil.getBufferByte0(caps)") ByteBuffer name); + + /** Overloads glGetActiveUniformARB. This version returns only the uniform type. */ + @Alternate(value = "glGetActiveUniformARB", javaAlt = true) + @GLreturn(value = "type") + void glGetActiveUniformTypeARB(@GLhandleARB int programObj, @GLuint int index, @Constant("0") @GLsizei int maxLength, + @OutParameter @GLsizei @Constant("0L") IntBuffer length, + @OutParameter @Constant("MemoryUtil.getAddress(type, 1)") IntBuffer size, // Reuse type buffer and ignore + @OutParameter @GLenum IntBuffer type, + @OutParameter @GLcharARB @Constant("APIUtil.getBufferByte0(caps)") ByteBuffer name); + + @StripPostfix("params") + void glGetUniformfvARB(@GLhandleARB int programObj, int location, @OutParameter @Check FloatBuffer params); + + @StripPostfix("params") + void glGetUniformivARB(@GLhandleARB int programObj, int location, @OutParameter @Check IntBuffer params); + + void glGetShaderSourceARB(@GLhandleARB int obj, @AutoSize("source") @GLsizei int maxLength, + @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length, + @OutParameter @GLcharARB ByteBuffer source); + + @Alternate("glGetShaderSourceARB") + @GLreturn(value = "source", maxLength = "maxLength") + void glGetShaderSourceARB2(@GLhandleARB int obj, @GLsizei int maxLength, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(source_length)") IntBuffer length, + @OutParameter @GLcharARB ByteBuffer source); + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_precision.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_precision.java new file mode 100644 index 0000000..6de3426 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_precision.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_shader_precision { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_stencil_export.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_stencil_export.java new file mode 100644 index 0000000..9cc71c2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_stencil_export.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_shader_stencil_export { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_storage_buffer_object.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_storage_buffer_object.java new file mode 100644 index 0000000..21eb78c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_storage_buffer_object.java @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.Reuse; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface ARB_shader_storage_buffer_object { + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, and + * GetBufferPointerv: + */ + int GL_SHADER_STORAGE_BUFFER = 0x90D2; + + /** + * Accepted by the <pname> parameter of GetIntegerv, GetIntegeri_v, + * GetBooleanv, GetInteger64v, GetFloatv, GetDoublev, GetBooleani_v, + * GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v: + */ + int GL_SHADER_STORAGE_BUFFER_BINDING = 0x90D3; + + /** + * Accepted by the <pname> parameter of GetIntegeri_v, GetBooleani_v, + * GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v: + */ + int GL_SHADER_STORAGE_BUFFER_START = 0x90D4, + GL_SHADER_STORAGE_BUFFER_SIZE = 0x90D5; + + /** + * Accepted by the <pname> parameter of GetIntegerv, GetBooleanv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + int GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS = 0x90D6, + GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS = 0x90D7, + GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS = 0x90D8, + GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS = 0x90D9, + GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS = 0x90DA, + GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS = 0x90DB, + GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS = 0x90DC, + GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS = 0x90DD, + GL_MAX_SHADER_STORAGE_BLOCK_SIZE = 0x90DE, + GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT = 0x90DF; + + /** Accepted in the <barriers> bitfield in glMemoryBarrier: */ + int GL_SHADER_STORAGE_BARRIER_BIT = 0x2000; + + /** + * Alias for the existing token + * MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS: + */ + int GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES = 0x8F39; + + @Reuse("GL43") + void glShaderStorageBlockBinding(@GLuint int program, @GLuint int storageBlockIndex, + @GLuint int storageBlockBinding); +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_subroutine.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_subroutine.java new file mode 100644 index 0000000..2cfd3fc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_subroutine.java @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +@Extension(postfix = "") +public interface ARB_shader_subroutine { + + /** Accepted by the <pname> parameter of GetProgramStageiv: */ + int GL_ACTIVE_SUBROUTINES = 0x8DE5; + int GL_ACTIVE_SUBROUTINE_UNIFORMS = 0x8DE6; + int GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS = 0x8E47; + int GL_ACTIVE_SUBROUTINE_MAX_LENGTH = 0x8E48; + int GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH = 0x8E49; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, GetDoublev, and GetInteger64v: + */ + int GL_MAX_SUBROUTINES = 0x8DE7; + int GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS = 0x8DE8; + + /** Accepted by the <pname> parameter of GetActiveSubroutineUniformiv: */ + int GL_NUM_COMPATIBLE_SUBROUTINES = 0x8E4A; + int GL_COMPATIBLE_SUBROUTINES = 0x8E4B; + int GL_UNIFORM_SIZE = GL31.GL_UNIFORM_SIZE; + int GL_UNIFORM_NAME_LENGTH = GL31.GL_UNIFORM_NAME_LENGTH; + + @Reuse("GL40") + int glGetSubroutineUniformLocation(@GLuint int program, @GLenum int shadertype, @Const @NullTerminated ByteBuffer name); + + @Alternate("glGetSubroutineUniformLocation") + @Reuse("GL40") + int glGetSubroutineUniformLocation(@GLuint int program, @GLenum int shadertype, @NullTerminated CharSequence name); + + @Reuse("GL40") + @GLuint + int glGetSubroutineIndex(@GLuint int program, @GLenum int shadertype, @Const @NullTerminated ByteBuffer name); + + @Alternate("glGetSubroutineIndex") + @Reuse("GL40") + int glGetSubroutineIndex(@GLuint int program, @GLenum int shadertype, @NullTerminated CharSequence name); + + @Reuse("GL40") + @StripPostfix("values") + void glGetActiveSubroutineUniformiv(@GLuint int program, @GLenum int shadertype, @GLuint int index, @GLenum int pname, + @Check("1") @OutParameter IntBuffer values); + + @Reuse("GL40") + @Alternate("glGetActiveSubroutineUniformiv") + @GLreturn("values") + @StripPostfix(value = "values", postfix = "v") + void glGetActiveSubroutineUniformiv2(@GLuint int program, @GLenum int shadertype, @GLuint int index, @GLenum int pname, + @OutParameter IntBuffer values); + + @Reuse("GL40") + void glGetActiveSubroutineUniformName(@GLuint int program, @GLenum int shadertype, @GLuint int index, @AutoSize("name") @GLsizei int bufsize, + @OutParameter @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length, + @OutParameter ByteBuffer name); + + @Reuse("GL40") + @Alternate("glGetActiveSubroutineUniformName") + @GLreturn(value = "name", maxLength = "bufsize") + void glGetActiveSubroutineUniformName2(@GLuint int program, @GLenum int shadertype, @GLuint int index, @GLsizei int bufsize, + @OutParameter @Constant("MemoryUtil.getAddress0(name_length)") @GLsizei IntBuffer length, + @OutParameter @GLchar ByteBuffer name); + + @Reuse("GL40") + void glGetActiveSubroutineName(@GLuint int program, @GLenum int shadertype, @GLuint int index, @AutoSize("name") @GLsizei int bufsize, + @OutParameter @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length, + @OutParameter ByteBuffer name); + + @Reuse("GL40") + @Alternate("glGetActiveSubroutineName") + @GLreturn(value = "name", maxLength = "bufsize") + void glGetActiveSubroutineName2(@GLuint int program, @GLenum int shadertype, @GLuint int index, @GLsizei int bufsize, + @OutParameter @Constant("MemoryUtil.getAddress0(name_length)") @GLsizei IntBuffer length, + @OutParameter @GLchar ByteBuffer name); + + @Reuse("GL40") + @StripPostfix("indices") + void glUniformSubroutinesuiv(@GLenum int shadertype, @AutoSize("indices") @GLsizei int count, @Const @GLuint IntBuffer indices); + + @Reuse("GL40") + @StripPostfix("params") + void glGetUniformSubroutineuiv(@GLenum int shadertype, int location, @Check("1") @OutParameter @GLuint IntBuffer params); + + @Reuse("GL40") + @Alternate("glGetUniformSubroutineuiv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetUniformSubroutineuiv2(@GLenum int shadertype, int location, @OutParameter @GLuint IntBuffer params); + + @Reuse("GL40") + @StripPostfix("values") + void glGetProgramStageiv(@GLuint int program, @GLenum int shadertype, @GLenum int pname, @Check("1") @OutParameter IntBuffer values); + + @Reuse("GL40") + @Alternate("glGetProgramStageiv") + @GLreturn("values") + @StripPostfix(value = "values", postfix = "v") + void glGetProgramStageiv2(@GLuint int program, @GLenum int shadertype, @GLenum int pname, @OutParameter IntBuffer values); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_texture_lod.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_texture_lod.java new file mode 100644 index 0000000..e646dea --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shader_texture_lod.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_shader_texture_lod { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shading_language_100.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shading_language_100.java new file mode 100644 index 0000000..a9b9865 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shading_language_100.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_shading_language_100 { + + /** + * Accepted by the <name> parameter of GetString: + */ + int GL_SHADING_LANGUAGE_VERSION_ARB = 0x8B8C; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shading_language_420pack.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shading_language_420pack.java new file mode 100644 index 0000000..44d9dda --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shading_language_420pack.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_shading_language_420pack { + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shading_language_include.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shading_language_include.java new file mode 100644 index 0000000..7f705d6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shading_language_include.java @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +public interface ARB_shading_language_include { + + /** Accepted by the <type> parameter of NamedStringARB: */ + int GL_SHADER_INCLUDE_ARB = 0x8DAE; + + /** Accepted by the <pname> parameter of GetNamedStringivARB: */ + int GL_NAMED_STRING_LENGTH_ARB = 0x8DE9; + int GL_NAMED_STRING_TYPE_ARB = 0x8DEA; + + void glNamedStringARB(@GLenum int type, + @AutoSize("name") int namelen, @Const @GLchar ByteBuffer name, + @AutoSize("string") int stringlen, @Const @GLchar ByteBuffer string); + + @Alternate("glNamedStringARB") + void glNamedStringARB(@GLenum int type, + @Constant("name.length()") int namelen, CharSequence name, + @Constant("string.length()") int stringlen, CharSequence string); + + void glDeleteNamedStringARB(@AutoSize("name") int namelen, @Const @GLchar ByteBuffer name); + + @Alternate("glDeleteNamedStringARB") + void glDeleteNamedStringARB(@Constant("name.length()") int namelen, CharSequence name); + + void glCompileShaderIncludeARB(@GLuint int shader, @GLsizei int count, + @Const @NullTerminated("count") @PointerArray("count") @GLchar ByteBuffer path, + @Constant("0L") @Const IntBuffer length); + + @Alternate(value = "glCompileShaderIncludeARB", nativeAlt = true) + void glCompileShaderIncludeARB2(@GLuint int shader, @Constant("path.length") @GLsizei int count, + @Const @PointerArray(value = "count", lengths = "length") CharSequence[] path, + @Constant("APIUtil.getLengths(caps, path)") @Const IntBuffer length); + + boolean glIsNamedStringARB(@AutoSize("name") int namelen, @Const @GLchar ByteBuffer name); + + @Alternate("glIsNamedStringARB") + boolean glIsNamedStringARB(@Constant("name.length()") int namelen, CharSequence name); + + void glGetNamedStringARB(@AutoSize("name") int namelen, @Const @GLchar ByteBuffer name, + @AutoSize("string") @GLsizei int bufSize, + @OutParameter @Check(value = "1", canBeNull = true) IntBuffer stringlen, + @OutParameter @GLchar ByteBuffer string); + + @Alternate("glGetNamedStringARB") + void glGetNamedStringARB(@Constant("name.length()") int namelen, CharSequence name, + @AutoSize("string") @GLsizei int bufSize, + @OutParameter @Check(value = "1", canBeNull = true) IntBuffer stringlen, + @OutParameter @GLchar ByteBuffer string); + + @Alternate("glGetNamedStringARB") + @GLreturn(value = "string", maxLength = "bufSize") + void glGetNamedStringARB2(@Constant("name.length()") int namelen, CharSequence name, + @GLsizei int bufSize, + @OutParameter @Constant("MemoryUtil.getAddress0(string_length)") IntBuffer stringlen, + @OutParameter @GLchar ByteBuffer string); + + @StripPostfix("params") + void glGetNamedStringivARB(@AutoSize("name") int namelen, @Const @GLchar ByteBuffer name, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + @Alternate("glGetNamedStringivARB") + @StripPostfix(value = "params", postfix = "v") + void glGetNamedStringivARB(@Constant("name.length()") int namelen, CharSequence name, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + @Alternate("glGetNamedStringivARB") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetNamedStringivARB2(@Constant("name.length()") int namelen, CharSequence name, @GLenum int pname, @OutParameter IntBuffer params); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shading_language_packing.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shading_language_packing.java new file mode 100644 index 0000000..169f12f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shading_language_packing.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_shading_language_packing { + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shadow.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shadow.java new file mode 100644 index 0000000..c3d9c36 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shadow.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_shadow { + int GL_TEXTURE_COMPARE_MODE_ARB = 0x884C; + int GL_TEXTURE_COMPARE_FUNC_ARB = 0x884D; + int GL_COMPARE_R_TO_TEXTURE_ARB = 0x884E; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shadow_ambient.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shadow_ambient.java new file mode 100644 index 0000000..e2cea05 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_shadow_ambient.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_shadow_ambient { + int GL_TEXTURE_COMPARE_FAIL_VALUE_ARB = 0x80BF; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_sparse_texture.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_sparse_texture.java new file mode 100644 index 0000000..a55ff15 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_sparse_texture.java @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2002-2013 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.Dependent; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +@Dependent +public interface ARB_sparse_texture { + + /** + * Accepted by the <pname> parameter to TexParameter{i f}{v}, + * TexParameterI{u}v, GetTexParameter{if}v and GetTexParameterIi{u}v: + */ + int GL_TEXTURE_SPARSE_ARB = 0x91A6, + GL_VIRTUAL_PAGE_SIZE_INDEX_ARB = 0x91A7; + + /** + * Accepted by the <pname> parameter of GetTexParameter{if}v and + * GetTexParameterIi{u}v: + */ + int GL_NUM_SPARSE_LEVELS_ARB = 0x91AA; + + /** Accepted by the <pname> parameter to GetInternalformativ: */ + int GL_NUM_VIRTUAL_PAGE_SIZES_ARB = 0x91A8, + GL_VIRTUAL_PAGE_SIZE_X_ARB = 0x9195, + GL_VIRTUAL_PAGE_SIZE_Y_ARB = 0x9196, + GL_VIRTUAL_PAGE_SIZE_Z_ARB = 0x9197; + + /** + * Accepted by the <pname> parameter to GetIntegerv, GetFloatv, GetDoublev, + * GetInteger64v, and GetBooleanv: + */ + int GL_MAX_SPARSE_TEXTURE_SIZE_ARB = 0x9198, + GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB = 0x9199, + GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB = 0x919A, + GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB = 0x91A9; + + void glTexPageCommitmentARB(@GLenum int target, + int level, + int xoffset, + int yoffset, + int zoffset, + @GLsizei int width, + @GLsizei int height, + @GLsizei int depth, + boolean commit); + + @Dependent("GL_EXT_direct_state_access") + void glTexturePageCommitmentEXT(@GLuint int texture, + @GLenum int target, + int level, + int xoffset, + int yoffset, + int zoffset, + @GLsizei int width, + @GLsizei int height, + @GLsizei int depth, + boolean commit); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_stencil_texturing.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_stencil_texturing.java new file mode 100644 index 0000000..a698aff --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_stencil_texturing.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_stencil_texturing { + + /** Accepted by the <pname> parameter of TexParameter* and GetTexParameter*: */ + int GL_DEPTH_STENCIL_TEXTURE_MODE = 0x90EA; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_sync.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_sync.java new file mode 100644 index 0000000..6a3d9d2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_sync.java @@ -0,0 +1,126 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.PointerWrapper; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.IntBuffer; +import java.nio.LongBuffer; + +@Extension(postfix = "") +public interface ARB_sync { + + /** Accepted as the <pname> parameter of GetInteger64v: */ + int GL_MAX_SERVER_WAIT_TIMEOUT = 0x9111; + + /** Accepted as the <pname> parameter of GetSynciv: */ + int GL_OBJECT_TYPE = 0x9112; + int GL_SYNC_CONDITION = 0x9113; + int GL_SYNC_STATUS = 0x9114; + int GL_SYNC_FLAGS = 0x9115; + + /** Returned in <values> for GetSynciv <pname> OBJECT_TYPE: */ + int GL_SYNC_FENCE = 0x9116; + + /** Returned in <values> for GetSynciv <pname> SYNC_CONDITION: */ + int GL_SYNC_GPU_COMMANDS_COMPLETE = 0x9117; + + /** Returned in <values> for GetSynciv <pname> SYNC_STATUS: */ + int GL_UNSIGNALED = 0x9118; + int GL_SIGNALED = 0x9119; + + /** Accepted in the <flags> parameter of ClientWaitSync: */ + int GL_SYNC_FLUSH_COMMANDS_BIT = 0x00000001; + + /** Accepted in the <timeout> parameter of WaitSync: */ + long GL_TIMEOUT_IGNORED = 0xFFFFFFFFFFFFFFFFl; + + /** Returned by ClientWaitSync: */ + int GL_ALREADY_SIGNALED = 0x911A; + int GL_TIMEOUT_EXPIRED = 0x911B; + int GL_CONDITION_SATISFIED = 0x911C; + int GL_WAIT_FAILED = 0x911D; + + @Reuse("GL32") + @PointerWrapper("GLsync") + GLSync glFenceSync(@GLenum int condition, @GLbitfield int flags); + + @Reuse("GL32") + boolean glIsSync(@PointerWrapper("GLsync") GLSync sync); + + @Reuse("GL32") + void glDeleteSync(@PointerWrapper("GLsync") GLSync sync); + + @Reuse("GL32") + @GLenum + int glClientWaitSync(@PointerWrapper("GLsync") GLSync sync, @GLbitfield int flags, @GLuint64 long timeout); + + @Reuse("GL32") + void glWaitSync(@PointerWrapper("GLsync") GLSync sync, @GLbitfield int flags, @GLuint64 long timeout); + + @Reuse("GL32") + @StripPostfix("params") + void glGetInteger64v(@GLenum int pname, @OutParameter @Check("1") @GLint64 LongBuffer params); + + @Reuse("GL32") + @Alternate("glGetInteger64v") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetInteger64v2(@GLenum int pname, @OutParameter @GLint64 LongBuffer params); + + @Reuse("GL32") + @StripPostfix("values") + void glGetSynciv(@PointerWrapper("GLsync") GLSync sync, @GLenum int pname, @AutoSize("values") @GLsizei int bufSize, + @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length, + @OutParameter IntBuffer values); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetSynci} instead. */ + @Alternate("glGetSynciv") + @GLreturn("values") + @StripPostfix("values") + @Reuse(value = "GL32", method = "glGetSynci") + @Deprecated + void glGetSynciv2(@PointerWrapper("GLsync") GLSync sync, @GLenum int pname, @Constant("1") @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("0L") IntBuffer length, + @OutParameter IntBuffer values); + + @Reuse("GL32") + @Alternate("glGetSynciv") + @GLreturn("values") + @StripPostfix(value = "values", postfix = "v") + void glGetSynciv3(@PointerWrapper("GLsync") GLSync sync, @GLenum int pname, @Constant("1") @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("0L") IntBuffer length, + @OutParameter IntBuffer values); +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_tessellation_shader.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_tessellation_shader.java new file mode 100644 index 0000000..4177afc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_tessellation_shader.java @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; + +import java.nio.FloatBuffer; + +@Extension(postfix = "") +public interface ARB_tessellation_shader { + + /** + * Accepted by the <mode> parameter of Begin and all vertex array functions + * that implicitly call Begin: + */ + int GL_PATCHES = 0xE; + + /** + * Accepted by the <pname> parameter of PatchParameteri, GetBooleanv, + * GetDoublev, GetFloatv, GetIntegerv, and GetInteger64v: + */ + int GL_PATCH_VERTICES = 0x8E72; + + /** + * Accepted by the <pname> parameter of PatchParameterfv, GetBooleanv, + * GetDoublev, GetFloatv, and GetIntegerv, and GetInteger64v: + */ + int GL_PATCH_DEFAULT_INNER_LEVEL = 0x8E73; + int GL_PATCH_DEFAULT_OUTER_LEVEL = 0x8E74; + + /** Accepted by the <pname> parameter of GetProgramiv: */ + int GL_TESS_CONTROL_OUTPUT_VERTICES = 0x8E75; + int GL_TESS_GEN_MODE = 0x8E76; + int GL_TESS_GEN_SPACING = 0x8E77; + int GL_TESS_GEN_VERTEX_ORDER = 0x8E78; + int GL_TESS_GEN_POINT_MODE = 0x8E79; + + /** Returned by GetProgramiv when <pname> is TESS_GEN_MODE: */ + int GL_TRIANGLES = GL11.GL_TRIANGLES; + int GL_QUADS = GL11.GL_QUADS; + int GL_ISOLINES = 0x8E7A; + + /** Returned by GetProgramiv when <pname> is TESS_GEN_SPACING: */ + int GL_EQUAL = GL11.GL_EQUAL; + int GL_FRACTIONAL_ODD = 0x8E7B; + int GL_FRACTIONAL_EVEN = 0x8E7C; + + /** Returned by GetProgramiv when <pname> is TESS_GEN_VERTEX_ORDER: */ + int GL_CCW = GL11.GL_CCW; + int GL_CW = GL11.GL_CW; + + /** Returned by GetProgramiv when <pname> is TESS_GEN_POINT_MODE: */ + int GL_FALSE = GL11.GL_FALSE; + int GL_TRUE = GL11.GL_TRUE; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetFloatv, + * GetIntegerv, and GetInteger64v: + */ + int GL_MAX_PATCH_VERTICES = 0x8E7D; + int GL_MAX_TESS_GEN_LEVEL = 0x8E7E; + int GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E7F; + int GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E80; + int GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS = 0x8E81; + int GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS = 0x8E82; + int GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS = 0x8E83; + int GL_MAX_TESS_PATCH_COMPONENTS = 0x8E84; + int GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS = 0x8E85; + int GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS = 0x8E86; + int GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS = 0x8E89; + int GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS = 0x8E8A; + int GL_MAX_TESS_CONTROL_INPUT_COMPONENTS = 0x886C; + int GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS = 0x886D; + int GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E1E; + int GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E1F; + + /** Accepted by the <pname> parameter of GetActiveUniformBlockiv: */ + int GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER = 0x84F0; + int GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x84F1; + + /** + * Accepted by the <type> parameter of CreateShader and returned by the + * <params> parameter of GetShaderiv: + */ + int GL_TESS_EVALUATION_SHADER = 0x8E87; + int GL_TESS_CONTROL_SHADER = 0x8E88; + + @Reuse("GL40") + void glPatchParameteri(@GLenum int pname, int value); + + @Reuse("GL40") + @StripPostfix("values") + void glPatchParameterfv(@GLenum int pname, @Check("4") @Const FloatBuffer values); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_border_clamp.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_border_clamp.java new file mode 100644 index 0000000..3530b1f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_border_clamp.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_texture_border_clamp { + int GL_CLAMP_TO_BORDER_ARB = 0x812D; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_buffer_object.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_buffer_object.java new file mode 100644 index 0000000..3e863c6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_buffer_object.java @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface ARB_texture_buffer_object { + + /** + * Accepted by the <target> parameter of BindBuffer, BufferData, + * BufferSubData, MapBuffer, MapBufferRangeARB, BindTexture, UnmapBuffer, + * GetBufferSubData, GetBufferParameteriv, GetBufferPointerv, and TexBufferARB, + * and the parameter of GetBooleanv, GetDoublev, GetFloatv, and + * GetIntegerv: + */ + int GL_TEXTURE_BUFFER_ARB = 0x8C2A; + + /** + * Accepted by the <pname> parameters of GetBooleanv, GetDoublev, + * GetFloatv, and GetIntegerv: + */ + int GL_MAX_TEXTURE_BUFFER_SIZE_ARB = 0x8C2B; + int GL_TEXTURE_BINDING_BUFFER_ARB = 0x8C2C; + int GL_TEXTURE_BUFFER_DATA_STORE_BINDING_ARB = 0x8C2D; + int GL_TEXTURE_BUFFER_FORMAT_ARB = 0x8C2E; + + void glTexBufferARB(@GLenum int target, @GLenum int internalformat, @GLuint int buffer); +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_buffer_object_rgb32.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_buffer_object_rgb32.java new file mode 100644 index 0000000..31721b4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_buffer_object_rgb32.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.Alias; + +@Alias("EXT_texture_buffer_object_rgb32") +public interface ARB_texture_buffer_object_rgb32 { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_buffer_range.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_buffer_range.java new file mode 100644 index 0000000..363b095 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_buffer_range.java @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.Dependent; +import org.lwjgl.util.generator.Reuse; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLintptr; +import org.lwjgl.util.generator.opengl.GLsizeiptr; +import org.lwjgl.util.generator.opengl.GLuint; + +@Dependent +public interface ARB_texture_buffer_range { + + /** Accepted by the <pname> parameter of GetTexLevelParameter: */ + int GL_TEXTURE_BUFFER_OFFSET = 0x919D, + GL_TEXTURE_BUFFER_SIZE = 0x919E; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + int GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT = 0x919F; + + @Reuse("GL43") + void glTexBufferRange(@GLenum int target, + @GLenum int internalformat, + @GLuint int buffer, + @GLintptr long offset, + @GLsizeiptr long size); + + @Dependent("GL_EXT_direct_state_access") + void glTextureBufferRangeEXT(@GLuint int texture, + @GLenum int target, + @GLenum int internalformat, + @GLuint int buffer, + @GLintptr long offset, + @GLsizeiptr long size); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_compression.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_compression.java new file mode 100644 index 0000000..77b0fd7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_compression.java @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLvoid; + +import java.nio.*; + +public interface ARB_texture_compression { + int GL_COMPRESSED_ALPHA_ARB = 0x84E9; + int GL_COMPRESSED_LUMINANCE_ARB = 0x84EA; + int GL_COMPRESSED_LUMINANCE_ALPHA_ARB = 0x84EB; + int GL_COMPRESSED_INTENSITY_ARB = 0x84EC; + int GL_COMPRESSED_RGB_ARB = 0x84ED; + int GL_COMPRESSED_RGBA_ARB = 0x84EE; + int GL_TEXTURE_COMPRESSION_HINT_ARB = 0x84EF; + int GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB = 0x86A0; + int GL_TEXTURE_COMPRESSED_ARB = 0x86A1; + int GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB = 0x86A2; + int GL_COMPRESSED_TEXTURE_FORMATS_ARB = 0x86A3; + + void glCompressedTexImage1DARB(@GLenum int target, int level, @GLenum int internalformat, @GLsizei int width, int border, @AutoSize("pData") @GLsizei int imageSize, + @BufferObject(BufferKind.UnpackPBO) + @Check + @Const + @GLvoid + ByteBuffer pData); + + void glCompressedTexImage2DARB(@GLenum int target, int level, @GLenum int internalformat, @GLsizei int width, @GLsizei int height, int border, @AutoSize("pData") @GLsizei int imageSize, + @BufferObject(BufferKind.UnpackPBO) + @Check + @Const + @GLvoid + ByteBuffer pData); + + void glCompressedTexImage3DARB(@GLenum int target, int level, @GLenum int internalformat, @GLsizei int width, @GLsizei int height, @GLsizei int depth, int border, @AutoSize("pData") @GLsizei int imageSize, + @BufferObject(BufferKind.UnpackPBO) + @Check + @Const + @GLvoid + ByteBuffer pData); + + void glCompressedTexSubImage1DARB(@GLenum int target, int level, int xoffset, @GLsizei int width, @GLenum int format, @AutoSize("pData") @GLsizei int imageSize, + @BufferObject(BufferKind.UnpackPBO) + @Check + @Const + @GLvoid + ByteBuffer pData); + + void glCompressedTexSubImage2DARB(@GLenum int target, int level, int xoffset, int yoffset, @GLsizei int width, @GLsizei int height, @GLenum int format, @AutoSize("pData") @GLsizei int imageSize, + @BufferObject(BufferKind.UnpackPBO) + @Check + @Const + @GLvoid + ByteBuffer pData); + + void glCompressedTexSubImage3DARB(@GLenum int target, int level, int xoffset, int yoffset, int zoffset, @GLsizei int width, @GLsizei int height, @GLsizei int depth, @GLenum int format, @AutoSize("pData") @GLsizei int imageSize, + @BufferObject(BufferKind.UnpackPBO) + @Check + @Const + @GLvoid + ByteBuffer pData); + + void glGetCompressedTexImageARB(@GLenum int target, int lod, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @Check + @GLvoid + ByteBuffer pImg); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_compression_bptc.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_compression_bptc.java new file mode 100644 index 0000000..c4776cd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_compression_bptc.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.Alias; +import org.lwjgl.util.generator.Extension; + +@Extension(postfix = "ARB", className = "ARBTextureCompressionBPTC") +@Alias("EXT_texture_compression_bptc") +public interface ARB_texture_compression_bptc { + + /** + * Accepted by the <internalformat> parameter of TexImage2D, TexImage3D, + * CopyTexImage2D, CopyTexImage3D, CompressedTexImage2DARB, and + * CompressedTexImage3DARB and the <format> parameter of + * CompressedTexSubImage2DARB and CompressedTexSubImage3DARB: + */ + int GL_COMPRESSED_RGBA_BPTC_UNORM_ARB = 0x8E8C; + int GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB = 0x8E8D; + int GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB = 0x8E8E; + int GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB = 0x8E8F; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_compression_rgtc.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_compression_rgtc.java new file mode 100644 index 0000000..f0a14df --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_compression_rgtc.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.Extension; + +@Extension(postfix = "ARB", className = "ARBTextureCompressionRGTC") +public interface ARB_texture_compression_rgtc { + + /** + * Accepted by the <internalformat> parameter of TexImage2D, + * CopyTexImage2D, and CompressedTexImage2D and the <format> parameter + * of CompressedTexSubImage2D: + */ + int GL_COMPRESSED_RED_RGTC1 = 0x8DBB, + GL_COMPRESSED_SIGNED_RED_RGTC1 = 0x8DBC, + GL_COMPRESSED_RG_RGTC2 = 0x8DBD, + GL_COMPRESSED_SIGNED_RG_RGTC2 = 0x8DBE; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_cube_map.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_cube_map.java new file mode 100644 index 0000000..eb41182 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_cube_map.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_texture_cube_map { + int GL_NORMAL_MAP_ARB = 0x8511; + int GL_REFLECTION_MAP_ARB = 0x8512; + int GL_TEXTURE_CUBE_MAP_ARB = 0x8513; + int GL_TEXTURE_BINDING_CUBE_MAP_ARB = 0x8514; + int GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB = 0x8515; + int GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB = 0x8516; + int GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB = 0x8517; + int GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB = 0x8518; + int GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB = 0x8519; + int GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB = 0x851A; + int GL_PROXY_TEXTURE_CUBE_MAP_ARB = 0x851B; + int GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB = 0x851C; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_cube_map_array.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_cube_map_array.java new file mode 100644 index 0000000..dd5d95e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_cube_map_array.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_texture_cube_map_array { + + /** + * Accepted by the <target> parameter of TexParameteri, TexParameteriv, + * TexParameterf, TexParameterfv, BindTexture, and GenerateMipmap: + *

+ * Accepted by the <target> parameter of TexImage3D, TexSubImage3D, + * CompressedTeximage3D, CompressedTexSubImage3D and CopyTexSubImage3D: + *

+ * Accepted by the <tex> parameter of GetTexImage: + */ + int GL_TEXTURE_CUBE_MAP_ARRAY_ARB = 0x9009; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, + * GetIntegerv and GetFloatv: + */ + int GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB = 0x900A; + + /** + * Accepted by the <target> parameter of TexImage3D, TexSubImage3D, + * CompressedTeximage3D, CompressedTexSubImage3D and CopyTexSubImage3D: + */ + int GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB = 0x900B; + + /** Returned by the <type> parameter of GetActiveUniform: */ + int GL_SAMPLER_CUBE_MAP_ARRAY_ARB = 0x900C; + int GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB = 0x900D; + int GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB = 0x900E; + int GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB = 0x900F; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_env_add.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_env_add.java new file mode 100644 index 0000000..5b3f0e6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_env_add.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_texture_env_add { +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_env_combine.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_env_combine.java new file mode 100644 index 0000000..c733fcc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_env_combine.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_texture_env_combine { + int GL_COMBINE_ARB = 0x8570; + + int GL_COMBINE_RGB_ARB = 0x8571; + int GL_COMBINE_ALPHA_ARB = 0x8572; + + int GL_SOURCE0_RGB_ARB = 0x8580; + int GL_SOURCE1_RGB_ARB = 0x8581; + int GL_SOURCE2_RGB_ARB = 0x8582; + int GL_SOURCE0_ALPHA_ARB = 0x8588; + int GL_SOURCE1_ALPHA_ARB = 0x8589; + int GL_SOURCE2_ALPHA_ARB = 0x858A; + + int GL_OPERAND0_RGB_ARB = 0x8590; + int GL_OPERAND1_RGB_ARB = 0x8591; + int GL_OPERAND2_RGB_ARB = 0x8592; + int GL_OPERAND0_ALPHA_ARB = 0x8598; + int GL_OPERAND1_ALPHA_ARB = 0x8599; + int GL_OPERAND2_ALPHA_ARB = 0x859A; + + int GL_RGB_SCALE_ARB = 0x8573; + + int GL_ADD_SIGNED_ARB = 0x8574; + int GL_INTERPOLATE_ARB = 0x8575; + int GL_SUBTRACT_ARB = 0x84E7; + + int GL_CONSTANT_ARB = 0x8576; + int GL_PRIMARY_COLOR_ARB = 0x8577; + int GL_PREVIOUS_ARB = 0x8578; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_env_crossbar.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_env_crossbar.java new file mode 100644 index 0000000..da2e481 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_env_crossbar.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_texture_env_crossbar { +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_env_dot3.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_env_dot3.java new file mode 100644 index 0000000..7bcf541 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_env_dot3.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_texture_env_dot3 { + int GL_DOT3_RGB_ARB = 0x86AE; + int GL_DOT3_RGBA_ARB = 0x86AF; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_float.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_float.java new file mode 100644 index 0000000..652eb9d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_float.java @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_texture_float { + + /** + * Accepted by the <value> parameter of GetTexLevelParameter: + */ + int GL_TEXTURE_RED_TYPE_ARB = 0x8C10; + int GL_TEXTURE_GREEN_TYPE_ARB = 0x8C11; + int GL_TEXTURE_BLUE_TYPE_ARB = 0x8C12; + int GL_TEXTURE_ALPHA_TYPE_ARB = 0x8C13; + int GL_TEXTURE_LUMINANCE_TYPE_ARB = 0x8C14; + int GL_TEXTURE_INTENSITY_TYPE_ARB = 0x8C15; + int GL_TEXTURE_DEPTH_TYPE_ARB = 0x8C16; + + /** + * Returned by the <params> parameter of GetTexLevelParameter: + */ + int GL_UNSIGNED_NORMALIZED_ARB = 0x8C17; + + /** + * Accepted by the <internalFormat> parameter of TexImage1D, + * TexImage2D, and TexImage3D: + */ + int GL_RGBA32F_ARB = 0x8814; + int GL_RGB32F_ARB = 0x8815; + int GL_ALPHA32F_ARB = 0x8816; + int GL_INTENSITY32F_ARB = 0x8817; + int GL_LUMINANCE32F_ARB = 0x8818; + int GL_LUMINANCE_ALPHA32F_ARB = 0x8819; + int GL_RGBA16F_ARB = 0x881A; + int GL_RGB16F_ARB = 0x881B; + int GL_ALPHA16F_ARB = 0x881C; + int GL_INTENSITY16F_ARB = 0x881D; + int GL_LUMINANCE16F_ARB = 0x881E; + int GL_LUMINANCE_ALPHA16F_ARB = 0x881F; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_gather.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_gather.java new file mode 100644 index 0000000..bc1af49 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_gather.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_texture_gather { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = 0x8E5E; + int GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = 0x8E5F; + int GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB = 0x8F9F; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_mirror_clamp_to_edge.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_mirror_clamp_to_edge.java new file mode 100644 index 0000000..7d06c41 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_mirror_clamp_to_edge.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2002-2013 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_texture_mirror_clamp_to_edge { + + /** + * Accepted by the <param> parameter of TexParameter{if}, SamplerParameter{if} + * and SamplerParameter{if}v, and by the <params> parameter of + * TexParameter{if}v, TexParameterI{i ui}v and SamplerParameterI{i ui}v when + * their <pname> parameter is TEXTURE_WRAP_S, TEXTURE_WRAP_T, or + * TEXTURE_WRAP_R: + */ + int GL_MIRROR_CLAMP_TO_EDGE = 0x8743; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_mirrored_repeat.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_mirrored_repeat.java new file mode 100644 index 0000000..e952210 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_mirrored_repeat.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_texture_mirrored_repeat { + int GL_MIRRORED_REPEAT_ARB = 0x8370; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_multisample.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_multisample.java new file mode 100644 index 0000000..348961d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_multisample.java @@ -0,0 +1,119 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLbitfield; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.FloatBuffer; + +@Extension(postfix = "") +public interface ARB_texture_multisample { + + /** Accepted by the <pname> parameter of GetMultisamplefv: */ + int GL_SAMPLE_POSITION = 0x8E50; + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, and by + * the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev: + */ + int GL_SAMPLE_MASK = 0x8E51; + + /** + * Accepted by the <target> parameter of GetBooleani_v and + * GetIntegeri_v: + */ + int GL_SAMPLE_MASK_VALUE = 0x8E52; + + /** + * Accepted by the <target> parameter of BindTexture and + * TexImage2DMultisample: + */ + int GL_TEXTURE_2D_MULTISAMPLE = 0x9100; + + /** Accepted by the <target> parameter of TexImage2DMultisample: */ + int GL_PROXY_TEXTURE_2D_MULTISAMPLE = 0x9101; + + /** + * Accepted by the <target> parameter of BindTexture and + * TexImage3DMultisample: + */ + int GL_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9102; + + /** Accepted by the <target> parameter of TexImage3DMultisample: */ + int GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9103; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv, + * and GetFloatv: + */ + int GL_MAX_SAMPLE_MASK_WORDS = 0x8E59; + int GL_MAX_COLOR_TEXTURE_SAMPLES = 0x910E; + int GL_MAX_DEPTH_TEXTURE_SAMPLES = 0x910F; + int GL_MAX_INTEGER_SAMPLES = 0x9110; + int GL_TEXTURE_BINDING_2D_MULTISAMPLE = 0x9104; + int GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY = 0x9105; + + /** Accepted by the <pname> parameter of GetTexLevelParameter */ + int GL_TEXTURE_SAMPLES = 0x9106; + int GL_TEXTURE_FIXED_SAMPLE_LOCATIONS = 0x9107; + + /** Returned by the <type> parameter of GetActiveUniform: */ + int GL_SAMPLER_2D_MULTISAMPLE = 0x9108; + int GL_INT_SAMPLER_2D_MULTISAMPLE = 0x9109; + int GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE = 0x910A; + int GL_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910B; + int GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910C; + int GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910D; + + @Reuse("GL32") + void glTexImage2DMultisample(@GLenum int target, @GLsizei int samples, int internalformat, + @GLsizei int width, @GLsizei int height, + boolean fixedsamplelocations); + + @Reuse("GL32") + void glTexImage3DMultisample(@GLenum int target, @GLsizei int samples, int internalformat, + @GLsizei int width, @GLsizei int height, @GLsizei int depth, + boolean fixedsamplelocations); + + @Reuse("GL32") + @StripPostfix("val") + void glGetMultisamplefv(@GLenum int pname, @GLuint int index, @OutParameter @Check("2") FloatBuffer val); + + @Reuse("GL32") + void glSampleMaski(@GLuint int index, @GLbitfield int mask); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_non_power_of_two.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_non_power_of_two.java new file mode 100644 index 0000000..ece2a36 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_non_power_of_two.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_texture_non_power_of_two { +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_query_levels.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_query_levels.java new file mode 100644 index 0000000..1c3f382 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_query_levels.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_texture_query_levels { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_query_lod.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_query_lod.java new file mode 100644 index 0000000..d54023a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_query_lod.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_texture_query_lod { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_rectangle.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_rectangle.java new file mode 100644 index 0000000..87e1d48 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_rectangle.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_texture_rectangle { + + /** + Accepted by the <cap> parameter of Enable, Disable and IsEnabled; + by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv + and GetDoublev; and by the <target> parameter of BindTexture, + GetTexParameterfv, GetTexParameteriv, TexParameterf, TexParameteri, + TexParameterfv and TexParameteriv: + Accepted by the <target> parameter of GetTexImage, + GetTexLevelParameteriv, GetTexLevelParameterfv, TexImage2D, + CopyTexImage2D, TexSubImage2D and CopySubTexImage2D: + */ + int GL_TEXTURE_RECTANGLE_ARB = 0x84F5; + + /** + Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + GetFloatv and GetDoublev: + */ + int GL_TEXTURE_BINDING_RECTANGLE_ARB = 0x84F6; + + /** + Accepted by the <target> parameter of GetTexLevelParameteriv, + GetTexLevelParameterfv, GetTexParameteriv and TexImage2D: + */ + int GL_PROXY_TEXTURE_RECTANGLE_ARB = 0x84F7; + + /** + Accepted by the <pname> parameter of GetBooleanv, GetDoublev, + GetIntegerv and GetFloatv: + */ + int GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB = 0x84F8; + + /** + Returned by <type> parameter of GetActiveUniform when the location + <index> for program object <program> is of type sampler2DRect: + */ + int GL_SAMPLER_2D_RECT_ARB = 0x8B63; + + /** + Returned by <type> parameter of GetActiveUniform when the location + <index> for program object <program> is of type sampler2DRectShadow: + */ + int GL_SAMPLER_2D_RECT_SHADOW_ARB = 0x8B64; + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_rg.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_rg.java new file mode 100644 index 0000000..5fc55b2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_rg.java @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_texture_rg { + + /** + * Accepted by the <internalFormat> parameter of TexImage1D, TexImage2D, + * TexImage3D, CopyTexImage1D, and CopyTexImage2D: + */ + int GL_R8 = 0x8229; + int GL_R16 = 0x822A; + + int GL_RG8 = 0x822B; + int GL_RG16 = 0x822C; + + int GL_R16F = 0x822D; + int GL_R32F = 0x822E; + + int GL_RG16F = 0x822F; + int GL_RG32F = 0x8230; + + int GL_R8I = 0x8231; + int GL_R8UI = 0x8232; + int GL_R16I = 0x8233; + int GL_R16UI = 0x8234; + int GL_R32I = 0x8235; + int GL_R32UI = 0x8236; + + int GL_RG8I = 0x8237; + int GL_RG8UI = 0x8238; + int GL_RG16I = 0x8239; + int GL_RG16UI = 0x823A; + int GL_RG32I = 0x823B; + int GL_RG32UI = 0x823C; + + /** + * Accepted by the <format> parameter of TexImage3D, TexImage2D, + * TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, + * DrawPixels and ReadPixels: + */ + int GL_RG = 0x8227; + int GL_RG_INTEGER = 0x8228; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_rgb10_a2ui.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_rgb10_a2ui.java new file mode 100644 index 0000000..6c30ac4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_rgb10_a2ui.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.Extension; + +@Extension(postfix = "ARB", className = "ARBTextureRGB10_A2UI") +public interface ARB_texture_rgb10_a2ui { + + /** + * Accepted by the <internalFormat> parameter of TexImage1D, TexImage2D, + * TexImage3D, CopyTexImage1D, CopyTexImage2D, RenderbufferStorage and + * RenderbufferStorageMultisample: + */ + int GL_RGB10_A2UI = 0x906F; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_stencil8.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_stencil8.java new file mode 100644 index 0000000..68cc97d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_stencil8.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2013 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_texture_stencil8 { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_storage.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_storage.java new file mode 100644 index 0000000..73ff637 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_storage.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.Alias; +import org.lwjgl.util.generator.Dependent; +import org.lwjgl.util.generator.Reuse; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +@Dependent +@Alias(value = "EXT_texture_storage", postfix = "EXT") +public interface ARB_texture_storage { + + /** Accepted by the <value> parameter of GetTexParameter{if}v: */ + int GL_TEXTURE_IMMUTABLE_FORMAT = 0x912F; + + @Reuse("GL42") + void glTexStorage1D(@GLenum int target, @GLsizei int levels, + @GLenum int internalformat, + @GLsizei int width); + + @Reuse("GL42") + void glTexStorage2D(@GLenum int target, @GLsizei int levels, + @GLenum int internalformat, + @GLsizei int width, @GLsizei int height); + + @Reuse("GL42") + void glTexStorage3D(@GLenum int target, @GLsizei int levels, + @GLenum int internalformat, + @GLsizei int width, @GLsizei int height, @GLsizei int depth); + + @Dependent("GL_EXT_direct_state_access") + void glTextureStorage1DEXT(@GLuint int texture, @GLenum int target, @GLsizei int levels, + @GLenum int internalformat, + @GLsizei int width); + + @Dependent("GL_EXT_direct_state_access") + void glTextureStorage2DEXT(@GLuint int texture, @GLenum int target, @GLsizei int levels, + @GLenum int internalformat, + @GLsizei int width, @GLsizei int height); + + @Dependent("GL_EXT_direct_state_access") + void glTextureStorage3DEXT(@GLuint int texture, @GLenum int target, @GLsizei int levels, + @GLenum int internalformat, + @GLsizei int width, @GLsizei int height, @GLsizei int depth); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_storage_multisample.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_storage_multisample.java new file mode 100644 index 0000000..fa03499 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_storage_multisample.java @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.Dependent; +import org.lwjgl.util.generator.Reuse; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +@Dependent +public interface ARB_texture_storage_multisample { + + @Reuse("GL43") + void glTexStorage2DMultisample(@GLenum int target, + @GLsizei int samples, + @GLenum int internalformat, + @GLsizei int width, + @GLsizei int height, + boolean fixedsamplelocations); + + @Reuse("GL43") + void glTexStorage3DMultisample(@GLenum int target, + @GLsizei int samples, + @GLenum int internalformat, + @GLsizei int width, + @GLsizei int height, + @GLsizei int depth, + boolean fixedsamplelocations); + + @Dependent("GL_EXT_direct_state_access") + void glTextureStorage2DMultisampleEXT(@GLuint int texture, + @GLenum int target, + @GLsizei int samples, + @GLenum int internalformat, + @GLsizei int width, + @GLsizei int height, + boolean fixedsamplelocations); + + @Dependent("GL_EXT_direct_state_access") + void glTextureStorage3DMultisampleEXT(@GLuint int texture, + @GLenum int target, + @GLsizei int samples, + @GLenum int internalformat, + @GLsizei int width, + @GLsizei int height, + @GLsizei int depth, + boolean fixedsamplelocations); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_swizzle.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_swizzle.java new file mode 100644 index 0000000..f5c13a4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_swizzle.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_texture_swizzle { + + /** + * Accepted by the <pname> parameters of TexParameteri, + * TexParameterf, TexParameteriv, TexParameterfv, + * GetTexParameterfv, and GetTexParameteriv: + */ + int GL_TEXTURE_SWIZZLE_R = 0x8E42; + int GL_TEXTURE_SWIZZLE_G = 0x8E43; + int GL_TEXTURE_SWIZZLE_B = 0x8E44; + int GL_TEXTURE_SWIZZLE_A = 0x8E45; + + /** + * Accepted by the <pname> parameters of TexParameteriv, + * TexParameterfv, GetTexParameterfv, and GetTexParameteriv: + */ + int GL_TEXTURE_SWIZZLE_RGBA = 0x8E46; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_view.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_view.java new file mode 100644 index 0000000..9391632 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_texture_view.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.Reuse; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface ARB_texture_view { + + /** + * Accepted by the <pname> parameters of GetTexParameterfv and + * GetTexParameteriv: + */ + int GL_TEXTURE_VIEW_MIN_LEVEL = 0x82DB, + GL_TEXTURE_VIEW_NUM_LEVELS = 0x82DC, + GL_TEXTURE_VIEW_MIN_LAYER = 0x82DD, + GL_TEXTURE_VIEW_NUM_LAYERS = 0x82DE, + GL_TEXTURE_IMMUTABLE_LEVELS = 0x82DF; + + @Reuse("GL43") + void glTextureView(@GLuint int texture, @GLenum int target, @GLuint int origtexture, + @GLenum int internalformat, + @GLuint int minlevel, @GLuint int numlevels, + @GLuint int minlayer, @GLuint int numlayers); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_timer_query.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_timer_query.java new file mode 100644 index 0000000..3deca94 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_timer_query.java @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.LongBuffer; + +@Extension(postfix = "") +public interface ARB_timer_query { + + /** + * Accepted by the <target> parameter of BeginQuery, EndQuery, and + * GetQueryiv: + */ + int GL_TIME_ELAPSED = 0x88BF; + + /** + * Accepted by the <target> parameter of GetQueryiv and QueryCounter. + * Accepted by the <value> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + int GL_TIMESTAMP = 0x8E28; + + @Reuse("GL33") + void glQueryCounter(@GLuint int id, @GLenum int target); + + @Reuse("GL33") + @StripPostfix("params") + void glGetQueryObjecti64v(@GLuint int id, @GLenum int pname, @OutParameter @Check("1") @GLint64 LongBuffer params); + + @Reuse("GL33") + @Alternate("glGetQueryObjecti64v") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetQueryObjecti64v2(@GLuint int id, @GLenum int pname, @OutParameter @GLint64 LongBuffer params); + + @Reuse("GL33") + @StripPostfix("params") + void glGetQueryObjectui64v(@GLuint int id, @GLenum int pname, @OutParameter @Check("1") @GLuint64 LongBuffer params); + + @Reuse("GL33") + @Alternate("glGetQueryObjectui64v") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetQueryObjectui64v2(@GLuint int id, @GLenum int pname, @OutParameter @GLuint64 LongBuffer params); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_transform_feedback2.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_transform_feedback2.java new file mode 100644 index 0000000..8066b35 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_transform_feedback2.java @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLreturn; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.IntBuffer; + +public interface ARB_transform_feedback2 { + + /** Accepted by the <target> parameter of BindTransformFeedback: */ + int GL_TRANSFORM_FEEDBACK = 0x8E22; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv, + * and GetFloatv: + */ + int GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED = 0x8E23; + int GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE = 0x8E24; + int GL_TRANSFORM_FEEDBACK_BINDING = 0x8E25; + + @Reuse("GL40") + void glBindTransformFeedback(@GLenum int target, @GLuint int id); + + @Reuse("GL40") + void glDeleteTransformFeedbacks(@AutoSize("ids") @GLsizei int n, @Const @GLuint IntBuffer ids); + + @Reuse("GL40") + @Alternate("glDeleteTransformFeedbacks") + void glDeleteTransformFeedbacks(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(caps, id)", keepParam = true) int id); + + @Reuse("GL40") + void glGenTransformFeedbacks(@AutoSize("ids") @GLsizei int n, @OutParameter @GLuint IntBuffer ids); + + @Reuse("GL40") + @Alternate("glGenTransformFeedbacks") + @GLreturn("ids") + void glGenTransformFeedbacks2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer ids); + + @Reuse("GL40") + boolean glIsTransformFeedback(@GLuint int id); + + @Reuse("GL40") + void glPauseTransformFeedback(); + + @Reuse("GL40") + void glResumeTransformFeedback(); + + @Reuse("GL40") + void glDrawTransformFeedback(@GLenum int mode, @GLuint int id); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_transform_feedback3.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_transform_feedback3.java new file mode 100644 index 0000000..ddab700 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_transform_feedback3.java @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLreturn; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.IntBuffer; + +@Extension(postfix = "") +public interface ARB_transform_feedback3 { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv, + * and GetFloatv: + */ + int GL_MAX_TRANSFORM_FEEDBACK_BUFFERS = 0x8E70; + int GL_MAX_VERTEX_STREAMS = 0x8E71; + + @Reuse("GL40") + void glDrawTransformFeedbackStream(@GLenum int mode, @GLuint int id, @GLuint int stream); + + @Reuse("GL40") + void glBeginQueryIndexed(@GLenum int target, @GLuint int index, @GLuint int id); + + @Reuse("GL40") + void glEndQueryIndexed(@GLenum int target, @GLuint int index); + + @Reuse("GL40") + @StripPostfix("params") + void glGetQueryIndexediv(@GLenum int target, @GLuint int index, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + @Reuse("GL40") + @Alternate("glGetQueryIndexediv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetQueryIndexediv2(@GLenum int target, @GLuint int index, @GLenum int pname, @OutParameter IntBuffer params); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_transform_feedback_instanced.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_transform_feedback_instanced.java new file mode 100644 index 0000000..cdedc4c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_transform_feedback_instanced.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.Reuse; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface ARB_transform_feedback_instanced { + + @Reuse("GL42") + void glDrawTransformFeedbackInstanced(@GLenum int mode, @GLuint int id, @GLsizei int primcount); + + @Reuse("GL42") + void glDrawTransformFeedbackStreamInstanced(@GLenum int mode, @GLuint int id, @GLuint int stream, @GLsizei int primcount); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_transpose_matrix.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_transpose_matrix.java new file mode 100644 index 0000000..e160b51 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_transpose_matrix.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; + +import java.nio.*; + +public interface ARB_transpose_matrix { + int GL_TRANSPOSE_MODELVIEW_MATRIX_ARB = 0x84E3; + int GL_TRANSPOSE_PROJECTION_MATRIX_ARB = 0x84E4; + int GL_TRANSPOSE_TEXTURE_MATRIX_ARB = 0x84E5; + int GL_TRANSPOSE_COLOR_MATRIX_ARB = 0x84E6; + + @StripPostfix("pfMtx") + void glLoadTransposeMatrixfARB(@Check("16") @Const FloatBuffer pfMtx); + + @StripPostfix("pfMtx") + void glMultTransposeMatrixfARB(@Check("16") @Const FloatBuffer pfMtx); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_uniform_buffer_object.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_uniform_buffer_object.java new file mode 100644 index 0000000..3a6c498 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_uniform_buffer_object.java @@ -0,0 +1,214 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +@Extension(postfix = "") +public interface ARB_uniform_buffer_object { + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, and + * GetBufferPointerv: + */ + int GL_UNIFORM_BUFFER = 0x8A11; + + /** + * Accepted by the <pname> parameter of GetIntegeri_v, GetBooleanv, + * GetIntegerv, GetFloatv, and GetDoublev: + */ + int GL_UNIFORM_BUFFER_BINDING = 0x8A28; + + /** Accepted by the <pname> parameter of GetIntegeri_v: */ + int GL_UNIFORM_BUFFER_START = 0x8A29; + int GL_UNIFORM_BUFFER_SIZE = 0x8A2A; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_MAX_VERTEX_UNIFORM_BLOCKS = 0x8A2B; + int GL_MAX_GEOMETRY_UNIFORM_BLOCKS = 0x8A2C; + int GL_MAX_FRAGMENT_UNIFORM_BLOCKS = 0x8A2D; + int GL_MAX_COMBINED_UNIFORM_BLOCKS = 0x8A2E; + int GL_MAX_UNIFORM_BUFFER_BINDINGS = 0x8A2F; + int GL_MAX_UNIFORM_BLOCK_SIZE = 0x8A30; + int GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 0x8A31; + int GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS = 0x8A32; + int GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 0x8A33; + int GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = 0x8A34; + + /** Accepted by the <pname> parameter of GetProgramiv: */ + int GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = 0x8A35; + int GL_ACTIVE_UNIFORM_BLOCKS = 0x8A36; + + /** Accepted by the <pname> parameter of GetActiveUniformsivARB: */ + int GL_UNIFORM_TYPE = 0x8A37; + int GL_UNIFORM_SIZE = 0x8A38; + int GL_UNIFORM_NAME_LENGTH = 0x8A39; + int GL_UNIFORM_BLOCK_INDEX = 0x8A3A; + int GL_UNIFORM_OFFSET = 0x8A3B; + int GL_UNIFORM_ARRAY_STRIDE = 0x8A3C; + int GL_UNIFORM_MATRIX_STRIDE = 0x8A3D; + int GL_UNIFORM_IS_ROW_MAJOR = 0x8A3E; + + /** Accepted by the <pname> parameter of GetActiveUniformBlockivARB: */ + int GL_UNIFORM_BLOCK_BINDING = 0x8A3F; + int GL_UNIFORM_BLOCK_DATA_SIZE = 0x8A40; + int GL_UNIFORM_BLOCK_NAME_LENGTH = 0x8A41; + int GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS = 0x8A42; + int GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 0x8A43; + int GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 0x8A44; + int GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER = 0x8A45; + int GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 0x8A46; + + /** Returned by GetActiveUniformsivARB and GetUniformBlockIndexARB */ + int GL_INVALID_INDEX = 0xFFFFFFFF; + + @Reuse("GL31") + void glGetUniformIndices(@GLuint int program, @AutoSize("uniformIndices") @GLsizei int uniformCount, + @Const @NullTerminated("uniformIndices.remaining()") @GLchar @PointerArray("uniformCount") ByteBuffer uniformNames, + @OutParameter @GLuint IntBuffer uniformIndices); + + @Reuse("GL31") + @Alternate(value = "glGetUniformIndices") + void glGetUniformIndices(@GLuint int program, @Constant("uniformNames.length") @GLsizei int uniformCount, + @Const @NullTerminated @PointerArray("uniformCount") CharSequence[] uniformNames, + @OutParameter @Check("uniformNames.length") @GLuint IntBuffer uniformIndices); + + @Reuse("GL31") + @StripPostfix("params") + void glGetActiveUniformsiv(@GLuint int program, @AutoSize("uniformIndices") @GLsizei int uniformCount, + @Const @GLuint IntBuffer uniformIndices, + @GLenum int pname, + @OutParameter @Check("uniformIndices.remaining()") @GLint IntBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetActiveUniformsi} instead. */ + @Alternate("glGetActiveUniformsiv") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "GL31", method = "glGetActiveUniformsi") + @Deprecated + void glGetActiveUniformsiv(@GLuint int program, @Constant("1") @GLsizei int uniformCount, + @Constant(value = "params.put(1, uniformIndex), 1", keepParam = true) int uniformIndex, // Reuse params buffer + @GLenum int pname, + @OutParameter @GLint IntBuffer params); + + @Reuse("GL31") + @Alternate("glGetActiveUniformsiv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetActiveUniformsiv2(@GLuint int program, @Constant("1") @GLsizei int uniformCount, + @Constant(value = "params.put(1, uniformIndex), 1", keepParam = true) int uniformIndex, // Reuse params buffer + @GLenum int pname, + @OutParameter @GLint IntBuffer params); + + @Reuse("GL31") + void glGetActiveUniformName(@GLuint int program, @GLuint int uniformIndex, @AutoSize("uniformName") @GLsizei int bufSize, + @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length, + @OutParameter @GLchar ByteBuffer uniformName); + + @Reuse("GL31") + @Alternate("glGetActiveUniformName") + @GLreturn(value = "uniformName", maxLength = "bufSize") + void glGetActiveUniformName2(@GLuint int program, @GLuint int uniformIndex, @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(uniformName_length)") IntBuffer length, + @OutParameter @GLchar ByteBuffer uniformName); + + @Reuse("GL31") + @GLuint + int glGetUniformBlockIndex(@GLuint int program, @Const @NullTerminated @GLchar ByteBuffer uniformBlockName); + + @Reuse("GL31") + @Alternate("glGetUniformBlockIndex") + @GLuint + int glGetUniformBlockIndex(@GLuint int program, @NullTerminated CharSequence uniformBlockName); + + @Reuse("GL31") + @StripPostfix("params") + void glGetActiveUniformBlockiv(@GLuint int program, @GLuint int uniformBlockIndex, @GLenum int pname, + @OutParameter @Check(value = "16") @GLint IntBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetActiveUniformBlocki} instead. */ + @Alternate("glGetActiveUniformBlockiv") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "GL31", method = "glGetActiveUniformBlocki") + @Deprecated + void glGetActiveUniformBlockiv2(@GLuint int program, @GLuint int uniformBlockIndex, @GLenum int pname, + @OutParameter @GLint IntBuffer params); + + @Reuse("GL31") + @Alternate("glGetActiveUniformBlockiv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetActiveUniformBlockiv3(@GLuint int program, @GLuint int uniformBlockIndex, @GLenum int pname, + @OutParameter @GLint IntBuffer params); + + @Reuse("GL31") + void glGetActiveUniformBlockName(@GLuint int program, @GLuint int uniformBlockIndex, @AutoSize("uniformBlockName") @GLsizei int bufSize, + @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length, + @OutParameter @GLchar ByteBuffer uniformBlockName); + + @Reuse("GL31") + @Alternate("glGetActiveUniformBlockName") + @GLreturn(value = "uniformBlockName", maxLength = "bufSize") + void glGetActiveUniformBlockName2(@GLuint int program, @GLuint int uniformBlockIndex, @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(uniformBlockName_length)") IntBuffer length, + @OutParameter @GLchar ByteBuffer uniformBlockName); + + @Reuse("GL30") + void glBindBufferRange(@GLenum int target, @GLuint int index, @GLuint int buffer, @GLintptr long offset, @GLsizeiptr long size); + + @Reuse("GL30") + void glBindBufferBase(@GLenum int target, @GLuint int index, @GLuint int buffer); + + @Reuse("GL30") + @StripPostfix(value = "data", extension = "") + void glGetIntegeri_v(@GLenum int value, @GLuint int index, @OutParameter @Check("4") IntBuffer data); + + @Reuse("GL30") + @Alternate("glGetIntegeri_v") + @GLreturn("data") + @StripPostfix("data") + void glGetIntegeri_v2(@GLenum int value, @GLuint int index, @OutParameter IntBuffer data); + + @Reuse("GL31") + void glUniformBlockBinding(@GLuint int program, @GLuint int uniformBlockIndex, @GLuint int uniformBlockBinding); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_array_bgra.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_array_bgra.java new file mode 100644 index 0000000..bcc3e07 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_array_bgra.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_vertex_array_bgra { + + /** + * Accepted by the <size> parameter of ColorPointer, + * SecondaryColorPointer, and VertexAttribPointer: + */ + int GL_BGRA = 0x80E1; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_array_object.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_array_object.java new file mode 100644 index 0000000..d749340 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_array_object.java @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.GLreturn; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.IntBuffer; + +public interface ARB_vertex_array_object { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_VERTEX_ARRAY_BINDING = 0x85B5; + + @Reuse("GL30") + void glBindVertexArray(@GLuint int array); + + @Reuse("GL30") + void glDeleteVertexArrays(@AutoSize("arrays") @GLsizei int n, @Const @GLuint IntBuffer arrays); + + @Reuse("GL30") + @Alternate("glDeleteVertexArrays") + void glDeleteVertexArrays(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(caps, array)", keepParam = true) int array); + + @Reuse("GL30") + void glGenVertexArrays(@AutoSize("arrays") @GLsizei int n, @OutParameter @GLuint IntBuffer arrays); + + @Reuse("GL30") + @Alternate("glGenVertexArrays") + @GLreturn("arrays") + void glGenVertexArrays2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer arrays); + + @Reuse("GL30") + boolean glIsVertexArray(@GLuint int array); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_attrib_64bit.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_attrib_64bit.java new file mode 100644 index 0000000..83c879a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_attrib_64bit.java @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.Buffer; +import java.nio.DoubleBuffer; + +@Dependent +@Extension(postfix = "") +public interface ARB_vertex_attrib_64bit { + + /** Returned in the <type> parameter of GetActiveAttrib: */ + int GL_DOUBLE_VEC2 = 0x8FFC; + int GL_DOUBLE_VEC3 = 0x8FFD; + int GL_DOUBLE_VEC4 = 0x8FFE; + int GL_DOUBLE_MAT2 = 0x8F46; + int GL_DOUBLE_MAT3 = 0x8F47; + int GL_DOUBLE_MAT4 = 0x8F48; + int GL_DOUBLE_MAT2x3 = 0x8F49; + int GL_DOUBLE_MAT2x4 = 0x8F4A; + int GL_DOUBLE_MAT3x2 = 0x8F4B; + int GL_DOUBLE_MAT3x4 = 0x8F4C; + int GL_DOUBLE_MAT4x2 = 0x8F4D; + int GL_DOUBLE_MAT4x3 = 0x8F4E; + + @Reuse("GL41") + void glVertexAttribL1d(@GLuint int index, double x); + + @Reuse("GL41") + void glVertexAttribL2d(@GLuint int index, double x, double y); + + @Reuse("GL41") + void glVertexAttribL3d(@GLuint int index, double x, double y, double z); + + @Reuse("GL41") + void glVertexAttribL4d(@GLuint int index, double x, double y, double z, double w); + + @Reuse("GL41") + @StripPostfix("v") + void glVertexAttribL1dv(@GLuint int index, @Const @Check("1") DoubleBuffer v); + + @Reuse("GL41") + @StripPostfix("v") + void glVertexAttribL2dv(@GLuint int index, @Const @Check("2") DoubleBuffer v); + + @Reuse("GL41") + @StripPostfix("v") + void glVertexAttribL3dv(@GLuint int index, @Const @Check("3") DoubleBuffer v); + + @Reuse("GL41") + @StripPostfix("v") + void glVertexAttribL4dv(@GLuint int index, @Const @Check("4") DoubleBuffer v); + + @Reuse("GL41") + void glVertexAttribLPointer(@GLuint int index, int size, @Constant("GL11.GL_DOUBLE") @GLenum int type, @GLsizei int stride, + @CachedReference(index = "index", name = "glVertexAttribPointer_buffer") + @BufferObject(BufferKind.ArrayVBO) + @Check @Const @GLdouble Buffer pointer); + + @Reuse("GL41") + @StripPostfix("params") + void glGetVertexAttribLdv(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") DoubleBuffer params); + + @Dependent("GL_EXT_direct_state_access") + void glVertexArrayVertexAttribLOffsetEXT(@GLuint int vaobj, @GLuint int buffer, @GLuint int index, int size, @GLenum int type, @GLsizei int stride, @GLintptr long offset); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_attrib_binding.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_attrib_binding.java new file mode 100644 index 0000000..76d2fa3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_attrib_binding.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.Reuse; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLintptr; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface ARB_vertex_attrib_binding { + + /** Accepted by the <pname> parameter of GetVertexAttrib*v: */ + int GL_VERTEX_ATTRIB_BINDING = 0x82D4, + GL_VERTEX_ATTRIB_RELATIVE_OFFSET = 0x82D5; + + /** + * Accepted by the <target> parameter of GetBooleani_v, GetIntegeri_v, + * GetFloati_v, GetDoublei_v, and GetInteger64i_v: + */ + int GL_VERTEX_BINDING_DIVISOR = 0x82D6, + GL_VERTEX_BINDING_OFFSET = 0x82D7, + GL_VERTEX_BINDING_STRIDE = 0x82D8; + + /** Accepted by the <pname> parameter of GetIntegerv, ... */ + int GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET = 0x82D9, + GL_MAX_VERTEX_ATTRIB_BINDINGS = 0x82DA; + + @Reuse("GL43") + void glBindVertexBuffer(@GLuint int bindingindex, @GLuint int buffer, @GLintptr long offset, + @GLsizei int stride); + + @Reuse("GL43") + void glVertexAttribFormat(@GLuint int attribindex, int size, @GLenum int type, + boolean normalized, @GLuint int relativeoffset); + + @Reuse("GL43") + void glVertexAttribIFormat(@GLuint int attribindex, int size, @GLenum int type, + @GLuint int relativeoffset); + + @Reuse("GL43") + void glVertexAttribLFormat(@GLuint int attribindex, int size, @GLenum int type, + @GLuint int relativeoffset); + + @Reuse("GL43") + void glVertexAttribBinding(@GLuint int attribindex, @GLuint int bindingindex); + + @Reuse("GL43") + void glVertexBindingDivisor(@GLuint int bindingindex, @GLuint int divisor); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_blend.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_blend.java new file mode 100644 index 0000000..6ef128a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_blend.java @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.*; + +public interface ARB_vertex_blend { + + int GL_MAX_VERTEX_UNITS_ARB = 0x86A4; + int GL_ACTIVE_VERTEX_UNITS_ARB = 0x86A5; + int GL_WEIGHT_SUM_UNITY_ARB = 0x86A6; + int GL_VERTEX_BLEND_ARB = 0x86A7; + int GL_CURRENT_WEIGHT_ARB = 0x86A8; + int GL_WEIGHT_ARRAY_TYPE_ARB = 0x86A9; + int GL_WEIGHT_ARRAY_STRIDE_ARB = 0x86AA; + int GL_WEIGHT_ARRAY_SIZE_ARB = 0x86AB; + int GL_WEIGHT_ARRAY_POINTER_ARB = 0x86AC; + int GL_WEIGHT_ARRAY_ARB = 0x86AD; + int GL_MODELVIEW0_ARB = 0x1700; + int GL_MODELVIEW1_ARB = 0x850a; + int GL_MODELVIEW2_ARB = 0x8722; + int GL_MODELVIEW3_ARB = 0x8723; + int GL_MODELVIEW4_ARB = 0x8724; + int GL_MODELVIEW5_ARB = 0x8725; + int GL_MODELVIEW6_ARB = 0x8726; + int GL_MODELVIEW7_ARB = 0x8727; + int GL_MODELVIEW8_ARB = 0x8728; + int GL_MODELVIEW9_ARB = 0x8729; + int GL_MODELVIEW10_ARB = 0x872A; + int GL_MODELVIEW11_ARB = 0x872B; + int GL_MODELVIEW12_ARB = 0x872C; + int GL_MODELVIEW13_ARB = 0x872D; + int GL_MODELVIEW14_ARB = 0x872E; + int GL_MODELVIEW15_ARB = 0x872F; + int GL_MODELVIEW16_ARB = 0x8730; + int GL_MODELVIEW17_ARB = 0x8731; + int GL_MODELVIEW18_ARB = 0x8732; + int GL_MODELVIEW19_ARB = 0x8733; + int GL_MODELVIEW20_ARB = 0x8734; + int GL_MODELVIEW21_ARB = 0x8735; + int GL_MODELVIEW22_ARB = 0x8736; + int GL_MODELVIEW23_ARB = 0x8737; + int GL_MODELVIEW24_ARB = 0x8738; + int GL_MODELVIEW25_ARB = 0x8739; + int GL_MODELVIEW26_ARB = 0x873A; + int GL_MODELVIEW27_ARB = 0x873B; + int GL_MODELVIEW28_ARB = 0x873C; + int GL_MODELVIEW29_ARB = 0x873D; + int GL_MODELVIEW30_ARB = 0x873E; + int GL_MODELVIEW31_ARB = 0x873F; + + @StripPostfix("pWeights") + void glWeightbvARB(@AutoSize("pWeights") int size, ByteBuffer pWeights); + + @StripPostfix("pWeights") + void glWeightsvARB(@AutoSize("pWeights") int size, ShortBuffer pWeights); + + @StripPostfix("pWeights") + void glWeightivARB(@AutoSize("pWeights") int size, IntBuffer pWeights); + + @StripPostfix("pWeights") + void glWeightfvARB(@AutoSize("pWeights") int size, FloatBuffer pWeights); + + @StripPostfix("pWeights") + void glWeightdvARB(@AutoSize("pWeights") int size, DoubleBuffer pWeights); + + @StripPostfix("pWeights") + void glWeightubvARB(@AutoSize("pWeights") int size, @GLubyte ByteBuffer pWeights); + + @StripPostfix("pWeights") + void glWeightusvARB(@AutoSize("pWeights") int size, @GLushort ShortBuffer pWeights); + + @StripPostfix("pWeights") + void glWeightuivARB(@AutoSize("pWeights") int size, @GLuint IntBuffer pWeights); + + void glWeightPointerARB(int size, @AutoType("pPointer") @GLenum int type, @GLsizei int stride, + @CachedReference + @BufferObject(BufferKind.ArrayVBO) + @Check + @Const + @GLbyte + @GLubyte + @GLshort + @GLushort + @GLint + @GLuint + @GLfloat + @GLdouble Buffer pPointer); + + void glVertexBlendARB(int count); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_buffer_object.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_buffer_object.java new file mode 100644 index 0000000..913c8bd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_buffer_object.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_vertex_buffer_object extends ARB_buffer_object { + + /** + * Accepted by the <target> parameters of BindBufferARB, BufferDataARB, + * BufferSubDataARB, MapBufferARB, UnmapBufferARB, + * GetBufferSubDataARB, GetBufferParameterivARB, and + * GetBufferPointervARB: + */ + int GL_ARRAY_BUFFER_ARB = 0x8892; + int GL_ELEMENT_ARRAY_BUFFER_ARB = 0x8893; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_ARRAY_BUFFER_BINDING_ARB = 0x8894; + int GL_ELEMENT_ARRAY_BUFFER_BINDING_ARB = 0x8895; + int GL_VERTEX_ARRAY_BUFFER_BINDING_ARB = 0x8896; + int GL_NORMAL_ARRAY_BUFFER_BINDING_ARB = 0x8897; + int GL_COLOR_ARRAY_BUFFER_BINDING_ARB = 0x8898; + int GL_INDEX_ARRAY_BUFFER_BINDING_ARB = 0x8899; + int GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING_ARB = 0x889A; + int GL_EDGE_FLAG_ARRAY_BUFFER_BINDING_ARB = 0x889B; + int GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING_ARB = 0x889C; + int GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING_ARB = 0x889D; + int GL_WEIGHT_ARRAY_BUFFER_BINDING_ARB = 0x889E; + + /** + * Accepted by the <pname> parameter of GetVertexAttribivARB: + */ + int GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB = 0x889F; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_program.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_program.java new file mode 100644 index 0000000..3e6c679 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_program.java @@ -0,0 +1,171 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.*; + +public interface ARB_vertex_program extends ARB_program { + + /** + * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, by the + * <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev, + * and by the <target> parameter of ProgramStringARB, BindProgramARB, + * ProgramEnvParameter4[df][v]ARB, ProgramLocalParameter4[df][v]ARB, + * GetProgramEnvParameter[df]vARB, GetProgramLocalParameter[df]vARB, + * GetProgramivARB, and GetProgramStringARB. + */ + int GL_VERTEX_PROGRAM_ARB = 0x8620; + + /** + * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, and by + * the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev: + */ + int GL_VERTEX_PROGRAM_POINT_SIZE_ARB = 0x8642; + int GL_VERTEX_PROGRAM_TWO_SIDE_ARB = 0x8643; + int GL_COLOR_SUM_ARB = 0x8458; + + /** Accepted by the <pname> parameter of GetVertexAttrib[dfi]vARB: */ + int GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB = 0x8622; + int GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB = 0x8623; + int GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB = 0x8624; + int GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB = 0x8625; + int GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB = 0x886A; + int GL_CURRENT_VERTEX_ATTRIB_ARB = 0x8626; + + /** Accepted by the <pname> parameter of GetVertexAttribPointervARB: */ + int GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB = 0x8645; + + /** Accepted by the <pname> parameter of GetProgramivARB: */ + int GL_PROGRAM_ADDRESS_REGISTERS_ARB = 0x88B0; + int GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB = 0x88B1; + int GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = 0x88B2; + int GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB = 0x88B3; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_MAX_VERTEX_ATTRIBS_ARB = 0x8869; + + @Reuse("ARBVertexShader") + @NoErrorCheck + void glVertexAttrib1sARB(@GLuint int index, short x); + + @Reuse("ARBVertexShader") + @NoErrorCheck + void glVertexAttrib1fARB(@GLuint int index, float x); + + @Reuse("ARBVertexShader") + @NoErrorCheck + void glVertexAttrib1dARB(@GLuint int index, double x); + + @Reuse("ARBVertexShader") + @NoErrorCheck + void glVertexAttrib2sARB(@GLuint int index, short x, short y); + + @Reuse("ARBVertexShader") + @NoErrorCheck + void glVertexAttrib2fARB(@GLuint int index, float x, float y); + + @Reuse("ARBVertexShader") + @NoErrorCheck + void glVertexAttrib2dARB(@GLuint int index, double x, double y); + + @Reuse("ARBVertexShader") + @NoErrorCheck + void glVertexAttrib3sARB(@GLuint int index, short x, short y, short z); + + @Reuse("ARBVertexShader") + @NoErrorCheck + void glVertexAttrib3fARB(@GLuint int index, float x, float y, float z); + + @Reuse("ARBVertexShader") + @NoErrorCheck + void glVertexAttrib3dARB(@GLuint int index, double x, double y, double z); + + @Reuse("ARBVertexShader") + @NoErrorCheck + void glVertexAttrib4sARB(@GLuint int index, short x, short y, short z, short w); + + @Reuse("ARBVertexShader") + @NoErrorCheck + void glVertexAttrib4fARB(@GLuint int index, float x, float y, float z, float w); + + @Reuse("ARBVertexShader") + @NoErrorCheck + void glVertexAttrib4dARB(@GLuint int index, double x, double y, double z, double w); + + @Reuse("ARBVertexShader") + @NoErrorCheck + void glVertexAttrib4NubARB(@GLuint int index, @GLubyte byte x, @GLubyte byte y, @GLubyte byte z, @GLubyte byte w); + + @Reuse("ARBVertexShader") + void glVertexAttribPointerARB(@GLuint int index, int size, @AutoType("buffer") @GLenum int type, boolean normalized, @GLsizei int stride, + @CachedReference(index = "index", name = "glVertexAttribPointer_buffer") + @BufferObject(BufferKind.ArrayVBO) + @Check + @Const + @GLbyte + @GLubyte + @GLshort + @GLushort + @GLint + @GLuint + @GLfloat + @GLdouble Buffer buffer); + + @Reuse("ARBVertexShader") + void glEnableVertexAttribArrayARB(@GLuint int index); + + @Reuse("ARBVertexShader") + void glDisableVertexAttribArrayARB(@GLuint int index); + + @Reuse("ARBVertexShader") + @StripPostfix("params") + void glGetVertexAttribfvARB(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params); + + @Reuse("ARBVertexShader") + @StripPostfix("params") + void glGetVertexAttribdvARB(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") DoubleBuffer params); + + @Reuse("ARBVertexShader") + @StripPostfix("params") + void glGetVertexAttribivARB(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + @Reuse("ARBVertexShader") + @StripPostfix("result") + void glGetVertexAttribPointervARB(@GLuint int index, @GLenum int pname, @Result @GLvoid ByteBuffer result); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_shader.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_shader.java new file mode 100644 index 0000000..65645a2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_shader.java @@ -0,0 +1,216 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.*; + +public interface ARB_vertex_shader { + + /** + * Accepted by the <shaderType> argument of CreateShaderObjectARB and + * returned by the <params> parameter of GetObjectParameter{if}vARB: + */ + int GL_VERTEX_SHADER_ARB = 0x8B31; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB = 0x8B4A; + int GL_MAX_VARYING_FLOATS_ARB = 0x8B4B; + int GL_MAX_VERTEX_ATTRIBS_ARB = 0x8869; + int GL_MAX_TEXTURE_IMAGE_UNITS_ARB = 0x8872; + int GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB = 0x8B4C; + int GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB = 0x8B4D; + int GL_MAX_TEXTURE_COORDS_ARB = 0x8871; + + /** + * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, and + * by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev: + */ + int GL_VERTEX_PROGRAM_POINT_SIZE_ARB = 0x8642; + int GL_VERTEX_PROGRAM_TWO_SIDE_ARB = 0x8643; + + /** Accepted by the <pname> parameter GetObjectParameter{if}vARB: */ + int GL_OBJECT_ACTIVE_ATTRIBUTES_ARB = 0x8B89; + int GL_OBJECT_ACTIVE_ATTRIBUTE_MAX_LENGTH_ARB = 0x8B8A; + + /** Accepted by the <pname> parameter of GetVertexAttrib{dfi}vARB: */ + int GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB = 0x8622; + int GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB = 0x8623; + int GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB = 0x8624; + int GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB = 0x8625; + int GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB = 0x886A; + int GL_CURRENT_VERTEX_ATTRIB_ARB = 0x8626; + + /** Accepted by the <pname> parameter of GetVertexAttribPointervARB: */ + int GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB = 0x8645; + + /** Returned by the <type> parameter of GetActiveAttribARB: */ + int GL_FLOAT_VEC2_ARB = 0x8B50; + int GL_FLOAT_VEC3_ARB = 0x8B51; + int GL_FLOAT_VEC4_ARB = 0x8B52; + int GL_FLOAT_MAT2_ARB = 0x8B5A; + int GL_FLOAT_MAT3_ARB = 0x8B5B; + int GL_FLOAT_MAT4_ARB = 0x8B5C; + + @NoErrorCheck + void glVertexAttrib1sARB(@GLuint int index, short v0); + + @NoErrorCheck + void glVertexAttrib1fARB(@GLuint int index, float v0); + + @NoErrorCheck + void glVertexAttrib1dARB(@GLuint int index, double v0); + + @NoErrorCheck + void glVertexAttrib2sARB(@GLuint int index, short v0, short v1); + + @NoErrorCheck + void glVertexAttrib2fARB(@GLuint int index, float v0, float v1); + + @NoErrorCheck + void glVertexAttrib2dARB(@GLuint int index, double v0, double v1); + + @NoErrorCheck + void glVertexAttrib3sARB(@GLuint int index, short v0, short v1, short v2); + + @NoErrorCheck + void glVertexAttrib3fARB(@GLuint int index, float v0, float v1, float v2); + + @NoErrorCheck + void glVertexAttrib3dARB(@GLuint int index, double v0, double v1, double v2); + + @NoErrorCheck + void glVertexAttrib4sARB(@GLuint int index, short v0, short v1, short v2, short v3); + + @NoErrorCheck + void glVertexAttrib4fARB(@GLuint int index, float v0, float v1, float v2, float v3); + + @NoErrorCheck + void glVertexAttrib4dARB(@GLuint int index, double v0, double v1, double v2, double v3); + + @NoErrorCheck + void glVertexAttrib4NubARB(@GLuint int index, @GLubyte byte x, @GLubyte byte y, @GLubyte byte z, @GLubyte byte w); + + void glVertexAttribPointerARB(@GLuint int index, int size, @AutoType("buffer") @GLenum int type, boolean normalized, @GLsizei int stride, + @CachedReference(index = "index", name = "glVertexAttribPointer_buffer") + @BufferObject(BufferKind.ArrayVBO) + @Check + @Const + @GLbyte + @GLubyte + @GLshort + @GLushort + @GLint + @GLuint + @GLfloat + @GLdouble Buffer buffer); + + @Alternate("glVertexAttribPointerARB") + void glVertexAttribPointerARB(@GLuint int index, int size, @GLenum int type, boolean normalized, @GLsizei int stride, + @CachedReference(index = "index", name = "glVertexAttribPointer_buffer") + @BufferObject(BufferKind.ArrayVBO) + @Check + @Const ByteBuffer buffer); + + void glEnableVertexAttribArrayARB(@GLuint int index); + + void glDisableVertexAttribArrayARB(@GLuint int index); + + void glBindAttribLocationARB(@GLhandleARB int programObj, @GLuint int index, @NullTerminated @Const @GLcharARB ByteBuffer name); + + @Alternate("glBindAttribLocationARB") + void glBindAttribLocationARB(@GLhandleARB int programObj, @GLuint int index, @NullTerminated CharSequence name); + + void glGetActiveAttribARB(@GLhandleARB int programObj, @GLuint int index, @AutoSize("name") @GLsizei int maxLength, + @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length, + @OutParameter @Check("1") IntBuffer size, + @OutParameter @GLenum @Check("1") IntBuffer type, + @OutParameter @GLcharARB ByteBuffer name); + + /** Overloads glGetActiveAttribARB. This version returns both size and type in the sizeType buffer (at .position() and .position() + 1). */ + @Alternate("glGetActiveAttribARB") + @GLreturn(value = "name", maxLength = "maxLength") + void glGetActiveAttribARB2(@GLhandleARB int programObj, @GLuint int index, @GLsizei int maxLength, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(name_length)") IntBuffer length, + @OutParameter @Check("2") IntBuffer sizeType, + @OutParameter @GLenum @Constant("MemoryUtil.getAddress(sizeType, sizeType.position() + 1)") IntBuffer type, + @OutParameter @GLcharARB ByteBuffer name); + + /** Overloads glGetActiveAttribARB. This version returns only the attrib name. */ + @Alternate(value = "glGetActiveAttribARB", javaAlt = true) + @GLreturn(value = "name", maxLength = "maxLength") + void glGetActiveAttribARB(@GLhandleARB int programObj, @GLuint int index, @GLsizei int maxLength, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(name_length), MemoryUtil.getAddress0(APIUtil.getBufferInt(caps)), MemoryUtil.getAddress(APIUtil.getBufferInt(caps), 1)") IntBuffer length, + @OutParameter @GLcharARB ByteBuffer name); + + /** Overloads glGetActiveAttribARB. This version returns only the attrib size. */ + @Alternate(value = "glGetActiveAttribARB", javaAlt = true) + @GLreturn(value = "size") + void glGetActiveAttribSizeARB(@GLhandleARB int programObj, @GLuint int index, @Constant("0") @GLsizei int maxLength, + @OutParameter @GLsizei @Constant("0L") IntBuffer length, + @OutParameter IntBuffer size, + @OutParameter @GLenum @Constant("MemoryUtil.getAddress(size, 1)") IntBuffer type, // Reuse size buffer and ignore + @OutParameter @GLcharARB @Constant("APIUtil.getBufferByte0(caps)") ByteBuffer name); + + /** Overloads glGetActiveAttribARB. This version returns only the attrib type. */ + @Alternate(value = "glGetActiveAttribARB", javaAlt = true) + @GLreturn(value = "type") + void glGetActiveAttribTypeARB(@GLhandleARB int programObj, @GLuint int index, @Constant("0") @GLsizei int maxLength, + @OutParameter @GLsizei @Constant("0L") IntBuffer length, + @OutParameter @Constant("MemoryUtil.getAddress(type, 1)") IntBuffer size, // Reuse type buffer and ignore + @OutParameter @GLenum IntBuffer type, + @OutParameter @GLcharARB @Constant("APIUtil.getBufferByte0(caps)") ByteBuffer name); + + int glGetAttribLocationARB(@GLhandleARB int programObj, @NullTerminated @Const @GLcharARB ByteBuffer name); + + @Alternate("glGetAttribLocationARB") + int glGetAttribLocationARB(@GLhandleARB int programObj, @NullTerminated CharSequence name); + + @StripPostfix("params") + void glGetVertexAttribfvARB(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params); + + @StripPostfix("params") + void glGetVertexAttribdvARB(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") DoubleBuffer params); + + @StripPostfix("params") + void glGetVertexAttribivARB(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + @StripPostfix("result") + void glGetVertexAttribPointervARB(@GLuint int index, @GLenum int pname, @Result @GLvoid ByteBuffer result); + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_type_10f_11f_11f_rev.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_type_10f_11f_11f_rev.java new file mode 100644 index 0000000..eb5e10f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_type_10f_11f_11f_rev.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2013 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ARB_vertex_type_10f_11f_11f_rev { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_type_2_10_10_10_rev.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_type_2_10_10_10_rev.java new file mode 100644 index 0000000..15fe8bc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_vertex_type_2_10_10_10_rev.java @@ -0,0 +1,223 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.IntBuffer; + +@Extension(postfix = "", className = "ARBVertexType2_10_10_10_REV") +public interface ARB_vertex_type_2_10_10_10_rev { + + /** + * Accepted by the <type> parameter of VertexAttribPointer, VertexPointer, + * NormalPointer, ColorPointer, SecondaryColorPointer, TexCoordPointer, + * VertexAttribP{1234}ui, VertexP*, TexCoordP*, MultiTexCoordP*, NormalP3ui, + * ColorP*, SecondaryColorP* and VertexAttribP* + */ + int GL_UNSIGNED_INT_2_10_10_10_REV = GL12.GL_UNSIGNED_INT_2_10_10_10_REV; + int GL_INT_2_10_10_10_REV = 0x8D9F; + + @Reuse("GL33") + @NoErrorCheck + void glVertexP2ui(@GLenum int type, @GLuint int value); + + @Reuse("GL33") + @NoErrorCheck + void glVertexP3ui(@GLenum int type, @GLuint int value); + + @Reuse("GL33") + @NoErrorCheck + void glVertexP4ui(@GLenum int type, @GLuint int value); + + @Reuse("GL33") + @NoErrorCheck + @StripPostfix("value") + void glVertexP2uiv(@GLenum int type, @Check("2") @Const @GLuint IntBuffer value); + + @Reuse("GL33") + @NoErrorCheck + @StripPostfix("value") + void glVertexP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer value); + + @Reuse("GL33") + @NoErrorCheck + @StripPostfix("value") + void glVertexP4uiv(@GLenum int type, @Check("4") @Const @GLuint IntBuffer value); + + @Reuse("GL33") + @NoErrorCheck + void glTexCoordP1ui(@GLenum int type, @GLuint int coords); + + @Reuse("GL33") + @NoErrorCheck + void glTexCoordP2ui(@GLenum int type, @GLuint int coords); + + @Reuse("GL33") + @NoErrorCheck + void glTexCoordP3ui(@GLenum int type, @GLuint int coords); + + @Reuse("GL33") + @NoErrorCheck + void glTexCoordP4ui(@GLenum int type, @GLuint int coords); + + @Reuse("GL33") + @NoErrorCheck + @StripPostfix("coords") + void glTexCoordP1uiv(@GLenum int type, @Check("1") @Const @GLuint IntBuffer coords); + + @Reuse("GL33") + @NoErrorCheck + @StripPostfix("coords") + void glTexCoordP2uiv(@GLenum int type, @Check("2") @Const @GLuint IntBuffer coords); + + @Reuse("GL33") + @NoErrorCheck + @StripPostfix("coords") + void glTexCoordP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer coords); + + @Reuse("GL33") + @NoErrorCheck + @StripPostfix("coords") + void glTexCoordP4uiv(@GLenum int type, @Check("4") @Const @GLuint IntBuffer coords); + + @Reuse("GL33") + @NoErrorCheck + void glMultiTexCoordP1ui(@GLenum int texture, @GLenum int type, @GLuint int coords); + + @Reuse("GL33") + @NoErrorCheck + void glMultiTexCoordP2ui(@GLenum int texture, @GLenum int type, @GLuint int coords); + + @Reuse("GL33") + @NoErrorCheck + void glMultiTexCoordP3ui(@GLenum int texture, @GLenum int type, @GLuint int coords); + + @Reuse("GL33") + @NoErrorCheck + void glMultiTexCoordP4ui(@GLenum int texture, @GLenum int type, @GLuint int coords); + + @Reuse("GL33") + @NoErrorCheck + @StripPostfix("coords") + void glMultiTexCoordP1uiv(@GLenum int texture, @GLenum int type, @Check("1") @Const @GLuint IntBuffer coords); + + @Reuse("GL33") + @NoErrorCheck + @StripPostfix("coords") + void glMultiTexCoordP2uiv(@GLenum int texture, @GLenum int type, @Check("2") @Const @GLuint IntBuffer coords); + + @Reuse("GL33") + @NoErrorCheck + @StripPostfix("coords") + void glMultiTexCoordP3uiv(@GLenum int texture, @GLenum int type, @Check("3") @Const @GLuint IntBuffer coords); + + @Reuse("GL33") + @NoErrorCheck + @StripPostfix("coords") + void glMultiTexCoordP4uiv(@GLenum int texture, @GLenum int type, @Check("4") @Const @GLuint IntBuffer coords); + + @Reuse("GL33") + @NoErrorCheck + void glNormalP3ui(@GLenum int type, @GLuint int coords); + + @Reuse("GL33") + @NoErrorCheck + @StripPostfix("coords") + void glNormalP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer coords); + + @Reuse("GL33") + @NoErrorCheck + void glColorP3ui(@GLenum int type, @GLuint int color); + + @Reuse("GL33") + @NoErrorCheck + void glColorP4ui(@GLenum int type, @GLuint int color); + + @Reuse("GL33") + @NoErrorCheck + @StripPostfix("color") + void glColorP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer color); + + @Reuse("GL33") + @NoErrorCheck + @StripPostfix("color") + void glColorP4uiv(@GLenum int type, @Check("4") @Const @GLuint IntBuffer color); + + @Reuse("GL33") + @NoErrorCheck + void glSecondaryColorP3ui(@GLenum int type, @GLuint int color); + + @Reuse("GL33") + @NoErrorCheck + @StripPostfix("color") + void glSecondaryColorP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer color); + + @Reuse("GL33") + @NoErrorCheck + void glVertexAttribP1ui(@GLuint int index, @GLenum int type, boolean normalized, @GLuint int value); + + @Reuse("GL33") + @NoErrorCheck + void glVertexAttribP2ui(@GLuint int index, @GLenum int type, boolean normalized, @GLuint int value); + + @Reuse("GL33") + @NoErrorCheck + void glVertexAttribP3ui(@GLuint int index, @GLenum int type, boolean normalized, @GLuint int value); + + @Reuse("GL33") + @NoErrorCheck + void glVertexAttribP4ui(@GLuint int index, @GLenum int type, boolean normalized, @GLuint int value); + + @Reuse("GL33") + @NoErrorCheck + @StripPostfix("value") + void glVertexAttribP1uiv(@GLuint int index, @GLenum int type, boolean normalized, @Check("1") @Const @GLuint IntBuffer value); + + @Reuse("GL33") + @NoErrorCheck + @StripPostfix("value") + void glVertexAttribP2uiv(@GLuint int index, @GLenum int type, boolean normalized, @Check("2") @Const @GLuint IntBuffer value); + + @Reuse("GL33") + @NoErrorCheck + @StripPostfix("value") + void glVertexAttribP3uiv(@GLuint int index, @GLenum int type, boolean normalized, @Check("3") @Const @GLuint IntBuffer value); + + @Reuse("GL33") + @NoErrorCheck + @StripPostfix("value") + void glVertexAttribP4uiv(@GLuint int index, @GLenum int type, boolean normalized, @Check("4") @Const @GLuint IntBuffer value); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_viewport_array.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_viewport_array.java new file mode 100644 index 0000000..8ae09f5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_viewport_array.java @@ -0,0 +1,144 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.DoubleBuffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; + +@Extension(postfix = "") +public interface ARB_viewport_array { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * GetDoublev and GetInteger64v: + */ + int GL_MAX_VIEWPORTS = 0x825B, + GL_VIEWPORT_SUBPIXEL_BITS = 0x825C, + GL_VIEWPORT_BOUNDS_RANGE = 0x825D, + GL_LAYER_PROVOKING_VERTEX = 0x825E, + GL_VIEWPORT_INDEX_PROVOKING_VERTEX = 0x825F; + + /** Accepted by the <pname> parameter of GetIntegeri_v: */ + int GL_SCISSOR_BOX = 0x0C10; + + /** Accepted by the <pname> parameter of GetFloati_v: */ + int GL_VIEWPORT = 0x0BA2; + + /** Accepted by the <pname> parameter of GetDoublei_v: */ + int GL_DEPTH_RANGE = 0x0B70; + + /** Accepted by the <pname> parameter of Enablei, Disablei, and IsEnabledi: */ + int GL_SCISSOR_TEST = 0x0C11; + + /** + * Returned in the <data> parameter from a Get query with a <pname> of + * LAYER_PROVOKING_VERTEX or VIEWPORT_INDEX_PROVOKING_VERTEX: + */ + int GL_FIRST_VERTEX_CONVENTION = 0x8E4D, + GL_LAST_VERTEX_CONVENTION = 0x8E4E, + GL_PROVOKING_VERTEX = 0x8E4F, + GL_UNDEFINED_VERTEX = 0x8260; + + @Reuse("GL41") + @StripPostfix("v") + void glViewportArrayv(@GLuint int first, @AutoSize(value = "v", expression = " >> 2") @GLsizei int count, @Const FloatBuffer v); + + @Reuse("GL41") + void glViewportIndexedf(@GLuint int index, float x, float y, float w, float h); + + @Reuse("GL41") + @StripPostfix("v") + void glViewportIndexedfv(@GLuint int index, @Check("4") @Const FloatBuffer v); + + @Reuse("GL41") + @StripPostfix("v") + void glScissorArrayv(@GLuint int first, @AutoSize(value = "v", expression = " >> 2") @GLsizei int count, @Const IntBuffer v); + + @Reuse("GL41") + void glScissorIndexed(@GLuint int index, int left, int bottom, @GLsizei int width, @GLsizei int height); + + @Reuse("GL41") + @StripPostfix("v") + void glScissorIndexedv(@GLuint int index, @Check("4") @Const IntBuffer v); + + @Reuse("GL41") + @StripPostfix("v") + void glDepthRangeArrayv(@GLuint int first, @AutoSize(value = "v", expression = " >> 1") @GLsizei int count, @Const @GLclampd DoubleBuffer v); + + @Reuse("GL41") + void glDepthRangeIndexed(@GLuint int index, @GLclampd double n, @GLclampd double f); + + @Reuse("GL41") + @StripPostfix("data") + void glGetFloati_v(@GLenum int target, @GLuint int index, @Check @OutParameter FloatBuffer data); + + @Reuse("GL41") + @Alternate("glGetFloati_v") + @GLreturn("data") + @StripPostfix("data") + void glGetFloati_v2(@GLenum int target, @GLuint int index, @OutParameter FloatBuffer data); + + @Reuse("GL41") + @StripPostfix("data") + void glGetDoublei_v(@GLenum int target, @GLuint int index, @Check @OutParameter DoubleBuffer data); + + @Reuse("GL41") + @Alternate("glGetDoublei_v") + @GLreturn("data") + @StripPostfix("data") + void glGetDoublei_v2(@GLenum int target, @GLuint int index, @OutParameter DoubleBuffer data); + + @Reuse("EXTDrawBuffers2") + @StripPostfix(value = "v", extension = "EXT") + void glGetIntegerIndexedvEXT(@GLenum int target, @GLuint int index, @Check @OutParameter IntBuffer v); + + @Reuse("EXTDrawBuffers2") + @Alternate("glGetIntegerIndexedivEXT") + @GLreturn("v") + @StripPostfix(value = "v", extension = "EXT") + void glGetIntegerIndexedvEXT2(@GLenum int target, @GLuint int index, @OutParameter IntBuffer v); + + @Reuse("EXTDrawBuffers2") + void glEnableIndexedEXT(@GLenum int target, @GLuint int index); + + @Reuse("EXTDrawBuffers2") + void glDisableIndexedEXT(@GLenum int target, @GLuint int index); + + @Reuse("EXTDrawBuffers2") + boolean glIsEnabledIndexedEXT(@GLenum int target, @GLuint int index); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_window_pos.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_window_pos.java new file mode 100644 index 0000000..e8cf8dd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ARB_window_pos.java @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.DeprecatedGL; + +@DeprecatedGL +public interface ARB_window_pos { + + @DeprecatedGL + void glWindowPos2fARB(float x, float y); + + @DeprecatedGL + void glWindowPos2dARB(double x, double y); + + @DeprecatedGL + void glWindowPos2iARB(int x, int y); + + @DeprecatedGL + void glWindowPos2sARB(short x, short y); + + @DeprecatedGL + void glWindowPos3fARB(float x, float y, float z); + + @DeprecatedGL + void glWindowPos3dARB(double x, double y, double z); + + @DeprecatedGL + void glWindowPos3iARB(int x, int y, int z); + + @DeprecatedGL + void glWindowPos3sARB(short x, short y, short z); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_draw_buffers.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_draw_buffers.java new file mode 100644 index 0000000..a64a81a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_draw_buffers.java @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; + +import java.nio.*; + +public interface ATI_draw_buffers { + + /** + * Accepted by the <pname> parameters of GetIntegerv, GetFloatv, + * and GetDoublev: + */ + int GL_MAX_DRAW_BUFFERS_ATI = 0x8824; + int GL_DRAW_BUFFER0_ATI = 0x8825; + int GL_DRAW_BUFFER1_ATI = 0x8826; + int GL_DRAW_BUFFER2_ATI = 0x8827; + int GL_DRAW_BUFFER3_ATI = 0x8828; + int GL_DRAW_BUFFER4_ATI = 0x8829; + int GL_DRAW_BUFFER5_ATI = 0x882A; + int GL_DRAW_BUFFER6_ATI = 0x882B; + int GL_DRAW_BUFFER7_ATI = 0x882C; + int GL_DRAW_BUFFER8_ATI = 0x882D; + int GL_DRAW_BUFFER9_ATI = 0x882E; + int GL_DRAW_BUFFER10_ATI = 0x882F; + int GL_DRAW_BUFFER11_ATI = 0x8830; + int GL_DRAW_BUFFER12_ATI = 0x8831; + int GL_DRAW_BUFFER13_ATI = 0x8832; + int GL_DRAW_BUFFER14_ATI = 0x8833; + int GL_DRAW_BUFFER15_ATI = 0x8834; + + void glDrawBuffersATI(@AutoSize("buffers") @GLsizei int size, @Const @GLenum IntBuffer buffers); + + @Alternate("glDrawBuffersATI") + void glDrawBuffersATI(@Constant("1") @GLsizei int size, @Constant(value = "APIUtil.getInt(caps, buffer)", keepParam = true) int buffer); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_element_array.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_element_array.java new file mode 100644 index 0000000..dbe3076 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_element_array.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.*; + +public interface ATI_element_array { + int GL_ELEMENT_ARRAY_ATI = 0x8768; + int GL_ELEMENT_ARRAY_TYPE_ATI = 0x8769; + int GL_ELEMENT_ARRAY_POINTER_ATI = 0x876A; + + void glElementPointerATI(@AutoType("pPointer") @GLenum int type, + @Check + @Const + @GLubyte + @GLushort + @GLuint Buffer pPointer); + + void glDrawElementArrayATI(@GLenum int mode, @GLsizei int count); + + void glDrawRangeElementArrayATI(@GLenum int mode, @GLuint int start, @GLuint int end, @GLsizei int count); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_envmap_bumpmap.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_envmap_bumpmap.java new file mode 100644 index 0000000..a4c3a35 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_envmap_bumpmap.java @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; + +import java.nio.*; + +public interface ATI_envmap_bumpmap { + int GL_BUMP_ROT_MATRIX_ATI = 0x8775; + int GL_BUMP_ROT_MATRIX_SIZE_ATI = 0x8776; + int GL_BUMP_NUM_TEX_UNITS_ATI = 0x8777; + int GL_BUMP_TEX_UNITS_ATI = 0x8778; + int GL_DUDV_ATI = 0x8779; + int GL_DU8DV8_ATI = 0x877A; + int GL_BUMP_ENVMAP_ATI = 0x877B; + int GL_BUMP_TARGET_ATI = 0x877C; + + @StripPostfix("param") + void glTexBumpParameterfvATI(@GLenum int pname, @Check("4") @Const FloatBuffer param); + + @StripPostfix("param") + void glTexBumpParameterivATI(@GLenum int pname, @Check("4") @Const IntBuffer param); + + @StripPostfix("param") + void glGetTexBumpParameterfvATI(@GLenum int pname, @OutParameter @Check("4") FloatBuffer param); + + @StripPostfix("param") + void glGetTexBumpParameterivATI(@GLenum int pname, @OutParameter @Check("4") IntBuffer param); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_fragment_shader.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_fragment_shader.java new file mode 100644 index 0000000..54a51b3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_fragment_shader.java @@ -0,0 +1,176 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.*; + +public interface ATI_fragment_shader { + + int GL_FRAGMENT_SHADER_ATI = 0x8920; + int GL_REG_0_ATI = 0x8921; + int GL_REG_1_ATI = 0x8922; + int GL_REG_2_ATI = 0x8923; + int GL_REG_3_ATI = 0x8924; + int GL_REG_4_ATI = 0x8925; + int GL_REG_5_ATI = 0x8926; + int GL_REG_6_ATI = 0x8927; + int GL_REG_7_ATI = 0x8928; + int GL_REG_8_ATI = 0x8929; + int GL_REG_9_ATI = 0x892A; + int GL_REG_10_ATI = 0x892B; + int GL_REG_11_ATI = 0x892C; + int GL_REG_12_ATI = 0x892D; + int GL_REG_13_ATI = 0x892E; + int GL_REG_14_ATI = 0x892F; + int GL_REG_15_ATI = 0x8930; + int GL_REG_16_ATI = 0x8931; + int GL_REG_17_ATI = 0x8932; + int GL_REG_18_ATI = 0x8933; + int GL_REG_19_ATI = 0x8934; + int GL_REG_20_ATI = 0x8935; + int GL_REG_21_ATI = 0x8936; + int GL_REG_22_ATI = 0x8937; + int GL_REG_23_ATI = 0x8938; + int GL_REG_24_ATI = 0x8939; + int GL_REG_25_ATI = 0x893A; + int GL_REG_26_ATI = 0x893B; + int GL_REG_27_ATI = 0x893C; + int GL_REG_28_ATI = 0x893D; + int GL_REG_29_ATI = 0x893E; + int GL_REG_30_ATI = 0x893F; + int GL_REG_31_ATI = 0x8940; + int GL_CON_0_ATI = 0x8941; + int GL_CON_1_ATI = 0x8942; + int GL_CON_2_ATI = 0x8943; + int GL_CON_3_ATI = 0x8944; + int GL_CON_4_ATI = 0x8945; + int GL_CON_5_ATI = 0x8946; + int GL_CON_6_ATI = 0x8947; + int GL_CON_7_ATI = 0x8948; + int GL_CON_8_ATI = 0x8949; + int GL_CON_9_ATI = 0x894A; + int GL_CON_10_ATI = 0x894B; + int GL_CON_11_ATI = 0x894C; + int GL_CON_12_ATI = 0x894D; + int GL_CON_13_ATI = 0x894E; + int GL_CON_14_ATI = 0x894F; + int GL_CON_15_ATI = 0x8950; + int GL_CON_16_ATI = 0x8951; + int GL_CON_17_ATI = 0x8952; + int GL_CON_18_ATI = 0x8953; + int GL_CON_19_ATI = 0x8954; + int GL_CON_20_ATI = 0x8955; + int GL_CON_21_ATI = 0x8956; + int GL_CON_22_ATI = 0x8957; + int GL_CON_23_ATI = 0x8958; + int GL_CON_24_ATI = 0x8959; + int GL_CON_25_ATI = 0x895A; + int GL_CON_26_ATI = 0x895B; + int GL_CON_27_ATI = 0x895C; + int GL_CON_28_ATI = 0x895D; + int GL_CON_29_ATI = 0x895E; + int GL_CON_30_ATI = 0x895F; + int GL_CON_31_ATI = 0x8960; + int GL_MOV_ATI = 0x8961; + int GL_ADD_ATI = 0x8963; + int GL_MUL_ATI = 0x8964; + int GL_SUB_ATI = 0x8965; + int GL_DOT3_ATI = 0x8966; + int GL_DOT4_ATI = 0x8967; + int GL_MAD_ATI = 0x8968; + int GL_LERP_ATI = 0x8969; + int GL_CND_ATI = 0x896A; + int GL_CND0_ATI = 0x896B; + int GL_DOT2_ADD_ATI = 0x896C; + int GL_SECONDARY_INTERPOLATOR_ATI = 0x896D; + int GL_NUM_FRAGMENT_REGISTERS_ATI = 0x896E; + int GL_NUM_FRAGMENT_CONSTANTS_ATI = 0x896F; + int GL_NUM_PASSES_ATI = 0x8970; + int GL_NUM_INSTRUCTIONS_PER_PASS_ATI = 0x8971; + int GL_NUM_INSTRUCTIONS_TOTAL_ATI = 0x8972; + int GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI = 0x8973; + int GL_NUM_LOOPBACK_COMPONENTS_ATI = 0x8974; + int GL_COLOR_ALPHA_PAIRING_ATI = 0x8975; + int GL_SWIZZLE_STR_ATI = 0x8976; + int GL_SWIZZLE_STQ_ATI = 0x8977; + int GL_SWIZZLE_STR_DR_ATI = 0x8978; + int GL_SWIZZLE_STQ_DQ_ATI = 0x8979; + int GL_SWIZZLE_STRQ_ATI = 0x897A; + int GL_SWIZZLE_STRQ_DQ_ATI = 0x897B; + int GL_RED_BIT_ATI = 0x00000001; + int GL_GREEN_BIT_ATI = 0x00000002; + int GL_BLUE_BIT_ATI = 0x00000004; + int GL_2X_BIT_ATI = 0x00000001; + int GL_4X_BIT_ATI = 0x00000002; + int GL_8X_BIT_ATI = 0x00000004; + int GL_HALF_BIT_ATI = 0x00000008; + int GL_QUARTER_BIT_ATI = 0x00000010; + int GL_EIGHTH_BIT_ATI = 0x00000020; + int GL_SATURATE_BIT_ATI = 0x00000040; + int GL_COMP_BIT_ATI = 0x00000002; + int GL_NEGATE_BIT_ATI = 0x00000004; + int GL_BIAS_BIT_ATI = 0x00000008; + + @GLuint + int glGenFragmentShadersATI(@GLuint int range); + + void glBindFragmentShaderATI(@GLuint int id); + + void glDeleteFragmentShaderATI(@GLuint int id); + + void glBeginFragmentShaderATI(); + + void glEndFragmentShaderATI(); + + void glPassTexCoordATI(@GLuint int dst, @GLuint int coord, @GLenum int swizzle); + + void glSampleMapATI(@GLuint int dst, @GLuint int interp, @GLenum int swizzle); + + void glColorFragmentOp1ATI(@GLenum int op, @GLuint int dst, @GLuint int dstMask, @GLuint int dstMod, @GLuint int arg1, @GLuint int arg1Rep, @GLuint int arg1Mod); + + void glColorFragmentOp2ATI(@GLenum int op, @GLuint int dst, @GLuint int dstMask, @GLuint int dstMod, @GLuint int arg1, @GLuint int arg1Rep, @GLuint int arg1Mod, @GLuint int arg2, @GLuint int arg2Rep, @GLuint int arg2Mod); + + void glColorFragmentOp3ATI(@GLenum int op, @GLuint int dst, @GLuint int dstMask, @GLuint int dstMod, @GLuint int arg1, @GLuint int arg1Rep, @GLuint int arg1Mod, @GLuint int arg2, @GLuint int arg2Rep, @GLuint int arg2Mod, @GLuint int arg3, @GLuint int arg3Rep, @GLuint int arg3Mod); + + void glAlphaFragmentOp1ATI(@GLenum int op, @GLuint int dst, @GLuint int dstMod, @GLuint int arg1, @GLuint int arg1Rep, @GLuint int arg1Mod); + + void glAlphaFragmentOp2ATI(@GLenum int op, @GLuint int dst, @GLuint int dstMod, @GLuint int arg1, @GLuint int arg1Rep, @GLuint int arg1Mod, @GLuint int arg2, @GLuint int arg2Rep, @GLuint int arg2Mod); + + void glAlphaFragmentOp3ATI(@GLenum int op, @GLuint int dst, @GLuint int dstMod, @GLuint int arg1, @GLuint int arg1Rep, @GLuint int arg1Mod, @GLuint int arg2, @GLuint int arg2Rep, @GLuint int arg2Mod, @GLuint int arg3, @GLuint int arg3Rep, @GLuint int arg3Mod); + + // TODO:is the @Check correct? + void glSetFragmentShaderConstantATI(@GLuint int dst, @Check("4") @Const FloatBuffer pfValue); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_map_object_buffer.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_map_object_buffer.java new file mode 100644 index 0000000..083380c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_map_object_buffer.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLuint; +import org.lwjgl.util.generator.opengl.GLvoid; + +import java.nio.*; + +public interface ATI_map_object_buffer { + + /** + * glMapObjectBufferATI maps an ATI vertex array object to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the vertex array object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapObjectBufferATI like this: + *

+ * ByteBuffer mapped_buffer; mapped_buffer = glMapObjectBufferATI(..., null); ... // Another map on the same buffer mapped_buffer = glMapObjectBufferATI(..., mapped_buffer); + *

+ * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + *

+ * The version of this method without an explicit length argument calls glGetObjectBufferATI internally to + * retrieve the current vertex array object size, which may cause a pipeline flush and reduce application performance. + *

+ * The version of this method with an explicit length argument is a fast alternative to the one without. No GL call + * is made to retrieve the vertex array object size, so the user is responsible for tracking and using the appropriate length.
+ * Security warning: The length argument should match the vertex array object size. Reading from or writing to outside + * the memory region that corresponds to the mapped vertex array object will cause native crashes. + * + * @param length the length of the mapped memory in bytes. + * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. + * + * @return A ByteBuffer representing the mapped buffer memory. + */ + @CachedResult + @GLvoid + @AutoSize("GLChecks.getBufferObjectSizeATI(caps, buffer)") + ByteBuffer glMapObjectBufferATI(@GLuint int buffer); + + void glUnmapObjectBufferATI(@GLuint int buffer); + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_meminfo.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_meminfo.java new file mode 100644 index 0000000..27c8351 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_meminfo.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ATI_meminfo { + + /** Accepted by the <value> parameter of GetIntegerv: */ + int GL_VBO_FREE_MEMORY_ATI = 0x87FB; + int GL_TEXTURE_FREE_MEMORY_ATI = 0x87FC; + int GL_RENDERBUFFER_FREE_MEMORY_ATI = 0x87FD; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_pn_triangles.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_pn_triangles.java new file mode 100644 index 0000000..11d2a98 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_pn_triangles.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLenum; + +public interface ATI_pn_triangles { + int GL_PN_TRIANGLES_ATI = 0x87F0; + int GL_MAX_PN_TRIANGLES_TESSELATION_LEVEL_ATI = 0x87F1; + int GL_PN_TRIANGLES_POINT_MODE_ATI = 0x87F2; + int GL_PN_TRIANGLES_NORMAL_MODE_ATI = 0x87F3; + int GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI = 0x87F4; + int GL_PN_TRIANGLES_POINT_MODE_LINEAR_ATI = 0x87F5; + int GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI = 0x87F6; + int GL_PN_TRIANGLES_NORMAL_MODE_LINEAR_ATI = 0x87F7; + int GL_PN_TRIANGLES_NORMAL_MODE_QUADRATIC_ATI = 0x87F8; + + void glPNTrianglesfATI(@GLenum int pname, float param); + + void glPNTrianglesiATI(@GLenum int pname, int param); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_separate_stencil.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_separate_stencil.java new file mode 100644 index 0000000..21f51ad --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_separate_stencil.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface ATI_separate_stencil { + int GL_STENCIL_BACK_FUNC_ATI = 0x8800; + int GL_STENCIL_BACK_FAIL_ATI = 0x8801; + int GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI = 0x8802; + int GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI = 0x8803; + + void glStencilOpSeparateATI(@GLenum int face, @GLenum int sfail, @GLenum int dpfail, @GLenum int dppass); + + void glStencilFuncSeparateATI(@GLenum int frontfunc, @GLenum int backfunc, int ref, @GLuint int mask); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_shader_texture_lod.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_shader_texture_lod.java new file mode 100644 index 0000000..ee7ac0d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_shader_texture_lod.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ATI_shader_texture_lod { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_text_fragment_shader.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_text_fragment_shader.java new file mode 100644 index 0000000..795cb3d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_text_fragment_shader.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ATI_text_fragment_shader { + + /** + * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev, and by the <target> parameter of ProgramStringARB, + * BindProgramARB, ProgramEnvParameter4{d,dv,f,fv}ARB, + * ProgramLocalParameter4{d,dv,f,fv}ARB, + * GetProgramEnvParameter{dv,fv}ARB, GetProgramLocalParameter{dv,fv}ARB, + * GetProgramivARB, GetProgramfvATI, and GetProgramStringARB. + */ + int GL_TEXT_FRAGMENT_SHADER_ATI = 0x8200; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_texture_compression_3dc.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_texture_compression_3dc.java new file mode 100644 index 0000000..1fe4a40 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_texture_compression_3dc.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; + +@Extension(postfix = "ATI", className = "ATITextureCompression3DC") +public interface ATI_texture_compression_3dc { + int GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI = 0x8837; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_texture_env_combine3.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_texture_env_combine3.java new file mode 100644 index 0000000..e591a3c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_texture_env_combine3.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ATI_texture_env_combine3 { + + /** + * Accepted by the <params> parameter of TexEnvf, TexEnvi, TexEnvfv, + * and TexEnviv when the <pname> parameter value is COMBINE_RGB_ARB + * or COMBINE_ALPHA_ARB + */ + int GL_MODULATE_ADD_ATI = 0x8744; + int GL_MODULATE_SIGNED_ADD_ATI = 0x8745; + int GL_MODULATE_SUBTRACT_ATI = 0x8746; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_texture_float.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_texture_float.java new file mode 100644 index 0000000..d8405fc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_texture_float.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ATI_texture_float { + + /** + * Accepted by the <internalFormat> parameter of TexImage1D, + * TexImage2D, and TexImage3D: + */ + int GL_RGBA_FLOAT32_ATI = 0x8814; + int GL_RGB_FLOAT32_ATI = 0x8815; + int GL_ALPHA_FLOAT32_ATI = 0x8816; + int GL_INTENSITY_FLOAT32_ATI = 0x8817; + int GL_LUMINANCE_FLOAT32_ATI = 0x8818; + int GL_LUMINANCE_ALPHA_FLOAT32_ATI = 0x8819; + int GL_RGBA_FLOAT16_ATI = 0x881A; + int GL_RGB_FLOAT16_ATI = 0x881B; + int GL_ALPHA_FLOAT16_ATI = 0x881C; + int GL_INTENSITY_FLOAT16_ATI = 0x881D; + int GL_LUMINANCE_FLOAT16_ATI = 0x881E; + int GL_LUMINANCE_ALPHA_FLOAT16_ATI = 0x881F; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_texture_mirror_once.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_texture_mirror_once.java new file mode 100644 index 0000000..e6692df --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_texture_mirror_once.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface ATI_texture_mirror_once { + int GL_MIRROR_CLAMP_ATI = 0x8742; + int GL_MIRROR_CLAMP_TO_EDGE_ATI = 0x8743; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_vertex_array_object.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_vertex_array_object.java new file mode 100644 index 0000000..eee7c8f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_vertex_array_object.java @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.*; + +public interface ATI_vertex_array_object { + int GL_STATIC_ATI = 0x8760; + int GL_DYNAMIC_ATI = 0x8761; + int GL_PRESERVE_ATI = 0x8762; + int GL_DISCARD_ATI = 0x8763; + int GL_OBJECT_BUFFER_SIZE_ATI = 0x8764; + int GL_OBJECT_BUFFER_USAGE_ATI = 0x8765; + int GL_ARRAY_OBJECT_BUFFER_ATI = 0x8766; + int GL_ARRAY_OBJECT_OFFSET_ATI = 0x8767; + + @GenerateAutos + @GLuint + int glNewObjectBufferATI(@AutoSize("pPointer") @GLsizei int size, + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer pPointer, @GLenum int usage); + + boolean glIsObjectBufferATI(@GLuint int buffer); + + void glUpdateObjectBufferATI(@GLuint int buffer, @GLuint int offset, @AutoSize("pPointer") @GLsizei int size, + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer pPointer, @GLenum int preserve); + + @StripPostfix("params") + void glGetObjectBufferfvATI(@GLuint int buffer, @GLenum int pname, @OutParameter @Check FloatBuffer params); + + @StripPostfix("params") + void glGetObjectBufferivATI(@GLuint int buffer, @GLenum int pname, @OutParameter @Check IntBuffer params); + + @Alternate("glGetObjectBufferivATI") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetObjectBufferivATI2(@GLuint int buffer, @GLenum int pname, @OutParameter IntBuffer params); + + void glFreeObjectBufferATI(@GLuint int buffer); + + void glArrayObjectATI(@GLenum int array, int size, @GLenum int type, @GLsizei int stride, @GLuint int buffer, @GLuint int offset); + + @StripPostfix("params") + void glGetArrayObjectfvATI(@GLenum int array, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params); + + @StripPostfix("params") + void glGetArrayObjectivATI(@GLenum int array, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + void glVariantArrayObjectATI(@GLuint int id, @GLenum int type, @GLsizei int stride, @GLuint int buffer, @GLuint int offset); + + @StripPostfix("params") + void glGetVariantArrayObjectfvATI(@GLuint int id, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params); + + @StripPostfix("params") + void glGetVariantArrayObjectivATI(@GLuint int id, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_vertex_attrib_array_object.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_vertex_attrib_array_object.java new file mode 100644 index 0000000..1ffc00f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_vertex_attrib_array_object.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.*; + +public interface ATI_vertex_attrib_array_object { + void glVertexAttribArrayObjectATI(@GLuint int index, int size, @GLenum int type, boolean normalized, @GLsizei int stride, @GLuint int buffer, @GLuint int offset); + + @StripPostfix("params") + void glGetVertexAttribArrayObjectfvATI(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params); + + @StripPostfix("params") + void glGetVertexAttribArrayObjectivATI(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_vertex_streams.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_vertex_streams.java new file mode 100644 index 0000000..33e5f00 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/ATI_vertex_streams.java @@ -0,0 +1,105 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; + +public interface ATI_vertex_streams { + int GL_MAX_VERTEX_STREAMS_ATI = 0x876B; + int GL_VERTEX_SOURCE_ATI = 0x876C; + int GL_VERTEX_STREAM0_ATI = 0x876D; + int GL_VERTEX_STREAM1_ATI = 0x876E; + int GL_VERTEX_STREAM2_ATI = 0x876F; + int GL_VERTEX_STREAM3_ATI = 0x8770; + int GL_VERTEX_STREAM4_ATI = 0x8771; + int GL_VERTEX_STREAM5_ATI = 0x8772; + int GL_VERTEX_STREAM6_ATI = 0x8773; + int GL_VERTEX_STREAM7_ATI = 0x8774; + + @NoErrorCheck + void glVertexStream2fATI(@GLenum int stream, float x, float y); + + @NoErrorCheck + void glVertexStream2dATI(@GLenum int stream, double x, double y); + + @NoErrorCheck + void glVertexStream2iATI(@GLenum int stream, int x, int y); + + @NoErrorCheck + void glVertexStream2sATI(@GLenum int stream, short x, short y); + + @NoErrorCheck + void glVertexStream3fATI(@GLenum int stream, float x, float y, float z); + + @NoErrorCheck + void glVertexStream3dATI(@GLenum int stream, double x, double y, double z); + + @NoErrorCheck + void glVertexStream3iATI(@GLenum int stream, int x, int y, int z); + + @NoErrorCheck + void glVertexStream3sATI(@GLenum int stream, short x, short y, short z); + + @NoErrorCheck + void glVertexStream4fATI(@GLenum int stream, float x, float y, float z, float w); + + @NoErrorCheck + void glVertexStream4dATI(@GLenum int stream, double x, double y, double z, double w); + + @NoErrorCheck + void glVertexStream4iATI(@GLenum int stream, int x, int y, int z, int w); + + @NoErrorCheck + void glVertexStream4sATI(@GLenum int stream, short x, short y, short z, short w); + + @NoErrorCheck + void glNormalStream3bATI(@GLenum int stream, byte x, byte y, byte z); + + @NoErrorCheck + void glNormalStream3fATI(@GLenum int stream, float x, float y, float z); + + @NoErrorCheck + void glNormalStream3dATI(@GLenum int stream, double x, double y, double z); + + @NoErrorCheck + void glNormalStream3iATI(@GLenum int stream, int x, int y, int z); + + @NoErrorCheck + void glNormalStream3sATI(@GLenum int stream, short x, short y, short z); + + void glClientActiveVertexStreamATI(@GLenum int stream); + + void glVertexBlendEnvfATI(@GLenum int pname, float param); + + void glVertexBlendEnviATI(@GLenum int pname, int param); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_abgr.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_abgr.java new file mode 100644 index 0000000..09c9615 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_abgr.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface EXT_abgr { + int GL_ABGR_EXT = 0x8000; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_bgra.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_bgra.java new file mode 100644 index 0000000..36e9d65 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_bgra.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface EXT_bgra { + int GL_BGR_EXT = 0x80E0; + int GL_BGRA_EXT = 0x80E1; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_bindable_uniform.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_bindable_uniform.java new file mode 100644 index 0000000..f3e39ab --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_bindable_uniform.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLintptr; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface EXT_bindable_uniform { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + int GL_MAX_VERTEX_BINDABLE_UNIFORMS_EXT = 0x8DE2; + int GL_MAX_FRAGMENT_BINDABLE_UNIFORMS_EXT = 0x8DE3; + int GL_MAX_GEOMETRY_BINDABLE_UNIFORMS_EXT = 0x8DE4; + int GL_MAX_BINDABLE_UNIFORM_SIZE_EXT = 0x8DED; + int GL_UNIFORM_BUFFER_BINDING_EXT = 0x8DEF; + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, and + * GetBufferPointerv: + */ + int GL_UNIFORM_BUFFER_EXT = 0x8DEE; + + void glUniformBufferEXT(@GLuint int program, int location, @GLuint int buffer); + + int glGetUniformBufferSizeEXT(@GLuint int program, int location); + + @GLintptr + long glGetUniformOffsetEXT(@GLuint int program, int location); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_blend_color.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_blend_color.java new file mode 100644 index 0000000..ee37e7d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_blend_color.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLclampf; + +public interface EXT_blend_color { + + /** Accepted by the <sfactor> and <dfactor> parameters of BlendFunc. */ + int GL_CONSTANT_COLOR_EXT = 0x8001; + int GL_ONE_MINUS_CONSTANT_COLOR_EXT = 0x8002; + int GL_CONSTANT_ALPHA_EXT = 0x8003; + int GL_ONE_MINUS_CONSTANT_ALPHA_EXT = 0x8004; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev. + */ + int GL_BLEND_COLOR_EXT = 0x8005; + + void glBlendColorEXT(@GLclampf float red, @GLclampf float green, @GLclampf float blue, @GLclampf float alpha); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_blend_equation_separate.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_blend_equation_separate.java new file mode 100644 index 0000000..46e4d44 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_blend_equation_separate.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLenum; + +public interface EXT_blend_equation_separate { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_BLEND_EQUATION_RGB_EXT = 0x8009; + int GL_BLEND_EQUATION_ALPHA_EXT = 0x883D; + + void glBlendEquationSeparateEXT(@GLenum int modeRGB, @GLenum int modeAlpha); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_blend_func_separate.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_blend_func_separate.java new file mode 100644 index 0000000..157a531 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_blend_func_separate.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLenum; + +public interface EXT_blend_func_separate { + int GL_BLEND_DST_RGB_EXT = 0x80C8; + int GL_BLEND_SRC_RGB_EXT = 0x80C9; + int GL_BLEND_DST_ALPHA_EXT = 0x80CA; + int GL_BLEND_SRC_ALPHA_EXT = 0x80CB; + + void glBlendFuncSeparateEXT(@GLenum int sfactorRGB, @GLenum int dfactorRGB, @GLenum int sfactorAlpha, @GLenum int dfactorAlpha); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_blend_minmax.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_blend_minmax.java new file mode 100644 index 0000000..d70fee4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_blend_minmax.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLenum; + +public interface EXT_blend_minmax { + + /** Accepted by the <mode> parameter of BlendEquationEXT. */ + int GL_FUNC_ADD_EXT = 0x8006; + int GL_MIN_EXT = 0x8007; + int GL_MAX_EXT = 0x8008; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev. + */ + int GL_BLEND_EQUATION_EXT = 0x8009; + + void glBlendEquationEXT(@GLenum int mode); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_blend_subtract.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_blend_subtract.java new file mode 100644 index 0000000..df164cf --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_blend_subtract.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface EXT_blend_subtract { + int GL_FUNC_SUBTRACT_EXT = 0x800A; + int GL_FUNC_REVERSE_SUBTRACT_EXT = 0x800B; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_cg_shader.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_cg_shader.java new file mode 100644 index 0000000..d253c11 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_cg_shader.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface EXT_Cg_shader { + + /** + * You can pass GL_CG_VERTEX_SHADER_EXT to glCreateShaderARB instead of GL_VERTEX_SHADER_ARB to create a vertex shader object + * that will parse and compile its shader source with the Cg compiler front-end rather than the GLSL front-end. Likewise, you + * can pass GL_CG_FRAGMENT_SHADER_EXT to glCreateShaderARB instead of GL_FRAGMENT_SHADER_ARB to create a fragment shader object + * that will parse and compile its shader source with the Cg front-end rather than the GLSL front-end. + */ + int GL_CG_VERTEX_SHADER_EXT = 0x890E; + int GL_CG_FRAGMENT_SHADER_EXT = 0x890F; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_compiled_vertex_array.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_compiled_vertex_array.java new file mode 100644 index 0000000..4b54a65 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_compiled_vertex_array.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLsizei; + +public interface EXT_compiled_vertex_array { + int GL_ARRAY_ELEMENT_LOCK_FIRST_EXT = 0x81A8; + int GL_ARRAY_ELEMENT_LOCK_COUNT_EXT = 0x81A9; + + void glLockArraysEXT(int first, @GLsizei int count); + + void glUnlockArraysEXT(); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_depth_bounds_test.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_depth_bounds_test.java new file mode 100644 index 0000000..f43d4e4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_depth_bounds_test.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLclampd; + +public interface EXT_depth_bounds_test { + + /** + Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, + and by the <pname> parameter of GetBooleanv, GetIntegerv, + GetFloatv, and GetDoublev: + */ + int GL_DEPTH_BOUNDS_TEST_EXT = 0x8890; + + /** + Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + GetFloatv, and GetDoublev: + */ + int GL_DEPTH_BOUNDS_EXT = 0x8891; + + void glDepthBoundsEXT(@GLclampd double zmin, @GLclampd double zmax); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_direct_state_access.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_direct_state_access.java new file mode 100644 index 0000000..d640299 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_direct_state_access.java @@ -0,0 +1,1515 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.*; + +@ForceInit +@Dependent +@DeprecatedGL +public interface EXT_direct_state_access { + + /** + * Accepted by the <pname> parameter of GetBooleanIndexedvEXT, + * GetIntegerIndexedvEXT, GetFloatIndexedvEXT, GetDoubleIndexedvEXT: + * GetBooleani_v, GetIntegeri_v, GetFloati_vEXT, GetDoublei_vEXT: + */ + int GL_PROGRAM_MATRIX_EXT = 0x8E2D; + int GL_TRANSPOSE_PROGRAM_MATRIX_EXT = 0x8E2E; + int GL_PROGRAM_MATRIX_STACK_DEPTH_EXT = 0x8E2F; + + /* + OpenGL 1.1: New client commands + */ + + @DeprecatedGL + void glClientAttribDefaultEXT(@GLbitfield int mask); + + @DeprecatedGL + void glPushClientAttribDefaultEXT(@GLbitfield int mask); + + /* + OpenGL 1.0: New matrix commands add "Matrix" prefix to name, + drops "Matrix" suffix from name, and add initial "enum matrixMode" + parameter + */ + + @StripPostfix("m") + @DeprecatedGL + void glMatrixLoadfEXT(@GLenum int matrixMode, @Check("16") @Const FloatBuffer m); + + @StripPostfix("m") + @DeprecatedGL + void glMatrixLoaddEXT(@GLenum int matrixMode, @Check("16") @Const DoubleBuffer m); + + @StripPostfix("m") + @DeprecatedGL + void glMatrixMultfEXT(@GLenum int matrixMode, @Check("16") @Const FloatBuffer m); + + @StripPostfix("m") + @DeprecatedGL + void glMatrixMultdEXT(@GLenum int matrixMode, @Check("16") @Const DoubleBuffer m); + + @DeprecatedGL + void glMatrixLoadIdentityEXT(@GLenum int matrixMode); + + @DeprecatedGL + void glMatrixRotatefEXT(@GLenum int matrixMode, float angle, float x, float y, float z); + + @DeprecatedGL + void glMatrixRotatedEXT(@GLenum int matrixMode, double angle, double x, double y, double z); + + @DeprecatedGL + void glMatrixScalefEXT(@GLenum int matrixMode, float x, float y, float z); + + @DeprecatedGL + void glMatrixScaledEXT(@GLenum int matrixMode, double x, double y, double z); + + @DeprecatedGL + void glMatrixTranslatefEXT(@GLenum int matrixMode, float x, float y, float z); + + @DeprecatedGL + void glMatrixTranslatedEXT(@GLenum int matrixMode, double x, double y, double z); + + @DeprecatedGL + void glMatrixOrthoEXT(@GLenum int matrixMode, double l, double r, double b, double t, double n, double f); + + @DeprecatedGL + void glMatrixFrustumEXT(@GLenum int matrixMode, double l, double r, double b, double t, double n, double f); + + @DeprecatedGL + void glMatrixPushEXT(@GLenum int matrixMode); + + @DeprecatedGL + void glMatrixPopEXT(@GLenum int matrixMode); + + /* + OpenGL 1.1: New texture object commands and queries replace "Tex" + in name with "Texture" and add initial "uint texture" parameter + */ + + void glTextureParameteriEXT(@GLuint int texture, @GLenum int target, @GLenum int pname, int param); + + @StripPostfix("param") + void glTextureParameterivEXT(@GLuint int texture, @GLenum int target, @GLenum int pname, @Check("4") @Const IntBuffer param); + + void glTextureParameterfEXT(@GLuint int texture, @GLenum int target, @GLenum int pname, float param); + + @StripPostfix("param") + void glTextureParameterfvEXT(@GLuint int texture, @GLenum int target, @GLenum int pname, @Check("4") @Const FloatBuffer param); + + void glTextureImage1DEXT(@GLuint int texture, @GLenum int target, int level, + int internalformat, @GLsizei int width, int border, @GLenum int format, @GLenum int type, + @BufferObject(BufferKind.UnpackPBO) + @Check(value = "GLChecks.calculateTexImage1DStorage(pixels, format, type, width)", canBeNull = true) + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer pixels); + + void glTextureImage2DEXT(@GLuint int texture, @GLenum int target, int level, + int internalformat, @GLsizei int width, @GLsizei int height, int border, @GLenum int format, @GLenum int type, + @BufferObject(BufferKind.UnpackPBO) + @Check(value = "GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height)", canBeNull = true) + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer pixels); + + void glTextureSubImage1DEXT(@GLuint int texture, @GLenum int target, int level, + int xoffset, @GLsizei int width, @GLenum int format, @GLenum int type, + @BufferObject(BufferKind.UnpackPBO) + @Check("GLChecks.calculateImageStorage(pixels, format, type, width, 1, 1)") + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer pixels); + + void glTextureSubImage2DEXT(@GLuint int texture, @GLenum int target, int level, + int xoffset, int yoffset, @GLsizei int width, @GLsizei int height, @GLenum int format, @GLenum int type, + @BufferObject(BufferKind.UnpackPBO) + @Check("GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)") + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer pixels); + + void glCopyTextureImage1DEXT(@GLuint int texture, @GLenum int target, int level, @GLenum int internalformat, int x, int y, @GLsizei int width, int border); + + void glCopyTextureImage2DEXT(@GLuint int texture, @GLenum int target, int level, @GLenum int internalformat, int x, int y, @GLsizei int width, @GLsizei int height, int border); + + void glCopyTextureSubImage1DEXT(@GLuint int texture, @GLenum int target, int level, int xoffset, int x, int y, @GLsizei int width); + + void glCopyTextureSubImage2DEXT(@GLuint int texture, @GLenum int target, int level, int xoffset, int yoffset, int x, int y, @GLsizei int width, @GLsizei int height); + + void glGetTextureImageEXT(@GLuint int texture, @GLenum int target, int level, + @GLenum int format, @GLenum int type, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @Check("GLChecks.calculateImageStorage(pixels, format, type, 1, 1, 1)") + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer pixels); + + @StripPostfix("params") + void glGetTextureParameterfvEXT(@GLuint int texture, @GLenum int target, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params); + + @Alternate("glGetTextureParameterfvEXT") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetTextureParameterfvEXT2(@GLuint int texture, @GLenum int target, @GLenum int pname, @OutParameter FloatBuffer params); + + @StripPostfix("params") + void glGetTextureParameterivEXT(@GLuint int texture, @GLenum int target, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + @Alternate("glGetTextureParameterivEXT") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetTextureParameterivEXT2(@GLuint int texture, @GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + @StripPostfix("params") + void glGetTextureLevelParameterfvEXT(@GLuint int texture, @GLenum int target, int level, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params); + + @Alternate("glGetTextureLevelParameterfvEXT") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetTextureLevelParameterfvEXT2(@GLuint int texture, @GLenum int target, int level, @GLenum int pname, @OutParameter FloatBuffer params); + + @StripPostfix("params") + void glGetTextureLevelParameterivEXT(@GLuint int texture, @GLenum int target, int level, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + @Alternate("glGetTextureLevelParameterivEXT") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetTextureLevelParameterivEXT2(@GLuint int texture, @GLenum int target, int level, @GLenum int pname, @OutParameter IntBuffer params); + + /* + OpenGL 1.2: New 3D texture object commands replace "Tex" in name with + "Texture" and adds initial "uint texture" parameter + */ + + @Dependent("OpenGL12") + void glTextureImage3DEXT(@GLuint int texture, @GLenum int target, int level, + int internalformat, @GLsizei int width, @GLsizei int height, @GLsizei int depth, int border, @GLenum int format, @GLenum int type, + @BufferObject(BufferKind.UnpackPBO) + @Check(value = "GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth)", canBeNull = true) + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer pixels); + + @Dependent("OpenGL12") + void glTextureSubImage3DEXT(@GLuint int texture, @GLenum int target, int level, + int xoffset, int yoffset, int zoffset, @GLsizei int width, @GLsizei int height, @GLsizei int depth, @GLenum int format, @GLenum int type, + @BufferObject(BufferKind.UnpackPBO) + @Check("GLChecks.calculateImageStorage(pixels, format, type, width, height, depth)") + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer pixels); + + @Dependent("OpenGL12") + void glCopyTextureSubImage3DEXT(@GLuint int texture, @GLenum int target, int level, + int xoffset, int yoffset, int zoffset, int x, int y, @GLsizei int width, @GLsizei int height); + + /* + OpenGL 1.2.1: New multitexture commands and queries prefix "Multi" + before "Tex" and add an initial "enum texunit" parameter (to identify + the texture unit + */ + + @Dependent("OpenGL13") + void glBindMultiTextureEXT(@GLenum int texunit, @GLenum int target, @GLuint int texture); + + @Dependent("OpenGL13") + @DeprecatedGL + void glMultiTexCoordPointerEXT(@GLenum int texunit, int size, @AutoType("pointer") @GLenum int type, @GLsizei int stride, + @BufferObject(BufferKind.ArrayVBO) + @Check + @Const + @GLfloat + @GLdouble + Buffer pointer); + + @Dependent("OpenGL13") + @DeprecatedGL + void glMultiTexEnvfEXT(@GLenum int texunit, @GLenum int target, @GLenum int pname, float param); + + @Dependent("OpenGL13") + @StripPostfix("params") + @DeprecatedGL + void glMultiTexEnvfvEXT(@GLenum int texunit, @GLenum int target, @GLenum int pname, @Check("4") @Const FloatBuffer params); + + @Dependent("OpenGL13") + @DeprecatedGL + void glMultiTexEnviEXT(@GLenum int texunit, @GLenum int target, @GLenum int pname, int param); + + @Dependent("OpenGL13") + @StripPostfix("params") + @DeprecatedGL + void glMultiTexEnvivEXT(@GLenum int texunit, @GLenum int target, @GLenum int pname, @Check("4") @Const IntBuffer params); + + @Dependent("OpenGL13") + @DeprecatedGL + void glMultiTexGendEXT(@GLenum int texunit, @GLenum int coord, @GLenum int pname, double param); + + @Dependent("OpenGL13") + @StripPostfix("params") + @DeprecatedGL + void glMultiTexGendvEXT(@GLenum int texunit, @GLenum int coord, @GLenum int pname, @Check("4") @Const DoubleBuffer params); + + @Dependent("OpenGL13") + @DeprecatedGL + void glMultiTexGenfEXT(@GLenum int texunit, @GLenum int coord, @GLenum int pname, float param); + + @Dependent("OpenGL13") + @StripPostfix("params") + @DeprecatedGL + void glMultiTexGenfvEXT(@GLenum int texunit, @GLenum int coord, @GLenum int pname, @Check("4") @Const FloatBuffer params); + + @Dependent("OpenGL13") + @DeprecatedGL + void glMultiTexGeniEXT(@GLenum int texunit, @GLenum int coord, @GLenum int pname, int param); + + @Dependent("OpenGL13") + @StripPostfix("params") + @DeprecatedGL + void glMultiTexGenivEXT(@GLenum int texunit, @GLenum int coord, @GLenum int pname, @Check("4") @Const IntBuffer params); + + @Dependent("OpenGL13") + @StripPostfix("params") + @DeprecatedGL + void glGetMultiTexEnvfvEXT(@GLenum int texunit, @GLenum int target, @GLenum int pname, @Check("4") @OutParameter FloatBuffer params); + + @Dependent("OpenGL13") + @StripPostfix("params") + @DeprecatedGL + void glGetMultiTexEnvivEXT(@GLenum int texunit, @GLenum int target, @GLenum int pname, @Check("4") @OutParameter IntBuffer params); + + @Dependent("OpenGL13") + @StripPostfix("params") + @DeprecatedGL + void glGetMultiTexGendvEXT(@GLenum int texunit, @GLenum int coord, @GLenum int pname, @Check("4") @OutParameter DoubleBuffer params); + + @Dependent("OpenGL13") + @StripPostfix("params") + @DeprecatedGL + void glGetMultiTexGenfvEXT(@GLenum int texunit, @GLenum int coord, @GLenum int pname, @Check("4") @OutParameter FloatBuffer params); + + @Dependent("OpenGL13") + @StripPostfix("params") + @DeprecatedGL + void glGetMultiTexGenivEXT(@GLenum int texunit, @GLenum int coord, @GLenum int pname, @Check("4") @OutParameter IntBuffer params); + + @Dependent("OpenGL13") + void glMultiTexParameteriEXT(@GLenum int texunit, @GLenum int target, @GLenum int pname, int param); + + @Dependent("OpenGL13") + @StripPostfix("param") + void glMultiTexParameterivEXT(@GLenum int texunit, @GLenum int target, @GLenum int pname, @Check("4") @Const IntBuffer param); + + @Dependent("OpenGL13") + void glMultiTexParameterfEXT(@GLenum int texunit, @GLenum int target, @GLenum int pname, float param); + + @Dependent("OpenGL13") + @StripPostfix("param") + void glMultiTexParameterfvEXT(@GLenum int texunit, @GLenum int target, @GLenum int pname, @Check("4") @Const FloatBuffer param); + + @Dependent("OpenGL13") + void glMultiTexImage1DEXT(@GLenum int texunit, @GLenum int target, int level, + int internalformat, @GLsizei int width, int border, @GLenum int format, @GLenum int type, + @BufferObject(BufferKind.UnpackPBO) + @Check(value = "GLChecks.calculateTexImage1DStorage(pixels, format, type, width)", canBeNull = true) + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer pixels); + + @Dependent("OpenGL13") + void glMultiTexImage2DEXT(@GLenum int texunit, @GLenum int target, int level, + int internalformat, @GLsizei int width, @GLsizei int height, int border, @GLenum int format, @GLenum int type, + @BufferObject(BufferKind.UnpackPBO) + @Check(value = "GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height)", canBeNull = true) + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer pixels); + + @Dependent("OpenGL13") + void glMultiTexSubImage1DEXT(@GLenum int texunit, @GLenum int target, int level, + int xoffset, @GLsizei int width, @GLenum int format, @GLenum int type, + @BufferObject(BufferKind.UnpackPBO) + @Check("GLChecks.calculateImageStorage(pixels, format, type, width, 1, 1)") + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer pixels); + + @Dependent("OpenGL13") + void glMultiTexSubImage2DEXT(@GLenum int texunit, @GLenum int target, int level, + int xoffset, int yoffset, @GLsizei int width, @GLsizei int height, @GLenum int format, @GLenum int type, + @BufferObject(BufferKind.UnpackPBO) + @Check("GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)") + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer pixels); + + @Dependent("OpenGL13") + void glCopyMultiTexImage1DEXT(@GLenum int texunit, @GLenum int target, int level, @GLenum int internalformat, int x, int y, @GLsizei int width, int border); + + @Dependent("OpenGL13") + void glCopyMultiTexImage2DEXT(@GLenum int texunit, @GLenum int target, int level, @GLenum int internalformat, int x, int y, @GLsizei int width, @GLsizei int height, int border); + + @Dependent("OpenGL13") + void glCopyMultiTexSubImage1DEXT(@GLenum int texunit, @GLenum int target, int level, int xoffset, int x, int y, @GLsizei int width); + + @Dependent("OpenGL13") + void glCopyMultiTexSubImage2DEXT(@GLenum int texunit, @GLenum int target, int level, int xoffset, int yoffset, int x, int y, @GLsizei int width, @GLsizei int height); + + @Dependent("OpenGL13") + void glGetMultiTexImageEXT(@GLenum int texunit, @GLenum int target, int level, @GLenum int format, @GLenum int type, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @Check("GLChecks.calculateImageStorage(pixels, format, type, 1, 1, 1)") + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer pixels); + + @Dependent("OpenGL13") + @StripPostfix("params") + void glGetMultiTexParameterfvEXT(@GLenum int texunit, @GLenum int target, @GLenum int pname, @Check("4") @OutParameter FloatBuffer params); + + @Alternate("glGetMultiTexParameterfvEXT") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetMultiTexParameterfvEXT2(@GLenum int texunit, @GLenum int target, @GLenum int pname, @OutParameter FloatBuffer params); + + @Dependent("OpenGL13") + @StripPostfix("params") + void glGetMultiTexParameterivEXT(@GLenum int texunit, @GLenum int target, @GLenum int pname, @Check("4") @OutParameter IntBuffer params); + + @Alternate("glGetMultiTexParameterivEXT") + @GLreturn("params") + @Dependent("OpenGL13") + @StripPostfix(value = "params", postfix = "v") + void glGetMultiTexParameterivEXT2(@GLenum int texunit, @GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + @Dependent("OpenGL13") + @StripPostfix("params") + void glGetMultiTexLevelParameterfvEXT(@GLenum int texunit, @GLenum int target, int level, @GLenum int pname, @Check("4") @OutParameter FloatBuffer params); + + @Alternate("glGetMultiTexLevelParameterfvEXT") + @GLreturn("params") + @Dependent("OpenGL13") + @StripPostfix(value = "params", postfix = "v") + void glGetMultiTexLevelParameterfvEXT2(@GLenum int texunit, @GLenum int target, int level, @GLenum int pname, @OutParameter FloatBuffer params); + + @Dependent("OpenGL13") + @StripPostfix("params") + void glGetMultiTexLevelParameterivEXT(@GLenum int texunit, @GLenum int target, int level, @GLenum int pname, @Check("4") @OutParameter IntBuffer params); + + @Alternate("glGetMultiTexLevelParameterivEXT") + @GLreturn("params") + @Dependent("OpenGL13") + @StripPostfix(value = "params", postfix = "v") + void glGetMultiTexLevelParameterivEXT2(@GLenum int texunit, @GLenum int target, int level, @GLenum int pname, @OutParameter IntBuffer params); + + @Dependent("OpenGL13") + void glMultiTexImage3DEXT(@GLenum int texunit, @GLenum int target, int level, + int internalformat, @GLsizei int width, @GLsizei int height, @GLsizei int depth, int border, @GLenum int format, @GLenum int type, + @BufferObject(BufferKind.UnpackPBO) + @Check(value = "GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth)", canBeNull = true) + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer pixels); + + @Dependent("OpenGL13") + void glMultiTexSubImage3DEXT(@GLenum int texunit, @GLenum int target, int level, + int xoffset, int yoffset, int zoffset, @GLsizei int width, @GLsizei int height, @GLsizei int depth, @GLenum int format, @GLenum int type, + @BufferObject(BufferKind.UnpackPBO) + @Check("GLChecks.calculateImageStorage(pixels, format, type, width, height, depth)") + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer pixels); + + @Dependent("OpenGL13") + void glCopyMultiTexSubImage3DEXT(@GLenum int texunit, @GLenum int target, int level, int xoffset, int yoffset, int zoffset, int x, int y, @GLsizei int width, @GLsizei int height); + + /* + OpenGL 1.2.1: New indexed texture commands and queries append + "Indexed" to name and add "uint index" parameter (to identify the + texture unit index) after state name parameters (if any) and before + state value parameters + */ + + @Dependent("OpenGL13") + @DeprecatedGL + void glEnableClientStateIndexedEXT(@GLenum int array, @GLuint int index); + + @Dependent("OpenGL13") + @DeprecatedGL + void glDisableClientStateIndexedEXT(@GLenum int array, @GLuint int index); + + /* + OpenGL 3.0: New indexed texture commands and queries append "i" + to name and add "uint index" parameter (to identify the texture + unit index) after state name parameters (if any) and before state + value parameters + */ + + @Optional(reason = "AMD does not expose this (last driver checked: 11.7)") + @Dependent("OpenGL30") + void glEnableClientStateiEXT(@GLenum int array, @GLuint int index); + + @Optional(reason = "AMD does not expose this (last driver checked: 11.7)") + @Dependent("OpenGL30") + void glDisableClientStateiEXT(@GLenum int array, @GLuint int index); + + /* + OpenGL 1.2.1: New indexed generic queries (added for indexed texture + state) append "Indexed" to name and add "uint index" parameter + (to identify the texture unit) after state name parameters (if any) + and before state value parameters + */ + + @Dependent("OpenGL13") + @StripPostfix("params") + void glGetFloatIndexedvEXT(@GLenum int pname, @GLuint int index, @OutParameter @Check("16") FloatBuffer params); + + @Alternate("glGetFloatIndexedvEXT") + @GLreturn("params") + @Dependent("OpenGL13") + @StripPostfix("params") + void glGetFloatIndexedvEXT2(@GLenum int pname, @GLuint int index, @OutParameter FloatBuffer params); + + @Dependent("OpenGL13") + @StripPostfix(value = "params", hasPostfix = false) + void glGetDoubleIndexedvEXT(@GLenum int pname, @GLuint int index, @OutParameter @Check("16") DoubleBuffer params); + + @Alternate("glGetDoubleIndexedvEXT") + @GLreturn("params") + @Dependent("OpenGL13") + @StripPostfix(value = "params", hasPostfix = false) + void glGetDoubleIndexedvEXT2(@GLenum int pname, @GLuint int index, @OutParameter DoubleBuffer params); + + @Dependent("OpenGL13") + @StripPostfix("params") + void glGetPointerIndexedvEXT(@GLenum int pname, @GLuint int index, @Result @GLvoid ByteBuffer params); + + /* + OpenGL 3.0: New indexed generic queries (added for indexed texture + state) replace "v" for "i_v" to name and add "uint index" parameter + (to identify the texture unit) after state name parameters (if any) + and before state value parameters + */ + + @Optional(reason = "AMD does not expose this (last driver checked: 11.7)") + @Dependent("OpenGL30") + @StripPostfix("params") + void glGetFloati_vEXT(@GLenum int pname, @GLuint int index, @OutParameter @Check("16") FloatBuffer params); + + @Alternate("glGetFloati_vEXT") + @GLreturn("params") + @Dependent("OpenGL30") + @StripPostfix("params") + void glGetFloati_vEXT2(@GLenum int pname, @GLuint int index, @OutParameter FloatBuffer params); + + @Optional(reason = "AMD does not expose this (last driver checked: 11.7)") + @Dependent("OpenGL30") + @StripPostfix("params") + void glGetDoublei_vEXT(@GLenum int pname, @GLuint int index, @OutParameter @Check("16") DoubleBuffer params); + + @Alternate("glGetDoublei_vEXT") + @GLreturn("params") + @Dependent("OpenGL30") + @StripPostfix("params") + void glGetDoublei_vEXT2(@GLenum int pname, @GLuint int index, @OutParameter DoubleBuffer params); + + @Optional(reason = "AMD does not expose this (last driver checked: 11.7)") + @Dependent("OpenGL30") + @StripPostfix(value = "params", hasPostfix = false) + void glGetPointeri_vEXT(@GLenum int pname, @GLuint int index, @Result @GLvoid ByteBuffer params); + + /* + OpenGL 1.2.1: Extend the functionality of these EXT_draw_buffers2 + commands and queries for multitexture + TODO: Why 1.2.1 and not EXT_draw_buffers2? + */ + + @Reuse("EXTDrawBuffers2") + @Dependent("OpenGL13") + void glEnableIndexedEXT(@GLenum int cap, @GLuint int index); + + @Reuse("EXTDrawBuffers2") + @Dependent("OpenGL13") + void glDisableIndexedEXT(@GLenum int cap, @GLuint int index); + + @Reuse("EXTDrawBuffers2") + @Dependent("OpenGL13") + boolean glIsEnabledIndexedEXT(@GLenum int cap, @GLuint int index); + + @Reuse("EXTDrawBuffers2") + @Dependent("OpenGL13") + @StripPostfix("params") + void glGetIntegerIndexedvEXT(@GLenum int pname, @GLuint int index, @OutParameter @Check("16") IntBuffer params); + + @Reuse("EXTDrawBuffers2") + @Alternate("glGetIntegerIndexedvEXT") + @GLreturn("params") + @Dependent("OpenGL13") + @StripPostfix("params") + void glGetIntegerIndexedvEXT2(@GLenum int pname, @GLuint int index, @OutParameter IntBuffer params); + + @Reuse("EXTDrawBuffers2") + @Dependent("OpenGL13") + @StripPostfix("params") + void glGetBooleanIndexedvEXT(@GLenum int pname, @GLuint int index, @OutParameter @Check("4") @GLboolean ByteBuffer params); + + @Reuse("EXTDrawBuffers2") + @Alternate("glGetBooleanIndexedvEXT") + @GLreturn("params") + @Dependent("OpenGL13") + @StripPostfix("params") + void glGetBooleanIndexedvEXT2(@GLenum int pname, @GLuint int index, @OutParameter @GLboolean ByteBuffer params); + + /* + ARB_vertex_program: New program commands and queries add "Named" + prefix to name and adds initial "uint program" parameter + */ + + @Dependent("GL_ARB_vertex_program") + void glNamedProgramStringEXT(@GLuint int program, @GLenum int target, @GLenum int format, @AutoSize("string") @GLsizei int len, @Const @GLvoid Buffer string); + + @Alternate("glNamedProgramStringEXT") + @Dependent("GL_ARB_vertex_program") + void glNamedProgramStringEXT(@GLuint int program, @GLenum int target, @GLenum int format, @Constant("string.length()") @GLsizei int length, CharSequence string); + + @Dependent("GL_ARB_vertex_program") + void glNamedProgramLocalParameter4dEXT(@GLuint int program, @GLenum int target, @GLuint int index, double x, double y, double z, double w); + + @Dependent("GL_ARB_vertex_program") + @StripPostfix("params") + void glNamedProgramLocalParameter4dvEXT(@GLuint int program, @GLenum int target, @GLuint int index, @Const @Check("4") DoubleBuffer params); + + @Dependent("GL_ARB_vertex_program") + void glNamedProgramLocalParameter4fEXT(@GLuint int program, @GLenum int target, @GLuint int index, float x, float y, float z, float w); + + @Dependent("GL_ARB_vertex_program") + @StripPostfix("params") + void glNamedProgramLocalParameter4fvEXT(@GLuint int program, @GLenum int target, @GLuint int index, @Const @Check("4") FloatBuffer params); + + @Dependent("GL_ARB_vertex_program") + @StripPostfix("params") + void glGetNamedProgramLocalParameterdvEXT(@GLuint int program, @GLenum int target, @GLuint int index, @OutParameter @Check("4") DoubleBuffer params); + + @Dependent("GL_ARB_vertex_program") + @StripPostfix("params") + void glGetNamedProgramLocalParameterfvEXT(@GLuint int program, @GLenum int target, @GLuint int index, @OutParameter @Check("4") FloatBuffer params); + + @Dependent("GL_ARB_vertex_program") + @StripPostfix("params") + void glGetNamedProgramivEXT(@GLuint int program, @GLenum int target, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + @Alternate("glGetNamedProgramivEXT") + @GLreturn("params") + @Dependent("GL_ARB_vertex_program") + @StripPostfix("params") + void glGetNamedProgramivEXT2(@GLuint int program, @GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + @Dependent("GL_ARB_vertex_program") + void glGetNamedProgramStringEXT(@GLuint int program, @GLenum int target, @GLenum int pname, @OutParameter @Check @GLvoid ByteBuffer string); + + @Alternate("glGetNamedProgramStringEXT") + @Code("\t\tint programLength = glGetNamedProgramEXT(program, target, ARBProgram.GL_PROGRAM_LENGTH_ARB);") + @GLreturn(value = "paramString", maxLength = "programLength", forceMaxLength = true) + void glGetNamedProgramStringEXT2(@GLuint int program, @GLenum int target, @GLenum int pname, @OutParameter @GLchar ByteBuffer paramString); + + /* + OpenGL 1.3: New compressed texture object commands replace "Tex" + in name with "Texture" and add initial "uint texture" parameter + */ + + @Dependent("OpenGL13") + void glCompressedTextureImage3DEXT(@GLuint int texture, @GLenum int target, int level, + @GLenum int internalformat, @GLsizei int width, @GLsizei int height, @GLsizei int depth, int border, @AutoSize("data") @GLsizei int imageSize, + @BufferObject(BufferKind.UnpackPBO) + @Check + @Const + @GLvoid + ByteBuffer data); + + @Dependent("OpenGL13") + void glCompressedTextureImage2DEXT(@GLuint int texture, @GLenum int target, int level, + @GLenum int internalformat, @GLsizei int width, @GLsizei int height, int border, @AutoSize("data") @GLsizei int imageSize, + @BufferObject(BufferKind.UnpackPBO) + @Check + @Const + @GLvoid + ByteBuffer data); + + @Dependent("OpenGL13") + void glCompressedTextureImage1DEXT(@GLuint int texture, @GLenum int target, int level, + @GLenum int internalformat, @GLsizei int width, int border, @AutoSize("data") @GLsizei int imageSize, + @BufferObject(BufferKind.UnpackPBO) + @Check + @Const + @GLvoid + ByteBuffer data); + + @Dependent("OpenGL13") + void glCompressedTextureSubImage3DEXT(@GLuint int texture, @GLenum int target, int level, + int xoffset, int yoffset, int zoffset, @GLsizei int width, @GLsizei int height, @GLsizei int depth, + @GLenum int format, @AutoSize("data") @GLsizei int imageSize, + @BufferObject(BufferKind.UnpackPBO) + @Check + @Const + @GLvoid + ByteBuffer data); + + @Dependent("OpenGL13") + void glCompressedTextureSubImage2DEXT(@GLuint int texture, @GLenum int target, int level, + int xoffset, int yoffset, @GLsizei int width, @GLsizei int height, @GLenum int format, @AutoSize("data") @GLsizei int imageSize, + @BufferObject(BufferKind.UnpackPBO) + @Check + @Const + @GLvoid + ByteBuffer data); + + @Dependent("OpenGL13") + void glCompressedTextureSubImage1DEXT(@GLuint int texture, @GLenum int target, int level, + int xoffset, @GLsizei int width, @GLenum int format, @AutoSize("data") @GLsizei int imageSize, + @BufferObject(BufferKind.UnpackPBO) + @Check + @Const + @GLvoid + ByteBuffer data); + + @Dependent("OpenGL13") + void glGetCompressedTextureImageEXT(@GLuint int texture, @GLenum int target, int level, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @Check + @GLbyte + @GLshort + @GLint Buffer img); + + /* + OpenGL 1.3: New multitexture compressed texture commands and queries + prefix "Multi" before "Tex" and add an initial "enum texunit" + parameter (to identify the texture unit) + */ + + @Dependent("OpenGL13") + void glCompressedMultiTexImage3DEXT(@GLenum int texunit, @GLenum int target, int level, + @GLenum int internalformat, @GLsizei int width, @GLsizei int height, @GLsizei int depth, int border, @AutoSize("data") @GLsizei int imageSize, + @BufferObject(BufferKind.UnpackPBO) + @Check + @Const + @GLvoid + ByteBuffer data); + + @Dependent("OpenGL13") + void glCompressedMultiTexImage2DEXT(@GLenum int texunit, @GLenum int target, int level, + @GLenum int internalformat, @GLsizei int width, @GLsizei int height, int border, @AutoSize("data") @GLsizei int imageSize, + @BufferObject(BufferKind.UnpackPBO) + @Check + @Const + @GLvoid + ByteBuffer data); + + @Dependent("OpenGL13") + void glCompressedMultiTexImage1DEXT(@GLenum int texunit, @GLenum int target, int level, + @GLenum int internalformat, @GLsizei int width, int border, @AutoSize("data") @GLsizei int imageSize, + @BufferObject(BufferKind.UnpackPBO) + @Check + @Const + @GLvoid + ByteBuffer data); + + @Dependent("OpenGL13") + void glCompressedMultiTexSubImage3DEXT(@GLenum int texunit, @GLenum int target, int level, + int xoffset, int yoffset, int zoffset, @GLsizei int width, @GLsizei int height, @GLsizei int depth, + @GLenum int format, @AutoSize("data") @GLsizei int imageSize, + @BufferObject(BufferKind.UnpackPBO) + @Check + @Const + @GLvoid + ByteBuffer data); + + @Dependent("OpenGL13") + void glCompressedMultiTexSubImage2DEXT(@GLenum int texunit, @GLenum int target, int level, + int xoffset, int yoffset, @GLsizei int width, @GLsizei int height, @GLenum int format, @AutoSize("data") @GLsizei int imageSize, + @BufferObject(BufferKind.UnpackPBO) + @Check + @Const + @GLvoid + ByteBuffer data); + + @Dependent("OpenGL13") + void glCompressedMultiTexSubImage1DEXT(@GLenum int texunit, @GLenum int target, int level, + int xoffset, @GLsizei int width, @GLenum int format, @AutoSize("data") @GLsizei int imageSize, + @BufferObject(BufferKind.UnpackPBO) + @Check + @Const + @GLvoid + ByteBuffer data); + + + @Dependent("OpenGL13") + void glGetCompressedMultiTexImageEXT(@GLenum int texunit, @GLenum int target, int level, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @Check + @GLbyte + @GLshort + @GLint Buffer img); + + /* + OpenGL 1.3: New transpose matrix commands add "Matrix" suffix + to name, drops "Matrix" suffix from name, and add initial "enum + matrixMode" parameter + */ + + @Dependent("OpenGL13") + @StripPostfix("m") + @DeprecatedGL + void glMatrixLoadTransposefEXT(@GLenum int matrixMode, @Check("16") @Const FloatBuffer m); + + @Dependent("OpenGL13") + @StripPostfix("m") + @DeprecatedGL + void glMatrixLoadTransposedEXT(@GLenum int matrixMode, @Check("16") @Const DoubleBuffer m); + + @Dependent("OpenGL13") + @StripPostfix("m") + @DeprecatedGL + void glMatrixMultTransposefEXT(@GLenum int matrixMode, @Check("16") @Const FloatBuffer m); + + @Dependent("OpenGL13") + @StripPostfix("m") + @DeprecatedGL + void glMatrixMultTransposedEXT(@GLenum int matrixMode, @Check("16") @Const DoubleBuffer m); + + /* + OpenGL 1.5: New buffer commands and queries replace "Buffer" with + "NamedBuffer" in name and replace "enum target" parameter with + "uint buffer" + */ + + @Dependent("OpenGL15") + @GenerateAutos + void glNamedBufferDataEXT(@GLuint int buffer, @AutoSize("data") @GLsizeiptr long size, + @Check + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer data, @GLenum int usage); + + @Dependent("OpenGL15") + void glNamedBufferSubDataEXT(@GLuint int buffer, @GLintptr long offset, @AutoSize("data") @GLsizeiptr long size, + @Check + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer data); + + /** + * glMapNamedBufferEXT maps a GL buffer object to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapNamedBufferEXT like this: + *

+ * ByteBuffer mapped_buffer; mapped_buffer = glMapNamedBufferEXT(..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapNamedBufferEXT(..., ..., mapped_buffer); + *

+ * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + *

+ * The version of this method without an explicit length argument calls glGetNamedBufferParameterEXT internally to + * retrieve the current buffer object size, which may cause a pipeline flush and reduce application performance. + *

+ * The version of this method with an explicit length argument is a fast alternative to the one without. No GL call + * is made to retrieve the buffer object size, so the user is responsible for tracking and using the appropriate length.
+ * Security warning: The length argument should match the buffer object size. Reading from or writing to outside + * the memory region that corresponds to the mapped buffer object will cause native crashes. + * + * @param length the length of the mapped memory in bytes. + * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. + * + * @return A ByteBuffer representing the mapped buffer memory. + */ + @Dependent("OpenGL15") + @CachedResult + @GLvoid + @AutoSize("GLChecks.getNamedBufferObjectSize(caps, buffer)") + ByteBuffer glMapNamedBufferEXT(@GLuint int buffer, @GLenum int access); + + @Dependent("OpenGL15") + boolean glUnmapNamedBufferEXT(@GLuint int buffer); + + @Dependent("OpenGL15") + @StripPostfix("params") + void glGetNamedBufferParameterivEXT(@GLuint int buffer, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + @Alternate("glGetNamedBufferParameterivEXT") + @GLreturn("params") + @Dependent("OpenGL15") + @StripPostfix("params") + void glGetNamedBufferParameterivEXT2(@GLuint int buffer, @GLenum int pname, @OutParameter IntBuffer params); + + @Dependent("OpenGL15") + @StripPostfix("params") + @AutoSize("GLChecks.getNamedBufferObjectSize(caps, buffer)") + void glGetNamedBufferPointervEXT(@GLuint int buffer, @GLenum int pname, @OutParameter @Result @GLvoid ByteBuffer params); + + @Dependent("OpenGL15") + void glGetNamedBufferSubDataEXT(@GLuint int buffer, @GLintptr long offset, @AutoSize("data") @GLsizeiptr long size, + @OutParameter + @Check + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer data); + + /* + OpenGL 2.0: New uniform commands add "Program" prefix to name and + add initial "uint program" parameter + */ + + @Dependent("OpenGL20") + void glProgramUniform1fEXT(@GLuint int program, int location, float v0); + + @Dependent("OpenGL20") + void glProgramUniform2fEXT(@GLuint int program, int location, float v0, float v1); + + @Dependent("OpenGL20") + void glProgramUniform3fEXT(@GLuint int program, int location, float v0, float v1, float v2); + + @Dependent("OpenGL20") + void glProgramUniform4fEXT(@GLuint int program, int location, float v0, float v1, float v2, float v3); + + @Dependent("OpenGL20") + void glProgramUniform1iEXT(@GLuint int program, int location, int v0); + + @Dependent("OpenGL20") + void glProgramUniform2iEXT(@GLuint int program, int location, int v0, int v1); + + @Dependent("OpenGL20") + void glProgramUniform3iEXT(@GLuint int program, int location, int v0, int v1, int v2); + + @Dependent("OpenGL20") + void glProgramUniform4iEXT(@GLuint int program, int location, int v0, int v1, int v2, int v3); + + @Dependent("OpenGL20") + @StripPostfix("value") + void glProgramUniform1fvEXT(@GLuint int program, int location, @AutoSize(value = "value") @GLsizei int count, @Const FloatBuffer value); + + @Dependent("OpenGL20") + @StripPostfix("value") + void glProgramUniform2fvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const FloatBuffer value); + + @Dependent("OpenGL20") + @StripPostfix("value") + void glProgramUniform3fvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const FloatBuffer value); + + @Dependent("OpenGL20") + @StripPostfix("value") + void glProgramUniform4fvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const FloatBuffer value); + + @Dependent("OpenGL20") + @StripPostfix("value") + void glProgramUniform1ivEXT(@GLuint int program, int location, @AutoSize(value = "value") @GLsizei int count, @Const IntBuffer value); + + @Dependent("OpenGL20") + @StripPostfix("value") + void glProgramUniform2ivEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const IntBuffer value); + + @Dependent("OpenGL20") + @StripPostfix("value") + void glProgramUniform3ivEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const IntBuffer value); + + @Dependent("OpenGL20") + @StripPostfix("value") + void glProgramUniform4ivEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const IntBuffer value); + + @Dependent("OpenGL20") + @StripPostfix("value") + void glProgramUniformMatrix2fvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + @Dependent("OpenGL20") + @StripPostfix("value") + void glProgramUniformMatrix3fvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " / (3 * 3)") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + @Dependent("OpenGL20") + @StripPostfix("value") + void glProgramUniformMatrix4fvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 4") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + /* + OpenGL 2.1: New uniform matrix commands add "Program" prefix to + name and add initial "uint program" parameter + */ + + @Dependent("OpenGL21") + @StripPostfix("value") + void glProgramUniformMatrix2x3fvEXT(@GLuint int program, int location, + @AutoSize(value = "value", expression = " / (2 * 3)") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + @Dependent("OpenGL21") + @StripPostfix("value") + void glProgramUniformMatrix3x2fvEXT(@GLuint int program, int location, + @AutoSize(value = "value", expression = " / (3 * 2)") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + @Dependent("OpenGL21") + @StripPostfix("value") + void glProgramUniformMatrix2x4fvEXT(@GLuint int program, int location, + @AutoSize(value = "value", expression = " >> 3") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + @Dependent("OpenGL21") + @StripPostfix("value") + void glProgramUniformMatrix4x2fvEXT(@GLuint int program, int location, + @AutoSize(value = "value", expression = " >> 3") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + @Dependent("OpenGL21") + @StripPostfix("value") + void glProgramUniformMatrix3x4fvEXT(@GLuint int program, int location, + @AutoSize(value = "value", expression = " / (3 * 4)") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + @Dependent("OpenGL21") + @StripPostfix("value") + void glProgramUniformMatrix4x3fvEXT(@GLuint int program, int location, + @AutoSize(value = "value", expression = " / (4 * 3)") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + /* + EXT_texture_buffer_object: New texture buffer object command + replaces "Tex" in name with "Texture" and adds initial "uint texture" + parameter + */ + + @Dependent("GL_EXT_texture_buffer_object") + void glTextureBufferEXT(@GLuint int texture, @GLenum int target, @GLenum int internalformat, @GLuint int buffer); + + /* + EXT_texture_buffer_object: New multitexture texture buffer command + prefixes "Multi" before "Tex" and add an initial "enum texunit" + parameter (to identify the texture unit) + */ + + @Dependent("GL_EXT_texture_buffer_object") + void glMultiTexBufferEXT(@GLenum int texunit, @GLenum int target, @GLenum int internalformat, @GLuint int buffer); + + /* + EXT_texture_integer: New integer texture object commands and queries + replace "Tex" in name with "Texture" and add initial "uint texture" + parameter + */ + + @Dependent("GL_EXT_texture_integer") + @StripPostfix("params") + void glTextureParameterIivEXT(@GLuint int texture, @GLenum int target, @GLenum int pname, @Check("4") @Const IntBuffer params); + + @Alternate("glTextureParameterIivEXT") + @Dependent("GL_EXT_texture_integer") + @StripPostfix("param") + void glTextureParameterIivEXT(@GLuint int texture, @GLenum int target, @GLenum int pname, @Constant(value = "APIUtil.getInt(caps, param)", keepParam = true) int param); + + @Dependent("GL_EXT_texture_integer") + @StripPostfix("params") + void glTextureParameterIuivEXT(@GLuint int texture, @GLenum int target, @GLenum int pname, @Check("4") @Const @GLuint IntBuffer params); + + @Alternate("glTextureParameterIuivEXT") + @Dependent("GL_EXT_texture_integer") + @StripPostfix("param") + void glTextureParameterIuivEXT(@GLuint int texture, @GLenum int target, @GLenum int pname, @Constant(value = "APIUtil.getInt(caps, param)", keepParam = true) @GLuint int param); + + @Dependent("GL_EXT_texture_integer") + @StripPostfix("params") + void glGetTextureParameterIivEXT(@GLuint int texture, @GLenum int target, @GLenum int pname, @Check("4") @OutParameter IntBuffer params); + + @Alternate("glGetTextureParameterIivEXT") + @GLreturn("params") + @Dependent("GL_EXT_texture_integer") + @StripPostfix(value = "params", postfix = "v") + void glGetTextureParameterIivEXT2(@GLuint int texture, @GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + @Dependent("GL_EXT_texture_integer") + @StripPostfix("params") + void glGetTextureParameterIuivEXT(@GLuint int texture, @GLenum int target, @GLenum int pname, @Check("4") @OutParameter @GLuint IntBuffer params); + + @Alternate("glGetTextureParameterIuivEXT") + @GLreturn("params") + @Dependent("GL_EXT_texture_integer") + @StripPostfix(value = "params", postfix = "v") + void glGetTextureParameterIuivEXT2(@GLuint int texture, @GLenum int target, @GLenum int pname, @OutParameter @GLuint IntBuffer params); + + /* + EXT_texture_integer: New multitexture integer texture commands and + queries prefix "Multi" before "Tex" and add an initial "enum texunit" + parameter (to identify the texture unit) + */ + + @Dependent("GL_EXT_texture_integer") + @StripPostfix("params") + void glMultiTexParameterIivEXT(@GLenum int texunit, @GLenum int target, @GLenum int pname, @Check("4") @Const IntBuffer params); + + @Alternate("glMultiTexParameterIivEXT") + @Dependent("GL_EXT_texture_integer") + @StripPostfix("param") + void glMultiTexParameterIivEXT(@GLenum int texunit, @GLenum int target, @GLenum int pname, @Constant(value = "APIUtil.getInt(caps, param)", keepParam = true) int param); + + @Dependent("GL_EXT_texture_integer") + @StripPostfix("params") + void glMultiTexParameterIuivEXT(@GLenum int texunit, @GLenum int target, @GLenum int pname, @Check("4") @Const @GLuint IntBuffer params); + + @Alternate("glMultiTexParameterIuivEXT") + @Dependent("GL_EXT_texture_integer") + @StripPostfix("param") + void glMultiTexParameterIuivEXT(@GLenum int texunit, @GLenum int target, @GLenum int pname, @Constant(value = "APIUtil.getInt(caps, param)", keepParam = true) int param); + + @Dependent("GL_EXT_texture_integer") + @StripPostfix("params") + void glGetMultiTexParameterIivEXT(@GLenum int texunit, @GLenum int target, @GLenum int pname, @Check("4") @OutParameter IntBuffer params); + + @Alternate("glGetMultiTexParameterIivEXT") + @GLreturn("params") + @Dependent("GL_EXT_texture_integer") + @StripPostfix(value = "params", postfix = "v") + void glGetMultiTexParameterIivEXT2(@GLenum int texunit, @GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + @Dependent("GL_EXT_texture_integer") + @StripPostfix("params") + void glGetMultiTexParameterIuivEXT(@GLenum int texunit, @GLenum int target, @GLenum int pname, @Check("4") @OutParameter @GLuint IntBuffer params); + + @Alternate("glGetMultiTexParameterIuivEXT") + @GLreturn("params") + @Dependent("GL_EXT_texture_integer") + @StripPostfix(value = "params", postfix = "v") + void glGetMultiTexParameterIuivEXT2(@GLenum int texunit, @GLenum int target, @GLenum int pname, @OutParameter @GLuint IntBuffer params); + + /* + EXT_gpu_shader4: New integer uniform commands add "Program" prefix + to name and add initial "uint program" parameter + */ + + @Dependent("GL_EXT_gpu_shader4") + void glProgramUniform1uiEXT(@GLuint int program, int location, @GLuint int v0); + + @Dependent("GL_EXT_gpu_shader4") + void glProgramUniform2uiEXT(@GLuint int program, int location, @GLuint int v0, @GLuint int v1); + + @Dependent("GL_EXT_gpu_shader4") + void glProgramUniform3uiEXT(@GLuint int program, int location, @GLuint int v0, @GLuint int v1, @GLuint int v2); + + @Dependent("GL_EXT_gpu_shader4") + void glProgramUniform4uiEXT(@GLuint int program, int location, @GLuint int v0, @GLuint int v1, @GLuint int v2, @GLuint int v3); + + @Dependent("GL_EXT_gpu_shader4") + @StripPostfix("value") + void glProgramUniform1uivEXT(@GLuint int program, int location, @AutoSize(value = "value") @GLsizei int count, @Const @GLuint IntBuffer value); + + @Dependent("GL_EXT_gpu_shader4") + @StripPostfix("value") + void glProgramUniform2uivEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const @GLuint IntBuffer value); + + @Dependent("GL_EXT_gpu_shader4") + @StripPostfix("value") + void glProgramUniform3uivEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const @GLuint IntBuffer value); + + @Dependent("GL_EXT_gpu_shader4") + @StripPostfix("value") + void glProgramUniform4uivEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const @GLuint IntBuffer value); + + /* + EXT_gpu_program_parameters: New program command adds "Named" prefix + to name and adds "uint program" parameter + */ + + @Dependent("GL_EXT_gpu_program_parameters") + @StripPostfix("params") + void glNamedProgramLocalParameters4fvEXT(@GLuint int program, @GLenum int target, @GLuint int index, + @AutoSize(value = "params", expression = " >> 2") @GLsizei int count, @Const FloatBuffer params); + + /* + NV_gpu_program4: New program commands and queries add "Named" + prefix to name and replace "enum target" with "uint program" + */ + + @Dependent("GL_NV_gpu_program4") + void glNamedProgramLocalParameterI4iEXT(@GLuint int program, @GLenum int target, @GLuint int index, int x, int y, int z, int w); + + @Dependent("GL_NV_gpu_program4") + @StripPostfix("params") + void glNamedProgramLocalParameterI4ivEXT(@GLuint int program, @GLenum int target, @GLuint int index, @Check("4") @Const IntBuffer params); + + @Dependent("GL_NV_gpu_program4") + @StripPostfix("params") + void glNamedProgramLocalParametersI4ivEXT(@GLuint int program, @GLenum int target, @GLuint int index, + @AutoSize(value = "params", expression = " >> 2") @GLsizei int count, @Const IntBuffer params); + + @Dependent("GL_NV_gpu_program4") + void glNamedProgramLocalParameterI4uiEXT(@GLuint int program, @GLenum int target, @GLuint int index, @GLuint int x, @GLuint int y, @GLuint int z, @GLuint int w); + + @Dependent("GL_NV_gpu_program4") + @StripPostfix("params") + void glNamedProgramLocalParameterI4uivEXT(@GLuint int program, @GLenum int target, @GLuint int index, @Check("4") @Const @GLuint IntBuffer params); + + @Dependent("GL_NV_gpu_program4") + @StripPostfix("params") + void glNamedProgramLocalParametersI4uivEXT(@GLuint int program, @GLenum int target, @GLuint int index, + @AutoSize(value = "params", expression = " >> 2") @GLsizei int count, @Const @GLuint IntBuffer params); + + @Dependent("GL_NV_gpu_program4") + @StripPostfix("params") + void glGetNamedProgramLocalParameterIivEXT(@GLuint int program, @GLenum int target, @GLuint int index, @Check("4") @OutParameter IntBuffer params); + + @Dependent("GL_NV_gpu_program4") + @StripPostfix("params") + void glGetNamedProgramLocalParameterIuivEXT(@GLuint int program, @GLenum int target, @GLuint int index, @Check("4") @OutParameter @GLuint IntBuffer params); + + /* + OpenGL 3.0: New renderbuffer commands add "Named" prefix to name + and replace "enum target" with "uint renderbuffer" + */ + + @Dependent("OpenGL30,GL_EXT_framebuffer_object") + void glNamedRenderbufferStorageEXT(@GLuint int renderbuffer, @GLenum int internalformat, @GLsizei int width, @GLsizei int height); + + @Dependent("OpenGL30,GL_EXT_framebuffer_object") + @StripPostfix("params") + void glGetNamedRenderbufferParameterivEXT(@GLuint int renderbuffer, @GLenum int pname, @Check("4") @OutParameter IntBuffer params); + + @Alternate("glGetNamedRenderbufferParameterivEXT") + @GLreturn("params") + @Dependent("OpenGL30,GL_EXT_framebuffer_object") + @StripPostfix("params") + void glGetNamedRenderbufferParameterivEXT2(@GLuint int renderbuffer, @GLenum int pname, @OutParameter IntBuffer params); + + /* + EXT_framebuffer_multisample: New renderbuffer commands add "Named" + prefix to name and replace "enum target" with "uint renderbuffer" + */ + + @Dependent("OpenGL30,GL_EXT_framebuffer_multisample") + void glNamedRenderbufferStorageMultisampleEXT(@GLuint int renderbuffer, @GLsizei int samples, @GLenum int internalformat, @GLsizei int width, @GLsizei int height); + + /* + NV_framebuffer_multisample_coverage: New renderbuffer commands + add "Named" prefix to name and replace "enum target" with "uint + renderbuffer" + */ + + @Dependent("GL_NV_framebuffer_multisample_coverage") + void glNamedRenderbufferStorageMultisampleCoverageEXT(@GLuint int renderbuffer, @GLsizei int coverageSamples, @GLsizei int colorSamples, @GLenum int internalformat, @GLsizei int width, @GLsizei int height); + + /* + OpenGL 3.0: New framebuffer commands add "Named" prefix to name + and replace "enum target" with "uint framebuffer" + */ + + @Dependent("OpenGL30,GL_EXT_framebuffer_object") + @GLenum + int glCheckNamedFramebufferStatusEXT(@GLuint int framebuffer, @GLenum int target); + + @Dependent("OpenGL30,GL_EXT_framebuffer_object") + void glNamedFramebufferTexture1DEXT(@GLuint int framebuffer, @GLenum int attachment, @GLenum int textarget, @GLuint int texture, int level); + + @Dependent("OpenGL30,GL_EXT_framebuffer_object") + void glNamedFramebufferTexture2DEXT(@GLuint int framebuffer, @GLenum int attachment, @GLenum int textarget, @GLuint int texture, int level); + + @Dependent("OpenGL30,GL_EXT_framebuffer_object") + void glNamedFramebufferTexture3DEXT(@GLuint int framebuffer, @GLenum int attachment, @GLenum int textarget, @GLuint int texture, int level, int zoffset); + + @Dependent("OpenGL30,GL_EXT_framebuffer_object") + void glNamedFramebufferRenderbufferEXT(@GLuint int framebuffer, @GLenum int attachment, @GLenum int renderbuffertarget, @GLuint int renderbuffer); + + @Dependent("OpenGL30,GL_EXT_framebuffer_object") + @StripPostfix("params") + void glGetNamedFramebufferAttachmentParameterivEXT(@GLuint int framebuffer, @GLenum int attachment, @GLenum int pname, @Check("4") @OutParameter IntBuffer params); + + @Alternate("glGetNamedFramebufferAttachmentParameterivEXT") + @GLreturn("params") + @Dependent("OpenGL30,GL_EXT_framebuffer_object") + @StripPostfix("params") + void glGetNamedFramebufferAttachmentParameterivEXT2(@GLuint int framebuffer, @GLenum int attachment, @GLenum int pname, @OutParameter IntBuffer params); + + /* + OpenGL 3.0: New texture commands add "Texture" within name and + replace "enum target" with "uint texture" + */ + + @Dependent("OpenGL30,GL_EXT_framebuffer_object") + void glGenerateTextureMipmapEXT(@GLuint int texture, @GLenum int target); + + /* + OpenGL 3.0: New texture commands add "MultiTex" within name and + replace "enum target" with "enum texunit" + */ + + @Dependent("OpenGL30,GL_EXT_framebuffer_object") + void glGenerateMultiTexMipmapEXT(@GLenum int texunit, @GLenum int target); + + /* + OpenGL 3.0: New framebuffer commands + */ + + @Dependent("OpenGL30,GL_EXT_framebuffer_object") + void glFramebufferDrawBufferEXT(@GLuint int framebuffer, @GLenum int mode); + + @Dependent("OpenGL30,GL_EXT_framebuffer_object") + void glFramebufferDrawBuffersEXT(@GLuint int framebuffer, @AutoSize("bufs") @GLsizei int n, @Const @GLenum IntBuffer bufs); + + @Dependent("OpenGL30,GL_EXT_framebuffer_object") + void glFramebufferReadBufferEXT(@GLuint int framebuffer, @GLenum int mode); + + /* + OpenGL 3.0: New framebuffer query + */ + + @Dependent("OpenGL30,GL_EXT_framebuffer_object") + @StripPostfix("param") + void glGetFramebufferParameterivEXT(@GLuint int framebuffer, @GLenum int pname, @Check("4") @OutParameter IntBuffer param); + + @Alternate("glGetFramebufferParameterivEXT") + @GLreturn("param") + @Dependent("OpenGL30,GL_EXT_framebuffer_object") + @StripPostfix("param") + void glGetFramebufferParameterivEXT2(@GLuint int framebuffer, @GLenum int pname, @OutParameter IntBuffer param); + + /* + OpenGL 3.1: New buffer data copy command + */ + + @Dependent("OpenGL31,GL_ARB_copy_buffer") + void glNamedCopyBufferSubDataEXT(@GLuint int readBuffer, @GLuint int writeBuffer, @GLintptr long readoffset, @GLintptr long writeoffset, @GLsizeiptr long size); + + /* + EXT_geometry_shader4 or NV_geometry_program4: New framebuffer commands + add "Named" prefix to name and replace "enum target" with "uint + framebuffer" + */ + + @Dependent("GL_EXT_geometry_shader4,GL_NV_geometry_program4") + void glNamedFramebufferTextureEXT(@GLuint int framebuffer, @GLenum int attachment, @GLuint int texture, int level); + + @Dependent("GL_EXT_geometry_shader4,GL_NV_geometry_program4") + void glNamedFramebufferTextureLayerEXT(@GLuint int framebuffer, @GLenum int attachment, @GLuint int texture, int level, int layer); + + @Dependent("GL_EXT_geometry_shader4,GL_NV_geometry_program4") + void glNamedFramebufferTextureFaceEXT(@GLuint int framebuffer, @GLenum int attachment, @GLuint int texture, int level, @GLenum int face); + + /* + NV_explicit_multisample: New texture renderbuffer object command + replaces "Tex" in name with "Texture" and add initial "uint texture" + parameter + */ + + @Dependent("GL_NV_explicit_multisample") + void glTextureRenderbufferEXT(@GLuint int texture, @GLenum int target, @GLuint int renderbuffer); + + /* + NV_explicit_multisample: New multitexture texture renderbuffer command + prefixes "Multi" before "Tex" and add an initial "enum texunit" + parameter (to identify the texture unit) + */ + + @Dependent("GL_NV_explicit_multisample") + void glMultiTexRenderbufferEXT(@GLenum int texunit, @GLenum int target, @GLuint int renderbuffer); + + /* + OpenGL 3.0: New vertex array specification commands for vertex + array objects prefix "VertexArray", add initial "uint vaobj" and + "uint buffer" parameters, change "Pointer" suffix to "Offset", + and change the final parameter from "const void *" to "intptr offset" + */ + + @Dependent("OpenGL30") + @DeprecatedGL + void glVertexArrayVertexOffsetEXT(@GLuint int vaobj, @GLuint int buffer, int size, @GLenum int type, @GLsizei int stride, @GLintptr long offset); + + @Dependent("OpenGL30") + @DeprecatedGL + void glVertexArrayColorOffsetEXT(@GLuint int vaobj, @GLuint int buffer, int size, @GLenum int type, @GLsizei int stride, @GLintptr long offset); + + @Dependent("OpenGL30") + @DeprecatedGL + void glVertexArrayEdgeFlagOffsetEXT(@GLuint int vaobj, @GLuint int buffer, @GLsizei int stride, @GLintptr long offset); + + @Dependent("OpenGL30") + void glVertexArrayIndexOffsetEXT(@GLuint int vaobj, @GLuint int buffer, @GLenum int type, @GLsizei int stride, @GLintptr long offset); + + @Dependent("OpenGL30") + @DeprecatedGL + void glVertexArrayNormalOffsetEXT(@GLuint int vaobj, @GLuint int buffer, @GLenum int type, @GLsizei int stride, @GLintptr long offset); + + @Dependent("OpenGL30") + @DeprecatedGL + void glVertexArrayTexCoordOffsetEXT(@GLuint int vaobj, @GLuint int buffer, int size, @GLenum int type, @GLsizei int stride, @GLintptr long offset); + + @Dependent("OpenGL30") + @DeprecatedGL + void glVertexArrayMultiTexCoordOffsetEXT(@GLuint int vaobj, @GLuint int buffer, @GLenum int texunit, int size, @GLenum int type, @GLsizei int stride, @GLintptr long offset); + + @Dependent("OpenGL30") + @DeprecatedGL + void glVertexArrayFogCoordOffsetEXT(@GLuint int vaobj, @GLuint int buffer, @GLenum int type, @GLsizei int stride, @GLintptr long offset); + + @Dependent("OpenGL30") + @DeprecatedGL + void glVertexArraySecondaryColorOffsetEXT(@GLuint int vaobj, @GLuint int buffer, int size, @GLenum int type, @GLsizei int stride, @GLintptr long offset); + + @Dependent("OpenGL30") + void glVertexArrayVertexAttribOffsetEXT(@GLuint int vaobj, @GLuint int buffer, @GLuint int index, int size, @GLenum int type, boolean normalized, @GLsizei int stride, @GLintptr long offset); + + @Dependent("OpenGL30") + void glVertexArrayVertexAttribIOffsetEXT(@GLuint int vaobj, @GLuint int buffer, @GLuint int index, int size, @GLenum int type, @GLsizei int stride, @GLintptr long offset); + + /* + OpenGL 3.0: New vertex array enable commands for vertex array + objects change "ClientState" to "VertexArray" and add an initial + "uint vaobj" parameter + */ + + @Dependent("OpenGL30") + void glEnableVertexArrayEXT(@GLuint int vaobj, @GLenum int array); + + @Dependent("OpenGL30") + void glDisableVertexArrayEXT(@GLuint int vaobj, @GLenum int array); + + /* + OpenGL 3.0: New vertex attrib array enable commands for vertex + array objects change "VertexAttribArray" to "VertexArrayAttrib" + and add an initial "uint vaobj" parameter + */ + + @Dependent("OpenGL30") + void glEnableVertexArrayAttribEXT(@GLuint int vaobj, @GLuint int index); + + @Dependent("OpenGL30") + void glDisableVertexArrayAttribEXT(@GLuint int vaobj, @GLuint int index); + + /* + OpenGL 3.0: New queries for vertex array objects + */ + + @Dependent("OpenGL30") + @StripPostfix("param") + void glGetVertexArrayIntegervEXT(@GLuint int vaobj, @GLenum int pname, @OutParameter @Check("16") IntBuffer param); + + @Alternate("glGetVertexArrayIntegervEXT") + @GLreturn("param") + @Dependent("OpenGL30") + @StripPostfix("param") + void glGetVertexArrayIntegervEXT2(@GLuint int vaobj, @GLenum int pname, @OutParameter IntBuffer param); + + @Dependent("OpenGL30") + @StripPostfix("param") + void glGetVertexArrayPointervEXT(@GLuint int vaobj, @GLenum int pname, @Result @GLvoid ByteBuffer param); + + @Dependent("OpenGL30") + @StripPostfix(value = "param") + void glGetVertexArrayIntegeri_vEXT(@GLuint int vaobj, @GLuint int index, @GLenum int pname, @OutParameter @Check("16") IntBuffer param); + + @Alternate("glGetVertexArrayIntegeri_vEXT") + @GLreturn("param") + @Dependent("OpenGL30") + @StripPostfix(value = "param", postfix = "_v") + void glGetVertexArrayIntegeri_vEXT2(@GLuint int vaobj, @GLuint int index, @GLenum int pname, @OutParameter IntBuffer param); + + @Dependent("OpenGL30") + @StripPostfix(value = "param") + void glGetVertexArrayPointeri_vEXT(@GLuint int vaobj, @GLuint int index, @GLenum int pname, @Result @GLvoid ByteBuffer param); + + /* + OpenGL 3.0: New buffer commands replace "Buffer" with "NamedBuffer" + in name and replace "enum target" parameter with "uint buffer" + */ + + /** + * glMapNamedBufferRangeEXT maps a GL buffer object range to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapNamedBufferRangeEXT like this: + *

+ * ByteBuffer mapped_buffer; mapped_buffer = glMapNamedBufferRangeEXT(..., ..., ..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapNamedBufferRangeEXT(..., ..., ..., ..., mapped_buffer); + *

+ * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + * + * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. + * + * @return A ByteBuffer representing the mapped buffer memory. + */ + @Dependent("OpenGL30") + @CachedResult(isRange = true) + @GLvoid + @AutoSize("length") + ByteBuffer glMapNamedBufferRangeEXT(@GLuint int buffer, @GLintptr long offset, @GLsizeiptr long length, @GLbitfield int access); + + @Dependent("OpenGL30") + void glFlushMappedNamedBufferRangeEXT(@GLuint int buffer, @GLintptr long offset, @GLsizeiptr long length); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_draw_buffers2.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_draw_buffers2.java new file mode 100644 index 0000000..b03be19 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_draw_buffers2.java @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.GLboolean; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLreturn; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.IntBuffer; +import java.nio.ByteBuffer; + +public interface EXT_draw_buffers2 { + + void glColorMaskIndexedEXT(@GLuint int buf, boolean r, boolean g, boolean b, boolean a); + + @StripPostfix("data") + void glGetBooleanIndexedvEXT(@GLenum int value, @GLuint int index, @OutParameter @Check("4") @GLboolean ByteBuffer data); + + @Alternate("glGetBooleanIndexedvEXT") + @GLreturn("data") + @StripPostfix("data") + void glGetBooleanIndexedvEXT2(@GLenum int value, @GLuint int index, @OutParameter @GLboolean ByteBuffer data); + + @StripPostfix("data") + void glGetIntegerIndexedvEXT(@GLenum int value, @GLuint int index, @OutParameter @Check("4") IntBuffer data); + + @Alternate("glGetIntegerIndexedvEXT") + @GLreturn("data") + @StripPostfix("data") + void glGetIntegerIndexedvEXT2(@GLenum int value, @GLuint int index, @OutParameter IntBuffer data); + + void glEnableIndexedEXT(@GLenum int target, @GLuint int index); + + void glDisableIndexedEXT(@GLenum int target, @GLuint int index); + + boolean glIsEnabledIndexedEXT(@GLenum int target, @GLuint int index); + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_draw_instanced.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_draw_instanced.java new file mode 100644 index 0000000..70838e8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_draw_instanced.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.Buffer; + +public interface EXT_draw_instanced { + + void glDrawArraysInstancedEXT(@GLenum int mode, int first, @GLsizei int count, @GLsizei int primcount); + + void glDrawElementsInstancedEXT(@GLenum int mode, @AutoSize("indices") @GLsizei int count, @AutoType("indices") @GLenum int type, + @BufferObject(BufferKind.ElementVBO) + @Const + @GLubyte + @GLushort + @GLuint Buffer indices, @GLsizei int primcount); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_draw_range_elements.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_draw_range_elements.java new file mode 100644 index 0000000..73ea3b6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_draw_range_elements.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.*; + +public interface EXT_draw_range_elements { + int GL_MAX_ELEMENTS_VERTICES_EXT = 0x80E8; + int GL_MAX_ELEMENTS_INDICES_EXT = 0x80E9; + + void glDrawRangeElementsEXT(@GLenum int mode, @GLuint int start, @GLuint int end, @AutoSize("pIndices") @GLsizei int count, @AutoType("pIndices") @GLenum int type, + @BufferObject(BufferKind.ElementVBO) + @Const + @GLubyte + @GLushort + @GLuint Buffer pIndices); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_fog_coord.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_fog_coord.java new file mode 100644 index 0000000..b7bf860 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_fog_coord.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLdouble; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLfloat; +import org.lwjgl.util.generator.opengl.GLsizei; + +import java.nio.*; + +public interface EXT_fog_coord { + int GL_FOG_COORDINATE_SOURCE_EXT = 0x8450; + int GL_FOG_COORDINATE_EXT = 0x8451; + int GL_FRAGMENT_DEPTH_EXT = 0x8452; + int GL_CURRENT_FOG_COORDINATE_EXT = 0x8453; + int GL_FOG_COORDINATE_ARRAY_TYPE_EXT = 0x8454; + int GL_FOG_COORDINATE_ARRAY_STRIDE_EXT = 0x8455; + int GL_FOG_COORDINATE_ARRAY_POINTER_EXT = 0x8456; + int GL_FOG_COORDINATE_ARRAY_EXT = 0x8457; + + void glFogCoordfEXT(float coord); + + void glFogCoorddEXT(double coord); + + void glFogCoordPointerEXT(@AutoType("data") @GLenum int type, @GLsizei int stride, + @CachedReference + @BufferObject(BufferKind.ArrayVBO) + @Check + @Const + @GLfloat + @GLdouble Buffer data); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_framebuffer_blit.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_framebuffer_blit.java new file mode 100644 index 0000000..97490c3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_framebuffer_blit.java @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLbitfield; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLint; + +public interface EXT_framebuffer_blit { + + /** + Accepted by the <target> parameter of BindFramebufferEXT, + CheckFramebufferStatusEXT, FramebufferTexture{1D|2D|3D}EXT, + FramebufferRenderbufferEXT, and + GetFramebufferAttachmentParameterivEXT. + */ + int GL_READ_FRAMEBUFFER_EXT = 0x8CA8; + int GL_DRAW_FRAMEBUFFER_EXT = 0x8CA9; + + /** + Accepted by the <pname> parameters of GetIntegerv, GetFloatv, and GetDoublev. + */ + int GL_DRAW_FRAMEBUFFER_BINDING_EXT = 0x8CA6; // alias FRAMEBUFFER_BINDING_EXT + int GL_READ_FRAMEBUFFER_BINDING_EXT = 0x8CAA; + + /** + Transfers a rectangle of pixel values from one + region of the read framebuffer to another in the draw framebuffer. + <mask> is the bitwise OR of a number of values indicating which + buffers are to be copied. The values are COLOR_BUFFER_BIT, + DEPTH_BUFFER_BIT, and STENCIL_BUFFER_BIT. + The pixels corresponding to these buffers are + copied from the source rectangle, bound by the locations (srcX0, + srcY0) and (srcX1, srcY1) inclusive, to the destination rectangle, + bound by the locations (dstX0, dstY0) and (dstX1, dstY1) + inclusive. + If the source and destination rectangle dimensions do not match, + the source image is stretched to fit the destination + rectangle. <filter> must be LINEAR or NEAREST and specifies the + method of interpolation to be applied if the image is + stretched. + */ + void glBlitFramebufferEXT( + @GLint int srcX0, @GLint int srcY0, @GLint int srcX1, @GLint int srcY1, + @GLint int dstX0, @GLint int dstY0, @GLint int dstX1, @GLint int dstY1, + @GLbitfield int mask, @GLenum int filter); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_framebuffer_multisample.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_framebuffer_multisample.java new file mode 100644 index 0000000..6ec87fc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_framebuffer_multisample.java @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; + +public interface EXT_framebuffer_multisample { + + /** Accepted by the <pname> parameter of GetRenderbufferParameterivEXT. */ + int GL_RENDERBUFFER_SAMPLES_EXT = 0x8CAB; + + /** Returned by CheckFramebufferStatusEXT. */ + int GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT = 0x8D56; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev. + */ + int GL_MAX_SAMPLES_EXT = 0x8D57; + + /** + * Establishes the data storage, format, dimensions, and number of + * samples of a renderbuffer object's image. + */ + void glRenderbufferStorageMultisampleEXT( + @GLenum int target, @GLsizei int samples, + @GLenum int internalformat, + @GLsizei int width, @GLsizei int height); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_framebuffer_multisample_blit_scaled.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_framebuffer_multisample_blit_scaled.java new file mode 100644 index 0000000..73c9ff7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_framebuffer_multisample_blit_scaled.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface EXT_framebuffer_multisample_blit_scaled { + + /** Accepted by the <filter> parameter of BlitFramebuffer: */ + int GL_SCALED_RESOLVE_FASTEST_EXT = 0x90BA, + GL_SCALED_RESOLVE_NICEST_EXT = 0x90BB; + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_framebuffer_object.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_framebuffer_object.java new file mode 100644 index 0000000..502fa24 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_framebuffer_object.java @@ -0,0 +1,208 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLreturn; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.IntBuffer; + +public interface EXT_framebuffer_object { + + /** + * Accepted by the <target> parameter of BindFramebufferEXT, + * CheckFramebufferStatusEXT, FramebufferTexture{1D|2D|3D}EXT, and + * FramebufferRenderbufferEXT: + */ + int GL_FRAMEBUFFER_EXT = 0x8D40; + + /** + * Accepted by the <target> parameter of BindRenderbufferEXT, + * RenderbufferStorageEXT, and GetRenderbufferParameterivEXT, and + * returned by GetFramebufferAttachmentParameterivEXT: + */ + int GL_RENDERBUFFER_EXT = 0x8D41; + + /** + * Accepted by the <internalformat> parameter of + * RenderbufferStorageEXT: + */ + int GL_STENCIL_INDEX1_EXT = 0x8D46; + int GL_STENCIL_INDEX4_EXT = 0x8D47; + int GL_STENCIL_INDEX8_EXT = 0x8D48; + int GL_STENCIL_INDEX16_EXT = 0x8D49; + + /** Accepted by the <pname> parameter of GetRenderbufferParameterivEXT: */ + int GL_RENDERBUFFER_WIDTH_EXT = 0x8D42; + int GL_RENDERBUFFER_HEIGHT_EXT = 0x8D43; + int GL_RENDERBUFFER_INTERNAL_FORMAT_EXT = 0x8D44; + int GL_RENDERBUFFER_RED_SIZE_EXT = 0x8D50; + int GL_RENDERBUFFER_GREEN_SIZE_EXT = 0x8D51; + int GL_RENDERBUFFER_BLUE_SIZE_EXT = 0x8D52; + int GL_RENDERBUFFER_ALPHA_SIZE_EXT = 0x8D53; + int GL_RENDERBUFFER_DEPTH_SIZE_EXT = 0x8D54; + int GL_RENDERBUFFER_STENCIL_SIZE_EXT = 0x8D55; + + /** + * Accepted by the <pname> parameter of + * GetFramebufferAttachmentParameterivEXT: + */ + int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT = 0x8CD0; + int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT = 0x8CD1; + int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT = 0x8CD2; + int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT = 0x8CD3; + int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT = 0x8CD4; + + /** + * Accepted by the <attachment> parameter of + * FramebufferTexture{1D|2D|3D}EXT, FramebufferRenderbufferEXT, and + * GetFramebufferAttachmentParameterivEXT + */ + int GL_COLOR_ATTACHMENT0_EXT = 0x8CE0; + int GL_COLOR_ATTACHMENT1_EXT = 0x8CE1; + int GL_COLOR_ATTACHMENT2_EXT = 0x8CE2; + int GL_COLOR_ATTACHMENT3_EXT = 0x8CE3; + int GL_COLOR_ATTACHMENT4_EXT = 0x8CE4; + int GL_COLOR_ATTACHMENT5_EXT = 0x8CE5; + int GL_COLOR_ATTACHMENT6_EXT = 0x8CE6; + int GL_COLOR_ATTACHMENT7_EXT = 0x8CE7; + int GL_COLOR_ATTACHMENT8_EXT = 0x8CE8; + int GL_COLOR_ATTACHMENT9_EXT = 0x8CE9; + int GL_COLOR_ATTACHMENT10_EXT = 0x8CEA; + int GL_COLOR_ATTACHMENT11_EXT = 0x8CEB; + int GL_COLOR_ATTACHMENT12_EXT = 0x8CEC; + int GL_COLOR_ATTACHMENT13_EXT = 0x8CED; + int GL_COLOR_ATTACHMENT14_EXT = 0x8CEE; + int GL_COLOR_ATTACHMENT15_EXT = 0x8CEF; + int GL_DEPTH_ATTACHMENT_EXT = 0x8D00; + int GL_STENCIL_ATTACHMENT_EXT = 0x8D20; + + /** Returned by CheckFramebufferStatusEXT(): */ + int GL_FRAMEBUFFER_COMPLETE_EXT = 0x8CD5; + int GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT = 0x8CD6; + int GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT = 0x8CD7; + int GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT = 0x8CD9; + int GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT = 0x8CDA; + int GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT = 0x8CDB; + int GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT = 0x8CDC; + int GL_FRAMEBUFFER_UNSUPPORTED_EXT = 0x8CDD; + + /** Accepted by GetIntegerv(): */ + int GL_FRAMEBUFFER_BINDING_EXT = 0x8CA6; + int GL_RENDERBUFFER_BINDING_EXT = 0x8CA7; + int GL_MAX_COLOR_ATTACHMENTS_EXT = 0x8CDF; + int GL_MAX_RENDERBUFFER_SIZE_EXT = 0x84E8; + + /** Returned by GetError(): */ + int GL_INVALID_FRAMEBUFFER_OPERATION_EXT = 0x0506; + + boolean glIsRenderbufferEXT(@GLuint int renderbuffer); + + void glBindRenderbufferEXT(@GLenum int target, @GLuint int renderbuffer); + + void glDeleteRenderbuffersEXT(@AutoSize("renderbuffers") int n, @Const @GLuint IntBuffer renderbuffers); + + @Alternate("glDeleteRenderbuffersEXT") + void glDeleteRenderbuffersEXT(@Constant("1") int n, @Constant(value = "APIUtil.getInt(caps, renderbuffer)", keepParam = true) int renderbuffer); + + void glGenRenderbuffersEXT(@AutoSize("renderbuffers") int n, @OutParameter @GLuint IntBuffer renderbuffers); + + @Alternate("glGenRenderbuffersEXT") + @GLreturn("renderbuffers") + void glGenRenderbuffersEXT2(@Constant("1") int n, @OutParameter @GLuint IntBuffer renderbuffers); + + void glRenderbufferStorageEXT(@GLenum int target, @GLenum int internalformat, @GLsizei int width, @GLsizei int height); + + @StripPostfix("params") + void glGetRenderbufferParameterivEXT(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetRenderbufferParameteriEXT} instead. */ + @Alternate("glGetRenderbufferParameterivEXT") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "EXTFramebufferObject", method = "glGetRenderbufferParameteriEXT") + @Deprecated + void glGetRenderbufferParameterivEXT2(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + @Alternate("glGetRenderbufferParameterivEXT") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetRenderbufferParameterivEXT3(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + boolean glIsFramebufferEXT(@GLuint int framebuffer); + + void glBindFramebufferEXT(@GLenum int target, @GLuint int framebuffer); + + void glDeleteFramebuffersEXT(@AutoSize("framebuffers") int n, @Const @GLuint IntBuffer framebuffers); + + @Alternate("glDeleteFramebuffersEXT") + void glDeleteFramebuffersEXT(@Constant("1") int n, @Constant(value = "APIUtil.getInt(caps, framebuffer)", keepParam = true) int framebuffer); + + void glGenFramebuffersEXT(@AutoSize("framebuffers") int n, @OutParameter @GLuint IntBuffer framebuffers); + + @Alternate("glGenFramebuffersEXT") + @GLreturn("framebuffers") + void glGenFramebuffersEXT2(@Constant("1") int n, @OutParameter @GLuint IntBuffer framebuffers); + + @GLenum + int glCheckFramebufferStatusEXT(@GLenum int target); + + void glFramebufferTexture1DEXT(@GLenum int target, @GLenum int attachment, @GLenum int textarget, @GLuint int texture, int level); + + void glFramebufferTexture2DEXT(@GLenum int target, @GLenum int attachment, @GLenum int textarget, @GLuint int texture, int level); + + void glFramebufferTexture3DEXT(@GLenum int target, @GLenum int attachment, @GLenum int textarget, @GLuint int texture, int level, int zoffset); + + void glFramebufferRenderbufferEXT(@GLenum int target, @GLenum int attachment, @GLenum int renderbuffertarget, @GLuint int renderbuffer); + + @StripPostfix("params") + void glGetFramebufferAttachmentParameterivEXT(@GLenum int target, @GLenum int attachment, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetFramebufferAttachmentParameteriEXT} instead. */ + @Alternate("glGetFramebufferAttachmentParameterivEXT") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "EXTFramebufferObject", method = "glGetFramebufferAttachmentParameteriEXT") + @Deprecated + void glGetFramebufferAttachmentParameterivEXT2(@GLenum int target, @GLenum int attachment, @GLenum int pname, @OutParameter IntBuffer params); + + @Alternate("glGetFramebufferAttachmentParameterivEXT") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetFramebufferAttachmentParameterivEXT3(@GLenum int target, @GLenum int attachment, @GLenum int pname, @OutParameter IntBuffer params); + + void glGenerateMipmapEXT(@GLenum int target); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_framebuffer_sRGB.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_framebuffer_sRGB.java new file mode 100644 index 0000000..160aed0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_framebuffer_sRGB.java @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface EXT_framebuffer_sRGB { + + /** + * Accepted by the <attribList> parameter of glXChooseVisual, and by + * the <attrib> parameter of glXGetConfig: + */ + int GLX_FRAMEBUFFER_SRGB_CAPABLE_EXT = 0x20B2; + + /** + * Accepted by the <piAttributes> parameter of + * wglGetPixelFormatAttribivEXT, wglGetPixelFormatAttribfvEXT, and + * the <piAttribIList> and <pfAttribIList> of wglChoosePixelFormatEXT: + */ + int WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT = 0x20A9; + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + int GL_FRAMEBUFFER_SRGB_EXT = 0x8DB9; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_FRAMEBUFFER_SRGB_CAPABLE_EXT = 0x8DBA; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_geometry_shader4.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_geometry_shader4.java new file mode 100644 index 0000000..a12911a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_geometry_shader4.java @@ -0,0 +1,101 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface EXT_geometry_shader4 { + + /** + * Accepted by the <type> parameter of CreateShader and returned by the + * <params> parameter of GetShaderiv: + */ + int GL_GEOMETRY_SHADER_EXT = 0x8DD9; + + /** + * Accepted by the <pname> parameter of ProgramParameteriEXT and + * GetProgramiv: + */ + int GL_GEOMETRY_VERTICES_OUT_EXT = 0x8DDA; + int GL_GEOMETRY_INPUT_TYPE_EXT = 0x8DDB; + int GL_GEOMETRY_OUTPUT_TYPE_EXT = 0x8DDC; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS_EXT = 0x8C29; + int GL_MAX_GEOMETRY_VARYING_COMPONENTS_EXT = 0x8DDD; + int GL_MAX_VERTEX_VARYING_COMPONENTS_EXT = 0x8DDE; + int GL_MAX_VARYING_COMPONENTS_EXT = 0x8B4B; + int GL_MAX_GEOMETRY_UNIFORM_COMPONENTS_EXT = 0x8DDF; + int GL_MAX_GEOMETRY_OUTPUT_VERTICES_EXT = 0x8DE0; + int GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS_EXT = 0x8DE1; + + /** + * Accepted by the <mode> parameter of Begin, DrawArrays, + * MultiDrawArrays, DrawElements, MultiDrawElements, and + * DrawRangeElements: + */ + int GL_LINES_ADJACENCY_EXT = 0xA; + int GL_LINE_STRIP_ADJACENCY_EXT = 0xB; + int GL_TRIANGLES_ADJACENCY_EXT = 0xC; + int GL_TRIANGLE_STRIP_ADJACENCY_EXT = 0xD; + + /** Returned by CheckFramebufferStatusEXT: */ + int GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT = 0x8DA8; + int GL_FRAMEBUFFER_INCOMPLETE_LAYER_COUNT_EXT = 0x8DA9; + + /** + * Accepted by the <pname> parameter of GetFramebufferAttachment- + * ParameterivEXT: + */ + int GL_FRAMEBUFFER_ATTACHMENT_LAYERED_EXT = 0x8DA7; + int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT = 0x8CD4; + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, + * and by the <pname> parameter of GetIntegerv, GetFloatv, GetDoublev, + * and GetBooleanv: + */ + int GL_PROGRAM_POINT_SIZE_EXT = 0x8642; + + void glProgramParameteriEXT(@GLuint int program, @GLenum int pname, int value); + + void glFramebufferTextureEXT(@GLenum int target, @GLenum int attachment, @GLuint int texture, int level); + + void glFramebufferTextureLayerEXT(@GLenum int target, @GLenum int attachment, @GLuint int texture, int level, int layer); + + void glFramebufferTextureFaceEXT(@GLenum int target, @GLenum int attachment, @GLuint int texture, int level, @GLenum int face); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_gpu_program_parameters.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_gpu_program_parameters.java new file mode 100644 index 0000000..a8c870b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_gpu_program_parameters.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.*; + +public interface EXT_gpu_program_parameters { + + @StripPostfix("params") + void glProgramEnvParameters4fvEXT(@GLenum int target, @GLuint int index, @GLsizei int count, @Check("count << 2") @Const FloatBuffer params); + + @StripPostfix("params") + void glProgramLocalParameters4fvEXT(@GLenum int target, @GLuint int index, @GLsizei int count, @Check("count << 2") @Const FloatBuffer params); + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_gpu_shader4.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_gpu_shader4.java new file mode 100644 index 0000000..2b6c359 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_gpu_shader4.java @@ -0,0 +1,210 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.Buffer; +import java.nio.ByteBuffer; +import java.nio.IntBuffer; +import java.nio.ShortBuffer; + +public interface EXT_gpu_shader4 { + + /** + * Accepted by the <pname> parameters of GetVertexAttribdv, + * GetVertexAttribfv, GetVertexAttribiv, GetVertexAttribIivEXT, and + * GetVertexAttribIuivEXT: + */ + int GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT = 0x88FD; + + /** Returned by the <type> parameter of GetActiveUniform: */ + + int GL_SAMPLER_1D_ARRAY_EXT = 0x8DC0; + int GL_SAMPLER_2D_ARRAY_EXT = 0x8DC1; + int GL_SAMPLER_BUFFER_EXT = 0x8DC2; + int GL_SAMPLER_1D_ARRAY_SHADOW_EXT = 0x8DC3; + int GL_SAMPLER_2D_ARRAY_SHADOW_EXT = 0x8DC4; + int GL_SAMPLER_CUBE_SHADOW_EXT = 0x8DC5; + int GL_UNSIGNED_INT_VEC2_EXT = 0x8DC6; + int GL_UNSIGNED_INT_VEC3_EXT = 0x8DC7; + int GL_UNSIGNED_INT_VEC4_EXT = 0x8DC8; + int GL_INT_SAMPLER_1D_EXT = 0x8DC9; + int GL_INT_SAMPLER_2D_EXT = 0x8DCA; + int GL_INT_SAMPLER_3D_EXT = 0x8DCB; + int GL_INT_SAMPLER_CUBE_EXT = 0x8DCC; + int GL_INT_SAMPLER_2D_RECT_EXT = 0x8DCD; + int GL_INT_SAMPLER_1D_ARRAY_EXT = 0x8DCE; + int GL_INT_SAMPLER_2D_ARRAY_EXT = 0x8DCF; + int GL_INT_SAMPLER_BUFFER_EXT = 0x8DD0; + int GL_UNSIGNED_INT_SAMPLER_1D_EXT = 0x8DD1; + int GL_UNSIGNED_INT_SAMPLER_2D_EXT = 0x8DD2; + int GL_UNSIGNED_INT_SAMPLER_3D_EXT = 0x8DD3; + int GL_UNSIGNED_INT_SAMPLER_CUBE_EXT = 0x8DD4; + int GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT = 0x8DD5; + int GL_UNSIGNED_INT_SAMPLER_1D_ARRAY_EXT = 0x8DD6; + int GL_UNSIGNED_INT_SAMPLER_2D_ARRAY_EXT = 0x8DD7; + int GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT = 0x8DD8; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + int GL_MIN_PROGRAM_TEXEL_OFFSET_EXT = 0x8904; + int GL_MAX_PROGRAM_TEXEL_OFFSET_EXT = 0x8905; + + @NoErrorCheck + void glVertexAttribI1iEXT(@GLuint int index, int x); + + @NoErrorCheck + void glVertexAttribI2iEXT(@GLuint int index, int x, int y); + + @NoErrorCheck + void glVertexAttribI3iEXT(@GLuint int index, int x, int y, int z); + + @NoErrorCheck + void glVertexAttribI4iEXT(@GLuint int index, int x, int y, int z, int w); + + @NoErrorCheck + void glVertexAttribI1uiEXT(@GLuint int index, @GLuint int x); + + @NoErrorCheck + void glVertexAttribI2uiEXT(@GLuint int index, @GLuint int x, @GLuint int y); + + @NoErrorCheck + void glVertexAttribI3uiEXT(@GLuint int index, @GLuint int x, @GLuint int y, @GLuint int z); + + @NoErrorCheck + void glVertexAttribI4uiEXT(@GLuint int index, @GLuint int x, @GLuint int y, @GLuint int z, @GLuint int w); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribI1ivEXT(@GLuint int index, @Check("1") @Const IntBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribI2ivEXT(@GLuint int index, @Check("2") @Const IntBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribI3ivEXT(@GLuint int index, @Check("3") @Const IntBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribI4ivEXT(@GLuint int index, @Check("4") @Const IntBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribI1uivEXT(@GLuint int index, @Check("1") @Const @GLuint IntBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribI2uivEXT(@GLuint int index, @Check("2") @Const @GLuint IntBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribI3uivEXT(@GLuint int index, @Check("3") @Const @GLuint IntBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribI4uivEXT(@GLuint int index, @Check("4") @Const @GLuint IntBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribI4bvEXT(@GLuint int index, @Check("4") @Const ByteBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribI4svEXT(@GLuint int index, @Check("4") @Const ShortBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribI4ubvEXT(@GLuint int index, @Check("4") @Const @GLubyte ByteBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribI4usvEXT(@GLuint int index, @Check("4") @Const @GLushort ShortBuffer v); + + void glVertexAttribIPointerEXT(@GLuint int index, int size, @GLenum int type, @GLsizei int stride, + @CachedReference(index = "index", name = "glVertexAttribPointer_buffer") + @BufferObject(BufferKind.ArrayVBO) + @Check + @Const + @GLbyte + @GLubyte + @GLshort + @GLushort + @GLint + @GLuint Buffer buffer); + + @StripPostfix("params") + void glGetVertexAttribIivEXT(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + @StripPostfix("params") + void glGetVertexAttribIuivEXT(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") @GLuint IntBuffer params); + + void glUniform1uiEXT(int location, @GLuint int v0); + + void glUniform2uiEXT(int location, @GLuint int v0, @GLuint int v1); + + void glUniform3uiEXT(int location, @GLuint int v0, @GLuint int v1, @GLuint int v2); + + void glUniform4uiEXT(int location, @GLuint int v0, @GLuint int v1, @GLuint int v2, @GLuint int v3); + + @StripPostfix("value") + void glUniform1uivEXT(int location, @AutoSize("value") @GLsizei int count, @Const @GLuint IntBuffer value); + + @StripPostfix("value") + void glUniform2uivEXT(int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const @GLuint IntBuffer value); + + @StripPostfix("value") + void glUniform3uivEXT(int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const @GLuint IntBuffer value); + + @StripPostfix("value") + void glUniform4uivEXT(int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const @GLuint IntBuffer value); + + @StripPostfix("params") + void glGetUniformuivEXT(@GLuint int program, int location, @OutParameter @Check @GLuint IntBuffer params); + + void glBindFragDataLocationEXT(@GLuint int program, @GLuint int colorNumber, @NullTerminated @Const @GLchar ByteBuffer name); + + @Alternate("glBindFragDataLocationEXT") + void glBindFragDataLocationEXT(@GLuint int program, @GLuint int colorNumber, @NullTerminated CharSequence name); + + int glGetFragDataLocationEXT(@GLuint int program, @NullTerminated @Const @GLchar ByteBuffer name); + + @Alternate("glGetFragDataLocationEXT") + int glGetFragDataLocationEXT(@GLuint int program, @NullTerminated CharSequence name); + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_multi_draw_arrays.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_multi_draw_arrays.java new file mode 100644 index 0000000..d79249b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_multi_draw_arrays.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; + +import java.nio.*; + +public interface EXT_multi_draw_arrays { + void glMultiDrawArraysEXT(@GLenum int mode, IntBuffer piFirst, @Check("piFirst.remaining()") @GLsizei IntBuffer piCount, @AutoSize("piFirst") int primcount); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_packed_depth_stencil.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_packed_depth_stencil.java new file mode 100644 index 0000000..0f4f10d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_packed_depth_stencil.java @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface EXT_packed_depth_stencil { + + /** + Accepted by the <format> parameter of DrawPixels, ReadPixels, + TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, + TexSubImage3D, and GetTexImage, by the <type> parameter of + CopyPixels, by the <internalformat> parameter of TexImage1D, + TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and + RenderbufferStorageEXT, and returned in the <data> parameter of + GetTexLevelParameter and GetRenderbufferParameterivEXT. + */ + int GL_DEPTH_STENCIL_EXT = 0x84F9; + + /** + Accepted by the <type> parameter of DrawPixels, ReadPixels, + TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, + TexSubImage3D, and GetTexImage. + */ + int GL_UNSIGNED_INT_24_8_EXT = 0x84FA; + + /** + Accepted by the <internalformat> parameter of TexImage1D, + TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and + RenderbufferStorageEXT, and returned in the <data> parameter of + GetTexLevelParameter and GetRenderbufferParameterivEXT. + */ + int GL_DEPTH24_STENCIL8_EXT = 0x88F0; + + /** + Accepted by the <value> parameter of GetTexLevelParameter. + */ + int GL_TEXTURE_STENCIL_SIZE_EXT = 0x88F1; + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_packed_float.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_packed_float.java new file mode 100644 index 0000000..cdbed84 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_packed_float.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface EXT_packed_float { + + /** + * Accepted by the <internalformat> parameter of TexImage1D, + * TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and + * RenderbufferStorageEXT: + */ + int GL_R11F_G11F_B10F_EXT = 0x8C3A; + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, + * TexImage1D, TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, + * TexSubImage2D, TexSubImage3D, GetHistogram, GetMinmax, + * ConvolutionFilter1D, ConvolutionFilter2D, ConvolutionFilter3D, + * GetConvolutionFilter, SeparableFilter2D, GetSeparableFilter, + * ColorTable, ColorSubTable, and GetColorTable: + */ + int GL_UNSIGNED_INT_10F_11F_11F_REV_EXT = 0x8C3B; + + /** + * Accepted by the <pname> parameters of GetIntegerv, GetFloatv, and + * GetDoublev: + */ + int GL_RGBA_SIGNED_COMPONENTS_EXT = 0x8C3C; + + /** + * Accepted as a value in the <piAttribIList> and <pfAttribFList> + * parameter arrays of wglChoosePixelFormatARB, and returned in the + * <piValues> parameter array of wglGetPixelFormatAttribivARB, and the + * <pfValues> parameter array of wglGetPixelFormatAttribfvARB: + */ + int WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT = 0x20A8; + + /** + * Accepted as values of the <render_type> arguments in the + * glXCreateNewContext and glXCreateContext functions + */ + int GLX_RGBA_UNSIGNED_FLOAT_TYPE_EXT = 0x20B1; + + /** + * Returned by glXGetFBConfigAttrib (when <attribute> is set to + * GLX_RENDER_TYPE) and accepted by the <attrib_list> parameter of + * glXChooseFBConfig (following the GLX_RENDER_TYPE token): + */ + int GLX_RGBA_UNSIGNED_FLOAT_BIT_EXT = 0x00000008; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_packed_pixels.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_packed_pixels.java new file mode 100644 index 0000000..a27c59e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_packed_pixels.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface EXT_packed_pixels { + int GL_UNSIGNED_BYTE_3_3_2_EXT = 0x8032; + int GL_UNSIGNED_SHORT_4_4_4_4_EXT = 0x8033; + int GL_UNSIGNED_SHORT_5_5_5_1_EXT = 0x8034; + int GL_UNSIGNED_INT_8_8_8_8_EXT = 0x8035; + int GL_UNSIGNED_INT_10_10_10_2_EXT = 0x8036; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_paletted_texture.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_paletted_texture.java new file mode 100644 index 0000000..74b4a8b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_paletted_texture.java @@ -0,0 +1,102 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.*; + +public interface EXT_paletted_texture { + + /** + * Accepted by the internalformat parameter of TexImage1D, TexImage2D and + * TexImage3DEXT: + */ + int GL_COLOR_INDEX1_EXT = 0x80E2; + int GL_COLOR_INDEX2_EXT = 0x80E3; + int GL_COLOR_INDEX4_EXT = 0x80E4; + int GL_COLOR_INDEX8_EXT = 0x80E5; + int GL_COLOR_INDEX12_EXT = 0x80E6; + int GL_COLOR_INDEX16_EXT = 0x80E7; + + /** + * Accepted by the pname parameter of GetColorTableParameterivEXT and + * GetColorTableParameterfvEXT: + */ + int GL_COLOR_TABLE_FORMAT_EXT = 0x80D8; + int GL_COLOR_TABLE_WIDTH_EXT = 0x80D9; + int GL_COLOR_TABLE_RED_SIZE_EXT = 0x80DA; + int GL_COLOR_TABLE_GREEN_SIZE_EXT = 0x80DB; + int GL_COLOR_TABLE_BLUE_SIZE_EXT = 0x80DC; + int GL_COLOR_TABLE_ALPHA_SIZE_EXT = 0x80DD; + int GL_COLOR_TABLE_LUMINANCE_SIZE_EXT = 0x80DE; + int GL_COLOR_TABLE_INTENSITY_SIZE_EXT = 0x80DF; + + /** + * Accepted by the value parameter of GetTexLevelParameter{if}v: + */ + int GL_TEXTURE_INDEX_SIZE_EXT = 0x80ED; + + void glColorTableEXT(@GLenum int target, @GLenum int internalFormat, @GLsizei int width, @GLenum int format, @GLenum int type, + @Check("GLChecks.calculateImageStorage(data, format, type, width, 1, 1)") + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer data); + + void glColorSubTableEXT(@GLenum int target, @GLsizei int start, @GLsizei int count, @GLenum int format, @GLenum int type, + @Check("GLChecks.calculateImageStorage(data, format, type, count, 1, 1)") + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer data); + + void glGetColorTableEXT(@GLenum int target, @GLenum int format, @GLenum int type, + @OutParameter + @Check + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer data); + + @StripPostfix("params") + void glGetColorTableParameterivEXT(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + @StripPostfix("params") + void glGetColorTableParameterfvEXT(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_pixel_buffer_object.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_pixel_buffer_object.java new file mode 100644 index 0000000..237b489 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_pixel_buffer_object.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface EXT_pixel_buffer_object extends ARB_buffer_object { + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, + * GetBufferParameteriv, and GetBufferPointerv: + */ + int GL_PIXEL_PACK_BUFFER_EXT = 0x88EB; + int GL_PIXEL_UNPACK_BUFFER_EXT = 0x88EC; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_PIXEL_PACK_BUFFER_BINDING_EXT = 0x88ED; + int GL_PIXEL_UNPACK_BUFFER_BINDING_EXT = 0x88EF; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_point_parameters.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_point_parameters.java new file mode 100644 index 0000000..234a2ac --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_point_parameters.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; + +import java.nio.*; + +public interface EXT_point_parameters { + int GL_POINT_SIZE_MIN_EXT = 0x8126; + int GL_POINT_SIZE_MAX_EXT = 0x8127; + int GL_POINT_FADE_THRESHOLD_SIZE_EXT = 0x8128; + int GL_DISTANCE_ATTENUATION_EXT = 0x8129; + + void glPointParameterfEXT(@GLenum int pname, float param); + + @StripPostfix("pfParams") + void glPointParameterfvEXT(@GLenum int pname, @Check("4") @Const FloatBuffer pfParams); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_provoking_vertex.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_provoking_vertex.java new file mode 100644 index 0000000..5037f55 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_provoking_vertex.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLenum; + +public interface EXT_provoking_vertex { + + /** Accepted by the <mode> parameter of ProvokingVertexEXT: */ + int GL_FIRST_VERTEX_CONVENTION_EXT = 0x8E4D; + int GL_LAST_VERTEX_CONVENTION_EXT = 0x8E4E; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_PROVOKING_VERTEX_EXT = 0x8E4F; + int GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION_EXT = 0x8E4C; + + void glProvokingVertexEXT(@GLenum int mode); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_rescale_normal.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_rescale_normal.java new file mode 100644 index 0000000..9d38af3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_rescale_normal.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface EXT_rescale_normal { + int GL_RESCALE_NORMAL_EXT = 0x803A; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_secondary_color.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_secondary_color.java new file mode 100644 index 0000000..1d151ef --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_secondary_color.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.Buffer; + +public interface EXT_secondary_color { + + int GL_COLOR_SUM_EXT = 0x8458; + int GL_CURRENT_SECONDARY_COLOR_EXT = 0x8459; + int GL_SECONDARY_COLOR_ARRAY_SIZE_EXT = 0x845A; + int GL_SECONDARY_COLOR_ARRAY_TYPE_EXT = 0x845B; + int GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT = 0x845C; + int GL_SECONDARY_COLOR_ARRAY_POINTER_EXT = 0x845D; + int GL_SECONDARY_COLOR_ARRAY_EXT = 0x845E; + + void glSecondaryColor3bEXT(byte red, byte green, byte blue); + + void glSecondaryColor3fEXT(float red, float green, float blue); + + void glSecondaryColor3dEXT(double red, double green, double blue); + + void glSecondaryColor3ubEXT(@GLubyte byte red, @GLubyte byte green, @GLubyte byte blue); + + void glSecondaryColorPointerEXT(int size, @AutoType("pPointer") @GLenum int type, @GLsizei int stride, + @CachedReference + @BufferObject(BufferKind.ArrayVBO) + @Check + @Const + @GLbyte + @GLubyte + @GLfloat + @GLdouble Buffer pPointer); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_separate_shader_objects.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_separate_shader_objects.java new file mode 100644 index 0000000..f9a064c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_separate_shader_objects.java @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.GLchar; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.ByteBuffer; + +public interface EXT_separate_shader_objects { + + /** Accepted by <type> parameter to GetIntegerv and GetFloatv: */ + int GL_ACTIVE_PROGRAM_EXT = 0x8B8D; + + void glUseShaderProgramEXT(@GLenum int type, @GLuint int program); + + void glActiveProgramEXT(@GLuint int program); + + @GLuint int glCreateShaderProgramEXT(@GLenum int type, @NullTerminated @Const @GLchar ByteBuffer string); + + @Alternate("glCreateShaderProgramEXT") + @GLuint + int glCreateShaderProgramEXT(@GLenum int type, @NullTerminated CharSequence string); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_separate_specular_color.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_separate_specular_color.java new file mode 100644 index 0000000..e8f160f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_separate_specular_color.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface EXT_separate_specular_color { + int GL_SINGLE_COLOR_EXT = 0x81F9; + int GL_SEPARATE_SPECULAR_COLOR_EXT = 0x81FA; + int GL_LIGHT_MODEL_COLOR_CONTROL_EXT = 0x81F8; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_shader_image_load_store.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_shader_image_load_store.java new file mode 100644 index 0000000..0e13f59 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_shader_image_load_store.java @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLbitfield; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface EXT_shader_image_load_store { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_MAX_IMAGE_UNITS_EXT = 0x8F38; + int GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS_EXT = 0x8F39; + int GL_MAX_IMAGE_SAMPLES_EXT = 0x906D; + + /** Accepted by the <target> parameter of GetIntegeri_v and GetBooleani_v: */ + int GL_IMAGE_BINDING_NAME_EXT = 0x8F3A; + int GL_IMAGE_BINDING_LEVEL_EXT = 0x8F3B; + int GL_IMAGE_BINDING_LAYERED_EXT = 0x8F3C; + int GL_IMAGE_BINDING_LAYER_EXT = 0x8F3D; + int GL_IMAGE_BINDING_ACCESS_EXT = 0x8F3E; + int GL_IMAGE_BINDING_FORMAT_EXT = 0x906E; + + /** Accepted by the <barriers> parameter of MemoryBarrierEXT: */ + int GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT_EXT = 0x00000001; + int GL_ELEMENT_ARRAY_BARRIER_BIT_EXT = 0x00000002; + int GL_UNIFORM_BARRIER_BIT_EXT = 0x00000004; + int GL_TEXTURE_FETCH_BARRIER_BIT_EXT = 0x00000008; + int GL_SHADER_IMAGE_ACCESS_BARRIER_BIT_EXT = 0x00000020; + int GL_COMMAND_BARRIER_BIT_EXT = 0x00000040; + int GL_PIXEL_BUFFER_BARRIER_BIT_EXT = 0x00000080; + int GL_TEXTURE_UPDATE_BARRIER_BIT_EXT = 0x00000100; + int GL_BUFFER_UPDATE_BARRIER_BIT_EXT = 0x00000200; + int GL_FRAMEBUFFER_BARRIER_BIT_EXT = 0x00000400; + int GL_TRANSFORM_FEEDBACK_BARRIER_BIT_EXT = 0x00000800; + int GL_ATOMIC_COUNTER_BARRIER_BIT_EXT = 0x00001000; + int GL_ALL_BARRIER_BITS_EXT = 0xFFFFFFFF; + + /** Returned by the <type> parameter of GetActiveUniform: */ + int GL_IMAGE_1D_EXT = 0x904C; + int GL_IMAGE_2D_EXT = 0x904D; + int GL_IMAGE_3D_EXT = 0x904E; + int GL_IMAGE_2D_RECT_EXT = 0x904F; + int GL_IMAGE_CUBE_EXT = 0x9050; + int GL_IMAGE_BUFFER_EXT = 0x9051; + int GL_IMAGE_1D_ARRAY_EXT = 0x9052; + int GL_IMAGE_2D_ARRAY_EXT = 0x9053; + int GL_IMAGE_CUBE_MAP_ARRAY_EXT = 0x9054; + int GL_IMAGE_2D_MULTISAMPLE_EXT = 0x9055; + int GL_IMAGE_2D_MULTISAMPLE_ARRAY_EXT = 0x9056; + int GL_INT_IMAGE_1D_EXT = 0x9057; + int GL_INT_IMAGE_2D_EXT = 0x9058; + int GL_INT_IMAGE_3D_EXT = 0x9059; + int GL_INT_IMAGE_2D_RECT_EXT = 0x905A; + int GL_INT_IMAGE_CUBE_EXT = 0x905B; + int GL_INT_IMAGE_BUFFER_EXT = 0x905C; + int GL_INT_IMAGE_1D_ARRAY_EXT = 0x905D; + int GL_INT_IMAGE_2D_ARRAY_EXT = 0x905E; + int GL_INT_IMAGE_CUBE_MAP_ARRAY_EXT = 0x905F; + int GL_INT_IMAGE_2D_MULTISAMPLE_EXT = 0x9060; + int GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT = 0x9061; + int GL_UNSIGNED_INT_IMAGE_1D_EXT = 0x9062; + int GL_UNSIGNED_INT_IMAGE_2D_EXT = 0x9063; + int GL_UNSIGNED_INT_IMAGE_3D_EXT = 0x9064; + int GL_UNSIGNED_INT_IMAGE_2D_RECT_EXT = 0x9065; + int GL_UNSIGNED_INT_IMAGE_CUBE_EXT = 0x9066; + int GL_UNSIGNED_INT_IMAGE_BUFFER_EXT = 0x9067; + int GL_UNSIGNED_INT_IMAGE_1D_ARRAY_EXT = 0x9068; + int GL_UNSIGNED_INT_IMAGE_2D_ARRAY_EXT = 0x9069; + int GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY_EXT = 0x906A; + int GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_EXT = 0x906B; + int GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY_EXT = 0x906C; + + void glBindImageTextureEXT(@GLuint int index, @GLuint int texture, int level, boolean layered, int layer, @GLenum int access, int format); + + void glMemoryBarrierEXT(@GLbitfield int barriers); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_shadow_funcs.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_shadow_funcs.java new file mode 100644 index 0000000..1fd57bb --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_shadow_funcs.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface EXT_shadow_funcs { +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_shared_texture_palette.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_shared_texture_palette.java new file mode 100644 index 0000000..1014d89 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_shared_texture_palette.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface EXT_shared_texture_palette { + int GL_SHARED_TEXTURE_PALETTE_EXT = 0x81FB; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_stencil_clear_tag.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_stencil_clear_tag.java new file mode 100644 index 0000000..2e8c460 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_stencil_clear_tag.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface EXT_stencil_clear_tag { + + /** + Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + GetFloatv, and GetDoublev. + */ + int GL_STENCIL_TAG_BITS_EXT = 0x88F2; + int GL_STENCIL_CLEAR_TAG_VALUE_EXT = 0x88F3; + + /** + Controls the stencil clear tag state. stencilTagBits is a count of + the number of most-significant stencil buffer bits involved in the + stencil clear tag update. + */ + void glStencilClearTagEXT(@GLsizei int stencilTagBits, @GLuint int stencilClearTag); + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_stencil_two_side.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_stencil_two_side.java new file mode 100644 index 0000000..f687453 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_stencil_two_side.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLenum; + +public interface EXT_stencil_two_side { + int GL_STENCIL_TEST_TWO_SIDE_EXT = 0x8910; + int GL_ACTIVE_STENCIL_FACE_EXT = 0x8911; + + void glActiveStencilFaceEXT(@GLenum int face); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_stencil_wrap.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_stencil_wrap.java new file mode 100644 index 0000000..6b00c53 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_stencil_wrap.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface EXT_stencil_wrap { + int GL_INCR_WRAP_EXT = 0x8507; + int GL_DECR_WRAP_EXT = 0x8508; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_3d.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_3d.java new file mode 100644 index 0000000..a5397be --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_3d.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface EXT_texture_3d { +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_array.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_array.java new file mode 100644 index 0000000..16912e1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_array.java @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.Reuse; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface EXT_texture_array { + + /** + * Accepted by the <target> parameter of TexParameteri, TexParameteriv, + * TexParameterf, TexParameterfv, and BindTexture: + */ + int GL_TEXTURE_1D_ARRAY_EXT = 0x8C18; + int GL_TEXTURE_2D_ARRAY_EXT = 0x8C1A; + + /** + * Accepted by the <target> parameter of TexImage3D, TexSubImage3D, + * CopyTexSubImage3D, CompressedTexImage3D, and CompressedTexSubImage3D: + */ + int GL_PROXY_TEXTURE_2D_ARRAY_EXT = 0x8C1B; + + /** + * Accepted by the <target> parameter of TexImage2D, TexSubImage2D, + * CopyTexImage2D, CopyTexSubImage2D, CompressedTexImage2D, and + * CompressedTexSubImage2D: + */ + int GL_PROXY_TEXTURE_1D_ARRAY_EXT = 0x8C19; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv + * and GetFloatv: + */ + int GL_TEXTURE_BINDING_1D_ARRAY_EXT = 0x8C1C; + int GL_TEXTURE_BINDING_2D_ARRAY_EXT = 0x8C1D; + int GL_MAX_ARRAY_TEXTURE_LAYERS_EXT = 0x88FF; + + /** + * Accepted by the <param> parameter of TexParameterf, TexParameteri, + * TexParameterfv, and TexParameteriv when the <pname> parameter is + * TEXTURE_COMPARE_MODE_ARB: + */ + int GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT = 0x884E; + + /** + * Accepted by the <pname> parameter of + * GetFramebufferAttachmentParameterivEXT: + */ + int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT = 0x8CD4; + + /** Returned by the <type> parameter of GetActiveUniform: */ + int GL_SAMPLER_1D_ARRAY_EXT = 0x8DC0; + int GL_SAMPLER_2D_ARRAY_EXT = 0x8DC1; + int GL_SAMPLER_1D_ARRAY_SHADOW_EXT = 0x8DC3; + int GL_SAMPLER_2D_ARRAY_SHADOW_EXT = 0x8DC4; + + @Reuse("EXTGeometryShader4") + void glFramebufferTextureLayerEXT(@GLenum int target, @GLenum int attachment, @GLuint int texture, int level, int layer); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_buffer_object.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_buffer_object.java new file mode 100644 index 0000000..0f21dae --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_buffer_object.java @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface EXT_texture_buffer_object { + + /** + * Accepted by the <target> parameter of BindBuffer, BufferData, + * BufferSubData, MapBuffer, BindTexture, UnmapBuffer, GetBufferSubData, + * GetBufferParameteriv, GetBufferPointerv, and TexBufferEXT, and + * the <pname> parameter of GetBooleanv, GetDoublev, GetFloatv, and + * GetIntegerv: + */ + int GL_TEXTURE_BUFFER_EXT = 0x8C2A; + + /** + * Accepted by the <pname> parameters of GetBooleanv, GetDoublev, + * GetFloatv, and GetIntegerv: + */ + int GL_MAX_TEXTURE_BUFFER_SIZE_EXT = 0x8C2B; + int GL_TEXTURE_BINDING_BUFFER_EXT = 0x8C2C; + int GL_TEXTURE_BUFFER_DATA_STORE_BINDING_EXT = 0x8C2D; + int GL_TEXTURE_BUFFER_FORMAT_EXT = 0x8C2E; + + void glTexBufferEXT(@GLenum int target, @GLenum int internalformat, @GLuint int buffer); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_compression_latc.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_compression_latc.java new file mode 100644 index 0000000..927024f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_compression_latc.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.Extension; + +@Extension(postfix = "EXT", className = "EXTTextureCompressionLATC") +public interface EXT_texture_compression_latc { + + /** + * Accepted by the <internalformat> parameter of TexImage2D, + * CopyTexImage2D, and CompressedTexImage2D and the <format> parameter + * of CompressedTexSubImage2D: + */ + int GL_COMPRESSED_LUMINANCE_LATC1_EXT = 0x8C70; + int GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT = 0x8C71; + int GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT = 0x8C72; + int GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT = 0x8C73; + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_compression_rgtc.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_compression_rgtc.java new file mode 100644 index 0000000..1517a6c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_compression_rgtc.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.Extension; + +@Extension(postfix = "EXT", className = "EXTTextureCompressionRGTC") +public interface EXT_texture_compression_rgtc { + + /** + * Accepted by the <internalformat> parameter of TexImage2D, + * CopyTexImage2D, and CompressedTexImage2D and the <format> parameter + * of CompressedTexSubImage2D: + */ + int GL_COMPRESSED_RED_RGTC1_EXT = 0x8DBB; + int GL_COMPRESSED_SIGNED_RED_RGTC1_EXT = 0x8DBC; + int GL_COMPRESSED_RED_GREEN_RGTC2_EXT = 0x8DBD; + int GL_COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT = 0x8DBE; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_compression_s3tc.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_compression_s3tc.java new file mode 100644 index 0000000..d867701 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_compression_s3tc.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; + +@Extension(postfix = "EXT", className = "EXTTextureCompressionS3TC") +public interface EXT_texture_compression_s3tc { + int GL_COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0; + int GL_COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1; + int GL_COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2; + int GL_COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_env_combine.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_env_combine.java new file mode 100644 index 0000000..0d3bce1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_env_combine.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface EXT_texture_env_combine { + int GL_COMBINE_EXT = 0x8570; + int GL_COMBINE_RGB_EXT = 0x8571; + int GL_COMBINE_ALPHA_EXT = 0x8572; + int GL_SOURCE0_RGB_EXT = 0x8580; + int GL_SOURCE1_RGB_EXT = 0x8581; + int GL_SOURCE2_RGB_EXT = 0x8582; + int GL_SOURCE0_ALPHA_EXT = 0x8588; + int GL_SOURCE1_ALPHA_EXT = 0x8589; + int GL_SOURCE2_ALPHA_EXT = 0x858A; + int GL_OPERAND0_RGB_EXT = 0x8590; + int GL_OPERAND1_RGB_EXT = 0x8591; + int GL_OPERAND2_RGB_EXT = 0x8592; + int GL_OPERAND0_ALPHA_EXT = 0x8598; + int GL_OPERAND1_ALPHA_EXT = 0x8599; + int GL_OPERAND2_ALPHA_EXT = 0x859A; + int GL_RGB_SCALE_EXT = 0x8573; + int GL_ADD_SIGNED_EXT = 0x8574; + int GL_INTERPOLATE_EXT = 0x8575; + int GL_CONSTANT_EXT = 0x8576; + int GL_PRIMARY_COLOR_EXT = 0x8577; + int GL_PREVIOUS_EXT = 0x8578; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_env_dot3.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_env_dot3.java new file mode 100644 index 0000000..4346fd8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_env_dot3.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface EXT_texture_env_dot3 { + int GL_DOT3_RGB_EXT = 0x8740; + int GL_DOT3_RGBA_EXT = 0x8741; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_filter_anisotropic.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_filter_anisotropic.java new file mode 100644 index 0000000..f369dd9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_filter_anisotropic.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface EXT_texture_filter_anisotropic { + int GL_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE; + int GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_integer.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_integer.java new file mode 100644 index 0000000..6103808 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_integer.java @@ -0,0 +1,146 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLreturn; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.IntBuffer; + +public interface EXT_texture_integer { + + /** + * Accepted by the <pname> parameters of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_RGBA_INTEGER_MODE_EXT = 0x8D9E; + + /** + * Accepted by the <internalFormat> parameter of TexImage1D, + * TexImage2D, and TexImage3D: + */ + int GL_RGBA32UI_EXT = 0x8D70; + int GL_RGB32UI_EXT = 0x8D71; + int GL_ALPHA32UI_EXT = 0x8D72; + int GL_INTENSITY32UI_EXT = 0x8D73; + int GL_LUMINANCE32UI_EXT = 0x8D74; + int GL_LUMINANCE_ALPHA32UI_EXT = 0x8D75; + + int GL_RGBA16UI_EXT = 0x8D76; + int GL_RGB16UI_EXT = 0x8D77; + int GL_ALPHA16UI_EXT = 0x8D78; + int GL_INTENSITY16UI_EXT = 0x8D79; + int GL_LUMINANCE16UI_EXT = 0x8D7A; + int GL_LUMINANCE_ALPHA16UI_EXT = 0x8D7B; + + int GL_RGBA8UI_EXT = 0x8D7C; + int GL_RGB8UI_EXT = 0x8D7D; + int GL_ALPHA8UI_EXT = 0x8D7E; + int GL_INTENSITY8UI_EXT = 0x8D7F; + int GL_LUMINANCE8UI_EXT = 0x8D80; + int GL_LUMINANCE_ALPHA8UI_EXT = 0x8D81; + + int GL_RGBA32I_EXT = 0x8D82; + int GL_RGB32I_EXT = 0x8D83; + int GL_ALPHA32I_EXT = 0x8D84; + int GL_INTENSITY32I_EXT = 0x8D85; + int GL_LUMINANCE32I_EXT = 0x8D86; + int GL_LUMINANCE_ALPHA32I_EXT = 0x8D87; + + int GL_RGBA16I_EXT = 0x8D88; + int GL_RGB16I_EXT = 0x8D89; + int GL_ALPHA16I_EXT = 0x8D8A; + int GL_INTENSITY16I_EXT = 0x8D8B; + int GL_LUMINANCE16I_EXT = 0x8D8C; + int GL_LUMINANCE_ALPHA16I_EXT = 0x8D8D; + + int GL_RGBA8I_EXT = 0x8D8E; + int GL_RGB8I_EXT = 0x8D8F; + int GL_ALPHA8I_EXT = 0x8D90; + int GL_INTENSITY8I_EXT = 0x8D91; + int GL_LUMINANCE8I_EXT = 0x8D92; + int GL_LUMINANCE_ALPHA8I_EXT = 0x8D93; + + /** + * Accepted by the <format> parameter of TexImage1D, TexImage2D, + * TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, + * DrawPixels and ReadPixels: + */ + int GL_RED_INTEGER_EXT = 0x8D94; + int GL_GREEN_INTEGER_EXT = 0x8D95; + int GL_BLUE_INTEGER_EXT = 0x8D96; + int GL_ALPHA_INTEGER_EXT = 0x8D97; + int GL_RGB_INTEGER_EXT = 0x8D98; + int GL_RGBA_INTEGER_EXT = 0x8D99; + int GL_BGR_INTEGER_EXT = 0x8D9A; + int GL_BGRA_INTEGER_EXT = 0x8D9B; + int GL_LUMINANCE_INTEGER_EXT = 0x8D9C; + int GL_LUMINANCE_ALPHA_INTEGER_EXT = 0x8D9D; + + void glClearColorIiEXT(int r, int g, int b, int a); + + void glClearColorIuiEXT(@GLuint int r, @GLuint int g, @GLuint int b, @GLuint int a); + + @StripPostfix("params") + void glTexParameterIivEXT(@GLenum int target, @GLenum int pname, @Check("4") IntBuffer params); + + @Alternate("glTexParameterIivEXT") + @StripPostfix(value = "param", postfix = "v") + void glTexParameterIivEXT(@GLenum int target, @GLenum int pname, @Constant(value = "APIUtil.getInt(caps, param)", keepParam = true) int param); + + @StripPostfix("params") + void glTexParameterIuivEXT(@GLenum int target, @GLenum int pname, @Check("4") @GLuint IntBuffer params); + + @Alternate("glTexParameterIuivEXT") + @StripPostfix(value = "param", postfix = "v") + void glTexParameterIuivEXT(@GLenum int target, @GLenum int pname, @Constant(value = "APIUtil.getInt(caps, param)", keepParam = true) int param); + + @StripPostfix("params") + void glGetTexParameterIivEXT(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + @Alternate("glGetTexParameterIivEXT") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetTexParameterIivEXT2(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + @StripPostfix("params") + void glGetTexParameterIuivEXT(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") @GLuint IntBuffer params); + + @Alternate("glGetTexParameterIuivEXT") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetTexParameterIuivEXT2(@GLenum int target, @GLenum int pname, @OutParameter @GLuint IntBuffer params); + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_lod_bias.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_lod_bias.java new file mode 100644 index 0000000..d17ed9c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_lod_bias.java @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.Extension; + +@Extension(postfix = "EXT", className = "EXTTextureLODBias") +public interface EXT_texture_lod_bias { + + /** + * Accepted by the <target> parameters of GetTexEnvfv, GetTexEnviv, + * TexEnvi, TexEnvf, Texenviv, and TexEnvfv: + */ + int GL_TEXTURE_FILTER_CONTROL_EXT = 0x8500; + + /** + * When the <target> parameter of GetTexEnvfv, GetTexEnviv, TexEnvi, + * TexEnvf, TexEnviv, and TexEnvfv is TEXTURE_FILTER_CONTROL_EXT, then + * the value of <pname> may be: + */ + int GL_TEXTURE_LOD_BIAS_EXT = 0x8501; + + /** + * Accepted by the <pname> parameters of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_MAX_TEXTURE_LOD_BIAS_EXT = 0x84FD; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_mirror_clamp.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_mirror_clamp.java new file mode 100644 index 0000000..33983a0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_mirror_clamp.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface EXT_texture_mirror_clamp { + + /** + * Accepted by the <param> parameter of TexParameteri and TexParameterf, + * and by the <params> parameter of TexParameteriv and TexParameterfv, + * when their <pname> parameter is TEXTURE_WRAP_S, TEXTURE_WRAP_T, + * or TEXTURE_WRAP_R: + */ + int GL_MIRROR_CLAMP_EXT = 0x8742; + int GL_MIRROR_CLAMP_TO_EDGE_EXT = 0x8743; + int GL_MIRROR_CLAMP_TO_BORDER_EXT = 0x8912; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_rectangle.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_rectangle.java new file mode 100644 index 0000000..caa73fe --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_rectangle.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface EXT_texture_rectangle { + int GL_TEXTURE_RECTANGLE_EXT = 0x84F5; + int GL_TEXTURE_BINDING_RECTANGLE_EXT = 0x84F6; + int GL_PROXY_TEXTURE_RECTANGLE_EXT = 0x84F7; + int GL_MAX_RECTANGLE_TEXTURE_SIZE_EXT = 0x84F8; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_sRGB.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_sRGB.java new file mode 100644 index 0000000..e03d496 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_sRGB.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface EXT_texture_sRGB { + + /** + Accepted by the <internalformat> parameter of TexImage1D, TexImage2D, + TexImage3D, CopyTexImage1D, CopyTexImage2D. + */ + int GL_SRGB_EXT = 0x8C40; + int GL_SRGB8_EXT = 0x8C41; + int GL_SRGB_ALPHA_EXT = 0x8C42; + int GL_SRGB8_ALPHA8_EXT = 0x8C43; + int GL_SLUMINANCE_ALPHA_EXT = 0x8C44; + int GL_SLUMINANCE8_ALPHA8_EXT = 0x8C45; + int GL_SLUMINANCE_EXT = 0x8C46; + int GL_SLUMINANCE8_EXT = 0x8C47; + int GL_COMPRESSED_SRGB_EXT = 0x8C48; + int GL_COMPRESSED_SRGB_ALPHA_EXT = 0x8C49; + int GL_COMPRESSED_SLUMINANCE_EXT = 0x8C4A; + int GL_COMPRESSED_SLUMINANCE_ALPHA_EXT = 0x8C4B; + + /** + Accepted by the <internalformat> parameter of TexImage2D, + CopyTexImage2D, and CompressedTexImage2DARB and the <format> parameter + of CompressedTexSubImage2DARB. + */ + int GL_COMPRESSED_SRGB_S3TC_DXT1_EXT = 0x8C4C; + int GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT = 0x8C4D; + int GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT = 0x8C4E; + int GL_COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT = 0x8C4F; + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_sRGB_decode.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_sRGB_decode.java new file mode 100644 index 0000000..b843e30 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_sRGB_decode.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2002-2010 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface EXT_texture_sRGB_decode { + + /** + * Accepted by the <pname> parameter of TexParameterf, TexParameteri, + * GetTexParameterfv, GetTexParameteriv, SamplerParameteri, + * SamplerParameterf, SamplerParameteriv, SamplerParameterfv, + * SamplerParameterIiv, SamplerParameterIuiv, GetSamplerParameteriv, + * GetSamplerParameterfv, GetSamplerParameterIiv, and GetSamplerParameterIuiv: + */ + int GL_TEXTURE_SRGB_DECODE_EXT = 0x8A48; + + /** + * Accepted by the <enum> parameter of TexParameterf, TexParameteri, + * SamplerParameteri, SamplerParameterf, SamplerParameteriv, SamplerParameterfv, + * SamplerParameterIiv and SamplerParameterIuiv: + */ + int GL_DECODE_EXT = 0x8A49, + GL_SKIP_DECODE_EXT = 0x8A4A; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_shared_exponent.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_shared_exponent.java new file mode 100644 index 0000000..6d660d9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_shared_exponent.java @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface EXT_texture_shared_exponent { + + /** + * Accepted by the <internalformat> parameter of TexImage1D, + * TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and + * RenderbufferStorageEXT: + */ + int GL_RGB9_E5_EXT = 0x8C3D; + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, + * TexImage1D, TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, + * TexSubImage2D, TexSubImage3D, GetHistogram, GetMinmax, + * ConvolutionFilter1D, ConvolutionFilter2D, ConvolutionFilter3D, + * GetConvolutionFilter, SeparableFilter2D, GetSeparableFilter, + * ColorTable, ColorSubTable, and GetColorTable: + */ + int GL_UNSIGNED_INT_5_9_9_9_REV_EXT = 0x8C3E; + + /** + * Accepted by the <pname> parameter of GetTexLevelParameterfv and + * GetTexLevelParameteriv: + */ + int GL_TEXTURE_SHARED_SIZE_EXT = 0x8C3F; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_snorm.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_snorm.java new file mode 100644 index 0000000..7782cc0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_snorm.java @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface EXT_texture_snorm { + + /** + * Accepted by the <internalFormat> parameter of TexImage1D, + * TexImage2D, and TexImage3D: + */ + int GL_RED_SNORM = 0x8F90; + int GL_RG_SNORM = 0x8F91; + int GL_RGB_SNORM = 0x8F92; + int GL_RGBA_SNORM = 0x8F93; + int GL_ALPHA_SNORM = 0x9010; + int GL_LUMINANCE_SNORM = 0x9011; + int GL_LUMINANCE_ALPHA_SNORM = 0x9012; + int GL_INTENSITY_SNORM = 0x9013; + + int GL_R8_SNORM = 0x8F94; + int GL_RG8_SNORM = 0x8F95; + int GL_RGB8_SNORM = 0x8F96; + int GL_RGBA8_SNORM = 0x8F97; + int GL_ALPHA8_SNORM = 0x9014; + int GL_LUMINANCE8_SNORM = 0x9015; + int GL_LUMINANCE8_ALPHA8_SNORM = 0x9016; + int GL_INTENSITY8_SNORM = 0x9017; + + int GL_R16_SNORM = 0x8F98; + int GL_RG16_SNORM = 0x8F99; + int GL_RGB16_SNORM = 0x8F9A; + int GL_RGBA16_SNORM = 0x8F9B; + int GL_ALPHA16_SNORM = 0x9018; + int GL_LUMINANCE16_SNORM = 0x9019; + int GL_LUMINANCE16_ALPHA16_SNORM = 0x901A; + int GL_INTENSITY16_SNORM = 0x901B; + + /** Returned by GetTexLevelParmeter */ + int GL_SIGNED_NORMALIZED = 0x8F9C; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_swizzle.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_swizzle.java new file mode 100644 index 0000000..48939b3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_texture_swizzle.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface EXT_texture_swizzle { + + /** + * Accepted by the <pname> parameters of TexParameteri, + * TexParameterf, TexParameteriv, TexParameterfv, + * GetTexParameterfv, and GetTexParameteriv: + */ + int GL_TEXTURE_SWIZZLE_R_EXT = 0x8E42; + int GL_TEXTURE_SWIZZLE_G_EXT = 0x8E43; + int GL_TEXTURE_SWIZZLE_B_EXT = 0x8E44; + int GL_TEXTURE_SWIZZLE_A_EXT = 0x8E45; + + /** + * Accepted by the <pname> parameters of TexParameteriv, + * TexParameterfv, GetTexParameterfv, and GetTexParameteriv: + */ + int GL_TEXTURE_SWIZZLE_RGBA_EXT = 0x8E46; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_timer_query.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_timer_query.java new file mode 100644 index 0000000..897aeeb --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_timer_query.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.*; + +public interface EXT_timer_query { + + /** + * Accepted by the <target> parameter of BeginQuery, EndQuery, and + * GetQueryiv: + */ + int GL_TIME_ELAPSED_EXT = 0x88BF; + + @StripPostfix("params") + void glGetQueryObjecti64vEXT(@GLuint int id, @GLenum int pname, @OutParameter @Check("1") @GLint64EXT LongBuffer params); + + @Alternate("glGetQueryObjecti64vEXT") + @GLreturn("params") + @StripPostfix("params") + void glGetQueryObjecti64vEXT2(@GLuint int id, @GLenum int pname, @OutParameter @GLint64EXT LongBuffer params); + + @StripPostfix("params") + void glGetQueryObjectui64vEXT(@GLuint int id, @GLenum int pname, @OutParameter @Check("1") @GLuint64EXT LongBuffer params); + + @Alternate("glGetQueryObjectui64vEXT") + @GLreturn("params") + @StripPostfix("params") + void glGetQueryObjectui64vEXT2(@GLuint int id, @GLenum int pname, @OutParameter @GLuint64EXT LongBuffer params); + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_transform_feedback.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_transform_feedback.java new file mode 100644 index 0000000..fd766da --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_transform_feedback.java @@ -0,0 +1,129 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +public interface EXT_transform_feedback { + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, + * GetBufferPointerv, BindBufferRangeEXT, BindBufferOffsetEXT and + * BindBufferBaseEXT: + */ + int GL_TRANSFORM_FEEDBACK_BUFFER_EXT = 0x8C8E; + + /** + * Accepted by the <param> parameter of GetIntegerIndexedvEXT and + * GetBooleanIndexedvEXT: + */ + int GL_TRANSFORM_FEEDBACK_BUFFER_START_EXT = 0x8C84; + int GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_EXT = 0x8C85; + + /** + * Accepted by the <param> parameter of GetIntegerIndexedvEXT and + * GetBooleanIndexedvEXT, and by the <pname> parameter of GetBooleanv, + * GetDoublev, GetIntegerv, and GetFloatv: + */ + int GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_EXT = 0x8C8F; + + /** Accepted by the <bufferMode> parameter of TransformFeedbackVaryingsEXT: */ + int GL_INTERLEAVED_ATTRIBS_EXT = 0x8C8C; + int GL_SEPARATE_ATTRIBS_EXT = 0x8C8D; + + /** + * Accepted by the <target> parameter of BeginQuery, EndQuery, and + * GetQueryiv: + */ + int GL_PRIMITIVES_GENERATED_EXT = 0x8C87; + int GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_EXT = 0x8C88; + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, and by + * the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev: + */ + int GL_RASTERIZER_DISCARD_EXT = 0x8C89; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv, + * and GetFloatv: + */ + int GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_EXT = 0x8C8A; + int GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_EXT = 0x8C8B; + int GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_EXT = 0x8C80; + + /** Accepted by the <pname> parameter of GetProgramiv: */ + int GL_TRANSFORM_FEEDBACK_VARYINGS_EXT = 0x8C83; + int GL_TRANSFORM_FEEDBACK_BUFFER_MODE_EXT = 0x8C7F; + int GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH_EXT = 0x8C76; + + void glBindBufferRangeEXT(@GLenum int target, @GLuint int index, @GLuint int buffer, @GLintptr long offset, @GLsizeiptr long size); + + void glBindBufferOffsetEXT(@GLenum int target, @GLuint int index, @GLuint int buffer, @GLintptr long offset); + + void glBindBufferBaseEXT(@GLenum int target, @GLuint int index, @GLuint int buffer); + + void glBeginTransformFeedbackEXT(@GLenum int primitiveMode); + + void glEndTransformFeedbackEXT(); + + void glTransformFeedbackVaryingsEXT(@GLuint int program, @GLsizei int count, + @Const @NullTerminated("count") @GLchar @PointerArray("count") ByteBuffer varyings, + @GLenum int bufferMode); + + @Alternate("glTransformFeedbackVaryingsEXT") + void glTransformFeedbackVaryingsEXT(@GLuint int program, @Constant("varyings.length") @GLsizei int count, + @Const @NullTerminated @PointerArray("count") CharSequence[] varyings, + @GLenum int bufferMode); + + void glGetTransformFeedbackVaryingEXT(@GLuint int program, @GLuint int index, @AutoSize("name") @GLsizei int bufSize, + @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length, + @OutParameter @GLsizei @Check("1") IntBuffer size, + @OutParameter @GLenum @Check("1") IntBuffer type, + @OutParameter @GLchar ByteBuffer name); + + @Alternate("glGetTransformFeedbackVaryingEXT") + @GLreturn(value = "name", maxLength = "bufSize") + void glGetTransformFeedbackVaryingEXT2(@GLuint int program, @GLuint int index, @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(name_length)") IntBuffer length, + @OutParameter @GLsizei @Check("1") IntBuffer size, + @OutParameter @GLenum @Check("1") IntBuffer type, + @OutParameter @GLchar ByteBuffer name); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_vertex_array_bgra.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_vertex_array_bgra.java new file mode 100644 index 0000000..3e96161 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_vertex_array_bgra.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface EXT_vertex_array_bgra { + + /** + * Accepted by the <size> parameter of ColorPointer, + * SecondaryColorPointer, and VertexAttribPointer: + */ + int GL_BGRA = 0x80E1; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_vertex_attrib_64bit.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_vertex_attrib_64bit.java new file mode 100644 index 0000000..8e5c075 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_vertex_attrib_64bit.java @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.Buffer; +import java.nio.DoubleBuffer; + +@Dependent +public interface EXT_vertex_attrib_64bit { + + /** Returned in the <type> parameter of GetActiveAttrib: */ + int GL_DOUBLE_VEC2_EXT = 0x8FFC; + int GL_DOUBLE_VEC3_EXT = 0x8FFD; + int GL_DOUBLE_VEC4_EXT = 0x8FFE; + int GL_DOUBLE_MAT2_EXT = 0x8F46; + int GL_DOUBLE_MAT3_EXT = 0x8F47; + int GL_DOUBLE_MAT4_EXT = 0x8F48; + int GL_DOUBLE_MAT2x3_EXT = 0x8F49; + int GL_DOUBLE_MAT2x4_EXT = 0x8F4A; + int GL_DOUBLE_MAT3x2_EXT = 0x8F4B; + int GL_DOUBLE_MAT3x4_EXT = 0x8F4C; + int GL_DOUBLE_MAT4x2_EXT = 0x8F4D; + int GL_DOUBLE_MAT4x3_EXT = 0x8F4E; + + void glVertexAttribL1dEXT(@GLuint int index, double x); + + void glVertexAttribL2dEXT(@GLuint int index, double x, double y); + + void glVertexAttribL3dEXT(@GLuint int index, double x, double y, double z); + + void glVertexAttribL4dEXT(@GLuint int index, double x, double y, double z, double w); + + @StripPostfix("v") + void glVertexAttribL1dvEXT(@GLuint int index, @Const @Check("1") DoubleBuffer v); + + @StripPostfix("v") + void glVertexAttribL2dvEXT(@GLuint int index, @Const @Check("2") DoubleBuffer v); + + @StripPostfix("v") + void glVertexAttribL3dvEXT(@GLuint int index, @Const @Check("3") DoubleBuffer v); + + @StripPostfix("v") + void glVertexAttribL4dvEXT(@GLuint int index, @Const @Check("4") DoubleBuffer v); + + void glVertexAttribLPointerEXT(@GLuint int index, int size, @Constant("GL11.GL_DOUBLE") @GLenum int type, @GLsizei int stride, + @CachedReference(index = "index", name = "glVertexAttribPointer_buffer") + @BufferObject(BufferKind.ArrayVBO) + @Check @Const @GLdouble Buffer pointer); + + @StripPostfix("params") + void glGetVertexAttribLdvEXT(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") DoubleBuffer params); + + @Reuse("ARBVertexAttrib64bit") + @Dependent("GL_EXT_direct_state_access") + void glVertexArrayVertexAttribLOffsetEXT(@GLuint int vaobj, @GLuint int buffer, @GLuint int index, int size, @GLenum int type, @GLsizei int stride, @GLintptr long offset); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_vertex_shader.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_vertex_shader.java new file mode 100644 index 0000000..9834ad8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_vertex_shader.java @@ -0,0 +1,291 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.*; + +public interface EXT_vertex_shader { + int GL_VERTEX_SHADER_EXT = 0x8780; + int GL_VERTEX_SHADER_BINDING_EXT = 0x8781; + int GL_OP_INDEX_EXT = 0x8782; + int GL_OP_NEGATE_EXT = 0x8783; + int GL_OP_DOT3_EXT = 0x8784; + int GL_OP_DOT4_EXT = 0x8785; + int GL_OP_MUL_EXT = 0x8786; + int GL_OP_ADD_EXT = 0x8787; + int GL_OP_MADD_EXT = 0x8788; + int GL_OP_FRAC_EXT = 0x8789; + int GL_OP_MAX_EXT = 0x878A; + int GL_OP_MIN_EXT = 0x878B; + int GL_OP_SET_GE_EXT = 0x878C; + int GL_OP_SET_LT_EXT = 0x878D; + int GL_OP_CLAMP_EXT = 0x878E; + int GL_OP_FLOOR_EXT = 0x878F; + int GL_OP_ROUND_EXT = 0x8790; + int GL_OP_EXP_BASE_2_EXT = 0x8791; + int GL_OP_LOG_BASE_2_EXT = 0x8792; + int GL_OP_POWER_EXT = 0x8793; + int GL_OP_RECIP_EXT = 0x8794; + int GL_OP_RECIP_SQRT_EXT = 0x8795; + int GL_OP_SUB_EXT = 0x8796; + int GL_OP_CROSS_PRODUCT_EXT = 0x8797; + int GL_OP_MULTIPLY_MATRIX_EXT = 0x8798; + int GL_OP_MOV_EXT = 0x8799; + int GL_OUTPUT_VERTEX_EXT = 0x879A; + int GL_OUTPUT_COLOR0_EXT = 0x879B; + int GL_OUTPUT_COLOR1_EXT = 0x879C; + int GL_OUTPUT_TEXTURE_COORD0_EXT = 0x879D; + int GL_OUTPUT_TEXTURE_COORD1_EXT = 0x879E; + int GL_OUTPUT_TEXTURE_COORD2_EXT = 0x879F; + int GL_OUTPUT_TEXTURE_COORD3_EXT = 0x87A0; + int GL_OUTPUT_TEXTURE_COORD4_EXT = 0x87A1; + int GL_OUTPUT_TEXTURE_COORD5_EXT = 0x87A2; + int GL_OUTPUT_TEXTURE_COORD6_EXT = 0x87A3; + int GL_OUTPUT_TEXTURE_COORD7_EXT = 0x87A4; + int GL_OUTPUT_TEXTURE_COORD8_EXT = 0x87A5; + int GL_OUTPUT_TEXTURE_COORD9_EXT = 0x87A6; + int GL_OUTPUT_TEXTURE_COORD10_EXT = 0x87A7; + int GL_OUTPUT_TEXTURE_COORD11_EXT = 0x87A8; + int GL_OUTPUT_TEXTURE_COORD12_EXT = 0x87A9; + int GL_OUTPUT_TEXTURE_COORD13_EXT = 0x87AA; + int GL_OUTPUT_TEXTURE_COORD14_EXT = 0x87AB; + int GL_OUTPUT_TEXTURE_COORD15_EXT = 0x87AC; + int GL_OUTPUT_TEXTURE_COORD16_EXT = 0x87AD; + int GL_OUTPUT_TEXTURE_COORD17_EXT = 0x87AE; + int GL_OUTPUT_TEXTURE_COORD18_EXT = 0x87AF; + int GL_OUTPUT_TEXTURE_COORD19_EXT = 0x87B0; + int GL_OUTPUT_TEXTURE_COORD20_EXT = 0x87B1; + int GL_OUTPUT_TEXTURE_COORD21_EXT = 0x87B2; + int GL_OUTPUT_TEXTURE_COORD22_EXT = 0x87B3; + int GL_OUTPUT_TEXTURE_COORD23_EXT = 0x87B4; + int GL_OUTPUT_TEXTURE_COORD24_EXT = 0x87B5; + int GL_OUTPUT_TEXTURE_COORD25_EXT = 0x87B6; + int GL_OUTPUT_TEXTURE_COORD26_EXT = 0x87B7; + int GL_OUTPUT_TEXTURE_COORD27_EXT = 0x87B8; + int GL_OUTPUT_TEXTURE_COORD28_EXT = 0x87B9; + int GL_OUTPUT_TEXTURE_COORD29_EXT = 0x87BA; + int GL_OUTPUT_TEXTURE_COORD30_EXT = 0x87BB; + int GL_OUTPUT_TEXTURE_COORD31_EXT = 0x87BC; + int GL_OUTPUT_FOG_EXT = 0x87BD; + int GL_SCALAR_EXT = 0x87BE; + int GL_VECTOR_EXT = 0x87BF; + int GL_MATRIX_EXT = 0x87C0; + int GL_VARIANT_EXT = 0x87C1; + int GL_INVARIANT_EXT = 0x87C2; + int GL_LOCAL_CONSTANT_EXT = 0x87C3; + int GL_LOCAL_EXT = 0x87C4; + int GL_MAX_VERTEX_SHADER_INSTRUCTIONS_EXT = 0x87C5; + int GL_MAX_VERTEX_SHADER_VARIANTS_EXT = 0x87C6; + int GL_MAX_VERTEX_SHADER_INVARIANTS_EXT = 0x87C7; + int GL_MAX_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = 0x87C8; + int GL_MAX_VERTEX_SHADER_LOCALS_EXT = 0x87C9; + int GL_MAX_OPTIMIZED_VERTEX_SHADER_INSTRUCTIONS_EXT = 0x87CA; + int GL_MAX_OPTIMIZED_VERTEX_SHADER_VARIANTS_EXT = 0x87CB; + int GL_MAX_OPTIMIZED_VERTEX_SHADER_INVARIANTS_EXT = 0x87CC; + int GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = 0x87CD; + int GL_MAX_OPTIMIZED_VERTEX_SHADER_LOCALS_EXT = 0x87CE; + int GL_VERTEX_SHADER_INSTRUCTIONS_EXT = 0x87CF; + int GL_VERTEX_SHADER_VARIANTS_EXT = 0x87D0; + int GL_VERTEX_SHADER_INVARIANTS_EXT = 0x87D1; + int GL_VERTEX_SHADER_LOCAL_CONSTANTS_EXT = 0x87D2; + int GL_VERTEX_SHADER_LOCALS_EXT = 0x87D3; + int GL_VERTEX_SHADER_OPTIMIZED_EXT = 0x87D4; + int GL_X_EXT = 0x87D5; + int GL_Y_EXT = 0x87D6; + int GL_Z_EXT = 0x87D7; + int GL_W_EXT = 0x87D8; + int GL_NEGATIVE_X_EXT = 0x87D9; + int GL_NEGATIVE_Y_EXT = 0x87DA; + int GL_NEGATIVE_Z_EXT = 0x87DB; + int GL_NEGATIVE_W_EXT = 0x87DC; + int GL_ZERO_EXT = 0x87DD; + int GL_ONE_EXT = 0x87DE; + int GL_NEGATIVE_ONE_EXT = 0x87DF; + int GL_NORMALIZED_RANGE_EXT = 0x87E0; + int GL_FULL_RANGE_EXT = 0x87E1; + int GL_CURRENT_VERTEX_EXT = 0x87E2; + int GL_MVP_MATRIX_EXT = 0x87E3; + int GL_VARIANT_VALUE_EXT = 0x87E4; + int GL_VARIANT_DATATYPE_EXT = 0x87E5; + int GL_VARIANT_ARRAY_STRIDE_EXT = 0x87E6; + int GL_VARIANT_ARRAY_TYPE_EXT = 0x87E7; + int GL_VARIANT_ARRAY_EXT = 0x87E8; + int GL_VARIANT_ARRAY_POINTER_EXT = 0x87E9; + int GL_INVARIANT_VALUE_EXT = 0x87EA; + int GL_INVARIANT_DATATYPE_EXT = 0x87EB; + int GL_LOCAL_CONSTANT_VALUE_EXT = 0x87EC; + int GL_LOCAL_CONSTANT_DATATYPE_EXT = 0x87ED; + + void glBeginVertexShaderEXT(); + + void glEndVertexShaderEXT(); + + void glBindVertexShaderEXT(@GLuint int id); + + @GLuint + int glGenVertexShadersEXT(@GLuint int range); + + void glDeleteVertexShaderEXT(@GLuint int id); + + void glShaderOp1EXT(@GLenum int op, @GLuint int res, @GLuint int arg1); + + void glShaderOp2EXT(@GLenum int op, @GLuint int res, @GLuint int arg1, @GLuint int arg2); + + void glShaderOp3EXT(@GLenum int op, @GLuint int res, @GLuint int arg1, @GLuint int arg2, @GLuint int arg3); + + void glSwizzleEXT(@GLuint int res, @GLuint int in, @GLenum int outX, @GLenum int outY, @GLenum int outZ, @GLenum int outW); + + void glWriteMaskEXT(@GLuint int res, @GLuint int in, @GLenum int outX, @GLenum int outY, @GLenum int outZ, @GLenum int outW); + + void glInsertComponentEXT(@GLuint int res, @GLuint int src, @GLuint int num); + + void glExtractComponentEXT(@GLuint int res, @GLuint int src, @GLuint int num); + + @GLuint + int glGenSymbolsEXT(@GLenum int dataType, @GLenum int storageType, @GLenum int range, @GLuint int components); + + void glSetInvariantEXT(@GLuint int id, @AutoType("pAddr") @GLenum int type, + @Check("4") + @Const + @GLbyte + @GLubyte + @GLshort + @GLushort + @GLint + @GLuint + @GLfloat + @GLdouble Buffer pAddr); + + void glSetLocalConstantEXT(@GLuint int id, @AutoType("pAddr") @GLenum int type, + @Check("4") + @Const + @GLbyte + @GLubyte + @GLshort + @GLushort + @GLint + @GLuint + @GLfloat + @GLdouble Buffer pAddr); + + @StripPostfix("pAddr") + void glVariantbvEXT(@GLuint int id, @Check("4") @Const ByteBuffer pAddr); + + @StripPostfix("pAddr") + void glVariantsvEXT(@GLuint int id, @Check("4") @Const ShortBuffer pAddr); + + @StripPostfix("pAddr") + void glVariantivEXT(@GLuint int id, @Check("4") @Const IntBuffer pAddr); + + @StripPostfix("pAddr") + void glVariantfvEXT(@GLuint int id, @Check("4") @Const FloatBuffer pAddr); + + @StripPostfix("pAddr") + void glVariantdvEXT(@GLuint int id, @Check("4") @Const DoubleBuffer pAddr); + + @StripPostfix("pAddr") + void glVariantubvEXT(@GLuint int id, @Check("4") @Const @GLubyte ByteBuffer pAddr); + + @StripPostfix("pAddr") + void glVariantusvEXT(@GLuint int id, @Check("4") @Const @GLushort ShortBuffer pAddr); + + @StripPostfix("pAddr") + void glVariantuivEXT(@GLuint int id, @Check("4") @Const @GLuint IntBuffer pAddr); + + void glVariantPointerEXT(@GLuint int id, @AutoType("pAddr") @GLenum int type, @GLuint int stride, + @CachedReference + @BufferObject(BufferKind.ArrayVBO) + @Check + @Const + @GLbyte + @GLshort + @GLint + @GLubyte + @GLushort + @GLuint + @GLfloat + @GLdouble Buffer pAddr); + + void glEnableVariantClientStateEXT(@GLuint int id); + + void glDisableVariantClientStateEXT(@GLuint int id); + + @GLuint + int glBindLightParameterEXT(@GLenum int light, @GLenum int value); + + @GLuint + int glBindMaterialParameterEXT(@GLenum int face, @GLenum int value); + + @GLuint + int glBindTexGenParameterEXT(@GLenum int unit, @GLenum int coord, @GLenum int value); + + @GLuint + int glBindTextureUnitParameterEXT(@GLenum int unit, @GLenum int value); + + @GLuint + int glBindParameterEXT(@GLenum int value); + + boolean glIsVariantEnabledEXT(@GLuint int id, @GLenum int cap); + + @StripPostfix("pbData") + void glGetVariantBooleanvEXT(@GLuint int id, @GLenum int value, @OutParameter @Check("4") ByteBuffer pbData); + + @StripPostfix("pbData") + void glGetVariantIntegervEXT(@GLuint int id, @GLenum int value, @OutParameter @Check("4") IntBuffer pbData); + + @StripPostfix("pbData") + void glGetVariantFloatvEXT(@GLuint int id, @GLenum int value, @OutParameter @Check("4") FloatBuffer pbData); + + @StripPostfix("pbData") + void glGetVariantPointervEXT(@GLuint int id, @GLenum int value, @OutParameter @Result @GLvoid ByteBuffer pbData); + + @StripPostfix("pbData") + void glGetInvariantBooleanvEXT(@GLuint int id, @GLenum int value, @OutParameter @Check("4") ByteBuffer pbData); + + @StripPostfix("pbData") + void glGetInvariantIntegervEXT(@GLuint int id, @GLenum int value, @OutParameter @Check("4") IntBuffer pbData); + + @StripPostfix("pbData") + void glGetInvariantFloatvEXT(@GLuint int id, @GLenum int value, @OutParameter @Check("4") FloatBuffer pbData); + + @StripPostfix("pbData") + void glGetLocalConstantBooleanvEXT(@GLuint int id, @GLenum int value, @OutParameter @Check("4") ByteBuffer pbData); + + @StripPostfix("pbData") + void glGetLocalConstantIntegervEXT(@GLuint int id, @GLenum int value, @OutParameter @Check("4") IntBuffer pbData); + + @StripPostfix("pbData") + void glGetLocalConstantFloatvEXT(@GLuint int id, @GLenum int value, @OutParameter @Check("4") FloatBuffer pbData); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_vertex_weighting.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_vertex_weighting.java new file mode 100644 index 0000000..3c523ea --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/EXT_vertex_weighting.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLfloat; +import org.lwjgl.util.generator.opengl.GLsizei; + +import java.nio.*; + +public interface EXT_vertex_weighting { + int GL_MODELVIEW0_STACK_DEPTH_EXT = 0x0BA3; + int GL_MODELVIEW1_STACK_DEPTH_EXT = 0x8502; + int GL_MODELVIEW0_MATRIX_EXT = 0x0BA6; + int GL_MODELVIEW1_MATRIX_EXT = 0x8506; + int GL_VERTEX_WEIGHTING_EXT = 0x8509; + int GL_MODELVIEW0_EXT = 0x1700; + int GL_MODELVIEW1_EXT = 0x850A; + int GL_CURRENT_VERTEX_WEIGHT_EXT = 0x850B; + int GL_VERTEX_WEIGHT_ARRAY_EXT = 0x850C; + int GL_VERTEX_WEIGHT_ARRAY_SIZE_EXT = 0x850D; + int GL_VERTEX_WEIGHT_ARRAY_TYPE_EXT = 0x850E; + int GL_VERTEX_WEIGHT_ARRAY_STRIDE_EXT = 0x850F; + int GL_VERTEX_WEIGHT_ARRAY_POINTER_EXT = 0x8510; + + @NoErrorCheck + void glVertexWeightfEXT(float weight); + + void glVertexWeightPointerEXT(@GLsizei int size, @AutoType("pPointer") @GLenum int type, @GLsizei int stride, + @CachedReference + @BufferObject(BufferKind.ArrayVBO) + @Check + @Const + @GLfloat Buffer pPointer); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL11.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL11.java new file mode 100644 index 0000000..f82ce64 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL11.java @@ -0,0 +1,1651 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.*; + +/** + * The core OpenGL1.1 API. + * + * @author cix_foo + * @version $Revision$ + * $Id$ + */ +@DeprecatedGL +public interface GL11 { + /* AccumOp */ + int GL_ACCUM = 0x0100; + int GL_LOAD = 0x0101; + int GL_RETURN = 0x0102; + int GL_MULT = 0x0103; + int GL_ADD = 0x0104; + + /* AlphaFunction */ + int GL_NEVER = 0x0200; + int GL_LESS = 0x0201; + int GL_EQUAL = 0x0202; + int GL_LEQUAL = 0x0203; + int GL_GREATER = 0x0204; + int GL_NOTEQUAL = 0x0205; + int GL_GEQUAL = 0x0206; + int GL_ALWAYS = 0x0207; + + /* AttribMask */ + int GL_CURRENT_BIT = 0x00000001; + int GL_POINT_BIT = 0x00000002; + int GL_LINE_BIT = 0x00000004; + int GL_POLYGON_BIT = 0x00000008; + int GL_POLYGON_STIPPLE_BIT = 0x00000010; + int GL_PIXEL_MODE_BIT = 0x00000020; + int GL_LIGHTING_BIT = 0x00000040; + int GL_FOG_BIT = 0x00000080; + int GL_DEPTH_BUFFER_BIT = 0x00000100; + int GL_ACCUM_BUFFER_BIT = 0x00000200; + int GL_STENCIL_BUFFER_BIT = 0x00000400; + int GL_VIEWPORT_BIT = 0x00000800; + int GL_TRANSFORM_BIT = 0x00001000; + int GL_ENABLE_BIT = 0x00002000; + int GL_COLOR_BUFFER_BIT = 0x00004000; + int GL_HINT_BIT = 0x00008000; + int GL_EVAL_BIT = 0x00010000; + int GL_LIST_BIT = 0x00020000; + int GL_TEXTURE_BIT = 0x00040000; + int GL_SCISSOR_BIT = 0x00080000; + int GL_ALL_ATTRIB_BITS = 0x000fffff; + + /* BeginMode */ + int GL_POINTS = 0x0000; + int GL_LINES = 0x0001; + int GL_LINE_LOOP = 0x0002; + int GL_LINE_STRIP = 0x0003; + int GL_TRIANGLES = 0x0004; + int GL_TRIANGLE_STRIP = 0x0005; + int GL_TRIANGLE_FAN = 0x0006; + int GL_QUADS = 0x0007; + int GL_QUAD_STRIP = 0x0008; + int GL_POLYGON = 0x0009; + + /* BlendingFactorDest */ + int GL_ZERO = 0; + int GL_ONE = 1; + int GL_SRC_COLOR = 0x0300; + int GL_ONE_MINUS_SRC_COLOR = 0x0301; + int GL_SRC_ALPHA = 0x0302; + int GL_ONE_MINUS_SRC_ALPHA = 0x0303; + int GL_DST_ALPHA = 0x0304; + int GL_ONE_MINUS_DST_ALPHA = 0x0305; + + /* BlendingFactorSrc */ + /* GL_ZERO */ + /* GL_ONE */ + int GL_DST_COLOR = 0x0306; + int GL_ONE_MINUS_DST_COLOR = 0x0307; + int GL_SRC_ALPHA_SATURATE = 0x0308; + int GL_CONSTANT_COLOR = 0x8001; + int GL_ONE_MINUS_CONSTANT_COLOR = 0x8002; + int GL_CONSTANT_ALPHA = 0x8003; + int GL_ONE_MINUS_CONSTANT_ALPHA = 0x8004; + + /* Boolean */ + int GL_TRUE = 1; + int GL_FALSE = 0; + + /* ClipPlaneName */ + int GL_CLIP_PLANE0 = 0x3000; + int GL_CLIP_PLANE1 = 0x3001; + int GL_CLIP_PLANE2 = 0x3002; + int GL_CLIP_PLANE3 = 0x3003; + int GL_CLIP_PLANE4 = 0x3004; + int GL_CLIP_PLANE5 = 0x3005; + + /* DataType */ + int GL_BYTE = 0x1400; + int GL_UNSIGNED_BYTE = 0x1401; + int GL_SHORT = 0x1402; + int GL_UNSIGNED_SHORT = 0x1403; + int GL_INT = 0x1404; + int GL_UNSIGNED_INT = 0x1405; + int GL_FLOAT = 0x1406; + int GL_2_BYTES = 0x1407; + int GL_3_BYTES = 0x1408; + int GL_4_BYTES = 0x1409; + int GL_DOUBLE = 0x140A; + + /* DrawBufferMode */ + int GL_NONE = 0; + int GL_FRONT_LEFT = 0x0400; + int GL_FRONT_RIGHT = 0x0401; + int GL_BACK_LEFT = 0x0402; + int GL_BACK_RIGHT = 0x0403; + int GL_FRONT = 0x0404; + int GL_BACK = 0x0405; + int GL_LEFT = 0x0406; + int GL_RIGHT = 0x0407; + int GL_FRONT_AND_BACK = 0x0408; + int GL_AUX0 = 0x0409; + int GL_AUX1 = 0x040A; + int GL_AUX2 = 0x040B; + int GL_AUX3 = 0x040C; + + /* ErrorCode */ + int GL_NO_ERROR = 0; + int GL_INVALID_ENUM = 0x0500; + int GL_INVALID_VALUE = 0x0501; + int GL_INVALID_OPERATION = 0x0502; + int GL_STACK_OVERFLOW = 0x0503; + int GL_STACK_UNDERFLOW = 0x0504; + int GL_OUT_OF_MEMORY = 0x0505; + + /* FeedBackMode */ + int GL_2D = 0x0600; + int GL_3D = 0x0601; + int GL_3D_COLOR = 0x0602; + int GL_3D_COLOR_TEXTURE = 0x0603; + int GL_4D_COLOR_TEXTURE = 0x0604; + + /* FeedBackToken */ + int GL_PASS_THROUGH_TOKEN = 0x0700; + int GL_POINT_TOKEN = 0x0701; + int GL_LINE_TOKEN = 0x0702; + int GL_POLYGON_TOKEN = 0x0703; + int GL_BITMAP_TOKEN = 0x0704; + int GL_DRAW_PIXEL_TOKEN = 0x0705; + int GL_COPY_PIXEL_TOKEN = 0x0706; + int GL_LINE_RESET_TOKEN = 0x0707; + + /* FogMode */ + /* GL_LINEAR */ + int GL_EXP = 0x0800; + int GL_EXP2 = 0x0801; + + /* FrontFaceDirection */ + int GL_CW = 0x0900; + int GL_CCW = 0x0901; + + /* GetMapTarget */ + int GL_COEFF = 0x0A00; + int GL_ORDER = 0x0A01; + int GL_DOMAIN = 0x0A02; + + /* GetTarget */ + int GL_CURRENT_COLOR = 0x0B00; + int GL_CURRENT_INDEX = 0x0B01; + int GL_CURRENT_NORMAL = 0x0B02; + int GL_CURRENT_TEXTURE_COORDS = 0x0B03; + int GL_CURRENT_RASTER_COLOR = 0x0B04; + int GL_CURRENT_RASTER_INDEX = 0x0B05; + int GL_CURRENT_RASTER_TEXTURE_COORDS = 0x0B06; + int GL_CURRENT_RASTER_POSITION = 0x0B07; + int GL_CURRENT_RASTER_POSITION_VALID = 0x0B08; + int GL_CURRENT_RASTER_DISTANCE = 0x0B09; + int GL_POINT_SMOOTH = 0x0B10; + int GL_POINT_SIZE = 0x0B11; + int GL_POINT_SIZE_RANGE = 0x0B12; + int GL_POINT_SIZE_GRANULARITY = 0x0B13; + int GL_LINE_SMOOTH = 0x0B20; + int GL_LINE_WIDTH = 0x0B21; + int GL_LINE_WIDTH_RANGE = 0x0B22; + int GL_LINE_WIDTH_GRANULARITY = 0x0B23; + int GL_LINE_STIPPLE = 0x0B24; + int GL_LINE_STIPPLE_PATTERN = 0x0B25; + int GL_LINE_STIPPLE_REPEAT = 0x0B26; + int GL_LIST_MODE = 0x0B30; + int GL_MAX_LIST_NESTING = 0x0B31; + int GL_LIST_BASE = 0x0B32; + int GL_LIST_INDEX = 0x0B33; + int GL_POLYGON_MODE = 0x0B40; + int GL_POLYGON_SMOOTH = 0x0B41; + int GL_POLYGON_STIPPLE = 0x0B42; + int GL_EDGE_FLAG = 0x0B43; + int GL_CULL_FACE = 0x0B44; + int GL_CULL_FACE_MODE = 0x0B45; + int GL_FRONT_FACE = 0x0B46; + int GL_LIGHTING = 0x0B50; + int GL_LIGHT_MODEL_LOCAL_VIEWER = 0x0B51; + int GL_LIGHT_MODEL_TWO_SIDE = 0x0B52; + int GL_LIGHT_MODEL_AMBIENT = 0x0B53; + int GL_SHADE_MODEL = 0x0B54; + int GL_COLOR_MATERIAL_FACE = 0x0B55; + int GL_COLOR_MATERIAL_PARAMETER = 0x0B56; + int GL_COLOR_MATERIAL = 0x0B57; + int GL_FOG = 0x0B60; + int GL_FOG_INDEX = 0x0B61; + int GL_FOG_DENSITY = 0x0B62; + int GL_FOG_START = 0x0B63; + int GL_FOG_END = 0x0B64; + int GL_FOG_MODE = 0x0B65; + int GL_FOG_COLOR = 0x0B66; + int GL_DEPTH_RANGE = 0x0B70; + int GL_DEPTH_TEST = 0x0B71; + int GL_DEPTH_WRITEMASK = 0x0B72; + int GL_DEPTH_CLEAR_VALUE = 0x0B73; + int GL_DEPTH_FUNC = 0x0B74; + int GL_ACCUM_CLEAR_VALUE = 0x0B80; + int GL_STENCIL_TEST = 0x0B90; + int GL_STENCIL_CLEAR_VALUE = 0x0B91; + int GL_STENCIL_FUNC = 0x0B92; + int GL_STENCIL_VALUE_MASK = 0x0B93; + int GL_STENCIL_FAIL = 0x0B94; + int GL_STENCIL_PASS_DEPTH_FAIL = 0x0B95; + int GL_STENCIL_PASS_DEPTH_PASS = 0x0B96; + int GL_STENCIL_REF = 0x0B97; + int GL_STENCIL_WRITEMASK = 0x0B98; + int GL_MATRIX_MODE = 0x0BA0; + int GL_NORMALIZE = 0x0BA1; + int GL_VIEWPORT = 0x0BA2; + int GL_MODELVIEW_STACK_DEPTH = 0x0BA3; + int GL_PROJECTION_STACK_DEPTH = 0x0BA4; + int GL_TEXTURE_STACK_DEPTH = 0x0BA5; + int GL_MODELVIEW_MATRIX = 0x0BA6; + int GL_PROJECTION_MATRIX = 0x0BA7; + int GL_TEXTURE_MATRIX = 0x0BA8; + int GL_ATTRIB_STACK_DEPTH = 0x0BB0; + int GL_CLIENT_ATTRIB_STACK_DEPTH = 0x0BB1; + int GL_ALPHA_TEST = 0x0BC0; + int GL_ALPHA_TEST_FUNC = 0x0BC1; + int GL_ALPHA_TEST_REF = 0x0BC2; + int GL_DITHER = 0x0BD0; + int GL_BLEND_DST = 0x0BE0; + int GL_BLEND_SRC = 0x0BE1; + int GL_BLEND = 0x0BE2; + int GL_LOGIC_OP_MODE = 0x0BF0; + int GL_INDEX_LOGIC_OP = 0x0BF1; + int GL_COLOR_LOGIC_OP = 0x0BF2; + int GL_AUX_BUFFERS = 0x0C00; + int GL_DRAW_BUFFER = 0x0C01; + int GL_READ_BUFFER = 0x0C02; + int GL_SCISSOR_BOX = 0x0C10; + int GL_SCISSOR_TEST = 0x0C11; + int GL_INDEX_CLEAR_VALUE = 0x0C20; + int GL_INDEX_WRITEMASK = 0x0C21; + int GL_COLOR_CLEAR_VALUE = 0x0C22; + int GL_COLOR_WRITEMASK = 0x0C23; + int GL_INDEX_MODE = 0x0C30; + int GL_RGBA_MODE = 0x0C31; + int GL_DOUBLEBUFFER = 0x0C32; + int GL_STEREO = 0x0C33; + int GL_RENDER_MODE = 0x0C40; + int GL_PERSPECTIVE_CORRECTION_HINT = 0x0C50; + int GL_POINT_SMOOTH_HINT = 0x0C51; + int GL_LINE_SMOOTH_HINT = 0x0C52; + int GL_POLYGON_SMOOTH_HINT = 0x0C53; + int GL_FOG_HINT = 0x0C54; + int GL_TEXTURE_GEN_S = 0x0C60; + int GL_TEXTURE_GEN_T = 0x0C61; + int GL_TEXTURE_GEN_R = 0x0C62; + int GL_TEXTURE_GEN_Q = 0x0C63; + int GL_PIXEL_MAP_I_TO_I = 0x0C70; + int GL_PIXEL_MAP_S_TO_S = 0x0C71; + int GL_PIXEL_MAP_I_TO_R = 0x0C72; + int GL_PIXEL_MAP_I_TO_G = 0x0C73; + int GL_PIXEL_MAP_I_TO_B = 0x0C74; + int GL_PIXEL_MAP_I_TO_A = 0x0C75; + int GL_PIXEL_MAP_R_TO_R = 0x0C76; + int GL_PIXEL_MAP_G_TO_G = 0x0C77; + int GL_PIXEL_MAP_B_TO_B = 0x0C78; + int GL_PIXEL_MAP_A_TO_A = 0x0C79; + int GL_PIXEL_MAP_I_TO_I_SIZE = 0x0CB0; + int GL_PIXEL_MAP_S_TO_S_SIZE = 0x0CB1; + int GL_PIXEL_MAP_I_TO_R_SIZE = 0x0CB2; + int GL_PIXEL_MAP_I_TO_G_SIZE = 0x0CB3; + int GL_PIXEL_MAP_I_TO_B_SIZE = 0x0CB4; + int GL_PIXEL_MAP_I_TO_A_SIZE = 0x0CB5; + int GL_PIXEL_MAP_R_TO_R_SIZE = 0x0CB6; + int GL_PIXEL_MAP_G_TO_G_SIZE = 0x0CB7; + int GL_PIXEL_MAP_B_TO_B_SIZE = 0x0CB8; + int GL_PIXEL_MAP_A_TO_A_SIZE = 0x0CB9; + int GL_UNPACK_SWAP_BYTES = 0x0CF0; + int GL_UNPACK_LSB_FIRST = 0x0CF1; + int GL_UNPACK_ROW_LENGTH = 0x0CF2; + int GL_UNPACK_SKIP_ROWS = 0x0CF3; + int GL_UNPACK_SKIP_PIXELS = 0x0CF4; + int GL_UNPACK_ALIGNMENT = 0x0CF5; + int GL_PACK_SWAP_BYTES = 0x0D00; + int GL_PACK_LSB_FIRST = 0x0D01; + int GL_PACK_ROW_LENGTH = 0x0D02; + int GL_PACK_SKIP_ROWS = 0x0D03; + int GL_PACK_SKIP_PIXELS = 0x0D04; + int GL_PACK_ALIGNMENT = 0x0D05; + int GL_MAP_COLOR = 0x0D10; + int GL_MAP_STENCIL = 0x0D11; + int GL_INDEX_SHIFT = 0x0D12; + int GL_INDEX_OFFSET = 0x0D13; + int GL_RED_SCALE = 0x0D14; + int GL_RED_BIAS = 0x0D15; + int GL_ZOOM_X = 0x0D16; + int GL_ZOOM_Y = 0x0D17; + int GL_GREEN_SCALE = 0x0D18; + int GL_GREEN_BIAS = 0x0D19; + int GL_BLUE_SCALE = 0x0D1A; + int GL_BLUE_BIAS = 0x0D1B; + int GL_ALPHA_SCALE = 0x0D1C; + int GL_ALPHA_BIAS = 0x0D1D; + int GL_DEPTH_SCALE = 0x0D1E; + int GL_DEPTH_BIAS = 0x0D1F; + int GL_MAX_EVAL_ORDER = 0x0D30; + int GL_MAX_LIGHTS = 0x0D31; + int GL_MAX_CLIP_PLANES = 0x0D32; + int GL_MAX_TEXTURE_SIZE = 0x0D33; + int GL_MAX_PIXEL_MAP_TABLE = 0x0D34; + int GL_MAX_ATTRIB_STACK_DEPTH = 0x0D35; + int GL_MAX_MODELVIEW_STACK_DEPTH = 0x0D36; + int GL_MAX_NAME_STACK_DEPTH = 0x0D37; + int GL_MAX_PROJECTION_STACK_DEPTH = 0x0D38; + int GL_MAX_TEXTURE_STACK_DEPTH = 0x0D39; + int GL_MAX_VIEWPORT_DIMS = 0x0D3A; + int GL_MAX_CLIENT_ATTRIB_STACK_DEPTH = 0x0D3B; + int GL_SUBPIXEL_BITS = 0x0D50; + int GL_INDEX_BITS = 0x0D51; + int GL_RED_BITS = 0x0D52; + int GL_GREEN_BITS = 0x0D53; + int GL_BLUE_BITS = 0x0D54; + int GL_ALPHA_BITS = 0x0D55; + int GL_DEPTH_BITS = 0x0D56; + int GL_STENCIL_BITS = 0x0D57; + int GL_ACCUM_RED_BITS = 0x0D58; + int GL_ACCUM_GREEN_BITS = 0x0D59; + int GL_ACCUM_BLUE_BITS = 0x0D5A; + int GL_ACCUM_ALPHA_BITS = 0x0D5B; + int GL_NAME_STACK_DEPTH = 0x0D70; + int GL_AUTO_NORMAL = 0x0D80; + int GL_MAP1_COLOR_4 = 0x0D90; + int GL_MAP1_INDEX = 0x0D91; + int GL_MAP1_NORMAL = 0x0D92; + int GL_MAP1_TEXTURE_COORD_1 = 0x0D93; + int GL_MAP1_TEXTURE_COORD_2 = 0x0D94; + int GL_MAP1_TEXTURE_COORD_3 = 0x0D95; + int GL_MAP1_TEXTURE_COORD_4 = 0x0D96; + int GL_MAP1_VERTEX_3 = 0x0D97; + int GL_MAP1_VERTEX_4 = 0x0D98; + int GL_MAP2_COLOR_4 = 0x0DB0; + int GL_MAP2_INDEX = 0x0DB1; + int GL_MAP2_NORMAL = 0x0DB2; + int GL_MAP2_TEXTURE_COORD_1 = 0x0DB3; + int GL_MAP2_TEXTURE_COORD_2 = 0x0DB4; + int GL_MAP2_TEXTURE_COORD_3 = 0x0DB5; + int GL_MAP2_TEXTURE_COORD_4 = 0x0DB6; + int GL_MAP2_VERTEX_3 = 0x0DB7; + int GL_MAP2_VERTEX_4 = 0x0DB8; + int GL_MAP1_GRID_DOMAIN = 0x0DD0; + int GL_MAP1_GRID_SEGMENTS = 0x0DD1; + int GL_MAP2_GRID_DOMAIN = 0x0DD2; + int GL_MAP2_GRID_SEGMENTS = 0x0DD3; + int GL_TEXTURE_1D = 0x0DE0; + int GL_TEXTURE_2D = 0x0DE1; + int GL_FEEDBACK_BUFFER_POINTER = 0x0DF0; + int GL_FEEDBACK_BUFFER_SIZE = 0x0DF1; + int GL_FEEDBACK_BUFFER_TYPE = 0x0DF2; + int GL_SELECTION_BUFFER_POINTER = 0x0DF3; + int GL_SELECTION_BUFFER_SIZE = 0x0DF4; + + /* GetTextureParameter */ + /* GL_TEXTURE_MAG_FILTER */ + /* GL_TEXTURE_MIN_FILTER */ + /* GL_TEXTURE_WRAP_S */ + /* GL_TEXTURE_WRAP_T */ + int GL_TEXTURE_WIDTH = 0x1000; + int GL_TEXTURE_HEIGHT = 0x1001; + int GL_TEXTURE_INTERNAL_FORMAT = 0x1003; + int GL_TEXTURE_BORDER_COLOR = 0x1004; + int GL_TEXTURE_BORDER = 0x1005; + /* GL_TEXTURE_RED_SIZE */ + /* GL_TEXTURE_GREEN_SIZE */ + /* GL_TEXTURE_BLUE_SIZE */ + /* GL_TEXTURE_ALPHA_SIZE */ + /* GL_TEXTURE_LUMINANCE_SIZE */ + /* GL_TEXTURE_INTENSITY_SIZE */ + /* GL_TEXTURE_PRIORITY */ + /* GL_TEXTURE_RESIDENT */ + + /* HintMode */ + int GL_DONT_CARE = 0x1100; + int GL_FASTEST = 0x1101; + int GL_NICEST = 0x1102; + + /* LightName */ + int GL_LIGHT0 = 0x4000; + int GL_LIGHT1 = 0x4001; + int GL_LIGHT2 = 0x4002; + int GL_LIGHT3 = 0x4003; + int GL_LIGHT4 = 0x4004; + int GL_LIGHT5 = 0x4005; + int GL_LIGHT6 = 0x4006; + int GL_LIGHT7 = 0x4007; + + /* LightParameter */ + int GL_AMBIENT = 0x1200; + int GL_DIFFUSE = 0x1201; + int GL_SPECULAR = 0x1202; + int GL_POSITION = 0x1203; + int GL_SPOT_DIRECTION = 0x1204; + int GL_SPOT_EXPONENT = 0x1205; + int GL_SPOT_CUTOFF = 0x1206; + int GL_CONSTANT_ATTENUATION = 0x1207; + int GL_LINEAR_ATTENUATION = 0x1208; + int GL_QUADRATIC_ATTENUATION = 0x1209; + + /* ListMode */ + int GL_COMPILE = 0x1300; + int GL_COMPILE_AND_EXECUTE = 0x1301; + + /* LogicOp */ + int GL_CLEAR = 0x1500; + int GL_AND = 0x1501; + int GL_AND_REVERSE = 0x1502; + int GL_COPY = 0x1503; + int GL_AND_INVERTED = 0x1504; + int GL_NOOP = 0x1505; + int GL_XOR = 0x1506; + int GL_OR = 0x1507; + int GL_NOR = 0x1508; + int GL_EQUIV = 0x1509; + int GL_INVERT = 0x150A; + int GL_OR_REVERSE = 0x150B; + int GL_COPY_INVERTED = 0x150C; + int GL_OR_INVERTED = 0x150D; + int GL_NAND = 0x150E; + int GL_SET = 0x150F; + + /* MaterialParameter */ + int GL_EMISSION = 0x1600; + int GL_SHININESS = 0x1601; + int GL_AMBIENT_AND_DIFFUSE = 0x1602; + int GL_COLOR_INDEXES = 0x1603; + /* GL_AMBIENT */ + /* GL_DIFFUSE */ + /* GL_SPECULAR */ + + /* MatrixMode */ + int GL_MODELVIEW = 0x1700; + int GL_PROJECTION = 0x1701; + int GL_TEXTURE = 0x1702; + + /* PixelCopyType */ + int GL_COLOR = 0x1800; + int GL_DEPTH = 0x1801; + int GL_STENCIL = 0x1802; + + /* PixelFormat */ + int GL_COLOR_INDEX = 0x1900; + int GL_STENCIL_INDEX = 0x1901; + int GL_DEPTH_COMPONENT = 0x1902; + int GL_RED = 0x1903; + int GL_GREEN = 0x1904; + int GL_BLUE = 0x1905; + int GL_ALPHA = 0x1906; + int GL_RGB = 0x1907; + int GL_RGBA = 0x1908; + int GL_LUMINANCE = 0x1909; + int GL_LUMINANCE_ALPHA = 0x190A; + + /* PixelType */ + int GL_BITMAP = 0x1A00; + /* GL_BYTE */ + /* GL_UNSIGNED_BYTE */ + /* GL_SHORT */ + /* GL_UNSIGNED_SHORT */ + /* GL_INT */ + /* GL_UNSIGNED_INT */ + /* GL_FLOAT */ + + /* PolygonMode */ + int GL_POINT = 0x1B00; + int GL_LINE = 0x1B01; + int GL_FILL = 0x1B02; + + /* RenderingMode */ + int GL_RENDER = 0x1C00; + int GL_FEEDBACK = 0x1C01; + int GL_SELECT = 0x1C02; + + /* ShadingModel */ + int GL_FLAT = 0x1D00; + int GL_SMOOTH = 0x1D01; + + /* StencilOp */ + /* GL_ZERO */ + int GL_KEEP = 0x1E00; + int GL_REPLACE = 0x1E01; + int GL_INCR = 0x1E02; + int GL_DECR = 0x1E03; + /* GL_INVERT */ + + /* StringName */ + int GL_VENDOR = 0x1F00; + int GL_RENDERER = 0x1F01; + int GL_VERSION = 0x1F02; + int GL_EXTENSIONS = 0x1F03; + + /* TextureCoordName */ + int GL_S = 0x2000; + int GL_T = 0x2001; + int GL_R = 0x2002; + int GL_Q = 0x2003; + + /* TexCoordPointerType */ + /* GL_SHORT */ + /* GL_INT */ + /* GL_FLOAT */ + /* GL_DOUBLE */ + + /* TextureEnvMode */ + int GL_MODULATE = 0x2100; + int GL_DECAL = 0x2101; + /* GL_BLEND */ + /* GL_REPLACE */ + + /* TextureEnvParameter */ + int GL_TEXTURE_ENV_MODE = 0x2200; + int GL_TEXTURE_ENV_COLOR = 0x2201; + + /* TextureEnvTarget */ + int GL_TEXTURE_ENV = 0x2300; + + /* TextureGenMode */ + int GL_EYE_LINEAR = 0x2400; + int GL_OBJECT_LINEAR = 0x2401; + int GL_SPHERE_MAP = 0x2402; + + /* TextureGenParameter */ + int GL_TEXTURE_GEN_MODE = 0x2500; + int GL_OBJECT_PLANE = 0x2501; + int GL_EYE_PLANE = 0x2502; + + /* TextureMagFilter */ + int GL_NEAREST = 0x2600; + int GL_LINEAR = 0x2601; + + /* TextureMinFilter */ + /* GL_NEAREST */ + /* GL_LINEAR */ + int GL_NEAREST_MIPMAP_NEAREST = 0x2700; + int GL_LINEAR_MIPMAP_NEAREST = 0x2701; + int GL_NEAREST_MIPMAP_LINEAR = 0x2702; + int GL_LINEAR_MIPMAP_LINEAR = 0x2703; + + /* TextureParameterName */ + int GL_TEXTURE_MAG_FILTER = 0x2800; + int GL_TEXTURE_MIN_FILTER = 0x2801; + int GL_TEXTURE_WRAP_S = 0x2802; + int GL_TEXTURE_WRAP_T = 0x2803; + /* GL_TEXTURE_BORDER_COLOR */ + /* GL_TEXTURE_PRIORITY */ + + /* TextureWrapMode */ + int GL_CLAMP = 0x2900; + int GL_REPEAT = 0x2901; + + /* ClientAttribMask */ + int GL_CLIENT_PIXEL_STORE_BIT = 0x00000001; + int GL_CLIENT_VERTEX_ARRAY_BIT = 0x00000002; + int GL_ALL_CLIENT_ATTRIB_BITS = 0xffffffff; + + /* polygon_offset */ + int GL_POLYGON_OFFSET_FACTOR = 0x8038; + int GL_POLYGON_OFFSET_UNITS = 0x2A00; + int GL_POLYGON_OFFSET_POINT = 0x2A01; + int GL_POLYGON_OFFSET_LINE = 0x2A02; + int GL_POLYGON_OFFSET_FILL = 0x8037; + + /* texture */ + int GL_ALPHA4 = 0x803B; + int GL_ALPHA8 = 0x803C; + int GL_ALPHA12 = 0x803D; + int GL_ALPHA16 = 0x803E; + int GL_LUMINANCE4 = 0x803F; + int GL_LUMINANCE8 = 0x8040; + int GL_LUMINANCE12 = 0x8041; + int GL_LUMINANCE16 = 0x8042; + int GL_LUMINANCE4_ALPHA4 = 0x8043; + int GL_LUMINANCE6_ALPHA2 = 0x8044; + int GL_LUMINANCE8_ALPHA8 = 0x8045; + int GL_LUMINANCE12_ALPHA4 = 0x8046; + int GL_LUMINANCE12_ALPHA12 = 0x8047; + int GL_LUMINANCE16_ALPHA16 = 0x8048; + int GL_INTENSITY = 0x8049; + int GL_INTENSITY4 = 0x804A; + int GL_INTENSITY8 = 0x804B; + int GL_INTENSITY12 = 0x804C; + int GL_INTENSITY16 = 0x804D; + int GL_R3_G3_B2 = 0x2A10; + int GL_RGB4 = 0x804F; + int GL_RGB5 = 0x8050; + int GL_RGB8 = 0x8051; + int GL_RGB10 = 0x8052; + int GL_RGB12 = 0x8053; + int GL_RGB16 = 0x8054; + int GL_RGBA2 = 0x8055; + int GL_RGBA4 = 0x8056; + int GL_RGB5_A1 = 0x8057; + int GL_RGBA8 = 0x8058; + int GL_RGB10_A2 = 0x8059; + int GL_RGBA12 = 0x805A; + int GL_RGBA16 = 0x805B; + int GL_TEXTURE_RED_SIZE = 0x805C; + int GL_TEXTURE_GREEN_SIZE = 0x805D; + int GL_TEXTURE_BLUE_SIZE = 0x805E; + int GL_TEXTURE_ALPHA_SIZE = 0x805F; + int GL_TEXTURE_LUMINANCE_SIZE = 0x8060; + int GL_TEXTURE_INTENSITY_SIZE = 0x8061; + int GL_PROXY_TEXTURE_1D = 0x8063; + int GL_PROXY_TEXTURE_2D = 0x8064; + + /* texture_object */ + int GL_TEXTURE_PRIORITY = 0x8066; + int GL_TEXTURE_RESIDENT = 0x8067; + int GL_TEXTURE_BINDING_1D = 0x8068; + int GL_TEXTURE_BINDING_2D = 0x8069; + + /* vertex_array */ + int GL_VERTEX_ARRAY = 0x8074; + int GL_NORMAL_ARRAY = 0x8075; + int GL_COLOR_ARRAY = 0x8076; + int GL_INDEX_ARRAY = 0x8077; + int GL_TEXTURE_COORD_ARRAY = 0x8078; + int GL_EDGE_FLAG_ARRAY = 0x8079; + int GL_VERTEX_ARRAY_SIZE = 0x807A; + int GL_VERTEX_ARRAY_TYPE = 0x807B; + int GL_VERTEX_ARRAY_STRIDE = 0x807C; + int GL_NORMAL_ARRAY_TYPE = 0x807E; + int GL_NORMAL_ARRAY_STRIDE = 0x807F; + int GL_COLOR_ARRAY_SIZE = 0x8081; + int GL_COLOR_ARRAY_TYPE = 0x8082; + int GL_COLOR_ARRAY_STRIDE = 0x8083; + int GL_INDEX_ARRAY_TYPE = 0x8085; + int GL_INDEX_ARRAY_STRIDE = 0x8086; + int GL_TEXTURE_COORD_ARRAY_SIZE = 0x8088; + int GL_TEXTURE_COORD_ARRAY_TYPE = 0x8089; + int GL_TEXTURE_COORD_ARRAY_STRIDE = 0x808A; + int GL_EDGE_FLAG_ARRAY_STRIDE = 0x808C; + int GL_VERTEX_ARRAY_POINTER = 0x808E; + int GL_NORMAL_ARRAY_POINTER = 0x808F; + int GL_COLOR_ARRAY_POINTER = 0x8090; + int GL_INDEX_ARRAY_POINTER = 0x8091; + int GL_TEXTURE_COORD_ARRAY_POINTER = 0x8092; + int GL_EDGE_FLAG_ARRAY_POINTER = 0x8093; + int GL_V2F = 0x2A20; + int GL_V3F = 0x2A21; + int GL_C4UB_V2F = 0x2A22; + int GL_C4UB_V3F = 0x2A23; + int GL_C3F_V3F = 0x2A24; + int GL_N3F_V3F = 0x2A25; + int GL_C4F_N3F_V3F = 0x2A26; + int GL_T2F_V3F = 0x2A27; + int GL_T4F_V4F = 0x2A28; + int GL_T2F_C4UB_V3F = 0x2A29; + int GL_T2F_C3F_V3F = 0x2A2A; + int GL_T2F_N3F_V3F = 0x2A2B; + int GL_T2F_C4F_N3F_V3F = 0x2A2C; + int GL_T4F_C4F_N3F_V4F = 0x2A2D; + + /* For compatibility with OpenGL v1.0 */ + int GL_LOGIC_OP = GL_INDEX_LOGIC_OP; + int GL_TEXTURE_COMPONENTS = GL_TEXTURE_INTERNAL_FORMAT; + + @DeprecatedGL + void glAccum(@GLenum int op, float value); + + @DeprecatedGL + void glAlphaFunc(@GLenum int func, float ref); + + void glClearColor(float red, float green, float blue, float alpha); + + @DeprecatedGL + void glClearAccum(float red, float green, float blue, float alpha); + + void glClear(@GLbitfield int mask); + + @DeprecatedGL + void glCallLists(@AutoSize("lists") @GLsizei int n, @AutoType("lists") @GLenum int type, + @Const + @GLubyte + @GLushort + @GLuint Buffer lists); + + @DeprecatedGL + void glCallList(@GLuint int list); + + void glBlendFunc(@GLenum int sfactor, @GLenum int dfactor); + + @DeprecatedGL + void glBitmap(@GLsizei int width, @GLsizei int height, float xorig, float yorig, float xmove, float ymove, + @BufferObject(BufferKind.UnpackPBO) + @Check(value = "(((width + 7)/8)*height)", canBeNull = true) + @Const + @GLubyte ByteBuffer bitmap); + + void glBindTexture(@GLenum int target, @GLuint int texture); + + @DeprecatedGL + void glPrioritizeTextures(@AutoSize("textures") @GLsizei int n, + @Const + @GLuint IntBuffer textures, + @Const + @Check("textures.remaining()") + FloatBuffer priorities); + + @DeprecatedGL + boolean glAreTexturesResident(@AutoSize("textures") @GLsizei int n, + @Const + @GLuint IntBuffer textures, + @Check("textures.remaining()") + @GLboolean ByteBuffer residences); + + @NoErrorCheck + @DeprecatedGL + @Code("\t\tif ( ContextCapabilities.DEBUG ) StateTracker.setBeginEnd(caps, true);") + void glBegin(@GLenum int mode); + + @DeprecatedGL + @Code("\t\tif ( ContextCapabilities.DEBUG ) StateTracker.setBeginEnd(caps, false);") + void glEnd(); + + @NoErrorCheck + void glArrayElement(int i); + + void glClearDepth(double depth); + + @DeprecatedGL + void glDeleteLists(@GLuint int list, @GLsizei int range); + + void glDeleteTextures(@AutoSize("textures") @GLsizei int n, @Const @GLuint IntBuffer textures); + + @Alternate("glDeleteTextures") + void glDeleteTextures(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(caps, texture)", keepParam = true) int texture); + + void glCullFace(@GLenum int mode); + + void glCopyTexSubImage2D(@GLenum int target, int level, int xoffset, int yoffset, int x, int y, @GLsizei int width, @GLsizei int height); + + void glCopyTexSubImage1D(@GLenum int target, int level, int xoffset, int x, int y, @GLsizei int width); + + void glCopyTexImage2D(@GLenum int target, int level, int internalFormat, int x, int y, @GLsizei int width, @GLsizei int height, int border); + + void glCopyTexImage1D(@GLenum int target, int level, int internalFormat, int x, int y, @GLsizei int width, int border); + + void glCopyPixels(int x, int y, int width, int height, int type); + + @DeprecatedGL + void glColorPointer(int size, @AutoType("pointer") @GLenum int type, @GLsizei int stride, + @CachedReference + @Check + @BufferObject(BufferKind.ArrayVBO) + @Const + @GLfloat + @GLdouble + @GLubyte + @GLbyte Buffer pointer); + + @DeprecatedGL + @Alternate("glColorPointer") + void glColorPointer(int size, @GLenum int type, @GLsizei int stride, + @CachedReference + @Check + @BufferObject(BufferKind.ArrayVBO) + @Const ByteBuffer pointer); + + @DeprecatedGL + void glColorMaterial(@GLenum int face, @GLenum int mode); + + void glColorMask(boolean red, boolean green, boolean blue, boolean alpha); + + @NoErrorCheck + @DeprecatedGL + void glColor3b(byte red, byte green, byte blue); + + @NoErrorCheck + @DeprecatedGL + void glColor3f(float red, float green, float blue); + + @NoErrorCheck + @DeprecatedGL + void glColor3d(double red, double green, double blue); + + @NoErrorCheck + @DeprecatedGL + void glColor3ub(@GLubyte byte red, @GLubyte byte green, @GLubyte byte blue); + + @NoErrorCheck + @DeprecatedGL + void glColor4b(byte red, byte green, byte blue, byte alpha); + + @NoErrorCheck + @DeprecatedGL + void glColor4f(float red, float green, float blue, float alpha); + + @NoErrorCheck + @DeprecatedGL + void glColor4d(double red, double green, double blue, double alpha); + + @NoErrorCheck + @DeprecatedGL + void glColor4ub(@GLubyte byte red, @GLubyte byte green, @GLubyte byte blue, @GLubyte byte alpha); + + void glClipPlane(@GLenum int plane, @Check("4") @Const DoubleBuffer equation); + + void glClearStencil(int s); + + // This function is only used in indexed color mode + // void glClearIndex(float c); + + @DeprecatedGL + void glEvalPoint1(int i); + + @DeprecatedGL + void glEvalPoint2(int i, int j); + + @DeprecatedGL + void glEvalMesh1(@GLenum int mode, int i1, int i2); + + @DeprecatedGL + void glEvalMesh2(@GLenum int mode, int i1, int i2, int j1, int j2); + + @DeprecatedGL + void glEvalCoord1f(float u); + + @DeprecatedGL + void glEvalCoord1d(double u); + + @DeprecatedGL + void glEvalCoord2f(float u, float v); + + @DeprecatedGL + void glEvalCoord2d(double u, double v); + + @DeprecatedGL + void glEnableClientState(@GLenum int cap); + + @DeprecatedGL + void glDisableClientState(@GLenum int cap); + + void glEnable(@GLenum int cap); + + void glDisable(@GLenum int cap); + + @DeprecatedGL + void glEdgeFlagPointer(int stride, + @CachedReference + @BufferObject(BufferKind.ArrayVBO) + @Check + @Const + @GLbyte Buffer pointer); + + @DeprecatedGL + void glEdgeFlag(boolean flag); + + @DeprecatedGL + void glDrawPixels(@GLsizei int width, @GLsizei int height, @GLenum int format, @GLenum int type, + @Check("GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)") + @BufferObject(BufferKind.UnpackPBO) + @Const + @GLbyte + @GLshort + @GLint Buffer pixels); + + void glDrawElements(@GLenum int mode, @AutoSize("indices") @GLsizei int count, @AutoType("indices") @GLenum int type, + @BufferObject(BufferKind.ElementVBO) + @Const + @GLubyte + @GLushort + @GLuint Buffer indices); + + @Alternate("glDrawElements") + void glDrawElements(@GLenum int mode, @GLsizei int count, @GLenum int type, @BufferObject(BufferKind.ElementVBO) @Const @Check("count") ByteBuffer indices); + + void glDrawBuffer(@GLenum int mode); + + void glDrawArrays(@GLenum int mode, int first, @GLsizei int count); + + void glDepthRange(double zNear, double zFar); + + void glDepthMask(boolean flag); + + void glDepthFunc(@GLenum int func); + + @DeprecatedGL + void glFeedbackBuffer(@AutoSize("buffer") @GLsizei int size, @GLenum int type, FloatBuffer buffer); + + @StripPostfix("values") + @DeprecatedGL + void glGetPixelMapfv(@GLenum int map, @OutParameter @Check("256") @BufferObject(BufferKind.PackPBO) FloatBuffer values); + + @StripPostfix("values") + @DeprecatedGL + void glGetPixelMapuiv(@GLenum int map, @OutParameter @Check("256") @BufferObject(BufferKind.PackPBO) @GLuint IntBuffer values); + + @StripPostfix("values") + @DeprecatedGL + void glGetPixelMapusv(@GLenum int map, @OutParameter @Check("256") @BufferObject(BufferKind.PackPBO) @GLushort ShortBuffer values); + + @StripPostfix("params") + @DeprecatedGL + void glGetMaterialfv(@GLenum int face, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params); + + @StripPostfix("params") + @DeprecatedGL + void glGetMaterialiv(@GLenum int face, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + @StripPostfix("v") + @DeprecatedGL + void glGetMapfv(@GLenum int target, @GLenum int query, @OutParameter @Check("256") FloatBuffer v); + + @StripPostfix("v") + @DeprecatedGL + void glGetMapdv(@GLenum int target, @GLenum int query, @OutParameter @Check("256") DoubleBuffer v); + + @StripPostfix("v") + @DeprecatedGL + void glGetMapiv(@GLenum int target, @GLenum int query, @OutParameter @Check("256") IntBuffer v); + + @StripPostfix("params") + @DeprecatedGL + void glGetLightfv(@GLenum int light, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params); + + @StripPostfix("params") + @DeprecatedGL + void glGetLightiv(@GLenum int light, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + @NoErrorCheck + int glGetError(); + + void glGetClipPlane(@GLenum int plane, @OutParameter @Check("4") DoubleBuffer equation); + + @StripPostfix("params") + void glGetBooleanv(@GLenum int pname, @OutParameter @Check("16") @GLboolean ByteBuffer params); + + @Alternate("glGetBooleanv") + @GLreturn("params") + @StripPostfix("params") + void glGetBooleanv2(@GLenum int pname, @OutParameter @GLboolean ByteBuffer params); + + @StripPostfix("params") + void glGetDoublev(@GLenum int pname, @OutParameter @Check("16") DoubleBuffer params); + + @Alternate("glGetDoublev") + @GLreturn("params") + @StripPostfix("params") + void glGetDoublev2(@GLenum int pname, @OutParameter DoubleBuffer params); + + @StripPostfix("params") + void glGetFloatv(@GLenum int pname, @OutParameter @Check("16") FloatBuffer params); + + @Alternate("glGetFloatv") + @GLreturn("params") + @StripPostfix("params") + void glGetFloatv2(@GLenum int pname, @OutParameter FloatBuffer params); + + @StripPostfix("params") + void glGetIntegerv(@GLenum int pname, @OutParameter @Check("16") IntBuffer params); + + @Alternate("glGetIntegerv") + @GLreturn("params") + @StripPostfix("params") + void glGetIntegerv2(@GLenum int pname, @OutParameter IntBuffer params); + + void glGenTextures(@AutoSize("textures") @GLsizei int n, @OutParameter @GLuint IntBuffer textures); + + @Alternate("glGenTextures") + @GLreturn("textures") + void glGenTextures2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer textures); + + @GLuint + @DeprecatedGL + int glGenLists(@GLsizei int range); + + @DeprecatedGL + void glFrustum(double left, double right, double bottom, double top, double zNear, double zFar); + + void glFrontFace(@GLenum int mode); + + @DeprecatedGL + void glFogf(@GLenum int pname, float param); + + @DeprecatedGL + void glFogi(@GLenum int pname, int param); + + @StripPostfix("params") + @DeprecatedGL + void glFogfv(@GLenum int pname, @Check("4") @Const FloatBuffer params); + + @StripPostfix("params") + @DeprecatedGL + void glFogiv(@GLenum int pname, @Check("4") @Const IntBuffer params); + + void glFlush(); + + void glFinish(); + + @StripPostfix("result") + void glGetPointerv(@GLenum int pname, @Result @GLvoid ByteBuffer result); + + boolean glIsEnabled(@GLenum int cap); + + void glInterleavedArrays(@GLenum int format, @GLsizei int stride, + @BufferObject(BufferKind.ArrayVBO) + @Check + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer pointer); + + @DeprecatedGL + void glInitNames(); + + void glHint(@GLenum int target, @GLenum int mode); + + @StripPostfix("params") + void glGetTexParameterfv(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params); + + @Alternate("glGetTexParameterfv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetTexParameterfv2(@GLenum int target, @GLenum int pname, @OutParameter FloatBuffer params); + + @StripPostfix("params") + void glGetTexParameteriv(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + @Alternate("glGetTexParameteriv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetTexParameteriv2(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + @StripPostfix("params") + void glGetTexLevelParameterfv(@GLenum int target, int level, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params); + + @Alternate("glGetTexLevelParameterfv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetTexLevelParameterfv2(@GLenum int target, int level, @GLenum int pname, @OutParameter FloatBuffer params); + + @StripPostfix("params") + void glGetTexLevelParameteriv(@GLenum int target, int level, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + @Alternate("glGetTexLevelParameteriv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetTexLevelParameteriv2(@GLenum int target, int level, @GLenum int pname, @OutParameter IntBuffer params); + + void glGetTexImage(@GLenum int target, int level, @GLenum int format, @GLenum int type, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @Check("GLChecks.calculateImageStorage(pixels, format, type, 1, 1, 1)") + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer pixels); + + @StripPostfix("params") + @DeprecatedGL + void glGetTexGeniv(@GLenum int coord, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + @Alternate("glGetTexGeniv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + @DeprecatedGL + void glGetTexGeniv2(@GLenum int coord, @GLenum int pname, @OutParameter IntBuffer params); + + @StripPostfix("params") + @DeprecatedGL + void glGetTexGenfv(@GLenum int coord, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params); + + @Alternate("glGetTexGenfv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + @DeprecatedGL + void glGetTexGenfv2(@GLenum int coord, @GLenum int pname, @OutParameter FloatBuffer params); + + @StripPostfix("params") + @DeprecatedGL + void glGetTexGendv(@GLenum int coord, @GLenum int pname, @OutParameter @Check("4") DoubleBuffer params); + + @Alternate("glGetTexGendv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + @DeprecatedGL + void glGetTexGendv2(@GLenum int coord, @GLenum int pname, @OutParameter DoubleBuffer params); + + @StripPostfix("params") + void glGetTexEnviv(@GLenum int coord, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + @Alternate("glGetTexEnviv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetTexEnviv2(@GLenum int coord, @GLenum int pname, @OutParameter IntBuffer params); + + @StripPostfix("params") + void glGetTexEnvfv(@GLenum int coord, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params); + + @Alternate("glGetTexEnvfv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetTexEnvfv2(@GLenum int coord, @GLenum int pname, @OutParameter FloatBuffer params); + + @Const + String glGetString(int name); + + @DeprecatedGL + void glGetPolygonStipple(@OutParameter @BufferObject(BufferKind.PackPBO) @Check("128") @GLubyte ByteBuffer mask); + + @DeprecatedGL + boolean glIsList(@GLuint int list); + + @DeprecatedGL + void glMaterialf(@GLenum int face, @GLenum int pname, float param); + + @DeprecatedGL + void glMateriali(@GLenum int face, @GLenum int pname, int param); + + @StripPostfix("params") + @DeprecatedGL + void glMaterialfv(@GLenum int face, @GLenum int pname, @Check("4") @Const FloatBuffer params); + + @StripPostfix("params") + @DeprecatedGL + void glMaterialiv(@GLenum int face, @GLenum int pname, @Check("4") @Const IntBuffer params); + + @DeprecatedGL + void glMapGrid1f(int un, float u1, float u2); + + @DeprecatedGL + void glMapGrid1d(int un, double u1, double u2); + + @DeprecatedGL + void glMapGrid2f(int un, float u1, float u2, int vn, float v1, float v2); + + @DeprecatedGL + void glMapGrid2d(int un, double u1, double u2, int vn, double v1, double v2); + + // TODO: check buffer size valid + + @DeprecatedGL + void glMap2f(@GLenum int target, float u1, float u2, int ustride, int uorder, float v1, float v2, int vstride, int vorder, @Check @Const FloatBuffer points); + + @DeprecatedGL + void glMap2d(@GLenum int target, double u1, double u2, int ustride, int uorder, double v1, double v2, int vstride, int vorder, @Check @Const DoubleBuffer points); + + // TODO: check buffer size valid + + @DeprecatedGL + void glMap1f(@GLenum int target, float u1, float u2, int stride, int order, @Check @Const FloatBuffer points); + + @DeprecatedGL + void glMap1d(@GLenum int target, double u1, double u2, int stride, int order, @Check @Const DoubleBuffer points); + + void glLogicOp(@GLenum int opcode); + + @DeprecatedGL + void glLoadName(@GLuint int name); + + @StripPostfix("m") + @DeprecatedGL + void glLoadMatrixf(@Check("16") @Const FloatBuffer m); + + @StripPostfix("m") + @DeprecatedGL + void glLoadMatrixd(@Check("16") @Const DoubleBuffer m); + + @DeprecatedGL + void glLoadIdentity(); + + @DeprecatedGL + void glListBase(@GLuint int base); + + void glLineWidth(float width); + + @DeprecatedGL + void glLineStipple(int factor, @GLushort short pattern); + + @DeprecatedGL + void glLightModelf(@GLenum int pname, float param); + + @DeprecatedGL + void glLightModeli(@GLenum int pname, int param); + + @StripPostfix("params") + @DeprecatedGL + void glLightModelfv(@GLenum int pname, @Check("4") @Const FloatBuffer params); + + @StripPostfix("params") + @DeprecatedGL + void glLightModeliv(@GLenum int pname, @Check("4") @Const IntBuffer params); + + @DeprecatedGL + void glLightf(@GLenum int light, @GLenum int pname, float param); + + @DeprecatedGL + void glLighti(@GLenum int light, @GLenum int pname, int param); + + @StripPostfix("params") + @DeprecatedGL + void glLightfv(@GLenum int light, @GLenum int pname, @Check("4") @Const FloatBuffer params); + + @StripPostfix("params") + @DeprecatedGL + void glLightiv(@GLenum int light, @GLenum int pname, @Check("4") @Const IntBuffer params); + + boolean glIsTexture(@GLuint int texture); + + @DeprecatedGL + void glMatrixMode(@GLenum int mode); + + @DeprecatedGL + void glPolygonStipple(@BufferObject(BufferKind.UnpackPBO) @Check("128") @Const @GLubyte ByteBuffer mask); + + void glPolygonOffset(float factor, float units); + + void glPolygonMode(@GLenum int face, @GLenum int mode); + + void glPointSize(float size); + + @DeprecatedGL + void glPixelZoom(float xfactor, float yfactor); + + @DeprecatedGL + void glPixelTransferf(@GLenum int pname, float param); + + @DeprecatedGL + void glPixelTransferi(@GLenum int pname, int param); + + void glPixelStoref(@GLenum int pname, float param); + + void glPixelStorei(@GLenum int pname, int param); + + @StripPostfix("values") + @DeprecatedGL + void glPixelMapfv(@GLenum int map, @AutoSize("values") @GLsizei int mapsize, @BufferObject(BufferKind.UnpackPBO) @Const FloatBuffer values); + + @StripPostfix("values") + @DeprecatedGL + void glPixelMapuiv(@GLenum int map, @AutoSize("values") @GLsizei int mapsize, @BufferObject(BufferKind.UnpackPBO) @Const @GLuint IntBuffer values); + + @StripPostfix("values") + @DeprecatedGL + void glPixelMapusv(@GLenum int map, @AutoSize("values") @GLsizei int mapsize, @BufferObject(BufferKind.UnpackPBO) @Const @GLushort ShortBuffer values); + + @DeprecatedGL + void glPassThrough(float token); + + @DeprecatedGL + void glOrtho(double left, double right, double bottom, double top, double zNear, double zFar); + + @DeprecatedGL + void glNormalPointer(@AutoType("pointer") @GLenum int type, @GLsizei int stride, + @CachedReference + @BufferObject(BufferKind.ArrayVBO) + @Check + @Const + @GLint + @GLbyte + @GLfloat + @GLdouble Buffer pointer); + + @DeprecatedGL + @Alternate("glNormalPointer") + void glNormalPointer(@GLenum int type, @GLsizei int stride, + @CachedReference + @BufferObject(BufferKind.ArrayVBO) + @Check + @Const ByteBuffer pointer); + + @NoErrorCheck + @DeprecatedGL + void glNormal3b(byte nx, byte ny, byte nz); + + @NoErrorCheck + @DeprecatedGL + void glNormal3f(float nx, float ny, float nz); + + @NoErrorCheck + @DeprecatedGL + void glNormal3d(double nx, double ny, double nz); + + @NoErrorCheck + @DeprecatedGL + void glNormal3i(int nx, int ny, int nz); + + @DeprecatedGL + void glNewList(@GLuint int list, @GLenum int mode); + + @DeprecatedGL + void glEndList(); + + @StripPostfix("m") + @DeprecatedGL + void glMultMatrixf(@Check("16") @Const FloatBuffer m); + + @StripPostfix("m") + @DeprecatedGL + void glMultMatrixd(@Check("16") @Const DoubleBuffer m); + + void glShadeModel(@GLenum int mode); + + @DeprecatedGL + void glSelectBuffer(@AutoSize("buffer") @GLsizei int size, @GLuint IntBuffer buffer); + + void glScissor(int x, int y, @GLsizei int width, @GLsizei int height); + + @DeprecatedGL + void glScalef(float x, float y, float z); + + @DeprecatedGL + void glScaled(double x, double y, double z); + + @DeprecatedGL + void glRotatef(float angle, float x, float y, float z); + + @DeprecatedGL + void glRotated(double angle, double x, double y, double z); + + @DeprecatedGL + int glRenderMode(@GLenum int mode); + + @DeprecatedGL + void glRectf(float x1, float y1, float x2, float y2); + + @DeprecatedGL + void glRectd(double x1, double y1, double x2, double y2); + + @DeprecatedGL + void glRecti(int x1, int y1, int x2, int y2); + + void glReadPixels(int x, int y, @GLsizei int width, @GLsizei int height, @GLenum int format, @GLenum int type, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @Check("GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)") + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer pixels); + + void glReadBuffer(@GLenum int mode); + + @DeprecatedGL + void glRasterPos2f(float x, float y); + + @DeprecatedGL + void glRasterPos2d(double x, double y); + + @DeprecatedGL + void glRasterPos2i(int x, int y); + + @DeprecatedGL + void glRasterPos3f(float x, float y, float z); + + @DeprecatedGL + void glRasterPos3d(double x, double y, double z); + + @DeprecatedGL + void glRasterPos3i(int x, int y, int z); + + @DeprecatedGL + void glRasterPos4f(float x, float y, float z, float w); + + @DeprecatedGL + void glRasterPos4d(double x, double y, double z, double w); + + @DeprecatedGL + void glRasterPos4i(int x, int y, int z, int w); + + @DeprecatedGL + void glPushName(@GLuint int name); + + @DeprecatedGL + void glPopName(); + + @DeprecatedGL + void glPushMatrix(); + + @DeprecatedGL + void glPopMatrix(); + + @Code(" StateTracker.pushAttrib(caps, mask);") + @DeprecatedGL + void glPushClientAttrib(@GLbitfield int mask); + + @Code(" StateTracker.popAttrib(caps);") + @DeprecatedGL + void glPopClientAttrib(); + + @DeprecatedGL + void glPushAttrib(@GLbitfield int mask); + + @DeprecatedGL + void glPopAttrib(); + + void glStencilFunc(@GLenum int func, int ref, @GLuint int mask); + + @DeprecatedGL + void glVertexPointer(int size, @AutoType("pointer") @GLenum int type, @GLsizei int stride, + @CachedReference + @BufferObject(BufferKind.ArrayVBO) + @Check + @Const + @GLshort + @GLint + @GLfloat + @GLdouble Buffer pointer); + + @DeprecatedGL + @Alternate("glVertexPointer") + void glVertexPointer(int size, @GLenum int type, @GLsizei int stride, + @CachedReference + @BufferObject(BufferKind.ArrayVBO) + @Check + @Const ByteBuffer pointer); + + @NoErrorCheck + @DeprecatedGL + void glVertex2f(float x, float y); + + @NoErrorCheck + @DeprecatedGL + void glVertex2d(double x, double y); + + @NoErrorCheck + @DeprecatedGL + void glVertex2i(int x, int y); + + @NoErrorCheck + @DeprecatedGL + void glVertex3f(float x, float y, float z); + + @NoErrorCheck + @DeprecatedGL + void glVertex3d(double x, double y, double z); + + @NoErrorCheck + @DeprecatedGL + void glVertex3i(int x, int y, int z); + + @NoErrorCheck + @DeprecatedGL + void glVertex4f(float x, float y, float z, float w); + + @NoErrorCheck + @DeprecatedGL + void glVertex4d(double x, double y, double z, double w); + + @NoErrorCheck + @DeprecatedGL + void glVertex4i(int x, int y, int z, int w); + + @DeprecatedGL + void glTranslatef(float x, float y, float z); + + @DeprecatedGL + void glTranslated(double x, double y, double z); + + void glTexImage1D(@GLenum int target, int level, int internalformat, @GLsizei int width, int border, @GLenum int format, @GLenum int type, + @BufferObject(BufferKind.UnpackPBO) + @Check(value = "GLChecks.calculateTexImage1DStorage(pixels, format, type, width)", canBeNull = true) + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer pixels); + + void glTexImage2D(@GLenum int target, int level, int internalformat, int width, int height, int border, @GLenum int format, @GLenum int type, + @BufferObject(BufferKind.UnpackPBO) + @Check(value = "GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height)", canBeNull = true) + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer pixels); + + void glTexSubImage1D(@GLenum int target, int level, int xoffset, @GLsizei int width, @GLenum int format, @GLenum int type, + @BufferObject(BufferKind.UnpackPBO) + @Check("GLChecks.calculateImageStorage(pixels, format, type, width, 1, 1)") + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer pixels); + + void glTexSubImage2D(@GLenum int target, int level, int xoffset, int yoffset, @GLsizei int width, @GLsizei int height, @GLenum int format, @GLenum int type, + @BufferObject(BufferKind.UnpackPBO) + @Check("GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)") + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer pixels); + + void glTexParameterf(@GLenum int target, @GLenum int pname, float param); + + void glTexParameteri(@GLenum int target, @GLenum int pname, int param); + + @StripPostfix("param") + void glTexParameterfv(@GLenum int target, @GLenum int pname, @Check("4") @Const FloatBuffer param); + + @StripPostfix("param") + void glTexParameteriv(@GLenum int target, @GLenum int pname, @Check("4") @Const IntBuffer param); + + @DeprecatedGL + void glTexGenf(@GLenum int coord, @GLenum int pname, float param); + + @DeprecatedGL + void glTexGend(@GLenum int coord, @GLenum int pname, double param); + + @StripPostfix("params") + @DeprecatedGL + void glTexGenfv(@GLenum int coord, @GLenum int pname, @Check("4") @Const FloatBuffer params); + + @StripPostfix("params") + @DeprecatedGL + void glTexGendv(@GLenum int coord, @GLenum int pname, @Check("4") @Const DoubleBuffer params); + + @DeprecatedGL + void glTexGeni(@GLenum int coord, @GLenum int pname, int param); + + @StripPostfix("params") + @DeprecatedGL + void glTexGeniv(@GLenum int coord, @GLenum int pname, @Check("4") @Const IntBuffer params); + + void glTexEnvf(@GLenum int target, @GLenum int pname, float param); + + void glTexEnvi(@GLenum int target, @GLenum int pname, int param); + + @StripPostfix("params") + void glTexEnvfv(@GLenum int target, @GLenum int pname, @Check("4") @Const FloatBuffer params); + + @StripPostfix("params") + void glTexEnviv(@GLenum int target, @GLenum int pname, @Check("4") @Const IntBuffer params); + + @DeprecatedGL + void glTexCoordPointer(int size, @AutoType("pointer") @GLenum int type, @GLsizei int stride, + @CachedReference(index = "StateTracker.getReferences(caps).glClientActiveTexture", name = "glTexCoordPointer_buffer") + @BufferObject(BufferKind.ArrayVBO) + @Check + @Const + @GLint + @GLshort + @GLfloat + @GLdouble Buffer pointer); + + @DeprecatedGL + @Alternate("glTexCoordPointer") + void glTexCoordPointer(int size, @GLenum int type, @GLsizei int stride, + @CachedReference(index = "StateTracker.getReferences(caps).glClientActiveTexture", name = "glTexCoordPointer_buffer") + @BufferObject(BufferKind.ArrayVBO) + @Check + @Const ByteBuffer pointer); + + @NoErrorCheck + @DeprecatedGL + void glTexCoord1f(float s); + + @NoErrorCheck + @DeprecatedGL + void glTexCoord1d(double s); + + @NoErrorCheck + @DeprecatedGL + void glTexCoord2f(float s, float t); + + @NoErrorCheck + @DeprecatedGL + void glTexCoord2d(double s, double t); + + @NoErrorCheck + @DeprecatedGL + void glTexCoord3f(float s, float t, float r); + + @NoErrorCheck + @DeprecatedGL + void glTexCoord3d(double s, double t, double r); + + @NoErrorCheck + @DeprecatedGL + void glTexCoord4f(float s, float t, float r, float q); + + @NoErrorCheck + @DeprecatedGL + void glTexCoord4d(double s, double t, double r, double q); + + void glStencilOp(@GLenum int fail, @GLenum int zfail, @GLenum int zpass); + + void glStencilMask(@GLuint int mask); + + void glViewport(int x, int y, @GLsizei int width, @GLsizei int height); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL12.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL12.java new file mode 100644 index 0000000..251b2b1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL12.java @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.Buffer; + +/** + *

+ * The core OpenGL1.2.1 API, with the imaging subset. + * + * @author cix_foo + * @version $Revision$ + * $Id$ + */ + +public interface GL12 { + + int GL_TEXTURE_BINDING_3D = 0x806A; + int GL_PACK_SKIP_IMAGES = 0x806B; + int GL_PACK_IMAGE_HEIGHT = 0x806C; + int GL_UNPACK_SKIP_IMAGES = 0x806D; + int GL_UNPACK_IMAGE_HEIGHT = 0x806E; + int GL_TEXTURE_3D = 0x806F; + int GL_PROXY_TEXTURE_3D = 0x8070; + int GL_TEXTURE_DEPTH = 0x8071; + int GL_TEXTURE_WRAP_R = 0x8072; + int GL_MAX_3D_TEXTURE_SIZE = 0x8073; + int GL_BGR = 0x80E0; + int GL_BGRA = 0x80E1; + int GL_UNSIGNED_BYTE_3_3_2 = 0x8032; + int GL_UNSIGNED_BYTE_2_3_3_REV = 0x8362; + int GL_UNSIGNED_SHORT_5_6_5 = 0x8363; + int GL_UNSIGNED_SHORT_5_6_5_REV = 0x8364; + int GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033; + int GL_UNSIGNED_SHORT_4_4_4_4_REV = 0x8365; + int GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034; + int GL_UNSIGNED_SHORT_1_5_5_5_REV = 0x8366; + int GL_UNSIGNED_INT_8_8_8_8 = 0x8035; + int GL_UNSIGNED_INT_8_8_8_8_REV = 0x8367; + int GL_UNSIGNED_INT_10_10_10_2 = 0x8036; + int GL_UNSIGNED_INT_2_10_10_10_REV = 0x8368; + int GL_RESCALE_NORMAL = 0x803A; + int GL_LIGHT_MODEL_COLOR_CONTROL = 0x81F8; + int GL_SINGLE_COLOR = 0x81F9; + int GL_SEPARATE_SPECULAR_COLOR = 0x81FA; + int GL_CLAMP_TO_EDGE = 0x812F; + int GL_TEXTURE_MIN_LOD = 0x813A; + int GL_TEXTURE_MAX_LOD = 0x813B; + int GL_TEXTURE_BASE_LEVEL = 0x813C; + int GL_TEXTURE_MAX_LEVEL = 0x813D; + int GL_MAX_ELEMENTS_VERTICES = 0x80E8; + int GL_MAX_ELEMENTS_INDICES = 0x80E9; + int GL_ALIASED_POINT_SIZE_RANGE = 0x846D; + int GL_ALIASED_LINE_WIDTH_RANGE = 0x846E; + + int GL_SMOOTH_POINT_SIZE_RANGE = 0x0B12; + int GL_SMOOTH_POINT_SIZE_GRANULARITY = 0x0B13; + int GL_SMOOTH_LINE_WIDTH_RANGE = 0x0B22; + int GL_SMOOTH_LINE_WIDTH_GRANULARITY = 0x0B23; + + void glDrawRangeElements(@GLenum int mode, @GLuint int start, @GLuint int end, @AutoSize("indices") @GLsizei int count, + @AutoType("indices") + @GLenum int type, + @BufferObject(BufferKind.ElementVBO) + @Const + @GLubyte + @GLushort + @GLuint Buffer indices); + + void glTexImage3D(@GLenum int target, int level, int internalFormat, @GLsizei int width, @GLsizei int height, @GLsizei int depth, int border, @GLenum int format, @GLenum int type, + @BufferObject(BufferKind.UnpackPBO) + @Check(value = "GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth)", canBeNull = true) + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer pixels); + + void glTexSubImage3D(@GLenum int target, int level, int xoffset, int yoffset, int zoffset, @GLsizei int width, @GLsizei int height, @GLsizei int depth, @GLenum int format, @GLenum int type, + @BufferObject(BufferKind.UnpackPBO) + @Check("GLChecks.calculateImageStorage(pixels, format, type, width, height, depth)") + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer pixels); + + void glCopyTexSubImage3D(@GLenum int target, int level, int xoffset, int yoffset, int zoffset, int x, int y, @GLsizei int width, @GLsizei int height); +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL13.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL13.java new file mode 100644 index 0000000..5d7f7a3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL13.java @@ -0,0 +1,258 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.*; + +/** + *

+ * The core OpenGL1.3 API. + * + * @author cix_foo + * @version $Revision$ + * $Id$ + */ +@DeprecatedGL +public interface GL13 { + int GL_TEXTURE0 = 0x84C0; + int GL_TEXTURE1 = 0x84C1; + int GL_TEXTURE2 = 0x84C2; + int GL_TEXTURE3 = 0x84C3; + int GL_TEXTURE4 = 0x84C4; + int GL_TEXTURE5 = 0x84C5; + int GL_TEXTURE6 = 0x84C6; + int GL_TEXTURE7 = 0x84C7; + int GL_TEXTURE8 = 0x84C8; + int GL_TEXTURE9 = 0x84C9; + int GL_TEXTURE10 = 0x84CA; + int GL_TEXTURE11 = 0x84CB; + int GL_TEXTURE12 = 0x84CC; + int GL_TEXTURE13 = 0x84CD; + int GL_TEXTURE14 = 0x84CE; + int GL_TEXTURE15 = 0x84CF; + int GL_TEXTURE16 = 0x84D0; + int GL_TEXTURE17 = 0x84D1; + int GL_TEXTURE18 = 0x84D2; + int GL_TEXTURE19 = 0x84D3; + int GL_TEXTURE20 = 0x84D4; + int GL_TEXTURE21 = 0x84D5; + int GL_TEXTURE22 = 0x84D6; + int GL_TEXTURE23 = 0x84D7; + int GL_TEXTURE24 = 0x84D8; + int GL_TEXTURE25 = 0x84D9; + int GL_TEXTURE26 = 0x84DA; + int GL_TEXTURE27 = 0x84DB; + int GL_TEXTURE28 = 0x84DC; + int GL_TEXTURE29 = 0x84DD; + int GL_TEXTURE30 = 0x84DE; + int GL_TEXTURE31 = 0x84DF; + int GL_ACTIVE_TEXTURE = 0x84E0; + int GL_CLIENT_ACTIVE_TEXTURE = 0x84E1; + int GL_MAX_TEXTURE_UNITS = 0x84E2; + + int GL_NORMAL_MAP = 0x8511; + int GL_REFLECTION_MAP = 0x8512; + int GL_TEXTURE_CUBE_MAP = 0x8513; + int GL_TEXTURE_BINDING_CUBE_MAP = 0x8514; + int GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515; + int GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516; + int GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517; + int GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518; + int GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519; + int GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A; + int GL_PROXY_TEXTURE_CUBE_MAP = 0x851B; + int GL_MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C; + + int GL_COMPRESSED_ALPHA = 0x84E9; + int GL_COMPRESSED_LUMINANCE = 0x84EA; + int GL_COMPRESSED_LUMINANCE_ALPHA = 0x84EB; + int GL_COMPRESSED_INTENSITY = 0x84EC; + int GL_COMPRESSED_RGB = 0x84ED; + int GL_COMPRESSED_RGBA = 0x84EE; + int GL_TEXTURE_COMPRESSION_HINT = 0x84EF; + int GL_TEXTURE_COMPRESSED_IMAGE_SIZE = 0x86A0; + int GL_TEXTURE_COMPRESSED = 0x86A1; + int GL_NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2; + int GL_COMPRESSED_TEXTURE_FORMATS = 0x86A3; + + int GL_MULTISAMPLE = 0x809D; + int GL_SAMPLE_ALPHA_TO_COVERAGE = 0x809E; + int GL_SAMPLE_ALPHA_TO_ONE = 0x809F; + int GL_SAMPLE_COVERAGE = 0x80A0; + int GL_SAMPLE_BUFFERS = 0x80A8; + int GL_SAMPLES = 0x80A9; + int GL_SAMPLE_COVERAGE_VALUE = 0x80AA; + int GL_SAMPLE_COVERAGE_INVERT = 0x80AB; + int GL_MULTISAMPLE_BIT = 0x20000000; + + int GL_TRANSPOSE_MODELVIEW_MATRIX = 0x84E3; + int GL_TRANSPOSE_PROJECTION_MATRIX = 0x84E4; + int GL_TRANSPOSE_TEXTURE_MATRIX = 0x84E5; + int GL_TRANSPOSE_COLOR_MATRIX = 0x84E6; + + int GL_COMBINE = 0x8570; + int GL_COMBINE_RGB = 0x8571; + int GL_COMBINE_ALPHA = 0x8572; + int GL_SOURCE0_RGB = 0x8580; + int GL_SOURCE1_RGB = 0x8581; + int GL_SOURCE2_RGB = 0x8582; + int GL_SOURCE0_ALPHA = 0x8588; + int GL_SOURCE1_ALPHA = 0x8589; + int GL_SOURCE2_ALPHA = 0x858A; + int GL_OPERAND0_RGB = 0x8590; + int GL_OPERAND1_RGB = 0x8591; + int GL_OPERAND2_RGB = 0x8592; + int GL_OPERAND0_ALPHA = 0x8598; + int GL_OPERAND1_ALPHA = 0x8599; + int GL_OPERAND2_ALPHA = 0x859A; + int GL_RGB_SCALE = 0x8573; + int GL_ADD_SIGNED = 0x8574; + int GL_INTERPOLATE = 0x8575; + int GL_SUBTRACT = 0x84E7; + int GL_CONSTANT = 0x8576; + int GL_PRIMARY_COLOR = 0x8577; + int GL_PREVIOUS = 0x8578; + int GL_DOT3_RGB = 0x86AE; + int GL_DOT3_RGBA = 0x86AF; + int GL_CLAMP_TO_BORDER = 0x812D; + + void glActiveTexture(@GLenum int texture); + + @Code("\t\tStateTracker.getReferences(caps).glClientActiveTexture = texture - GL_TEXTURE0;") + @DeprecatedGL + void glClientActiveTexture(@GLenum int texture); + + void glCompressedTexImage1D(@GLenum int target, int level, @GLenum int internalformat, @GLsizei int width, int border, @AutoSize("data") @GLsizei int imageSize, + @BufferObject(BufferKind.UnpackPBO) + @Check + @Const + @GLvoid + Buffer data); + + void glCompressedTexImage2D(@GLenum int target, int level, @GLenum int internalformat, @GLsizei int width, @GLsizei int height, int border, @AutoSize("data") @GLsizei int imageSize, + @BufferObject(BufferKind.UnpackPBO) + @Check + @Const + @GLvoid + ByteBuffer data); + + void glCompressedTexImage3D(@GLenum int target, int level, @GLenum int internalformat, @GLsizei int width, @GLsizei int height, @GLsizei int depth, int border, @AutoSize("data") @GLsizei int imageSize, + @BufferObject(BufferKind.UnpackPBO) + @Check + @Const + @GLvoid + ByteBuffer data); + + void glCompressedTexSubImage1D(@GLenum int target, int level, int xoffset, @GLsizei int width, @GLenum int format, @AutoSize("data") @GLsizei int imageSize, + @BufferObject(BufferKind.UnpackPBO) + @Check + @Const + @GLvoid + ByteBuffer data); + + void glCompressedTexSubImage2D(@GLenum int target, int level, int xoffset, int yoffset, @GLsizei int width, @GLsizei int height, @GLenum int format, @AutoSize("data") @GLsizei int imageSize, + @BufferObject(BufferKind.UnpackPBO) + @Check + @Const + @GLvoid + ByteBuffer data); + + void glCompressedTexSubImage3D(@GLenum int target, int level, int xoffset, int yoffset, int zoffset, @GLsizei int width, @GLsizei int height, @GLsizei int depth, @GLenum int format, @AutoSize("data") @GLsizei int imageSize, + @BufferObject(BufferKind.UnpackPBO) + @Check + @Const + @GLvoid + ByteBuffer data); + + // TODO: check buffer size valid + void glGetCompressedTexImage(@GLenum int target, int lod, + @OutParameter + @BufferObject(BufferKind.PackPBO) + @Check + @GLbyte + @GLshort + @GLint Buffer img); + + @NoErrorCheck + @DeprecatedGL + void glMultiTexCoord1f(@GLenum int target, float s); + + @NoErrorCheck + @DeprecatedGL + void glMultiTexCoord1d(@GLenum int target, double s); + + @NoErrorCheck + @DeprecatedGL + void glMultiTexCoord2f(@GLenum int target, float s, float t); + + @NoErrorCheck + @DeprecatedGL + void glMultiTexCoord2d(@GLenum int target, double s, double t); + + @NoErrorCheck + @DeprecatedGL + void glMultiTexCoord3f(@GLenum int target, float s, float t, float r); + + @NoErrorCheck + @DeprecatedGL + void glMultiTexCoord3d(@GLenum int target, double s, double t, double r); + + @NoErrorCheck + @DeprecatedGL + void glMultiTexCoord4f(@GLenum int target, float s, float t, float r, float q); + + @NoErrorCheck + @DeprecatedGL + void glMultiTexCoord4d(@GLenum int target, double s, double t, double r, double q); + + @StripPostfix("m") + @DeprecatedGL + void glLoadTransposeMatrixf(@Check("16") @Const FloatBuffer m); + + @StripPostfix("m") + @DeprecatedGL + void glLoadTransposeMatrixd(@Check("16") @Const DoubleBuffer m); + + @StripPostfix("m") + @DeprecatedGL + void glMultTransposeMatrixf(@Check("16") @Const FloatBuffer m); + + @StripPostfix("m") + @DeprecatedGL + void glMultTransposeMatrixd(@Check("16") @Const DoubleBuffer m); + + void glSampleCoverage(float value, boolean invert); +} + diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL14.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL14.java new file mode 100644 index 0000000..bff2d29 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL14.java @@ -0,0 +1,173 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.*; + +/** + *

+ * The core OpenGL1.4 API. + * + * @author cix_foo + * @version $Revision$ + * $Id$ + */ +@DeprecatedGL +public interface GL14 { + int GL_GENERATE_MIPMAP = 0x8191; + int GL_GENERATE_MIPMAP_HINT = 0x8192; + int GL_DEPTH_COMPONENT16 = 0x81A5; + int GL_DEPTH_COMPONENT24 = 0x81A6; + int GL_DEPTH_COMPONENT32 = 0x81A7; + int GL_TEXTURE_DEPTH_SIZE = 0x884A; + int GL_DEPTH_TEXTURE_MODE = 0x884B; + int GL_TEXTURE_COMPARE_MODE = 0x884C; + int GL_TEXTURE_COMPARE_FUNC = 0x884D; + int GL_COMPARE_R_TO_TEXTURE = 0x884E; + int GL_FOG_COORDINATE_SOURCE = 0x8450; + int GL_FOG_COORDINATE = 0x8451; + int GL_FRAGMENT_DEPTH = 0x8452; + int GL_CURRENT_FOG_COORDINATE = 0x8453; + int GL_FOG_COORDINATE_ARRAY_TYPE = 0x8454; + int GL_FOG_COORDINATE_ARRAY_STRIDE = 0x8455; + int GL_FOG_COORDINATE_ARRAY_POINTER = 0x8456; + int GL_FOG_COORDINATE_ARRAY = 0x8457; + int GL_POINT_SIZE_MIN = 0x8126; + int GL_POINT_SIZE_MAX = 0x8127; + int GL_POINT_FADE_THRESHOLD_SIZE = 0x8128; + int GL_POINT_DISTANCE_ATTENUATION = 0x8129; + int GL_COLOR_SUM = 0x8458; + int GL_CURRENT_SECONDARY_COLOR = 0x8459; + int GL_SECONDARY_COLOR_ARRAY_SIZE = 0x845A; + int GL_SECONDARY_COLOR_ARRAY_TYPE = 0x845B; + int GL_SECONDARY_COLOR_ARRAY_STRIDE = 0x845C; + int GL_SECONDARY_COLOR_ARRAY_POINTER = 0x845D; + int GL_SECONDARY_COLOR_ARRAY = 0x845E; + int GL_BLEND_DST_RGB = 0x80C8; + int GL_BLEND_SRC_RGB = 0x80C9; + int GL_BLEND_DST_ALPHA = 0x80CA; + int GL_BLEND_SRC_ALPHA = 0x80CB; + int GL_INCR_WRAP = 0x8507; + int GL_DECR_WRAP = 0x8508; + int GL_TEXTURE_FILTER_CONTROL = 0x8500; + int GL_TEXTURE_LOD_BIAS = 0x8501; + int GL_MAX_TEXTURE_LOD_BIAS = 0x84FD; + int GL_MIRRORED_REPEAT = 0x8370; + + int GL_BLEND_COLOR = 0x8005; + int GL_BLEND_EQUATION = 0x8009; + + int GL_FUNC_ADD = 0x8006; + int GL_FUNC_SUBTRACT = 0x800A; + int GL_FUNC_REVERSE_SUBTRACT = 0x800B; + int GL_MIN = 0x8007; + int GL_MAX = 0x8008; + + void glBlendEquation(@GLenum int mode); + + void glBlendColor(float red, float green, float blue, float alpha); + + @DeprecatedGL + void glFogCoordf(float coord); + + @DeprecatedGL + void glFogCoordd(double coord); + + @DeprecatedGL + void glFogCoordPointer(@AutoType("data") @GLenum int type, @GLsizei int stride, + @CachedReference + @BufferObject(BufferKind.ArrayVBO) + @Check + @Const + @GLfloat + @GLdouble Buffer data); + + void glMultiDrawArrays(@GLenum int mode, IntBuffer piFirst, @Check("piFirst.remaining()") @GLsizei IntBuffer piCount, @AutoSize("piFirst") @GLsizei int primcount); + + //void glMultiDrawElements(int mode, int piCount, int type, int pIndices, int primcount); + + void glPointParameteri(@GLenum int pname, int param); + + void glPointParameterf(@GLenum int pname, float param); + + @StripPostfix("params") + void glPointParameteriv(@GLenum int pname, @Check("4") @Const IntBuffer params); + + @StripPostfix("params") + void glPointParameterfv(@GLenum int pname, @Check("4") @Const FloatBuffer params); + + @DeprecatedGL + void glSecondaryColor3b(byte red, byte green, byte blue); + + @DeprecatedGL + void glSecondaryColor3f(float red, float green, float blue); + + @DeprecatedGL + void glSecondaryColor3d(double red, double green, double blue); + + @DeprecatedGL + void glSecondaryColor3ub(@GLubyte byte red, @GLubyte byte green, @GLubyte byte blue); + + @DeprecatedGL + void glSecondaryColorPointer(int size, @AutoType("data") @GLenum int type, @GLsizei int stride, + @BufferObject(BufferKind.ArrayVBO) + @Check + @Const + @GLbyte + @GLubyte + @GLfloat + @GLdouble Buffer data); + + void glBlendFuncSeparate(@GLenum int sfactorRGB, @GLenum int dfactorRGB, @GLenum int sfactorAlpha, @GLenum int dfactorAlpha); + + @DeprecatedGL + void glWindowPos2f(float x, float y); + + @DeprecatedGL + void glWindowPos2d(double x, double y); + + @DeprecatedGL + void glWindowPos2i(int x, int y); + + @DeprecatedGL + void glWindowPos3f(float x, float y, float z); + + @DeprecatedGL + void glWindowPos3d(double x, double y, double z); + + @DeprecatedGL + void glWindowPos3i(int x, int y, int z); +} + diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL15.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL15.java new file mode 100644 index 0000000..a7fe557 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL15.java @@ -0,0 +1,255 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.Buffer; +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +public interface GL15 { + // ---------------------------------------------------------------------- + // ---------------------- ARB_vertex_buffer_object ---------------------- + // ---------------------------------------------------------------------- + + int GL_ARRAY_BUFFER = 0x8892; + int GL_ELEMENT_ARRAY_BUFFER = 0x8893; + int GL_ARRAY_BUFFER_BINDING = 0x8894; + int GL_ELEMENT_ARRAY_BUFFER_BINDING = 0x8895; + int GL_VERTEX_ARRAY_BUFFER_BINDING = 0x8896; + int GL_NORMAL_ARRAY_BUFFER_BINDING = 0x8897; + int GL_COLOR_ARRAY_BUFFER_BINDING = 0x8898; + int GL_INDEX_ARRAY_BUFFER_BINDING = 0x8899; + int GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING = 0x889A; + int GL_EDGE_FLAG_ARRAY_BUFFER_BINDING = 0x889B; + int GL_SECONDARY_COLOR_ARRAY_BUFFER_BINDING = 0x889C; + int GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING = 0x889D; + int GL_WEIGHT_ARRAY_BUFFER_BINDING = 0x889E; + int GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F; + int GL_STREAM_DRAW = 0x88E0; + int GL_STREAM_READ = 0x88E1; + int GL_STREAM_COPY = 0x88E2; + int GL_STATIC_DRAW = 0x88E4; + int GL_STATIC_READ = 0x88E5; + int GL_STATIC_COPY = 0x88E6; + int GL_DYNAMIC_DRAW = 0x88E8; + int GL_DYNAMIC_READ = 0x88E9; + int GL_DYNAMIC_COPY = 0x88EA; + int GL_READ_ONLY = 0x88B8; + int GL_WRITE_ONLY = 0x88B9; + int GL_READ_WRITE = 0x88BA; + int GL_BUFFER_SIZE = 0x8764; + int GL_BUFFER_USAGE = 0x8765; + int GL_BUFFER_ACCESS = 0x88BB; + int GL_BUFFER_MAPPED = 0x88BC; + int GL_BUFFER_MAP_POINTER = 0x88BD; + + int GL_FOG_COORD_SRC = GL14.GL_FOG_COORDINATE_SOURCE; + int GL_FOG_COORD = GL14.GL_FOG_COORDINATE; + int GL_CURRENT_FOG_COORD = GL14.GL_CURRENT_FOG_COORDINATE; + int GL_FOG_COORD_ARRAY_TYPE = GL14.GL_FOG_COORDINATE_ARRAY_TYPE; + int GL_FOG_COORD_ARRAY_STRIDE = GL14.GL_FOG_COORDINATE_ARRAY_STRIDE; + int GL_FOG_COORD_ARRAY_POINTER = GL14.GL_FOG_COORDINATE_ARRAY_POINTER; + int GL_FOG_COORD_ARRAY = GL14.GL_FOG_COORDINATE_ARRAY; + int GL_FOG_COORD_ARRAY_BUFFER_BINDING = GL_FOG_COORDINATE_ARRAY_BUFFER_BINDING; + int GL_SRC0_RGB = GL13.GL_SOURCE0_RGB; + int GL_SRC1_RGB = GL13.GL_SOURCE1_RGB; + int GL_SRC2_RGB = GL13.GL_SOURCE2_RGB; + int GL_SRC0_ALPHA = GL13.GL_SOURCE0_ALPHA; + int GL_SRC1_ALPHA = GL13.GL_SOURCE1_ALPHA; + int GL_SRC2_ALPHA = GL13.GL_SOURCE2_ALPHA; + + @Code(" StateTracker.bindBuffer(caps, target, buffer);") + void glBindBuffer(@GLenum int target, @GLuint int buffer); + + void glDeleteBuffers(@AutoSize("buffers") @GLsizei int n, @Const @GLuint IntBuffer buffers); + + @Alternate("glDeleteBuffers") + void glDeleteBuffers(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(caps, buffer)", keepParam = true) int buffer); + + void glGenBuffers(@AutoSize("buffers") @GLsizei int n, @OutParameter @GLuint IntBuffer buffers); + + @Alternate("glGenBuffers") + @GLreturn("buffers") + void glGenBuffers2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer buffers); + + boolean glIsBuffer(@GLuint int buffer); + + @GenerateAutos + void glBufferData(@GLenum int target, @AutoSize("data") @GLsizeiptr long size, + @Check + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer data, @GLenum int usage); + + void glBufferSubData(@GLenum int target, @GLintptr long offset, @AutoSize("data") @GLsizeiptr long size, + @Check + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer data); + + void glGetBufferSubData(@GLenum int target, @GLintptr long offset, @AutoSize("data") @GLsizeiptr long size, + @OutParameter + @Check + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer data); + + /** + * glMapBuffer maps a GL buffer object to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapBuffer like this: + *

+ * ByteBuffer mapped_buffer; mapped_buffer = glMapBuffer(..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBuffer(..., ..., mapped_buffer); + *

+ * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + *

+ * The version of this method without an explicit length argument calls glGetBufferParameter internally to + * retrieve the current buffer object size, which may cause a pipeline flush and reduce application performance. + *

+ * The version of this method with an explicit length argument is a fast alternative to the one without. No GL call + * is made to retrieve the buffer object size, so the user is responsible for tracking and using the appropriate length.
+ * Security warning: The length argument should match the buffer object size. Reading from or writing to outside + * the memory region that corresponds to the mapped buffer object will cause native crashes. + * + * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. + * + * @return A ByteBuffer representing the mapped buffer memory. + */ + @CachedResult + @GLvoid + @AutoSize("GLChecks.getBufferObjectSize(caps, target)") + ByteBuffer glMapBuffer(@GLenum int target, @GLenum int access); + + boolean glUnmapBuffer(@GLenum int target); + + @StripPostfix("params") + void glGetBufferParameteriv(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetBufferParameteri} instead. */ + @Alternate("glGetBufferParameteriv") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "GL15", method = "glGetBufferParameteri") + @Deprecated + void glGetBufferParameteriv2(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + @Alternate("glGetBufferParameteriv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetBufferParameteriv3(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + @StripPostfix("pointer") + @AutoSize("GLChecks.getBufferObjectSize(caps, target)") + void glGetBufferPointerv(@GLenum int target, @GLenum int pname, @OutParameter @Result @GLvoid ByteBuffer pointer); + + // ----------------------------------------------------------------- + // ---------------------- ARB_occlusion_query ---------------------- + // ----------------------------------------------------------------- + + /** + * Accepted by the <target> parameter of BeginQuery, EndQuery, + * and GetQueryiv: + */ + int GL_SAMPLES_PASSED = 0x8914; + + /** Accepted by the <pname> parameter of GetQueryiv: */ + int GL_QUERY_COUNTER_BITS = 0x8864; + int GL_CURRENT_QUERY = 0x8865; + + /** + * Accepted by the <pname> parameter of GetQueryObjectiv and + * GetQueryObjectuiv: + */ + int GL_QUERY_RESULT = 0x8866; + int GL_QUERY_RESULT_AVAILABLE = 0x8867; + + void glGenQueries(@AutoSize("ids") @GLsizei int n, @OutParameter @GLuint IntBuffer ids); + + @Alternate("glGenQueries") + @GLreturn("ids") + void glGenQueries2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer ids); + + void glDeleteQueries(@AutoSize("ids") @GLsizei int n, @GLuint IntBuffer ids); + + @Alternate("glDeleteQueries") + void glDeleteQueries(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(caps, id)", keepParam = true) int id); + + boolean glIsQuery(@GLuint int id); + + void glBeginQuery(@GLenum int target, @GLuint int id); + + void glEndQuery(@GLenum int target); + + @StripPostfix("params") + void glGetQueryiv(@GLenum int target, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetQueryi} instead. */ + @Alternate("glGetQueryiv") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "GL15", method = "glGetQueryi") + @Deprecated + void glGetQueryiv2(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + @Alternate("glGetQueryiv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetQueryiv3(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + @StripPostfix("params") + void glGetQueryObjectiv(@GLenum int id, @GLenum int pname, @OutParameter @Check("1") @GLint IntBuffer params); + + @Alternate("glGetQueryObjectiv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetQueryObjectiv2(@GLenum int id, @GLenum int pname, @OutParameter @GLint IntBuffer params); + + @StripPostfix("params") + void glGetQueryObjectuiv(@GLenum int id, @GLenum int pname, @OutParameter @Check("1") @GLuint IntBuffer params); + + @Alternate("glGetQueryObjectuiv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetQueryObjectuiv2(@GLenum int id, @GLenum int pname, @OutParameter @GLuint IntBuffer params); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL20.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL20.java new file mode 100644 index 0000000..194c02f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL20.java @@ -0,0 +1,596 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.*; + +public interface GL20 { + // ------------------------------------------------------------------ + // -------------------[ ARB_shading_language_100 ]------------------- + // ------------------------------------------------------------------ + + /** Accepted by the <name> parameter of GetString: */ + int GL_SHADING_LANGUAGE_VERSION = 0x8B8C; + + // ------------------------------------------------------------------ + // ----------------------[ ARB_shader_objects ]---------------------- + // ------------------------------------------------------------------ + + /** Accepted by the <pname> argument of GetInteger: */ + int GL_CURRENT_PROGRAM = 0x8B8D; + + /** Accepted by the <pname> parameter of GetObjectParameter{fi}vARB: */ + int GL_SHADER_TYPE = 0x8B4F; + int GL_DELETE_STATUS = 0x8B80; + int GL_COMPILE_STATUS = 0x8B81; + int GL_LINK_STATUS = 0x8B82; + int GL_VALIDATE_STATUS = 0x8B83; + int GL_INFO_LOG_LENGTH = 0x8B84; + int GL_ATTACHED_SHADERS = 0x8B85; + int GL_ACTIVE_UNIFORMS = 0x8B86; + int GL_ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87; + int GL_ACTIVE_ATTRIBUTES = 0x8B89; + int GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A; + int GL_SHADER_SOURCE_LENGTH = 0x8B88; + + /** Returned by the <params> parameter of GetObjectParameter{fi}vARB: */ + int GL_SHADER_OBJECT = 0x8B48; + + /** Returned by the <type> parameter of GetActiveUniformARB: */ + int GL_FLOAT_VEC2 = 0x8B50; + int GL_FLOAT_VEC3 = 0x8B51; + int GL_FLOAT_VEC4 = 0x8B52; + int GL_INT_VEC2 = 0x8B53; + int GL_INT_VEC3 = 0x8B54; + int GL_INT_VEC4 = 0x8B55; + int GL_BOOL = 0x8B56; + int GL_BOOL_VEC2 = 0x8B57; + int GL_BOOL_VEC3 = 0x8B58; + int GL_BOOL_VEC4 = 0x8B59; + int GL_FLOAT_MAT2 = 0x8B5A; + int GL_FLOAT_MAT3 = 0x8B5B; + int GL_FLOAT_MAT4 = 0x8B5C; + int GL_SAMPLER_1D = 0x8B5D; + int GL_SAMPLER_2D = 0x8B5E; + int GL_SAMPLER_3D = 0x8B5F; + int GL_SAMPLER_CUBE = 0x8B60; + int GL_SAMPLER_1D_SHADOW = 0x8B61; + int GL_SAMPLER_2D_SHADOW = 0x8B62; + + /** + * The ARB_shader_objects extension allows multiple, optionally null-terminated, source strings to define a shader program. + *

+ * This method uses just a single string, that should NOT be null-terminated. + * + * @param shader + * @param string + */ + void glShaderSource(@GLuint int shader, @Constant("1") @GLsizei int count, + @Indirect @Const @GLchar @Check ByteBuffer string, + @AutoSize("string") @Indirect @Const @GLint int length); + + @Alternate("glShaderSource") + void glShaderSource2(@GLuint int shader, @Constant("1") @GLsizei int count, CharSequence string, @Constant("string.length()") @Indirect @Const int length); + + @Alternate(value = "glShaderSource", nativeAlt = true) + void glShaderSource3(@GLuint int shader, @Constant("strings.length") @GLsizei int count, + @Const @PointerArray(value = "count", lengths = "length") CharSequence[] strings, + @Constant("APIUtil.getLengths(caps, strings)") @Const IntBuffer length); + + int glCreateShader(@GLuint int type); + + boolean glIsShader(@GLuint int shader); + + void glCompileShader(@GLuint int shader); + + void glDeleteShader(@GLuint int shader); + + int glCreateProgram(); + + boolean glIsProgram(int program); + + void glAttachShader(@GLuint int program, @GLuint int shader); + + void glDetachShader(@GLuint int program, @GLuint int shader); + + void glLinkProgram(@GLuint int program); + + void glUseProgram(@GLuint int program); + + void glValidateProgram(@GLuint int program); + + void glDeleteProgram(@GLuint int program); + + void glUniform1f(int location, float v0); + + void glUniform2f(int location, float v0, float v1); + + void glUniform3f(int location, float v0, float v1, float v2); + + void glUniform4f(int location, float v0, float v1, float v2, float v3); + + void glUniform1i(int location, int v0); + + void glUniform2i(int location, int v0, int v1); + + void glUniform3i(int location, int v0, int v1, int v2); + + void glUniform4i(int location, int v0, int v1, int v2, int v3); + + @StripPostfix("values") + void glUniform1fv(int location, @AutoSize("values") @GLsizei int count, @Const FloatBuffer values); + + @StripPostfix("values") + void glUniform2fv(int location, @AutoSize(value = "values", expression = " >> 1") @GLsizei int count, @Const FloatBuffer values); + + @StripPostfix("values") + void glUniform3fv(int location, @AutoSize(value = "values", expression = " / 3") @GLsizei int count, @Const FloatBuffer values); + + @StripPostfix("values") + void glUniform4fv(int location, @AutoSize(value = "values", expression = " >> 2") @GLsizei int count, @Const FloatBuffer values); + + @StripPostfix("values") + void glUniform1iv(int location, @AutoSize("values") @GLsizei int count, @Const IntBuffer values); + + @StripPostfix("values") + void glUniform2iv(int location, @AutoSize(value = "values", expression = " >> 1") @GLsizei int count, @Const IntBuffer values); + + @StripPostfix("values") + void glUniform3iv(int location, @AutoSize(value = "values", expression = " / 3") @GLsizei int count, @Const IntBuffer values); + + @StripPostfix("values") + void glUniform4iv(int location, @AutoSize(value = "values", expression = " >> 2") @GLsizei int count, @Const IntBuffer values); + + @StripPostfix("matrices") + void glUniformMatrix2fv(int location, @AutoSize(value = "matrices", expression = " >> 2") @GLsizei int count, + boolean transpose, @Const FloatBuffer matrices); + + @StripPostfix("matrices") + void glUniformMatrix3fv(int location, @AutoSize(value = "matrices", expression = " / (3 * 3)") @GLsizei int count, + boolean transpose, @Const FloatBuffer matrices); + + @StripPostfix("matrices") + void glUniformMatrix4fv(int location, @AutoSize(value = "matrices", expression = " >> 4") @GLsizei int count, + boolean transpose, @Const FloatBuffer matrices); + + @StripPostfix("params") + void glGetShaderiv(@GLuint int shader, @GLenum int pname, @OutParameter @Check IntBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetShaderi} instead. */ + @Alternate("glGetShaderiv") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "GL20", method = "glGetShaderi") + @Deprecated + void glGetShaderiv2(@GLuint int shader, @GLenum int pname, @OutParameter IntBuffer params); + + @Alternate("glGetShaderiv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetShaderiv3(@GLuint int shader, @GLenum int pname, @OutParameter IntBuffer params); + + @StripPostfix("params") + void glGetProgramiv(@GLuint int program, @GLenum int pname, @OutParameter @Check IntBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetProgrami} instead. */ + @Alternate("glGetProgramiv") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "GL20", method = "glGetProgrami") + @Deprecated + void glGetProgramiv2(@GLuint int program, @GLenum int pname, @OutParameter IntBuffer params); + + @Alternate("glGetProgramiv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetProgramiv3(@GLuint int program, @GLenum int pname, @OutParameter IntBuffer params); + + void glGetShaderInfoLog(@GLuint int shader, @AutoSize("infoLog") @GLsizei int maxLength, + @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length, + @OutParameter @GLchar ByteBuffer infoLog); + + @Alternate("glGetShaderInfoLog") + @GLreturn(value = "infoLog", maxLength = "maxLength") + void glGetShaderInfoLog2(@GLuint int shader, @GLsizei int maxLength, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(infoLog_length)") IntBuffer length, + @OutParameter @GLchar ByteBuffer infoLog); + + void glGetProgramInfoLog(@GLuint int program, @AutoSize("infoLog") @GLsizei int maxLength, + @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length, + @OutParameter @GLchar ByteBuffer infoLog); + + @Alternate("glGetProgramInfoLog") + @GLreturn(value = "infoLog", maxLength = "maxLength") + void glGetProgramInfoLog2(@GLuint int program, @GLsizei int maxLength, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(infoLog_length)") IntBuffer length, + @OutParameter @GLchar ByteBuffer infoLog); + + void glGetAttachedShaders(@GLuint int program, @AutoSize("shaders") @GLsizei int maxCount, + @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer count, + @OutParameter @GLuint IntBuffer shaders); + + /** + * Returns the location of the uniform with the specified name. The ByteBuffer should contain the uniform name as a + * null-terminated string. + * + * @param program + * @param name + */ + int glGetUniformLocation(@GLuint int program, @NullTerminated @Check("1") @Const @GLchar ByteBuffer name); + + @Alternate("glGetUniformLocation") + int glGetUniformLocation(@GLuint int program, @NullTerminated CharSequence name); + + void glGetActiveUniform(@GLuint int program, @GLuint int index, @AutoSize("name") @GLsizei int maxLength, + @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length, + @OutParameter @GLsizei @Check("1") IntBuffer size, + @OutParameter @GLenum @Check("1") IntBuffer type, + @OutParameter @GLchar ByteBuffer name); + + /** Overloads glGetActiveUniform. This version returns both size and type in the sizeType buffer (at .position() and .position() + 1). */ + @Alternate("glGetActiveUniform") + @GLreturn(value = "name", maxLength = "maxLength") + void glGetActiveUniform2(@GLuint int program, @GLuint int index, @GLsizei int maxLength, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(name_length)") IntBuffer length, + @OutParameter @Check("2") IntBuffer sizeType, + @OutParameter @GLenum @Constant("MemoryUtil.getAddress(sizeType, sizeType.position() + 1)") IntBuffer type, + @OutParameter @GLchar ByteBuffer name); + + /** Overloads glGetActiveUniformARB. This version returns only the uniform name. */ + @Alternate(value = "glGetActiveUniform", javaAlt = true) + @GLreturn(value = "name", maxLength = "maxLength") + void glGetActiveUniform(@GLuint int program, @GLuint int index, @GLsizei int maxLength, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(name_length), MemoryUtil.getAddress0(APIUtil.getBufferInt(caps)), MemoryUtil.getAddress(APIUtil.getBufferInt(caps), 1)") IntBuffer length, + @OutParameter @GLchar ByteBuffer name); + + /** Overloads glGetActiveUniform. This version returns only the uniform size. */ + @Alternate(value = "glGetActiveUniform", javaAlt = true) + @GLreturn(value = "size") + void glGetActiveUniformSize(@GLuint int program, @GLuint int index, @Constant("1") @GLsizei int maxLength, + @OutParameter @GLsizei @Constant("0L") IntBuffer length, + @OutParameter IntBuffer size, + @OutParameter @GLenum @Constant("MemoryUtil.getAddress(size, 1)") IntBuffer type, // Reuse size buffer and ignore + @OutParameter @GLchar @Constant("APIUtil.getBufferByte0(caps)") ByteBuffer name); + + /** Overloads glGetActiveUniform. This version returns only the uniform type. */ + @Alternate(value = "glGetActiveUniform", javaAlt = true) + @GLreturn(value = "type") + void glGetActiveUniformType(@GLuint int program, @GLuint int index, @Constant("0") @GLsizei int maxLength, + @OutParameter @GLsizei @Constant("0L") IntBuffer length, + @OutParameter @Constant("MemoryUtil.getAddress(type, 1)") IntBuffer size, // Reuse type buffer and ignore + @OutParameter @GLenum IntBuffer type, + @OutParameter @GLchar @Constant("APIUtil.getBufferByte0(caps)") ByteBuffer name); + + @StripPostfix("params") + void glGetUniformfv(@GLuint int program, int location, @OutParameter @Check FloatBuffer params); + + @StripPostfix("params") + void glGetUniformiv(@GLuint int program, int location, @OutParameter @Check IntBuffer params); + + void glGetShaderSource(@GLuint int shader, @AutoSize("source") @GLsizei int maxLength, + @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length, + @OutParameter @GLchar ByteBuffer source); + + @Alternate("glGetShaderSource") + @GLreturn(value = "source", maxLength = "maxLength") + void glGetShaderSource2(@GLuint int shader, @GLsizei int maxLength, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(source_length)") IntBuffer length, + @OutParameter @GLchar ByteBuffer source); + + // ------------------------------------------------------------------ + // ----------------------[ ARB_vertex_program ]---------------------- + // ------------------------------------------------------------------ + + @NoErrorCheck + void glVertexAttrib1s(@GLuint int index, short x); + + @NoErrorCheck + void glVertexAttrib1f(@GLuint int index, float x); + + @NoErrorCheck + void glVertexAttrib1d(@GLuint int index, double x); + + @NoErrorCheck + void glVertexAttrib2s(@GLuint int index, short x, short y); + + @NoErrorCheck + void glVertexAttrib2f(@GLuint int index, float x, float y); + + @NoErrorCheck + void glVertexAttrib2d(@GLuint int index, double x, double y); + + @NoErrorCheck + void glVertexAttrib3s(@GLuint int index, short x, short y, short z); + + @NoErrorCheck + void glVertexAttrib3f(@GLuint int index, float x, float y, float z); + + @NoErrorCheck + void glVertexAttrib3d(@GLuint int index, double x, double y, double z); + + @NoErrorCheck + void glVertexAttrib4s(@GLuint int index, short x, short y, short z, short w); + + @NoErrorCheck + void glVertexAttrib4f(@GLuint int index, float x, float y, float z, float w); + + @NoErrorCheck + void glVertexAttrib4d(@GLuint int index, double x, double y, double z, double w); + + @NoErrorCheck + void glVertexAttrib4Nub(@GLuint int index, @GLubyte byte x, @GLubyte byte y, @GLubyte byte z, @GLubyte byte w); + + void glVertexAttribPointer(@GLuint int index, int size, @AutoType("buffer") @GLenum int type, boolean normalized, @GLsizei int stride, + @CachedReference(index = "index", name = "glVertexAttribPointer_buffer") + @BufferObject(BufferKind.ArrayVBO) + @Check + @Const + @GLubyte + @GLbyte + @GLshort + @GLushort + @GLint + @GLuint + @GLfloat + @GLdouble Buffer buffer); + + @Alternate("glVertexAttribPointer") + void glVertexAttribPointer(@GLuint int index, int size, @GLenum int type, boolean normalized, @GLsizei int stride, + @CachedReference(index = "index", name = "glVertexAttribPointer_buffer") + @BufferObject(BufferKind.ArrayVBO) + @Check + @Const ByteBuffer buffer); + + void glEnableVertexAttribArray(@GLuint int index); + + void glDisableVertexAttribArray(@GLuint int index); + + @StripPostfix("params") + void glGetVertexAttribfv(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params); + + @StripPostfix("params") + void glGetVertexAttribdv(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") DoubleBuffer params); + + @StripPostfix("params") + void glGetVertexAttribiv(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + @StripPostfix("pointer") + void glGetVertexAttribPointerv(@GLuint int index, @GLenum int pname, @Result @GLvoid ByteBuffer pointer); + + @Alternate(value = "glGetVertexAttribPointerv", nativeAlt = true) + @StripPostfix("pointer") + void glGetVertexAttribPointerv2(@GLuint int index, @GLenum int pname, @OutParameter @Check("PointerBuffer.getPointerSize()") @GLvoid ByteBuffer pointer); + + // ----------------------------------------------------------------- + // ----------------------[ ARB_vertex_shader ]---------------------- + // ----------------------------------------------------------------- + + /** + * Accepted by the <shaderType> argument of CreateShader and + * returned by the <params> parameter of GetShader{if}v: + */ + int GL_VERTEX_SHADER = 0x8B31; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_MAX_VERTEX_UNIFORM_COMPONENTS = 0x8B4A; + int GL_MAX_VARYING_FLOATS = 0x8B4B; + int GL_MAX_VERTEX_ATTRIBS = 0x8869; + int GL_MAX_TEXTURE_IMAGE_UNITS = 0x8872; + int GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C; + int GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D; + int GL_MAX_TEXTURE_COORDS = 0x8871; + + /** + * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, and + * by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev: + */ + int GL_VERTEX_PROGRAM_POINT_SIZE = 0x8642; + int GL_VERTEX_PROGRAM_TWO_SIDE = 0x8643; + + /** Accepted by the <pname> parameter of GetVertexAttrib{dfi}vARB: */ + int GL_VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622; + int GL_VERTEX_ATTRIB_ARRAY_SIZE = 0x8623; + int GL_VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624; + int GL_VERTEX_ATTRIB_ARRAY_TYPE = 0x8625; + int GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A; + int GL_CURRENT_VERTEX_ATTRIB = 0x8626; + + /** Accepted by the <pname> parameter of GetVertexAttribPointervARB: */ + int GL_VERTEX_ATTRIB_ARRAY_POINTER = 0x8645; + + void glBindAttribLocation(@GLuint int program, @GLuint int index, @NullTerminated @Const @GLchar ByteBuffer name); + + @Alternate("glBindAttribLocation") + void glBindAttribLocation(@GLuint int program, @GLuint int index, @NullTerminated CharSequence name); + + void glGetActiveAttrib(@GLuint int program, @GLuint int index, @AutoSize("name") @GLsizei int maxLength, + @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length, + @OutParameter @Check("1") IntBuffer size, + @OutParameter @GLenum @Check("1") IntBuffer type, + @OutParameter @GLchar ByteBuffer name); + + /** Overloads glGetActiveAttrib. This version returns both size and type in the sizeType buffer (at .position() and .position() + 1). */ + @Alternate("glGetActiveAttrib") + @GLreturn(value = "name", maxLength = "maxLength") + void glGetActiveAttrib2(@GLuint int program, @GLuint int index, @GLsizei int maxLength, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(name_length)") IntBuffer length, + @OutParameter @Check("2") IntBuffer sizeType, + @OutParameter @GLenum @Constant("MemoryUtil.getAddress(sizeType, sizeType.position() + 1)") IntBuffer type, + @OutParameter @GLchar ByteBuffer name); + + /** Overloads glGetActiveAttrib. This version returns only the attrib name. */ + @Alternate(value = "glGetActiveAttrib", javaAlt = true) + @GLreturn(value = "name", maxLength = "maxLength") + void glGetActiveAttrib(@GLuint int program, @GLuint int index, @GLsizei int maxLength, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(name_length), MemoryUtil.getAddress0(APIUtil.getBufferInt(caps)), MemoryUtil.getAddress(APIUtil.getBufferInt(caps), 1)") IntBuffer length, + @OutParameter @GLchar ByteBuffer name); + + /** Overloads glGetActiveAttribARB. This version returns only the attrib size. */ + @Alternate(value = "glGetActiveAttrib", javaAlt = true) + @GLreturn(value = "size") + void glGetActiveAttribSize(@GLuint int program, @GLuint int index, @Constant("0") @GLsizei int maxLength, + @OutParameter @GLsizei @Constant("0L") IntBuffer length, + @OutParameter IntBuffer size, + @OutParameter @GLenum @Constant("MemoryUtil.getAddress(size, 1)") IntBuffer type, // Reuse size buffer and ignore + @OutParameter @GLchar @Constant("APIUtil.getBufferByte0(caps)") ByteBuffer name); + + /** Overloads glGetActiveAttrib. This version returns only the attrib type. */ + @Alternate(value = "glGetActiveAttrib", javaAlt = true) + @GLreturn(value = "type") + void glGetActiveAttribType(@GLuint int program, @GLuint int index, @Constant("0") @GLsizei int maxLength, + @OutParameter @GLsizei @Constant("0L") IntBuffer length, + @OutParameter @Constant("MemoryUtil.getAddress(type, 1)") IntBuffer size, // Reuse type buffer and ignore + @OutParameter @GLenum IntBuffer type, + @OutParameter @GLchar @Constant("APIUtil.getBufferByte0(caps)") ByteBuffer name); + + int glGetAttribLocation(@GLuint int program, @NullTerminated @Const @GLchar ByteBuffer name); + + @Alternate("glGetAttribLocation") + int glGetAttribLocation(@GLuint int program, @NullTerminated CharSequence name); + + // ------------------------------------------------------------------- + // ----------------------[ ARB_fragment_shader ]---------------------- + // ------------------------------------------------------------------- + + /** + * Accepted by the <shaderType> argument of CreateShader and + * returned by the <params> parameter of GetShader{fi}vARB: + */ + int GL_FRAGMENT_SHADER = 0x8B30; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_MAX_FRAGMENT_UNIFORM_COMPONENTS = 0x8B49; + + /** + * Accepted by the <target> parameter of Hint and the <pname> parameter of + * GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev: + */ + int GL_FRAGMENT_SHADER_DERIVATIVE_HINT = 0x8B8B; + + // ---------------------------------------------------------------- + // ----------------------[ ARB_draw_buffers ]---------------------- + // ---------------------------------------------------------------- + + /** + * Accepted by the <pname> parameters of GetIntegerv, GetFloatv, + * and GetDoublev: + */ + int GL_MAX_DRAW_BUFFERS = 0x8824; + int GL_DRAW_BUFFER0 = 0x8825; + int GL_DRAW_BUFFER1 = 0x8826; + int GL_DRAW_BUFFER2 = 0x8827; + int GL_DRAW_BUFFER3 = 0x8828; + int GL_DRAW_BUFFER4 = 0x8829; + int GL_DRAW_BUFFER5 = 0x882A; + int GL_DRAW_BUFFER6 = 0x882B; + int GL_DRAW_BUFFER7 = 0x882C; + int GL_DRAW_BUFFER8 = 0x882D; + int GL_DRAW_BUFFER9 = 0x882E; + int GL_DRAW_BUFFER10 = 0x882F; + int GL_DRAW_BUFFER11 = 0x8830; + int GL_DRAW_BUFFER12 = 0x8831; + int GL_DRAW_BUFFER13 = 0x8832; + int GL_DRAW_BUFFER14 = 0x8833; + int GL_DRAW_BUFFER15 = 0x8834; + + void glDrawBuffers(@AutoSize("buffers") @GLsizei int size, @Const @GLenum IntBuffer buffers); + + @Alternate("glDrawBuffers") + void glDrawBuffers(@Constant("1") @GLsizei int size, @Constant(value = "APIUtil.getInt(caps, buffer)", keepParam = true) int buffer); + + // ---------------------------------------------------------------- + // ----------------------[ ARB_point_sprite ]---------------------- + // ---------------------------------------------------------------- + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, by + * the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev, and by the <target> parameter of TexEnvi, TexEnviv, + * TexEnvf, TexEnvfv, GetTexEnviv, and GetTexEnvfv: + */ + int GL_POINT_SPRITE = 0x8861; + + /** + * When the <target> parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv, + * GetTexEnvfv, or GetTexEnviv is POINT_SPRITE, then the value of + * <pname> may be: + */ + int GL_COORD_REPLACE = 0x8862; + + /** + * Accepted by the <pname> parameter of PointParameter{if}vARB, and the + * <pname> of Get: + */ + int GL_POINT_SPRITE_COORD_ORIGIN = 0x8CA0; + + /** Accepted by the <param> parameter of PointParameter{if}vARB: */ + int GL_LOWER_LEFT = 0x8CA1; + int GL_UPPER_LEFT = 0x8CA2; + + // ----------------------------------------------------------------- + // ----------------------[ Two-Sided Stencil ]---------------------- + // ----------------------------------------------------------------- + + int GL_STENCIL_BACK_FUNC = 0x8800; + int GL_STENCIL_BACK_FAIL = 0x8801; + int GL_STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802; + int GL_STENCIL_BACK_PASS_DEPTH_PASS = 0x8803; + int GL_STENCIL_BACK_REF = 0x8CA3; + int GL_STENCIL_BACK_VALUE_MASK = 0x8CA4; + int GL_STENCIL_BACK_WRITEMASK = 0x8CA5; + + void glStencilOpSeparate(@GLenum int face, @GLenum int sfail, @GLenum int dpfail, @GLenum int dppass); + + void glStencilFuncSeparate(@GLenum int face, @GLenum int func, int ref, @GLuint int mask); + + void glStencilMaskSeparate(@GLenum int face, @GLuint int mask); + + // ------------------------------------------------------------- + // ----------------------[ EXT_blend_equation_separate ]---------------------- + // ------------------------------------------------------------- + + int GL_BLEND_EQUATION_RGB = 0x8009; + int GL_BLEND_EQUATION_ALPHA = 0x883D; + + void glBlendEquationSeparate(@GLenum int modeRGB, @GLenum int modeAlpha); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL21.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL21.java new file mode 100644 index 0000000..4da8e1a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL21.java @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.AutoSize; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.StripPostfix; + +import java.nio.FloatBuffer; + +public interface GL21 { + + // ------------------------------------------------------------------ + // --------------------------[ GLSL 1.20 ]--------------------------- + // ------------------------------------------------------------------ + + /** Returned by the <type> parameter of GetActiveAttribARB. */ + int GL_FLOAT_MAT2x3 = 0x8B65; + int GL_FLOAT_MAT2x4 = 0x8B66; + int GL_FLOAT_MAT3x2 = 0x8B67; + int GL_FLOAT_MAT3x4 = 0x8B68; + int GL_FLOAT_MAT4x2 = 0x8B69; + int GL_FLOAT_MAT4x3 = 0x8B6A; + + @StripPostfix("matrices") + void glUniformMatrix2x3fv(int location, @AutoSize(value = "matrices", expression = " / (2 * 3)") @GLsizei int count, + boolean transpose, FloatBuffer matrices); + + @StripPostfix("matrices") + void glUniformMatrix3x2fv(int location, @AutoSize(value = "matrices", expression = " / (3 * 2)") @GLsizei int count, + boolean transpose, FloatBuffer matrices); + + @StripPostfix("matrices") + void glUniformMatrix2x4fv(int location, @AutoSize(value = "matrices", expression = " >> 3") @GLsizei int count, + boolean transpose, FloatBuffer matrices); + + @StripPostfix("matrices") + void glUniformMatrix4x2fv(int location, @AutoSize(value = "matrices", expression = " >> 3") @GLsizei int count, + boolean transpose, FloatBuffer matrices); + + @StripPostfix("matrices") + void glUniformMatrix3x4fv(int location, @AutoSize(value = "matrices", expression = " / (3 * 4)") @GLsizei int count, + boolean transpose, FloatBuffer matrices); + + @StripPostfix("matrices") + void glUniformMatrix4x3fv(int location, @AutoSize(value = "matrices", expression = " / (4 * 3)") @GLsizei int count, + boolean transpose, FloatBuffer matrices); + + // ------------------------------------------------------------------ + // -------------------[ ARB_pixel_buffer_object ]-------------------- + // ------------------------------------------------------------------ + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, + * GetBufferParameteriv, and GetBufferPointerv. + */ + int GL_PIXEL_PACK_BUFFER = 0x88EB; + int GL_PIXEL_UNPACK_BUFFER = 0x88EC; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev. + */ + int GL_PIXEL_PACK_BUFFER_BINDING = 0x88ED; + int GL_PIXEL_UNPACK_BUFFER_BINDING = 0x88EF; + + // ------------------------------------------------------------------ + // ----------------------[ EXT_texture_sRGB ]------------------------ + // ------------------------------------------------------------------ + + /** + * Accepted by the <internalformat> parameter of TexImage1D, TexImage2D, + * TexImage3D, CopyTexImage1D, CopyTexImage2D. + */ + int GL_SRGB = 0x8C40; + int GL_SRGB8 = 0x8C41; + int GL_SRGB_ALPHA = 0x8C42; + int GL_SRGB8_ALPHA8 = 0x8C43; + int GL_SLUMINANCE_ALPHA = 0x8C44; + int GL_SLUMINANCE8_ALPHA8 = 0x8C45; + int GL_SLUMINANCE = 0x8C46; + int GL_SLUMINANCE8 = 0x8C47; + int GL_COMPRESSED_SRGB = 0x8C48; + int GL_COMPRESSED_SRGB_ALPHA = 0x8C49; + int GL_COMPRESSED_SLUMINANCE = 0x8C4A; + int GL_COMPRESSED_SLUMINANCE_ALPHA = 0x8C4B; + + // ------------------------------------------------------------------ + // -----------------------[ Misc additions ]------------------------- + // ------------------------------------------------------------------ + + /** Accepted by the <pname> parameter of GetIntegerv and GetFloatv. */ + int GL_CURRENT_RASTER_SECONDARY_COLOR = 0x845F; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL30.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL30.java new file mode 100644 index 0000000..cb306de --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL30.java @@ -0,0 +1,1059 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.*; + +public interface GL30 { + + // ---------------------------------------------------------- + // ----------------------[ OpenGL 3.0 ]---------------------- + // ---------------------------------------------------------- + + int GL_MAJOR_VERSION = 0x821B; + int GL_MINOR_VERSION = 0x821C; + int GL_NUM_EXTENSIONS = 0x821D; + + int GL_CONTEXT_FLAGS = 0x821E; + int GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT = 0x0001; + + int GL_DEPTH_BUFFER = 0x8223; + int GL_STENCIL_BUFFER = 0x8224; + + int GL_COMPRESSED_RED = 0x8225; + int GL_COMPRESSED_RG = 0x8226; + + int GL_COMPARE_REF_TO_TEXTURE = ARB_shadow.GL_COMPARE_R_TO_TEXTURE_ARB; + + int GL_CLIP_DISTANCE0 = GL11.GL_CLIP_PLANE0; + int GL_CLIP_DISTANCE1 = GL11.GL_CLIP_PLANE1; + int GL_CLIP_DISTANCE2 = GL11.GL_CLIP_PLANE2; + int GL_CLIP_DISTANCE3 = GL11.GL_CLIP_PLANE3; + int GL_CLIP_DISTANCE4 = GL11.GL_CLIP_PLANE4; + int GL_CLIP_DISTANCE5 = GL11.GL_CLIP_PLANE5; + int GL_CLIP_DISTANCE6 = 0x3006; + int GL_CLIP_DISTANCE7 = 0x3007; + + int GL_MAX_CLIP_DISTANCES = GL11.GL_MAX_CLIP_PLANES; + + int GL_MAX_VARYING_COMPONENTS = GL20.GL_MAX_VARYING_FLOATS; + + int GL_BUFFER_ACCESS_FLAGS = 0x911F; + int GL_BUFFER_MAP_LENGTH = 0x9120; + int GL_BUFFER_MAP_OFFSET = 0x9121; + + String glGetStringi(@GLenum int name, @GLuint int index); + + @StripPostfix("value") + void glClearBufferfv(@GLenum int buffer, int drawbuffer, @Const @Check("4") FloatBuffer value); + + @StripPostfix("value") + void glClearBufferiv(@GLenum int buffer, int drawbuffer, @Const @Check("4") IntBuffer value); + + @StripPostfix("value") + void glClearBufferuiv(@GLenum int buffer, int drawbuffer, @Const @Check("4") IntBuffer value); + + void glClearBufferfi(@GLenum int buffer, int drawbuffer, float depth, int stencil); + + // --------------------------------------------------------------- + // ----------------------[ EXT_gpu_shader4 ]---------------------- + // --------------------------------------------------------------- + + /** + * Accepted by the <pname> parameters of GetVertexAttribdv, + * GetVertexAttribfv, GetVertexAttribiv, GetVertexAttribIiv, and + * GetVertexAttribIuiv: + */ + int GL_VERTEX_ATTRIB_ARRAY_INTEGER = 0x88FD; + + /** Returned by the <type> parameter of GetActiveUniform: */ + + int GL_SAMPLER_BUFFER = 0x8DC2; + int GL_SAMPLER_CUBE_SHADOW = 0x8DC5; + int GL_UNSIGNED_INT_VEC2 = 0x8DC6; + int GL_UNSIGNED_INT_VEC3 = 0x8DC7; + int GL_UNSIGNED_INT_VEC4 = 0x8DC8; + int GL_INT_SAMPLER_1D = 0x8DC9; + int GL_INT_SAMPLER_2D = 0x8DCA; + int GL_INT_SAMPLER_3D = 0x8DCB; + int GL_INT_SAMPLER_CUBE = 0x8DCC; + int GL_INT_SAMPLER_2D_RECT = 0x8DCD; + int GL_INT_SAMPLER_1D_ARRAY = 0x8DCE; + int GL_INT_SAMPLER_2D_ARRAY = 0x8DCF; + int GL_INT_SAMPLER_BUFFER = 0x8DD0; + + int GL_UNSIGNED_INT_SAMPLER_1D = 0x8DD1; + int GL_UNSIGNED_INT_SAMPLER_2D = 0x8DD2; + int GL_UNSIGNED_INT_SAMPLER_3D = 0x8DD3; + int GL_UNSIGNED_INT_SAMPLER_CUBE = 0x8DD4; + int GL_UNSIGNED_INT_SAMPLER_2D_RECT = 0x8DD5; + int GL_UNSIGNED_INT_SAMPLER_1D_ARRAY = 0x8DD6; + int GL_UNSIGNED_INT_SAMPLER_2D_ARRAY = 0x8DD7; + int GL_UNSIGNED_INT_SAMPLER_BUFFER = 0x8DD8; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + int GL_MIN_PROGRAM_TEXEL_OFFSET = 0x8904; + int GL_MAX_PROGRAM_TEXEL_OFFSET = 0x8905; + + @NoErrorCheck + void glVertexAttribI1i(@GLuint int index, int x); + + @NoErrorCheck + void glVertexAttribI2i(@GLuint int index, int x, int y); + + @NoErrorCheck + void glVertexAttribI3i(@GLuint int index, int x, int y, int z); + + @NoErrorCheck + void glVertexAttribI4i(@GLuint int index, int x, int y, int z, int w); + + @NoErrorCheck + void glVertexAttribI1ui(@GLuint int index, @GLuint int x); + + @NoErrorCheck + void glVertexAttribI2ui(@GLuint int index, @GLuint int x, @GLuint int y); + + @NoErrorCheck + void glVertexAttribI3ui(@GLuint int index, @GLuint int x, @GLuint int y, @GLuint int z); + + @NoErrorCheck + void glVertexAttribI4ui(@GLuint int index, @GLuint int x, @GLuint int y, @GLuint int z, @GLuint int w); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribI1iv(@GLuint int index, @Check("1") @Const IntBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribI2iv(@GLuint int index, @Check("2") @Const IntBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribI3iv(@GLuint int index, @Check("3") @Const IntBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribI4iv(@GLuint int index, @Check("4") @Const IntBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribI1uiv(@GLuint int index, @Check("1") @Const @GLuint IntBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribI2uiv(@GLuint int index, @Check("2") @Const @GLuint IntBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribI3uiv(@GLuint int index, @Check("3") @Const @GLuint IntBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribI4uiv(@GLuint int index, @Check("4") @Const @GLuint IntBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribI4bv(@GLuint int index, @Check("4") @Const ByteBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribI4sv(@GLuint int index, @Check("4") @Const ShortBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribI4ubv(@GLuint int index, @Check("4") @Const @GLubyte ByteBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribI4usv(@GLuint int index, @Check("4") @Const @GLushort ShortBuffer v); + + void glVertexAttribIPointer(@GLuint int index, int size, @GLenum int type, @GLsizei int stride, + @CachedReference(index = "index", name = "glVertexAttribPointer_buffer") + @BufferObject(BufferKind.ArrayVBO) + @Check + @Const + @GLbyte + @GLubyte + @GLshort + @GLushort + @GLint + @GLuint Buffer buffer); + + @StripPostfix("params") + void glGetVertexAttribIiv(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + @StripPostfix("params") + void glGetVertexAttribIuiv(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") @GLuint IntBuffer params); + + void glUniform1ui(int location, @GLuint int v0); + + void glUniform2ui(int location, @GLuint int v0, @GLuint int v1); + + void glUniform3ui(int location, @GLuint int v0, @GLuint int v1, @GLuint int v2); + + void glUniform4ui(int location, @GLuint int v0, @GLuint int v1, @GLuint int v2, @GLuint int v3); + + @StripPostfix("value") + void glUniform1uiv(int location, @AutoSize("value") @GLsizei int count, @Const @GLuint IntBuffer value); + + @StripPostfix("value") + void glUniform2uiv(int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const @GLuint IntBuffer value); + + @StripPostfix("value") + void glUniform3uiv(int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const @GLuint IntBuffer value); + + @StripPostfix("value") + void glUniform4uiv(int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const @GLuint IntBuffer value); + + @StripPostfix("params") + void glGetUniformuiv(@GLuint int program, int location, @OutParameter @Check @GLuint IntBuffer params); + + void glBindFragDataLocation(@GLuint int program, @GLuint int colorNumber, @NullTerminated @Const @GLchar ByteBuffer name); + + @Alternate("glBindFragDataLocation") + void glBindFragDataLocation(@GLuint int program, @GLuint int colorNumber, @NullTerminated CharSequence name); + + int glGetFragDataLocation(@GLuint int program, @NullTerminated @Const @GLchar ByteBuffer name); + + @Alternate("glGetFragDataLocation") + int glGetFragDataLocation(@GLuint int program, @NullTerminated CharSequence name); + + // --------------------------------------------------------------------- + // ----------------------[ NV_conditional_render ]---------------------- + // --------------------------------------------------------------------- + + /** Accepted by the <mode> parameter of BeginConditionalRender: */ + int GL_QUERY_WAIT = 0x8E13; + int GL_QUERY_NO_WAIT = 0x8E14; + int GL_QUERY_BY_REGION_WAIT = 0x8E15; + int GL_QUERY_BY_REGION_NO_WAIT = 0x8E16; + + void glBeginConditionalRender(@GLuint int id, @GLenum int mode); + + void glEndConditionalRender(); + + // -------------------------------------------------------------------- + // ----------------------[ ARB_map_buffer_range ]---------------------- + // -------------------------------------------------------------------- + + /** Accepted by the <access> parameter of MapBufferRange: */ + int GL_MAP_READ_BIT = 0x0001; + int GL_MAP_WRITE_BIT = 0x0002; + int GL_MAP_INVALIDATE_RANGE_BIT = 0x0004; + int GL_MAP_INVALIDATE_BUFFER_BIT = 0x0008; + int GL_MAP_FLUSH_EXPLICIT_BIT = 0x0010; + int GL_MAP_UNSYNCHRONIZED_BIT = 0x0020; + + /** + * glMapBufferRange maps a GL buffer object range to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapBufferRange like this: + *

+ * ByteBuffer mapped_buffer; mapped_buffer = glMapBufferRange(..., ..., ..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBufferRange(..., ..., ..., ..., mapped_buffer); + *

+ * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + * + * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. + * + * @return A ByteBuffer representing the mapped buffer memory. + */ + @CachedResult(isRange = true) + @GLvoid + @AutoSize("length") + ByteBuffer glMapBufferRange(@GLenum int target, @GLintptr long offset, @GLsizeiptr long length, @GLbitfield int access); + + void glFlushMappedBufferRange(@GLenum int target, @GLintptr long offset, @GLsizeiptr long length); + + // ---------------------------------------------------------------------- + // ----------------------[ ARB_color_buffer_float ]---------------------- + // ---------------------------------------------------------------------- + + /** + * Accepted by the <target> parameter of ClampColor and the <pname> + * parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. + */ + int GL_CLAMP_VERTEX_COLOR = 0x891A; + int GL_CLAMP_FRAGMENT_COLOR = 0x891B; + int GL_CLAMP_READ_COLOR = 0x891C; + + /** Accepted by the <clamp> parameter of ClampColor. */ + int GL_FIXED_ONLY = 0x891D; + + void glClampColor(@GLenum int target, @GLenum int clamp); + + // ---------------------------------------------------------------------- + // ----------------------[ ARB_depth_buffer_float ]---------------------- + // ---------------------------------------------------------------------- + + /** + * Accepted by the <internalformat> parameter of TexImage1D, TexImage2D, + * TexImage3D, CopyTexImage1D, CopyTexImage2D, and RenderbufferStorageEXT, + * and returned in the <data> parameter of GetTexLevelParameter and + * GetRenderbufferParameterivEXT: + */ + int GL_DEPTH_COMPONENT32F = 0x8CAC; + int GL_DEPTH32F_STENCIL8 = 0x8CAD; + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, TexImage1D, + * TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, and + * GetTexImage: + */ + int GL_FLOAT_32_UNSIGNED_INT_24_8_REV = 0x8DAD; + + // ----------------------------------------------------------------- + // ----------------------[ ARB_texture_float ]---------------------- + // ----------------------------------------------------------------- + + /** Accepted by the <value> parameter of GetTexLevelParameter: */ + int GL_TEXTURE_RED_TYPE = 0x8C10; + int GL_TEXTURE_GREEN_TYPE = 0x8C11; + int GL_TEXTURE_BLUE_TYPE = 0x8C12; + int GL_TEXTURE_ALPHA_TYPE = 0x8C13; + int GL_TEXTURE_LUMINANCE_TYPE = 0x8C14; + int GL_TEXTURE_INTENSITY_TYPE = 0x8C15; + int GL_TEXTURE_DEPTH_TYPE = 0x8C16; + + /** Returned by the <params> parameter of GetTexLevelParameter: */ + int GL_UNSIGNED_NORMALIZED = 0x8C17; + + /** + * Accepted by the <internalFormat> parameter of TexImage1D, + * TexImage2D, and TexImage3D: + */ + int GL_RGBA32F = 0x8814; + int GL_RGB32F = 0x8815; + int GL_ALPHA32F = 0x8816; + int GL_RGBA16F = 0x881A; + int GL_RGB16F = 0x881B; + int GL_ALPHA16F = 0x881C; + + // ---------------------------------------------------------------- + // ----------------------[ EXT_packed_float ]---------------------- + // ---------------------------------------------------------------- + + /** + * Accepted by the <internalformat> parameter of TexImage1D, + * TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and + * RenderbufferStorage: + */ + int GL_R11F_G11F_B10F = 0x8C3A; + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, + * TexImage1D, TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, + * TexSubImage2D, TexSubImage3D, GetHistogram, GetMinmax, + * ConvolutionFilter1D, ConvolutionFilter2D, ConvolutionFilter3D, + * GetConvolutionFilter, SeparableFilter2D, GetSeparableFilter, + * ColorTable, ColorSubTable, and GetColorTable: + */ + int GL_UNSIGNED_INT_10F_11F_11F_REV = 0x8C3B; + + // --------------------------------------------------------------------------- + // ----------------------[ EXT_texture_shared_exponent ]---------------------- + // --------------------------------------------------------------------------- + + /** + * Accepted by the <internalformat> parameter of TexImage1D, + * TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and + * RenderbufferStorage: + */ + int GL_RGB9_E5 = 0x8C3D; + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, + * TexImage1D, TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, + * TexSubImage2D, TexSubImage3D, GetHistogram, GetMinmax, + * ConvolutionFilter1D, ConvolutionFilter2D, ConvolutionFilter3D, + * GetConvolutionFilter, SeparableFilter2D, GetSeparableFilter, + * ColorTable, ColorSubTable, and GetColorTable: + */ + int GL_UNSIGNED_INT_5_9_9_9_REV = 0x8C3E; + + /** + * Accepted by the <pname> parameter of GetTexLevelParameterfv and + * GetTexLevelParameteriv: + */ + int GL_TEXTURE_SHARED_SIZE = 0x8C3F; + + // ---------------------------------------------------------------------- + // ----------------------[ ARB_framebuffer_object ]---------------------- + // ---------------------------------------------------------------------- + + /** + * Accepted by the <target> parameter of BindFramebuffer, + * CheckFramebufferStatus, FramebufferTexture{1D|2D|3D}, + * FramebufferRenderbuffer, and + * GetFramebufferAttachmentParameteriv: + */ + int GL_FRAMEBUFFER = 0x8D40; + int GL_READ_FRAMEBUFFER = 0x8CA8; + int GL_DRAW_FRAMEBUFFER = 0x8CA9; + + /** + * Accepted by the <target> parameter of BindRenderbuffer, + * RenderbufferStorage, and GetRenderbufferParameteriv, and + * returned by GetFramebufferAttachmentParameteriv: + */ + int GL_RENDERBUFFER = 0x8D41; + + /** + * Accepted by the <internalformat> parameter of + * RenderbufferStorage: + */ + int GL_STENCIL_INDEX1 = 0x8D46; + int GL_STENCIL_INDEX4 = 0x8D47; + int GL_STENCIL_INDEX8 = 0x8D48; + int GL_STENCIL_INDEX16 = 0x8D49; + + /** Accepted by the <pname> parameter of GetRenderbufferParameteriv: */ + int GL_RENDERBUFFER_WIDTH = 0x8D42; + int GL_RENDERBUFFER_HEIGHT = 0x8D43; + int GL_RENDERBUFFER_INTERNAL_FORMAT = 0x8D44; + int GL_RENDERBUFFER_RED_SIZE = 0x8D50; + int GL_RENDERBUFFER_GREEN_SIZE = 0x8D51; + int GL_RENDERBUFFER_BLUE_SIZE = 0x8D52; + int GL_RENDERBUFFER_ALPHA_SIZE = 0x8D53; + int GL_RENDERBUFFER_DEPTH_SIZE = 0x8D54; + int GL_RENDERBUFFER_STENCIL_SIZE = 0x8D55; + + /** + * Accepted by the <pname> parameter of + * GetFramebufferAttachmentParameteriv: + */ + int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0; + int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1; + int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2; + int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3; + int GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 0x8210; + int GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 0x8211; + int GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE = 0x8212; + int GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 0x8213; + int GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 0x8214; + int GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 0x8215; + int GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 0x8216; + int GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 0x8217; + + /** Returned in <params> by GetFramebufferAttachmentParameteriv: */ + int GL_FRAMEBUFFER_DEFAULT = 0x8218; + int GL_INDEX = 0x8222; + + /** + * Accepted by the <attachment> parameter of + * FramebufferTexture{1D|2D|3D}, FramebufferRenderbuffer, and + * GetFramebufferAttachmentParameteriv + */ + int GL_COLOR_ATTACHMENT0 = 0x8CE0; + int GL_COLOR_ATTACHMENT1 = 0x8CE1; + int GL_COLOR_ATTACHMENT2 = 0x8CE2; + int GL_COLOR_ATTACHMENT3 = 0x8CE3; + int GL_COLOR_ATTACHMENT4 = 0x8CE4; + int GL_COLOR_ATTACHMENT5 = 0x8CE5; + int GL_COLOR_ATTACHMENT6 = 0x8CE6; + int GL_COLOR_ATTACHMENT7 = 0x8CE7; + int GL_COLOR_ATTACHMENT8 = 0x8CE8; + int GL_COLOR_ATTACHMENT9 = 0x8CE9; + int GL_COLOR_ATTACHMENT10 = 0x8CEA; + int GL_COLOR_ATTACHMENT11 = 0x8CEB; + int GL_COLOR_ATTACHMENT12 = 0x8CEC; + int GL_COLOR_ATTACHMENT13 = 0x8CED; + int GL_COLOR_ATTACHMENT14 = 0x8CEE; + int GL_COLOR_ATTACHMENT15 = 0x8CEF; + int GL_DEPTH_ATTACHMENT = 0x8D00; + int GL_STENCIL_ATTACHMENT = 0x8D20; + int GL_DEPTH_STENCIL_ATTACHMENT = 0x821A; + + /** Returned by CheckFramebufferStatus(): */ + int GL_FRAMEBUFFER_COMPLETE = 0x8CD5; + int GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6; + int GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7; + int GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER = 0x8CDB; + int GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER = 0x8CDC; + int GL_FRAMEBUFFER_UNSUPPORTED = 0x8CDD; + int GL_FRAMEBUFFER_UNDEFINED = 0x8219; + + /** + * Accepted by the <pname> parameters of GetIntegerv, GetFloatv, + * and GetDoublev: + */ + int GL_FRAMEBUFFER_BINDING = 0x8CA6; // alias DRAW_FRAMEBUFFER_BINDING + int GL_RENDERBUFFER_BINDING = 0x8CA7; + int GL_MAX_COLOR_ATTACHMENTS = 0x8CDF; + int GL_MAX_RENDERBUFFER_SIZE = 0x84E8; + + /** Returned by GetError(): */ + int GL_INVALID_FRAMEBUFFER_OPERATION = 0x0506; + + boolean glIsRenderbuffer(@GLuint int renderbuffer); + + void glBindRenderbuffer(@GLenum int target, @GLuint int renderbuffer); + + void glDeleteRenderbuffers(@AutoSize("renderbuffers") int n, @Const @GLuint IntBuffer renderbuffers); + + @Alternate("glDeleteRenderbuffers") + void glDeleteRenderbuffers(@Constant("1") int n, @Constant(value = "APIUtil.getInt(caps, renderbuffer)", keepParam = true) int renderbuffer); + + void glGenRenderbuffers(@AutoSize("renderbuffers") int n, @OutParameter @GLuint IntBuffer renderbuffers); + + @Alternate("glGenRenderbuffers") + @GLreturn("renderbuffers") + void glGenRenderbuffers2(@Constant("1") int n, @OutParameter @GLuint IntBuffer renderbuffers); + + void glRenderbufferStorage(@GLenum int target, @GLenum int internalformat, @GLsizei int width, @GLsizei int height); + + @StripPostfix("params") + void glGetRenderbufferParameteriv(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetRenderbufferParameteri} instead. */ + @Alternate("glGetRenderbufferParameteriv") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "GL30", method = "glGetRenderbufferParameteri") + @Deprecated + void glGetRenderbufferParameteriv2(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + @Alternate("glGetRenderbufferParameteriv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetRenderbufferParameteriv3(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + boolean glIsFramebuffer(@GLuint int framebuffer); + + void glBindFramebuffer(@GLenum int target, @GLuint int framebuffer); + + void glDeleteFramebuffers(@AutoSize("framebuffers") int n, @Const @GLuint IntBuffer framebuffers); + + @Alternate("glDeleteFramebuffers") + void glDeleteFramebuffers(@Constant("1") int n, @Constant(value = "APIUtil.getInt(caps, framebuffer)", keepParam = true) int framebuffer); + + void glGenFramebuffers(@AutoSize("framebuffers") int n, @OutParameter @GLuint IntBuffer framebuffers); + + @Alternate("glGenFramebuffers") + @GLreturn("framebuffers") + void glGenFramebuffers2(@Constant("1") int n, @OutParameter @GLuint IntBuffer framebuffers); + + @GLenum + int glCheckFramebufferStatus(@GLenum int target); + + void glFramebufferTexture1D(@GLenum int target, @GLenum int attachment, @GLenum int textarget, @GLuint int texture, int level); + + void glFramebufferTexture2D(@GLenum int target, @GLenum int attachment, @GLenum int textarget, @GLuint int texture, int level); + + void glFramebufferTexture3D(@GLenum int target, @GLenum int attachment, @GLenum int textarget, @GLuint int texture, int level, int zoffset); + + void glFramebufferRenderbuffer(@GLenum int target, @GLenum int attachment, @GLenum int renderbuffertarget, @GLuint int renderbuffer); + + @StripPostfix("params") + void glGetFramebufferAttachmentParameteriv(@GLenum int target, @GLenum int attachment, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetFramebufferAttachmentParameteri} instead. */ + @Alternate("glGetFramebufferAttachmentParameteriv") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "GL30", method = "glGetFramebufferAttachmentParameteri") + @Deprecated + void glGetFramebufferAttachmentParameteriv2(@GLenum int target, @GLenum int attachment, @GLenum int pname, @OutParameter IntBuffer params); + + @Alternate("glGetFramebufferAttachmentParameteriv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetFramebufferAttachmentParameteriv3(@GLenum int target, @GLenum int attachment, @GLenum int pname, @OutParameter IntBuffer params); + + void glGenerateMipmap(@GLenum int target); + + // -------------------------------------------------------------------------------------------- + // ----------------------[ ARB_half_float_vertex & ARB_half_float_pixel ]---------------------- + // -------------------------------------------------------------------------------------------- + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, + * TexImage1D, TexImage2D, TexImage3D, GetTexImage, TexSubImage1D, + * TexSubImage2D, TexSubImage3D, GetHistogram, GetMinmax, + * ConvolutionFilter1D, ConvolutionFilter2D, GetConvolutionFilter, + * SeparableFilter2D, GetSeparableFilter, ColorTable, ColorSubTable, + * and GetColorTable: + *

+ * Accepted by the <type> argument of VertexPointer, NormalPointer, + * ColorPointer, SecondaryColorPointer, FogCoordPointer, TexCoordPointer, + * and VertexAttribPointer: + */ + int GL_HALF_FLOAT = 0x140B; + + // --------------------------------------------------------------------------- + // ----------------------[ EXT_framebuffer_multisample ]---------------------- + // --------------------------------------------------------------------------- + + /** Accepted by the <pname> parameter of GetRenderbufferParameteriv. */ + int GL_RENDERBUFFER_SAMPLES = 0x8CAB; + + /** Returned by CheckFramebufferStatus. */ + int GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 0x8D56; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev. + */ + int GL_MAX_SAMPLES = 0x8D57; + + /** + * Establishes the data storage, format, dimensions, and number of + * samples of a renderbuffer object's image. + */ + void glRenderbufferStorageMultisample( + @GLenum int target, @GLsizei int samples, + @GLenum int internalformat, + @GLsizei int width, @GLsizei int height); + + // -------------------------------------------------------------------- + // ----------------------[ EXT_framebuffer_blit ]---------------------- + // -------------------------------------------------------------------- + + /** Accepted by the <pname> parameters of GetIntegerv, GetFloatv, and GetDoublev. */ + int GL_DRAW_FRAMEBUFFER_BINDING = 0x8CA6; // alias FRAMEBUFFER_BINDING + int GL_READ_FRAMEBUFFER_BINDING = 0x8CAA; + + /** + * Transfers a rectangle of pixel values from one + * region of the read framebuffer to another in the draw framebuffer. + * <mask> is the bitwise OR of a number of values indicating which + * buffers are to be copied. The values are COLOR_BUFFER_BIT, + * DEPTH_BUFFER_BIT, and STENCIL_BUFFER_BIT. + * The pixels corresponding to these buffers are + * copied from the source rectangle, bound by the locations (srcX0, + * srcY0) and (srcX1, srcY1) inclusive, to the destination rectangle, + * bound by the locations (dstX0, dstY0) and (dstX1, dstY1) + * inclusive. + * If the source and destination rectangle dimensions do not match, + * the source image is stretched to fit the destination + * rectangle. <filter> must be LINEAR or NEAREST and specifies the + * method of interpolation to be applied if the image is + * stretched. + */ + void glBlitFramebuffer( + @GLint int srcX0, @GLint int srcY0, @GLint int srcX1, @GLint int srcY1, + @GLint int dstX0, @GLint int dstY0, @GLint int dstX1, @GLint int dstY1, + @GLbitfield int mask, @GLenum int filter); + + // ------------------------------------------------------------------- + // ----------------------[ EXT_texture_integer ]---------------------- + // ------------------------------------------------------------------- + + /** + * Accepted by the <pname> parameters of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_RGBA_INTEGER_MODE = 0x8D9E; + + /** + * Accepted by the <internalFormat> parameter of TexImage1D, + * TexImage2D, and TexImage3D: + */ + int GL_RGBA32UI = 0x8D70; + int GL_RGB32UI = 0x8D71; + int GL_ALPHA32UI = 0x8D72; + + int GL_RGBA16UI = 0x8D76; + int GL_RGB16UI = 0x8D77; + int GL_ALPHA16UI = 0x8D78; + + int GL_RGBA8UI = 0x8D7C; + int GL_RGB8UI = 0x8D7D; + int GL_ALPHA8UI = 0x8D7E; + + int GL_RGBA32I = 0x8D82; + int GL_RGB32I = 0x8D83; + int GL_ALPHA32I = 0x8D84; + + int GL_RGBA16I = 0x8D88; + int GL_RGB16I = 0x8D89; + int GL_ALPHA16I = 0x8D8A; + + int GL_RGBA8I = 0x8D8E; + int GL_RGB8I = 0x8D8F; + int GL_ALPHA8I = 0x8D90; + + /** + * Accepted by the <format> parameter of TexImage1D, TexImage2D, + * TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, + * DrawPixels and ReadPixels: + */ + int GL_RED_INTEGER = 0x8D94; + int GL_GREEN_INTEGER = 0x8D95; + int GL_BLUE_INTEGER = 0x8D96; + int GL_ALPHA_INTEGER = 0x8D97; + int GL_RGB_INTEGER = 0x8D98; + int GL_RGBA_INTEGER = 0x8D99; + int GL_BGR_INTEGER = 0x8D9A; + int GL_BGRA_INTEGER = 0x8D9B; + + @StripPostfix("params") + void glTexParameterIiv(@GLenum int target, @GLenum int pname, @Check("4") IntBuffer params); + + @Alternate("glTexParameterIiv") + @StripPostfix(value = "param", postfix = "v") + void glTexParameterIiv(@GLenum int target, @GLenum int pname, @Constant(value = "APIUtil.getInt(caps, param)", keepParam = true) int param); + + @StripPostfix("params") + void glTexParameterIuiv(@GLenum int target, @GLenum int pname, @Check("4") @GLuint IntBuffer params); + + @Alternate("glTexParameterIuiv") + @StripPostfix(value = "param", postfix = "v") + void glTexParameterIuiv(@GLenum int target, @GLenum int pname, @Constant(value = "APIUtil.getInt(caps, param)", keepParam = true) int param); + + @StripPostfix("params") + void glGetTexParameterIiv(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + @Alternate("glGetTexParameterIiv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetTexParameterIiv2(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + @StripPostfix("params") + void glGetTexParameterIuiv(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") @GLuint IntBuffer params); + + @Alternate("glGetTexParameterIuiv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetTexParameterIuiv2(@GLenum int target, @GLenum int pname, @OutParameter @GLuint IntBuffer params); + + // ----------------------------------------------------------------- + // ----------------------[ EXT_texture_array ]---------------------- + // ----------------------------------------------------------------- + + /** + * Accepted by the <target> parameter of TexParameteri, TexParameteriv, + * TexParameterf, TexParameterfv, and BindTexture: + */ + int GL_TEXTURE_1D_ARRAY = 0x8C18; + int GL_TEXTURE_2D_ARRAY = 0x8C1A; + + /** + * Accepted by the <target> parameter of TexImage3D, TexSubImage3D, + * CopyTexSubImage3D, CompressedTexImage3D, and CompressedTexSubImage3D: + */ + int GL_PROXY_TEXTURE_2D_ARRAY = 0x8C1B; + + /** + * Accepted by the <target> parameter of TexImage2D, TexSubImage2D, + * CopyTexImage2D, CopyTexSubImage2D, CompressedTexImage2D, and + * CompressedTexSubImage2D: + */ + int GL_PROXY_TEXTURE_1D_ARRAY = 0x8C19; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv + * and GetFloatv: + */ + int GL_TEXTURE_BINDING_1D_ARRAY = 0x8C1C; + int GL_TEXTURE_BINDING_2D_ARRAY = 0x8C1D; + int GL_MAX_ARRAY_TEXTURE_LAYERS = 0x88FF; + + /** + * Accepted by the <param> parameter of TexParameterf, TexParameteri, + * TexParameterfv, and TexParameteriv when the <pname> parameter is + * TEXTURE_COMPARE_MODE_ARB: + */ + int GL_COMPARE_REF_DEPTH_TO_TEXTURE = 0x884E; + + /** + * Accepted by the <pname> parameter of + * GetFramebufferAttachmentParameteriv: + */ + int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 0x8CD4; + + /** Returned by the <type> parameter of GetActiveUniform: */ + int GL_SAMPLER_1D_ARRAY = 0x8DC0; + int GL_SAMPLER_2D_ARRAY = 0x8DC1; + int GL_SAMPLER_1D_ARRAY_SHADOW = 0x8DC3; + int GL_SAMPLER_2D_ARRAY_SHADOW = 0x8DC4; + + void glFramebufferTextureLayer(@GLenum int target, @GLenum int attachment, @GLuint int texture, int level, int layer); + + // ------------------------------------------------------------------------ + // ----------------------[ EXT_packed_depth_stencil ]---------------------- + // ------------------------------------------------------------------------ + + /** + * Accepted by the <format> parameter of DrawPixels, ReadPixels, + * TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, + * TexSubImage3D, and GetTexImage, by the <type> parameter of + * CopyPixels, by the <internalformat> parameter of TexImage1D, + * TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and + * RenderbufferStorage, and returned in the <data> parameter of + * GetTexLevelParameter and GetRenderbufferParameteriv. + */ + int GL_DEPTH_STENCIL = 0x84F9; + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, + * TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, + * TexSubImage3D, and GetTexImage. + */ + int GL_UNSIGNED_INT_24_8 = 0x84FA; + + /** + * Accepted by the <internalformat> parameter of TexImage1D, + * TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and + * RenderbufferStorage, and returned in the <data> parameter of + * GetTexLevelParameter and GetRenderbufferParameteriv. + */ + int GL_DEPTH24_STENCIL8 = 0x88F0; + + /** Accepted by the <value> parameter of GetTexLevelParameter. */ + int GL_TEXTURE_STENCIL_SIZE = 0x88F1; + + // ----------------------------------------------------------------- + // ----------------------[ EXT_draw_buffers2 ]---------------------- + // ----------------------------------------------------------------- + + void glColorMaski(@GLuint int buf, boolean r, boolean g, boolean b, boolean a); + + @StripPostfix(value = "data", hasPostfix = false) + void glGetBooleani_v(@GLenum int value, @GLuint int index, @OutParameter @Check("4") @GLboolean ByteBuffer data); + + @Alternate("glGetBooleani_v") + @GLreturn("data") + @StripPostfix(value = "data", hasPostfix = false) + void glGetBooleani_v2(@GLenum int value, @GLuint int index, @OutParameter @GLboolean ByteBuffer data); + + @StripPostfix("data") + void glGetIntegeri_v(@GLenum int value, @GLuint int index, @OutParameter @Check("4") IntBuffer data); + + @Alternate("glGetIntegeri_v") + @GLreturn("data") + @StripPostfix("data") + void glGetIntegeri_v2(@GLenum int value, @GLuint int index, @OutParameter IntBuffer data); + + void glEnablei(@GLenum int target, @GLuint int index); + + void glDisablei(@GLenum int target, @GLuint int index); + + boolean glIsEnabledi(@GLenum int target, @GLuint int index); + + // ---------------------------------------------------------------------------- + // ----------------------[ ARB_texture_compression_rgtc ]---------------------- + // ---------------------------------------------------------------------------- + + /** + * Accepted by the <internalformat> parameter of TexImage2D, + * CopyTexImage2D, and CompressedTexImage2D and the <format> parameter + * of CompressedTexSubImage2D: + */ + int GL_COMPRESSED_RED_RGTC1 = 0x8DBB, + GL_COMPRESSED_SIGNED_RED_RGTC1 = 0x8DBC, + GL_COMPRESSED_RG_RGTC2 = 0x8DBD, + GL_COMPRESSED_SIGNED_RG_RGTC2 = 0x8DBE; + + // -------------------------------------------------------------- + // ----------------------[ ARB_texture_rg ]---------------------- + // -------------------------------------------------------------- + + /** + * Accepted by the <internalFormat> parameter of TexImage1D, TexImage2D, + * TexImage3D, CopyTexImage1D, and CopyTexImage2D: + */ + int GL_R8 = 0x8229; + int GL_R16 = 0x822A; + + int GL_RG8 = 0x822B; + int GL_RG16 = 0x822C; + + int GL_R16F = 0x822D; + int GL_R32F = 0x822E; + + int GL_RG16F = 0x822F; + int GL_RG32F = 0x8230; + + int GL_R8I = 0x8231; + int GL_R8UI = 0x8232; + int GL_R16I = 0x8233; + int GL_R16UI = 0x8234; + int GL_R32I = 0x8235; + int GL_R32UI = 0x8236; + + int GL_RG8I = 0x8237; + int GL_RG8UI = 0x8238; + int GL_RG16I = 0x8239; + int GL_RG16UI = 0x823A; + int GL_RG32I = 0x823B; + int GL_RG32UI = 0x823C; + + /** + * Accepted by the <format> parameter of TexImage3D, TexImage2D, + * TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, + * DrawPixels and ReadPixels: + */ + int GL_RG = 0x8227; + int GL_RG_INTEGER = 0x8228; + + // ---------------------------------------------------------------------- + // ----------------------[ EXT_transform_feedback ]---------------------- + // ---------------------------------------------------------------------- + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, + * GetBufferPointerv, BindBufferRange, BindBufferOffset and + * BindBufferBase: + */ + int GL_TRANSFORM_FEEDBACK_BUFFER = 0x8C8E; + + /** + * Accepted by the <param> parameter of GetIntegerIndexedv and + * GetBooleanIndexedv: + */ + int GL_TRANSFORM_FEEDBACK_BUFFER_START = 0x8C84; + int GL_TRANSFORM_FEEDBACK_BUFFER_SIZE = 0x8C85; + + /** + * Accepted by the <param> parameter of GetIntegerIndexedv and + * GetBooleanIndexedv, and by the <pname> parameter of GetBooleanv, + * GetDoublev, GetIntegerv, and GetFloatv: + */ + int GL_TRANSFORM_FEEDBACK_BUFFER_BINDING = 0x8C8F; + + /** Accepted by the <bufferMode> parameter of TransformFeedbackVaryings: */ + int GL_INTERLEAVED_ATTRIBS = 0x8C8C; + int GL_SEPARATE_ATTRIBS = 0x8C8D; + + /** + * Accepted by the <target> parameter of BeginQuery, EndQuery, and + * GetQueryiv: + */ + int GL_PRIMITIVES_GENERATED = 0x8C87; + int GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 0x8C88; + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, and by + * the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev: + */ + int GL_RASTERIZER_DISCARD = 0x8C89; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv, + * and GetFloatv: + */ + int GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 0x8C8A; + int GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 0x8C8B; + int GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 0x8C80; + + /** Accepted by the <pname> parameter of GetProgramiv: */ + int GL_TRANSFORM_FEEDBACK_VARYINGS = 0x8C83; + int GL_TRANSFORM_FEEDBACK_BUFFER_MODE = 0x8C7F; + int GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH = 0x8C76; + + void glBindBufferRange(@GLenum int target, @GLuint int index, @GLuint int buffer, @GLintptr long offset, @GLsizeiptr long size); + + void glBindBufferBase(@GLenum int target, @GLuint int index, @GLuint int buffer); + + void glBeginTransformFeedback(@GLenum int primitiveMode); + + void glEndTransformFeedback(); + + void glTransformFeedbackVaryings(@GLuint int program, @GLsizei int count, + @Const @NullTerminated("count") @GLchar @PointerArray("count") ByteBuffer varyings, + @GLenum int bufferMode); + + @Alternate("glTransformFeedbackVaryings") + void glTransformFeedbackVaryings(@GLuint int program, @Constant("varyings.length") @GLsizei int count, + @Const @NullTerminated @PointerArray("count") CharSequence[] varyings, + @GLenum int bufferMode); + + void glGetTransformFeedbackVarying(@GLuint int program, @GLuint int index, @AutoSize("name") @GLsizei int bufSize, + @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length, + @OutParameter @GLsizei @Check("1") IntBuffer size, + @OutParameter @GLenum @Check("1") IntBuffer type, + @OutParameter @GLchar ByteBuffer name); + + @Alternate("glGetTransformFeedbackVarying") + @GLreturn(value = "name", maxLength = "bufSize") + void glGetTransformFeedbackVarying2(@GLuint int program, @GLuint int index, @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(name_length)") IntBuffer length, + @OutParameter @GLsizei @Check("1") IntBuffer size, + @OutParameter @GLenum @Check("1") IntBuffer type, + @OutParameter @GLchar ByteBuffer name); + + // ----------------------------------------------------------------------- + // ----------------------[ ARB_vertex_array_object ]---------------------- + // ----------------------------------------------------------------------- + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_VERTEX_ARRAY_BINDING = 0x85B5; + + @Code(" StateTracker.bindVAO(caps, array);") + void glBindVertexArray(@GLuint int array); + + @Code(" StateTracker.deleteVAO(caps, arrays);") + void glDeleteVertexArrays(@AutoSize("arrays") @GLsizei int n, @Const @GLuint IntBuffer arrays); + + @Alternate("glDeleteVertexArrays") + @Code(" StateTracker.deleteVAO(caps, array);") + void glDeleteVertexArrays(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(caps, array)", keepParam = true) int array); + + void glGenVertexArrays(@AutoSize("arrays") @GLsizei int n, @OutParameter @GLuint IntBuffer arrays); + + @Alternate("glGenVertexArrays") + @GLreturn("arrays") + void glGenVertexArrays2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer arrays); + + boolean glIsVertexArray(@GLuint int array); + + // -------------------------------------------------------------------- + // ----------------------[ ARB_framebuffer_sRGB ]---------------------- + // -------------------------------------------------------------------- + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + int GL_FRAMEBUFFER_SRGB = 0x8DB9; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_FRAMEBUFFER_SRGB_CAPABLE = 0x8DBA; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL31.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL31.java new file mode 100644 index 0000000..f6325e4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL31.java @@ -0,0 +1,321 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.Buffer; +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +public interface GL31 { + + // ---------------------------------------------------------- + // ----------------------[ OpenGL 3.1 ]---------------------- + // ---------------------------------------------------------- + + int GL_RED_SNORM = 0x8F90; + int GL_RG_SNORM = 0x8F91; + int GL_RGB_SNORM = 0x8F92; + int GL_RGBA_SNORM = 0x8F93; + int GL_R8_SNORM = 0x8F94; + int GL_RG8_SNORM = 0x8F95; + int GL_RGB8_SNORM = 0x8F96; + int GL_RGBA8_SNORM = 0x8F97; + int GL_R16_SNORM = 0x8F98; + int GL_RG16_SNORM = 0x8F99; + int GL_RGB16_SNORM = 0x8F9A; + int GL_RGBA16_SNORM = 0x8F9B; + int GL_SIGNED_NORMALIZED = 0x8F9C; + + // ------------------------------------------------------------------ + // ----------------------[ ARB_draw_instanced ]---------------------- + // ------------------------------------------------------------------ + + void glDrawArraysInstanced(@GLenum int mode, int first, @GLsizei int count, @GLsizei int primcount); + + void glDrawElementsInstanced(@GLenum int mode, @AutoSize("indices") @GLsizei int count, @AutoType("indices") @GLenum int type, + @BufferObject(BufferKind.ElementVBO) + @Const + @GLubyte + @GLushort + @GLuint Buffer indices, @GLsizei int primcount); + + // --------------------------------------------------------------- + // ----------------------[ EXT_copy_buffer ]---------------------- + // --------------------------------------------------------------- + + int GL_COPY_READ_BUFFER_BINDING = 0x8F36; + int GL_COPY_WRITE_BUFFER_BINDING = 0x8F37; + + int GL_COPY_READ_BUFFER = GL_COPY_READ_BUFFER_BINDING; + int GL_COPY_WRITE_BUFFER = GL_COPY_WRITE_BUFFER_BINDING; + + void glCopyBufferSubData(@GLenum int readtarget, @GLenum int writetarget, @GLintptr long readoffset, @GLintptr long writeoffset, @GLsizeiptr long size); + + // -------------------------------------------------------------------- + // ----------------------[ NV_primitive_restart ]---------------------- + // -------------------------------------------------------------------- + + /** + * Accepted by the <cap> parameter of IsEnabled, and by + * the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev: + */ + int GL_PRIMITIVE_RESTART = 0x8F9D; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_PRIMITIVE_RESTART_INDEX = 0x8F9E; + + void glPrimitiveRestartIndex(@GLuint int index); + + // ------------------------------------------------------------------------- + // ----------------------[ ARB_texture_buffer_object ]---------------------- + // ------------------------------------------------------------------------- + + /** + * Accepted by the <target> parameter of BindBuffer, BufferData, + * BufferSubData, MapBuffer, MapBufferRange, BindTexture, UnmapBuffer, + * GetBufferSubData, GetBufferParameteriv, GetBufferPointerv, and TexBuffer, + * and the parameter of GetBooleanv, GetDoublev, GetFloatv, and + * GetIntegerv: + */ + int GL_TEXTURE_BUFFER = 0x8C2A; + + /** + * Accepted by the <pname> parameters of GetBooleanv, GetDoublev, + * GetFloatv, and GetIntegerv: + */ + int GL_MAX_TEXTURE_BUFFER_SIZE = 0x8C2B; + int GL_TEXTURE_BINDING_BUFFER = 0x8C2C; + int GL_TEXTURE_BUFFER_DATA_STORE_BINDING = 0x8C2D; + int GL_TEXTURE_BUFFER_FORMAT = 0x8C2E; + + void glTexBuffer(@GLenum int target, @GLenum int internalformat, @GLuint int buffer); + + // --------------------------------------------------------------------- + // ----------------------[ ARB_texture_rectangle ]---------------------- + // --------------------------------------------------------------------- + + /** + * Accepted by the <cap> parameter of Enable, Disable and IsEnabled; + * by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv + * and GetDoublev; and by the <target> parameter of BindTexture, + * GetTexParameterfv, GetTexParameteriv, TexParameterf, TexParameteri, + * TexParameterfv and TexParameteriv: + * Accepted by the <target> parameter of GetTexImage, + * GetTexLevelParameteriv, GetTexLevelParameterfv, TexImage2D, + * CopyTexImage2D, TexSubImage2D and CopySubTexImage2D: + */ + int GL_TEXTURE_RECTANGLE = 0x84F5; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv and GetDoublev: + */ + int GL_TEXTURE_BINDING_RECTANGLE = 0x84F6; + + /** + * Accepted by the <target> parameter of GetTexLevelParameteriv, + * GetTexLevelParameterfv, GetTexParameteriv and TexImage2D: + */ + int GL_PROXY_TEXTURE_RECTANGLE = 0x84F7; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, + * GetIntegerv and GetFloatv: + */ + int GL_MAX_RECTANGLE_TEXTURE_SIZE = 0x84F8; + + /** + * Returned by <type> parameter of GetActiveUniform when the location + * <index> for program object <program> is of type sampler2DRect: + */ + int GL_SAMPLER_2D_RECT = 0x8B63; + + /** + * Returned by <type> parameter of GetActiveUniform when the location + * <index> for program object <program> is of type sampler2DRectShadow: + */ + int GL_SAMPLER_2D_RECT_SHADOW = 0x8B64; + + // ------------------------------------------------------------------------- + // ----------------------[ ARB_uniform_buffer_object ]---------------------- + // ------------------------------------------------------------------------- + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, and + * GetBufferPointerv: + */ + int GL_UNIFORM_BUFFER = 0x8A11; + + /** + * Accepted by the <pname> parameter of GetIntegeri_v, GetBooleanv, + * GetIntegerv, GetFloatv, and GetDoublev: + */ + int GL_UNIFORM_BUFFER_BINDING = 0x8A28; + + /** Accepted by the <pname> parameter of GetIntegeri_v: */ + int GL_UNIFORM_BUFFER_START = 0x8A29; + int GL_UNIFORM_BUFFER_SIZE = 0x8A2A; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_MAX_VERTEX_UNIFORM_BLOCKS = 0x8A2B; + int GL_MAX_GEOMETRY_UNIFORM_BLOCKS = 0x8A2C; + int GL_MAX_FRAGMENT_UNIFORM_BLOCKS = 0x8A2D; + int GL_MAX_COMBINED_UNIFORM_BLOCKS = 0x8A2E; + int GL_MAX_UNIFORM_BUFFER_BINDINGS = 0x8A2F; + int GL_MAX_UNIFORM_BLOCK_SIZE = 0x8A30; + int GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 0x8A31; + int GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS = 0x8A32; + int GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 0x8A33; + int GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = 0x8A34; + + /** Accepted by the <pname> parameter of GetProgramiv: */ + int GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = 0x8A35; + int GL_ACTIVE_UNIFORM_BLOCKS = 0x8A36; + + /** Accepted by the <pname> parameter of GetActiveUniformsiv: */ + int GL_UNIFORM_TYPE = 0x8A37; + int GL_UNIFORM_SIZE = 0x8A38; + int GL_UNIFORM_NAME_LENGTH = 0x8A39; + int GL_UNIFORM_BLOCK_INDEX = 0x8A3A; + int GL_UNIFORM_OFFSET = 0x8A3B; + int GL_UNIFORM_ARRAY_STRIDE = 0x8A3C; + int GL_UNIFORM_MATRIX_STRIDE = 0x8A3D; + int GL_UNIFORM_IS_ROW_MAJOR = 0x8A3E; + + /** Accepted by the <pname> parameter of GetActiveUniformBlockiv: */ + int GL_UNIFORM_BLOCK_BINDING = 0x8A3F; + int GL_UNIFORM_BLOCK_DATA_SIZE = 0x8A40; + int GL_UNIFORM_BLOCK_NAME_LENGTH = 0x8A41; + int GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS = 0x8A42; + int GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 0x8A43; + int GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 0x8A44; + int GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER = 0x8A45; + int GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 0x8A46; + + /** Returned by GetActiveUniformsiv and GetUniformBlockIndex */ + int GL_INVALID_INDEX = 0xFFFFFFFF; + + void glGetUniformIndices(@GLuint int program, @AutoSize("uniformIndices") @GLsizei int uniformCount, + @Const @NullTerminated("uniformIndices.remaining()") @GLchar @PointerArray("uniformCount") ByteBuffer uniformNames, + @OutParameter @GLuint IntBuffer uniformIndices); + + @Alternate("glGetUniformIndices") + void glGetUniformIndices(@GLuint int program, @Constant("uniformNames.length") @GLsizei int uniformCount, + @Const @NullTerminated @PointerArray("uniformCount") CharSequence[] uniformNames, + @OutParameter @Check("uniformNames.length") @GLuint IntBuffer uniformIndices); + + @StripPostfix("params") + void glGetActiveUniformsiv(@GLuint int program, @AutoSize("uniformIndices") @GLsizei int uniformCount, + @Const @GLuint IntBuffer uniformIndices, + @GLenum int pname, + @OutParameter @Check("uniformIndices.remaining()") @GLint IntBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetActiveUniformsi} instead. */ + @Alternate("glGetActiveUniformsiv") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "GL31", method = "glGetActiveUniformsi") + @Deprecated + void glGetActiveUniformsiv(@GLuint int program, @Constant("1") @GLsizei int uniformCount, + @Constant(value = "MemoryUtil.getAddress(params.put(1, uniformIndex), 1)", keepParam = true) int uniformIndex, // Reuse params buffer + @GLenum int pname, + @OutParameter @GLint IntBuffer params); + + @Alternate("glGetActiveUniformsiv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetActiveUniformsiv2(@GLuint int program, @Constant("1") @GLsizei int uniformCount, + @Constant(value = "MemoryUtil.getAddress(params.put(1, uniformIndex), 1)", keepParam = true) int uniformIndex, // Reuse params buffer + @GLenum int pname, + @OutParameter @GLint IntBuffer params); + + void glGetActiveUniformName(@GLuint int program, @GLuint int uniformIndex, @AutoSize("uniformName") @GLsizei int bufSize, + @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length, + @OutParameter @GLchar ByteBuffer uniformName); + + @Alternate("glGetActiveUniformName") + @GLreturn(value = "uniformName", maxLength = "bufSize") + void glGetActiveUniformName2(@GLuint int program, @GLuint int uniformIndex, @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(uniformName_length)") IntBuffer length, + @OutParameter @GLchar ByteBuffer uniformName); + + @GLuint + int glGetUniformBlockIndex(@GLuint int program, @Const @NullTerminated @GLchar ByteBuffer uniformBlockName); + + @Alternate("glGetUniformBlockIndex") + @GLuint + int glGetUniformBlockIndex(@GLuint int program, @NullTerminated CharSequence uniformBlockName); + + @StripPostfix("params") + void glGetActiveUniformBlockiv(@GLuint int program, @GLuint int uniformBlockIndex, @GLenum int pname, + @OutParameter @Check(value = "16") @GLint IntBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetActiveUniformBlocki} instead. */ + @Alternate("glGetActiveUniformBlockiv") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "GL31", method = "glGetActiveUniformBlocki") + @Deprecated + void glGetActiveUniformBlockiv2(@GLuint int program, @GLuint int uniformBlockIndex, @GLenum int pname, + @OutParameter @GLint IntBuffer params); + + @Alternate("glGetActiveUniformBlockiv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetActiveUniformBlockiv3(@GLuint int program, @GLuint int uniformBlockIndex, @GLenum int pname, + @OutParameter @GLint IntBuffer params); + + void glGetActiveUniformBlockName(@GLuint int program, @GLuint int uniformBlockIndex, @AutoSize("uniformBlockName") @GLsizei int bufSize, + @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length, + @OutParameter @GLchar ByteBuffer uniformBlockName); + + @Alternate("glGetActiveUniformBlockName") + @GLreturn(value = "uniformBlockName", maxLength = "bufSize") + void glGetActiveUniformBlockName2(@GLuint int program, @GLuint int uniformBlockIndex, @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(uniformBlockName_length)") IntBuffer length, + @OutParameter @GLchar ByteBuffer uniformBlockName); + + void glUniformBlockBinding(@GLuint int program, @GLuint int uniformBlockIndex, @GLuint int uniformBlockBinding); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL32.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL32.java new file mode 100644 index 0000000..bb948a7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL32.java @@ -0,0 +1,357 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.Buffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; +import java.nio.LongBuffer; + +public interface GL32 { + + // ---------------------------------------------------------- + // ----------------------[ OpenGL 3.2 ]---------------------- + // ---------------------------------------------------------- + + int GL_CONTEXT_PROFILE_MASK = 0x9126; + int GL_CONTEXT_CORE_PROFILE_BIT = 0x00000001; + int GL_CONTEXT_COMPATIBILITY_PROFILE_BIT = 0x00000002; + + int GL_MAX_VERTEX_OUTPUT_COMPONENTS = 0x9122; + int GL_MAX_GEOMETRY_INPUT_COMPONENTS = 0x9123; + int GL_MAX_GEOMETRY_OUTPUT_COMPONENTS = 0x9124; + int GL_MAX_FRAGMENT_INPUT_COMPONENTS = 0x9125; + + @StripPostfix("params") + void glGetBufferParameteri64v(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") LongBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetBufferParameteri64} instead. */ + @Alternate("glGetBufferParameteri64v") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "GL32", method = "glGetBufferParameteri64") + @Deprecated + void glGetBufferParameteri64v2(@GLenum int target, @GLenum int pname, @OutParameter LongBuffer params); + + @Alternate("glGetBufferParameteri64v") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetBufferParameteri64v3(@GLenum int target, @GLenum int pname, @OutParameter LongBuffer params); + + // ----------------------------------------------------------------------------- + // ----------------------[ ARB_draw_elements_base_vertex ]---------------------- + // ----------------------------------------------------------------------------- + + void glDrawElementsBaseVertex(@GLenum int mode, @AutoSize("indices") @GLsizei int count, @AutoType("indices") @GLenum int type, + @BufferObject(BufferKind.ElementVBO) + @Const + @GLubyte + @GLushort + @GLuint Buffer indices, int basevertex); + + void glDrawRangeElementsBaseVertex(@GLenum int mode, @GLuint int start, @GLuint int end, @AutoSize("indices") @GLsizei int count, @AutoType("indices") @GLenum int type, + @BufferObject(BufferKind.ElementVBO) + @Const + @GLubyte + @GLushort + @GLuint Buffer indices, int basevertex); + + void glDrawElementsInstancedBaseVertex(@GLenum int mode, @AutoSize("indices") @GLsizei int count, @AutoType("indices") @GLenum int type, + @BufferObject(BufferKind.ElementVBO) + @Const + @GLubyte + @GLushort + @GLuint Buffer indices, @GLsizei int primcount, int basevertex); + + //void glMultiDrawElementsBaseVertex(@GLenum int mode, @GLsizei*count, @GLenum int type, void**indices, @GLsizei int primcount, int*basevertex) + + // -------------------------------------------------------------------- + // ----------------------[ ARB_provoking_vertex ]---------------------- + // -------------------------------------------------------------------- + + /** Accepted by the <mode> parameter of ProvokingVertex: */ + int GL_FIRST_VERTEX_CONVENTION = 0x8E4D; + int GL_LAST_VERTEX_CONVENTION = 0x8E4E; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_PROVOKING_VERTEX = 0x8E4F; + int GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION = 0x8E4C; + + void glProvokingVertex(@GLenum int mode); + + // --------------------------------------------------------------------- + // ----------------------[ ARB_seamless_cube_map ]---------------------- + // --------------------------------------------------------------------- + + /** + * Accepted by the <cap> parameter of Enable, Disable and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv + * and GetDoublev: + */ + int GL_TEXTURE_CUBE_MAP_SEAMLESS = 0x884F; + + // ----------------------------------------------------------------------- + // ----------------------[ ARB_texture_multisample ]---------------------- + // ----------------------------------------------------------------------- + + /** Accepted by the <pname> parameter of GetMultisamplefv: */ + int GL_SAMPLE_POSITION = 0x8E50; + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, and by + * the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev: + */ + int GL_SAMPLE_MASK = 0x8E51; + + /** + * Accepted by the <target> parameter of GetBooleani_v and + * GetIntegeri_v: + */ + int GL_SAMPLE_MASK_VALUE = 0x8E52; + + /** + * Accepted by the <target> parameter of BindTexture and + * TexImage2DMultisample: + */ + int GL_TEXTURE_2D_MULTISAMPLE = 0x9100; + + /** Accepted by the <target> parameter of TexImage2DMultisample: */ + int GL_PROXY_TEXTURE_2D_MULTISAMPLE = 0x9101; + + /** + * Accepted by the <target> parameter of BindTexture and + * TexImage3DMultisample: + */ + int GL_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9102; + + /** Accepted by the <target> parameter of TexImage3DMultisample: */ + int GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9103; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv, + * and GetFloatv: + */ + int GL_MAX_SAMPLE_MASK_WORDS = 0x8E59; + int GL_MAX_COLOR_TEXTURE_SAMPLES = 0x910E; + int GL_MAX_DEPTH_TEXTURE_SAMPLES = 0x910F; + int GL_MAX_INTEGER_SAMPLES = 0x9110; + int GL_TEXTURE_BINDING_2D_MULTISAMPLE = 0x9104; + int GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY = 0x9105; + + /** Accepted by the <pname> parameter of GetTexLevelParameter */ + int GL_TEXTURE_SAMPLES = 0x9106; + int GL_TEXTURE_FIXED_SAMPLE_LOCATIONS = 0x9107; + + /** Returned by the <type> parameter of GetActiveUniform: */ + int GL_SAMPLER_2D_MULTISAMPLE = 0x9108; + int GL_INT_SAMPLER_2D_MULTISAMPLE = 0x9109; + int GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE = 0x910A; + int GL_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910B; + int GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910C; + int GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY = 0x910D; + + void glTexImage2DMultisample(@GLenum int target, @GLsizei int samples, int internalformat, + @GLsizei int width, @GLsizei int height, + boolean fixedsamplelocations); + + void glTexImage3DMultisample(@GLenum int target, @GLsizei int samples, int internalformat, + @GLsizei int width, @GLsizei int height, @GLsizei int depth, + boolean fixedsamplelocations); + + @StripPostfix("val") + void glGetMultisamplefv(@GLenum int pname, @GLuint int index, @OutParameter @Check("2") FloatBuffer val); + + void glSampleMaski(@GLuint int index, @GLbitfield int mask); + + // --------------------------------------------------------------- + // ----------------------[ ARB_depth_clamp ]---------------------- + // --------------------------------------------------------------- + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_DEPTH_CLAMP = 0x864F; + + // -------------------------------------------------------------------- + // ----------------------[ ARB_geometry_shader4 ]---------------------- + // -------------------------------------------------------------------- + + /** + * Accepted by the <type> parameter of CreateShader and returned by the + * <params> parameter of GetShaderiv: + */ + int GL_GEOMETRY_SHADER = 0x8DD9; + + /** + * Accepted by the <pname> parameter of ProgramParameteriEXT and + * GetProgramiv: + */ + int GL_GEOMETRY_VERTICES_OUT = 0x8DDA; + int GL_GEOMETRY_INPUT_TYPE = 0x8DDB; + int GL_GEOMETRY_OUTPUT_TYPE = 0x8DDC; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS = 0x8C29; + //int GL_MAX_GEOMETRY_VARYING_COMPONENTS = 0x8DDD; -- Missing from 3.2 spec + //int GL_MAX_VERTEX_VARYING_COMPONENTS = 0x8DDE; -- Missing from 3.2 spec + int GL_MAX_VARYING_COMPONENTS = 0x8B4B; + int GL_MAX_GEOMETRY_UNIFORM_COMPONENTS = 0x8DDF; + int GL_MAX_GEOMETRY_OUTPUT_VERTICES = 0x8DE0; + int GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS = 0x8DE1; + + /** + * Accepted by the <mode> parameter of Begin, DrawArrays, + * MultiDrawArrays, DrawElements, MultiDrawElements, and + * DrawRangeElements: + */ + int GL_LINES_ADJACENCY = 0xA; + int GL_LINE_STRIP_ADJACENCY = 0xB; + int GL_TRIANGLES_ADJACENCY = 0xC; + int GL_TRIANGLE_STRIP_ADJACENCY = 0xD; + + /** Returned by CheckFramebufferStatusEXT: */ + int GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS = 0x8DA8; + + /** + * Accepted by the <pname> parameter of GetFramebufferAttachment- + * ParameterivEXT: + */ + int GL_FRAMEBUFFER_ATTACHMENT_LAYERED = 0x8DA7; + int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 0x8CD4; + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, + * and by the <pname> parameter of GetIntegerv, GetFloatv, GetDoublev, + * and GetBooleanv: + */ + int GL_PROGRAM_POINT_SIZE = 0x8642; + + void glFramebufferTexture(@GLenum int target, @GLenum int attachment, @GLuint int texture, int level); + + // -------------------------------------------------------- + // ----------------------[ ARB_sync ]---------------------- + // -------------------------------------------------------- + + /** Accepted as the <pname> parameter of GetInteger64v: */ + int GL_MAX_SERVER_WAIT_TIMEOUT = 0x9111; + + /** Accepted as the <pname> parameter of GetSynciv: */ + int GL_OBJECT_TYPE = 0x9112; + int GL_SYNC_CONDITION = 0x9113; + int GL_SYNC_STATUS = 0x9114; + int GL_SYNC_FLAGS = 0x9115; + + /** Returned in <values> for GetSynciv <pname> OBJECT_TYPE: */ + int GL_SYNC_FENCE = 0x9116; + + /** Returned in <values> for GetSynciv <pname> SYNC_CONDITION: */ + int GL_SYNC_GPU_COMMANDS_COMPLETE = 0x9117; + + /** Returned in <values> for GetSynciv <pname> SYNC_STATUS: */ + int GL_UNSIGNALED = 0x9118; + int GL_SIGNALED = 0x9119; + + /** Accepted in the <flags> parameter of ClientWaitSync: */ + int GL_SYNC_FLUSH_COMMANDS_BIT = 0x00000001; + + /** Accepted in the <timeout> parameter of WaitSync: */ + long GL_TIMEOUT_IGNORED = 0xFFFFFFFFFFFFFFFFl; + + /** Returned by ClientWaitSync: */ + int GL_ALREADY_SIGNALED = 0x911A; + int GL_TIMEOUT_EXPIRED = 0x911B; + int GL_CONDITION_SATISFIED = 0x911C; + int GL_WAIT_FAILED = 0x911D; + + @PointerWrapper("GLsync") + GLSync glFenceSync(@GLenum int condition, @GLbitfield int flags); + + boolean glIsSync(@PointerWrapper("GLsync") GLSync sync); + + void glDeleteSync(@PointerWrapper("GLsync") GLSync sync); + + @GLenum + int glClientWaitSync(@PointerWrapper("GLsync") GLSync sync, @GLbitfield int flags, @GLuint64 long timeout); + + void glWaitSync(@PointerWrapper("GLsync") GLSync sync, @GLbitfield int flags, @GLuint64 long timeout); + + @StripPostfix("data") + void glGetInteger64v(@GLenum int pname, @OutParameter @Check("1") @GLint64 LongBuffer data); + + @Alternate("glGetInteger64v") + @GLreturn("data") + @StripPostfix("data") + void glGetInteger64v2(@GLenum int pname, @OutParameter @GLint64 LongBuffer data); + + @StripPostfix("data") + @Optional(reason = "NV's 3.2 implementation does not expose this (last driver checked: 19?.??)") + void glGetInteger64i_v(@GLenum int value, @GLuint int index, @OutParameter @Check("4") @GLint64 LongBuffer data); + + @Alternate("glGetInteger64i_v") + @GLreturn("data") + @StripPostfix("data") + void glGetInteger64i_v2(@GLenum int value, @GLuint int index, @OutParameter @GLint64 LongBuffer data); + + @StripPostfix("values") + void glGetSynciv(@PointerWrapper("GLsync") GLSync sync, @GLenum int pname, @AutoSize("values") @GLsizei int bufSize, + @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length, + @OutParameter IntBuffer values); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetSynci} instead. */ + @Alternate("glGetSynciv") + @GLreturn("values") + @StripPostfix("values") + @Reuse(value = "GL32", method = "glGetSynci") + @Deprecated + void glGetSynciv2(@PointerWrapper("GLsync") GLSync sync, @GLenum int pname, @Constant("1") @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("0L") IntBuffer length, + @OutParameter IntBuffer values); + + @Alternate("glGetSynciv") + @GLreturn("values") + @StripPostfix(value = "values", postfix = "v") + void glGetSynciv3(@PointerWrapper("GLsync") GLSync sync, @GLenum int pname, @Constant("1") @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("0L") IntBuffer length, + @OutParameter IntBuffer values); +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL33.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL33.java new file mode 100644 index 0000000..3e68488 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL33.java @@ -0,0 +1,436 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.ByteBuffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; +import java.nio.LongBuffer; + +@DeprecatedGL +public interface GL33 { + + // ----------------------------------------------------------------------- + // ----------------------[ ARB_blend_func_extended ]---------------------- + // ----------------------------------------------------------------------- + + /** + * Accepted by the <src> and <dst> parameters of BlendFunc and + * BlendFunci, and by the <srcRGB>, <dstRGB>, <srcAlpha> and <dstAlpha> + * parameters of BlendFuncSeparate and BlendFuncSeparatei: + */ + int GL_SRC1_COLOR = 0x88F9; + int GL_SRC1_ALPHA = GL15.GL_SRC1_ALPHA; + int GL_ONE_MINUS_SRC1_COLOR = 0x88FA; + int GL_ONE_MINUS_SRC1_ALPHA = 0x88FB; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv + * and GetDoublev: + */ + int GL_MAX_DUAL_SOURCE_DRAW_BUFFERS = 0x88FC; + + void glBindFragDataLocationIndexed(@GLuint int program, @GLuint int colorNumber, @GLuint int index, @NullTerminated @Const @GLchar ByteBuffer name); + + @Alternate("glBindFragDataLocationIndexed") + void glBindFragDataLocationIndexed(@GLuint int program, @GLuint int colorNumber, @GLuint int index, @NullTerminated CharSequence name); + + int glGetFragDataIndex(@GLuint int program, @NullTerminated @Const @GLchar ByteBuffer name); + + @Alternate("glGetFragDataIndex") + int glGetFragDataIndex(@GLuint int program, @NullTerminated CharSequence name); + + // -------------------------------------------------------------------- + // ----------------------[ ARB_occlusion_query2 ]---------------------- + // -------------------------------------------------------------------- + + /** + * Accepted by the <target> parameter of BeginQuery, EndQuery, + * and GetQueryiv: + */ + int GL_ANY_SAMPLES_PASSED = 0x8C2F; + + // ------------------------------------------------------------------- + // ----------------------[ ARB_sampler_objects ]---------------------- + // ------------------------------------------------------------------- + + /** + * Accepted by the <value> parameter of the GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv and GetDoublev functions: + */ + int GL_SAMPLER_BINDING = 0x8919; + + void glGenSamplers(@AutoSize("samplers") @GLsizei int count, @OutParameter @GLuint IntBuffer samplers); + + @Alternate("glGenSamplers") + @GLreturn("samplers") + void glGenSamplers2(@Constant("1") @GLsizei int count, @OutParameter @GLuint IntBuffer samplers); + + void glDeleteSamplers(@AutoSize("samplers") @GLsizei int count, @Const @GLuint IntBuffer samplers); + + @Alternate("glDeleteSamplers") + void glDeleteSamplers(@Constant("1") @GLsizei int count, @Constant(value = "APIUtil.getInt(caps, sampler)", keepParam = true) int sampler); + + boolean glIsSampler(@GLuint int sampler); + + void glBindSampler(@GLenum int unit, @GLuint int sampler); + + void glSamplerParameteri(@GLuint int sampler, @GLenum int pname, int param); + + void glSamplerParameterf(@GLuint int sampler, @GLenum int pname, float param); + + @StripPostfix("params") + void glSamplerParameteriv(@GLuint int sampler, @GLenum int pname, @Check("4") @Const IntBuffer params); + + @StripPostfix("params") + void glSamplerParameterfv(@GLuint int sampler, @GLenum int pname, @Check("4") @Const FloatBuffer params); + + @StripPostfix("params") + void glSamplerParameterIiv(@GLuint int sampler, @GLenum int pname, @Check("4") @Const IntBuffer params); + + @StripPostfix("params") + void glSamplerParameterIuiv(@GLuint int sampler, @GLenum int pname, @Check("4") @Const @GLuint IntBuffer params); + + @StripPostfix("params") + void glGetSamplerParameteriv(@GLuint int sampler, @GLenum int pname, @Check("4") @OutParameter IntBuffer params); + + @Alternate("glGetSamplerParameteriv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetSamplerParameteriv2(@GLuint int sampler, @GLenum int pname, @OutParameter IntBuffer params); + + @StripPostfix("params") + void glGetSamplerParameterfv(@GLuint int sampler, @GLenum int pname, @Check("4") @OutParameter FloatBuffer params); + + @Alternate("glGetSamplerParameterfv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetSamplerParameterfv2(@GLuint int sampler, @GLenum int pname, @OutParameter FloatBuffer params); + + @StripPostfix("params") + void glGetSamplerParameterIiv(@GLuint int sampler, @GLenum int pname, @Check("4") @OutParameter IntBuffer params); + + @Alternate("glGetSamplerParameterIiv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetSamplerParameterIiv2(@GLuint int sampler, @GLenum int pname, @OutParameter IntBuffer params); + + @StripPostfix("params") + void glGetSamplerParameterIuiv(@GLuint int sampler, @GLenum int pname, @Check("4") @OutParameter IntBuffer params); + + @Alternate("glGetSamplerParameterIuiv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetSamplerParameterIuiv2(@GLuint int sampler, @GLenum int pname, @OutParameter IntBuffer params); + + // ------------------------------------------------------------------- + // ----------------------[ ARB_texture_rgb10_a2ui ]---------------------- + // ------------------------------------------------------------------- + + /** + * Accepted by the <internalFormat> parameter of TexImage1D, TexImage2D, + * TexImage3D, CopyTexImage1D, CopyTexImage2D, RenderbufferStorage and + * RenderbufferStorageMultisample: + */ + int GL_RGB10_A2UI = 0x906F; + + // ------------------------------------------------------------------- + // ----------------------[ ARB_texture_swizzle ]---------------------- + // ------------------------------------------------------------------- + + /** + * Accepted by the <pname> parameters of TexParameteri, + * TexParameterf, TexParameteriv, TexParameterfv, + * GetTexParameterfv, and GetTexParameteriv: + */ + int GL_TEXTURE_SWIZZLE_R = 0x8E42; + int GL_TEXTURE_SWIZZLE_G = 0x8E43; + int GL_TEXTURE_SWIZZLE_B = 0x8E44; + int GL_TEXTURE_SWIZZLE_A = 0x8E45; + + /** + * Accepted by the <pname> parameters of TexParameteriv, + * TexParameterfv, GetTexParameterfv, and GetTexParameteriv: + */ + int GL_TEXTURE_SWIZZLE_RGBA = 0x8E46; + + // --------------------------------------------------------------- + // ----------------------[ ARB_timer_query ]---------------------- + // --------------------------------------------------------------- + + /** + * Accepted by the <target> parameter of BeginQuery, EndQuery, and + * GetQueryiv: + */ + int GL_TIME_ELAPSED = 0x88BF; + + /** + * Accepted by the <target> parameter of GetQueryiv and QueryCounter. + * Accepted by the <value> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + int GL_TIMESTAMP = 0x8E28; + + void glQueryCounter(@GLuint int id, @GLenum int target); + + @StripPostfix("params") + void glGetQueryObjecti64v(@GLuint int id, @GLenum int pname, @OutParameter @Check("1") @GLint64 LongBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetQueryObjecti64} instead. */ + @Alternate("glGetQueryObjecti64v") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "GL33", method = "glGetQueryObjecti64") + @Deprecated + void glGetQueryObjecti64v2(@GLuint int id, @GLenum int pname, @OutParameter @GLint64 LongBuffer params); + + @Alternate("glGetQueryObjecti64v") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetQueryObjecti64v3(@GLuint int id, @GLenum int pname, @OutParameter @GLint64 LongBuffer params); + + @StripPostfix("params") + void glGetQueryObjectui64v(@GLuint int id, @GLenum int pname, @OutParameter @Check("1") @GLuint64 LongBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetQueryObjectui64} instead. */ + @Alternate("glGetQueryObjectui64v") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "GL33", method = "glGetQueryObjectui64") + @Deprecated + void glGetQueryObjectui64v2(@GLuint int id, @GLenum int pname, @OutParameter @GLuint64 LongBuffer params); + + @Alternate("glGetQueryObjectui64v") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetQueryObjectui64v3(@GLuint int id, @GLenum int pname, @OutParameter @GLuint64 LongBuffer params); + + // -------------------------------------------------------------------- + // ----------------------[ ARB_instanced_arrays ]---------------------- + // -------------------------------------------------------------------- + + /** + * Accepted by the <pname> parameters of GetVertexAttribdv, + * GetVertexAttribfv, and GetVertexAttribiv: + */ + int GL_VERTEX_ATTRIB_ARRAY_DIVISOR = 0x88FE; + + void glVertexAttribDivisor(@GLuint int index, @GLuint int divisor); + + // ------------------------------------------------------------------------------ + // ----------------------[ ARB_vertex_type_2_10_10_10_rev ]---------------------- + // ------------------------------------------------------------------------------ + + /** + * Accepted by the <type> parameter of VertexAttribPointer, VertexPointer, + * NormalPointer, ColorPointer, SecondaryColorPointer, TexCoordPointer, + * VertexAttribP{1234}ui, VertexP*, TexCoordP*, MultiTexCoordP*, NormalP3ui, + * ColorP*, SecondaryColorP* and VertexAttribP* + */ + int GL_INT_2_10_10_10_REV = 0x8D9F; + + @NoErrorCheck + @DeprecatedGL + void glVertexP2ui(@GLenum int type, @GLuint int value); + + @NoErrorCheck + @DeprecatedGL + void glVertexP3ui(@GLenum int type, @GLuint int value); + + @NoErrorCheck + @DeprecatedGL + void glVertexP4ui(@GLenum int type, @GLuint int value); + + @NoErrorCheck + @DeprecatedGL + @StripPostfix("value") + void glVertexP2uiv(@GLenum int type, @Check("2") @Const @GLuint IntBuffer value); + + @NoErrorCheck + @DeprecatedGL + @StripPostfix("value") + void glVertexP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer value); + + @NoErrorCheck + @DeprecatedGL + @StripPostfix("value") + void glVertexP4uiv(@GLenum int type, @Check("4") @Const @GLuint IntBuffer value); + + @NoErrorCheck + @DeprecatedGL + void glTexCoordP1ui(@GLenum int type, @GLuint int coords); + + @NoErrorCheck + @DeprecatedGL + void glTexCoordP2ui(@GLenum int type, @GLuint int coords); + + @NoErrorCheck + @DeprecatedGL + void glTexCoordP3ui(@GLenum int type, @GLuint int coords); + + @NoErrorCheck + @DeprecatedGL + void glTexCoordP4ui(@GLenum int type, @GLuint int coords); + + @NoErrorCheck + @DeprecatedGL + @StripPostfix("coords") + void glTexCoordP1uiv(@GLenum int type, @Check("1") @Const @GLuint IntBuffer coords); + + @NoErrorCheck + @DeprecatedGL + @StripPostfix("coords") + void glTexCoordP2uiv(@GLenum int type, @Check("2") @Const @GLuint IntBuffer coords); + + @NoErrorCheck + @DeprecatedGL + @StripPostfix("coords") + void glTexCoordP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer coords); + + @NoErrorCheck + @DeprecatedGL + @StripPostfix("coords") + void glTexCoordP4uiv(@GLenum int type, @Check("4") @Const @GLuint IntBuffer coords); + + @NoErrorCheck + @DeprecatedGL + void glMultiTexCoordP1ui(@GLenum int texture, @GLenum int type, @GLuint int coords); + + @NoErrorCheck + @DeprecatedGL + void glMultiTexCoordP2ui(@GLenum int texture, @GLenum int type, @GLuint int coords); + + @NoErrorCheck + @DeprecatedGL + void glMultiTexCoordP3ui(@GLenum int texture, @GLenum int type, @GLuint int coords); + + @NoErrorCheck + @DeprecatedGL + void glMultiTexCoordP4ui(@GLenum int texture, @GLenum int type, @GLuint int coords); + + @NoErrorCheck + @DeprecatedGL + @StripPostfix("coords") + void glMultiTexCoordP1uiv(@GLenum int texture, @GLenum int type, @Check("1") @Const @GLuint IntBuffer coords); + + @NoErrorCheck + @DeprecatedGL + @StripPostfix("coords") + void glMultiTexCoordP2uiv(@GLenum int texture, @GLenum int type, @Check("2") @Const @GLuint IntBuffer coords); + + @NoErrorCheck + @DeprecatedGL + @StripPostfix("coords") + void glMultiTexCoordP3uiv(@GLenum int texture, @GLenum int type, @Check("3") @Const @GLuint IntBuffer coords); + + @NoErrorCheck + @DeprecatedGL + @StripPostfix("coords") + void glMultiTexCoordP4uiv(@GLenum int texture, @GLenum int type, @Check("4") @Const @GLuint IntBuffer coords); + + @NoErrorCheck + @DeprecatedGL + void glNormalP3ui(@GLenum int type, @GLuint int coords); + + @NoErrorCheck + @DeprecatedGL + @StripPostfix("coords") + void glNormalP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer coords); + + @NoErrorCheck + @DeprecatedGL + void glColorP3ui(@GLenum int type, @GLuint int color); + + @NoErrorCheck + @DeprecatedGL + void glColorP4ui(@GLenum int type, @GLuint int color); + + @NoErrorCheck + @DeprecatedGL + @StripPostfix("color") + void glColorP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer color); + + @NoErrorCheck + @DeprecatedGL + @StripPostfix("color") + void glColorP4uiv(@GLenum int type, @Check("4") @Const @GLuint IntBuffer color); + + @NoErrorCheck + @DeprecatedGL + void glSecondaryColorP3ui(@GLenum int type, @GLuint int color); + + @NoErrorCheck + @DeprecatedGL + @StripPostfix("color") + void glSecondaryColorP3uiv(@GLenum int type, @Check("3") @Const @GLuint IntBuffer color); + + @NoErrorCheck + @DeprecatedGL + void glVertexAttribP1ui(@GLuint int index, @GLenum int type, boolean normalized, @GLuint int value); + + @NoErrorCheck + @DeprecatedGL + void glVertexAttribP2ui(@GLuint int index, @GLenum int type, boolean normalized, @GLuint int value); + + @NoErrorCheck + @DeprecatedGL + void glVertexAttribP3ui(@GLuint int index, @GLenum int type, boolean normalized, @GLuint int value); + + @NoErrorCheck + @DeprecatedGL + void glVertexAttribP4ui(@GLuint int index, @GLenum int type, boolean normalized, @GLuint int value); + + @NoErrorCheck + @DeprecatedGL + @StripPostfix("value") + void glVertexAttribP1uiv(@GLuint int index, @GLenum int type, boolean normalized, @Check("1") @Const @GLuint IntBuffer value); + + @NoErrorCheck + @DeprecatedGL + @StripPostfix("value") + void glVertexAttribP2uiv(@GLuint int index, @GLenum int type, boolean normalized, @Check("2") @Const @GLuint IntBuffer value); + + @NoErrorCheck + @DeprecatedGL + @StripPostfix("value") + void glVertexAttribP3uiv(@GLuint int index, @GLenum int type, boolean normalized, @Check("3") @Const @GLuint IntBuffer value); + + @NoErrorCheck + @DeprecatedGL + @StripPostfix("value") + void glVertexAttribP4uiv(@GLuint int index, @GLenum int type, boolean normalized, @Check("4") @Const @GLuint IntBuffer value); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL40.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL40.java new file mode 100644 index 0000000..ce60497 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL40.java @@ -0,0 +1,494 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.ByteBuffer; +import java.nio.DoubleBuffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; + +import com.sun.mirror.type.PrimitiveType; + +public interface GL40 { + + // ---------------------------------------------------------------------- + // ----------------------[ ARB_draw_buffers_blend ]---------------------- + // ---------------------------------------------------------------------- + + void glBlendEquationi(@GLuint int buf, @GLenum int mode); + + void glBlendEquationSeparatei(@GLuint int buf, @GLenum int modeRGB, @GLenum int modeAlpha); + + void glBlendFunci(@GLuint int buf, @GLenum int src, @GLenum int dst); + + void glBlendFuncSeparatei(@GLuint int buf, @GLenum int srcRGB, @GLenum int dstRGB, @GLenum int srcAlpha, @GLenum int dstAlpha); + + // ----------------------------------------------------------------- + // ----------------------[ ARB_draw_indirect ]---------------------- + // ----------------------------------------------------------------- + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, + * GetBufferPointerv, MapBufferRange, FlushMappedBufferRange, + * GetBufferParameteriv, BindBufferRange, BindBufferBase, and + * CopyBufferSubData: + */ + int GL_DRAW_INDIRECT_BUFFER = 0x8F3F; + + /** + * Accepted by the <value> parameter of GetIntegerv, GetBooleanv, GetFloatv, + * and GetDoublev: + */ + int GL_DRAW_INDIRECT_BUFFER_BINDING = 0x8F43; + + void glDrawArraysIndirect(@GLenum int mode, @BufferObject(BufferKind.IndirectBO) @Check("4 * 4") @Const @GLvoid ByteBuffer indirect); + + @Alternate("glDrawArraysIndirect") + void glDrawArraysIndirect(@GLenum int mode, @BufferObject(BufferKind.IndirectBO) @Check("4") @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect); + + void glDrawElementsIndirect(@GLenum int mode, @GLenum int type, @BufferObject(BufferKind.IndirectBO) @Check("5 * 4") @Const @GLvoid ByteBuffer indirect); + + @Alternate("glDrawElementsIndirect") + void glDrawElementsIndirect(@GLenum int mode, @GLenum int type, @BufferObject(BufferKind.IndirectBO) @Check("5") @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect); + + // --------------------------------------------------------------- + // ----------------------[ ARB_gpu_shader5 ]---------------------- + // --------------------------------------------------------------- + + /** Accepted by the <pname> parameter of GetProgramiv: */ + int GL_GEOMETRY_SHADER_INVOCATIONS = 0x887F; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * GetDoublev, and GetInteger64v: + */ + int GL_MAX_GEOMETRY_SHADER_INVOCATIONS = 0x8E5A; + int GL_MIN_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5B; + int GL_MAX_FRAGMENT_INTERPOLATION_OFFSET = 0x8E5C; + int GL_FRAGMENT_INTERPOLATION_OFFSET_BITS = 0x8E5D; + int GL_MAX_VERTEX_STREAMS = 0x8E71; + + // ------------------------------------------------------------------- + // ----------------------[ ARB_gpu_shader_fp64 ]---------------------- + // ------------------------------------------------------------------- + + /** + * Returned in the <type> parameter of GetActiveUniform, and + * GetTransformFeedbackVarying: + */ + int GL_DOUBLE_VEC2 = 0x8FFC; + int GL_DOUBLE_VEC3 = 0x8FFD; + int GL_DOUBLE_VEC4 = 0x8FFE; + int GL_DOUBLE_MAT2 = 0x8F46; + int GL_DOUBLE_MAT3 = 0x8F47; + int GL_DOUBLE_MAT4 = 0x8F48; + int GL_DOUBLE_MAT2x3 = 0x8F49; + int GL_DOUBLE_MAT2x4 = 0x8F4A; + int GL_DOUBLE_MAT3x2 = 0x8F4B; + int GL_DOUBLE_MAT3x4 = 0x8F4C; + int GL_DOUBLE_MAT4x2 = 0x8F4D; + int GL_DOUBLE_MAT4x3 = 0x8F4E; + + void glUniform1d(int location, double x); + + void glUniform2d(int location, double x, double y); + + void glUniform3d(int location, double x, double y, double z); + + void glUniform4d(int location, double x, double y, double z, double w); + + @StripPostfix("value") + void glUniform1dv(int location, @AutoSize("value") @GLsizei int count, @Const DoubleBuffer value); + + @StripPostfix("value") + void glUniform2dv(int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const DoubleBuffer value); + + @StripPostfix("value") + void glUniform3dv(int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const DoubleBuffer value); + + @StripPostfix("value") + void glUniform4dv(int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const DoubleBuffer value); + + @StripPostfix("value") + void glUniformMatrix2dv(int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @StripPostfix("value") + void glUniformMatrix3dv(int location, @AutoSize(value = "value", expression = " / (3 * 3)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @StripPostfix("value") + void glUniformMatrix4dv(int location, @AutoSize(value = "value", expression = " >> 4") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @StripPostfix("value") + void glUniformMatrix2x3dv(int location, @AutoSize(value = "value", expression = " / (2 * 3)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @StripPostfix("value") + void glUniformMatrix2x4dv(int location, @AutoSize(value = "value", expression = " >> 3") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @StripPostfix("value") + void glUniformMatrix3x2dv(int location, @AutoSize(value = "value", expression = " / (3 * 2)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @StripPostfix("value") + void glUniformMatrix3x4dv(int location, @AutoSize(value = "value", expression = " / (3 * 4)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @StripPostfix("value") + void glUniformMatrix4x2dv(int location, @AutoSize(value = "value", expression = " >> 3") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @StripPostfix("value") + void glUniformMatrix4x3dv(int location, @AutoSize(value = "value", expression = " / (4 * 3)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @StripPostfix("params") + void glGetUniformdv(@GLuint int program, int location, @OutParameter @Check DoubleBuffer params); + + // ------------------------------------------------------------------ + // ----------------------[ ARB_sample_shading ]---------------------- + // ------------------------------------------------------------------ + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + int GL_SAMPLE_SHADING = 0x8C36; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, + * GetIntegerv, and GetFloatv: + */ + int GL_MIN_SAMPLE_SHADING_VALUE = 0x8C37; + + void glMinSampleShading(float value); + + // --------------------------------------------------------------------- + // ----------------------[ ARB_shader_subroutine ]---------------------- + // --------------------------------------------------------------------- + + /** Accepted by the <pname> parameter of GetProgramStageiv: */ + int GL_ACTIVE_SUBROUTINES = 0x8DE5; + int GL_ACTIVE_SUBROUTINE_UNIFORMS = 0x8DE6; + int GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS = 0x8E47; + int GL_ACTIVE_SUBROUTINE_MAX_LENGTH = 0x8E48; + int GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH = 0x8E49; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, GetDoublev, and GetInteger64v: + */ + int GL_MAX_SUBROUTINES = 0x8DE7; + int GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS = 0x8DE8; + + /** Accepted by the <pname> parameter of GetActiveSubroutineUniformiv: */ + int GL_NUM_COMPATIBLE_SUBROUTINES = 0x8E4A; + int GL_COMPATIBLE_SUBROUTINES = 0x8E4B; + int GL_UNIFORM_SIZE = GL31.GL_UNIFORM_SIZE; + int GL_UNIFORM_NAME_LENGTH = GL31.GL_UNIFORM_NAME_LENGTH; + + int glGetSubroutineUniformLocation(@GLuint int program, @GLenum int shadertype, @Const @NullTerminated ByteBuffer name); + + @Alternate("glGetSubroutineUniformLocation") + int glGetSubroutineUniformLocation(@GLuint int program, @GLenum int shadertype, @NullTerminated CharSequence name); + + @GLuint + int glGetSubroutineIndex(@GLuint int program, @GLenum int shadertype, @Const @NullTerminated ByteBuffer name); + + @Alternate("glGetSubroutineIndex") + @GLuint + int glGetSubroutineIndex(@GLuint int program, @GLenum int shadertype, @NullTerminated CharSequence name); + + @StripPostfix("values") + void glGetActiveSubroutineUniformiv(@GLuint int program, @GLenum int shadertype, @GLuint int index, @GLenum int pname, + @OutParameter @Check("1") IntBuffer values); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetActiveSubroutineUniformi} instead. */ + @Alternate("glGetActiveSubroutineUniformiv") + @GLreturn("values") + @StripPostfix("values") + @Reuse(value = "GL40", method = "glGetActiveSubroutineUniformi") + @Deprecated + void glGetActiveSubroutineUniformiv2(@GLuint int program, @GLenum int shadertype, @GLuint int index, @GLenum int pname, + @OutParameter IntBuffer values); + + @Alternate("glGetActiveSubroutineUniformiv") + @GLreturn("values") + @StripPostfix(value = "values", postfix = "v") + void glGetActiveSubroutineUniformiv3(@GLuint int program, @GLenum int shadertype, @GLuint int index, @GLenum int pname, + @OutParameter IntBuffer values); + + void glGetActiveSubroutineUniformName(@GLuint int program, @GLenum int shadertype, @GLuint int index, @AutoSize("name") @GLsizei int bufsize, + @OutParameter @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length, + @OutParameter @GLchar ByteBuffer name); + + @Alternate("glGetActiveSubroutineUniformName") + @GLreturn(value = "name", maxLength = "bufsize") + void glGetActiveSubroutineUniformName2(@GLuint int program, @GLenum int shadertype, @GLuint int index, @GLsizei int bufsize, + @OutParameter @Constant("MemoryUtil.getAddress0(name_length)") @GLsizei IntBuffer length, + @OutParameter @GLchar ByteBuffer name); + + void glGetActiveSubroutineName(@GLuint int program, @GLenum int shadertype, @GLuint int index, @AutoSize("name") @GLsizei int bufsize, + @OutParameter @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length, + @OutParameter @GLchar ByteBuffer name); + + @Alternate("glGetActiveSubroutineName") + @GLreturn(value = "name", maxLength = "bufsize") + void glGetActiveSubroutineName2(@GLuint int program, @GLenum int shadertype, @GLuint int index, @GLsizei int bufsize, + @OutParameter @Constant("MemoryUtil.getAddress0(name_length)") @GLsizei IntBuffer length, + @OutParameter @GLchar ByteBuffer name); + + @StripPostfix("indices") + void glUniformSubroutinesuiv(@GLenum int shadertype, @AutoSize("indices") @GLsizei int count, @Const @GLuint IntBuffer indices); + + @StripPostfix("params") + void glGetUniformSubroutineuiv(@GLenum int shadertype, int location, @Check("1") @OutParameter @GLuint IntBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetUniformSubroutineui} instead. */ + @Alternate("glGetUniformSubroutineuiv") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "GL40", method = "glGetUniformSubroutineui") + @Deprecated + void glGetUniformSubroutineuiv2(@GLenum int shadertype, int location, @OutParameter @GLuint IntBuffer params); + + @Alternate("glGetUniformSubroutineuiv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetUniformSubroutineuiv3(@GLenum int shadertype, int location, @OutParameter @GLuint IntBuffer params); + + @StripPostfix("values") + void glGetProgramStageiv(@GLuint int program, @GLenum int shadertype, @GLenum int pname, @Check("1") @OutParameter IntBuffer values); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetProgramStagei} instead. */ + @Alternate("glGetProgramStageiv") + @GLreturn("values") + @StripPostfix("values") + @Reuse(value = "GL40", method = "glGetProgramStagei") + @Deprecated + void glGetProgramStageiv2(@GLuint int program, @GLenum int shadertype, @GLenum int pname, @OutParameter IntBuffer values); + + @Alternate("glGetProgramStageiv") + @GLreturn("values") + @StripPostfix(value = "values", postfix = "v") + void glGetProgramStageiv3(@GLuint int program, @GLenum int shadertype, @GLenum int pname, @OutParameter IntBuffer values); + + // ----------------------------------------------------------------------- + // ----------------------[ ARB_tessellation_shader ]---------------------- + // ----------------------------------------------------------------------- + + /** + * Accepted by the <mode> parameter of Begin and all vertex array functions + * that implicitly call Begin: + */ + int GL_PATCHES = 0xE; + + /** + * Accepted by the <pname> parameter of PatchParameteri, GetBooleanv, + * GetDoublev, GetFloatv, GetIntegerv, and GetInteger64v: + */ + int GL_PATCH_VERTICES = 0x8E72; + + /** + * Accepted by the <pname> parameter of PatchParameterfv, GetBooleanv, + * GetDoublev, GetFloatv, and GetIntegerv, and GetInteger64v: + */ + int GL_PATCH_DEFAULT_INNER_LEVEL = 0x8E73; + int GL_PATCH_DEFAULT_OUTER_LEVEL = 0x8E74; + + /** Accepted by the <pname> parameter of GetProgramiv: */ + int GL_TESS_CONTROL_OUTPUT_VERTICES = 0x8E75; + int GL_TESS_GEN_MODE = 0x8E76; + int GL_TESS_GEN_SPACING = 0x8E77; + int GL_TESS_GEN_VERTEX_ORDER = 0x8E78; + int GL_TESS_GEN_POINT_MODE = 0x8E79; + + /** Returned by GetProgramiv when <pname> is TESS_GEN_MODE: */ + int GL_ISOLINES = 0x8E7A; + + /** Returned by GetProgramiv when <pname> is TESS_GEN_SPACING: */ + int GL_FRACTIONAL_ODD = 0x8E7B; + int GL_FRACTIONAL_EVEN = 0x8E7C; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetFloatv, + * GetIntegerv, and GetInteger64v: + */ + int GL_MAX_PATCH_VERTICES = 0x8E7D; + int GL_MAX_TESS_GEN_LEVEL = 0x8E7E; + int GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E7F; + int GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E80; + int GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS = 0x8E81; + int GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS = 0x8E82; + int GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS = 0x8E83; + int GL_MAX_TESS_PATCH_COMPONENTS = 0x8E84; + int GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS = 0x8E85; + int GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS = 0x8E86; + int GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS = 0x8E89; + int GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS = 0x8E8A; + int GL_MAX_TESS_CONTROL_INPUT_COMPONENTS = 0x886C; + int GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS = 0x886D; + int GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS = 0x8E1E; + int GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS = 0x8E1F; + + /** Accepted by the <pname> parameter of GetActiveUniformBlockiv: */ + int GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER = 0x84F0; + int GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x84F1; + + /** + * Accepted by the <type> parameter of CreateShader and returned by the + * <params> parameter of GetShaderiv: + */ + int GL_TESS_EVALUATION_SHADER = 0x8E87; + int GL_TESS_CONTROL_SHADER = 0x8E88; + + void glPatchParameteri(@GLenum int pname, int value); + + @StripPostfix("values") + void glPatchParameterfv(@GLenum int pname, @Check("4") @Const FloatBuffer values); + + // -------------------------------------------------------------------------- + // ----------------------[ ARB_texture_cube_map_array ]---------------------- + // -------------------------------------------------------------------------- + + /** + * Accepted by the <target> parameter of TexParameteri, TexParameteriv, + * TexParameterf, TexParameterfv, BindTexture, and GenerateMipmap: + *

+ * Accepted by the <target> parameter of TexImage3D, TexSubImage3D, + * CompressedTeximage3D, CompressedTexSubImage3D and CopyTexSubImage3D: + *

+ * Accepted by the <tex> parameter of GetTexImage: + */ + int GL_TEXTURE_CUBE_MAP_ARRAY = 0x9009; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, + * GetIntegerv and GetFloatv: + */ + int GL_TEXTURE_BINDING_CUBE_MAP_ARRAY = 0x900A; + + /** + * Accepted by the <target> parameter of TexImage3D, TexSubImage3D, + * CompressedTeximage3D, CompressedTexSubImage3D and CopyTexSubImage3D: + */ + int GL_PROXY_TEXTURE_CUBE_MAP_ARRAY = 0x900B; + + /** Returned by the <type> parameter of GetActiveUniform: */ + int GL_SAMPLER_CUBE_MAP_ARRAY = 0x900C; + int GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW = 0x900D; + int GL_INT_SAMPLER_CUBE_MAP_ARRAY = 0x900E; + int GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY = 0x900F; + + // ------------------------------------------------------------------ + // ----------------------[ ARB_texture_gather ]---------------------- + // ------------------------------------------------------------------ + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = 0x8E5E; + int GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB = 0x8E5F; + int GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB = 0x8F9F; + + // ----------------------------------------------------------------------- + // ----------------------[ ARB_transform_feedback2 ]---------------------- + // ----------------------------------------------------------------------- + + /** Accepted by the <target> parameter of BindTransformFeedback: */ + int GL_TRANSFORM_FEEDBACK = 0x8E22; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv, + * and GetFloatv: + */ + int GL_TRANSFORM_FEEDBACK_PAUSED = 0x8E23; + int GL_TRANSFORM_FEEDBACK_ACTIVE = 0x8E24; + int GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED = GL_TRANSFORM_FEEDBACK_PAUSED; + int GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE = GL_TRANSFORM_FEEDBACK_ACTIVE; + int GL_TRANSFORM_FEEDBACK_BINDING = 0x8E25; + + void glBindTransformFeedback(@GLenum int target, @GLuint int id); + + void glDeleteTransformFeedbacks(@AutoSize("ids") @GLsizei int n, @Const @GLuint IntBuffer ids); + + @Alternate("glDeleteTransformFeedbacks") + void glDeleteTransformFeedbacks(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(caps, id)", keepParam = true) int id); + + void glGenTransformFeedbacks(@AutoSize("ids") @GLsizei int n, @OutParameter @GLuint IntBuffer ids); + + @Alternate("glGenTransformFeedbacks") + @GLreturn("ids") + void glGenTransformFeedbacks2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer ids); + + boolean glIsTransformFeedback(@GLuint int id); + + void glPauseTransformFeedback(); + + void glResumeTransformFeedback(); + + void glDrawTransformFeedback(@GLenum int mode, @GLuint int id); + + // ----------------------------------------------------------------------- + // ----------------------[ ARB_transform_feedback3 ]---------------------- + // ----------------------------------------------------------------------- + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv, + * and GetFloatv: + */ + int GL_MAX_TRANSFORM_FEEDBACK_BUFFERS = 0x8E70; + + void glDrawTransformFeedbackStream(@GLenum int mode, @GLuint int id, @GLuint int stream); + + void glBeginQueryIndexed(@GLenum int target, @GLuint int index, @GLuint int id); + + void glEndQueryIndexed(@GLenum int target, @GLuint int index); + + @StripPostfix("params") + void glGetQueryIndexediv(@GLenum int target, @GLuint int index, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetQueryIndexedi} instead. */ + @Alternate("glGetQueryIndexediv") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "GL40", method = "glGetQueryIndexedi") + @Deprecated + void glGetQueryIndexediv2(@GLenum int target, @GLuint int index, @GLenum int pname, @OutParameter IntBuffer params); + + @Alternate("glGetQueryIndexediv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetQueryIndexediv3(@GLenum int target, @GLuint int index, @GLenum int pname, @OutParameter IntBuffer params); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL41.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL41.java new file mode 100644 index 0000000..5543ca3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL41.java @@ -0,0 +1,473 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.*; + +public interface GL41 { + + // --------------------------------------------------------------------- + // ----------------------[ ARB_ES2_compatibility ]---------------------- + // --------------------------------------------------------------------- + + /** + * Accepted by the <value> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + int GL_SHADER_COMPILER = 0x8DFA, + GL_NUM_SHADER_BINARY_FORMATS = 0x8DF9, + GL_MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB, + GL_MAX_VARYING_VECTORS = 0x8DFC, + GL_MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD, + GL_IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A, + GL_IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B; + + /** Accepted by the <type> parameter of VertexAttribPointer: */ + int GL_FIXED = 0x140C; + + /** + * Accepted by the <precisiontype> parameter of + * GetShaderPrecisionFormat: + */ + int GL_LOW_FLOAT = 0x8DF0, + GL_MEDIUM_FLOAT = 0x8DF1, + GL_HIGH_FLOAT = 0x8DF2, + GL_LOW_INT = 0x8DF3, + GL_MEDIUM_INT = 0x8DF4, + GL_HIGH_INT = 0x8DF5; + + /** Accepted by the <format> parameter of most commands taking sized internal formats: */ + int GL_RGB565 = 0x8D62; + + void glReleaseShaderCompiler(); + + void glShaderBinary(@AutoSize("shaders") @GLsizei int count, @Const @GLuint IntBuffer shaders, + @GLenum int binaryformat, @Const @GLvoid ByteBuffer binary, @AutoSize("binary") @GLsizei int length); + + void glGetShaderPrecisionFormat(@GLenum int shadertype, @GLenum int precisiontype, + @OutParameter @Check("2") IntBuffer range, + @OutParameter @Check("1") IntBuffer precision); + + void glDepthRangef(float n, float f); + + void glClearDepthf(float d); + + // ---------------------------------------------------------------------- + // ----------------------[ ARB_get_program_binary ]---------------------- + // ---------------------------------------------------------------------- + + /** + * Accepted by the <pname> parameter of ProgramParameteri and + * GetProgramiv: + */ + int GL_PROGRAM_BINARY_RETRIEVABLE_HINT = 0x8257; + + /** Accepted by the <pname> parameter of GetProgramiv: */ + int GL_PROGRAM_BINARY_LENGTH = 0x8741; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv and GetDoublev: + */ + int GL_NUM_PROGRAM_BINARY_FORMATS = 0x87FE, + GL_PROGRAM_BINARY_FORMATS = 0x87FF; + + void glGetProgramBinary(@GLuint int program, @AutoSize("binary") @GLsizei int bufSize, + @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length, + @Check("1") @GLenum IntBuffer binaryFormat, + @OutParameter @GLvoid ByteBuffer binary); + + void glProgramBinary(@GLuint int program, @GLenum int binaryFormat, @Const @GLvoid ByteBuffer binary, @AutoSize("binary") @GLsizei int length); + + void glProgramParameteri(@GLuint int program, @GLenum int pname, int value); + + // --------------------------------------------------------------------------- + // ----------------------[ ARB_separate_shader_objects ]---------------------- + // --------------------------------------------------------------------------- + + /** Accepted by <stages> parameter to UseProgramStages: */ + int GL_VERTEX_SHADER_BIT = 0x00000001, + GL_FRAGMENT_SHADER_BIT = 0x00000002, + GL_GEOMETRY_SHADER_BIT = 0x00000004, + GL_TESS_CONTROL_SHADER_BIT = 0x00000008, + GL_TESS_EVALUATION_SHADER_BIT = 0x00000010, + GL_ALL_SHADER_BITS = 0xFFFFFFFF; + + /** + * Accepted by the <pname> parameter of ProgramParameteri and + * GetProgramiv: + */ + int GL_PROGRAM_SEPARABLE = 0x8258; + + /** Accepted by <type> parameter to GetProgramPipelineiv: */ + int GL_ACTIVE_PROGRAM = 0x8259; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + int GL_PROGRAM_PIPELINE_BINDING = 0x825A; + + void glUseProgramStages(@GLuint int pipeline, @GLbitfield int stages, @GLuint int program); + + void glActiveShaderProgram(@GLuint int pipeline, @GLuint int program); + + /** Single null-terminated source code string. */ + @StripPostfix(value = "string", postfix = "v") + @GLuint + int glCreateShaderProgramv(@GLenum int type, @Constant("1") @GLsizei int count, @NullTerminated @Check @Const @Indirect @GLchar ByteBuffer string); + + /** Multiple null-terminated source code strings, one after the other. */ + @Alternate(value = "glCreateShaderProgramv", nativeAlt = true) + @StripPostfix(value = "strings", postfix = "v") + @GLuint + int glCreateShaderProgramv2(@GLenum int type, @GLsizei int count, @NullTerminated("count") @Check @Const @Indirect @GLchar @PointerArray("count") ByteBuffer strings); + + @Alternate(value = "glCreateShaderProgramv", nativeAlt = true) + @StripPostfix(value = "strings", postfix = "v") + @GLuint + int glCreateShaderProgramv3(@GLenum int type, @Constant("strings.length") @GLsizei int count, @NullTerminated @Check("1") @PointerArray(value = "count") @Const @NativeType("GLchar") ByteBuffer[] strings); + + @Alternate("glCreateShaderProgramv") + @StripPostfix(value = "string", postfix = "v") + @GLuint + int glCreateShaderProgramv(@GLenum int type, @Constant("1") @GLsizei int count, @NullTerminated CharSequence string); + + @Alternate(value = "glCreateShaderProgramv", nativeAlt = true, skipNative = true) + @StripPostfix(value = "strings", postfix = "v") + @GLuint + int glCreateShaderProgramv2(@GLenum int type, @Constant("strings.length") @GLsizei int count, + @Const @NullTerminated @PointerArray(value = "count") CharSequence[] strings); + + void glBindProgramPipeline(@GLuint int pipeline); + + void glDeleteProgramPipelines(@AutoSize("pipelines") @GLsizei int n, @Const @GLuint IntBuffer pipelines); + + @Alternate("glDeleteProgramPipelines") + void glDeleteProgramPipelines(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(caps, pipeline)", keepParam = true) int pipeline); + + void glGenProgramPipelines(@AutoSize("pipelines") @GLsizei int n, @OutParameter @GLuint IntBuffer pipelines); + + @Alternate("glGenProgramPipelines") + @GLreturn("pipelines") + void glGenProgramPipelines2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer pipelines); + + boolean glIsProgramPipeline(@GLuint int pipeline); + + @StripPostfix("params") + void glGetProgramPipelineiv(@GLuint int pipeline, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + @Alternate("glGetProgramPipelineiv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetProgramPipelineiv2(@GLuint int pipeline, @GLenum int pname, @OutParameter IntBuffer params); + + void glProgramUniform1i(@GLuint int program, int location, int v0); + + void glProgramUniform2i(@GLuint int program, int location, int v0, int v1); + + void glProgramUniform3i(@GLuint int program, int location, int v0, int v1, int v2); + + void glProgramUniform4i(@GLuint int program, int location, int v0, int v1, int v2, int v3); + + void glProgramUniform1f(@GLuint int program, int location, float v0); + + void glProgramUniform2f(@GLuint int program, int location, float v0, float v1); + + void glProgramUniform3f(@GLuint int program, int location, float v0, float v1, float v2); + + void glProgramUniform4f(@GLuint int program, int location, float v0, float v1, float v2, float v3); + + void glProgramUniform1d(@GLuint int program, int location, double v0); + + void glProgramUniform2d(@GLuint int program, int location, double v0, double v1); + + void glProgramUniform3d(@GLuint int program, int location, double v0, double v1, double v2); + + void glProgramUniform4d(@GLuint int program, int location, double v0, double v1, double v2, double v3); + + @StripPostfix("value") + void glProgramUniform1iv(@GLuint int program, int location, @AutoSize("value") @GLsizei int count, @Const IntBuffer value); + + @StripPostfix("value") + void glProgramUniform2iv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const IntBuffer value); + + @StripPostfix("value") + void glProgramUniform3iv(@GLuint int program, int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const IntBuffer value); + + @StripPostfix("value") + void glProgramUniform4iv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const IntBuffer value); + + @StripPostfix("value") + void glProgramUniform1fv(@GLuint int program, int location, @AutoSize("value") @GLsizei int count, @Const FloatBuffer value); + + @StripPostfix("value") + void glProgramUniform2fv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const FloatBuffer value); + + @StripPostfix("value") + void glProgramUniform3fv(@GLuint int program, int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const FloatBuffer value); + + @StripPostfix("value") + void glProgramUniform4fv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const FloatBuffer value); + + @StripPostfix("value") + void glProgramUniform1dv(@GLuint int program, int location, @AutoSize("value") @GLsizei int count, @Const DoubleBuffer value); + + @StripPostfix("value") + void glProgramUniform2dv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const DoubleBuffer value); + + @StripPostfix("value") + void glProgramUniform3dv(@GLuint int program, int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const DoubleBuffer value); + + @StripPostfix("value") + void glProgramUniform4dv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const DoubleBuffer value); + + void glProgramUniform1ui(@GLuint int program, int location, int v0); + + void glProgramUniform2ui(@GLuint int program, int location, int v0, int v1); + + void glProgramUniform3ui(@GLuint int program, int location, int v0, int v1, int v2); + + void glProgramUniform4ui(@GLuint int program, int location, int v0, int v1, int v2, int v3); + + @StripPostfix("value") + void glProgramUniform1uiv(@GLuint int program, int location, @AutoSize("value") @GLsizei int count, @Const IntBuffer value); + + @StripPostfix("value") + void glProgramUniform2uiv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const IntBuffer value); + + @StripPostfix("value") + void glProgramUniform3uiv(@GLuint int program, int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const IntBuffer value); + + @StripPostfix("value") + void glProgramUniform4uiv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const IntBuffer value); + + @StripPostfix("value") + void glProgramUniformMatrix2fv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + @StripPostfix("value") + void glProgramUniformMatrix3fv(@GLuint int program, int location, @AutoSize(value = "value", expression = " / (3 * 3)") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + @StripPostfix("value") + void glProgramUniformMatrix4fv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 4") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + @StripPostfix("value") + void glProgramUniformMatrix2dv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @StripPostfix("value") + void glProgramUniformMatrix3dv(@GLuint int program, int location, @AutoSize(value = "value", expression = " / (3 * 3)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @StripPostfix("value") + void glProgramUniformMatrix4dv(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 4") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @StripPostfix("value") + void glProgramUniformMatrix2x3fv(@GLuint int program, int location, + @AutoSize(value = "value", expression = " / (2 * 3)") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + @StripPostfix("value") + void glProgramUniformMatrix3x2fv(@GLuint int program, int location, + @AutoSize(value = "value", expression = " / (3 * 2)") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + @StripPostfix("value") + void glProgramUniformMatrix2x4fv(@GLuint int program, int location, + @AutoSize(value = "value", expression = " >> 3") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + @StripPostfix("value") + void glProgramUniformMatrix4x2fv(@GLuint int program, int location, + @AutoSize(value = "value", expression = " >> 3") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + @StripPostfix("value") + void glProgramUniformMatrix3x4fv(@GLuint int program, int location, + @AutoSize(value = "value", expression = " / (3 * 4)") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + @StripPostfix("value") + void glProgramUniformMatrix4x3fv(@GLuint int program, int location, + @AutoSize(value = "value", expression = " / (4 * 3)") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + @StripPostfix("value") + void glProgramUniformMatrix2x3dv(@GLuint int program, int location, + @AutoSize(value = "value", expression = " / (2 * 3)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @StripPostfix("value") + void glProgramUniformMatrix3x2dv(@GLuint int program, int location, + @AutoSize(value = "value", expression = " / (3 * 2)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @StripPostfix("value") + void glProgramUniformMatrix2x4dv(@GLuint int program, int location, + @AutoSize(value = "value", expression = " >> 3") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @StripPostfix("value") + void glProgramUniformMatrix4x2dv(@GLuint int program, int location, + @AutoSize(value = "value", expression = " >> 3") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @StripPostfix("value") + void glProgramUniformMatrix3x4dv(@GLuint int program, int location, + @AutoSize(value = "value", expression = " / (3 * 4)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + @StripPostfix("value") + void glProgramUniformMatrix4x3dv(@GLuint int program, int location, + @AutoSize(value = "value", expression = " / (4 * 3)") @GLsizei int count, boolean transpose, @Const DoubleBuffer value); + + void glValidateProgramPipeline(@GLuint int pipeline); + + void glGetProgramPipelineInfoLog(@GLuint int pipeline, @AutoSize("infoLog") @GLsizei int bufSize, + @OutParameter @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length, + @OutParameter @GLchar ByteBuffer infoLog); + + @Alternate("glGetProgramPipelineInfoLog") + @GLreturn(value = "infoLog", maxLength = "bufSize") + void glGetProgramPipelineInfoLog2(@GLuint int pipeline, @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(infoLog_length)") IntBuffer length, + @OutParameter @GLchar ByteBuffer infoLog); + + // ----------------------------------------------------------------------- + // ----------------------[ ARB_vertex_attrib_64bit ]---------------------- + // ----------------------------------------------------------------------- + + /** Returned in the <type> parameter of GetActiveAttrib: */ + int GL_DOUBLE_VEC2 = 0x8FFC; + int GL_DOUBLE_VEC3 = 0x8FFD; + int GL_DOUBLE_VEC4 = 0x8FFE; + int GL_DOUBLE_MAT2 = 0x8F46; + int GL_DOUBLE_MAT3 = 0x8F47; + int GL_DOUBLE_MAT4 = 0x8F48; + int GL_DOUBLE_MAT2x3 = 0x8F49; + int GL_DOUBLE_MAT2x4 = 0x8F4A; + int GL_DOUBLE_MAT3x2 = 0x8F4B; + int GL_DOUBLE_MAT3x4 = 0x8F4C; + int GL_DOUBLE_MAT4x2 = 0x8F4D; + int GL_DOUBLE_MAT4x3 = 0x8F4E; + + void glVertexAttribL1d(@GLuint int index, double x); + + void glVertexAttribL2d(@GLuint int index, double x, double y); + + void glVertexAttribL3d(@GLuint int index, double x, double y, double z); + + void glVertexAttribL4d(@GLuint int index, double x, double y, double z, double w); + + @StripPostfix("v") + void glVertexAttribL1dv(@GLuint int index, @Const @Check("1") DoubleBuffer v); + + @StripPostfix("v") + void glVertexAttribL2dv(@GLuint int index, @Const @Check("2") DoubleBuffer v); + + @StripPostfix("v") + void glVertexAttribL3dv(@GLuint int index, @Const @Check("3") DoubleBuffer v); + + @StripPostfix("v") + void glVertexAttribL4dv(@GLuint int index, @Const @Check("4") DoubleBuffer v); + + void glVertexAttribLPointer(@GLuint int index, int size, @Constant("GL11.GL_DOUBLE") @GLenum int type, @GLsizei int stride, + @CachedReference(index = "index", name = "glVertexAttribPointer_buffer") + @BufferObject(BufferKind.ArrayVBO) + @Check @Const @GLdouble Buffer pointer); + + @StripPostfix("params") + void glGetVertexAttribLdv(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") DoubleBuffer params); + + // ------------------------------------------------------------------ + // ----------------------[ ARB_viewport_array ]---------------------- + // ------------------------------------------------------------------ + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * GetDoublev and GetInteger64v: + */ + int GL_MAX_VIEWPORTS = 0x825B, + GL_VIEWPORT_SUBPIXEL_BITS = 0x825C, + GL_VIEWPORT_BOUNDS_RANGE = 0x825D, + GL_LAYER_PROVOKING_VERTEX = 0x825E, + GL_VIEWPORT_INDEX_PROVOKING_VERTEX = 0x825F; + + /** Accepted by the <pname> parameter of GetIntegeri_v: */ + int GL_SCISSOR_BOX = 0x0C10; + + /** Accepted by the <pname> parameter of GetFloati_v: */ + int GL_VIEWPORT = 0x0BA2; + + /** Accepted by the <pname> parameter of GetDoublei_v: */ + int GL_DEPTH_RANGE = 0x0B70; + + /** Accepted by the <pname> parameter of Enablei, Disablei, and IsEnabledi: */ + int GL_SCISSOR_TEST = 0x0C11; + + /** + * Returned in the <data> parameter from a Get query with a <pname> of + * LAYER_PROVOKING_VERTEX or VIEWPORT_INDEX_PROVOKING_VERTEX: + */ + int GL_FIRST_VERTEX_CONVENTION = 0x8E4D, + GL_LAST_VERTEX_CONVENTION = 0x8E4E, + GL_PROVOKING_VERTEX = 0x8E4F, + GL_UNDEFINED_VERTEX = 0x8260; + + @StripPostfix("v") + void glViewportArrayv(@GLuint int first, @AutoSize(value = "v", expression = " >> 2") @GLsizei int count, @Const FloatBuffer v); + + void glViewportIndexedf(@GLuint int index, float x, float y, float w, float h); + + @StripPostfix("v") + void glViewportIndexedfv(@GLuint int index, @Check("4") @Const FloatBuffer v); + + @StripPostfix("v") + void glScissorArrayv(@GLuint int first, @AutoSize(value = "v", expression = " >> 2") @GLsizei int count, @Const IntBuffer v); + + void glScissorIndexed(@GLuint int index, int left, int bottom, @GLsizei int width, @GLsizei int height); + + @StripPostfix("v") + void glScissorIndexedv(@GLuint int index, @Check("4") @Const IntBuffer v); + + @StripPostfix("v") + void glDepthRangeArrayv(@GLuint int first, @AutoSize(value = "v", expression = " >> 1") @GLsizei int count, @Const DoubleBuffer v); + + void glDepthRangeIndexed(@GLuint int index, double n, double f); + + @StripPostfix("data") + void glGetFloati_v(@GLenum int target, @GLuint int index, @Check @OutParameter FloatBuffer data); + + @Alternate("glGetFloati_v") + @GLreturn("data") + @StripPostfix("data") + void glGetFloati_v2(@GLenum int target, @GLuint int index, @OutParameter FloatBuffer data); + + @StripPostfix("data") + void glGetDoublei_v(@GLenum int target, @GLuint int index, @Check @OutParameter DoubleBuffer data); + + @Alternate("glGetDoublei_v") + @GLreturn("data") + @StripPostfix("data") + void glGetDoublei_v2(@GLenum int target, @GLuint int index, @OutParameter DoubleBuffer data); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL42.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL42.java new file mode 100644 index 0000000..92c13cc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL42.java @@ -0,0 +1,322 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.Buffer; +import java.nio.IntBuffer; + +public interface GL42 { + + // ---------------------------------------------------------------------------- + // ----------------------[ ARB_texture_compression_bptc ]---------------------- + // ---------------------------------------------------------------------------- + + /** + * Accepted by the <internalformat> parameter of TexImage2D, TexImage3D, + * CopyTexImage2D, CopyTexImage3D, CompressedTexImage2DARB, and + * CompressedTexImage3DARB and the <format> parameter of + * CompressedTexSubImage2DARB and CompressedTexSubImage3DARB: + */ + int GL_COMPRESSED_RGBA_BPTC_UNORM = 0x8E8C; + int GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM = 0x8E8D; + int GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT = 0x8E8E; + int GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT = 0x8E8F; + + // ------------------------------------------------------------------------------------ + // ----------------------[ ARB_compressed_texture_pixel_storage ]---------------------- + // ------------------------------------------------------------------------------------ + + /** + * Accepted by the <pname> parameter of PixelStore[fi], GetBooleanv, + * GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev: + */ + int GL_UNPACK_COMPRESSED_BLOCK_WIDTH = 0x9127, + GL_UNPACK_COMPRESSED_BLOCK_HEIGHT = 0x9128, + GL_UNPACK_COMPRESSED_BLOCK_DEPTH = 0x9129, + GL_UNPACK_COMPRESSED_BLOCK_SIZE = 0x912A, + GL_PACK_COMPRESSED_BLOCK_WIDTH = 0x912B, + GL_PACK_COMPRESSED_BLOCK_HEIGHT = 0x912C, + GL_PACK_COMPRESSED_BLOCK_DEPTH = 0x912D, + GL_PACK_COMPRESSED_BLOCK_SIZE = 0x912E; + + // -------------------------------------------------------------------------- + // ----------------------[ ARB_shader_atomic_counters ]---------------------- + // -------------------------------------------------------------------------- + + /** Accepted by the <target> parameter of BindBufferBase and BindBufferRange: */ + int GL_ATOMIC_COUNTER_BUFFER = 0x92C0; + + /** + * Accepted by the <pname> parameter of GetBooleani_v, GetIntegeri_v, + * GetFloati_v, GetDoublei_v, GetInteger64i_v, GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, GetDoublev, and GetActiveAtomicCounterBufferiv: + */ + int GL_ATOMIC_COUNTER_BUFFER_BINDING = 0x92C1; + + /** Accepted by the <pname> parameter of GetIntegeri_64v: */ + int GL_ATOMIC_COUNTER_BUFFER_START = 0x92C2, + GL_ATOMIC_COUNTER_BUFFER_SIZE = 0x92C3; + + /** Accepted by the <pname> parameter of GetActiveAtomicCounterBufferiv: */ + int GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE = 0x92C4, + GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS = 0x92C5, + GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES = 0x92C6, + GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER = 0x92C7, + GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER = 0x92C8, + GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x92C9, + GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER = 0x92CA, + GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER = 0x92CB; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + int GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS = 0x92CC, + GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS = 0x92CD, + GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS = 0x92CE, + GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS = 0x92CF, + GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS = 0x92D0, + GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS = 0x92D1, + GL_MAX_VERTEX_ATOMIC_COUNTERS = 0x92D2, + GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS = 0x92D3, + GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS = 0x92D4, + GL_MAX_GEOMETRY_ATOMIC_COUNTERS = 0x92D5, + GL_MAX_FRAGMENT_ATOMIC_COUNTERS = 0x92D6, + GL_MAX_COMBINED_ATOMIC_COUNTERS = 0x92D7, + GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE = 0x92D8, + GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS = 0x92DC; + + /** Accepted by the <pname> parameter of GetProgramiv: */ + int GL_ACTIVE_ATOMIC_COUNTER_BUFFERS = 0x92D9; + + /** Accepted by the <pname> parameter of GetActiveUniformsiv: */ + int GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX = 0x92DA; + + /** Returned in <params> by GetActiveUniform and GetActiveUniformsiv: */ + int GL_UNSIGNED_INT_ATOMIC_COUNTER = 0x92DB; + + @Optional(reason = "AMD's beta 4.2 driver (11.8) does not expose this") + @StripPostfix("params") + void glGetActiveAtomicCounterBufferiv(@GLuint int program, @GLuint int bufferIndex, @GLenum int pname, @Check("1") @OutParameter IntBuffer params); + + @Alternate("glGetActiveAtomicCounterBufferiv") + @StripPostfix("params") + @GLreturn("params") + void glGetActiveAtomicCounterBufferiv2(@GLuint int program, @GLuint int bufferIndex, @GLenum int pname, @OutParameter IntBuffer params); + + // ------------------------------------------------------------------- + // ----------------------[ ARB_texture_storage ]---------------------- + // ------------------------------------------------------------------- + + /** Accepted by the <value> parameter of GetTexParameter{if}v: */ + int GL_TEXTURE_IMMUTABLE_FORMAT = 0x912F; + + void glTexStorage1D(@GLenum int target, @GLsizei int levels, + @GLenum int internalformat, + @GLsizei int width); + + void glTexStorage2D(@GLenum int target, @GLsizei int levels, + @GLenum int internalformat, + @GLsizei int width, @GLsizei int height); + + void glTexStorage3D(@GLenum int target, @GLsizei int levels, + @GLenum int internalformat, + @GLsizei int width, @GLsizei int height, @GLsizei int depth); + + // -------------------------------------------------------------------------------- + // ----------------------[ ARB_transform_feedback_instanced ]---------------------- + // -------------------------------------------------------------------------------- + + void glDrawTransformFeedbackInstanced(@GLenum int mode, @GLuint int id, @GLsizei int primcount); + + void glDrawTransformFeedbackStreamInstanced(@GLenum int mode, @GLuint int id, @GLuint int stream, @GLsizei int primcount); + + // ----------------------------------------------------------------- + // ----------------------[ ARB_base_instance ]---------------------- + // ----------------------------------------------------------------- + + void glDrawArraysInstancedBaseInstance(@GLenum int mode, + int first, + @GLsizei int count, + @GLsizei int primcount, + @GLuint int baseinstance); + + void glDrawElementsInstancedBaseInstance(@GLenum int mode, + @AutoSize("indices") @GLsizei int count, + @AutoType("indices") @GLenum int type, + @Const + @BufferObject(BufferKind.ElementVBO) + @GLubyte + @GLushort + @GLuint Buffer indices, + @GLsizei int primcount, + @GLuint int baseinstance); + + void glDrawElementsInstancedBaseVertexBaseInstance(@GLenum int mode, + @AutoSize("indices") @GLsizei int count, + @AutoType("indices") @GLenum int type, + @Const + @BufferObject(BufferKind.ElementVBO) + @GLubyte + @GLushort + @GLuint Buffer indices, + @GLsizei int primcount, + int basevertex, + @GLuint int baseinstance); + + // --------------------------------------------------------------------------- + // ----------------------[ ARB_shader_image_load_store ]---------------------- + // --------------------------------------------------------------------------- + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, GetDoublev, and GetInteger64v: + */ + int GL_MAX_IMAGE_UNITS = 0x8F38, + GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS = 0x8F39, + GL_MAX_IMAGE_SAMPLES = 0x906D, + GL_MAX_VERTEX_IMAGE_UNIFORMS = 0x90CA, + GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS = 0x90CB, + GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS = 0x90CC, + GL_MAX_GEOMETRY_IMAGE_UNIFORMS = 0x90CD, + GL_MAX_FRAGMENT_IMAGE_UNIFORMS = 0x90CE, + GL_MAX_COMBINED_IMAGE_UNIFORMS = 0x90CF; + + /** Accepted by the <target> parameter of GetIntegeri_v and GetBooleani_v: */ + int GL_IMAGE_BINDING_NAME = 0x8F3A, + GL_IMAGE_BINDING_LEVEL = 0x8F3B, + GL_IMAGE_BINDING_LAYERED = 0x8F3C, + GL_IMAGE_BINDING_LAYER = 0x8F3D, + GL_IMAGE_BINDING_ACCESS = 0x8F3E, + GL_IMAGE_BINDING_FORMAT = 0x906E; + + /** Accepted by the <barriers> parameter of MemoryBarrier: */ + int GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT = 0x00000001, + GL_ELEMENT_ARRAY_BARRIER_BIT = 0x00000002, + GL_UNIFORM_BARRIER_BIT = 0x00000004, + GL_TEXTURE_FETCH_BARRIER_BIT = 0x00000008, + GL_SHADER_IMAGE_ACCESS_BARRIER_BIT = 0x00000020, + GL_COMMAND_BARRIER_BIT = 0x00000040, + GL_PIXEL_BUFFER_BARRIER_BIT = 0x00000080, + GL_TEXTURE_UPDATE_BARRIER_BIT = 0x00000100, + GL_BUFFER_UPDATE_BARRIER_BIT = 0x00000200, + GL_FRAMEBUFFER_BARRIER_BIT = 0x00000400, + GL_TRANSFORM_FEEDBACK_BARRIER_BIT = 0x00000800, + GL_ATOMIC_COUNTER_BARRIER_BIT = 0x00001000, + GL_ALL_BARRIER_BITS = 0xFFFFFFFF; + + /** Returned by the <type> parameter of GetActiveUniform: */ + int GL_IMAGE_1D = 0x904C, + GL_IMAGE_2D = 0x904D, + GL_IMAGE_3D = 0x904E, + GL_IMAGE_2D_RECT = 0x904F, + GL_IMAGE_CUBE = 0x9050, + GL_IMAGE_BUFFER = 0x9051, + GL_IMAGE_1D_ARRAY = 0x9052, + GL_IMAGE_2D_ARRAY = 0x9053, + GL_IMAGE_CUBE_MAP_ARRAY = 0x9054, + GL_IMAGE_2D_MULTISAMPLE = 0x9055, + GL_IMAGE_2D_MULTISAMPLE_ARRAY = 0x9056, + GL_INT_IMAGE_1D = 0x9057, + GL_INT_IMAGE_2D = 0x9058, + GL_INT_IMAGE_3D = 0x9059, + GL_INT_IMAGE_2D_RECT = 0x905A, + GL_INT_IMAGE_CUBE = 0x905B, + GL_INT_IMAGE_BUFFER = 0x905C, + GL_INT_IMAGE_1D_ARRAY = 0x905D, + GL_INT_IMAGE_2D_ARRAY = 0x905E, + GL_INT_IMAGE_CUBE_MAP_ARRAY = 0x905F, + GL_INT_IMAGE_2D_MULTISAMPLE = 0x9060, + GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY = 0x9061, + GL_UNSIGNED_INT_IMAGE_1D = 0x9062, + GL_UNSIGNED_INT_IMAGE_2D = 0x9063, + GL_UNSIGNED_INT_IMAGE_3D = 0x9064, + GL_UNSIGNED_INT_IMAGE_2D_RECT = 0x9065, + GL_UNSIGNED_INT_IMAGE_CUBE = 0x9066, + GL_UNSIGNED_INT_IMAGE_BUFFER = 0x9067, + GL_UNSIGNED_INT_IMAGE_1D_ARRAY = 0x9068, + GL_UNSIGNED_INT_IMAGE_2D_ARRAY = 0x9069, + GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY = 0x906A, + GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE = 0x906B, + GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY = 0x906C; + + /** + * Accepted by the <value> parameter of GetTexParameteriv, GetTexParameterfv, + * GetTexParameterIiv, and GetTexParameterIuiv: + */ + int GL_IMAGE_FORMAT_COMPATIBILITY_TYPE = 0x90C7; + + /** + * Returned in the <data> parameter of GetTexParameteriv, GetTexParameterfv, + * GetTexParameterIiv, and GetTexParameterIuiv when <value> is + * IMAGE_FORMAT_COMPATIBILITY_TYPE: + */ + int GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE = 0x90C8, + IMAGE_FORMAT_COMPATIBILITY_BY_CLASS = 0x90C9; + + void glBindImageTexture(@GLuint int unit, @GLuint int texture, int level, + boolean layered, int layer, @GLenum int access, + @GLenum int format); + + void glMemoryBarrier(@GLbitfield int barriers); + + // ------------------------------------------------------------------------- + // ----------------------[ ARB_internal_format_query ]---------------------- + // ------------------------------------------------------------------------- + + /** Accepted by the <pname> parameter of GetInternalformativ: */ + int GL_NUM_SAMPLE_COUNTS = 0x9380; + + @StripPostfix("params") + void glGetInternalformativ(@GLenum int target, @GLenum int internalformat, + @GLenum int pname, @AutoSize("params") @GLsizei int bufSize, @OutParameter IntBuffer params); + + @Alternate("glGetInternalformativ") + @StripPostfix("params") + @GLreturn("params") + void glGetInternalformativ2(@GLenum int target, @GLenum int internalformat, + @GLenum int pname, @Constant("1") @GLsizei int bufSize, @OutParameter IntBuffer params); + + // ------------------------------------------------------------------------ + // ----------------------[ ARB_map_buffer_alignment ]---------------------- + // ------------------------------------------------------------------------ + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + int GL_MIN_MAP_BUFFER_ALIGNMENT = 0x90BC; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL43.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL43.java new file mode 100644 index 0000000..3be03a0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL43.java @@ -0,0 +1,858 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; +import java.nio.LongBuffer; + +import com.sun.mirror.type.PrimitiveType; + +public interface GL43 { + + /** No. of supported Shading Language Versions. Accepted by the <pname> parameter of GetIntegerv. */ + int GL_NUM_SHADING_LANGUAGE_VERSIONS = 0x82E9; + + /** Vertex attrib array has unconverted doubles. Accepted by the <pname> parameter of GetVertexAttribiv. */ + int GL_VERTEX_ATTRIB_ARRAY_LONG = 0x874E; + + // --------------------------------------------------------------------- + // ----------------------[ ARB_ES3_compatibility ]---------------------- + // --------------------------------------------------------------------- + + /** Accepted by the <internalformat> parameter of CompressedTexImage2D */ + int GL_COMPRESSED_RGB8_ETC2 = 0x9274, + GL_COMPRESSED_SRGB8_ETC2 = 0x9275, + GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9276, + GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277, + GL_COMPRESSED_RGBA8_ETC2_EAC = 0x9278, + GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 0x9279, + GL_COMPRESSED_R11_EAC = 0x9270, + GL_COMPRESSED_SIGNED_R11_EAC = 0x9271, + GL_COMPRESSED_RG11_EAC = 0x9272, + GL_COMPRESSED_SIGNED_RG11_EAC = 0x9273; + + /** Accepted by the <target> parameter of Enable and Disable: */ + int GL_PRIMITIVE_RESTART_FIXED_INDEX = 0x8D69; + + /** + * Accepted by the <target> parameter of BeginQuery, EndQuery, + * GetQueryIndexediv and GetQueryiv: + */ + int GL_ANY_SAMPLES_PASSED_CONSERVATIVE = 0x8D6A; + + /** Accepted by the <value> parameter of the GetInteger* functions: */ + int GL_MAX_ELEMENT_INDEX = 0x8D6B; + + // ----------------------------------------------------------------------- + // ----------------------[ ARB_clear_buffer_object ]---------------------- + // ----------------------------------------------------------------------- + + void glClearBufferData(@GLenum int target, + @GLenum int internalformat, + @GLenum int format, + @GLenum int type, + @Check("1") @Const @GLvoid ByteBuffer data); + + void glClearBufferSubData(@GLenum int target, + @GLenum int internalformat, + @GLintptr long offset, + @AutoSize("data") @GLsizeiptr long size, + @GLenum int format, + @GLenum int type, + @Const @GLvoid ByteBuffer data); + + // ------------------------------------------------------------------ + // ----------------------[ ARB_compute_shader ]---------------------- + // ------------------------------------------------------------------ + + /** + * Accepted by the <type> parameter of CreateShader and returned in the + * <params> parameter by GetShaderiv: + */ + int GL_COMPUTE_SHADER = 0x91B9; + + /** + * Accepted by the <pname> parameter of GetIntegerv, GetBooleanv, GetFloatv, + * GetDoublev and GetInteger64v: + */ + int GL_MAX_COMPUTE_UNIFORM_BLOCKS = 0x91BB, + GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS = 0x91BC, + GL_MAX_COMPUTE_IMAGE_UNIFORMS = 0x91BD, + GL_MAX_COMPUTE_SHARED_MEMORY_SIZE = 0x8262, + GL_MAX_COMPUTE_UNIFORM_COMPONENTS = 0x8263, + GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS = 0x8264, + GL_MAX_COMPUTE_ATOMIC_COUNTERS = 0x8265, + GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS = 0x8266, + GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS = 0x90EB; + + /** + * Accepted by the <pname> parameter of GetIntegeri_v, GetBooleani_v, + * GetFloati_v, GetDoublei_v and GetInteger64i_v: + */ + + int GL_MAX_COMPUTE_WORK_GROUP_COUNT = 0x91BE, + GL_MAX_COMPUTE_WORK_GROUP_SIZE = 0x91BF; + + /** Accepted by the <pname> parameter of GetProgramiv: */ + int GL_COMPUTE_WORK_GROUP_SIZE = 0x8267; + + /** Accepted by the <pname> parameter of GetActiveUniformBlockiv: */ + int GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER = 0x90EC; + + /** Accepted by the <pname> parameter of GetActiveAtomicCounterBufferiv: */ + int GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER = 0x90ED; + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, and + * GetBufferPointerv: + */ + int GL_DISPATCH_INDIRECT_BUFFER = 0x90EE; + + /** + * Accepted by the <value> parameter of GetIntegerv, GetBooleanv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + int GL_DISPATCH_INDIRECT_BUFFER_BINDING = 0x90EF; + + /** Accepted by the <stages> parameter of UseProgramStages: */ + int GL_COMPUTE_SHADER_BIT = 0x00000020; + + void glDispatchCompute(@GLuint int num_groups_x, + @GLuint int num_groups_y, + @GLuint int num_groups_z); + + void glDispatchComputeIndirect(@GLintptr long indirect); + + // -------------------------------------------------------------- + // ----------------------[ ARB_copy_image ]---------------------- + // -------------------------------------------------------------- + + void glCopyImageSubData( + @GLuint int srcName, @GLenum int srcTarget, int srcLevel, + int srcX, int srcY, int srcZ, + @GLuint int dstName, @GLenum int dstTarget, int dstLevel, + int dstX, int dstY, int dstZ, + @GLsizei int srcWidth, @GLsizei int srcHeight, @GLsizei int srcDepth); + + // ---------------------------------------------------------------- + // ----------------------[ KHR_debug_output ]---------------------- + // ----------------------[ ARB_debug_output2 ]--------------------- + // ----------------------[ ARB_debug_group ]----------------------- + // ----------------------[ ARB_debug_label ]----------------------- + // ---------------------------------------------------------------- + + /** + * Tokens accepted by the <target> parameters of Enable, Disable, and + * IsEnabled: + */ + int GL_DEBUG_OUTPUT = 0x92E0, + GL_DEBUG_OUTPUT_SYNCHRONOUS = 0x8242; + + /** Returned by GetIntegerv when <pname> is CONTEXT_FLAGS: */ + int GL_CONTEXT_FLAG_DEBUG_BIT = 0x00000002; + + /** + * Tokens accepted by the <value> parameters of GetBooleanv, GetIntegerv, + * GetFloatv, GetDoublev and GetInteger64v: + */ + int GL_MAX_DEBUG_MESSAGE_LENGTH = 0x9143, + GL_MAX_DEBUG_LOGGED_MESSAGES = 0x9144, + GL_DEBUG_LOGGED_MESSAGES = 0x9145, + GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH = 0x8243, + GL_MAX_DEBUG_GROUP_STACK_DEPTH = 0x826C, + GL_DEBUG_GROUP_STACK_DEPTH = 0x826D, + GL_MAX_LABEL_LENGTH = 0x82E8; + + /** Tokens accepted by the <pname> parameter of GetPointerv: */ + int GL_DEBUG_CALLBACK_FUNCTION = 0x8244, + GL_DEBUG_CALLBACK_USER_PARAM = 0x8245; + + /** + * Tokens accepted or provided by the <source> parameters of + * DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <sources> + * parameter of GetDebugMessageLog: + */ + int GL_DEBUG_SOURCE_API = 0x8246, + GL_DEBUG_SOURCE_WINDOW_SYSTEM = 0x8247, + GL_DEBUG_SOURCE_SHADER_COMPILER = 0x8248, + GL_DEBUG_SOURCE_THIRD_PARTY = 0x8249, + GL_DEBUG_SOURCE_APPLICATION = 0x824A, + GL_DEBUG_SOURCE_OTHER = 0x824B; + + /** + * Tokens accepted or provided by the <type> parameters of + * DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <types> + * parameter of GetDebugMessageLog: + */ + int GL_DEBUG_TYPE_ERROR = 0x824C, + GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR = 0x824D, + GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR = 0x824E, + GL_DEBUG_TYPE_PORTABILITY = 0x824F, + GL_DEBUG_TYPE_PERFORMANCE = 0x8250, + GL_DEBUG_TYPE_OTHER = 0x8251, + GL_DEBUG_TYPE_MARKER = 0x8268; + + /** + * Tokens accepted or provided by the <type> parameters of + * DebugMessageControl and DEBUGPROC, and the <types> parameter of + * GetDebugMessageLog: + */ + int GL_DEBUG_TYPE_PUSH_GROUP = 0x8269, + GL_DEBUG_TYPE_POP_GROUP = 0x826A; + + /** + * Tokens accepted or provided by the <severity> parameters of + * DebugMessageControl, DebugMessageInsert and DEBUGPROC callback functions, + * and the <severities> parameter of GetDebugMessageLog: + */ + int GL_DEBUG_SEVERITY_HIGH = 0x9146, + GL_DEBUG_SEVERITY_MEDIUM = 0x9147, + GL_DEBUG_SEVERITY_LOW = 0x9148, + GL_DEBUG_SEVERITY_NOTIFICATION = 0x826B; + + /** Returned by GetError: */ + int GL_STACK_UNDERFLOW = 0x0504, + GL_STACK_OVERFLOW = 0x0503; + + /** + * Tokens accepted or provided by the <identifier> parameters of + * ObjectLabel and GetObjectLabel: + */ + int GL_BUFFER = 0x82E0, + GL_SHADER = 0x82E1, + GL_PROGRAM = 0x82E2, + GL_QUERY = 0x82E3, + GL_PROGRAM_PIPELINE = 0x82E4, + GL_SAMPLER = 0x82E6, + GL_DISPLAY_LIST = 0x82E7; + + // ----------------------------- + + void glDebugMessageControl(@GLenum int source, + @GLenum int type, + @GLenum int severity, + @AutoSize(value = "ids", canBeNull = true) @GLsizei int count, + @Check(canBeNull = true) @Const @GLuint IntBuffer ids, + boolean enabled); + + void glDebugMessageInsert(@GLenum int source, + @GLenum int type, + @GLuint int id, + @GLenum int severity, + @AutoSize("buf") @GLsizei int length, + @Const @GLchar ByteBuffer buf); + + @Alternate("glDebugMessageInsert") + void glDebugMessageInsert(@GLenum int source, + @GLenum int type, + @GLuint int id, + @GLenum int severity, + @Constant("buf.length()") @GLsizei int length, + CharSequence buf); + + /** + * The {@code KHRDebugCallback.Handler} implementation passed to this method will be used for + * KHR_debug messages. If callback is null, any previously registered handler for the current + * thread will be unregistered and stop receiving messages. + * + * @param callback the callback function to use + */ + @Code( + // Create a GlobalRef to the callback object and register it with the current context. + javaBeforeNative = "\t\tlong userParam = callback == null ? 0 : CallbackUtil.createGlobalRef(callback.getHandler());\n" + + "\t\tCallbackUtil.registerContextCallbackKHR(userParam);" + ) + void glDebugMessageCallback(@PointerWrapper(value = "GLDEBUGPROC", canBeNull = true) KHRDebugCallback callback, + @Constant("userParam") @PointerWrapper("GLvoid *") long userParam); + + @GLuint + int glGetDebugMessageLog(@GLuint int count, + @AutoSize(value = "messageLog", canBeNull = true) @GLsizei int bufsize, + @Check(value = "count", canBeNull = true) @GLenum IntBuffer sources, + @Check(value = "count", canBeNull = true) @GLenum IntBuffer types, + @Check(value = "count", canBeNull = true) @GLuint IntBuffer ids, + @Check(value = "count", canBeNull = true) @GLenum IntBuffer severities, + @Check(value = "count", canBeNull = true) @GLsizei IntBuffer lengths, + @Check(canBeNull = true) @OutParameter @GLchar ByteBuffer messageLog); + + void glPushDebugGroup(@GLenum int source, @GLuint int id, @AutoSize("message") @GLsizei int length, + @Const @GLchar ByteBuffer message); + + @Alternate("glPushDebugGroup") + void glPushDebugGroup(@GLenum int source, @GLuint int id, @Constant("message.length()") @GLsizei int length, + CharSequence message); + + void glPopDebugGroup(); + + void glObjectLabel(@GLenum int identifier, @GLuint int name, @AutoSize(value = "label", canBeNull = true) @GLsizei int length, + @Check(canBeNull = true) @Const @GLchar ByteBuffer label); + + @Alternate("glObjectLabel") + void glObjectLabel(@GLenum int identifier, @GLuint int name, @Constant("label.length()") @GLsizei int length, + CharSequence label); + + void glGetObjectLabel(@GLenum int identifier, @GLuint int name, @AutoSize("label") @GLsizei int bufSize, + @OutParameter @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length, + @OutParameter @GLchar ByteBuffer label); + + @Alternate("glGetObjectLabel") + @GLreturn(value = "label", maxLength = "bufSize") + void glGetObjectLabel2(@GLenum int identifier, @GLuint int name, @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(label_length)") IntBuffer length, + @OutParameter @GLchar ByteBuffer label); + + void glObjectPtrLabel(@PointerWrapper("GLvoid *") org.lwjgl.PointerWrapper ptr, @AutoSize(value = "label", canBeNull = true) @GLsizei int length, + @Check(canBeNull = true) @Const @GLchar ByteBuffer label); + + @Alternate("glObjectPtrLabel") + void glObjectPtrLabel(@PointerWrapper("GLvoid *") org.lwjgl.PointerWrapper ptr, @Constant("label.length()") @GLsizei int length, + CharSequence label); + + void glGetObjectPtrLabel(@PointerWrapper("GLvoid *") org.lwjgl.PointerWrapper ptr, @AutoSize("label") @GLsizei int bufSize, + @OutParameter @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length, + @OutParameter @GLchar ByteBuffer label); + + @Alternate("glGetObjectPtrLabel") + @GLreturn(value = "label", maxLength = "bufSize") + void glGetObjectPtrLabel2(@PointerWrapper("GLvoid *") org.lwjgl.PointerWrapper ptr, @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(label_length)") IntBuffer length, + @OutParameter @GLchar ByteBuffer label); + + // ----------------------------------------------------------------------------- + // ----------------------[ ARB_explicit_uniform_location ]---------------------- + // ----------------------------------------------------------------------------- + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, GetDoublev, and GetInteger64v: + */ + int GL_MAX_UNIFORM_LOCATIONS = 0x826E; + + // ----------------------------------------------------------------------------- + // ----------------------[ ARB_framebuffer_no_attachment ]---------------------- + // ----------------------------------------------------------------------------- + + /** + * Accepted by the <pname> parameter of FramebufferParameteri, + * GetFramebufferParameteriv, NamedFramebufferParameteriEXT, and + * GetNamedFramebufferParameterivEXT: + */ + int GL_FRAMEBUFFER_DEFAULT_WIDTH = 0x9310, + GL_FRAMEBUFFER_DEFAULT_HEIGHT = 0x9311, + GL_FRAMEBUFFER_DEFAULT_LAYERS = 0x9312, + GL_FRAMEBUFFER_DEFAULT_SAMPLES = 0x9313, + GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS = 0x9314; + + /** + * Accepted by the <pname> parameter of GetIntegerv, GetBooleanv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + int GL_MAX_FRAMEBUFFER_WIDTH = 0x9315, + GL_MAX_FRAMEBUFFER_HEIGHT = 0x9316, + GL_MAX_FRAMEBUFFER_LAYERS = 0x9317, + GL_MAX_FRAMEBUFFER_SAMPLES = 0x9318; + + void glFramebufferParameteri(@GLenum int target, @GLenum int pname, int param); + + @StripPostfix("params") + void glGetFramebufferParameteriv(@GLenum int target, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + @Alternate("glGetFramebufferParameteriv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetFramebufferParameteriv2(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + // ----------------------------------------------------------------------------- + // ----------------------[ ARB_internalformat_query2 ]---------------------- + // ----------------------------------------------------------------------------- + + /** + * Accepted by the <target> parameter of GetInternalformativ + * and GetInternalformati64v: + */ + int GL_TEXTURE_1D = 0x0DE0, + GL_TEXTURE_1D_ARRAY = 0x8C18, + GL_TEXTURE_2D = 0x0DE1, + GL_TEXTURE_2D_ARRAY = 0x8C1A, + GL_TEXTURE_3D = 0x806F, + GL_TEXTURE_CUBE_MAP = 0x8513, + GL_TEXTURE_CUBE_MAP_ARRAY = 0x9009, + GL_TEXTURE_RECTANGLE = 0x84F5, + GL_TEXTURE_BUFFER = 0x8C2A, + GL_RENDERBUFFER = 0x8D41, + GL_TEXTURE_2D_MULTISAMPLE = 0x9100, + GL_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x9102; + + /** + * Accepted by the <pname> parameter of GetInternalformativ + * and GetInternalformati64v: + */ + int GL_SAMPLES = 0x80A9, + GL_NUM_SAMPLE_COUNTS = 0x9380, + GL_INTERNALFORMAT_SUPPORTED = 0x826F, + GL_INTERNALFORMAT_PREFERRED = 0x8270, + GL_INTERNALFORMAT_RED_SIZE = 0x8271, + GL_INTERNALFORMAT_GREEN_SIZE = 0x8272, + GL_INTERNALFORMAT_BLUE_SIZE = 0x8273, + GL_INTERNALFORMAT_ALPHA_SIZE = 0x8274, + GL_INTERNALFORMAT_DEPTH_SIZE = 0x8275, + GL_INTERNALFORMAT_STENCIL_SIZE = 0x8276, + GL_INTERNALFORMAT_SHARED_SIZE = 0x8277, + GL_INTERNALFORMAT_RED_TYPE = 0x8278, + GL_INTERNALFORMAT_GREEN_TYPE = 0x8279, + GL_INTERNALFORMAT_BLUE_TYPE = 0x827A, + GL_INTERNALFORMAT_ALPHA_TYPE = 0x827B, + GL_INTERNALFORMAT_DEPTH_TYPE = 0x827C, + GL_INTERNALFORMAT_STENCIL_TYPE = 0x827D, + GL_MAX_WIDTH = 0x827E, + GL_MAX_HEIGHT = 0x827F, + GL_MAX_DEPTH = 0x8280, + GL_MAX_LAYERS = 0x8281, + GL_MAX_COMBINED_DIMENSIONS = 0x8282, + GL_COLOR_COMPONENTS = 0x8283, + GL_DEPTH_COMPONENTS = 0x8284, + GL_STENCIL_COMPONENTS = 0x8285, + GL_COLOR_RENDERABLE = 0x8286, + GL_DEPTH_RENDERABLE = 0x8287, + GL_STENCIL_RENDERABLE = 0x8288, + GL_FRAMEBUFFER_RENDERABLE = 0x8289, + GL_FRAMEBUFFER_RENDERABLE_LAYERED = 0x828A, + GL_FRAMEBUFFER_BLEND = 0x828B, + GL_READ_PIXELS = 0x828C, + GL_READ_PIXELS_FORMAT = 0x828D, + GL_READ_PIXELS_TYPE = 0x828E, + GL_TEXTURE_IMAGE_FORMAT = 0x828F, + GL_TEXTURE_IMAGE_TYPE = 0x8290, + GL_GET_TEXTURE_IMAGE_FORMAT = 0x8291, + GL_GET_TEXTURE_IMAGE_TYPE = 0x8292, + GL_MIPMAP = 0x8293, + GL_MANUAL_GENERATE_MIPMAP = 0x8294, + GL_AUTO_GENERATE_MIPMAP = 0x8295, + GL_COLOR_ENCODING = 0x8296, + GL_SRGB_READ = 0x8297, + GL_SRGB_WRITE = 0x8298, + GL_SRGB_DECODE_ARB = 0x8299, + GL_FILTER = 0x829A, + GL_VERTEX_TEXTURE = 0x829B, + GL_TESS_CONTROL_TEXTURE = 0x829C, + GL_TESS_EVALUATION_TEXTURE = 0x829D, + GL_GEOMETRY_TEXTURE = 0x829E, + GL_FRAGMENT_TEXTURE = 0x829F, + GL_COMPUTE_TEXTURE = 0x82A0, + GL_TEXTURE_SHADOW = 0x82A1, + GL_TEXTURE_GATHER = 0x82A2, + GL_TEXTURE_GATHER_SHADOW = 0x82A3, + GL_SHADER_IMAGE_LOAD = 0x82A4, + GL_SHADER_IMAGE_STORE = 0x82A5, + GL_SHADER_IMAGE_ATOMIC = 0x82A6, + GL_IMAGE_TEXEL_SIZE = 0x82A7, + GL_IMAGE_COMPATIBILITY_CLASS = 0x82A8, + GL_IMAGE_PIXEL_FORMAT = 0x82A9, + GL_IMAGE_PIXEL_TYPE = 0x82AA, + GL_IMAGE_FORMAT_COMPATIBILITY_TYPE = 0x90C7, + GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST = 0x82AC, + GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST = 0x82AD, + GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE = 0x82AE, + GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE = 0x82AF, + GL_TEXTURE_COMPRESSED = 0x86A1, + GL_TEXTURE_COMPRESSED_BLOCK_WIDTH = 0x82B1, + GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT = 0x82B2, + GL_TEXTURE_COMPRESSED_BLOCK_SIZE = 0x82B3, + GL_CLEAR_BUFFER = 0x82B4, + GL_TEXTURE_VIEW = 0x82B5, + GL_VIEW_COMPATIBILITY_CLASS = 0x82B6; + + /** + * Returned as possible responses for various <pname> queries + * to GetInternalformativ and GetInternalformati64v + */ + int GL_FULL_SUPPORT = 0x82B7, + GL_CAVEAT_SUPPORT = 0x82B8, + GL_IMAGE_CLASS_4_X_32 = 0x82B9, + GL_IMAGE_CLASS_2_X_32 = 0x82BA, + GL_IMAGE_CLASS_1_X_32 = 0x82BB, + GL_IMAGE_CLASS_4_X_16 = 0x82BC, + GL_IMAGE_CLASS_2_X_16 = 0x82BD, + GL_IMAGE_CLASS_1_X_16 = 0x82BE, + GL_IMAGE_CLASS_4_X_8 = 0x82BF, + GL_IMAGE_CLASS_2_X_8 = 0x82C0, + GL_IMAGE_CLASS_1_X_8 = 0x82C1, + GL_IMAGE_CLASS_11_11_10 = 0x82C2, + GL_IMAGE_CLASS_10_10_10_2 = 0x82C3, + GL_VIEW_CLASS_128_BITS = 0x82C4, + GL_VIEW_CLASS_96_BITS = 0x82C5, + GL_VIEW_CLASS_64_BITS = 0x82C6, + GL_VIEW_CLASS_48_BITS = 0x82C7, + GL_VIEW_CLASS_32_BITS = 0x82C8, + GL_VIEW_CLASS_24_BITS = 0x82C9, + GL_VIEW_CLASS_16_BITS = 0x82CA, + GL_VIEW_CLASS_8_BITS = 0x82CB, + GL_VIEW_CLASS_S3TC_DXT1_RGB = 0x82CC, + GL_VIEW_CLASS_S3TC_DXT1_RGBA = 0x82CD, + GL_VIEW_CLASS_S3TC_DXT3_RGBA = 0x82CE, + GL_VIEW_CLASS_S3TC_DXT5_RGBA = 0x82CF, + GL_VIEW_CLASS_RGTC1_RED = 0x82D0, + GL_VIEW_CLASS_RGTC2_RG = 0x82D1, + GL_VIEW_CLASS_BPTC_UNORM = 0x82D2, + GL_VIEW_CLASS_BPTC_FLOAT = 0x82D3; + + @StripPostfix("params") + void glGetInternalformati64v(@GLenum int target, @GLenum int internalformat, + @GLenum int pname, @AutoSize("params") @GLsizei int bufSize, @OutParameter @GLint64 LongBuffer params); + + @Alternate("glGetInternalformati64v") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetInternalformati64v2(@GLenum int target, @GLenum int internalformat, + @GLenum int pname, @Constant("1") @GLsizei int bufSize, @OutParameter @GLint64 LongBuffer params); + + // ---------------------------------------------------------------------- + // ----------------------[ ARB_invalidate_subdata ]---------------------- + // ---------------------------------------------------------------------- + + void glInvalidateTexSubImage(@GLuint int texture, int level, + int xoffset, int yoffset, int zoffset, + @GLsizei int width, @GLsizei int height, @GLsizei int depth); + + void glInvalidateTexImage(@GLuint int texture, int level); + + void glInvalidateBufferSubData(@GLuint int buffer, @GLintptr long offset, @GLsizeiptr long length); + + void glInvalidateBufferData(@GLuint int buffer); + + void glInvalidateFramebuffer(@GLenum int target, + @AutoSize("attachments") @GLsizei int numAttachments, + @Const @GLenum IntBuffer attachments); + + void glInvalidateSubFramebuffer(@GLenum int target, + @AutoSize("attachments") @GLsizei int numAttachments, + @Const @GLenum IntBuffer attachments, + int x, int y, @GLsizei int width, @GLsizei int height); + + // ----------------------------------------------------------------------- + // ----------------------[ ARB_multi_draw_indirect ]---------------------- + // ----------------------------------------------------------------------- + + void glMultiDrawArraysIndirect(@GLenum int mode, + @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 4 * 4 : stride) * primcount") @Const @GLvoid ByteBuffer indirect, + @GLsizei int primcount, + @GLsizei int stride); + + @Alternate("glMultiDrawArraysIndirect") + void glMultiDrawArraysIndirect(@GLenum int mode, + @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 4 : stride >> 2) * primcount") @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect, + @GLsizei int primcount, + @GLsizei int stride); + + void glMultiDrawElementsIndirect(@GLenum int mode, + @GLenum int type, + @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 5 * 4 : stride) * primcount") @Const @GLvoid ByteBuffer indirect, + @GLsizei int primcount, + @GLsizei int stride); + + @Alternate("glMultiDrawElementsIndirect") + void glMultiDrawElementsIndirect(@GLenum int mode, + @GLenum int type, + @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 5 : stride >> 2) * primcount") @Const @GLvoid(PrimitiveType.Kind.INT) IntBuffer indirect, + @GLsizei int primcount, + @GLsizei int stride); + + // --------------------------------------------------------------------------- + // ----------------------[ ARB_program_interface_query ]---------------------- + // --------------------------------------------------------------------------- + + /** + * Accepted by the <programInterface> parameter of GetProgramInterfaceiv, + * GetProgramResourceIndex, GetProgramResourceName, GetProgramResourceiv, + * GetProgramResourceLocation, and GetProgramResourceLocationIndex: + */ + int GL_UNIFORM = 0x92E1, + GL_UNIFORM_BLOCK = 0x92E2, + GL_PROGRAM_INPUT = 0x92E3, + GL_PROGRAM_OUTPUT = 0x92E4, + GL_BUFFER_VARIABLE = 0x92E5, + GL_SHADER_STORAGE_BLOCK = 0x92E6, + GL_VERTEX_SUBROUTINE = 0x92E8, + GL_TESS_CONTROL_SUBROUTINE = 0x92E9, + GL_TESS_EVALUATION_SUBROUTINE = 0x92EA, + GL_GEOMETRY_SUBROUTINE = 0x92EB, + GL_FRAGMENT_SUBROUTINE = 0x92EC, + GL_COMPUTE_SUBROUTINE = 0x92ED, + GL_VERTEX_SUBROUTINE_UNIFORM = 0x92EE, + GL_TESS_CONTROL_SUBROUTINE_UNIFORM = 0x92EF, + GL_TESS_EVALUATION_SUBROUTINE_UNIFORM = 0x92F0, + GL_GEOMETRY_SUBROUTINE_UNIFORM = 0x92F1, + GL_FRAGMENT_SUBROUTINE_UNIFORM = 0x92F2, + GL_COMPUTE_SUBROUTINE_UNIFORM = 0x92F3, + GL_TRANSFORM_FEEDBACK_VARYING = 0x92F4; + + /** Accepted by the <pname> parameter of GetProgramInterfaceiv: */ + int GL_ACTIVE_RESOURCES = 0x92F5, + GL_MAX_NAME_LENGTH = 0x92F6, + GL_MAX_NUM_ACTIVE_VARIABLES = 0x92F7, + GL_MAX_NUM_COMPATIBLE_SUBROUTINES = 0x92F8; + + /** Accepted in the <props> array of GetProgramResourceiv: */ + int GL_NAME_LENGTH = 0x92F9, + GL_TYPE = 0x92FA, + GL_ARRAY_SIZE = 0x92FB, + GL_OFFSET = 0x92FC, + GL_BLOCK_INDEX = 0x92FD, + GL_ARRAY_STRIDE = 0x92FE, + GL_MATRIX_STRIDE = 0x92FF, + GL_IS_ROW_MAJOR = 0x9300, + GL_ATOMIC_COUNTER_BUFFER_INDEX = 0x9301, + GL_BUFFER_BINDING = 0x9302, + GL_BUFFER_DATA_SIZE = 0x9303, + GL_NUM_ACTIVE_VARIABLES = 0x9304, + GL_ACTIVE_VARIABLES = 0x9305, + GL_REFERENCED_BY_VERTEX_SHADER = 0x9306, + GL_REFERENCED_BY_TESS_CONTROL_SHADER = 0x9307, + GL_REFERENCED_BY_TESS_EVALUATION_SHADER = 0x9308, + GL_REFERENCED_BY_GEOMETRY_SHADER = 0x9309, + GL_REFERENCED_BY_FRAGMENT_SHADER = 0x930A, + GL_REFERENCED_BY_COMPUTE_SHADER = 0x930B, + GL_TOP_LEVEL_ARRAY_SIZE = 0x930C, + GL_TOP_LEVEL_ARRAY_STRIDE = 0x930D, + GL_LOCATION = 0x930E, + GL_LOCATION_INDEX = 0x930F, + GL_IS_PER_PATCH = 0x92E7; + + @StripPostfix("params") + void glGetProgramInterfaceiv(@GLuint int program, @GLenum int programInterface, + @GLenum int pname, @Check("1") @OutParameter IntBuffer params); + + @Alternate("glGetProgramInterfaceiv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetProgramInterfaceiv2(@GLuint int program, @GLenum int programInterface, + @GLenum int pname, @OutParameter IntBuffer params); + + @GLuint + int glGetProgramResourceIndex(@GLuint int program, @GLenum int programInterface, + @NullTerminated @Const @GLchar ByteBuffer name); + + @Alternate("glGetProgramResourceIndex") + @GLuint + int glGetProgramResourceIndex(@GLuint int program, @GLenum int programInterface, + @NullTerminated CharSequence name); + + void glGetProgramResourceName(@GLuint int program, @GLenum int programInterface, + @GLuint int index, @AutoSize(value = "name", canBeNull = true) @GLsizei int bufSize, @Check(value = "1", canBeNull = true) @OutParameter @GLsizei IntBuffer length, + @Check(canBeNull = true) @OutParameter @GLchar ByteBuffer name); + + @Alternate("glGetProgramResourceName") + @GLreturn(value = "name", maxLength = "bufSize") + void glGetProgramResourceName2(@GLuint int program, @GLenum int programInterface, + @GLuint int index, @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(name_length)") IntBuffer length, + @OutParameter @GLchar ByteBuffer name); + + @StripPostfix("params") + void glGetProgramResourceiv(@GLuint int program, @GLenum int programInterface, + @GLuint int index, @AutoSize("props") @GLsizei int propCount, + @Const @GLenum IntBuffer props, @AutoSize("params") @GLsizei int bufSize, + @Check(value = "1", canBeNull = true) @OutParameter @GLsizei IntBuffer length, @OutParameter IntBuffer params); + + int glGetProgramResourceLocation(@GLuint int program, @GLenum int programInterface, + @NullTerminated @Const @GLchar ByteBuffer name); + + @Alternate("glGetProgramResourceLocation") + int glGetProgramResourceLocation(@GLuint int program, @GLenum int programInterface, + @NullTerminated CharSequence name); + + int glGetProgramResourceLocationIndex(@GLuint int program, @GLenum int programInterface, + @NullTerminated @Const @GLchar ByteBuffer name); + + @Alternate("glGetProgramResourceLocationIndex") + int glGetProgramResourceLocationIndex(@GLuint int program, @GLenum int programInterface, + @NullTerminated CharSequence name); + + // -------------------------------------------------------------------------------- + // ----------------------[ ARB_shader_storage_buffer_object ]---------------------- + // -------------------------------------------------------------------------------- + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, and + * GetBufferPointerv: + */ + int GL_SHADER_STORAGE_BUFFER = 0x90D2; + + /** + * Accepted by the <pname> parameter of GetIntegerv, GetIntegeri_v, + * GetBooleanv, GetInteger64v, GetFloatv, GetDoublev, GetBooleani_v, + * GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v: + */ + int GL_SHADER_STORAGE_BUFFER_BINDING = 0x90D3; + + /** + * Accepted by the <pname> parameter of GetIntegeri_v, GetBooleani_v, + * GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v: + */ + int GL_SHADER_STORAGE_BUFFER_START = 0x90D4, + GL_SHADER_STORAGE_BUFFER_SIZE = 0x90D5; + + /** + * Accepted by the <pname> parameter of GetIntegerv, GetBooleanv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + int GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS = 0x90D6, + GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS = 0x90D7, + GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS = 0x90D8, + GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS = 0x90D9, + GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS = 0x90DA, + GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS = 0x90DB, + GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS = 0x90DC, + GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS = 0x90DD, + GL_MAX_SHADER_STORAGE_BLOCK_SIZE = 0x90DE, + GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT = 0x90DF; + + /** Accepted in the <barriers> bitfield in glMemoryBarrier: */ + int GL_SHADER_STORAGE_BARRIER_BIT = 0x2000; + + /** + * Alias for the existing token + * MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS: + */ + int GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES = 0x8F39; + + void glShaderStorageBlockBinding(@GLuint int program, @GLuint int storageBlockIndex, + @GLuint int storageBlockBinding); + + // --------------------------------------------------------------------- + // ----------------------[ ARB_stencil_texturing ]---------------------- + // --------------------------------------------------------------------- + + /** Accepted by the <pname> parameter of TexParameter* and GetTexParameter*: */ + int GL_DEPTH_STENCIL_TEXTURE_MODE = 0x90EA; + + // ------------------------------------------------------------------------ + // ----------------------[ ARB_texture_buffer_range ]---------------------- + // ------------------------------------------------------------------------ + + /** Accepted by the <pname> parameter of GetTexLevelParameter: */ + int GL_TEXTURE_BUFFER_OFFSET = 0x919D, + GL_TEXTURE_BUFFER_SIZE = 0x919E; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + int GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT = 0x919F; + + void glTexBufferRange(@GLenum int target, + @GLenum int internalformat, + @GLuint int buffer, + @GLintptr long offset, + @GLsizeiptr long size); + + // ------------------------------------------------------------------------------- + // ----------------------[ ARB_texture_storage_multisample ]---------------------- + // ------------------------------------------------------------------------------- + + void glTexStorage2DMultisample(@GLenum int target, + @GLsizei int samples, + @GLenum int internalformat, + @GLsizei int width, + @GLsizei int height, + boolean fixedsamplelocations); + + void glTexStorage3DMultisample(@GLenum int target, + @GLsizei int samples, + @GLenum int internalformat, + @GLsizei int width, + @GLsizei int height, + @GLsizei int depth, + boolean fixedsamplelocations); + + // ---------------------------------------------------------------- + // ----------------------[ ARB_texture_view ]---------------------- + // ---------------------------------------------------------------- + + /** + * Accepted by the <pname> parameters of GetTexParameterfv and + * GetTexParameteriv: + */ + int GL_TEXTURE_VIEW_MIN_LEVEL = 0x82DB, + GL_TEXTURE_VIEW_NUM_LEVELS = 0x82DC, + GL_TEXTURE_VIEW_MIN_LAYER = 0x82DD, + GL_TEXTURE_VIEW_NUM_LAYERS = 0x82DE, + GL_TEXTURE_IMMUTABLE_LEVELS = 0x82DF; + + void glTextureView(@GLuint int texture, @GLenum int target, @GLuint int origtexture, + @GLenum int internalformat, + @GLuint int minlevel, @GLuint int numlevels, + @GLuint int minlayer, @GLuint int numlayers); + + // ------------------------------------------------------------------------- + // ----------------------[ ARB_vertex_attrib_binding ]---------------------- + // ------------------------------------------------------------------------- + + /** Accepted by the <pname> parameter of GetVertexAttrib*v: */ + int GL_VERTEX_ATTRIB_BINDING = 0x82D4, + GL_VERTEX_ATTRIB_RELATIVE_OFFSET = 0x82D5; + + /** + * Accepted by the <target> parameter of GetBooleani_v, GetIntegeri_v, + * GetFloati_v, GetDoublei_v, and GetInteger64i_v: + */ + int GL_VERTEX_BINDING_DIVISOR = 0x82D6, + GL_VERTEX_BINDING_OFFSET = 0x82D7, + GL_VERTEX_BINDING_STRIDE = 0x82D8; + + /** Accepted by the <pname> parameter of GetIntegerv, ... */ + int GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET = 0x82D9, + GL_MAX_VERTEX_ATTRIB_BINDINGS = 0x82DA; + + void glBindVertexBuffer(@GLuint int bindingindex, @GLuint int buffer, @GLintptr long offset, + @GLsizei int stride); + + void glVertexAttribFormat(@GLuint int attribindex, int size, @GLenum int type, + boolean normalized, @GLuint int relativeoffset); + + void glVertexAttribIFormat(@GLuint int attribindex, int size, @GLenum int type, + @GLuint int relativeoffset); + + void glVertexAttribLFormat(@GLuint int attribindex, int size, @GLenum int type, + @GLuint int relativeoffset); + + void glVertexAttribBinding(@GLuint int attribindex, @GLuint int bindingindex); + + void glVertexBindingDivisor(@GLuint int bindingindex, @GLuint int divisor); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL44.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL44.java new file mode 100644 index 0000000..79531d2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GL44.java @@ -0,0 +1,190 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.PointerBuffer; +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.Buffer; +import java.nio.IntBuffer; + +public interface GL44 { + + /** Implementation-dependent state which constrains the maximum value of stride parameters to vertex array pointer-setting commands. */ + int GL_MAX_VERTEX_ATTRIB_STRIDE = 0x82E5; + + // ------------------------------------------------------------------ + // ----------------------[ ARB_buffer_storage ]---------------------- + // ------------------------------------------------------------------ + + /** + * Accepted in the <flags> parameter of BufferStorage and + * NamedBufferStorageEXT: + */ + int GL_MAP_PERSISTENT_BIT = 0x0040, + GL_MAP_COHERENT_BIT = 0x0080, + GL_DYNAMIC_STORAGE_BIT = 0x0100, + GL_CLIENT_STORAGE_BIT = 0x0200; + + /** Accepted by the <pname> parameter of GetBufferParameter{i|i64}v:\ */ + + int GL_BUFFER_IMMUTABLE_STORAGE = 0x821F, + GL_BUFFER_STORAGE_FLAGS = 0x8220; + + /** Accepted by the <barriers> parameter of MemoryBarrier: */ + int GL_CLIENT_MAPPED_BUFFER_BARRIER_BIT = 0x00004000; + + void glBufferStorage(@GLenum int target, + @AutoSize("data") @GLsizeiptr long size, + @Const + @GLbyte + @GLshort + @GLint + @GLuint64 + @GLfloat + @GLdouble Buffer data, + @GLbitfield int flags); + + @Alternate("glBufferStorage") + void glBufferStorage2(@GLenum int target, + @GLsizeiptr long size, + @Constant("0L") @Const Buffer data, + @GLbitfield int flags); + + // ----------------------------------------------------------------- + // ----------------------[ ARB_clear_texture ]---------------------- + // ----------------------------------------------------------------- + + /** + * Accepted by the <pname> parameter for GetInternalformativ and + * GetInternalformati64v: + */ + int GL_CLEAR_TEXTURE = 0x9365; + + void glClearTexImage(@GLuint int texture, int level, + @GLenum int format, @GLenum int type, + @Check(value = "1", canBeNull = true) + @Const + @GLbyte + @GLshort + @GLint + @GLuint64 + @GLfloat + @GLdouble Buffer data); + + void glClearTexSubImage(@GLuint int texture, int level, + int xoffset, int yoffset, int zoffset, + @GLsizei int width, @GLsizei int height, @GLsizei int depth, + @GLenum int format, @GLenum int type, + @Check(value = "1", canBeNull = true) + @Const + @GLbyte + @GLshort + @GLint + @GLuint64 + @GLfloat + @GLdouble Buffer data); + + // -------------------------------------------------------------------- + // ----------------------[ ARB_enhanced_layouts ]---------------------- + // -------------------------------------------------------------------- + + /** Accepted in the <props> array of GetProgramResourceiv: */ + int GL_LOCATION_COMPONENT = 0x934A, + GL_TRANSFORM_FEEDBACK_BUFFER_INDEX = 0x934B, + GL_TRANSFORM_FEEDBACK_BUFFER_STRIDE = 0x934C; + + // -------------------------------------------------------------- + // ----------------------[ ARB_multi_bind ]---------------------- + // -------------------------------------------------------------- + + void glBindBuffersBase(@GLenum int target, @GLuint int first, @GLsizei int count, @Check(value = "count", canBeNull = true) @Const @GLuint IntBuffer buffers); + + void glBindBuffersRange(@GLenum int target, @GLuint int first, @GLsizei int count, + @Check(value = "count", canBeNull = true) @Const @GLuint IntBuffer buffers, + @Check(value = "count", canBeNull = true) @Const @GLintptr PointerBuffer offsets, + @Check(value = "count", canBeNull = true) @Const @GLsizeiptr PointerBuffer sizes); + + void glBindTextures(@GLuint int first, @GLsizei int count, @Check(value = "count", canBeNull = true) @Const @GLuint IntBuffer textures); + + void glBindSamplers(@GLuint int first, @GLsizei int count, @Check(value = "count", canBeNull = true) @Const @GLuint IntBuffer samplers); + + void glBindImageTextures(@GLuint int first, @GLsizei int count, @Check(value = "count", canBeNull = true) @Const @GLuint IntBuffer textures); + + void glBindVertexBuffers(@GLuint int first, @GLsizei int count, + @Check(value = "count", canBeNull = true) @Const @GLuint IntBuffer buffers, + @Check(value = "count", canBeNull = true) @Const @GLintptr PointerBuffer offsets, + @Check(value = "count", canBeNull = true) @Const @GLsizei IntBuffer strides); + + // ----------------------------------------------------------------------- + // ----------------------[ ARB_query_buffer_object ]---------------------- + // ----------------------------------------------------------------------- + + /** + * Accepted by the <pname> parameter of GetQueryObjectiv, GetQueryObjectuiv, + * GetQueryObjecti64v and GetQueryObjectui64v: + */ + int GL_QUERY_RESULT_NO_WAIT = 0x9194; + + /** + * Accepted by the <target> parameter of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, MapBufferRange, GetBufferSubData, + * GetBufferParameteriv, GetBufferParameteri64v, GetBufferPointerv, + * ClearBufferSubData, and the <readtarget> and <writetarget> parameters of + * CopyBufferSubData: + */ + int GL_QUERY_BUFFER = 0x9192; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + int GL_QUERY_BUFFER_BINDING = 0x9193; + + /** Accepted in the <barriers> bitfield in MemoryBarrier: */ + int GL_QUERY_BUFFER_BARRIER_BIT = 0x00008000; + + // -------------------------------------------------------------------------------- + // ----------------------[ ARB_texture_mirror_clamp_to_edge ]---------------------- + // -------------------------------------------------------------------------------- + + /** + * Accepted by the <param> parameter of TexParameter{if}, SamplerParameter{if} + * and SamplerParameter{if}v, and by the <params> parameter of + * TexParameter{if}v, TexParameterI{i ui}v and SamplerParameterI{i ui}v when + * their <pname> parameter is TEXTURE_WRAP_S, TEXTURE_WRAP_T, or + * TEXTURE_WRAP_R: + */ + int GL_MIRROR_CLAMP_TO_EDGE = 0x8743; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GREMEDY_frame_terminator.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GREMEDY_frame_terminator.java new file mode 100644 index 0000000..5ceea69 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GREMEDY_frame_terminator.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface GREMEDY_frame_terminator { + + void glFrameTerminatorGREMEDY(); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GREMEDY_string_marker.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GREMEDY_string_marker.java new file mode 100644 index 0000000..d3dd204 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/GREMEDY_string_marker.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.GLsizei; + +import java.nio.ByteBuffer; + +public interface GREMEDY_string_marker { + + void glStringMarkerGREMEDY(@AutoSize("string") @GLsizei int len, @Const ByteBuffer string); + + @Alternate("glStringMarkerGREMEDY") + void glStringMarkerGREMEDY(@Constant("string.length()") @GLsizei int len, CharSequence string); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/HP_occlusion_test.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/HP_occlusion_test.java new file mode 100644 index 0000000..f919519 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/HP_occlusion_test.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface HP_occlusion_test { + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, by + * the <pname> of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev : + */ + int GL_OCCLUSION_TEST_HP = 0x8165; + + /** + * Accepted by the <pname> of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev : + */ + int GL_OCCLUSION_TEST_RESULT_HP = 0x8166; + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/IBM_rasterpos_clip.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/IBM_rasterpos_clip.java new file mode 100644 index 0000000..a88cbee --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/IBM_rasterpos_clip.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface IBM_rasterpos_clip { + + /** + * Accepted by the <target> parameter of Enable and Disable and the <value> + * parameter of IsEnabled, GetBooleanv, GetIntegerv, GetFloatv, GetDoublev: + */ + int GL_RASTER_POSITION_UNCLIPPED_IBM = 103010; + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/INTEL_map_texture.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/INTEL_map_texture.java new file mode 100644 index 0000000..830725d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/INTEL_map_texture.java @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +public interface INTEL_map_texture { + + /** Accepted by the <pname> parameter of TexParameteri, for target TEXTURE_2D */ + int GL_TEXTURE_MEMORY_LAYOUT_INTEL = 0x83FF; + + /** + * Accepted by the <params> when <pname> is set to + * <TEXTURE_MEMORY_LAYOUT_INTEL>: + */ + int GL_LAYOUT_DEFAULT_INTEL = 0, + GL_LAYOUT_LINEAR_INTEL = 1, + GL_LAYOUT_LINEAR_CPU_CACHED_INTEL = 2; + + /** + * The length parameter does not exist in the native API. It used by LWJGL to return a ByteBuffer + * with a proper capacity. + */ + @CachedResult(isRange = true) + @GLvoid + @AutoSize("length") + ByteBuffer glMapTexture2DINTEL(@GLuint int texture, int level, @Helper(passToNative = true) @GLsizeiptr long length, @GLbitfield int access, + @Check("1") @OutParameter IntBuffer stride, @Check("1") @OutParameter @GLenum IntBuffer layout); + + void glUnmapTexture2DINTEL(@GLuint int texture, int level); + + void glSyncTextureINTEL(@GLuint int texture); + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/KHR_debug.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/KHR_debug.java new file mode 100644 index 0000000..4ae7543 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/KHR_debug.java @@ -0,0 +1,233 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +public interface KHR_debug { + + /** + * Tokens accepted by the <target> parameters of Enable, Disable, and + * IsEnabled: + */ + int GL_DEBUG_OUTPUT = 0x92E0, + GL_DEBUG_OUTPUT_SYNCHRONOUS = 0x8242; + + /** Returned by GetIntegerv when <pname> is CONTEXT_FLAGS: */ + int GL_CONTEXT_FLAG_DEBUG_BIT = 0x00000002; + + /** + * Tokens accepted by the <value> parameters of GetBooleanv, GetIntegerv, + * GetFloatv, GetDoublev and GetInteger64v: + */ + int GL_MAX_DEBUG_MESSAGE_LENGTH = 0x9143, + GL_MAX_DEBUG_LOGGED_MESSAGES = 0x9144, + GL_DEBUG_LOGGED_MESSAGES = 0x9145, + GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH = 0x8243, + GL_MAX_DEBUG_GROUP_STACK_DEPTH = 0x826C, + GL_DEBUG_GROUP_STACK_DEPTH = 0x826D, + GL_MAX_LABEL_LENGTH = 0x82E8; + + /** Tokens accepted by the <pname> parameter of GetPointerv: */ + int GL_DEBUG_CALLBACK_FUNCTION = 0x8244, + GL_DEBUG_CALLBACK_USER_PARAM = 0x8245; + + /** + * Tokens accepted or provided by the <source> parameters of + * DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <sources> + * parameter of GetDebugMessageLog: + */ + int GL_DEBUG_SOURCE_API = 0x8246, + GL_DEBUG_SOURCE_WINDOW_SYSTEM = 0x8247, + GL_DEBUG_SOURCE_SHADER_COMPILER = 0x8248, + GL_DEBUG_SOURCE_THIRD_PARTY = 0x8249, + GL_DEBUG_SOURCE_APPLICATION = 0x824A, + GL_DEBUG_SOURCE_OTHER = 0x824B; + + /** + * Tokens accepted or provided by the <type> parameters of + * DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <types> + * parameter of GetDebugMessageLog: + */ + int GL_DEBUG_TYPE_ERROR = 0x824C, + GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR = 0x824D, + GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR = 0x824E, + GL_DEBUG_TYPE_PORTABILITY = 0x824F, + GL_DEBUG_TYPE_PERFORMANCE = 0x8250, + GL_DEBUG_TYPE_OTHER = 0x8251, + GL_DEBUG_TYPE_MARKER = 0x8268; + + /** + * Tokens accepted or provided by the <type> parameters of + * DebugMessageControl and DEBUGPROC, and the <types> parameter of + * GetDebugMessageLog: + */ + int GL_DEBUG_TYPE_PUSH_GROUP = 0x8269, + GL_DEBUG_TYPE_POP_GROUP = 0x826A; + + /** + * Tokens accepted or provided by the <severity> parameters of + * DebugMessageControl, DebugMessageInsert and DEBUGPROC callback functions, + * and the <severities> parameter of GetDebugMessageLog: + */ + int GL_DEBUG_SEVERITY_HIGH = 0x9146, + GL_DEBUG_SEVERITY_MEDIUM = 0x9147, + GL_DEBUG_SEVERITY_LOW = 0x9148, + GL_DEBUG_SEVERITY_NOTIFICATION = 0x826B; + + /** Returned by GetError: */ + int GL_STACK_UNDERFLOW = 0x0504, + GL_STACK_OVERFLOW = 0x0503; + + /** + * Tokens accepted or provided by the <identifier> parameters of + * ObjectLabel and GetObjectLabel: + */ + int GL_BUFFER = 0x82E0, + GL_SHADER = 0x82E1, + GL_PROGRAM = 0x82E2, + GL_QUERY = 0x82E3, + GL_PROGRAM_PIPELINE = 0x82E4, + GL_SAMPLER = 0x82E6, + GL_DISPLAY_LIST = 0x82E7; + + // ----------------------------- + + @Reuse("GL43") + void glDebugMessageControl(@GLenum int source, + @GLenum int type, + @GLenum int severity, + @AutoSize(value = "ids", canBeNull = true) @GLsizei int count, + @Check(canBeNull = true) @Const @GLuint IntBuffer ids, + boolean enabled); + + @Reuse("GL43") + void glDebugMessageInsert(@GLenum int source, + @GLenum int type, + @GLuint int id, + @GLenum int severity, + @AutoSize("buf") @GLsizei int length, + @Const @GLchar ByteBuffer buf); + + @Reuse("GL43") + @Alternate("glDebugMessageInsert") + void glDebugMessageInsert(@GLenum int source, + @GLenum int type, + @GLuint int id, + @GLenum int severity, + @Constant("buf.length()") @GLsizei int length, + CharSequence buf); + + /** + * The {@code KHRDebugCallback.Handler} implementation passed to this method will be used for + * KHR_debug messages. If callback is null, any previously registered handler for the current + * thread will be unregistered and stop receiving messages. + * + * @param callback the callback function to use + */ + @Reuse("GL43") + void glDebugMessageCallback(@PointerWrapper(value = "GLDEBUGPROC", canBeNull = true) KHRDebugCallback callback, + @Constant("userParam") @PointerWrapper("GLvoid *") long userParam); + + @Reuse("GL43") + @GLuint + int glGetDebugMessageLog(@GLuint int count, + @AutoSize(value = "messageLog", canBeNull = true) @GLsizei int bufsize, + @Check(value = "count", canBeNull = true) @GLenum IntBuffer sources, + @Check(value = "count", canBeNull = true) @GLenum IntBuffer types, + @Check(value = "count", canBeNull = true) @GLuint IntBuffer ids, + @Check(value = "count", canBeNull = true) @GLenum IntBuffer severities, + @Check(value = "count", canBeNull = true) @GLsizei IntBuffer lengths, + @Check(canBeNull = true) @OutParameter @GLchar ByteBuffer messageLog); + + // Not really useful and a pain to implement in Java + // void glGetPointerv(@GLenum int pname, void** params); + + @Reuse("GL43") + void glPushDebugGroup(@GLenum int source, @GLuint int id, @AutoSize("message") @GLsizei int length, + @Const @GLchar ByteBuffer message); + + @Reuse("GL43") + @Alternate("glPushDebugGroup") + void glPushDebugGroup(@GLenum int source, @GLuint int id, @Constant("message.length()") @GLsizei int length, + CharSequence message); + + @Reuse("GL43") + void glPopDebugGroup(); + + @Reuse("GL43") + void glObjectLabel(@GLenum int identifier, @GLuint int name, @AutoSize(value = "label", canBeNull = true) @GLsizei int length, + @Check(canBeNull = true) @Const @GLchar ByteBuffer label); + + @Reuse("GL43") + @Alternate("glObjectLabel") + void glObjectLabel(@GLenum int identifier, @GLuint int name, @Constant("label.length()") @GLsizei int length, + CharSequence label); + + @Reuse("GL43") + void glGetObjectLabel(@GLenum int identifier, @GLuint int name, @AutoSize("label") @GLsizei int bufSize, + @OutParameter @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length, + @OutParameter @GLchar ByteBuffer label); + + @Reuse("GL43") + @Alternate("glGetObjectLabel") + @GLreturn(value = "label", maxLength = "bufSize") + void glGetObjectLabel2(@GLenum int identifier, @GLuint int name, @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(label_length)") IntBuffer length, + @OutParameter @GLchar ByteBuffer label); + + @Reuse("GL43") + void glObjectPtrLabel(@PointerWrapper("GLvoid *") org.lwjgl.PointerWrapper ptr, @AutoSize(value = "label", canBeNull = true) @GLsizei int length, + @Check(canBeNull = true) @Const @GLchar ByteBuffer label); + + @Reuse("GL43") + @Alternate("glObjectPtrLabel") + void glObjectPtrLabel(@PointerWrapper("GLvoid *") org.lwjgl.PointerWrapper ptr, @Constant("label.length()") @GLsizei int length, + CharSequence label); + + @Reuse("GL43") + void glGetObjectPtrLabel(@PointerWrapper("GLvoid *") org.lwjgl.PointerWrapper ptr, @AutoSize("label") @GLsizei int bufSize, + @OutParameter @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length, + @OutParameter @GLchar ByteBuffer label); + + @Reuse("GL43") + @Alternate("glGetObjectPtrLabel") + @GLreturn(value = "label", maxLength = "bufSize") + void glGetObjectPtrLabel2(@PointerWrapper("GLvoid *") org.lwjgl.PointerWrapper ptr, @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(label_length)") IntBuffer length, + @OutParameter @GLchar ByteBuffer label); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/KHR_texture_compression_astc_ldr.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/KHR_texture_compression_astc_ldr.java new file mode 100644 index 0000000..6045c60 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/KHR_texture_compression_astc_ldr.java @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface KHR_texture_compression_astc_ldr { + + /** + * Accepted by the <internalformat> parameter of CompressedTexImage2D, + * CompressedTexSubImage2D, TexStorage2D, TextureStorage2D, TexStorage3D, + * and TextureStorage3D: + */ + int GL_COMPRESSED_RGBA_ASTC_4x4_KHR = 0x93B0, + GL_COMPRESSED_RGBA_ASTC_5x4_KHR = 0x93B1, + GL_COMPRESSED_RGBA_ASTC_5x5_KHR = 0x93B2, + GL_COMPRESSED_RGBA_ASTC_6x5_KHR = 0x93B3, + GL_COMPRESSED_RGBA_ASTC_6x6_KHR = 0x93B4, + GL_COMPRESSED_RGBA_ASTC_8x5_KHR = 0x93B5, + GL_COMPRESSED_RGBA_ASTC_8x6_KHR = 0x93B6, + GL_COMPRESSED_RGBA_ASTC_8x8_KHR = 0x93B7, + GL_COMPRESSED_RGBA_ASTC_10x5_KHR = 0x93B8, + GL_COMPRESSED_RGBA_ASTC_10x6_KHR = 0x93B9, + GL_COMPRESSED_RGBA_ASTC_10x8_KHR = 0x93BA, + GL_COMPRESSED_RGBA_ASTC_10x10_KHR = 0x93BB, + GL_COMPRESSED_RGBA_ASTC_12x10_KHR = 0x93BC, + GL_COMPRESSED_RGBA_ASTC_12x12_KHR = 0x93BD, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR = 0x93D0, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR = 0x93D1, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR = 0x93D2, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR = 0x93D3, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR = 0x93D4, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR = 0x93D5, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR = 0x93D6, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR = 0x93D7, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR = 0x93D8, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR = 0x93D9, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR = 0x93DA, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR = 0x93DB, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR = 0x93DC, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR = 0x93DD; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NVX_gpu_memory_info.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NVX_gpu_memory_info.java new file mode 100644 index 0000000..694e719 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NVX_gpu_memory_info.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +/** Experimental extension, may be removed/changed in the future. */ +public interface NVX_gpu_memory_info { + + /** Accepted by the <pname> parameter of GetIntegerv: */ + int GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX = 0x9047; + int GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX = 0x9048; + int GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX = 0x9049; + int GL_GPU_MEMORY_INFO_EVICTION_COUNT_NVX = 0x904A; + int GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX = 0x904B; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_bindless_multi_draw_indirect.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_bindless_multi_draw_indirect.java new file mode 100644 index 0000000..a112484 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_bindless_multi_draw_indirect.java @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2002-2013 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.BufferKind; +import org.lwjgl.util.generator.BufferObject; +import org.lwjgl.util.generator.Check; +import org.lwjgl.util.generator.Const; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLvoid; + +import java.nio.ByteBuffer; + +public interface NV_bindless_multi_draw_indirect { + + void glMultiDrawArraysIndirectBindlessNV(@GLenum int mode, + @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 20 + 24 * vertexBufferCount : stride) * drawCount") @Const @GLvoid ByteBuffer indirect, + @GLsizei int drawCount, + @GLsizei int stride, + int vertexBufferCount); + + void glMultiDrawElementsIndirectBindlessNV(@GLenum int mode, + @GLenum int type, + @BufferObject(BufferKind.IndirectBO) @Check("(stride == 0 ? 48 + 24 * vertexBufferCount : stride) * drawCount") @Const @GLvoid ByteBuffer indirect, + @GLsizei int drawCount, + @GLsizei int stride, + int vertexBufferCount); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_bindless_texture.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_bindless_texture.java new file mode 100644 index 0000000..a154997 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_bindless_texture.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.AutoSize; +import org.lwjgl.util.generator.Const; +import org.lwjgl.util.generator.StripPostfix; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; +import org.lwjgl.util.generator.opengl.GLuint64; + +import java.nio.LongBuffer; + +public interface NV_bindless_texture { + + @GLuint64 + long glGetTextureHandleNV(@GLuint int texture); + + @GLuint64 + long glGetTextureSamplerHandleNV(@GLuint int texture, @GLuint int sampler); + + void glMakeTextureHandleResidentNV(@GLuint64 long handle); + + void glMakeTextureHandleNonResidentNV(@GLuint64 long handle); + + @GLuint64 + long glGetImageHandleNV(@GLuint int texture, int level, boolean layered, + int layer, @GLenum int format); + + void glMakeImageHandleResidentNV(@GLuint64 long handle, @GLenum int access); + + void glMakeImageHandleNonResidentNV(@GLuint64 long handle); + + void glUniformHandleui64NV(int location, @GLuint64 long value); + + @StripPostfix("value") + void glUniformHandleui64vNV(int location, @AutoSize("value") @GLsizei int count, @Const @GLuint64 LongBuffer value); + + void glProgramUniformHandleui64NV(@GLuint int program, int location, + @GLuint64 long value); + + @StripPostfix("values") + void glProgramUniformHandleui64vNV(@GLuint int program, int location, + @AutoSize("values") @GLsizei int count, @Const @GLuint64 LongBuffer values); + + boolean glIsTextureHandleResidentNV(@GLuint64 long handle); + + boolean glIsImageHandleResidentNV(@GLuint64 long handle); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_blend_equation_advanced.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_blend_equation_advanced.java new file mode 100644 index 0000000..4856ddf --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_blend_equation_advanced.java @@ -0,0 +1,105 @@ +/* + * Copyright (c) 2002-2013 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLenum; + +public interface NV_blend_equation_advanced { + + /** + * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, and by + * the <pname> parameter of GetIntegerv, GetBooleanv, GetFloatv, GetDoublev + * and GetInteger64v: + */ + int GL_BLEND_ADVANCED_COHERENT_NV = 0x9285; + + /** + * Accepted by the <pname> parameter of BlendParameteriNV, GetBooleanv, + * GetIntegerv, GetInteger64v, GetFloatv, and GetDoublev: + */ + int GL_BLEND_PREMULTIPLIED_SRC_NV = 0x9280, + GL_BLEND_OVERLAP_NV = 0x9281; + + /** + * Accepted by the <value> parameter of BlendParameteriNV when <pname> is + * BLEND_OVERLAP_NV: + */ + int GL_UNCORRELATED_NV = 0x9282, + GL_DISJOINT_NV = 0x9283, + GL_CONJOINT_NV = 0x9284; + + /** Accepted by the <mode> parameter of BlendEquation and BlendEquationi: */ + int GL_SRC_NV = 0x9286, + GL_DST_NV = 0x9287, + GL_SRC_OVER_NV = 0x9288, + GL_DST_OVER_NV = 0x9289, + GL_SRC_IN_NV = 0x928A, + GL_DST_IN_NV = 0x928B, + GL_SRC_OUT_NV = 0x928C, + GL_DST_OUT_NV = 0x928D, + GL_SRC_ATOP_NV = 0x928E, + GL_DST_ATOP_NV = 0x928F, + GL_MULTIPLY_NV = 0x9294, + GL_SCREEN_NV = 0x9295, + GL_OVERLAY_NV = 0x9296, + GL_DARKEN_NV = 0x9297, + GL_LIGHTEN_NV = 0x9298, + GL_COLORDODGE_NV = 0x9299, + GL_COLORBURN_NV = 0x929A, + GL_HARDLIGHT_NV = 0x929B, + GL_SOFTLIGHT_NV = 0x929C, + GL_DIFFERENCE_NV = 0x929E, + GL_EXCLUSION_NV = 0x92A0, + GL_INVERT_RGB_NV = 0x92A3, + GL_LINEARDODGE_NV = 0x92A4, + GL_LINEARBURN_NV = 0x92A5, + GL_VIVIDLIGHT_NV = 0x92A6, + GL_LINEARLIGHT_NV = 0x92A7, + GL_PINLIGHT_NV = 0x92A8, + GL_HARDMIX_NV = 0x92A9, + GL_HSL_HUE_NV = 0x92AD, + GL_HSL_SATURATION_NV = 0x92AE, + GL_HSL_COLOR_NV = 0x92AF, + GL_HSL_LUMINOSITY_NV = 0x92B0, + GL_PLUS_NV = 0x9291, + GL_PLUS_CLAMPED_NV = 0x92B1, + GL_PLUS_CLAMPED_ALPHA_NV = 0x92B2, + GL_PLUS_DARKER_NV = 0x9292, + GL_MINUS_NV = 0x929F, + GL_MINUS_CLAMPED_NV = 0x92B3, + GL_CONTRAST_NV = 0x92A1, + GL_INVERT_OVG_NV = 0x92B4; + + void glBlendParameteriNV(@GLenum int pname, int value); + + void glBlendBarrierNV(); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_blend_square.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_blend_square.java new file mode 100644 index 0000000..fc61d50 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_blend_square.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_blend_square { +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_compute_program5.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_compute_program5.java new file mode 100644 index 0000000..9298e12 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_compute_program5.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_compute_program5 { + + /** + * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, + * by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev, and by the <target> parameter of ProgramStringARB, + * BindProgramARB, ProgramEnvParameter4[df][v]ARB, + * ProgramLocalParameter4[df][v]ARB, GetProgramEnvParameter[df]vARB, + * GetProgramLocalParameter[df]vARB, GetProgramivARB and + * GetProgramStringARB: + */ + int GL_COMPUTE_PROGRAM_NV = 0x90FB; + + /** + * Accepted by the <target> parameter of ProgramBufferParametersfvNV, + * ProgramBufferParametersIivNV, and ProgramBufferParametersIuivNV, + * BindBufferRangeNV, BindBufferOffsetNV, BindBufferBaseNV, and BindBuffer + * and the <value> parameter of GetIntegerIndexedvEXT: + */ + int GL_COMPUTE_PROGRAM_PARAMETER_BUFFER_NV = 0x90FC; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_conditional_render.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_conditional_render.java new file mode 100644 index 0000000..a562316 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_conditional_render.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface NV_conditional_render { + + /** + * Accepted by the <mode> parameter of BeginConditionalRenderNV: + */ + int GL_QUERY_WAIT_NV = 0x8E13; + int GL_QUERY_NO_WAIT_NV = 0x8E14; + int GL_QUERY_BY_REGION_WAIT_NV = 0x8E15; + int GL_QUERY_BY_REGION_NO_WAIT_NV = 0x8E16; + + void glBeginConditionalRenderNV(@GLuint int id, @GLenum int mode); + void glEndConditionalRenderNV(); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_copy_depth_to_color.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_copy_depth_to_color.java new file mode 100644 index 0000000..4c9acb2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_copy_depth_to_color.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_copy_depth_to_color { + int GL_DEPTH_STENCIL_TO_RGBA_NV = 0x886E; + int GL_DEPTH_STENCIL_TO_BGRA_NV = 0x886F; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_copy_image.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_copy_image.java new file mode 100644 index 0000000..9abdd42 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_copy_image.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface NV_copy_image { + + void glCopyImageSubDataNV( + @GLuint int srcName, @GLenum int srcTarget, int srcLevel, + int srcX, int srcY, int srcZ, + @GLuint int dstName, @GLenum int dstTarget, int dstLevel, + int dstX, int dstY, int dstZ, + @GLsizei int width, @GLsizei int height, @GLsizei int depth); + + // TODO: Implement WGL and GLX cross-context copying. + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_deep_texture3D.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_deep_texture3D.java new file mode 100644 index 0000000..bb73152 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_deep_texture3D.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_deep_texture3D { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv + * and GetFloatv: + */ + int GL_MAX_DEEP_3D_TEXTURE_WIDTH_HEIGHT_NV = 0x90D0, + GL_MAX_DEEP_3D_TEXTURE_DEPTH_NV = 0x90D1; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_depth_buffer_float.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_depth_buffer_float.java new file mode 100644 index 0000000..b842e1f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_depth_buffer_float.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_depth_buffer_float { + + /** + * Accepted by the <internalformat> parameter of TexImage1D, TexImage2D, + * TexImage3D, CopyTexImage1D, CopyTexImage2D, and RenderbufferStorageEXT, + * and returned in the <data> parameter of GetTexLevelParameter and + * GetRenderbufferParameterivEXT: + */ + int GL_DEPTH_COMPONENT32F_NV = 0x8DAB; + int GL_DEPTH32F_STENCIL8_NV = 0x8DAC; + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, TexImage1D, + * TexImage2D, TexImage3D, TexSubImage1D, TexSubImage2D, TexSubImage3D, and + * GetTexImage: + */ + int GL_FLOAT_32_UNSIGNED_INT_24_8_REV_NV = 0x8DAD; + + /** + * Accepted by the <pname> parameters of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_DEPTH_BUFFER_FLOAT_MODE_NV = 0x8DAF; + + void glDepthRangedNV(double n, double f); + + void glClearDepthdNV(double d); + + void glDepthBoundsdNV(double zmin, double zmax); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_depth_clamp.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_depth_clamp.java new file mode 100644 index 0000000..33b81d6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_depth_clamp.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_depth_clamp { + int GL_DEPTH_CLAMP_NV = 0x864F; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_draw_texture.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_draw_texture.java new file mode 100644 index 0000000..3dfa462 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_draw_texture.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLfloat; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface NV_draw_texture { + + void glDrawTextureNV(@GLuint int texture, @GLuint int sampler, + @GLfloat float x0, @GLfloat float y0, + @GLfloat float x1, @GLfloat float y1, + @GLfloat float z, + @GLfloat float s0, @GLfloat float t0, + @GLfloat float s1, @GLfloat float t1); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_evaluators.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_evaluators.java new file mode 100644 index 0000000..e72613c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_evaluators.java @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLfloat; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.*; + +public interface NV_evaluators { + int GL_EVAL_2D_NV = 0x86C0; + int GL_EVAL_TRIANGULAR_2D_NV = 0x86C1; + int GL_MAP_TESSELLATION_NV = 0x86C2; + int GL_MAP_ATTRIB_U_ORDER_NV = 0x86C3; + int GL_MAP_ATTRIB_V_ORDER_NV = 0x86C4; + int GL_EVAL_FRACTIONAL_TESSELLATION_NV = 0x86C5; + int GL_EVAL_VERTEX_ATTRIB0_NV = 0x86C6; + int GL_EVAL_VERTEX_ATTRIB1_NV = 0x86C7; + int GL_EVAL_VERTEX_ATTRIB2_NV = 0x86C8; + int GL_EVAL_VERTEX_ATTRIB3_NV = 0x86C9; + int GL_EVAL_VERTEX_ATTRIB4_NV = 0x86CA; + int GL_EVAL_VERTEX_ATTRIB5_NV = 0x86CB; + int GL_EVAL_VERTEX_ATTRIB6_NV = 0x86CC; + int GL_EVAL_VERTEX_ATTRIB7_NV = 0x86CD; + int GL_EVAL_VERTEX_ATTRIB8_NV = 0x86CE; + int GL_EVAL_VERTEX_ATTRIB9_NV = 0x86CF; + int GL_EVAL_VERTEX_ATTRIB10_NV = 0x86D0; + int GL_EVAL_VERTEX_ATTRIB11_NV = 0x86D1; + int GL_EVAL_VERTEX_ATTRIB12_NV = 0x86D2; + int GL_EVAL_VERTEX_ATTRIB13_NV = 0x86D3; + int GL_EVAL_VERTEX_ATTRIB14_NV = 0x86D4; + int GL_EVAL_VERTEX_ATTRIB15_NV = 0x86D5; + int GL_MAX_MAP_TESSELLATION_NV = 0x86D6; + int GL_MAX_RATIONAL_EVAL_ORDER_NV = 0x86D7; + + void glGetMapControlPointsNV(@GLenum int target, @GLuint int index, @GLenum int type, @GLsizei int ustride, @GLsizei int vstride, boolean packed, + @OutParameter + @Check + @Const + @GLfloat Buffer pPoints); + + void glMapControlPointsNV(@GLenum int target, @GLuint int index, @GLenum int type, @GLsizei int ustride, @GLsizei int vstride, int uorder, int vorder, boolean packed, @Check @Const @GLfloat Buffer pPoints); + + @StripPostfix("params") + void glMapParameterfvNV(@GLenum int target, @GLenum int pname, @Check("4") @Const FloatBuffer params); + + @StripPostfix("params") + void glMapParameterivNV(@GLenum int target, @GLenum int pname, @Check("4") @Const IntBuffer params); + + @StripPostfix("params") + void glGetMapParameterfvNV(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") @Const FloatBuffer params); + + @StripPostfix("params") + void glGetMapParameterivNV(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") @Const IntBuffer params); + + @StripPostfix("params") + void glGetMapAttribParameterfvNV(@GLenum int target, @GLuint int index, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params); + + @StripPostfix("params") + void glGetMapAttribParameterivNV(@GLenum int target, @GLuint int index, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + void glEvalMapsNV(@GLenum int target, @GLenum int mode); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_explicit_multisample.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_explicit_multisample.java new file mode 100644 index 0000000..fb5c05b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_explicit_multisample.java @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.ByteBuffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; + +public interface NV_explicit_multisample { + + /** Accepted by the <pname> parameter of GetMultisamplefvNV: */ + int GL_SAMPLE_POSITION_NV = 0x8E50; + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, and by + * the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev: + */ + + int GL_SAMPLE_MASK_NV = 0x8E51; + + /** + * Accepted by the <pname> parameter of GetBooleanIndexedvEXT and + * GetIntegerIndexedvEXT: + */ + + int GL_SAMPLE_MASK_VALUE_NV = 0x8E52; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv, + * and GetFloatv: + */ + + int GL_TEXTURE_BINDING_RENDERBUFFER_NV = 0x8E53; + int GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV = 0x8E54; + int GL_MAX_SAMPLE_MASK_WORDS_NV = 0x8E59; + + /** Accepted by the <target> parameter of BindTexture, and TexRenderbufferNV: */ + + int GL_TEXTURE_RENDERBUFFER_NV = 0x8E55; + + /** Returned by the <type> parameter of GetActiveUniform: */ + int GL_SAMPLER_RENDERBUFFER_NV = 0x8E56; + int GL_INT_SAMPLER_RENDERBUFFER_NV = 0x8E57; + int GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV = 0x8E58; + + @Reuse("EXTDrawBuffers2") + @StripPostfix(value = "data", extension = "EXT") + void glGetBooleanIndexedvEXT(@GLenum int pname, @GLuint int index, @OutParameter @Check("4") @GLboolean ByteBuffer data); + + @Reuse("EXTDrawBuffers2") + @Alternate("glGetBooleanIndexedvEXT") + @GLreturn("data") + @StripPostfix(value = "data", extension = "EXT") + void glGetBooleanIndexedvEXT2(@GLenum int pname, @GLuint int index, @OutParameter @GLboolean ByteBuffer data); + + @Reuse("EXTDrawBuffers2") + @StripPostfix(value = "data", extension = "EXT") + void glGetIntegerIndexedvEXT(@GLenum int pname, @GLuint int index, @OutParameter @Check("16") IntBuffer data); + + @Reuse("EXTDrawBuffers2") + @Alternate("glGetIntegerIndexedvEXT") + @GLreturn("data") + @StripPostfix(value = "data", extension = "EXT") + void glGetIntegerIndexedvEXT2(@GLenum int pname, @GLuint int index, @OutParameter IntBuffer data); + + @StripPostfix("val") + void glGetMultisamplefvNV(@GLenum int pname, @GLuint int index, @OutParameter @Check("2") FloatBuffer val); + + void glSampleMaskIndexedNV(@GLuint int index, @GLbitfield int mask); + + void glTexRenderbufferNV(@GLenum int target, @GLuint int renderbuffer); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_fence.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_fence.java new file mode 100644 index 0000000..b52844b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_fence.java @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLreturn; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.*; + +public interface NV_fence { + int GL_ALL_COMPLETED_NV = 0x84F2; + int GL_FENCE_STATUS_NV = 0x84F3; + int GL_FENCE_CONDITION_NV = 0x84F4; + + void glGenFencesNV(@AutoSize("piFences") @GLsizei int n, @OutParameter @GLuint IntBuffer piFences); + + @Alternate("glGenFencesNV") + @GLreturn("piFences") + void glGenFencesNV2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer piFences); + + void glDeleteFencesNV(@AutoSize("piFences") @GLsizei int n, @Const @GLuint IntBuffer piFences); + + @Alternate("glDeleteFencesNV") + void glDeleteFencesNV(@Constant("1") @GLsizei int n, @Const @GLuint @Constant(value = "APIUtil.getInt(caps, fence)", keepParam = true) int fence); + + void glSetFenceNV(@GLuint int fence, @GLenum int condition); + + boolean glTestFenceNV(@GLuint int fence); + + void glFinishFenceNV(@GLuint int fence); + + boolean glIsFenceNV(@GLuint int fence); + + void glGetFenceivNV(@GLuint int fence, @GLenum int pname, @OutParameter @Check("4") IntBuffer piParams); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_float_buffer.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_float_buffer.java new file mode 100644 index 0000000..343aa95 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_float_buffer.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_float_buffer { + + /** + * Accepted by the <internalformat> parameter of TexImage2D and + * CopyTexImage2D: + */ + int GL_FLOAT_R_NV = 0x8880; + int GL_FLOAT_RG_NV = 0x8881; + int GL_FLOAT_RGB_NV = 0x8882; + int GL_FLOAT_RGBA_NV = 0x8883; + int GL_FLOAT_R16_NV = 0x8884; + int GL_FLOAT_R32_NV = 0x8885; + int GL_FLOAT_RG16_NV = 0x8886; + int GL_FLOAT_RG32_NV = 0x8887; + int GL_FLOAT_RGB16_NV = 0x8888; + int GL_FLOAT_RGB32_NV = 0x8889; + int GL_FLOAT_RGBA16_NV = 0x888A; + int GL_FLOAT_RGBA32_NV = 0x888B; + + /** + * Accepted by the <pname> parameter of GetTexLevelParameterfv and + * GetTexLevelParameteriv: + */ + int GL_TEXTURE_FLOAT_COMPONENTS_NV = 0x888C; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + int GL_FLOAT_CLEAR_COLOR_VALUE_NV = 0x888D; + int GL_FLOAT_RGBA_MODE_NV = 0x888E; + + /** + * Accepted in the <piAttributes> array of wglGetPixelFormatAttribivARB and + * wglGetPixelFormatAttribfvARB and in the <piAttribIList> and + * <pfAttribFList> arrays of wglChoosePixelFormatARB: + */ + /* + int WGL_FLOAT_COMPONENTS_NV = 0x20B0; + int WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV = 0x20B1; + int WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV = 0x20B2; + int WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV = 0x20B3; + int WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV = 0x20B4; + */ + + /** + * Accepted in the <piAttribIList> array of wglCreatePbufferARB and returned + * in the <value> parameter of wglQueryPbufferARB when <iAttribute> is + * WGL_TEXTURE_FORMAT_ARB: + */ + /* + int WGL_TEXTURE_FLOAT_R_NV = 0x20B5; + int WGL_TEXTURE_FLOAT_RG_NV = 0x20B6; + int WGL_TEXTURE_FLOAT_RGB_NV = 0x20B7; + int WGL_TEXTURE_FLOAT_RGBA_NV = 0x20B8; + */ + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_fog_distance.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_fog_distance.java new file mode 100644 index 0000000..201d738 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_fog_distance.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_fog_distance { + int GL_FOG_DISTANCE_MODE_NV = 0x855A; + int GL_EYE_RADIAL_NV = 0x855B; + int GL_EYE_PLANE_ABSOLUTE_NV = 0x855C; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_fragment_program.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_fragment_program.java new file mode 100644 index 0000000..5cfc981 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_fragment_program.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLubyte; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.*; + +public interface NV_fragment_program extends NV_program { + + /** + * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, by the + * <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev, + * and by the <target> parameter of BindProgramNV, LoadProgramNV, + * ProgramLocalParameter4dARB, ProgramLocalParameter4dvARB, + * ProgramLocalParameter4fARB, ProgramLocalParameter4fvARB, + * GetProgramLocalParameterdvARB, and GetProgramLocalParameterfvARB: + */ + int GL_FRAGMENT_PROGRAM_NV = 0x8870; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + int GL_MAX_TEXTURE_COORDS_NV = 0x8871; + int GL_MAX_TEXTURE_IMAGE_UNITS_NV = 0x8872; + int GL_FRAGMENT_PROGRAM_BINDING_NV = 0x8873; + int GL_MAX_FRAGMENT_PROGRAM_LOCAL_PARAMETERS_NV = 0x8868; + + void glProgramNamedParameter4fNV(@GLuint int id, @AutoSize("name") @GLsizei int length, @Const @GLubyte ByteBuffer name, float x, float y, float z, float w); + + void glProgramNamedParameter4dNV(@GLuint int id, @AutoSize("name") @GLsizei int length, @Const @GLubyte ByteBuffer name, double x, double y, double z, double w); + + @StripPostfix("params") + void glGetProgramNamedParameterfvNV(@GLuint int id, @AutoSize("name") @GLsizei int length, @Const @GLubyte ByteBuffer name, @OutParameter @Check("4") FloatBuffer params); + + @StripPostfix("params") + void glGetProgramNamedParameterdvNV(@GLuint int id, @AutoSize("name") @GLsizei int length, @Const @GLubyte ByteBuffer name, @OutParameter @Check("4") DoubleBuffer params); +} + diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_fragment_program2.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_fragment_program2.java new file mode 100644 index 0000000..edb8c38 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_fragment_program2.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_fragment_program2 { + + /** + * Accepted by the <pname> parameter of GetProgramivARB: + */ + int GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV = 0x88F4; + int GL_MAX_PROGRAM_CALL_DEPTH_NV = 0x88F5; + int GL_MAX_PROGRAM_IF_DEPTH_NV = 0x88F6; + int GL_MAX_PROGRAM_LOOP_DEPTH_NV = 0x88F7; + int GL_MAX_PROGRAM_LOOP_COUNT_NV = 0x88F8; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_fragment_program4.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_fragment_program4.java new file mode 100644 index 0000000..a9f594d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_fragment_program4.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_fragment_program4 { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_fragment_program_option.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_fragment_program_option.java new file mode 100644 index 0000000..56e04b1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_fragment_program_option.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_fragment_program_option { +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_framebuffer_multisample_coverage.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_framebuffer_multisample_coverage.java new file mode 100644 index 0000000..cc84955 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_framebuffer_multisample_coverage.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; + +public interface NV_framebuffer_multisample_coverage { + + /** Accepted by the <pname> parameter of GetRenderbufferParameterivEXT. */ + int GL_RENDERBUFFER_COVERAGE_SAMPLES_NV = 0x8CAB; + int GL_RENDERBUFFER_COLOR_SAMPLES_NV = 0x8E10; + + /** Accepted by the <pname> parameter of GetIntegerv. */ + int GL_MAX_MULTISAMPLE_COVERAGE_MODES_NV = 0x8E11; + int GL_MULTISAMPLE_COVERAGE_MODES_NV = 0x8E12; + + void glRenderbufferStorageMultisampleCoverageNV(@GLenum int target, @GLsizei int coverageSamples, @GLsizei int colorSamples, + @GLenum int internalformat, @GLsizei int width, @GLsizei int height); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_geometry_program4.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_geometry_program4.java new file mode 100644 index 0000000..618aa65 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_geometry_program4.java @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.Reuse; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface NV_geometry_program4 { + + /** + * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, and by + * the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev: + */ + int GL_GEOMETRY_PROGRAM_NV = 0x8C26; + + /** Accepted by the <pname> parameter of GetProgramivARB: */ + int GL_MAX_PROGRAM_OUTPUT_VERTICES_NV = 0x8C27; + int GL_MAX_PROGRAM_TOTAL_OUTPUT_COMPONENTS_NV = 0x8C28; + + void glProgramVertexLimitNV(@GLenum int target, int limit); + + @Reuse("EXTGeometryShader4") + void glFramebufferTextureEXT(@GLenum int target, @GLenum int attachment, @GLuint int texture, int level); + + @Reuse("EXTGeometryShader4") + void glFramebufferTextureLayerEXT(@GLenum int target, @GLenum int attachment, @GLuint int texture, int level, int layer); + + @Reuse("EXTGeometryShader4") + void glFramebufferTextureFaceEXT(@GLenum int target, @GLenum int attachment, @GLuint int texture, int level, @GLenum int face); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_geometry_shader4.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_geometry_shader4.java new file mode 100644 index 0000000..b1e173c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_geometry_shader4.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_geometry_shader4 { + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_gpu_program4.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_gpu_program4.java new file mode 100644 index 0000000..f2105c7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_gpu_program4.java @@ -0,0 +1,111 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.IntBuffer; + +public interface NV_gpu_program4 { + + /** Accepted by the <pname> parameter of GetProgramivARB: */ + int GL_PROGRAM_ATTRIB_COMPONENTS_NV = 0x8906; + int GL_PROGRAM_RESULT_COMPONENTS_NV = 0x8907; + int GL_MAX_PROGRAM_ATTRIB_COMPONENTS_NV = 0x8908; + int GL_MAX_PROGRAM_RESULT_COMPONENTS_NV = 0x8909; + int GL_MAX_PROGRAM_GENERIC_ATTRIBS_NV = 0x8DA5; + int GL_MAX_PROGRAM_GENERIC_RESULTS_NV = 0x8DA6; + + // --- + + void glProgramLocalParameterI4iNV(@GLenum int target, @GLuint int index, int x, int y, int z, int w); + + @StripPostfix("params") + void glProgramLocalParameterI4ivNV(@GLenum int target, @GLuint int index, @Check("4") @Const IntBuffer params); + + @StripPostfix("params") + void glProgramLocalParametersI4ivNV(@GLenum int target, @GLuint int index, + @AutoSize(value = "params", expression = " >> 2") @GLsizei int count, @Const IntBuffer params); + + // --- + + void glProgramLocalParameterI4uiNV(@GLenum int target, @GLuint int index, @GLuint int x, @GLuint int y, @GLuint int z, @GLuint int w); + + @StripPostfix("params") + void glProgramLocalParameterI4uivNV(@GLenum int target, @GLuint int index, @Check("4") @Const @GLuint IntBuffer params); + + @StripPostfix("params") + void glProgramLocalParametersI4uivNV(@GLenum int target, @GLuint int index, + @AutoSize(value = "params", expression = " >> 2") @GLsizei int count, @Const @GLuint IntBuffer params); + + // --- + + void glProgramEnvParameterI4iNV(@GLenum int target, @GLuint int index, int x, int y, int z, int w); + + @StripPostfix("params") + void glProgramEnvParameterI4ivNV(@GLenum int target, @GLuint int index, @Check("4") @Const IntBuffer params); + + @StripPostfix("params") + void glProgramEnvParametersI4ivNV(@GLenum int target, @GLuint int index, + @AutoSize(value = "params", expression = " >> 2") @GLsizei int count, @Const IntBuffer params); + + // --- + + void glProgramEnvParameterI4uiNV(@GLenum int target, @GLuint int index, @GLuint int x, @GLuint int y, @GLuint int z, @GLuint int w); + + @StripPostfix("params") + void glProgramEnvParameterI4uivNV(@GLenum int target, @GLuint int index, @Check("4") @Const @GLuint IntBuffer params); + + @StripPostfix("params") + void glProgramEnvParametersI4uivNV(@GLenum int target, @GLuint int index, + @AutoSize(value = "params", expression = " >> 2") @GLsizei int count, @Const @GLuint IntBuffer params); + + // --- + + @StripPostfix("params") + void glGetProgramLocalParameterIivNV(@GLenum int target, @GLuint int index, @OutParameter @Check("4") IntBuffer params); + + @StripPostfix("params") + void glGetProgramLocalParameterIuivNV(@GLenum int target, @GLuint int index, @OutParameter @Check("4") @GLuint IntBuffer params); + + // --- + + @StripPostfix("params") + void glGetProgramEnvParameterIivNV(@GLenum int target, @GLuint int index, @OutParameter @Check("4")IntBuffer params); + + @StripPostfix("params") + void glGetProgramEnvParameterIuivNV(@GLenum int target, @GLuint int index, @OutParameter @Check("4") @GLuint IntBuffer params); + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_gpu_program5.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_gpu_program5.java new file mode 100644 index 0000000..67385b4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_gpu_program5.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_gpu_program5 { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_MAX_GEOMETRY_PROGRAM_INVOCATIONS_NV = 0x8E5A; + int GL_MIN_FRAGMENT_INTERPOLATION_OFFSET_NV = 0x8E5B; + int GL_MAX_FRAGMENT_INTERPOLATION_OFFSET_NV = 0x8E5C; + int GL_FRAGMENT_PROGRAM_INTERPOLATION_OFFSET_BITS_NV = 0x8E5D; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_gpu_program5_mem_extended.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_gpu_program5_mem_extended.java new file mode 100644 index 0000000..5f1e264 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_gpu_program5_mem_extended.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2013 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_gpu_program5_mem_extended { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_gpu_shader5.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_gpu_shader5.java new file mode 100644 index 0000000..5aef200 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_gpu_shader5.java @@ -0,0 +1,186 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLint64EXT; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; +import org.lwjgl.util.generator.opengl.GLuint64EXT; + +import java.nio.LongBuffer; + +@Dependent +public interface NV_gpu_shader5 { + + /** + * Returned by the <type> parameter of GetActiveAttrib, GetActiveUniform, and + * GetTransformFeedbackVarying: + */ + int GL_INT64_NV = 0x140E; + int GL_UNSIGNED_INT64_NV = 0x140F; + + int GL_INT8_NV = 0x8FE0; + int GL_INT8_VEC2_NV = 0x8FE1; + int GL_INT8_VEC3_NV = 0x8FE2; + int GL_INT8_VEC4_NV = 0x8FE3; + int GL_INT16_NV = 0x8FE4; + int GL_INT16_VEC2_NV = 0x8FE5; + int GL_INT16_VEC3_NV = 0x8FE6; + int GL_INT16_VEC4_NV = 0x8FE7; + int GL_INT64_VEC2_NV = 0x8FE9; + int GL_INT64_VEC3_NV = 0x8FEA; + int GL_INT64_VEC4_NV = 0x8FEB; + int GL_UNSIGNED_INT8_NV = 0x8FEC; + int GL_UNSIGNED_INT8_VEC2_NV = 0x8FED; + int GL_UNSIGNED_INT8_VEC3_NV = 0x8FEE; + int GL_UNSIGNED_INT8_VEC4_NV = 0x8FEF; + int GL_UNSIGNED_INT16_NV = 0x8FF0; + int GL_UNSIGNED_INT16_VEC2_NV = 0x8FF1; + int GL_UNSIGNED_INT16_VEC3_NV = 0x8FF2; + int GL_UNSIGNED_INT16_VEC4_NV = 0x8FF3; + int GL_UNSIGNED_INT64_VEC2_NV = 0x8FF5; + int GL_UNSIGNED_INT64_VEC3_NV = 0x8FF6; + int GL_UNSIGNED_INT64_VEC4_NV = 0x8FF7; + int GL_FLOAT16_NV = 0x8FF8; + int GL_FLOAT16_VEC2_NV = 0x8FF9; + int GL_FLOAT16_VEC3_NV = 0x8FFA; + int GL_FLOAT16_VEC4_NV = 0x8FFB; + + /** Accepted by the <primitiveMode> parameter of BeginTransformFeedback: */ + int GL_PATCHES = ARB_tessellation_shader.GL_PATCHES; + + void glUniform1i64NV(int location, @GLint64EXT long x); + + void glUniform2i64NV(int location, @GLint64EXT long x, @GLint64EXT long y); + + void glUniform3i64NV(int location, @GLint64EXT long x, @GLint64EXT long y, @GLint64EXT long z); + + void glUniform4i64NV(int location, @GLint64EXT long x, @GLint64EXT long y, @GLint64EXT long z, @GLint64EXT long w); + + @StripPostfix("value") + void glUniform1i64vNV(int location, @AutoSize("value") @GLsizei int count, @Const @GLint64EXT LongBuffer value); + + @StripPostfix("value") + void glUniform2i64vNV(int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const @GLint64EXT LongBuffer value); + + @StripPostfix("value") + void glUniform3i64vNV(int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const @GLint64EXT LongBuffer value); + + @StripPostfix("value") + void glUniform4i64vNV(int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const @GLint64EXT LongBuffer value); + + void glUniform1ui64NV(int location, @GLuint64EXT long x); + + void glUniform2ui64NV(int location, @GLuint64EXT long x, @GLuint64EXT long y); + + void glUniform3ui64NV(int location, @GLuint64EXT long x, @GLuint64EXT long y, @GLuint64EXT long z); + + void glUniform4ui64NV(int location, @GLuint64EXT long x, @GLuint64EXT long y, @GLuint64EXT long z, @GLuint64EXT long w); + + @StripPostfix("value") + void glUniform1ui64vNV(int location, @AutoSize("value") @GLsizei int count, @Const @GLuint64EXT LongBuffer value); + + @StripPostfix("value") + void glUniform2ui64vNV(int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const @GLuint64EXT LongBuffer value); + + @StripPostfix("value") + void glUniform3ui64vNV(int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const @GLuint64EXT LongBuffer value); + + @StripPostfix("value") + void glUniform4ui64vNV(int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const @GLuint64EXT LongBuffer value); + + @StripPostfix("params") + void glGetUniformi64vNV(@GLuint int program, int location, @OutParameter @Check("1") @GLint64EXT LongBuffer params); + + @StripPostfix("params") + void glGetUniformui64vNV(@GLuint int program, int location, @OutParameter @Check("1") @GLuint64EXT LongBuffer params); + + // ------------- + + @Dependent("GL_EXT_direct_state_access") + void glProgramUniform1i64NV(@GLuint int program, int location, @GLint64EXT long x); + + @Dependent("GL_EXT_direct_state_access") + void glProgramUniform2i64NV(@GLuint int program, int location, @GLint64EXT long x, @GLint64EXT long y); + + @Dependent("GL_EXT_direct_state_access") + void glProgramUniform3i64NV(@GLuint int program, int location, @GLint64EXT long x, @GLint64EXT long y, @GLint64EXT long z); + + @Dependent("GL_EXT_direct_state_access") + void glProgramUniform4i64NV(@GLuint int program, int location, @GLint64EXT long x, @GLint64EXT long y, @GLint64EXT long z, @GLint64EXT long w); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix("value") + void glProgramUniform1i64vNV(@GLuint int program, int location, @AutoSize("value") @GLsizei int count, @Const @GLint64EXT LongBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix("value") + void glProgramUniform2i64vNV(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const @GLint64EXT LongBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix("value") + void glProgramUniform3i64vNV(@GLuint int program, int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const @GLint64EXT LongBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix("value") + void glProgramUniform4i64vNV(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const @GLint64EXT LongBuffer value); + + @Dependent("GL_EXT_direct_state_access") + void glProgramUniform1ui64NV(@GLuint int program, int location, @GLuint64EXT long x); + + @Dependent("GL_EXT_direct_state_access") + void glProgramUniform2ui64NV(@GLuint int program, int location, @GLuint64EXT long x, @GLuint64EXT long y); + + @Dependent("GL_EXT_direct_state_access") + void glProgramUniform3ui64NV(@GLuint int program, int location, @GLuint64EXT long x, @GLuint64EXT long y, @GLuint64EXT long z); + + @Dependent("GL_EXT_direct_state_access") + void glProgramUniform4ui64NV(@GLuint int program, int location, @GLuint64EXT long x, @GLuint64EXT long y, @GLuint64EXT long z, @GLuint64EXT long w); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix("value") + void glProgramUniform1ui64vNV(@GLuint int program, int location, @AutoSize("value") @GLsizei int count, @Const @GLuint64EXT LongBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix("value") + void glProgramUniform2ui64vNV(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const @GLuint64EXT LongBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix("value") + void glProgramUniform3ui64vNV(@GLuint int program, int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const @GLuint64EXT LongBuffer value); + + @Dependent("GL_EXT_direct_state_access") + @StripPostfix("value") + void glProgramUniform4ui64vNV(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const @GLuint64EXT LongBuffer value); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_half_float.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_half_float.java new file mode 100644 index 0000000..33b6fbc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_half_float.java @@ -0,0 +1,140 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLhalf; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.*; + +public interface NV_half_float { + + /** + * Accepted by the <type> argument of VertexPointer, NormalPointer, + * ColorPointer, TexCoordPointer, FogCoordPointerEXT, + * SecondaryColorPointerEXT, VertexWeightPointerEXT, VertexAttribPointerNV, + * DrawPixels, ReadPixels, TexImage1D, TexImage2D, TexImage3D, TexSubImage1D, + * TexSubImage2D, TexSubImage3D, and GetTexImage: + */ + int GL_HALF_FLOAT_NV = 0x140B; + + @NoErrorCheck + void glVertex2hNV(@GLhalf short x, @GLhalf short y); + + @NoErrorCheck + void glVertex3hNV(@GLhalf short x, @GLhalf short y, @GLhalf short z); + + @NoErrorCheck + void glVertex4hNV(@GLhalf short x, @GLhalf short y, @GLhalf short z, @GLhalf short w); + + @NoErrorCheck + void glNormal3hNV(@GLhalf short nx, @GLhalf short ny, @GLhalf short nz); + + @NoErrorCheck + void glColor3hNV(@GLhalf short red, @GLhalf short green, @GLhalf short blue); + + @NoErrorCheck + void glColor4hNV(@GLhalf short red, @GLhalf short green, @GLhalf short blue, @GLhalf short alpha); + + @NoErrorCheck + void glTexCoord1hNV(@GLhalf short s); + + @NoErrorCheck + void glTexCoord2hNV(@GLhalf short s, @GLhalf short t); + + @NoErrorCheck + void glTexCoord3hNV(@GLhalf short s, @GLhalf short t, @GLhalf short r); + + @NoErrorCheck + void glTexCoord4hNV(@GLhalf short s, @GLhalf short t, @GLhalf short r, @GLhalf short q); + + @NoErrorCheck + void glMultiTexCoord1hNV(@GLenum int target, @GLhalf short s); + + @NoErrorCheck + void glMultiTexCoord2hNV(@GLenum int target, @GLhalf short s, @GLhalf short t); + + @NoErrorCheck + void glMultiTexCoord3hNV(@GLenum int target, @GLhalf short s, @GLhalf short t, @GLhalf short r); + + @NoErrorCheck + void glMultiTexCoord4hNV(@GLenum int target, @GLhalf short s, @GLhalf short t, @GLhalf short r, @GLhalf short q); + + @NoErrorCheck + void glFogCoordhNV(@GLhalf short fog); + + @NoErrorCheck + void glSecondaryColor3hNV(@GLhalf short red, @GLhalf short green, @GLhalf short blue); + + @Optional(reason = "AMD does not expose this (last driver checked: 11.7)") + @NoErrorCheck + void glVertexWeighthNV(@GLhalf short weight); + + @Optional(reason = "AMD does not expose this (last driver checked: 11.7)") + @NoErrorCheck + void glVertexAttrib1hNV(@GLuint int index, @GLhalf short x); + + @Optional(reason = "AMD does not expose this (last driver checked: 11.7)") + @NoErrorCheck + void glVertexAttrib2hNV(@GLuint int index, @GLhalf short x, @GLhalf short y); + + @Optional(reason = "AMD does not expose this (last driver checked: 11.7)") + @NoErrorCheck + void glVertexAttrib3hNV(@GLuint int index, @GLhalf short x, @GLhalf short y, @GLhalf short z); + + @Optional(reason = "AMD does not expose this (last driver checked: 11.7)") + @NoErrorCheck + void glVertexAttrib4hNV(@GLuint int index, @GLhalf short x, @GLhalf short y, @GLhalf short z, @GLhalf short w); + + @Optional(reason = "AMD does not expose this (last driver checked: 11.7)") + @NoErrorCheck + @StripPostfix("attribs") + void glVertexAttribs1hvNV(@GLuint int index, @AutoSize("attribs") @GLsizei int n, @Const @GLhalf ShortBuffer attribs); + + @Optional(reason = "AMD does not expose this (last driver checked: 11.7)") + @NoErrorCheck + @StripPostfix("attribs") + void glVertexAttribs2hvNV(@GLuint int index, @AutoSize(value = "attribs", expression = " >> 1") @GLsizei int n, @Const @GLhalf ShortBuffer attribs); + + @Optional(reason = "AMD does not expose this (last driver checked: 11.7)") + @NoErrorCheck + @StripPostfix("attribs") + void glVertexAttribs3hvNV(@GLuint int index, @AutoSize(value = "attribs", expression = " / 3") @GLsizei int n, @Const @GLhalf ShortBuffer attribs); + + @Optional(reason = "AMD does not expose this (last driver checked: 11.7)") + @NoErrorCheck + @StripPostfix("attribs") + void glVertexAttribs4hvNV(@GLuint int index, @AutoSize(value = "attribs", expression = " >> 2") @GLsizei int n, @Const @GLhalf ShortBuffer attribs); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_light_max_exponent.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_light_max_exponent.java new file mode 100644 index 0000000..3dde7e6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_light_max_exponent.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_light_max_exponent { + int GL_MAX_SHININESS_NV = 0x8504; + int GL_MAX_SPOT_EXPONENT_NV = 0x8505; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_multisample_coverage.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_multisample_coverage.java new file mode 100644 index 0000000..f57fddf --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_multisample_coverage.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_multisample_coverage { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, + * GetIntegerv, and GetFloatv: + */ + int GL_COVERAGE_SAMPLES_NV = 0x80A9; + int GL_COLOR_SAMPLES_NV = 0x8E20; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_multisample_filter_hint.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_multisample_filter_hint.java new file mode 100644 index 0000000..96f8e4e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_multisample_filter_hint.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_multisample_filter_hint { + + /** + * Accepted by the <target> parameter of Hint and by the <pname> + * parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev: + */ + int GL_MULTISAMPLE_FILTER_HINT_NV = 0x8534; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_occlusion_query.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_occlusion_query.java new file mode 100644 index 0000000..2595ae3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_occlusion_query.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLreturn; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.IntBuffer; + +public interface NV_occlusion_query { + + int GL_OCCLUSION_TEST_HP = 0x8165; + int GL_OCCLUSION_TEST_RESULT_HP = 0x8166; + /* HP_occlusion_test */ + int GL_PIXEL_COUNTER_BITS_NV = 0x8864; + int GL_CURRENT_OCCLUSION_QUERY_ID_NV = 0x8865; + int GL_PIXEL_COUNT_NV = 0x8866; + int GL_PIXEL_COUNT_AVAILABLE_NV = 0x8867; + + void glGenOcclusionQueriesNV(@AutoSize("piIDs") @GLsizei int n, @OutParameter @GLuint IntBuffer piIDs); + + @Alternate("glGenOcclusionQueriesNV") + @GLreturn("piIDs") + void glGenOcclusionQueriesNV2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer piIDs); + + void glDeleteOcclusionQueriesNV(@AutoSize("piIDs") @GLsizei int n, @Const @GLuint IntBuffer piIDs); + + @Alternate("glDeleteOcclusionQueriesNV") + void glDeleteOcclusionQueriesNV(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(caps, piID)", keepParam = true) int piID); + + boolean glIsOcclusionQueryNV(@GLuint int id); + + void glBeginOcclusionQueryNV(@GLuint int id); + + void glEndOcclusionQueryNV(); + + @StripPostfix("params") + void glGetOcclusionQueryuivNV(@GLuint int id, @GLenum int pname, @OutParameter @Check("1") @GLuint IntBuffer params); + + @Alternate("glGetOcclusionQueryuivNV") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetOcclusionQueryuivNV2(@GLuint int id, @GLenum int pname, @OutParameter @GLuint IntBuffer params); + + @StripPostfix("params") + void glGetOcclusionQueryivNV(@GLuint int id, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + @Alternate("glGetOcclusionQueryivNV") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetOcclusionQueryivNV2(@GLuint int id, @GLenum int pname, @OutParameter IntBuffer params); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_packed_depth_stencil.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_packed_depth_stencil.java new file mode 100644 index 0000000..552447f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_packed_depth_stencil.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_packed_depth_stencil { + int GL_DEPTH_STENCIL_NV = 0x84F9; + int GL_UNSIGNED_INT_24_8_NV = 0x84FA; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_parameter_buffer_object.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_parameter_buffer_object.java new file mode 100644 index 0000000..5b88561 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_parameter_buffer_object.java @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.FloatBuffer; +import java.nio.IntBuffer; + +public interface NV_parameter_buffer_object { + + /** Accepted by the <pname> parameter of GetProgramivARB: */ + int GL_MAX_PROGRAM_PARAMETER_BUFFER_BINDINGS_NV = 0x8DA0; + int GL_MAX_PROGRAM_PARAMETER_BUFFER_SIZE_NV = 0x8DA1; + + /** + * Accepted by the <target> parameter of ProgramBufferParametersfvNV, + * ProgramBufferParametersIivNV, and ProgramBufferParametersIuivNV, + * BindBufferRangeNV, BindBufferOffsetNV, BindBufferBaseNV, and BindBuffer + * and the <value> parameter of GetIntegerIndexedvEXT: + */ + int GL_VERTEX_PROGRAM_PARAMETER_BUFFER_NV = 0x8DA2; + int GL_GEOMETRY_PROGRAM_PARAMETER_BUFFER_NV = 0x8DA3; + int GL_FRAGMENT_PROGRAM_PARAMETER_BUFFER_NV = 0x8DA4; + + @StripPostfix("params") + void glProgramBufferParametersfvNV(@GLenum int target, @GLuint int buffer, @GLuint int index, + @AutoSize(value = "params", expression = " >> 2") @GLsizei int count, @Const FloatBuffer params); + + @StripPostfix("params") + void glProgramBufferParametersIivNV(@GLenum int target, @GLuint int buffer, @GLuint int index, + @AutoSize(value = "params", expression = " >> 2") @GLsizei int count, @Const IntBuffer params); + + @StripPostfix("params") + void glProgramBufferParametersIuivNV(@GLenum int target, @GLuint int buffer, @GLuint int index, + @AutoSize(value = "params", expression = " >> 2") @GLuint int count, @Const @GLuint IntBuffer params); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_parameter_buffer_object2.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_parameter_buffer_object2.java new file mode 100644 index 0000000..5704513 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_parameter_buffer_object2.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_parameter_buffer_object2 { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_path_rendering.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_path_rendering.java new file mode 100644 index 0000000..28fd9c0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_path_rendering.java @@ -0,0 +1,515 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.ByteBuffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; + +public interface NV_path_rendering { + + /** + * Accepted in elements of the <commands> array parameter of + * PathCommandsNV and PathSubCommandsNV: + */ + int GL_CLOSE_PATH_NV = 0x00, + GL_MOVE_TO_NV = 0x02, + GL_RELATIVE_MOVE_TO_NV = 0x03, + GL_LINE_TO_NV = 0x04, + GL_RELATIVE_LINE_TO_NV = 0x05, + GL_HORIZONTAL_LINE_TO_NV = 0x06, + GL_RELATIVE_HORIZONTAL_LINE_TO_NV = 0x07, + GL_VERTICAL_LINE_TO_NV = 0x08, + GL_RELATIVE_VERTICAL_LINE_TO_NV = 0x09, + GL_QUADRATIC_CURVE_TO_NV = 0x0A, + GL_RELATIVE_QUADRATIC_CURVE_TO_NV = 0x0B, + GL_CUBIC_CURVE_TO_NV = 0x0C, + GL_RELATIVE_CUBIC_CURVE_TO_NV = 0x0D, + GL_SMOOTH_QUADRATIC_CURVE_TO_NV = 0x0E, + GL_RELATIVE_SMOOTH_QUADRATIC_CURVE_TO_NV = 0x0F, + GL_SMOOTH_CUBIC_CURVE_TO_NV = 0x10, + GL_RELATIVE_SMOOTH_CUBIC_CURVE_TO_NV = 0x11, + GL_SMALL_CCW_ARC_TO_NV = 0x12, + GL_RELATIVE_SMALL_CCW_ARC_TO_NV = 0x13, + GL_SMALL_CW_ARC_TO_NV = 0x14, + GL_RELATIVE_SMALL_CW_ARC_TO_NV = 0x15, + GL_LARGE_CCW_ARC_TO_NV = 0x16, + GL_RELATIVE_LARGE_CCW_ARC_TO_NV = 0x17, + GL_LARGE_CW_ARC_TO_NV = 0x18, + GL_RELATIVE_LARGE_CW_ARC_TO_NV = 0x19, + GL_CIRCULAR_CCW_ARC_TO_NV = 0xF8, + GL_CIRCULAR_CW_ARC_TO_NV = 0xFA, + GL_CIRCULAR_TANGENT_ARC_TO_NV = 0xFC, + GL_ARC_TO_NV = 0xFE, + GL_RELATIVE_ARC_TO_NV = 0xFF; + + /** Accepted by the <format> parameter of PathStringNV: */ + int GL_PATH_FORMAT_SVG_NV = 0x9070, + GL_PATH_FORMAT_PS_NV = 0x9071; + + /** + * Accepted by the <fontTarget> parameter of PathGlyphsNV and + * PathGlyphRangeNV: + */ + int GL_STANDARD_FONT_NAME_NV = 0x9072, + GL_SYSTEM_FONT_NAME_NV = 0x9073, + GL_FILE_NAME_NV = 0x9074; + + /** + * Accepted by the <handleMissingGlyph> parameter of PathGlyphsNV and + * PathGlyphRangeNV: + */ + int GL_SKIP_MISSING_GLYPH_NV = 0x90A9, + GL_USE_MISSING_GLYPH_NV = 0x90AA; + + /** + * Accepted by the <pname> parameter of PathParameterfNV, + * PathParameterfvNV, GetPathParameterfvNV, PathParameteriNV, + * PathParameterivNV, and GetPathParameterivNV: + */ + int GL_PATH_STROKE_WIDTH_NV = 0x9075, + GL_PATH_INITIAL_END_CAP_NV = 0x9077, + GL_PATH_TERMINAL_END_CAP_NV = 0x9078, + GL_PATH_JOIN_STYLE_NV = 0x9079, + GL_PATH_MITER_LIMIT_NV = 0x907A, + GL_PATH_INITIAL_DASH_CAP_NV = 0x907C, + GL_PATH_TERMINAL_DASH_CAP_NV = 0x907D, + GL_PATH_DASH_OFFSET_NV = 0x907E, + GL_PATH_CLIENT_LENGTH_NV = 0x907F, + GL_PATH_DASH_OFFSET_RESET_NV = 0x90B4, + + GL_PATH_FILL_MODE_NV = 0x9080, + GL_PATH_FILL_MASK_NV = 0x9081, + GL_PATH_FILL_COVER_MODE_NV = 0x9082, + GL_PATH_STROKE_COVER_MODE_NV = 0x9083, + GL_PATH_STROKE_MASK_NV = 0x9084; + + /** + * Accepted by the <pname> parameter of PathParameterfNV and + * PathParameterfvNV: + */ + int GL_PATH_END_CAPS_NV = 0x9076, + GL_PATH_DASH_CAPS_NV = 0x907B; + + /** + * Accepted by the <fillMode> parameter of StencilFillPathNV and + * StencilFillPathInstancedNV: + */ + int GL_COUNT_UP_NV = 0x9088, + GL_COUNT_DOWN_NV = 0x9089; + + /** + * Accepted by the <color> parameter of PathColorGenNV, + * GetPathColorGenivNV, and GetPathColorGenfvNV: + */ + int GL_PRIMARY_COLOR = 0x8577, // from OpenGL 1.3 + GL_PRIMARY_COLOR_NV = 0x852C, // from NV_register_combiners + GL_SECONDARY_COLOR_NV = 0x852D; // from NV_register_combiners + + /** + * Accepted by the <genMode> parameter of PathColorGenNV and + * PathTexGenNV: + */ + int GL_PATH_OBJECT_BOUNDING_BOX_NV = 0x908A; + + /** + * Accepted by the <coverMode> parameter of CoverFillPathNV and + * CoverFillPathInstancedNV: + */ + int GL_CONVEX_HULL_NV = 0x908B, + GL_BOUNDING_BOX_NV = 0x908D; + + /** + * Accepted by the <transformType> parameter of + * StencilFillPathInstancedNV, StencilStrokePathInstancedNV, + * CoverFillPathInstancedNV, and CoverStrokePathInstancedNV: + */ + int GL_TRANSLATE_X_NV = 0x908E, + GL_TRANSLATE_Y_NV = 0x908F, + GL_TRANSLATE_2D_NV = 0x9090, + GL_TRANSLATE_3D_NV = 0x9091, + GL_AFFINE_2D_NV = 0x9092, + GL_AFFINE_3D_NV = 0x9094, + GL_TRANSPOSE_AFFINE_2D_NV = 0x9096, + GL_TRANSPOSE_AFFINE_3D_NV = 0x9098; + + /** + * Accepted by the <type> or <pathNameType> parameter of CallLists, + * StencilFillPathInstancedNV, StencilStrokePathInstancedNV, + * CoverFillPathInstancedNV, CoverStrokePathInstancedNV, + * GetPathMetricsNV, and GetPathSpacingNV: + */ + int GL_UTF8_NV = 0x909A, + GL_UTF16_NV = 0x909B; + + /** Accepted by the <coverMode> parameter of CoverFillPathInstancedNV: */ + int GL_BOUNDING_BOX_OF_BOUNDING_BOXES_NV = 0x909C; + + /** + * Accepted by the <pname> parameter of GetPathParameterfvNV and + * GetPathParameterivNV: + */ + int GL_PATH_COMMAND_COUNT_NV = 0x909D, + GL_PATH_COORD_COUNT_NV = 0x909E, + GL_PATH_DASH_ARRAY_COUNT_NV = 0x909F, + GL_PATH_COMPUTED_LENGTH_NV = 0x90A0, + GL_PATH_FILL_BOUNDING_BOX_NV = 0x90A1, + GL_PATH_STROKE_BOUNDING_BOX_NV = 0x90A2; + + /** + * Accepted by the <value> parameter of PathParameterfNV, + * PathParameterfvNV, PathParameteriNV, and PathParameterivNV + * when <pname> is one of PATH_END_CAPS_NV, PATH_INTIAL_END_CAP_NV, + * PATH_TERMINAL_END_CAP_NV, PATH_DASH_CAPS_NV, PATH_INITIAL_DASH_CAP_NV, + * and PATH_TERMINAL_DASH_CAP_NV: + */ + int GL_SQUARE_NV = 0x90A3, + GL_ROUND_NV = 0x90A4, + GL_TRIANGULAR_NV = 0x90A5; + + /** + * Accepted by the <value> parameter of PathParameterfNV, + * PathParameterfvNV, PathParameteriNV, and PathParameterivNV + * when <pname> is PATH_JOIN_STYLE_NV: + */ + int GL_BEVEL_NV = 0x90A6, + GL_MITER_REVERT_NV = 0x90A7, + GL_MITER_TRUNCATE_NV = 0x90A8; + + /** + * Accepted by the <value> parameter of PathParameterfNV, + * PathParameterfvNV, PathParameteriNV, and PathParameterivNV when + * <pname> is PATH_DASH_OFFSET_RESET_NV + */ + int GL_MOVE_TO_RESETS_NV = 0x90B5, + GL_MOVE_TO_CONTINUES_NV = 0x90B6; + + /** Accepted by the <fontStyle> parameter of PathStringNV: */ + int GL_BOLD_BIT_NV = 0x01, + GL_ITALIC_BIT_NV = 0x02; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetInteger64v, GetFloatv, and GetDoublev: + */ + int GL_PATH_ERROR_POSITION_NV = 0x90AB, + + GL_PATH_FOG_GEN_MODE_NV = 0x90AC, + + GL_PATH_STENCIL_FUNC_NV = 0x90B7, + GL_PATH_STENCIL_REF_NV = 0x90B8, + GL_PATH_STENCIL_VALUE_MASK_NV = 0x90B9, + + GL_PATH_STENCIL_DEPTH_OFFSET_FACTOR_NV = 0x90BD, + GL_PATH_STENCIL_DEPTH_OFFSET_UNITS_NV = 0x90BE, + + GL_PATH_COVER_DEPTH_FUNC_NV = 0x90BF; + + /** + * Accepted as a bit within the <metricQueryMask> parameter of + * GetPathMetricRangeNV or GetPathMetricsNV: + */ + + int GL_GLYPH_WIDTH_BIT_NV = 0x01, // per-glyph metrics + GL_GLYPH_HEIGHT_BIT_NV = 0x02, + GL_GLYPH_HORIZONTAL_BEARING_X_BIT_NV = 0x04, + GL_GLYPH_HORIZONTAL_BEARING_Y_BIT_NV = 0x08, + GL_GLYPH_HORIZONTAL_BEARING_ADVANCE_BIT_NV = 0x10, + GL_GLYPH_VERTICAL_BEARING_X_BIT_NV = 0x20, + GL_GLYPH_VERTICAL_BEARING_Y_BIT_NV = 0x40, + GL_GLYPH_VERTICAL_BEARING_ADVANCE_BIT_NV = 0x80, + GL_GLYPH_HAS_KERNING_NV = 0x100, + GL_FONT_X_MIN_BOUNDS_NV = 0x00010000, // per-font face metrics + GL_FONT_Y_MIN_BOUNDS_NV = 0x00020000, + GL_FONT_X_MAX_BOUNDS_NV = 0x00040000, + GL_FONT_Y_MAX_BOUNDS_NV = 0x00080000, + GL_FONT_UNITS_PER_EM_NV = 0x00100000, + GL_FONT_ASCENDER_NV = 0x00200000, + GL_FONT_DESCENDER_NV = 0x00400000, + GL_FONT_HEIGHT_NV = 0x00800000, + GL_FONT_MAX_ADVANCE_WIDTH_NV = 0x01000000, + GL_FONT_MAX_ADVANCE_HEIGHT_NV = 0x02000000, + GL_FONT_UNDERLINE_POSITION_NV = 0x04000000, + GL_FONT_UNDERLINE_THICKNESS_NV = 0x08000000, + GL_FONT_HAS_KERNING_NV = 0x10000000; + + /** Accepted by the <pathListMode> parameter of GetPathSpacingNV: */ + int GL_ACCUM_ADJACENT_PAIRS_NV = 0x90AD, + GL_ADJACENT_PAIRS_NV = 0x90AE, + GL_FIRST_TO_REST_NV = 0x90AF; + + /** + * Accepted by the <pname> parameter of GetPathColorGenivNV, + * GetPathColorGenfvNV, GetPathTexGenivNV and GetPathTexGenfvNV: + */ + int GL_PATH_GEN_MODE_NV = 0x90B0, + GL_PATH_GEN_COEFF_NV = 0x90B1, + GL_PATH_GEN_COLOR_FORMAT_NV = 0x90B2, + GL_PATH_GEN_COMPONENTS_NV = 0x90B3; + + void glPathCommandsNV(@GLuint int path, + @AutoSize("commands") @GLsizei int numCommands, @Const @GLubyte ByteBuffer commands, + @AutoSize("coords") @GLsizei int numCoords, @GLenum int coordType, + @Const @GLvoid ByteBuffer coords); + + void glPathCoordsNV(@GLuint int path, + @AutoSize("coords") @GLsizei int numCoords, @GLenum int coordType, + @Const @GLvoid ByteBuffer coords); + + void glPathSubCommandsNV(@GLuint int path, + @GLsizei int commandStart, @GLsizei int commandsToDelete, + @AutoSize("commands") @GLsizei int numCommands, @Const @GLubyte ByteBuffer commands, + @AutoSize("coords") @GLsizei int numCoords, @GLenum int coordType, + @Const @GLvoid ByteBuffer coords); + + void glPathSubCoordsNV(@GLuint int path, + @GLsizei int coordStart, + @AutoSize("coords") @GLsizei int numCoords, @GLenum int coordType, + @Const @GLvoid ByteBuffer coords); + + void glPathStringNV(@GLuint int path, @GLenum int format, + @AutoSize("pathString") @GLsizei int length, @Const @GLvoid ByteBuffer pathString); + + void glPathGlyphsNV(@GLuint int firstPathName, + @GLenum int fontTarget, + @NullTerminated @Const @GLvoid ByteBuffer fontName, + @GLbitfield int fontStyle, + @AutoSize(value = "charcodes", expression = " / GLChecks.calculateBytesPerCharCode(type)") @GLsizei int numGlyphs, @GLenum int type, + @Const @GLvoid ByteBuffer charcodes, + @GLenum int handleMissingGlyphs, + @GLuint int pathParameterTemplate, + float emScale); + + void glPathGlyphRangeNV(@GLuint int firstPathName, + @GLenum int fontTarget, + @NullTerminated @Const @GLvoid ByteBuffer fontName, + @GLbitfield int fontStyle, + @GLuint int firstGlyph, + @GLsizei int numGlyphs, + @GLenum int handleMissingGlyphs, + @GLuint int pathParameterTemplate, + float emScale); + + void glWeightPathsNV(@GLuint int resultPath, + @AutoSize("paths") @GLsizei int numPaths, + @Const @GLuint IntBuffer paths, @Check("paths.remaining()") @Const FloatBuffer weights); + + void glCopyPathNV(@GLuint int resultPath, @GLuint int srcPath); + + void glInterpolatePathsNV(@GLuint int resultPath, + @GLuint int pathA, @GLuint int pathB, + float weight); + + void glTransformPathNV(@GLuint int resultPath, + @GLuint int srcPath, + @GLenum int transformType, + @Check(value = "GLChecks.calculateTransformPathValues(transformType)", canBeNull = true) @Const FloatBuffer transformValues); + + @StripPostfix("value") + void glPathParameterivNV(@GLuint int path, @GLenum int pname, @Check("4") @Const IntBuffer value); + + void glPathParameteriNV(@GLuint int path, @GLenum int pname, int value); + + @StripPostfix("value") + void glPathParameterfvNV(@GLuint int path, @GLenum int pname, @Check("4") @Const IntBuffer value); + + void glPathParameterfNV(@GLuint int path, @GLenum int pname, float value); + + void glPathDashArrayNV(@GLuint int path, + @AutoSize("dashArray") @GLsizei int dashCount, @Const FloatBuffer dashArray); + + // PATH NAME MANAGEMENT + + @GLuint + int glGenPathsNV(@GLsizei int range); + + void glDeletePathsNV(@GLuint int path, @GLsizei int range); + + boolean glIsPathNV(@GLuint int path); + + // PATH STENCILING + + void glPathStencilFuncNV(@GLenum int func, int ref, @GLuint int mask); + + void glPathStencilDepthOffsetNV(float factor, int units); + + void glStencilFillPathNV(@GLuint int path, + @GLenum int fillMode, @GLuint int mask); + + void glStencilStrokePathNV(@GLuint int path, + int reference, @GLuint int mask); + + void glStencilFillPathInstancedNV(@AutoSize(value="paths", expression = " / GLChecks.calculateBytesPerPathName(pathNameType)") @GLsizei int numPaths, + @GLenum int pathNameType, @Const @GLvoid ByteBuffer paths, + @GLuint int pathBase, + @GLenum int fillMode, @GLuint int mask, + @GLenum int transformType, + @Check(value = "GLChecks.calculateTransformPathValues(transformType)", canBeNull = true) @Const FloatBuffer transformValues); + + void glStencilStrokePathInstancedNV(@AutoSize(value = "paths", expression = " / GLChecks.calculateBytesPerPathName(pathNameType)") @GLsizei int numPaths, + @GLenum int pathNameType, @Const @GLvoid ByteBuffer paths, + @GLuint int pathBase, + int reference, @GLuint int mask, + @GLenum int transformType, + @Check(value = "GLChecks.calculateTransformPathValues(transformType)", canBeNull = true) @Const FloatBuffer transformValues); + + // PATH COVERING + + void glPathCoverDepthFuncNV(@GLenum int zfunc); + + void glPathColorGenNV(@GLenum int color, + @GLenum int genMode, + @GLenum int colorFormat, @Check(value = "GLChecks.calculatePathColorGenCoeffsCount(genMode, colorFormat)", canBeNull = true) @Const FloatBuffer coeffs); + + void glPathTexGenNV(@GLenum int texCoordSet, + @GLenum int genMode, + @AutoSize(value="coeffs", expression="GLChecks.calculatePathTextGenCoeffsPerComponent(coeffs, genMode)", useExpression = true, canBeNull = true) int components, @Check(canBeNull = true) @Const FloatBuffer coeffs); + + void glPathFogGenNV(@GLenum int genMode); + + void glCoverFillPathNV(@GLuint int path, @GLenum int coverMode); + + void glCoverStrokePathNV(@GLuint int name, @GLenum int coverMode); + + void glCoverFillPathInstancedNV(@AutoSize(value = "paths", expression = " / GLChecks.calculateBytesPerPathName(pathNameType)") @GLsizei int numPaths, + @GLenum int pathNameType, @Const @GLvoid ByteBuffer paths, + @GLuint int pathBase, + @GLenum int coverMode, + @GLenum int transformType, + @Check(value = "GLChecks.calculateTransformPathValues(transformType)", canBeNull = true) @Const FloatBuffer transformValues); + + void glCoverStrokePathInstancedNV(@AutoSize(value = "paths", expression = " / GLChecks.calculateBytesPerPathName(pathNameType)") @GLsizei int numPaths, + @GLenum int pathNameType, @Const @GLvoid ByteBuffer paths, + @GLuint int pathBase, + @GLenum int coverMode, + @GLenum int transformType, + @Check(value = "GLChecks.calculateTransformPathValues(transformType)", canBeNull = true) @Const FloatBuffer transformValues); + + // PATH QUERIES + + @StripPostfix("value") + void glGetPathParameterivNV(@GLuint int name, @GLenum int param, @Check("4") @OutParameter IntBuffer value); + + @Alternate("glGetPathParameterivNV") + @GLreturn("value") + @StripPostfix(value = "value", postfix = "v") + void glGetPathParameterivNV2(@GLuint int name, @GLenum int param, @OutParameter IntBuffer value); + + void glGetPathParameterfvNV(@GLuint int name, @GLenum int param, @Check("4") @OutParameter FloatBuffer value); + + @Alternate("glGetPathParameterfvNV") + @GLreturn("value") + @StripPostfix(value = "value", postfix = "v") + void glGetPathParameterfvNV2(@GLuint int name, @GLenum int param, @OutParameter FloatBuffer value); + + void glGetPathCommandsNV(@GLuint int name, @Check @OutParameter @GLubyte ByteBuffer commands); + + void glGetPathCoordsNV(@GLuint int name, @Check @OutParameter FloatBuffer coords); + + void glGetPathDashArrayNV(@GLuint int name, @Check @OutParameter FloatBuffer dashArray); + + void glGetPathMetricsNV(@GLbitfield int metricQueryMask, + @AutoSize(value = "paths", expression = " / GLChecks.calculateBytesPerPathName(pathNameType)") @GLsizei int numPaths, + @GLenum int pathNameType, @Const @GLvoid ByteBuffer paths, + @GLuint int pathBase, + @GLsizei int stride, + @Check("GLChecks.calculateMetricsSize(metricQueryMask, stride)") @OutParameter FloatBuffer metrics); + + void glGetPathMetricRangeNV(@GLbitfield int metricQueryMask, + @GLuint int fistPathName, + @GLsizei int numPaths, + @GLsizei int stride, + @Check("GLChecks.calculateMetricsSize(metricQueryMask, stride)") @OutParameter FloatBuffer metrics); + + @Code("\t\tint numPaths = paths.remaining() / GLChecks.calculateBytesPerPathName(pathNameType);") + void glGetPathSpacingNV(@GLenum int pathListMode, + @AutoSize(value = "paths", expression = "numPaths", useExpression = true) @GLsizei int numPaths, + @GLenum int pathNameType, @Const @GLvoid ByteBuffer paths, + @GLuint int pathBase, + float advanceScale, + float kerningScale, + @GLenum int transformType, + @Check("numPaths - 1") @OutParameter FloatBuffer returnedSpacing); + + @StripPostfix("value") + void glGetPathColorGenivNV(@GLenum int color, @GLenum int pname, @Check("16") @OutParameter IntBuffer value); + + @Alternate("glGetPathColorGenivNV") + @GLreturn("value") + @StripPostfix(value = "value", postfix = "v") + void glGetPathColorGenivNV2(@GLenum int color, @GLenum int pname, @OutParameter IntBuffer value); + + @StripPostfix("value") + void glGetPathColorGenfvNV(@GLenum int color, @GLenum int pname, @Check("16") @OutParameter FloatBuffer value); + + @Alternate("glGetPathColorGenfvNV") + @GLreturn("value") + @StripPostfix(value = "value", postfix = "v") + void glGetPathColorGenfvNV2(@GLenum int color, @GLenum int pname, @OutParameter FloatBuffer value); + + @StripPostfix("value") + void glGetPathTexGenivNV(@GLenum int texCoordSet, @GLenum int pname, @Check("16") @OutParameter IntBuffer value); + + @Alternate("glGetPathTexGenivNV") + @GLreturn("value") + @StripPostfix(value = "value", postfix = "v") + void glGetPathTexGenivNV2(@GLenum int texCoordSet, @GLenum int pname, @OutParameter IntBuffer value); + + @StripPostfix("value") + void glGetPathTexGenfvNV(@GLenum int texCoordSet, @GLenum int pname, @Check("16") @OutParameter FloatBuffer value); + + @Alternate("glGetPathTexGenfvNV") + @GLreturn("value") + @StripPostfix(value = "value", postfix = "v") + void glGetPathTexGenfvNV2(@GLenum int texCoordSet, @GLenum int pname, @OutParameter FloatBuffer value); + + boolean glIsPointInFillPathNV(@GLuint int path, + @GLuint int mask, float x, float y); + + boolean glIsPointInStrokePathNV(@GLuint int path, + float x, float y); + + float glGetPathLengthNV(@GLuint int path, + @GLsizei int startSegment, @GLsizei int numSegments); + + boolean glPointAlongPathNV(@GLuint int path, + @GLsizei int startSegment, @GLsizei int numSegments, + float distance, + @Check(value = "1", canBeNull = true) @OutParameter FloatBuffer x, + @Check(value = "1", canBeNull = true) @OutParameter FloatBuffer y, + @Check(value = "1", canBeNull = true) @OutParameter FloatBuffer tangentX, + @Check(value = "1", canBeNull = true) @OutParameter FloatBuffer tangentY); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_pixel_data_range.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_pixel_data_range.java new file mode 100644 index 0000000..6581382 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_pixel_data_range.java @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.*; + +public interface NV_pixel_data_range { + + /** + * Accepted by the <target> parameter of PixelDataRangeNV and + * FlushPixelDataRangeNV, and by the <cap> parameter of + * EnableClientState, DisableClientState, and IsEnabled: + */ + int GL_WRITE_PIXEL_DATA_RANGE_NV = 0x8878; + int GL_READ_PIXEL_DATA_RANGE_NV = 0x8879; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_WRITE_PIXEL_DATA_RANGE_LENGTH_NV = 0x887A; + int GL_READ_PIXEL_DATA_RANGE_LENGTH_NV = 0x887B; + + /** + * Accepted by the <pname> parameter of GetPointerv: + */ + int GL_WRITE_PIXEL_DATA_RANGE_POINTER_NV = 0x887C; + int GL_READ_PIXEL_DATA_RANGE_POINTER_NV = 0x887D; + + void glPixelDataRangeNV(@GLenum int target, @AutoSize("data") @GLsizei int length, + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer data); + + void glFlushPixelDataRangeNV(@GLenum int target); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_point_sprite.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_point_sprite.java new file mode 100644 index 0000000..416c4b0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_point_sprite.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; + +import java.nio.*; + +public interface NV_point_sprite { + int GL_POINT_SPRITE_NV = 0x8861; + int GL_COORD_REPLACE_NV = 0x8862; + int GL_POINT_SPRITE_R_MODE_NV = 0x8863; + + void glPointParameteriNV(@GLenum int pname, int param); + + @StripPostfix("params") + void glPointParameterivNV(@GLenum int pname, @Check("4") @Const IntBuffer params); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_present_video.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_present_video.java new file mode 100644 index 0000000..17a2574 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_present_video.java @@ -0,0 +1,116 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.Check; +import org.lwjgl.util.generator.OutParameter; +import org.lwjgl.util.generator.StripPostfix; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.IntBuffer; +import java.nio.LongBuffer; + +public interface NV_present_video { + + /** + * Accepted by the <type> parameter of PresentFrameKeyedNV and + * PresentFrameDualFillNV: + */ + int GL_FRAME_NV = 0x8E26, + FIELDS_NV = 0x8E27; + + /** + * Accepted by the <pname> parameter of GetVideoivNV, GetVideouivNV, + * GetVideoi64vNV, GetVideoui64vNV: + */ + int GL_CURRENT_TIME_NV = 0x8E28, + GL_NUM_FILL_STREAMS_NV = 0x8E29; + + /** Accepted by the <target> parameter of GetQueryiv: */ + int GL_PRESENT_TIME_NV = 0x8E2A, + GL_PRESENT_DURATION_NV = 0x8E2B; + + /** Accepted by the <attribute> parameter of NVPresentVideoUtil.glQueryContextNV: */ + int GL_NUM_VIDEO_SLOTS_NV = 0x20F0; // GLX_NUM_VIDEO_SLOTS_NV & WGL_NUM_VIDEO_SLOTS_NV + + void glPresentFrameKeyedNV(@GLuint int video_slot, + @GLuint64EXT long minPresentTime, + @GLuint int beginPresentTimeId, + @GLuint int presentDurationId, + @GLenum int type, + @GLenum int target0, @GLuint int fill0, @GLuint int key0, + @GLenum int target1, @GLuint int fill1, @GLuint int key1); + + void glPresentFrameDualFillNV(@GLuint int video_slot, + @GLuint64EXT long minPresentTime, + @GLuint int beginPresentTimeId, + @GLuint int presentDurationId, + @GLenum int type, + @GLenum int target0, @GLuint int fill0, + @GLenum int target1, @GLuint int fill1, + @GLenum int target2, @GLuint int fill2, + @GLenum int target3, @GLuint int fill3); + + @StripPostfix("params") + void glGetVideoivNV(@GLuint int video_slot, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + @Alternate("glGetVideoivNV") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetVideoivNV2(@GLuint int video_slot, @GLenum int pname, @OutParameter IntBuffer params); + + @StripPostfix("params") + void glGetVideouivNV(@GLuint int video_slot, @GLenum int pname, @OutParameter @Check("1") @GLuint IntBuffer params); + + @Alternate("glGetVideouivNV") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetVideouivNV2(@GLuint int video_slot, @GLenum int pname, @OutParameter @GLuint IntBuffer params); + + @StripPostfix("params") + void glGetVideoi64vNV(@GLuint int video_slot, @GLenum int pname, @OutParameter @Check("1") @GLint64EXT LongBuffer params); + + @Alternate("glGetVideoi64vNV") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetVideoi64vNV2(@GLuint int video_slot, @GLenum int pname, @OutParameter @GLint64EXT LongBuffer params); + + @StripPostfix("params") + void glGetVideoui64vNV(@GLuint int video_slot, @GLenum int pname, @OutParameter @Check("1") @GLuint64EXT LongBuffer params); + + @Alternate("glGetVideoui64vNV") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetVideoui64vNV2(@GLuint int video_slot, @GLenum int pname, @OutParameter @GLuint64EXT LongBuffer params); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_primitive_restart.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_primitive_restart.java new file mode 100644 index 0000000..ba828e8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_primitive_restart.java @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLuint; + +@ForceInit +public interface NV_primitive_restart { + + /** + * Accepted by the <array> parameter of EnableClientState and + * DisableClientState, by the <cap> parameter of IsEnabled, and by + * the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev: + */ + int GL_PRIMITIVE_RESTART_NV = 0x8558; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_PRIMITIVE_RESTART_INDEX_NV = 0x8559; + + void glPrimitiveRestartNV(); + + void glPrimitiveRestartIndexNV(@GLuint int index); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_program.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_program.java new file mode 100644 index 0000000..128b9ec --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_program.java @@ -0,0 +1,114 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.Buffer; +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +@Extension(postfix = "NV", isFinal = false) +public interface NV_program { + + /** Accepted by the <pname> parameter of GetProgramivNV: */ + int GL_PROGRAM_TARGET_NV = 0x8646; + int GL_PROGRAM_LENGTH_NV = 0x8627; + int GL_PROGRAM_RESIDENT_NV = 0x8647; + + /** Accepted by the <pname> parameter of GetProgramStringNV: */ + int GL_PROGRAM_STRING_NV = 0x8628; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_PROGRAM_ERROR_POSITION_NV = 0x864B; + + /** Accepted by the <name> parameter of GetString: */ + int GL_PROGRAM_ERROR_STRING_NV = 0x8874; + + void glLoadProgramNV(@GLenum int target, @GLuint int programID, @AutoSize("string") @GLsizei int length, @Const @GLubyte Buffer string); + + @Alternate("glLoadProgramNV") + void glLoadProgramNV(@GLenum int target, @GLuint int programID, @Constant("string.length()") @GLsizei int length, CharSequence string); + + void glBindProgramNV(@GLenum int target, @GLuint int programID); + + void glDeleteProgramsNV(@AutoSize("programs") @GLsizei int n, @Const @GLuint IntBuffer programs); + + @Alternate("glDeleteProgramsNV") + void glDeleteProgramsNV(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(caps, program)", keepParam = true) int program); + + void glGenProgramsNV(@AutoSize("programs") @GLsizei int n, @OutParameter @GLuint IntBuffer programs); + + @Alternate("glGenProgramsNV") + @GLreturn("programs") + void glGenProgramsNV2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer programs); + + @StripPostfix("params") + void glGetProgramivNV(@GLuint int programID, @GLenum int parameterName, @OutParameter @Check @GLint IntBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetProgramiNV} instead. */ + @Alternate("glGetProgramivNV") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "NVProgram", method = "glGetProgramiNV") + @Deprecated + void glGetProgramivNV2(@GLuint int programID, @GLenum int parameterName, @OutParameter @GLint IntBuffer params); + + @Alternate("glGetProgramivNV") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetProgramivNV3(@GLuint int programID, @GLenum int parameterName, @OutParameter @GLint IntBuffer params); + + void glGetProgramStringNV(@GLuint int programID, @GLenum int parameterName, @OutParameter @Check @GLubyte Buffer paramString); + + @Alternate("glGetProgramStringNV") + @Code("\t\tint programLength = glGetProgramiNV(programID, GL_PROGRAM_LENGTH_NV);") + @GLreturn(value="paramString", maxLength = "programLength", forceMaxLength = true) + void glGetProgramStringNV2(@GLuint int programID, @GLenum int parameterName, @OutParameter @GLchar ByteBuffer paramString); + + boolean glIsProgramNV(@GLuint int programID); + + boolean glAreProgramsResidentNV(@AutoSize("programIDs") @GLsizei int n, + @Const @GLuint IntBuffer programIDs, + @OutParameter @GLboolean @Check("programIDs.remaining()") ByteBuffer programResidences); + + void glRequestResidentProgramsNV(@AutoSize("programIDs") @GLsizei int n, @GLuint IntBuffer programIDs); + + @Alternate("glRequestResidentProgramsNV") + void glRequestResidentProgramsNV(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(caps, programID)", keepParam = true) int programID); +} + diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_register_combiners.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_register_combiners.java new file mode 100644 index 0000000..9aa96b3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_register_combiners.java @@ -0,0 +1,157 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLreturn; + +import java.nio.*; + +public interface NV_register_combiners { + int GL_REGISTER_COMBINERS_NV = 0x8522; + int GL_COMBINER0_NV = 0x8550; + int GL_COMBINER1_NV = 0x8551; + int GL_COMBINER2_NV = 0x8552; + int GL_COMBINER3_NV = 0x8553; + int GL_COMBINER4_NV = 0x8554; + int GL_COMBINER5_NV = 0x8555; + int GL_COMBINER6_NV = 0x8556; + int GL_COMBINER7_NV = 0x8557; + int GL_VARIABLE_A_NV = 0x8523; + int GL_VARIABLE_B_NV = 0x8524; + int GL_VARIABLE_C_NV = 0x8525; + int GL_VARIABLE_D_NV = 0x8526; + int GL_VARIABLE_E_NV = 0x8527; + int GL_VARIABLE_F_NV = 0x8528; + int GL_VARIABLE_G_NV = 0x8529; + int GL_CONSTANT_COLOR0_NV = 0x852A; + int GL_CONSTANT_COLOR1_NV = 0x852B; + int GL_PRIMARY_COLOR_NV = 0x852C; + int GL_SECONDARY_COLOR_NV = 0x852D; + int GL_SPARE0_NV = 0x852E; + int GL_SPARE1_NV = 0x852F; + int GL_UNSIGNED_IDENTITY_NV = 0x8536; + int GL_UNSIGNED_INVERT_NV = 0x8537; + int GL_EXPAND_NORMAL_NV = 0x8538; + int GL_EXPAND_NEGATE_NV = 0x8539; + int GL_HALF_BIAS_NORMAL_NV = 0x853A; + int GL_HALF_BIAS_NEGATE_NV = 0x853B; + int GL_SIGNED_IDENTITY_NV = 0x853C; + int GL_SIGNED_NEGATE_NV = 0x853D; + int GL_E_TIMES_F_NV = 0x8531; + int GL_SPARE0_PLUS_SECONDARY_COLOR_NV = 0x8532; + int GL_SCALE_BY_TWO_NV = 0x853E; + int GL_SCALE_BY_FOUR_NV = 0x853F; + int GL_SCALE_BY_ONE_HALF_NV = 0x8540; + int GL_BIAS_BY_NEGATIVE_ONE_HALF_NV = 0x8541; + int GL_DISCARD_NV = 0x8530; + int GL_COMBINER_INPUT_NV = 0x8542; + int GL_COMBINER_MAPPING_NV = 0x8543; + int GL_COMBINER_COMPONENT_USAGE_NV = 0x8544; + int GL_COMBINER_AB_DOT_PRODUCT_NV = 0x8545; + int GL_COMBINER_CD_DOT_PRODUCT_NV = 0x8546; + int GL_COMBINER_MUX_SUM_NV = 0x8547; + int GL_COMBINER_SCALE_NV = 0x8548; + int GL_COMBINER_BIAS_NV = 0x8549; + int GL_COMBINER_AB_OUTPUT_NV = 0x854A; + int GL_COMBINER_CD_OUTPUT_NV = 0x854B; + int GL_COMBINER_SUM_OUTPUT_NV = 0x854C; + int GL_NUM_GENERAL_COMBINERS_NV = 0x854E; + int GL_COLOR_SUM_CLAMP_NV = 0x854F; + int GL_MAX_GENERAL_COMBINERS_NV = 0x854D; + + void glCombinerParameterfNV(@GLenum int pname, float param); + + @StripPostfix("params") + void glCombinerParameterfvNV(@GLenum int pname, @Check("4") @Const FloatBuffer params); + + void glCombinerParameteriNV(@GLenum int pname, int param); + + @StripPostfix("params") + void glCombinerParameterivNV(@GLenum int pname, @Check("4") @Const IntBuffer params); + + void glCombinerInputNV(@GLenum int stage, @GLenum int portion, @GLenum int variable, @GLenum int input, @GLenum int mapping, @GLenum int componentUsage); + + void glCombinerOutputNV(@GLenum int stage, @GLenum int portion, @GLenum int abOutput, @GLenum int cdOutput, @GLenum int sumOutput, @GLenum int scale, @GLenum int bias, boolean abDotProduct, boolean cdDotProduct, boolean muxSum); + + void glFinalCombinerInputNV(@GLenum int variable, @GLenum int input, @GLenum int mapping, @GLenum int componentUsage); + + @StripPostfix("params") + void glGetCombinerInputParameterfvNV(@GLenum int stage, @GLenum int portion, @GLenum int variable, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params); + + @Alternate("glGetCombinerInputParameterfvNV") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetCombinerInputParameterfvNV2(@GLenum int stage, @GLenum int portion, @GLenum int variable, @GLenum int pname, @OutParameter FloatBuffer params); + + @StripPostfix("params") + void glGetCombinerInputParameterivNV(@GLenum int stage, @GLenum int portion, @GLenum int variable, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + @Alternate("glGetCombinerInputParameterivNV") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetCombinerInputParameterivNV2(@GLenum int stage, @GLenum int portion, @GLenum int variable, @GLenum int pname, @OutParameter IntBuffer params); + + @StripPostfix("params") + void glGetCombinerOutputParameterfvNV(@GLenum int stage, @GLenum int portion, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params); + + @Alternate("glGetCombinerOutputParameterfvNV") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetCombinerOutputParameterfvNV2(@GLenum int stage, @GLenum int portion, @GLenum int pname, @OutParameter FloatBuffer params); + + @StripPostfix("params") + void glGetCombinerOutputParameterivNV(@GLenum int stage, @GLenum int portion, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + @Alternate("glGetCombinerOutputParameterivNV") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetCombinerOutputParameterivNV2(@GLenum int stage, @GLenum int portion, @GLenum int pname, @OutParameter IntBuffer params); + + @StripPostfix("params") + void glGetFinalCombinerInputParameterfvNV(@GLenum int variable, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params); + + @Alternate("glGetFinalCombinerInputParameterfvNV") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetFinalCombinerInputParameterfvNV2(@GLenum int variable, @GLenum int pname, @OutParameter FloatBuffer params); + + @StripPostfix("params") + void glGetFinalCombinerInputParameterivNV(@GLenum int variable, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + @Alternate("glGetFinalCombinerInputParameterivNV") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetFinalCombinerInputParameterivNV2(@GLenum int variable, @GLenum int pname, @OutParameter IntBuffer params); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_register_combiners2.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_register_combiners2.java new file mode 100644 index 0000000..2b4f9fd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_register_combiners2.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; + +import java.nio.*; + +public interface NV_register_combiners2 { + int GL_PER_STAGE_CONSTANTS_NV = 0x8535; + + @StripPostfix("params") + void glCombinerStageParameterfvNV(@GLenum int stage, @GLenum int pname, @Const @Check("4") FloatBuffer params); + + @StripPostfix("params") + void glGetCombinerStageParameterfvNV(@GLenum int stage, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_shader_atomic_counters.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_shader_atomic_counters.java new file mode 100644 index 0000000..512da94 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_shader_atomic_counters.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_shader_atomic_counters { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_shader_atomic_float.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_shader_atomic_float.java new file mode 100644 index 0000000..62283c7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_shader_atomic_float.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_shader_atomic_float { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_shader_buffer_load.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_shader_buffer_load.java new file mode 100644 index 0000000..230268c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_shader_buffer_load.java @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.LongBuffer; + +public interface NV_shader_buffer_load { + + /** + * Accepted by the <pname> parameter of GetBufferParameterui64vNV, + * GetNamedBufferParameterui64vNV: + */ + int GL_BUFFER_GPU_ADDRESS_NV = 0x8F1D; + + /** Returned by the <type> parameter of GetActiveUniform: */ + int GL_GPU_ADDRESS_NV = 0x8F34; + + /** Accepted by the <value> parameter of GetIntegerui64vNV: */ + int GL_MAX_SHADER_BUFFER_ADDRESS_NV = 0x8F35; + + void glMakeBufferResidentNV(@GLenum int target, @GLenum int access); + + void glMakeBufferNonResidentNV(@GLenum int target); + + boolean glIsBufferResidentNV(@GLenum int target); + + void glMakeNamedBufferResidentNV(@GLuint int buffer, @GLenum int access); + + void glMakeNamedBufferNonResidentNV(@GLuint int buffer); + + boolean glIsNamedBufferResidentNV(@GLuint int buffer); + + @StripPostfix("params") + void glGetBufferParameterui64vNV(@GLenum int target, @GLenum int pname, @OutParameter @Check("1") @GLuint64EXT LongBuffer params); + + @Alternate("glGetBufferParameterui64vNV") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetBufferParameterui64vNV2(@GLenum int target, @GLenum int pname, @OutParameter @GLuint64EXT LongBuffer params); + + @StripPostfix("params") + void glGetNamedBufferParameterui64vNV(@GLuint int buffer, @GLenum int pname, @OutParameter @Check("1") @GLuint64EXT LongBuffer params); + + @Alternate("glGetNamedBufferParameterui64vNV") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetNamedBufferParameterui64vNV2(@GLuint int buffer, @GLenum int pname, @OutParameter @GLuint64EXT LongBuffer params); + + @StripPostfix("result") + void glGetIntegerui64vNV(@GLenum int value, @OutParameter @Check("1") @GLuint64EXT LongBuffer result); + + @Alternate("glGetIntegerui64vNV") + @GLreturn("result") + @StripPostfix(value = "result", postfix = "v") + void glGetIntegerui64vNV2(@GLenum int value, @OutParameter @GLuint64EXT LongBuffer result); + + void glUniformui64NV(int location, @GLuint64EXT long value); + + @StripPostfix("value") + void glUniformui64vNV(int location, @AutoSize("value") @GLsizei int count, @Const @GLuint64EXT LongBuffer value); + + @Reuse("NVGpuShader5") + @StripPostfix("params") + void glGetUniformui64vNV(@GLuint int program, int location, @OutParameter @Check("1") @GLuint64EXT LongBuffer params); + + void glProgramUniformui64NV(@GLuint int program, int location, @GLuint64EXT long value); + + @StripPostfix("value") + void glProgramUniformui64vNV(@GLuint int program, int location, @AutoSize("value") @GLsizei int count, @Const @GLuint64EXT LongBuffer value); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_shader_buffer_store.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_shader_buffer_store.java new file mode 100644 index 0000000..f20da04 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_shader_buffer_store.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_shader_buffer_store { + + /** Accepted by the <barriers> parameter of MemoryBarrierNV: */ + int GL_SHADER_GLOBAL_ACCESS_BARRIER_BIT_NV = 0x00000010; + + /** Accepted by the <access> parameter of MakeBufferResidentNV: */ + int GL_READ_WRITE = GL15.GL_READ_WRITE; + int GL_WRITE_ONLY = GL15.GL_WRITE_ONLY; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_shader_storage_buffer_object.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_shader_storage_buffer_object.java new file mode 100644 index 0000000..7c7f261 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_shader_storage_buffer_object.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_shader_storage_buffer_object { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_tessellation_program5.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_tessellation_program5.java new file mode 100644 index 0000000..cc61f78 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_tessellation_program5.java @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_tessellation_program5 { + + /** + * Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, + * by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev, and by the <target> parameter of ProgramStringARB, + * BindProgramARB, ProgramEnvParameter4[df][v]ARB, + * ProgramLocalParameter4[df][v]ARB, GetProgramEnvParameter[df]vARB, + * GetProgramLocalParameter[df]vARB, GetProgramivARB and + * GetProgramStringARB: + */ + int GL_TESS_CONTROL_PROGRAM_NV = 0x891E; + int GL_TESS_EVALUATION_PROGRAM_NV = 0x891F; + + /** + * Accepted by the <target> parameter of ProgramBufferParametersfvNV, + * ProgramBufferParametersIivNV, and ProgramBufferParametersIuivNV, + * BindBufferRangeNV, BindBufferOffsetNV, BindBufferBaseNV, and BindBuffer + * and the <value> parameter of GetIntegerIndexedvEXT: + */ + int GL_TESS_CONTROL_PROGRAM_PARAMETER_BUFFER_NV = 0x8C74; + int GL_TESS_EVALUATION_PROGRAM_PARAMETER_BUFFER_NV = 0x8C75; + + /** Accepted by the <pname> parameter of GetProgramivARB: */ + int GL_MAX_PROGRAM_PATCH_ATTRIBS_NV = 0x86D8; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texgen_reflection.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texgen_reflection.java new file mode 100644 index 0000000..fe0582a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texgen_reflection.java @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_texgen_reflection { + int GL_NORMAL_MAP_NV = 0x8511; + int GL_REFLECTION_MAP_NV = 0x8512; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texture_barrier.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texture_barrier.java new file mode 100644 index 0000000..71858b2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texture_barrier.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_texture_barrier { + + void glTextureBarrierNV(); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texture_compression_vtc.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texture_compression_vtc.java new file mode 100644 index 0000000..f3414be --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texture_compression_vtc.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; + +@Extension(postfix = "NV", className = "NVTextureCompressionVTC") +public interface NV_texture_compression_vtc { + + /** + * Accepted by the <internalformat> parameter of TexImage3D and + * CompressedTexImage3DARB and the <format> parameter of + * CompressedTexSubImage2DARB: + */ + int GL_COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0; + int GL_COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1; + int GL_COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2; + int GL_COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texture_env_combine4.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texture_env_combine4.java new file mode 100644 index 0000000..5e2ae59 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texture_env_combine4.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_texture_env_combine4 { + int GL_COMBINE4_NV = 0x8503; + int GL_SOURCE3_RGB_NV = 0x8583; + int GL_SOURCE3_ALPHA_NV = 0x858B; + int GL_OPERAND3_RGB_NV = 0x8593; + int GL_OPERAND3_ALPHA_NV = 0x859B; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texture_expand_normal.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texture_expand_normal.java new file mode 100644 index 0000000..46a1aef --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texture_expand_normal.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_texture_expand_normal { + + /** + * Accepted by the <pname> parameters of TexParameteri, + * TexParameteriv, TexParameterf, TexParameterfv, GetTexParameteri, + * and GetTexParameteriv: + */ + int GL_TEXTURE_UNSIGNED_REMAP_MODE_NV = 0x888F; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texture_multisample.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texture_multisample.java new file mode 100644 index 0000000..a46ddbd --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texture_multisample.java @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface NV_texture_multisample { + + /** Accepted by the <pname> parameter of GetTexLevelParameter: */ + + int GL_TEXTURE_COVERAGE_SAMPLES_NV = 0x9045, + GL_TEXTURE_COLOR_SAMPLES_NV = 0x9046; + + void glTexImage2DMultisampleCoverageNV(@GLenum int target, + @GLsizei int coverageSamples, @GLsizei int colorSamples, + int internalFormat, + @GLsizei int width, @GLsizei int height, + boolean fixedSampleLocations); + + void glTexImage3DMultisampleCoverageNV(@GLenum int target, + @GLsizei int coverageSamples, @GLsizei int colorSamples, + int internalFormat, + @GLsizei int width, @GLsizei int height, @GLsizei int depth, + boolean fixedSampleLocations); + + void glTextureImage2DMultisampleNV(@GLuint int texture, @GLenum int target, + @GLsizei int samples, int internalFormat, + @GLsizei int width, @GLsizei int height, + boolean fixedSampleLocations); + + void glTextureImage3DMultisampleNV(@GLuint int texture, @GLenum int target, + @GLsizei int samples, int internalFormat, + @GLsizei int width, @GLsizei int height, @GLsizei int depth, + boolean fixedSampleLocations); + + void glTextureImage2DMultisampleCoverageNV(@GLuint int texture, @GLenum int target, + @GLsizei int coverageSamples, @GLsizei int colorSamples, + int internalFormat, + @GLsizei int width, @GLsizei int height, + boolean fixedSampleLocations); + + void glTextureImage3DMultisampleCoverageNV(@GLuint int texture, @GLenum int target, + @GLsizei int coverageSamples, @GLsizei int colorSamples, + int internalFormat, + @GLsizei int width, @GLsizei int height, @GLsizei int depth, + boolean fixedSampleLocations); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texture_rectangle.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texture_rectangle.java new file mode 100644 index 0000000..5948814 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texture_rectangle.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_texture_rectangle { + int GL_TEXTURE_RECTANGLE_NV = 0x84F5; + int GL_TEXTURE_BINDING_RECTANGLE_NV = 0x84F6; + int GL_PROXY_TEXTURE_RECTANGLE_NV = 0x84F7; + int GL_MAX_RECTANGLE_TEXTURE_SIZE_NV = 0x84F8; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texture_shader.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texture_shader.java new file mode 100644 index 0000000..4cf0d7c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texture_shader.java @@ -0,0 +1,175 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_texture_shader { + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, + * and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev, and by the <target> parameter of TexEnvf, TexEnvfv, + * TexEnvi, TexEnviv, GetTexEnvfv, and GetTexEnviv. + */ + int GL_TEXTURE_SHADER_NV = 0x86DE; + + /** + * When the <target> parameter of TexEnvf, TexEnvfv, TexEnvi, TexEnviv, + * GetTexEnvfv, and GetTexEnviv is TEXTURE_SHADER_NV, then the value + * of <pname> may be: + */ + int GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV = 0x86D9; + int GL_SHADER_OPERATION_NV = 0x86DF; + int GL_OFFSET_TEXTURE_SCALE_NV = 0x86E2; + int GL_OFFSET_TEXTURE_BIAS_NV = 0x86E3; + int GL_OFFSET_TEXTURE_2D_SCALE_NV = GL_OFFSET_TEXTURE_SCALE_NV; + int GL_OFFSET_TEXTURE_2D_BIAS_NV = GL_OFFSET_TEXTURE_BIAS_NV; + int GL_PREVIOUS_TEXTURE_INPUT_NV = 0x86E4; + + /** + * When the <target> parameter of TexEnvfv, TexEnviv, GetTexEnvfv, and + * GetTexEnviv is TEXTURE_SHADER_NV, then the value of <pname> may be: + */ + int GL_CULL_MODES_NV = 0x86E0; + int GL_OFFSET_TEXTURE_MATRIX_NV = 0x86E1; + int GL_OFFSET_TEXTURE_2D_MATRIX_NV = GL_OFFSET_TEXTURE_MATRIX_NV; + int GL_CONST_EYE_NV = 0x86E5; + + /** + * When the <target> parameter GetTexEnvfv and GetTexEnviv is + * TEXTURE_SHADER_NV, then the value of <pname> may be: + */ + int GL_SHADER_CONSISTENT_NV = 0x86DD; + + /** + * When the <target> and <pname> parameters of TexEnvf, TexEnvfv, + * TexEnvi, and TexEnviv are TEXTURE_SHADER_NV and SHADER_OPERATION_NV + * respectively, then the value of <param> or the value pointed to by + * <params> may be: + */ + int GL_PASS_THROUGH_NV = 0x86E6; + int GL_CULL_FRAGMENT_NV = 0x86E7; + + int GL_OFFSET_TEXTURE_2D_NV = 0x86E8; + int GL_OFFSET_TEXTURE_RECTANGLE_NV = 0x864C; + int GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV = 0x864D; + int GL_DEPENDENT_AR_TEXTURE_2D_NV = 0x86E9; + int GL_DEPENDENT_GB_TEXTURE_2D_NV = 0x86EA; + + int GL_DOT_PRODUCT_NV = 0x86EC; + int GL_DOT_PRODUCT_DEPTH_REPLACE_NV = 0x86ED; + int GL_DOT_PRODUCT_TEXTURE_2D_NV = 0x86EE; + int GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV = 0x864E; + int GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV = 0x86F0; + int GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV = 0x86F1; + int GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV = 0x86F2; + int GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV = 0x86F3; + + /** + * Accepted by the <format> parameter of GetTexImage, TexImage1D, + * TexImage2D, TexSubImage1D, and TexSubImage2D. + */ + int GL_HILO_NV = 0x86F4; + int GL_DSDT_NV = 0x86F5; + int GL_DSDT_MAG_NV = 0x86F6; + int GL_DSDT_MAG_VIB_NV = 0x86F7; + + /** + * Accepted by the <type> parameter of GetTexImage, TexImage1D, + * TexImage2D, TexSubImage1D, and TexSubImage2D. + */ + int GL_UNSIGNED_INT_S8_S8_8_8_NV = 0x86DA; + int GL_UNSIGNED_INT_8_8_S8_S8_REV_NV = 0x86DB; + + /** + * Accepted by the <internalformat> parameter of CopyTexImage1D, + * CopyTexImage2D, TexImage1D, and TexImage2D. + */ + int GL_SIGNED_RGBA_NV = 0x86FB; + int GL_SIGNED_RGBA8_NV = 0x86FC; + int GL_SIGNED_RGB_NV = 0x86FE; + int GL_SIGNED_RGB8_NV = 0x86FF; + int GL_SIGNED_LUMINANCE_NV = 0x8701; + int GL_SIGNED_LUMINANCE8_NV = 0x8702; + int GL_SIGNED_LUMINANCE_ALPHA_NV = 0x8703; + int GL_SIGNED_LUMINANCE8_ALPHA8_NV = 0x8704; + int GL_SIGNED_ALPHA_NV = 0x8705; + int GL_SIGNED_ALPHA8_NV = 0x8706; + int GL_SIGNED_INTENSITY_NV = 0x8707; + int GL_SIGNED_INTENSITY8_NV = 0x8708; + int GL_SIGNED_RGB_UNSIGNED_ALPHA_NV = 0x870C; + int GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV = 0x870D; + + /** + * Accepted by the <internalformat> parameter of TexImage1D and + * TexImage2D. + */ + int GL_HILO16_NV = 0x86F8; + int GL_SIGNED_HILO_NV = 0x86F9; + int GL_SIGNED_HILO16_NV = 0x86FA; + int GL_DSDT8_NV = 0x8709; + int GL_DSDT8_MAG8_NV = 0x870A; + int GL_DSDT_MAG_INTENSITY_NV = 0x86DC; + int GL_DSDT8_MAG8_INTENSITY8_NV = 0x870B; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, GetDoublev, PixelTransferf, and PixelTransferi. + */ + int GL_HI_SCALE_NV = 0x870E; + int GL_LO_SCALE_NV = 0x870F; + int GL_DS_SCALE_NV = 0x8710; + int GL_DT_SCALE_NV = 0x8711; + int GL_MAGNITUDE_SCALE_NV = 0x8712; + int GL_VIBRANCE_SCALE_NV = 0x8713; + int GL_HI_BIAS_NV = 0x8714; + int GL_LO_BIAS_NV = 0x8715; + int GL_DS_BIAS_NV = 0x8716; + int GL_DT_BIAS_NV = 0x8717; + int GL_MAGNITUDE_BIAS_NV = 0x8718; + int GL_VIBRANCE_BIAS_NV = 0x8719; + + /** + * Accepted by the <pname> parameter of TexParameteriv, TexParameterfv, + * GetTexParameterfv and GetTexParameteriv. + */ + int GL_TEXTURE_BORDER_VALUES_NV = 0x871A; + + /** + * Accepted by the <pname> parameter of GetTexLevelParameterfv and + * GetTexLevelParameteriv. + */ + int GL_TEXTURE_HI_SIZE_NV = 0x871B; + int GL_TEXTURE_LO_SIZE_NV = 0x871C; + int GL_TEXTURE_DS_SIZE_NV = 0x871D; + int GL_TEXTURE_DT_SIZE_NV = 0x871E; + int GL_TEXTURE_MAG_SIZE_NV = 0x871F; +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texture_shader2.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texture_shader2.java new file mode 100644 index 0000000..3cc4ace --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texture_shader2.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_texture_shader2 { + int GL_DOT_PRODUCT_TEXTURE_3D_NV = 0x86EF; + int GL_HILO_NV = 0x86F4; + int GL_DSDT_NV = 0x86F5; + int GL_DSDT_MAG_NV = 0x86F6; + int GL_DSDT_MAG_VIB_NV = 0x86F7; + int GL_UNSIGNED_INT_S8_S8_8_8_NV = 0x86DA; + int GL_UNSIGNED_INT_8_8_S8_S8_REV_NV = 0x86DB; + int GL_SIGNED_RGBA_NV = 0x86FB; + int GL_SIGNED_RGBA8_NV = 0x86FC; + int GL_SIGNED_RGB_NV = 0x86FE; + int GL_SIGNED_RGB8_NV = 0x86FF; + int GL_SIGNED_LUMINANCE_NV = 0x8701; + int GL_SIGNED_LUMINANCE8_NV = 0x8702; + int GL_SIGNED_LUMINANCE_ALPHA_NV = 0x8703; + int GL_SIGNED_LUMINANCE8_ALPHA8_NV = 0x8704; + int GL_SIGNED_ALPHA_NV = 0x8705; + int GL_SIGNED_ALPHA8_NV = 0x8706; + int GL_SIGNED_INTENSITY_NV = 0x8707; + int GL_SIGNED_INTENSITY8_NV = 0x8708; + int GL_SIGNED_RGB_UNSIGNED_ALPHA_NV = 0x870C; + int GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV = 0x870D; + int GL_HILO16_NV = 0x86F8; + int GL_SIGNED_HILO_NV = 0x86F9; + int GL_SIGNED_HILO16_NV = 0x86FA; + int GL_DSDT8_NV = 0x8709; + int GL_DSDT8_MAG8_NV = 0x870A; + int GL_DSDT_MAG_INTENSITY_NV = 0x86DC; + int GL_DSDT8_MAG8_INTENSITY8_NV = 0x870B; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texture_shader3.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texture_shader3.java new file mode 100644 index 0000000..f4fecfa --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_texture_shader3.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_texture_shader3 { + int GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV = 0x8850; + int GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV = 0x8851; + int GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV = 0x8852; + int GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV = 0x8853; + int GL_OFFSET_HILO_TEXTURE_2D_NV = 0x8854; + int GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV = 0x8855; + int GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV = 0x8856; + int GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV = 0x8857; + int GL_DEPENDENT_HILO_TEXTURE_2D_NV = 0x8858; + int GL_DEPENDENT_RGB_TEXTURE_3D_NV = 0x8859; + int GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV = 0x885A; + int GL_DOT_PRODUCT_PASS_THROUGH_NV = 0x885B; + int GL_DOT_PRODUCT_TEXTURE_1D_NV = 0x885C; + int GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV = 0x885D; + int GL_HILO8_NV = 0x885E; + int GL_SIGNED_HILO8_NV = 0x885F; + int GL_FORCE_BLUE_TO_ONE_NV = 0x8860; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_transform_feedback.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_transform_feedback.java new file mode 100644 index 0000000..54fe359 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_transform_feedback.java @@ -0,0 +1,187 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +public interface NV_transform_feedback { + + /** + * Accepted by the <target> parameters of BindBuffer, BufferData, + * BufferSubData, MapBuffer, UnmapBuffer, GetBufferSubData, + * GetBufferPointerv, BindBufferRangeNV, BindBufferOffsetNV and + * BindBufferBaseNV: + */ + int GL_TRANSFORM_FEEDBACK_BUFFER_NV = 0x8C8E; + + /** + * Accepted by the <param> parameter of GetIntegerIndexedvEXT and + * GetBooleanIndexedvEXT: + */ + int GL_TRANSFORM_FEEDBACK_BUFFER_START_NV = 0x8C84; + int GL_TRANSFORM_FEEDBACK_BUFFER_SIZE_NV = 0x8C85; + int GL_TRANSFORM_FEEDBACK_RECORD_NV = 0x8C86; + + /** + * Accepted by the <param> parameter of GetIntegerIndexedvEXT and + * GetBooleanIndexedvEXT, and by the <pname> parameter of GetBooleanv, + * GetDoublev, GetIntegerv, and GetFloatv: + */ + int GL_TRANSFORM_FEEDBACK_BUFFER_BINDING_NV = 0x8C8F; + + /** + * Accepted by the <bufferMode> parameter of TransformFeedbackAttribsNV and + * TransformFeedbackVaryingsNV: + */ + int GL_INTERLEAVED_ATTRIBS_NV = 0x8C8C; + int GL_SEPARATE_ATTRIBS_NV = 0x8C8D; + + /** + * Accepted by the <target> parameter of BeginQuery, EndQuery, and + * GetQueryiv: + */ + int GL_PRIMITIVES_GENERATED_NV = 0x8C87; + int GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN_NV = 0x8C88; + + /** + * Accepted by the <cap> parameter of Enable, Disable, and IsEnabled, and by + * the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + * GetDoublev: + */ + int GL_RASTERIZER_DISCARD_NV = 0x8C89; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv, + * and GetFloatv: + */ + int GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS_NV = 0x8C8A; + int GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS_NV = 0x8C8B; + int GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS_NV = 0x8C80; + int GL_TRANSFORM_FEEDBACK_ATTRIBS_NV = 0x8C7E; + + /** Accepted by the <pname> parameter of GetProgramiv: */ + int GL_ACTIVE_VARYINGS_NV = 0x8C81; + int GL_ACTIVE_VARYING_MAX_LENGTH_NV = 0x8C82; + int GL_TRANSFORM_FEEDBACK_VARYINGS_NV = 0x8C83; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv, + * GetFloatv, and GetProgramiv: + */ + int GL_TRANSFORM_FEEDBACK_BUFFER_MODE_NV = 0x8C7F; + + /** Accepted by the <attribs> parameter of TransformFeedbackAttribsNV: */ + int GL_BACK_PRIMARY_COLOR_NV = 0x8C77; + int GL_BACK_SECONDARY_COLOR_NV = 0x8C78; + int GL_TEXTURE_COORD_NV = 0x8C79; + int GL_CLIP_DISTANCE_NV = 0x8C7A; + int GL_VERTEX_ID_NV = 0x8C7B; + int GL_PRIMITIVE_ID_NV = 0x8C7C; + int GL_GENERIC_ATTRIB_NV = 0x8C7D; + int GL_LAYER_NV = 0x8DAA; + + void glBindBufferRangeNV(@GLenum int target, @GLuint int index, @GLuint int buffer, @GLintptr long offset, @GLsizeiptr long size); + + void glBindBufferOffsetNV(@GLenum int target, @GLuint int index, @GLuint int buffer, @GLintptr long offset); + + void glBindBufferBaseNV(@GLenum int target, @GLuint int index, @GLuint int buffer); + + void glTransformFeedbackAttribsNV(@Constant("attribs.remaining() / 3") @GLsizei int count, @Check("3") @Const IntBuffer attribs, @GLenum int bufferMode); + + void glTransformFeedbackVaryingsNV(@GLuint int program, @AutoSize("locations") @GLsizei int count, @Const IntBuffer locations, @GLenum int bufferMode); + + void glBeginTransformFeedbackNV(@GLenum int primitiveMode); + + void glEndTransformFeedbackNV(); + + int glGetVaryingLocationNV(@GLuint int program, @NullTerminated @Const @GLchar ByteBuffer name); + + @Alternate("glGetVaryingLocationNV") + int glGetVaryingLocationNV(@GLuint int program, @NullTerminated CharSequence name); + + void glGetActiveVaryingNV(@GLuint int program, @GLuint int index, @AutoSize("name") @GLsizei int bufSize, + @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length, + @OutParameter @GLsizei @Check("1") IntBuffer size, + @OutParameter @GLenum @Check("1") IntBuffer type, + @OutParameter @GLchar ByteBuffer name); + + /** Overloads glGetActiveVaryingNV. This version returns both size and type in the sizeType buffer (at .position() and .position() + 1). */ + @Alternate("glGetActiveVaryingNV") + @GLreturn(value = "name", maxLength = "bufSize") + void glGetActiveVaryingNV2(@GLuint int program, @GLuint int index, @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(name_length)") IntBuffer length, + @OutParameter @Check("2") IntBuffer sizeType, + @OutParameter @GLenum @Constant("MemoryUtil.getAddress(sizeType, sizeType.position() + 1)") IntBuffer type, + @OutParameter @GLchar ByteBuffer name); + + /** Overloads glGetActiveVaryingNV. This version returns only the varying name. */ + @Alternate(value = "glGetActiveVaryingNV", javaAlt = true) + @GLreturn(value = "name", maxLength = "bufSize") + void glGetActiveVaryingNV(@GLuint int program, @GLuint int index, @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(name_length), MemoryUtil.getAddress0(APIUtil.getBufferInt(caps)), MemoryUtil.getAddress(APIUtil.getBufferInt(caps), 1)") IntBuffer length, + @OutParameter @GLchar ByteBuffer name); + + /** Overloads glGetActiveVaryingNV. This version returns only the varying size. */ + @Alternate(value = "glGetActiveVaryingNV", javaAlt = true) + @GLreturn(value = "size") + void glGetActiveVaryingSizeNV(@GLuint int program, @GLuint int index, @Constant("0") @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("0L") IntBuffer length, + @OutParameter IntBuffer size, + @OutParameter @GLenum @Constant("MemoryUtil.getAddress(size, 1)") IntBuffer type, // Reuse size buffer and ignore + @OutParameter @GLchar @Constant("APIUtil.getBufferByte0(caps)") ByteBuffer name); + + /** Overloads glGetActiveVaryingNV. This version returns only the varying type. */ + @Alternate(value = "glGetActiveVaryingNV", javaAlt = true) + @GLreturn(value = "type") + void glGetActiveVaryingTypeNV(@GLuint int program, @GLuint int index, @Constant("0") @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("0L") IntBuffer length, + @OutParameter @Constant("MemoryUtil.getAddress(type, 1)") IntBuffer size, // Reuse type buffer and ignore + @OutParameter @GLenum IntBuffer type, + @OutParameter @GLchar @Constant("APIUtil.getBufferByte0(caps)") ByteBuffer name); + + void glActiveVaryingNV(@GLuint int program, @NullTerminated @Const @GLchar ByteBuffer name); + + @Alternate("glActiveVaryingNV") + void glActiveVaryingNV(@GLuint int program, @NullTerminated CharSequence name); + + void glGetTransformFeedbackVaryingNV(@GLuint int program, @GLuint int index, @OutParameter @Check("1") IntBuffer location); + + @Alternate("glGetTransformFeedbackVaryingNV") + @GLreturn("location") + void glGetTransformFeedbackVaryingNV2(@GLuint int program, @GLuint int index, @OutParameter IntBuffer location); + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_transform_feedback2.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_transform_feedback2.java new file mode 100644 index 0000000..9390d3a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_transform_feedback2.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLreturn; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.IntBuffer; + +public interface NV_transform_feedback2 { + + /** Accepted by the <target> parameter of BindTransformFeedbackNV: */ + + int GL_TRANSFORM_FEEDBACK_NV = 0x8E22; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv, + * and GetFloatv: + */ + int GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV = 0x8E23; + int GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV = 0x8E24; + int GL_TRANSFORM_FEEDBACK_BINDING_NV = 0x8E25; + + void glBindTransformFeedbackNV(@GLenum int target, @GLuint int id); + + void glDeleteTransformFeedbacksNV(@AutoSize("ids") @GLsizei int n, @Const @GLuint IntBuffer ids); + + @Alternate("glDeleteTransformFeedbacksNV") + void glDeleteTransformFeedbacksNV(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(caps, id)", keepParam = true) int id); + + void glGenTransformFeedbacksNV(@AutoSize("ids") @GLsizei int n, @OutParameter @GLuint IntBuffer ids); + + @Alternate("glGenTransformFeedbacksNV") + @GLreturn("ids") + void glGenTransformFeedbacksNV2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer ids); + + boolean glIsTransformFeedbackNV(@GLuint int id); + + void glPauseTransformFeedbackNV(); + + void glResumeTransformFeedbackNV(); + + void glDrawTransformFeedbackNV(@GLenum int mode, @GLuint int id); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_array_range.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_array_range.java new file mode 100644 index 0000000..aecc145 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_array_range.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.*; + +public interface NV_vertex_array_range { + int GL_VERTEX_ARRAY_RANGE_NV = 0x851D; + int GL_VERTEX_ARRAY_RANGE_LENGTH_NV = 0x851E; + int GL_VERTEX_ARRAY_RANGE_VALID_NV = 0x851F; + int GL_MAX_VERTEX_ARRAY_RANGE_ELEMENT_NV = 0x8520; + int GL_VERTEX_ARRAY_RANGE_POINTER_NV = 0x8521; + + void glVertexArrayRangeNV(@AutoSize("pPointer") @GLsizei int size, + @Const + @GLbyte + @GLshort + @GLint + @GLfloat + @GLdouble Buffer pPointer); + + void glFlushVertexArrayRangeNV(); + + @PlatformDependent({Platform.WGL, Platform.GLX}) + @GLvoid + @AutoSize("size") + ByteBuffer glAllocateMemoryNV(int size, float readFrequency, float writeFrequency, float priority); + + @PlatformDependent({Platform.WGL, Platform.GLX}) + void glFreeMemoryNV(@Check @GLbyte Buffer pointer); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_array_range2.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_array_range2.java new file mode 100644 index 0000000..2972f1a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_array_range2.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_vertex_array_range2 { + int GL_VERTEX_ARRAY_RANGE_WITHOUT_FLUSH_NV = 0x8533; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_attrib_integer_64bit.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_attrib_integer_64bit.java new file mode 100644 index 0000000..63edcc6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_attrib_integer_64bit.java @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.LongBuffer; + +@Dependent +public interface NV_vertex_attrib_integer_64bit { + + /** + * Accepted by the <type> parameter of VertexAttribLPointerEXT, + * VertexArrayVertexAttribLOffsetEXT, and VertexAttribLFormatNV: + */ + int GL_INT64_NV = 0x140E; + int GL_UNSIGNED_INT64_NV = 0x140F; + + void glVertexAttribL1i64NV(@GLuint int index, @GLint64EXT long x); + + void glVertexAttribL2i64NV(@GLuint int index, @GLint64EXT long x, @GLint64EXT long y); + + void glVertexAttribL3i64NV(@GLuint int index, @GLint64EXT long x, @GLint64EXT long y, @GLint64EXT long z); + + void glVertexAttribL4i64NV(@GLuint int index, @GLint64EXT long x, @GLint64EXT long y, @GLint64EXT long z, @GLint64EXT long w); + + @StripPostfix("v") + void glVertexAttribL1i64vNV(@GLuint int index, @Const @GLint64EXT @Check("1") LongBuffer v); + + @StripPostfix("v") + void glVertexAttribL2i64vNV(@GLuint int index, @Const @GLint64EXT @Check("2") LongBuffer v); + + @StripPostfix("v") + void glVertexAttribL3i64vNV(@GLuint int index, @Const @GLint64EXT @Check("3") LongBuffer v); + + @StripPostfix("v") + void glVertexAttribL4i64vNV(@GLuint int index, @Const @GLint64EXT @Check("4") LongBuffer v); + + void glVertexAttribL1ui64NV(@GLuint int index, @GLuint64EXT long x); + + void glVertexAttribL2ui64NV(@GLuint int index, @GLuint64EXT long x, @GLuint64EXT long y); + + void glVertexAttribL3ui64NV(@GLuint int index, @GLuint64EXT long x, @GLuint64EXT long y, @GLuint64EXT long z); + + void glVertexAttribL4ui64NV(@GLuint int index, @GLuint64EXT long x, @GLuint64EXT long y, @GLuint64EXT long z, @GLuint64EXT long w); + + @StripPostfix("v") + void glVertexAttribL1ui64vNV(@GLuint int index, @Const @GLuint64EXT @Check("1") LongBuffer v); + + @StripPostfix("v") + void glVertexAttribL2ui64vNV(@GLuint int index, @Const @GLuint64EXT @Check("2") LongBuffer v); + + @StripPostfix("v") + void glVertexAttribL3ui64vNV(@GLuint int index, @Const @GLuint64EXT @Check("3") LongBuffer v); + + @StripPostfix("v") + void glVertexAttribL4ui64vNV(@GLuint int index, @Const @GLuint64EXT @Check("4") LongBuffer v); + + @StripPostfix("params") + void glGetVertexAttribLi64vNV(@GLuint int index, @GLenum int pname, @OutParameter @GLint64EXT @Check("4") LongBuffer params); + + @StripPostfix("params") + void glGetVertexAttribLui64vNV(@GLuint int index, @GLenum int pname, @OutParameter @GLuint64EXT @Check("4") LongBuffer params); + + @Dependent("GL_NV_vertex_buffer_unified_memory") + void glVertexAttribLFormatNV(@GLuint int index, int size, @GLenum int type, @GLsizei int stride); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_buffer_unified_memory.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_buffer_unified_memory.java new file mode 100644 index 0000000..6039b5f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_buffer_unified_memory.java @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.LongBuffer; + +public interface NV_vertex_buffer_unified_memory { + + /** + * Accepted by the <cap> parameter of DisableClientState, + * EnableClientState, IsEnabled: + */ + int GL_VERTEX_ATTRIB_ARRAY_UNIFIED_NV = 0x8F1E; + int GL_ELEMENT_ARRAY_UNIFIED_NV = 0x8F1F; + + /** + * Accepted by the <pname> parameter of BufferAddressRangeNV + * and the <value> parameter of GetIntegerui64i_vNV: + */ + int GL_VERTEX_ATTRIB_ARRAY_ADDRESS_NV = 0x8F20; + int GL_TEXTURE_COORD_ARRAY_ADDRESS_NV = 0x8F25; + + /** + * Accepted by the <pname> parameter of BufferAddressRangeNV + * and the <value> parameter of GetIntegerui64vNV: + */ + int GL_VERTEX_ARRAY_ADDRESS_NV = 0x8F21; + int GL_NORMAL_ARRAY_ADDRESS_NV = 0x8F22; + int GL_COLOR_ARRAY_ADDRESS_NV = 0x8F23; + int GL_INDEX_ARRAY_ADDRESS_NV = 0x8F24; + int GL_EDGE_FLAG_ARRAY_ADDRESS_NV = 0x8F26; + int GL_SECONDARY_COLOR_ARRAY_ADDRESS_NV = 0x8F27; + int GL_FOG_COORD_ARRAY_ADDRESS_NV = 0x8F28; + int GL_ELEMENT_ARRAY_ADDRESS_NV = 0x8F29; + + /** Accepted by the <target> parameter of GetIntegeri_vNV: */ + int GL_VERTEX_ATTRIB_ARRAY_LENGTH_NV = 0x8F2A; + int GL_TEXTURE_COORD_ARRAY_LENGTH_NV = 0x8F2F; + + /** Accepted by the <value> parameter of GetIntegerv: */ + int GL_VERTEX_ARRAY_LENGTH_NV = 0x8F2B; + int GL_NORMAL_ARRAY_LENGTH_NV = 0x8F2C; + int GL_COLOR_ARRAY_LENGTH_NV = 0x8F2D; + int GL_INDEX_ARRAY_LENGTH_NV = 0x8F2E; + int GL_EDGE_FLAG_ARRAY_LENGTH_NV = 0x8F30; + int GL_SECONDARY_COLOR_ARRAY_LENGTH_NV = 0x8F31; + int GL_FOG_COORD_ARRAY_LENGTH_NV = 0x8F32; + int GL_ELEMENT_ARRAY_LENGTH_NV = 0x8F33; + + void glBufferAddressRangeNV(@GLenum int pname, @GLuint int index, @GLuint64EXT long address, @GLsizeiptr long length); + + void glVertexFormatNV(int size, @GLenum int type, @GLsizei int stride); + + void glNormalFormatNV(@GLenum int type, @GLsizei int stride); + + void glColorFormatNV(int size, @GLenum int type, @GLsizei int stride); + + void glIndexFormatNV(@GLenum int type, @GLsizei int stride); + + void glTexCoordFormatNV(int size, @GLenum int type, @GLsizei int stride); + + void glEdgeFlagFormatNV(@GLsizei int stride); + + void glSecondaryColorFormatNV(int size, @GLenum int type, @GLsizei int stride); + + void glFogCoordFormatNV(@GLenum int type, @GLsizei int stride); + + void glVertexAttribFormatNV(@GLuint int index, int size, @GLenum int type, boolean normalized, @GLsizei int stride); + + void glVertexAttribIFormatNV(@GLuint int index, int size, @GLenum int type, @GLsizei int stride); + + @StripPostfix("result") + void glGetIntegerui64i_vNV(@GLenum int value, @GLuint int index, @OutParameter @Check("1") @GLuint64EXT LongBuffer result); + + @Alternate("glGetIntegerui64i_vNV") + @GLreturn("result") + @StripPostfix(value = "result", postfix = "i_v") + void glGetIntegerui64i_vNV2(@GLenum int value, @GLuint int index, @OutParameter @GLuint64EXT LongBuffer result); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_program.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_program.java new file mode 100644 index 0000000..b6fabc6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_program.java @@ -0,0 +1,331 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.*; + +public interface NV_vertex_program extends NV_program { + + /** + Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, + and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + and GetDoublev, and by the <target> parameter of BindProgramNV, + ExecuteProgramNV, GetProgramParameter[df]vNV, GetTrackMatrixivNV, + LoadProgramNV, ProgramParameter[s]4[df][v]NV, and TrackMatrixNV: + */ + int GL_VERTEX_PROGRAM_NV = 0x8620; + + /** + Accepted by the <cap> parameter of Disable, Enable, and IsEnabled, + and by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + and GetDoublev: + */ + int GL_VERTEX_PROGRAM_POINT_SIZE_NV = 0x8642; + int GL_VERTEX_PROGRAM_TWO_SIDE_NV = 0x8643; + + /** + Accepted by the <target> parameter of ExecuteProgramNV and + LoadProgramNV: + */ + int GL_VERTEX_STATE_PROGRAM_NV = 0x8621; + + /** + Accepted by the <pname> parameter of GetVertexAttrib[dfi]vNV: + */ + int GL_ATTRIB_ARRAY_SIZE_NV = 0x8623; + int GL_ATTRIB_ARRAY_STRIDE_NV = 0x8624; + int GL_ATTRIB_ARRAY_TYPE_NV = 0x8625; + int GL_CURRENT_ATTRIB_NV = 0x8626; + + /** + Accepted by the <pname> parameter of GetProgramParameterfvNV + and GetProgramParameterdvNV: + */ + int GL_PROGRAM_PARAMETER_NV = 0x8644; + + /** + Accepted by the <pname> parameter of GetVertexAttribPointervNV: + */ + int GL_ATTRIB_ARRAY_POINTER_NV = 0x8645; + + /** + Accepted by the <pname> parameter of GetTrackMatrixivNV: + */ + int GL_TRACK_MATRIX_NV = 0x8648; + int GL_TRACK_MATRIX_TRANSFORM_NV = 0x8649; + + /** + Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + GetFloatv, and GetDoublev: + */ + int GL_MAX_TRACK_MATRIX_STACK_DEPTH_NV = 0x862E; + int GL_MAX_TRACK_MATRICES_NV = 0x862F; + int GL_CURRENT_MATRIX_STACK_DEPTH_NV = 0x8640; + int GL_CURRENT_MATRIX_NV = 0x8641; + int GL_VERTEX_PROGRAM_BINDING_NV = 0x864A; + + /** + Accepted by the <matrix> parameter of TrackMatrixNV: + */ + int GL_MODELVIEW_PROJECTION_NV = 0x8629; + + /** + Accepted by the <matrix> parameter of TrackMatrixNV and by the + <mode> parameter of MatrixMode: + */ + int GL_MATRIX0_NV = 0x8630; + int GL_MATRIX1_NV = 0x8631; + int GL_MATRIX2_NV = 0x8632; + int GL_MATRIX3_NV = 0x8633; + int GL_MATRIX4_NV = 0x8634; + int GL_MATRIX5_NV = 0x8635; + int GL_MATRIX6_NV = 0x8636; + int GL_MATRIX7_NV = 0x8637; + + /** + Accepted by the <transform> parameter of TrackMatrixNV: + */ + int GL_IDENTITY_NV = 0x862A; + int GL_INVERSE_NV = 0x862B; + int GL_TRANSPOSE_NV = 0x862C; + int GL_INVERSE_TRANSPOSE_NV = 0x862D; + + /** + Accepted by the <array> parameter of EnableClientState and + DisableClientState, by the <cap> parameter of IsEnabled, and by + the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, and + GetDoublev: + */ + int GL_VERTEX_ATTRIB_ARRAY0_NV = 0x8650; + int GL_VERTEX_ATTRIB_ARRAY1_NV = 0x8651; + int GL_VERTEX_ATTRIB_ARRAY2_NV = 0x8652; + int GL_VERTEX_ATTRIB_ARRAY3_NV = 0x8653; + int GL_VERTEX_ATTRIB_ARRAY4_NV = 0x8654; + int GL_VERTEX_ATTRIB_ARRAY5_NV = 0x8655; + int GL_VERTEX_ATTRIB_ARRAY6_NV = 0x8656; + int GL_VERTEX_ATTRIB_ARRAY7_NV = 0x8657; + int GL_VERTEX_ATTRIB_ARRAY8_NV = 0x8658; + int GL_VERTEX_ATTRIB_ARRAY9_NV = 0x8659; + int GL_VERTEX_ATTRIB_ARRAY10_NV = 0x865A; + int GL_VERTEX_ATTRIB_ARRAY11_NV = 0x865B; + int GL_VERTEX_ATTRIB_ARRAY12_NV = 0x865C; + int GL_VERTEX_ATTRIB_ARRAY13_NV = 0x865D; + int GL_VERTEX_ATTRIB_ARRAY14_NV = 0x865E; + int GL_VERTEX_ATTRIB_ARRAY15_NV = 0x865F; + + /** + Accepted by the <target> parameter of GetMapdv, GetMapfv, GetMapiv, + Map1d and Map1f and by the <cap> parameter of Enable, Disable, and + IsEnabled, and by the <pname> parameter of GetBooleanv, GetIntegerv, + GetFloatv, and GetDoublev: + */ + int GL_MAP1_VERTEX_ATTRIB0_4_NV = 0x8660; + int GL_MAP1_VERTEX_ATTRIB1_4_NV = 0x8661; + int GL_MAP1_VERTEX_ATTRIB2_4_NV = 0x8662; + int GL_MAP1_VERTEX_ATTRIB3_4_NV = 0x8663; + int GL_MAP1_VERTEX_ATTRIB4_4_NV = 0x8664; + int GL_MAP1_VERTEX_ATTRIB5_4_NV = 0x8665; + int GL_MAP1_VERTEX_ATTRIB6_4_NV = 0x8666; + int GL_MAP1_VERTEX_ATTRIB7_4_NV = 0x8667; + int GL_MAP1_VERTEX_ATTRIB8_4_NV = 0x8668; + int GL_MAP1_VERTEX_ATTRIB9_4_NV = 0x8669; + int GL_MAP1_VERTEX_ATTRIB10_4_NV = 0x866A; + int GL_MAP1_VERTEX_ATTRIB11_4_NV = 0x866B; + int GL_MAP1_VERTEX_ATTRIB12_4_NV = 0x866C; + int GL_MAP1_VERTEX_ATTRIB13_4_NV = 0x866D; + int GL_MAP1_VERTEX_ATTRIB14_4_NV = 0x866E; + int GL_MAP1_VERTEX_ATTRIB15_4_NV = 0x866F; + + /** + Accepted by the <target> parameter of GetMapdv, GetMapfv, GetMapiv, + Map2d and Map2f and by the <cap> parameter of Enable, Disable, and + IsEnabled, and by the <pname> parameter of GetBooleanv, GetIntegerv, + GetFloatv, and GetDoublev: + */ + int GL_MAP2_VERTEX_ATTRIB0_4_NV = 0x8670; + int GL_MAP2_VERTEX_ATTRIB1_4_NV = 0x8671; + int GL_MAP2_VERTEX_ATTRIB2_4_NV = 0x8672; + int GL_MAP2_VERTEX_ATTRIB3_4_NV = 0x8673; + int GL_MAP2_VERTEX_ATTRIB4_4_NV = 0x8674; + int GL_MAP2_VERTEX_ATTRIB5_4_NV = 0x8675; + int GL_MAP2_VERTEX_ATTRIB6_4_NV = 0x8676; + int GL_MAP2_VERTEX_ATTRIB7_4_NV = 0x8677; + int GL_MAP2_VERTEX_ATTRIB8_4_NV = 0x8678; + int GL_MAP2_VERTEX_ATTRIB9_4_NV = 0x8679; + int GL_MAP2_VERTEX_ATTRIB10_4_NV = 0x867A; + int GL_MAP2_VERTEX_ATTRIB11_4_NV = 0x867B; + int GL_MAP2_VERTEX_ATTRIB12_4_NV = 0x867C; + int GL_MAP2_VERTEX_ATTRIB13_4_NV = 0x867D; + int GL_MAP2_VERTEX_ATTRIB14_4_NV = 0x867E; + int GL_MAP2_VERTEX_ATTRIB15_4_NV = 0x867F; + + void glExecuteProgramNV(@GLenum int target, @GLuint int id, @Check("4") @Const FloatBuffer params); + + @StripPostfix("params") + void glGetProgramParameterfvNV(@GLenum int target, @GLuint int index, @GLenum int parameterName, @OutParameter @Check("4") FloatBuffer params); + + @StripPostfix("params") + void glGetProgramParameterdvNV(@GLenum int target, @GLuint int index, @GLenum int parameterName, @OutParameter @Check("4") DoubleBuffer params); + + @StripPostfix("params") + void glGetTrackMatrixivNV(@GLenum int target, @GLuint int address, @GLenum int parameterName, @OutParameter @Check("4") IntBuffer params); + + @StripPostfix("params") + void glGetVertexAttribfvNV(@GLuint int index, @GLenum int parameterName, @OutParameter @Check("4") FloatBuffer params); + + @StripPostfix("params") + void glGetVertexAttribdvNV(@GLuint int index, @GLenum int parameterName, @OutParameter @Check("4") DoubleBuffer params); + + @StripPostfix("params") + void glGetVertexAttribivNV(@GLuint int index, @GLenum int parameterName, @OutParameter @Check("4") IntBuffer params); + + @StripPostfix("pointer") + void glGetVertexAttribPointervNV(@GLuint int index, @GLenum int parameterName, @Result @GLvoid ByteBuffer pointer); + + void glProgramParameter4fNV(@GLenum int target, @GLuint int index, float x, float y, float z, float w); + + void glProgramParameter4dNV(@GLenum int target, @GLuint int index, double x, double y, double z, double w); + + @StripPostfix("params") + void glProgramParameters4fvNV(@GLenum int target, @GLuint int index, @AutoSize(value = "params", expression = " >> 2") @GLuint int count, + @Const FloatBuffer params); + + @StripPostfix("params") + void glProgramParameters4dvNV(@GLenum int target, @GLuint int index, @AutoSize(value = "params", expression = " >> 2") @GLuint int count, + @Const DoubleBuffer params); + + void glTrackMatrixNV(@GLenum int target, @GLuint int address, @GLenum int matrix, @GLenum int transform); + + void glVertexAttribPointerNV(@GLuint int index, int size, @GLenum int type, @GLsizei int stride, + @CachedReference(index="index",name="glVertexAttribPointer_buffer") + @BufferObject(BufferKind.ArrayVBO) + @Check + @Const + @GLbyte + @GLubyte + @GLshort + @GLushort + @GLint + @GLuint + @GLfloat + @GLdouble Buffer buffer); + + @NoErrorCheck + void glVertexAttrib1sNV(@GLuint int index, short x); + + @NoErrorCheck + void glVertexAttrib1fNV(@GLuint int index, float x); + + @NoErrorCheck + void glVertexAttrib1dNV(@GLuint int index, double x); + + @NoErrorCheck + void glVertexAttrib2sNV(@GLuint int index, short x, short y); + + @NoErrorCheck + void glVertexAttrib2fNV(@GLuint int index, float x, float y); + + @NoErrorCheck + void glVertexAttrib2dNV(@GLuint int index, double x, double y); + + @NoErrorCheck + void glVertexAttrib3sNV(@GLuint int index, short x, short y, short z); + + @NoErrorCheck + void glVertexAttrib3fNV(@GLuint int index, float x, float y, float z); + + @NoErrorCheck + void glVertexAttrib3dNV(@GLuint int index, double x, double y, double z); + + @NoErrorCheck + void glVertexAttrib4sNV(@GLuint int index, short x, short y, short z, short w); + + @NoErrorCheck + void glVertexAttrib4fNV(@GLuint int index, float x, float y, float z, float w); + + @NoErrorCheck + void glVertexAttrib4dNV(@GLuint int index, double x, double y, double z, double w); + + @NoErrorCheck + void glVertexAttrib4ubNV(@GLuint int index, @GLubyte byte x, @GLubyte byte y, @GLubyte byte z, @GLubyte byte w); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribs1svNV(@GLuint int index, @AutoSize("v") @GLsizei int n, @Const ShortBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribs1fvNV(@GLuint int index, @AutoSize("v") @GLsizei int n, @Const FloatBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribs1dvNV(@GLuint int index, @AutoSize("v") @GLsizei int n, @Const DoubleBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribs2svNV(@GLuint int index, @AutoSize(value = "v", expression = " >> 1") @GLsizei int n, @Const ShortBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribs2fvNV(@GLuint int index, @AutoSize(value = "v", expression = " >> 1") @GLsizei int n, @Const FloatBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribs2dvNV(@GLuint int index, @AutoSize(value = "v", expression = " >> 1") @GLsizei int n, @Const DoubleBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribs3svNV(@GLuint int index, @AutoSize(value = "v", expression = " / 3") @GLsizei int n, @Const ShortBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribs3fvNV(@GLuint int index, @AutoSize(value = "v", expression = " / 3") @GLsizei int n, @Const FloatBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribs3dvNV(@GLuint int index, @AutoSize(value = "v", expression = " / 3") @GLsizei int n, @Const DoubleBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribs4svNV(@GLuint int index, @AutoSize(value = "v", expression = " >> 2") @GLsizei int n, @Const ShortBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribs4fvNV(@GLuint int index, @AutoSize(value = "v", expression = " >> 2") @GLsizei int n, @Const FloatBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribs4dvNV(@GLuint int index, @AutoSize(value = "v", expression = " >> 2") @GLsizei int n, @Const DoubleBuffer v); +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_program1_1.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_program1_1.java new file mode 100644 index 0000000..1f1e89f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_program1_1.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_vertex_program1_1 { +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_program2.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_program2.java new file mode 100644 index 0000000..d6f3d74 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_program2.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_vertex_program2 { +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_program2_option.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_program2_option.java new file mode 100644 index 0000000..0d87f4e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_program2_option.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_vertex_program2_option { + + /** + * Accepted by the <pname> parameter of GetProgramivARB: + */ + int GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV = 0x88F4; + int GL_MAX_PROGRAM_CALL_DEPTH_NV = 0x88F5; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_program3.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_program3.java new file mode 100644 index 0000000..61342ea --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_program3.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_vertex_program3 { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB = 0x8B4C; +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_program4.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_program4.java new file mode 100644 index 0000000..7d92d33 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_vertex_program4.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface NV_vertex_program4 { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_video_capture.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_video_capture.java new file mode 100644 index 0000000..15a6948 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/NV_video_capture.java @@ -0,0 +1,201 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.DoubleBuffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; +import java.nio.LongBuffer; + +public interface NV_video_capture { + + /** + * Accepted by the <target> parameters of BindBufferARB, BufferDataARB, + * BufferSubDataARB, MapBufferARB, UnmapBufferARB, GetBufferSubDataARB, + * GetBufferParameterivARB, and GetBufferPointervARB: + */ + int GL_VIDEO_BUFFER_NV = 0x9020; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_VIDEO_BUFFER_BINDING_NV = 0x9021; + + /** + * Accepted by the <frame_region> parameter of + * BindVideoCaptureStreamBufferNV, and BindVideoCaptureStreamTextureNV: + */ + int GL_FIELD_UPPER_NV = 0x9022, + GL_FIELD_LOWER_NV = 0x9023; + + /** Accepted by the <pname> parameter of GetVideoCaptureivNV: */ + int GL_NUM_VIDEO_CAPTURE_STREAMS_NV = 0x9024, + GL_NEXT_VIDEO_CAPTURE_BUFFER_STATUS_NV = 0x9025; + + /** + * Accepted by the <pname> parameter of + * GetVideoCaptureStream{i,f,d}vNV: + */ + int GL_LAST_VIDEO_CAPTURE_STATUS_NV = 0x9027, + GL_VIDEO_BUFFER_PITCH_NV = 0x9028, + GL_VIDEO_CAPTURE_FRAME_WIDTH_NV = 0x9038, + GL_VIDEO_CAPTURE_FRAME_HEIGHT_NV = 0x9039, + GL_VIDEO_CAPTURE_FIELD_UPPER_HEIGHT_NV = 0x903A, + GL_VIDEO_CAPTURE_FIELD_LOWER_HEIGHT_NV = 0x903B, + GL_VIDEO_CAPTURE_TO_422_SUPPORTED_NV = 0x9026; + + /** + * Accepted by the <pname> parameter of + * GetVideoCaptureStream{i,f,d}vNV and as the <pname> parameter of + * VideoCaptureStreamParameter{i,f,d}vNV: + */ + int GL_VIDEO_COLOR_CONVERSION_MATRIX_NV = 0x9029, + GL_VIDEO_COLOR_CONVERSION_MAX_NV = 0x902A, + GL_VIDEO_COLOR_CONVERSION_MIN_NV = 0x902B, + GL_VIDEO_COLOR_CONVERSION_OFFSET_NV = 0x902C, + GL_VIDEO_BUFFER_INTERNAL_FORMAT_NV = 0x902D, + GL_VIDEO_CAPTURE_SURFACE_ORIGIN_NV = 0x903C; + /** Returned by VideoCaptureNV: */ + int GL_PARTIAL_SUCCESS_NV = 0x902E; + + /** + * Returned by VideoCaptureNV and GetVideoCaptureStream{i,f,d}vNV + * when <pname> is LAST_VIDEO_CAPTURE_STATUS_NV: + */ + int GL_SUCCESS_NV = 0x902F, + GL_FAILURE_NV = 0x9030; + + /** + * Accepted in the <params> parameter of + * VideoCaptureStreamParameter{i,f,d}vNV when <pname> is + * VIDEO_BUFFER_INTERNAL_FORMAT_NV and returned by + * GetVideoCaptureStream{i,f,d}vNV when <pname> is + * VIDEO_BUFFER_INTERNAL_FORMAT_NV: + */ + int GL_YCBYCR8_422_NV = 0x9031, + GL_YCBAYCR8A_4224_NV = 0x9032, + GL_Z6Y10Z6CB10Z6Y10Z6CR10_422_NV = 0x9033, + GL_Z6Y10Z6CB10Z6A10Z6Y10Z6CR10Z6A10_4224_NV = 0x9034, + GL_Z4Y12Z4CB12Z4Y12Z4CR12_422_NV = 0x9035, + GL_Z4Y12Z4CB12Z4A12Z4Y12Z4CR12Z4A12_4224_NV = 0x9036, + GL_Z4Y12Z4CB12Z4CR12_444_NV = 0x9037; + + /* + * Accepted in the attribute list of the GLX reply to the + * glXEnumerateVideoCaptureDevicesNV command: + */ + /*int GLX_DEVICE_ID_NV = 0x20CD;*/ + + /** Accepted by the <attribute> parameter of NVPresentVideoUtil.glQueryContextNV: */ + int GL_NUM_VIDEO_CAPTURE_SLOTS_NV = 0x20CF; + + /** + * Accepted by the <attribute> parameter of + * glQueryVideoCaptureDeviceNV: + */ + int GL_UNIQUE_ID_NV = 0x20CE; + + void glBeginVideoCaptureNV(@GLuint int video_capture_slot); + + void glBindVideoCaptureStreamBufferNV(@GLuint int video_capture_slot, + @GLuint int stream, @GLenum int frame_region, + @GLintptrARB long offset); + + void glBindVideoCaptureStreamTextureNV(@GLuint int video_capture_slot, + @GLuint int stream, @GLenum int frame_region, + @GLenum int target, @GLuint int texture); + + void glEndVideoCaptureNV(@GLuint int video_capture_slot); + + @StripPostfix("params") + void glGetVideoCaptureivNV(@GLuint int video_capture_slot, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + @Alternate("glGetVideoCaptureivNV") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetVideoCaptureivNV2(@GLuint int video_capture_slot, @GLenum int pname, @OutParameter IntBuffer params); + + @StripPostfix("params") + void glGetVideoCaptureStreamivNV(@GLuint int video_capture_slot, + @GLuint int stream, @GLenum int pname, + @OutParameter @Check("1") IntBuffer params); + + @Alternate("glGetVideoCaptureStreamivNV") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetVideoCaptureStreamivNV2(@GLuint int video_capture_slot, + @GLuint int stream, @GLenum int pname, + @OutParameter IntBuffer params); + + @StripPostfix("params") + void glGetVideoCaptureStreamfvNV(@GLuint int video_capture_slot, + @GLuint int stream, @GLenum int pname, + @OutParameter @Check("1") FloatBuffer params); + + @Alternate("glGetVideoCaptureStreamfvNV") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetVideoCaptureStreamfvNV2(@GLuint int video_capture_slot, + @GLuint int stream, @GLenum int pname, + @OutParameter FloatBuffer params); + + @StripPostfix("params") + void glGetVideoCaptureStreamdvNV(@GLuint int video_capture_slot, + @GLuint int stream, @GLenum int pname, + @OutParameter @Check("1") DoubleBuffer params); + + @Alternate("glGetVideoCaptureStreamdvNV") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetVideoCaptureStreamdvNV2(@GLuint int video_capture_slot, + @GLuint int stream, @GLenum int pname, + @OutParameter DoubleBuffer params); + + @GLenum + int glVideoCaptureNV(@GLuint int video_capture_slot, + @OutParameter @Check("1") @GLuint IntBuffer sequence_num, + @OutParameter @Check("1") @GLuint64EXT LongBuffer capture_time); + + @StripPostfix("params") + void glVideoCaptureStreamParameterivNV(@GLuint int video_capture_slot, @GLuint int stream, @GLenum int pname, @Const @Check("16") IntBuffer params); + + @StripPostfix("params") + void glVideoCaptureStreamParameterfvNV(@GLuint int video_capture_slot, @GLuint int stream, @GLenum int pname, @Const @Check("16") FloatBuffer params); + + @StripPostfix("params") + void glVideoCaptureStreamParameterdvNV(@GLuint int video_capture_slot, @GLuint int stream, @GLenum int pname, @Const @Check("16") DoubleBuffer params); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/SGIS_generate_mipmap.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/SGIS_generate_mipmap.java new file mode 100644 index 0000000..f68622b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/SGIS_generate_mipmap.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; + +public interface SGIS_generate_mipmap { + + /** + * Accepted by the <pname> parameter of TexParameteri, TexParameterf, + * TexParameteriv, TexParameterfv, GetTexParameteriv, and GetTexParameterfv. + */ + int GL_GENERATE_MIPMAP_SGIS = 0x8191; + + /** + * Accepted by the <target> parameter of Hint, and by the + * parameter of GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev. + */ + int GL_GENERATE_MIPMAP_HINT_SGIS = 0x8192; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/SGIS_texture_lod.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/SGIS_texture_lod.java new file mode 100644 index 0000000..9cd0cec --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/SGIS_texture_lod.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +import org.lwjgl.util.generator.*; + +@Extension(postfix = "SGIS", className = "SGISTextureLOD") +public interface SGIS_texture_lod { + + /** + * Accepted by the <pname> parameter of TexParameteri, TexParameterf, + * TexParameteriv, TexParameterfv, GetTexParameteriv, and GetTexParameterfv. + */ + int GL_TEXTURE_MIN_LOD_SGIS = 0x813A; + int GL_TEXTURE_MAX_LOD_SGIS = 0x813B; + int GL_TEXTURE_BASE_LEVEL_SGIS = 0x813C; + int GL_TEXTURE_MAX_LEVEL_SGIS = 0x813D; +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/SUN_slice_accum.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/SUN_slice_accum.java new file mode 100644 index 0000000..b4f9e27 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengl/SUN_slice_accum.java @@ -0,0 +1,41 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengl; + +public interface SUN_slice_accum { + + /** + * Accepted by the <op> parameter of Accum, + */ + int GL_SLICE_ACCUM_SUN = 0x85CC; + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/AMD_compressed_3DC_texture.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/AMD_compressed_3DC_texture.java new file mode 100644 index 0000000..7de9d73 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/AMD_compressed_3DC_texture.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface AMD_compressed_3DC_texture { + + /** + * Accepted by the <internalFormat> parameter of CompressedTexImage2D and + * CompressedTexImage3DOES: + */ + int GL_3DC_X_AMD = 0x87F9, + GL_3DC_XY_AMD = 0x87FA; + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/AMD_compressed_ATC_texture.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/AMD_compressed_ATC_texture.java new file mode 100644 index 0000000..2b2d41e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/AMD_compressed_ATC_texture.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface AMD_compressed_ATC_texture { + + /** + * Accepted by the <internalformat> parameter of CompressedTexImage2D and + * CompressedTexImage3DOES. + */ + int GL_ATC_RGB_AMD = 0x8C92, + GL_ATC_RGBA_EXPLICIT_ALPHA_AMD = 0x8C93, + GL_ATC_RGBA_INTERPOLATED_ALPHA_AMD = 0x87EE; + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/AMD_performance_monitor.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/AMD_performance_monitor.java new file mode 100644 index 0000000..93f1db4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/AMD_performance_monitor.java @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +public interface AMD_performance_monitor { + + /** Accepted by the <pame> parameter of GetPerfMonitorCounterInfoAMD */ + int GL_COUNTER_TYPE_AMD = 0x8BC0; + int GL_COUNTER_RANGE_AMD = 0x8BC1; + + /** + * Returned as a valid value in <data> parameter of + * GetPerfMonitorCounterInfoAMD if <pname> = COUNTER_TYPE_AMD + */ + int GL_UNSIGNED_INT64_AMD = 0x8BC2; + int GL_PERCENTAGE_AMD = 0x8BC3; + + /** Accepted by the <pname> parameter of GetPerfMonitorCounterDataAMD */ + + int GL_PERFMON_RESULT_AVAILABLE_AMD = 0x8BC4; + int GL_PERFMON_RESULT_SIZE_AMD = 0x8BC5; + int GL_PERFMON_RESULT_AMD = 0x8BC6; + + void glGetPerfMonitorGroupsAMD(@OutParameter @Check(value = "1", canBeNull = true) @GLint IntBuffer numGroups, + @AutoSize("groups") @GLsizei int groupsSize, @GLuint IntBuffer groups); + + void glGetPerfMonitorCountersAMD(@GLuint int group, + @OutParameter @Check(value = "1") @GLint IntBuffer numCounters, + @OutParameter @Check(value = "1") @GLint IntBuffer maxActiveCounters, + @AutoSize("counters") @GLsizei int countersSize, + @GLuint IntBuffer counters); + + void glGetPerfMonitorGroupStringAMD(@GLuint int group, + @AutoSize("groupString") @GLsizei int bufSize, + @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length, + @OutParameter @GLchar ByteBuffer groupString); + + @Alternate("glGetPerfMonitorGroupStringAMD") + @GLreturn(value = "groupString", maxLength = "bufSize") + void glGetPerfMonitorGroupStringAMD2(@GLuint int group, @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(groupString_length)") IntBuffer length, + @OutParameter @GLchar ByteBuffer groupString); + + void glGetPerfMonitorCounterStringAMD(@GLuint int group, @GLuint int counter, @AutoSize("counterString") @GLsizei int bufSize, + @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length, + @OutParameter @GLchar ByteBuffer counterString); + + @Alternate("glGetPerfMonitorCounterStringAMD") + @GLreturn(value = "counterString", maxLength = "bufSize") + void glGetPerfMonitorCounterStringAMD2(@GLuint int group, @GLuint int counter, @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(counterString_length)") IntBuffer length, + @OutParameter @GLchar ByteBuffer counterString); + + void glGetPerfMonitorCounterInfoAMD(@GLuint int group, @GLuint int counter, @GLenum int pname, @Check(value = "16") @GLvoid ByteBuffer data); + + void glGenPerfMonitorsAMD(@AutoSize("monitors") @GLsizei int n, @OutParameter @GLuint IntBuffer monitors); + + @Alternate("glGenPerfMonitorsAMD") + @GLreturn("monitors") + void glGenPerfMonitorsAMD2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer monitors); + + void glDeletePerfMonitorsAMD(@AutoSize("monitors") @GLsizei int n, @GLuint IntBuffer monitors); + + @Alternate("glDeletePerfMonitorsAMD") + void glDeletePerfMonitorsAMD(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(monitor)", keepParam = true) int monitor); + + void glSelectPerfMonitorCountersAMD(@GLuint int monitor, boolean enable, @GLuint int group, @AutoSize("counterList") int numCounters, @GLuint IntBuffer counterList); + + @Alternate("glSelectPerfMonitorCountersAMD") + void glSelectPerfMonitorCountersAMD(@GLuint int monitor, boolean enable, @GLuint int group, @Constant("1") int numCounters, @Constant(value = "APIUtil.getInt(counter)", keepParam = true) int counter); + + void glBeginPerfMonitorAMD(@GLuint int monitor); + + void glEndPerfMonitorAMD(@GLuint int monitor); + + void glGetPerfMonitorCounterDataAMD(@GLuint int monitor, @GLenum int pname, @AutoSize("data") @GLsizei int dataSize, + @OutParameter @GLuint IntBuffer data, + @OutParameter @GLint @Check(value = "1", canBeNull = true) IntBuffer bytesWritten); + + @Alternate("glGetPerfMonitorCounterDataAMD") + @GLreturn("data") + void glGetPerfMonitorCounterDataAMD2(@GLuint int monitor, @GLenum int pname, @Constant("4") @GLsizei int dataSize, + @OutParameter @GLuint IntBuffer data, + @OutParameter @GLint @Constant("0L") IntBuffer bytesWritten); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/AMD_program_binary_Z400.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/AMD_program_binary_Z400.java new file mode 100644 index 0000000..0752299 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/AMD_program_binary_Z400.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface AMD_program_binary_Z400 { + + /** Accepted by the <binaryFormat> parameter of ProgramBinaryOES: */ + int GL_Z400_BINARY_AMD = 0x8740; + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/ANGLE_framebuffer_blit.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/ANGLE_framebuffer_blit.java new file mode 100644 index 0000000..705e136 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/ANGLE_framebuffer_blit.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.opengl.GLbitfield; +import org.lwjgl.util.generator.opengl.GLenum; + +public interface ANGLE_framebuffer_blit { + + /** + * Accepted by the <target> parameter of BindFramebuffer, + * CheckFramebufferStatus, FramebufferTexture2D, FramebufferTexture3DOES, + * FramebufferRenderbuffer, and + * GetFramebufferAttachmentParameteriv: + */ + int GL_READ_FRAMEBUFFER_ANGLE = 0x8CA8, + GL_DRAW_FRAMEBUFFER_ANGLE = 0x8CA9; + + /** Accepted by the <pname> parameters of GetIntegerv and GetFloatv: */ + int GL_DRAW_FRAMEBUFFER_BINDING_ANGLE = 0x8CA6, // alias FRAMEBUFFER_BINDING + GL_READ_FRAMEBUFFER_BINDING_ANGLE = 0x8CAA; + + void glBlitFramebufferANGLE(int srcX0, int srcY0, int srcX1, int srcY1, + int dstX0, int dstY0, int dstX1, int dstY1, + @GLbitfield int mask, @GLenum int filter); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/ANGLE_framebuffer_multisample.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/ANGLE_framebuffer_multisample.java new file mode 100644 index 0000000..0edabb7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/ANGLE_framebuffer_multisample.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; + +public interface ANGLE_framebuffer_multisample { + + /** Accepted by the <pname> parameter of GetRenderbufferParameteriv: */ + int GL_RENDERBUFFER_SAMPLES_ANGLE = 0x8CAB; + + /** Returned by CheckFramebufferStatus: */ + int GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_ANGLE = 0x8D56; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * and GetFloatv: + */ + int GL_MAX_SAMPLES_ANGLE = 0x8D57; + + void glRenderbufferStorageMultisampleANGLE( + @GLenum int target, @GLsizei int samples, + @GLenum int internalformat, + @GLsizei int width, @GLsizei int height); +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/APPLE_framebuffer_multisample.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/APPLE_framebuffer_multisample.java new file mode 100644 index 0000000..770eec9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/APPLE_framebuffer_multisample.java @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; + +public interface APPLE_framebuffer_multisample { + + /** Accepted by the <pname> parameter of GetRenderbufferParameteriv: */ + int GL_RENDERBUFFER_SAMPLES_APPLE = 0x8CAB; + + /** Returned by CheckFramebufferStatus: */ + int GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_APPLE = 0x8D56; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, and + * GetFloatv: + */ + int GL_MAX_SAMPLES_APPLE = 0x8D57; + + /** + * Accepted by the <target> parameter of BindFramebuffer, + * CheckFramebufferStatus, FramebufferTexture2D, FramebufferRenderbuffer, and + * GetFramebufferAttachmentParameteriv: + */ + int GL_READ_FRAMEBUFFER_APPLE = 0x8CA8, + GL_DRAW_FRAMEBUFFER_APPLE = 0x8CA9; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, and + * GetFloatv: + */ + int GL_DRAW_FRAMEBUFFER_BINDING_APPLE = 0x8CA6, // FRAMEBUFFER_BINDING + GL_READ_FRAMEBUFFER_BINDING_APPLE = 0x8CAA; + + void glRenderbufferStorageMultisampleAPPLE( + @GLenum int target, @GLsizei int samples, + @GLenum int internalformat, + @GLsizei int width, @GLsizei int height); + + void glResolveMultisampleFramebufferAPPLE(); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/APPLE_rgb_422.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/APPLE_rgb_422.java new file mode 100644 index 0000000..de5b56c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/APPLE_rgb_422.java @@ -0,0 +1,55 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface APPLE_rgb_422 { + + /** + * Accepted by the <format> parameter of DrawPixels, ReadPixels, TexImage1D, + * TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, TexSubImage2D, + * TexSubImage3D, GetHistogram, GetMinmax, ConvolutionFilter1D, + * ConvolutionFilter2D, GetConvolutionFilter, SeparableFilter2D, + * GetSeparableFilter, ColorTable, GetColorTable: + */ + int GL_RGB_422_APPLE = 0x8A1F; + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, TexImage1D, + * TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, TexSubImage2D, + * TexSubImage3D, GetHistogram, GetMinmax, ConvolutionFilter1D, + * ConvolutionFilter2D, GetConvolutionFilter, SeparableFilter2D, + * GetSeparableFilter, ColorTable, GetColorTable: + */ + int GL_UNSIGNED_SHORT_8_8_APPLE = 0x85BA; + int GL_UNSIGNED_SHORT_8_8_REV_APPLE = 0x85BB; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/APPLE_sync.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/APPLE_sync.java new file mode 100644 index 0000000..e035545 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/APPLE_sync.java @@ -0,0 +1,112 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.opengl.GLSync; +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.IntBuffer; +import java.nio.LongBuffer; + +public interface APPLE_sync { + + /** Accepted as the <pname> parameter of GetInteger64vAPPLE: */ + int GL_MAX_SERVER_WAIT_TIMEOUT_APPLE = 0x9111; + + /** Accepted as the <pname> parameter of GetSyncivAPPLE: */ + int GL_OBJECT_TYPE_APPLE = 0x9112, + SYNC_CONDITION_APPLE = 0x9113, + SYNC_STATUS_APPLE = 0x9114, + SYNC_FLAGS_APPLE = 0x9115; + + /** Returned in <values> for GetSynciv <pname> OBJECT_TYPE_APPLE: */ + int GL_SYNC_FENCE_APPLE = 0x9116; + + /** Returned in <values> for GetSyncivAPPLE <pname> SYNC_CONDITION_APPLE: */ + int GL_SYNC_GPU_COMMANDS_COMPLETE_APPLE = 0x9117; + + /** Returned in <values> for GetSyncivAPPLE <pname> SYNC_STATUS_APPLE: */ + int GL_UNSIGNALED_APPLE = 0x9118, + SIGNALED_APPLE = 0x9119; + + /** Accepted in the <flags> parameter of ClientWaitSyncAPPLE: */ + int GL_SYNC_FLUSH_COMMANDS_BIT_APPLE = 0x00000001; + + /** Accepted in the <timeout> parameter of WaitSyncAPPLE: */ + long GL_TIMEOUT_IGNORED_APPLE = 0xFFFFFFFFFFFFFFFFl; + + /** Returned by ClientWaitSyncAPPLE: */ + int GL_ALREADY_SIGNALED_APPLE = 0x911A, + TIMEOUT_EXPIRED_APPLE = 0x911B, + CONDITION_SATISFIED_APPLE = 0x911C, + WAIT_FAILED_APPLE = 0x911D; + + /** + * Accepted by the <type> parameter of LabelObjectEXT and + * GetObjectLabelEXT: + */ + int GL_SYNC_OBJECT_APPLE = 0x8A53; + + @PointerWrapper("GLsync") + org.lwjgl.opengl.GLSync glFenceSyncAPPLE(@GLenum int condition, @GLbitfield int flags); + + boolean glIsSyncAPPLE(@PointerWrapper("GLsync") org.lwjgl.opengl.GLSync sync); + + void glDeleteSyncAPPLE(@PointerWrapper("GLsync") org.lwjgl.opengl.GLSync sync); + + @GLenum + int glClientWaitSyncAPPLE(@PointerWrapper("GLsync") org.lwjgl.opengl.GLSync sync, @GLbitfield int flags, @GLuint64 long timeout); + + void glWaitSyncAPPLE(@PointerWrapper("GLsync") org.lwjgl.opengl.GLSync sync, @GLbitfield int flags, @GLuint64 long timeout); + + @StripPostfix("params") + void glGetInteger64vAPPLE(@GLenum int pname, @OutParameter @Check("1") @GLint64 LongBuffer params); + + @Alternate("glGetInteger64vAPPLE") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetInteger64vAPPLE2(@GLenum int pname, @OutParameter @GLint64 LongBuffer params); + + @StripPostfix("values") + void glGetSyncivAPPLE(@PointerWrapper("GLsync") org.lwjgl.opengl.GLSync sync, @GLenum int pname, @AutoSize("values") @GLsizei int bufSize, + @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length, + @OutParameter IntBuffer values); + + @Alternate("glGetSyncivAPPLE") + @GLreturn("values") + @StripPostfix(value = "values", postfix = "v") + void glGetSyncivAPPLE2(@PointerWrapper("GLsync") GLSync sync, @GLenum int pname, @Constant("1") @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("0L") IntBuffer length, + @OutParameter IntBuffer values); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/APPLE_texture_format_BGRA8888.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/APPLE_texture_format_BGRA8888.java new file mode 100644 index 0000000..1bd5a74 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/APPLE_texture_format_BGRA8888.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface APPLE_texture_format_BGRA8888 { + + /** Accepted by the <format> parameters of TexImage2D and TexSubImage2D: */ + int GL_BGRA_EXT = 0x80E1; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/APPLE_texture_max_level.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/APPLE_texture_max_level.java new file mode 100644 index 0000000..defc0b6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/APPLE_texture_max_level.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface APPLE_texture_max_level { + + /** + * Accepted by the <pname> parameter of TexParameteri, TexParameterf, + * TexParameteriv, TexParameterfv, GetTexParameteriv, and GetTexParameterfv: + */ + int GL_TEXTURE_MAX_LEVEL_APPLE = 0x813D; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/ARB_draw_buffers.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/ARB_draw_buffers.java new file mode 100644 index 0000000..f296996 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/ARB_draw_buffers.java @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.AutoSize; +import org.lwjgl.util.generator.Const; +import org.lwjgl.util.generator.Constant; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; + +import java.nio.IntBuffer; + +public interface ARB_draw_buffers { + + /** Accepted by the <pname> parameters of GetIntegerv, GetFloatv: */ + int GL_MAX_DRAW_BUFFERS_ARB = 0x8824, + GL_DRAW_BUFFER0_ARB = 0x8825, + GL_DRAW_BUFFER1_ARB = 0x8826, + GL_DRAW_BUFFER2_ARB = 0x8827, + GL_DRAW_BUFFER3_ARB = 0x8828, + GL_DRAW_BUFFER4_ARB = 0x8829, + GL_DRAW_BUFFER5_ARB = 0x882A, + GL_DRAW_BUFFER6_ARB = 0x882B, + GL_DRAW_BUFFER7_ARB = 0x882C, + GL_DRAW_BUFFER8_ARB = 0x882D, + GL_DRAW_BUFFER9_ARB = 0x882E, + GL_DRAW_BUFFER10_ARB = 0x882F, + GL_DRAW_BUFFER11_ARB = 0x8830, + GL_DRAW_BUFFER12_ARB = 0x8831, + GL_DRAW_BUFFER13_ARB = 0x8832, + GL_DRAW_BUFFER14_ARB = 0x8833, + GL_DRAW_BUFFER15_ARB = 0x8834; + + void glDrawBuffersARB(@AutoSize("buffers") @GLsizei int size, @Const @GLenum IntBuffer buffers); + + @Alternate("glDrawBuffersARB") + void glDrawBuffersARB(@Constant("1") @GLsizei int size, @Constant(value = "APIUtil.getInt(buffer)", keepParam = true) int buffer); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/ARB_half_float_pixel.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/ARB_half_float_pixel.java new file mode 100644 index 0000000..3ec788d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/ARB_half_float_pixel.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface ARB_half_float_pixel { + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, + * TexImage1D, TexImage2D, TexImage3D, GetTexImage, TexSubImage1D, + * TexSubImage2D, TexSubImage3D: + */ + int GL_HALF_FLOAT_ARB = 0x140B; + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/ARB_texture_rectangle.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/ARB_texture_rectangle.java new file mode 100644 index 0000000..7e01274 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/ARB_texture_rectangle.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface ARB_texture_rectangle { + + /** + * Accepted by the <cap> parameter of Enable, Disable and IsEnabled; + * by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv + * and GetDoublev; and by the <target> parameter of BindTexture, + * GetTexParameterfv, GetTexParameteriv, TexParameterf, TexParameteri, + * TexParameterfv and TexParameteriv: + * Accepted by the <target> parameter of GetTexImage, + * GetTexLevelParameteriv, GetTexLevelParameterfv, TexImage2D, + * CopyTexImage2D, TexSubImage2D and CopySubTexImage2D: + */ + int GL_TEXTURE_RECTANGLE_ARB = 0x84F5; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv and GetDoublev: + */ + int GL_TEXTURE_BINDING_RECTANGLE_ARB = 0x84F6; + + /** + * Accepted by the <target> parameter of GetTexLevelParameteriv, + * GetTexLevelParameterfv, GetTexParameteriv and TexImage2D: + */ + int GL_PROXY_TEXTURE_RECTANGLE_ARB = 0x84F7; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, + * GetIntegerv and GetFloatv: + */ + int GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB = 0x84F8; + + /** + * Returned by <type> parameter of GetActiveUniform when the location + * <index> for program object <program> is of type sampler2DRect: + */ + int GL_SAMPLER_2D_RECT_ARB = 0x8B63; + + /** + * Returned by <type> parameter of GetActiveUniform when the location + * <index> for program object <program> is of type sampler2DRectShadow: + */ + int GL_SAMPLER_2D_RECT_SHADOW_ARB = 0x8B64; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/ARM_mali_shader_binary.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/ARM_mali_shader_binary.java new file mode 100644 index 0000000..ee0fa03 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/ARM_mali_shader_binary.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface ARM_mali_shader_binary { + + /** Accepted by the <binaryFormat> parameter of ShaderBinary: */ + int GL_MALI_SHADER_BINARY_ARM = 0x8F60; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/ARM_rgba8.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/ARM_rgba8.java new file mode 100644 index 0000000..d87299a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/ARM_rgba8.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface ARM_rgba8 { + + /** Accepted by the <internalformat> parameter of RenderbufferStorage: */ + int GL_RGBA8_OES = 0x8058; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/DMP_shader_binary.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/DMP_shader_binary.java new file mode 100644 index 0000000..4e887ad --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/DMP_shader_binary.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface DMP_shader_binary { + + /** Accepted by the <binaryformat> parameter of ShaderBinary: */ + int GL_SHADER_BINARY_DMP = 0x9250; + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_Cg_shader.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_Cg_shader.java new file mode 100644 index 0000000..77f77c5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_Cg_shader.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface EXT_Cg_shader { + + /** + * You can pass GL_CG_VERTEX_SHADER_EXT to glCreateShader instead of GL_VERTEX_SHADER to create a vertex shader + * that will parse and compile its shader source with the Cg compiler front-end rather than the GLSL front-end. Likewise, you + * can pass GL_CG_FRAGMENT_SHADER_EXT to glCreateShader instead of GL_FRAGMENT_SHADER to create a fragment shader object + * that will parse and compile its shader source with the Cg front-end rather than the GLSL front-end. + */ + int GL_CG_VERTEX_SHADER_EXT = 0x890E, + GL_CG_FRAGMENT_SHADER_EXT = 0x890F; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_bgra.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_bgra.java new file mode 100644 index 0000000..c765d8a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_bgra.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface EXT_bgra { + + /** + * Accepted by the <format> parameter of DrawPixels, GetTexImage, + * ReadPixels, TexImage1D, and TexImage2D: + */ + int GL_BGR_EXT = 0x80E0, + GL_BGRA_EXT = 0x80E1; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_blend_minmax.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_blend_minmax.java new file mode 100644 index 0000000..34ff001 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_blend_minmax.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.opengl.GLenum; + +public interface EXT_blend_minmax { + + /** Accepted by the <mode> parameter of BlendEquationEXT: */ + int GL_FUNC_ADD_EXT = 0x8006, + GL_MIN_EXT = 0x8007, + GL_MAX_EXT = 0x8008; + + void glBlendEquationEXT(@GLenum int mode); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_color_buffer_half_float.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_color_buffer_half_float.java new file mode 100644 index 0000000..9d6593f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_color_buffer_half_float.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface EXT_color_buffer_half_float { + + /** + * Accepted by the <internalformat> parameter of RenderbufferStorage and + * RenderbufferStorageMultisampleAPPLE: + */ + int GL_RGBA16F_EXT = 0x881A, + GL_RGB16F_EXT = 0x881B, + GL_RG16F_EXT = 0x822F, + GL_R16F_EXT = 0x822D; + + /** Accepted by the <pname> parameter of GetFramebufferAttachmentParameteriv: */ + int GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT = 0x8211; + + /** Returned in <params> by GetFramebufferAttachmentParameteriv: */ + int GL_UNSIGNED_NORMALIZED_EXT = 0x8C17; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_copy_texture_levels.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_copy_texture_levels.java new file mode 100644 index 0000000..4d95ee0 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_copy_texture_levels.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface EXT_copy_texture_levels { + + void glCopyTextureLevelsAPPLE(@GLuint int destinationTexture, @GLuint int sourceTexture, + int sourceBaseLevel, @GLsizei int sourceLevelCount); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_debug_label.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_debug_label.java new file mode 100644 index 0000000..e047fb6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_debug_label.java @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +public interface EXT_debug_label { + + /** + * Accepted by the <type> parameter of LabelObjectEXT and + * GetObjectLabelEXT: + */ + int GL_BUFFER_OBJECT_EXT = 0x9151, + GL_SHADER_OBJECT_EXT = 0x8B48, + GL_PROGRAM_OBJECT_EXT = 0x8B40, + GL_VERTEX_ARRAY_OBJECT_EXT = 0x9154, + GL_QUERY_OBJECT_EXT = 0x9153, + GL_PROGRAM_PIPELINE_OBJECT_EXT = 0x8A4F; + + void glLabelObjectEXT(@GLenum int type, @GLuint int object, + @AutoSize("label") @GLsizei int length, + @Const @GLchar ByteBuffer label); + + @Alternate("glLabelObjectEXT") + void glLabelObjectEXT(@GLenum int type, @GLuint int object, + @Constant("label.length()") @GLsizei int length, + CharSequence label); + + void glGetObjectLabelEXT(@GLenum int type, @GLuint int object, + @AutoSize(value = "label", canBeNull = true) @GLsizei int bufSize, + @Check(value = "1", canBeNull = true) @OutParameter @GLsizei IntBuffer length, + @Check(canBeNull = true) @OutParameter @GLchar ByteBuffer label); + + @Alternate("glGetObjectLabelEXT") + @GLreturn(value = "label", maxLength = "bufSize") + void glGetObjectLabelEXT2(@GLenum int type, @GLuint int object, + @GLsizei int bufSize, + @Constant("MemoryUtil.getAddress0(label_length)") @OutParameter @GLsizei IntBuffer length, + @OutParameter @GLchar ByteBuffer label); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_debug_marker.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_debug_marker.java new file mode 100644 index 0000000..4cdab1a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_debug_marker.java @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.AutoSize; +import org.lwjgl.util.generator.Const; +import org.lwjgl.util.generator.Constant; +import org.lwjgl.util.generator.opengl.GLchar; +import org.lwjgl.util.generator.opengl.GLsizei; + +import java.nio.ByteBuffer; + +public interface EXT_debug_marker { + + void glInsertEventMarkerEXT(@AutoSize("marker") @GLsizei int length, @Const @GLchar ByteBuffer marker); + + @Alternate("glInsertEventMarkerEXT") + void glInsertEventMarkerEXT(@Constant("marker.length()") @GLsizei int length, CharSequence marker); + + void glPushGroupMarkerEXT(@AutoSize("marker") @GLsizei int length, @Const @GLchar ByteBuffer marker); + + @Alternate("glPushGroupMarkerEXT") + void glPushGroupMarkerEXT(@Constant("marker.length()") @GLsizei int length, CharSequence marker); + + void glPopGroupMarkerEXT(); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_discard_framebuffer.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_discard_framebuffer.java new file mode 100644 index 0000000..6919933 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_discard_framebuffer.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.AutoSize; +import org.lwjgl.util.generator.Const; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; + +import java.nio.IntBuffer; + +public interface EXT_discard_framebuffer { + + /** + * Accepted in the <attachments> parameter of DiscardFramebufferEXT when the + * default framebuffer is bound to <target>: + */ + int GL_COLOR_EXT = 0x1800, + GL_DEPTH_EXT = 0x1801, + GL_STENCIL_EXT = 0x1802; + + void glDiscardFramebufferEXT(@GLenum int target, @AutoSize("attachments") @GLsizei int numAttachments, @Const @GLenum IntBuffer attachments); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_frag_depth.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_frag_depth.java new file mode 100644 index 0000000..fbe7361 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_frag_depth.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface EXT_frag_depth { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_map_buffer_range.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_map_buffer_range.java new file mode 100644 index 0000000..096a74b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_map_buffer_range.java @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.AutoSize; +import org.lwjgl.util.generator.CachedResult; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.ByteBuffer; + +public interface EXT_map_buffer_range { + + /** Accepted by the <access> parameter of MapBufferRangeEXT: */ + int GL_MAP_READ_BIT_EXT = 0x0001, + GL_MAP_WRITE_BIT_EXT = 0x0002, + GL_MAP_INVALIDATE_RANGE_BIT_EXT = 0x0004, + GL_MAP_INVALIDATE_BUFFER_BIT_EXT = 0x0008, + GL_MAP_FLUSH_EXPLICIT_BIT_EXT = 0x0010, + GL_MAP_UNSYNCHRONIZED_BIT_EXT = 0x0020; + + /** + * glMapBufferRange maps a GL buffer object range to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapBufferRange like this: + *

+ * ByteBuffer mapped_buffer; mapped_buffer = glMapBufferRange(..., ..., ..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBufferRange(..., ..., ..., ..., mapped_buffer); + *

+ * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + * + * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. + * + * @return A ByteBuffer representing the mapped buffer memory. + */ + @CachedResult(isRange = true) + @GLvoid + @AutoSize("length") + ByteBuffer glMapBufferRangeEXT(@GLenum int target, @GLintptr long offset, @GLsizeiptr long length, @GLbitfield int access); + + void glFlushMappedBufferRangeEXT(@GLenum int target, @GLintptr long offset, @GLsizeiptr long length); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_multi_draw_arrays.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_multi_draw_arrays.java new file mode 100644 index 0000000..11f6f9c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_multi_draw_arrays.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.AutoSize; +import org.lwjgl.util.generator.Check; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLint; +import org.lwjgl.util.generator.opengl.GLsizei; + +import java.nio.IntBuffer; + +public interface EXT_multi_draw_arrays { + + void glMultiDrawArraysEXT(@GLenum int mode, @GLint IntBuffer first, @Check("first.remaining()") @GLsizei IntBuffer count, @AutoSize("first") @GLsizei int primcount); + + //void glMultiDrawElementsEXT(GLenum mode, GLsizei*count, GLenum type, const GLvoid**indices, GLsizei primcount) + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_multisampled_render_to_texture.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_multisampled_render_to_texture.java new file mode 100644 index 0000000..88510aa --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_multisampled_render_to_texture.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface EXT_multisampled_render_to_texture { + + /** Accepted by the <pname> parameter of GetRenderbufferParameteriv: */ + int GL_RENDERBUFFER_SAMPLES_EXT = 0x9133; + + /** Returned by CheckFramebufferStatus: */ + int GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT = 0x9134; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * and GetFloatv: + */ + int GL_MAX_SAMPLES_EXT = 0x9135; + + /** Accepted by the <pname> parameter of GetFramebufferAttachmentParameteriv: */ + int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT = 0x8D6C; + + void glRenderbufferStorageMultisampleEXT( + @GLenum int target, @GLsizei int samples, + @GLenum int internalformat, + @GLsizei int width, @GLsizei int height); + + void glFramebufferTexture2DMultisampleEXT( + @GLenum int target, @GLenum int attachment, + @GLenum int textarget, @GLuint int texture, + int level, @GLsizei int samples); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_multiview_draw_buffers.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_multiview_draw_buffers.java new file mode 100644 index 0000000..42a2726 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_multiview_draw_buffers.java @@ -0,0 +1,67 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLreturn; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.IntBuffer; + +public interface EXT_multiview_draw_buffers { + + /** Accepted by the <location> parameter of DrawBuffersIndexedEXT: */ + int GL_COLOR_ATTACHMENT_EXT = 0x90F0, + GL_MULTIVIEW_EXT = 0x90F1; + + /** Accepted by the <target> parameter of GetIntegeri_EXT: */ + int GL_DRAW_BUFFER_EXT = 0x0C01, + GL_READ_BUFFER_EXT = 0x0C02; + + /** Accepted by the <target> parameter of GetInteger: */ + int GL_MAX_MULTIVIEW_BUFFERS_EXT = 0x90F2; + + void glReadBufferIndexedEXT(@GLenum int src, int index); + + void glDrawBuffersIndexedEXT(@AutoSize("indices") int n, @Check("indices.remaining()") @Const @GLenum IntBuffer location, + @Const IntBuffer indices); + + @StripPostfix("data") + void glGetIntegeri_vEXT(@GLenum int target, @GLuint int index, @OutParameter @Check("4") IntBuffer data); + + @Alternate("glGetIntegeri_vEXT") + @GLreturn("data") + @StripPostfix("data") + void glGetIntegeri_vEXT2(@GLenum int value, @GLuint int index, @OutParameter IntBuffer data); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_occlusion_query_boolean.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_occlusion_query_boolean.java new file mode 100644 index 0000000..4e07a29 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_occlusion_query_boolean.java @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLreturn; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.IntBuffer; + +public interface EXT_occlusion_query_boolean { + + /** + * Accepted by the <target> parameter of BeginQueryEXT, EndQueryEXT, + * and GetQueryivEXT: + */ + int GL_ANY_SAMPLES_PASSED_EXT = 0x8C2F, + GL_ANY_SAMPLES_PASSED_CONSERVATIVE_EXT = 0x8D6A; + + /** Accepted by the <pname> parameter of GetQueryivEXT: */ + int GL_CURRENT_QUERY_EXT = 0x8865; + + /** + * Accepted by the <pname> parameter of GetQueryObjectivEXT and + * GetQueryObjectuivEXT: + */ + int GL_QUERY_RESULT_EXT = 0x8866, + GL_QUERY_RESULT_AVAILABLE_EXT = 0x8867; + + void glGenQueriesEXT(@AutoSize("ids") @GLsizei int n, @OutParameter @GLuint IntBuffer ids); + + @Alternate("glGenQueriesEXT") + @GLreturn("ids") + void glGenQueriesEXT2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer ids); + + void glDeleteQueriesEXT(@AutoSize("ids") @GLsizei int n, @GLuint IntBuffer ids); + + @Alternate("glDeleteQueriesEXT") + void glDeleteQueriesEXT(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(id)", keepParam = true) int id); + + boolean glIsQueryEXT(@GLuint int id); + + void glBeginQueryEXT(@GLenum int target, @GLuint int id); + + void glEndQueryEXT(@GLenum int target); + + @StripPostfix("params") + void glGetQueryivEXT(@GLenum int target, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + @Alternate("glGetQueryivEXT") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetQueryivEXT2(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + @StripPostfix("params") + void glGetQueryObjectuivEXT(@GLuint int id, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + @Alternate("glGetQueryObjectuivEXT") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetQueryObjectuivEXT2(@GLuint int id, @GLenum int pname, @OutParameter IntBuffer params); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_packed_float.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_packed_float.java new file mode 100644 index 0000000..de8339e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_packed_float.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface EXT_packed_float { + + /** + * Accepted by the <internalformat> parameter of TexImage1D, + * TexImage2D, TexImage3D, CopyTexImage1D, CopyTexImage2D, and + * RenderbufferStorage: + */ + int GL_R11F_G11F_B10F_EXT = 0x8C3A; + + /** + * Accepted by the <type> parameter of DrawPixels, ReadPixels, + * TexImage1D, TexImage2D, GetTexImage, TexImage3D, TexSubImage1D, + * TexSubImage2D, TexSubImage3D: + */ + int GL_UNSIGNED_INT_10F_11F_11F_REV_EXT = 0x8C3B; + + /** Accepted by the <pname> parameters of GetIntegerv and GetFloatv: */ + int GL_RGBA_SIGNED_COMPONENTS_EXT = 0x8C3C; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_read_format_bgra.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_read_format_bgra.java new file mode 100644 index 0000000..b8d33ca --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_read_format_bgra.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface EXT_read_format_bgra { + + /** Accepted by the <format> parameter of ReadPixels: */ + int GL_BGRA_EXT = 0x80E1; + + /** Accepted by the <type> parameter of ReadPixels: */ + int GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT = 0x8365, + GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT = 0x8366; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_robustness.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_robustness.java new file mode 100644 index 0000000..fce325b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_robustness.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.AutoSize; +import org.lwjgl.util.generator.OutParameter; +import org.lwjgl.util.generator.StripPostfix; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.Buffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; + +public interface EXT_robustness { + + /** Returned by GetGraphicsResetStatusEXT: */ + int GL_NO_ERROR = 0x0000, + GL_GUILTY_CONTEXT_RESET_EXT = 0x8253, + GL_INNOCENT_CONTEXT_RESET_EXT = 0x8254, + GL_UNKNOWN_CONTEXT_RESET_EXT = 0x8255; + + /** + * Accepted by the <value> parameter of GetBooleanv, GetIntegerv, + * and GetFloatv: + */ + int GL_CONTEXT_ROBUST_ACCESS_EXT = 0x90F3, + GL_RESET_NOTIFICATION_STRATEGY_EXT = 0x8256; + + /** + * Returned by GetIntegerv and related simple queries when <value> is + * RESET_NOTIFICATION_STRATEGY_EXT : + */ + int GL_LOSE_CONTEXT_ON_RESET_EXT = 0x8252, + GL_NO_RESET_NOTIFICATION_EXT = 0x8261; + + @GLenum + int glGetGraphicsResetStatusEXT(); + + void glReadnPixelsEXT(int x, int y, @GLsizei int width, @GLsizei int height, + @GLenum int format, @GLenum int type, @AutoSize("data") @GLsizei int bufSize, + @OutParameter @GLbyte @GLshort @GLint @GLfloat Buffer data); + + @StripPostfix("params") + void glGetnUniformfvEXT(@GLuint int program, int location, @AutoSize("params") @GLsizei int bufSize, @OutParameter FloatBuffer params); + + @StripPostfix("params") + void glGetnUniformivEXT(@GLuint int program, int location, @AutoSize("params") @GLsizei int bufSize, @OutParameter IntBuffer params); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_sRGB.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_sRGB.java new file mode 100644 index 0000000..9e4e5c8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_sRGB.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface EXT_sRGB { + + /** + * Accepted by the <format> and <internalformat> parameter of TexImage2D, and + * TexImage3DOES. These are also accepted by <format> parameter of + * TexSubImage2D and TexSubImage3DOES: + */ + int GL_SRGB_EXT = 0x8C40, + GL_SRGB_ALPHA_EXT = 0x8C42; + + /** Accepted by the <internalformat> parameter of RenderbufferStorage: */ + int GL_SRGB8_ALPHA8_EXT = 0x8C43; + + /** Accepted by the <pname> parameter of GetFramebufferAttachmentParameteriv: */ + int GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT = 0x8210; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_separate_shader_objects.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_separate_shader_objects.java new file mode 100644 index 0000000..55a79d7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_separate_shader_objects.java @@ -0,0 +1,180 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.ByteBuffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; + +public interface EXT_separate_shader_objects { + + /** Accepted by <stages> parameter to UseProgramStagesEXT: */ + int GL_VERTEX_SHADER_BIT_EXT = 0x00000001, + GL_FRAGMENT_SHADER_BIT_EXT = 0x00000002, + GL_ALL_SHADER_BITS_EXT = 0xFFFFFFFF; + + /** + * Accepted by the <pname> parameter of ProgramParameteriEXT and + * GetProgramiv: + */ + int GL_PROGRAM_SEPARABLE_EXT = 0x8258; + + /** Accepted by <type> parameter to GetProgramPipelineivEXT: */ + int GL_ACTIVE_PROGRAM_EXT = 0x8259; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, and + * GetFloatv: + */ + int GL_PROGRAM_PIPELINE_BINDING_EXT = 0x825A; + + void glUseProgramStagesEXT(@GLuint int pipeline, @GLbitfield int stages, @GLuint int program); + + void glActiveShaderProgramEXT(@GLuint int pipeline, @GLuint int program); + + /** Single null-terminated source code string. */ + @StripPostfix(value = "string", postfix = "v") + @GLuint + int glCreateShaderProgramvEXT(@GLenum int type, @Constant("1") @GLsizei int count, @NullTerminated @Check @Const @Indirect @GLchar ByteBuffer string); + + /** Multiple null-terminated source code strings, one after the other. */ + @Alternate(value = "glCreateShaderProgramvEXT", nativeAlt = true) + @StripPostfix(value = "strings", postfix = "v") + @GLuint + int glCreateShaderProgramvEXT2(@GLenum int type, @GLsizei int count, @NullTerminated("count") @Check @Const @Indirect @GLchar @PointerArray("count") ByteBuffer strings); + + @Alternate(value = "glCreateShaderProgramvEXT", nativeAlt = true) + @StripPostfix(value = "strings", postfix = "v") + @GLuint + int glCreateShaderProgramvEXT3(@GLenum int type, @Constant("strings.length") @GLsizei int count, @NullTerminated @Check("1") @PointerArray(value = "count") @Const @NativeType("GLchar") ByteBuffer[] strings); + + @Alternate("glCreateShaderProgramvEXT") + @StripPostfix(value = "string", postfix = "v") + @GLuint + int glCreateShaderProgramvEXT(@GLenum int type, @Constant("1") @GLsizei int count, @NullTerminated CharSequence string); + + @Alternate(value = "glCreateShaderProgramvEXT", nativeAlt = true, skipNative = true) + @StripPostfix(value = "strings", postfix = "v") + @GLuint + int glCreateShaderProgramvEXT2(@GLenum int type, @Constant("strings.length") @GLsizei int count, + @Const @NullTerminated @PointerArray(value = "count") CharSequence[] strings); + + void glBindProgramPipelineEXT(@GLuint int pipeline); + + void glDeleteProgramPipelinesEXT(@AutoSize("pipelines") @GLsizei int n, @Const @GLuint IntBuffer pipelines); + + @Alternate("glDeleteProgramPipelinesEXT") + void glDeleteProgramPipelinesEXT(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(pipeline)", keepParam = true) int pipeline); + + void glGenProgramPipelinesEXT(@AutoSize("pipelines") @GLsizei int n, @OutParameter @GLuint IntBuffer pipelines); + + @Alternate("glGenProgramPipelinesEXT") + @GLreturn("pipelines") + void glGenProgramPipelinesEXT2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer pipelines); + + boolean glIsProgramPipelineEXT(@GLuint int pipeline); + + void glProgramParameteriEXT(@GLuint int program, @GLenum int pname, int value); + + @StripPostfix("params") + void glGetProgramPipelineivEXT(@GLuint int pipeline, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + @Alternate("glGetProgramPipelineivEXT") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetProgramPipelineivEXT2(@GLuint int pipeline, @GLenum int pname, @OutParameter IntBuffer params); + + void glProgramUniform1iEXT(@GLuint int program, int location, int v0); + + void glProgramUniform2iEXT(@GLuint int program, int location, int v0, int v1); + + void glProgramUniform3iEXT(@GLuint int program, int location, int v0, int v1, int v2); + + void glProgramUniform4iEXT(@GLuint int program, int location, int v0, int v1, int v2, int v3); + + void glProgramUniform1fEXT(@GLuint int program, int location, float v0); + + void glProgramUniform2fEXT(@GLuint int program, int location, float v0, float v1); + + void glProgramUniform3fEXT(@GLuint int program, int location, float v0, float v1, float v2); + + void glProgramUniform4fEXT(@GLuint int program, int location, float v0, float v1, float v2, float v3); + + @StripPostfix("value") + void glProgramUniform1ivEXT(@GLuint int program, int location, @AutoSize("value") @GLsizei int count, @Const IntBuffer value); + + @StripPostfix("value") + void glProgramUniform2ivEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const IntBuffer value); + + @StripPostfix("value") + void glProgramUniform3ivEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const IntBuffer value); + + @StripPostfix("value") + void glProgramUniform4ivEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const IntBuffer value); + + @StripPostfix("value") + void glProgramUniform1fvEXT(@GLuint int program, int location, @AutoSize("value") @GLsizei int count, @Const FloatBuffer value); + + @StripPostfix("value") + void glProgramUniform2fvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const FloatBuffer value); + + @StripPostfix("value") + void glProgramUniform3fvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const FloatBuffer value); + + @StripPostfix("value") + void glProgramUniform4fvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const FloatBuffer value); + + @StripPostfix("value") + void glProgramUniformMatrix2fvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + @StripPostfix("value") + void glProgramUniformMatrix3fvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " / (3 * 3)") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + @StripPostfix("value") + void glProgramUniformMatrix4fvEXT(@GLuint int program, int location, @AutoSize(value = "value", expression = " >> 4") @GLsizei int count, boolean transpose, @Const FloatBuffer value); + + void glValidateProgramPipelineEXT(@GLuint int pipeline); + + void glGetProgramPipelineInfoLogEXT(@GLuint int pipeline, @AutoSize("infoLog") @GLsizei int bufSize, + @OutParameter @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length, + @OutParameter @GLchar ByteBuffer infoLog); + + @Alternate("glGetProgramPipelineInfoLogEXT") + @GLreturn(value = "infoLog", maxLength = "bufSize") + void glGetProgramPipelineInfoLogEXT2(@GLuint int pipeline, @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(infoLog_length)") IntBuffer length, + @OutParameter @GLchar ByteBuffer infoLog); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_shader_framebuffer_fetch.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_shader_framebuffer_fetch.java new file mode 100644 index 0000000..fa769d1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_shader_framebuffer_fetch.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface EXT_shader_framebuffer_fetch { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv, + * and GetDoublev: + */ + int GL_FRAGMENT_SHADER_DISCARDS_SAMPLES_EXT = 0x8A52; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_shader_texture_lod.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_shader_texture_lod.java new file mode 100644 index 0000000..d67dfe1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_shader_texture_lod.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface EXT_shader_texture_lod { + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_shadow_samplers.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_shadow_samplers.java new file mode 100644 index 0000000..23b2a6d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_shadow_samplers.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface EXT_shadow_samplers { + + /** + * Accepted by the <pname> parameter of TexParameterf, TexParameteri, + * TexParameterfv, TexParameteriv, GetTexParameterfv, and GetTexParameteriv: + */ + int GL_TEXTURE_COMPARE_MODE_EXT = 0x884C, + GL_TEXTURE_COMPARE_FUNC_EXT = 0x884D; + + /** + * Accepted by the <param> parameter of TexParameterf, TexParameteri, + * TexParameterfv, and TexParameteriv when the <pname> parameter is + * TEXTURE_COMPARE_MODE_EXT: + */ + int GL_COMPARE_REF_TO_TEXTURE_EXT = 0x884E; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_array.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_array.java new file mode 100644 index 0000000..1b61444 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_array.java @@ -0,0 +1,79 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface EXT_texture_array { + + /** + * Accepted by the <target> parameter of TexParameteri, TexParameteriv, + * TexParameterf, TexParameterfv, and BindTexture: + */ + int GL_TEXTURE_1D_ARRAY_EXT = 0x8C18, + GL_TEXTURE_2D_ARRAY_EXT = 0x8C1A; + + /** + * Accepted by the <target> parameter of TexImage3D, TexSubImage3D, + * CopyTexSubImage3D, CompressedTexImage3D, and CompressedTexSubImage3D: + */ + int GL_PROXY_TEXTURE_2D_ARRAY_EXT = 0x8C1B; + + /** + * Accepted by the <target> parameter of TexImage2D, TexSubImage2D, + * CopyTexImage2D, CopyTexSubImage2D, CompressedTexImage2D, and + * CompressedTexSubImage2D: + */ + int GL_PROXY_TEXTURE_1D_ARRAY_EXT = 0x8C19; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetDoublev, GetIntegerv + * and GetFloatv: + */ + int GL_TEXTURE_BINDING_1D_ARRAY_EXT = 0x8C1C, + GL_TEXTURE_BINDING_2D_ARRAY_EXT = 0x8C1D, + GL_MAX_ARRAY_TEXTURE_LAYERS_EXT = 0x88FF; + + /** + * Accepted by the <pname> parameter of + * GetFramebufferAttachmentParameterivEXT: + */ + int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT = 0x8CD4; + + /** Returned by the <type> parameter of GetActiveUniform: */ + int GL_SAMPLER_1D_ARRAY_EXT = 0x8DC0, + GL_SAMPLER_2D_ARRAY_EXT = 0x8DC1; + + void glFramebufferTextureLayerEXT(@GLenum int target, @GLenum int attachment, @GLuint int texture, int level, int layer); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_compression_dxt1.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_compression_dxt1.java new file mode 100644 index 0000000..782f09a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_compression_dxt1.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.Extension; + +@Extension(postfix = "EXT", className = "EXTTextureCompressionDXT1") +public interface EXT_texture_compression_dxt1 { + + /** + * Accepted by the <internalformat> parameter of CompressedTexImage2D + * and the <format> parameter of CompressedTexSubImage2D: + */ + int GL_COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0, + GL_COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_compression_latc.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_compression_latc.java new file mode 100644 index 0000000..b54cf01 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_compression_latc.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.Extension; + +@Extension(postfix = "EXT", className = "EXTTextureCompressionLATC") +public interface EXT_texture_compression_latc { + + /** + * Accepted by the <internalformat> parameter of TexImage2D, + * CopyTexImage2D, and CompressedTexImage2D and the <format> parameter + * of CompressedTexSubImage2D: + */ + int GL_COMPRESSED_LUMINANCE_LATC1_EXT = 0x8C70, + GL_COMPRESSED_SIGNED_LUMINANCE_LATC1_EXT = 0x8C71, + GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT = 0x8C72, + GL_COMPRESSED_SIGNED_LUMINANCE_ALPHA_LATC2_EXT = 0x8C73; + +} diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_compression_s3tc.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_compression_s3tc.java new file mode 100644 index 0000000..1d8e692 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_compression_s3tc.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.Extension; + +@Extension(postfix = "EXT", className = "EXTTextureCompressionS3TC") +public interface EXT_texture_compression_s3tc { + + /** + * Accepted by the <internalformat> parameter of TexImage2D, CopyTexImage2D, + * and CompressedTexImage2D and the <format> parameter of + * CompressedTexSubImage2D: + */ + int GL_COMPRESSED_RGB_S3TC_DXT1_EXT = 0x83F0, + GL_COMPRESSED_RGBA_S3TC_DXT1_EXT = 0x83F1, + GL_COMPRESSED_RGBA_S3TC_DXT3_EXT = 0x83F2, + GL_COMPRESSED_RGBA_S3TC_DXT5_EXT = 0x83F3; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_filter_anisotropic.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_filter_anisotropic.java new file mode 100644 index 0000000..86f84ce --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_filter_anisotropic.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface EXT_texture_filter_anisotropic { + + /** + * Accepted by the <pname> parameters of GetTexParameterfv, + * GetTexParameteriv, TexParameterf, TexParameterfv, TexParameteri, + * and TexParameteriv: + */ + int GL_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FE; + + /** + * Accepted by the <pname> parameters of GetBooleanv, + * GetFloatv, and GetIntegerv: + */ + int GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT = 0x84FF; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_format_BGRA8888.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_format_BGRA8888.java new file mode 100644 index 0000000..208a7a6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_format_BGRA8888.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface EXT_texture_format_BGRA8888 { + + /** + * Accepted by the <format> and <internalformat> parameters of TexImage2D + * and the <format> parameter of TexSubImage2D: + */ + int GL_BGRA_EXT = 0x80E1; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_lod_bias.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_lod_bias.java new file mode 100644 index 0000000..5573484 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_lod_bias.java @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.Extension; + +@Extension(postfix = "EXT", className = "EXTTextureLODBias") +public interface EXT_texture_lod_bias { + + /** + * Accepted by the <target> parameters of GetTexEnvfv, GetTexEnviv, + * TexEnvi, TexEnvf, Texenviv, and TexEnvfv: + */ + int GL_TEXTURE_FILTER_CONTROL_EXT = 0x8500; + + /** + * When the <target> parameter of GetTexEnvfv, GetTexEnviv, TexEnvi, + * TexEnvf, TexEnviv, and TexEnvfv is TEXTURE_FILTER_CONTROL_EXT, then + * the value of <pname> may be: + */ + int GL_TEXTURE_LOD_BIAS_EXT = 0x8501; + + /** + * Accepted by the <pname> parameters of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_MAX_TEXTURE_LOD_BIAS_EXT = 0x84FD; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_rg.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_rg.java new file mode 100644 index 0000000..4182f34 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_rg.java @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface EXT_texture_rg { + + /** + * Accepted by the <internalformat> parameter of TexImage2D and CopyTexImage2D, + * and the <format> parameter of TexImage2D, TexSubImage2D, and ReadPixels: + */ + int GL_RED_EXT = 0x1903, + GL_RG_EXT = 0x8227; + + /** + * Accepted by the <internalformat> parameter of RenderbufferStorage and + * RenderbufferStorageMultisampleAPPLE: + */ + int GL_R8_EXT = 0x8229, + GL_RG8_EXT = 0x822B; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_storage.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_storage.java new file mode 100644 index 0000000..dbeb3c9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_storage.java @@ -0,0 +1,88 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface EXT_texture_storage { + + /** Accepted by the <value> parameter of GetTexParameter{if}v: */ + + int GL_TEXTURE_IMMUTABLE_FORMAT_EXT = 0x912F; + /** + * Accepted by the <internalformat> parameter of TexStorage* when + * implemented on OpenGL ES: + */ + int GL_ALPHA8_EXT = 0x803C, + GL_LUMINANCE8_EXT = 0x8040, + GL_LUMINANCE8_ALPHA8_EXT = 0x8045, + GL_RGBA32F_EXT = 0x8814, + GL_RGB32F_EXT = 0x8815, + GL_ALPHA32F_EXT = 0x8816, + GL_LUMINANCE32F_EXT = 0x8818, + GL_LUMINANCE_ALPHA32F_EXT = 0x8819, + GL_RGBA16F_EXT = 0x881A, + GL_RGB16F_EXT = 0x881B, + GL_ALPHA16F_EXT = 0x881C, + GL_LUMINANCE16F_EXT = 0x881E, + GL_LUMINANCE_ALPHA16F_EXT = 0x881F, + GL_RGB10_A2_EXT = 0x8059, + GL_RGB10_EXT = 0x8052, + GL_BGRA8_EXT = 0x93A1; + + void glTexStorage1DEXT(@GLenum int target, @GLsizei int levels, + @GLenum int internalformat, + @GLsizei int width); + + void glTexStorage2DEXT(@GLenum int target, @GLsizei int levels, + @GLenum int internalformat, + @GLsizei int width, @GLsizei int height); + + void glTexStorage3DEXT(@GLenum int target, @GLsizei int levels, + @GLenum int internalformat, + @GLsizei int width, @GLsizei int height, @GLsizei int depth); + + void glTextureStorage1DEXT(@GLuint int texture, @GLenum int target, @GLsizei int levels, + @GLenum int internalformat, + @GLsizei int width); + + void glTextureStorage2DEXT(@GLuint int texture, @GLenum int target, @GLsizei int levels, + @GLenum int internalformat, + @GLsizei int width, @GLsizei int height); + + void glTextureStorage3DEXT(@GLuint int texture, @GLenum int target, @GLsizei int levels, + @GLenum int internalformat, + @GLsizei int width, @GLsizei int height, @GLsizei int depth); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_type_2_10_10_10_REV.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_type_2_10_10_10_REV.java new file mode 100644 index 0000000..c74ca43 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_texture_type_2_10_10_10_REV.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface EXT_texture_type_2_10_10_10_REV { + + /** Accepted by the <type> parameter of TexImage2D and TexImage3D: */ + int GL_UNSIGNED_INT_2_10_10_10_REV_EXT = 0x8368; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_unpack_subimage.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_unpack_subimage.java new file mode 100644 index 0000000..1d9a342 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/EXT_unpack_subimage.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface EXT_unpack_subimage { + + /** + * Accepted by the <pname> parameters of PixelStorei, GetIntegerv, and + * GetFloatv: + */ + int GL_UNPACK_ROW_LENGTH = 0x0CF2, + GL_UNPACK_SKIP_ROWS = 0x0CF3, + GL_UNPACK_SKIP_PIXELS = 0x0CF4; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/GLES20.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/GLES20.java new file mode 100644 index 0000000..9f72bc3 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/GLES20.java @@ -0,0 +1,1050 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.Buffer; +import java.nio.ByteBuffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; + +public interface GLES20 { + + /** ClearBufferMask */ + int GL_DEPTH_BUFFER_BIT = 0x00000100, + GL_STENCIL_BUFFER_BIT = 0x00000400, + GL_COLOR_BUFFER_BIT = 0x00004000; + + /** Boolean */ + int GL_FALSE = 0, + GL_TRUE = 1; + + /** BeginMode */ + int GL_POINTS = 0x0000, + GL_LINES = 0x0001, + GL_LINE_LOOP = 0x0002, + GL_LINE_STRIP = 0x0003, + GL_TRIANGLES = 0x0004, + GL_TRIANGLE_STRIP = 0x0005, + GL_TRIANGLE_FAN = 0x0006; + + /** BlendingFactorDest */ + int GL_ZERO = 0, + GL_ONE = 1, + GL_SRC_COLOR = 0x0300, + GL_ONE_MINUS_SRC_COLOR = 0x0301, + GL_SRC_ALPHA = 0x0302, + GL_ONE_MINUS_SRC_ALPHA = 0x0303, + GL_DST_ALPHA = 0x0304, + GL_ONE_MINUS_DST_ALPHA = 0x0305; + + /** BlendingFactorSrc */ + int +/* GL_ZERO */ +/* GL_ONE */ + GL_DST_COLOR = 0x0306, + GL_ONE_MINUS_DST_COLOR = 0x0307, + GL_SRC_ALPHA_SATURATE = 0x0308; +/* GL_SRC_ALPHA */ +/* GL_ONE_MINUS_SRC_ALPHA */ +/* GL_DST_ALPHA */ +/* GL_ONE_MINUS_DST_ALPHA */ + + /** BlendEquationSeparate */ + int GL_FUNC_ADD = 0x8006, + GL_BLEND_EQUATION = 0x8009, + GL_BLEND_EQUATION_RGB = 0x8009, /* same as BLEND_EQUATION */ + GL_BLEND_EQUATION_ALPHA = 0x883D; + + /** BlendSubtract */ + int GL_FUNC_SUBTRACT = 0x800A, + GL_FUNC_REVERSE_SUBTRACT = 0x800B; + + /** Separate Blend Functions */ + int GL_BLEND_DST_RGB = 0x80C8, + GL_BLEND_SRC_RGB = 0x80C9, + GL_BLEND_DST_ALPHA = 0x80CA, + GL_BLEND_SRC_ALPHA = 0x80CB, + GL_CONSTANT_COLOR = 0x8001, + GL_ONE_MINUS_CONSTANT_COLOR = 0x8002, + GL_CONSTANT_ALPHA = 0x8003, + GL_ONE_MINUS_CONSTANT_ALPHA = 0x8004, + GL_BLEND_COLOR = 0x8005; + + /** Buffer Objects */ + int GL_ARRAY_BUFFER = 0x8892, + GL_ELEMENT_ARRAY_BUFFER = 0x8893, + GL_ARRAY_BUFFER_BINDING = 0x8894, + GL_ELEMENT_ARRAY_BUFFER_BINDING = 0x8895, + GL_STREAM_DRAW = 0x88E0, + GL_STATIC_DRAW = 0x88E4, + GL_DYNAMIC_DRAW = 0x88E8, + GL_BUFFER_SIZE = 0x8764, + GL_BUFFER_USAGE = 0x8765, + GL_CURRENT_VERTEX_ATTRIB = 0x8626; + + /** CullFaceMode */ + int GL_FRONT = 0x0404, + GL_BACK = 0x0405, + GL_FRONT_AND_BACK = 0x0408; + +/** DepthFunction */ +/* GL_NEVER */ +/* GL_LESS */ +/* GL_EQUAL */ +/* GL_LEQUAL */ +/* GL_GREATER */ +/* GL_NOTEQUAL */ +/* GL_GEQUAL */ +/* GL_ALWAYS */ + + /** EnableCap */ + int GL_TEXTURE_2D = 0x0DE1, + GL_CULL_FACE = 0x0B44, + GL_BLEND = 0x0BE2, + GL_DITHER = 0x0BD0, + GL_STENCIL_TEST = 0x0B90, + GL_DEPTH_TEST = 0x0B71, + GL_SCISSOR_TEST = 0x0C11, + GL_POLYGON_OFFSET_FILL = 0x8037, + GL_SAMPLE_ALPHA_TO_COVERAGE = 0x809E, + GL_SAMPLE_COVERAGE = 0x80A0; + + /** ErrorCode */ + int GL_NO_ERROR = 0, + GL_INVALID_ENUM = 0x0500, + GL_INVALID_VALUE = 0x0501, + GL_INVALID_OPERATION = 0x0502, + GL_OUT_OF_MEMORY = 0x0505; + + /** FrontFaceDirection */ + int GL_CW = 0x0900, + GL_CCW = 0x0901; + + /** GetPName */ + int GL_LINE_WIDTH = 0x0B21, + GL_ALIASED_POINT_SIZE_RANGE = 0x846D, + GL_ALIASED_LINE_WIDTH_RANGE = 0x846E, + GL_CULL_FACE_MODE = 0x0B45, + GL_FRONT_FACE = 0x0B46, + GL_DEPTH_RANGE = 0x0B70, + GL_DEPTH_WRITEMASK = 0x0B72, + GL_DEPTH_CLEAR_VALUE = 0x0B73, + GL_DEPTH_FUNC = 0x0B74, + GL_STENCIL_CLEAR_VALUE = 0x0B91, + GL_STENCIL_FUNC = 0x0B92, + GL_STENCIL_FAIL = 0x0B94, + GL_STENCIL_PASS_DEPTH_FAIL = 0x0B95, + GL_STENCIL_PASS_DEPTH_PASS = 0x0B96, + GL_STENCIL_REF = 0x0B97, + GL_STENCIL_VALUE_MASK = 0x0B93, + GL_STENCIL_WRITEMASK = 0x0B98, + GL_STENCIL_BACK_FUNC = 0x8800, + GL_STENCIL_BACK_FAIL = 0x8801, + GL_STENCIL_BACK_PASS_DEPTH_FAIL = 0x8802, + GL_STENCIL_BACK_PASS_DEPTH_PASS = 0x8803, + GL_STENCIL_BACK_REF = 0x8CA3, + GL_STENCIL_BACK_VALUE_MASK = 0x8CA4, + GL_STENCIL_BACK_WRITEMASK = 0x8CA5, + GL_VIEWPORT = 0x0BA2, + GL_SCISSOR_BOX = 0x0C10, + /* GL_SCISSOR_TEST */ + GL_COLOR_CLEAR_VALUE = 0x0C22, + GL_COLOR_WRITEMASK = 0x0C23, + GL_UNPACK_ALIGNMENT = 0x0CF5, + GL_PACK_ALIGNMENT = 0x0D05, + GL_MAX_TEXTURE_SIZE = 0x0D33, + GL_MAX_VIEWPORT_DIMS = 0x0D3A, + GL_SUBPIXEL_BITS = 0x0D50, + GL_RED_BITS = 0x0D52, + GL_GREEN_BITS = 0x0D53, + GL_BLUE_BITS = 0x0D54, + GL_ALPHA_BITS = 0x0D55, + GL_DEPTH_BITS = 0x0D56, + GL_STENCIL_BITS = 0x0D57, + GL_POLYGON_OFFSET_UNITS = 0x2A00, + /* GL_POLYGON_OFFSET_FILL */ + GL_POLYGON_OFFSET_FACTOR = 0x8038, + GL_TEXTURE_BINDING_2D = 0x8069, + GL_SAMPLE_BUFFERS = 0x80A8, + GL_SAMPLES = 0x80A9, + GL_SAMPLE_COVERAGE_VALUE = 0x80AA, + GL_SAMPLE_COVERAGE_INVERT = 0x80AB; + + /** GetTextureParameter */ + int +/* GL_TEXTURE_MAG_FILTER */ +/* GL_TEXTURE_MIN_FILTER */ +/* GL_TEXTURE_WRAP_S */ +/* GL_TEXTURE_WRAP_T */ + GL_NUM_COMPRESSED_TEXTURE_FORMATS = 0x86A2, + GL_COMPRESSED_TEXTURE_FORMATS = 0x86A3; + + /** HintMode */ + int GL_DONT_CARE = 0x1100, + GL_FASTEST = 0x1101, + GL_NICEST = 0x1102; + + /** HintTarget */ + int GL_GENERATE_MIPMAP_HINT = 0x8192; + + /** DataType */ + int GL_BYTE = 0x1400, + GL_UNSIGNED_BYTE = 0x1401, + GL_SHORT = 0x1402, + GL_UNSIGNED_SHORT = 0x1403, + GL_INT = 0x1404, + GL_UNSIGNED_INT = 0x1405, + GL_FLOAT = 0x1406, + GL_FIXED = 0x140C; + + /** PixelFormat */ + int GL_DEPTH_COMPONENT = 0x1902, + GL_ALPHA = 0x1906, + GL_RGB = 0x1907, + GL_RGBA = 0x1908, + GL_LUMINANCE = 0x1909, + GL_LUMINANCE_ALPHA = 0x190A; + + /** PixelType */ + int +/* GL_UNSIGNED_BYTE */ + GL_UNSIGNED_SHORT_4_4_4_4 = 0x8033, + GL_UNSIGNED_SHORT_5_5_5_1 = 0x8034, + GL_UNSIGNED_SHORT_5_6_5 = 0x8363; + + /** Shaders */ + int GL_FRAGMENT_SHADER = 0x8B30, + GL_VERTEX_SHADER = 0x8B31, + GL_MAX_VERTEX_ATTRIBS = 0x8869, + GL_MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB, + GL_MAX_VARYING_VECTORS = 0x8DFC, + GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS = 0x8B4D, + GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 0x8B4C, + GL_MAX_TEXTURE_IMAGE_UNITS = 0x8872, + GL_MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD, + GL_SHADER_TYPE = 0x8B4F, + GL_DELETE_STATUS = 0x8B80, + GL_LINK_STATUS = 0x8B82, + GL_VALIDATE_STATUS = 0x8B83, + GL_ATTACHED_SHADERS = 0x8B85, + GL_ACTIVE_UNIFORMS = 0x8B86, + GL_ACTIVE_UNIFORM_MAX_LENGTH = 0x8B87, + GL_ACTIVE_ATTRIBUTES = 0x8B89, + GL_ACTIVE_ATTRIBUTE_MAX_LENGTH = 0x8B8A, + GL_SHADING_LANGUAGE_VERSION = 0x8B8C, + GL_CURRENT_PROGRAM = 0x8B8D; + + /** StencilFunction */ + int GL_NEVER = 0x0200, + GL_LESS = 0x0201, + GL_EQUAL = 0x0202, + GL_LEQUAL = 0x0203, + GL_GREATER = 0x0204, + GL_NOTEQUAL = 0x0205, + GL_GEQUAL = 0x0206, + GL_ALWAYS = 0x0207; + + /** StencilOp */ + int +/* GL_ZERO */ + GL_KEEP = 0x1E00, + GL_REPLACE = 0x1E01, + GL_INCR = 0x1E02, + GL_DECR = 0x1E03, + GL_INVERT = 0x150A, + GL_INCR_WRAP = 0x8507, + GL_DECR_WRAP = 0x8508; + + /** StringName */ + int GL_VENDOR = 0x1F00, + GL_RENDERER = 0x1F01, + GL_VERSION = 0x1F02, + GL_EXTENSIONS = 0x1F03; + + /** TextureMagFilter */ + int GL_NEAREST = 0x2600, + GL_LINEAR = 0x2601; + + /** TextureMinFilter */ + int +/* GL_NEAREST */ +/* GL_LINEAR */ + GL_NEAREST_MIPMAP_NEAREST = 0x2700, + GL_LINEAR_MIPMAP_NEAREST = 0x2701, + GL_NEAREST_MIPMAP_LINEAR = 0x2702, + GL_LINEAR_MIPMAP_LINEAR = 0x2703; + + /** TextureParameterName */ + int GL_TEXTURE_MAG_FILTER = 0x2800, + GL_TEXTURE_MIN_FILTER = 0x2801, + GL_TEXTURE_WRAP_S = 0x2802, + GL_TEXTURE_WRAP_T = 0x2803; + + /** TextureTarget */ + int +/* GL_TEXTURE_2D */ + GL_TEXTURE = 0x1702, + GL_TEXTURE_CUBE_MAP = 0x8513, + GL_TEXTURE_BINDING_CUBE_MAP = 0x8514, + GL_TEXTURE_CUBE_MAP_POSITIVE_X = 0x8515, + GL_TEXTURE_CUBE_MAP_NEGATIVE_X = 0x8516, + GL_TEXTURE_CUBE_MAP_POSITIVE_Y = 0x8517, + GL_TEXTURE_CUBE_MAP_NEGATIVE_Y = 0x8518, + GL_TEXTURE_CUBE_MAP_POSITIVE_Z = 0x8519, + GL_TEXTURE_CUBE_MAP_NEGATIVE_Z = 0x851A, + GL_MAX_CUBE_MAP_TEXTURE_SIZE = 0x851C; + + /** TextureUnit */ + int GL_TEXTURE0 = 0x84C0, + GL_TEXTURE1 = 0x84C1, + GL_TEXTURE2 = 0x84C2, + GL_TEXTURE3 = 0x84C3, + GL_TEXTURE4 = 0x84C4, + GL_TEXTURE5 = 0x84C5, + GL_TEXTURE6 = 0x84C6, + GL_TEXTURE7 = 0x84C7, + GL_TEXTURE8 = 0x84C8, + GL_TEXTURE9 = 0x84C9, + GL_TEXTURE10 = 0x84CA, + GL_TEXTURE11 = 0x84CB, + GL_TEXTURE12 = 0x84CC, + GL_TEXTURE13 = 0x84CD, + GL_TEXTURE14 = 0x84CE, + GL_TEXTURE15 = 0x84CF, + GL_TEXTURE16 = 0x84D0, + GL_TEXTURE17 = 0x84D1, + GL_TEXTURE18 = 0x84D2, + GL_TEXTURE19 = 0x84D3, + GL_TEXTURE20 = 0x84D4, + GL_TEXTURE21 = 0x84D5, + GL_TEXTURE22 = 0x84D6, + GL_TEXTURE23 = 0x84D7, + GL_TEXTURE24 = 0x84D8, + GL_TEXTURE25 = 0x84D9, + GL_TEXTURE26 = 0x84DA, + GL_TEXTURE27 = 0x84DB, + GL_TEXTURE28 = 0x84DC, + GL_TEXTURE29 = 0x84DD, + GL_TEXTURE30 = 0x84DE, + GL_TEXTURE31 = 0x84DF, + GL_ACTIVE_TEXTURE = 0x84E0; + + /** TextureWrapMode */ + int GL_REPEAT = 0x2901, + GL_CLAMP_TO_EDGE = 0x812F, + GL_MIRRORED_REPEAT = 0x8370; + + /** Uniform Types */ + int GL_FLOAT_VEC2 = 0x8B50, + GL_FLOAT_VEC3 = 0x8B51, + GL_FLOAT_VEC4 = 0x8B52, + GL_INT_VEC2 = 0x8B53, + GL_INT_VEC3 = 0x8B54, + GL_INT_VEC4 = 0x8B55, + GL_BOOL = 0x8B56, + GL_BOOL_VEC2 = 0x8B57, + GL_BOOL_VEC3 = 0x8B58, + GL_BOOL_VEC4 = 0x8B59, + GL_FLOAT_MAT2 = 0x8B5A, + GL_FLOAT_MAT3 = 0x8B5B, + GL_FLOAT_MAT4 = 0x8B5C, + GL_SAMPLER_2D = 0x8B5E, + GL_SAMPLER_CUBE = 0x8B60; + + /** Vertex Arrays */ + int GL_VERTEX_ATTRIB_ARRAY_ENABLED = 0x8622, + GL_VERTEX_ATTRIB_ARRAY_SIZE = 0x8623, + GL_VERTEX_ATTRIB_ARRAY_STRIDE = 0x8624, + GL_VERTEX_ATTRIB_ARRAY_TYPE = 0x8625, + GL_VERTEX_ATTRIB_ARRAY_NORMALIZED = 0x886A, + GL_VERTEX_ATTRIB_ARRAY_POINTER = 0x8645, + GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING = 0x889F; + + /** Read Format */ + int GL_IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A, + GL_IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B; + + /** Shader Source */ + int GL_COMPILE_STATUS = 0x8B81, + GL_INFO_LOG_LENGTH = 0x8B84, + GL_SHADER_SOURCE_LENGTH = 0x8B88, + GL_SHADER_COMPILER = 0x8DFA; + + /** Shader Binary */ + int GL_SHADER_BINARY_FORMATS = 0x8DF8, + GL_NUM_SHADER_BINARY_FORMATS = 0x8DF9; + + /** Shader Precision-Specified Types */ + int GL_LOW_FLOAT = 0x8DF0, + GL_MEDIUM_FLOAT = 0x8DF1, + GL_HIGH_FLOAT = 0x8DF2, + GL_LOW_INT = 0x8DF3, + GL_MEDIUM_INT = 0x8DF4, + GL_HIGH_INT = 0x8DF5; + + /** Framebuffer Object. */ + int GL_FRAMEBUFFER = 0x8D40, + GL_RENDERBUFFER = 0x8D41, + GL_RGBA4 = 0x8056, + GL_RGB5_A1 = 0x8057, + GL_RGB565 = 0x8D62, + GL_DEPTH_COMPONENT16 = 0x81A5, + GL_STENCIL_INDEX = 0x1901, + GL_STENCIL_INDEX8 = 0x8D48, + GL_RENDERBUFFER_WIDTH = 0x8D42, + GL_RENDERBUFFER_HEIGHT = 0x8D43, + GL_RENDERBUFFER_INTERNAL_FORMAT = 0x8D44, + GL_RENDERBUFFER_RED_SIZE = 0x8D50, + GL_RENDERBUFFER_GREEN_SIZE = 0x8D51, + GL_RENDERBUFFER_BLUE_SIZE = 0x8D52, + GL_RENDERBUFFER_ALPHA_SIZE = 0x8D53, + GL_RENDERBUFFER_DEPTH_SIZE = 0x8D54, + GL_RENDERBUFFER_STENCIL_SIZE = 0x8D55, + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE = 0x8CD0, + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME = 0x8CD1, + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL = 0x8CD2, + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE = 0x8CD3, + GL_COLOR_ATTACHMENT0 = 0x8CE0, + GL_DEPTH_ATTACHMENT = 0x8D00, + GL_STENCIL_ATTACHMENT = 0x8D20, + GL_NONE = 0, + GL_FRAMEBUFFER_COMPLETE = 0x8CD5, + GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT = 0x8CD6, + GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT = 0x8CD7, + GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS = 0x8CD9, + GL_FRAMEBUFFER_UNSUPPORTED = 0x8CDD, + GL_FRAMEBUFFER_BINDING = 0x8CA6, + GL_RENDERBUFFER_BINDING = 0x8CA7, + GL_MAX_RENDERBUFFER_SIZE = 0x84E8, + GL_INVALID_FRAMEBUFFER_OPERATION = 0x0506; + + void glActiveTexture(@GLenum int texture); + + void glAttachShader(@GLuint int program, @GLuint int shader); + + void glBindAttribLocation(@GLuint int program, @GLuint int index, @NullTerminated @Const @GLchar ByteBuffer name); + + @Alternate("glBindAttribLocation") + void glBindAttribLocation(@GLuint int program, @GLuint int index, @NullTerminated CharSequence name); + + @Code(" StateTracker.bindBuffer(target, buffer);") + void glBindBuffer(@GLenum int target, @GLuint int buffer); + + void glBindFramebuffer(@GLenum int target, @GLuint int framebuffer); + + void glBindRenderbuffer(@GLenum int target, @GLuint int renderbuffer); + + void glBindTexture(@GLenum int target, @GLuint int texture); + + void glBlendColor(@GLclampf float red, @GLclampf float green, @GLclampf float blue, @GLclampf float alpha); + + void glBlendEquation(@GLenum int mode); + + void glBlendEquationSeparate(@GLenum int modeRGB, @GLenum int modeAlpha); + + void glBlendFunc(@GLenum int sfactor, @GLenum int dfactor); + + void glBlendFuncSeparate(@GLenum int srcRGB, @GLenum int dstRGB, @GLenum int srcAlpha, @GLenum int dstAlpha); + + @GenerateAutos + void glBufferData(@GLenum int target, @AutoSize("data") @GLsizeiptr long size, + @Check @Const @GLbyte @GLshort @GLint @GLfloat Buffer data, @GLenum int usage); + + void glBufferSubData(@GLenum int target, @GLintptr long offset, @AutoSize("data") @GLsizeiptr long size, + @Check @Const @GLbyte @GLshort @GLint @GLfloat Buffer data); + + @GLenum + int glCheckFramebufferStatus(@GLenum int target); + + void glClear(@GLbitfield int mask); + + void glClearColor(@GLclampf float red, @GLclampf float green, @GLclampf float blue, @GLclampf float alpha); + + void glClearDepthf(@GLclampf float depth); + + void glClearStencil(@GLint int s); + + void glColorMask(@GLboolean boolean red, @GLboolean boolean green, @GLboolean boolean blue, @GLboolean boolean alpha); + + void glCompileShader(@GLuint int shader); + + void glCompressedTexImage2D(@GLenum int target, int level, @GLenum int internalformat, @GLsizei int width, @GLsizei int height, int border, @AutoSize("data") @GLsizei int imageSize, + @Check @Const @GLvoid ByteBuffer data); + + void glCompressedTexSubImage2D(@GLenum int target, int level, int xoffset, int yoffset, @GLsizei int width, @GLsizei int height, @GLenum int format, @AutoSize("data") @GLsizei int imageSize, + @Check @Const @GLvoid ByteBuffer data); + + void glCopyTexImage2D(@GLenum int target, @GLint int level, @GLenum int internalformat, @GLint int x, @GLint int y, @GLsizei int width, @GLsizei int height, @GLint int border); + + void glCopyTexSubImage2D(@GLenum int target, @GLint int level, @GLint int xoffset, @GLint int yoffset, @GLint int x, @GLint int y, @GLsizei int width, @GLsizei int height); + + @GLuint + int glCreateProgram(); + + @GLuint + int glCreateShader(@GLenum int type); + + void glCullFace(@GLenum int mode); + + void glDeleteBuffers(@AutoSize("buffers") @GLsizei int n, @Const @GLuint IntBuffer buffers); + + @Alternate("glDeleteBuffers") + void glDeleteBuffers(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(buffer)", keepParam = true) int buffer); + + void glDeleteFramebuffers(@AutoSize("framebuffers") int n, @Const @GLuint IntBuffer framebuffers); + + @Alternate("glDeleteFramebuffers") + void glDeleteFramebuffers(@Constant("1") int n, @Constant(value = "APIUtil.getInt(framebuffer)", keepParam = true) int framebuffer); + + void glDeleteProgram(@GLuint int program); + + void glDeleteRenderbuffers(@AutoSize("renderbuffers") int n, @Const @GLuint IntBuffer renderbuffers); + + @Alternate("glDeleteRenderbuffers") + void glDeleteRenderbuffers(@Constant("1") int n, @Constant(value = "APIUtil.getInt(renderbuffer)", keepParam = true) int renderbuffer); + + void glDeleteShader(@GLuint int shader); + + void glDeleteTextures(@AutoSize("textures") @GLsizei int n, @Const @GLuint IntBuffer textures); + + @Alternate("glDeleteTextures") + void glDeleteTextures(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(texture)", keepParam = true) int texture); + + void glDepthFunc(@GLenum int func); + + void glDepthMask(@GLboolean boolean flag); + + void glDepthRangef(@GLclampf float zNear, @GLclampf float zFar); + + void glDetachShader(@GLuint int program, @GLuint int shader); + + void glDisable(@GLenum int cap); + + void glDisableVertexAttribArray(@GLuint int index); + + void glDrawArrays(@GLenum int mode, @GLint int first, @GLsizei int count); + + void glDrawElements(@GLenum int mode, @AutoSize("indices") @GLsizei int count, @AutoType("indices") @GLenum int type, + @BufferObject(BufferKind.ElementVBO) @Const @GLubyte @GLushort @GLuint Buffer indices); + + void glEnable(@GLenum int cap); + + void glEnableVertexAttribArray(@GLuint int index); + + void glFinish(); + + void glFlush(); + + void glFramebufferRenderbuffer(@GLenum int target, @GLenum int attachment, @GLenum int renderbuffertarget, @GLuint int renderbuffer); + + void glFramebufferTexture2D(@GLenum int target, @GLenum int attachment, @GLenum int textarget, @GLuint int texture, @GLint int level); + + void glFrontFace(@GLenum int mode); + + void glGenBuffers(@AutoSize("buffers") @GLsizei int n, @OutParameter @GLuint IntBuffer buffers); + + @Alternate("glGenBuffers") + @GLreturn("buffers") + void glGenBuffers2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer buffers); + + void glGenerateMipmap(@GLenum int target); + + void glGenFramebuffers(@AutoSize("framebuffers") int n, @OutParameter @GLuint IntBuffer framebuffers); + + @Alternate("glGenFramebuffers") + @GLreturn("framebuffers") + void glGenFramebuffers2(@Constant("1") int n, @OutParameter @GLuint IntBuffer framebuffers); + + void glGenRenderbuffers(@AutoSize("renderbuffers") int n, @OutParameter @GLuint IntBuffer renderbuffers); + + @Alternate("glGenRenderbuffers") + @GLreturn("renderbuffers") + void glGenRenderbuffers2(@Constant("1") int n, @OutParameter @GLuint IntBuffer renderbuffers); + + void glGenTextures(@AutoSize("textures") @GLsizei int n, @OutParameter @GLuint IntBuffer textures); + + @Alternate("glGenTextures") + @GLreturn("textures") + void glGenTextures2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer textures); + + void glGetActiveAttrib(@GLuint int program, @GLuint int index, @AutoSize("name") @GLsizei int bufsize, + @OutParameter @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length, + @OutParameter @Check("1") IntBuffer size, + @OutParameter @Check("1") @GLenum IntBuffer type, + @OutParameter @GLchar ByteBuffer name); + + /** Overloads glGetActiveAttrib. This version returns both size and type in the sizeType buffer (at .position() and .position() + 1). */ + @Alternate("glGetActiveAttrib") + @GLreturn(value = "name", maxLength = "bufsize") + void glGetActiveAttrib2(@GLuint int program, @GLuint int index, @GLsizei int bufsize, + @OutParameter @Constant("MemoryUtil.getAddress0(name_length)") @GLsizei IntBuffer length, + @OutParameter @Check("2") IntBuffer sizeType, + @OutParameter @Constant("MemoryUtil.getAddress(sizeType, sizeType.position() + 1)") @GLenum IntBuffer type, + @OutParameter @GLchar ByteBuffer name); + + /** Overloads glGetActiveAttrib. This version returns only the attrib name. */ + @Alternate(value = "glGetActiveAttrib", javaAlt = true) + @GLreturn(value = "name", maxLength = "bufsize") + void glGetActiveAttrib(@GLuint int program, @GLuint int index, @GLsizei int bufsize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(name_length), MemoryUtil.getAddress0(APIUtil.getBufferInt()), MemoryUtil.getAddress(APIUtil.getBufferInt(), 1)") IntBuffer length, + @OutParameter @GLchar ByteBuffer name); + + /** Overloads glGetActiveAttrib. This version returns only the attrib size. */ + @Alternate(value = "glGetActiveAttrib", javaAlt = true) + @GLreturn(value = "size") + void glGetActiveAttribSize(@GLuint int program, @GLuint int index, @Constant("0") @GLsizei int bufsize, + @OutParameter @GLsizei @Constant("0L") IntBuffer length, + @OutParameter IntBuffer size, + @OutParameter @GLenum @Constant("MemoryUtil.getAddress(size, 1)") IntBuffer type, // Reuse size buffer and ignore + @OutParameter @GLchar @Constant("APIUtil.getBufferByte0()") ByteBuffer name); + + /** Overloads glGetActiveAttrib. This version returns only the attrib type. */ + @Alternate(value = "glGetActiveAttrib", javaAlt = true) + @GLreturn(value = "type") + void glGetActiveAttribType(@GLuint int program, @GLuint int index, @Constant("0") @GLsizei int bufsize, + @OutParameter @GLsizei @Constant("0L") IntBuffer length, + @OutParameter @Constant("MemoryUtil.getAddress(type, 1)") IntBuffer size, // Reuse type buffer and ignore + @OutParameter @GLenum IntBuffer type, + @OutParameter @GLchar @Constant("APIUtil.getBufferByte0()") ByteBuffer name); + + void glGetActiveUniform(@GLuint int program, @GLuint int index, @AutoSize("name") @GLsizei int bufsize, + @OutParameter @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length, + @OutParameter @Check("1") @GLsizei IntBuffer size, + @OutParameter @Check("1") @GLenum IntBuffer type, + @OutParameter @GLchar ByteBuffer name); + + /** Overloads glGetActiveUniform. This version returns both size and type in the sizeType buffer (at .position() and .position() + 1). */ + @Alternate("glGetActiveUniform") + @GLreturn(value = "name", maxLength = "bufsize") + void glGetActiveUniform2(@GLuint int program, @GLuint int index, @GLsizei int bufsize, + @OutParameter @Constant("MemoryUtil.getAddress0(name_length)") @GLsizei IntBuffer length, + @OutParameter @Check("2") IntBuffer sizeType, + @OutParameter @Constant("MemoryUtil.getAddress(sizeType, sizeType.position() + 1)") @GLenum IntBuffer type, + @OutParameter @GLchar ByteBuffer name); + + /** Overloads glGetActiveUniformARB. This version returns only the uniform name. */ + @Alternate(value = "glGetActiveUniform", javaAlt = true) + @GLreturn(value = "name", maxLength = "bufsize") + void glGetActiveUniform(@GLuint int program, @GLuint int index, @GLsizei int bufsize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(name_length), MemoryUtil.getAddress0(APIUtil.getBufferInt()), MemoryUtil.getAddress(APIUtil.getBufferInt(), 1)") IntBuffer length, + @OutParameter @GLchar ByteBuffer name); + + /** Overloads glGetActiveUniform. This version returns only the uniform size. */ + @Alternate(value = "glGetActiveUniform", javaAlt = true) + @GLreturn(value = "size") + void glGetActiveUniformSize(@GLuint int program, @GLuint int index, @Constant("0") @GLsizei int bufsize, + @OutParameter @GLsizei @Constant("0L") IntBuffer length, + @OutParameter IntBuffer size, + @OutParameter @GLenum @Constant("MemoryUtil.getAddress(size, 1)") IntBuffer type, // Reuse size buffer and ignore + @OutParameter @GLchar @Constant("APIUtil.getBufferByte0()") ByteBuffer name); + + /** Overloads glGetActiveUniform. This version returns only the uniform type. */ + @Alternate(value = "glGetActiveUniform", javaAlt = true) + @GLreturn(value = "type") + void glGetActiveUniformType(@GLuint int program, @GLuint int index, @Constant("0") @GLsizei int bufsize, + @OutParameter @GLsizei @Constant("0L") IntBuffer length, + @OutParameter @Constant("MemoryUtil.getAddress(type, 1)") IntBuffer size, // Reuse type buffer and ignore + @OutParameter @GLenum IntBuffer type, + @OutParameter @GLchar @Constant("APIUtil.getBufferByte0()") ByteBuffer name); + + void glGetAttachedShaders(@GLuint int program, @AutoSize("shaders") @GLsizei int maxCount, + @OutParameter @Check(value = "1", canBeNull = true) @GLsizei IntBuffer count, + @OutParameter @GLuint IntBuffer shaders); + + int glGetAttribLocation(@GLuint int program, @NullTerminated @Const @GLchar ByteBuffer name); + + @Alternate("glGetAttribLocation") + int glGetAttribLocation(@GLuint int program, @NullTerminated CharSequence name); + + @StripPostfix("params") + void glGetBooleanv(@GLenum int pname, @OutParameter @Check("1") @GLboolean ByteBuffer params); + + @Alternate("glGetBooleanv") + @GLreturn("params") + @StripPostfix("params") + void glGetBooleanv2(@GLenum int pname, @OutParameter @GLboolean ByteBuffer params); + + @StripPostfix("params") + void glGetBufferParameteriv(@GLenum int target, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetBufferParameteri} instead. */ + @Alternate("glGetBufferParameteriv") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "GLES20", method = "glGetBufferParameteri") + @Deprecated + void glGetBufferParameteriv2(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + @Alternate("glGetBufferParameteriv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetBufferParameteriv3(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + @NoErrorCheck + @GLenum + int glGetError(); + + @StripPostfix("params") + void glGetFloatv(@GLenum int pname, @OutParameter @Check("1") FloatBuffer params); + + @Alternate("glGetFloatv") + @GLreturn("params") + @StripPostfix("params") + void glGetFloatv2(@GLenum int pname, @OutParameter FloatBuffer params); + + @StripPostfix("params") + void glGetFramebufferAttachmentParameteriv(@GLenum int target, @GLenum int attachment, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetFramebufferAttachmentParameteri} instead. */ + @Alternate("glGetFramebufferAttachmentParameteriv") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "GLES20", method = "glGetFramebufferAttachmentParameteri") + @Deprecated + void glGetFramebufferAttachmentParameteriv2(@GLenum int target, @GLenum int attachment, @GLenum int pname, @OutParameter IntBuffer params); + + @Alternate("glGetFramebufferAttachmentParameteriv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetFramebufferAttachmentParameteriv3(@GLenum int target, @GLenum int attachment, @GLenum int pname, @OutParameter IntBuffer params); + + @StripPostfix("params") + void glGetIntegerv(@GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + @Alternate("glGetIntegerv") + @GLreturn("params") + @StripPostfix("params") + void glGetIntegerv2(@GLenum int pname, @OutParameter IntBuffer params); + + @StripPostfix("params") + void glGetProgramiv(@GLuint int program, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetProgrami} instead. */ + @Alternate("glGetProgramiv") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "GLES20", method = "glGetProgrami") + @Deprecated + void glGetProgramiv2(@GLuint int program, @GLenum int pname, @OutParameter IntBuffer params); + + @Alternate("glGetProgramiv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetProgramiv3(@GLuint int program, @GLenum int pname, @OutParameter IntBuffer params); + + void glGetProgramInfoLog(@GLuint int program, @AutoSize("infoLog") @GLsizei int bufsize, + @OutParameter @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length, + @OutParameter @GLchar ByteBuffer infoLog); + + @Alternate("glGetProgramInfoLog") + @GLreturn(value = "infoLog", maxLength = "bufsize") + void glGetProgramInfoLog2(@GLuint int program, @GLsizei int bufsize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(infoLog_length)") IntBuffer length, + @OutParameter @GLchar ByteBuffer infoLog); + + @StripPostfix("params") + void glGetRenderbufferParameteriv(@GLenum int target, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetRenderbufferParameteri} instead. */ + @Alternate("glGetRenderbufferParameteriv") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "GLES20", method = "glGetRenderbufferParameteri") + @Deprecated + void glGetRenderbufferParameteriv2(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + @Alternate("glGetRenderbufferParameteriv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetRenderbufferParameteriv3(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + @StripPostfix("params") + void glGetShaderiv(@GLuint int shader, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetShaderi} instead. */ + @Alternate("glGetShaderiv") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "GLES20", method = "glGetShaderi") + @Deprecated + void glGetShaderiv2(@GLuint int shader, @GLenum int pname, @OutParameter IntBuffer params); + + @Alternate("glGetShaderiv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetShaderiv3(@GLuint int shader, @GLenum int pname, @OutParameter IntBuffer params); + + void glGetShaderInfoLog(@GLuint int shader, @AutoSize("infoLog") @GLsizei int bufsize, + @OutParameter @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length, + @OutParameter @GLchar ByteBuffer infoLog); + + @Alternate("glGetShaderInfoLog") + @GLreturn(value = "infoLog", maxLength = "bufsize") + void glGetShaderInfoLog2(@GLuint int shader, @GLsizei int bufsize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(infoLog_length)") IntBuffer length, + @OutParameter @GLchar ByteBuffer infoLog); + + void glGetShaderPrecisionFormat(@GLenum int shadertype, @GLenum int precisiontype, @OutParameter @GLint @Check("2") IntBuffer range, @OutParameter @Check("1") @GLint IntBuffer precision); + + void glGetShaderSource(@GLuint int shader, @AutoSize("source") @GLsizei int bufsize, + @OutParameter @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length, + @OutParameter @GLchar ByteBuffer source); + + @Alternate("glGetShaderSource") + @GLreturn(value = "source", maxLength = "bufsize") + void glGetShaderSource2(@GLuint int shader, @GLsizei int bufsize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(source_length)") IntBuffer length, + @OutParameter @GLchar ByteBuffer source); + + @Const + String glGetString(@GLenum int name); + + @StripPostfix("params") + void glGetTexParameterfv(@GLenum int target, @GLenum int pname, @OutParameter @Check("1") FloatBuffer params); + + @Alternate("glGetTexParameterfv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetTexParameterfv2(@GLenum int target, @GLenum int pname, @OutParameter FloatBuffer params); + + @StripPostfix("params") + void glGetTexParameteriv(@GLenum int target, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + @Alternate("glGetTexParameteriv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetTexParameteriv2(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + @StripPostfix("params") + void glGetUniformfv(@GLuint int program, int location, @OutParameter @Check("1") FloatBuffer params); + + @StripPostfix("params") + void glGetUniformiv(@GLuint int program, int location, @OutParameter @Check("1") IntBuffer params); + + /** + * Returns the location of the uniform with the specified name. The ByteBuffer should contain the uniform name as a + * null-terminated string. + * + * @param program + * @param name + */ + int glGetUniformLocation(@GLuint int program, @NullTerminated @Check("1") @Const @GLchar ByteBuffer name); + + @Alternate("glGetUniformLocation") + int glGetUniformLocation(@GLuint int program, @NullTerminated CharSequence name); + + @StripPostfix("params") + void glGetVertexAttribfv(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") FloatBuffer params); + + @StripPostfix("params") + void glGetVertexAttribiv(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + @StripPostfix("pointer") + void glGetVertexAttribPointerv(@GLuint int index, @GLenum int pname, @Result @GLvoid ByteBuffer pointer); + + void glHint(@GLenum int target, @GLenum int mode); + + @GLboolean + boolean glIsBuffer(@GLuint int buffer); + + @GLboolean + boolean glIsEnabled(@GLenum int cap); + + @GLboolean + boolean glIsFramebuffer(@GLuint int framebuffer); + + @GLboolean + boolean glIsProgram(@GLuint int program); + + @GLboolean + boolean glIsRenderbuffer(@GLuint int renderbuffer); + + @GLboolean + boolean glIsShader(@GLuint int shader); + + @GLboolean + boolean glIsTexture(@GLuint int texture); + + void glLineWidth(@GLfloat float width); + + void glLinkProgram(@GLuint int program); + + void glPixelStorei(@GLenum int pname, @GLint int param); + + void glPolygonOffset(@GLfloat float factor, @GLfloat float units); + + void glReadPixels(int x, int y, @GLsizei int width, @GLsizei int height, @GLenum int format, @GLenum int type, + @Check("GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)") + @OutParameter @GLbyte @GLshort @GLint @GLfloat Buffer pixels); + + void glReleaseShaderCompiler(); + + void glRenderbufferStorage(@GLenum int target, @GLenum int internalformat, @GLsizei int width, @GLsizei int height); + + void glSampleCoverage(@GLclampf float value, @GLboolean boolean invert); + + void glScissor(@GLint int x, @GLint int y, @GLsizei int width, @GLsizei int height); + + void glShaderBinary(@AutoSize("shaders") @GLsizei int n, @Const @GLuint IntBuffer shaders, @GLenum int binaryformat, @Const @GLvoid ByteBuffer binary, @AutoSize("binary") @GLsizei int length); + + /** + * glShaderSource allows multiple, optionally null-terminated, source strings to define a shader program. + *

+ * This method uses just a single string, that should NOT be null-terminated. + * + * @param shader + * @param string + */ + void glShaderSource(@GLuint int shader, @Constant("1") @GLsizei int count, + @Indirect @Const @Check @GLchar ByteBuffer string, + @AutoSize("string") @Indirect @Const @GLint int length); + + @Alternate("glShaderSource") + void glShaderSource2(@GLuint int shader, @Constant("1") @GLsizei int count, CharSequence string, @Constant("string.length()") @Indirect @Const int length); + + @Alternate(value = "glShaderSource", nativeAlt = true) + void glShaderSource3(@GLuint int shader, @Constant("strings.length") @GLsizei int count, + @Const @PointerArray(value = "count", lengths = "length") CharSequence[] strings, + @Constant("APIUtil.getLengths(strings)") @Const IntBuffer length); + + void glStencilFunc(@GLenum int func, @GLint int ref, @GLuint int mask); + + void glStencilFuncSeparate(@GLenum int face, @GLenum int func, @GLint int ref, @GLuint int mask); + + void glStencilMask(@GLuint int mask); + + void glStencilMaskSeparate(@GLenum int face, @GLuint int mask); + + void glStencilOp(@GLenum int fail, @GLenum int zfail, @GLenum int zpass); + + void glStencilOpSeparate(@GLenum int face, @GLenum int fail, @GLenum int zfail, @GLenum int zpass); + + void glTexImage2D(@GLenum int target, int level, int internalformat, int width, int height, int border, @GLenum int format, @GLenum int type, + @Check(value = "GLChecks.calculateTexImage2DStorage(pixels, format, type, width, height)", canBeNull = true) + @Const @GLbyte @GLshort @GLint @GLfloat Buffer pixels); + + void glTexParameterf(@GLenum int target, @GLenum int pname, @GLfloat float param); + + @StripPostfix("param") + void glTexParameterfv(@GLenum int target, @GLenum int pname, @Check("4") @Const FloatBuffer param); + + void glTexParameteri(@GLenum int target, @GLenum int pname, @GLint int param); + + @StripPostfix("param") + void glTexParameteriv(@GLenum int target, @GLenum int pname, @Check("4") @Const IntBuffer param); + + void glTexSubImage2D(@GLenum int target, int level, int xoffset, int yoffset, @GLsizei int width, @GLsizei int height, @GLenum int format, @GLenum int type, + @Check("GLChecks.calculateImageStorage(pixels, format, type, width, height, 1)") + @Const @GLbyte @GLshort @GLint @GLfloat Buffer pixels); + + void glUniform1f(@GLint int location, @GLfloat float x); + + @StripPostfix("v") + void glUniform1fv(int location, @AutoSize("v") @GLsizei int count, @Const FloatBuffer v); + + void glUniform1i(@GLint int location, @GLint int x); + + @StripPostfix("v") + void glUniform1iv(int location, @AutoSize("v") @GLsizei int count, @Const IntBuffer v); + + void glUniform2f(@GLint int location, @GLfloat float x, @GLfloat float y); + + @StripPostfix("v") + void glUniform2fv(int location, @AutoSize(value = "v", expression = " >> 1") @GLsizei int count, @Const FloatBuffer v); + + void glUniform2i(@GLint int location, @GLint int x, @GLint int y); + + @StripPostfix("v") + void glUniform2iv(int location, @AutoSize(value = "v", expression = " >> 1") @GLsizei int count, @Const IntBuffer v); + + void glUniform3f(@GLint int location, @GLfloat float x, @GLfloat float y, @GLfloat float z); + + @StripPostfix("v") + void glUniform3fv(int location, @AutoSize(value = "v", expression = " / 3") @GLsizei int count, @Const FloatBuffer v); + + void glUniform3i(@GLint int location, @GLint int x, @GLint int y, @GLint int z); + + @StripPostfix("v") + void glUniform3iv(int location, @AutoSize(value = "v", expression = " / 3") @GLsizei int count, @Const IntBuffer v); + + void glUniform4f(@GLint int location, @GLfloat float x, @GLfloat float y, @GLfloat float z, @GLfloat float w); + + @StripPostfix("v") + void glUniform4fv(int location, @AutoSize(value = "v", expression = " >> 2") @GLsizei int count, @Const FloatBuffer v); + + void glUniform4i(@GLint int location, @GLint int x, @GLint int y, @GLint int z, @GLint int w); + + @StripPostfix("v") + void glUniform4iv(int location, @AutoSize(value = "v", expression = " >> 2") @GLsizei int count, @Const IntBuffer v); + + @StripPostfix("matrices") + void glUniformMatrix2fv(int location, @AutoSize(value = "matrices", expression = " >> 2") @GLsizei int count, @GLboolean boolean transpose, @Const FloatBuffer matrices); + + @StripPostfix("matrices") + void glUniformMatrix3fv(int location, @AutoSize(value = "matrices", expression = " / (3 * 3)") @GLsizei int count, @GLboolean boolean transpose, @Const FloatBuffer matrices); + + @StripPostfix("matrices") + void glUniformMatrix4fv(int location, @AutoSize(value = "matrices", expression = " >> 4") @GLsizei int count, @GLboolean boolean transpose, @Const FloatBuffer matrices); + + void glUseProgram(@GLuint int program); + + void glValidateProgram(@GLuint int program); + + void glVertexAttrib1f(@GLuint int indx, @GLfloat float x); + + @StripPostfix("values") + void glVertexAttrib1fv(@GLuint int indx, @Const @Check("1") FloatBuffer values); + + void glVertexAttrib2f(@GLuint int indx, @GLfloat float x, @GLfloat float y); + + @StripPostfix("values") + void glVertexAttrib2fv(@GLuint int indx, @Const @Check("2") FloatBuffer values); + + void glVertexAttrib3f(@GLuint int indx, @GLfloat float x, @GLfloat float y, @GLfloat float z); + + @StripPostfix("values") + void glVertexAttrib3fv(@GLuint int indx, @Const @Check("3") FloatBuffer values); + + void glVertexAttrib4f(@GLuint int indx, @GLfloat float x, @GLfloat float y, @GLfloat float z, @GLfloat float w); + + @StripPostfix("values") + void glVertexAttrib4fv(@GLuint int indx, @Const @Check("4") FloatBuffer values); + + void glVertexAttribPointer(@GLuint int index, int size, @AutoType("buffer") @GLenum int type, @GLboolean boolean normalized, @GLsizei int stride, + @CachedReference(index = "index", name = "glVertexAttribPointer_buffer") + @BufferObject(BufferKind.ArrayVBO) @Check @Const @GLubyte @GLbyte @GLshort @GLushort @GLint @GLuint @GLfloat Buffer buffer); + + void glViewport(@GLint int x, @GLint int y, @GLsizei int width, @GLsizei int height); +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/GLES30.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/GLES30.java new file mode 100644 index 0000000..61156b5 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/GLES30.java @@ -0,0 +1,856 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.opengl.GLSync; +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.*; + +public interface GLES30 { + + int GL_READ_BUFFER = 0x0C02; + int GL_UNPACK_ROW_LENGTH = 0x0CF2; + int GL_UNPACK_SKIP_ROWS = 0x0CF3; + int GL_UNPACK_SKIP_PIXELS = 0x0CF4; + int GL_PACK_ROW_LENGTH = 0x0D02; + int GL_PACK_SKIP_ROWS = 0x0D03; + int GL_PACK_SKIP_PIXELS = 0x0D04; + int GL_COLOR = 0x1800; + int GL_DEPTH = 0x1801; + int GL_STENCIL = 0x1802; + int GL_RED = 0x1903; + int GL_RGB8 = 0x8051; + int GL_RGBA8 = 0x8058; + int GL_RGB10_A2 = 0x8059; + int GL_TEXTURE_BINDING_3D = 0x806A; + int GL_PACK_SKIP_IMAGES = 0x806B; + int GL_PACK_IMAGE_HEIGHT = 0x806C; + int GL_UNPACK_SKIP_IMAGES = 0x806D; + int GL_UNPACK_IMAGE_HEIGHT = 0x806E; + int GL_TEXTURE_3D = 0x806F; + int GL_TEXTURE_WRAP_R = 0x8072; + int GL_MAX_3D_TEXTURE_SIZE = 0x8073; + int GL_UNSIGNED_INT_2_10_10_10_REV = 0x8368; + int GL_MAX_ELEMENTS_VERTICES = 0x80E8; + int GL_MAX_ELEMENTS_INDICES = 0x80E9; + int GL_TEXTURE_MIN_LOD = 0x813A; + int GL_TEXTURE_MAX_LOD = 0x813B; + int GL_TEXTURE_BASE_LEVEL = 0x813C; + int GL_TEXTURE_MAX_LEVEL = 0x813D; + int GL_MIN = 0x8007; + int GL_MAX = 0x8008; + int GL_DEPTH_COMPONENT24 = 0x81A6; + int GL_MAX_TEXTURE_LOD_BIAS = 0x84FD; + int GL_TEXTURE_COMPARE_MODE = 0x884C; + int GL_TEXTURE_COMPARE_FUNC = 0x884D; + int GL_CURRENT_QUERY = 0x8865; + int GL_QUERY_RESULT = 0x8866; + int GL_QUERY_RESULT_AVAILABLE = 0x8867; + int GL_BUFFER_MAPPED = 0x88BC; + int GL_BUFFER_MAP_POINTER = 0x88BD; + int GL_STREAM_READ = 0x88E1; + int GL_STREAM_COPY = 0x88E2; + int GL_STATIC_READ = 0x88E5; + int GL_STATIC_COPY = 0x88E6; + int GL_DYNAMIC_READ = 0x88E9; + int GL_DYNAMIC_COPY = 0x88EA; + int GL_MAX_DRAW_BUFFERS = 0x8824; + int GL_DRAW_BUFFER0 = 0x8825; + int GL_DRAW_BUFFER1 = 0x8826; + int GL_DRAW_BUFFER2 = 0x8827; + int GL_DRAW_BUFFER3 = 0x8828; + int GL_DRAW_BUFFER4 = 0x8829; + int GL_DRAW_BUFFER5 = 0x882A; + int GL_DRAW_BUFFER6 = 0x882B; + int GL_DRAW_BUFFER7 = 0x882C; + int GL_DRAW_BUFFER8 = 0x882D; + int GL_DRAW_BUFFER9 = 0x882E; + int GL_DRAW_BUFFER10 = 0x882F; + int GL_DRAW_BUFFER11 = 0x8830; + int GL_DRAW_BUFFER12 = 0x8831; + int GL_DRAW_BUFFER13 = 0x8832; + int GL_DRAW_BUFFER14 = 0x8833; + int GL_DRAW_BUFFER15 = 0x8834; + int GL_MAX_FRAGMENT_UNIFORM_COMPONENTS = 0x8B49; + int GL_MAX_VERTEX_UNIFORM_COMPONENTS = 0x8B4A; + int GL_SAMPLER_3D = 0x8B5F; + int GL_SAMPLER_2D_SHADOW = 0x8B62; + int GL_FRAGMENT_SHADER_DERIVATIVE_HINT = 0x8B8B; + int GL_PIXEL_PACK_BUFFER = 0x88EB; + int GL_PIXEL_UNPACK_BUFFER = 0x88EC; + int GL_PIXEL_PACK_BUFFER_BINDING = 0x88ED; + int GL_PIXEL_UNPACK_BUFFER_BINDING = 0x88EF; + int GL_FLOAT_MAT2x3 = 0x8B65; + int GL_FLOAT_MAT2x4 = 0x8B66; + int GL_FLOAT_MAT3x2 = 0x8B67; + int GL_FLOAT_MAT3x4 = 0x8B68; + int GL_FLOAT_MAT4x2 = 0x8B69; + int GL_FLOAT_MAT4x3 = 0x8B6A; + int GL_SRGB = 0x8C40; + int GL_SRGB8 = 0x8C41; + int GL_SRGB8_ALPHA8 = 0x8C43; + int GL_COMPARE_REF_TO_TEXTURE = 0x884E; + int GL_MAJOR_VERSION = 0x821B; + int GL_MINOR_VERSION = 0x821C; + int GL_NUM_EXTENSIONS = 0x821D; + int GL_RGBA32F = 0x8814; + int GL_RGB32F = 0x8815; + int GL_RGBA16F = 0x881A; + int GL_RGB16F = 0x881B; + int GL_VERTEX_ATTRIB_ARRAY_INTEGER = 0x88FD; + int GL_MAX_ARRAY_TEXTURE_LAYERS = 0x88FF; + int GL_MIN_PROGRAM_TEXEL_OFFSET = 0x8904; + int GL_MAX_PROGRAM_TEXEL_OFFSET = 0x8905; + int GL_MAX_VARYING_COMPONENTS = 0x8B4B; + int GL_TEXTURE_2D_ARRAY = 0x8C1A; + int GL_TEXTURE_BINDING_2D_ARRAY = 0x8C1D; + int GL_R11F_G11F_B10F = 0x8C3A; + int GL_UNSIGNED_INT_10F_11F_11F_REV = 0x8C3B; + int GL_RGB9_E5 = 0x8C3D; + int GL_UNSIGNED_INT_5_9_9_9_REV = 0x8C3E; + int GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH = 0x8C76; + int GL_TRANSFORM_FEEDBACK_BUFFER_MODE = 0x8C7F; + int GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS = 0x8C80; + int GL_TRANSFORM_FEEDBACK_VARYINGS = 0x8C83; + int GL_TRANSFORM_FEEDBACK_BUFFER_START = 0x8C84; + int GL_TRANSFORM_FEEDBACK_BUFFER_SIZE = 0x8C85; + int GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN = 0x8C88; + int GL_RASTERIZER_DISCARD = 0x8C89; + int GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS = 0x8C8A; + int GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS = 0x8C8B; + int GL_INTERLEAVED_ATTRIBS = 0x8C8C; + int GL_SEPARATE_ATTRIBS = 0x8C8D; + int GL_TRANSFORM_FEEDBACK_BUFFER = 0x8C8E; + int GL_TRANSFORM_FEEDBACK_BUFFER_BINDING = 0x8C8F; + int GL_RGBA32UI = 0x8D70; + int GL_RGB32UI = 0x8D71; + int GL_RGBA16UI = 0x8D76; + int GL_RGB16UI = 0x8D77; + int GL_RGBA8UI = 0x8D7C; + int GL_RGB8UI = 0x8D7D; + int GL_RGBA32I = 0x8D82; + int GL_RGB32I = 0x8D83; + int GL_RGBA16I = 0x8D88; + int GL_RGB16I = 0x8D89; + int GL_RGBA8I = 0x8D8E; + int GL_RGB8I = 0x8D8F; + int GL_RED_INTEGER = 0x8D94; + int GL_RGB_INTEGER = 0x8D98; + int GL_RGBA_INTEGER = 0x8D99; + int GL_SAMPLER_2D_ARRAY = 0x8DC1; + int GL_SAMPLER_2D_ARRAY_SHADOW = 0x8DC4; + int GL_SAMPLER_CUBE_SHADOW = 0x8DC5; + int GL_UNSIGNED_INT_VEC2 = 0x8DC6; + int GL_UNSIGNED_INT_VEC3 = 0x8DC7; + int GL_UNSIGNED_INT_VEC4 = 0x8DC8; + int GL_INT_SAMPLER_2D = 0x8DCA; + int GL_INT_SAMPLER_3D = 0x8DCB; + int GL_INT_SAMPLER_CUBE = 0x8DCC; + int GL_INT_SAMPLER_2D_ARRAY = 0x8DCF; + int GL_UNSIGNED_INT_SAMPLER_2D = 0x8DD2; + int GL_UNSIGNED_INT_SAMPLER_3D = 0x8DD3; + int GL_UNSIGNED_INT_SAMPLER_CUBE = 0x8DD4; + int GL_UNSIGNED_INT_SAMPLER_2D_ARRAY = 0x8DD7; + int GL_BUFFER_ACCESS_FLAGS = 0x911F; + int GL_BUFFER_MAP_LENGTH = 0x9120; + int GL_BUFFER_MAP_OFFSET = 0x9121; + int GL_DEPTH_COMPONENT32F = 0x8CAC; + int GL_DEPTH32F_STENCIL8 = 0x8CAD; + int GL_FLOAT_32_UNSIGNED_INT_24_8_REV = 0x8DAD; + int GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING = 0x8210; + int GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE = 0x8211; + int GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE = 0x8212; + int GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE = 0x8213; + int GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE = 0x8214; + int GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE = 0x8215; + int GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE = 0x8216; + int GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE = 0x8217; + int GL_FRAMEBUFFER_DEFAULT = 0x8218; + int GL_FRAMEBUFFER_UNDEFINED = 0x8219; + int GL_DEPTH_STENCIL_ATTACHMENT = 0x821A; + int GL_DEPTH_STENCIL = 0x84F9; + int GL_UNSIGNED_INT_24_8 = 0x84FA; + int GL_DEPTH24_STENCIL8 = 0x88F0; + int GL_UNSIGNED_NORMALIZED = 0x8C17; + int GL_DRAW_FRAMEBUFFER_BINDING = GLES20.GL_FRAMEBUFFER_BINDING; + int GL_READ_FRAMEBUFFER = 0x8CA8; + int GL_DRAW_FRAMEBUFFER = 0x8CA9; + int GL_READ_FRAMEBUFFER_BINDING = 0x8CAA; + int GL_RENDERBUFFER_SAMPLES = 0x8CAB; + int GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER = 0x8CD4; + int GL_MAX_COLOR_ATTACHMENTS = 0x8CDF; + int GL_COLOR_ATTACHMENT1 = 0x8CE1; + int GL_COLOR_ATTACHMENT2 = 0x8CE2; + int GL_COLOR_ATTACHMENT3 = 0x8CE3; + int GL_COLOR_ATTACHMENT4 = 0x8CE4; + int GL_COLOR_ATTACHMENT5 = 0x8CE5; + int GL_COLOR_ATTACHMENT6 = 0x8CE6; + int GL_COLOR_ATTACHMENT7 = 0x8CE7; + int GL_COLOR_ATTACHMENT8 = 0x8CE8; + int GL_COLOR_ATTACHMENT9 = 0x8CE9; + int GL_COLOR_ATTACHMENT10 = 0x8CEA; + int GL_COLOR_ATTACHMENT11 = 0x8CEB; + int GL_COLOR_ATTACHMENT12 = 0x8CEC; + int GL_COLOR_ATTACHMENT13 = 0x8CED; + int GL_COLOR_ATTACHMENT14 = 0x8CEE; + int GL_COLOR_ATTACHMENT15 = 0x8CEF; + int GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE = 0x8D56; + int GL_MAX_SAMPLES = 0x8D57; + int GL_HALF_FLOAT = 0x140B; + int GL_MAP_READ_BIT = 0x0001; + int GL_MAP_WRITE_BIT = 0x0002; + int GL_MAP_INVALIDATE_RANGE_BIT = 0x0004; + int GL_MAP_INVALIDATE_BUFFER_BIT = 0x0008; + int GL_MAP_FLUSH_EXPLICIT_BIT = 0x0010; + int GL_MAP_UNSYNCHRONIZED_BIT = 0x0020; + int GL_RG = 0x8227; + int GL_RG_INTEGER = 0x8228; + int GL_R8 = 0x8229; + int GL_RG8 = 0x822B; + int GL_R16F = 0x822D; + int GL_R32F = 0x822E; + int GL_RG16F = 0x822F; + int GL_RG32F = 0x8230; + int GL_R8I = 0x8231; + int GL_R8UI = 0x8232; + int GL_R16I = 0x8233; + int GL_R16UI = 0x8234; + int GL_R32I = 0x8235; + int GL_R32UI = 0x8236; + int GL_RG8I = 0x8237; + int GL_RG8UI = 0x8238; + int GL_RG16I = 0x8239; + int GL_RG16UI = 0x823A; + int GL_RG32I = 0x823B; + int GL_RG32UI = 0x823C; + int GL_VERTEX_ARRAY_BINDING = 0x85B5; + int GL_R8_SNORM = 0x8F94; + int GL_RG8_SNORM = 0x8F95; + int GL_RGB8_SNORM = 0x8F96; + int GL_RGBA8_SNORM = 0x8F97; + int GL_SIGNED_NORMALIZED = 0x8F9C; + int GL_PRIMITIVE_RESTART_FIXED_INDEX = 0x8D69; + int GL_COPY_READ_BUFFER = 0x8F36; + int GL_COPY_WRITE_BUFFER = 0x8F37; + int GL_COPY_READ_BUFFER_BINDING = GL_COPY_READ_BUFFER; + int GL_COPY_WRITE_BUFFER_BINDING = GL_COPY_WRITE_BUFFER; + int GL_UNIFORM_BUFFER = 0x8A11; + int GL_UNIFORM_BUFFER_BINDING = 0x8A28; + int GL_UNIFORM_BUFFER_START = 0x8A29; + int GL_UNIFORM_BUFFER_SIZE = 0x8A2A; + int GL_MAX_VERTEX_UNIFORM_BLOCKS = 0x8A2B; + int GL_MAX_FRAGMENT_UNIFORM_BLOCKS = 0x8A2D; + int GL_MAX_COMBINED_UNIFORM_BLOCKS = 0x8A2E; + int GL_MAX_UNIFORM_BUFFER_BINDINGS = 0x8A2F; + int GL_MAX_UNIFORM_BLOCK_SIZE = 0x8A30; + int GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS = 0x8A31; + int GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS = 0x8A33; + int GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT = 0x8A34; + int GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH = 0x8A35; + int GL_ACTIVE_UNIFORM_BLOCKS = 0x8A36; + int GL_UNIFORM_TYPE = 0x8A37; + int GL_UNIFORM_SIZE = 0x8A38; + int GL_UNIFORM_NAME_LENGTH = 0x8A39; + int GL_UNIFORM_BLOCK_INDEX = 0x8A3A; + int GL_UNIFORM_OFFSET = 0x8A3B; + int GL_UNIFORM_ARRAY_STRIDE = 0x8A3C; + int GL_UNIFORM_MATRIX_STRIDE = 0x8A3D; + int GL_UNIFORM_IS_ROW_MAJOR = 0x8A3E; + int GL_UNIFORM_BLOCK_BINDING = 0x8A3F; + int GL_UNIFORM_BLOCK_DATA_SIZE = 0x8A40; + int GL_UNIFORM_BLOCK_NAME_LENGTH = 0x8A41; + int GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS = 0x8A42; + int GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES = 0x8A43; + int GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER = 0x8A44; + int GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER = 0x8A46; + int GL_INVALID_INDEX = 0xFFFFFFFF; + int GL_MAX_VERTEX_OUTPUT_COMPONENTS = 0x9122; + int GL_MAX_FRAGMENT_INPUT_COMPONENTS = 0x9125; + int GL_MAX_SERVER_WAIT_TIMEOUT = 0x9111; + int GL_OBJECT_TYPE = 0x9112; + int GL_SYNC_CONDITION = 0x9113; + int GL_SYNC_STATUS = 0x9114; + int GL_SYNC_FLAGS = 0x9115; + int GL_SYNC_FENCE = 0x9116; + int GL_SYNC_GPU_COMMANDS_COMPLETE = 0x9117; + int GL_UNSIGNALED = 0x9118; + int GL_SIGNALED = 0x9119; + int GL_ALREADY_SIGNALED = 0x911A; + int GL_TIMEOUT_EXPIRED = 0x911B; + int GL_CONDITION_SATISFIED = 0x911C; + int GL_WAIT_FAILED = 0x911D; + int GL_SYNC_FLUSH_COMMANDS_BIT = 0x00000001; + long GL_TIMEOUT_IGNORED = 0xFFFFFFFFFFFFFFFFl; + int GL_VERTEX_ATTRIB_ARRAY_DIVISOR = 0x88FE; + int GL_ANY_SAMPLES_PASSED = 0x8C2F; + int GL_ANY_SAMPLES_PASSED_CONSERVATIVE = 0x8D6A; + int GL_SAMPLER_BINDING = 0x8919; + int GL_RGB10_A2UI = 0x906F; + int GL_TEXTURE_SWIZZLE_R = 0x8E42; + int GL_TEXTURE_SWIZZLE_G = 0x8E43; + int GL_TEXTURE_SWIZZLE_B = 0x8E44; + int GL_TEXTURE_SWIZZLE_A = 0x8E45; + int GL_GREEN = 0x1904; + int GL_BLUE = 0x1905; + int GL_INT_2_10_10_10_REV = 0x8D9F; + int GL_TRANSFORM_FEEDBACK = 0x8E22; + int GL_TRANSFORM_FEEDBACK_PAUSED = 0x8E23; + int GL_TRANSFORM_FEEDBACK_ACTIVE = 0x8E24; + int GL_TRANSFORM_FEEDBACK_BINDING = 0x8E25; + int GL_PROGRAM_BINARY_RETRIEVABLE_HINT = 0x8257; + int GL_PROGRAM_BINARY_LENGTH = 0x8741; + int GL_NUM_PROGRAM_BINARY_FORMATS = 0x87FE; + int GL_PROGRAM_BINARY_FORMATS = 0x87FF; + int GL_COMPRESSED_R11_EAC = 0x9270; + int GL_COMPRESSED_SIGNED_R11_EAC = 0x9271; + int GL_COMPRESSED_RG11_EAC = 0x9272; + int GL_COMPRESSED_SIGNED_RG11_EAC = 0x9273; + int GL_COMPRESSED_RGB8_ETC2 = 0x9274; + int GL_COMPRESSED_SRGB8_ETC2 = 0x9275; + int GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9276; + int GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 0x9277; + int GL_COMPRESSED_RGBA8_ETC2_EAC = 0x9278; + int GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC = 0x9279; + int GL_TEXTURE_IMMUTABLE_FORMAT = 0x912F; + int GL_MAX_ELEMENT_INDEX = 0x8D6B; + int GL_NUM_SAMPLE_COUNTS = 0x9380; + + void glReadBuffer(@GLenum int mode); + + void glDrawRangeElements(@GLenum int mode, @GLuint int start, @GLuint int end, @AutoSize("indices") @GLsizei int count, + @AutoType("indices") + @GLenum int type, + @BufferObject(BufferKind.ElementVBO) + @Const + @GLubyte + @GLushort + @GLuint Buffer indices); + + void glTexImage3D(@GLenum int target, int level, int internalFormat, @GLsizei int width, @GLsizei int height, @GLsizei int depth, int border, @GLenum int format, @GLenum int type, + @BufferObject(BufferKind.UnpackPBO) + @Check(value = "GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth)", canBeNull = true) + @Const + @GLbyte + @GLshort + @GLint + @GLfloat Buffer pixels); + + void glTexSubImage3D(@GLenum int target, int level, int xoffset, int yoffset, int zoffset, @GLsizei int width, @GLsizei int height, @GLsizei int depth, @GLenum int format, @GLenum int type, + @BufferObject(BufferKind.UnpackPBO) + @Check("GLChecks.calculateImageStorage(pixels, format, type, width, height, depth)") + @Const + @GLbyte + @GLshort + @GLint + @GLfloat Buffer pixels); + + void glCopyTexSubImage3D(@GLenum int target, int level, int xoffset, int yoffset, int zoffset, int x, int y, @GLsizei int width, @GLsizei int height); + + void glCompressedTexImage3D(@GLenum int target, int level, @GLenum int internalformat, @GLsizei int width, @GLsizei int height, @GLsizei int depth, int border, @AutoSize("data") @GLsizei int imageSize, + @BufferObject(BufferKind.UnpackPBO) + @Check + @Const + @GLvoid + ByteBuffer data); + + void glCompressedTexSubImage3D(@GLenum int target, int level, int xoffset, int yoffset, int zoffset, @GLsizei int width, @GLsizei int height, @GLsizei int depth, @GLenum int format, @AutoSize("data") @GLsizei int imageSize, + @BufferObject(BufferKind.UnpackPBO) + @Check + @Const + @GLvoid + ByteBuffer data); + + void glGenQueries(@AutoSize("ids") @GLsizei int n, @OutParameter @GLuint IntBuffer ids); + + @Alternate("glGenQueries") + @GLreturn("ids") + void glGenQueries2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer ids); + + void glDeleteQueries(@AutoSize("ids") @GLsizei int n, @GLuint IntBuffer ids); + + @Alternate("glDeleteQueries") + void glDeleteQueries(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(id)", keepParam = true) int id); + + boolean glIsQuery(@GLuint int id); + + void glBeginQuery(@GLenum int target, @GLuint int id); + + void glEndQuery(@GLenum int target); + + @StripPostfix("params") + void glGetQueryiv(@GLenum int target, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + @Alternate("glGetQueryiv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetQueryiv2(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + @StripPostfix("params") + void glGetQueryObjectuiv(@GLenum int id, @GLenum int pname, @OutParameter @Check("1") @GLuint IntBuffer params); + + @Alternate("glGetQueryObjectuiv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetQueryObjectuiv2(@GLenum int id, @GLenum int pname, @OutParameter @GLuint IntBuffer params); + + boolean glUnmapBuffer(@GLenum int target); + + @StripPostfix("pointer") + @AutoSize("GLChecks.getBufferObjectSize(target)") + void glGetBufferPointerv(@GLenum int target, @GLenum int pname, @OutParameter @Result @GLvoid ByteBuffer pointer); + + void glDrawBuffers(@AutoSize("buffers") @GLsizei int size, @Const @GLenum IntBuffer buffers); + + @Alternate("glDrawBuffers") + void glDrawBuffers(@Constant("1") @GLsizei int size, @Constant(value = "APIUtil.getInt(buffer)", keepParam = true) int buffer); + + @StripPostfix("matrices") + void glUniformMatrix2x3fv(int location, @AutoSize(value = "matrices", expression = " / (2 * 3)") @GLsizei int count, + boolean transpose, FloatBuffer matrices); + + @StripPostfix("matrices") + void glUniformMatrix3x2fv(int location, @AutoSize(value = "matrices", expression = " / (3 * 2)") @GLsizei int count, + boolean transpose, FloatBuffer matrices); + + @StripPostfix("matrices") + void glUniformMatrix2x4fv(int location, @AutoSize(value = "matrices", expression = " >> 3") @GLsizei int count, + boolean transpose, FloatBuffer matrices); + + @StripPostfix("matrices") + void glUniformMatrix4x2fv(int location, @AutoSize(value = "matrices", expression = " >> 3") @GLsizei int count, + boolean transpose, FloatBuffer matrices); + + @StripPostfix("matrices") + void glUniformMatrix3x4fv(int location, @AutoSize(value = "matrices", expression = " / (3 * 4)") @GLsizei int count, + boolean transpose, FloatBuffer matrices); + + @StripPostfix("matrices") + void glUniformMatrix4x3fv(int location, @AutoSize(value = "matrices", expression = " / (4 * 3)") @GLsizei int count, + boolean transpose, FloatBuffer matrices); + + /** + * Transfers a rectangle of pixel values from one + * region of the read framebuffer to another in the draw framebuffer. + * <mask> is the bitwise OR of a number of values indicating which + * buffers are to be copied. The values are COLOR_BUFFER_BIT, + * DEPTH_BUFFER_BIT, and STENCIL_BUFFER_BIT. + * The pixels corresponding to these buffers are + * copied from the source rectangle, bound by the locations (srcX0, + * srcY0) and (srcX1, srcY1) inclusive, to the destination rectangle, + * bound by the locations (dstX0, dstY0) and (dstX1, dstY1) + * inclusive. + * If the source and destination rectangle dimensions do not match, + * the source image is stretched to fit the destination + * rectangle. <filter> must be LINEAR or NEAREST and specifies the + * method of interpolation to be applied if the image is + * stretched. + */ + void glBlitFramebuffer( + @GLint int srcX0, @GLint int srcY0, @GLint int srcX1, @GLint int srcY1, + @GLint int dstX0, @GLint int dstY0, @GLint int dstX1, @GLint int dstY1, + @GLbitfield int mask, @GLenum int filter); + + /** + * Establishes the data storage, format, dimensions, and number of + * samples of a renderbuffer object's image. + */ + void glRenderbufferStorageMultisample( + @GLenum int target, @GLsizei int samples, + @GLenum int internalformat, + @GLsizei int width, @GLsizei int height); + + void glFramebufferTextureLayer(@GLenum int target, @GLenum int attachment, @GLuint int texture, int level, int layer); + + /** + * glMapBufferRange maps a GL buffer object range to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapBufferRange like this: + *

+ * ByteBuffer mapped_buffer; mapped_buffer = glMapBufferRange(..., ..., ..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBufferRange(..., ..., ..., ..., mapped_buffer); + *

+ * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + * + * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. + * + * @return A ByteBuffer representing the mapped buffer memory. + */ + @CachedResult(isRange = true) + @GLvoid + @AutoSize("length") + ByteBuffer glMapBufferRange(@GLenum int target, @GLintptr long offset, @GLsizeiptr long length, @GLbitfield int access); + + void glFlushMappedBufferRange(@GLenum int target, @GLintptr long offset, @GLsizeiptr long length); + + @Code(" StateTracker.bindVAO(array);") + void glBindVertexArray(@GLuint int array); + + @Code(" StateTracker.deleteVAO(arrays);") + void glDeleteVertexArrays(@AutoSize("arrays") @GLsizei int n, @Const @GLuint IntBuffer arrays); + + @Alternate("glDeleteVertexArrays") + @Code(" StateTracker.deleteVAO(array);") + void glDeleteVertexArrays(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(array)", keepParam = true) int array); + + void glGenVertexArrays(@AutoSize("arrays") @GLsizei int n, @OutParameter @GLuint IntBuffer arrays); + + @Alternate("glGenVertexArrays") + @GLreturn("arrays") + void glGenVertexArrays2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer arrays); + + boolean glIsVertexArray(@GLuint int array); + + @StripPostfix("data") + void glGetIntegeri_v(@GLenum int value, @GLuint int index, @OutParameter @Check("4") IntBuffer data); + + @Alternate("glGetIntegeri_v") + @GLreturn("data") + @StripPostfix("data") + void glGetIntegeri_v2(@GLenum int value, @GLuint int index, @OutParameter IntBuffer data); + + void glBeginTransformFeedback(@GLenum int primitiveMode); + + void glEndTransformFeedback(); + + void glBindBufferRange(@GLenum int target, @GLuint int index, @GLuint int buffer, @GLintptr long offset, @GLsizeiptr long size); + + void glBindBufferBase(@GLenum int target, @GLuint int index, @GLuint int buffer); + + void glTransformFeedbackVaryings(@GLuint int program, @GLsizei int count, + @Const @NullTerminated("count") @GLchar @PointerArray("count") ByteBuffer varyings, + @GLenum int bufferMode); + + @Alternate("glTransformFeedbackVaryings") + void glTransformFeedbackVaryings(@GLuint int program, @Constant("varyings.length") @GLsizei int count, + @Const @NullTerminated @PointerArray("count") CharSequence[] varyings, + @GLenum int bufferMode); + + void glGetTransformFeedbackVarying(@GLuint int program, @GLuint int index, @AutoSize("name") @GLsizei int bufSize, + @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length, + @OutParameter @GLsizei @Check("1") IntBuffer size, + @OutParameter @GLenum @Check("1") IntBuffer type, + @OutParameter @GLchar ByteBuffer name); + + @Alternate("glGetTransformFeedbackVarying") + @GLreturn(value = "name", maxLength = "bufSize") + void glGetTransformFeedbackVarying2(@GLuint int program, @GLuint int index, @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(name_length)") IntBuffer length, + @OutParameter @GLsizei @Check("1") IntBuffer size, + @OutParameter @GLenum @Check("1") IntBuffer type, + @OutParameter @GLchar ByteBuffer name); + + void glVertexAttribIPointer(@GLuint int index, int size, @GLenum int type, @GLsizei int stride, + @CachedReference(index = "index", name = "glVertexAttribPointer_buffer") + @BufferObject(BufferKind.ArrayVBO) + @Check + @Const + @GLbyte + @GLubyte + @GLshort + @GLushort + @GLint + @GLuint Buffer buffer); + + @StripPostfix("params") + void glGetVertexAttribIiv(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") IntBuffer params); + + @StripPostfix("params") + void glGetVertexAttribIuiv(@GLuint int index, @GLenum int pname, @OutParameter @Check("4") @GLuint IntBuffer params); + + @NoErrorCheck + void glVertexAttribI4i(@GLuint int index, int x, int y, int z, int w); + + @NoErrorCheck + void glVertexAttribI4ui(@GLuint int index, @GLuint int x, @GLuint int y, @GLuint int z, @GLuint int w); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribI4iv(@GLuint int index, @Check("4") @Const IntBuffer v); + + @NoErrorCheck + @StripPostfix("v") + void glVertexAttribI4uiv(@GLuint int index, @Check("4") @Const @GLuint IntBuffer v); + + @StripPostfix("params") + void glGetUniformuiv(@GLuint int program, int location, @OutParameter @Check @GLuint IntBuffer params); + + int glGetFragDataLocation(@GLuint int program, @NullTerminated @Const @GLchar ByteBuffer name); + + @Alternate("glGetFragDataLocation") + int glGetFragDataLocation(@GLuint int program, @NullTerminated CharSequence name); + + void glUniform1ui(int location, @GLuint int v0); + + void glUniform2ui(int location, @GLuint int v0, @GLuint int v1); + + void glUniform3ui(int location, @GLuint int v0, @GLuint int v1, @GLuint int v2); + + void glUniform4ui(int location, @GLuint int v0, @GLuint int v1, @GLuint int v2, @GLuint int v3); + + @StripPostfix("value") + void glUniform1uiv(int location, @AutoSize("value") @GLsizei int count, @Const @GLuint IntBuffer value); + + @StripPostfix("value") + void glUniform2uiv(int location, @AutoSize(value = "value", expression = " >> 1") @GLsizei int count, @Const @GLuint IntBuffer value); + + @StripPostfix("value") + void glUniform3uiv(int location, @AutoSize(value = "value", expression = " / 3") @GLsizei int count, @Const @GLuint IntBuffer value); + + @StripPostfix("value") + void glUniform4uiv(int location, @AutoSize(value = "value", expression = " >> 2") @GLsizei int count, @Const @GLuint IntBuffer value); + + @StripPostfix("value") + void glClearBufferfv(@GLenum int buffer, int drawbuffer, @Const @Check("4") FloatBuffer value); + + @StripPostfix("value") + void glClearBufferiv(@GLenum int buffer, int drawbuffer, @Const @Check("4") IntBuffer value); + + @StripPostfix("value") + void glClearBufferuiv(@GLenum int buffer, int drawbuffer, @Const @Check("4") IntBuffer value); + + void glClearBufferfi(@GLenum int buffer, int drawbuffer, float depth, int stencil); + + String glGetStringi(@GLenum int name, @GLuint int index); + + void glCopyBufferSubData(@GLenum int readtarget, @GLenum int writetarget, @GLintptr long readoffset, @GLintptr long writeoffset, @GLsizeiptr long size); + + void glGetUniformIndices(@GLuint int program, @AutoSize("uniformIndices") @GLsizei int uniformCount, + @Const @NullTerminated("uniformIndices.remaining()") @GLchar @PointerArray("uniformCount") ByteBuffer uniformNames, + @OutParameter @GLuint IntBuffer uniformIndices); + + @Alternate("glGetUniformIndices") + void glGetUniformIndices(@GLuint int program, @Constant("uniformNames.length") @GLsizei int uniformCount, + @Const @NullTerminated @PointerArray("uniformCount") CharSequence[] uniformNames, + @OutParameter @Check("uniformNames.length") @GLuint IntBuffer uniformIndices); + + @StripPostfix("params") + void glGetActiveUniformsiv(@GLuint int program, @AutoSize("uniformIndices") @GLsizei int uniformCount, + @Const @GLuint IntBuffer uniformIndices, + @GLenum int pname, + @OutParameter @Check("uniformIndices.remaining()") @GLint IntBuffer params); + + @Alternate("glGetActiveUniformsiv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetActiveUniformsiv(@GLuint int program, @Constant("1") @GLsizei int uniformCount, + @Constant(value = "MemoryUtil.getAddress(params.put(1, uniformIndex), 1)", keepParam = true) int uniformIndex, // Reuse params buffer + @GLenum int pname, + @OutParameter @GLint IntBuffer params); + + @GLuint + int glGetUniformBlockIndex(@GLuint int program, @Const @NullTerminated @GLchar ByteBuffer uniformBlockName); + + @Alternate("glGetUniformBlockIndex") + @GLuint + int glGetUniformBlockIndex(@GLuint int program, @NullTerminated CharSequence uniformBlockName); + + @StripPostfix("params") + void glGetActiveUniformBlockiv(@GLuint int program, @GLuint int uniformBlockIndex, @GLenum int pname, + @OutParameter @Check(value = "16") @GLint IntBuffer params); + + @Alternate("glGetActiveUniformBlockiv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetActiveUniformBlockiv2(@GLuint int program, @GLuint int uniformBlockIndex, @GLenum int pname, + @OutParameter @GLint IntBuffer params); + + void glGetActiveUniformBlockName(@GLuint int program, @GLuint int uniformBlockIndex, @AutoSize("uniformBlockName") @GLsizei int bufSize, + @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length, + @OutParameter @GLchar ByteBuffer uniformBlockName); + + @Alternate("glGetActiveUniformBlockName") + @GLreturn(value = "uniformBlockName", maxLength = "bufSize") + void glGetActiveUniformBlockName2(@GLuint int program, @GLuint int uniformBlockIndex, @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(uniformBlockName_length)") IntBuffer length, + @OutParameter @GLchar ByteBuffer uniformBlockName); + + void glUniformBlockBinding(@GLuint int program, @GLuint int uniformBlockIndex, @GLuint int uniformBlockBinding); + + void glDrawArraysInstanced(@GLenum int mode, int first, @GLsizei int count, @GLsizei int primcount); + + void glDrawElementsInstanced(@GLenum int mode, @AutoSize("indices") @GLsizei int count, @AutoType("indices") @GLenum int type, + @BufferObject(BufferKind.ElementVBO) + @Const + @GLubyte + @GLushort + @GLuint Buffer indices, @GLsizei int primcount); + + @PointerWrapper("GLsync") + GLSync glFenceSync(@GLenum int condition, @GLbitfield int flags); + + boolean glIsSync(@PointerWrapper("GLsync") GLSync sync); + + void glDeleteSync(@PointerWrapper("GLsync") GLSync sync); + + @GLenum + int glClientWaitSync(@PointerWrapper("GLsync") GLSync sync, @GLbitfield int flags, @GLuint64 long timeout); + + void glWaitSync(@PointerWrapper("GLsync") GLSync sync, @GLbitfield int flags, @GLuint64 long timeout); + + @StripPostfix("data") + void glGetInteger64v(@GLenum int pname, @OutParameter @Check("1") @GLint64 LongBuffer data); + + @Alternate("glGetInteger64v") + @GLreturn("data") + @StripPostfix("data") + void glGetInteger64v2(@GLenum int pname, @OutParameter @GLint64 LongBuffer data); + + @StripPostfix("data") + @Optional(reason = "NV's 3.2 implementation does not expose this (last driver checked: 19?.??)") + void glGetInteger64i_v(@GLenum int value, @GLuint int index, @OutParameter @Check("4") @GLint64 LongBuffer data); + + @Alternate("glGetInteger64i_v") + @GLreturn("data") + @StripPostfix("data") + void glGetInteger64i_v2(@GLenum int value, @GLuint int index, @OutParameter @GLint64 LongBuffer data); + + @StripPostfix("values") + void glGetSynciv(@PointerWrapper("GLsync") GLSync sync, @GLenum int pname, @AutoSize("values") @GLsizei int bufSize, + @OutParameter @GLsizei @Check(value = "1", canBeNull = true) IntBuffer length, + @OutParameter IntBuffer values); + + @Alternate("glGetSynciv") + @GLreturn("values") + @StripPostfix(value = "values", postfix = "v") + void glGetSynciv2(@PointerWrapper("GLsync") GLSync sync, @GLenum int pname, @Constant("1") @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("0L") IntBuffer length, + @OutParameter IntBuffer values); + + @StripPostfix("params") + void glGetBufferParameteri64v(@GLenum int target, @GLenum int pname, @OutParameter @Check("4") LongBuffer params); + + @Alternate("glGetBufferParameteri64v") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetBufferParameteri64v2(@GLenum int target, @GLenum int pname, @OutParameter LongBuffer params); + + void glGenSamplers(@AutoSize("samplers") @GLsizei int count, @OutParameter @GLuint IntBuffer samplers); + + @Alternate("glGenSamplers") + @GLreturn("samplers") + void glGenSamplers2(@Constant("1") @GLsizei int count, @OutParameter @GLuint IntBuffer samplers); + + void glDeleteSamplers(@AutoSize("samplers") @GLsizei int count, @Const @GLuint IntBuffer samplers); + + @Alternate("glDeleteSamplers") + void glDeleteSamplers(@Constant("1") @GLsizei int count, @Constant(value = "APIUtil.getInt(sampler)", keepParam = true) int sampler); + + boolean glIsSampler(@GLuint int sampler); + + void glBindSampler(@GLenum int unit, @GLuint int sampler); + + void glSamplerParameteri(@GLuint int sampler, @GLenum int pname, int param); + + void glSamplerParameterf(@GLuint int sampler, @GLenum int pname, float param); + + @StripPostfix("params") + void glSamplerParameteriv(@GLuint int sampler, @GLenum int pname, @Check("4") @Const IntBuffer params); + + @StripPostfix("params") + void glSamplerParameterfv(@GLuint int sampler, @GLenum int pname, @Check("4") @Const FloatBuffer params); + + @StripPostfix("params") + void glGetSamplerParameteriv(@GLuint int sampler, @GLenum int pname, @Check("4") @OutParameter IntBuffer params); + + @Alternate("glGetSamplerParameteriv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetSamplerParameteriv2(@GLuint int sampler, @GLenum int pname, @OutParameter IntBuffer params); + + @StripPostfix("params") + void glGetSamplerParameterfv(@GLuint int sampler, @GLenum int pname, @Check("4") @OutParameter FloatBuffer params); + + @Alternate("glGetSamplerParameterfv") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetSamplerParameterfv2(@GLuint int sampler, @GLenum int pname, @OutParameter FloatBuffer params); + + void glVertexAttribDivisor(@GLuint int index, @GLuint int divisor); + + void glBindTransformFeedback(@GLenum int target, @GLuint int id); + + void glDeleteTransformFeedbacks(@AutoSize("ids") @GLsizei int n, @Const @GLuint IntBuffer ids); + + @Alternate("glDeleteTransformFeedbacks") + void glDeleteTransformFeedbacks(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(id)", keepParam = true) int id); + + void glGenTransformFeedbacks(@AutoSize("ids") @GLsizei int n, @OutParameter @GLuint IntBuffer ids); + + @Alternate("glGenTransformFeedbacks") + @GLreturn("ids") + void glGenTransformFeedbacks2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer ids); + + boolean glIsTransformFeedback(@GLuint int id); + + void glPauseTransformFeedback(); + + void glResumeTransformFeedback(); + + void glGetProgramBinary(@GLuint int program, @AutoSize("binary") @GLsizei int bufSize, + @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length, + @Check("1") @GLenum IntBuffer binaryFormat, + @OutParameter @GLvoid ByteBuffer binary); + + void glProgramBinary(@GLuint int program, @GLenum int binaryFormat, @Const @GLvoid ByteBuffer binary, @AutoSize("binary") @GLsizei int length); + + void glProgramParameteri(@GLuint int program, @GLenum int pname, int value); + + void glInvalidateFramebuffer(@GLenum int target, + @AutoSize("attachments") @GLsizei int numAttachments, + @Const @GLenum IntBuffer attachments); + + void glInvalidateSubFramebuffer(@GLenum int target, + @AutoSize("attachments") @GLsizei int numAttachments, + @Const @GLenum IntBuffer attachments, + int x, int y, @GLsizei int width, @GLsizei int height); + + void glTexStorage2D(@GLenum int target, @GLsizei int levels, + @GLenum int internalformat, + @GLsizei int width, @GLsizei int height); + + void glTexStorage3D(@GLenum int target, @GLsizei int levels, + @GLenum int internalformat, + @GLsizei int width, @GLsizei int height, @GLsizei int depth); + + @StripPostfix("params") + void glGetInternalformativ(@GLenum int target, @GLenum int internalformat, + @GLenum int pname, @AutoSize("params") @GLsizei int bufSize, @OutParameter IntBuffer params); + + @Alternate("glGetInternalformativ") + @StripPostfix("params") + @GLreturn("params") + void glGetInternalformativ2(@GLenum int target, @GLenum int internalformat, + @GLenum int pname, @Constant("1") @GLsizei int bufSize, @OutParameter IntBuffer params); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/IMG_multisampled_render_to_texture.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/IMG_multisampled_render_to_texture.java new file mode 100644 index 0000000..8feac03 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/IMG_multisampled_render_to_texture.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface IMG_multisampled_render_to_texture { + + /** Accepted by the <pname> parameter of GetRenderbufferParameteriv: */ + int GL_RENDERBUFFER_SAMPLES_IMG = 0x9133; + + /** Returned by CheckFramebufferStatus: */ + int GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_IMG = 0x9134; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * GetFloatv, and GetDoublev: + */ + int GL_MAX_SAMPLES_IMG = 0x9135; + + /** Accepted by the <pname> parameter of GetFramebufferAttachmentParameteriv: */ + int GL_TEXTURE_SAMPLES_IMG = 0x9136; + + void glRenderbufferStorageMultisampleIMG( + @GLenum int target, @GLsizei int samples, + @GLenum int internalformat, + @GLsizei int width, @GLsizei int height); + + void glFramebufferTexture2DMultisampleIMG( + @GLenum int target, @GLenum int attachment, + @GLenum int textarget, @GLuint int texture, + int level, @GLsizei int samples); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/IMG_program_binary.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/IMG_program_binary.java new file mode 100644 index 0000000..ed9cbd4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/IMG_program_binary.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface IMG_program_binary { + + /** Accepted by the <binaryFormat> parameter of ProgramBinaryOES: */ + int GL_SGX_PROGRAM_BINARY_IMG = 0x9130; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/IMG_read_format.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/IMG_read_format.java new file mode 100644 index 0000000..8aa389f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/IMG_read_format.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface IMG_read_format { + + /** Accepted by the <format> parameter of ReadPixels: */ + int GL_BGRA_IMG = 0x80E1, + GL_UNSIGNED_SHORT_4_4_4_4_REV_IMG = 0x8365; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/IMG_shader_binary.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/IMG_shader_binary.java new file mode 100644 index 0000000..d36bbf4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/IMG_shader_binary.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface IMG_shader_binary { + + /** Accepted by the <binaryformat> parameter of ShaderBinary: */ + int GL_SGX_BINARY_IMG = 0x8C0A; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/IMG_texture_compression_pvrtc.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/IMG_texture_compression_pvrtc.java new file mode 100644 index 0000000..f583e34 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/IMG_texture_compression_pvrtc.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface IMG_texture_compression_pvrtc { + + /** + * Accepted by the <internalformat> parameter of CompressedTexImage2DARB + * and the <format> parameter of CompressedTexSubImage2DARB: + */ + int GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG = 0x8C00, + GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG = 0x8C01, + GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG = 0x8C02, + GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG = 0x8C03; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/KHR_debug.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/KHR_debug.java new file mode 100644 index 0000000..ea2feee --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/KHR_debug.java @@ -0,0 +1,222 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +public interface KHR_debug { + + /** + * Tokens accepted by the <target> parameters of Enable, Disable, and + * IsEnabled: + */ + int GL_DEBUG_OUTPUT = 0x92E0, + GL_DEBUG_OUTPUT_SYNCHRONOUS = 0x8242; + + /** Returned by GetIntegerv when <pname> is CONTEXT_FLAGS: */ + int GL_CONTEXT_FLAG_DEBUG_BIT = 0x00000002; + + /** + * Tokens accepted by the <value> parameters of GetBooleanv, GetIntegerv, + * GetFloatv, GetDoublev and GetInteger64v: + */ + int GL_MAX_DEBUG_MESSAGE_LENGTH = 0x9143, + GL_MAX_DEBUG_LOGGED_MESSAGES = 0x9144, + GL_DEBUG_LOGGED_MESSAGES = 0x9145, + GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH = 0x8243, + GL_MAX_DEBUG_GROUP_STACK_DEPTH = 0x826C, + GL_DEBUG_GROUP_STACK_DEPTH = 0x826D, + GL_MAX_LABEL_LENGTH = 0x82E8; + + /** Tokens accepted by the <pname> parameter of GetPointerv: */ + int GL_DEBUG_CALLBACK_FUNCTION = 0x8244, + GL_DEBUG_CALLBACK_USER_PARAM = 0x8245; + + /** + * Tokens accepted or provided by the <source> parameters of + * DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <sources> + * parameter of GetDebugMessageLog: + */ + int GL_DEBUG_SOURCE_API = 0x8246, + GL_DEBUG_SOURCE_WINDOW_SYSTEM = 0x8247, + GL_DEBUG_SOURCE_SHADER_COMPILER = 0x8248, + GL_DEBUG_SOURCE_THIRD_PARTY = 0x8249, + GL_DEBUG_SOURCE_APPLICATION = 0x824A, + GL_DEBUG_SOURCE_OTHER = 0x824B; + + /** + * Tokens accepted or provided by the <type> parameters of + * DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <types> + * parameter of GetDebugMessageLog: + */ + int GL_DEBUG_TYPE_ERROR = 0x824C, + GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR = 0x824D, + GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR = 0x824E, + GL_DEBUG_TYPE_PORTABILITY = 0x824F, + GL_DEBUG_TYPE_PERFORMANCE = 0x8250, + GL_DEBUG_TYPE_OTHER = 0x8251, + GL_DEBUG_TYPE_MARKER = 0x8268; + + /** + * Tokens accepted or provided by the <type> parameters of + * DebugMessageControl and DEBUGPROC, and the <types> parameter of + * GetDebugMessageLog: + */ + int GL_DEBUG_TYPE_PUSH_GROUP = 0x8269, + GL_DEBUG_TYPE_POP_GROUP = 0x826A; + + /** + * Tokens accepted or provided by the <severity> parameters of + * DebugMessageControl, DebugMessageInsert and DEBUGPROC callback functions, + * and the <severities> parameter of GetDebugMessageLog: + */ + int GL_DEBUG_SEVERITY_HIGH = 0x9146, + GL_DEBUG_SEVERITY_MEDIUM = 0x9147, + GL_DEBUG_SEVERITY_LOW = 0x9148, + GL_DEBUG_SEVERITY_NOTIFICATION = 0x826B; + + /** Returned by GetError: */ + int GL_STACK_UNDERFLOW = 0x0504, + GL_STACK_OVERFLOW = 0x0503; + + /** + * Tokens accepted or provided by the <identifier> parameters of + * ObjectLabel and GetObjectLabel: + */ + int GL_BUFFER = 0x82E0, + GL_SHADER = 0x82E1, + GL_PROGRAM = 0x82E2, + GL_QUERY = 0x82E3, + GL_PROGRAM_PIPELINE = 0x82E4, + GL_SAMPLER = 0x82E6, + GL_DISPLAY_LIST = 0x82E7; + + // ----------------------------- + + void glDebugMessageControl(@GLenum int source, + @GLenum int type, + @GLenum int severity, + @AutoSize(value = "ids", canBeNull = true) @GLsizei int count, + @Check(canBeNull = true) @Const @GLuint IntBuffer ids, + boolean enabled); + + void glDebugMessageInsert(@GLenum int source, + @GLenum int type, + @GLuint int id, + @GLenum int severity, + @AutoSize("buf") @GLsizei int length, + @Const @GLchar ByteBuffer buf); + + @Alternate("glDebugMessageInsert") + void glDebugMessageInsert(@GLenum int source, + @GLenum int type, + @GLuint int id, + @GLenum int severity, + @Constant("buf.length()") @GLsizei int length, + CharSequence buf); + + /** + * The {@code KHRDebugCallback.Handler} implementation passed to this method will be used for + * KHR_debug messages. If callback is null, any previously registered handler for the current + * thread will be unregistered and stop receiving messages. + * + * @param callback the callback function to use + */ + @Code( + // Create a GlobalRef to the callback object and register it with the current context. + javaBeforeNative = "\t\tlong userParam = callback == null ? 0 : CallbackUtil.createGlobalRef(callback.getHandler());\n" + + "\t\tCallbackUtil.registerContextCallbackKHR(userParam);" + ) + void glDebugMessageCallback(@PointerWrapper(value = "GLDEBUGPROC", canBeNull = true) KHRDebugCallback callback, + @Constant("userParam") @PointerWrapper("GLvoid *") long userParam); + + @GLuint + int glGetDebugMessageLog(@GLuint int count, + @AutoSize(value = "messageLog", canBeNull = true) @GLsizei int bufsize, + @Check(value = "count", canBeNull = true) @GLenum IntBuffer sources, + @Check(value = "count", canBeNull = true) @GLenum IntBuffer types, + @Check(value = "count", canBeNull = true) @GLuint IntBuffer ids, + @Check(value = "count", canBeNull = true) @GLenum IntBuffer severities, + @Check(value = "count", canBeNull = true) @GLsizei IntBuffer lengths, + @Check(canBeNull = true) @OutParameter @GLchar ByteBuffer messageLog); + + // Not really useful and a pain to implement in Java + // void glGetPointerv(@GLenum int pname, void** params); + + void glPushDebugGroup(@GLenum int source, @GLuint int id, @AutoSize("message") @GLsizei int length, + @Const @GLchar ByteBuffer message); + + @Alternate("glPushDebugGroup") + void glPushDebugGroup(@GLenum int source, @GLuint int id, @Constant("message.length()") @GLsizei int length, + CharSequence message); + + void glPopDebugGroup(); + + void glObjectLabel(@GLenum int identifier, @GLuint int name, @AutoSize(value = "label", canBeNull = true) @GLsizei int length, + @Check(canBeNull = true) @Const @GLchar ByteBuffer label); + + @Alternate("glObjectLabel") + void glObjectLabel(@GLenum int identifier, @GLuint int name, @Constant("label.length()") @GLsizei int length, + CharSequence label); + + void glGetObjectLabel(@GLenum int identifier, @GLuint int name, @AutoSize("label") @GLsizei int bufSize, + @OutParameter @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length, + @OutParameter @GLchar ByteBuffer label); + + @Alternate("glGetObjectLabel") + @GLreturn(value = "label", maxLength = "bufSize") + void glGetObjectLabel2(@GLenum int identifier, @GLuint int name, @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(label_length)") IntBuffer length, + @OutParameter @GLchar ByteBuffer label); + + void glObjectPtrLabel(@PointerWrapper("GLvoid *") org.lwjgl.PointerWrapper ptr, @AutoSize(value = "label", canBeNull = true) @GLsizei int length, + @Check(canBeNull = true) @Const @GLchar ByteBuffer label); + + @Alternate("glObjectPtrLabel") + void glObjectPtrLabel(@PointerWrapper("GLvoid *") org.lwjgl.PointerWrapper ptr, @Constant("label.length()") @GLsizei int length, + CharSequence label); + + void glGetObjectPtrLabel(@PointerWrapper("GLvoid *") org.lwjgl.PointerWrapper ptr, @AutoSize("label") @GLsizei int bufSize, + @OutParameter @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length, + @OutParameter @GLchar ByteBuffer label); + + @Alternate("glGetObjectPtrLabel") + @GLreturn(value = "label", maxLength = "bufSize") + void glGetObjectPtrLabel2(@PointerWrapper("GLvoid *") org.lwjgl.PointerWrapper ptr, @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(label_length)") IntBuffer length, + @OutParameter @GLchar ByteBuffer label); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/KHR_texture_compression_astc_ldr.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/KHR_texture_compression_astc_ldr.java new file mode 100644 index 0000000..b6fb69f --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/KHR_texture_compression_astc_ldr.java @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface KHR_texture_compression_astc_ldr { + + /** + * Accepted by the <internalformat> parameter of CompressedTexImage2D, + * CompressedTexSubImage2D, TexStorage2D, TextureStorage2D, TexStorage3D, + * and TextureStorage3D: + */ + int GL_COMPRESSED_RGBA_ASTC_4x4_KHR = 0x93B0, + GL_COMPRESSED_RGBA_ASTC_5x4_KHR = 0x93B1, + GL_COMPRESSED_RGBA_ASTC_5x5_KHR = 0x93B2, + GL_COMPRESSED_RGBA_ASTC_6x5_KHR = 0x93B3, + GL_COMPRESSED_RGBA_ASTC_6x6_KHR = 0x93B4, + GL_COMPRESSED_RGBA_ASTC_8x5_KHR = 0x93B5, + GL_COMPRESSED_RGBA_ASTC_8x6_KHR = 0x93B6, + GL_COMPRESSED_RGBA_ASTC_8x8_KHR = 0x93B7, + GL_COMPRESSED_RGBA_ASTC_10x5_KHR = 0x93B8, + GL_COMPRESSED_RGBA_ASTC_10x6_KHR = 0x93B9, + GL_COMPRESSED_RGBA_ASTC_10x8_KHR = 0x93BA, + GL_COMPRESSED_RGBA_ASTC_10x10_KHR = 0x93BB, + GL_COMPRESSED_RGBA_ASTC_12x10_KHR = 0x93BC, + GL_COMPRESSED_RGBA_ASTC_12x12_KHR = 0x93BD, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR = 0x93D0, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR = 0x93D1, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR = 0x93D2, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR = 0x93D3, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR = 0x93D4, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR = 0x93D5, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR = 0x93D6, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR = 0x93D7, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR = 0x93D8, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR = 0x93D9, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR = 0x93DA, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR = 0x93DB, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR = 0x93DC, + GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR = 0x93DD; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_EGL_stream_consumer_external.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_EGL_stream_consumer_external.java new file mode 100644 index 0000000..1054e2c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_EGL_stream_consumer_external.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2002-2008 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface NV_EGL_stream_consumer_external { + + /** Accepted as a target in the <target> parameter of BindTexture: */ + int GL_TEXTURE_EXTERNAL_OES = 0x8D65; + + /** Returned in the <type> parameter of GetActiveUniform: */ + int GL_SAMPLER_EXTERNAL_OES = 0x8D66; + + /** Accepted as <value> in GetIntegerv() and GetFloatv() queries: */ + int GL_TEXTURE_BINDING_EXTERNAL_OES = 0x8D67; + + /** Accepted as <value> in GetTexParameter*() queries: */ + int GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES = 0x8D68; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_coverage_sample.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_coverage_sample.java new file mode 100644 index 0000000..ce14ca6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_coverage_sample.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.opengl.GLenum; + +public interface NV_coverage_sample { + + /** + * Accepted by the <attrib_list> parameter of eglChooseConfig + * and eglCreatePbufferSurface, and by the <attribute> + * parameter of eglGetConfigAttrib: + */ + int EGL_COVERAGE_BUFFERS_NV = 0x30E0, + EGL_COVERAGE_SAMPLES_NV = 0x30E1; + + /** + * Accepted by the <internalformat> parameter of + * RenderbufferStorageEXT and the <format> parameter of ReadPixels: + */ + int GL_COVERAGE_COMPONENT_NV = 0x8522; + + /** + * Accepted by the <internalformat> parameter of + * RenderbufferStorageEXT: + */ + int GL_COVERAGE_COMPONENT4_NV = 0x8523; + + /** Accepted by the <operation> parameter of CoverageOperationNV: */ + int GL_COVERAGE_ALL_FRAGMENTS_NV = 0x8524, + GL_COVERAGE_EDGE_FRAGMENTS_NV = 0x8525, + GL_COVERAGE_AUTOMATIC_NV = 0x8526; + + /** + * Accepted by the <attachment> parameter of + * FramebufferRenderbuffer, and GetFramebufferAttachmentParameteriv: + */ + int GL_COVERAGE_ATTACHMENT_NV = 0x8527; + + /** Accepted by the <buf> parameter of Clear: */ + int GL_COVERAGE_BUFFER_BIT_NV = 0x8000; + + /** Accepted by the <pname> parameter of GetIntegerv: */ + int GL_COVERAGE_BUFFERS_NV = 0x8528, + GL_COVERAGE_SAMPLES_NV = 0x8529; + + void glCoverageMaskNV(boolean mask); + + void glCoverageOperationNV(@GLenum int operation); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_depth_nonlinear.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_depth_nonlinear.java new file mode 100644 index 0000000..83663f4 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_depth_nonlinear.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface NV_depth_nonlinear { + + /** + * Accepted as a valid sized internal format by all functions accepting + * sized internal formats with a base format of DEPTH_COMPONENT: + */ + int GL_DEPTH_COMPONENT16_NONLINEAR_NV = 0x8553; + + /** + * Accepted by the <attrib_list> parameter of eglChooseConfig, + * and by the <attribute> parameter of eglGetConfigAttrib: + */ + int EGL_DEPTH_ENCODING_NV = 0x30E2; + + /** + * Accepted as a value in the <attrib_list> parameter of eglChooseConfig + * and eglCreatePbufferSurface, and returned in the <value> parameter + * of eglGetConfigAttrib: + */ + int EGL_DEPTH_ENCODING_NONE_NV = 0, + EGL_DEPTH_ENCODING_NONLINEAR_NV = 0x30E3; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_draw_buffers.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_draw_buffers.java new file mode 100644 index 0000000..6550106 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_draw_buffers.java @@ -0,0 +1,90 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.AutoSize; +import org.lwjgl.util.generator.Const; +import org.lwjgl.util.generator.Constant; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; + +import java.nio.IntBuffer; + +public interface NV_draw_buffers { + + /** + * Accepted by the <pname> parameters of GetIntegerv, GetFloatv, + * and GetDoublev: + */ + int GL_MAX_DRAW_BUFFERS_NV = 0x8824, + GL_DRAW_BUFFER0_NV = 0x8825, + GL_DRAW_BUFFER1_NV = 0x8826, + GL_DRAW_BUFFER2_NV = 0x8827, + GL_DRAW_BUFFER3_NV = 0x8828, + GL_DRAW_BUFFER4_NV = 0x8829, + GL_DRAW_BUFFER5_NV = 0x882A, + GL_DRAW_BUFFER6_NV = 0x882B, + GL_DRAW_BUFFER7_NV = 0x882C, + GL_DRAW_BUFFER8_NV = 0x882D, + GL_DRAW_BUFFER9_NV = 0x882E, + GL_DRAW_BUFFER10_NV = 0x882F, + GL_DRAW_BUFFER11_NV = 0x8830, + GL_DRAW_BUFFER12_NV = 0x8831, + GL_DRAW_BUFFER13_NV = 0x8832, + GL_DRAW_BUFFER14_NV = 0x8833, + GL_DRAW_BUFFER15_NV = 0x8834; + + /** Accepted by the <bufs> parameter of DrawBuffersNV: */ + int GL_COLOR_ATTACHMENT0_NV = 0x8CE0, + GL_COLOR_ATTACHMENT1_NV = 0x8CE1, + GL_COLOR_ATTACHMENT2_NV = 0x8CE2, + GL_COLOR_ATTACHMENT3_NV = 0x8CE3, + GL_COLOR_ATTACHMENT4_NV = 0x8CE4, + GL_COLOR_ATTACHMENT5_NV = 0x8CE5, + GL_COLOR_ATTACHMENT6_NV = 0x8CE6, + GL_COLOR_ATTACHMENT7_NV = 0x8CE7, + GL_COLOR_ATTACHMENT8_NV = 0x8CE8, + GL_COLOR_ATTACHMENT9_NV = 0x8CE9, + GL_COLOR_ATTACHMENT10_NV = 0x8CEA, + GL_COLOR_ATTACHMENT11_NV = 0x8CEB, + GL_COLOR_ATTACHMENT12_NV = 0x8CEC, + GL_COLOR_ATTACHMENT13_NV = 0x8CED, + GL_COLOR_ATTACHMENT14_NV = 0x8CEE, + GL_COLOR_ATTACHMENT15_NV = 0x8CEF; + + void glDrawBuffersNV(@AutoSize("bufs") @GLsizei int n, @Const @GLenum IntBuffer bufs); + + @Alternate("glDrawBuffersNV") + void glDrawBuffersNV(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(buf)", keepParam = true) int buf); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_draw_path.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_draw_path.java new file mode 100644 index 0000000..3c26e56 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_draw_path.java @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.AutoSize; +import org.lwjgl.util.generator.Check; +import org.lwjgl.util.generator.Const; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.ByteBuffer; +import java.nio.FloatBuffer; + +public interface NV_draw_path { + + /** Accepted as the <paramType> parameter of PathParameterNV: */ + int GL_PATH_QUALITY_NV = 0x8ED8, + GL_FILL_RULE_NV = 0x8ED9, + GL_STROKE_CAP0_STYLE_NV = 0x8EE0, + GL_STROKE_CAP1_STYLE_NV = 0x8EE1, + GL_STROKE_CAP2_STYLE_NV = 0x8EE2, + GL_STROKE_CAP3_STYLE_NV = 0x8EE3, + GL_STROKE_JOIN_STYLE_NV = 0x8EE8, + GL_STROKE_MITER_LIMIT_NV = 0x8EE9; + + /** Values for the ILL_RULE_NV path parameter: */ + int GL_EVEN_ODD_NV = 0x8EF0, + GL_NON_ZERO_NV = 0x8EF1; + + /** Values for the CAP[0-3]_STYLE_NV path parameter: */ + int GL_CAP_BUTT_NV = 0x8EF4, + GL_CAP_ROUND_NV = 0x8EF5, + GL_CAP_SQUARE_NV = 0x8EF6, + GL_CAP_TRIANGLE_NV = 0x8EF7; + + /** Values for the JOIN_STYLE_NV path parameter: */ + int GL_JOIN_MITER_NV = 0x8EFC, + GL_JOIN_ROUND_NV = 0x8EFD, + GL_JOIN_BEVEL_NV = 0x8EFE, + GL_JOIN_CLIPPED_MITER_NV = 0x8EFF; + + /** Accepted as the <target> parameter of PathMatrixNV: */ + int GL_MATRIX_PATH_TO_CLIP_NV = 0x8F04, + GL_MATRIX_STROKE_TO_PATH_NV = 0x8F05, + GL_MATRIX_PATH_COORD0_NV = 0x8F08, + GL_MATRIX_PATH_COORD1_NV = 0x8F09, + GL_MATRIX_PATH_COORD2_NV = 0x8F0A, + GL_MATRIX_PATH_COORD3_NV = 0x8F0B; + + /** Accepted as the <mode> parameter of DrawPathbufferNV: */ + int GL_FILL_PATH_NV = 0x8F18, + GL_STROKE_PATH_NV = 0x8F19; + + /** Accepted as path commands by CreatePathNV: */ + byte GL_MOVE_TO_NV = 0x00, + GL_LINE_TO_NV = 0x01, + GL_QUADRATIC_BEZIER_TO_NV = 0x02, + GL_CUBIC_BEZIER_TO_NV = 0x03, + GL_START_MARKER_NV = 0x20, + GL_CLOSE_NV = 0x21, + GL_STROKE_CAP0_NV = 0x40, + GL_STROKE_CAP1_NV = 0x41, + GL_STROKE_CAP2_NV = 0x42, + GL_STROKE_CAP3_NV = 0x43; + + @GLuint + int glCreatePathNV(@GLenum int datatype, @AutoSize("commands") @GLsizei int numCommands, @Const @GLubyte ByteBuffer commands); + + void glDeletePathNV(@GLuint int path); + + void glPathVerticesNV(@GLuint int path, @Const @Check @GLvoid ByteBuffer vertices); + + void glPathParameterfNV(@GLuint int path, @GLenum int paramType, float param); + + void glPathParameteriNV(@GLuint int path, @GLenum int paramType, int param); + + @GLuint + int glCreatePathProgramNV(); + + void glPathMatrixNV(@GLenum int target, @Const @Check("16") FloatBuffer value); + + void glDrawPathNV(@GLuint int path, @GLenum int mode); + + @GLuint + int glCreatePathbufferNV(@GLsizei int capacity); + + void glDeletePathbufferNV(@GLuint int buffer); + + void glPathbufferPathNV(@GLuint int buffer, int index, @GLuint int path); + + void glPathbufferPositionNV(@GLuint int buffer, int index, float x, float y); + + void glDrawPathbufferNV(@GLuint int buffer, @GLenum int mode); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_draw_texture.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_draw_texture.java new file mode 100644 index 0000000..cd22e66 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_draw_texture.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.opengl.GLfloat; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface NV_draw_texture { + + void glDrawTextureNV(@GLuint int texture, @GLuint int sampler, + @GLfloat float x0, @GLfloat float y0, + @GLfloat float x1, @GLfloat float y1, + @GLfloat float z, + @GLfloat float s0, @GLfloat float t0, + @GLfloat float s1, @GLfloat float t1); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_fbo_color_attachments.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_fbo_color_attachments.java new file mode 100644 index 0000000..3ec8062 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_fbo_color_attachments.java @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface NV_fbo_color_attachments { + + int GL_MAX_COLOR_ATTACHMENTS_NV = 0x8CDF, + GL_COLOR_ATTACHMENT0_NV = 0x8CE0, + GL_COLOR_ATTACHMENT1_NV = 0x8CE1, + GL_COLOR_ATTACHMENT2_NV = 0x8CE2, + GL_COLOR_ATTACHMENT3_NV = 0x8CE3, + GL_COLOR_ATTACHMENT4_NV = 0x8CE4, + GL_COLOR_ATTACHMENT5_NV = 0x8CE5, + GL_COLOR_ATTACHMENT6_NV = 0x8CE6, + GL_COLOR_ATTACHMENT7_NV = 0x8CE7, + GL_COLOR_ATTACHMENT8_NV = 0x8CE8, + GL_COLOR_ATTACHMENT9_NV = 0x8CE9, + GL_COLOR_ATTACHMENT10_NV = 0x8CEA, + GL_COLOR_ATTACHMENT11_NV = 0x8CEB, + GL_COLOR_ATTACHMENT12_NV = 0x8CEC, + GL_COLOR_ATTACHMENT13_NV = 0x8CED, + GL_COLOR_ATTACHMENT14_NV = 0x8CEE, + GL_COLOR_ATTACHMENT15_NV = 0x8CEF; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_fence.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_fence.java new file mode 100644 index 0000000..8f7eca6 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_fence.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLreturn; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.IntBuffer; + +public interface NV_fence { + + /** Accepted by the <condition> parameter of SetFenceNV: */ + int GL_ALL_COMPLETED_NV = 0x84F2; + + /** Accepted by the <pname> parameter of GetFenceivNV: */ + int GL_FENCE_STATUS_NV = 0x84F3, + GL_FENCE_CONDITION_NV = 0x84F4; + + void glGenFencesNV(@AutoSize("fences") @GLsizei int n, @OutParameter @GLuint IntBuffer fences); + + @Alternate("glGenFencesNV") + @GLreturn("fences") + void glGenFencesNV2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer fences); + + void glDeleteFencesNV(@AutoSize("fences") @GLsizei int n, @Const @GLuint IntBuffer fences); + + @Alternate("glDeleteFencesNV") + void glDeleteFencesNV(@Constant("1") @GLsizei int n, @Const @GLuint @Constant(value = "APIUtil.getInt(fence)", keepParam = true) int fence); + + void glSetFenceNV(@GLuint int fence, @GLenum int condition); + + boolean glTestFenceNV(@GLuint int fence); + + void glFinishFenceNV(@GLuint int fence); + + boolean glIsFenceNV(@GLuint int fence); + + void glGetFenceivNV(@GLuint int fence, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_framebuffer_vertex_attrib_array.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_framebuffer_vertex_attrib_array.java new file mode 100644 index 0000000..0a7101c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_framebuffer_vertex_attrib_array.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.opengl.*; + +public interface NV_framebuffer_vertex_attrib_array { + + int GL_FRAMEBUFFER_ATTACHABLE_NV = 0x852A, + GL_VERTEX_ATTRIB_ARRAY_NV = 0x852B, + GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_SIZE_NV = 0x852C, + GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_TYPE_NV = 0x852D, + GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_NORMALIZED_NV = 0x852E, + GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_OFFSET_NV = 0x852F, + GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_WIDTH_NV = 0x8530, + GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_STRIDE_NV = 0x8531, + GL_FRAMEBUFFER_ATTACHMENT_VERTEX_ATTRIB_ARRAY_HEIGHT_NV = 0x8532; + + void glFramebufferVertexAttribArrayNV(@GLenum int target, @GLenum int attachment, + @GLenum int buffertarget, @GLuint int bufferobject, + @GLint int size, @GLenum int type, @GLboolean boolean normalized, @GLintptr long offset, + @GLsizeiptr long width, @GLsizeiptr long height, @GLsizei int stride); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_get_tex_image.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_get_tex_image.java new file mode 100644 index 0000000..371dd94 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_get_tex_image.java @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.Alternate; +import org.lwjgl.util.generator.Check; +import org.lwjgl.util.generator.OutParameter; +import org.lwjgl.util.generator.StripPostfix; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.Buffer; +import java.nio.ByteBuffer; +import java.nio.FloatBuffer; +import java.nio.IntBuffer; + +public interface NV_get_tex_image { + + int GL_TEXTURE_WIDTH_NV = 0x1000, + GL_TEXTURE_HEIGHT_NV = 0x1001, + GL_TEXTURE_INTERNAL_FORMAT_NV = 0x1003, + GL_TEXTURE_COMPONENTS_NV = GL_TEXTURE_INTERNAL_FORMAT_NV, + GL_TEXTURE_BORDER_NV = 0x1005, + GL_TEXTURE_RED_SIZE_NV = 0x805C, + GL_TEXTURE_GREEN_SIZE_NV = 0x805D, + GL_TEXTURE_BLUE_SIZE_NV = 0x805E, + GL_TEXTURE_ALPHA_SIZE_NV = 0x805F, + GL_TEXTURE_LUMINANCE_SIZE_NV = 0x8060, + GL_TEXTURE_INTENSITY_SIZE_NV = 0x8061, + GL_TEXTURE_DEPTH_NV = 0x8071, + GL_TEXTURE_COMPRESSED_IMAGE_SIZE_NV = 0x86A0, + GL_TEXTURE_COMPRESSED_NV = 0x86A1, + GL_TEXTURE_DEPTH_SIZE_NV = 0x884A; + + void glGetTexImageNV(@GLenum int target, @GLint int level, @GLenum int format, @GLenum int type, + @OutParameter + @Check("GLChecks.calculateImageStorage(img, format, type, 1, 1, 1)") + @GLbyte + @GLshort + @GLint + @GLfloat Buffer img); + + void glGetCompressedTexImageNV(@GLenum int target, @GLint int level, @OutParameter @Check @GLvoid ByteBuffer img); + + @StripPostfix("params") + void glGetTexLevelParameterfvNV(@GLenum int target, @GLint int level, @GLenum int pname, @OutParameter @Check("1") @GLfloat FloatBuffer params); + + @Alternate("glGetTexLevelParameterfvNV") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetTexLevelParameterfvNV2(@GLenum int target, @GLint int level, @GLenum int pname, @OutParameter @GLfloat FloatBuffer params); + + @StripPostfix("params") + void glGetTexLevelParameterivNV(@GLenum int target, @GLint int level, @GLenum int pname, @OutParameter @Check("1") @GLint IntBuffer params); + + @Alternate("glGetTexLevelParameterivNV") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetTexLevelParameterivNV2(@GLenum int target, @GLint int level, @GLenum int pname, @OutParameter @GLint IntBuffer params); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_platform_binary.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_platform_binary.java new file mode 100644 index 0000000..9e409e1 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_platform_binary.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface NV_platform_binary { + + /** Accepted by the <binaryformat> parameter of ShaderBinary: */ + int GL_NVIDIA_PLATFORM_BINARY_NV = 0x890B; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_read_buffer.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_read_buffer.java new file mode 100644 index 0000000..6d577bc --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_read_buffer.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.opengl.GLenum; + +public interface NV_read_buffer { + + int GL_READ_BUFFER_NV = 0x0C02, + GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_NV = 0x8CDC; + + void glReadBufferNV(@GLenum int mode); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_read_depth_stencil.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_read_depth_stencil.java new file mode 100644 index 0000000..f3f8585 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_read_depth_stencil.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface NV_read_depth_stencil { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_shader_framebuffer_fetch.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_shader_framebuffer_fetch.java new file mode 100644 index 0000000..7df7a34 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_shader_framebuffer_fetch.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface NV_shader_framebuffer_fetch { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_system_time.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_system_time.java new file mode 100644 index 0000000..3fa5724 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_system_time.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.opengl.EGLuint64NV; + +public interface NV_system_time { + + @EGLuint64NV + long glGetSystemTimeFrequencyNV(); + + @EGLuint64NV + long glGetSystemTimeNV(); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_texture_compression_s3tc_update.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_texture_compression_s3tc_update.java new file mode 100644 index 0000000..d44c540 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_texture_compression_s3tc_update.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface NV_texture_compression_s3tc_update { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_texture_npot_2D_mipmap.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_texture_npot_2D_mipmap.java new file mode 100644 index 0000000..1451ed7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/NV_texture_npot_2D_mipmap.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface NV_texture_npot_2D_mipmap { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_EGL_image.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_EGL_image.java new file mode 100644 index 0000000..4ce3435 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_EGL_image.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.PointerWrapper; +import org.lwjgl.util.generator.opengl.GLenum; + +public interface OES_EGL_image { + + void glEGLImageTargetTexture2DOES(@GLenum int target, @PointerWrapper("GLeglImageOES") EGLImageOES image); + + void glEGLImageTargetRenderbufferStorageOES(@GLenum int target, @PointerWrapper("GLeglImageOES") EGLImageOES image); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_EGL_image_external.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_EGL_image_external.java new file mode 100644 index 0000000..298750e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_EGL_image_external.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.PointerWrapper; +import org.lwjgl.util.generator.opengl.GLenum; + +public interface OES_EGL_image_external { + + /** + * Accepted as a target in the <target> parameter of BindTexture and + * EGLImageTargetTexture2DOES: + */ + int GL_TEXTURE_EXTERNAL_OES = 0x8D65; + + /** Returned in the <type> parameter of GetActiveUniform: */ + int GL_SAMPLER_EXTERNAL_OES = 0x8D66; + + /** Accepted as <value> in GetIntegerv() and GetFloatv() queries: */ + int GL_TEXTURE_BINDING_EXTERNAL_OES = 0x8D67; + + /** Accepted as <value> in GetTexParameter*() queries: */ + int GL_REQUIRED_TEXTURE_IMAGE_UNITS_OES = 0x8D68; + + void glEGLImageTargetTexture2DOES(@GLenum int target, @PointerWrapper("GLeglImageOES") EGLImageOES image); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_EGL_sync.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_EGL_sync.java new file mode 100644 index 0000000..15aa271 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_EGL_sync.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.Alias; + +@Alias("OES_egl_sync") +public interface OES_EGL_sync { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_blend_equation_separate.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_blend_equation_separate.java new file mode 100644 index 0000000..dbc5fe7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_blend_equation_separate.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.opengl.GLenum; + +public interface OES_blend_equation_separate { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, and + * GetFloatv: + */ + int GL_BLEND_EQUATION_RGB_OES = 0x8009, + GL_BLEND_EQUATION_ALPHA_OES = 0x883D; + + void glBlendEquationSeparateOES(@GLenum int modeRGB, @GLenum int modeAlpha); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_blend_func_separate.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_blend_func_separate.java new file mode 100644 index 0000000..b5e2478 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_blend_func_separate.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.opengl.GLenum; + +public interface OES_blend_func_separate { + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, and + * GetFloatv: + */ + int GL_BLEND_DST_RGB_OES = 0x80C8, + BLEND_SRC_RGB_OES = 0x80C9, + BLEND_DST_ALPHA_OES = 0x80CA, + BLEND_SRC_ALPHA_OES = 0x80CB; + + void glBlendFuncSeparateOES(@GLenum int sfactorRGB, + @GLenum int dfactorRGB, + @GLenum int sfactorAlpha, + @GLenum int dfactorAlpha); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_blend_subtract.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_blend_subtract.java new file mode 100644 index 0000000..4cb2574 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_blend_subtract.java @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.opengl.GLenum; + +public interface OES_blend_subtract { + + /** Accepted by the <mode> parameter of BlendEquationOES: */ + int GL_FUNC_ADD_OES = 0x8006, + GL_FUNC_SUBTRACT_OES = 0x800A, + GL_FUNC_REVERSE_SUBTRACT_OES = 0x800B; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, + * and GetFloatv: + */ + int GL_BLEND_EQUATION_OES = 0x8009; + + void glBlendEquationOES(@GLenum int mode); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_compressed_ETC1_RGB8_texture.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_compressed_ETC1_RGB8_texture.java new file mode 100644 index 0000000..4f56125 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_compressed_ETC1_RGB8_texture.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface OES_compressed_ETC1_RGB8_texture { + + /** Accepted by the <internalformat> parameter of CompressedTexImage2D: */ + int GL_ETC1_RGB8_OES = 0x8D64; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_compressed_paletted_texture.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_compressed_paletted_texture.java new file mode 100644 index 0000000..cb627d7 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_compressed_paletted_texture.java @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface OES_compressed_paletted_texture { + + /** Accepted by the <internalformat> paramter of CompressedTexImage2D */ + int GL_PALETTE4_RGB8_OES = 0x8B90, + GL_PALETTE4_RGBA8_OES = 0x8B91, + GL_PALETTE4_R5_G6_B5_OES = 0x8B92, + GL_PALETTE4_RGBA4_OES = 0x8B93, + GL_PALETTE4_RGB5_A1_OES = 0x8B94, + GL_PALETTE8_RGB8_OES = 0x8B95, + GL_PALETTE8_RGBA8_OES = 0x8B96, + GL_PALETTE8_R5_G6_B5_OES = 0x8B97, + GL_PALETTE8_RGBA4_OES = 0x8B98, + GL_PALETTE8_RGB5_A1_OES = 0x8B99; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_depth24.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_depth24.java new file mode 100644 index 0000000..7fc3b67 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_depth24.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface OES_depth24 { + + /** Accepted by the <internalformat> parameter of RenderbufferStorageOES: */ + int GL_DEPTH_COMPONENT24_OES = 0x81A6; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_depth32.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_depth32.java new file mode 100644 index 0000000..18f5c1a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_depth32.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface OES_depth32 { + + /** Accepted by the <internalformat> parameter of RenderbufferStorageOES: */ + int GL_DEPTH_COMPONENT32_OES = 0x81A7; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_depth_texture.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_depth_texture.java new file mode 100644 index 0000000..1f2234c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_depth_texture.java @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface OES_depth_texture { + + /** + * Accepted by the <format> parameter of TexImage2D and TexSubImage2D and + * <internalFormat> parameter of TexImage2D: + */ + int GL_DEPTH_COMPONENT = 0x1902; + + /** Accepted by the <type> parameter of TexImage2D, TexSubImage2D: */ + int GL_UNSIGNED_SHORT = 0x1403, + GL_UNSIGNED_INT = 0x1405; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_element_index_uint.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_element_index_uint.java new file mode 100644 index 0000000..b01f497 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_element_index_uint.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface OES_element_index_uint { + + /** Accepted by the <type> parameter of DrawElements: */ + int GL_UNSIGNED_INT = 0x1405; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_fbo_render_mipmap.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_fbo_render_mipmap.java new file mode 100644 index 0000000..9328494 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_fbo_render_mipmap.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface OES_fbo_render_mipmap { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_framebuffer_object.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_framebuffer_object.java new file mode 100644 index 0000000..22d1523 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_framebuffer_object.java @@ -0,0 +1,198 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLreturn; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.IntBuffer; + +public interface OES_framebuffer_object { + + /** + * Accepted by the <target> parameter of BindFramebufferOES, + * CheckFramebufferStatusOES, FramebufferTexture{2D|3D}OES, + * FramebufferRenderbufferOES, and + * GetFramebufferAttachmentParameterivOES: + */ + int GL_FRAMEBUFFER_OES = 0x8D40; + + /** + * Accepted by the <target> parameter of BindRenderbufferOES, + * RenderbufferStorageOES, and GetRenderbufferParameterivOES, and + * returned by GetFramebufferAttachmentParameterivOES: + */ + int GL_RENDERBUFFER_OES = 0x8D41; + + /** + * Accepted by the <internalformat> parameter of + * RenderbufferStorageOES: + */ + int GL_DEPTH_COMPONENT16_OES = 0x81A5, + GL_RGBA4_OES = 0x8056, + GL_RGB5_A1_OES = 0x8057, + GL_RGB565_OES = 0x8D62, + GL_STENCIL_INDEX1_OES = 0x8D46, + GL_STENCIL_INDEX4_OES = 0x8D47, + GL_STENCIL_INDEX8_OES = 0x8D48; + + /** Accepted by the <pname> parameter of GetRenderbufferParameterivOES: */ + int GL_RENDERBUFFER_WIDTH_OES = 0x8D42, + GL_RENDERBUFFER_HEIGHT_OES = 0x8D43, + GL_RENDERBUFFER_INTERNAL_FORMAT_OES = 0x8D44, + GL_RENDERBUFFER_RED_SIZE_OES = 0x8D50, + GL_RENDERBUFFER_GREEN_SIZE_OES = 0x8D51, + GL_RENDERBUFFER_BLUE_SIZE_OES = 0x8D52, + GL_RENDERBUFFER_ALPHA_SIZE_OES = 0x8D53, + GL_RENDERBUFFER_DEPTH_SIZE_OES = 0x8D54, + GL_RENDERBUFFER_STENCIL_SIZE_OES = 0x8D55; + + /** + * Accepted by the <pname> parameter of + * GetFramebufferAttachmentParameterivOES: + */ + int GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES = 0x8CD0, + GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_OES = 0x8CD1, + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_OES = 0x8CD2, + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_OES = 0x8CD3, + GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_OES = 0x8CD4; + + /** + * Accepted by the <attachment> parameter of + * FramebufferTexture{2D|3D}OES, FramebufferRenderbufferOES, and + * GetFramebufferAttachmentParameterivOES + */ + int GL_COLOR_ATTACHMENT0_OES = 0x8CE0, + GL_DEPTH_ATTACHMENT_OES = 0x8D00, + GL_STENCIL_ATTACHMENT_OES = 0x8D20; + + /** + * Returned by GetFramebufferAttachmentParameterivOES when the + * <pname> parameter is FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_OES: + */ + int GL_NONE_OES = 0; + + /** Returned by CheckFramebufferStatusOES(): */ + int GL_FRAMEBUFFER_COMPLETE_OES = 0x8CD5, + GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_OES = 0x8CD6, + GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_OES = 0x8CD7, + GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_OES = 0x8CD9, + GL_FRAMEBUFFER_INCOMPLETE_FORMATS_OES = 0x8CDA, + GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_OES = 0x8CDB, + GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_OES = 0x8CDC, + GL_FRAMEBUFFER_UNSUPPORTED_OES = 0x8CDD; + + /** Accepted by GetIntegerv(): */ + int GL_FRAMEBUFFER_BINDING_OES = 0x8CA6, + GL_RENDERBUFFER_BINDING_OES = 0x8CA7, + GL_MAX_RENDERBUFFER_SIZE_OES = 0x84E8; + + /** Returned by GetError(): */ + int GL_INVALID_FRAMEBUFFER_OPERATION_OES = 0x0506; + + boolean glIsRenderbufferOES(@GLuint int renderbuffer); + + void glBindRenderbufferOES(@GLenum int target, @GLuint int renderbuffer); + + void glDeleteRenderbuffersOES(@AutoSize("renderbuffers") int n, @Const @GLuint IntBuffer renderbuffers); + + @Alternate("glDeleteRenderbuffersOES") + void glDeleteRenderbuffersOES(@Constant("1") int n, @Constant(value = "APIUtil.getInt(renderbuffer)", keepParam = true) int renderbuffer); + + void glGenRenderbuffersOES(@AutoSize("renderbuffers") int n, @OutParameter @GLuint IntBuffer renderbuffers); + + @Alternate("glGenRenderbuffersOES") + @GLreturn("renderbuffers") + void glGenRenderbuffersOES2(@Constant("1") int n, @OutParameter @GLuint IntBuffer renderbuffers); + + void glRenderbufferStorageOES(@GLenum int target, @GLenum int internalformat, @GLsizei int width, @GLsizei int height); + + @StripPostfix("params") + void glGetRenderbufferParameterivOES(@GLenum int target, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetRenderbufferParameteriOES} instead. */ + @Alternate("glGetRenderbufferParameterivOES") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "OESFramebufferObject", method = "glGetRenderbufferParameteriOES") + @Deprecated + void glGetRenderbufferParameterivOES2(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + @Alternate("glGetRenderbufferParameterivOES") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetRenderbufferParameterivOES3(@GLenum int target, @GLenum int pname, @OutParameter IntBuffer params); + + boolean glIsFramebufferOES(@GLuint int framebuffer); + + void glBindFramebufferOES(@GLenum int target, @GLuint int framebuffer); + + void glDeleteFramebuffersOES(@AutoSize("framebuffers") int n, @Const @GLuint IntBuffer framebuffers); + + @Alternate("glDeleteFramebuffersOES") + void glDeleteFramebuffersOES(@Constant("1") int n, @Constant(value = "APIUtil.getInt(framebuffer)", keepParam = true) int framebuffer); + + void glGenFramebuffersOES(@AutoSize("framebuffers") int n, @OutParameter @GLuint IntBuffer framebuffers); + + @Alternate("glGenFramebuffersOES") + @GLreturn("framebuffers") + void glGenFramebuffersOES2(@Constant("1") int n, @OutParameter @GLuint IntBuffer framebuffers); + + @GLenum + int glCheckFramebufferStatusOES(@GLenum int target); + + void glFramebufferTexture2DOES(@GLenum int target, @GLenum int attachment, @GLenum int textarget, @GLuint int texture, int level); + + void glFramebufferRenderbufferOES(@GLenum int target, @GLenum int attachment, @GLenum int renderbuffertarget, @GLuint int renderbuffer); + + @StripPostfix("params") + void glGetFramebufferAttachmentParameterivOES(@GLenum int target, @GLenum int attachment, @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + /** @deprecated Will be removed in 3.0. Use {@link #glGetFramebufferAttachmentParameteriOES} instead. */ + @Alternate("glGetFramebufferAttachmentParameterivOES") + @GLreturn("params") + @StripPostfix("params") + @Reuse(value = "OESFramebufferObject", method = "glGetFramebufferAttachmentParameteriOES") + @Deprecated + void glGetFramebufferAttachmentParameterivOES2(@GLenum int target, @GLenum int attachment, @GLenum int pname, @OutParameter IntBuffer params); + + @Alternate("glGetFramebufferAttachmentParameterivOES") + @GLreturn("params") + @StripPostfix(value = "params", postfix = "v") + void glGetFramebufferAttachmentParameterivOES3(@GLenum int target, @GLenum int attachment, @GLenum int pname, @OutParameter IntBuffer params); + + void glGenerateMipmapOES(@GLenum int target); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_get_program_binary.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_get_program_binary.java new file mode 100644 index 0000000..4268d1d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_get_program_binary.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.AutoSize; +import org.lwjgl.util.generator.Check; +import org.lwjgl.util.generator.Const; +import org.lwjgl.util.generator.OutParameter; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; +import org.lwjgl.util.generator.opengl.GLvoid; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +public interface OES_get_program_binary { + + /** Accepted by the <pname> parameter of GetProgramiv: */ + int GL_PROGRAM_BINARY_LENGTH_OES = 0x8741; + + /** + * Accepted by the <pname< parameter of GetBooleanv, GetIntegerv, and + * GetFloatv: + */ + int GL_NUM_PROGRAM_BINARY_FORMATS_OES = 0x87FE, + GL_PROGRAM_BINARY_FORMATS_OES = 0x87FF; + + void glGetProgramBinaryOES(@GLuint int program, @AutoSize("binary") @GLsizei int bufSize, + @OutParameter @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length, + @OutParameter @Check("1") @GLenum IntBuffer binaryFormat, + @OutParameter @GLvoid ByteBuffer binary); + + void glProgramBinaryOES(@GLuint int program, @GLenum int binaryFormat, @Const @GLvoid ByteBuffer binary, @AutoSize("binary") int length); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_mapbuffer.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_mapbuffer.java new file mode 100644 index 0000000..b954605 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_mapbuffer.java @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLvoid; + +import java.nio.ByteBuffer; + +public interface OES_mapbuffer { + + /** Accepted by the <access> parameter of MapBufferOES: */ + int GL_WRITE_ONLY_OES = 0x88B9; + + /** Accepted by the <value> parameter of GetBufferParameteriv: */ + int GL_BUFFER_ACCESS_OES = 0x88BB, + GL_BUFFER_MAPPED_OES = 0x88BC; + + /** Accepted by the <pname> parameter of GetBufferPointervOES: */ + int GL_BUFFER_MAP_POINTER_OES = 0x88BD; + + @StripPostfix("pointer") + @CachedResult + @AutoSize("GLChecks.getBufferObjectSize(target)") + void glGetBufferPointervOES(@GLenum int target, @GLenum int pname, @OutParameter @Result @GLvoid ByteBuffer pointer); + + /** + * glMapBufferOES maps a GL buffer object to a ByteBuffer. The old_buffer argument can be null, + * in which case a new ByteBuffer will be created, pointing to the returned memory. If old_buffer is non-null, + * it will be returned if it points to the same mapped memory and has the same capacity as the buffer object, + * otherwise a new ByteBuffer is created. That way, an application will normally use glMapBuffer like this: + *

+ * ByteBuffer mapped_buffer; mapped_buffer = glMapBufferOES(..., ..., null); ... // Another map on the same buffer mapped_buffer = glMapBufferOES(..., ..., mapped_buffer); + *

+ * Only ByteBuffers returned from this method are to be passed as the old_buffer argument. User-created ByteBuffers cannot be reused. + *

+ * The version of this method without an explicit length argument calls glGetBufferParameter internally to + * retrieve the current buffer object size, which may cause a pipeline flush and reduce application performance. + *

+ * The version of this method with an explicit length argument is a fast alternative to the one without. No GL call + * is made to retrieve the buffer object size, so the user is responsible for tracking and using the appropriate length.
+ * Security warning: The length argument should match the buffer object size. Reading from or writing to outside + * the memory region that corresponds to the mapped buffer object will cause native crashes. + * + * @param old_buffer A ByteBuffer. If this argument points to the same address and has the same capacity as the new mapping, it will be returned and no new buffer will be created. + * + * @return A ByteBuffer representing the mapped buffer memory. + */ + @CachedResult + @GLvoid + @AutoSize("GLChecks.getBufferObjectSize(target)") + ByteBuffer glMapBufferOES(@GLenum int target, @GLenum int access); + + boolean glUnmapBufferOES(@GLenum int target); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_packed_depth_stencil.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_packed_depth_stencil.java new file mode 100644 index 0000000..1b79d3c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_packed_depth_stencil.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface OES_packed_depth_stencil { + + /** + * Accepted by the <format> parameter of TexImage2D and TexSubImage2D and by the + * <internalformat> parameter of TexImage2D: + */ + int GL_DEPTH_STENCIL_OES = 0x84F9; + + /** Accepted by the <type> parameter of TexImage2D and TexSubImage2D: */ + int GL_UNSIGNED_INT_24_8_OES = 0x84FA; + + /** + * Accepted by the <internalformat> parameter of RenderbufferStorage, and + * returned in the <params> parameter of GetRenderbufferParameteriv when + * <pname> is RENDERBUFFER_INTERNAL_FORMAT: + */ + int GL_DEPTH24_STENCIL8_OES = 0x88F0; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_required_internalformat.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_required_internalformat.java new file mode 100644 index 0000000..7d2d89e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_required_internalformat.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface OES_required_internalformat { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_rgb8_rgba8.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_rgb8_rgba8.java new file mode 100644 index 0000000..f1c42b2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_rgb8_rgba8.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.Extension; + +@Extension(postfix = "OES", className = "OESRGB8RGBA8") +public interface OES_rgb8_rgba8 { + + /** Accepted by the <internalformat> parameter of RenderbufferStorageOES: */ + int GL_RGB8_OES = 0x8051, + GL_RGBA8_OES = 0x8058; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_standard_derivatives.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_standard_derivatives.java new file mode 100644 index 0000000..d15b28b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_standard_derivatives.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface OES_standard_derivatives { + + /** + * Accepted by the <target> parameter of Hint and by the <pname> parameter of + * GetBooleanv, GetIntegerv, GetFloatv, and GetDoublev: + */ + int GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES = 0x8B8B; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_stencil1.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_stencil1.java new file mode 100644 index 0000000..31f865b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_stencil1.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface OES_stencil1 { + + /** Accepted by the <internalformat> parameter of RenderbufferStorageOES: */ + int GL_STENCIL_INDEX1_OES = 0x8D46; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_stencil4.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_stencil4.java new file mode 100644 index 0000000..1e2c31b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_stencil4.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface OES_stencil4 { + + /** Accepted by the <internalformat> parameter of RenderbufferStorageOES: */ + int GL_STENCIL_INDEX4_OES = 0x8D47; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_stencil8.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_stencil8.java new file mode 100644 index 0000000..35f5404 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_stencil8.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface OES_stencil8 { + + /** Accepted by the <internalformat> parameter of RenderbufferStorageOES: */ + int GL_STENCIL_INDEX8_OES = 0x8D48; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_surfaceless_context.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_surfaceless_context.java new file mode 100644 index 0000000..e864f6a --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_surfaceless_context.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2012 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface OES_surfaceless_context { + + /** Returned by glCheckFramebufferStatusOES and glCheckFramebufferStatus: */ + int GL_FRAMEBUFFER_UNDEFINED_OES = 0x8219; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_texture_3D.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_texture_3D.java new file mode 100644 index 0000000..3682759 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_texture_3D.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.Check; +import org.lwjgl.util.generator.Const; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.Buffer; +import java.nio.ByteBuffer; + +public interface OES_texture_3D { + + /** + * Accepted by the <target> parameter of TexImage3DOES, TexSubImage3DOES, + * CopyTexSubImage3DOES, CompressedTexImage3DOES and + * CompressedTexSubImage3DOES, GetTexParameteriv, and GetTexParameterfv: + */ + int GL_TEXTURE_3D_OES = 0x806F; + + /** + * Accepted by the <pname> parameter of TexParameteriv, TexParameterfv, + * GetTexParameteriv, and GetTexParameterfv: + */ + int GL_TEXTURE_WRAP_R_OES = 0x8072; + + /** + * Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, and + * GetFloatv: + */ + int GL_MAX_3D_TEXTURE_SIZE_OES = 0x8073, + GL_TEXTURE_BINDING_3D_OES = 0x806A; + + void glTexImage3DOES(@GLenum int target, int level, + @GLenum int internalFormat, @GLsizei int width, @GLsizei int height, @GLsizei int depth, int border, + @GLenum int format, @GLenum int type, + @Check(value = "GLChecks.calculateTexImage3DStorage(pixels, format, type, width, height, depth)", canBeNull = true) + @Const @GLbyte @GLshort @GLint @GLfloat Buffer pixels); + + void glTexSubImage3DOES(@GLenum int target, int level, + int xoffset, int yoffset, int zoffset, + @GLsizei int width, @GLsizei int height, @GLsizei int depth, + @GLenum int format, @GLenum int type, + @Check("GLChecks.calculateImageStorage(pixels, format, type, width, height, depth)") + @Const @GLbyte @GLshort @GLint @GLfloat Buffer pixels); + + void glCopyTexSubImage3DOES(@GLenum int target, int level, int xoffset, int yoffset, int zoffset, int x, int y, @GLsizei int width, @GLsizei int height); + + void glCompressedTexImage3DOES(@GLenum int target, int level, @GLenum int internalformat, + @GLsizei int width, @GLsizei int height, @GLsizei int depth, + int border, @GLsizei int imageSize, + @Check @Const @GLvoid ByteBuffer data); + + void glCompressedTexSubImage3DOES(@GLenum int target, int level, + int xoffset, int yoffset, int zoffset, + @GLsizei int width, @GLsizei int height, @GLsizei int depth, + @GLenum int format, @GLsizei int imageSize, + @Check @Const @GLvoid ByteBuffer data); + + void glFramebufferTexture3DOES(@GLenum int target, @GLenum int attachment, @GLenum int textarget, @GLuint int texture, int level, int zoffset); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_texture_float.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_texture_float.java new file mode 100644 index 0000000..8b20480 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_texture_float.java @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface OES_texture_float { +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_texture_float_linear.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_texture_float_linear.java new file mode 100644 index 0000000..a6f5c34 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_texture_float_linear.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface OES_texture_float_linear { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_texture_half_float.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_texture_half_float.java new file mode 100644 index 0000000..75e7880 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_texture_half_float.java @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface OES_texture_half_float { + + /** + * Accepted by the <type> parameter of TexImage2D, TexSubImage2D, + * TexImage3D, and TexSubImage3D: + */ + int GL_HALF_FLOAT_OES = 0x8D61; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_texture_half_float_linear.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_texture_half_float_linear.java new file mode 100644 index 0000000..e8a22d9 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_texture_half_float_linear.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface OES_texture_half_float_linear { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_texture_npot.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_texture_npot.java new file mode 100644 index 0000000..21cc93b --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_texture_npot.java @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface OES_texture_npot { + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_vertex_array_object.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_vertex_array_object.java new file mode 100644 index 0000000..e296140 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_vertex_array_object.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLreturn; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.IntBuffer; + +public interface OES_vertex_array_object { + + /** Accepted by the <pname> parameter of GetBooleanv, GetIntegerv, GetFloatv: */ + int GL_VERTEX_ARRAY_BINDING_OES = 0x85B5; + + void glBindVertexArrayOES(@GLuint int array); + + void glDeleteVertexArraysOES(@AutoSize("arrays") @GLsizei int n, @Const @GLuint IntBuffer arrays); + + @Alternate("glDeleteVertexArraysOES") + void glDeleteVertexArraysOES(@Constant("1") @GLsizei int n, @Constant(value = "APIUtil.getInt(array)", keepParam = true) int array); + + void glGenVertexArraysOES(@AutoSize("arrays") @GLsizei int n, @OutParameter @GLuint IntBuffer arrays); + + @Alternate("glGenVertexArraysOES") + @GLreturn("arrays") + void glGenVertexArraysOES2(@Constant("1") @GLsizei int n, @OutParameter @GLuint IntBuffer arrays); + + boolean glIsVertexArrayOES(@GLuint int array); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_vertex_half_float.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_vertex_half_float.java new file mode 100644 index 0000000..94086ba --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_vertex_half_float.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface OES_vertex_half_float { + + /** Accepted by the <type> parameter of VertexAttribPointer: */ + int GL_HALF_FLOAT_OES = 0x8D61; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_vertex_type_10_10_10_2.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_vertex_type_10_10_10_2.java new file mode 100644 index 0000000..ef7c56d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/OES_vertex_type_10_10_10_2.java @@ -0,0 +1,40 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface OES_vertex_type_10_10_10_2 { + + /** Accepted by the <type> parameter of VertexAttribPointer */ + int GL_UNSIGNED_INT_10_10_10_2_OES = 0x8DF6, + GL_INT_10_10_10_2_OES = 0x8DF7; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/QCOM_binning_control.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/QCOM_binning_control.java new file mode 100644 index 0000000..ff6a0b2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/QCOM_binning_control.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface QCOM_binning_control { + + /** Accepted by the <target> parameter of Hint: */ + int GL_BINNING_CONTROL_HINT_QCOM = 0x8FB0; + + /** Accepted by the <hint> parameter of Hint: */ + int GL_CPU_OPTIMIZED_QCOM = 0x8FB1, + GL_GPU_OPTIMIZED_QCOM = 0x8FB2, + GL_RENDER_DIRECT_TO_FRAMEBUFFER_QCOM = 0x8FB3, + GL_DONT_CARE = 0x1100; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/QCOM_driver_control.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/QCOM_driver_control.java new file mode 100644 index 0000000..ff8863d --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/QCOM_driver_control.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.*; +import org.lwjgl.util.generator.opengl.GLchar; +import org.lwjgl.util.generator.opengl.GLreturn; +import org.lwjgl.util.generator.opengl.GLsizei; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +public interface QCOM_driver_control { + + void glGetDriverControlsQCOM(@OutParameter @Check(value = "1", canBeNull = true) IntBuffer num, + @AutoSize(value = "driverControls", canBeNull = true) @GLsizei int size, + @OutParameter @Check(canBeNull = true) @GLuint IntBuffer driverControls); + + void glGetDriverControlStringQCOM(@GLuint int driverControl, + @AutoSize(value = "driverControlString", canBeNull = true) @GLsizei int bufSize, + @OutParameter @Check(value = "1", canBeNull = true) @GLsizei IntBuffer length, + @OutParameter @Check(canBeNull = true) @GLchar ByteBuffer driverControlString); + + @Alternate("glGetDriverControlStringQCOM") + @GLreturn(value = "driverControlString", maxLength = "bufSize") + void glGetDriverControlStringQCOM2(@GLuint int driverControl, + @GLsizei int bufSize, + @OutParameter @GLsizei @Constant("MemoryUtil.getAddress0(driverControlString_length)") IntBuffer length, + @OutParameter @GLchar ByteBuffer driverControlString); + + void glEnableDriverControlQCOM(@GLuint int driverControl); + + void glDisableDriverControlQCOM(@GLuint int driverControl); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/QCOM_extended_get.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/QCOM_extended_get.java new file mode 100644 index 0000000..9e9b4c2 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/QCOM_extended_get.java @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.AutoSize; +import org.lwjgl.util.generator.Check; +import org.lwjgl.util.generator.OutParameter; +import org.lwjgl.util.generator.Result; +import org.lwjgl.util.generator.opengl.*; + +import java.nio.Buffer; +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +public interface QCOM_extended_get { + + /** Accepted by the <pname> parameter of ExtGetTexLevelParameterivQCOM */ + int GL_TEXTURE_WIDTH_QCOM = 0x8BD2, + GL_TEXTURE_HEIGHT_QCOM = 0x8BD3, + GL_TEXTURE_DEPTH_QCOM = 0x8BD4, + GL_TEXTURE_INTERNAL_FORMAT_QCOM = 0x8BD5, + GL_TEXTURE_FORMAT_QCOM = 0x8BD6, + GL_TEXTURE_TYPE_QCOM = 0x8BD7, + GL_TEXTURE_IMAGE_VALID_QCOM = 0x8BD8, + GL_TEXTURE_NUM_LEVELS_QCOM = 0x8BD9, + GL_TEXTURE_TARGET_QCOM = 0x8BDA, + GL_TEXTURE_OBJECT_VALID_QCOM = 0x8BDB; + + /** Accepted by the <pname> parameter of ExtTexObjectStateOverrideiQCOM */ + int GL_STATE_RESTORE = 0x8BDC; + + void glExtGetTexturesQCOM(@OutParameter @Check("1") @GLuint IntBuffer textures, + @AutoSize("textures") int maxTextures, + @OutParameter @Check("1") IntBuffer numTextures); + + void glExtGetBuffersQCOM(@OutParameter @Check("1") @GLuint IntBuffer buffers, + @AutoSize("buffers") int maxBuffers, + @OutParameter @Check("1") IntBuffer numBuffers); + + void glExtGetRenderbuffersQCOM(@OutParameter @Check("1") @GLuint IntBuffer renderbuffers, + @AutoSize("renderbuffers") int maxRenderbuffers, + @OutParameter @Check("1") IntBuffer numRenderbuffers); + + void glExtGetFramebuffersQCOM(@OutParameter @Check("1") @GLuint IntBuffer framebuffers, + @AutoSize("framebuffers") int maxFramebuffers, + @OutParameter @Check("1") IntBuffer numFramebuffers); + + void glExtGetTexLevelParameterivQCOM(@GLuint int texture, @GLenum int face, int level, + @GLenum int pname, @OutParameter @Check("1") IntBuffer params); + + void glExtTexObjectStateOverrideiQCOM(@GLenum int target, @GLenum int pname, int param); + + void glExtGetTexSubImageQCOM(@GLenum int target, int level, + int xoffset, int yoffset, int zoffset, + @GLsizei int width, @GLsizei int height, @GLsizei int depth, + @GLenum int format, @GLenum int type, + @OutParameter + @Check("GLChecks.calculateImageStorage(texels, format, type, width, height, depth)") + @GLbyte + @GLshort + @GLint + @GLfloat Buffer texels); + + void glExtGetBufferPointervQCOM(@GLenum int target, @Result @GLvoid ByteBuffer params); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/QCOM_extended_get2.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/QCOM_extended_get2.java new file mode 100644 index 0000000..2a0fd7e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/QCOM_extended_get2.java @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.AutoSize; +import org.lwjgl.util.generator.Check; +import org.lwjgl.util.generator.OutParameter; +import org.lwjgl.util.generator.opengl.GLchar; +import org.lwjgl.util.generator.opengl.GLenum; +import org.lwjgl.util.generator.opengl.GLuint; + +import java.nio.ByteBuffer; +import java.nio.IntBuffer; + +public interface QCOM_extended_get2 { + + void glExtGetShadersQCOM(@OutParameter @Check("1") @GLuint IntBuffer shaders, + @AutoSize("shaders") int maxShaders, + @OutParameter @Check("1") IntBuffer numShaders); + + void glExtGetProgramsQCOM(@OutParameter @Check("1") @GLuint IntBuffer programs, + @AutoSize("programs") int maxPrograms, + @OutParameter @Check("1") IntBuffer numPrograms); + + boolean glExtIsProgramBinaryQCOM(@GLuint int program); + + void glExtGetProgramBinarySourceQCOM(@GLuint int program, @GLenum int shadertype, + @OutParameter @Check @GLchar ByteBuffer source, @OutParameter @Check("1") IntBuffer length); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/QCOM_performance_monitor_global_mode.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/QCOM_performance_monitor_global_mode.java new file mode 100644 index 0000000..45d145c --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/QCOM_performance_monitor_global_mode.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface QCOM_performance_monitor_global_mode { + + /** + * Accepted by the <cap> parameter of Enable and Disable, and + * IsEnabled, and by the <pname> parameter of GetBooleanv, GetIntegerv, + * and GetFloatv: + */ + int GL_PERFMON_GLOBAL_MODE_QCOM = 0x8FA0; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/QCOM_tiled_rendering.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/QCOM_tiled_rendering.java new file mode 100644 index 0000000..5ba1e91 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/QCOM_tiled_rendering.java @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +import org.lwjgl.util.generator.opengl.GLbitfield; +import org.lwjgl.util.generator.opengl.GLuint; + +public interface QCOM_tiled_rendering { + + /** + * Accepted by the <preserveMask> parameter of StartTilingQCOM and + * EndTilingQCOM + */ + int GL_COLOR_BUFFER_BIT0_QCOM = 0x00000001, + GL_COLOR_BUFFER_BIT1_QCOM = 0x00000002, + GL_COLOR_BUFFER_BIT2_QCOM = 0x00000004, + GL_COLOR_BUFFER_BIT3_QCOM = 0x00000008, + GL_COLOR_BUFFER_BIT4_QCOM = 0x00000010, + GL_COLOR_BUFFER_BIT5_QCOM = 0x00000020, + GL_COLOR_BUFFER_BIT6_QCOM = 0x00000040, + GL_COLOR_BUFFER_BIT7_QCOM = 0x00000080, + GL_DEPTH_BUFFER_BIT0_QCOM = 0x00000100, + GL_DEPTH_BUFFER_BIT1_QCOM = 0x00000200, + GL_DEPTH_BUFFER_BIT2_QCOM = 0x00000400, + GL_DEPTH_BUFFER_BIT3_QCOM = 0x00000800, + GL_DEPTH_BUFFER_BIT4_QCOM = 0x00001000, + GL_DEPTH_BUFFER_BIT5_QCOM = 0x00002000, + GL_DEPTH_BUFFER_BIT6_QCOM = 0x00004000, + GL_DEPTH_BUFFER_BIT7_QCOM = 0x00008000, + GL_STENCIL_BUFFER_BIT0_QCOM = 0x00010000, + GL_STENCIL_BUFFER_BIT1_QCOM = 0x00020000, + GL_STENCIL_BUFFER_BIT2_QCOM = 0x00040000, + GL_STENCIL_BUFFER_BIT3_QCOM = 0x00080000, + GL_STENCIL_BUFFER_BIT4_QCOM = 0x00100000, + GL_STENCIL_BUFFER_BIT5_QCOM = 0x00200000, + GL_STENCIL_BUFFER_BIT6_QCOM = 0x00400000, + GL_STENCIL_BUFFER_BIT7_QCOM = 0x00800000, + GL_MULTISAMPLE_BUFFER_BIT0_QCOM = 0x01000000, + GL_MULTISAMPLE_BUFFER_BIT1_QCOM = 0x02000000, + GL_MULTISAMPLE_BUFFER_BIT2_QCOM = 0x04000000, + GL_MULTISAMPLE_BUFFER_BIT3_QCOM = 0x08000000, + GL_MULTISAMPLE_BUFFER_BIT4_QCOM = 0x10000000, + GL_MULTISAMPLE_BUFFER_BIT5_QCOM = 0x20000000, + GL_MULTISAMPLE_BUFFER_BIT6_QCOM = 0x40000000, + GL_MULTISAMPLE_BUFFER_BIT7_QCOM = 0x80000000; + + void glStartTilingQCOM(@GLuint int x, @GLuint int y, @GLuint int width, @GLuint int height, + @GLbitfield int preserveMask); + + void glEndTilingQCOM(@GLbitfield int preserveMask); + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/QCOM_writeonly_rendering.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/QCOM_writeonly_rendering.java new file mode 100644 index 0000000..c1d9fc8 --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/QCOM_writeonly_rendering.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface QCOM_writeonly_rendering { + + /** Accepted by the <cap> parameter of Enable, Disable. */ + int GL_WRITEONLY_RENDERING_QCOM = 0x8823; + +} \ No newline at end of file diff --git a/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/VIV_shader_binary.java b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/VIV_shader_binary.java new file mode 100644 index 0000000..249cd1e --- /dev/null +++ b/etc/lwjgl-2.9.1/src/templates/org/lwjgl/opengles/VIV_shader_binary.java @@ -0,0 +1,39 @@ +/* + * Copyright (c) 2002-2011 LWJGL Project + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * * Neither the name of 'LWJGL' nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package org.lwjgl.opengles; + +public interface VIV_shader_binary { + + /** Accepted by the <binaryformat> parameter of ShaderBinary: */ + int GL_SHADER_BINARY_VIV = 0x8FC4; + +} diff --git a/etc/slick-util.jar b/etc/slick-util.jar new file mode 100644 index 0000000..10b552a Binary files /dev/null and b/etc/slick-util.jar differ diff --git a/upload all.sh b/upload all.sh new file mode 100644 index 0000000..e69de29